[DTrace-devel] [PATCH 04/61] Provide BPF_PSEUDO_CALL definition if necessary

eugene.loh at oracle.com eugene.loh at oracle.com
Fri Jul 8 14:44:48 UTC 2022


From: Eugene Loh <eugene.loh at oracle.com>

The BPF_PSEUDO_CALL macro was introduced in Linux 4.15 in
cc8b0b92a169 ("bpf: introduce function calls (function boundaries)").
Oddly, however, /usr/include/linux/bpf.h is missing this definition
on a freshly installed OL7 (5.4.17-2136) system on aarch64.

To facilitate DTrace builds, define the macro explicitly if it is
not yet already defined.

Signed-off-by: Eugene Loh <eugene.loh at oracle.com>
---
 include/bpf_asm.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/bpf_asm.h b/include/bpf_asm.h
index 152d2312..dd07f9b2 100644
--- a/include/bpf_asm.h
+++ b/include/bpf_asm.h
@@ -129,6 +129,9 @@
 		.imm = (id)						\
 	})
 
+#ifndef BPF_PSEUDO_CALL
+#define BPF_PSEUDO_CALL 1
+#endif
 #define BPF_CALL_FUNC(val)						\
 	((struct bpf_insn) {						\
 		.code = BPF_JMP | BPF_CALL,				\
-- 
2.18.4




More information about the DTrace-devel mailing list