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:	Thu, 16 Dec 2010 15:30:57 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Junchang Wang <junchangwang@...il.com>
Cc:	Changli Gao <xiaosuo@...il.com>,
	"David S. Miller" <davem@...emloft.net>,
	Tom Herbert <therbert@...gle.com>,
	Jiri Pirko <jpirko@...hat.com>,
	Fenghua Yu <fenghua.yu@...el.com>,
	Xinan Tang <xinan.tang@...el.com>, netdev@...r.kernel.org
Subject: Re: [PATCH] net: increase skb->users instead of skb_clone()

Le jeudi 16 décembre 2010 à 22:20 +0800, Junchang Wang a écrit :
> On Thu, Dec 16, 2010 at 3:23 PM, Changli Gao <xiaosuo@...il.com> wrote:
> 
> >> You beat me, but I was thinking of a different way, adding a new
> >> pt_prev->xmit_func(), handling all the details (no need for atomic ops
> >> on skb users if packet is not delivered at all).
> >>
> >> By the way, your patch is not 100% safe/OK, because af_packet rcv()
> >> handler writes on skb (skb_pull() and all)
> >>
> >
> > But af_packet_rcv() restores skbs at last.
> >
> >        if (skb_head != skb->data && skb_shared(skb)) {
> >                skb->data = skb_head;
> >                skb->len = skb_len;
> >        }
> >
> If af packet_rcv invokes skb_clone, this skb is differ from the original one.
> Eric's warning is right.

It was a false alarm.

If packet_rcv() invokes skb_clone(), skb still points to original skb.
No worry.


--
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