[PATCH] powerpc/ftrace: restore r2 to caller's stack on livepatch sibling call
Ryan Sullivan
rysulliv at redhat.com
Fri Aug 16 02:07:07 AEST 2024
Hi Michael,
The r2 value is stored to the livepatch stack prior to entering into
the livepatched code, so accessing it will gurantee the previous value
is restored.
Also, yes, this bug is caused by tooling that "scoops out" pre-compiled
code and places it into the livepatch handler (e.g. kpatch). However,
since the large majority of customers interact with the livepatch
subsystem through tooling, and this fix would not pose any serious risk
to either usability or security (other than those already present in
livepatching), plus it would solve a large problem for these tools with
a simple fix, I feel as though this would be a useful update to
livepatch.
Thanks,
Ryan
More information about the Linuxppc-dev
mailing list