Re: [PATCH][RESEND] lib/vsprintf: make-printk-non-secret printks all addresses as unhashed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





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 call).

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.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux