Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp181937rwd; Wed, 14 Jun 2023 14:16:21 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ65FBySoQ0WjuFZvfDLvLgn3eZFJbjV2XgZU/5uNiHPlWd4cOf2cQ2VDQU1Ib6Inn4WGUok X-Received: by 2002:a2e:3516:0:b0:2ad:dab5:fe88 with SMTP id z22-20020a2e3516000000b002addab5fe88mr7231625ljz.42.1686777380501; Wed, 14 Jun 2023 14:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686777380; cv=none; d=google.com; s=arc-20160816; b=oHdRRYbRvRqD7cQL086dxd+KWoJIO4B5LcR3a8N48RURh5guY+YWAm4xQgt2rNr7xn XFCdYnynMfxqHiAcWUUUufaki4t1y/p/Exqbnm5n6msrlYJp2JvF34trULtgXJ1OBaq7 0lE4OclBeqzzhharNIbdthPCrfLlHIO35sYcoppho8tn8J4NUwgmPLbHuRkGFGZtuAkV wE3FDs4HP/gvipVXVyuWRCKRbUnm0SzTAkh1Q5dq4O0bWaHmbtvOcQ7kkJXjDeHc9bx/ 7z7k8o6300DcIHHQo/AvYY/f/Wf8qIRFQRBqifzFfhF7TMFP/a6fITf6TV8aQgRbDoeH KD6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=GuT2u5i+zu8JABUORePbTo/5nH4btXdVlFm59OPxaUI=; b=frLvuSOoS609SEilCToMft1jhh8SIpwGFqKigSE1hRAPr8qIhmJNy3T2EvkI5aamuF r8zExtyc/Prks1yq/sOHFbogpfEjxJQICTcDPu8y9QvYMqi8N9ANfC+DS1yWCEgBvnAq FsFN+unlzVMoEgz9p3fyaX0+GHoZB63KKPpb16tumyjkdlv9dsL0AOCHOLP3++yMPAkP ypQDVMNTzECscqlSM0RT8oOgvqXXBHC6E9qd/olaQcCk9fxVJnvZ+tETuGxJ/HPBxAjz T/IFj3icsUuJdunXc9Kzwk/ll9vMuSHqH0aV353cHvrKbRg8hlhfe0VF+uh3XK/CCYrP N6wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=IvbkYbAY; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 d2-20020a50fe82000000b00516a24cbe16si9334861edt.237.2023.06.14.14.15.50; Wed, 14 Jun 2023 14:16:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-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=IvbkYbAY; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-nfs-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 S233385AbjFNUzg (ORCPT + 99 others); Wed, 14 Jun 2023 16:55:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbjFNUzf (ORCPT ); Wed, 14 Jun 2023 16:55:35 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BDD2211F; Wed, 14 Jun 2023 13:55:34 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-3f9aa383527so23404801cf.1; Wed, 14 Jun 2023 13:55:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686776134; x=1689368134; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=GuT2u5i+zu8JABUORePbTo/5nH4btXdVlFm59OPxaUI=; b=IvbkYbAYvxtG7fFnqHvV03fOuUWiz0pN/YccpN4kgEbYzQJRPXy5MFNDhjz8NQR5ME ciCn1m70FVNa8scFELdfef1tip+69F2LtcLm6GwZM6CpSvENCHNDInbmwtCsegcJ0KQU DbQMGtgcl4aB2Zzttt06UDMGnqeRrkA3EebxOADTfsab2Ue/9gx4aYsu/dKGMGC0TFFs lPXJdUtrEd61fQ/AcF+nmmNljLrPP7/i6UG3lbYweu/kVDEBcPojQ/xZjomQYxk8lAPs r+hzX5x/PY/G7njLgBoh+B1fAplEmQRBgv2du1iPKKeRm9H3xyQO58CSHF6KoLn9MRTX 5z3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686776134; x=1689368134; h=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=GuT2u5i+zu8JABUORePbTo/5nH4btXdVlFm59OPxaUI=; b=U7S1wui2IkwKD9WdGifXiUrnmrBgf4CmF9ynhakt7OjiyR92VAtiJS+2oee64DpBo/ 0kF/8TD2eZsyNLcSeIdpuCc40enIkjeIQga95ZQkUz5HHt9yVTH1C/bMn6RU7eb+N14y 2WS7/S+KqzYbvmMYOBYZ7hzHbg+fBQHTKpkCHZJMLaKz+XbO1Jh8CR6yo3Eqo3unCx+Y n9gFi1vJD/JkTrNGVxiFsq6EHi8yjJpfjBrqqWsquhUz4OLKlC83Kk6Ymof6aVq8AEC+ q3VGNpRhQ0RnfTGfJAtCSrBJMau8DatVqps5m926IAZhIEk3otK5fmfDFJVj9x5rJIMb 4iGg== X-Gm-Message-State: AC+VfDyL7dI1rxk6xD3dK1bY0iHVIYBLEGOwGRCb2j+49ouRe6McQH9t wfvf4HhLlm6YQYHMQjE+D+yzhghEDPh72TFV2w0= X-Received: by 2002:a05:622a:138b:b0:3f9:adc9:4785 with SMTP id o11-20020a05622a138b00b003f9adc94785mr3164763qtk.51.1686776133578; Wed, 14 Jun 2023 13:55:33 -0700 (PDT) MIME-Version: 1.0 References: <82526863-d07a-0a5d-2990-1555b1387f26@linaro.org> <2C5E9725-F152-4D2E-882E-CF92A35481BF@hammerspace.com> <7ba38377-7992-7f0f-d905-cceb42510f39@linaro.org> <51430925-8046-7066-84ed-2ff0db835347@linaro.org> <2add1769-1458-b185-bc78-6d573f61b6fc@linaro.org> <32530c36-91d0-d351-0689-aed6a0975a4b@linaro.org> <2f285607-cbf9-6abc-f436-edb6e9a3938b@linaro.org> <4fe39d77-eb7c-a578-aefa-45b76e2247c2@linaro.org> <86d8e252-975f-5d48-4567-0911d5ef9a44@linaro.org> In-Reply-To: <86d8e252-975f-5d48-4567-0911d5ef9a44@linaro.org> From: Anna Schumaker Date: Wed, 14 Jun 2023 16:55:17 -0400 Message-ID: Subject: Re: Regression: NULL pointer dereference after NFS_V4_2_READ_PLUS (commit 7fd461c47) To: Krzysztof Kozlowski Cc: Trond Myklebust , Anna Schumaker , linux-nfs , Linux Kernel Mailing List , "regressions@lists.linux.dev" Content-Type: multipart/mixed; boundary="000000000000426b2f05fe1d2cfc" 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-nfs@vger.kernel.org --000000000000426b2f05fe1d2cfc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Krzysztof, On Sat, Jun 10, 2023 at 6:15=E2=80=AFAM Krzysztof Kozlowski wrote: > > On 06/03/2023 18:09, Anna Schumaker wrote: > > Hi Krzysztof, > > > > On Tue, Feb 14, 2023 at 6:02=E2=80=AFAM Krzysztof Kozlowski > > wrote: > >> > >> On 12/02/2023 15:05, Anna Schumaker wrote: > >>>>> From ac2d6c501dbcdb306480edaee625b5496f1fb4f5 Mon Sep 17 00:00:00 2= 001 > >>>>> From: Anna Schumaker > >>>>> Date: Fri, 10 Feb 2023 15:50:22 -0500 > >>>>> Subject: [PATCH] NFSv4.2: Rework scratch handling for READ_PLUS > >>>>> > >>>> > >>>> Patch is corrupted - maybe mail program reformatted it when sending: > >>>> > >>>> Applying: NFSv4.2: Rework scratch handling for READ_PLUS > >>>> error: corrupt patch at line 12 > >>>> Patch failed at 0001 NFSv4.2: Rework scratch handling for READ_PLUS > >>> > >>> That's weird. I wasn't expecting gmail to reformat the patch but I > >>> guess it did. I've added it as an attachment so that shouldn't happen > >>> again. > >> > >> Still null ptr (built on 420b2d4 with your patch): > > > > We're through the merge window and at rc1 now, so I can spend more > > time scratching my head over your bug again. We've come up with a > > patch (attached) that adds a bunch of printks to show us what the > > kernel thinks is going on. Do you mind trying it out and letting us > > know what gets printed out? You'll need to make sure > > CONFIG_NFS_V4_2_READ_PLUS is enabled when compiling the kernel. > > The patch does not apply. I tried: v6.4-rc1, v6.4-rc5, next-20230609. Can you try the attached patch on top of my 3-patch series from the other day, and let me know what gets printed out? It adds a bunch of printk()s at strategic points to print out what is going on with the xdr scratch buffer since it's suddenly a bad memory address after working for a bit on your machine. Thanks, Anna > > Best regards, > Krzysztof > --000000000000426b2f05fe1d2cfc Content-Type: text/x-patch; charset="US-ASCII"; name="0001-NFS-Add-debugging-printk-s-to-trace-the-xdr-scratch-.patch" Content-Disposition: attachment; filename="0001-NFS-Add-debugging-printk-s-to-trace-the-xdr-sc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