lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6d37ba2ccbe02fbc093c8e9b1a765c7791e47628.camel@redhat.com>
Date: Fri, 06 Feb 2026 17:01:45 -0500
From: lyude@...hat.com
To: Alice Ryhl <aliceryhl@...gle.com>, Danilo Krummrich <dakr@...nel.org>
Cc: dri-devel@...ts.freedesktop.org, rust-for-linux@...r.kernel.org, Daniel
 Almeida <daniel.almeida@...labora.com>, linux-kernel@...r.kernel.org,
 Miguel Ojeda	 <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
 Boqun Feng	 <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, 
 Björn Roy Baron	 <bjorn3_gh@...tonmail.com>, Benno
 Lossin <lossin@...nel.org>, Andreas Hindborg	 <a.hindborg@...nel.org>,
 Trevor Gross <tmgross@...ch.edu>, Greg Kroah-Hartman	
 <gregkh@...uxfoundation.org>, Viresh Kumar <viresh.kumar@...aro.org>,
 FUJITA Tomonori <fujita.tomonori@...il.com>, Krishna Ketan Rai
 <prafulrai522@...il.com>, Tamir Duberstein	 <tamird@...il.com>, Xiangfei
 Ding <dingxiangfei2009@...il.com>, Zhi Wang	 <zhiw@...dia.com>, Matthew
 Maurer <mmaurer@...gle.com>, Alexandre Courbot	 <acourbot@...dia.com>
Subject: Re: [PATCH v6 7/8] rust: Introduce iosys_map bindings

On Thu, 2026-01-15 at 15:36 +0000, Alice Ryhl wrote:
> 
> The trait approach generally requires knowing the target type at
> compile-time or paying dynamic function calls, but my understanding
> is
> that iosys exists because you might not know which variant you want
> at
> compile-time.
> 
> Perhaps we need an
> 
> 	enum Iosys {
> 	    SystemMemory(...),
> 	    DmaMemory(...),
> 	}
> 
> and implement Io for Iosys in terms of the inner types.

So - I didn't see this comment until now however: I personally think it
can't hurt to have a wrapper around iosys_map simply because it makes
it easier to pass back and forth from C APIs, and the other sideaffect
of Io is that it's extremely trivial to implement it for the iosys map
bindings.

The one downside I could see is that I added C helper functions for all
of the iosys map read/write operations which means they aren't
currently inlined. But iirc there's work ongoing to allow for these to
be inlined so I assume once that is finished there shouldn't be any
additional overhead from this approach.

Anyway - will send out the new version in a moment
> 
> Alice


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ