Files
linux/arch/powerpc/kernel
Nicholas Piggin f35d2f249e powerpc/64s: Fix copy-paste data exposure into newly created tasks
copy-paste contains implicit "copy buffer" state that can contain
arbitrary user data (if the user process executes a copy instruction).
This could be snooped by another process if a context switch hits while
the state is live. So cp_abort is executed on context switch to clear
out possible sensitive data and prevent the leak.

cp_abort is done after the low level _switch(), which means it is never
reached by newly created tasks, so they could snoop on this buffer
between their first and second context switch.

Fix this by doing the cp_abort before calling _switch. Add some
comments which should make the issue harder to miss.

Fixes: 07d2a628bc ("powerpc/64s: Avoid cpabort in context switch when possible")
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20210622053036.474678-1-npiggin@gmail.com
2021-06-25 00:07:11 +10:00
..
2021-04-22 20:59:04 +10:00
2021-06-25 00:07:10 +10:00
2020-12-04 01:01:09 +11:00
2021-06-17 00:09:10 +10:00
2021-04-30 11:20:40 -07:00
2021-06-25 00:07:10 +10:00
2021-06-25 00:07:10 +10:00
2021-02-09 00:10:50 +11:00
2021-06-25 00:07:09 +10:00