Re: [PATCH 09/10] x86/fpu: Allow restoring signal frames with larger xstate_size
From: Chang S. Bae
Date: Fri Aug 07 2026 - 23:05:29 EST
On 8/7/2026 4:12 PM, Andrei Vagin wrote:
We definitely can trigger enablement of dynamic features from
user-space, but the issue is that userspace currently has no way to
query what features are actually enabled for a task (the kernel only
exposes fpstate->user_xfeatures through signal frames, which is not
viable for C/R).
https://docs.kernel.org/arch/x86/xstate.html
-ARCH_GET_XCOMP_SUPP
arch_prctl(ARCH_GET_XCOMP_SUPP, &features);
ARCH_GET_XCOMP_SUPP stores the supported features in userspace storage of type uint64_t. The second argument is a pointer to that storage.
-ARCH_GET_XCOMP_PERM
arch_prctl(ARCH_GET_XCOMP_PERM, &features);
ARCH_GET_XCOMP_PERM stores the features for which the userspace process has permission in userspace storage of type uint64_t. The second argument is a pointer to that storage.
Do you need something else than these?
Thanks,
Chang