(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc/signal64: use scoped user access in setup_trampoline()

setup_trampoline() writes the seven words of the on-stack sigreturn trampoline with __put_user(), relying on the frame having been checked when the frame setup opened its user write access. It is called after that access has been closed again, so each of the seven writes opens and closes user access on its own. Write them inside one scoped_user_write_access_size() covering the whole trampoline instead. Everything in it is a store, so a write-only window is enough, and the instruction cache flush stays outside it. This is part of getting rid of __get_user() and __put_user() entirely. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


Author Linus Torvalds Date Commit Parent 2f0bb47c
+15 -12
1 changed file
+15 -12
1 changed file