[LTP] [PATCH] cve-2015-3290: Bump up stack boundary requirement
Martin Doucha
mdoucha@suse.cz
Thu Apr 3 17:07:47 CEST 2025
Hello,
I've tested the new compile options with a buggy kernel and the test can
still reproduce the issue.
Reviewed-by: Martin Doucha <mdoucha@suse.cz>
On 02. 04. 25 19:07, Siddhesh Poyarekar wrote:
> 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
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list