diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:23:37 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-19 19:23:37 -1000 |
| commit | 2806617c9c02fe16b7b3a93a98e7907d53c1cf31 (patch) | |
| tree | 31da17e76ddaf3cb88b9f7d316f3b5971bf7337d /scripts/Makefile.thinlto | |
| parent | 4e60e85129ae142720ae1fd12c535317a64906b2 (diff) | |
| download | linux-2806617c9c02fe16b7b3a93a98e7907d53c1cf31.tar.gz linux-2806617c9c02fe16b7b3a93a98e7907d53c1cf31.zip | |
x86/entry: Use get_user() for the fast 32-bit syscall EBP fetch
__do_fast_syscall_32() fetches the user's EBP from the stack slot the
vDSO stashed it in. On 64-bit kernels it used __get_user(), as a
micro-optimization: the address is explicitly 32 bits, so it cannot be
out of range.
That optimization has turned into a pessimization. On x86-64,
get_user() checks the address with a compare and a conditional move,
while __get_user() does an lfence instead. Use get_user() on both
32-bit and 64-bit, which also removes the IS_ENABLED(CONFIG_X86_64)
special case.
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
