aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-05-16 19:22:13 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-05-16 19:43:40 +0100
commit9f93c2e0cda49a558c981a57fc4a7f8d143ced93 (patch)
treec5f185f20cf51ca1faedb1894de308979e8f8d77 /tools/testing/selftests/arm64
parentkselftest/arm64: bti: force static linking (diff)
downloadlinux-dev-9f93c2e0cda49a558c981a57fc4a7f8d143ced93.tar.xz
linux-dev-9f93c2e0cda49a558c981a57fc4a7f8d143ced93.zip
kselftest/arm64: Explicitly build no BTI tests with BTI disabled
In case a distribution enables branch protection by default do as we do for the main kernel and explicitly disable branch protection when building the test case for having BTI disabled to ensure it doesn't get turned on by the toolchain defaults. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220516182213.727589-1-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64')
-rw-r--r--tools/testing/selftests/arm64/bti/Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/arm64/bti/Makefile b/tools/testing/selftests/arm64/bti/Makefile
index dafa1c2aa5c4..ccdac414ad94 100644
--- a/tools/testing/selftests/arm64/bti/Makefile
+++ b/tools/testing/selftests/arm64/bti/Makefile
@@ -10,7 +10,7 @@ PROGS := $(patsubst %,gen/%,$(TEST_GEN_PROGS))
# cases for statically linked and dynamically lined binaries are
# slightly different.
-CFLAGS_NOBTI = -DBTI=0
+CFLAGS_NOBTI = -mbranch-protection=none -DBTI=0
CFLAGS_BTI = -mbranch-protection=standard -DBTI=1
CFLAGS_COMMON = -ffreestanding -Wall -Wextra $(CFLAGS)