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: <a25f7cfe-ef43-4841-ab81-0ecf59b20f15@kernel.org>
Date: Tue, 3 Dec 2024 10:21:06 +0100
From: Danilo Krummrich <dakr@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: gregkh@...uxfoundation.org, rafael@...nel.org, bhelgaas@...gle.com,
 ojeda@...nel.org, alex.gaynor@...il.com, boqun.feng@...il.com,
 gary@...yguo.net, bjorn3_gh@...tonmail.com, benno.lossin@...ton.me,
 tmgross@...ch.edu, a.hindborg@...sung.com, airlied@...il.com,
 fujita.tomonori@...il.com, lina@...hilina.net, pstanner@...hat.com,
 ajanulgu@...hat.com, lyude@...hat.com, robh@...nel.org,
 daniel.almeida@...labora.com, saravanak@...gle.com,
 rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
 Wedson Almeida Filho <wedsonaf@...il.com>
Subject: Re: [PATCH v3 07/16] rust: add `Revocable` type

On 10/29/24 2:26 PM, Alice Ryhl wrote:
> On Tue, Oct 22, 2024 at 11:33 PM Danilo Krummrich <dakr@...nel.org> wrote:
>> +/// A guard that allows access to a revocable object and keeps it alive.
>> +///
>> +/// CPUs may not sleep while holding on to [`RevocableGuard`] because it's in atomic context
>> +/// holding the RCU read-side lock.
>> +///
>> +/// # Invariants
>> +///
>> +/// The RCU read-side lock is held while the guard is alive.
>> +pub struct RevocableGuard<'a, T> {
>> +    data_ref: *const T,
>> +    _rcu_guard: rcu::Guard,
>> +    _p: PhantomData<&'a ()>,
>> +}
> 
> Is this needed? Can't all users just use `try_access_with_guard`?

Without this guard, how to we access `T` with just the `rcu::Guard`?

> 
> Alice
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ