Thread (60 messages) flat view 60 messages, 6 authors, 2020-12-10

Re: [PATCH v15 03/26] x86/fpu/xstate: Introduce CET MSR XSAVES supervisor states

From: Dave Hansen <hidden>
Date: 2020-12-01 22:27:14
Also in: linux-arch, linux-doc, linux-mm, lkml

On 11/30/20 3:16 PM, Yu, Yu-cheng wrote:
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help