mirror of
git://sourceware.org/git/glibc.git
synced 2025-03-06 20:58:33 +01:00
_dl_tlsdesc_dynamic should also preserve AMX registers which are caller-saved. Add X86_XSTATE_TILECFG_ID and X86_XSTATE_TILEDATA_ID to x86-64 TLSDESC_CALL_STATE_SAVE_MASK. Compute the AMX state size and save it in xsave_state_full_size which is only used by _dl_tlsdesc_dynamic_xsave and _dl_tlsdesc_dynamic_xsavec. This fixes the AMX part of BZ #31372. Tested on AMX processor. AMX test is enabled only for compilers with the fix for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114098 GCC 14 and GCC 11/12/13 branches have the bug fix. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
27 lines
935 B
C
27 lines
935 B
C
/* FIXME: CET arch_prctl bits should come from the kernel header files.
|
|
This file should be removed if <asm/prctl.h> from the required kernel
|
|
header files contains CET arch_prctl bits. */
|
|
|
|
#include_next <asm/prctl.h>
|
|
|
|
#ifndef ARCH_SHSTK_ENABLE
|
|
/* Enable SHSTK features in unsigned long int features. */
|
|
# define ARCH_SHSTK_ENABLE 0x5001
|
|
/* Disable SHSTK features in unsigned long int features. */
|
|
# define ARCH_SHSTK_DISABLE 0x5002
|
|
/* Lock SHSTK features in unsigned long int features. */
|
|
# define ARCH_SHSTK_LOCK 0x5003
|
|
/* Unlock SHSTK features in unsigned long int features. */
|
|
# define ARCH_SHSTK_UNLOCK 0x5004
|
|
/* Return SHSTK features in unsigned long int features. */
|
|
# define ARCH_SHSTK_STATUS 0x5005
|
|
|
|
/* ARCH_SHSTK_ features bits */
|
|
# define ARCH_SHSTK_SHSTK 0x1
|
|
# define ARCH_SHSTK_WRSS 0x2
|
|
#endif
|
|
|
|
#ifndef ARCH_GET_XCOMP_PERM
|
|
# define ARCH_GET_XCOMP_PERM 0x1022
|
|
# define ARCH_REQ_XCOMP_PERM 0x1023
|
|
#endif
|