Re: [GIT PULL] hash addresses printed with %p
From: Ard Biesheuvel
Date: Sat Dec 02 2017 - 03:56:58 EST
On 1 December 2017 at 16:33, Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> On Fri, Dec 1, 2017 at 7:34 AM, Greg Kroah-Hartman
> <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
>> And isn't there a specific %p modifier you should use for a kernel
>> pointer. I've lost the thread here for what should, or should not, be
>> done for kernel pointers these days based on the long email discussion.
>
> Current implementation to bypass the hashing is %px. (Though perhaps
> all %px usage should include a comment with a justification?)
>
In this case, we're always dealing with u64 types regardless of the
pointer size and physical address size. So I am leaning towards
retaining the %llx, and only updating the sysfs node permissions.