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]
Message-ID: <55A43B26.1010009@plumgrid.com>
Date:	Mon, 13 Jul 2015 15:26:46 -0700
From:	Alexei Starovoitov <ast@...mgrid.com>
To:	Daniel Borkmann <daniel@...earbox.net>
CC:	David Miller <davem@...emloft.net>, jhs@...atatu.com,
	jiri@...nulli.us, netdev@...r.kernel.org
Subject: Re: [PATCH net-next] tc: fix tc actions in case of shared skb

On 7/13/15 1:55 PM, Daniel Borkmann wrote:
> On 07/13/2015 10:17 PM, Alexei Starovoitov wrote:
> ...
>> We cannot check tc actions from pktgen, since they can be added
>> dynamically.
>> So I see three options:
>> 1 get rid of burst hack for both RX and TX in pktgen (kills performance)
>> 2 add unlikely(skb_shread) check to few tc actions
>> 3 do nothing
...
> pktgen case. :/ With regards to option 2, you could hide that behind
> a static inline helper wrapped in IS_ENABLED(CONFIG_NET_PKTGEN), but
> that is a veeeery ugly workaround/hack as well (and distros might
> even ship it nevertheless).

naming such helper is a headache as well.
static inline bool is_pktgen_shared_skb(struct sk_buff *skb)
{
#if IS_ENABLED(CONFIG_NET_PKTGEN)
	/* pktgen uses skb->users += burst trick to reuse skb */
	return skb_shared(skb);
#else
	return false;
#endif
}
and in actions:
if (unlikely(is_pktgen_shared_skb(skb))) goto drop;

thoughts?

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