[LTP] [PATCH v2 1/2] cve-2015-3290: Disable AVX for x86_64
Petr Vorel
pvorel@suse.cz
Mon Apr 7 11:18:09 CEST 2025
> Hi,
> one nit below.
> On 04. 04. 25 20:14, Siddhesh Poyarekar wrote:
> > 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.
> > Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
> > Reviewed-by: Martin Doucha <mdoucha@suse.cz>
> > ---
> > testcases/cve/Makefile | 6 ++++++
> > 1 file changed, 6 insertions(+)
> > diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
> > index 01b9b9ccb..d545a7f93 100644
> > --- a/testcases/cve/Makefile
> > +++ b/testcases/cve/Makefile
> > @@ -22,6 +22,12 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64))
> > meltdown: CFLAGS += -msse2
> > endif
> > +# The test needs to clobber %rbp, which requires frame pointer omission. Also
> > +# for x86_64, disable AVX since that could sometimes require a stack
> > +# realignment, which gets in the way of frame pointer omission.
> > cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer
> > +ifneq (,$(filter $(HOST_CPU),x86_64))
> If you don't want to add the command line option for 32bit x86 builds, then
> this condition would be cleaner:
> ifeq ($(HOST_CPU),x86_64)
+1. IMHO this works as expected. I suppose Siddhesh got inspiration for filter
due the above meltdown, where it is needed because it compares 2 archs. But
I will also appreciate an explicit confirmation.
Kind regards,
Petr
> We can fix that during merge but please confirm that we should.
> > +cve-2015-3290: CFLAGS += -mno-avx
> > +endif
> > include $(top_srcdir)/include/mk/generic_leaf_target.mk
More information about the ltp
mailing list