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: <DAKFBPWTNSL4.28PA3G5BAIB8T@kernel.org>
Date: Thu, 12 Jun 2025 10:49:28 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "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>
Cc: <rust-for-linux@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] rust: devres: do not dereference to the internal
 Revocable

On Wed Jun 11, 2025 at 7:48 PM CEST, Danilo Krummrich wrote:
> We can't expose direct access to the internal Revocable, since this
> allows users to directly revoke the internal Revocable without Devres
> having the chance to synchronize with the devres callback -- we have to
> guarantee that the internal Revocable has been fully revoked before
> the device is fully unbound.
>
> Hence, remove the corresponding Deref implementation and, instead,
> provide indirect accessors for the internal Revocable.
>
> Note that we can still support Devres::revoke() by implementing the
> required synchronization (which would be almost identical to the
> synchronization in Devres::drop()).
>
> Fixes: 76c01ded724b ("rust: add devres abstraction")
> Signed-off-by: Danilo Krummrich <dakr@...nel.org>

Reviewed-by: Benno Lossin <lossin@...nel.org>

---
Cheers,
Benno

> ---
> This patch is based on [1].
>
> [1] https://lore.kernel.org/lkml/20250603205416.49281-1-dakr@kernel.org/
> ---
>  rust/kernel/devres.rs | 27 ++++++++++++++++-----------
>  1 file changed, 16 insertions(+), 11 deletions(-)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ