[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0854cdc9-0329-18c5-8f81-e39b58955352@intel.com>
Date: Tue, 10 Aug 2021 08:50:46 -0700
From: "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To: Borislav Petkov <bp@...en8.de>
CC: <x86@...nel.org>, "H. Peter Anvin" <hpa@...or.com>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, <linux-kernel@...r.kernel.org>,
<linux-doc@...r.kernel.org>, <linux-mm@...ck.org>,
<linux-arch@...r.kernel.org>, <linux-api@...r.kernel.org>,
Arnd Bergmann <arnd@...db.de>,
Andy Lutomirski <luto@...nel.org>,
Balbir Singh <bsingharora@...il.com>,
Cyrill Gorcunov <gorcunov@...il.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"Eugene Syromiatnikov" <esyr@...hat.com>,
Florian Weimer <fweimer@...hat.com>,
"H.J. Lu" <hjl.tools@...il.com>, Jann Horn <jannh@...gle.com>,
Jonathan Corbet <corbet@....net>,
Kees Cook <keescook@...omium.org>,
Mike Kravetz <mike.kravetz@...cle.com>,
Nadav Amit <nadav.amit@...il.com>,
Oleg Nesterov <oleg@...hat.com>, Pavel Machek <pavel@....cz>,
Peter Zijlstra <peterz@...radead.org>,
Randy Dunlap <rdunlap@...radead.org>,
"Ravi V. Shankar" <ravi.v.shankar@...el.com>,
Dave Martin <Dave.Martin@....com>,
Weijiang Yang <weijiang.yang@...el.com>,
Pengfei Xu <pengfei.xu@...el.com>,
Haitao Huang <haitao.huang@...el.com>,
Rick P Edgecombe <rick.p.edgecombe@...el.com>
Subject: Re: [PATCH v28 05/32] x86/fpu/xstate: Introduce CET MSR and XSAVES
supervisor states
On 8/9/2021 9:46 AM, Borislav Petkov wrote:
> On Thu, Jul 22, 2021 at 01:51:52PM -0700, Yu-cheng Yu wrote:
>> diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
>> index a7c413432b33..b529f42ddaae 100644
>> --- a/arch/x86/include/asm/msr-index.h
>> +++ b/arch/x86/include/asm/msr-index.h
>> @@ -939,4 +939,23 @@
>> #define MSR_VM_IGNNE 0xc0010115
>> #define MSR_VM_HSAVE_PA 0xc0010117
>>
>> +/* Control-flow Enforcement Technology MSRs */
>> +#define MSR_IA32_U_CET 0x000006a0 /* user mode cet setting */
>> +#define MSR_IA32_S_CET 0x000006a2 /* kernel mode cet setting */
>> +#define CET_SHSTK_EN BIT_ULL(0)
>> +#define CET_WRSS_EN BIT_ULL(1)
>> +#define CET_ENDBR_EN BIT_ULL(2)
>> +#define CET_LEG_IW_EN BIT_ULL(3)
>> +#define CET_NO_TRACK_EN BIT_ULL(4)
>> +#define CET_SUPPRESS_DISABLE BIT_ULL(5)
>> +#define CET_RESERVED (BIT_ULL(6) | BIT_ULL(7) | BIT_ULL(8) | BIT_ULL(9))
>> +#define CET_SUPPRESS BIT_ULL(10)
>> +#define CET_WAIT_ENDBR BIT_ULL(11)
>> +
>> +#define MSR_IA32_PL0_SSP 0x000006a4 /* kernel shadow stack pointer */
>> +#define MSR_IA32_PL1_SSP 0x000006a5 /* ring-1 shadow stack pointer */
>> +#define MSR_IA32_PL2_SSP 0x000006a6 /* ring-2 shadow stack pointer */
>> +#define MSR_IA32_PL3_SSP 0x000006a7 /* user shadow stack pointer */
>> +#define MSR_IA32_INT_SSP_TAB 0x000006a8 /* exception shadow stack table */
>> +
>> #endif /* _ASM_X86_MSR_INDEX_H */
>
> Merge the following hunk ontop of yours pls:
>
I will do that.
Yu-cheng
> diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h
> index b529f42ddaae..14ce136bcfa8 100644
> --- a/arch/x86/include/asm/msr-index.h
> +++ b/arch/x86/include/asm/msr-index.h
> @@ -362,6 +362,26 @@
>
>
> #define MSR_CORE_PERF_LIMIT_REASONS 0x00000690
> +
> +/* Control-flow Enforcement Technology MSRs */
> +#define MSR_IA32_U_CET 0x000006a0 /* user mode cet setting */
> +#define MSR_IA32_S_CET 0x000006a2 /* kernel mode cet setting */
> +#define CET_SHSTK_EN BIT_ULL(0)
> +#define CET_WRSS_EN BIT_ULL(1)
> +#define CET_ENDBR_EN BIT_ULL(2)
> +#define CET_LEG_IW_EN BIT_ULL(3)
> +#define CET_NO_TRACK_EN BIT_ULL(4)
> +#define CET_SUPPRESS_DISABLE BIT_ULL(5)
> +#define CET_RESERVED (BIT_ULL(6) | BIT_ULL(7) | BIT_ULL(8) | BIT_ULL(9))
> +#define CET_SUPPRESS BIT_ULL(10)
> +#define CET_WAIT_ENDBR BIT_ULL(11)
> +
> +#define MSR_IA32_PL0_SSP 0x000006a4 /* kernel shadow stack pointer */
> +#define MSR_IA32_PL1_SSP 0x000006a5 /* ring-1 shadow stack pointer */
> +#define MSR_IA32_PL2_SSP 0x000006a6 /* ring-2 shadow stack pointer */
> +#define MSR_IA32_PL3_SSP 0x000006a7 /* user shadow stack pointer */
> +#define MSR_IA32_INT_SSP_TAB 0x000006a8 /* exception shadow stack table */
> +
> #define MSR_GFX_PERF_LIMIT_REASONS 0x000006B0
> #define MSR_RING_PERF_LIMIT_REASONS 0x000006B1
>
> @@ -939,23 +959,4 @@
> #define MSR_VM_IGNNE 0xc0010115
> #define MSR_VM_HSAVE_PA 0xc0010117
>
> -/* Control-flow Enforcement Technology MSRs */
> -#define MSR_IA32_U_CET 0x000006a0 /* user mode cet setting */
> -#define MSR_IA32_S_CET 0x000006a2 /* kernel mode cet setting */
> -#define CET_SHSTK_EN BIT_ULL(0)
> -#define CET_WRSS_EN BIT_ULL(1)
> -#define CET_ENDBR_EN BIT_ULL(2)
> -#define CET_LEG_IW_EN BIT_ULL(3)
> -#define CET_NO_TRACK_EN BIT_ULL(4)
> -#define CET_SUPPRESS_DISABLE BIT_ULL(5)
> -#define CET_RESERVED (BIT_ULL(6) | BIT_ULL(7) | BIT_ULL(8) | BIT_ULL(9))
> -#define CET_SUPPRESS BIT_ULL(10)
> -#define CET_WAIT_ENDBR BIT_ULL(11)
> -
> -#define MSR_IA32_PL0_SSP 0x000006a4 /* kernel shadow stack pointer */
> -#define MSR_IA32_PL1_SSP 0x000006a5 /* ring-1 shadow stack pointer */
> -#define MSR_IA32_PL2_SSP 0x000006a6 /* ring-2 shadow stack pointer */
> -#define MSR_IA32_PL3_SSP 0x000006a7 /* user shadow stack pointer */
> -#define MSR_IA32_INT_SSP_TAB 0x000006a8 /* exception shadow stack table */
> -
> #endif /* _ASM_X86_MSR_INDEX_H */
>
>
Powered by blists - more mailing lists