Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1442556rwd; Thu, 15 Jun 2023 10:32:31 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5/APE3L0W3w9t41zFBB0ogK4ierd8AB1mgb8E2sADNEdKy7wEGzztynJAmi4txD96e7Ron X-Received: by 2002:a50:ed91:0:b0:514:9cb5:ee1e with SMTP id h17-20020a50ed91000000b005149cb5ee1emr10811049edr.6.1686850350909; Thu, 15 Jun 2023 10:32:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686850350; cv=none; d=google.com; s=arc-20160816; b=xh3WIoIMVZxpySjzwdkauw84RKC9I6TF+s9NjeTG7b+JfM1Jt6hf+yBnTRcUwvL8Q8 0z2IzIkHCPUpHlwnZLak+lpFjKZCn93rjhGeaaFWgrVBYn6gtqX4UX3xoY0/qc40absR CAC+J//k6Rp5iykQjpeRUMonDAtXGnrGaEAwgwnl1g/AOn3Bni1G3pg6dHAhaFQQR2yN dIWv3Rf+6hl4iWYK04gnFKqsMUg1M/BHXVCT4+ekttekn6LKYPjnyQd7kHOq0/w7lmyy rqHUbcfP0UcyFgtdj+za75LAwmMeF0skrUxjPdn+po2p8GkEpr6O6vI0aRyNKIjBV4GP XSqg== 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=WUd2exhAx/+wi7FfcZIbEVnkCCAxeJpzDyEMaj0jvN0=; b=udqRCUgrSpm0t43PVSzZNNUKXEmBvAN55ksXfr0JSU0F119B9zoTDyC6xX8rfF/rGw d8Nt6Ohs9QfA8HOKqM0VRd//leUw1MeF/OXGt0vlEw30BWtW3fNFV243GTRdBg/HRLYK qOCctYRTpRNRe0/3HceISrnFRrBlv629xrpqfBKLYpPGXJwrDsNwG871x0vO9CuVZLqX TgCBjTgFsQGiGWR5X4wYke3opCk0zH8wGR/jhVnPW7BDKi7tSjwFHydnwwP8EItRu06P SZ5e8IlojPXrHBFAPvjAQ+9v6YoSHjCMNEJOB0m/rONvFYnqXDvOZ46IBijR3jQqQ6qJ Ba4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=SCa9L9Cu; 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 y21-20020aa7c255000000b005187c27a9b0si2843076edo.151.2023.06.15.10.32.00; Thu, 15 Jun 2023 10:32:30 -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=SCa9L9Cu; 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 S238371AbjFORQ0 (ORCPT + 99 others); Thu, 15 Jun 2023 13:16:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37514 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238681AbjFORQZ (ORCPT ); Thu, 15 Jun 2023 13:16:25 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 14D25123; Thu, 15 Jun 2023 10:16:24 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-3f9e5c011cfso30957531cf.1; Thu, 15 Jun 2023 10:16:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686849383; x=1689441383; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=WUd2exhAx/+wi7FfcZIbEVnkCCAxeJpzDyEMaj0jvN0=; b=SCa9L9CuVUcFNRpcIDVH5q9PEZU8NBnvpEaY10cs+LGEHkqM693VAfkL6xrDayL9w8 wcpIbMYl/GVC9Iij/rdoPmxivqTVx6xMxmIXOwxjN2ds1M5ClcoIUJkDuu3DPZLNJ3+b 3/MuY0Ass7mVueRstLyx2NsDwxot00KPJMzgIc0+neWpIBYi/MhpR+7gU5Z51/qm5aMw ioUgLQ7pbS9W3h0+sbUBt+xzKOwYo3FSIOqEf5iu5RK/JQehA1ubLBfF9VSRF4kGlc9U Z42D808Re0XTdZ9IKgYSIoDsdCRrAH54hGDF3qgsXn1gNiWE935mbaGDe4TXppoMmQws YfuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686849383; x=1689441383; 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=WUd2exhAx/+wi7FfcZIbEVnkCCAxeJpzDyEMaj0jvN0=; b=YRuj8B3KVUiwP+kOTqrhpBi4uRdizM3uxZjtzrjmqAwGrKu2koQj62N+sTUbhQazHL qGF4mh4OLpXMZCu3/H6ilTl9Ep0cwXIpYSKy0BIkObcKqB5ssvFxylD/6XoO3M0vu0pE Ftev69tLl/Iunx1i/mFAKOYLlt1RuDuXdTSqxVfLUgvWdc8AtNkq2SECCAvWPg82XmCH vB7gYVTsbOEcU+teoTgstq43mxahubAE9FBAcaqxDBbuYAm28TyuYu57KFbnny8vqY14 VLuE3s9fLc81vYjCcMq5GrVBqUHjopNVe4tvlF4icDze0BAJu0yj57Uw4kwhRJEB9bKV BZmg== X-Gm-Message-State: AC+VfDzzgDpgw/MoITMzBmexRUdkokJRNkSTPaqdK09LRx5E3XuwbJAV EoW257GW+Jab/VxWIchSzihps2veKvm4Rl1rOUU= X-Received: by 2002:ac8:5a8b:0:b0:3f9:d1a3:8bd9 with SMTP id c11-20020ac85a8b000000b003f9d1a38bd9mr7212280qtc.9.1686849383060; Thu, 15 Jun 2023 10:16:23 -0700 (PDT) MIME-Version: 1.0 References: <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: From: Anna Schumaker Date: Thu, 15 Jun 2023 13:16:07 -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="000000000000448d9105fe2e3a42" 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 --000000000000448d9105fe2e3a42 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, Jun 15, 2023 at 1:04=E2=80=AFPM Anna Schumaker wrote: > > On Thu, Jun 15, 2023 at 9:01=E2=80=AFAM Anna Schumaker wrote: > > > > On Thu, Jun 15, 2023 at 4:55=E2=80=AFAM Krzysztof Kozlowski > > wrote: > > > > > > On 15/06/2023 10:52, Krzysztof Kozlowski wrote: > > > > On 14/06/2023 22:55, Anna Schumaker wrote: > > > >>>>> Still null ptr (built on 420b2d4 with your patch): > > > >>>> > > > >>>> We're through the merge window and at rc1 now, so I can spend mo= re > > > >>>> 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 th= e > > > >>>> 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-20230= 609. > > > >> > > > >> Can you try the attached patch on top of my 3-patch series from th= e > > > >> 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 t= he > > > >> xdr scratch buffer since it's suddenly a bad memory address after > > > >> working for a bit on your machine. > > > >> > > > > > > > > Here you have entire log - attached (113 kB, I hope goes past maili= ng > > > > lists/spam filters). > > > > > > As expected this bounced from the mailing lists, but I hope you got i= t. > > > If not, let me know. > > > > I did still receive it. Thanks! > > Can you swap out yesterday's patch with this patch? I've adjusted what > gets printed out, and added printk()s to xdr_copy_to_scratch(). I'm > starting to think that the xdr scratch buffer is fine, and that it's > the other pointer passed to memcpy() in that function that's the > problem, and the output from this patch will confirm for me. Oh, and can you add this one on top of the v2 patch as well? Thanks, Anna > > Thanks, > Anna > > > > > Anna > > > > > > Best regards, > > > Krzysztof > > > --000000000000448d9105fe2e3a42 Content-Type: text/x-patch; charset="US-ASCII"; name="0001-NFS-Olga-s-prink-patch.patch" Content-Disposition: attachment; filename="0001-NFS-Olga-s-prink-patch.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: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