Re: [PATCH v2 14/22] x86/fpu/xstate: Inherit dynamic user state when used in the parent

From: Andy Lutomirski
Date: Fri Nov 20 2020 - 00:08:41 EST


On Thu, Nov 19, 2020 at 3:37 PM Chang S. Bae <chang.seok.bae@xxxxxxxxx> wrote:
>
> When a new task is created, the kernel copies all the states from the
> parent. If the parent already has any dynamic user state in use, the new
> task has to expand the XSAVE buffer to save them. Also, disable the
> associated first-use fault.

This seems like a mistake. If init uses AMX for some misguided
reason, ever task on the whole system will end up with AMX state
allocated.