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: <20240507174151.477792ac@kernel.org>
Date: Tue, 7 May 2024 17:41:51 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <edumazet@...gle.com>
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 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);
}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ