🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #25357

Re: [PATCH net v2 4/4] xsk: Keep the shared info of zero-copy buffers in kernel memory

#25357
From: Björn Töpel
Date: Tue, 01 Dec 2026 16:01
30 lines
9351 bytes
netdev-bot+sashiko@kernel.org writes:

> [Severity: Low]
> The message names only the libeth prerequisite. Does this patch also
> depend on two other commits from the same series?

Yes. A backport of this patch needs patches 1 to 3 of this series, which
stop libeth and the skb builders from relying on the shared info at the
end of the frame.

> [Severity: Medium]
> With XDP_FLAGS_SINFO_EXT set, bpf_xdp_adjust_tail() can now grow
> data_end up to data_hard_start + frame_sz. xsk_rcv_check() in
> net/xdp/xsk.c was not updated. Does it still agree with this new bound?

The larger tail only lets a packet that still fits in its own chunk
reach xsk_rcv_check(), which drops it and counts rx_dropped, as for any
packet longer than the socket's frame size. Nothing reads or writes
outside the chunk, and bpf_xdp_adjust_head() could already reach the
same check. Changing the frame size limit would change what userspace
sees, so I'd rather not do that in a net fix.

> [Severity: Critical]
> This is a pre-existing issue and was not introduced by this patch, but
> it is in the class of bug this patch closes. dpaa2 stores a kernel
> pointer inside the UMEM chunk, which userspace can write.

Agreed, that is real and separate from this series. I'll report it to
the dpaa2 maintainer.
Technical Details
Message-ID: <87y0a9ng6z.fsf@all.your.base.are.belong.to.us>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375205-linux-kernel-netdev=dewy.ru
References: <20261130123737.125432-5-bjorn@kernel.org> <179612875904.3146.8079683295083998736@kernel.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-375205-linux-kernel-netdev=dewy.ru
From: bjorn@kernel.org (Björn Töpel)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 4/4] xsk: Keep the shared info of zero-copy
 buffers in kernel memory
Date: Tue, 01 Dec 2026 17:01:08 +0100
Organization: Usenet Network
Message-ID: <87y0a9ng6z.fsf@all.your.base.are.belong.to.us>
References: <20261130123737.125432-5-bjorn@kernel.org>
 <179612875904.3146.8079683295083998736@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: usenet.network;
	logging-data="1756410"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:1R8DXOH97KW6JmhjqZggW3IFhaY= sha256:yhFOqHGE8IpXchtZ5+MJbC4/7LO1zDyO3f4y8YtxXpc=
	sha1:M8QBqnO1k2V+8Oo/VxBFrivicyw= sha256:XOL6Ce13bUdiw9CWsKy54/M8lWM1/Si3ppmhXDViEPA=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4E2F61173F6; Tue,  1 Dec 2026 19:01:41 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.401
X-Spam-Status: No, score=-3.401 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id fvFD2vp9Zukw;
	Tue,  1 Dec 2026 19:01:38 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-375205-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id BCA181173E0; Tue,  1 Dec 2026 19:01:18 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id D25A3289D9; Tue,  1 Dec 2026 16:01:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796140872;
	b=UXCyHXiAmLdqBSYMdni/lRO/DcBiEe44k33S+S+u4ylEBI01aqPf/gVDJCisNLeFz9C6
	 A6Oyxl/mwD3xBCrNt1g2aV7h786Uj0HUDPZ1aRUmRVW28hAvmBCydWRvEroU7AhWorjH0
	 /jRVUFzfSiHhnp8+pPpZu+Yfqs6d1eZhDAfJD4II48UQ1/rJIXtRYZ6v/Q3zR0uXyncf/
	 92TSxMi2bPCrgwhUmWJMIbxTPtjRqkd5MgWwSxDTSoGAD8eV74lNQQiO6Fqo4x8cjeVYu
	 1z5w+7Wg+NHrKcXHHaIEYi4pHkBtyXPkwJ9bkN39MrFD5XT7lKAKBxCCcKW+CODqg2A==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796140872;
	h=X-Original-To:Received:Received:DKIM-Signature:From:To:Cc:Subject:
	 In-Reply-To:References:Date:Message-ID:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type;
	bh=h0s7CYnO1nNOZMWWDMxYC9vyT/oa44FjfhQ+dvMLHbQ=;
	b=vQ+G7XfFFWvIlz8szKWoxVk/eLu+EPg7UcFU1rNDzTxA0vPrc93SERY41cgwpOFI2Nd2
	 JMAGjIKLuLxHRBowfQeanWwO2RpKbVzwLScR6zSB+ZMQOmbrRcjm0ByuohDxuU8M8MNP8
	 gUqGQJPc7HudXhOBNXXoYu4/N+D6InN6ZeeiBcTx2RS1ibqirBLfDBti+a5Ko1agvLnwJ
	 OEeGWHrVvMBywMSz/y31gC21fdYE8piR3CDxlK9hmwAljYGSDTY7w/CWDSNHMfRWbBO+F
	 NRQNab8rNTf22BjviJQt2XCNYrgFErvUKbRIWPnbvFZ1jBlFVYwFUYDW1ZaDdOiPzVQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BfwWpieF;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A5DFC606A330;
	Tue,  1 Dec 2026 16:01:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BfwWpieF
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796140871;
	b=E7/cZzjVFmzcxIEDZrEq+dGSod79K26OtBIrmhC0wat4s18INMM15UWgmPBioXHnEDkV
	 mcbGcKFlTinQa5uw8/QG71B8ZzQywTANhdhAKW7MmLQmZ+lfL/qTyk0tF6/yol4aCRKMa
	 qv//U/P0T79cdLsgoxB3XTOkE0X3vm62w+8Aik3BlOkjADCvQYr5zahKMeQ14BC1T1oFM
	 en9LGKEfGJ4FJAovO4HURH0PIU848ZIBrSHsmE03/7k4IWyeYbXzO5KQlnbpJTTRZtHjS
	 kFnrHLWepXdk104a0aRdxPaN+KmtYLQN9bt/Pll7/Wvdkb54m60lg+baelgZd+K/4Tg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796140871;
	h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References:
	 Date:Message-ID:MIME-Version:Content-Type;
	bh=h0s7CYnO1nNOZMWWDMxYC9vyT/oa44FjfhQ+dvMLHbQ=;
	b=goqF8bELbWGwbEVrm2aVCSP/MfvHAO/m0I9Z5AHzfcwZlbrNRElNLGfyojbe1vNjrnKp
	 QQARepAFy2/zy3nvuR/LE0ZFpiQ0tDrSbNkUBJGxfTR198iESNVFrrJqekXOIa21OWB3j
	 gSRmvXb4X29mXw1SlrAMKLrlRg2Mr5XbsACmo5y5haaU69XDgrF80ZM/KSsPuX4zPRMNo
	 CO7orS/s+dcEw9GuCKOPC85oVyOPJ8/miEHnxJXvQwU8vsh8ua9o5RrGusEHX0HWL1HFt
	 xkUG1iebqhZuzd8WkGHTd0eL8qmfLMabRZhUgLQ4TisoQVuhiIj47q1pb9s3pidNiXA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=BfwWpieF;
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id C2E73606A31A;
	Tue,  1 Dec 2026 16:01:11 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id B88AB1F00897;
	Tue,  1 Dec 2026 16:01:10 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1796140871;
	bh=h0s7CYnO1nNOZMWWDMxYC9vyT/oa44FjfhQ+dvMLHbQ=;
	h=From:To:Cc:Subject:In-Reply-To:References:Date;
	b=BfwWpieF0f8w8SLb8iRpz5meqXEXimzmlh1fcSKTh/xSKpUwbnIhsj0JiPOxOB6rd
	 Do4GtRuEkrwUiP6Tabrm3HuUAKOOYStKl2Hz8I51XBmqsa6dMyeRIeuEdZWuYtKaEV
	 EnW+iYm/DFxJEHT3bQPMd82FLCwXDYHN8ktW6/6FOI8Z51yEs2J797IP37NAWlP5ms
	 MQUoO4DhhQuGPZLBiWlZh1NYOzAgHG1ZTFl9H8/3ynWdTrg22Ol5kcmci4reiaarq4
	 hYDovvsvwNm2ZPvbWLSIo84+k1oLtw22cwjh44NMExSXBsOSwH8pZneLm1pxwDi+Tp
	 DdVdDHDiIDQ7g==
X-Cc: magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
 aleksander.lobakin@intel.com, ast@kernel.org, daniel@iogearbox.net,
 hawk@kernel.org, john.fastabend@gmail.com, andrii@kernel.org,
 eddyz87@gmail.com, memxor@gmail.com, davem@davemloft.net,
 edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com,
 willemb@google.com, netdev@vger.kernel.org, bpf@vger.kernel.org,
 horms@kernel.org, sdf@fomichev.me, martin.lau@linux.dev, song@kernel.org,
 yonghong.song@linux.dev, jolsa@kernel.org, emil@etsalapatis.com,
 ihor.solodrai@linux.dev, anthony.l.nguyen@intel.com,
 przemyslaw.kitszel@intel.com, intel-wired-lan@lists.osuosl.org,
 clecigne@google.com
X-In-Reply-To: <179612875904.3146.8079683295083998736@kernel.org>
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list