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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kkRJVsp_BNszRDy5DaQ6qKhB7e7g16qvEQK5gBtVrYug@mail.gmail.com>
Date: Wed, 21 Jan 2026 17:15:38 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Gary Guo <gary@...yguo.net>
Cc: Alexandre Courbot <acourbot@...dia.com>, Danilo Krummrich <dakr@...nel.org>, 
	Alice Ryhl <aliceryhl@...gle.com>, Daniel Almeida <daniel.almeida@...labora.com>, 
	Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>, 
	Björn Roy Baron <bjorn3_gh@...tonmail.com>, 
	Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>, 
	Trevor Gross <tmgross@...ch.edu>, Yury Norov <yury.norov@...il.com>, 
	John Hubbard <jhubbard@...dia.com>, Alistair Popple <apopple@...dia.com>, 
	Joel Fernandes <joelagnelf@...dia.com>, Timur Tabi <ttabi@...dia.com>, Edwin Peer <epeer@...dia.com>, 
	Eliot Courtney <ecourtney@...dia.com>, Dirk Behme <dirk.behme@...bosch.com>, 
	Steven Price <steven.price@....com>, rust-for-linux@...r.kernel.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/5] rust: io: add `register!` macro

On Wed, Jan 21, 2026 at 3:58 PM Gary Guo <gary@...yguo.net> wrote:
>
> Another top-level question I have is whether we should define multiple registers
> (perhaps all) in one macro invocation. That's the strategy of `tock-registers`
> crate which is widely used in embedded Rust.

Yeah, I suggested a multi-register one for something similar in 2021
and even tackling extra automatic codegen there, like e.g. adjusting
the value as needed to get to the proper unit from a sensor.

Not sure how useful the multi-register part in practice it would be,
but it would allow to relate several registers together if needed (is
that even common nowadays?). Or perhaps things like the
interleaving/striding example in the patch could be done "at once".

https://lore.kernel.org/all/CANiq72mAYE6Wh8AikfuuNm8Asr4+c90_bYbj8XdBGJ1Pb4kzvQ@mail.gmail.com/

Cheers,
Miguel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ