From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7D82A41; Tue, 5 Aug 2025 10:49:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754390942; cv=none; b=D8PPunkwqodpaxSyHY8LKgyfDOvkNQJanDdVEgx0OrKBIbXl0kSnGbKpQZ4DsxyshfQ6XLdm4q2IGyL0qJNL44jgH0KVZnhPR5cN6IBTq5Gkf/2Tj+hQQz28vu8d17ysd0GRWHQUtYby/EfHigqXsFhnacPlcqF23rnGzdBDNVE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754390942; c=relaxed/simple; bh=1SQ374xhrVvMt2lc3PLDfYgIIhwxy2llUepDQiiaPnA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=oE7Q9VW1Mmf1DdgWoO/MtnAquQ3x/i9eR5rwX142YrmEj4wGqrEq7W0zaLFjbz9X5tSk1H7ynibkaxX6gaswOHVlE0WzfImY3X7ld88mheUHjvRIPPHWLYsvbuUGil0T4ZimUcnZpzjErGrQXDddleCrQoSxNlF06LMVTLWKBYc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LXqA6Bj3; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LXqA6Bj3" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4D513C4CEF0; Tue, 5 Aug 2025 10:48:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1754390942; bh=1SQ374xhrVvMt2lc3PLDfYgIIhwxy2llUepDQiiaPnA=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=LXqA6Bj3xLvZT4QEsEKyPzfbNz2VNnEO5JXkBqixRW5O+D6eFJiCZdQoiNeX2jJOU eOy8OUQ4LJJ1j0xNCONsfMV3ZskE0BL1DpJsaxYNLxrKWgOrl1IPnUhcFD1z6Ew8jk yHisxBMMg8qdJLFAepI5zaUxqY8cpmpW5Tu3nXCD+jrPDxb6QGp/OfT87rOSSjjmvU Lc+G9mYmCx7RHSkT+vGASXQYVKDvs5GYXHm9RRIMEtUPrvtl9jQco0g98WeNBdiKcd ONa3Bt67Yh7E8UcymKDfCc5u6tbkqK5/bOX/05qlIjOlAPl5FCpx4EPwkIB0LV3Hqr ocn12DfmeVPLg== From: Andreas Hindborg To: Alice Ryhl Cc: Greg Kroah-Hartman , Alexander Viro , Arnd Bergmann , Miguel Ojeda , Boqun Feng , Gary Guo , =?utf-8?Q?Bj=C3=B6rn?= Roy Baron , Trevor Gross , Danilo Krummrich , Matthew Maurer , Lee Jones , linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org, Benno Lossin Subject: Re: [PATCH v2 1/4] rust: iov: add iov_iter abstractions for ITER_SOURCE In-Reply-To: References: <20250704-iov-iter-v2-0-e69aa7c1f40e@google.com> <20250704-iov-iter-v2-1-e69aa7c1f40e@google.com> <878qkyoi6d.fsf@kernel.org> <0Y9Bjahrc6dbxzIFtBKXUxv-jQtuvM2UWShaaSUsjKBuC1KKeGIpBFTC4a89oNrOLBP66SXtC7kQx1gtt04CMg==@protonmail.internalid> <87ecuplgqy.fsf@kernel.org> <87ikk1jnwi.fsf@kernel.org> Date: Tue, 05 Aug 2025 12:48:52 +0200 Message-ID: <874ium9h7v.fsf@kernel.org> Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain "Alice Ryhl" writes: > On Wed, Jul 09, 2025 at 07:05:01PM +0200, Andreas Hindborg wrote: >> "Alice Ryhl" writes: >> >> > On Wed, Jul 09, 2025 at 01:56:37PM +0200, Andreas Hindborg wrote: >> >> "Alice Ryhl" writes: >> >> >> >> > On Tue, Jul 08, 2025 at 04:45:14PM +0200, Andreas Hindborg wrote: >> >> >> "Alice Ryhl" writes: > The iov_iter type is like a giant enum with a bunch of different > implementations. Some implementations just read from a simple kernel > buffer that must, of course, be mapped. Some implementations traverse > complex data structures and stitch the data together from multiple > buffers. Other implementations map the data into memory on-demand inside > the copy_from_iter call, without requiring it to be mapped at other > times. And finally, some implementations perform IO by reading from > userspace, in which case it's valid for the userspace pointer to be > *literally any 64-bit integer*. If the address is dangling, that's > caught inside the call to copy_from_iter and is not a safety issue. At any rate, this is a very informative paragraph. It would be great if you could have this information in the documentation for this type. Best regards, Andreas Hindborg