lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 07/39] x86/entry: Sprinkle ENDBR dust
On Thu, Feb 24, 2022 at 03:51:45PM +0100, Peter Zijlstra wrote:
> Kernel entry points should be having ENDBR on for IBT configs.
>
> The SYSCALL entry points are found through taking their respective
> address in order to program them in the MSRs, while the exception
> entry points are found through UNWIND_HINT_IRET_REGS.
>
> The rule is that any UNWIND_HINT_IRET_REGS at sym+0 should have an
> ENDBR, see the later objtool ibt validation patch.

Could the "rule" be changed to only check global syms? It seems
unlikely a local symbol would need ENDBR.

Then you wouldn't need this annotation:

> SYM_CODE_START_LOCAL(early_idt_handler_common)
> + UNWIND_HINT_IRET_REGS offset=16
> + ANNOTATE_NOENDBR
> /*
> * The stack is the hardware frame, an error code or zero, and the
> * vector number.

--
Josh

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