arm64 support: eBPF monitoring mode #1145
Replies: 2 comments
-
Hi @redanaheim , Thank you for reporting this issue. Could you post the log lines indicating if any of the modules has been loaded?
Is there any entry in I tested this on an aarch64 VM, ubuntu 20.04, kernel 5.8.0, and the modules load and work, although the behaviour is a bit erratic, for opesnitch-procs.o mainly. I'll try to test it on another distro/hardware/kernel.
thank you for this info!
That problem seems to be the same than #1013 , particular to NixOS. |
Beta Was this translation helpful? Give feedback.
-
tested on a raspberry pi with kernel 6.1.21-v8+, ebpf network interception works, including the hook for VPNs/tunnels:
syscall execve hook doesn't work, but sched_process_exit do (so I guess sched_process_exec would work as well)
kernel config / requirements
|
Beta Was this translation helpful? Give feedback.
-
Describe the bug
The eBPF monitoring mode cannot be used successfully on arm64.
24.11.20240524 Vicuña
Linux asahimbp 6.8.9-asahi #1-NixOS SMP PREEMPT_DYNAMIC Tue Jan 1 00:00:00 UTC 1980 aarch64 GNU/Linux
I had been using OpenSnitch in proc monitoring mode but started using a WireGuard VPN, so I wished to enable eBPF monitoring mode as per the FAQ.
I checked the requirements using
opensnitchd -check-requirements
and added all the required kernel configuration options my NixOS configuration:I confirmed after rebuilding my configuration that the configuration options were listed in
/proc/config.gz
(that's what the comment after each option is). Unfortunately, I discovered thatHAVE_KPROBES_ON_FTRACE
andKPROBES_ON_FTRACE
were both not present (much lessy
). I initially thought that they were overwritten by configuration options from nixos-apple-silicon, but after combing through their files and the Asahi Linux kernel config, neither were present.As it turns out,
HAVE_KPROBES_ON_FTRACE
is determined unset because the kernel on arm64 does not yet supportKPROBES_ON_FTRACE
(source: https://github.com/torvalds/linux/blob/master/Documentation/features/debug/kprobes-on-ftrace/arch-support.txt).Therefore, I am unable to set the required configuration options on my Apple Silicon machine and
opensnitchd -check-requirements
displays the following:While the daemon produces the following error message:
Side note - I don't understand why the error messages involve failure to attack uprobes while the uprobe kernel configuration options (and every other option, in fact) appear to be fine:
Side note number 2 for which I will submit a PR: the check for CONFIG_KPROBES_ON_FTRACE is duplicated at
opensnitch/daemon/core/system.go
Line 88 in 03747ea
To Reproduce
Steps to reproduce the behavior:
CONFIG_KPROBES_ON_FTRACE
option to true on an arm64 machine.opensnitchd.service
with eBPF monitoring mode enabled anyway, and when it displays a bewildering error message try runningopensnitchd -check-requirements
.Expected behavior (optional)
arm64 supported with eBPF mode so that WireGuard connections can be filtered correctly.
Beta Was this translation helpful? Give feedback.
All reactions