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: <IA3PR11MB9254F2273FF0D0280AF049FED840A@IA3PR11MB9254.namprd11.prod.outlook.com>
Date: Wed, 2 Jul 2025 17:07:40 +0000
From: "Song, Yoong Siang" <yoong.siang.song@...el.com>
To: "Song, Yoong Siang" <yoong.siang.song@...el.com>, "Nguyen, Anthony L"
	<anthony.l.nguyen@...el.com>, "David S . Miller" <davem@...emloft.net>, "Eric
 Dumazet" <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo Abeni
	<pabeni@...hat.com>, Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann
	<daniel@...earbox.net>, Jesper Dangaard Brouer <hawk@...nel.org>, "John
 Fastabend" <john.fastabend@...il.com>, "Gomes, Vinicius"
	<vinicius.gomes@...el.com>, "Kitszel, Przemyslaw"
	<przemyslaw.kitszel@...el.com>, Andrew Lunn <andrew+netdev@...n.ch>,
	Stanislav Fomichev <sdf@...ichev.me>, "Bouska, Zdenek"
	<zdenek.bouska@...mens.com>, "Bezdeka, Florian" <florian.bezdeka@...mens.com>
CC: "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"bpf@...r.kernel.org" <bpf@...r.kernel.org>
Subject: RE: [PATCH iwl-net v1 1/1] igc: Fix data_meta pointer adjustment for
 XDP zero-copy

On Tuesday, July 1, 2025 4:10 PM, Song Yoong Siang <yoong.siang.song@...el.com> wrote:
>Remove the unnecessary increment of the data_meta pointer to ensure the
>metadata area is correctly presented to XDP program and to avoid accidental
>overwriting of device-reserved metadata by XDP programs.
>
>Previously, the data_meta pointer was incorrectly advanced when handling
>hardware timestamps for XDP zero-copy frames. Since the HW timestamp is no
>longer copied into a local variable, there is no need to adjust data_meta.
>
>Fixes: 069b142f5819 ("igc: Add support for PTP .getcyclesx64()")
>Reported-by: Zdenek Bouska <zdenek.bouska@...mens.com>
>Closes: https://lore.kernel.org/netdev/AS1PR10MB5675499EE0ED3A579151D3D3EBE02@AS1PR10MB5675.EURPRD10.PROD.OUTLOOK.COM/
>Signed-off-by: Song Yoong Siang <yoong.siang.song@...el.com>
>---
> drivers/net/ethernet/intel/igc/igc_main.c | 5 -----
> 1 file changed, 5 deletions(-)
>
>diff --git a/drivers/net/ethernet/intel/igc/igc_main.c
>b/drivers/net/ethernet/intel/igc/igc_main.c
>index 686793c539f2..8362e789777e 100644
>--- a/drivers/net/ethernet/intel/igc/igc_main.c
>+++ b/drivers/net/ethernet/intel/igc/igc_main.c
>@@ -2829,11 +2829,6 @@ static int igc_clean_rx_irq_zc(struct igc_q_vector
>*q_vector, const int budget)
> 			ctx->rx_ts = bi->xdp->data;
>
> 			bi->xdp->data += IGC_TS_HDR_LEN;
>-
>-			/* HW timestamp has been copied into local variable. Metadata
>-			 * length when XDP program is called should be 0.
>-			 */
>-			bi->xdp->data_meta += IGC_TS_HDR_LEN;
> 			size -= IGC_TS_HDR_LEN;
> 		} else {
> 			ctx->rx_ts = NULL;
>--
>2.34.1
>

Following the discussion in [1], since there is no strong justification for making
the metadata length user-visible at this time, we have opted to retain the
current implementation of the data_meta pointer.

[1] https://lore.kernel.org/netdev/IA3PR11MB92541178AAF28F03639A9435D840A@IA3PR11MB9254.namprd11.prod.outlook.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ