lkml.org 
[lkml]   [2022]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2022-02-19 06:23    [W:1.645 / U:0.388 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site