Thread (72 messages) 72 messages, 11 authors, 2020-11-02

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

From: Arnd Bergmann <arnd@arndb.de>
Date: 2020-10-23 13:23:45
Also in: linux-mm

On Fri, Oct 23, 2020 at 2:46 PM David Laight [off-list ref] wrote:
From: Greg KH <gregkh@linuxfoundation.org>
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help