[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220219052216.7b5fx6qileqrdjbw@treble>
Date: Fri, 18 Feb 2022 21:22:16 -0800
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, joao@...rdrivepizza.com, hjl.tools@...il.com,
andrew.cooper3@...rix.com, linux-kernel@...r.kernel.org,
ndesaulniers@...gle.com, keescook@...omium.org,
samitolvanen@...gle.com, mark.rutland@....com,
alyssa.milburn@...el.com
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@...radead.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
Powered by blists - more mailing lists