Re: [PATCH V8 0/2] printk: hash addresses printed with %p

From: Sergey Senozhatsky
Date: Thu Nov 02 2017 - 12:04:18 EST


On (11/02/17 21:14), Tobin C. Harding wrote:
[..]
> I can put my email address if there is not a better option.

sounds good.


> > hm... just a huge pile of if's
> >
> > if (is_vmalloc_addr(addr))
> > do_hashing(addr);
> > else if (__module_address(addr))
> > do_hashing(addr);
> > else if (is_kernel(addr) || is_kernel_inittext(addr))
> > ...
> >
> > but that's going to be really messy and "iffy".
>
> This is the only suggestion we have so far.
>

well... one more: check if we can safely dereference it. if so
it's a pointer, probably :)

if (!probe_kernel_address(addr, p))
do_hashing(addr);


just an idea.

-ss