On 12/2/26 07:04, Christophe Leroy (CS GROUP) wrote: > Also about the masked user access path, the principle of that path is to > be branch-less, the whole purpose was the remove the test/branch from > access_ok(). With your new check it is not anymore branch-less
Branches themselves are OK. The problem branches are around access checks because they potentially allow transient execution paths to skip the checking. In this case, the new check forces a return before any accesses happen or any bounds checks are done. If the new check was incorrectly speculated, we'd just have transient execution doing what the *architectural* path is allowed to do today. I _think_ that's OK, at least from a spectre v1 perspective. But it could definitely use some more eyeballs on it. I do agree with you about the code size concerns.
