Behavior of the GNU C Library can be tuned to assume specific hardware capabilities by setting the following tunables in the
cpunamespace:
This tunable supersedes the LD_HWCAP_MASK environment variable and is identical in features.
The
AT_HWCAPkey in the Auxiliary Vector specifies instruction set extensions available in the processor at runtime for some architectures. Theglibc.cpu.hwcap_masktunable allows the user to mask out those capabilities at runtime, thus disabling use of those extensions.
The
glibc.cpu.hwcaps=-xxx,yyy,-zzz...tunable allows the user to enable CPU/ARCH featureyyy, disable CPU/ARCH featurexxxandzzzwhere the feature name is case-sensitive and has to match the ones insysdeps/x86/cpu-features.h.This tunable is specific to i386 and x86-64.
The
glibc.cpu.cached_memopt=[0|1]tunable allows the user to enable optimizations recommended for cacheable memory. If set to1, the GNU C Library assumes that the process memory image consists of cacheable (non-device) memory only. The default,0, indicates that the process may use device memory.This tunable is specific to powerpc, powerpc64 and powerpc64le.
The
glibc.cpu.name=xxxtunable allows the user to tell the GNU C Library to assume that the CPU isxxxwhere xxx may have one of these values:generic,falkor,thunderxt88,thunderx2t99,thunderx2t99p1,ares,emag.This tunable is specific to aarch64.
The
glibc.cpu.x86_data_cache_sizetunable allows the user to set data cache size in bytes for use in memory and string routines.This tunable is specific to i386 and x86-64.
The
glibc.cpu.x86_shared_cache_sizetunable allows the user to set shared cache size in bytes for use in memory and string routines.
The
glibc.cpu.x86_non_temporal_thresholdtunable allows the user to set threshold in bytes for non temporal store.This tunable is specific to i386 and x86-64.
The
glibc.cpu.x86_ibttunable allows the user to control how indirect branch tracking (IBT) should be enabled. Accepted values areon,off, andpermissive.onalways turns on IBT regardless of whether IBT is enabled in the executable and its dependent shared libraries.offalways turns off IBT regardless of whether IBT is enabled in the executable and its dependent shared libraries.permissiveis the same as the default which disables IBT on non-CET executables and shared libraries.This tunable is specific to i386 and x86-64.
The
glibc.cpu.x86_shstktunable allows the user to control how the shadow stack (SHSTK) should be enabled. Accepted values areon,off, andpermissive.onalways turns on SHSTK regardless of whether SHSTK is enabled in the executable and its dependent shared libraries.offalways turns off SHSTK regardless of whether SHSTK is enabled in the executable and its dependent shared libraries.permissivechanges how dlopen works on non-CET shared libraries. By default, when SHSTK is enabled, dlopening a non-CET shared library returns an error. Withpermissive, it turns off SHSTK instead.This tunable is specific to i386 and x86-64.