Re: [PATCH v24 04/30] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions

2021-04-10 Thread Borislav Petkov
On Fri, Apr 09, 2021 at 04:14:09PM -0700, Yu, Yu-cheng wrote: > > @@ -53,6 +55,8 @@ static short xsave_cpuid_features[] __initdata = { > > X86_FEATURE_INTEL_PT, > > X86_FEATURE_PKU, > > X86_FEATURE_ENQCMD, > > + X86_FEATURE_CET, /* XFEATURE_CET_USER */ > > + X86_FEATURE_CET, /*

Re: [PATCH v24 04/30] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions

2021-04-09 Thread Yu, Yu-cheng
On 4/9/2021 10:14 AM, Borislav Petkov wrote: On Fri, Apr 09, 2021 at 08:52:52AM -0700, Yu, Yu-cheng wrote: Recall we had complicated code for the XSAVES features detection in xstate.c. Dave Hansen proposed the solution and then the whole thing becomes simple. Because of this flag, even when

Re: [PATCH v24 04/30] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions

2021-04-09 Thread Borislav Petkov
On Fri, Apr 09, 2021 at 08:52:52AM -0700, Yu, Yu-cheng wrote: > Recall we had complicated code for the XSAVES features detection in > xstate.c. Dave Hansen proposed the solution and then the whole thing > becomes simple. Because of this flag, even when only the shadow stack is > available, the

Re: [PATCH v24 04/30] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions

2021-04-09 Thread Yu, Yu-cheng
On 4/9/2021 3:12 AM, Borislav Petkov wrote: On Thu, Apr 01, 2021 at 03:10:38PM -0700, Yu-cheng Yu wrote: Introduce a software-defined X86_FEATURE_CET, which indicates either Shadow Stack or Indirect Branch Tracking (or both) is present. Also introduce related cpu init/setup functions.

Re: [PATCH v24 04/30] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions

2021-04-09 Thread Borislav Petkov
On Thu, Apr 01, 2021 at 03:10:38PM -0700, Yu-cheng Yu wrote: > Introduce a software-defined X86_FEATURE_CET, which indicates either Shadow > Stack or Indirect Branch Tracking (or both) is present. Also introduce > related cpu init/setup functions. > > Signed-off-by: Yu-cheng Yu > Cc: Kees Cook

[PATCH v24 04/30] x86/cpufeatures: Introduce X86_FEATURE_CET and setup functions

2021-04-01 Thread Yu-cheng Yu
Introduce a software-defined X86_FEATURE_CET, which indicates either Shadow Stack or Indirect Branch Tracking (or both) is present. Also introduce related cpu init/setup functions. Signed-off-by: Yu-cheng Yu Cc: Kees Cook --- v24: - Update #ifdef placement to reflect Kconfig changes of