Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7F212C2B9F4 for ; Thu, 17 Jun 2021 07:52:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 667136101A for ; Thu, 17 Jun 2021 07:52:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229729AbhFQHyg (ORCPT ); Thu, 17 Jun 2021 03:54:36 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:58597 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229666AbhFQHyf (ORCPT ); Thu, 17 Jun 2021 03:54:35 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 29E985C00A1; Thu, 17 Jun 2021 03:52:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 17 Jun 2021 03:52:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rath.org; h=from :to:cc:subject:references:date:in-reply-to:message-id :mime-version:content-type:content-transfer-encoding; s=fm2; bh= WpXJv9HJaVjs7c3l31zTlNHRcUftcoeSO1pZ9lXZLTg=; b=INFPrLUWuFJe+v2u xrr6cyg5gnqAF1Cu+d9EDM0XOk6WNPSXmfn7c6fk1FOaTPtcUvzKID1MAt8zlt1S ahPraXcAzZm3OS4bKp4g3hc7fMKWmcFXT+Pga+yijItclja/jpOhcKOZk4BMBkY+ M50kJvAo1LlthCb3QoD7OjDEyaLak4BHBsr1hxKk3rGKEFFnASdRkl1lh/S8uuyx IRrSHCqJ/U8XwzcH3N2lhM0lOxPV2CsaEmbuyjnMPX+CI/lDswHpQgyrL5btq6Qp DvJA1bC3n9q4Ua2aHFy6ZpxIfJK7vK5dxVp9Vh9P1t2GYWBBwx9/IUQJJRBjp10j q15lRg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=WpXJv9HJaVjs7c3l31zTlNHRcUftcoeSO1pZ9lXZL Tg=; b=IBD1xmbW62Ya61ulkb+S6F9WCwI8fkPuykQilCYKuaHixhGEBjpMd28BA exykEGl3BY3jIvrNZszXy0zDIpULXiPQptZIbJRGFDafmga5tj/oZ8JpyYnHx2oU DmQoevZe9/1qI4EPIHm55uNXPYNexRsRODCVAvT3+ha9Nrl/G6oHeSkAILwnLerr MsKmbRfs4fzuIbRTSp1Hzi7gpuJ87pCkKt5jL067ZRVbX4qRE5GHPGdjfPYmCR6S thxAOL8bhiPow+WbQvLo2EKelEdizlfl00eu0c5oMItGZLO83uYI3i3nrFrl0N1K QQ/Wl+dcLsf8QCtG/pnqNJIkhfiTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfeeftddguddvtdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvffufhffjgfkfgggtgfgsehtqhdttddtreejnecuhfhrohhmpefpihhk ohhlrghushcutfgrthhhuceopfhikhholhgruhhssehrrghthhdrohhrgheqnecuggftrf grthhtvghrnhepfffffeeugedtveffuedvvddtudettdehffefgfevfefhtedthffftddu fedvtdefnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpefpihhkohhlrghushesrhgrthhhrdho rhhg X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 17 Jun 2021 03:52:27 -0400 (EDT) Received: from vostro.rath.org (vostro [192.168.12.4]) by ebox.rath.org (Postfix) with ESMTPS id C58F82C2; Thu, 17 Jun 2021 07:52:26 +0000 (UTC) Received: by vostro.rath.org (Postfix, from userid 1000) id B01876B640; Thu, 17 Jun 2021 08:52:26 +0100 (BST) From: Nikolaus Rath To: Amir Goldstein Cc: Miklos Szeredi , Max Reitz , Vivek Goyal , Linux FS Devel Subject: Re: [PATCH] fuse: fix illegal access to inode with reused nodeid References: <20210609181158.479781-1-amir73il@gmail.com> Mail-Copies-To: never Mail-Followup-To: Amir Goldstein , Miklos Szeredi , Max Reitz , Vivek Goyal , Linux FS Devel Date: Thu, 17 Jun 2021 08:52:26 +0100 In-Reply-To: (Amir Goldstein's message of "Wed, 16 Jun 2021 21:25:09 +0300") Message-ID: <87r1h13p39.fsf@vostro.rath.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Jun 16 2021, Amir Goldstein wrote: > On Wed, Jun 16, 2021 at 8:25 PM Nikolaus Rath wrote: >> >> Hi Amir, >> >> On Wed, 16 Jun 2021, at 16:03, Amir Goldstein wrote: >> > Per request from Nikolaus, I modified the passthrough_hp example >> > to reuse inodes on last close+unlink, so it now hits the failure in the >> > new test with upstream kernel and it passes the test with this kernel = fix. >> > >> > Thanks, >> > Amir. >> > >> > [2] https://github.com/libfuse/libfuse/pull/612 >> >> Actually, I am no longer sure this was a good idea. Having the libfuse t= est suite detect >> problems that with the kernel doesn't seem to helpful.. I think the test= suite should >> identify problems in libfuse. Currently, having the tests means that us= ers might be >> hesitant to update to the newer libfuse because of the failing test - wh= en in fact there >> is nothing wrong with libfuse at all. >> > > I suppose you are right. > I could take the tesy_syscalls test to xfstest, but fuse support for > xfstests is still WIP. > >> I assume the test will start failing on some future kernel (which is why= it passed CL), >> and then start passing again for some kernel after that? > > I was not aware that it passes CI. > There are no test results available on github. Arg. Looks like something is broken there. I mistook the absence of results for a passing result. > I am not aware of any specific kernel version where the test should pass, > but the results also depend on the underlying filesystem. > > If your underlying filesystem is btrfs, it does not reuse inode numbers > at all, so the test will not fail. > > For me the test fails on ext4 and xfs on LTS kernel 5.10. > As I wrote in PR: > "...Fails the modified test_syscalls in this PR on upstream kernel" > > If you revert the last commit the test would pass on upstream kernel: > 80f2b8b ("passthrough_hp: excercise reusing inode numbers") > > We could make behavior of passthrough_hp example depend > on some minimal kernel protocol version or new kernel capability like > FUSE_SETXATTR_EXT if Miklos intends to merge the fix for the coming > kernel release or we could just make that new test optional via pytest op= tion. > > After all, regardless of the kernel bug, this adds test coverage that was > missing, so it also covers a possible future regression in libfuse. > > Let me know if you want me to implement any of the listed options. I don't want an old kernel to result in libfuse unit tests failing, but I think it's a good idea to cover this case in some form. Would you be able to make the test conditional on a recent enough kernel version? Or, if that's too much work, print an error message that explains that there is a kernel bug but do fail the test? Best, -Nikolaus --=20 GPG Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB