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] [day] [month] [year] [list]
Message-ID: <CANn89iKG4XE448P-AjQKkoK9kJkdBCXMP244biHbcrSA_zDmKQ@mail.gmail.com>
Date: Wed, 8 May 2024 09:11:44 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: "David S . Miller" <davem@...emloft.net>, Paolo Abeni <pabeni@...hat.com>, netdev@...r.kernel.org, 
	eric.dumazet@...il.com, Steve Glendinning <steve.glendinning@...well.net>, 
	UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH net-next] net: usb: smsc95xx: stop lying about skb->truesize

On Wed, May 8, 2024 at 2:41 AM Jakub Kicinski <kuba@...nel.org> wrote:
>
> On Mon,  6 May 2024 14:28:35 +0000 Eric Dumazet wrote:
> > -                     ax_skb->len = size;
> > -                     ax_skb->data = packet;
> > -                     skb_set_tail_pointer(ax_skb, size);
> > +                     skb_put(ax_skb, size - 4);
> > +                     memcpy(ax_skb->data, packet, size - 4);
> >
> >                       if (dev->net->features & NETIF_F_RXCSUM)
> >                               smsc95xx_rx_csum_offload(ax_skb);
> > -                     skb_trim(ax_skb, ax_skb->len - 4); /* remove fcs */
> > -                     ax_skb->truesize = size + sizeof(struct sk_buff);
>
> I think this one's off:
>
> static void smsc95xx_rx_csum_offload(struct sk_buff *skb)
> {
>      skb->csum = *(u16 *)(skb_tail_pointer(skb) - 2);
>      skb->ip_summed = CHECKSUM_COMPLETE;
>      skb_trim(skb, skb->len - 2);
> }

Good catch, I will revise this patch accordingly, thanks !

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ