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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87ikopgcuz.fsf@kernel.org>
Date: Tue, 04 Mar 2025 14:11:00 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Daniel Almeida" <daniel.almeida@...labora.com>
Cc: <ojeda@...nel.org>,  <alex.gaynor@...il.com>,  <boqun.feng@...il.com>,
  <gary@...yguo.net>,  <bjorn3_gh@...tonmail.com>,
  <benno.lossin@...ton.me>,  <tmgross@...ch.edu>,
  <rust-for-linux@...r.kernel.org>,  <linux-kernel@...r.kernel.org>,
  "Alice Ryhl" <aliceryhl@...gle.com>
Subject: Re: [PATCH v2] rust: irq: add support for request_irq()

"Daniel Almeida" <daniel.almeida@...labora.com> writes:

>> On 22 Jan 2025, at 13:39, Daniel Almeida <daniel.almeida@...labora.com> wrote:
>>
>> Add support for registering IRQ handlers in Rust.

[...]

>> +/// use kernel::prelude::*;
>> +/// use kernel::irq::request::flags;
>> +/// use kernel::irq::request::Registration;
>
> By the way, I wonder if a re-export would be beneficial? I find it a bit tedious to specify this path.
>
> It also clashes with kernel::driver::Registration and kernel::driver::drm::Registration, so I find myself
> continuously writing an alias for it, i.e.:
>
> ```
> Use kernel::irq::request::Registration as IrqRegistration;
> Use kernel::irq::request::Handler as IrqHandler;
> ```
>
> Looking at mq.rs <http://mq.rs/>, I see Andreas did something similar:
>
> ```
> pub use operations::Operations;
> pub use request::Request;
> pub use tag_set::TagSet;
> ```
>
> Asking for opinions here since this is a bit cosmetic in nature. IMHO, at least the ‘request’ part of the path has to go.

For block I usually import `mq` if there can be clashes, then I can use
`mq::Request`, which is not so bad. I think a reexport to make
`irq::request::Request` available as `irq::Request` would be nice.

In `mq`, most sub modules are not pub, so the only way to reach the
types is through the reexport.


Best regards,
Andreas Hindborg




Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ