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

From: Borislav Petkov
Date: Wed Aug 18 2021 - 17:16:29 EST


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.

https://people.kernel.org/tglx/notes-about-netiquette