Re: [PATCH v2] coccinelle: api: add kzfree script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Check for memset()/memset_explicit() with 0 followed by
> kfree()/vfree()/kvfree().

Another software evolution will become interesting here.


> +/// memset_explicit with 0 followed by kfree

How do you think about to extend this comment?


Would you like to take the following SmPL code variants into account?


> +virtual context
> +virtual org
> +virtual report
> +virtual patch

+virtual context, org, report, patch


> +(
> +- kfree(E);
> ++ kzfree(E);
> +|
> +- vfree(E);
> ++ kvfree_sensitive(E, size);
> +|
> +- kvfree(E);
> ++ kvfree_sensitive(E, size);
> +)

+(
+-kfree
++kzfree
+      (E);
+|
+-vfree
++kvfree_sensitive
+      (E
++      , size
+      );
+|
+-kvfree
++kvfree_sensitive
+       (E
++       , size
+       );
+)


Regards,
Markus



[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux