[PATCH 0/5] add stack protector and guard page support
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Sep 11 08:08:55 PDT 2023
GCC's strong stack protector feature is increasingly used as default in
many distros, because of comparatively low overhead. This series adds
support in barebox to catch stack frame overflow as well as a guard
page feature to catch stack region overflow.
Ahmad Fatoum (5):
include: move PAGE_ definitions into linux/pagemap.h
ARM: mark early C setup functions as __prereloc
lib: add stackprotector support
ARM: mmu: catch stack overflowing into TTB with stack guard page
commands: add stacksmash command for causing stack overflows
Makefile | 3 -
arch/arm/cpu/common.c | 2 +-
arch/arm/cpu/interrupts_32.c | 21 +++++-
arch/arm/cpu/interrupts_64.c | 38 +++++++---
arch/arm/cpu/mmu_32.c | 16 +++++
arch/arm/cpu/mmu_64.c | 15 ++++
arch/arm/cpu/start.c | 4 +-
arch/arm/include/asm/barebox-arm.h | 18 ++++-
arch/arm/include/asm/reloc.h | 2 +-
arch/arm/lib64/string.c | 2 +-
commands/Kconfig | 6 ++
commands/Makefile | 1 +
commands/stacksmash.c | 58 ++++++++++++++++
include/common.h | 6 +-
include/linux/compiler_types.h | 21 ++++++
include/linux/pagemap.h | 8 ++-
lib/Kconfig | 2 +
lib/Kconfig.hardening | 108 +++++++++++++++++++++++++++++
lib/Makefile | 1 +
lib/stackprot.c | 32 +++++++++
lib/string.c | 2 +-
scripts/Makefile.lib | 10 +++
22 files changed, 350 insertions(+), 26 deletions(-)
create mode 100644 commands/stacksmash.c
create mode 100644 lib/Kconfig.hardening
create mode 100644 lib/stackprot.c
--
2.39.2
More information about the barebox
mailing list