kernel_optimize_test/scripts
Waiman Long 453431a549 mm, treewide: rename kzfree() to kfree_sensitive()
As said by Linus:

  A symmetric naming is only helpful if it implies symmetries in use.
  Otherwise it's actively misleading.

  In "kzalloc()", the z is meaningful and an important part of what the
  caller wants.

  In "kzfree()", the z is actively detrimental, because maybe in the
  future we really _might_ want to use that "memfill(0xdeadbeef)" or
  something. The "zero" part of the interface isn't even _relevant_.

The main reason that kzfree() exists is to clear sensitive information
that should not be leaked to other future users of the same memory
objects.

Rename kzfree() to kfree_sensitive() to follow the example of the recently
added kvfree_sensitive() and make the intention of the API more explicit.
In addition, memzero_explicit() is used to clear the memory to make sure
that it won't get optimized away by the compiler.

The renaming is done by using the command sequence:

  git grep -w --name-only kzfree |\
  xargs sed -i 's/kzfree/kfree_sensitive/'

followed by some editing of the kfree_sensitive() kerneldoc and adding
a kzfree backward compatibility macro in slab.h.

[akpm@linux-foundation.org: fs/crypto/inline_crypt.c needs linux/slab.h]
[akpm@linux-foundation.org: fix fs/crypto/inline_crypt.c some more]

Suggested-by: Joe Perches <joe@perches.com>
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: David Howells <dhowells@redhat.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: "Serge E. Hallyn" <serge@hallyn.com>
Cc: Joe Perches <joe@perches.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: "Jason A . Donenfeld" <Jason@zx2c4.com>
Link: http://lkml.kernel.org/r/20200616154311.12314-3-longman@redhat.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2020-08-07 11:33:22 -07:00
..
atomic
basic
coccinelle mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
dtc
dummy-tools
gcc-plugins GCC plugins updates for v5.9-rc1 2020-08-04 13:26:06 -07:00
gdb Merge branches 'pm-sleep', 'pm-domains', 'powercap' and 'pm-tools' 2020-08-03 13:12:44 +02:00
genksyms
kconfig kconfig: qconf: remove wrong ConfigList::firstChild() 2020-08-02 23:09:10 +09:00
ksymoops
mod Char/Misc driver patches for 5.9-rc1 2020-08-05 11:43:47 -07:00
package
selinux
tracing
.gitignore
adjust_autoksyms.sh
asn1_compiler.c
bin2c.c
bloat-o-meter scripts/bloat-o-meter: Support comparing library archives 2020-08-07 11:33:21 -07:00
bootgraph.pl
bpf_helpers_doc.py bpf: Introduce SK_LOOKUP program type with a dedicated attach point 2020-07-17 20:18:16 -07:00
cc-can-link.sh
check_extable.sh
check-sysctl-docs
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl Remove uninitialized_var() macro for v5.9-rc1 2020-08-04 13:49:43 -07:00
checkstack.pl
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config
const_structs.checkpatch const_structs.checkpatch: add regulator_ops 2020-08-07 11:33:21 -07:00
decode_stacktrace.sh scripts/decode_stacktrace.sh: guess path to vmlinux by release name 2020-08-07 11:33:21 -07:00
decodecode
depmod.sh
diffconfig
documentation-file-ref-check
export_report.pl
extract_xc3028.pl
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
faddr2line
file-size.sh
find-unused-docs.sh
gcc-goto.sh
gcc-ld
gcc-plugin.sh
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh
gen_compile_commands.py
gen_ksymdeps.sh
get_abi.pl
get_dvb_firmware
get_maintainer.pl
gfp-translate
headerdep.pl
headers_check.pl
headers_install.sh char: raw: do not leak CONFIG_MAX_RAW_DEVS to userspace 2020-07-10 14:50:51 +02:00
insert-sys-cert.c
jobserver-exec
kallsyms.c
Kbuild.include
Kconfig.include
kernel-doc scripts/kernel-doc: optionally treat warnings as errors 2020-07-31 11:11:17 -06:00
ld-version.sh
leaking_addresses.pl
Lindent
link-vmlinux.sh bpf: Resolve BTF IDs in vmlinux image 2020-07-13 10:42:02 -07:00
Makefile
Makefile.asm-generic
Makefile.build
Makefile.clean
Makefile.dtbinst
Makefile.extrawarn kbuild: Move -Wtype-limits to W=2 2020-07-09 18:00:56 -07:00
Makefile.gcc-plugins
Makefile.headersinst
Makefile.host
Makefile.kasan
Makefile.kcov
Makefile.kcsan
Makefile.lib init: Add support for zstd compressed kernel 2020-07-31 11:49:08 +02:00
Makefile.modfinal
Makefile.modinst
Makefile.modpost kbuild: remove redundant FORCE definition in scripts/Makefile.modpost 2020-08-02 23:09:16 +09:00
Makefile.modsign
Makefile.package
Makefile.ubsan
Makefile.userprogs
makelst
markup_oops.pl
mkcompile_h
mkmakefile
mksysmap
mkuboot.sh
module-common.lds
modules-check.sh
namespace.pl
nsdeps scripts: add dummy report mode to add_namespace.cocci 2020-07-10 14:19:58 +02:00
objdiff
parse-maintainers.pl
patch-kernel
profile2linkerlist.pl
prune-kernel
recordmcount.c recordmcount: only record relocation of type R_AARCH64_CALL26 on arm64. 2020-07-24 12:43:19 +01:00
recordmcount.h
recordmcount.pl
setlocalversion
show_delta
sign-file.c
sorttable.c s390/kernel: expand exception table logic to allow new handling options 2020-07-20 10:55:50 +02:00
sorttable.h
spdxcheck-test.sh
spdxcheck.py
spelling.txt scripts/spelling.txt: add more spellings to spelling.txt 2020-08-07 11:33:21 -07:00
sphinx-pre-install
split-man.pl
stackdelta
stackusage
subarch.include
tags.sh scripts/tags.sh: collect compiled source precisely 2020-08-07 11:33:21 -07:00
tools-support-relr.sh
unifdef.c
ver_linux
xen-hypercalls.sh
xz_wrap.sh