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: <CACGkMEt2FFSiodAN=FFT7JnV78pmVRN4VTr_XDm05J0xpSfmHA@mail.gmail.com>
Date: Thu, 27 Nov 2025 09:27:16 +0800
From: Jason Wang <jasowang@...hat.com>
To: Jon Kohler <jon@...anix.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@...il.com>, Andrew Lunn <andrew+netdev@...n.ch>, 
	"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	"Michael S. Tsirkin" <mst@...hat.com>, Xuan Zhuo <xuanzhuo@...ux.alibaba.com>, 
	Eugenio Pérez <eperezma@...hat.com>, 
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>, 
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, 
	"virtualization@...ts.linux.dev" <virtualization@...ts.linux.dev>
Subject: Re: [PATCH net v3] virtio-net: avoid unnecessary checksum calculation
 on guest RX

On Thu, Nov 27, 2025 at 12:12 AM Jon Kohler <jon@...anix.com> wrote:
>
>
>
> > On Nov 26, 2025, at 1:29 AM, Jason Wang <jasowang@...hat.com> wrote:
> >
> > On Wed, Nov 26, 2025 at 5:46 AM Jon Kohler <jon@...anix.com> wrote:
> >>
> >> Commit a2fb4bc4e2a6 ("net: implement virtio helpers to handle UDP
> >> GSO tunneling.") inadvertently altered checksum offload behavior
> >> for guests not using UDP GSO tunneling.
> >>
> >> Before, tun_put_user called tun_vnet_hdr_from_skb, which passed
> >> has_data_valid = true to virtio_net_hdr_from_skb.
> >>
> >> After, tun_put_user began calling tun_vnet_hdr_tnl_from_skb instead,
> >> which passes has_data_valid = false into both call sites.
> >>
> >> This caused virtio hdr flags to not include VIRTIO_NET_HDR_F_DATA_VALID
> >> for SKBs where skb->ip_summed == CHECKSUM_UNNECESSARY. As a result,
> >> guests are forced to recalculate checksums unnecessarily.
> >>
> >> Restore the previous behavior by ensuring has_data_valid = true is
> >> passed in the !tnl_gso_type case, but only from tun side, as
> >> virtio_net_hdr_tnl_from_skb() is used also by the virtio_net driver,
> >> which in turn must not use VIRTIO_NET_HDR_F_DATA_VALID on tx.
> >>
> >> Cc: Paolo Abeni <pabeni@...hat.com>
> >> Fixes: a2fb4bc4e2a6 ("net: implement virtio helpers to handle UDP GSO tunneling.")
> >> Signed-off-by: Jon Kohler <jon@...anix.com>
> >> ---
> >
> > Acked-by: Jason Wang <jasowang@...hat.com>
> >
> > (Should this go -stable?)
> >
> > Thanks
>
> It could, sure. This made it into 6.17 branch.
>
> Would you like me to send a separate patch with a Cc: stable
> or could someone just edit the commit msg when they queue
> this?

I think a new version might be better.

Thanks


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ