On Tue, 8 Jul 2025 at 07:34, Josh Poimboeuf <jpoim...@kernel.org> 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