Re: [PATCH] arm64: Clear the stack

2018-07-19 Thread Mark Rutland
Hi, On Tue, Jul 17, 2018 at 03:58:19PM -0700, Laura Abbott wrote: > On 07/03/2018 05:14 AM, Mark Rutland wrote: > > > It might be cleaner just to use on_accessible_stack and then another > > > function to get the top of stack. This also might just be > > > reimplementing what x86 already has?

Re: [PATCH] arm64: Clear the stack

2018-07-19 Thread Mark Rutland
Hi, On Tue, Jul 17, 2018 at 03:58:19PM -0700, Laura Abbott wrote: > On 07/03/2018 05:14 AM, Mark Rutland wrote: > > > It might be cleaner just to use on_accessible_stack and then another > > > function to get the top of stack. This also might just be > > > reimplementing what x86 already has?

Re: [PATCH] arm64: Clear the stack

2018-07-17 Thread Laura Abbott
On 07/03/2018 05:14 AM, Mark Rutland wrote: It might be cleaner just to use on_accessible_stack and then another function to get the top of stack. This also might just be reimplementing what x86 already has? (Mark, Ard?) It looks like we could build a get_stack_info() as they have. We could

Re: [PATCH] arm64: Clear the stack

2018-07-17 Thread Laura Abbott
On 07/03/2018 05:14 AM, Mark Rutland wrote: It might be cleaner just to use on_accessible_stack and then another function to get the top of stack. This also might just be reimplementing what x86 already has? (Mark, Ard?) It looks like we could build a get_stack_info() as they have. We could

Re: [PATCH] arm64: Clear the stack

2018-07-12 Thread Will Deacon
On Wed, Jul 11, 2018 at 05:05:32PM -0700, Kees Cook wrote: > On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > > include/linux/stackleak.h | 1 + > > [...] > > diff --git a/include/linux/stackleak.h b/include/linux/stackleak.h > > index e2da99b3a191..00d62b302efb 100644 > > ---

Re: [PATCH] arm64: Clear the stack

2018-07-12 Thread Will Deacon
On Wed, Jul 11, 2018 at 05:05:32PM -0700, Kees Cook wrote: > On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > > include/linux/stackleak.h | 1 + > > [...] > > diff --git a/include/linux/stackleak.h b/include/linux/stackleak.h > > index e2da99b3a191..00d62b302efb 100644 > > ---

Re: [PATCH] arm64: Clear the stack

2018-07-11 Thread Kees Cook
On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > include/linux/stackleak.h | 1 + > [...] > diff --git a/include/linux/stackleak.h b/include/linux/stackleak.h > index e2da99b3a191..00d62b302efb 100644 > --- a/include/linux/stackleak.h > +++ b/include/linux/stackleak.h > @@

Re: [PATCH] arm64: Clear the stack

2018-07-11 Thread Kees Cook
On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > include/linux/stackleak.h | 1 + > [...] > diff --git a/include/linux/stackleak.h b/include/linux/stackleak.h > index e2da99b3a191..00d62b302efb 100644 > --- a/include/linux/stackleak.h > +++ b/include/linux/stackleak.h > @@

Re: [PATCH] arm64: Clear the stack

2018-07-04 Thread Will Deacon
Hi Kees, On Mon, Jul 02, 2018 at 10:29:24AM -0700, Kees Cook wrote: > On Mon, Jul 2, 2018 at 2:59 AM, Will Deacon wrote: > > On Fri, Jun 29, 2018 at 01:25:20PM -0700, Kees Cook wrote: > >> No worries! I've made the change locally and will push this out to > >> -next unless there are objections?

Re: [PATCH] arm64: Clear the stack

2018-07-04 Thread Will Deacon
Hi Kees, On Mon, Jul 02, 2018 at 10:29:24AM -0700, Kees Cook wrote: > On Mon, Jul 2, 2018 at 2:59 AM, Will Deacon wrote: > > On Fri, Jun 29, 2018 at 01:25:20PM -0700, Kees Cook wrote: > >> No worries! I've made the change locally and will push this out to > >> -next unless there are objections?

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Alexander Popov
On 03.07.2018 18:03, Catalin Marinas wrote: > On Tue, Jul 03, 2018 at 01:14:41PM +0100, Mark Rutland wrote: >> On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: >>> On 07/02/2018 06:02 AM, Alexander Popov wrote: Could you rename the macro to STACKLEAK_ERASE for similarity with

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Alexander Popov
On 03.07.2018 18:03, Catalin Marinas wrote: > On Tue, Jul 03, 2018 at 01:14:41PM +0100, Mark Rutland wrote: >> On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: >>> On 07/02/2018 06:02 AM, Alexander Popov wrote: Could you rename the macro to STACKLEAK_ERASE for similarity with

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Catalin Marinas
On Tue, Jul 03, 2018 at 01:14:41PM +0100, Mark Rutland wrote: > On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: > > On 07/02/2018 06:02 AM, Alexander Popov wrote: > > > On 29.06.2018 22:05, Laura Abbott wrote: > > > > Implementation of stackleak based heavily on the x86 version > > >

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Catalin Marinas
On Tue, Jul 03, 2018 at 01:14:41PM +0100, Mark Rutland wrote: > On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: > > On 07/02/2018 06:02 AM, Alexander Popov wrote: > > > On 29.06.2018 22:05, Laura Abbott wrote: > > > > Implementation of stackleak based heavily on the x86 version > > >

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Mark Rutland
On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: > On 07/02/2018 06:02 AM, Alexander Popov wrote: > > On 29.06.2018 22:05, Laura Abbott wrote: > > > Implementation of stackleak based heavily on the x86 version > > > > > > Signed-off-by: Laura Abbott > > > --- > > > Changes since

Re: [PATCH] arm64: Clear the stack

2018-07-03 Thread Mark Rutland
On Mon, Jul 02, 2018 at 11:48:05AM -0700, Laura Abbott wrote: > On 07/02/2018 06:02 AM, Alexander Popov wrote: > > On 29.06.2018 22:05, Laura Abbott wrote: > > > Implementation of stackleak based heavily on the x86 version > > > > > > Signed-off-by: Laura Abbott > > > --- > > > Changes since

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Laura Abbott
On 07/02/2018 06:02 AM, Alexander Popov wrote: Hello Laura, Thanks for your work! Please see my comments below. On 29.06.2018 22:05, Laura Abbott wrote: Implementation of stackleak based heavily on the x86 version Signed-off-by: Laura Abbott --- Changes since last time: - Minor name change

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Laura Abbott
On 07/02/2018 06:02 AM, Alexander Popov wrote: Hello Laura, Thanks for your work! Please see my comments below. On 29.06.2018 22:05, Laura Abbott wrote: Implementation of stackleak based heavily on the x86 version Signed-off-by: Laura Abbott --- Changes since last time: - Minor name change

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Kees Cook
Hi Will, On Mon, Jul 2, 2018 at 2:59 AM, Will Deacon wrote: > On Fri, Jun 29, 2018 at 01:25:20PM -0700, Kees Cook wrote: >> No worries! I've made the change locally and will push this out to >> -next unless there are objections? > > I'm a bit wary of conflicts in entry.S, since it's likely that

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Kees Cook
Hi Will, On Mon, Jul 2, 2018 at 2:59 AM, Will Deacon wrote: > On Fri, Jun 29, 2018 at 01:25:20PM -0700, Kees Cook wrote: >> No worries! I've made the change locally and will push this out to >> -next unless there are objections? > > I'm a bit wary of conflicts in entry.S, since it's likely that

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Alexander Popov
Hello Laura, Thanks for your work! Please see my comments below. On 29.06.2018 22:05, Laura Abbott wrote: > Implementation of stackleak based heavily on the x86 version > > Signed-off-by: Laura Abbott > --- > Changes since last time: > - Minor name change in entry.S > - Converted to use the

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Alexander Popov
Hello Laura, Thanks for your work! Please see my comments below. On 29.06.2018 22:05, Laura Abbott wrote: > Implementation of stackleak based heavily on the x86 version > > Signed-off-by: Laura Abbott > --- > Changes since last time: > - Minor name change in entry.S > - Converted to use the

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Will Deacon
Hi Kees, On Fri, Jun 29, 2018 at 01:25:20PM -0700, Kees Cook wrote: > On Fri, Jun 29, 2018 at 1:22 PM, Laura Abbott wrote: > > On 06/29/2018 01:19 PM, Kees Cook wrote: > >> > >> On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > >>> > >>> Implementation of stackleak based heavily on the

Re: [PATCH] arm64: Clear the stack

2018-07-02 Thread Will Deacon
Hi Kees, On Fri, Jun 29, 2018 at 01:25:20PM -0700, Kees Cook wrote: > On Fri, Jun 29, 2018 at 1:22 PM, Laura Abbott wrote: > > On 06/29/2018 01:19 PM, Kees Cook wrote: > >> > >> On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > >>> > >>> Implementation of stackleak based heavily on the

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 1:22 PM, Laura Abbott wrote: > On 06/29/2018 01:19 PM, Kees Cook wrote: >> >> On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: >>> >>> Implementation of stackleak based heavily on the x86 version >>> >>> Signed-off-by: Laura Abbott >>> [...] >>> +#define

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 1:22 PM, Laura Abbott wrote: > On 06/29/2018 01:19 PM, Kees Cook wrote: >> >> On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: >>> >>> Implementation of stackleak based heavily on the x86 version >>> >>> Signed-off-by: Laura Abbott >>> [...] >>> +#define

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Laura Abbott
On 06/29/2018 01:19 PM, Kees Cook wrote: On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: Implementation of stackleak based heavily on the x86 version Signed-off-by: Laura Abbott [...] +#define current_top_of_stack() (task_stack_page(current) + THREAD_SIZE) +#define on_thread_stack()

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Laura Abbott
On 06/29/2018 01:19 PM, Kees Cook wrote: On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: Implementation of stackleak based heavily on the x86 version Signed-off-by: Laura Abbott [...] +#define current_top_of_stack() (task_stack_page(current) + THREAD_SIZE) +#define on_thread_stack()

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > Implementation of stackleak based heavily on the x86 version > > Signed-off-by: Laura Abbott > [...] > +#define current_top_of_stack() (task_stack_page(current) + THREAD_SIZE) > +#define on_thread_stack() (on_task_stack(current, >

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > Implementation of stackleak based heavily on the x86 version > > Signed-off-by: Laura Abbott > [...] > +#define current_top_of_stack() (task_stack_page(current) + THREAD_SIZE) > +#define on_thread_stack() (on_task_stack(current, >

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > Implementation of stackleak based heavily on the x86 version Awesome! Now I just have to figure out how to unbreak cross-compilation after the kconfig changes to gcc-plugins. Whoops. :) -Kees -- Kees Cook Pixel Security

Re: [PATCH] arm64: Clear the stack

2018-06-29 Thread Kees Cook
On Fri, Jun 29, 2018 at 12:05 PM, Laura Abbott wrote: > Implementation of stackleak based heavily on the x86 version Awesome! Now I just have to figure out how to unbreak cross-compilation after the kconfig changes to gcc-plugins. Whoops. :) -Kees -- Kees Cook Pixel Security

[PATCH] arm64: Clear the stack

2018-06-29 Thread Laura Abbott
Implementation of stackleak based heavily on the x86 version Signed-off-by: Laura Abbott --- Changes since last time: - Minor name change in entry.S - Converted to use the generic interfaces so there's minimal additions. - Added the fast syscall path. - Addition of on_thread_stack and

[PATCH] arm64: Clear the stack

2018-06-29 Thread Laura Abbott
Implementation of stackleak based heavily on the x86 version Signed-off-by: Laura Abbott --- Changes since last time: - Minor name change in entry.S - Converted to use the generic interfaces so there's minimal additions. - Added the fast syscall path. - Addition of on_thread_stack and