Re: [PATCH 2/5] uaccess: Add speculation barrier to copy_from_user_iter()
From: Linus Torvalds
Date: Sun Jun 22 2025 - 12:57:51 EST
On Sun, 22 Jun 2025 at 02:52, Christophe Leroy
<christophe.leroy@xxxxxxxxxx> 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