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: <20190507.123952.2046042425594195721.davem@davemloft.net>
Date:   Tue, 07 May 2019 12:39:52 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     ldir@...byshire-bryant.me.uk
Cc:     jhs@...atatu.com, jiri@...nulli.us, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org, netdev@...r.kernel.org,
        shuah@...nel.org, xiyou.wangcong@...il.com
Subject: Re: [net-next v3] net: sched: Introduce act_ctinfo action

From: Kevin 'ldir' Darbyshire-Bryant <ldir@...byshire-bryant.me.uk>
Date: Sun, 5 May 2019 13:20:13 +0000

> ctinfo is a new tc filter action module.  It is designed to restore
> information contained in conntrack marks to other places.  At present it
> can restore DSCP values to IPv4/6 diffserv fields and also copy
> conntrack marks to skb marks.  As such the 2nd function effectively
> replaces the existing act_connmark module

This needs more time for review and therefore I'm deferring this to the
next merge window.

Also:

> +static int tcf_ctinfo_act(struct sk_buff *skb, const struct tc_action *a,
> +			  struct tcf_result *res)
> +{
> +	const struct nf_conntrack_tuple_hash *thash = NULL;
> +	struct nf_conntrack_tuple tuple;
> +	enum ip_conntrack_info ctinfo;
> +	struct tcf_ctinfo *ca = to_ctinfo(a);
> +	struct tcf_ctinfo_params *cp;
> +	struct nf_conntrack_zone zone;
> +	struct nf_conn *ct;
> +	int proto, wlen;
> +	int action;

Reverse christmas tree for these local variables please.

> +static int tcf_ctinfo_init(struct net *net, struct nlattr *nla,
> +			   struct nlattr *est, struct tc_action **a,
> +			   int ovr, int bind, bool rtnl_held,
> +			   struct tcf_proto *tp,
> +			   struct netlink_ext_ack *extack)
> +{
> +	struct tc_action_net *tn = net_generic(net, ctinfo_net_id);
> +	struct tcf_ctinfo_params *cp_new;
> +	struct nlattr *tb[TCA_CTINFO_MAX + 1];
> +	struct tcf_chain *goto_ch = NULL;
> +	struct tcf_ctinfo *ci;
> +	struct tc_ctinfo *actparm;
> +	struct tc_ctinfo_dscp *dscpparm;
> +	int ret = 0, err, i;

Likewise.

> +static inline int tcf_ctinfo_dump(struct sk_buff *skb, struct tc_action *a,
> +				  int bind, int ref)
> +{
> +	unsigned char *b = skb_tail_pointer(skb);
> +	struct tcf_ctinfo *ci = to_ctinfo(a);
> +	struct tcf_ctinfo_params *cp;
> +	struct tc_ctinfo opt = {
> +		.index   = ci->tcf_index,
> +		.refcnt  = refcount_read(&ci->tcf_refcnt) - ref,
> +		.bindcnt = atomic_read(&ci->tcf_bindcnt) - bind,
> +	};
> +	struct tcf_t t;
> +	struct tc_ctinfo_dscp dscpparm;
> +	struct tc_ctinfo_stats_dscp dscpstats;

Likewise.

Also, never use the inline keyword in foo.c files, always let the compiler
decide.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ