[lkml]   [2021]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed

On 2/5/21 4:59 AM, Vlastimil Babka wrote:
> Thanks a lot. Should this also affect %pK though? IIUC, there's currently no way
> to achieve non-mangled %pK in all cases, even with the most permissive
> kptr_restrict=1 setting:
> - in IRQ, there's "pK-error" instead
> - in a context of non-CAP_SYSLOG process, nulls are printed

Hmmm.. I thought %pK prints an unhashed pointer when the user is root,
at least in situations where the user can be known (e.g. during an ioctl

> Yes, neither should matter if %pK were only used for prints that generate
> content of some kind of /proc file read by a CAP_SYSLOG process, but that
> doesn't seem to be the case and there are %pK used for printing to dmesg too...

I thought about that. On one hand, people who use %pK probably really
wanted a hashed pointer printed. On the other hand, I agree that %pK
should not be used for dmesg prints.

I get the feeling that some (most?) people who use %pK don't really
understand how it's supposed to be used.

I can extend make-printk-non-secret to %pK if everyone agrees.

 \ /
  Last update: 2021-02-05 19:29    [W:0.366 / U:0.816 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site