[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <877c4khnuz.fsf@kernel.org>
Date: Wed, 19 Mar 2025 19:33:24 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Alice Ryhl" <aliceryhl@...gle.com>
Cc: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>, "Alexander Viro"
<viro@...iv.linux.org.uk>, "Arnd Bergmann" <arnd@...db.de>, "Miguel
Ojeda" <ojeda@...nel.org>, "Boqun Feng" <boqun.feng@...il.com>, "Gary
Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>,
"Benno Lossin" <benno.lossin@...ton.me>, "Trevor Gross"
<tmgross@...ch.edu>, "Danilo Krummrich" <dakr@...nel.org>, "Matthew
Maurer" <mmaurer@...gle.com>, "Lee Jones" <lee@...nel.org>,
<linux-kernel@...r.kernel.org>, <rust-for-linux@...r.kernel.org>
Subject: Re: [PATCH 1/5] rust: iov: add iov_iter abstractions for ITER_SOURCE
Hi Alice,
"Alice Ryhl" <aliceryhl@...gle.com> writes:
> This adds abstractions for the iov_iter type in the case where
> data_source is ITER_SOURCE. This will make Rust implementations of
> fops->write_iter possible.
>
> This series only has support for using existing IO vectors created by C
> code. Additional abstractions will be needed to support the creation of
> IO vectors in Rust code.
>
> These abstractions make the assumption that `struct iov_iter` does not
> have internal self-references, which implies that it is valid to move it
> between different local variables, and that you can make a copy of it to
> get two IO vectors into the same buffers.
>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
This does not build for me:
error[E0405]: cannot find trait `Allocator` in this scope
--> /home/aeh/src/linux-rust/linux/rust/kernel/iov.rs:133:34
|
133 | pub fn copy_from_iter_vec<A: Allocator>(
| ^^^^^^^^^ not found in this scope
|
help: consider importing one of these items
|
10 + use core::alloc::Allocator;
|
10 + use crate::alloc::Allocator;
|
error[E0412]: cannot find type `Flags` in this scope
--> /home/aeh/src/linux-rust/linux/rust/kernel/iov.rs:136:16
|
136 | flags: Flags,
| ^^^^^ not found in this scope
|
help: consider importing this struct
|
10 + use crate::alloc::Flags;
|
RUSTC L rust/kernel.o
error: aborting due to 2 previous errors
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists