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]
Date:   Tue, 23 May 2017 13:58:44 +0300
From:   Saeed Mahameed <saeedm@....mellanox.co.il>
To:     Jesper Dangaard Brouer <brouer@...hat.com>
Cc:     Saeed Mahameed <saeedm@...lanox.com>,
        Daniel Borkmann <borkmann@...earbox.net>,
        Linux Netdev List <netdev@...r.kernel.org>,
        Tariq Toukan <tariqt@...lanox.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
Subject: Re: [net PATCH] mlx5: fix bug reading rss_hash_type from CQE

On Mon, May 22, 2017 at 9:13 PM, Jesper Dangaard Brouer
<brouer@...hat.com> wrote:
> Masks for extracting part of the Completion Queue Entry (CQE)
> field rss_hash_type was swapped, namely CQE_RSS_HTYPE_IP and
> CQE_RSS_HTYPE_L4.
>
> The bug resulted in setting skb->l4_hash, even-though the
> rss_hash_type indicated that hash was NOT computed over the
> L4 (UDP or TCP) part of the packet.
>
> Added comments from the datasheet, to make it more clear what
> these masks are selecting.
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@...hat.com>
> ---
>  include/linux/mlx5/device.h |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/mlx5/device.h b/include/linux/mlx5/device.h
> index dd9a263ed368..a940ec6a046c 100644
> --- a/include/linux/mlx5/device.h
> +++ b/include/linux/mlx5/device.h
> @@ -787,8 +787,14 @@ enum {
>  };
>
>  enum {
> -       CQE_RSS_HTYPE_IP        = 0x3 << 6,
> -       CQE_RSS_HTYPE_L4        = 0x3 << 2,
> +       CQE_RSS_HTYPE_IP        = 0x3 << 2,
> +       /* cqe->rss_hash_type[3:2] - IP destination selected for hash
> +        * (00 = none,  01 = IPv4, 10 = IPv6, 11 = Reserved)
> +        */
> +       CQE_RSS_HTYPE_L4        = 0x3 << 6,
> +       /* cqe->rss_hash_type[7:6] - L4 destination selected for hash
> +        * (00 = none, 01 = TCP. 10 = UDP, 11 = IPSEC.SPI
> +        */
>  };
>

Acked-by: Saeed Mahameed <saeedm@...lanox.com>

Nice catch Jesper !!

Can I ask how did you find the hash was wrong ? any
counters/indicators we can look for in internal testing ?

>  enum {
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ