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: <DAGEV65EU1DO.152XYF0ZYTM6P@kernel.org>
Date: Sat, 07 Jun 2025 17:37:11 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Christian Schrefl" <chrisi.schrefl@...il.com>, "Miguel Ojeda"
 <ojeda@...nel.org>, "Danilo Krummrich" <dakr@...nel.org>, "Alex Gaynor"
 <alex.gaynor@...il.com>, "Boqun Feng" <boqun.feng@...il.com>, "Gary Guo"
 <gary@...yguo.net>, Björn Roy Baron
 <bjorn3_gh@...tonmail.com>, "Andreas Hindborg" <a.hindborg@...nel.org>,
 "Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
 "Arnd Bergmann" <arnd@...db.de>, "Greg Kroah-Hartman"
 <gregkh@...uxfoundation.org>, "Lee Jones" <lee@...nel.org>, "Daniel
 Almeida" <daniel.almeida@...labora.com>
Cc: Gerald Wisböck <gerald.wisboeck@...ther.ink>,
 <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/3] rust: miscdevice: add additional data to
 MiscDeviceRegistration

On Sat Jun 7, 2025 at 1:34 PM CEST, Christian Schrefl wrote:
> Yeah I understand that its not UB, but to me it seems a bit fragile and opaque why it is allowed.
> That's what I meant by "a bit iffy".

What's fragile about it? That someone could add a non-opaque field to
the struct? Or that one is not allowed to take an `&`?

> Alright but I doubt that realistic, since the `Data` would always at
> least be shared between the owner of `MiscDeviceRegistration` and the
> `fops` implementation. Meaning its always shared with syscall context
> and I don't think it makes sense to have a registration owed in 
> that context.

That might be the case, but I think we should have this as a general
design guideline: avoid unnecessary trait bounds.

---
Cheers,
Benno

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ