rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Benno Lossin <benno.lossin@proton.me>
Cc: stable@vger.kernel.org, Miguel Ojeda <ojeda@kernel.org>,
	Alex Gaynor <alex.gaynor@gmail.com>,
	Wedson Almeida Filho <wedsonaf@gmail.com>,
	Alice Ryhl <aliceryhl@google.com>, Gary Guo <gary@garyguo.net>,
	Andreas Hindborg <a.hindborg@samsung.com>,
	Martin Rodriguez Reboredo <yakoyoku@gmail.com>,
	rust-for-linux@vger.kernel.org
Subject: Re: backport 0b4e3b6f6b79 and 35cad617df2e
Date: Sat, 4 Nov 2023 17:02:00 -0400	[thread overview]
Message-ID: <ZUaxSDabYeRN7TPv@sashalap> (raw)
In-Reply-To: <1760daa6-7245-4d01-bb89-388c472ec5ed@proton.me>

On Fri, Nov 03, 2023 at 09:57:46PM +0000, Benno Lossin wrote:
>Hi,
>
>I noticed that without commit 0b4e3b6f6b79 ("rust: types: make `Opaque`
>be `!Unpin`") the `Opaque` type has an unsound API:
>The `Opaque` type is designed to wrap C types, hence it is often used to
>convert raw pointers to references in Rust. Normally `&mut` references
>are unique, but for `&mut Opaque<T>` this is should not be the case,
>since C also has pointers to the object. The way to disable the
>uniqueness guarantee for `&mut` in Rust is to make the type `!Unpin`.
>This is accomplished by the given commit above. At the time of creating
>that patch however, we did not consider this unsoundness issue.
>
>For this reason I propose to backport the commit 0b4e3b6f6b79.
>The only affected version is 6.5. No earlier version is affected, since
>the `Opaque` type does not exist in 6.1. Newer versions are also
>unaffected, since the patch is present in 6.6.
>
>Additionally I also propose to backport commit 35cad617df2e ("rust: make
>`UnsafeCell` the outer type in `Opaque`") to 6.5, as this is a
>prerequisite of 0b4e3b6f6b79.

Queued up, thanks!

-- 
Thanks,
Sasha

      reply	other threads:[~2023-11-04 21:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03 21:57 backport 0b4e3b6f6b79 and 35cad617df2e Benno Lossin
2023-11-04 21:02 ` Sasha Levin [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=ZUaxSDabYeRN7TPv@sashalap \
    --to=sashal@kernel.org \
    --cc=a.hindborg@samsung.com \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=benno.lossin@proton.me \
    --cc=gary@garyguo.net \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    --cc=yakoyoku@gmail.com \
    /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).