Re: [PATCH v8 0/6] Introduce CET supervisor state support

From: Chang S. Bae
Date: Tue Jun 03 2025 - 14:33:26 EST


On 6/2/2025 11:22 PM, Chao Gao wrote:

Aside from the splat, task #2 could execute AMX instructions without
requesting permissions, but its AMX state would be discarded during the
next FPU switch, as RFBM[18] is cleared when executing XSAVES. And, in the

Right, AMX instructions can be executed when XFD is disarmed. But in this case, it's inside a signal handler. On sigreturn, XTILE_DATA will be reloaded with the init state, since fpstate::user_xfeatures[18] is zero.

"flipped" scenario you mentioned, task #2 might receive an extra #NM, after
which its fpstate would be re-allocated (although the size won't increase
further).

Yes.

So, for well-behaved tasks that never use AMX, there is no impact; tasks
that use AMX may receive extra #NM. There won't be any unexpected #PF,
memory corruption, or kernel panic.

A signal handler is expected to stay within the bounds of async-signal-safe functions, so using AMX in that context is highly unlikely in practice. While the issue has existed, its real-world impact appears quite minimal in my view.

Thanks,
Chang