Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Mon, 30 Oct 2017 15:03:21 -0700
From: Kees Cook <>
To: "Tobin C. Harding" <>
	"Jason A. Donenfeld" <>, "Theodore Ts'o" <>, 
	Linus Torvalds <>, Paolo Bonzini <>, 
	Tycho Andersen <>, "Roberts, William C" <>, 
	Tejun Heo <>, Jordan Glover <>, 
	Greg KH <>, Petr Mladek <>, 
	Joe Perches <>, Ian Campbell <>, 
	Sergey Senozhatsky <>, Catalin Marinas <>, 
	Will Deacon <>, Steven Rostedt <>, 
	Chris Fries <>, Dave Weinstein <>, 
	Daniel Micay <>, Djalal Harouni <>, 
	LKML <>
Subject: Re: [PATCH V8 0/2] printk: hash addresses printed with %p

On Wed, Oct 25, 2017 at 7:53 PM, Tobin C. Harding <> wrote:
> Here is the behaviour that this set implements.
> For kpt_restrict==0
> Randomness not ready:
>   printed with %p:              (pointer)          # NOTE: with padding
> Valid pointer:
>   printed with %pK:             deadbeefdeadbeef
>   printed with %p:              0xdeadbeef
>   malformed specifier (eg %i):  0xdeadbeef

I really think we can't include SPECIAL unless _every_ callsite of %p
is actually doing "0x%p", and then we're replacing all of those. We're
not doing that, though...

$ git grep '%p\b' | wc -l
$ git grep '0x%p\b' | wc -l

If we need some kind of special marking that this is a hashed
variable, that should be something other than "0x". If we're using the
existing "(null)" and new "(pointer)" text, maybe "(hash:xxxxxx)"
should be used instead? Then the (rare) callers with 0x become
"0x(hash:xxxx)" and naked callers produce "(hash:xxxx)".

I think the first step for this is to just leave SPECIAL out.


Kees Cook
Pixel Security

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.