lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 21 Mar 2023 10:30:45 +0800
From:   David Gow <davidgow@...gle.com>
To:     Pavel Machek <pavel@....cz>
Cc:     Sasha Levin <sashal@...nel.org>, linux-kernel@...r.kernel.org,
        stable@...r.kernel.org,
        Sergio González Collado <sergio.collado@...il.com>,
        Richard Weinberger <richard@....at>, tglx@...utronix.de,
        mingo@...hat.com, hpa@...or.com, x86@...nel.org
Subject: Re: [PATCH AUTOSEL 4.14 2/5] rust: arch/um: Disable FP/SIMD
 instruction to match x86

On Mon, 20 Mar 2023 at 20:19, Pavel Machek <pavel@....cz> wrote:
>
> Hi!
>
> > [ Upstream commit 8849818679478933dd1d9718741f4daa3f4e8b86 ]
> >
> > The kernel disables all SSE and similar FP/SIMD instructions on
> > x86-based architectures (partly because we shouldn't be using floats in
> > the kernel, and partly to avoid the need for stack alignment, see:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383 )
> >
> > UML does not do the same thing, which isn't in itself a problem, but
> > does add to the list of differences between UML and "normal" x86 builds.
> >
> > In addition, there was a crash bug with LLVM < 15 / rustc < 1.65 when
> > building with SSE, so disabling it fixes rust builds with earlier
> > compiler versions, see:
> > https://github.com/Rust-for-Linux/linux/pull/881
>
> We don't have rust in 4.14, so cited problem can't hit us. This should
> not go to -stable.
>
> (Plus, KBUILD_RUSTFLAGS is not going to exist in -stable).
>


I agree, this is not a good fit for -stable. While I'd argue the
KBUILD_CFLAGS part is still technically valid:
- As noted, the KBUILD_RUSTFLAGS bit is useless without Rust support.
- It triggers a bug in older gcc versions (< 11), which is bad anyway,
and probably worse for -stable:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99652

There's a patch to work around the latter:
https://lore.kernel.org/linux-um/20230318041555.4192172-1-davidgow@google.com/

But I'd agree that excluding this change from -stable altogether is
the better option.

Cheers,
-- David

> Best regards,
>                                                                 Pavel
>
> > +# Disable SSE and other FP/SIMD instructions to match normal x86
> > +#
> > +KBUILD_CFLAGS += -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx
> > +KBUILD_RUSTFLAGS += -Ctarget-feature=-sse,-sse2,-sse3,-ssse3,-sse4.1,-sse4.2,-avx,-avx2
> > +
> >  ifeq ($(CONFIG_X86_32),y)
> >  START := 0x8048000
> >
>
> --
> People of Russia, stop Putin before his war on Ukraine escalates.

Download attachment "smime.p7s" of type "application/pkcs7-signature" (4003 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ