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: <ce656239-08a1-49e8-86b1-b33d0cdfbcd3@gmail.com>
Date: Sat, 19 Jul 2025 07:47:00 +0200
From: Dirk Behme <dirk.behme@...il.com>
To: Daniel Almeida <daniel.almeida@...labora.com>
Cc: Danilo Krummrich <dakr@...nel.org>, Benno Lossin <lossin@...nel.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>,
 Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
 Trevor Gross <tmgross@...ch.edu>,
 Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
 "Rafael J. Wysocki" <rafael@...nel.org>, Thomas Gleixner
 <tglx@...utronix.de>, Bjorn Helgaas <bhelgaas@...gle.com>,
 Krzysztof Wilczyński <kwilczynski@...nel.org>,
 linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
 linux-pci@...r.kernel.org
Subject: Re: [PATCH v6 3/6] rust: irq: add support for non-threaded IRQs and
 handlers

Hi Daniel,

On 13.07.25 17:32, Daniel Almeida wrote:
> 
> 
>> On 13 Jul 2025, at 12:28, Daniel Almeida <daniel.almeida@...labora.com> wrote:
>>
>>
>>
>>>
>>> (2) Owning a reference count of a device (i.e. ARef<Device>) does *not*
>>>     guarantee that the device is bound. You can own a reference count to the
>>>     device object way beyond it being bound. Instead, the guarantee comes from
>>>     the scope.
>>>
>>>     In this case, the scope is the IRQ callback, since the irq::Registration
>>>     guarantees to call and complete free_irq() before the underlying bus
>>>     device is unbound.
>>>
>>
>>
>> Oh, I see. I guess this is where I started to get a bit confused indeed.
>>
>> — Daniel
> 
> Fine, I guess I can submit a newer version and test that on Tyr.
> 
> Dirk, can you also test the next iteration on your driver? It will possibly
> solve your use case as well.


Now, I'm slightly confused ;) I just saw your version 7 of this

[PATCH v7 3/6] rust: irq: add support for non-threaded IRQs and handlers
https://lore.kernel.org/rust-for-linux/20250715-topics-tyr-request_irq2-v7-3-d469c0f37c07@collabora.com/

and somehow was expecting something like

fn handle(&self, dev: &Device<Bound>) -> IrqReturn

there. I.e. to get a bound device passed into the handler.

If I misunderstood the discussion and this is supposed to not be
added: Any hint how to get the &Device<Bound> from the probe
function/irq registration into the irq handler, then? To be able to do
something like

fn handle(&self) -> IrqReturn {
  let dev = ??;
  let io = self.iomem.access(dev);

Thanks,

Dirk


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ