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: <16bec003-ca45-4576-9a18-35bfe133c5e3@kernel.org>
Date: Thu, 16 Oct 2025 19:04:26 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: bhelgaas@...gle.com, kwilczynski@...nel.org, ojeda@...nel.org,
 alex.gaynor@...il.com, boqun.feng@...il.com, gary@...yguo.net,
 bjorn3_gh@...tonmail.com, lossin@...nel.org, a.hindborg@...nel.org,
 tmgross@...ch.edu, rust-for-linux@...r.kernel.org,
 linux-pci@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] rust: pci: implement TryInto<IrqRequest<'a>> for
 IrqVector<'a>

On 10/16/25 5:01 PM, Alice Ryhl wrote:
> On Wed, Oct 15, 2025 at 08:14:29PM +0200, Danilo Krummrich wrote:
>> @@ -707,12 +705,12 @@ pub fn request_irq<'a, T: crate::irq::Handler + 'static>(
>>      /// Returns a [`kernel::irq::ThreadedRegistration`] for the given IRQ vector.
>>      pub fn request_threaded_irq<'a, T: crate::irq::ThreadedHandler + 'static>(
>>          &'a self,
>> -        vector: IrqVector<'_>,
>> +        vector: IrqVector<'a>,
>>          flags: irq::Flags,
>>          name: &'static CStr,
>>          handler: impl PinInit<T, Error> + 'a,
>>      ) -> Result<impl PinInit<irq::ThreadedRegistration<T>, Error> + 'a> {
>> -        let request = self.irq_vector(vector)?;
>> +        let request = vector.try_into()?;
> 
> The resulting change to the lifetime semantics is curious, but seems
> right.

Yes, IrqVector has to have the same lifetime as &self, but I was surprised that
with this change the compiler does require an explicit lifetime (even though I
think the explicit one is better anyways).
> Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ