From: "Gary Guo" <gary@garyguo.net>
To: "Alessio Maroni" <alessiomaroni0@gmail.com>, <brauner@kernel.org>,
<viro@zeniv.linux.org.uk>, <ojeda@kernel.org>
Cc: <rust-for-linux@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rust: fs, hrtimer: replace read_volatile workarounds with atomic_load
Date: Sun, 12 Jul 2026 14:40:48 +0100 [thread overview]
Message-ID: <DJWMVYQ3TTQS.2L7BV8YNBROAN@garyguo.net> (raw)
In-Reply-To: <20260712123502.2829-1-alessiomaroni0@gmail.com>
On Sun Jul 12, 2026 at 1:34 PM BST, Alessio Maroni wrote:
> Please disregard this patch.
>
> As pointed out by the Sashiko AI review, using `atomic_load` here
> introduces critical alignment issues on 32-bit platforms for ktime_t
> and violates the safety contract regarding concurrent non-atomic stores
> on the C side.
>
> We definitely need a proper `read_once` abstraction in Rust before
> handling these cases. Sorry for the noise!
The symptom is correct but your conclusion is wrong. Tearing is not allowed for
hrtimer!
This is already being worked on, though:
https://lore.kernel.org/rust-for-linux/20260303061000.73970-1-tomo@aliasing.net/
Best,
Gary
prev parent reply other threads:[~2026-07-12 13:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 12:14 Alessio Maroni
2026-07-12 12:34 ` Alessio Maroni
2026-07-12 13:40 ` Gary Guo [this message]
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=DJWMVYQ3TTQS.2L7BV8YNBROAN@garyguo.net \
--to=gary@garyguo.net \
--cc=alessiomaroni0@gmail.com \
--cc=brauner@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/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®