Re: [PATCH v5] efivarfs: add nostatfs mount option to skip QueryVariableInfo()
From: Ard Biesheuvel
Date: Tue Oct 06 2026 - 06:05:36 EST
On Tue, 6 Oct 2026, at 10:41, Prashant Singh wrote:
> 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)
>
Excellent, thanks for clarifying.
I've queued this up now for v7.4