1
linux/arch/arm/boot/compressed
Jinjie Ruan 2335c9cb83 ARM: 9407/1: Add support for STACKLEAK gcc plugin
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@huawei.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
2024-07-02 09:18:43 +01:00
..
.gitignore
ashldi3.S
atags_to_fdt.c ARM: 9311/1: decompressor: move function prototypes to misc.h 2023-06-19 09:35:57 +01:00
big-endian.S
bswapsdi2.S
debug.S
decompress.c
efi-header.S
fdt_check_mem_start.c ARM: 9311/1: decompressor: move function prototypes to misc.h 2023-06-19 09:35:57 +01:00
fdt_ro.c
fdt_rw.c
fdt_wip.c
fdt.c
font.c
head-sa1100.S
head-sharpsl.S
head-xscale.S
head.S
hyp-stub.S
lib1funcs.S
ll_char_wr.S
Makefile ARM: 9407/1: Add support for STACKLEAK gcc plugin 2024-07-02 09:18:43 +01:00
misc-ep93xx.h
misc.c fortify: Improve buffer overflow reporting 2024-02-29 13:38:02 -08:00
misc.h fortify: Improve buffer overflow reporting 2024-02-29 13:38:02 -08:00
piggy.S
string.c
vmlinux.lds.S ARM: 9404/1: arm32: enable HAVE_LD_DEAD_CODE_DATA_ELIMINATION 2024-06-10 12:01:33 +01:00