[PATCH v7 1/2] x86-64: Save APX registers in ld.so trampoline
H.J. Lu
hjl.tools@gmail.com
Fri Feb 16 11:53:56 GMT 2024
On Fri, Feb 16, 2024 at 3:51 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Noah Goldstein:
>
> >> +/* Save SSE, AVX, AVX512, mask, bound and APX registers. Bound and APX
> >> + registers are mutually exclusive. */
> >> +# define STATE_SAVE_MASK \
> >> + ((1 << X86_XSTATE_SSE_ID) \
> >> + | (1 << X86_XSTATE_AVX_ID) \
> >> + | (1 << X86_XSTATE_BNDREGS_ID) \
> >> + | (1 << X86_XSTATE_K_ID) \
> >> + | (1 << X86_XSTATE_ZMM_H_ID) \
> >> + | (1 << X86_XSTATE_ZMM_ID) \
> >> + | (1 << X86_XSTATE_APX_F_ID))
>
> > Need tile here?
>
> We can't save the AMX state because it's too big and will overflow
> existing stacks. This change is immediately active on systems with AMX,
> even for old applications which do not know about AMX at all.
>
>
Another problem is that AMX is enabled by a syscall. When ld.so checks
the xsave mask, AMX state may not be active at the time.
--
H.J.
More information about the Libc-alpha
mailing list