Thread (22 messages) read the whole thread 22 messages, 6 authors, 2025-10-11

Re: bpf_errno. Was: [PATCH RFC bpf-next 1/3] bpf: report probe fault to BPF stderr

From: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Date: 2025-10-08 21:00:13
Also in: bpf, lkml

On Wed, 8 Oct 2025 at 22:30, Eduard Zingerman [off-list ref] wrote:
On Wed, 2025-10-08 at 22:08 +0200, Kumar Kartikeya Dwivedi wrote:

[...]
quoted
Since we're piling on ideas, one of the other things that I think
could be useful in general (and maybe should be done orthogonally to
bpf_errno)
is making some empty nop function and making it not traceable reliably
                                                  ^^^^^^^^^^^^^
                                   You mean traceable, right?
                   So that user attaches a bpf program to it,
                  and debugs bpf programs using bpf programs?
Yeah, sorry, typo.
quoted
across arches and invoke it in the bpf exception handler.
Then if we expose prog_stream_dump_stack() as a kfunc (should be
trivial), the user can write anything to stderr that is relevant to
get more information on the fault.

It is then up to the user to decide the rate of messages for such
faults etc. and get more information if needed.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help