Re: [PATCH] arm64: Add support for STACKLEAK gcc plugin

2018-07-11 Thread Kees Cook
On Wed, Jul 11, 2018 at 6:45 PM, Laura Abbott wrote: >> +#ifdef CONFIG_GCC_PLUGIN_STACKLEAK >> +#define MIN_STACK_LEFT 256 >> + >> +void __used stackleak_check_alloca(unsigned long size) >> +{ >> + unsigned long sp, stack_left; >> + >> + sp = current_stack_pointer; >> + >> + stac

Re: [PATCH] arm64: Add support for STACKLEAK gcc plugin

2018-07-11 Thread Laura Abbott
On 07/11/2018 05:03 PM, Kees Cook wrote: From: Laura Abbott This adds support for the STACKLEAK gcc plugin to arm64 by implementing stackleak_check_alloca(), based heavily on the x86 version, and adding the two helpers used by the stackleak common code: current_top_of_stack() and on_thread_stac

[PATCH] arm64: Add support for STACKLEAK gcc plugin

2018-07-11 Thread Kees Cook
From: Laura Abbott This adds support for the STACKLEAK gcc plugin to arm64 by implementing stackleak_check_alloca(), based heavily on the x86 version, and adding the two helpers used by the stackleak common code: current_top_of_stack() and on_thread_stack(). The stack erasure calls are made at sy