From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2FD2339C644 for ; Wed, 14 Jan 2026 13:40:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768398007; cv=none; b=IsyjuDjic+LkAD4r9g32A33rMVvIreQ8KiCOkpBFECk5uGFK+/EfDUIR++LENb3JCTUJSXOcqG3lZKNbSt79qj03iIl9AxO8NKnNX27h9R6haKhxY0NdjFHLB5veDcqkw2kqMcMPL7JU0/Ulvb7QZdjAzVGdrCHer64S99MyRkU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768398007; c=relaxed/simple; bh=YZcrqwDuRyJBCAtxjucK7ekrSuDX8AnZLVJWFUZ9Q/c=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rP5TnOR0ZgVM0EWHmQZFP68MlOSFCycGaHpoe4BMD4eq+M8ZXQ5S/zH/7XhuG+arh0FrGUFbgpyPg+X2UC51HE05aRxuG+Ib8c7cF/i6J31p9GT+v6rDczYFLMpNJYF2ZtMfQsOYjAkK/bzIDOLUBskHx0lEigtoSdRTv5mZ3WA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FpCDoFQV; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FpCDoFQV" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-4327555464cso5205676f8f.1 for ; Wed, 14 Jan 2026 05:40:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768398001; x=1769002801; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=5wmwTmp5IFzHOcZYUSrwZ2WCFgEOIoQQbhD/zBC9MXc=; b=FpCDoFQVK2u3cOGkeMNLxme+40VwkGfsYrCm4qUWjS2DwShovcBmGgLTeJNAJaLtWv BNlyDl+Nq/x8yjYit/HSlROaHkgKGGwHevcUhDI1TuZESN/w5TWGRvo6DqGmEeQlwY4l 1o2BoecZLrgb564v8TTjgep964GXUVUv/kmHXQI9TeSHteRdQLtZ50TbJhSeprvlH41F DVb60IN17TrEsSE/n0hAKHRiepPniG8/yMgf7Eg+TMEtBbPEMSZVl1l/X5UdLQAOam4X FZHOd/GOSj+QQT/02oNcD81lt174ls50JZpW+aQEuxxFRpK8u6awjh/qAiuoT6HbRfXu YMaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768398001; x=1769002801; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5wmwTmp5IFzHOcZYUSrwZ2WCFgEOIoQQbhD/zBC9MXc=; b=qZ0uLRXxDp5tsdgDGiu7ktz/FbTpmuKUPB4nODXcHURqqdRxsi6BQIsE+Zez5tYge/ xkO1fB9+4IxG5tBOD6JocdcVONKiZhQCxzgWtpEJxzrrs+3MgGZYVmfvfqVKAARqSv2A j/ukZ0aQoF0dqMTPb/I4i09pqn5XStcjWFk8+XU+If2H20WQQz7BaG+xHfYsUoncbYXo F6eaQE77UuEWkh8C8Un/cmvfzE77n1+0YaGQWiJbiWCRgaAKHLndg19byN4DKn2RQ4zQ ctzhBakwQH67+fIbbhE6bQJZa2rkSBoTskJgOxDLdlawpjkEtDbeUnrNKTpFTZrYzguE fUDw== X-Forwarded-Encrypted: i=1; AJvYcCX2rjyzIpiZY3hAcqVGQIVtMLLoVgAr5OJ4hgkEQxjxMURmqCX0zraCR03A0VyoVLMplmDdzhiu1BEqAg==@vger.kernel.org X-Gm-Message-State: AOJu0YyyUkv4Kaoexo3vrg/NHINhr54txHWcivaz/PiOqMbxbJO2F/3P GGM2wiOQBP/SYlbcbd1TsHb3L1f23RFGf8+k0sqSoNPmTUXyelWLIxcY X-Gm-Gg: AY/fxX75/3oWY82kmZggfPwmYZCK6wnRgR8TUyZRXrE4SlSmWP4FxjeRSCRCWRjRva+ 3NwqK5etyxk15aWTVTtPzKHaH6l7dWxASFB0CGOyHH7qXPhQmEPY8/nG7BWJki8Ef2Oj1VLY20A hO+aIf82YH2RitAl/c40KNHnP8XBJP7Fvv9hPV10aS8AOwzKBzc8e1eQndaFsQLTqEvllF/cgrt Bhyib7t8EaNWVgJMk/d5H65aX2yKXTIXaNDEtGvN1xzB6wsN9evKVlMlUQYyeXsN87P9sVdMpV5 jieQmK8LV0OMUJ1Fj8R8zezXB2wjBDfEcC44kRGJouORlBHmAFYkUcozMVlUgIhJD1v9UuXRuV8 z25AoKlIo2DoFuVrhcRgGpZOQpIW/Z6eOD/PLlMMivKriYYm+DLaAUOmwL+ESl1n66nQUzz4S7u C0Ug7sQl8oeXUHRMGM6XfezzhNcuA09rKDhs+Nb5VfENKP0UMUgmdS X-Received: by 2002:a5d:53c9:0:b0:432:5bf9:cf2e with SMTP id ffacd0b85a97d-4342c3ef274mr2643750f8f.13.1768398001040; Wed, 14 Jan 2026 05:40:01 -0800 (PST) Received: from pumpkin (82-69-66-36.dsl.in-addr.zen.co.uk. [82.69.66.36]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5edd51sm50238105f8f.29.2026.01.14.05.39.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 05:40:00 -0800 (PST) Date: Wed, 14 Jan 2026 13:39:55 +0000 From: David Laight To: Amir Goldstein Cc: Christoph Hellwig , Jeff Layton , Christian Brauner , Chuck Lever , Jan Kara , Luis de Bethencourt , Salah Triki , Nicolas Pitre , Anders Larsen , Alexander Viro , David Sterba , Chris Mason , Gao Xiang , Chao Yu , Yue Hu , Jeffle Xu , Sandeep Dhavale , Hongbo Li , Chunhai Guo , Jan Kara , "Theodore Ts'o" , Andreas Dilger , Jaegeuk Kim , OGAWA Hirofumi , David Woodhouse , Richard Weinberger , Dave Kleikamp , Ryusuke Konishi , Viacheslav Dubeyko , Konstantin Komarov , Mark Fasheh , Joel Becker , Joseph Qi , Mike Marshall , Martin Brandenburg , Miklos Szeredi , Phillip Lougher , Carlos Maiolino , Hugh Dickins , Baolin Wang , Andrew Morton , Namjae Jeon , Sungjong Seo , Yuezhang Mo , Alexander Aring , Andreas Gruenbacher , Jonathan Corbet , "Matthew Wilcox (Oracle)" , Eric Van Hensbergen , Latchesar Ionkov , Dominique Martinet , Christian Schoenebeck , Xiubo Li , Ilya Dryomov , Trond Myklebust , Anna Schumaker , Steve French , Paulo Alcantara , Ronnie Sahlberg , Shyam Prasad N , Tom Talpey , Bharath SM , Hans de Goede , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-erofs@lists.ozlabs.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-mtd@lists.infradead.org, jfs-discussion@lists.sourceforge.net, linux-nilfs@vger.kernel.org, ntfs3@lists.linux.dev, ocfs2-devel@lists.linux.dev, devel@lists.orangefs.org, linux-unionfs@vger.kernel.org, linux-xfs@vger.kernel.org, linux-mm@kvack.org, gfs2@lists.linux.dev, linux-doc@vger.kernel.org, v9fs@lists.linux.dev, ceph-devel@vger.kernel.org, linux-nfs@vger.kernel.org, linux-cifs@vger.kernel.org, samba-technical@lists.samba.org Subject: Re: [PATCH 00/24] vfs: require filesystems to explicitly opt-in to lease support Message-ID: <20260114133955.0a9f5cd3@pumpkin> In-Reply-To: References: <20260108-setlease-6-20-v1-0-ea4dec9b67fa@kernel.org> <8af369636c32b868f83669c49aea708ca3b894ac.camel@kernel.org> <20260113-mondlicht-raven-82fc4eb70e9d@brauner> X-Mailer: Claws Mail 4.1.1 (GTK 3.24.38; arm-unknown-linux-gnueabihf) Precedence: bulk X-Mailing-List: linux-btrfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 14 Jan 2026 10:34:04 +0100 Amir Goldstein wrote: > On Wed, Jan 14, 2026 at 7:28=E2=80=AFAM Christoph Hellwig wrote: > > > > On Tue, Jan 13, 2026 at 12:06:42PM -0500, Jeff Layton wrote: =20 > > > Fair point, but it's not that hard to conceive of a situation where > > > someone inadvertantly exports cgroupfs or some similar filesystem: =20 > > > > Sure. But how is this worse than accidentally exporting private data > > or any other misconfiguration? > > =20 >=20 > My POV is that it is less about security (as your question implies), and > more about correctness. >=20 > The special thing about NFS export, as opposed to, say, ksmbd, is > open by file handle, IOW, the export_operations. >=20 > I perceive this as a very strange and undesired situation when NFS > file handles do not behave as persistent file handles. >=20 > FUSE will gladly open a completely different object, sometimes > a different object type from an NFS client request after server restart. >=20 > I suppose that the same could happen with tmpfs and probably some > other fs. ... You really shouldn't be allowed to nfs export a fs that doesn't have persistent file handles. Even file handles containing 'random' numbers can be problematic. The default used to be 'hard mounts' (not sure it is any more) which caused the client (not Linux - too long ago) to loop in kernel forever waiting for the server to recover the filesystem export. The only resolution on that system was to reboot the client. At least nfs can now use variable size file-ids. When I was fixing some code that exported a layered fs (I pretty much rewrote the fs at the same time) I did randomise the file-ids so they (hopefully) became invalid after a reboot (only after suffering some very corrupt filesystems!) I found nfs (over udp) had some interesting 'features': - If you export part of a fs you export all of it. (Especially since this predated the randomisation of the inode generation number.) - If you give anyone access you give everyone access. - If you give anyone write access you give everyone write access. The latter two because the 'mount' protocol wasn't really needed and the server didn't care where requests came from. David