Re: [PATCH v2] ARM: Add support for STACKLEAK gcc plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 2024/8/2 19:47, Russell King (Oracle) wrote:
> On Mon, Jul 22, 2024 at 10:53:10AM +0800, Jinjie Ruan wrote:
>> Gentle ping.
>>
>> On 2024/6/24 10:36, Jinjie Ruan wrote:
>>> Add the STACKLEAK gcc plugin to arm32 by adding the helper used by
>>> stackleak common code: on_thread_stack(). It initialize the stack with the
>>> poison value before returning from system calls which improves the kernel
>>> security. Additionally, this disables the plugin in EFI stub code and
>>> decompress code, which are out of scope for the protection.
>>>
>>> Before the test on Qemu versatilepb board:
>>> 	# echo STACKLEAK_ERASING  > /sys/kernel/debug/provoke-crash/DIRECT
>>> 	lkdtm: Performing direct entry STACKLEAK_ERASING
>>> 	lkdtm: XFAIL: stackleak is not supported on this arch (HAVE_ARCH_STACKLEAK=n)
>>>
>>> After:
>>> 	# echo STACKLEAK_ERASING  > /sys/kernel/debug/provoke-crash/DIRECT
>>> 	lkdtm: Performing direct entry STACKLEAK_ERASING
>>> 	lkdtm: stackleak stack usage:
>>> 	  high offset: 80 bytes
>>> 	  current:     280 bytes
>>> 	  lowest:      696 bytes
>>> 	  tracked:     696 bytes
>>> 	  untracked:   192 bytes
>>> 	  poisoned:    7220 bytes
>>> 	  low offset:  4 bytes
>>> 	lkdtm: OK: the rest of the thread stack is properly erased
>>>
>>> Signed-off-by: Jinjie Ruan <ruanjinjie@xxxxxxxxxx>
>>> Acked-by: Ard Biesheuvel <ardb@xxxxxxxxxx>
> 
> Is this a feature that you have a use case for?

Yes, We have ARM32 products internally, and there is a need for security
hardening.

> 




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux