Re: [GIT PULL] hash addresses printed with %p

2017-12-05 Thread Greg Kroah-Hartman
On Tue, Dec 05, 2017 at 09:25:07AM +, Ard Biesheuvel wrote: > On 5 December 2017 at 08:52, Greg Kroah-Hartman > wrote: > > On Tue, Dec 05, 2017 at 04:45:37PM +0800, Dave Young wrote: > >> On 12/05/17 at 09:09am, Greg Kroah-Hartman wrote: > >> > On Tue, Dec 05, 2017

Re: [GIT PULL] hash addresses printed with %p

2017-12-05 Thread Greg Kroah-Hartman
On Tue, Dec 05, 2017 at 05:24:10PM +0800, Dave Young wrote: > On 12/05/17 at 04:45pm, Dave Young wrote: > > On 12/05/17 at 09:09am, Greg Kroah-Hartman wrote: > > > On Tue, Dec 05, 2017 at 01:14:34PM +0800, Dave Young wrote: > > > > On 12/04/17 at 03:00pm, Greg Kroah-Hartman wrote: > > > > > On

Re: [GIT PULL] hash addresses printed with %p

2017-12-05 Thread Dave Young
On 12/05/17 at 04:45pm, Dave Young wrote: > On 12/05/17 at 09:09am, Greg Kroah-Hartman wrote: > > On Tue, Dec 05, 2017 at 01:14:34PM +0800, Dave Young wrote: > > > On 12/04/17 at 03:00pm, Greg Kroah-Hartman wrote: > > > > On Mon, Dec 04, 2017 at 12:51:13PM +, David Laight wrote: > > > > >

Re: [GIT PULL] hash addresses printed with %p

2017-12-05 Thread Dave Young
On 12/05/17 at 09:09am, Greg Kroah-Hartman wrote: > On Tue, Dec 05, 2017 at 01:14:34PM +0800, Dave Young wrote: > > On 12/04/17 at 03:00pm, Greg Kroah-Hartman wrote: > > > On Mon, Dec 04, 2017 at 12:51:13PM +, David Laight wrote: > > > > From: Ard Biesheuvel > > > > > Sent: 04 December 2017

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Dave Young
On 12/04/17 at 03:00pm, Greg Kroah-Hartman wrote: > On Mon, Dec 04, 2017 at 12:51:13PM +, David Laight wrote: > > From: Ard Biesheuvel > > > Sent: 04 December 2017 10:03 > > ... > > > and uses __ATTR_RO() to emit initializers for it. __ATTR() initializes > > > the .store member as well, which

RE: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread David Laight
From: Ard Biesheuvel > Sent: 04 December 2017 10:03 ... > and uses __ATTR_RO() to emit initializers for it. __ATTR() initializes > the .store member as well, which does not exists, and so it cannot be > used directly. > > So we should either add a .store member that is always NULL, or we > should

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Greg Kroah-Hartman
On Mon, Dec 04, 2017 at 10:03:19AM +, Ard Biesheuvel wrote: > On 4 December 2017 at 09:59, Greg Kroah-Hartman > wrote: > > On Mon, Dec 04, 2017 at 09:48:37AM +, Ard Biesheuvel wrote: > >> On 4 December 2017 at 09:34, Greg Kroah-Hartman > >>

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Ard Biesheuvel
On 4 December 2017 at 09:59, Greg Kroah-Hartman wrote: > On Mon, Dec 04, 2017 at 09:48:37AM +, Ard Biesheuvel wrote: >> On 4 December 2017 at 09:34, Greg Kroah-Hartman >> wrote: >> > On Mon, Dec 04, 2017 at 05:29:28PM +0800, Dave Young

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Greg Kroah-Hartman
On Mon, Dec 04, 2017 at 09:48:37AM +, Ard Biesheuvel wrote: > On 4 December 2017 at 09:34, Greg Kroah-Hartman > wrote: > > On Mon, Dec 04, 2017 at 05:29:28PM +0800, Dave Young wrote: > >> On 12/04/17 at 08:36am, Greg Kroah-Hartman wrote: > >> > On Mon, Dec 04, 2017

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Ard Biesheuvel
On 4 December 2017 at 09:34, Greg Kroah-Hartman wrote: > On Mon, Dec 04, 2017 at 05:29:28PM +0800, Dave Young wrote: >> On 12/04/17 at 08:36am, Greg Kroah-Hartman wrote: >> > On Mon, Dec 04, 2017 at 10:02:16AM +0800, Dave Young wrote: >> > > +#define

Re: [GIT PULL] hash addresses printed with %p

2017-12-04 Thread Greg Kroah-Hartman
On Mon, Dec 04, 2017 at 05:29:28PM +0800, Dave Young wrote: > On 12/04/17 at 08:36am, Greg Kroah-Hartman wrote: > > On Mon, Dec 04, 2017 at 10:02:16AM +0800, Dave Young wrote: > > > +#define __ATTR_IRUSR(_name) { > > > \ > > > + .attr = { .name =

Re: [GIT PULL] hash addresses printed with %p

2017-12-03 Thread Greg Kroah-Hartman
On Mon, Dec 04, 2017 at 10:02:16AM +0800, Dave Young wrote: > +#define __ATTR_IRUSR(_name) { > \ > + .attr = { .name = __stringify(_name), .mode = S_IRUSR }, \ > + .show = _name##_show, \ > +}

Re: [GIT PULL] hash addresses printed with %p

2017-12-03 Thread Dave Young
On 12/03/17 at 06:33pm, Joe Perches wrote: > On Mon, 2017-12-04 at 10:02 +0800, Dave Young wrote: > > I think 0400 is good enough for this issue. > > > > Greg, would you like to agree add an extra macro like below? > [] > > -static struct map_attribute map_type_attr = __ATTR_RO(type); > > -static

Re: [GIT PULL] hash addresses printed with %p

2017-12-03 Thread Dave Young
On 12/02/17 at 10:22pm, Matt Fleming wrote: > (Cc'ing Dave since this is used for kexec on EFI) > > On Fri, 01 Dec, at 09:54:43AM, Ard Biesheuvel wrote: > > On 1 December 2017 at 09:48, Greg Kroah-Hartman > > wrote: > > > On Thu, Nov 30, 2017 at 05:18:42PM +, Ard

Re: [GIT PULL] hash addresses printed with %p

2017-12-02 Thread Dave Young
On 12/02/17 at 10:22pm, Matt Fleming wrote: > (Cc'ing Dave since this is used for kexec on EFI) > > On Fri, 01 Dec, at 09:54:43AM, Ard Biesheuvel wrote: > > On 1 December 2017 at 09:48, Greg Kroah-Hartman > > wrote: > > > On Thu, Nov 30, 2017 at 05:18:42PM +, Ard

Re: [GIT PULL] hash addresses printed with %p

2017-12-02 Thread Matt Fleming
(Cc'ing Dave since this is used for kexec on EFI) On Fri, 01 Dec, at 09:54:43AM, Ard Biesheuvel wrote: > On 1 December 2017 at 09:48, Greg Kroah-Hartman > wrote: > > On Thu, Nov 30, 2017 at 05:18:42PM +, Ard Biesheuvel wrote: > >> On 30 November 2017 at 17:10,

Re: [GIT PULL] hash addresses printed with %p

2017-12-02 Thread Ard Biesheuvel
On 1 December 2017 at 16:33, Kees Cook wrote: > On Fri, Dec 1, 2017 at 7:34 AM, Greg Kroah-Hartman > wrote: > >> And isn't there a specific %p modifier you should use for a kernel >> pointer. I've lost the thread here for what should, or should

Re: [GIT PULL] hash addresses printed with %p

2017-12-01 Thread Kees Cook
On Fri, Dec 1, 2017 at 7:34 AM, Greg Kroah-Hartman wrote: > And isn't there a specific %p modifier you should use for a kernel > pointer. I've lost the thread here for what should, or should not, be > done for kernel pointers these days based on the long email

Re: [GIT PULL] hash addresses printed with %p

2017-12-01 Thread Greg Kroah-Hartman
On Fri, Dec 01, 2017 at 09:54:43AM +, Ard Biesheuvel wrote: > On 1 December 2017 at 09:48, Greg Kroah-Hartman > wrote: > > On Thu, Nov 30, 2017 at 05:18:42PM +, Ard Biesheuvel wrote: > >> On 30 November 2017 at 17:10, Greg Kroah-Hartman > >>

Re: [GIT PULL] hash addresses printed with %p

2017-12-01 Thread Ard Biesheuvel
On 1 December 2017 at 09:48, Greg Kroah-Hartman wrote: > On Thu, Nov 30, 2017 at 05:18:42PM +, Ard Biesheuvel wrote: >> On 30 November 2017 at 17:10, Greg Kroah-Hartman >> wrote: >> > On Thu, Nov 30, 2017 at 04:32:35PM +, Greg

Re: [GIT PULL] hash addresses printed with %p

2017-12-01 Thread Greg Kroah-Hartman
On Thu, Nov 30, 2017 at 05:18:42PM +, Ard Biesheuvel wrote: > On 30 November 2017 at 17:10, Greg Kroah-Hartman > wrote: > > On Thu, Nov 30, 2017 at 04:32:35PM +, Greg Kroah-Hartman wrote: > >> On Wed, Nov 29, 2017 at 01:36:25PM -0800, Linus Torvalds wrote: > >>

Re: [GIT PULL] hash addresses printed with %p

2017-12-01 Thread Greg Kroah-Hartman
On Thu, Nov 30, 2017 at 06:17:47PM -0500, Linus Torvalds wrote: > On Thu, Nov 30, 2017 at 12:10 PM, Greg Kroah-Hartman > wrote: > > > > So changing it to use __ATTR() should fix this remaning leakage up. > > That is if we even really need to export these values at all.

Re: [GIT PULL] hash addresses printed with %p

2017-11-30 Thread Linus Torvalds
On Thu, Nov 30, 2017 at 12:10 PM, Greg Kroah-Hartman wrote: > > So changing it to use __ATTR() should fix this remaning leakage up. > That is if we even really need to export these values at all. What does > userspace do with them? Shouldn't they just be in debugfs

Re: [GIT PULL] hash addresses printed with %p

2017-11-30 Thread Ard Biesheuvel
On 30 November 2017 at 17:10, Greg Kroah-Hartman wrote: > On Thu, Nov 30, 2017 at 04:32:35PM +, Greg Kroah-Hartman wrote: >> On Wed, Nov 29, 2017 at 01:36:25PM -0800, Linus Torvalds wrote: >> > On Wed, Nov 29, 2017 at 1:14 PM, Linus Torvalds >> >

Re: [GIT PULL] hash addresses printed with %p

2017-11-30 Thread Greg Kroah-Hartman
On Thu, Nov 30, 2017 at 04:32:35PM +, Greg Kroah-Hartman wrote: > On Wed, Nov 29, 2017 at 01:36:25PM -0800, Linus Torvalds wrote: > > On Wed, Nov 29, 2017 at 1:14 PM, Linus Torvalds > > wrote: > > > > > > Not because %pK itself changed, but because the semantics

Re: [GIT PULL] hash addresses printed with %p

2017-11-30 Thread Greg Kroah-Hartman
On Wed, Nov 29, 2017 at 01:36:25PM -0800, Linus Torvalds wrote: > On Wed, Nov 29, 2017 at 1:14 PM, Linus Torvalds > wrote: > > > > Not because %pK itself changed, but because the semantics of %p did. > > The baseline moved, and the "safe" version did not. > > Btw,

Re: [GIT PULL] hash addresses printed with %p

2017-11-29 Thread Linus Torvalds
On Wed, Nov 29, 2017 at 1:14 PM, Linus Torvalds wrote: > > Not because %pK itself changed, but because the semantics of %p did. > The baseline moved, and the "safe" version did not. Btw, that baseline for me is now that I can do ./scripts/leaking_addresses.pl |