On 15/11/2022 13:56, Teo Couprie Diaz wrote:
On 15/11/2022 09:08, Zachary Leaf wrote:
Enable support for running eBPF in the kernel. JIT compilation is disabled for now.
In addition enable syscall tracing options that are required to use BPF_PROG_TYPE_TRACEPOINT.
Signed-off-by: Zachary Leaf zachary.leaf@arm.com
.../configs/morello_transitional_pcuabi_defconfig | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/configs/morello_transitional_pcuabi_defconfig b/arch/arm64/configs/morello_transitional_pcuabi_defconfig index 2c0798c18553..0d32128d6610 100644 --- a/arch/arm64/configs/morello_transitional_pcuabi_defconfig +++ b/arch/arm64/configs/morello_transitional_pcuabi_defconfig @@ -145,5 +145,18 @@ CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y # CONFIG_SCHED_DEBUG is not set # CONFIG_DEBUG_PREEMPT is not set -# CONFIG_FTRACE is not set CONFIG_MEMTEST=y +# BPF +CONFIG_BPF=y +CONFIG_BPF_SYSCALL=y +CONFIG_NET_CLS_BPF=m +CONFIG_NET_ACT_BPF=m +CONFIG_BPF_JIT=n
Is this form valid ? Shouldn't it be the following ?
I think so as per https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html
# CONFIG_BPF_JIT is not set
This is just a comment, so I don't believe it affects anything. It just means the option wasn't explicitly given when the config was generated. If an option is not set, it depends what the default for a given option is.
As far as I can tell CONFIG_BPF_JIT is enabled by default on arm64 as per kernel/bpf/Kconfig + arch/arm64/Kconfig.
This is my understanding based on the docs/above files.
In any case it probably doesn't hurt to be explicit with an =n.
I haven't looked into the JIT yet or how it works so thought it better to disable it for now. I should probably add that to the commit message.
Thanks, Zach
Or does =n force it to be disabled anyway ?
Thanks, Téo
+CONFIG_HAVE_EBPF_JIT=y +# for BPF tracepoint support +CONFIG_BPF_EVENTS=y +CONFIG_TRACEPOINTS=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_PERF_EVENTS=y +CONFIG_FTRACE=y +CONFIG_FTRACE_SYSCALLS=y