Re: [PATCH] ARM: mm: Don't use %pK through printk
From: Thomas Weißschuh
Date: Tue Feb 18 2025 - 05:41:43 EST
On Tue, Feb 18, 2025 at 10:27:49AM +0000, Russell King (Oracle) wrote:
> On Mon, Feb 17, 2025 at 08:38:37AM +0100, Thomas Weißschuh wrote:
> > Restricted pointers ("%pK") are not meant to be used through printk().
> > It can unintentionally expose security sensitive, raw pointer values.
> >
> > Use regular pointer formatting instead.
>
> ... which means that the warning is pointless because no one can debug
> it when someone reports that this has fired.
For the most common setups which using the default kptr_restrict=0,
%pK is already the same as %p.
> While I get the security issue, changing this is severely harmful to
> fixing problems should this warning fire.
My next goal is to get rid of the easy to misuse %pK.
If the address is really always important then %px can be used.
Thomas