Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-06 Thread Linus Torvalds
On Wed, Dec 6, 2017 at 3:21 PM, Kees Cook wrote: > On Wed, Dec 6, 2017 at 2:31 AM, David Laight wrote: >> >> I can also image issues where you want to know whether 2 pointers point >> into the same structure (like an skb). > > This is already

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-06 Thread Kees Cook
On Wed, Dec 6, 2017 at 2:31 AM, David Laight wrote: > From: David Miller >> Sent: 05 December 2017 20:31 > ... >> > Would it make sense to keep the 3 lowest bits of the address? >> > >> > Currently printed pointers no longer have any correlation with the actual >> >

RE: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-06 Thread David Laight
From: David Miller > Sent: 05 December 2017 20:31 ... > > Would it make sense to keep the 3 lowest bits of the address? > > > > Currently printed pointers no longer have any correlation with the actual > > alignment in memory of the object, which is a typical cause of a class of > > bugs. > >

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-06 Thread Geert Uytterhoeven
Hi Linus, On Wed, Dec 6, 2017 at 12:33 AM, Linus Torvalds wrote: > On Tue, Dec 5, 2017 at 2:57 PM, Geert Uytterhoeven > wrote: >> Lowest 3 is good enough for all natural types, up to long long. >> We may still receive complaints from people

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-05 Thread Linus Torvalds
On Tue, Dec 5, 2017 at 2:57 PM, Geert Uytterhoeven wrote: > Lowest 3 is good enough for all natural types, up to long long. > We may still receive complaints from people who care about seeing if > a pointer is cacheline-aligned or not. Fixing that may need up to 7 bits, I'm

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-05 Thread Tobin C. Harding
On Tue, Dec 05, 2017 at 09:20:57PM +0100, Geert Uytterhoeven wrote: > Hi Tobin, > > On Wed, Nov 29, 2017 at 3:05 AM, Tobin C. Harding wrote: > > Currently there exist approximately 14 000 places in the kernel where > > addresses are being printed using an unadorned %p. This

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-05 Thread David Miller
From: Geert Uytterhoeven Date: Tue, 5 Dec 2017 21:20:57 +0100 > Hi Tobin, > > On Wed, Nov 29, 2017 at 3:05 AM, Tobin C. Harding wrote: >> Currently there exist approximately 14 000 places in the kernel where >> addresses are being printed using an unadorned

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-12-05 Thread Geert Uytterhoeven
Hi Tobin, On Wed, Nov 29, 2017 at 3:05 AM, Tobin C. Harding wrote: > Currently there exist approximately 14 000 places in the kernel where > addresses are being printed using an unadorned %p. This potentially > leaks sensitive information regarding the Kernel layout in memory.

Re: [PATCH V11 3/5] printk: hash addresses printed with %p

2017-11-29 Thread Andrew Morton
On Wed, 29 Nov 2017 13:05:03 +1100 "Tobin C. Harding" wrote: > Currently there exist approximately 14 000 places in the kernel where > addresses are being printed using an unadorned %p. This potentially > leaks sensitive information regarding the Kernel layout in memory. Many > of

[PATCH V11 3/5] printk: hash addresses printed with %p

2017-11-28 Thread Tobin C. Harding
Currently there exist approximately 14 000 places in the kernel where addresses are being printed using an unadorned %p. This potentially leaks sensitive information regarding the Kernel layout in memory. Many of these calls are stale, instead of fixing every call lets hash the address by default