[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <8416C381-A654-41D4-A731-323CEDE58BB1@collabora.com>
Date: Mon, 11 Aug 2025 09:44:22 -0300
From: Daniel Almeida <daniel.almeida@...labora.com>
To: Sidong Yang <sidong.yang@...iosa.ai>
Cc: Benno Lossin <lossin@...nel.org>,
Caleb Sander Mateos <csander@...estorage.com>,
Miguel Ojeda <ojeda@...nel.org>,
Arnd Bergmann <arnd@...db.de>,
Jens Axboe <axboe@...nel.dk>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
io-uring@...r.kernel.org
Subject: Re: [RFC PATCH v2 2/4] rust: io_uring: introduce rust abstraction for
io-uring cmd
>
> There is `uring_cmd` callback in `file_operation` at c side. `Pin<&mut IoUringCmd>`
> would be create in the callback function. But the callback function could be
> called repeatedly with same `io_uring_cmd` instance as far as I know.
>
> But in c side, there is initialization step `io_uring_cmd_prep()`.
> How about fill zero pdu in `io_uring_cmd_prep()`? And we could assign a byte
> as flag in pdu for checking initialized also we should provide 31 bytes except
> a byte for the flag.
>
That was a follow-up question of mine. Can’t we enforce zero-initialization
in C to get rid of this MaybeUninit? Uninitialized data is just bad in general.
Hopefully this can be done as you've described above, but I don't want to over
extend my opinion on something I know nothing about.
— Daniel
Powered by blists - more mailing lists