summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-19 19:23:47 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-19 19:23:47 -1000
commit05c6ad3f3bced959e10ed28ec6e1088d1a5bd524 (patch)
tree7e9d79b112ec97dc36e4c486e8d8e48c2971ab96 /scripts/Makefile.thinlto
parent0f697d307cab76512f504b3aa0aa5df0205fd50b (diff)
downloadlinux-05c6ad3f3bced959e10ed28ec6e1088d1a5bd524.tar.gz
linux-05c6ad3f3bced959e10ed28ec6e1088d1a5bd524.zip
x86/ptrace: Use get_user() in the general register set writers
genregs_set() and genregs32_set() read the user buffer one word at a time with __get_user(), calling putreg() for each. The access_ok() that makes this safe is in the generic copy_regset_from_user(), on the other side of an indirect call through the regset. 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(), so each read checks its own address. 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