[PATCH] powerpc/ftrace: restore r2 to caller's stack on livepatch sibling call

Michael Ellerman mpe at ellerman.id.au
Tue Sep 10 17:21:57 AEST 2024


"Ryan B. Sullivan" <rysulliv at redhat.com> writes:
> Hello all,
>
> Just wanted to ping and see if there was any further feedback or
> questions regarding the patch?

Hi Ryan,

I'd really like a selftest that triggers the sibling call behaviour.

As I said upthread I tried writing one but failed. Which you later
explained is because the cross-module sibling call is not generated by
the compiler but rather by the code being objcopy'ed (or similar).

I think it should be possible to trick the compiler into letting us do a
cross-module sibling call by doing it in an inline asm block. Obviously
that's non-standard, but I think it might work well enough for a test?

We have an example of calling a function within an inline asm block in
call_do_irq().

I'll try to find time to get that done, but I can't promise when.

cheers


More information about the Linuxppc-dev mailing list