lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87f6309f-d5b4-a66f-99a1-d96a655290b6@intel.com>
Date:   Tue, 1 Dec 2020 14:35:18 -0800
From:   "Yu, Yu-cheng" <yu-cheng.yu@...el.com>
To:     Dave Hansen <dave.hansen@...el.com>, 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>,
        Borislav Petkov <bp@...en8.de>,
        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>,
        Vedvyas Shanbhogue <vedvyas.shanbhogue@...el.com>,
        Dave Martin <Dave.Martin@....com>,
        Weijiang Yang <weijiang.yang@...el.com>,
        Pengfei Xu <pengfei.xu@...el.com>
Subject: Re: [PATCH v15 03/26] x86/fpu/xstate: Introduce CET MSR XSAVES
 supervisor states

On 12/1/2020 2:26 PM, Dave Hansen wrote:
> On 11/30/20 3:16 PM, Yu, Yu-cheng wrote:
>>>
>>> Do we have any other spots in the kernel where we care about:
>>>
>>>      boot_cpu_has(X86_FEATURE_SHSTK) ||
>>>      boot_cpu_has(X86_FEATURE_IBT)
>>>
>>> ?  If so, we could also address this by declaring a software-defined
>>> X86_FEATURE_CET and then setting it if SHSTK||IBT is supported, then we
>>> just put that one feature in xsave_cpuid_features[].
>>>
>>
>> These features have different CPUIDs but are complementary parts.  I
>> don't know if someday there will be shadow-stack-only CPUs, but an
>> IBT-only CPU is weird.  What if the kernel checks that the CPU has both
>> features and presents only one feature flag (X86_FEATURE_CET), no
>> X86_FEATURE_SHSTK or X86_FEATURE_IBT?
> 
> Logically, that's probably fine.  But, X86_FEATURE_IBT/SHSTK are in a
> non-scattered leaf, so we'll kinda define them whether we like it or
> not.  We'd have to go out of our way to *not* define them.
> 

After more thoughts, I think it is better to just add X86_FEATURE_CET 
and not more.  We cannot predict what is going to happen later.
So, like what you suggested, X86_FEATURE_CET means (X86_FEATURE_SHSTK | 
X86_FEATURE_IBT).

Thanks,
Yu-cheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ