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: <1497565021.14396.21.camel@perches.com>
Date:   Thu, 15 Jun 2017 15:17:01 -0700
From:   Joe Perches <joe@...ches.com>
To:     Johannes Berg <johannes@...solutions.net>,
        David Miller <davem@...emloft.net>
Cc:     netdev@...r.kernel.org
Subject: Re: [PATCH] skbuff: make skb_put_zero() return void

On Thu, 2017-06-15 at 23:28 +0200, Johannes Berg wrote:
> On Thu, 2017-06-15 at 17:26 -0400, David Miller wrote:
> > 
> > > *skb_put(skb, 1) = 'x';
> > >  
> > > Seems pretty unlikely we have that, and in any case the compiler
> > 
> > would
> > > warn (error?) there if skb_put() becomes void.
> > 
> > Actually I am pretty sure I've seen a pattern like that somewhere. :-
> > )
> 
> Yeah, there are actually a ton of them, and oddly enough my spatch is
> failing to catch _one_ of them?? Still refining it :)

I suggest changing those to skb_put_char(skb, char)
in a first pass and then doing the other bits later.

Here's a script that does the conversion.

$ /usr/bin/git grep -P --name-only "\*\s*skb_put\s*\(\s*([\w\.\[\]\>\-]+)\s*,\s*1\s*\)\s*=\s*([^;]+);" | \
  xargs perl -p -i -e 's/\*\s*skb_put\s*\(\s*([\w\.\[\]\>\-]+)\s*,\s*1\s*\)\s*=\s*([^;]+);/skb_put_char(\1, \2);/'


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ