[glibc/arm/malloc-mte-v1] configure: remove --enable-memory-tagging option
Yury Khrustalev via Glibc-cvs <[email protected]> Thu, 7 May 2026 12:45:09 +0000 (GMT)
| Newsgroups | gmane.comp.lib.glibc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d59e08f09b6ae7000929d5135501d2dd3b0cbdf7 commit d59e08f09b6ae7000929d5135501d2dd3b0cbdf7 Author: Yury Khrustalev <[email protected]> Date: Wed Apr 22 10:32:25 2026 +0100 configure: remove --enable-memory-tagging option Remove the '--enable-memory-tagging' configure option along with all associated variables and macros. This includes: - Removing the 'glibc.mem.tagging' tunable. - Removing parts of the configure script that processes the '--enable-memory-tagging' configure option. - Remove the 'memory-tagging' makefile variable. - Remove the USE_MTAG macro definition. Code that is conditionally compiled when this macro is defined is not removed at this stage and will be dealt with in the following commits. Also, update documentation accordingly. Diff: --- INSTALL | 14 -------------- config.h.in | 3 --- config.make.in | 2 -- configure | 24 ------------------------ configure.ac | 15 --------------- elf/dl-tunables.list | 5 ----- manual/install.texi | 13 ------------- manual/tunables.texi | 29 ----------------------------- sysdeps/aarch64/dl-diagnostics-cpu.c | 2 -- 9 files changed, 107 deletions(-) diff --git a/INSTALL b/INSTALL index 4174c9661f..b67da640bd 100644 --- a/INSTALL +++ b/INSTALL @@ -154,20 +154,6 @@ passed to 'configure'. For example: NOTE: '--enable-cet' is only supported on x86_64 and x32. -'--enable-memory-tagging' - Enable memory tagging support if the architecture supports it. - When the GNU C Library is built with this option then the resulting - library will be able to control the use of tagged memory when - hardware support is present by use of the tunable - 'glibc.mem.tagging'. This includes the generation of tagged memory - when using the 'malloc' APIs. - - At present only AArch64 platforms with MTE provide this - functionality, although the library will still operate (without - memory tagging) on older versions of the architecture. - - The default is to disable support for memory tagging. - '--disable-profile' Don't build libraries with profiling information. You may want to use this option if you don't plan to do profiling. diff --git a/config.h.in b/config.h.in index b53731c393..18e8c822e3 100644 --- a/config.h.in +++ b/config.h.in @@ -182,9 +182,6 @@ /* Define if inlined system calls are available. */ #undef HAVE_INLINED_SYSCALLS -/* Define if memory tagging support should be enabled. */ -#undef USE_MTAG - /* Package description. */ #undef PKGVERSION diff --git a/config.make.in b/config.make.in index 856363d0cd..12ccb55e53 100644 --- a/config.make.in +++ b/config.make.in @@ -78,8 +78,6 @@ multi-arch = @multi_arch@ mach-interface-list = @mach_interface_list@ -memory-tagging = @memory_tagging@ - # Configuration options. build-shared = @shared@ build-profile = @profile@ diff --git a/configure b/configure index c84d283bd5..6b5c6ff21f 100755 --- a/configure +++ b/configure @@ -703,7 +703,6 @@ INSTALL_PROGRAM base_machine build_pt_chown build_nscd -memory_tagging enable_werror force_install bindnow @@ -811,7 +810,6 @@ enable_maintainer_mode enable_kernel enable_werror enable_multi_arch -enable_memory_tagging enable_systemtap enable_build_nscd enable_nscd @@ -1490,8 +1488,6 @@ Optional Features: --disable-werror do not build with -Werror --enable-multi-arch enable single DSO with optimizations for multiple architectures - --enable-memory-tagging enable memory tagging if supported by the - architecture [default=no] --enable-systemtap enable systemtap static probe points [default=no] --disable-build-nscd disable building and installing the nscd daemon --disable-nscd library functions will not contact the nscd daemon @@ -4690,26 +4686,6 @@ esac fi -# Check whether --enable-memory-tagging was given. -if test ${enable_memory_tagging+y} -then : - enableval=$enable_memory_tagging; memory_tagging=$enableval -else case e in #( - e) memory_tagging=no ;; -esac -fi - -if test "$memory_tagging" = yes; then - # Only enable this on architectures that support it. - case $host_cpu in - aarch64) - printf "%s\n" "#define USE_MTAG 1" >>confdefs.h - - ;; - esac -fi - - # Check whether --enable-systemtap was given. if test ${enable_systemtap+y} then : diff --git a/configure.ac b/configure.ac index 280ec8e5b3..7fd10db618 100644 --- a/configure.ac +++ b/configure.ac @@ -328,21 +328,6 @@ AC_ARG_ENABLE([multi-arch], [multi_arch=$enableval], [multi_arch=default]) -AC_ARG_ENABLE([memory-tagging], - AS_HELP_STRING([--enable-memory-tagging], - [enable memory tagging if supported by the architecture @<:@default=no@:>@]), - [memory_tagging=$enableval], - [memory_tagging=no]) -if test "$memory_tagging" = yes; then - # Only enable this on architectures that support it. - case $host_cpu in - aarch64) - AC_DEFINE(USE_MTAG) - ;; - esac -fi -AC_SUBST(memory_tagging) - AC_ARG_ENABLE([systemtap], [AS_HELP_STRING([--enable-systemtap], [enable systemtap static probe points @<:@default=no@:>@])], diff --git a/elf/dl-tunables.list b/elf/dl-tunables.list index 1bbf70d36f..111649f145 100644 --- a/elf/dl-tunables.list +++ b/elf/dl-tunables.list @@ -116,11 +116,6 @@ glibc { } mem { - tagging { - type: INT_32 - minval: 0 - maxval: 255 - } decorate_maps { type: INT_32 minval: 0 diff --git a/manual/install.texi b/manual/install.texi index 073cda0530..4094baa259 100644 --- a/manual/install.texi +++ b/manual/install.texi @@ -185,19 +185,6 @@ non CET enabled shared library in CET enabled application. NOTE: @option{--enable-cet} is only supported on x86_64 and x32. -@item --enable-memory-tagging -Enable memory tagging support if the architecture supports it. When -@theglibc{} is built with this option then the resulting library will -be able to control the use of tagged memory when hardware support is -present by use of the tunable @samp{glibc.mem.tagging}. This includes -the generation of tagged memory when using the @code{malloc} APIs. - -At present only AArch64 platforms with MTE provide this functionality, -although the library will still operate (without memory tagging) on -older versions of the architecture. - -The default is to disable support for memory tagging. - @item --disable-profile Don't build libraries with profiling information. You may want to use this option if you don't plan to do profiling. diff --git a/manual/tunables.texi b/manual/tunables.texi index 12b515c628..95b7075ae7 100644 --- a/manual/tunables.texi +++ b/manual/tunables.texi @@ -40,7 +40,6 @@ glibc.malloc.perturb: 0 (min: 0, max: 255) glibc.cpu.x86_shared_cache_size: 0x100000 (min: 0x0, max: 0xffffffffffffffff) glibc.pthread.rseq: 1 (min: 0, max: 1) glibc.cpu.prefer_map_32bit_exec: 0 (min: 0, max: 1) -glibc.mem.tagging: 0 (min: 0, max: 255) glibc.malloc.hugetlb: 0x0 (min: 0x0, max: 0xffffffffffffffff) glibc.cpu.x86_rep_movsb_threshold: 0x2000 (min: 0x100, max: 0xffffffffffffffff) glibc.malloc.mxfast: 0x0 (min: 0x0, max: 0xffffffffffffffff) @@ -666,34 +665,6 @@ This tunable namespace supports operations that affect the way @theglibc{} and the process manage memory. @end deftp -@deftp Tunable glibc.mem.tagging -If the hardware supports memory tagging, this tunable can be used to -control the way @theglibc{} uses this feature. At present this is only -supported on AArch64 systems with the MTE extension; it is ignored for -all other systems. - -This tunable takes a value between 0 and 255 and acts as a bitmask -that enables various capabilities. - -Bit 0 (the least significant bit) causes the @code{malloc} -subsystem to allocate -tagged memory, with each allocation being assigned a random tag. - -Bit 1 enables precise faulting mode for tag violations on systems that -support deferred tag violation reporting. This may cause programs -to run more slowly. - -Bit 2 enables either precise or deferred faulting mode for tag violations -whichever is preferred by the system. - -Other bits are currently reserved. - -@Theglibc{} startup code will automatically enable memory tagging -support in the kernel if this tunable has any non-zero value. - -The default value is @samp{0}, which disables all memory tagging. -@end deftp - @deftp Tunable glibc.mem.decorate_maps If the kernel supports naming anonymous virtual memory areas (since Linux version 5.17, although not always enabled by some kernel diff --git a/sysdeps/aarch64/dl-diagnostics-cpu.c b/sysdeps/aarch64/dl-diagnostics-cpu.c index 697868cb25..4bf244ec71 100644 --- a/sysdeps/aarch64/dl-diagnostics-cpu.c +++ b/sysdeps/aarch64/dl-diagnostics-cpu.c @@ -45,8 +45,6 @@ _dl_diagnostics_cpu (void) print_cpu_features_value ("midr_el1", GLRO (dl_aarch64_cpu_features).midr_el1); print_cpu_features_value ("mops", GLRO (dl_aarch64_cpu_features).mops); - print_cpu_features_value ("mte_state", - GLRO (dl_aarch64_cpu_features).mte_state); print_cpu_features_value ("sve", GLRO (dl_aarch64_cpu_features).sve); print_cpu_features_value ("zva_size", GLRO (dl_aarch64_cpu_features).zva_size);