Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Julia Lawall
On Thu, 21 Nov 2019, Michal Kubecek wrote: > On Thu, Nov 21, 2019 at 03:07:33PM +0300, Dan Carpenter wrote: > > On Thu, Nov 21, 2019 at 12:19:17PM +0100, Michal Kubecek wrote: > > > On Thu, Nov 21, 2019 at 11:23:34AM +0100, Enrico Weigelt, metux IT > > > consult wrote: > > > > On 26.10.19

Re: [Cocci] Merging SmPL rules

2019-11-21 Thread Markus Elfring
> Is there a simple way how to merge these these rules together? The answer will depend on your expectations for simplicity. > It seems like it should be possible, * Can you identify useful merge criteria already? * Are you aware of software design possibilities from the application of SmPL

Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Michal Kubecek
On Thu, Nov 21, 2019 at 03:07:33PM +0300, Dan Carpenter wrote: > On Thu, Nov 21, 2019 at 12:19:17PM +0100, Michal Kubecek wrote: > > On Thu, Nov 21, 2019 at 11:23:34AM +0100, Enrico Weigelt, metux IT consult > > wrote: > > > On 26.10.19 21:40, Joe Perches wrote: > > > > On Sat, 2019-10-26 at

Re: [Cocci] "already tagged token" error?

2019-11-21 Thread Julia Lawall
On Wed, 20 Nov 2019, Ondřej Surý wrote: > Hi, > > this is the error we started getting with upgrade to 1.0.7 (from 1.0.6). > > EXN: Failure("rule starting on line 1: already tagged token:\nC code > context\nFile \"./lib/dns/client.c\", line 1342, column 1, charpos = 33224\n > around =

[Cocci] "already tagged token" error?

2019-11-21 Thread Ondřej Surý
Hi, this is the error we started getting with upgrade to 1.0.7 (from 1.0.6). EXN: Failure("rule starting on line 1: already tagged token:\nC code context\nFile \"./lib/dns/client.c\", line 1342, column 1, charpos = 33224\n around = 'if',\n whole content = \tif (rctx == NULL)“) EXN:

Re: [Cocci] field access scoping / check who accesses certain struct members ?

2019-11-21 Thread Markus Elfring
> If you want to check on many types and fields, you can use the following rule: > > @@ > identifier virtual.ty; > struct ty x; > identifier virtual.fld; > @@ > > * x.fld > > Then you can run it with the command-line options: > > -D ty=type_of_interest -D fld=field_of_interest This data

Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Dan Carpenter
On Thu, Nov 21, 2019 at 12:19:17PM +0100, Michal Kubecek wrote: > On Thu, Nov 21, 2019 at 11:23:34AM +0100, Enrico Weigelt, metux IT consult > wrote: > > On 26.10.19 21:40, Joe Perches wrote: > > > On Sat, 2019-10-26 at 15:54 +0800, zhanglin wrote: > > >> memset() the structure ethtool_wolinfo

Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Julia Lawall
On Thu, 21 Nov 2019, Michal Kubecek wrote: > On Thu, Nov 21, 2019 at 11:23:34AM +0100, Enrico Weigelt, metux IT consult > wrote: > > On 26.10.19 21:40, Joe Perches wrote: > > > On Sat, 2019-10-26 at 15:54 +0800, zhanglin wrote: > > >> memset() the structure ethtool_wolinfo that has padded

Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Michal Kubecek
On Thu, Nov 21, 2019 at 11:23:34AM +0100, Enrico Weigelt, metux IT consult wrote: > On 26.10.19 21:40, Joe Perches wrote: > > On Sat, 2019-10-26 at 15:54 +0800, zhanglin wrote: > >> memset() the structure ethtool_wolinfo that has padded bytes > >> but the padded bytes have not been zeroed out. >

Re: [Cocci] [PATCH] net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()

2019-11-21 Thread Enrico Weigelt, metux IT consult
On 26.10.19 21:40, Joe Perches wrote: > On Sat, 2019-10-26 at 15:54 +0800, zhanglin wrote: >> memset() the structure ethtool_wolinfo that has padded bytes >> but the padded bytes have not been zeroed out. > [] >> diff --git a/net/core/ethtool.c b/net/core/ethtool.c > [] >> @@ -1471,11 +1471,13 @@