From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E3565606A322 for ; Wed, 2 Dec 2026 07:13:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=2nHmSK2P; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CHWhpV74 Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C5BD18089D; Wed, 2 Dec 2026 07:13:12 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id UwX9Bjz1ACwM; Wed, 2 Dec 2026 07:13:11 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 33119807BE Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796195591; b=N/DBIt7IKyWjURpJfueHaGj9cEd1TB5h4FLXsBuO5Lr83F5PPKaxEVRxdfFg5wt8gJae rg1c2EGMnEqng0zI7FHbkDjdADOJDpNoT6xCkis1QXUam3k14nvhsT2XmIU6Ad7ByvJRZ 7RqFRexR/udxnRe7DzJRzHTuN/iQVvUdUhSpf73HCgVoSHI453b+OMTvOwPPzu8hW9jwK hSWjiEhjWusPkcYopRJfvGbzKGfII/Rma6G/cUAz7GEO2ePN4ZfoQDahOlwbG+RRQ61rl yQaNYZ2bckdXgVt+MPt0yV5kpImMSGsEYWTxbxLUlVuNnLmmtkK676pumF7p9659p9A== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796195591; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received:Received: Received:DKIM-Signature:Message-ID:From:Subject:To:Cc:In-Reply-To: References:Content-Type:Content-Transfer-Encoding:Date:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Reply-To:Errors-To; bh=I6Lar4CORqQwpe20XqWGdHNeJVa6UTeQBlYhU/rw3SU=; b=TNB5puL+HeAC2yfgQ3rqxA7jrflPKsmfblwugKIUYvdzPrh1fuXu2GcBItcJdbjlpSti xq9gzM1VEmURG1ewptseCKpHiKtyCRc9xXthO/Wvuw5X9hZeQp/OYtnUl2oQkXAo/E9qT ynsEETd5hjufMPdMB4CbxBwgKhe0m7FMn6J7DrUy2NnV7dhDl8MDqQFvs0lAJoz3OIUEJ bnYdiHI43NwH/7j0dBgSzRlGwj12DaoFZL6HNDeEXrgZ0tuoj6KPsoqSLn3AZZUE+qIsz iSGMrNyNlylMnk5ChVrLEwjEEniV7IZkXfp0d8OrIr11AqkWfeq7vymtDoHEqUqZouw== ARC-Authentication-Results: i=1; smtp1.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796195591; bh=I6Lar4CORqQwpe20XqWGdHNeJVa6UTeQBlYhU/rw3SU=; h=From:Subject:To:Cc:In-Reply-To:References:Date:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: Reply-To:From; b=2nHmSK2PHqpb6wS7HjensvXzWrUs6ZiBd2CdXDn3r/zxDYvh4/I8IikaacQ0miXRh YAv9e9Qky4qSkUtYJwLAGYyogOzoshZi3oe6MYkb8+5l9lgZeS2+bWOXOyBfzdcQK8 /F9Y7sibrCzbSfO8HpYJwrT4C16Cy7GMLsw0efLwmhyOPU2eBhXkm0gb4LMdboYudS ufk+n+MdqGjgwn162DK+5sB4DeRNNXzy7SQ/kK1lVa8p/kmfoFZnjSLWhMVkXjIlVy Zg0k7ubMSh7gsrGs5xEwvA1PgD58+/1ixx6HkV2ZSQbsjPf/78OdjUeXyP1YsMYkt+ Tn+2ewhpZHDDw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 33119807BE; Wed, 2 Dec 2026 07:13:11 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id 361F2325 for ; Wed, 2 Dec 2026 07:13:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 2816E408C3 for ; Wed, 2 Dec 2026 07:13:10 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id oJfa0a7GimFM for ; Wed, 2 Dec 2026 07:13:09 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 1E496408BE Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip="2600:3c04:e001:324:0:1991:8:25" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2600:3c04:e001:324:0:1991:8:25; helo=tor.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=CHWhpV74 Received: from tor.source.kernel.org (tor.source.kernel.org [IPv6:2600:3c04:e001:324:0:1991:8:25]) by smtp4.osuosl.org (Postfix) with ESMTPS id 1E496408BE for ; Wed, 2 Dec 2026 07:13:08 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id CEE3A6234B; Wed, 2 Dec 2026 07:13:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 78A4B1F000C1; Wed, 2 Dec 2026 07:13:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796195586; bh=I6Lar4CORqQwpe20XqWGdHNeJVa6UTeQBlYhU/rw3SU=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=CHWhpV74W2UOkDaZCR4y5PuZMghQptFFOuWxIlHsB2rvT0o1sY3gcMefG35YGrGbH 6A4tIrDb43T2Js24m7LuI8Bm9rtSFc5hu/aBScVuNOqyk1tKhoDIcqrFb/o1/zqrWM SaNnS6k0hIq334smuvFIHrm9H+MCUp9xRZ5feISb2RaPvr3WE/oDQjuhyuiOUpQ5LK Lz1oHNcWQFsN0aHUcgC8zXn0K7Td9m3Oyib+zjqHfgnUduKZlG7ULOhErHIbYkDFw/ FDbDGmJLa5Qtl107p+6O9baxkAcy7asqoXQokmtWpYDuaFrc1z5XY9M7j6aGJ8Zoyv p6k9+ce1XK+Xw== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v1 iwl-next 5/5] idpf: Unmap Rx payload pages under DMA-FQ IOMMU. To: "Kuniyuki Iwashima" Cc: intel-wired-lan@lists.osuosl.org In-Reply-To: <20261202065737.207610-6-kuniyu@google.com> References: <20261202065737.207610-1-kuniyu@google.com> <20261202065737.207610-6-kuniyu@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 07:13:06 +0000 X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: Thank you for your contribution! Sashiko AI review found no new issues in this patch, but noticed 1 related pre-existing issue it does not introduce: - [Critical] idpf: dangling bufq->xsk_buf pointer in idpf_xskfq_rel() [1] -- commit 102db293b209cf2d45959e6eb23ac7fd38343bc6 Author: Kuniyuki Iwashima idpf: Unmap Rx payload pages under DMA-FQ IOMMU. This commit opts out of page_pool DMA mapping in splitq mode when XDP is disabled under IOMMU_DOMAIN_DMA_FQ, tracking active descriptor counts per page and unmapping each payload page once all of its descriptors complete. > diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/et= hernet/intel/idpf/idpf_txrx.c > index 78558c16412f3..561e1c19df006 100644 > --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c > +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c [ ... ] > @@ -418,13 +501,20 @@ static void idpf_rx_buf_rel_bufq(struct idpf_buf_qu= eue *bufq) > } > =20 > /* Free all the bufs allocated and given to hw on Rx queue */ > - for (u32 i =3D 0; i < bufq->desc_count; i++) > - idpf_rx_page_rel(&bufq->buf[i]); > + for (u32 i =3D 0; i < bufq->desc_count; i++) { > + if (bufq->buf[i].netmem) { > + idpf_rx_buf_sync_unmap(bufq, i, 0); > + idpf_rx_page_rel(&bufq->buf[i]); > + } > + } [Severity: Critical] This problem wasn't introduced by this patch, but can idpf_xskfq_rel() leave a dangling pointer in bufq->xsk_buf (which shares an anonymous union with bufq->buf) [1]? drivers/net/ethernet/intel/idpf/xsk.c:idpf_xskfq_rel() { struct libeth_xskfq fq =3D { .fqes =3D bufq->xsk_buf, }; libeth_xskfq_destroy(&fq); ... } When disabling or reconfiguring an XSk pool on a running interface via idpf_xsk_pool_setup(), idpf_rx_buf_rel_bufq() calls idpf_xskfq_rel(bufq) and returns without clearing bufq->xsk_buf, and idpf_xsk_clear_queue() then clears __IDPF_Q_XSK. If re-enabling the queue pair in idpf_qp_switch() fails before bufq->buf is reallocated, a later idpf_vport_stop() calls idpf_rx_buf_rel_bufq() with __IDPF_Q_XSK cleared and a non-NULL dangling bufq->buf, causing this loop to walk the freed XSk pointer array as struct libeth_fqe entries (use-after-free and out-of-bounds reads) before libeth_rx_fq_destroy() double-frees bufq->buf. [1] https://sashiko.dev/#/bug/linux-35f48909-5f9a-4fd2-90be-88cfbcea1d44 --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202065737.2076= 10-1-kuniyu@google.com?part=3D5