linux/drivers/net/wireless/intersil/orinoco
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
..
Kconfig b43: Replace HTTP links with HTTPS ones 2020-08-02 18:16:35 +03:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
airport.c
cfg.c cfg80211: move add/change interface monitor flags into params 2017-04-13 13:41:38 +02:00
cfg.h
fw.c orinoco: Replace zero-length array with flexible-array member 2020-03-23 18:59:50 +02:00
fw.h
hermes.c
hermes.h orinoco: Replace zero-length array with flexible-array member 2020-03-23 18:59:50 +02:00
hermes_dld.c orinoco: Replace zero-length array with flexible-array member 2020-03-23 18:59:50 +02:00
hermes_dld.h
hermes_rid.h
hw.c
hw.h
main.c netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
main.h
mic.c crypto: shash - remove shash_desc::flags 2019-04-25 15:38:12 +08:00
mic.h orinoco: Use shash instead of ahash for MIC calculations 2016-12-30 13:34:15 +02:00
orinoco.h netdev: pass the stuck queue to the timeout handler 2019-12-12 21:38:57 -08:00
orinoco_cs.c
orinoco_nortel.c orinoco: use generic power management 2020-07-15 13:38:26 +03:00
orinoco_pci.c orinoco: use generic power management 2020-07-15 13:38:26 +03:00
orinoco_pci.h orinoco: use generic power management 2020-07-15 13:38:26 +03:00
orinoco_plx.c orinoco: use generic power management 2020-07-15 13:38:26 +03:00
orinoco_tmd.c orinoco: use generic power management 2020-07-15 13:38:26 +03:00
orinoco_usb.c orinoco_usb: fix spelling mistake 2020-07-15 13:36:01 +03:00
scan.c nl80211: support beacon report scanning 2016-07-06 14:51:31 +02:00
scan.h
spectrum_cs.c orinoco: remove useless variable 'err' in spectrum_cs_suspend() 2020-04-15 11:46:49 +03:00
wext.c mm, treewide: rename kzfree() to kfree_sensitive() 2020-08-07 11:33:22 -07:00
wext.h