From mboxrd@z Thu Jan 1 00:00:00 1970 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=-4.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 A447FC433E0 for ; Wed, 12 Aug 2020 17:39:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 90B0920781 for ; Wed, 12 Aug 2020 17:39:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726611AbgHLRjb (ORCPT ); Wed, 12 Aug 2020 13:39:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725993AbgHLRj2 (ORCPT ); Wed, 12 Aug 2020 13:39:28 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04CFAC061383; Wed, 12 Aug 2020 10:39:26 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1k5uiV-00ECnX-Nd; Wed, 12 Aug 2020 17:39:12 +0000 Date: Wed, 12 Aug 2020 18:39:11 +0100 From: Al Viro To: Miklos Szeredi Cc: Linus Torvalds , Jann Horn , Casey Schaufler , Andy Lutomirski , linux-fsdevel , David Howells , Karel Zak , Jeff Layton , Miklos Szeredi , Nicolas Dichtel , Christian Brauner , Lennart Poettering , Linux API , Ian Kent , LSM , Linux Kernel Mailing List Subject: Re: file metadata via fs API (was: [GIT PULL] Filesystem Information) Message-ID: <20200812173911.GT1236603@ZenIV.linux.org.uk> References: <20200812143957.GQ1236603@ZenIV.linux.org.uk> <20200812150807.GR1236603@ZenIV.linux.org.uk> <20200812163347.GS1236603@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 12, 2020 at 07:16:37PM +0200, Miklos Szeredi wrote: > On Wed, Aug 12, 2020 at 6:33 PM Al Viro wrote: > > > > On Wed, Aug 12, 2020 at 05:13:14PM +0200, Miklos Szeredi wrote: > > > > Why does it have to have a struct mount? It does not have to use > > > dentry/mount based path lookup. > > > > What the fuck? So we suddenly get an additional class of objects > > serving as kinda-sorta analogues of dentries *AND* now struct file > > might refer to that instead of a dentry/mount pair - all on the VFS > > level? And so do all the syscalls you want to allow for such "pathnames"? > > The only syscall I'd want to allow is open, everything else would be > on the open files themselves. > > file->f_path can refer to an anon mount/inode, the real object is > referred to by file->private_data. > > The change to namei.c would be on the order of ~10 lines. No other > parts of the VFS would be affected. If some of the things you open are directories (and you *have* said that directories will be among those just upthread, and used references to readdir() as argument in favour of your approach elsewhere in the thread), you will have to do something about fchdir(). And that's the least of the issues. > Maybe I'm optimistic; we'll > see... > Now off to something completely different. Back on Tuesday. ... after the window closes. You know, it's really starting to look like rather nasty tactical games...