Re: [PATCH v2 11/12] x86/paravirt: Don't use pv_ops vector for MSR access functions
From: Peter Zijlstra
Date: Wed Oct 01 2025 - 02:46:11 EST
On Tue, Sep 30, 2025 at 12:49:21PM -0700, H. Peter Anvin wrote:
> /* Xen code, stub sets CF = 1 on failure */
>
> 0: e8 xx xx xx xx call asm_xen_pv_wrmsr
> 5: 73 03 jnc 0xa
> 7: 0f 0b ud2
> 9: 90 nop
> a:
>
> The trap point even ends up in the same place! UD2 can be any 1-, 2-, or
> 3-byte trapping instruction.
Please don't rely on flags to be retained by RET. The various
mitigations have trouble with that.