linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] vfs: output mount_too_revealing() errors to fscontext
@ 2025-08-06  4:48 Aleksa Sarai
  2025-08-06  4:48 ` [PATCH 1/2] fscontext: add custom-prefix log helpers Aleksa Sarai
  2025-08-06  4:48 ` [PATCH 2/2] vfs: output mount_too_revealing() errors to fscontext Aleksa Sarai
  0 siblings, 2 replies; 5+ messages in thread
From: Aleksa Sarai @ 2025-08-06  4:48 UTC (permalink / raw)
  To: Alexander Viro, Christian Brauner, Jan Kara
  Cc: David Howells, linux-api, linux-kernel, linux-fsdevel,
	Aleksa Sarai

It makes little sense for fsmount() to output the warning message when
mount_too_revealing() is violated to kmsg. Instead, the warning should
be output (with a "VFS" prefix) to the fscontext log. In addition,
include the same log message for mount_too_revealing() when doing a
regular mount for consistency.

With the newest fsopen()-based mount(8) from util-linux, the error
messages now look like

  # mount -t proc proc /tmp
  mount: /tmp: fsmount() failed: VFS: Mount too revealing.
	 dmesg(1) may have more information after failed mount system call.

which could finally result in mount_too_revealing() errors being easier
for users to detect and understand.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
---
Aleksa Sarai (2):
      fscontext: add custom-prefix log helpers
      vfs: output mount_too_revealing() errors to fscontext

 fs/namespace.c             |  6 ++++--
 include/linux/fs_context.h | 18 ++++++++++++++----
 2 files changed, 18 insertions(+), 6 deletions(-)
---
base-commit: 66639db858112bf6b0f76677f7517643d586e575
change-id: 20250805-errorfc-mount-too-revealing-5d9f670ba770

Best regards,
-- 
Aleksa Sarai <cyphar@cyphar.com>


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

end of thread, other threads:[~2025-08-06  6:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-06  4:48 [PATCH 0/2] vfs: output mount_too_revealing() errors to fscontext Aleksa Sarai
2025-08-06  4:48 ` [PATCH 1/2] fscontext: add custom-prefix log helpers Aleksa Sarai
2025-08-06  4:48 ` [PATCH 2/2] vfs: output mount_too_revealing() errors to fscontext Aleksa Sarai
2025-08-06  5:41   ` Al Viro
2025-08-06  6:06     ` Aleksa Sarai

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).