summaryrefslogtreecommitdiff
path: root/bpfloader/BpfLoader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'bpfloader/BpfLoader.cpp')
-rw-r--r--bpfloader/BpfLoader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/bpfloader/BpfLoader.cpp b/bpfloader/BpfLoader.cpp
index 313b097..1ad5a7d 100644
--- a/bpfloader/BpfLoader.cpp
+++ b/bpfloader/BpfLoader.cpp
@@ -264,9 +264,13 @@ int main(int argc, char** argv) {
// Enable the eBPF JIT -- but do note that on 64-bit kernels it is likely
// already force enabled by the kernel config option BPF_JIT_ALWAYS_ON
+ // (Note: this (open) will fail with ENOENT 'No such file or directory' if
+ // kernel does not have CONFIG_BPF_JIT=y)
if (writeProcSysFile("/proc/sys/net/core/bpf_jit_enable", "1\n")) return 1;
// Enable JIT kallsyms export for privileged users only
+ // (Note: this (open) will fail with ENOENT 'No such file or directory' if
+ // kernel does not have CONFIG_HAVE_EBPF_JIT=y)
if (writeProcSysFile("/proc/sys/net/core/bpf_jit_kallsyms", "1\n")) return 1;
// This is ugly... but this allows InProcessTethering which runs as system_server,