[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250927061210.194502-3-menglong.dong@linux.dev>
Date: Sat, 27 Sep 2025 14:12:09 +0800
From: Menglong Dong <menglong8.dong@...il.com>
To: ast@...nel.org
Cc: bpf@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
jiang.biao@...ux.dev
Subject: [PATCH RFC bpf-next 2/3] 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 <menglong.dong@...ux.dev>
---
arch/x86/net/bpf_jit_comp.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/net/bpf_jit_comp.c b/arch/x86/net/bpf_jit_comp.c
index fc13306af15f..03d4d8385f4c 100644
--- a/arch/x86/net/bpf_jit_comp.c
+++ b/arch/x86/net/bpf_jit_comp.c
@@ -1470,6 +1470,8 @@ bool ex_handler_bpf(const struct exception_table_entry *x, struct pt_regs *regs)
off = FIELD_GET(DATA_ARENA_OFFSET_MASK, x->data);
addr = *(unsigned long *)((void *)regs + arena_reg) + off;
bpf_prog_report_arena_violation(is_write, addr, regs->ip);
+ } else {
+ bpf_prog_report_probe_violation(is_write, regs->ip);
}
/* jump over faulting load and clear dest register */
--
2.51.0
Powered by blists - more mailing lists