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: <20250815120747.4634-1-hdanton@sina.com>
Date: Fri, 15 Aug 2025 20:07:46 +0800
From: Hillf Danton <hdanton@...a.com>
To: "Michael S. Tsirkin" <mst@...hat.com>
Cc: Will Deacon <will@...nel.org>,
	linux-kernel@...r.kernel.org,
	Stefano Garzarella <sgarzare@...hat.com>,
	Jason Wang <jasowang@...hat.com>,
	netdev@...r.kernel.org,
	virtualization@...ts.linux.dev
Subject: Re: [PATCH v4 9/9] vsock/virtio: Allocate nonlinear SKBs for handling large transmit buffers

On Fri, 15 Aug 2025 06:22:56 -0400 "Michael S. Tsirkin" wrote:
> On Wed, Aug 13, 2025 at 09:25:53PM +0800, Hillf Danton wrote:
> > On Wed, 13 Aug 2025 04:41:09 -0400 "Michael S. Tsirkin" wrote:
> > > On Thu, Jul 17, 2025 at 10:01:16AM +0100, Will Deacon wrote:
> > > > When transmitting a vsock packet, virtio_transport_send_pkt_info() calls
> > > > virtio_transport_alloc_linear_skb() to allocate and fill SKBs with the
> > > > transmit data. Unfortunately, these are always linear allocations and
> > > > can therefore result in significant pressure on kmalloc() considering
> > > > that the maximum packet size (VIRTIO_VSOCK_MAX_PKT_BUF_SIZE +
> > > > VIRTIO_VSOCK_SKB_HEADROOM) is a little over 64KiB, resulting in a 128KiB
> > > > allocation for each packet.
> > > > 
> > > > Rework the vsock SKB allocation so that, for sizes with page order
> > > > greater than PAGE_ALLOC_COSTLY_ORDER, a nonlinear SKB is allocated
> > > > instead with the packet header in the SKB and the transmit data in the
> > > > fragments. Note that this affects both the vhost and virtio transports.
> > > > 
> > > > Reviewed-by: Stefano Garzarella <sgarzare@...hat.com>
> > > > Signed-off-by: Will Deacon <will@...nel.org>
> > > 
> > > So this caused a regression, see syzbot report:
> > > 
> > > https://lore.kernel.org/all/689a3d92.050a0220.7f033.00ff.GAE@google.com
> > > 
> > > I'm inclined to revert unless we have a fix quickly.
> > > 
> > Because recomputing skb len survived the syzbot test [1], Will looks innocent.
> > 
> > [1] https://lore.kernel.org/lkml/689c8d08.050a0220.7f033.014a.GAE@google.com/
> 
> I'm not sure I follow that patch though. Do you mind submitting
> with an explanation in the commit log?
> 
It is a simple debug patch to test if Will's work is good at least in the
syzbot scenario, but stil a couple miles away from a patch with the SOB tag.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ