glibc/sysdeps/arm
Zack Weinberg ea1bd74def New string function explicit_bzero (from OpenBSD).
explicit_bzero(s, n) is the same as memset(s, 0, n), except that the
compiler is not allowed to delete a call to explicit_bzero even if the
memory pointed to by 's' is dead after the call.  Right now, this effect
is achieved externally by having explicit_bzero be a function whose
semantics are unknown to the compiler, and internally, with a no-op
asm statement that clobbers memory.  This does mean that small
explicit_bzero operations cannot be expanded inline as small memset
operations can, but on the other hand, small memset operations do get
deleted by the compiler.  Hopefully full compiler support for
explicit_bzero will happen relatively soon.

There are two new tests: test-explicit_bzero.c verifies the
visible semantics in the same way as the existing test-bzero.c,
and tst-xbzero-opt.c verifies the not-being-optimized-out property.
The latter is conceptually based on a test written by Matthew Dempsky
for the OpenBSD regression suite.

The crypt() implementation has an immediate use for this new feature.
We avoid having to add a GLIBC_PRIVATE alias for explicit_bzero
by running all of libcrypt's calls through the fortified variant,
__explicit_bzero_chk, which is in the impl namespace anyway.  Currently
I'm not aware of anything in libc proper that needs this, but the
glue is all in place if it does become necessary.  The legacy DES
implementation wasn't bothering to clear its buffers, so I added that,
mostly for consistency's sake.

	* string/explicit_bzero.c: New routine.
	* string/test-explicit_bzero.c, string/tst-xbzero-opt.c: New tests.
	* string/Makefile (routines, strop-tests, tests): Add them.
	* string/test-memset.c: Add ifdeffage for testing explicit_bzero.
	* string/string.h [__USE_MISC]: Declare explicit_bzero.

	* debug/explicit_bzero_chk.c: New routine.
	* debug/Makefile (routines): Add it.
	* debug/tst-chk1.c: Test fortification of explicit_bzero.
	* string/bits/string3.h: Fortify explicit_bzero.

	* manual/string.texi: Document explicit_bzero.
	* NEWS: Mention addition of explicit_bzero.

	* crypt/crypt-entry.c (__crypt_r): Clear key-dependent intermediate
	data before returning, using explicit_bzero.
	* crypt/md5-crypt.c (__md5_crypt_r): Likewise.
	* crypt/sha256-crypt.c (__sha256_crypt_r): Likewise.
	* crypt/sha512-crypt.c (__sha512_crypt_r): Likewise.

	* include/string.h: Redirect internal uses of explicit_bzero
	to __explicit_bzero_chk[_internal].
	* string/Versions [GLIBC_2.25]: Add explicit_bzero.
	* debug/Versions [GLIBC_2.25]: Add __explicit_bzero_chk.
	* sysdeps/arm/nacl/libc.abilist
	* sysdeps/unix/sysv/linux/aarch64/libc.abilist
	* sysdeps/unix/sysv/linux/alpha/libc.abilist
	* sysdeps/unix/sysv/linux/arm/libc.abilist
	* sysdeps/unix/sysv/linux/hppa/libc.abilist
	* sysdeps/unix/sysv/linux/i386/libc.abilist
	* sysdeps/unix/sysv/linux/ia64/libc.abilist
	* sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
	* sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
	* sysdeps/unix/sysv/linux/microblaze/libc.abilist
	* sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
	* sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
	* sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
	* sysdeps/unix/sysv/linux/mips/mips64/n64/libc.abilist
	* sysdeps/unix/sysv/linux/nios2/libc.abilist
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
	* sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc-le.abilist
	* sysdeps/unix/sysv/linux/powerpc/powerpc64/libc.abilist
	* sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
	* sysdeps/unix/sysv/linux/s390/s390-64/libc.abilist
	* sysdeps/unix/sysv/linux/sh/libc.abilist
	* sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
	* sysdeps/unix/sysv/linux/sparc/sparc64/libc.abilist
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx32/libc.abilist
	* sysdeps/unix/sysv/linux/tile/tilegx/tilegx64/libc.abilist
	* sysdeps/unix/sysv/linux/tile/tilepro/libc.abilist
	* sysdeps/unix/sysv/linux/x86_64/64/libc.abilist
	* sysdeps/unix/sysv/linux/x86_64/x32/libc.abilist:
	Add entries for explicit_bzero and __explicit_bzero_chk.
2016-12-16 16:21:54 -05:00
..
armv6 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
armv6t2 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
armv7 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bits Refactor FP_FAST_* into bits/fp-fast.h. 2016-11-29 01:45:00 +00:00
include/bits Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nacl New string function explicit_bzero (from OpenBSD). 2016-12-16 16:21:54 -05:00
nptl Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
sys Installed-header hygiene (BZ#20366): stack_t. 2016-09-23 08:43:56 -04:00
__longjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
abi-note.S Fix whitespace in ARM files to allow move. 2014-02-08 01:52:38 +00:00
add_n.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
addmul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_assert.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_atexit.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_errno_addr.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_lcsts.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_localeconv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_math.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_mb_cur_max.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_memclr.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_memcpy.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_memmove.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_memset.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_sighandlers.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aeabi_unwind_cpp_pr1.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
arm-features.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
arm-mcount.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
arm-unwind-resume.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
atomic-machine.h Remove atomic_compare_and_exchange_bool_rel. 2016-06-24 23:04:40 +03:00
backtrace.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bsd-_setjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
bsd-setjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
configure Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
configure.ac Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
crti.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
crtn.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-irel.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-machine.h Fix building glibc master with NDEBUG and --with-cpu. 2016-03-15 23:23:24 -04:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-tls.h elf: Consolidate machine-agnostic DTV definitions in <dl-dtv.h> 2016-06-20 14:31:40 +02:00
dl-tlsdesc.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-tlsdesc.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-trampoline.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
e_sqrt.c Use VSQRT instruction for ARM sqrt (bug 20660). 2016-10-20 23:24:44 +00:00
e_sqrtf.c Use VSQRT instruction for ARM sqrt (bug 20660). 2016-10-20 23:24:44 +00:00
fclrexcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fedisblxcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
feenablxcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fegetenv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fegetexcept.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fegetmode.c Add femode_t functions: arm. 2016-09-07 16:43:03 +00:00
fegetround.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
feholdexcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fenv_private.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fesetenv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fesetexcept.c Add fesetexcept: arm. 2016-08-16 16:18:24 +00:00
fesetmode.c Add femode_t functions: arm. 2016-09-07 16:43:03 +00:00
fesetround.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
feupdateenv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fgetexcptflg.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
find_exidx.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fix-fp-int-convert-overflow.h S/390: Do not raise inexact exception in lrint/lround. [BZ #19486] 2016-01-18 12:48:06 +01:00
fpu_control.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fraiseexcpt.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
frame.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
framestate.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
fsetexcptflg.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ftestexcept.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gcc-compat.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gccframe.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Implies Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07:00
jmpbuf-unwind.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ldsodefs.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libc-aeabi_read_tp.S ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
libc-tls.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
libm-test-ulps Fix ulps regeneration for *-finite tests. 2016-01-19 21:42:58 +00:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
machine-gmon.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Makefile Remove configure test for ARM TLS descriptors support. 2015-10-27 23:56:50 +00:00
math_private.h math: add LDBL_CLASSIFY_COMPAT support 2015-12-03 13:00:46 -05:00
math-tests.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memcpy.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memmove.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memset.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
memusage.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
nptl-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
preconfigure arm: drop EABI check 2014-11-22 19:34:49 -05:00
preconfigure.ac arm: drop EABI check 2014-11-22 19:34:49 -05:00
pt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rt-aeabi_unwind_cpp_pr1.c ARM: Move more aeabi routine magic out of Linux-specific directories 2014-06-26 15:08:29 -07:00
rt-arm-unwind-resume.S ARM: Consolidate with generic unwinder wrapper code 2015-01-05 15:42:16 -08:00
rtld-global-offsets.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
s_fma.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
s_fmaf.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setjmp.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sfp-machine.h Remove sysdeps/arm/soft-fp directory. 2014-10-16 09:54:45 -07:00
sotruss-lib.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
stackinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
start.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
static-stubs.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
strlen.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sub_n.S Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
submul_1.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
test-fpucw.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tls-macros.h ARM: Rewrite sysdeps/arm/tls-macros.h 2015-03-13 10:10:09 -07:00
tlsdesc.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tlsdesc.sym Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
tst-armtlsdescextlazy.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextlazymod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnow.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescextnowmod.c [BZ #17075] ARM: Fix immediate calculation of R_ARM_TLS_DESC 2014-06-20 20:22:42 +01:00
tst-armtlsdescloc.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-armtlsdesclocmod.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
tst-audit.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-dw2-fde-glibc.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind-pe.c Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
unwind-resume.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
unwind.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Versions Use -Werror=undef for assembly code. 2015-02-12 13:57:32 -08:00