On 10/23/2025 5:47 PM, Joel Fernandes wrote: >>>> Finally, for runtime values such as indexes, it could be useful to verify >>>> once and then allow infallible reads/writes through some kind access token. >>> Why? The verification is already done at compile-time AFAICS. >> Well, that's the point. Those are runtime values, and as of now, the only >> support for those is for arrays of registers when one, when using try_xxx >> methods, ends up with check being performed each time the method is called. >> Ah for this part of your email, you are referring to try accessors. For the > fixed sizes regions at least, to avoid the runtime check, it will be possible > to > accept BoundedInt [1] in the future. That type actually came up for the exact > same reason (keeping the checking light). This cleverly moves the checking to > the caller side which could be done in a slow path. If the size of the IO > region > is fixed, then you don’t need to use try accessors at all if you use > BoundedInt > whenever we have it. To clarify, BoundedInt is supposed to bound the values passed to the APIs, not the address. Perhaps we can add additional types for the offsets as well. thanks, - Joel
- Re: [PATCH v6 5/5] rust: bitfield: Add KUNIT tests ... Alexandre Courbot
- Re: [PATCH v6 5/5] rust: bitfield: Add KUNIT te... Joel Fernandes
- Re: [PATCH v6 0/5] Introduce bitfield and move register ... Edwin Peer
- [PATCH v6 4/5] rust: Move register and bitfield macros o... Joel Fernandes
- Re: [PATCH v6 4/5] rust: Move register and bitfield... Alexandre Courbot
- Re: [PATCH v6 4/5] rust: Move register and bitfield... Beata Michalska
- Re: [PATCH v6 4/5] rust: Move register and bitf... Joel Fernandes
- Re: [PATCH v6 4/5] rust: Move register and ... Beata Michalska
- Re: [PATCH v6 4/5] rust: Move register ... Danilo Krummrich
- Re: [PATCH v6 4/5] rust: Move register ... Joel Fernandes
- Re: [PATCH v6 4/5] rust: Move regi... Joel Fernandes
- Re: [PATCH v6 4/5] rust: Move regi... Beata Michalska
- Re: [PATCH v6 4/5] rust: Move ... Danilo Krummrich
- Re: [PATCH v6 4/5] rust: Move ... Beata Michalska
- Re: [PATCH v6 4/5] rust: Move register and bitfield... Dirk Behme
- Re: [PATCH v6 4/5] rust: Move register and bitf... Danilo Krummrich
- Re: [PATCH v6 4/5] rust: Move register and ... Alexandre Courbot
- Re: [PATCH v6 4/5] rust: Move register ... Danilo Krummrich
- Re: [PATCH v6 4/5] rust: Move register ... Dirk Behme
- Re: [PATCH v6 4/5] rust: Move regi... Alexandre Courbot
- Re: [PATCH v6 4/5] rust: Move ... Dirk Behme
