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] [day] [month] [year] [list]
Date:	Tue, 22 Nov 2011 17:42:05 -0500
From:	chas williams - CONTRACTOR <chas@....nrl.navy.mil>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] atm: use SKB_TRUESIZE() in
 atm_guess_pdu2truesize()

On Tue, 22 Nov 2011 21:33:54 +0100
Eric Dumazet <eric.dumazet@...il.com> wrote:

> Le mardi 22 novembre 2011 à 15:22 -0500, chas williams - CONTRACTOR a
> écrit :
> > it doesnt seem like a good idea to create a wrapper for a one to one
> > call.  perhaps this whole bit of nonsense should be removed.  the
> > iphase driver should be returning skb->truesize like everyone.  
> > 
> > if atm_alloc_charge() just uses SKB_TRUESIZE() then we konw that guess
> > will be the same as skb->truesize and atm_alloc_charge() can be
> > simplified by removing atomic_add(skb->truesize - guess, which will be
> > 0 in all cases.
> > 
> 
> Please note I didnt create a wrapper, only correct existing one :)
> 
> Feel free to send a (tested) patch, but be warned that following code is
> not correct :
> 
> int size = something;
> 
> struct sk_buff *skb = skb_alloc(size);
> 
> ASSERT(skb->truesize == SKB_TRUESIZE(size));
> 
> (It might be true with SLOB only)

perhaps it is best to say that you discovered an inadvertent wrapper.

given skb->truesize != SKB_TRUESIZE() for all cases, it is certainly
wrong in the iphase driver to return the guessed value.  it should be
returning skb->truesize.  i will send along a patch shortly to just get
rid of this function.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ