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: <20200122072916.23fc3416@cakuba>
Date:   Wed, 22 Jan 2020 07:29:16 -0800
From:   Jakub Kicinski <kuba@...nel.org>
To:     Paul Blakey <paulb@...lanox.com>
Cc:     Saeed Mahameed <saeedm@...lanox.com>,
        Oz Shlomo <ozsh@...lanox.com>,
        Jakub Kicinski <jakub.kicinski@...ronome.com>,
        Vlad Buslov <vladbu@...lanox.com>,
        David Miller <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Jiri Pirko <jiri@...nulli.us>, Roi Dayan <roid@...lanox.com>
Subject: Re: [PATCH net-next v2 01/13] net: sched: support skb chain ext in
 tc classification path

On Wed, 22 Jan 2020 15:52:46 +0200, Paul Blakey wrote:
> +int tcf_classify_ingress(struct sk_buff *skb,
> +			 const struct tcf_block *ingress_block,
> +			 const struct tcf_proto *tp, struct tcf_result *res,
> +			 bool compat_mode)
> +{
> +	const struct tcf_proto *orig_tp = tp;
> +
> +#if IS_ENABLED(CONFIG_NET_TC_SKB_EXT)
> +	{
> +		struct tc_skb_ext *ext = skb_ext_find(skb, TC_SKB_EXT);
> +
> +		if (ext && ext->chain && ingress_block) {
> +			struct tcf_chain *fchain;
> +
> +			fchain = tcf_chain_lookup_rcu(ingress_block,
> +						      ext->chain);
> +			if (!fchain)
> +				return TC_ACT_UNSPEC;
> +
> +			tp = rcu_dereference_bh(fchain->filter_chain);
> +		}

Doesn't this skb ext have to be somehow "consumed" by the first lookup?
What if the skb finds its way to an ingress of another device?

> +	}
> +#endif
> +
> +	return tcf_classify(skb, tp, orig_tp, res, compat_mode);
> +}
> +EXPORT_SYMBOL(tcf_classify_ingress);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ