diff options
author | Denis Efremov <efremov@linux.com> | 2020-10-09 15:54:53 +0300 |
---|---|---|
committer | Julia Lawall <Julia.Lawall@lip6.fr> | 2020-10-10 22:26:12 +0300 |
commit | 28c185a88607bc361ec7f071b907285e2e75de1b (patch) | |
tree | 814890a6c649990934069fa54a65806a6245806a /scripts | |
parent | 7b36c1398fb63f9c38cc83dc75f143d2e5995062 (diff) | |
download | linux-28c185a88607bc361ec7f071b907285e2e75de1b.tar.xz |
coccinelle: api: kfree_sensitive: print memset position
Print memset() call position in addition to the kfree() position to
ease issues identification.
Signed-off-by: Denis Efremov <efremov@linux.com>
Signed-off-by: Julia Lawall <julia.lawall@inria.fr>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/coccinelle/api/kfree_sensitive.cocci | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/coccinelle/api/kfree_sensitive.cocci b/scripts/coccinelle/api/kfree_sensitive.cocci index e4a066a0b77d..8d980ebf3223 100644 --- a/scripts/coccinelle/api/kfree_sensitive.cocci +++ b/scripts/coccinelle/api/kfree_sensitive.cocci @@ -85,14 +85,16 @@ type T; @script:python depends on report@ p << r.p; +m << r.m; @@ -coccilib.report.print_report(p[0], - "WARNING: opportunity for kfree_sensitive/kvfree_sensitive") +msg = "WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line %s)" +coccilib.report.print_report(p[0], msg % (m[0].line)) @script:python depends on org@ p << r.p; +m << r.m; @@ -coccilib.org.print_todo(p[0], - "WARNING: opportunity for kfree_sensitive/kvfree_sensitive") +msg = "WARNING opportunity for kfree_sensitive/kvfree_sensitive (memset at line %s)" +coccilib.org.print_todo(p[0], msg % (m[0].line)) |