Thread (28 messages) 28 messages, 11 authors, 2020-06-17

Re: [PATCH v4 1/3] mm/slab: Use memzero_explicit() in kzfree()

From: David Howells <dhowells@redhat.com>
Date: 2020-06-16 16:07:27
Also in: keyrings, linux-amlogic, linux-bluetooth, linux-btrfs, linux-cifs, linux-crypto, linux-fscrypt, linux-integrity, linux-mediatek, linux-mm, linux-nfs, linux-pm, linux-scsi, linux-sctp, linux-security-module, linux-wireless, lkml, netdev, stable, target-devel, virtualization

Waiman Long [off-list ref] wrote:
The kzfree() function is normally used to clear some sensitive
information, like encryption keys, in the buffer before freeing it back
to the pool. Memset()
"memset()" is all lowercase.
is currently used for buffer clearing. However unlikely, there is still a
non-zero probability
I'd say "a possibility".
that
and I'd move "in [the] future" here.
the compiler may choose to optimize away the
memory clearing especially if LTO is being used in the future. To make sure
that this optimization will never happen
"in these cases"
, memzero_explicit(), which is introduced in v3.18, is now used in
"instead of"?
kzfree() to future-proof it.
Davod
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help