summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPreeti Sachan <preeti.sachan@intel.com>2025-06-24 08:57:27 +0530
committerSteve Sakoman <steve@sakoman.com>2025-07-07 07:42:58 -0700
commit20d38517183f6bf183c1119fb363dd4bb302bc05 (patch)
tree10913c822cd40d5439e3454dcc425c25c7636820
parentebbddcdb70eb5a733c04c50e650267e55fe4d844 (diff)
downloadpoky-20d38517183f6bf183c1119fb363dd4bb302bc05.tar.gz
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>
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch42
-rw-r--r--meta/recipes-extended/ltp/ltp_20240129.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch
new file mode 100644
index 0000000000..c6fae88eb9
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch
@@ -0,0 +1,42 @@
1From 28d823a63ee29f5d72c2aba781a06a7e2651cadc Mon Sep 17 00:00:00 2001
2From: Siddhesh Poyarekar <siddhesh@gotplt.org>
3Date: Mon, 7 Apr 2025 06:24:47 -0400
4Subject: [PATCH] cve-2015-3290: Disable AVX for x86_64
5
6When the input compiler enables AVX, stack realignment requirements
7causes gcc to fail to omit %rbp use, due to which the test fails to
8clobber %rbp in inline asm. Disable AVX to build the test on x86_64 so
9that the test continues working.
10
11Link: https://lore.kernel.org/ltp/20250407102448.2605506-2-siddhesh@gotplt.org/
12
13Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/28d823a63ee29f5d72c2aba781a06a7e2651cadc]
14
15Reviewed-by: Martin Doucha <mdoucha@suse.cz>
16Reviewed-by: Petr Vorel <pvorel@suse.cz>
17Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
18
19---
20 testcases/cve/Makefile | 6 ++++++
21 1 file changed, 6 insertions(+)
22
23diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
24index 01b9b9ccb..98c38e908 100644
25--- a/testcases/cve/Makefile
26+++ b/testcases/cve/Makefile
27@@ -22,6 +22,12 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64))
28 meltdown: CFLAGS += -msse2
29 endif
30
31+# The test needs to clobber %rbp, which requires frame pointer omission. Also
32+# for x86_64, disable AVX since that could sometimes require a stack
33+# realignment, which gets in the way of frame pointer omission.
34 cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer
35+ifeq ($(HOST_CPU),x86_64)
36+cve-2015-3290: CFLAGS += -mno-avx
37+endif
38
39 include $(top_srcdir)/include/mk/generic_leaf_target.mk
40--
412.37.3
42
diff --git a/meta/recipes-extended/ltp/ltp_20240129.bb b/meta/recipes-extended/ltp/ltp_20240129.bb
index f8e6d3987e..18c6439283 100644
--- a/meta/recipes-extended/ltp/ltp_20240129.bb
+++ b/meta/recipes-extended/ltp/ltp_20240129.bb
@@ -30,6 +30,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht
30 file://0001-Remove-OOM-tests-from-runtest-mm.patch \ 30 file://0001-Remove-OOM-tests-from-runtest-mm.patch \
31 file://0001-scenario_groups-default-remove-connectors.patch \ 31 file://0001-scenario_groups-default-remove-connectors.patch \
32 file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \ 32 file://0001-sched_stress-Use-time_t-instead-of-long-for-type.patch \
33 file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \
33 " 34 "
34 35
35S = "${WORKDIR}/git" 36S = "${WORKDIR}/git"