Skip to content

Commit

Permalink
refactor: remove unnecessary __sys_ prefix
Browse files Browse the repository at this point in the history
`github.com/gojue/ebpfmanager` is able to search the proper hooks for
them.

Signed-off-by: Leon Hwang <[email protected]>
  • Loading branch information
Asphaltt committed Dec 17, 2024
1 parent 57e9289 commit 62b9b47
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kern/openssl.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ int probe_inet_accept(struct pt_regs* ctx) {
return 0;
}

SEC("kretprobe/__sys_accept4")
SEC("kretprobe/sys_accept4")
int retprobe_accept4(struct pt_regs* ctx) {
struct tcp_fd_info *fd_info;
struct socket *sock;
Expand Down
10 changes: 5 additions & 5 deletions user/module/probe_openssl_text.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (m *MOpenSSLProbe) setupManagersText() error {
{
Section: "kprobe/sys_connect",
EbpfFuncName: "probe_connect",
AttachToFuncName: "__sys_connect",
AttachToFuncName: "connect",
UID: "kprobe_sys_connect",
},
{
Expand All @@ -86,13 +86,13 @@ func (m *MOpenSSLProbe) setupManagersText() error {
{
Section: "kretprobe/sys_connect",
EbpfFuncName: "retprobe_connect",
AttachToFuncName: "__sys_connect",
AttachToFuncName: "connect",
UID: "kretprobe_sys_connect",
},
{
Section: "kprobe/sys_connect",
EbpfFuncName: "probe_connect",
AttachToFuncName: "__sys_accept4",
AttachToFuncName: "accept4",
UID: "kprobe_sys_accept4",
},
{
Expand All @@ -102,9 +102,9 @@ func (m *MOpenSSLProbe) setupManagersText() error {
UID: "kprobe_inet_accept",
},
{
Section: "kretprobe/__sys_accept4",
Section: "kretprobe/sys_accept4",
EbpfFuncName: "retprobe_accept4",
AttachToFuncName: "__sys_accept4",
AttachToFuncName: "accept4",
UID: "kretprobe_sys_accept4",
},
{
Expand Down

0 comments on commit 62b9b47

Please sign in to comment.