Thread (19 messages) 19 messages, 9 authors, 2021-02-27

Re: [PATCH] compiler.h: Raise minimum version of GCC to 5.1 for arm64

From: Russell King - ARM Linux admin <linux@armlinux.org.uk>
Date: 2021-01-14 02:13:40
Also in: lkml

On Wed, Jan 13, 2021 at 11:15:09AM -0800, Linus Torvalds wrote:
On Wed, Jan 13, 2021 at 9:58 AM Masahiro Yamada [off-list ref] wrote:
quoted
Maybe, we can raise the minimal version to gcc 5.1
for all architectures.
It was discussed, but the immediate reason for this thing really does
seem to be specific to just arm64 (ie this is not some generic gcc
stack access bug that just happens to rear its head on arm64 - the
patch to fix this in the gcc bugzilla is very much arm64-only).
I seem to remember during the discussion of the arm64 problem, that
there was a similar bug on e.g. sparc, but they patched the kernel.
*digs through irc logs...*

https://patchwork.kernel.org/project/linux-crypto/patch/20170602.112854.571030442583332811.davem@davemloft.net/
https://marc.info/?l=linux-sparc&m=149636946609980&w=2

(and they even reference the arm64 bug). If you move on two messages,
then the disassembly clearly shows that it is the same bug on Sparc.

DaveM came up with the following to fix it:

commit d41519a69b35b10af7fda867fb9100df24fdf403
Author: David Miller [off-list ref]
Date:   Fri Jun 2 11:28:54 2017 -0400

    crypto: Work around deallocated stack frame reference gcc bug on sparc.

which added a bunch of barriers across the kernel to cater for this,
but for them, ext4 was not impacted at that time.

Apparently, davem's justification for not changing ext4 was:

"Actually, ext4 doesn't trigger the problem because the on-stack object
used in ext4 is a fixed size at compile time"

So, maybe the Sparc issue was just a similar but different bug in gcc
4.9.x.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help