public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] fs: listmount()/statmount() fix and sample program
@ 2024-11-15 15:35 Jeff Layton
  2024-11-15 15:35 ` [PATCH v2 1/2] samples: add a mountinfo program to demonstrate statmount()/listmount() Jeff Layton
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Jeff Layton @ 2024-11-15 15:35 UTC (permalink / raw)
  To: Christian Brauner, Alexander Viro, Jan Kara
  Cc: Josef Bacik, Miklos Szeredi, Ian Kent, David Howells,
	Amir Goldstein, Paul Moore, Karel Zak, linux-fsdevel,
	linux-kernel, Jeff Layton

We had some recent queries internally asking how to use the new
statmount() and listmount() interfaces. I was doing some other work in
this area, so I whipped up this tool.

My hope is that this will represent something of a "rosetta stone" for
how to translate between mountinfo and statmount(), and an example for
other people looking to use the new interfaces.

It may also be possible to use this as the basis for a listmount() and
statmount() testcase. We can call this program, and compare its output
to the mountinfo file.

The second patch adds security mount options to the existing mnt_opts in
the statmount() interface, which I think is the final missing piece
here. The alternative to doing that would be to add a new string field
for that, but I'm not sure that's worthwhile.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
Changes in v2:
- fixed off-by-one bug in listmount last_mnt_id handling
- patch to add the security mount options to statmount()
- Link to v1: https://lore.kernel.org/r/20241112-statmount-v1-1-d98090c4c8be@kernel.org

---
Jeff Layton (2):
      samples: add a mountinfo program to demonstrate statmount()/listmount()
      fs: prepend statmount.mnt_opts string with security_sb_mnt_opts()

 fs/namespace.c          |   4 +
 samples/vfs/.gitignore  |   1 +
 samples/vfs/Makefile    |   2 +-
 samples/vfs/mountinfo.c | 271 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 277 insertions(+), 1 deletion(-)
---
base-commit: 4be4eaeb1a60a7d52e66123f2f52f2da017c9881
change-id: 20241112-statmount-77808bc02302

Best regards,
-- 
Jeff Layton <jlayton@kernel.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-11-20  8:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 15:35 [PATCH v2 0/2] fs: listmount()/statmount() fix and sample program Jeff Layton
2024-11-15 15:35 ` [PATCH v2 1/2] samples: add a mountinfo program to demonstrate statmount()/listmount() Jeff Layton
2024-11-15 15:35 ` [PATCH v2 2/2] fs: prepend statmount.mnt_opts string with security_sb_mnt_opts() Jeff Layton
2024-11-20  8:23 ` [PATCH v2 0/2] fs: listmount()/statmount() fix and sample program Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox