Re: [PATCH v5] efivarfs: add nostatfs mount option to skip QueryVariableInfo()
From: Prashant Singh
Date: Tue Oct 06 2026 - 04:44:18 EST
On Tue, 06 Oct 2026 09:09:33 +0200, Ard Biesheuvel wrote:
> So what happens with uid=/gid= in this case. Do they get reset to the
> default or not? And before this patch?
Preserved, not reset to the GLOBAL_ROOT default -- and unchanged from
before this patch.
efivarfs_reconfigure() applies only nostatfs to the live superblock; it
never touches uid/gid. uid/gid are parsed in efivarfs_parse_param() and
stamped onto inodes at creation in efivarfs_get_inode() (inode->i_uid/i_gid
= opts->uid/gid); reconfigure() has never re-applied them, so they are
effectively mount-time-only. A uid=/gid= given on remount lands in the
throwaway reconfigure fs_context and is ignored -- the live inodes and
show_options keep the original mount values.
Before this patch efivarfs_reconfigure() only had the ro/rw guard
(efivar_supports_writes()) and never applied uid/gid, so there is no
behavioural change; the patch only adds the nostatfs line.
Verified on 6.12 (Xeon), identical on a stock 6.12 without the patch:
mount -o uid=1000,gid=1000 -> uid=1000,gid=1000 (opts + inode owner)
mount -o remount -> still 1000:1000 (preserved)
mount -o remount,uid=2000 -> still 1000:1000 (ignored)
Thanks,
Prashant