From d56835f2257805ae4de3785b1cad5fdf0a4f2c85 Mon Sep 17 00:00:00 2001 From: Levi Zim Date: Mon, 7 Oct 2024 10:57:25 +0800 Subject: [PATCH] fix/bpf: better workaround for verifier --- src/bpf/tracexec_system.bpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bpf/tracexec_system.bpf.c b/src/bpf/tracexec_system.bpf.c index e0d0dbea..0e26cb89 100644 --- a/src/bpf/tracexec_system.bpf.c +++ b/src/bpf/tracexec_system.bpf.c @@ -129,7 +129,7 @@ static int read_send_path(const struct path *path, #ifdef EBPF_DEBUG #define debug(...) bpf_printk("tracexec_system: " __VA_ARGS__); #else -#define debug(...) bpf_printk(""); +#define debug(...) #endif bool should_trace(pid_t old_tgid) { @@ -676,7 +676,7 @@ static int read_fdset_word(u32 index, struct fdset_word_reader_context *ctx) { } // Gather information about a single fd and send it back to userspace -static int _read_fd(unsigned int fd_num, struct file **fd_array, +static __attribute__((always_inline)) int _read_fd(unsigned int fd_num, struct file **fd_array, struct exec_event *event, bool cloexec) { if (event == NULL) return 1;