From bf9c95e23324cbaf2e58fc3f0cbdc73137f2d1ca Mon Sep 17 00:00:00 2001
From: Michael Ellerman <mpe@ellerman.id.au>
Date: Wed, 20 Nov 2019 13:37:23 +1100
Subject: [PATCH] selftests/powerpc: spectre_v2 test must be built 64-bit
References: bsc#1181158 ltc#190851
Patch-mainline: v5.5-rc1
Git-commit: bf9c95e23324cbaf2e58fc3f0cbdc73137f2d1ca
The spectre_v2 test must be built 64-bit, it includes hand-written asm
that is 64-bit only, and segfaults if built 32-bit.
Fixes: c790c3d2b0ec ("selftests/powerpc: Add a test of spectre_v2 mitigations")
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20191120023924.13130-1-mpe@ellerman.id.au
Acked-by: Michal Suchanek <msuchanek@suse.de>
---
tools/testing/selftests/powerpc/security/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/testing/selftests/powerpc/security/Makefile b/tools/testing/selftests/powerpc/security/Makefile
index d68e6031695c..eadbbff50be6 100644
--- a/tools/testing/selftests/powerpc/security/Makefile
+++ b/tools/testing/selftests/powerpc/security/Makefile
@@ -8,4 +8,6 @@ CFLAGS += -I../../../../../usr/include
include ../../lib.mk
$(TEST_GEN_PROGS): ../harness.c ../utils.c
+
+$(OUTPUT)/spectre_v2: CFLAGS += -m64
$(OUTPUT)/spectre_v2: ../pmu/event.c branch_loops.S
--
2.26.2