On Fri, Oct 23, 2020 at 2:46 PM David Laight <David.Laight@xxxxxxxxxx> wrote: > > From: Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> > > Sent: 22 October 2020 14:51 > > I've rammed the code into godbolt. > > https://godbolt.org/z/9v5PPW > > Definitely a clang bug. > > Search for [wx]24 in the clang output. > nr_segs comes in as w2 and the initial bound checks are done on w2. > w24 is loaded from w2 - I don't believe this changes the high bits. You believe wrong, "mov w24, w2" is a zero-extending operation. Arnd