Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp17661157rwd; Tue, 27 Jun 2023 06:11:26 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dMt1EPwcuHye4r7y1qMFvCTY323tOC4fBKtpBzipRtvTAAuzOWTABtLaE5mm5eUJqffjj X-Received: by 2002:a92:d910:0:b0:343:92a1:9cf4 with SMTP id s16-20020a92d910000000b0034392a19cf4mr25164975iln.19.1687871486413; Tue, 27 Jun 2023 06:11:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687871486; cv=none; d=google.com; s=arc-20160816; b=QX/ZxZROkKPw5WqKdUvdoP6xR0aYuyOMw/Ln+S8FcE9WFdJKwuK+/44O2eOJgDwqIl 9gGarbekiTuNHay4JP8H79WMtmRxhLcl5K9Ce+YvdBd+X1jngc36WQMRX8NCv7ZGzCJe Q3eCyNBBb9ase0nvYCkuc+Ebp4VYSDAg6tTkoEphN5AAXP/QQ72ZllhLMH1pEogZW0/g YYwp3oduvGXtbPD/mWJOnjwjsQJxHg1QIpBQLzwHFdqoRwh1hcUTZYL6tqoCpbgZzCFa djm/T31lbApr8285hVkHParrssXjWI9gC5U1AvnmVwh5gHVIoREY2N4psp29uiwmWNy7 pjuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=xa+nTJijQ9ASf8WlLQeUdpa+dFZwTDrfcItHW2kOSS0=; fh=f3jyR4bOAK/D05MneZqgs6jrZBaeveS2PlgVVUd5uJQ=; b=QEBQo2A2EqTtvJoIw+Y2CdfvxfWG3qeZNwwZknZr5cTwV5GgLGYJNHhVwRqiPY52pd f5Fia/DHnC4id988AqulbrW5kn0QHXOdmY7E+UCOGatM9NCeOEUKG3UZsHpqEgeZkHMG q+Pez3CMDD7rQk1U4yVIQx28gsOJ2EemyfmPk6Von8CnVYWDP5Ab5Pwe5mTvKuEvo9bT 0Gi3aOnt3yNn1pq2EHWfTIqrBtTZgPIPZ1UIeGt/qGd46PJj4Ryrc89UA5XhfJS0CLks 9Exli+YgO5KZaKsFw1FPK59vhKhGpcwwu/bGF5UO5pgZDvNFqdfGOFNG7vYqMXDZLsrD KbHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jnG7SEBo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u185-20020a6385c2000000b0054fe2dfaabcsi7497919pgd.526.2023.06.27.06.11.00; Tue, 27 Jun 2023 06:11:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=jnG7SEBo; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbjF0Mba (ORCPT + 99 others); Tue, 27 Jun 2023 08:31:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229495AbjF0Mb3 (ORCPT ); Tue, 27 Jun 2023 08:31:29 -0400 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC561999; Tue, 27 Jun 2023 05:31:27 -0700 (PDT) Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-313e09a5b19so2833656f8f.0; Tue, 27 Jun 2023 05:31:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1687869086; x=1690461086; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xa+nTJijQ9ASf8WlLQeUdpa+dFZwTDrfcItHW2kOSS0=; b=jnG7SEBoHpt9OdYmEA6qDYlvUKAwVDw+SJrYRqe8s0FxpIpSYsd/DVnBjYvk2of1p5 7sYxzJDZyCHya9HeGhYKtx6+1CLYCTXv6pT+JJi8uGxPklu/fbeDK6H20KqJAed9Pk+F sryVJ/yBE9BwE1wzNQp3pgFYxVUmvUVmO+FgSLXZnSg/0rovfigd0IeGZGKcpgweD+gQ LEz40yMexBlrFrdBZEPDisLtSmQdeb11gm461PqFQ70j1sRoHJAeS17TnX9rQJm7UmJc NrUax+uYKfCLZaNwxZbix/FbM1GUU4v9DWyAtfFuSp/spCD3zLyZ52SR+VUWW/i53MSU o6Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687869086; x=1690461086; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xa+nTJijQ9ASf8WlLQeUdpa+dFZwTDrfcItHW2kOSS0=; b=GYbsk5XEmve9zNdVzbFA3syZyqnh7fCbg+e4bU6pMMkgMnNDbLEXxNnpWCvF5h6J+y 8vUMREejIC165gKddwJOKk76puAMY4Rt8p0cCJpwVIrsBxaCx1xr3Rb/MUu1gkLRBMy/ 5UjzTcNAGerp7NYKje5HlYM/k4F9U0d+TAEMUUGHt7Lpq77dTjCFSl8vZQ9LggRlTGSa JjOBkiNP1Kg+dj6KL65amxiQPMJP5TxTbKU+L5Lo+V81CW3YVV7FDuzikHz6b0OWOmhy 4F/Kr0vE+ur7i1cPDSTYcq2vVYlfYxM/Z4VByydefUhmDm1g0ZVy7MSq3jtbxyM8BSB/ tVUw== X-Gm-Message-State: AC+VfDzu0Wo12hGcmydZhXJNp0Y4HqSrX/gv4UWSkewJffV+BtFnWk/A QftevCGJQc0MDDP8D8Pb9Vsl0tkglmnySy5LAQ0= X-Received: by 2002:a5d:6dce:0:b0:30a:e63b:950 with SMTP id d14-20020a5d6dce000000b0030ae63b0950mr33833828wrz.31.1687869086050; Tue, 27 Jun 2023 05:31:26 -0700 (PDT) MIME-Version: 1.0 References: <22aad588-47d6-6441-45b2-0e685ed84c8d@intel.com> <0a040331995c072c56fce58794848f5e9853c44f.camel@redhat.com> In-Reply-To: <0a040331995c072c56fce58794848f5e9853c44f.camel@redhat.com> From: Ian Kumlien Date: Tue, 27 Jun 2023 14:31:13 +0200 Message-ID: Subject: Re: [Intel-wired-lan] bug with rx-udp-gro-forwarding offloading? To: Paolo Abeni Cc: Alexander Lobakin , intel-wired-lan , Jakub Kicinski , Eric Dumazet , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 27, 2023 at 11:19=E2=80=AFAM Paolo Abeni wr= ote: > > On Mon, 2023-06-26 at 20:59 +0200, Ian Kumlien wrote: > > On Mon, Jun 26, 2023 at 8:20=E2=80=AFPM Ian Kumlien wrote: > > > > > > Nevermind, I think I found it, I will loop this thing until I have a > > > proper trace.... > > > > Still some question marks, but much better > > Thanks! > > > > cat bug.txt | ./scripts/decode_stacktrace.sh vmlinux > > [ 62.624003] BUG: kernel NULL pointer dereference, address: 000000000= 00000c0 > > [ 62.631083] #PF: supervisor read access in kernel mode > > [ 62.636312] #PF: error_code(0x0000) - not-present page > > [ 62.641541] PGD 0 P4D 0 > > [ 62.644174] Oops: 0000 [#1] PREEMPT SMP NOPTI > > [ 62.648629] CPU: 1 PID: 913 Comm: napi/eno2-79 Not tainted 6.4.0 #36= 4 > > [ 62.655162] Hardware name: Supermicro Super Server/A2SDi-12C-HLN4F, > > BIOS 1.7a 10/13/2022 > > [ 62.663344] RIP: 0010:__udp_gso_segment > > (./include/linux/skbuff.h:2858 ./include/linux/udp.h:23 > > net/ipv4/udp_offload.c:228 net/ipv4/udp_offload.c:261 > > net/ipv4/udp_offload.c:277) > > So it's faulting here: > > static struct sk_buff *__udpv4_gso_segment_list_csum(struct sk_buff *segs= ) > { > struct sk_buff *seg; > struct udphdr *uh, *uh2; > struct iphdr *iph, *iph2; > > seg =3D segs; > uh =3D udp_hdr(seg); > iph =3D ip_hdr(seg); > > if ((udp_hdr(seg)->dest =3D=3D udp_hdr(seg->next)->dest) && > // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > The GSO segment has been assembled by skb_gro_receive_list() > I guess seg->next is NULL, which is somewhat unexpected as > napi_gro_complete() clears the gso_size when sending up the stack a > single frame. > > On the flip side, AFAICS, nothing prevents the stack from changing the > aggregated packet layout (e.g. pulling data and/or linearizing the > skb). > > In any case this looks more related to rx-gro-list then rx-udp-gro- > forwarding. I understand you have both feature enabled in your env? > > Side questions: do you have any non trivial nf/br filter rule? > > The following could possibly validate the above and avoid the issue, > but it's a bit papering over it. Could you please try it in your env? Will do as soon as i get home =3D) > Thanks! > > Paolo > --- > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index 6c5915efbc17..75531686bfdf 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -4319,6 +4319,9 @@ struct sk_buff *skb_segment_list(struct sk_buff *sk= b, > > skb->prev =3D tail; > > + if (WARN_ON_ONCE(!skb->next)) > + goto err_linearize; > + > if (skb_needs_linearize(skb, features) && > __skb_linearize(skb)) > goto err_linearize; >