glibc/sysdeps/unix/sysv/linux/alpha
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
..
alpha
alphaev6/fpu
alphaev67/fpu
bits Refactor long double information into bits/long-double.h. 2016-12-14 18:27:56 +00:00
fpu
sys Make Alpha <sys/user.h> self-contained. 2016-11-17 14:15:03 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
a.out.h
adjtime.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
aio_cancel.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
arch-fork.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
brk.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
c++-types.data alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
clone.S Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
configure
configure.ac
creat.c Remove __libc_creat function name. 2014-10-30 19:44:31 +00:00
dl-auxv.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
dl-brk.S
dl-fxstatat64.c Remove __ASSUME_ATFCTS conditionals in sysdeps/unix/sysv/linux/. 2014-06-20 15:41:35 +00:00
dl-support.c
dl-sysdep.c
fraiseexcpt.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fstatfs64.c
fstatvfs.c
fstatvfs64.c
fxstat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
fxstatat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getclktck.c
getcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getdents.c
getdents64.c
gethostname.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
getsysstats.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
glob.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ieee_get_fp_control.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ieee_set_fp_control.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
internal_statvfs64.c
ioperm.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ipc_priv.h
kernel-features.h Define __ASSUME_ST_INO_64_BIT on all platforms. 2016-11-07 13:26:27 -08:00
kernel_sigaction.h
kernel_stat.h Allow [f]statfs64 to alias [f]statfs 2016-11-22 09:59:12 -08:00
kernel_sysinfo.h
kernel_termios.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
ld.abilist ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
libanl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libBrokenLocale.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libc.abilist New string function explicit_bzero (from OpenBSD). 2016-12-16 16:21:54 -05:00
libcrypt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libdl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libm.abilist Add llogb, llogbf, llogbl. 2016-12-02 01:42:49 +00:00
libnsl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libpthread.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libresolv.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
librt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libthread_db.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libutil.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
localplt.data ld.so: Remove __libc_memalign 2016-11-30 16:23:58 +01:00
lxstat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
makecontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Makefile Consolidate lseek/lseek64/llseek implementations 2016-11-08 16:04:33 -02:00
msgctl.c
nldbl-abi.h
oldglob.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
pipe.S
pt-vfork.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
register-dump.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
rt_sigaction.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
semctl.c
setcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
setfpucw.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
shlib-versions Remove configuration name patterns from shlib-versions. 2014-09-12 12:28:47 +00:00
shmctl.c
sigaction.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigprocmask.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sigsuspend.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sizes.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
statfs64.c
statvfs.c
statvfs64.c
swapcontext.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
syscall.S Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
syscalls.list Adjust kernel-features.h defaults for recvmsg and sendmsg 2016-05-25 17:27:57 -03:00
sysconf.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
sysdep-cancel.h 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
timer_create.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_delete.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_getoverr.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_gettime.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
timer_settime.c alpha: Move remaining files out of sysdeps/unix/sysv/linux/alpha/nptl/ 2014-05-23 11:20:48 -07:00
ucontext-offsets.sym
Versions Revert {send,sendm,recv,recvm}msg conformance changes 2016-06-10 11:58:16 -03:00
vfork.S Remove cached PID/TID in clone 2016-11-24 19:38:51 -02:00
wordexp.c
xstat.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
xstatconv.c Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
xstatconv.h Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00