diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:45:39 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-20 08:45:39 -1000 |
| commit | cdb6b4913a7f793143573129c4a2f679dd0170b1 (patch) | |
| tree | 5205a8819ef42118590cc869da38ce71e55dce16 /scripts/Makefile.thinlto | |
| parent | 872df694064f45c90cb3903034b78a4c9957ca7c (diff) | |
| download | linux-cdb6b4913a7f793143573129c4a2f679dd0170b1.tar.gz linux-cdb6b4913a7f793143573129c4a2f679dd0170b1.zip | |
hexagon: use scoped user access for the signal frame
setup_sigcontext() and restore_sigcontext() move the saved registers
with __put_user() and __get_user(), OR-ing the errors together, relying
on the access_ok() done on the whole frame by setup_rt_frame() and
sys_rt_sigreturn(). setup_rt_frame() writes the two trampoline magic
words the same way.
Do those accesses inside scoped_user_{write,read}_access() instead, with
unsafe_{put,get}_user() and unsafe_copy_{to,from}_user() for the block
of general registers. The access_ok() calls stay, for the
__copy_to_user() and __copy_from_user() of the signal mask.
A fault part way through now stops at the first failing access instead
of carrying on. On sigreturn this also means the general registers are
no longer zero-filled past the fault, and the user PC is not updated.
Either way the task gets SIGSEGV. hexagon uses the asm-generic
accessors and 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
