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: <fa3cd687961e63dd2b79780eb84c243c8d35532a.camel@infradead.org>
Date: Thu, 08 Jan 2026 17:33:42 +0100
From: David Woodhouse <dwmw2@...radead.org>
To: Will Deacon <will@...nel.org>, linux-kernel@...r.kernel.org
Cc: Keir Fraser <keirf@...gle.com>, Steven Moreland <smoreland@...gle.com>, 
 Frederick Mayle <fmayle@...gle.com>, Stefan Hajnoczi <stefanha@...hat.com>,
 Stefano Garzarella <sgarzare@...hat.com>,  "Michael S. Tsirkin"
 <mst@...hat.com>, Jason Wang <jasowang@...hat.com>, Eugenio
 Pérez <eperezma@...hat.com>, netdev@...r.kernel.org,
 virtualization@...ts.linux.dev
Subject: Re: [PATCH v4 4/9] vsock/virtio: Resize receive buffers so that
 each SKB fits in a 4K page

On Thu, 2025-07-17 at 10:01 +0100, Will Deacon wrote:
> 
> -#define VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE	(1024 * 4)
> +/* Dimension the RX SKB so that the entire thing fits exactly into
> + * a single 4KiB page. This avoids wasting memory due to alloc_skb()
> + * rounding up to the next page order and also means that we
> + * don't leave higher-order pages sitting around in the RX queue.
> + */
> +#define
> VIRTIO_VSOCK_DEFAULT_RX_BUF_SIZE	SKB_WITH_OVERHEAD(1024 * 4)

Should this be SKB_WITH_OVERHEAD()?

Or should it subtract VIRTIO_VSOCK_SKB_HEADROOM instead?

(And also, I have use cases where I want to expand this to 64KiB. Can I
make it controllable with a sockopt? module param?)

Download attachment "smime.p7s" of type "application/pkcs7-signature" (5069 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ