diff options
48 files changed, 75 insertions, 513 deletions
@@ -228,25 +228,6 @@ if 'CFLAGS' is specified it must enable optimization. For example: By default for x86_64, the GNU C Library is built with the vector math library. Use this option to disable the vector math library. -'--enable-tunables' - Tunables support allows additional library parameters to be - customized at runtime. This feature is enabled by default. This - option can take the following values: - - 'yes' - This is the default if no option is passed to configure. This - enables tunables and selects the default frontend (currently - 'valstring'). - - 'no' - This option disables tunables. - - 'valstring' - This enables tunables and selects the 'valstring' frontend for - tunables. This frontend allows users to specify tunables as a - colon-separated list in a single environment variable - 'GLIBC_TUNABLES'. - '--disable-crypt' Do not install the passphrase-hashing library 'libcrypt' or the header file 'crypt.h'. 'unistd.h' will still declare the function diff --git a/Makeconfig b/Makeconfig index 2fda4af5f7..2514db35f6 100644 --- a/Makeconfig +++ b/Makeconfig @@ -1017,11 +1017,8 @@ CPPFLAGS = $(config-extra-cppflags) $(CPPUNDEFS) $(CPPFLAGS-config) \ $(CPPFLAGS-$(suffix $@)) \ $(foreach lib,$(libof-$(basename $(@F))) \ $(libof-$(<F)) $(libof-$(@F)),$(CPPFLAGS-$(lib))) \ - $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) - -ifneq (no,$(have-tunables)) -CPPFLAGS += -DTOP_NAMESPACE=glibc -endif + $(CPPFLAGS-$(<F)) $(CPPFLAGS-$(@F)) $(CPPFLAGS-$(basename $(@F))) \ + -DTOP_NAMESPACE=glibc override CFLAGS = -std=gnu11 -fgnu89-inline $(config-extra-cflags) \ $(filter-out %frame-pointer,$(+cflags)) $(+gccwarn-c) \ @@ -1203,7 +1200,6 @@ endif # Build the tunables list header early since it could be used by any module in # glibc. -ifneq (no,$(have-tunables)) before-compile += $(common-objpfx)dl-tunable-list.h common-generated += dl-tunable-list.h dl-tunable-list.stmp @@ -1216,7 +1212,6 @@ $(common-objpfx)dl-tunable-list.stmp: \ $(AWK) -f $^ > ${@:stmp=T} $(move-if-change) ${@:stmp=T} ${@:stmp=h} touch $@ -endif # Dump the GCC macros used by the default compiler flags to a header # file, so that they can be inspected when using different compiler @@ -34,6 +34,9 @@ Deprecated and removed features, and other changes affecting compatibility: cache can still be disable per-application using tunables (glibc.malloc.tcache_count set to zero). +* The configure option --enable-tunables has been removed. The tunable + feature is now always enabled. + Changes to build and runtime requirements: [Add changes to build and runtime requirements here] diff --git a/config.h.in b/config.h.in index 09730d9d52..c87008b6a9 100644 --- a/config.h.in +++ b/config.h.in @@ -271,9 +271,6 @@ /* PowerPC32 uses fctidz for floating point to long long conversions. */ #define HAVE_PPC_FCTIDZ 0 -/* Build glibc with tunables support. */ -#define HAVE_TUNABLES 0 - /* Define if PIE is unsupported. */ #undef PIE_UNSUPPORTED diff --git a/config.make.in b/config.make.in index dce93ecf73..4afd37feaf 100644 --- a/config.make.in +++ b/config.make.in @@ -93,7 +93,6 @@ build-nscd = @build_nscd@ use-nscd = @use_nscd@ build-hardcoded-path-in-tests= @hardcoded_path_in_tests@ build-pt-chown = @build_pt_chown@ -have-tunables = @have_tunables@ pthread-in-libc = @pthread_in_libc@ # Build tools. @@ -664,7 +664,6 @@ INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM base_machine -have_tunables build_pt_chown build_nscd libc_cv_static_nss_crypt @@ -780,7 +779,6 @@ enable_systemtap enable_build_nscd enable_nscd enable_pt_chown -enable_tunables enable_mathvec enable_cet enable_scv @@ -1448,8 +1446,6 @@ Optional Features: --disable-build-nscd disable building and installing the nscd daemon --disable-nscd library functions will not contact the nscd daemon --enable-pt_chown Enable building and installing pt_chown - --enable-tunables Enable tunables support. Known values are 'yes', - 'no' and 'valstring' --enable-mathvec Enable building and installing mathvec [default depends on architecture] --enable-cet enable Intel Control-flow Enforcement Technology @@ -3658,19 +3654,6 @@ if test "$build_pt_chown" = yes; then fi -# Check whether --enable-tunables was given. -if test "${enable_tunables+set}" = set; then : - enableval=$enable_tunables; have_tunables=$enableval -else - have_tunables=yes -fi - - -if test "$have_tunables" = yes; then - $as_echo "#define HAVE_TUNABLES 1" >>confdefs.h - -fi - # The abi-tags file uses a fairly simplistic model for name recognition that # can't distinguish i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a # $host_os of `gnu*' here to be `gnu-gnu*' just so that it can tell. diff --git a/configure.ac b/configure.ac index 48ca0d3707..88df3e5eed 100644 --- a/configure.ac +++ b/configure.ac @@ -427,16 +427,6 @@ if test "$build_pt_chown" = yes; then AC_DEFINE(HAVE_PT_CHOWN) fi -AC_ARG_ENABLE([tunables], - [AS_HELP_STRING([--enable-tunables], - [Enable tunables support. Known values are 'yes', 'no' and 'valstring'])], - [have_tunables=$enableval], - [have_tunables=yes]) -AC_SUBST(have_tunables) -if test "$have_tunables" = yes; then - AC_DEFINE(HAVE_TUNABLES) -fi - # The abi-tags file uses a fairly simplistic model for name recognition that # can't distinguish i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a # $host_os of `gnu*' here to be `gnu-gnu*' just so that it can tell. diff --git a/elf/Makefile b/elf/Makefile index 8cf46ba782..396ec51424 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -82,6 +82,7 @@ dl-routines = \ dl-tls \ dl-tls_init_tp \ dl-trampoline \ + dl-tunables \ dl-version \ dl-write \ # dl-routines @@ -90,11 +91,6 @@ ifeq (yes,$(use-ldconfig)) dl-routines += dl-cache endif -ifneq (no,$(have-tunables)) -dl-routines += dl-tunables -tunables-type = $(addprefix TUNABLES_FRONTEND_,$(have-tunables)) -CPPFLAGS-dl-tunables.c += -DTUNABLES_FRONTEND=$(tunables-type) - ifeq (yesyes,$(build-shared)$(run-built-tests)) tests-special += $(objpfx)list-tunables.out endif @@ -104,7 +100,6 @@ endif ifeq (yes,$(have-loop-to-function)) CFLAGS-dl-tunables.c += -fno-tree-loop-distribute-patterns endif -endif all-dl-routines = $(dl-routines) $(sysdep-dl-routines) # But they are absent from the shared libc, because that code is in ld.so. @@ -1173,7 +1168,6 @@ postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \ $(objpfx)/dso-sort-tests-2.generated-makefile # Generate from each testcase description file -ifeq (yes,$(have-tunables)) $(eval $(call include_dsosort_tests,dso-sort-tests-1.def)) $(eval $(call include_dsosort_tests,dso-sort-tests-2.def)) @@ -1181,7 +1175,6 @@ $(eval $(call include_dsosort_tests,dso-sort-tests-2.def)) LDFLAGS-tst-bz15311-b.so += -Wl,-z,lazy LDFLAGS-tst-bz15311-c.so += -Wl,-z,lazy LDFLAGS-tst-bz15311-d.so += -Wl,-z,lazy -endif check-abi: $(objpfx)check-abi-ld.out \ $(objpfx)check-abi-version-libc.out diff --git a/elf/dl-cache.c b/elf/dl-cache.c index 07c054b11a..631286832d 100644 --- a/elf/dl-cache.c +++ b/elf/dl-cache.c @@ -205,7 +205,7 @@ search_cache (const char *string_table, uint32_t string_table_size, uint64_t platform = _dl_string_platform (GLRO (dl_platform)); if (platform != (uint64_t) -1) platform = 1ULL << platform; - uint64_t hwcap_mask = GET_HWCAP_MASK (); + uint64_t hwcap_mask = TUNABLE_GET (glibc, cpu, hwcap_mask, uint64_t, NULL); #define _DL_HWCAP_TLS_MASK (1LL << 63) uint64_t hwcap_exclude = ~((GLRO (dl_hwcap) & hwcap_mask) | _DL_HWCAP_PLATFORM | _DL_HWCAP_TLS_MASK); diff --git a/elf/dl-hwcaps.h b/elf/dl-hwcaps.h index abe6aaf7c5..3012ebf2b4 100644 --- a/elf/dl-hwcaps.h +++ b/elf/dl-hwcaps.h @@ -24,17 +24,6 @@ #include <elf/dl-tunables.h> -#if HAVE_TUNABLES -# define GET_HWCAP_MASK() TUNABLE_GET (glibc, cpu, hwcap_mask, uint64_t, NULL) -#else -# ifdef SHARED -# define GET_HWCAP_MASK() GLRO(dl_hwcap_mask) -# else -/* HWCAP_MASK is ignored in static binaries when built without tunables. */ -# define GET_HWCAP_MASK() (0) -# endif -#endif - #define GLIBC_HWCAPS_SUBDIRECTORY "glibc-hwcaps" #define GLIBC_HWCAPS_PREFIX GLIBC_HWCAPS_SUBDIRECTORY "/" diff --git a/elf/dl-sort-maps.c b/elf/dl-sort-maps.c index 325e96388e..5616c8a6a3 100644 --- a/elf/dl-sort-maps.c +++ b/elf/dl-sort-maps.c @@ -121,11 +121,6 @@ _dl_sort_maps_original (struct link_map **maps, unsigned int nmaps, } } -#if !HAVE_TUNABLES -/* In this case, just default to the original algorithm. */ -strong_alias (_dl_sort_maps_original, _dl_sort_maps); -#else - /* We use a recursive function due to its better clarity and ease of implementation, as well as faster execution speed. We already use alloca() for list allocation during the breadth-first search of @@ -314,5 +309,3 @@ _dl_sort_maps (struct link_map **maps, unsigned int nmaps, else _dl_sort_maps_dfs (maps, nmaps, force_first, for_fini); } - -#endif /* HAVE_TUNABLES. */ diff --git a/elf/dl-support.c b/elf/dl-support.c index d2519ce1a9..322599916f 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -168,16 +168,6 @@ enum dso_sort_algorithm _dl_dso_sort_algo; /* The value of the FPU control word the kernel will preset in hardware. */ fpu_control_t _dl_fpu_control = _FPU_DEFAULT; -#if !HAVE_TUNABLES -/* This is not initialized to HWCAP_IMPORTANT, matching the definition - of _dl_important_hwcaps, below, where no hwcap strings are ever - used. This mask is still used to mediate the lookups in the cache - file. Since there is no way to set this nonzero (we don't grok the - LD_HWCAP_MASK environment variable here), there is no real point in - setting _dl_hwcap nonzero below, but we do anyway. */ -uint64_t _dl_hwcap_mask; -#endif - /* Prevailing state of the stack. Generally this includes PF_X, indicating it's * executable but this isn't true for all platforms. */ ElfW(Word) _dl_stack_flags = DEFAULT_STACK_PERMS; @@ -328,11 +318,6 @@ _dl_non_dynamic_init (void) __unsetenv (cp); cp = strchr (cp, '\0') + 1; } - -#if !HAVE_TUNABLES - if (__access ("/etc/suid-debug", F_OK) != 0) - __unsetenv ("MALLOC_CHECK_"); -#endif } #ifdef DL_PLATFORM_INIT diff --git a/elf/dl-tls.c b/elf/dl-tls.c index 8943a3b4ae..4ef7bc3f1e 100644 --- a/elf/dl-tls.c +++ b/elf/dl-tls.c @@ -97,14 +97,8 @@ _dl_tls_static_surplus_init (size_t naudit) { size_t nns, opt_tls; -#if HAVE_TUNABLES nns = TUNABLE_GET (nns, size_t, NULL); opt_tls = TUNABLE_GET (optional_static_tls, size_t, NULL); -#else - /* Default values of the tunables. */ - nns = DEFAULT_NNS; - opt_tls = OPTIONAL_TLS; -#endif if (nns > DL_NNS) nns = DL_NNS; if (DL_NNS - nns < naudit) diff --git a/elf/dl-tunables.c b/elf/dl-tunables.c index 327b9eb52f..62b7332d95 100644 --- a/elf/dl-tunables.c +++ b/elf/dl-tunables.c @@ -38,11 +38,6 @@ #include <not-errno.h> -#if TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring -# define GLIBC_TUNABLES "GLIBC_TUNABLES" -#endif - -#if TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring static char * tunables_strdup (const char *in) { @@ -62,7 +57,6 @@ tunables_strdup (const char *in) return out; } -#endif static char ** get_next_env (char **envp, char **name, size_t *namelen, char **val, @@ -160,7 +154,6 @@ __tunable_set_val (tunable_id_t id, tunable_val_t *valp, tunable_num_t *minp, do_tunable_update_val (cur, valp, minp, maxp); } -#if TUNABLES_FRONTEND == TUNABLES_FRONTEND_valstring /* Parse the tunable string TUNESTR and adjust it to drop any tunables that may be unsafe for AT_SECURE processes so that it can be used as the new |
