diff options
| author | Julia Lawall <Julia.Lawall@lip6.fr> | 2014-11-30 18:03:48 +0100 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-07-08 13:36:44 +0200 |
| commit | c40adf4802ec6c7b2f2eac7a28f384b3beb3759d (patch) | |
| tree | d76d1aeaf2a24859e64fc93fd2a6af7db9869768 /lib/list_debug.c | |
| parent | ca1f667748739a6a0bcce8db79531f0f09d6a8cd (diff) | |
crypto: arm - replace memset by memzero_explicit
Memset on a local variable may be removed when it is called just before the
variable goes out of scope. Using memzero_explicit defeats this
optimization. A simplified version of the semantic patch that makes this
change is as follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
type T;
@@
{
... when any
T x[...];
... when any
when exists
- memset
+ memzero_explicit
(x,
-0,
...)
... when != x
when strict
}
// </smpl>
This change was suggested by Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Change-Id: I89b5957f922b7e5568a405c212eb186449f1deab
(cherry picked from commit 025f4cbff16e284192b04bfa1f7b19551c1f5af3)
Diffstat (limited to 'lib/list_debug.c')
0 files changed, 0 insertions, 0 deletions
