lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8729016553E3654398EA69218DA29EEF15BC8F15@cnshjmbx02>
Date:   Thu, 15 Jun 2017 07:20:37 +0000
From:   YUAN Linyu <Linyu.Yuan@...atel-sbell.com.cn>
To:     Johannes Berg <johannes@...solutions.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [RFC] networking: convert many more places to skb_put_zero()



> -----Original Message-----
> From: Johannes Berg [mailto:johannes@...solutions.net]
> Sent: Thursday, June 15, 2017 3:12 PM
> To: YUAN Linyu; netdev@...r.kernel.org
> Subject: Re: [RFC] networking: convert many more places to skb_put_zero()
> 
> On Thu, 2017-06-15 at 07:05 +0000, YUAN Linyu wrote:
> > > @@
> > > type t;
> > > expression skb, len;
> > > identifier p;
> > > @@
> > > t *p
> > > - = skb_put(skb, len);
> > > + = skb_put_zero(skb, len);
> > > -memset(p, 0, len);
> > >
> > > and it can't figure out that it should remove the variable, without
> > > much more work that's not really worth it for one instance :)
> >
> > Yes, I agree,
> > it conflict with previous spatch which will keep "pad" variable,
> > right?
> >
> > I can do it by hand if spatch not work
> 
> I could teach spatch, but it's usually faster (for me) to post-process
> the spatch changes to remove the extra variable - in this case though,
> it's just not worth it at all since there's just a single change and
> you already have a separate patch :)
In my opinion if spatch can do it even it found one place, keep it.
Only leave difficult places like ndisc.c to me.
> 
> Btw, just made a patch to add and use "skb_put_data()", just doing a
> memcpy() into the skb_put() area also has lots of users.
Yes, I also notice some places.
> 
> johannes

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ