lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DA9QOTLU4U5M.2X7K7UWJ53QGI@kernel.org>
Date: Fri, 30 May 2025 21:24:28 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Christian Schrefl" <chrisi.schrefl@...il.com>, "Danilo Krummrich"
 <dakr@...nel.org>, <gregkh@...uxfoundation.org>, <rafael@...nel.org>,
 <ojeda@...nel.org>, <alex.gaynor@...il.com>, <boqun.feng@...il.com>,
 <gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, <benno.lossin@...ton.me>,
 <a.hindborg@...nel.org>, <aliceryhl@...gle.com>, <tmgross@...ch.edu>
Cc: <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/7] misc device: support device drivers

On Fri May 30, 2025 at 7:29 PM CEST, Christian Schrefl wrote:
> On 30.05.25 6:37 PM, Christian Schrefl wrote:
>> On 30.05.25 4:24 PM, Danilo Krummrich wrote:
>>> This patch series adds support for device drivers to the misc device
>>> abstraction.
>>>
>>> For design details, please see:
>>>   * patch 5 "rust: miscdevice: properly support device drivers"
>>>   * patch 6 "rust: miscdevice: expose the parent device as &Device<Bound>"
>>>
>>> This patch series depends on the pin-init series from Benno [1] as well as on
>>> the misc device series from Christian [2], with UnsafePinned replaced with
>>> Opaque, as suggested by Alice, since UnsafePinned may still take a while to
>>> land.
>> 
>> If you want I can send out a new version using `Opaque`.
>> 
>> We could also add a type alias like:
>> 
>> type UnsafePinned<T> = Opaque<T>;
>
> I forgot that Opaque doesn't drop, this would not be quite as simple,
> but with a newtype with a `Drop` impl it should be possible.

That's one issue another is that `Opaque` also allows uninitialized
memory and (if the upstream one isn't changed) also modifies the
behavior of shared references. I don't think we should name it
`UnsafePinned` if it doesn't guarantee the same thing as the upstream
one.

---
Cheers,
Benno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ