From: "Ard Biesheuvel" <ardb@kernel.org>
To: "Prashant Singh" <singhpra@juniper.net>,
"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>
Cc: "Jeremy Kerr" <jk@ozlabs.org>,
"Clark Williams" <clrkwllms@kernel.org>,
"Steven Rostedt" <rostedt@goodmis.org>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Luis Claudio R. Goncalves" <lgoncalv@redhat.com>,
"Steve McIntyre" <93sam@debian.org>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v4] efivarfs: add nostatfs mount option to skip QueryVariableInfo()
Date: Sun, 04 Oct 2026 09:58:44 +0200 [thread overview]
Message-ID: <4491d728-64f6-4ab1-aae2-22bce34a9b18@app.fastmail.com> (raw)
In-Reply-To: <20261001012011.30525-1-singhpra@juniper.net>
On Thu, 1 Oct 2026, at 03:20, Prashant Singh wrote:
> Thanks Ard and Sebastian for the comments.
>
...
>>AFAICT, that would potentially leave KCSAN instrumentation on the reboot
>>path, which might trigger and interfere with the reboot. So instead,
>>I'd like to put this in efi_reboot_required if we can. If it is needed
>>in more places to address an actual KCSAN splat, I don't mind. If it is
>>just to make Sashiko happy, then we shouldn't bother.
>
> Could you please clarify what you mean by efi_reboot_required here? nostatfs
> is only read in efivarfs_statfs(), efivarfs_show_options() and
> efivarfs_init_fs_context(), none of which run on the reboot path, so I'm
> not sure how it would apply.
>
Apologies, I managed to completely confuse myself here. Forget what I said
here, please :-)
> On the annotation itself: an internal review flagged a potential KCSAN
> data race rather than an observed splat -- statfs() can run concurrently
> with a remount updating the flag, so it is a genuine (benign) concurrent
> access. I ran concurrent statfs/remount loops on separate CPUs under
> KCSAN and didn't trigger a report in a bounded run, which could be
> expected given KCSAN samples accesses, so it doesn't disprove the race.
> Since KCSAN only needs one side of the pair marked, data_race() on the
> write covers both readers and the reads stay plain. I'm happy to drop it
> entirely if you'd prefer to keep the benign race unannotated.
>
No, let's keep it as you suggest.
>>Please keep this description _here_ where you have it. Once this is
>>merged, you could send another patch, extending the documentation with
>>the statfs option (I think the workqueue change is in).
>
> Sure -- I'll keep it in Documentation/filesystems/efivarfs.rst for now
> and send a follow-up extending Documentation/core-api/real-time/hardware.rst
> once this is merged.
>
>>You still have the problem that someone reading the variable leads to
>>the same problem but this requires a privileged user. And if I am not
>>mistaken, someone sent patches to have efi-runtime runtime disabled/
>>enabled.
>
> Agreed -- the variable-read path is the same, but needs a privileged
> user unlike the unprivileged statfs()/df trigger.
>
Indeed - this is only about anyone with read permissions on the mount
point being able to trigger this. And looking at your results, the
rate limit we added recently might be a bit too permissive as well.
next prev parent reply other threads:[~2026-10-04 7:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 20:34 Prashant Singh
2026-09-28 20:47 ` sashiko-bot
2026-09-29 6:32 ` Ard Biesheuvel
2026-09-29 7:43 ` Sebastian Andrzej Siewior
2026-09-29 12:22 ` Ard Biesheuvel
2026-09-29 15:14 ` Sebastian Andrzej Siewior
2026-09-30 1:35 ` Prashant Singh
2026-09-30 6:09 ` Ard Biesheuvel
2026-09-30 6:32 ` Sebastian Andrzej Siewior
2026-10-01 1:20 ` Prashant Singh
2026-10-04 7:58 ` Ard Biesheuvel [this message]
2026-10-04 14:43 ` MaeeFilho FL
2026-10-05 23:35 ` Prashant Singh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4491d728-64f6-4ab1-aae2-22bce34a9b18@app.fastmail.com \
--to=ardb@kernel.org \
--cc=93sam@debian.org \
--cc=bigeasy@linutronix.de \
--cc=clrkwllms@kernel.org \
--cc=corbet@lwn.net \
--cc=jk@ozlabs.org \
--cc=lgoncalv@redhat.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=rdunlap@infradead.org \
--cc=rostedt@goodmis.org \
--cc=singhpra@juniper.net \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®