Linux Kernel Selftest development
 help / color / mirror / Atom feed
* [PATCH] kselftest/arm64: Explicitly build no BTI tests with BTI disabled
@ 2022-05-11 16:10 Mark Brown
  2022-05-16 18:09 ` Catalin Marinas
  0 siblings, 1 reply; 3+ messages in thread
From: Mark Brown @ 2022-05-11 16:10 UTC (permalink / raw)
  To: Catalin Marinas, Will Deacon, Shuah Khan
  Cc: linux-arm-kernel, linux-kselftest, 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 <broonie@kernel.org>
---
 tools/testing/selftests/arm64/bti/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/bti/Makefile b/tools/testing/selftests/arm64/bti/Makefile
index 10a12c5e05e6..a3e59d7910b3 100644
--- a/tools/testing/selftests/arm64/bti/Makefile
+++ b/tools/testing/selftests/arm64/bti/Makefile
@@ -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)
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] kselftest/arm64: Explicitly build no BTI tests with BTI disabled
  2022-05-11 16:10 [PATCH] kselftest/arm64: Explicitly build no BTI tests with BTI disabled Mark Brown
@ 2022-05-16 18:09 ` Catalin Marinas
  2022-05-16 18:13   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Catalin Marinas @ 2022-05-16 18:09 UTC (permalink / raw)
  To: Mark Brown; +Cc: Will Deacon, Shuah Khan, linux-arm-kernel, linux-kselftest

On Wed, May 11, 2022 at 05:10:04PM +0100, Mark Brown wrote:
> 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>
> ---
>  tools/testing/selftests/arm64/bti/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/arm64/bti/Makefile b/tools/testing/selftests/arm64/bti/Makefile
> index 10a12c5e05e6..a3e59d7910b3 100644
> --- a/tools/testing/selftests/arm64/bti/Makefile
> +++ b/tools/testing/selftests/arm64/bti/Makefile
> @@ -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.

-- 
Catalin

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] kselftest/arm64: Explicitly build no BTI tests with BTI disabled
  2022-05-16 18:09 ` Catalin Marinas
@ 2022-05-16 18:13   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2022-05-16 18:13 UTC (permalink / raw)
  To: Catalin Marinas
  Cc: Will Deacon, Shuah Khan, linux-arm-kernel, linux-kselftest

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

On Mon, May 16, 2022 at 07:09:36PM +0100, Catalin Marinas wrote:
> On Wed, May 11, 2022 at 05:10:04PM +0100, Mark Brown wrote:

> > -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.

Ah, sorry - I have some WIP stuff to do a dynamic btitest binary.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-16 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-11 16:10 [PATCH] kselftest/arm64: Explicitly build no BTI tests with BTI disabled Mark Brown
2022-05-16 18:09 ` Catalin Marinas
2022-05-16 18:13   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox