diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:23:49 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:23:49 -1000 |
| commit | a7de2d2d783b4e3d29e89ddea52798d3172e4f07 (patch) | |
| tree | de07df048d6c44d4741a2c8b123ac8a79a0110f5 /scripts/Makefile.thinlto | |
| parent | 05c6ad3f3bced959e10ed28ec6e1088d1a5bd524 (diff) | |
| download | linux-a7de2d2d783b4e3d29e89ddea52798d3172e4f07.tar.gz linux-a7de2d2d783b4e3d29e89ddea52798d3172e4f07.zip | |
x86/fpu: Use get_user()/put_user() for the signal frame fields
The FPU signal frame code reads and writes a handful of individual
fields (the xstate magic words, the legacy status word, the xfeatures
header and PKRU) with __get_user() and __put_user(). These rely on an
access_ok() of the whole frame done earlier by the caller. Each of
those accesses enables and disables user access on its own, so the
up-front check saves nothing. On x86, __get_user() is even more
expensive than get_user(): it does an lfence, where get_user() checks
the address with a couple of plain instructions.
Use get_user() and put_user(). The accesses that run with page faults
disabled stay that way; get_user() and put_user() are fine there.
This is part of getting rid of __get_user() and __put_user() entirely.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
