Rust for Linux List
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
	Miguel Ojeda <ojeda@kernel.org>,
	Alex Gaynor <alex.gaynor@gmail.com>,
	Pekka Ristola <pekkarr@protonmail.com>
Cc: "Christian Brauner" <brauner@kernel.org>,
	"Jan Kara" <jack@suse.cz>, "Boqun Feng" <boqun.feng@gmail.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	linux-fsdevel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2] rust: file: mark `LocalFile` as `repr(transparent)`
Date: Fri, 30 May 2025 07:12:59 +0200	[thread overview]
Message-ID: <20250530-minuten-beheben-df4e8ce17716@brauner> (raw)
In-Reply-To: <20250527204636.12573-1-pekkarr@protonmail.com>

On Tue, 27 May 2025 20:48:55 +0000, Pekka Ristola wrote:
> Unsafe code in `LocalFile`'s methods assumes that the type has the same
> layout as the inner `bindings::file`. This is not guaranteed by the default
> struct representation in Rust, but requires specifying the `transparent`
> representation.
> 
> The `File` struct (which also wraps `bindings::file`) is already marked as
> `repr(transparent)`, so this change makes their layouts equivalent.
> 
> [...]

Applied to the vfs.fixes branch of the vfs/vfs.git tree.
Patches in the vfs.fixes branch should appear in linux-next soon.

Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.

It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.

Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.fixes

[1/2] rust: file: mark `LocalFile` as `repr(transparent)`
      https://git.kernel.org/vfs/vfs/c/15ecd83dc062
[2/2] rust: file: improve safety comments
      https://git.kernel.org/vfs/vfs/c/946026ba4293

      parent reply	other threads:[~2025-05-30  5:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-27 20:48 [PATCH 1/2] rust: file: mark `LocalFile` as `repr(transparent)` Pekka Ristola
2025-05-27 20:48 ` [PATCH 2/2] rust: file: improve safety comments Pekka Ristola
2025-05-28 10:20   ` Alice Ryhl
2025-05-28 15:30   ` Benno Lossin
2025-05-28 10:19 ` [PATCH 1/2] rust: file: mark `LocalFile` as `repr(transparent)` Alice Ryhl
2025-05-28 10:51 ` Miguel Ojeda
2025-05-28 12:18   ` Pekka Ristola
2025-05-28 15:29 ` Benno Lossin
2025-05-30  5:12 ` Christian Brauner [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=20250530-minuten-beheben-df4e8ce17716@brauner \
    --to=brauner@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=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=pekkarr@protonmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tmgross@umich.edu \
    --cc=viro@zeniv.linux.org.uk \
    /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