Re: [kernel-hardening] [PATCH v3] printk: hash addresses printed with %p

2017-10-17 Thread Tobin C. Harding
On Wed, Oct 18, 2017 at 02:59:17AM +0200, Jason A. Donenfeld wrote: > Hi Tobin, > > You submitted v3 without replying to my v2 comments. I'll give a > condensed version of those here for convenience. Wow, thanks for taking the time to do this. Lesson learned: recheck emails right before submitti

Re: [kernel-hardening] [PATCH v3] printk: hash addresses printed with %p

2017-10-17 Thread Jason A. Donenfeld
Hi Tobin, You submitted v3 without replying to my v2 comments. I'll give a condensed version of those here for convenience. > diff --git a/include/linux/siphash.h b/include/linux/siphash.h > +unsigned long siphash_1ulong(const unsigned long a, const siphash_key_t > *key); Don't add this functio

[PATCH v3] printk: hash addresses printed with %p

2017-10-17 Thread Tobin C. Harding
Currently there are many places in the kernel where addresses are being printed using an unadorned %p. Kernel pointers should be printed using %pK allowing some control via the kptr_restrict sysctl. Exposing addresses gives attackers sensitive information about the kernel layout in memory. We can