| Date | Fri, 18 Feb 2022 21:22:16 -0800 | From | Josh Poimboeuf <> | Subject | Re: [PATCH 17/29] x86/ibt: Annotate text references |
| |
On Fri, Feb 18, 2022 at 05:49:19PM +0100, Peter Zijlstra wrote: > Annotate away some of the generic code references. This is things > where we take the address of a symbol for exception handling or return > addresses (eg. context switch). > > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
The vast majority of these annotations can go away if objtool only requires ENDBR for referenced *STT_FUNC* symbols.
Anything still needing ANNOTATE_NOENDBR after that, might arguably not belong as STT_FUNC anyway and it might make sense to convert it to non-function code (e.g. SYM_CODE{START,END}.
> @@ -564,12 +565,16 @@ SYM_CODE_END(\asmsym) > .align 16 > .globl __irqentry_text_start > __irqentry_text_start: > + ANNOTATE_NOENDBR // unwinders > + ud2; > > #include <asm/idtentry.h> > > .align 16 > .globl __irqentry_text_end > __irqentry_text_end: > + ANNOTATE_NOENDBR > + ud2;
Why ud2? If no ud2 then the annotation shouldn't be needed since the first idt entry has ENDBR.
-- Josh
|