x86/extable: Adjust UD1 encoding in stub_selftest()
PATCH 1/1 x86/extable: Adjust UD1 encoding in stub_selftest()
The 0x90 is a ModRM byte and technically needs following by an imm32.
Switch to 0xc0 which encodes two %eax operands, and is a complete instruction.
No practical change.
Reported-by Jan Beulich <[email protected]>
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Teddy Astie <[email protected]>
--- xen/arch/x86/extable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/extable.c +1 -1
@@ -157,7 +157,7 @@ int __init cf_check stub_selftest(void)union stub_exception_token res; } tests[] __initconst = {#define endbr64 0xf3, 0x0f, 0x1e, 0xfa - { .opc = { endbr64, 0x0f, 0xb9, 0x90 }, /* ud1 */ + { .opc = { endbr64, 0x0f, 0xb9, 0xc0 }, /* ud1 %eax,%eax */ .res.fields.trapnr = X86_EXC_UD }, { .opc = { endbr64, 0x90, 0x02, 0x00 }, /* nop; add (%rax),%al */ .rax = 0x0123456789abcdef,
Signature · 1 line
2.39.5
Quoted 8 lines · Andrew Cooper
The
0x90is a ModRM byte and technically needs following by an imm32.Switch to
0xc0which encodes two %eax operands, and is a complete instruction.No practical change.
Reported-by Jan Beulich <[email protected]>Signed-off-by Andrew Cooper <[email protected]>
Reviewed-by Jan Beulich <[email protected]>