Skip to content

Commit

Permalink
fix/bpf: better workaround for verifier
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt committed Oct 7, 2024
1 parent c7ea815 commit d56835f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bpf/tracexec_system.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d56835f

Please sign in to comment.