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>] [day] [month] [year] [list]
Message-ID: <20240430103107.669490717@linuxfoundation.org>
Date: Tue, 30 Apr 2024 12:38:32 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: stable@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	patches@...ts.linux.dev,
	FUJITA Tomonori <fujita.tomonori@...il.com>,
	Trevor Gross <tmgross@...ch.edu>,
	netdev@...r.kernel.org,
	Wedson Almeida Filho <walmeida@...rosoft.com>,
	Alice Ryhl <aliceryhl@...gle.com>,
	Miguel Ojeda <ojeda@...nel.org>
Subject: [PATCH 6.8 134/228] rust: phy: implement `Send` for `Registration`

6.8-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Wedson Almeida Filho <walmeida@...rosoft.com>

commit df70d04d56975f527b9c965322cf56e245909071 upstream.

In preparation for requiring `Send` for `Module` implementations in the
next patch.

Cc: FUJITA Tomonori <fujita.tomonori@...il.com>
Cc: Trevor Gross <tmgross@...ch.edu>
Cc: netdev@...r.kernel.org
Signed-off-by: Wedson Almeida Filho <walmeida@...rosoft.com>
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Link: https://lore.kernel.org/r/20240328195457.225001-2-wedsonaf@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 rust/kernel/net/phy.rs |    4 ++++
 1 file changed, 4 insertions(+)

--- a/rust/kernel/net/phy.rs
+++ b/rust/kernel/net/phy.rs
@@ -640,6 +640,10 @@ pub struct Registration {
     drivers: Pin<&'static mut [DriverVTable]>,
 }
 
+// SAFETY: The only action allowed in a `Registration` instance is dropping it, which is safe to do
+// from any thread because `phy_drivers_unregister` can be called from any thread context.
+unsafe impl Send for Registration {}
+
 impl Registration {
     /// Registers a PHY driver.
     pub fn register(



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ