Skip to content

Commit e5edac0

Browse files
committed
fix iouring CO-RE relocation for kernel 6.8+
Signed-off-by: Yakir Oren <yakiroren@gmail.com>
1 parent 55c207f commit e5edac0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/ebpf/gadgets/iouring_new/program.bpf.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// Check https://man7.org/linux/man-pages/man7/bpf-helpers.7.html to learn
66
// more about different available helpers
77
#include <bpf/bpf_helpers.h>
8+
#include <bpf/bpf_core_read.h>
89

910
// Inspektor Gadget buffer
1011
#include <gadget/buffer.h>
@@ -45,8 +46,8 @@ int handle_submit_req(struct trace_event_raw_io_uring_submit_req *ctx)
4546
return 0;
4647

4748
gadget_process_populate(&event->proc);
48-
event->opcode = ctx->opcode;
49-
event->flags = ctx->flags;
49+
event->opcode = BPF_CORE_READ(ctx, opcode);
50+
event->flags = BPF_CORE_READ(ctx, flags);
5051

5152
event->timestamp_raw = bpf_ktime_get_boot_ns();
5253

0 commit comments

Comments
 (0)