[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <378e709b-695a-be84-f4b3-f25dfcdc6ec7@linux.com>
Date: Fri, 5 Jun 2020 00:25:31 +0300
From: Denis Efremov <efremov@...ux.com>
To: Julia Lawall <julia.lawall@...ia.fr>
Cc: Joe Perches <joe@...ches.com>, cocci@...teme.lip6.fr,
linux-kernel@...r.kernel.org
Subject: Re: [Cocci] [PATCH v2] coccinelle: api: add kzfree script
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
Powered by blists - more mailing lists