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

From: Bae, Chang Seok
Date: Wed Aug 18 2021 - 16:44:00 EST


On Aug 18, 2021, at 10:46, Borislav Petkov <bp@xxxxxxxxx> wrote:
> On Wed, Aug 18, 2021 at 10:20:58AM -0700, Thiago Macieira wrote
>> The way the API to userspace is implemented, the only way to find
>> out if the kernel supports a given state is to enable it. It's not
>> currently possible to ask "do you support AMX tile data?"
>
> Then our API needs improving. An app should be able to ask the kernel
> "Do you support AMX?" get a proper answer and act accordingly.

Maybe I’m missing something, but I wonder what’s the difference from reading
XCR0.

Thanks,
Chang