Re: [PATCH v4] efivarfs: add nostatfs mount option to skip QueryVariableInfo()

From: Sebastian Andrzej Siewior

Date: Tue Sep 29 2026 - 11:21:12 EST


On 2026-09-29 14:22:31 [+0200], Ard Biesheuvel wrote:
> Hi Sebastian,
Hi Ard,

> Thanks for taking a look.

doing my best…

> >> --- a/fs/efivarfs/internal.h
> >> +++ b/fs/efivarfs/internal.h
> >> @@ -11,6 +11,7 @@
> >> struct efivarfs_mount_opts {
> >> kuid_t uid;
> >> kgid_t gid;
> >> + bool nostatfs; /* skip QueryVariableInfo() in statfs() */
> > Here and below you add a comment to every change you make. What about
> > focusing on the important parts, that deserve an explanation why a
> > change has been made. For instance why nostatfs has the READ_ONCE/
> > WRITE_ONCE accessors and sometimes it does not.
> >
>
> AIUI the READ_ONCE/WRITE_ONCE were added because Sashiko warned about
> potential KCSAN splats? It would be nice to mention that.

:)

> In any case, KCSAN is runtime instrumentation, and efi_reboot_required()
> is only called after all other CPUs have been brought down. So if anything,
> this should just wrap the read on the reboot path in a data_race() so
> that we don't trigger any instrumentation inadvertently on the way down.

Right. So if anything, there could be a data_race() in one place instead
inconsistent READ/ WRITE once as we have it now.

Sebastian