Enable eBPF tracing support (tracepoints, uprobes, tc) for x86_64 and arm64 6.1.158#27
Merged
bchalios merged 1 commit intoJul 16, 2026
Conversation
… arm64 6.1.158 Enable the kernel tracing subsystem needed for eBPF-based tracing programs on the 6.1.158 guest kernels, keeping both architectures aligned: - CONFIG_TRACEPOINTS=y - CONFIG_FTRACE=y - CONFIG_FUNCTION_TRACER=y - CONFIG_UPROBES=y - CONFIG_UPROBE_EVENTS=y - CONFIG_NET_CLS_BPF=y Why: we run an eBPF-based runtime-security agent inside E2B sandboxes. With in-kernel BTF now enabled (e2b-dev#26), its eBPF programs still fail to load with EINVAL, because the guest kernel has the entire kprobe/uprobe tracing stack compiled out — none of the above symbols are set, so the kernel rejects any tracing-type BPF program at load time. This set intentionally excludes CONFIG_KPROBES/CONFIG_KPROBE_EVENTS, which would additionally require CONFIG_MODULES (loadable kernel module support) since CONFIG_KPROBES depends on MODULES in this kernel version. That's a materially bigger capability change than a tracing flag, so we're leaving kprobe-based support out of this PR and scoping it to what uprobes + tracepoints + the BPF traffic classifier can cover. Impact: this is not a no-op like a debug-info flag. It compiles in the ftrace/uprobe infrastructure (a modest binary size increase and the fixed nop-patching overhead ftrace's function tracer adds), but no tracer or probe is actually active unless something explicitly attaches one - e.g. our runtime-security agent's uprobe-based hooks. No existing kernel code paths, behavior, or struct layout change as a result. Verified against the actual 6.1.158 kernel source (arch/Kconfig, kernel/trace/Kconfig, net/sched/Kconfig): none of these six symbols depend on CONFIG_MODULES, and their existing prerequisites (CONFIG_PERF_EVENTS, CONFIG_ARCH_SUPPORTS_UPROBES, CONFIG_MMU, CONFIG_NET_SCHED, CONFIG_NET_CLS, CONFIG_HAVE_FUNCTION_TRACER, CONFIG_TRACING_SUPPORT) are already enabled in both arch configs.
|
We require contributors to sign our Contributor License Agreement, and we don't have @lohith-atomicwork on file. You can sign our CLA at https://e2b.dev/docs/cla . Once you've signed, post a comment here that says '@cla-bot check' |
Contributor
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
Contributor
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
bchalios
approved these changes
Jul 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Enable the kernel tracing subsystem needed for eBPF tracing programs on the 6.1.158 guest kernels, for both architectures:
configs/x86_64/6.1.158.config/configs/arm64/6.1.158.config:CONFIG_TRACEPOINTS=yCONFIG_FTRACE=yCONFIG_FUNCTION_TRACER=yCONFIG_UPROBES=yCONFIG_UPROBE_EVENTS=yCONFIG_NET_CLS_BPF=yWhy
We run an eBPF-based runtime-security agent inside E2B sandboxes. With in-kernel BTF now enabled (#26), its eBPF programs still fail to load with
load program: invalid argument, because the guest kernel has the entire kprobe/uprobe tracing stack compiled out — none of the symbols above are set, so the kernel rejects any tracing-type BPF program at load time regardless of BTF.Scoped deliberately to exclude
CONFIG_KPROBES/CONFIG_KPROBE_EVENTS. In this kernel,CONFIG_KPROBEShas a harddepends on MODULES— enabling it would also requireCONFIG_MODULES(loadable kernel module support), which is a materially bigger capability change than a tracing flag and off by design in this guest kernel. We're leaving kprobe-based support out of this PR and scoping it to what tracepoints + uprobes + the BPF traffic classifier (NET_CLS_BPF) can cover on their own, with no module-loading dependency.Notes
x86_64andarm64configs.arch/Kconfig,kernel/trace/Kconfig,net/sched/Kconfig): none of these six symbols depend onCONFIG_MODULES, and their prerequisites (CONFIG_PERF_EVENTS,CONFIG_ARCH_SUPPORTS_UPROBES,CONFIG_MMU,CONFIG_NET_SCHED,CONFIG_NET_CLS,CONFIG_HAVE_FUNCTION_TRACER,CONFIG_TRACING_SUPPORT) are already enabled in both arch configs.