kselftest/arm64: Explicitly build no BTI tests with BTI disabled
PATCH 1/1 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.
--- tools/testing/selftests/arm64/bti/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/arm64/bti/Makefile +1 -1
@@ -14,7 +14,7 @@ CFLAGS += -I../../../../../usr/include/ CFLAGS_STATIC = -ffreestanding -CFLAGS_NOBTI = -DBTI=0 +CFLAGS_NOBTI = -mbranch-protection=none -DBTI=0 CFLAGS_BTI = -mbranch-protection=standard -DBTI=1 CFLAGS_COMMON = -Wall -Wextra $(CFLAGS)
Signature · 1 line
2.30.2
Catalin Marinas
maintainerQuoted 15 lines · Mark Brown
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 <[email protected]>--- tools/testing/selftests/arm64/bti/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/testing/selftests/arm64/bti/Makefile +0
-0
tools/testing/selftests/arm64/bti/Makefile CFLAGS += -I../../../../../usr/include/ · line 18
Quoted 6 lines
tools/testing/selftests/arm64/bti/Makefile +1
-1@@ -14,7 +14,7 @@ CFLAGS += -I../../../../../usr/include/ CFLAGS_STATIC = -ffreestanding -CFLAGS_NOBTI = -DBTI=0 +CFLAGS_NOBTI = -mbranch-protection=none -DBTI=0 CFLAGS_BTI = -mbranch-protection=standard -DBTI=1
Do I miss an patches? I can't see the CFLAGS_STATIC in the arm64 branches, nor in next.
Signature · 1 line
Catalin
Quoted 8 lines · Catalin Marinas
tools/testing/selftests/arm64/bti/Makefile CFLAGS += -I../../../../../usr/include/ · line 18
Quoted 3 lines · Mark Brown
tools/testing/selftests/arm64/bti/Makefile +1
-1-CFLAGS_NOBTI = -DBTI=0 +CFLAGS_NOBTI = -mbranch-protection=none -DBTI=0 CFLAGS_BTI = -mbranch-protection=standard -DBTI=1Do I miss an patches? I can't see the
CFLAGS_STATICin the arm64 branches, nor in next.
Ah, sorry - I have some WIP stuff to do a dynamic btitest binary.