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]
Date: Mon, 17 Jun 2024 15:54:04 +0100
From: Richard Fitzgerald <rf@...nsource.cirrus.com>
To: Simon Trimmer <simont@...nsource.cirrus.com>,
        'Mark Brown'
	<broonie@...nel.org>
CC: <linux-sound@...r.kernel.org>, <alsa-devel@...a-project.org>,
        <linux-kernel@...r.kernel.org>, <patches@...nsource.cirrus.com>
Subject: Re: [PATCH] ASoC: cs35l56: Accept values greater than 0 as IRQ
 numbers

On 17/06/2024 15:48, Simon Trimmer wrote:
>> From: Richard Fitzgerald <rf@...nsource.cirrus.com>
>> Sent: Monday, June 17, 2024 3:34 PM
>> On 17/06/2024 15:04, Mark Brown wrote:
>>> On Mon, Jun 17, 2024 at 02:53:38PM +0100, Simon Trimmer wrote:
>>>> IRQ lookup functions such as those in ACPI can return error values when
>>>> an IRQ is not defined. The i2c core driver converts the error codes to
> a
>>>> value of 0 and the SPI bus driver passes them unaltered to client
> device
>>>> drivers.
>>>>
>>>> The cs35l56 driver should only accept positive non-zero values as IRQ
>>>> numbers.
>>>
>>> Have all architectures removed 0 as a valid IRQ?
>>
>>   From discussion threads we can find 0 might still used on x86 for a
>> legacy device.
>> But the conversations we can find on this don't seem to exclude passing
>> a negative error number, just that 0 can normally be assumed invalid.
>>
>> The kerneldoc for SPI says:
>>
>>    * @irq: Negative, or the number passed to request_irq() to receive
>>    *	interrupts from this device.
> 
> Yes and the threads of these lore links in these commits are rather feisty
> 
> ce753ad1549c platform: finally disallow IRQ0 in platform_get_irq() and its
> ilk
> a85a6c86c25b driver core: platform: Clarify that IRQ 0 is invalid
> 
> 
So 0 is invalid. Question is: is it also valid to pass -ve errors, or is
0 the _only_ invalid value?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ