[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <476DC76E7D1DF2438D32BFADF679FC563F4C1805@ORSMSX115.amr.corp.intel.com>
Date: Wed, 29 Nov 2017 22:36:28 +0000
From: "Roberts, William C" <william.c.roberts@...el.com>
To: Kees Cook <keescook@...omium.org>,
David Laight <David.Laight@...lab.com>
CC: Linus Torvalds <torvalds@...ux-foundation.org>,
"Tobin C. Harding" <me@...in.cc>,
"kernel-hardening@...ts.openwall.com"
<kernel-hardening@...ts.openwall.com>,
"Jason A. Donenfeld" <Jason@...c4.com>,
Theodore Ts'o <tytso@....edu>,
Paolo Bonzini <pbonzini@...hat.com>,
Tycho Andersen <tycho@...ho.ws>, Tejun Heo <tj@...nel.org>,
Jordan Glover <Golden_Miller83@...tonmail.ch>,
Greg KH <gregkh@...uxfoundation.org>,
Petr Mladek <pmladek@...e.com>, Joe Perches <joe@...ches.com>,
Ian Campbell <ijc@...lion.org.uk>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <wilal.deacon@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Chris Fries <cfries@...gle.com>,
Dave Weinstein <olorin@...gle.com>,
"Daniel Micay" <danielmicay@...il.com>,
Djalal Harouni <tixxdz@...il.com>,
Radim Krcmár <rkrcmar@...hat.com>,
"Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
Network Development <netdev@...r.kernel.org>,
David Miller <davem@...emloft.net>,
"Stephen Rothwell" <sfr@...b.auug.org.au>,
Andrey Ryabinin <aryabinin@...tuozzo.com>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: RE: [PATCH V11 4/5] vsprintf: add printk specifier %px
> -----Original Message-----
> From: keescook@...gle.com [mailto:keescook@...gle.com] On Behalf Of Kees
> Cook
> Sent: Wednesday, November 29, 2017 2:28 PM
> To: David Laight <David.Laight@...lab.com>
> Cc: Linus Torvalds <torvalds@...ux-foundation.org>; Tobin C. Harding
> <me@...in.cc>; kernel-hardening@...ts.openwall.com; Jason A. Donenfeld
> <Jason@...c4.com>; Theodore Ts'o <tytso@....edu>; Paolo Bonzini
> <pbonzini@...hat.com>; Tycho Andersen <tycho@...ho.ws>; Roberts, William C
> <william.c.roberts@...el.com>; Tejun Heo <tj@...nel.org>; Jordan Glover
> <Golden_Miller83@...tonmail.ch>; Greg KH <gregkh@...uxfoundation.org>;
> Petr Mladek <pmladek@...e.com>; Joe Perches <joe@...ches.com>; Ian
> Campbell <ijc@...lion.org.uk>; Sergey Senozhatsky
> <sergey.senozhatsky@...il.com>; Catalin Marinas <catalin.marinas@....com>;
> Will Deacon <wilal.deacon@....com>; Steven Rostedt <rostedt@...dmis.org>;
> Chris Fries <cfries@...gle.com>; Dave Weinstein <olorin@...gle.com>; Daniel
> Micay <danielmicay@...il.com>; Djalal Harouni <tixxdz@...il.com>; Radim
> Krcmár <rkrcmar@...hat.com>; Linux Kernel Mailing List <linux-
> kernel@...r.kernel.org>; Network Development <netdev@...r.kernel.org>;
> David Miller <davem@...emloft.net>; Stephen Rothwell
> <sfr@...b.auug.org.au>; Andrey Ryabinin <aryabinin@...tuozzo.com>;
> Alexander Potapenko <glider@...gle.com>; Dmitry Vyukov
> <dvyukov@...gle.com>; Andrew Morton <akpm@...ux-foundation.org>
> Subject: Re: [PATCH V11 4/5] vsprintf: add printk specifier %px
>
> On Wed, Nov 29, 2017 at 2:07 AM, David Laight <David.Laight@...lab.com>
> wrote:
> > From: Linus Torvalds
> >> Sent: 29 November 2017 02:29
> >>
> >> On Tue, Nov 28, 2017 at 6:05 PM, Tobin C. Harding <me@...in.cc> wrote:
> >> >
> >> > Let's add specifier %px as a
> >> > clear, opt-in, way to print a pointer and maintain some level of
> >> > isolation from all the other hex integer output within the Kernel.
> >>
> >> Yes, I like this model. It's easy and it's obvious ("'x' for hex"),
> >> and it gives people a good way to say "yes, I really want the actual
> >> address as hex" for if/when the hashed pointer doesn't work for some
> >> reason.
> >
> > Remind me to change every %p to %px on kernels that support it.
> >
> > Although the absolute values of pointers may not be useful, knowing
> > that two pointer differ by a small amount is useful.
> > It is also useful to know whether pointers are to stack, code, static
> > data or heap.
> >
> > This change to %p is going to make debugging a nightmare.
>
> In the future, maybe we could have a knob: unhashed, hashed (default), or
> zeroed.
Isn't that just kptr_restrict and get us right back to the simpler patches I proposed?
>
> -Kees
>
> --
> Kees Cook
> Pixel Security
Powered by blists - more mailing lists