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  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]
Date:	Mon, 5 May 2008 23:04:05 +0800
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	Johannes Berg <johannes@...solutions.net>
Cc:	"David S. Miller" <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>
Subject: Re: [RFC/T] [NET] give truesize warning when truesize differs

On Mon, May 05, 2008 at 03:11:20PM +0200, Johannes Berg wrote:
>
> >  static inline void skb_truesize_check(struct sk_buff *skb)
> >  {
> > -	int len = sizeof(struct sk_buff) + skb->len;
> > +#ifdef NET_SKBUFF_DATA_USES_OFFSET
> > +	int len = sizeof(struct sk_buff) + skb->end;
> > +#else
> > +	int len = sizeof(struct sk_buff) + (skb->end - skb->head);
> > +#endif
> 
> Umm, is this even correct? Should it check data_len? I seem to get the
> truesize warning a bit now:

It must check data_len.

Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
--
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