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]
Date: Mon, 22 Jan 2024 20:49:38 +0000
From: Simon Horman <horms@...nel.org>
To: mhklinux@...look.com
Cc: haiyangz@...rosoft.com, wei.liu@...nel.org, decui@...rosoft.com,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, linux-kernel@...r.kernel.org,
	linux-hyperv@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net 1/1] hv_netvsc: Calculate correct ring size when
 PAGE_SIZE is not 4 Kbytes

On Mon, Jan 22, 2024 at 08:20:28AM -0800, mhkelley58@...il.com wrote:
> From: Michael Kelley <mhklinux@...look.com>
> 
> Current code in netvsc_drv_init() incorrectly assumes that PAGE_SIZE
> is 4 Kbytes, which is wrong on ARM64 with 16K or 64K page size. As a
> result, the default VMBus ring buffer size on ARM64 with 64K page size
> is 8 Mbytes instead of the expected 512 Kbytes. While this doesn't break
> anything, a typical VM with 8 vCPUs and 8 netvsc channels wastes 120
> Mbytes (8 channels * 2 ring buffers/channel * 7.5 Mbytes/ring buffer).
> 
> Unfortunately, the module parameter specifying the ring buffer size
> is in units of 4 Kbyte pages. Ideally, it should be in units that
> are independent of PAGE_SIZE, but backwards compatibility prevents
> changing that now.
> 
> Fix this by having netvsc_drv_init() hardcode 4096 instead of using
> PAGE_SIZE when calculating the ring buffer size in bytes. Also
> use the VMBUS_RING_SIZE macro to ensure proper alignment when running
> with page size larger than 4K.
> 
> Cc: <stable@...r.kernel.org> # 5.15.x
> Signed-off-by: Michael Kelley <mhklinux@...look.com>

Hi Michael,

As a bug fix this probably warrants a fixes tag.
Perhaps this is appropriate?

Fixes: 450d7a4b7ace ("Staging: hv: ring parameter")

..

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ