Re: [PATCH v9 12/26] x86/fpu/xstate: Use feature disable (XFD) to protect dynamic user state

Borislav Petkov
2021-08-18T21:16:29Z

On Wed, Aug 18, 2021 at 08:43:50PM +0000, Bae, Chang Seok wrote:
> Maybe I’m missing something, but I wonder what’s the difference
> from reading XCR0.

Wny, because adding another prctl() is too damn hard?

What if this modus operandi of features userspace can use with kernel
assistance but need an explicit request and are off otherwise, gets
extended beyond XSAVE-managed features?

You would wish then that you had defined a

prctl(GET_FEATURES_WITH_KERNEL_ASSISTANCE);

at the time...

--
Regards/Gruss,
Boris.