linux-stable/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 locking/atomics: Provide the arch_atomic_ interface to generic code 2020-06-25 08:23:22 -07:00
basic modpost,fixdep: Replace zero-length array with flexible-array 2020-05-26 00:03:16 +09:00
coccinelle mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
dtc scripts/dtc: Update to upstream version v1.6.0-11-g9d7888cbf19c 2020-06-30 08:42:26 -06:00
dummy-tools kbuild: add dummy toolchains to enable all cc-option etc. in Kconfig 2020-04-09 00:13:45 +09:00
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 .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
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 kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables 2020-06-11 20:14:41 +09:00
selinux scripts/selinux/mdp: fix initial SID handling 2020-06-23 20:48:15 -04:00
tracing
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
adjust_autoksyms.sh kbuild: split adjust_autoksyms.sh in two parts 2020-03-03 20:49:21 +09:00
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-sysctl-docs docs: add a script to check sysctl docs 2020-02-25 03:35:16 -07:00
check_extable.sh
checkincludes.pl
checkkconfigsymbols.py
checkpatch.pl Remove uninitialized_var() macro for v5.9-rc1 2020-08-04 13:49:43 -07:00
checkstack.pl scripts/checkstack.pl: fix arm sp regex 2020-05-26 00:03:16 +09:00
checksyscalls.sh
checkversion.pl
clang-version.sh
cleanfile
cleanpatch
coccicheck
config scripts/config: allow colons in option strings for sed 2020-04-23 01:10:16 +09:00
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 scripts/decodecode: fix trapping instruction formatting 2020-05-07 19:27:20 -07:00
depmod.sh
diffconfig
documentation-file-ref-check scripts: documentation-file-ref-check: Add line break before exit 2020-04-15 15:13:13 -06:00
export_report.pl modpost: move the namespace field in Module.symvers last 2020-03-17 08:59:03 +09:00
extract-cert.c
extract-ikconfig
extract-module-sig.pl
extract-sys-certs.pl
extract-vmlinux
extract_xc3028.pl
faddr2line
file-size.sh
find-unused-docs.sh scripts/find-unused-docs: Fix massive false positives 2020-01-27 14:25:06 -07:00
gcc-goto.sh
gcc-ld
gcc-plugin.sh gcc-plugins: drop support for GCC <= 4.7 2020-04-09 00:13:45 +09:00
gcc-version.sh
gcc-x86_32-has-stack-protector.sh
gcc-x86_64-has-stack-protector.sh
gen_autoksyms.sh kbuild: generate autoksyms.h early 2020-03-03 20:49:21 +09:00
gen_compile_commands.py
gen_ksymdeps.sh
get_abi.pl
get_dvb_firmware
get_maintainer.pl get_maintainer: fix unexpected behavior for path/to//file (double slashes) 2020-06-04 19:06:24 -07:00
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 docs, parallelism: Rearrange how jobserver reservations are made 2019-11-22 10:35:18 -07:00
kallsyms.c gcc-10 warnings: fix low-hanging fruit 2020-05-04 09:16:37 -07:00
Kbuild.include kbuild: improve cc-option to clean up all temporary files 2020-06-17 10:20:21 +09:00
Kconfig.include kconfig: unify cc-option and as-option 2020-06-17 10:38:42 +09:00
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 kbuild: remove -I$(srctree)/tools/include from scripts/Makefile 2020-04-09 00:13:45 +09:00
Makefile.asm-generic
Makefile.build kbuild: update modules.order only when contained modules are updated 2020-06-03 13:22:17 +09:00
Makefile.clean kbuild: add infrastructure to build userspace programs 2020-05-17 18:52:01 +09:00
Makefile.dtbinst kbuild: refactor Makefile.dtbinst more 2020-03-25 10:19:43 +09:00
Makefile.extrawarn kbuild: Move -Wtype-limits to W=2 2020-07-09 18:00:56 -07:00
Makefile.gcc-plugins gcc-plugins/stackleak: Use asm instrumentation to avoid useless register saving 2020-06-24 07:48:28 -07:00
Makefile.headersinst kbuild: move headers_check rule to usr/include/Makefile 2019-11-15 00:23:10 +09:00
Makefile.host kbuild: use -MMD instead of -MD to exclude system headers from dependency 2020-05-12 13:28:33 +09:00
Makefile.kasan
Makefile.kcov
Makefile.kcsan kcsan: Re-add GCC as a supported compiler 2020-06-29 12:04:48 -07:00
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 kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables 2020-06-11 20:14:41 +09:00
Makefile.ubsan ubsan: split "bounds" checker from other options 2020-04-07 10:43:44 -07:00
Makefile.userprogs kbuild: add infrastructure to build userspace programs 2020-05-17 18:52:01 +09:00
makelst
markup_oops.pl
mkcompile_h kbuild: use CONFIG_CC_VERSION_TEXT to construct LINUX_COMPILER macro 2020-05-12 13:28:33 +09:00
mkmakefile
mksysmap mksysmap: Fix the mismatch of '.L' symbols in System.map 2020-06-06 23:39:20 +09:00
mkuboot.sh
module-common.lds
modules-check.sh kbuild: make module name conflict fatal error 2020-05-26 00:03:16 +09:00
namespace.pl namespace: fix namespace.pl script to support relative paths 2019-10-05 15:29:49 +09:00
nsdeps scripts: add dummy report mode to add_namespace.cocci 2020-07-10 14:19:58 +02:00
objdiff
parse-maintainers.pl parse-maintainers: Do not sort section content by default 2020-03-26 15:08:27 -07:00
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: support >64k sections 2020-06-16 21:21:00 -04:00
recordmcount.pl
setlocalversion scripts: setlocalversion: replace backquote to dollar parenthesis 2019-11-11 20:10:01 +09:00
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 scripts/sorttable: Implement build-time ORC unwind table sorting 2019-12-13 10:47:58 +01:00
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 docs: Don't push Sphinx upgrades quite so readily 2020-06-26 09:31:53 -06:00
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 scripts/tools-support-relr.sh: un-quote variables 2019-11-13 10:52:05 +00:00
unifdef.c
ver_linux ver_linux: Query ld cache for versions of libc/libcpp run-time 2020-02-10 13:35:15 -08:00
xen-hypercalls.sh
xz_wrap.sh kbuild: add variables for compression tools 2020-06-06 23:42:01 +09:00