lkml.org 
[lkml]   [2022]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 09/39] x86/ibt,paravirt: Sprinkle ENDBR
On Thu, Feb 24, 2022 at 03:51:47PM +0100, Peter Zijlstra wrote:
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> ---
> arch/x86/entry/entry_64.S | 1 +
> arch/x86/include/asm/paravirt.h | 1 +
> arch/x86/include/asm/qspinlock_paravirt.h | 3 +++
> arch/x86/kernel/kvm.c | 3 ++-
> arch/x86/kernel/paravirt.c | 2 ++
> 5 files changed, 9 insertions(+), 1 deletion(-)
>
> --- a/arch/x86/entry/entry_64.S
> +++ b/arch/x86/entry/entry_64.S
> @@ -635,6 +635,7 @@ SYM_INNER_LABEL(restore_regs_and_return_
>
> SYM_INNER_LABEL_ALIGN(native_iret, SYM_L_GLOBAL)
> UNWIND_HINT_IRET_REGS
> + ENDBR // paravirt_iret

If this is also setting the stage for finer grain CFI schemes, should
these macros instead be something more generically named? Like,
INDIRECT_ENTRY, or so? I imagine that'd avoid future churn, but maybe
I'm pre-optimizing... Regardless:

Reviewed-by: Kees Cook <keescook@chromium.org>

--
Kees Cook

\
 
 \ /
  Last update: 2022-02-25 01:48    [W:0.815 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site