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: <ZvqVedQhdyiWREcd@pollux>
Date: Mon, 30 Sep 2024 14:11:37 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: "gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Cc: Guilherme Giácomo Simões <trintaeoitogc@...il.com>,
	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, aliceryhl@...gle.com, mcgrof@...nel.org,
	russ.weight@...ux.dev, dakr@...hat.com, a.hindborg@...nel.org,
	rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] device: rust: change the name function

On Mon, Sep 30, 2024 at 01:35:09PM +0200, gregkh@...uxfoundation.org wrote:
> 
> >      /// While not officially documented, this should be the case for
> > any `struct device`.
> > -    pub unsafe fn from_raw(ptr: *mut bindings::device) -> ARef<Self> {
> > +    pub unsafe fn get_device(ptr: *mut bindings::device) -> ARef<Self> {
> 
> With this change, nothing broke?  Does nothing call this code yet?  I
> thought the firmware interface did that, but I could be wrong...

The firmware code uses the `Device` structure, but it doesn't create a
reference from a raw pointer.

This function should probably only ever be called from bus abstractions. I
thought the PHY layer needed this urgently (which also was the reason we merged
it already), so I'd expect the PHY code to use it.

Though, they might just use `as_ref`.

- Danilo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ