From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Gary Guo" <gary@garyguo.net>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: io: require proper alignment in the safety contracts of `IoCapable`
Date: Tue, 09 Jun 2026 20:30:42 +0900 [thread overview]
Message-ID: <DJ4HGDIUQ5RG.3HUE8KJ44ZHWN@nvidia.com> (raw)
In-Reply-To: <DJ3LM0JABTV7.1SGWCGBBLAZ2M@garyguo.net>
On Mon Jun 8, 2026 at 7:33 PM JST, Gary Guo wrote:
> On Mon Jun 8, 2026 at 9:14 AM BST, Alexandre Courbot wrote:
>> The addresses passed to `io_read` and `io_write` must be properly
>> aligned, but the safety contract only mentions a valid range as a
>> requirement.
>>
>> Add alignment to the requirements. The existing call sites already
>> obtain the address through `io_addr()` or `io_addr_assert(),` which
>> both check alignment, so no code changes are needed to them.
>>
>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
>
> There is
> https://lore.kernel.org/rust-for-linux/20260421-io_projection-v2-4-4c251c692ef4@garyguo.net/.
>
> Although this patch will be gone from v3, as `IoCapable` is not going to be
> unsafe anymore.
Ah, perfect! Dropping this patch then.
prev parent reply other threads:[~2026-06-09 11:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 8:14 [PATCH] rust: io: require proper alignment in the safety contracts of `IoCapable` Alexandre Courbot
2026-06-08 10:33 ` Gary Guo
2026-06-09 11:30 ` Alexandre Courbot [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=DJ4HGDIUQ5RG.3HUE8KJ44ZHWN@nvidia.com \
--to=acourbot@nvidia.com \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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