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: <Zmf7w+N5MdF4KMg9@LouisNoVo>
Date: Tue, 11 Jun 2024 09:24:51 +0200
From: Louis Peens <louis.peens@...igine.com>
To: Asbjørn Sloth Tønnesen <ast@...erby.net>
Cc: netdev@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Edward Cree <ecree.xilinx@...il.com>,
	Martin Habets <habetsm.xilinx@...il.com>, linux-net-drivers@....com,
	Saeed Mahameed <saeedm@...dia.com>,
	Leon Romanovsky <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>,
	linux-rdma@...r.kernel.org,
	Jesse Brandeburg <jesse.brandeburg@...el.com>,
	Tony Nguyen <anthony.l.nguyen@...el.com>,
	intel-wired-lan@...ts.osuosl.org, oss-drivers@...igine.com,
	linux-kernel@...r.kernel.org, Davide Caratti <dcaratti@...hat.com>,
	i.maximets@....org
Subject: Re: [PATCH net-next 4/5] nfp: flower: validate encapsulation control
 flags

On Sun, Jun 09, 2024 at 05:33:54PM +0000, Asbjørn Sloth Tønnesen wrote:
> Encapsulation control flags are currently not used anywhere,
> so all flags are currently unsupported by all drivers.
> 
> This patch adds validation of this assumption, so that
> encapsulation flags may be used in the future.
> 
> In case any encapsulation control flags are masked,
> flow_rule_match_has_enc_control_flags() sets a NL extended
> error message, and we return -EOPNOTSUPP.
> 
> Only compile tested.
> 
> Signed-off-by: Asbjørn Sloth Tønnesen <ast@...erby.net>
Looks fair to me, thanks.

Signed-off-by: Louis Peens <louis.peens@...igine.com>

> ---
>  drivers/net/ethernet/netronome/nfp/flower/offload.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/netronome/nfp/flower/offload.c b/drivers/net/ethernet/netronome/nfp/flower/offload.c
> index 8e0a890381b60..46ffc2c208930 100644
> --- a/drivers/net/ethernet/netronome/nfp/flower/offload.c
> +++ b/drivers/net/ethernet/netronome/nfp/flower/offload.c
> @@ -321,6 +321,10 @@ nfp_flower_calculate_key_layers(struct nfp_app *app,
>  
>  		flow_rule_match_enc_control(rule, &enc_ctl);
>  
> +		if (flow_rule_has_enc_control_flags(enc_ctl.mask->flags,
> +						    extack))
> +			return -EOPNOTSUPP;
> +
>  		if (enc_ctl.mask->addr_type != 0xffff) {
>  			NL_SET_ERR_MSG_MOD(extack, "unsupported offload: wildcarded protocols on tunnels are not supported");
>  			return -EOPNOTSUPP;
> -- 
> 2.45.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ