diff mbox

explicit_bzero final

Message ID e4278331-45fb-87ab-fd8b-fa015306aa33@redhat.com
State New
Headers show

Commit Message

Florian Weimer Dec. 14, 2016, 5:05 p.m. UTC
On 12/14/2016 02:15 PM, Florian Weimer wrote:
> On 12/14/2016 02:04 AM, Zack Weinberg wrote:

>> We also have a nasty interaction between internal PLT bypass and

>> ifuncs which means that a hypothetical __explicit_bzero_chk is

>> ridiculously difficult to implement.  I tried that once already and it

>> did not go well.

>

> I'm looking into this aspect right now.


This patch on top of yours implements proper explict_bzero and 
__explicit_bzero_chk symbols.  I put it through build-many-glibcs, and 
it results in the expected ABI everywhere.

The attached patch also fixes the compiler barrier, and removes some 
unnecessary conditionals from include/string.h (because we know that a 
current GCC is used for compiling glibc itself, so checking for that in 
an internal header does not make sense).

It is up to the architecture maintainers to add optimized 
implementations.  For explicit_bzero, this is often quite 
straightforward because many architectures already have an optimized 
bzero, and explicit_bzero can just be an alias.  But there is no 
__bzero_chk.  IFUNC is transitive: if something is an IFUNC, all callers 
in libc.so have to be an IFUNC, too.  Implementing __bzero_chk on top of 
__memset_chk requires a tiny bit of argument adjustment, but in 
practice, this means that all memset implementations need to be 
duplicated, and a new IFUNC resolver has to be added.

Nevertheless, I think this is the way to proceed.

Thanks,
Florian

Comments

Joseph Myers Dec. 14, 2016, 10:37 p.m. UTC | #1
On Wed, 14 Dec 2016, Zack Weinberg wrote:

> This file is not in sysdeps/generic, so it cannot be overridden (or is

> that no longer the case? If so, why do we still have sysdeps/generic?)


Files outside sysdeps/generic can be overridden.

Internal headers used from more than one directory and also overridden by 
some configurations belong in sysdeps/generic: include/ comes before 
sysdeps so isn't suitable for headers that get overridden, while if the 
header is in some other directory it's not visible for compilations within 
another directory.  There may be other cases that need to be in 
sysdeps/generic as well.

-- 
Joseph S. Myers
joseph@codesourcery.com
Florian Weimer Dec. 15, 2016, 9:08 a.m. UTC | #2
On 12/14/2016 11:28 PM, Zack Weinberg wrote:

> The remaining question in my mind is whether, in the case where a

> variable's address is only taken in a call to explicit_bzero, we

> should give up on the "hack to prevent the data being copied to

> memory" for the sake of hypothetical future GCC support.  That hack, I

> remind you, is the inline expansion to memset+__glibc_read_memory.  We

> made a huge fuss over that case in the manual, and a couple of people

> were prepared to veto explicit_bzero altogether if we didn't do

> something about it.


Those people were mistaken.  I can't see how you can prevent DSE on 
scalars with current GCC.  I gave that example to show that compiler 
support was needed to implement memset_s (or a full implementation of 
explicit_zero).  It was never intended as something that is particularly 
relevant to real-world code.

> I am very reluctant to give it up, especially as

> I'm still not convinced it's a problem for the compiler (see reply to

> Jeff).


It's a problem because its semantics are not defined in any sensible 
way.  Even explicit_bzero is impossible to specify properly in C 
standardese due to lack of an observable effect on the language level 
(and so is memset_s), but at least it's reasonably obvious what is 
intended.  Instead of your tracking idea, GCC could just clear all stack 
memory and callee-saved registers upon exit from a function which calls 
explicit_bzero.  It's still an approximation, but any implementation 
retrofitted on an existing compiler will be.
	
> -#ifdef _LIBC

>    /*

>     * Erase key-dependent intermediate data.  Data dependent only on

>     * the salt is not considered sensitive.

>     */

> -  __explicit_bzero (ktab, sizeof (ktab));

> -  __explicit_bzero (data->keysched, sizeof (data->keysched));

> -  __explicit_bzero (res, sizeof (res));

> -#endif

> +  explicit_bzero (ktab, sizeof (ktab));

> +  explicit_bzero (data->keysched, sizeof (data->keysched));

> +  explicit_bzero (res, sizeof (res));

>

> The _LIBC ifdeffage is vestigial, but should probably be left alone in

> a patch that isn't about that.


Huh?  I think it's a new addition.

> +/* This is the generic definition of __explicit_bzero_chk.  The

> +   __explicit_bzero_chk symbol is used as the implementation of

> +   explicit_bzero throughout glibc.  If this file is overriden by an

> +   architecture, both __explicit_bzero_chk and

> +   __explicit_bzero_chk_internal have to be defined (the latter not as

> +   an IFUNC).  */

>

> This file is not in sysdeps/generic, so it cannot be overridden (or is

> that no longer the case? If so, why do we still have sysdeps/generic?)

> and I don't think we need the capability to override it.  Better we

> should get libc-internal references to memset going to the proper ifunc

> for the architecture.


It can be overridden, and it has to be, otherwise you end up with 
multiple definitions of the same symbol when linking libc.so.

Two symbols are needed because on some architectures, hidden references 
to IFUNC symbols are not supported because calls to hidden functions are 
always direct and do not use the GOT.

> +  /* Compiler barrier.  */

> +  asm volatile ("" ::: "memory");

> +}

>

> I do not understand why you have reverted to an older, inferior

> compiler barrier.  This was extensively hashed out quite some time ago.


I did that because asm volatile ("") is essentially a NOP in this 
context.  It certainly does not prevent DSE of the preceding memset.  In 
contrast, the memory clobber ensures that if the thing-to-be-zeroed is 
in memory.

> Oh, I see why you're not getting linknamespace failures from the

> libcrypt change: you've implicitly fortified all those calls, which

> has the side effect of making them use an impl-namespace symbol.  It

> makes sense as a testing strategy, but it doesn't feel like the right

> move for the committed patch (better to leave that to an all-or-nothing

> "fortify libc internally" switch, ne?)


I have no firm opinion on that.  It avoids adding another GLIBC_PRIVATE 
symbol, and I think the current set of symbols is also compatible with 
future IFUNC-based optimizations.

> What we _could_ do is

>

> #if IS_IN (libc)

> # define explicit_bzero(s, n) __internal_explicit_bzero (s, n)

> #else

> # define explicit_bzero(s, n) __explicit_bzero (s, n)

> #endif

>

> which would allow libcrypt's source code to use the unmangled names.

> I think that's something we're trying to do for other string

> functions, so perhaps it makes sense.


Other string functions use asm aliases, which also apply to GCC built-ins.

Thanks,
Florian
Florian Weimer Dec. 15, 2016, 10:20 a.m. UTC | #3
On 12/15/2016 10:08 AM, Florian Weimer wrote:
> It's a problem because its semantics are not defined in any sensible

> way.  Even explicit_bzero is impossible to specify properly in C

> standardese due to lack of an observable effect on the language level

> (and so is memset_s), but at least it's reasonably obvious what is

> intended.  Instead of your tracking idea, GCC could just clear all stack

> memory and callee-saved registers upon exit from a function which calls

> explicit_bzero.  It's still an approximation, but any implementation

> retrofitted on an existing compiler will be.


I meant “caller-saved registers”, of course.

Florian
Zack Weinberg Dec. 15, 2016, 11:31 p.m. UTC | #4
On 12/15/2016 04:08 AM, Florian Weimer wrote:
> On 12/14/2016 11:28 PM, Zack Weinberg wrote:

> 

>> The remaining question in my mind is whether, in the case where a

>> variable's address is only taken in a call to explicit_bzero, we

>> should give up on the "hack to prevent the data being copied to

>> memory" for the sake of hypothetical future GCC support.  That hack, I

>> remind you, is the inline expansion to memset+__glibc_read_memory.  We

>> made a huge fuss over that case in the manual, and a couple of people

>> were prepared to veto explicit_bzero altogether if we didn't do

>> something about it.

> 

> Those people were mistaken.  I can't see how you can prevent DSE on

> scalars with current GCC.  I gave that example to show that compiler

> support was needed to implement memset_s (or a full implementation of

> explicit_zero).  It was never intended as something that is particularly

> relevant to real-world code.


Hmm, OK.  I'm going to send a new patch which merges yours and mine and
adjusts the manual accordingly.  I really want to get this landed
tomorrow, before I go out of town -- otherwise it's going to miss 2.25,
and this has been dragging on _quite_ long enough.

>> -#ifdef _LIBC

>>    /*

>>     * Erase key-dependent intermediate data.  Data dependent only on

>>     * the salt is not considered sensitive.

>>     */

>> -  __explicit_bzero (ktab, sizeof (ktab));

>> -  __explicit_bzero (data->keysched, sizeof (data->keysched));

>> -  __explicit_bzero (res, sizeof (res));

>> -#endif

>> +  explicit_bzero (ktab, sizeof (ktab));

>> +  explicit_bzero (data->keysched, sizeof (data->keysched));

>> +  explicit_bzero (res, sizeof (res));

>>

>> The _LIBC ifdeffage is vestigial, but should probably be left alone in

>> a patch that isn't about that.

> 

> Huh?  I think it's a new addition.


Oh, huh, you're right.  I don't remember why I did that.  Certainly
nobody's gonna be merging this back with UFC, so it can go.

>> +/* This is the generic definition of __explicit_bzero_chk.  The

>> +   __explicit_bzero_chk symbol is used as the implementation of

>> +   explicit_bzero throughout glibc.  If this file is overriden by an

>> +   architecture, both __explicit_bzero_chk and

>> +   __explicit_bzero_chk_internal have to be defined (the latter not as

>> +   an IFUNC).  */

>>

>> This file is not in sysdeps/generic, so it cannot be overridden (or is

>> that no longer the case? If so, why do we still have sysdeps/generic?)

>> and I don't think we need the capability to override it.  Better we

>> should get libc-internal references to memset going to the proper ifunc

>> for the architecture.

> 

> It can be overridden, and it has to be, otherwise you end up with

> multiple definitions of the same symbol when linking libc.so.


??? Your patch doesn't have any overrides of it.

> Two symbols are needed because on some architectures, hidden references

> to IFUNC symbols are not supported because calls to hidden functions are

> always direct and do not use the GOT.


Right, I remember that this was a problem before.

>> +  /* Compiler barrier.  */

>> +  asm volatile ("" ::: "memory");

>> +}

>>

>> I do not understand why you have reverted to an older, inferior

>> compiler barrier.  This was extensively hashed out quite some time ago.

> 

> I did that because asm volatile ("") is essentially a NOP in this

> context.  It certainly does not prevent DSE of the preceding memset.  In

> contrast, the memory clobber ensures that if the thing-to-be-zeroed is

> in memory.


I meant as opposed to the out-of-line __glibc_read_memory.  I suppose an
all-memory clobber is not going to generate worse code than that as long
as explicit_bzero.c remains separately compiled, and it's less likely to
break (but _will_ generate worse code) if LTO-into-glibc happens before
compiler support for explicit_bzero, so I can live with it.

>> Oh, I see why you're not getting linknamespace failures from the

>> libcrypt change: you've implicitly fortified all those calls, which

>> has the side effect of making them use an impl-namespace symbol.  It

>> makes sense as a testing strategy, but it doesn't feel like the right

>> move for the committed patch (better to leave that to an all-or-nothing

>> "fortify libc internally" switch, ne?)

> 

> I have no firm opinion on that.  It avoids adding another GLIBC_PRIVATE

> symbol, and I think the current set of symbols is also compatible with

> future IFUNC-based optimizations.


I think I'm going to leave it your way, both because it'll get the patch
done faster, and because the crypt code is awfully dusty and not at all
performance-critical.

zw
Florian Weimer Dec. 16, 2016, 7:50 a.m. UTC | #5
On 12/16/2016 12:31 AM, Zack Weinberg wrote:
>>> +/* This is the generic definition of __explicit_bzero_chk.  The

>>> +   __explicit_bzero_chk symbol is used as the implementation of

>>> +   explicit_bzero throughout glibc.  If this file is overriden by an

>>> +   architecture, both __explicit_bzero_chk and

>>> +   __explicit_bzero_chk_internal have to be defined (the latter not as

>>> +   an IFUNC).  */

>>>

>>> This file is not in sysdeps/generic, so it cannot be overridden (or is

>>> that no longer the case? If so, why do we still have sysdeps/generic?)

>>> and I don't think we need the capability to override it.  Better we

>>> should get libc-internal references to memset going to the proper ifunc

>>> for the architecture.

>> It can be overridden, and it has to be, otherwise you end up with

>> multiple definitions of the same symbol when linking libc.so.

> ??? Your patch doesn't have any overrides of it.


I meant it has to be overridden if you want to introduce 
architecture-specific implementations of explicit_bzero.  The patch 
doesn't contain any, but should be compatible with future development.

Due the transitive nature of IFUNCs and the desire to avoid indirect 
calls, all memset/__memset_chk variants need an 
explicit_bzero/__explicit_bzero_chk wrapper, so this is quite involved.

Thanks,
Florian
diff mbox

Patch

diff --git a/crypt/crypt-entry.c b/crypt/crypt-entry.c
index 2d72691..23e776f 100644
--- a/crypt/crypt-entry.c
+++ b/crypt/crypt-entry.c
@@ -142,15 +142,13 @@  __crypt_r (const char *key, const char *salt,
    */
   _ufc_output_conversion_r (res[0], res[1], salt, data);
 
-#ifdef _LIBC
   /*
    * Erase key-dependent intermediate data.  Data dependent only on
    * the salt is not considered sensitive.
    */
-  __explicit_bzero (ktab, sizeof (ktab));
-  __explicit_bzero (data->keysched, sizeof (data->keysched));
-  __explicit_bzero (res, sizeof (res));
-#endif
+  explicit_bzero (ktab, sizeof (ktab));
+  explicit_bzero (data->keysched, sizeof (data->keysched));
+  explicit_bzero (res, sizeof (res));
 
   return data->crypt_3_buf;
 }
diff --git a/crypt/md5-crypt.c b/crypt/md5-crypt.c
index 617ccd3..6125c7f 100644
--- a/crypt/md5-crypt.c
+++ b/crypt/md5-crypt.c
@@ -288,13 +288,13 @@  __md5_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
 #ifndef USE_NSS
   __md5_init_ctx (&ctx);
   __md5_finish_ctx (&ctx, alt_result);
-  __explicit_bzero (&ctx, sizeof (ctx));
-  __explicit_bzero (&alt_ctx, sizeof (alt_ctx));
+  explicit_bzero (&ctx, sizeof (ctx));
+  explicit_bzero (&alt_ctx, sizeof (alt_ctx));
 #endif
   if (copied_key != NULL)
-    __explicit_bzero (copied_key, key_len);
+    explicit_bzero (copied_key, key_len);
   if (copied_salt != NULL)
-    __explicit_bzero (copied_salt, salt_len);
+    explicit_bzero (copied_salt, salt_len);
 
   free (free_key);
   return buffer;
diff --git a/crypt/sha256-crypt.c b/crypt/sha256-crypt.c
index 53f00c0..8c670ea 100644
--- a/crypt/sha256-crypt.c
+++ b/crypt/sha256-crypt.c
@@ -371,16 +371,16 @@  __sha256_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
 #ifndef USE_NSS
   __sha256_init_ctx (&ctx);
   __sha256_finish_ctx (&ctx, alt_result);
-  __explicit_bzero (&ctx, sizeof (ctx));
-  __explicit_bzero (&alt_ctx, sizeof (alt_ctx));
+  explicit_bzero (&ctx, sizeof (ctx));
+  explicit_bzero (&alt_ctx, sizeof (alt_ctx));
 #endif
-  __explicit_bzero (temp_result, sizeof (temp_result));
-  __explicit_bzero (p_bytes, key_len);
-  __explicit_bzero (s_bytes, salt_len);
+  explicit_bzero (temp_result, sizeof (temp_result));
+  explicit_bzero (p_bytes, key_len);
+  explicit_bzero (s_bytes, salt_len);
   if (copied_key != NULL)
-    __explicit_bzero (copied_key, key_len);
+    explicit_bzero (copied_key, key_len);
   if (copied_salt != NULL)
-    __explicit_bzero (copied_salt, salt_len);
+    explicit_bzero (copied_salt, salt_len);
 
   free (free_key);
   free (free_pbytes);
diff --git a/crypt/sha512-crypt.c b/crypt/sha512-crypt.c
index 86b6354..dac145b 100644
--- a/crypt/sha512-crypt.c
+++ b/crypt/sha512-crypt.c
@@ -393,16 +393,16 @@  __sha512_crypt_r (const char *key, const char *salt, char *buffer, int buflen)
 #ifndef USE_NSS
   __sha512_init_ctx (&ctx);
   __sha512_finish_ctx (&ctx, alt_result);
-  __explicit_bzero (&ctx, sizeof (ctx));
-  __explicit_bzero (&alt_ctx, sizeof (alt_ctx));
+  explicit_bzero (&ctx, sizeof (ctx));
+  explicit_bzero (&alt_ctx, sizeof (alt_ctx));
 #endif
-  __explicit_bzero (temp_result, sizeof (temp_result));
-  __explicit_bzero (p_bytes, key_len);
-  __explicit_bzero (s_bytes, salt_len);
+  explicit_bzero (temp_result, sizeof (temp_result));
+  explicit_bzero (p_bytes, key_len);
+  explicit_bzero (s_bytes, salt_len);
   if (copied_key != NULL)
-    __explicit_bzero (copied_key, key_len);
+    explicit_bzero (copied_key, key_len);
   if (copied_salt != NULL)
-    __explicit_bzero (copied_salt, salt_len);
+    explicit_bzero (copied_salt, salt_len);
 
   free (free_key);
   free (free_pbytes);
diff --git a/debug/Makefile b/debug/Makefile
index 6b5f31e..84d3f92 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -48,6 +48,7 @@  routines  = backtrace backtracesyms backtracesymsfd noophooks \
 	    vdprintf_chk obprintf_chk \
 	    longjmp_chk ____longjmp_chk \
 	    fdelt_chk poll_chk ppoll_chk \
+	    explicit_bzero_chk \
 	    stack_chk_fail fortify_fail \
 	    $(static-only-routines)
 static-only-routines := warning-nop stack_chk_fail_local
diff --git a/debug/Versions b/debug/Versions
index 0482c85..a6628db 100644
--- a/debug/Versions
+++ b/debug/Versions
@@ -55,6 +55,9 @@  libc {
   GLIBC_2.16 {
     __poll_chk; __ppoll_chk;
   }
+  GLIBC_2.25 {
+    __explicit_bzero_chk;
+  }
   GLIBC_PRIVATE {
     __fortify_fail;
   }
diff --git a/debug/explicit_bzero_chk.c b/debug/explicit_bzero_chk.c
new file mode 100644
index 0000000..2e507f8
--- /dev/null
+++ b/debug/explicit_bzero_chk.c
@@ -0,0 +1,44 @@ 
+/* Generic implementation of __explicit_bzero_chk.
+   Copyright (C) 1991-2016 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Torbjorn Granlund (tege@sics.se).
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <http://www.gnu.org/licenses/>.  */
+
+/* This is the generic definition of __explicit_bzero_chk.  The
+   __explicit_bzero_chk symbol is used as the implementation of
+   explicit_bzero throughout glibc.  If this file is overriden by an
+   architecture, both __explicit_bzero_chk and
+   __explicit_bzero_chk_internal have to be defined (the latter not as
+   an IFUNC).  */
+
+#include <string.h>
+
+void
+__explicit_bzero_chk (void *dst, size_t len, size_t dstlen)
+{
+  /* Inline __memset_chk to avoid a PLT reference to __memset_chk.  */
+  if (__glibc_unlikely (dstlen < len))
+    __chk_fail ();
+  memset (dst, '\0', len);
+  /* Compiler barrier.  */
+  asm volatile ("" ::: "memory");
+}
+
+/* libc-internal references use the hidden
+   __explicit_bzero_chk_internal symbol.  This is necessary if
+   __explicit_bzero_chk is implemented as an IFUNC because some
+   targets do not support hidden references to IFUNC symbols.  */
+strong_alias (__explicit_bzero_chk, __explicit_bzero_chk_internal)
diff --git a/include/string.h b/include/string.h
index 56d02de..300a2e2 100644
--- a/include/string.h
+++ b/include/string.h
@@ -100,20 +100,15 @@  extern __typeof (memmem) __memmem;
 libc_hidden_proto (__memmem)
 libc_hidden_proto (__ffs)
 
-/* explicit_bzero is used in libcrypt.  */
-extern __typeof (explicit_bzero) __explicit_bzero;
-extern __typeof (explicit_bzero) __internal_explicit_bzero;
-libc_hidden_proto (__internal_explicit_bzero)
-extern __typeof (__glibc_read_memory) __internal_glibc_read_memory;
-libc_hidden_proto (__internal_glibc_read_memory)
-/* Honor string.h inlines when present.  */
-#if __GNUC_PREREQ (3,4)							\
-  && ((defined __extern_always_inline					\
-       && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__		\
-       && !defined __NO_INLINE__ && !defined __NO_STRING_INLINES)	\
-      || (__USE_FORTIFY_LEVEL > 0 && defined __fortify_function))
-# define __explicit_bzero(s,n) explicit_bzero (s,n)
-# define __internal_explicit_bzero(s,n) explicit_bzero (s,n)
+#if IS_IN (libc)
+/* Avoid hidden reference to IFUNC symbol __explicit_bzero_chk.  */
+void __explicit_bzero_chk_internal (void *, size_t, size_t)
+  __THROW __nonnull ((1)) attribute_hidden;
+# define explicit_bzero(buf, len) \
+  __explicit_bzero_chk_internal (buf, len, __bos0 (buf))
+#elif !IS_IN (nonlib)
+void __explicit_bzero_chk (void *, size_t, size_t) __THROW __nonnull ((1));
+# define explicit_bzero(buf, len) __explicit_bzero_chk (buf, len, __bos0 (buf))
 #endif
 
 libc_hidden_builtin_proto (memchr)
diff --git a/string/Makefile b/string/Makefile
index 0b6486e..9a8b46d 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -43,11 +43,6 @@  routines	:= strcat strchr strcmp strcoll strcpy strcspn		\
 		   strcoll_l strxfrm_l string-inlines memrchr		\
 		   xpg-strerror strerror_l explicit_bzero
 
-# Attention future hackers trying to enable link-time optimization for
-# glibc: this file *must not* be subject to LTO.  It is added separately
-# to 'routines' to document this.  See comments in this file for details.
-routines	+= read_memory
-
 strop-tests	:= memchr memcmp memcpy memmove mempcpy memset memccpy	\
 		   stpcpy stpncpy strcat strchr strcmp strcpy strcspn	\
 		   strlen strncmp strncpy strpbrk strrchr strspn memmem	\
diff --git a/string/Versions b/string/Versions
index 73bb1cb..9b709d1 100644
--- a/string/Versions
+++ b/string/Versions
@@ -83,14 +83,6 @@  libc {
   GLIBC_2.24 {
   }
   GLIBC_2.25 {
-    # used by inlines in string.h and bits/string3.h
-    __glibc_read_memory;
-
-    # e*
     explicit_bzero;
   }
-  GLIBC_PRIVATE {
-    # used by libcrypt
-    __explicit_bzero;
-  }
 }
diff --git a/string/bits/string3.h b/string/bits/string3.h
index c1fcbd9..940c8d8 100644
--- a/string/bits/string3.h
+++ b/string/bits/string3.h
@@ -103,11 +103,13 @@  __NTH (bzero (void *__dest, size_t __len))
   (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
 }
 
+void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
+  __THROW __nonnull ((1));
+
 __fortify_function void
 __NTH (explicit_bzero (void *__dest, size_t __len))
 {
-  (void) __builtin___memset_chk (__dest, '\0', __len, __bos0 (__dest));
-  __glibc_read_memory (__dest, __len);
+  __explicit_bzero_chk (__dest, __len, __bos0 (__dest));
 }
 #endif
 
diff --git a/string/explicit_bzero.c b/string/explicit_bzero.c
index 571595d..6712cad 100644
--- a/string/explicit_bzero.c
+++ b/string/explicit_bzero.c
@@ -1,4 +1,4 @@ 
-/* Erasure of sensitive data.
+/* Erasure of sensitive data, generic implementation.
    Copyright (C) 2016 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -16,19 +16,23 @@ 
    License along with the GNU C Library; if not, see
    <http://www.gnu.org/licenses/>.  */
 
-#include <features.h>
-#undef __USE_STRING_INLINES
-#define __NO_STRING_INLINES
+/* An assembler implementation of explicit_bzero can be created as an
+   assembler alias of an optimized bzero implementation.
+   Architecture-specific implementations also need to define
+   __explicit_bzero_chk.  */
+
 #include <string.h>
 
+/* glibc-internal users use __explicit_bzero_chk, and explicit_bzero
+   redirects to that.  */
+#undef explicit_bzero
+
 /* Set LEN bytes of S to 0.  The compiler will not delete a call to
    this function, even if S is dead after the call.  */
 void
-__internal_explicit_bzero (void *s, size_t len)
+explicit_bzero (void *s, size_t len)
 {
   memset (s, '\0', len);
-  __internal_glibc_read_memory (s, len);
+  /* Compiler barrier.  */
+  asm volatile ("" ::: "memory");
 }
-libc_hidden_def (__internal_explicit_bzero)
-strong_alias (__internal_explicit_bzero, __explicit_bzero)
-weak_alias (__internal_explicit_bzero, explicit_bzero)
diff --git a/string/read_memory.c b/string/read_memory.c
deleted file mode 100644
index 8e08a46..0000000
--- a/string/read_memory.c
+++ /dev/null
@@ -1,47 +0,0 @@ 
-/* "Read" a range of memory, from the caller's perspective.
-   Copyright (C) 2016 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, see
-   <http://www.gnu.org/licenses/>.  */
-
-#include <string.h>
-
-/* This function is an optimization fence.  It doesn't do anything,
-   but the compiler doesn't know that, and must assume that it reads
-   the block of memory pointed to by S and extending for LEN bytes.
-   This prevents any earlier write to that memory from being optimized
-   away.  For instance, explicit_bzero uses this function to ensure
-   that its erasure of a piece of sensitive data is preserved.
-
-   In order to achieve the desired effect, this function must never,
-   under any circumstances, be inlined or subjected to inter-
-   procedural optimization.  string.h declares this function with
-   attributes that, in conjunction with the no-op asm insert, are
-   sufficient to prevent problems in the current (2016) generation of
-   compilers, but *only if* this file is *not* compiled with -flto.
-   At present, this is not an issue since glibc is never compiled with
-   -flto, but should that ever change, this file must be excepted.
-
-   The 'volatile' below is technically not necessary but is included
-   for explicitness.  */
-
-void
-internal_function
-__internal_glibc_read_memory(const void *s, size_t len)
-{
-  asm volatile ("");
-}
-libc_hidden_def (__internal_glibc_read_memory)
-strong_alias (__internal_glibc_read_memory, __glibc_read_memory)
diff --git a/string/string.h b/string/string.h
index 1ef3310..c398569 100644
--- a/string/string.h
+++ b/string/string.h
@@ -457,24 +457,6 @@  extern void bzero (void *__s, size_t __n) __THROW __nonnull ((1));
    function, even if S is dead after the call.  */
 extern void explicit_bzero (void *__s, size_t __n) __THROW __nonnull ((1));
 
-/* Optimization fence, used by the inline versions of explicit_bzero
-   below and in bits/string3.h.  */
-extern void __glibc_read_memory (const void *__s, size_t __n)
-     __THROW __nonnull ((1)) __attribute_noinline__;
-
-# if __GNUC_PREREQ (3,4) && defined __extern_always_inline	\
-  && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__		\
-  && !defined __NO_INLINE__ && !defined __NO_STRING_INLINES	\
-  && (__USE_FORTIFY_LEVEL == 0 || !defined __fortify_function)
-
-__extern_always_inline void
-__NTH (explicit_bzero (void *__s, size_t __n))
-{
-  memset (__s, '\0', __n);
-  __glibc_read_memory (__s, __n);
-}
-# endif
-
 /* Compare N bytes of S1 and S2 (same as memcmp).  */
 extern int bcmp (const void *__s1, const void *__s2, size_t __n)
      __THROW __attribute_pure__ __nonnull ((1, 2));
diff --git a/string/tst-xbzero-opt.c b/string/tst-xbzero-opt.c
index a777432..312857e 100644
--- a/string/tst-xbzero-opt.c
+++ b/string/tst-xbzero-opt.c
@@ -36,10 +36,7 @@ 
    This implementation instead uses the <ucontext.h> coroutine
    interface.  The coroutine stack is still too small to safely use
    printf, but we know the OS won't erase it, so we can do all the
-   checks and printing from the normal stack.
-
-   If this test begins to fail with a new compiler, investigate
-   whether __glibc_read_memory is still doing its job.  */
+   checks and printing from the normal stack.  */
 
 #define _GNU_SOURCE 1
 
diff --git a/sysdeps/arm/nacl/libc.abilist b/sysdeps/arm/nacl/libc.abilist
index 8583317..abd70c8 100644
--- a/sysdeps/arm/nacl/libc.abilist
+++ b/sysdeps/arm/nacl/libc.abilist
@@ -1843,7 +1843,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/aarch64/libc.abilist b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
index e5bdd21..58d768c 100644
--- a/sysdeps/unix/sysv/linux/aarch64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/aarch64/libc.abilist
@@ -2090,7 +2090,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/alpha/libc.abilist b/sysdeps/unix/sysv/linux/alpha/libc.abilist
index 693a972..906050d 100644
--- a/sysdeps/unix/sysv/linux/alpha/libc.abilist
+++ b/sysdeps/unix/sysv/linux/alpha/libc.abilist
@@ -2001,7 +2001,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/arm/libc.abilist b/sysdeps/unix/sysv/linux/arm/libc.abilist
index 51b2172..66112dd 100644
--- a/sysdeps/unix/sysv/linux/arm/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/libc.abilist
@@ -91,7 +91,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index da8d858..3ddadd2 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -1855,7 +1855,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index ea34f48..977ab90 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2013,7 +2013,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/ia64/libc.abilist b/sysdeps/unix/sysv/linux/ia64/libc.abilist
index df0e999..c7edb9a 100644
--- a/sysdeps/unix/sysv/linux/ia64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/ia64/libc.abilist
@@ -1877,7 +1877,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index f5fda48..450be4e 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -92,7 +92,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 1e5ce20..9e016bd 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -1969,7 +1969,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/microblaze/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/libc.abilist
index 4a2b238..1a455be 100644
--- a/sysdeps/unix/sysv/linux/microblaze/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/libc.abilist
@@ -2090,7 +2090,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index a48d869..8eb5e66 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -1944,7 +1944,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index de591fc..416d9ac 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -1942,7 +1942,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index 673393b..f4949e5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -1940,7 +1940,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
index cfc03d9..c7375ae 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
@@ -1935,7 +1935,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 58d148d..724a0e3 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2131,7 +2131,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 4d6efdd..2dc32b6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -1973,7 +1973,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index a0f8608..5658109 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -1978,7 +1978,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
index a097b1c..c761221 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
@@ -2178,7 +2178,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
index 0e7fac1..265c769 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
@@ -92,7 +92,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index ad93e22..ed1b6bf 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -1973,7 +1973,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
index 7b53df3..2e75d29 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
@@ -1874,7 +1874,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/sh/libc.abilist b/sysdeps/unix/sysv/linux/sh/libc.abilist
index 425ae6c..bd74c0c 100644
--- a/sysdeps/unix/sysv/linux/sh/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/libc.abilist
@@ -1859,7 +1859,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index cad6a47..5584838 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -1965,7 +1965,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
index 55c0ea6..efedbe2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
@@ -1903,7 +1903,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
index b95c3d4..ffd988a 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
index 6fde0c4..f0c13ce 100644
--- a/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
index b95c3d4..ffd988a 100644
--- a/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
+++ b/sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
index 1f77aad..f57004c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
@@ -1854,7 +1854,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
index f528b85..05629e1 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist
@@ -2097,7 +2097,7 @@  GLIBC_2.23 fts64_set F
 GLIBC_2.24 GLIBC_2.24 A
 GLIBC_2.24 quick_exit F
 GLIBC_2.25 GLIBC_2.25 A
-GLIBC_2.25 __glibc_read_memory F
+GLIBC_2.25 __explicit_bzero_chk F
 GLIBC_2.25 explicit_bzero F
 GLIBC_2.25 getentropy F
 GLIBC_2.25 getrandom F