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 C2EFF606A31A for ; Wed, 2 Dec 2026 07:33:20 +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=ii3O2aPu; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=BWNZ3EZC Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 9A75D80998; Wed, 2 Dec 2026 07:33:20 +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 V6T3ztqqslle; Wed, 2 Dec 2026 07:33:19 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org AF02B808A0 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=1796196799; b=IV+8GTXQ02sFihfR8kdEEg19ra8K6NtMfoeYJpEuKWEc28SQLhmOMy25xNfg62VwnTp7 vApZIrs+ackXg2bOVzfezPed0x2sf7y8lRgc6MvgQStRKoN4++lDpurrCBiJwGR3fyh7e Hzn5Z6RiwFKhAPvojhLA6pZlmEV5ExHJYKQh8x5eSWVKW4nF6wy7nDu2B5XUYAUjVfpDB AcVOWFMTNIlCLIctaPYK+6SYkqYtomLBfjf6MMOXMw6onDgAXEJlTfidsn/61ambG27lC GOm8uZ6gLGw2SRnSrCXLku4yKio5NN1j7A8Gc7mMKDs4yvRLRNVw6toKPozGItpF/SQ== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796196799; 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: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Received: Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From:To: Cc:Content-Type:Content-Transfer-Encoding:X-BeenThere: X-Mailman-Version:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:Errors-To; bh=SrC4DLoBEkBSPQgS8AqhutzeiZFKhoWJPl2HfW+lwTw=; b=II/Y4dtXmyGQy9yI6RcNmUjQlpNLcIEwKwTKFXzAICxuuDR+XGkSBH4L3NPLLNGR/Bie Dg3onOFy4o3lHkJoFaiFJgliOFIm7yHgAChRaQ1Mb1PVGN0w/ZXkVWH3PcOlJTMrErwoL ruX9NHRyF4Q+UQRSdItY4+4fkNf2x9wA1xQMKOr4Yl3TRvCn7HlrWntFBsbVfTivm9ASG 1MW33EElc/7LgLwFmmKQpcfUiW3NUEACnD0C6e7x7w6rL2IPE7+igleG4euJdMVCINoSY H4Xe/uxsKTQohN+DwcyI9y2tnwfPIc71upFFSHXD/rcgHUBHEi5EtK4HaPVP5eTnV8A== 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=1796196799; bh=SrC4DLoBEkBSPQgS8AqhutzeiZFKhoWJPl2HfW+lwTw=; h=Date:In-Reply-To:References:Subject:From:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ii3O2aPuruM8cLhNQEXFBRQurDV4JiRlr7erN0DhEDT0aSHEq/X4E7ejdPAVYpbfz Br9oDvc+4UbNtmMmHzLTxWDwhpps9Ew/6Z6YGzUdqAHkkGzZhcKJdTa7mJQFNMUeUs /i5wV29oUqmcnni2ECmAQOaYicb8jf0nJLaw1E2Z+XdFVcV+j0mUG2etcZ74DccIES 1QX2EiMJu7sF7hWGubztsxlZya+NEgot6BhlZCYagUpYKmEvE9Tb+Wfg+nIkxdDW6/ thaDlRZCSTRdNEgpnURtO+oQ2zbkXkc4V3rpsCqD1LdBi7iTNddB933hyAEc6I3NWG 3GjAlc6u+Capw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id AF02B808A0; Wed, 2 Dec 2026 07:33:19 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists1.osuosl.org (Postfix) with ESMTP id EE26C2E4 for ; Wed, 2 Dec 2026 07:33:18 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id D3260403B7 for ; Wed, 2 Dec 2026 07:33:18 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id sfBI9Hb7bCWW for ; Wed, 2 Dec 2026 07:33:18 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp2.osuosl.org 004F740179 Authentication-Results: smtp2.osuosl.org; arc=none smtp.remote-ip="2607:f8b0:4864:20::1045" Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=2607:f8b0:4864:20::1045; helo=mail-pj1-x1045.google.com; envelope-from=3vmkpawykd-0zjcxnjvddvat.rdbxcita-lxgts-apcaxhih.dhjdha.dgv@flex--kuniyu.bounces.google.com; receiver= Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=BWNZ3EZC Received: from mail-pj1-x1045.google.com (mail-pj1-x1045.google.com [IPv6:2607:f8b0:4864:20::1045]) by smtp2.osuosl.org (Postfix) with ESMTPS id 004F740179 for ; Wed, 2 Dec 2026 07:33:17 +0000 (UTC) Received: by mail-pj1-x1045.google.com with SMTP id 98e67ed59e1d1-3b3b4208826so9144610a91.1 for ; Tue, 01 Dec 2026 23:33:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796196797; x=1796801597; darn=lists.osuosl.org; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date:from:to:cc :subject:date:message-id:reply-to:content-type; bh=SrC4DLoBEkBSPQgS8AqhutzeiZFKhoWJPl2HfW+lwTw=; b=BWNZ3EZC6BoEaBxY3OKXaemKNIIZG+69WPbMAKHRaLWWHsJR0zivILgKdq8Zx0BFr+ T4/m3YOW49hFm2/q+mLBSrUl1Euua2Br0MpKe2QQ8kS39/o6n8zWFtWFeZmeZKvwRDCm 0P3kvN9XfRBY4EKWlkE3k+PRcLaRvqjFT0kJuksMTcLJEtHSklP9t7qpfOVR8ypcPnL9 B6ie+2O+wkhcvXEKeXZO9B93JUENPD4zvZsXkkKjhSuoJH+Bl+SzaAZKJKwnIr65KoNa gCBj/UdsMeK+eNaPufzqrF++ftdmJDIF0Ye9cFtcuoEv7IwyPqoBHz56KAbvUt/9Hn1C WO0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796196797; x=1796801597; h=content-transfer-encoding:content-type:cc:to:from:subject :message-id:references:mime-version:in-reply-to:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=SrC4DLoBEkBSPQgS8AqhutzeiZFKhoWJPl2HfW+lwTw=; b=Reoc6TudsG9sTd6czf6kvki/N70+HGMJWwFtvc1E1aJau8zwj3vwKivWkUbklvab9D tD4xGNJ9aCFrDw8kvMHyVRofmh2Vk9M5H8bq+ru0STv/y3NiyvJR18MCFACJHQrrlCsy eUK+HC1cw9wDBnlk4vQxZ//fSek+RqkRiRQWgOhLWAZJBEjovGWeO4/tsz40MSwz02i8 cxUJmwZfOUqwS6IDt1hts44l34E+X217NlUJSLIBocSmOodbAuSIAdVPFifbpNCYDPYs FYxTZWBIItIU58+ORQi/oVQ4UloPsDtslvl1yQJZQd/hz866Ef9v1C0UriNdMo1i1x+G Ng7A== X-Gm-Message-State: APuU4Z+da1NM8N53CmZTUdbUQh67EKHlJEQqDMIiPc3IZOmHXe1mnRok vevtOu9lgAecZ0HQpVCMGpW8KZiyPhzB07rLGxdf2AWQwW1fSiCK3kDETWpIFhCPEHpH3b8V+xx C3Vk/kw== X-Received: from pjkk11.prod.google.com ([2002:a17:90b:57eb:b0:3ac:75d5:7398]) (user=kuniyu job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:5407:b0:3ac:9ad9:6afe with SMTP id 98e67ed59e1d1-3b41c961ed9mr26405029a91.39.1796196796523; Tue, 01 Dec 2026 23:33:16 -0800 (PST) Date: Wed, 2 Dec 2026 16:33:16 +0900 In-Reply-To: X-Archived-By: Mime-Version: 1.0 References: <20261202065737.207610-1-kuniyu@google.com> <20261202065737.207610-3-kuniyu@google.com> Message-ID: Subject: Re: [PATCH v1 iwl-next 2/5] idpf: Use coherent DMA buffer for Rx header split without XDP. From: Kuniyuki Iwashima To: sashiko-reviews@lists.linux.dev Cc: intel-wired-lan@lists.osuosl.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: , X-Spam-Status: No, score=-18.4 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable 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 On Wed, 02 Dec 2026 07:19:15 +0000, sashiko-bot@kernel.org wrote: > 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 > -- >=20 > commit 3759b354320e7c5e9977e8bab71b077ad23bfb55 > Author: Kuniyuki Iwashima >=20 > idpf: Use coherent DMA buffer for Rx header split without XDP. >=20 > 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 XD= P, > copying Rx headers into napi_alloc_skb() to avoid pinning page_pool heade= r > pages. >=20 > > diff --git a/drivers/net/ethernet/intel/idpf/idpf_txrx.c b/drivers/net/= ethernet/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 >=20 > [ ... ] >=20 > > @@ -3450,14 +3540,20 @@ static int idpf_rx_rsc(struct idpf_rx_queue *rx= q, 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); >=20 > [Severity: Medium] > Does idpf_rx_rsc() miscalculate rsc_segments on header buffer overflow wh= en > TCP options are present? Oops, will fix it in v2. >=20 > 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 fix= ed > L3 header and the 20-byte base struct tcphdr, leaving any TCP options (su= ch > 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 = into > linear data so skb->data_len is 0, setting rsc_segments and gso_segs to 0= . >=20 > --=20 > Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261202065737.20= 7610-1-kuniyu@google.com?part=3D2