Re: [PATCH 3/3] rust: driver: address soundness issue in `RegistrationOps`

Gary Guo
2025-01-05T19:07:32Z

On Fri, 3 Jan 2025 17:46:03 +0100
Danilo Krummrich <dakr@kernel.org> wrote:

> The `RegistrationOps` trait holds some obligations to the caller and
> implementers. While being documented, the trait and the corresponding
> functions haven't been marked as unsafe.
>
> Hence, markt the trait and functions unsafe and add the corresponding
> safety comments.

nit: markt -> mark

>
> This patch does not include any fuctional changes.
>
> Reported-by: Gary Guo <gary@garyguo.net>
> Closes: https://lore.kernel.org/rust-for-linux/20241224195821.3b43302b.gary@garyguo.net/
> Signed-off-by: Danilo Krummrich <dakr@kernel.org>

Reviewed-by: Gary Guo <gary@garyguo.net>

> ---
> rust/kernel/driver.rs | 25 ++++++++++++++++++++-----
> rust/kernel/pci.rs | 8 +++++---
> rust/kernel/platform.rs | 8 +++++---
> 3 files changed, 30 insertions(+), 11 deletions(-)