public inbox for linux-kernel-mentees@lists.linux-foundation.org
 help / color / mirror / Atom feed
From: "Benno Lossin" <lossin@kernel.org>
To: "Marcelo Moreira" <marcelomoreira1905@gmail.com>,
	<aliceryhl@google.com>, <dakr@kernel.org>, <ojeda@kernel.org>,
	<rust-for-linux@vger.kernel.org>, <skhan@linuxfoundation.org>,
	<linux-kernel-mentees@lists.linuxfoundation.org>,
	<~lkcamp/patches@lists.sr.ht>
Subject: Re: [PATCH v8 3/3] rust: revocable: Documents RevocableGuard invariants/safety and refine Deref safety
Date: Mon, 03 Nov 2025 11:36:40 +0100	[thread overview]
Message-ID: <DDYZS8Q0IMHW.2THERFUD075JJ@kernel.org> (raw)
In-Reply-To: <20250726183552.23098-4-marcelomoreira1905@gmail.com>

On Sat Jul 26, 2025 at 8:35 PM CEST, Marcelo Moreira wrote:
> Refinements include:
> - `RevocableGuard`'s invariants are updated to precisely state that
>   `data_ref` is valid as long as the RCU read-side lock is held.
> - The `RevocableGuard::new` constructor is made `unsafe`, explicitly
>   requiring callers to guarantee the validity of the raw pointer and
>   RCU read-side lock lifetime.
> - The `SAFETY` comment in `Revocable::try_access` is refined for
>   clarity, now explicitly stating how `Self`'s type invariants
>   and the RCU read-side lock together ensure data validity for reads.
> - The `Deref` implementation's `SAFETY` comment for `RevocableGuard`
>   is refined.
>
> Signed-off-by: Marcelo Moreira <marcelomoreira1905@gmail.com>

Sorry for the long wait, I've been very busy (and continue to be). Let's
finish this series :)

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

@Danilo: did revocable change substantively in the meantime? If yes, we
might need to revisit the invariants...

Cheers,
Benno

> ---
>  rust/kernel/revocable.rs | 20 +++++++++++++-------
>  1 file changed, 13 insertions(+), 7 deletions(-)

  parent reply	other threads:[~2025-11-03 10:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-26 18:35 [PATCH v8 0/3] rust: revocable: Documentation, refactoring and safety refinements Marcelo Moreira
2025-07-26 18:35 ` [PATCH v8 1/3] rust: revocable: Clarify write invariant and update safety comments Marcelo Moreira
2025-07-26 18:35 ` [PATCH v8 2/3] rust: revocable: Refactor revocation mechanism to remove generic revoke_internal Marcelo Moreira
2025-07-26 18:35 ` [PATCH v8 3/3] rust: revocable: Documents RevocableGuard invariants/safety and refine Deref safety Marcelo Moreira
2025-08-12  1:03   ` Marcelo Moreira
2025-11-03 10:36   ` Benno Lossin [this message]
2025-08-18 22:07 ` [PATCH v8 0/3] rust: revocable: Documentation, refactoring and safety refinements Marcelo Moreira

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DDYZS8Q0IMHW.2THERFUD075JJ@kernel.org \
    --to=lossin@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=dakr@kernel.org \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=marcelomoreira1905@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=~lkcamp/patches@lists.sr.ht \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox