Re: [PATCH v8 10/12] unwind_user/sframe: Enable debugging in uaccess regions

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2025-07-08 15:52:35
Also in
bpf, lkml
Reply to
Josh Poimboeuf, 2025-07-08
On Tue, 8 Jul 2025 at 07:34, Josh Poimboeuf [off-list ref] wrote:
I had found those debug printks really useful for debugging
corrupt/missing .sframe data, but yeah, this patch is ridiculously bad.
Sorry for putting that out into the world ;-)
I suspect that code that is still needs that level of debugging should
just not use the 'unsafe' user access helpers.

They really are meant for "this sequence turns into three CPU
instructions" kind of uses, and the "unsafe" part of the naming was
very much intended to be a "please don't use this unless you are being
very careful and limited" marker.

Now, I do think that the "goto label for exceptions" part of the
unsafe accessors can be very convenient, so maybe we should make
_that_ part of the interface more widely available. IOW, without the
whole user_read_access_begin/user_read_access_end dance?

That model is already used by "__{get,put}_kernel_nofault()", but I
think it's limited to just some unusual code in mm/maccess.c.

             Linus
Thread (34 messages) 34 messages, 6 authors, last reply 2025-07-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help