[LTP] [PATCH v2 1/2] cve-2015-3290: Disable AVX for x86_64

Siddhesh Poyarekar siddhesh@gotplt.org
Fri Apr 4 20:14:05 CEST 2025


When the input compiler enables AVX, stack realignment requirements
causes gcc to fail to omit %rbp use, due to which the test fails to
clobber %rbp in inline asm.  Disable AVX to build the test on x86_64 so
that the test continues working.

Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
Reviewed-by: Martin Doucha <mdoucha@suse.cz>
---
 testcases/cve/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
index 01b9b9ccb..d545a7f93 100644
--- a/testcases/cve/Makefile
+++ b/testcases/cve/Makefile
@@ -22,6 +22,12 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64))
 meltdown: CFLAGS += -msse2
 endif
 
+# The test needs to clobber %rbp, which requires frame pointer omission.  Also
+# for x86_64, disable AVX since that could sometimes require a stack
+# realignment, which gets in the way of frame pointer omission.
 cve-2015-3290:	CFLAGS += -pthread -fomit-frame-pointer
+ifneq (,$(filter $(HOST_CPU),x86_64))
+cve-2015-3290: CFLAGS += -mno-avx
+endif
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.49.0



More information about the ltp mailing list