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 072223F20FE; Tue, 28 Apr 2026 14:54:32 +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=1777388072; cv=none; b=WPSbFn54ViqFajD24YfEI1040lu6I/W+qAK7IECTeI0yKkTsARij0s4g2BLhZmzRYXUZ1YeuU1EJNghXGTtdYUtsWWbe9JyBTSOhVMFKcSkdn8ObaldPFWEzGKDVYa3+I5AHqa4b3kVpPbjRIvEzSTu4Zde43sl3szhUzIWrjes= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777388072; c=relaxed/simple; bh=u5DGLyR5HD/1MGBsf8teWYoDSABc+D9y2JX4a/0KSqk=; h=Mime-Version:Content-Type:Date:Message-Id:Subject:Cc:To:From: References:In-Reply-To; b=mOYDDdquJH/0vUkvP5M6AerJvotF+cUXfMGSuu+F2GtLfZJYQJIgQ0OB3/AD9tJhDno5WKvRRiYErHxBeFNvkOMDMawASxYJP+ReNe/kgDr41bcoExkhUAYycHYTJBniMGeK6LnSyW2PYEa6/0VPxRezLHCjD2aoLU+OStdhToE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=l74otaXl; 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="l74otaXl" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7DF5CC2BCB5; Tue, 28 Apr 2026 14:54:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777388071; bh=u5DGLyR5HD/1MGBsf8teWYoDSABc+D9y2JX4a/0KSqk=; h=Date:Subject:Cc:To:From:References:In-Reply-To:From; b=l74otaXlxwMDVQrDfF61j4VgU+FzRLy4fUUwF3H6HBpKmA03eU2LCYfmcAlFs/YEQ A2N1h6J59/02mOogggPqpHHk82Ce1qP2xE/ZCsfZEef+E1pkeHtpUwdynt+dd/hogD 7nVypud7lcZ+QDTVI4amd84NirO8RXdycMq/D1ns7Bwmvvhca8kww+1hgsdZEQ64jD bbFaUIBwxKuICOndPlEQBoTNK6lzRoET7Kw9ZKmlc+HWWvN7qOVnDPPfSCHs60E1K/ STxdm7uT8irGGSRmDMMd9kfbcEcyK5cao7xuoXS+Q78BjU1udkHw/1+ozpaMgH2bje CBrRpKabXGycQ== Precedence: bulk X-Mailing-List: rust-for-linux@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Tue, 28 Apr 2026 16:54:25 +0200 Message-Id: Subject: Re: [PATCH v2 05/11] rust: io: restrict untyped IO access and `register!` to `Region` Cc: "Gary Guo" , "Greg Kroah-Hartman" , "Rafael J. Wysocki" , "Miguel Ojeda" , "Boqun Feng" , =?utf-8?q?Bj=C3=B6rn_Roy_Baron?= , "Benno Lossin" , "Alice Ryhl" , "Trevor Gross" , "Daniel Almeida" , "Bjorn Helgaas" , =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= , "Abdiel Janulgue" , "Robin Murphy" , "Alexandre Courbot" , "David Airlie" , "Simona Vetter" , , , , , , To: "Andreas Hindborg" From: "Danilo Krummrich" References: <20260421-io_projection-v2-0-4c251c692ef4@garyguo.net> <20260421-io_projection-v2-5-4c251c692ef4@garyguo.net> <874ikvqwyd.fsf@t14s.mail-host-address-is-not-set> <87tssvp9sq.fsf@t14s.mail-host-address-is-not-set> <87ik9bp2og.fsf@t14s.mail-host-address-is-not-set> In-Reply-To: <87ik9bp2og.fsf@t14s.mail-host-address-is-not-set> On Tue Apr 28, 2026 at 4:41 PM CEST, Andreas Hindborg wrote: > That is probably a good call =F0=9F=98=85 Going over the pieces again, I = am not > sure when and where I decided this was an index rather than a byte > offset. This is not the first time I see someone stumble over this, assuming this h= as index semantics, i.e. I assume there might be something creating this impression. However, I can't see what that might be (probably I'm too used to the C primitives). In case you know, I'd be interesting for me to know.