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

Linus Torvalds torvalds at linux-foundation.org
Mon Jun 23 02:57:20 AEST 2025


On Sun, 22 Jun 2025 at 02:52, Christophe Leroy
<christophe.leroy at csgroup.eu> 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


More information about the Linuxppc-dev mailing list