From: Andreas Hindborg <a.hindborg@kernel.org>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
"Akinobu Mita" <akinobu.mita@gmail.com>
Subject: Re: [PATCH v2] fault-inject: rust: add a Rust API for fault-injection
Date: Sat, 06 Jun 2026 19:35:55 +0200 [thread overview]
Message-ID: <87bjdninb8.fsf@kernel.org> (raw)
In-Reply-To: <CANiq72k9Yc=tQgSEUXgcaJaw+Jub0ZX8g8XWsT8dA4kxifxGEA@mail.gmail.com>
Miguel Ojeda <miguel.ojeda.sandonis@gmail.com> writes:
> Hi Andreas,
>
> Some quick comments scanning your patch diagonally since I was here
> for something else.
>
> On Fri, Jun 5, 2026 at 3:27 PM Andreas Hindborg <a.hindborg@kernel.org> wrote:
>>
>> #include <linux/ethtool.h>
>> #include <linux/fdtable.h>
>> +#include <linux/fault-inject.h>
>> #include <linux/file.h>
>
> Please keep them sorted :)
>
>> +// SAFETY: FaultConfig can be used from any task.
>
> `FaultConfig`
>
>> + // SAFETY: By type invariant, self is always valid.
>
> `self`
>
>> + /// Returns `true` if the operation should fail.
>
> [`true`]
Thanks, I'll correct these for next version.
>
>> + // INVARIANT: `self.inner` is initialized in ffi_init.
>
> I was going to say `ffi_init`, but there is no such call here. Isn't
> it getting initialized by the C side? I guess this got copy-pasted
> from somewhere else?
Thanks for catching this, it is a stale comment. I was using
`Opaque::ffi_init` in an earlier version (pre v1, this was also present
in v1).
Best regards,
Andreas Hindborg
prev parent reply other threads:[~2026-06-06 17:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 13:27 [PATCH v2] fault-inject: rust: add a Rust API for fault-injection Andreas Hindborg
2026-06-06 12:58 ` Miguel Ojeda
2026-06-06 17:35 ` Andreas Hindborg [this message]
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=87bjdninb8.fsf@kernel.org \
--to=a.hindborg@kernel.org \
--cc=akinobu.mita@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=miguel.ojeda.sandonis@gmail.com \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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