Article View: linux.kernel.netdev
Article #10070Re: [PATCH net 0/9] xsk: ZC mbuf fixes
From: Björn Töpel
Date: Tue, 03 Nov 2026 04:48
Date: Tue, 03 Nov 2026 04:48
36 lines
9218 bytes
9218 bytes
Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes: > Welcome, > > Nagato Shiratana reported that duplicate fill ring addresses in aligned > mode let a driver pass the same buffer to xsk_buff_add_frag() twice. > This corrupts pool->xskb_list and can lead to a NULL pointer > dereference in xp_free(). Patch 1 makes xsk_buff_add_frag() reject > such buffers. > > Inspecting the rest of the zero-copy multi-buffer code found more > issues: > > - i40e retries a freed frame, or stalls the queue on a duplicate, when > xsk_buff_add_frag() fails (patch 2) > - ice leaks the buffer when a frag is empty or cannot be added (patch 3) > - ice and libeth free the frags of a frame still being received when > a multi-buffer XDP_TX frame completes (patches 4-5) > - handing out a duplicate of a frame's head clears its frags flag, so > its frags stay on pool->xskb_list and end up in the next frame > (patch 6) > - ice and idpf leak a partially received frame on ring cleanup, and > its frags end up in the next frame (patches 8-9) > > Patch 7 is Chenguang Zhao's fix for i40e building broken skbs from > multi-buffer frames. It was posted earlier in an IWL pull request [0] > and is included here unchanged. > > Patches 1 and 6 were tested with KUnit tests based on the reporter's > reproducer, plus I verified to-be-upstreamed xsk.py test suite passes > on ice driver (back-to-back setup based on netns) with this set applied. For the series, Reviewed-by: Björn Töpel <bjorn@kernel.org>
Technical Details
Message-ID:
<87ecd24j1u.fsf@all.your.base.are.belong.to.us>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355216-linux-kernel-netdev=dewy.ruReferences:
<20261102124950.958345-1-maciej.fijalkowski@intel.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355216-linux-kernel-netdev=dewy.ru From: bjorn@kernel.org (Björn Töpel) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net 0/9] xsk: ZC mbuf fixes Date: Tue, 03 Nov 2026 05:48:13 +0100 Organization: Usenet Network Message-ID: <87ecd24j1u.fsf@all.your.base.are.belong.to.us> References: <20261102124950.958345-1-maciej.fijalkowski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: usenet.network; logging-data="3097259"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:vpGMPcgBX2DzU81QVRZY0c0/Ckc= sha256:dN4XvXXIk98xiXcmlEBGm0XZ66Ts09Odw5PzxYqhw7Y= sha1:U5y0ST+MCTXt9b6766sDeiDLgRM= sha256:Cs5bVegmMNEpJe3Fkff7W4BWK/TN1jhdwa+yiD06c+c= 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 3BB0811273C; Tue, 3 Nov 2026 07:48:31 +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 c6eyLbRs8GSE; Tue, 3 Nov 2026 07:48:26 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-355216-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 3E63B11042A; Tue, 3 Nov 2026 07:48:17 +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 C26BC267CF; Tue, 3 Nov 2026 04:48: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=1793681295; b=xTq6xPge0A14suYdbx0EwLzKLsYKyEGdhVgs3b1pJly5rubrPAZwHDlYkdJSpG04MLeS amDZPK+9PZZoTsethFbbKO0adfYso/Fwt2Uk7vtgetaO2rUOyp6LmYCTBK9TDhEIOzSgz 3PoY0lxvjx0c6MorOvBRfZOcd/rGPAylEOYHbxqovDg39F7F3HVLM6r1i1BOaSOo8Sif/ EN+xgvymc/8SgLHum8l5Peq8HTsu7fVLbiXOk3TEFR62ZHwN6yCjDKvY98/OBxvsG7x80 r65m9dwKaEj6a5MjsBcHKcO7JdhGD3zVi4Wt7IHG1gm/gicobk2mb2Vc22TDFW/bwYw== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793681295; 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:Content-Transfer-Encoding; bh=u9aE0kyDPpbMxcU9KpJkb4709+D6SJWWfljxcbO7ZeY=; b=kgrh69iTu1E64RF7F/FOpkTSq70oX+0mtTpp9FZDc26mkeRL1K37LthHOFjMPmEYW8eC 7uZpmKRBU/FEv9r0X7Ta7miQNeF2W/wWPFvGYh8FRUVXTudyH8UmoEs7eyBuqShStuzzG 9Ba/TvmA03Olk9UjgUzcR0iaEG0pne18tX3k6ITWpkbWHjXqxY5LR9q+RhDNnSo3MgCuh z4E9kfU3mgK2OkSbqPK1UJ53nfH8KRdIceCTxbl0caTsOBwtW6s7TPrL4+44LtQPkGchd ei+1bNzdpPjSpEst2iBjfghHEb/ThC/wfprkVNgEzKtWkvOickXAITqztTXEg5wFC3A== 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=DEQpDlGk; 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 6BD38606A32E; Tue, 3 Nov 2026 04:48:15 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=DEQpDlGk 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=1793681294; b=07csFdZm1PyKfkxs7hICVcb6DDKMIAhtPbEHv0TF98LpEGN6wQjqKDi3ahjzi04xt+AL JWWEHGPho/u39bX0/V3b1DQWHYIgmDrU/Q8J2qnSwcE6IpIFFLdXTXodauZX4s4OiGHHX xRVIEUaYJ3EldP9xPCMam9Lw1ENcEjCV5WCW/Fcpl5VuJs6PQykMPgFilwp/ROyuBjZx+ QRiyLJzc8VOmo/KQjyK1BmB4Nvu0PNooubwqsy6Vz7DY6D0tmiJH6XLV2gst9nYTS0Csn GTkbGp8OsLLrIff1iVa1a3I6sR7DJRqBSiWQAFYUUPbOQnrAeFEfUG65cmkPeY55Ewg== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793681294; h=Received:DKIM-Signature:From:To:Cc:Subject:In-Reply-To:References: Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=u9aE0kyDPpbMxcU9KpJkb4709+D6SJWWfljxcbO7ZeY=; b=5SHtK4qQDJgA/nJJS4ignL+JYeTM9tLIOhkgOSDOnSddpg0fK08A6e8cz9xcLP68is9J nFCoIF5lm9QXVj6A9Xmcp84f/AyTMr7TcQdrzK9tfOX+M7NX3sPI6lQVXzhWapRMgjpn7 ZBHYfwpDYjCeREw2HYPl8mTagYDzBw0DBddmB40b6XjFcQ7msP+foj8fiMjaVo0c/T+PZ ViGvgCkNe4Ecs8oDHBx4Vy94IG03S47/2GB4ZF5ktb1JqXpEWV83BfRtNSasXG7CZlefw pYBtXaVbPdoo37/FiyS0RZs212i64VpmzkkYea60dcGb/l1EL8b4RVY8QtxJM/24gqw== 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=DEQpDlGk; 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 445E4606A324 for <netdev@vger.kernel.org>; Tue, 3 Nov 2026 04:48:14 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id C384A1F000C1; Tue, 3 Nov 2026 04:48:13 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1793681293; bh=u9aE0kyDPpbMxcU9KpJkb4709+D6SJWWfljxcbO7ZeY=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=DEQpDlGk5AfwwDou9VXIkVttUcNuTmRqPQ3xe/cnwrJxZpzBXCifq9qu+rLcksLf6 NrwkzqOdh5ckMhB+FOPjIOK/zz/RCxtUr6lpTE/9kqvBCDtRgUINaBXaPIvaNgDI1X g27pFesheG197cnUZlaFndk2TTY5A5woYCliyBjJjO5D4BAp18Mapb4PRDOkbnfAEc vQjHbAq7dHmi9R3Nr9xNdpae0kqgcm59ugCYgimFzrCqaMHAq6aZTgXTrIH6AtYLsX TVpUN0AcmrFGUBrZ1arKc0BTuH/uE9PJwKJhhMaRjzImHxE/1B38w5tV06Q9w6pxKE dWXiyDijzXJ6g== X-Cc: magnus.karlsson@intel.com, stfomichev@gmail.com, kuba@kernel.org, pabeni@redhat.com, tushar.vyavahare@intel.com, kerneljasonxing@gmail.com, zuomao338@gmail.com, Maciej Fijalkowski <maciej.fijalkowski@intel.com> X-In-Reply-To: <20261102124950.958345-1-maciej.fijalkowski@intel.com> 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