selftests/prctl: Test PR_SET_MM_AUXV terminator
PATCH 1/1 selftests/prctl: Test PR_SET_MM_AUXV terminator
Verify that a shortened vector supplied through PR_SET_MM_AUXV has a valid AT_NULL terminator when exposed through /proc/self/auxv. This catches stale AUXV entries left beyond the supplied vector.
Signed-off-by Sahaj Chaudhari <[email protected]>
--- tools/testing/selftests/prctl/.gitignore | 1 + tools/testing/selftests/prctl/Makefile | 1 + .../testing/selftests/prctl/pr_set_mm_auxv.c | 42 +++++++++++++++++++ 3 files changed, 44 insertions(+) create mode 100644 tools/testing/selftests/prctl/pr_set_mm_auxv.c
tools/testing/selftests/prctl/.gitignore +1 -0
@@ -4,3 +4,4 @@ disable-tsc-on-off-stress-test disable-tsc-test set-anon-vma-name-test set-process-name +pr_set_mm_auxv
tools/testing/selftests/prctl/Makefile +1 -0
@@ -6,6 +6,7 @@ override ARCH := $(shell echo $(ARCH) | sed -e s/i.86/x86/ -e s/x86_64/x86/) ifeq ($(ARCH),x86) TEST_PROGS := disable-tsc-ctxt-sw-stress-test disable-tsc-on-off-stress-test \ disable-tsc-test set-anon-vma-name-test set-process-name +TEST_GEN_PROGS := pr_set_mm_auxv all: $(TEST_PROGS) include ../lib.mk
tools/testing/selftests/prctl/pr_set_mm_auxv.c new file +42 -0
42 lines not on this page · raw message
Signature · 1 line
2.43.0