lkml.org 
[lkml]   [2020]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Cocci] [PATCH v2] coccinelle: api: add kzfree script
Date
It looks like a good idea to add type cast, like:

+// Ignore kzfree definition
+// Ignore kasan test
+@r depends on !patch && !(file in "lib/test_kasan.c") && !(file in "mm/slab_common.c") forall@
+expression *E;
+position p;
+type T;
+@@
+
+* \(memset\|memset_explicit\)((T)E, 0, ...);
+ ... when != E
+ when strict
+* \(kfree\|vfree\|kvfree\)(E)@p;
+

and to exclude file "mm/util.c" because it will contain the definition of
kvfree_sensitive().

I will wait for your recommendation about commented lines and will send v3 after.

Thanks,
Denis

\
 
 \ /
  Last update: 2020-06-04 23:26    [W:0.074 / U:0.776 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site