On 11/04/2024 5:08 pm, Roger Pau Monne wrote:
> Setting alternative call variables as __init is not safe for use with
> livepatch, as livepatches can rightfully introduce new alternative calls to
> structures marked as __alt_call_maybe_initdata (possibly just indirectly due 
> to
> replacing existing functions that use those).  Attempting to resolve those
> alternative calls then results in page faults as the variable that holds the
> function pointer address has been freed.
>
> When livepatch is supported use the __ro_after_init attribute instead of
> __initdata for __alt_call_maybe_initdata.
>
> Fixes: f26bb285949b ('xen: Implement xen/alternative-call.h for use in common 
> code')
> Signed-off-by: Roger Pau Monné <roger....@citrix.com>

I really did screw up livepatching with the indirect-branch reduction
work, didn't I...

Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>

Reply via email to