Thread (36 messages) 36 messages, 4 authors, 2025-07-05

Re: [PATCH 2/5] uaccess: Add speculation barrier to copy_from_user_iter()

From: Linus Torvalds <torvalds@linux-foundation.org>
Date: 2025-06-22 16:57:40
Also in: linux-fsdevel, linux-mm, lkml

On Sun, 22 Jun 2025 at 02:52, Christophe Leroy
[off-list ref] wrote:
The results of "access_ok()" can be mis-speculated.
Hmm. This code is critical. I think it should be converted to use that
masked address thing if we have to add it here.

And at some point this access_ok() didn't even exist, because we check
the addresses at iter creation time. So this one might be a "belt and
suspenders" check, rather than something critical.

(Although I also suspect that when we added ITER_UBUF we might have
created cases where those user addresses aren't checked at iter
creation time any more).

             Linus
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help