diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:27:23 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:27:23 -1000 |
| commit | 9622c1bc291f3119f52d6781e4c8509e74ed3098 (patch) | |
| tree | b5d3c23c05dc6b34cd5236edd20a966b45c082b6 /scripts/Makefile.thinlto | |
| parent | ef9a9b616a6f2145fa85d5cb4e58441091391b26 (diff) | |
| download | linux-9622c1bc291f3119f52d6781e4c8509e74ed3098.tar.gz linux-9622c1bc291f3119f52d6781e4c8509e74ed3098.zip | |
alpha: use scoped user access in the sigreturn path
restore_sigcontext() reads the whole saved register set with
__get_user() and __copy_from_user(), OR-ing the errors together. It
relies on its callers having done access_ok(): do_sigreturn() on the
sigcontext, do_rt_sigreturn() on the enclosing ucontext.
Make it do its own check, with a scoped_user_read_access() around
unsafe_get_user() and unsafe_copy_from_user(). do_sigreturn() then only
needs the same for the signal mask. do_rt_sigreturn() keeps its
access_ok(), which its own __copy_from_user() of the mask still needs.
A fault part way through the frame now stops the restore there, instead
of carrying on with zeroes and still writing the user stack pointer.
Either way the sigreturn fails and the task gets SIGSEGV. alpha has no
user_access_begin(), so the accesses themselves are the same as before.
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
