Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-19 Thread Nick Desaulniers
On Fri, Jan 15, 2021 at 1:33 PM Linus Torvalds wrote: > > On Fri, Jan 15, 2021 at 1:23 AM Will Deacon wrote: > > > > Hmm. The feedback on the clang bug suggests that GCC is the one in the > > wrong here (although the argument is based on C11 and I haven't trawled > > through the standards to see

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-15 Thread Linus Torvalds
On Fri, Jan 15, 2021 at 1:23 AM Will Deacon wrote: > > Hmm. The feedback on the clang bug suggests that GCC is the one in the > wrong here (although the argument is based on C11 and I haven't trawled > through the standards to see how this has evolved): Oh well. That writing is absolutely the _w

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-15 Thread Will Deacon
On Thu, Jan 14, 2021 at 01:11:12PM -0800, Linus Torvalds wrote: > On Thu, Jan 14, 2021 at 11:41 AM Will Deacon wrote: > > > > Sure enough, an arm64 defconfig builds perfectly alright with that change, > > but it really shouldn't. I'm using clang 11.0.5, so I had another go with > > GCC 9.2.1 and b

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-14 Thread Linus Torvalds
On Thu, Jan 14, 2021 at 11:41 AM Will Deacon wrote: > > Sure enough, an arm64 defconfig builds perfectly alright with that change, > but it really shouldn't. I'm using clang 11.0.5, so I had another go with > GCC 9.2.1 and bang: Ok, looks like a clang bug, but a reasonably benign one. As long as

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-14 Thread Nick Desaulniers
On Thu, Jan 14, 2021 at 11:41 AM Will Deacon wrote: > > On Thu, Jan 14, 2021 at 11:09:01AM -0800, Linus Torvalds wrote: > > On Thu, Jan 14, 2021 at 11:00 AM Will Deacon wrote: > > > > > > I tried that initially, but I found that I had to make all of the > > > members const to get it to work, at w

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-14 Thread Will Deacon
On Thu, Jan 14, 2021 at 11:09:01AM -0800, Linus Torvalds wrote: > On Thu, Jan 14, 2021 at 11:00 AM Will Deacon wrote: > > > > I tried that initially, but I found that I had to make all of the > > members const to get it to work, at which point the anonymous struct > > wasn't really adding anything

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-14 Thread Linus Torvalds
On Thu, Jan 14, 2021 at 11:00 AM Will Deacon wrote: > > I tried that initially, but I found that I had to make all of the > members const to get it to work, at which point the anonymous struct > wasn't really adding anything. Did I just botch the syntax? I'm not sure what you tried. But this stup

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-14 Thread Will Deacon
On Thu, Jan 14, 2021 at 10:16:13AM -0800, Linus Torvalds wrote: > On Thu, Jan 14, 2021 at 10:01 AM Will Deacon wrote: > > > > Try to clean this up by splitting the immutable fault information out > > into a new 'struct vm_fault_info' which is embedded in 'struct vm_fault' > > and will later be mad

Re: [RFC PATCH 4/8] mm: Separate fault info out of 'struct vm_fault'

2021-01-14 Thread Linus Torvalds
On Thu, Jan 14, 2021 at 10:01 AM Will Deacon wrote: > > Try to clean this up by splitting the immutable fault information out > into a new 'struct vm_fault_info' which is embedded in 'struct vm_fault' > and will later be made 'const'. The vast majority of this change was > performed with a coccine