All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fiona Behrens <me@kloenk.dev>
To: Andreas Hindborg <a.hindborg@kernel.org>
Cc: "Danilo Krummrich" <dakr@kernel.org>,
	"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>,
	"Benno Lossin" <benno.lossin@proton.me>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Joel Becker" <jlbec@evilplan.org>,
	"Christoph Hellwig" <hch@lst.de>,
	rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Tamir Duberstein" <tamird@gmail.com>
Subject: Re: [PATCH 1/4] rust: types: add `ForeignOwnable::PointedTo`
Date: Wed, 05 Feb 2025 20:59:03 +0100	[thread overview]
Message-ID: <87bjvgp3i0.fsf@kloenk.dev> (raw)
In-Reply-To: <20250131-configfs-v1-1-87947611401c@kernel.org> (Andreas Hindborg's message of "Fri, 31 Jan 2025 14:30:08 +0100")

Andreas Hindborg <a.hindborg@kernel.org> writes:

> From: Tamir Duberstein <tamird@gmail.com>
>
> Allow implementors to specify the foreign pointer type; this exposes
> information about the pointed-to type such as its alignment.
>
> This requires the trait to be `unsafe` since it is now possible for
> implementors to break soundness by returning a misaligned pointer.
>
> Encoding the pointer type in the trait (and avoiding pointer casts)
> allows the compiler to check that implementors return the correct
> pointer type. This is preferable to directly encoding the alignment in
> the trait using a constant as the compiler would be unable to check it.
>
> Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
> Signed-off-by: Tamir Duberstein <tamird@gmail.com>
> Signed-off-by: Andreas Hindborg <a.hindborg@kernel.org>
>

Reviewed-by: Fiona Behrens <me@kloenk.dev>


  reply	other threads:[~2025-02-05 19:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-31 13:30 [PATCH 0/4] rust: configfs abstractions Andreas Hindborg
2025-01-31 13:30 ` [PATCH 1/4] rust: types: add `ForeignOwnable::PointedTo` Andreas Hindborg
2025-02-05 19:59   ` Fiona Behrens [this message]
2025-02-06 12:18   ` Alice Ryhl
2025-01-31 13:30 ` [PATCH 2/4] rust: sync: change `<Arc<T> as ForeignOwnable>::PointedTo` to `T` Andreas Hindborg
2025-02-05 20:02   ` Fiona Behrens
2025-01-31 13:30 ` [PATCH 3/4] rust: configfs: introduce rust support for configfs Andreas Hindborg
2025-02-01  0:56   ` Charalampos Mitrodimas
2025-02-01  6:56     ` Andreas Hindborg
2025-02-05 21:19   ` Fiona Behrens
2025-02-06 11:37     ` Andreas Hindborg
2025-02-06 12:33   ` Andreas Hindborg
2025-01-31 13:30 ` [PATCH 4/4] MAINTAINERS: add entry for configfs Rust abstractions Andreas Hindborg

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=87bjvgp3i0.fsf@kloenk.dev \
    --to=me@kloenk.dev \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=hch@lst.de \
    --cc=jlbec@evilplan.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.