Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-14 Thread Lukas Wunner
On Tue, Jan 12, 2021 at 09:28:32AM -0800, Linus Torvalds wrote: > On Tue, Jan 12, 2021 at 5:20 AM Lukas Wunner wrote: > > > Variable declarations in for-loops is the only one I can think of. I > > > think that would clean up some code (and some macros), but might not > > > be compelling on its

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-12 Thread Linus Torvalds
On Tue, Jan 12, 2021 at 5:20 AM Lukas Wunner wrote: > > > Variable declarations in for-loops is the only one I can think of. I > > think that would clean up some code (and some macros), but might not > > be compelling on its own. > > Anonymous structs/unions. I used to have a use case for that

RE: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-12 Thread David Laight
From: Florian Weimer > Sent: 12 January 2021 13:32 > > * Lukas Wunner: > > > On Fri, Jan 08, 2021 at 12:02:53PM -0800, Linus Torvalds wrote: > >> I appreciate Arnd pointing out "--std=gnu11", though. What are the > >> actual relevant language improvements? > >> > >> Variable declarations in

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-12 Thread Florian Weimer
* Lukas Wunner: > On Fri, Jan 08, 2021 at 12:02:53PM -0800, Linus Torvalds wrote: >> I appreciate Arnd pointing out "--std=gnu11", though. What are the >> actual relevant language improvements? >> >> Variable declarations in for-loops is the only one I can think of. I >> think that would clean

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-12 Thread Lukas Wunner
On Fri, Jan 08, 2021 at 12:02:53PM -0800, Linus Torvalds wrote: > I appreciate Arnd pointing out "--std=gnu11", though. What are the > actual relevant language improvements? > > Variable declarations in for-loops is the only one I can think of. I > think that would clean up some code (and some

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Nick Desaulniers
On Fri, Jan 8, 2021 at 12:34 PM Arnd Bergmann wrote: > > On Fri, Jan 8, 2021 at 9:02 PM Linus Torvalds > wrote: > > On Fri, Jan 8, 2021 at 1:27 AM Will Deacon wrote: > > > > > > On Fri, Jan 08, 2021 at 10:21:54AM +0100, Peter Zijlstra wrote: > > > > On Thu, Jan 07, 2021 at 10:20:38PM +0100,

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Russell King - ARM Linux admin
On Fri, Jan 08, 2021 at 12:02:53PM -0800, Linus Torvalds wrote: > Well, honestly, I'm always in favor of having people not use ancient > compilers, but both of the issues at hand do seem to be specific to > arm64. > > The "gcc before 5.1 generates incorrect stack pointer writes on arm64" > sounds

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Arnd Bergmann
On Fri, Jan 8, 2021 at 9:02 PM Linus Torvalds wrote: > On Fri, Jan 8, 2021 at 1:27 AM Will Deacon wrote: > > > > On Fri, Jan 08, 2021 at 10:21:54AM +0100, Peter Zijlstra wrote: > > > On Thu, Jan 07, 2021 at 10:20:38PM +0100, Arnd Bergmann wrote: > > > > On Thu, Jan 7, 2021 at 2:37 PM Russell

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Linus Torvalds
On Fri, Jan 8, 2021 at 1:27 AM Will Deacon wrote: > > On Fri, Jan 08, 2021 at 10:21:54AM +0100, Peter Zijlstra wrote: > > On Thu, Jan 07, 2021 at 10:20:38PM +0100, Arnd Bergmann wrote: > > > On Thu, Jan 7, 2021 at 2:37 PM Russell King - ARM Linux admin > > > > > > So, do we raise the minimum gcc

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Pavel Machek
Hi! > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > > them in my git history. > > > > So, do we raise the minimum gcc version for the kernel as a whole to 5.1 > > or just for aarch64? > > Russell, Arnd, thanks so much for tracking down the root cause of the >

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Will Deacon
On Fri, Jan 08, 2021 at 10:21:54AM +0100, Peter Zijlstra wrote: > On Thu, Jan 07, 2021 at 10:20:38PM +0100, Arnd Bergmann wrote: > > On Thu, Jan 7, 2021 at 2:37 PM Russell King - ARM Linux admin > > > > So, do we raise the minimum gcc version for the kernel as a whole to 5.1 > > > or just for

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Peter Zijlstra
On Thu, Jan 07, 2021 at 10:20:38PM +0100, Arnd Bergmann wrote: > On Thu, Jan 7, 2021 at 2:37 PM Russell King - ARM Linux admin > > So, do we raise the minimum gcc version for the kernel as a whole to 5.1 > > or just for aarch64? > > I'd personally love to see gcc-5 as the global minimum version,

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Peter Zijlstra
On Thu, Jan 07, 2021 at 11:27:22AM -0500, Theodore Ts'o wrote: > I will note that RHEL 7 uses gcc 4.8. I personally don't have an > objections to requiring developers using RHEL 7 to have to install a > more modern gcc (since I use Debian Testing and gcc 10.2.1, myself, > and gcc 5.1 is so five

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Ard Biesheuvel
On Thu, 7 Jan 2021 at 23:42, Eric Biggers wrote: > > On Thu, Jan 07, 2021 at 10:14:46PM +, Russell King - ARM Linux admin > wrote: > > On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > > > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > > > > > On Thu, Jan 07,

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-08 Thread Arnd Bergmann
On Fri, Jan 8, 2021 at 12:53 AM Darrick J. Wong wrote: > > On Thu, Jan 07, 2021 at 02:27:51PM -0800, Eric Biggers wrote: > > On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > > > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > > > > > On Thu, Jan 07, 2021 at 01:37:47PM

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Darrick J. Wong
On Thu, Jan 07, 2021 at 02:27:51PM -0800, Eric Biggers wrote: > On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > > > On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin > > > wrote: > > > > > The

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Eric Biggers
On Thu, Jan 07, 2021 at 10:14:46PM +, Russell King - ARM Linux admin wrote: > On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > > > On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin > > >

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Eric Biggers
On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin > > wrote: > > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > > >

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Russell King - ARM Linux admin
On Thu, Jan 07, 2021 at 10:48:05PM +0100, Arnd Bergmann wrote: > On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > > > On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin > > wrote: > > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > > >

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Arnd Bergmann
On Thu, Jan 7, 2021 at 5:27 PM Theodore Ts'o wrote: > > On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin > wrote: > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > > them in my git history. > > > > So, do we raise the minimum gcc version for

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Arnd Bergmann
On Thu, Jan 7, 2021 at 2:37 PM Russell King - ARM Linux admin wrote: > On Thu, Jan 07, 2021 at 02:16:25PM +0100, Arnd Bergmann wrote: > > On Thu, Jan 7, 2021 at 1:47 PM Russell King - ARM Linux admin > > wrote: > > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > them

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Florian Weimer
* Theodore Ts'o: > On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin > wrote: >> > The gcc bugzilla mentions backports into gcc-linaro, but I do not see >> > them in my git history. >> >> So, do we raise the minimum gcc version for the kernel as a whole to 5.1 >> or just

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Theodore Ts'o
On Thu, Jan 07, 2021 at 01:37:47PM +, Russell King - ARM Linux admin wrote: > > The gcc bugzilla mentions backports into gcc-linaro, but I do not see > > them in my git history. > > So, do we raise the minimum gcc version for the kernel as a whole to 5.1 > or just for aarch64? Russell, Arnd,

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Russell King - ARM Linux admin
On Thu, Jan 07, 2021 at 02:16:25PM +0100, Arnd Bergmann wrote: > On Thu, Jan 7, 2021 at 1:47 PM Russell King - ARM Linux admin > wrote: > > > Arnd has found via bisecting gcc: > > > > 7e8c2bd54af ("[AArch64] fix unsafe access to deallocated stack") > > > > which seems to be

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Arnd Bergmann
On Thu, Jan 7, 2021 at 1:47 PM Russell King - ARM Linux admin wrote: > Arnd has found via bisecting gcc: > > 7e8c2bd54af ("[AArch64] fix unsafe access to deallocated stack") > > which seems to be https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63293 > > That seems to suggest that gcc-5.0.0 is also

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Russell King - ARM Linux admin
On Thu, Jan 07, 2021 at 11:18:41AM +, Russell King - ARM Linux admin wrote: > On Wed, Jan 06, 2021 at 10:32:23PM +, Russell King - ARM Linux admin > wrote: > > On Wed, Jan 06, 2021 at 05:20:34PM +, Will Deacon wrote: > > > With that, I see the following after ten seconds or so: > > >

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-07 Thread Russell King - ARM Linux admin
On Wed, Jan 06, 2021 at 10:32:23PM +, Russell King - ARM Linux admin wrote: > On Wed, Jan 06, 2021 at 05:20:34PM +, Will Deacon wrote: > > With that, I see the following after ten seconds or so: > > > > EXT4-fs error (device sda2): ext4_lookup:1707: inode #674497: comm > > md5sum:

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Russell King - ARM Linux admin
On Wed, Jan 06, 2021 at 05:20:34PM +, Will Deacon wrote: > With that, I see the following after ten seconds or so: > > EXT4-fs error (device sda2): ext4_lookup:1707: inode #674497: comm md5sum: > iget: checksum invalid > > Russell, Mark -- does this recipe explode reliably for you too?

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Arnd Bergmann
On Wed, Jan 6, 2021 at 10:04 PM Arnd Bergmann wrote: > On Wed, Jan 6, 2021 at 6:22 PM Will Deacon wrote: > > On Wed, Jan 06, 2021 at 01:52:53PM +, Russell King - ARM Linux admin > > wrote: > > I tried the Image-5.9.0 on a virtual machine with seven CPUs (two clusters) > running in an M1 mac

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Arnd Bergmann
On Wed, Jan 6, 2021 at 6:22 PM Will Deacon wrote: > On Wed, Jan 06, 2021 at 01:52:53PM +, Russell King - ARM Linux admin > wrote: > >and the resulting Image is here: > > > https://mirrors.edge.kernel.org/pub/linux/kernel/people/will/bugs/rmk/Image-5.9.0 > > 3. Using that kernel, I

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Russell King - ARM Linux admin
On Wed, Jan 06, 2021 at 05:20:34PM +, Will Deacon wrote: > I've managed to reproduce the corruption on my AMD Seattle board (8x A57). > I haven't had a chance to dig deeper yet, but here's the recipe which works > for me: > > 1. I'm using GCC 4.9.4 simply to try to get as close as I can to

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Will Deacon
On Wed, Jan 06, 2021 at 01:52:53PM +, Russell King - ARM Linux admin wrote: > On Wed, Jan 06, 2021 at 11:53:59AM +, Mark Rutland wrote: > > ... and are you using defconfig or something else? > > Not sure I replied to this. I'm not using the defconfig, I've my own > .config > > As I

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Russell King - ARM Linux admin
On Wed, Jan 06, 2021 at 11:53:59AM +, Mark Rutland wrote: > ... and are you using defconfig or something else? Not sure I replied to this. I'm not using the defconfig, I've my own .config As I mentioned, Will has built a 5.10 kernel using Arnd's gcc 4.9.4 and hasn't been able to reproduce

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Russell King - ARM Linux admin
On Wed, Jan 06, 2021 at 11:53:59AM +, Mark Rutland wrote: > On Tue, Jan 05, 2021 at 03:47:26PM +, Russell King - ARM Linux admin > wrote: > > Hi, > > Hi Russell, > > > This is an update on where I am with this long standing issue at the > > current time. > > > > Since 5.4, I have been

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-06 Thread Mark Rutland
On Tue, Jan 05, 2021 at 03:47:26PM +, Russell King - ARM Linux admin wrote: > Hi, Hi Russell, > This is an update on where I am with this long standing issue at the > current time. > > Since 5.4, I have been struggling with several of my ARM64 systems, of > different SoC vendors and

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-05 Thread Russell King - ARM Linux admin
On Tue, Jan 05, 2021 at 10:27:28AM -0800, Darrick J. Wong wrote: > On Tue, Jan 05, 2021 at 03:47:26PM +, Russell King - ARM Linux admin > wrote: > > Hi, > > > > This is an update on where I am with this long standing issue at the > > current time. > > > > Since 5.4, I have been struggling

Re: Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-05 Thread Darrick J. Wong
On Tue, Jan 05, 2021 at 03:47:26PM +, Russell King - ARM Linux admin wrote: > Hi, > > This is an update on where I am with this long standing issue at the > current time. > > Since 5.4, I have been struggling with several of my ARM64 systems, of > different SoC vendors and differing

Aarch64 EXT4FS inode checksum failures - seems to be weak memory ordering issues

2021-01-05 Thread Russell King - ARM Linux admin
Hi, This is an update on where I am with this long standing issue at the current time. Since 5.4, I have been struggling with several of my ARM64 systems, of different SoC vendors and differing filesystem media, were sporadically reporting inode checksum failures on their root filesystems. The