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: <808e68e6-ba0e-4a2d-8b20-8555f53c586f@lunn.ch>
Date: Thu, 13 Nov 2025 14:10:19 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Wei Fang <wei.fang@....com>
Cc: Shenwei Wang <shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>,
	"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>,
	"davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>,
	"kuba@...nel.org" <kuba@...nel.org>,
	"pabeni@...hat.com" <pabeni@...hat.com>,
	"eric@...int.com" <eric@...int.com>,
	"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 4/5] net: fec: remove rx_align from
 fec_enet_private

> Sorry, I misremembered the value of XDP_PACKET_HEADROOM. it should
> be 256 bytes.
> 
> See fec_enet_alloc_rxq_buffers():
> 
> phys_addr = page_pool_get_dma_addr(page) + FEC_ENET_XDP_HEADROOM;
> bdp->cbd_bufaddr = cpu_to_fec32(phys_addr);
> 
> I will correct it in v2, thanks

So you could add a BUILD_BUG_ON() test which makes sure
FEC_ENET_XDP_HEADROOM gives you the needed alignment. That way it is
both "documented" and enforced. And it costs nothing at runtime.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ