Skip to content

What happens on a trap

Step 4 of 8Concept
TRIGGER
int3 / brk
SWITCHES
2 per call
RETURN
trampoline
ISOLATION
kernel ctx
  • cleartext buffer
  • uprobe copy to ringbuf
  • encrypted ciphertext
Encrypted Traffic & Uprobes, step 4 of 8

When you attach a uprobe, Linux replaces the target function’s first machine instruction with a breakpoint (int3 on x86-64, brk on ARM64). When the NF thread hits it, the CPU traps into kernel mode.

The kernel runs your eBPF program, single-steps the original instruction out-of-line, and returns to user space. A uretprobe adds a second trap on function return.

Type to search…

↑↓ navigate↵ selectEsc close