[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 62/65] x86/entry: Make IDT entrypoints CET-IBT compatible
On 03/12/2021 13:23, Jan Beulich wrote: > On 26.11.2021 13:34, Andrew Cooper wrote: >> Each IDT vector needs to land on an endbr64 instruction. This is especially >> important for the #CP handler, which will escalate to #DF if the endbr64 is >> missing. >> >> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> > Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Thanks. > > One remark though: > >> @@ -1136,7 +1158,8 @@ autogen_stubs: /* Automatically generated stubs. */ >> #endif >> >> ALIGN >> -1: pushq $0 >> +1: ENDBR64 >> + pushq $0 >> movb $vec,4(%rsp) >> jmp common_interrupt >> >> @@ -1146,7 +1169,8 @@ autogen_stubs: /* Automatically generated stubs. */ >> .elseif vec == X86_EXC_CSO || vec == X86_EXC_SPV || \ >> vec == X86_EXC_VE || (vec > X86_EXC_CP && vec < TRAP_nr) >> >> -1: test $8,%spl /* 64bit exception frames are 16 byte aligned, >> but the word */ >> +1: ENDBR64 >> + test $8,%spl /* 64bit exception frames are 16 byte aligned, >> but the word */ >> jz 2f /* size is 8 bytes. Check whether the >> processor gave us an */ >> pushq $0 /* error code, and insert an empty one if not. >> */ >> 2: movb $vec,4(%rsp) > Like with initializers of compound objects vs trailing commas there, I > think it would help if we moved away from placing insns on the same > lines as labels. As can be seen here, inserting something always means > touching two lines instead of just adding one. I had actually wondered the same, without drawing a comparison to trailing commas. I'll adjust. ~Andrew
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |