From: "Gary Guo" <gary@garyguo.net>
To: "Benno Lossin" <lossin@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/3] rust: ptr: add `KnownSize` trait to support DST size info extraction
Date: Mon, 02 Mar 2026 19:42:45 +0000 [thread overview]
Message-ID: <DGSJX6W0J0KI.3PSYU2YJN0AHL@garyguo.net> (raw)
In-Reply-To: <DGSIYA7A879T.2XI2BBJGPRC34@kernel.org>
On Mon Mar 2, 2026 at 6:57 PM GMT, Benno Lossin wrote:
> On Mon Mar 2, 2026 at 5:42 PM CET, Gary Guo wrote:
>> From: Gary Guo <gary@garyguo.net>
>>
>> Add a `KnownSize` trait which is used obtain a size from a raw pointer's
>> metadata. This makes it possible to obtain size information on a raw slice
>> pointer. This is similar to Rust `core::mem::size_of_val_raw` which is not
>> yet stable.
>>
>> Signed-off-by: Gary Guo <gary@garyguo.net>
>> ---
>> rust/kernel/lib.rs | 1 +
>> rust/kernel/ptr.rs | 27 ++++++++++++++++++++++++++-
>> 2 files changed, 27 insertions(+), 1 deletion(-)
>>
>> diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
>> index 3da92f18f4ee..510cc7fe4961 100644
>> --- a/rust/kernel/lib.rs
>> +++ b/rust/kernel/lib.rs
>> @@ -20,6 +20,7 @@
>> #![feature(generic_nonzero)]
>> #![feature(inline_const)]
>> #![feature(pointer_is_aligned)]
>> +#![feature(slice_ptr_len)]
>
> Oh and this is also missing a stability comment.
I don't see anything missing here? This is in the same group as other features
that are stable in 1.79.
Best,
Gary
>
> Cheers,
> Benno
>
>> //
>> // Stable since Rust 1.80.0.
>> #![feature(slice_flatten)]
next prev parent reply other threads:[~2026-03-02 19:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20260302164239.284084-1-gary@kernel.org>
2026-03-02 16:42 ` Gary Guo
2026-03-02 18:56 ` Benno Lossin
2026-03-02 18:57 ` Benno Lossin
2026-03-02 19:42 ` Gary Guo [this message]
2026-03-02 21:52 ` Benno Lossin
2026-03-02 16:42 ` [PATCH v4 2/3] rust: ptr: add projection infrastructure Gary Guo
2026-03-02 19:02 ` Benno Lossin
2026-03-03 21:11 ` Miguel Ojeda
2026-03-02 16:42 ` [PATCH v4 3/3] rust: dma: use pointer projection infra for `dma_{read,write}` macro Gary Guo
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=DGSJX6W0J0KI.3PSYU2YJN0AHL@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--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
all inboxes | Powered by JetHome®