Skip to content

Commit 1286f6f

Browse files
committed
ebpf: don't submit exit events unless required
exit and exit_group syscall are always submitted to userspace even when not chosen by the user. Only submit these events when required.
1 parent 0b29052 commit 1286f6f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/ebpf/c/tracee.bpf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2535,7 +2535,7 @@ int tracepoint__raw_syscalls__sys_enter(struct bpf_raw_tracepoint_args *ctx)
25352535
if (sys->id != SYS_EXIT && sys->id != SYS_EXIT_GROUP && sys->id != SYS_RT_SIGRETURN) {
25362536
sys->ts = data.context.ts;
25372537
data.task_info->syscall_traced = true;
2538-
} else if (sys->id != SYS_RT_SIGRETURN) {
2538+
} else if ((sys->id != SYS_RT_SIGRETURN) && (should_submit(sys->id, data.config))) {
25392539
data.buf_off = sizeof(event_context_t);
25402540
data.context.argnum = 0;
25412541
save_to_submit_buf(&data, &sys->args.args[0], sizeof(int), 0);

0 commit comments

Comments
 (0)