79747633

Date: 2025-08-27 07:05:48
Score: 1.5
Natty:
Report link

Seem like I was missing few things:

  1. The -g is needed for the bpf program (btf needs DWARF symbols?).

  2. The extern declaration in bpf program must also have __ksym: extern int foo_bar(struct pt_regs *regs) __ksym;

  3. I also needed to #include <asm/ptrace.h> in bpf program and in kernel module (struct pt_regs is defined there).

Reasons:
  • Has code block (-0.5):
  • Contains question mark (0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Sławek