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 E806B60A2604 for ; Wed, 2 Dec 2026 07:19:21 +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=9tBuuo8m; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Mos98SWn Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id C03D580EDC; Wed, 2 Dec 2026 07:19:21 +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 pkXYMoDgOQ-Q; Wed, 2 Dec 2026 07:19:19 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org CA07680F24 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=1796195959; b=SLyV1ZZxIg+o3O1PDgxCUUSRFHmBV/JKQFErrB5hzuJwsRm5YE0AfgxRmFvSBx3gpUoS cmuj3dTyEBd9rk8qSqJAiNFs9tyfMenlwU09YC7KLtAgK6MHUor+nXQorJEeFTNLKChLA EK7PS+LgZfjSf4FQJqnN7/kS9QJccWHnni9dHLWqMhWVgqlhoLXgLlJwIM4T2P3gdJ0Wd GX18HW/qyVDScbXCmPjQfTzA9TOO4O1LkrKDYU2yISO1Um8VP2kvWh7RpzAu8FzE9Dfp8 cn0bP+sQbC4nC1Wow3+yaPfvmjizR/IP+XuH1jjfRH1JcWLHWLzM6l70c2Shi0X8iAg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796195959; 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=3RpNnFGhs4blXC/IGD1fSuvKCva5SLNxAF9gByzMw2s=; b=VqTyWOU4iiqQoJPJFXagi4PgsklEd9HODQIBXr4Cg07mArf2ENkulTuB4nlPh3+JPaVg iwxjF++cqmqm7XH++VzgNPXotUkHvbStFqCYbSQgF4Ioac7mNAVQPAIRjtgb9mE+WeVhE B+4eNgcH97xPhCwirM3JY7WsfoAQXQMNyZWO0L0FNe6kPQgBw/3dA3ZwvmT3sAo47Ty8t LPWp90jTL0Cf3z+gew3Nvbf4JKqJL6ljcUyo4gk6T/CnG8HKaCUC2j0k0alOATEL4qNsI OZ97TGTeL5OlMTCXqUvs4xkipHLQzCbXdMaSECt4djJ0eoFSAUSFqbcuvvyGTk1XkFQ== 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=1796195959; bh=3RpNnFGhs4blXC/IGD1fSuvKCva5SLNxAF9gByzMw2s=; 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=9tBuuo8mVOEJHuclGj0wUl8DiDRlj/vC/0TET9/TUL0deZ49B5vwz7O9lBMtuoBKz w0wC7bLMp+6HXdh7ZCog5dZr7UBbSfDy1+EY3KmOoEQMMT/jzyRhwlRjsARXSk60XV qrNa9Mpw3S814vGmsxlmbD7bKXSRZYRLRD2GW2EMvFCROTQK1L+LN5mTPeqUYDbr6n QUh31E/PrFH3Z7pRy9biQ/Dbh9OI8xGV6DnyEikrBVrc0IHnbiLrTWcliw1swAqQn6 JgsEg0BAO5/im9/43viFy2zcQ7IuAMt+1WKmvFlEJJSVETaga80jjHtU429EVdHHCv M+V499Xim7ZZg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id CA07680F24; Wed, 2 Dec 2026 07:19:19 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists1.osuosl.org (Postfix) with ESMTP id E4FC7325 for ; Wed, 2 Dec 2026 07:19:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id D6D4D60768 for ; Wed, 2 Dec 2026 07:19:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id d9VeVKxPemSA for ; Wed, 2 Dec 2026 07:19:18 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp3.osuosl.org D3CB1605E4 Authentication-Results: smtp3.osuosl.org; arc=none smtp.remote-ip=172.105.4.254 Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.4.254; helo=tor.source.kernel.org; envelope-from=sashiko-bot@kernel.org; receiver= Authentication-Results: smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=kernel.org Authentication-Results: smtp3.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=Mos98SWn Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by smtp3.osuosl.org (Postfix) with ESMTPS id D3CB1605E4 for ; Wed, 2 Dec 2026 07:19:17 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 5BF2060F0F; Wed, 2 Dec 2026 07:19:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF6371F0092C; Wed, 2 Dec 2026 07:19:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796195956; bh=3RpNnFGhs4blXC/IGD1fSuvKCva5SLNxAF9gByzMw2s=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Mos98SWnMWAZ2sks5uAIUDrjyqExpW/5kis0MUEyzhKHoIG89x8CpRT7hKQ22N66G INIECfae+5FwXtvaAuBrQfqIuPz952e8t66iruSIQtFyzCR+VinRfGnOMDE37QBral 5avuUPa0DmZZuJZUSbCxiyRSsGhJDpiArzVsrR4k689qMRTzetmExOOsYhjQ1DPVwB Vj7+m0eP/Vt2gb4ZIkOed/3i+tF/7qlyCApVZEW/FQ1WVGQkXMZ+ySxqpwqsn1wNeu gH2/hsOoXpNRK5Pxff2d53sljR4HnlNppH3RNJ6VXTn2lSw6tDhNRXNtRLBP2A6MV9 zdsRrDyq0nOwg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v1 iwl-next 2/5] idpf: Use coherent DMA buffer for Rx header split without XDP. To: "Kuniyuki Iwashima" Cc: intel-wired-lan@lists.osuosl.org In-Reply-To: <20261202065737.207610-3-kuniyu@google.com> References: <20261202065737.207610-1-kuniyu@google.com> <20261202065737.207610-3-kuniyu@google.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Wed, 02 Dec 2026 07:19:15 +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_NONE,SPF_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 1 potential issue to consider: - [Medium] idpf: wrong RSC segment count in idpf_rx_rsc() on header buffer overflow -- commit 3759b354320e7c5e9977e8bab71b077ad23bfb55 Author: Kuniyuki Iwashima idpf: Use coherent DMA buffer for Rx header split without XDP. This commit allocates a coherent DMA buffer array per buffer queue for Rx header split on DMA-coherent devices under an IOMMU DMA domain without XDP, copying Rx headers into napi_alloc_skb() to avoid pinning page_pool header pages. > diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/et= hernet/intel/idpf/idpf_txrx.c > index 7a33ab9130693..78558c16412f3 100644 > --- a/drivers/net/ethernet/intel/idpf/idpf_txrx.c > +++ b/drivers/net/ethernet/intel/idpf/idpf_txrx.c [ ... ] > @@ -3450,14 +3540,20 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rxq,= struct sk_buff *skb, > if (unlikely(!(ipv4 ^ ipv6))) > return -EINVAL; > =20 > + if (unlikely(eth_type_vlan(skb->protocol))) > + l3_start =3D VLAN_HLEN; > + > + if (unlikely(!pskb_may_pull(skb, l3_start + > + (ipv4 ? sizeof(struct iphdr) : > + sizeof(struct ipv6hdr)) + > + sizeof(struct tcphdr)))) > + return -EINVAL; > + > rsc_segments =3D DIV_ROUND_UP(skb->data_len, rsc_seg_len); [Severity: Medium] Does idpf_rx_rsc() miscalculate rsc_segments on header buffer overflow when TCP options are present? When hdr_len is 0 and pkt_len > L1_CACHE_BYTES, idpf_rx_splitq_clean_skb() copies only ETH_HLEN bytes into the linear skb area and leaves the L3/L4 headers and payload in frags[0]. pskb_may_pull() here only pulls the fixed L3 header and the 20-byte base struct tcphdr, leaving any TCP options (such as the 12-byte TCP timestamp option) in skb->data_len when DIV_ROUND_UP(skb->data_len, rsc_seg_len) runs. For an RSC packet with N full segments of rsc_seg_len bytes plus TCP options, rsc_segments and skb_shinfo(skb)->gso_segs become N + 1 instead of N, causing tcp_gro_receive() to flush the packet without aggregation (or tcp_gso_segment() to drop a 1-MSS RSC packet with -EINVAL). Also, if hdr_len is 0 and pkt_len <=3D L1_CACHE_BYTES, the entire frame is copied in= to linear data so skb->data_len is 0, setting rsc_segments and gso_segs to 0. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202065737.2076= 10-1-kuniyu@google.com?part=3D2