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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68fd9ef6-a93a-413a-99b4-1b4d100aecb9@gmail.com>
Date: Sat, 7 Jun 2025 17:39:31 +0200
From: Christian Schrefl <chrisi.schrefl@...il.com>
To: Benno Lossin <lossin@...nel.org>, 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 07.06.25 5:37 PM, Benno Lossin wrote:
> 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 `&`?

Yeah that a added field could cause UB seems bad to me.

> 
>> 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.

Alright seems fine to me.

Cheers
Christian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ