summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYogesh Tyagi <yogesh.tyagi@intel.com>2025-07-10 00:16:59 +0800
committerSteve Sakoman <steve@sakoman.com>2025-07-17 13:57:58 -0700
commit86662d0c1b59b739ca102cecc85ce00b791ba98d (patch)
treeaaef65122e854e3527ecaef5b26591617e0780c3
parenta98403f2bf5b539b80d1171b1deacaa4fa6f81f5 (diff)
downloadpoky-86662d0c1b59b739ca102cecc85ce00b791ba98d.tar.gz
ltp: backport patch to fix compilation error for Skylake -march=x86-64-v3
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. (From OE-Core rev: bbd3e7886e2ec5ab3578d618b28d007a80d917aa) (From OE-Core rev: 4225c9abbc68e1a29a54927a9c8e1fe12208e5b4) Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> 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_20250130.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_20250130.bb b/meta/recipes-extended/ltp/ltp_20250130.bb
index 690224e6d7..f9521acbc6 100644
--- a/meta/recipes-extended/ltp/ltp_20250130.bb
+++ b/meta/recipes-extended/ltp/ltp_20250130.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-Add-__clear_cache-declaration-for-clang.patch \ 31 file://0001-Add-__clear_cache-declaration-for-clang.patch \
32 file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \ 32 file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \
33 file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \
33 " 34 "
34 35
35S = "${WORKDIR}/git" 36S = "${WORKDIR}/git"