Skip to content

Commit ee33355

Browse files
jinb-parkRussell King
authored andcommitted
ARM: 8749/1: Kconfig: Add ARCH_HAS_FORTIFY_SOURCE
CONFIG_FORTIFY_SOURCE detects various overflows at compile-time. (6974f0c ("include/linux/string.h: add the option of fortified string.h functions) ARCH_HAS_FORTIFY_SOURCE means that the architecture can be built and run with CONFIG_FORTIFY_SOURCE. Since ARM can be built and run with that flag like other architectures, select ARCH_HAS_FORTIFY_SOURCE as default. Acked-by: Kees Cook <[email protected]> Signed-off-by: Jinbum Park <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 7928b2c commit ee33355

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ config ARM
77
select ARCH_HAS_DEBUG_VIRTUAL if MMU
88
select ARCH_HAS_DEVMEM_IS_ALLOWED
99
select ARCH_HAS_ELF_RANDOMIZE
10+
select ARCH_HAS_FORTIFY_SOURCE
1011
select ARCH_HAS_SET_MEMORY
1112
select ARCH_HAS_PHYS_TO_DMA
1213
select ARCH_HAS_STRICT_KERNEL_RWX if MMU && !XIP_KERNEL

arch/arm/boot/compressed/misc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,3 +167,8 @@ decompress_kernel(unsigned long output_start, unsigned long free_mem_ptr_p,
167167
else
168168
putstr(" done, booting the kernel.\n");
169169
}
170+
171+
void fortify_panic(const char *name)
172+
{
173+
error("detected buffer overflow");
174+
}

0 commit comments

Comments
 (0)