Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v15] Fix eBPF on RHEL 9 family systems #44024

Merged
merged 1 commit into from
Jul 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bpf/enhancedrecording/command.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ static int exit_execve(int ret)
}

SEC("tp/syscalls/sys_execve")
int tracepoint__syscalls__sys_enter_execve(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_execve(struct syscall_trace_enter *tp)
{
const char *filename = (const char *)tp->args[0];
const char *const *argv = (const char *const *)tp->args[1];
Expand All @@ -175,13 +175,13 @@ int tracepoint__syscalls__sys_enter_execve(struct trace_event_raw_sys_enter *tp)
}

SEC("tp/syscalls/sys_exit_execve")
int tracepoint__syscalls__sys_exit_execve(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_execve(struct syscall_trace_exit *tp)
{
return exit_execve(tp->ret);
}

SEC("tp/syscalls/sys_execveat")
int tracepoint__syscalls__sys_enter_execveat(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_execveat(struct syscall_trace_enter *tp)
{
const char *filename = (const char *)tp->args[1];
const char *const *argv = (const char *const *)tp->args[2];
Expand All @@ -191,7 +191,7 @@ int tracepoint__syscalls__sys_enter_execveat(struct trace_event_raw_sys_enter *t
}

SEC("tp/syscalls/sys_exit_execveat")
int tracepoint__syscalls__sys_exit_execveat(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_execveat(struct syscall_trace_exit *tp)
{
return exit_execve(tp->ret);
}
4 changes: 2 additions & 2 deletions bpf/enhancedrecording/counter_test.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ char LICENSE[] SEC("license") = "Dual BSD/GPL";
BPF_COUNTER(test_counter);

SEC("tp/syscalls/sys_close")
int tracepoint__syscalls__sys_enter_close(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_close(struct syscall_trace_enter *tp)
{
int fd = (int)tp->args[0];

Expand All @@ -23,7 +23,7 @@ int tracepoint__syscalls__sys_enter_close(struct trace_event_raw_sys_enter *tp)
}

SEC("tp/syscalls/sys_exit_close")
int tracepoint__syscalls__sys_exit_close(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_close(struct syscall_trace_exit *tp)
{
return 0;
}
16 changes: 8 additions & 8 deletions bpf/enhancedrecording/disk.bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ static int exit_open(int ret) {


SEC("tp/syscalls/sys_enter_creat")
int tracepoint__syscalls__sys_enter_creat(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_creat(struct syscall_trace_enter *tp)
{
const char *filename = (const char*) tp->args[0];

return enter_open(filename, 0);
}

SEC("tp/syscalls/sys_exit_creat")
int tracepoint__syscalls__sys_exit_creat(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_creat(struct syscall_trace_exit *tp)
{
return exit_open(tp->ret);
}
Expand All @@ -114,7 +114,7 @@ int tracepoint__syscalls__sys_exit_creat(struct trace_event_raw_sys_exit *tp)
#ifndef __TARGET_ARCH_arm64

SEC("tp/syscalls/sys_enter_open")
int tracepoint__syscalls__sys_enter_open(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_open(struct syscall_trace_enter *tp)
{
const char *filename = (const char*) tp->args[0];
int flags = tp->args[1];
Expand All @@ -125,13 +125,13 @@ int tracepoint__syscalls__sys_enter_open(struct trace_event_raw_sys_enter *tp)
#endif // __aarch64__

SEC("tp/syscalls/sys_exit_open")
int tracepoint__syscalls__sys_exit_open(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_open(struct syscall_trace_exit *tp)
{
return exit_open(tp->ret);
}

SEC("tp/syscalls/sys_enter_openat")
int tracepoint__syscalls__sys_enter_openat(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_openat(struct syscall_trace_enter *tp)
{
const char *filename = (const char*) tp->args[1];
int flags = tp->args[2];
Expand All @@ -140,13 +140,13 @@ int tracepoint__syscalls__sys_enter_openat(struct trace_event_raw_sys_enter *tp)
};

SEC("tp/syscalls/sys_exit_openat")
int tracepoint__syscalls__sys_exit_openat(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_openat(struct syscall_trace_exit *tp)
{
return exit_open(tp->ret);
}

SEC("tp/syscalls/sys_enter_openat2")
int tracepoint__syscalls__sys_enter_openat2(struct trace_event_raw_sys_enter *tp)
int tracepoint__syscalls__sys_enter_openat2(struct syscall_trace_enter *tp)
{
const char *filename = (const char*) tp->args[1];
struct open_how *how = (struct open_how *) tp->args[2];
Expand All @@ -155,7 +155,7 @@ int tracepoint__syscalls__sys_enter_openat2(struct trace_event_raw_sys_enter *tp
};

SEC("tp/syscalls/sys_exit_openat2")
int tracepoint__syscalls__sys_exit_openat2(struct trace_event_raw_sys_exit *tp)
int tracepoint__syscalls__sys_exit_openat2(struct syscall_trace_exit *tp)
{
return exit_open(tp->ret);
}
Loading