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: <baa8f977-d2a5-420d-a617-306f951d3d1c@intel.com>
Date: Fri, 7 Jun 2024 13:13:58 +0200
From: Wojciech Drewek <wojciech.drewek@...el.com>
To: Tariq Toukan <tariqt@...dia.com>, "David S. Miller" <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, "Eric
 Dumazet" <edumazet@...gle.com>
CC: <netdev@...r.kernel.org>, Saeed Mahameed <saeedm@...dia.com>, Gal Pressman
	<gal@...dia.com>, Leon Romanovsky <leonro@...dia.com>, Dragos Tatulea
	<dtatulea@...dia.com>
Subject: Re: [PATCH net 2/2] net/mlx5e: Fix features validation check for
 tunneled UDP (non-VXLAN) packets



On 06.06.2024 22:32, Tariq Toukan wrote:
> From: Gal Pressman <gal@...dia.com>
> 
> Move the vxlan_features_check() call to after we verified the packet is
> a tunneled VXLAN packet.
> 
> Without this, tunneled UDP non-VXLAN packets (for ex. GENENVE) might
> wrongly not get offloaded.
> In some cases, it worked by chance as GENEVE header is the same size as
> VXLAN, but it is obviously incorrect.
> 
> Fixes: e3cfc7e6b7bd ("net/mlx5e: TX, Add geneve tunnel stateless offload support")
> Signed-off-by: Gal Pressman <gal@...dia.com>
> Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
> Signed-off-by: Tariq Toukan <tariqt@...dia.com>
> ---

Reviewed-by: Wojciech Drewek <wojciech.drewek@...el.com>

>  drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> index c53c99dde558..a605eae56685 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
> @@ -4875,7 +4875,7 @@ static netdev_features_t mlx5e_tunnel_features_check(struct mlx5e_priv *priv,
>  
>  		/* Verify if UDP port is being offloaded by HW */
>  		if (mlx5_vxlan_lookup_port(priv->mdev->vxlan, port))
> -			return features;
> +			return vxlan_features_check(skb, features);
>  
>  #if IS_ENABLED(CONFIG_GENEVE)
>  		/* Support Geneve offload for default UDP port */
> @@ -4901,7 +4901,6 @@ netdev_features_t mlx5e_features_check(struct sk_buff *skb,
>  	struct mlx5e_priv *priv = netdev_priv(netdev);
>  
>  	features = vlan_features_check(skb, features);
> -	features = vxlan_features_check(skb, features);
>  
>  	/* Validate if the tunneled packet is being offloaded by HW */
>  	if (skb->encapsulation &&

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ