twx-linux/drivers/staging
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
..
android Staging/IIO driver patches for 5.9-rc1 2020-08-06 14:36:13 -07:00
axis-fifo
board
clocking-wizard staging: Replace HTTP links with HTTPS ones 2020-07-20 10:22:47 +02:00
comedi staging: comedi: s526: Use fallthrough pseudo-keyword 2020-07-28 10:18:52 +02:00
emxx_udc
fbtft
fieldbus
fsl-dpaa2 staging: dpaa2-ethsw: check if there is space for a new VLAN 2020-07-21 16:53:34 +02:00
fwserial
gasket staging: gasket: core: Fix a coding style issue in gasket_core.c 2020-07-15 16:05:14 +02:00
gdm724x staging: gdm724x: Use fallthrough pseudo-keyword 2020-07-28 10:18:52 +02:00
goldfish
greybus drivers: staging: audio: Fix the missing header file for helper file 2020-07-29 16:43:26 +02:00
gs_fpgaboot staging: Replace HTTP links with HTTPS ones 2020-07-20 10:22:47 +02:00
iio
kpc2000
ks7010 mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
media media fixes for v5.8-rc7 2020-07-22 11:56:00 -07:00
most Staging/IIO driver patches for 5.9-rc1 2020-08-06 14:36:13 -07:00
mt7621-dma
mt7621-dts
mt7621-pci
mt7621-pci-phy
mt7621-pinctrl
netlogic staging: netlogic: clear alignment style issues 2020-08-02 12:47:37 +02:00
nvec Staging: nvec: Replace HTTP links with HTTPS ones 2020-07-10 13:52:46 +02:00
octeon Staging/IIO driver patches for 5.9-rc1 2020-08-06 14:36:13 -07:00
octeon-usb
olpc_dcon
pi433
qlge staging: qlge: qlge_dbg: removed comment repition 2020-07-30 08:41:40 +02:00
ralink-gdma
rtl8188eu staging: r8188eu: replace rtw_netdev_priv define with inline function 2020-08-02 12:47:37 +02:00
rtl8192e staging: rtl8192e: Use fallthrough pseudo-keyword 2020-07-28 10:18:51 +02:00
rtl8192u staging: rtl8192u: fix a dubious looking mask before a shift 2020-07-17 12:08:44 +02:00
rtl8712 Staging: rtl8712: Fixed a coding sytle issue 2020-07-29 14:00:25 +02:00
rtl8723bs mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
rts5208 staging: rts5208: clear alignment style issues 2020-08-02 12:47:37 +02:00
sm750fb staging: sm750fb: use generic power management 2020-07-29 14:01:37 +02:00
unisys staging: unisys: visorhba: remove redundant initialization of variables scsicmd_id and rc 2020-07-23 20:34:34 +02:00
vc04_services staging: vc04_services: Use fallthrough pseudo-keyword 2020-07-28 10:18:52 +02:00
vme
vt6655 staging: vt6655: Use fallthrough pseudo-keyword 2020-07-10 13:52:46 +02:00
vt6656 staging: vt6655: Use fallthrough pseudo-keyword 2020-07-10 13:52:46 +02:00
wfx staging: wfx: Use flex_array_size() helper in memcpy() 2020-07-30 08:41:06 +02:00
wlan-ng mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
Kconfig staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00
Makefile staging/speakup: Move out of staging 2020-07-29 14:02:41 +02:00