From: Miklos Szeredi <firstname.lastname@example.org> To: James Bottomley <James.Bottomley@hansenpartnership.com> Cc: David Howells <email@example.com>, Al Viro <firstname.lastname@example.org>, "Theodore Ts'o" <email@example.com>, Andreas Dilger <firstname.lastname@example.org>, Eric Biggers <email@example.com>, Jeff Layton <firstname.lastname@example.org>, email@example.com, Carlos Maiolino <firstname.lastname@example.org>, "Darrick J. Wong" <email@example.com>, Linux API <firstname.lastname@example.org>, Linus Torvalds <email@example.com>, Ian Kent <firstname.lastname@example.org>, Miklos Szeredi <email@example.com>, Christian Brauner <firstname.lastname@example.org>, Jann Horn <email@example.com>, Karel Zak <firstname.lastname@example.org>, Jeff Layton <email@example.com>, firstname.lastname@example.org, LSM <email@example.com>, firstname.lastname@example.org Subject: Re: [PATCH 00/18] VFS: Filesystem information [ver #21] Date: Tue, 4 Aug 2020 21:18:38 +0200 [thread overview] Message-ID: <CAJfpegtbX4DZcEuyF1oBatP__jRc_=HFmcJE8XUHjy1rwtqdOg@mail.gmail.com> (raw) In-Reply-To: <1596555579.10158.23.camel@HansenPartnership.com> On Tue, Aug 4, 2020 at 5:40 PM James Bottomley <James.Bottomley@hansenpartnership.com> wrote: > > On Mon, 2020-08-03 at 14:36 +0100, David Howells wrote: > > Here's a set of patches that adds a system call, fsinfo(), that > > allows information about the VFS, mount topology, superblock and > > files to be retrieved. > > > > The patchset is based on top of the notifications patchset and allows > > event counters implemented in the latter to be retrieved to allow > > overruns to be efficiently managed. > > Could I repeat the question I asked about six months back that never > got answered: > > https://lore.kernel.org/linux-api/1582316494.3376.45.camel@HansenPartnership.com/ > > It sort of petered out into a long winding thread about why not use > sysfs instead, which really doesn't look like a good idea to me. > > I'll repeat the information for those who want to quote it easily on > reply without having to use a web interface: > > --- > Could I make a suggestion about how this should be done in a way that > doesn't actually require the fsinfo syscall at all: it could just be > done with fsconfig. The idea is based on something I've wanted to do > for configfd but couldn't because otherwise it wouldn't substitute for > fsconfig, but Christian made me think it was actually essential to the > ability of the seccomp and other verifier tools in the critique of > configfd and I belive the same critique applies here. > > Instead of making fsconfig functionally configure ... as in you pass > the attribute name, type and parameters down into the fs specific > handler and the handler does a string match and then verifies the > parameters and then acts on them, make it table configured, so what > each fstype does is register a table of attributes which can be got and > optionally set (with each attribute having a get and optional set > function). We'd have multiple tables per fstype, so the generic VFS > can register a table of attributes it understands for every fstype > (things like name, uuid and the like) and then each fs type would > register a table of fs specific attributes following the same pattern. > The system would examine the fs specific table before the generic one, > allowing overrides. fsconfig would have the ability to both get and > set attributes, permitting retrieval as well as setting (which is how I > get rid of the fsinfo syscall), we'd have a global parameter, which > would retrieve the entire table by name and type so the whole thing is > introspectable because the upper layer knows a-priori all the > attributes which can be set for a given fs type and what type they are > (so we can make more of the parsing generic). Any attribute which > doesn't have a set routine would be read only and all attributes would > have to have a get routine meaning everything is queryable. fsconfig(2) takes an fd referring to an fs_context, that in turn refers to a super_block. So using fsconfig() for retrieving super_block attributes would be fine (modulo value being const, and lack of buffer size). But what about mount attributes? I don't buy the argument that an API needs to be designed around the requirements of seccomp and the like. It should be the other way round. In that, I think your configfd idea was fine, and would answer the above question. Thanks, Miklos
next prev parent reply other threads:[~2020-08-04 19:18 UTC|newest] Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-08-03 13:36 David Howells 2020-08-03 13:36 ` [PATCH 01/18] fsinfo: Introduce a non-repeating system-unique superblock ID " David Howells 2020-08-04 9:34 ` Miklos Szeredi 2020-08-03 13:36 ` [PATCH 02/18] fsinfo: Add fsinfo() syscall to query filesystem information " David Howells 2020-08-04 10:16 ` Miklos Szeredi 2020-08-04 11:34 ` David Howells 2020-08-27 11:27 ` Michael Kerrisk (man-pages) 2020-08-03 13:36 ` [PATCH 03/18] fsinfo: Provide a bitmap of the features a filesystem supports " David Howells 2020-08-03 13:37 ` [PATCH 04/18] fsinfo: Allow retrieval of superblock devname, options and stats " David Howells 2020-08-03 13:37 ` [PATCH 05/18] fsinfo: Allow fsinfo() to look up a mount object by ID " David Howells 2020-08-04 10:33 ` Miklos Szeredi 2020-08-03 13:37 ` [PATCH 06/18] fsinfo: Add a uniquifier ID to struct mount " David Howells 2020-08-04 10:41 ` Miklos Szeredi 2020-08-04 12:32 ` Ian Kent 2020-08-05 14:13 ` David Howells 2020-08-05 14:46 ` Miklos Szeredi 2020-08-05 15:30 ` David Howells 2020-08-05 19:33 ` Matthew Wilcox 2020-08-06 5:43 ` Ian Kent 2020-08-03 13:37 ` [PATCH 07/18] fsinfo: Allow mount information to be queried " David Howells 2020-08-03 13:37 ` [PATCH 08/18] fsinfo: Allow mount topology and propagation info to be retrieved " David Howells 2020-08-04 13:38 ` Miklos Szeredi 2020-08-05 15:37 ` David Howells 2020-08-05 17:19 ` Miklos Szeredi 2020-08-03 13:37 ` [PATCH 09/18] watch_queue: Mount event counters " David Howells 2020-08-03 13:37 ` [PATCH 10/18] fsinfo: Provide notification overrun handling support " David Howells 2020-08-04 13:56 ` Miklos Szeredi 2020-08-05 2:05 ` Ian Kent 2020-08-05 2:46 ` Ian Kent 2020-08-05 7:45 ` Miklos Szeredi 2020-08-05 11:23 ` Ian Kent 2020-08-05 11:27 ` Miklos Szeredi 2020-08-06 1:47 ` Ian Kent 2020-08-05 16:06 ` David Howells 2020-08-05 17:26 ` Miklos Szeredi 2020-08-03 13:37 ` [PATCH 11/18] fsinfo: sample: Mount listing program " David Howells 2020-08-03 13:38 ` [PATCH 12/18] fsinfo: Add API documentation " David Howells 2020-08-03 13:38 ` [PATCH 13/18] fsinfo: Add support for AFS " David Howells 2020-08-03 13:38 ` [PATCH 14/18] fsinfo: Add support to ext4 " David Howells 2020-08-03 13:38 ` [PATCH 15/18] fsinfo: Add an attribute that lists all the visible mounts in a namespace " David Howells 2020-08-04 14:05 ` Miklos Szeredi 2020-08-05 0:59 ` Ian Kent 2020-08-05 16:44 ` David Howells 2020-08-03 13:38 ` [PATCH 16/18] errseq: add a new errseq_scrape function " David Howells 2020-08-03 13:38 ` [PATCH 17/18] vfs: allow fsinfo to fetch the current state of s_wb_err " David Howells 2020-08-03 13:39 ` [PATCH 18/18] samples: add error state information to test-fsinfo.c " David Howells 2020-08-04 15:39 ` [PATCH 00/18] VFS: Filesystem information " James Bottomley 2020-08-04 19:18 ` Miklos Szeredi [this message] 2020-08-05 17:13 ` David Howells
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='CAJfpegtbX4DZcEuyF1oBatP__jRc_=HFmcJE8XUHjy1rwtqdOg@mail.gmail.com' \ --email@example.com \ --cc=James.Bottomley@hansenpartnership.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [PATCH 00/18] VFS: Filesystem information [ver #21]' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).