diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 09:41:32 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 09:41:32 -1000 |
| commit | 7318a05d2f4b202d8e1d6f5a77a617f79e1526fb (patch) | |
| tree | 61b162a3f9b9165012697ea1534eaa9390c2df49 /scripts/Makefile.thinlto | |
| parent | 5a36c24b0ec8fe15ddffa3148ae93a4691ea7c8f (diff) | |
| download | linux-7318a05d2f4b202d8e1d6f5a77a617f79e1526fb.tar.gz linux-7318a05d2f4b202d8e1d6f5a77a617f79e1526fb.zip | |
alpha: split the prefetch check in do_page_fault() by mode
Before EV6, a load into $31 or $f31 could fault, so do_page_fault()
reads the faulting instruction and skips it if it is such a prefetch.
The PC can be a user or a kernel address, since the check runs for
faults from either mode, and it reads it with __get_user() either way.
That only works because alpha's __get_user() does no address check. It
also ignores the error, relying on the fault fixup zeroing the
instruction, which does not decode as a prefetch.
Move the check into is_prefetch(), and read the instruction with
get_user() for a user-mode PC and get_kernel_nofault() for a kernel one.
A failed read now explicitly means "not a prefetch".
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
