On Wed, Nov 11, 2020 at 12:25 PM Andrew Cooper
<andrew.cooper3@xxxxxxxxxx> wrote:
On 11/11/2020 20:15, Josh Poimboeuf wrote:
On Wed, Nov 11, 2020 at 09:07:30PM +0100, Peter Zijlstra wrote:
On Wed, Nov 11, 2020 at 01:59:00PM -0600, Josh Poimboeuf wrote:
On Wed, Nov 11, 2020 at 08:42:06PM +0100, Peter Zijlstra wrote:
Would objtool have an easier time coping if this were implemented inI doubt it, the big problem is that there is no visibility into the
terms of a static call?
actual alternative text. Runtime patching fragments into static call
would have the exact same problem.
Something that _might_ maybe work is trying to morph the immediate
fragments into an alternative. That is, instead of this:
static inline notrace unsigned long arch_local_save_flags(void)
{
return PVOP_CALLEE0(unsigned long, irq.save_fl);
}
Write it something like:
static inline notrace unsigned long arch_local_save_flags(void)
{
PVOP_CALL_ARGS;
PVOP_TEST_NULL(irq.save_fl);
asm_inline volatile(ALTERNATIVE(paravirt_alt(PARAVIRT_CALL),
"PUSHF; POP _ASM_AX",
X86_FEATURE_NATIVE)
Attachment:
OpenPGP_0xB0DE9DD628BF132F.asc
Description: application/pgp-keys
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature