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: <1497609558.10546.5.camel@perches.com>
Date:   Fri, 16 Jun 2017 03:39:18 -0700
From:   Joe Perches <joe@...ches.com>
To:     Johannes Berg <johannes@...solutions.net>,
        Bjørn Mork <bjorn@...k.no>
Cc:     netdev@...r.kernel.org
Subject: Re: [RFC 1/3] networking: make skb_put & friends return void
 pointers

On Fri, 2017-06-16 at 10:42 +0200, Johannes Berg wrote:
> On Fri, 2017-06-16 at 09:53 +0200, Bjørn Mork wrote:
> 
> > There seem to be a large number of places where the char pointer was
> > used directly. Not that I have any strong opinion either way, but
> > adding lots of ugly casts like this seems to contradict the whole
> > purpose of this change?:
> > > -			*skb_put(info->rx_skb, 1) = x;
> > > +			*(u8 *)skb_put(info->rx_skb, 1) = x;
> > >  			inb(iobase + DATA_H);
> > >  			info->rx_count--;
> > >  
> > 
> > That does not look any better in my eyes, and there are ... what?
> > ... hundreds of them?
> 
> Yeah it's a bit of a trade-off. There are ~140 of these, but >200 of
> the removed casts. Joe also suggested we could replace these by
> skb_put_u8() or so, which would be indeed be nicer. I can send a patch,
> it's pretty simple.

I would suggest avoiding using skb_put_u8 as it
would suggest there should be skb_put_u16 etc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ