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]
Date:	Mon, 22 Mar 2010 20:30:53 -0700 (PDT)
From:	David Miller <davem@...emloft.net>
To:	ben@...footnetworks.com
Cc:	avorontsov@...mvista.com, netdev@...r.kernel.org,
	Sandeep.Kumar@...escale.com
Subject: Re: Gianfar: RX Recycle skb->len error

From: "Ben Menchaca (ben@...footnetworks.com)" <ben@...footnetworks.com>
Date: Mon, 22 Mar 2010 14:10:48 -0700

> 	It's yucky, but skb_reserve(skb, -alignamount) works,

I have no problem with people using that.

> 	It seems in both these cases for gianfar, the amount of the
> 	alignment is not immediately available to the code the
> 	recognizes that the skb_reset_reserved() is required.  A bit
> 	larger rework appears to be needed.

There's no need to make this so complicated.  Just remember the
value and then refer to it later, when needed.

struct gianfar_skb_cb {
       int	alignamount;
};

#define GIANFAR_CB(skb) ((struct gianfar_skb_cb *)((skb)->cb))

...
	GIANFAR_CB(skb)->alignamount = alignamount;
...

		skb_reserve(skb, -GIANFAR_CB(skb)->alignamount);
--
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