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, 30 Oct 2018 11:09:21 -0700
From:   Cong Wang <xiyou.wangcong@...il.com>
To:     Eric Dumazet <edumazet@...gle.com>
Cc:     David Miller <davem@...emloft.net>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        Eric Dumazet <eric.dumazet@...il.com>, eranbe@...lanox.com,
        Saeed Mahameed <saeedm@...lanox.com>, dmichail@...gle.com,
        Paweł Staszewski <pstaszewski@...are.pl>
Subject: Re: [PATCH net] net/mlx5e: fix csum adjustments caused by RXFCS

On Tue, Oct 30, 2018 at 12:57 AM Eric Dumazet <edumazet@...gle.com> wrote:
> -static __be32 mlx5e_get_fcs(struct sk_buff *skb)
> +static u32 mlx5e_get_fcs(const struct sk_buff *skb)
>  {
> -       int last_frag_sz, bytes_in_prev, nr_frags;
> -       u8 *fcs_p1, *fcs_p2;
> -       skb_frag_t *last_frag;
> -       __be32 fcs_bytes;
> +       const void *fcs_bytes;
> +       u32 _fcs_bytes;
>
> -       if (!skb_is_nonlinear(skb))
> -               return *(__be32 *)(skb->data + skb->len - ETH_FCS_LEN);
> +       fcs_bytes = skb_header_pointer(skb, skb->len - ETH_FCS_LEN,
> +                                      ETH_FCS_LEN, &_fcs_bytes);

At least skb_header_pointer() is marked as __must_check, I don't see
you check its return value here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ