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 22:12:11 +0800
From:	Changli Gao <xiaosuo@...il.com>
To:	Junchang Wang <junchangwang@...il.com>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <eric.dumazet@...il.com>,
	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()

On Thu, Dec 16, 2010 at 10:05 PM, Junchang Wang <junchangwang@...il.com> wrote:
>
> Hi Changli,
> Take af_packet for example, I can't see benefit from this patch.
>
>> +static inline int deliver_skb(struct sk_buff *skb,
>> +                             struct packet_type *pt_prev,
>> +                             struct net_device *orig_dev)
>> +{
>> +       atomic_inc(&skb->users);
>> +       return pt_prev->func(skb, skb->dev, pt_prev, orig_dev);
>> +}
> The increment call will incur skb_shared() failure in packet_rcv.
> In reality, packet_rcv has to clone this packet by itself.
>
>

This happens when run_filter returns non zero. For your case, only
small parts of packets match bpf filter.


-- 
Regards,
Changli Gao(xiaosuo@...il.com)
--
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