[PATCH] powerpc/ftrace: restore r2 to caller's stack on livepatch sibling call
Christophe Leroy
christophe.leroy at csgroup.eu
Thu Aug 8 17:00:21 AEST 2024
Le 24/07/2024 à 20:33, Ryan Sullivan a écrit :
> [Vous ne recevez pas souvent de courriers de rysulliv at redhat.com. Découvrez pourquoi ceci est important à https://aka.ms/LearnAboutSenderIdentification ]
>
> Currently, on PowerPC machines, sibling calls in livepatched functions
> cause the stack to be corrupted and are thus not supported by tools
> such as kpatch. Below is an example stack frame showing one such
> currupted stacks:
>
> RHEL-7.6: Linux 3.10.0 ppc64le
>
...
>
> This is caused by the toc stub generated on a sibling call:
>
...
>
> This patch restores r2 value to caller's stack, on a sibling call this
> will uncorrupt the caller's stack and otherwise will be redundant.
Be carefull. On powerpc/32, r2 contains the pointer to current struct.
When I first read the subject of the patch I was puzzled.
You should say toc instead of r2, or make it explicit in the title that
it is for powerpc/64
Christophe
More information about the Linuxppc-dev
mailing list