Skip to content

Commit cee5f31

Browse files
image-dragonKernel Patches Daemon
authored andcommitted
x86,bpf: use bpf_prog_report_probe_violation for x86
Use bpf_prog_report_probe_violation() to report the memory probe fault in ex_handler_bpf(). Signed-off-by: Menglong Dong <[email protected]>
1 parent 0f8a85f commit cee5f31

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/net/bpf_jit_comp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,6 +1470,8 @@ bool ex_handler_bpf(const struct exception_table_entry *x, struct pt_regs *regs)
14701470
off = FIELD_GET(DATA_ARENA_OFFSET_MASK, x->data);
14711471
addr = *(unsigned long *)((void *)regs + arena_reg) + off;
14721472
bpf_prog_report_arena_violation(is_write, addr, regs->ip);
1473+
} else {
1474+
bpf_prog_report_probe_violation(is_write, regs->ip);
14731475
}
14741476

14751477
/* jump over faulting load and clear dest register */

0 commit comments

Comments
 (0)