mirror of
https://git.yoctoproject.org/poky
synced 2026-09-20 03:49:32 +02:00
ltp: backport patch to fix compilation error for x86_64
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. Fix compilation with gcc v13.4+. Cherry picked from oe-core, master branch. (From OE-Core rev: 54d6fa7bc9f4ae6bdb98862488e8d09200d3bc14) Signed-off-by: Preeti Sachan <preeti.sachan@intel.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
This commit is contained in:
committed by
Steve Sakoman
parent
ebbddcdb70
commit
20d3851718
@@ -0,0 +1,42 @@
|
|||||||
|
From 28d823a63ee29f5d72c2aba781a06a7e2651cadc Mon Sep 17 00:00:00 2001
|
||||||
|
From: Siddhesh Poyarekar <siddhesh@gotplt.org>
|
||||||
|
Date: Mon, 7 Apr 2025 06:24:47 -0400
|
||||||
|
Subject: [PATCH] cve-2015-3290: Disable AVX for x86_64
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
Link: https://lore.kernel.org/ltp/20250407102448.2605506-2-siddhesh@gotplt.org/
|
||||||
|
|
||||||
|
Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/28d823a63ee29f5d72c2aba781a06a7e2651cadc]
|
||||||
|
|
||||||
|
Reviewed-by: Martin Doucha <mdoucha@suse.cz>
|
||||||
|
Reviewed-by: Petr Vorel <pvorel@suse.cz>
|
||||||
|
Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
|
||||||
|
|
||||||
|
---
|
||||||
|
testcases/cve/Makefile | 6 ++++++
|
||||||
|
1 file changed, 6 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
|
||||||
|
index 01b9b9ccb..98c38e908 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
|
||||||
|
+ifeq ($(HOST_CPU),x86_64)
|
||||||
|
+cve-2015-3290: CFLAGS += -mno-avx
|
||||||
|
+endif
|
||||||
|
|
||||||
|
include $(top_srcdir)/include/mk/generic_leaf_target.mk
|
||||||
|
--
|
||||||
|
2.37.3
|
||||||
|
|
||||||
@@ -30,6 +30,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht
|
|||||||
file://0001-Remove-OOM-tests-from-runtest-mm.patch \
|
file://0001-Remove-OOM-tests-from-runtest-mm.patch \
|
||||||
file://0001-scenario_groups-default-remove-connectors.patch \
|
file://0001-scenario_groups-default-remove-connectors.patch \
|
||||||
file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \
|
file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \
|
||||||
|
file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
S = "${WORKDIR}/git"
|
||||||
|
|||||||
Reference in New Issue
Block a user