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: <4e98f967-f636-46fb-9eca-d383b9495b86@roeck-us.net>
Date: Sat, 1 Feb 2025 11:14:41 -0800
From: Guenter Roeck <linux@...ck-us.net>
To: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
	Jose Abreu <joabreu@...opsys.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>,
	Maxime Coquelin <mcoquelin.stm32@...il.com>,
	Russell King <linux@...linux.org.uk>,
	Yanteng Si <si.yanteng@...ux.dev>, Furong Xu <0x1207@...il.com>,
	Joao Pinto <Joao.Pinto@...opsys.com>, netdev@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v4 3/3] net: stmmac: Specify hardware capability
 value when FIFO size isn't specified

Hi,

On Mon, Jan 27, 2025 at 10:38:20AM +0900, Kunihiko Hayashi wrote:
> When Tx/Rx FIFO size is not specified in advance, the driver checks if
> the value is zero and sets the hardware capability value in functions
> where that value is used.
> 
> Consolidate the check and settings into function stmmac_hw_init() and
> remove redundant other statements.
> 
> If FIFO size is zero and the hardware capability also doesn't have upper
> limit values, return with an error message.
> 
> Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>

This patch breaks qemu's stmmac emulation, for example for
npcm750-evb. The error message is:
	stmmaceth f0804000.eth: Can't specify Rx FIFO size

The setup function called for the emulated hardware is dwmac1000_setup().
That function does not set the DMA rx or tx fifo size.

At the same time, the rx and tx fifo size is not provided in the
devicetree file (nuvoton-npcm750.dtsi), so the failure is obvious.

I understand that the real hardware may be based on a more recent
version of the DWMAC IP which provides the DMA tx/rx fifo size, but
I do wonder: Are the benefits of this patch so substantial that it
warrants breaking the qemu emulation of this network interface ?

Thanks,
Guenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ