rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Almeida <daniel.almeida@collabora.com>
To: Beata Michalska <beata.michalska@arm.com>
Cc: Benno Lossin <lossin@kernel.org>,
	Danilo Krummrich <dakr@kernel.org>,
	ojeda@kernel.org, alex.gaynor@gmail.com, aliceryhl@google.com,
	boqun.feng@gmail.com, gary@garyguo.net, bjorn3_gh@protonmail.com,
	a.hindborg@kernel.org, tmgross@umich.edu, alyssa@rosenzweig.io,
	lyude@redhat.com, rust-for-linux@vger.kernel.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] rust: drm: Drop the use of Opaque for ioctl arguments
Date: Fri, 20 Jun 2025 10:42:09 -0300	[thread overview]
Message-ID: <49BDC70A-7CBF-4C2F-955F-B680DA0BF30C@collabora.com> (raw)
In-Reply-To: <aFRi8cqkIzOAIbeR@arm.com>

Hi Beata,

>  There is no concurrent access nor shared references, unless the
> handler decides otherwise

It can’t do so in safe code. There is no way to manufacture a shared
reference from a mutable one in safe code and if it passes that to C, then
it’s already using a unsafe block for the ffi call.

Unless I missed something?

— Daniel

  reply	other threads:[~2025-06-20 13:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 10:21 [PATCH] rust: drm: Drop the use of Opaque for ioctl arguments Beata Michalska
2025-06-19 10:55 ` Danilo Krummrich
2025-06-19 11:01   ` Benno Lossin
2025-06-19 12:26     ` Daniel Almeida
2025-06-19 12:31       ` Daniel Almeida
2025-06-19 13:17       ` Benno Lossin
2025-06-19 18:51         ` Boqun Feng
2025-06-20 12:25         ` Beata Michalska
2025-06-20 13:42           ` Daniel Almeida [this message]
2025-06-23  8:14             ` Beata Michalska
2025-06-19 12:34     ` Alice Ryhl
2025-06-19 13:01   ` Danilo Krummrich
2025-06-20 12:17   ` Beata Michalska
2025-06-19 12:30 ` Daniel Almeida
2025-06-20 12:17   ` Beata Michalska

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=49BDC70A-7CBF-4C2F-955F-B680DA0BF30C@collabora.com \
    --to=daniel.almeida@collabora.com \
    --cc=a.hindborg@kernel.org \
    --cc=alex.gaynor@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=alyssa@rosenzweig.io \
    --cc=beata.michalska@arm.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun.feng@gmail.com \
    --cc=dakr@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gary@garyguo.net \
    --cc=lossin@kernel.org \
    --cc=lyude@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).