Buggy commit tracked to: "Re: [PATCH 2/9] iov_iter: move rw_copy_check_uvector() into lib/iov_iter.c"

Arnd Bergmann arnd at arndb.de
Sat Oct 24 00:23:21 AEDT 2020


On Fri, Oct 23, 2020 at 2:46 PM David Laight <David.Laight at aculab.com> wrote:
>
> From: Greg KH <gregkh at linuxfoundation.org>
> > 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


More information about the Linuxppc-dev mailing list