From: Julia Lawall Date: Sun, 30 Nov 2014 17:03:44 +0000 (+0100) Subject: crypto: sha - replace memset by memzero_explicit X-Git-Tag: omap-for-v3.19/fixes-rc1~99^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6326ba025a4bc025c8c9a15ea2f307936a93843;p=pandora-kernel.git crypto: sha - 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/) // @@ identifier x; type T; @@ { ... when any T x[...]; ... when any when exists - memset + memzero_explicit (x, -0, ...) ... when != x when strict } // This change was suggested by Daniel Borkmann Signed-off-by: Julia Lawall Signed-off-by: Herbert Xu --- Reading git-diff-tree failed