Skip to content

Commit 3301e60

Browse files
committed
meta-kernel-block: add BPF support
Change-type: patch Signed-off-by: Alex Gonzalez <alexg@balena.io>
1 parent 4487169 commit 3301e60

2 files changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
COMPATIBLE_HOST = "(x86_64|aarch64).*-linux"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# BPF LSM + BTF + tracing/observability
2+
#
3+
# Enables the in-kernel BPF security module, BTF type information for
4+
# kernel introspection, always-on JIT, and the function/kprobe tracing
5+
# surface bpftrace/Tetragon-class agents need.
6+
#
7+
# These entries require =y kernel-config changes (LSM hook chain,
8+
# DEBUG_INFO). meta-kernel-modules-block could not have produced them.
9+
10+
# Debug info / BTF prerequisites. Full DWARF is required for BTF.
11+
CONFIG_DEBUG_INFO=y
12+
# CONFIG_DEBUG_INFO_NONE is not set
13+
# CONFIG_DEBUG_INFO_REDUCED is not set
14+
CONFIG_DEBUG_INFO_BTF=y
15+
16+
# BPF core. Most of these are typically already =y in modern defconfigs;
17+
# stating them explicitly keeps the fragment robust against base changes.
18+
CONFIG_BPF=y
19+
CONFIG_BPF_SYSCALL=y
20+
CONFIG_BPF_JIT=y
21+
CONFIG_BPF_JIT_ALWAYS_ON=y
22+
23+
# BPF LSM. CONFIG_LSM is a comma-separated string of active LSMs; the
24+
# value below matches the upstream 5.18+ default with bpf included. If
25+
# the balena base defconfig has a custom LSM order, this overrides it.
26+
CONFIG_BPF_LSM=y
27+
CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,bpf,integrity"
28+
29+
# Tracing surface for observability.
30+
CONFIG_FTRACE=y
31+
CONFIG_FUNCTION_TRACER=y
32+
CONFIG_KPROBES=y
33+
CONFIG_KPROBE_EVENTS=y
34+
CONFIG_PERF_EVENTS=y
35+
CONFIG_BPF_EVENTS=y

0 commit comments

Comments
 (0)