[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210113214436.GL1551@shell.armlinux.org.uk>
Date: Wed, 13 Jan 2021 21:44:37 +0000
From: Russell King - ARM Linux admin <linux@...linux.org.uk>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Masahiro Yamada <masahiroy@...nel.org>,
Catalin Marinas <catalin.marinas@....com>,
linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Theodore Ts'o <tytso@....edu>,
"Cc: Android Kernel" <kernel-team@...roid.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Florian Weimer <fweimer@...hat.com>
Subject: Re: [PATCH] compiler.h: Raise minimum version of GCC to 5.1 for arm64
On Wed, Jan 13, 2021 at 11:15:09AM -0800, Linus Torvalds wrote:
> On Wed, Jan 13, 2021 at 9:58 AM Masahiro Yamada <masahiroy@...nel.org> wrote:
> >
> > 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 <davem@...emloft.net>
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!
Powered by blists - more mailing lists