diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:34:26 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:34:48 -1000 |
| commit | 872df694064f45c90cb3903034b78a4c9957ca7c (patch) | |
| tree | 364cbf25fdaabb44e32a75e63907650d601c67f9 /scripts/Makefile.thinlto | |
| parent | 9622c1bc291f3119f52d6781e4c8509e74ed3098 (diff) | |
| download | linux-872df694064f45c90cb3903034b78a4c9957ca7c.tar.gz linux-872df694064f45c90cb3903034b78a4c9957ca7c.zip | |
alpha: use scoped user access when setting up signal frames
setup_sigcontext() writes the whole register set with __put_user() and
__copy_to_user(), OR-ing the errors together, relying on its callers'
access_ok() on the frame. setup_frame() and setup_rt_frame() write the
sigreturn trampoline, and setup_rt_frame() the ucontext header, the
same way.
Do those writes inside scoped_user_write_access() with
unsafe_put_user() and unsafe_copy_to_user(). on_sig_stack() is
evaluated before the scope, and the instruction cache flush stays
outside it. The up-front access_ok()
calls stay: setup_rt_frame() still needs its own for the
__copy_to_user() of the signal mask.
A fault part way through now stops at the first failing write instead of
carrying on. Either way the frame setup 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
