lkml.org 
[lkml]   [2022]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 03/19] x86/cpufeatures: Enable CET CR4 bit for shadow stack
Date
On Thu, 2022-06-16 at 12:24 +0200, Peter Zijlstra wrote:
> On Thu, Jun 16, 2022 at 04:46:27AM -0400, Yang Weijiang wrote:
> > --- a/arch/x86/include/asm/cpu.h
> > +++ b/arch/x86/include/asm/cpu.h
> > @@ -74,7 +74,7 @@ void init_ia32_feat_ctl(struct cpuinfo_x86 *c);
> > static inline void init_ia32_feat_ctl(struct cpuinfo_x86 *c) {}
> > #endif
> >
> > -extern __noendbr void cet_disable(void);
> > +extern __noendbr void ibt_disable(void);
> >
> > struct ucode_cpu_info;
> >
> > diff --git a/arch/x86/kernel/cpu/common.c
> > b/arch/x86/kernel/cpu/common.c
> > index c296cb1c0113..86102a8d451e 100644
> > --- a/arch/x86/kernel/cpu/common.c
> > +++ b/arch/x86/kernel/cpu/common.c
> > @@ -598,23 +598,23 @@ __noendbr void ibt_restore(u64 save)
> >
> > -__noendbr void cet_disable(void)
> > +__noendbr void ibt_disable(void)
> > {
> > if (cpu_feature_enabled(X86_FEATURE_IBT))
> > wrmsrl(MSR_IA32_S_CET, 0);
>
> Not sure about this rename; it really disables all of (S) CET.
>
> Specifically, once we do S-SHSTK (after FRED) we might also very much
> need to kill that for kexec.

Sure, what about something like sup_cet_disable()?
\
 
 \ /
  Last update: 2022-06-16 19:15    [W:0.124 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site