diff options
| author | Yogesh Tyagi <yogesh.tyagi@intel.com> | 2025-07-10 00:16:59 +0800 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-07-17 13:57:58 -0700 |
| commit | 86662d0c1b59b739ca102cecc85ce00b791ba98d (patch) | |
| tree | aaef65122e854e3527ecaef5b26591617e0780c3 | |
| parent | a98403f2bf5b539b80d1171b1deacaa4fa6f81f5 (diff) | |
| download | poky-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.patch | 42 | ||||
| -rw-r--r-- | meta/recipes-extended/ltp/ltp_20250130.bb | 1 |
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 @@ | |||
| 1 | From 28d823a63ee29f5d72c2aba781a06a7e2651cadc Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Siddhesh Poyarekar <siddhesh@gotplt.org> | ||
| 3 | Date: Mon, 7 Apr 2025 06:24:47 -0400 | ||
| 4 | Subject: [PATCH] cve-2015-3290: Disable AVX for x86_64 | ||
| 5 | |||
| 6 | When the input compiler enables AVX, stack realignment requirements | ||
| 7 | causes gcc to fail to omit %rbp use, due to which the test fails to | ||
| 8 | clobber %rbp in inline asm. Disable AVX to build the test on x86_64 so | ||
| 9 | that the test continues working. | ||
| 10 | |||
| 11 | Link: https://lore.kernel.org/ltp/20250407102448.2605506-2-siddhesh@gotplt.org/ | ||
| 12 | |||
| 13 | Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/28d823a63ee29f5d72c2aba781a06a7e2651cadc] | ||
| 14 | |||
| 15 | Reviewed-by: Martin Doucha <mdoucha@suse.cz> | ||
| 16 | Reviewed-by: Petr Vorel <pvorel@suse.cz> | ||
| 17 | Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org> | ||
| 18 | |||
| 19 | --- | ||
| 20 | testcases/cve/Makefile | 6 ++++++ | ||
| 21 | 1 file changed, 6 insertions(+) | ||
| 22 | |||
| 23 | diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile | ||
| 24 | index 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 | -- | ||
| 41 | 2.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 | ||
| 35 | S = "${WORKDIR}/git" | 36 | S = "${WORKDIR}/git" |
