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: <ZM0Ac2MZxamaS0bG@kernel.org>
Date: Fri, 4 Aug 2023 15:43:15 +0200
From: Simon Horman <horms@...nel.org>
To: edward.cree@....com
Cc: linux-net-drivers@....com, davem@...emloft.net, kuba@...nel.org,
	edumazet@...gle.com, pabeni@...hat.com,
	Edward Cree <ecree.xilinx@...il.com>, netdev@...r.kernel.org,
	habetsm.xilinx@...il.com,
	Pieter Jansen van Vuuren <pieter.jansen-van-vuuren@....com>
Subject: Re: [PATCH net-next 7/7] sfc: offload left-hand side rules for
 conntrack

On Thu, Aug 03, 2023 at 12:56:23PM +0100, edward.cree@....com wrote:

...

> +static bool efx_tc_rule_is_lhs_rule(struct flow_rule *fr,
> +				    struct efx_tc_match *match)
> +{
> +	const struct flow_action_entry *fa;
> +	int i;
> +
> +	flow_action_for_each(i, fa, &fr->action) {
> +		switch (fa->id) {
> +		case FLOW_ACTION_GOTO:
> +			return true;
> +		case FLOW_ACTION_CT:
> +			/* If rule is -trk, or doesn't mention trk at all, then
> +			 * a CT action implies a conntrack lookup (hence it's an
> +			 * LHS rule).  If rule is +trk, then a CT action could
> +			 * just be ct(nat) or even ct(commit) (though the latter
> +			 * can't be offloaded).
> +			 */
> +			if (!match->mask.ct_state_trk || !match->value.ct_state_trk)
> +				return true;

Hi Ed,

I think that to keep static analysers happy there ought to be a
break statement, or a fallthrough annotation here.

Otherwise the series looks good to me.

> +		default:
> +			break;
> +		}
> +	}
> +	return false;
> +}

...

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ