All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] cve-2015-3290: Bump up stack boundary requirement
@ 2025-04-02 17:07 Siddhesh Poyarekar
  2025-04-03 15:07 ` Martin Doucha
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Siddhesh Poyarekar @ 2025-04-02 17:07 UTC (permalink / raw)
  To: ltp

When the input compiler defaults to AVX enabled, stack realignment
requirements causes gcc to fail to omit %rbp use, due to which the test
fails to clobber %rbp in inline asm.  Bump up the preferred stack
boundary to avoid this stack realignment for AVX, so the frame pointer
omission goes through.

Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
---
 testcases/cve/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
index 01b9b9ccb..06bd1b3db 100644
--- a/testcases/cve/Makefile
+++ b/testcases/cve/Makefile
@@ -22,6 +22,9 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64))
 meltdown: CFLAGS += -msse2
 endif
 
-cve-2015-3290:	CFLAGS += -pthread -fomit-frame-pointer
+# The test needs to clobber %rbp, which requires frame pointer omission.  Also
+# bump up the preferred stack boundary to ensure that the compiler manages to
+# omit the frame pointer even with AVX enabled.
+cve-2015-3290:	CFLAGS += -pthread -fomit-frame-pointer -mpreferred-stack-boundary=5
 
 include $(top_srcdir)/include/mk/generic_leaf_target.mk
-- 
2.49.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2025-04-10 14:50 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-02 17:07 [LTP] [PATCH] cve-2015-3290: Bump up stack boundary requirement Siddhesh Poyarekar
2025-04-03 15:07 ` Martin Doucha
2025-04-04 14:00   ` Petr Vorel
2025-04-04 14:20     ` Martin Doucha
2025-04-04 14:23       ` Siddhesh Poyarekar
2025-04-04 18:14 ` [LTP] [PATCH v2 0/2] cve-2015-3290: Disable AVX Siddhesh Poyarekar
2025-04-04 18:14   ` [LTP] [PATCH v2 1/2] cve-2015-3290: Disable AVX for x86_64 Siddhesh Poyarekar
2025-04-07  8:29     ` Martin Doucha
2025-04-07  9:18       ` Petr Vorel
2025-04-07 10:09         ` Siddhesh Poyarekar
2025-04-04 18:14   ` [LTP] [PATCH v2 2/2] Add centos10 to test matrix Siddhesh Poyarekar
2025-04-07 10:24 ` [LTP] [PATCH v3 0/2] cve-2015-3290: Disable AVX Siddhesh Poyarekar
2025-04-07 10:24   ` [LTP] [PATCH v3 1/2] cve-2015-3290: Disable AVX for x86_64 Siddhesh Poyarekar
2025-04-07 11:18     ` Petr Vorel
2025-04-07 10:24   ` [LTP] [PATCH v3 2/2] Add centos10 to test matrix Siddhesh Poyarekar
2025-04-07 11:13     ` Petr Vorel
2025-04-07 13:43       ` Siddhesh Poyarekar
2025-04-10  3:03         ` Li Wang via ltp
2025-04-10 14:50           ` Siddhesh Poyarekar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.