From: "Alexandre Courbot" <acourbot@nvidia.com>
To: "Yilin Chen" <1479826151@qq.com>
Cc: <ojeda@kernel.org>, <boqun@kernel.org>, <gary@garyguo.net>,
<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
<a.hindborg@kernel.org>, <aliceryhl@google.com>,
<tmgross@umich.edu>, <dakr@kernel.org>,
<daniel.almeida@collabora.com>, <tamird@kernel.org>,
<work@onurozkan.dev>, <rust-for-linux@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] rust: list: document safety discharge and add offset_of! check
Date: Mon, 21 Sep 2026 13:53:52 +0900 [thread overview]
Message-ID: <DLKQ577P79LN.1YVO66REEP2SS@nvidia.com> (raw)
In-Reply-To: <tencent_F3A825AD475CB58F5C0D1C833FD3353E130A@qq.com>
On Mon Sep 21, 2026 at 1:14 PM JST, Yilin Chen wrote:
> Replace the remaining "// Safety: TODO" in the Rust intrusive list
> implementation with explanations.
>
> Also, the `impl_has_list_links_self_ptr!` macro does not perform
> the field-path validation already used by `impl_has_list_links!`.
> As a result, `addr_of_mut!` also accepts paths that require
> implicit dereferencing.
This paragraph sounds like it is an independent fix? Let's put it in its
own patch please as per the guidelines [1].
[1] https://docs.kernel.org/process/submitting-patches.html#separate-your-changes
>
> Use offset_of! in an unreachable branch to ensure that the path consists
> only of actual nested fields. The value is not evaluated, so the check
> has no runtime cost.
This one also? So if my understanding is correct this should be a 3
small (and easy to review) patches series. Your reviewers will be
thankful for the split.
prev parent reply other threads:[~2026-09-21 4:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 4:14 Yilin Chen
2026-09-21 4:53 ` 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=DLKQ577P79LN.1YVO66REEP2SS@nvidia.com \
--to=acourbot@nvidia.com \
--cc=1479826151@qq.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=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=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/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®