llvm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Tamir Duberstein" <tamird@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
	"Alex Gaynor" <alex.gaynor@gmail.com>,
	"Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"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>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Luis Chamberlain" <mcgrof@kernel.org>,
	"Russ Weight" <russ.weight@linux.dev>,
	"Peter Zijlstra" <peterz@infradead.org>,
	"Ingo Molnar" <mingo@redhat.com>, "Will Deacon" <will@kernel.org>,
	"Waiman Long" <longman@redhat.com>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nick Desaulniers" <nick.desaulniers+lkml@gmail.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	"Christian Brauner" <brauner@kernel.org>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	llvm@lists.linux.dev
Subject: Re: [PATCH v14 3/3] rust: replace `CStr` with `core::ffi::CStr`
Date: Wed, 13 Aug 2025 16:39:53 +0200	[thread overview]
Message-ID: <DC1DLSRDL44Z.W74NH6OV15J6@kernel.org> (raw)
In-Reply-To: <CAJ-ks9n4V-PEDhkTv6SXj_Oh6LB4LdsNi8Nnv_6JbT7dhvnh2w@mail.gmail.com>

On Wed Aug 13, 2025 at 4:06 PM CEST, Tamir Duberstein wrote:
> On Tue, Aug 12, 2025 at 3:50 AM Benno Lossin <lossin@kernel.org> wrote:
>> On Thu Jul 10, 2025 at 4:53 PM CEST, Tamir Duberstein wrote:
>> > +/// Extensions to [`CStr`].
>> > +pub trait CStrExt {
>>
>> Should we make this trait sealed?
>
> We can -- but is it harmful for someone to implement? I think probably not.

I don't think anything aside from `CStr` should implement it, so I'd say
we make it sealed. There are also safe functions that return raw
pointers & an implementation could just return a bogus pointer...

---
Cheers,
Benno

  reply	other threads:[~2025-08-13 14:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10 14:53 [PATCH v14 0/3] rust: replace kernel::str::CStr w/ core::ffi::CStr Tamir Duberstein
2025-07-10 14:53 ` [PATCH v14 1/3] rust: macros: reduce collections in `quote!` macro Tamir Duberstein
2025-07-10 14:53 ` [PATCH v14 2/3] rust: support formatting of foreign types Tamir Duberstein
2025-08-12  7:27   ` Benno Lossin
2025-07-10 14:53 ` [PATCH v14 3/3] rust: replace `CStr` with `core::ffi::CStr` Tamir Duberstein
2025-08-12  7:50   ` Benno Lossin
2025-08-13 14:06     ` Tamir Duberstein
2025-08-13 14:39       ` Benno Lossin [this message]
2025-08-13 15:46         ` Tamir Duberstein
2025-07-14 11:25 ` [PATCH v14 0/3] rust: replace kernel::str::CStr w/ core::ffi::CStr Danilo Krummrich

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=DC1DLSRDL44Z.W74NH6OV15J6@kernel.org \
    --to=lossin@kernel.org \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=brauner@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=justinstitt@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=longman@redhat.com \
    --cc=mcgrof@kernel.org \
    --cc=mingo@redhat.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=nick.desaulniers+lkml@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rafael@kernel.org \
    --cc=russ.weight@linux.dev \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --cc=tmgross@umich.edu \
    --cc=will@kernel.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;
as well as URLs for NNTP newsgroup(s).