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

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
2025-07-08 03:38:56
Also in
bpf, lkml
Reply to
Steven Rostedt, 2025-07-08
On Mon, 7 Jul 2025 at 19:12, Steven Rostedt [off-list ref] wrote:
From: Josh Poimboeuf <jpoimboe@kernel.org>

Objtool warns about calling pr_debug() from uaccess-enabled regions, and
rightfully so.  Add a dbg_sec_uaccess() macro which temporarily disables
uaccess before doing the dynamic printk, and use that to add debug
messages throughout the uaccess-enabled regions.
Please kill this patch, and stop doing stupid things.

The whole AND ONLY point of using the unsafe user access macros is
performance. You are now actively breaking the whole point of them.

If you need to add debug printouts to user accesses, just don't use
the 'unsafe' ones.

Or add the debug to after the unsafe region has finished. Not this way.

This patch is disgusting, in other words. It's wrong. STOP IT.

              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