summaryrefslogtreecommitdiff
path: root/tools/include/nolibc/Makefile
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2023-03-25 16:45:12 +0100
committerPaul E. McKenney <paulmck@kernel.org>2023-03-27 16:26:10 -0700
commit7188d4637e95b9becde246fa08bb419a3b080f9b (patch)
tree39420362b9bd91acb3bdc7d3dd5b90d2b1572a60 /tools/include/nolibc/Makefile
parentc4560bd8066311c7cee5d7396e7fbd7cb3b7eabc (diff)
tools/nolibc: add support for stack protector
This is useful when using nolibc for security-critical tools. Using nolibc has the advantage that the code is easily auditable and sandboxable with seccomp as no unexpected syscalls are used. Using compiler-assistent stack protection provides another security mechanism. For this to work the compiler and libc have to collaborate. This patch adds the following parts to nolibc that are required by the compiler: * __stack_chk_guard: random sentinel value * __stack_chk_fail: handler for detected stack smashes In addition an initialization function is added that randomizes the sentinel value. Only support for global guards is implemented. Register guards are useful in multi-threaded context which nolibc does not provide support for. Link: https://lwn.net/Articles/584225/ Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/include/nolibc/Makefile')
-rw-r--r--tools/include/nolibc/Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/include/nolibc/Makefile b/tools/include/nolibc/Makefile
index ec57d3932506..9839feafd38a 100644
--- a/tools/include/nolibc/Makefile
+++ b/tools/include/nolibc/Makefile
@@ -25,8 +25,8 @@ endif
nolibc_arch := $(patsubst arm64,aarch64,$(ARCH))
arch_file := arch-$(nolibc_arch).h
-all_files := ctype.h errno.h nolibc.h signal.h std.h stdint.h stdio.h stdlib.h \
- string.h sys.h time.h types.h unistd.h
+all_files := ctype.h errno.h nolibc.h signal.h stackprotector.h std.h stdint.h \
+ stdio.h stdlib.h string.h sys.h time.h types.h unistd.h
# install all headers needed to support a bare-metal compiler
all: headers