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: <87ttm3ikok.ffs@tglx>
Date: Tue, 20 Feb 2024 09:50:19 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Marc Zyngier <maz@...nel.org>, Biju Das <biju.das.jz@...renesas.com>
Cc: tip-bot2@...utronix.de, apatel@...tanamicro.com,
 linux-kernel@...r.kernel.org, linux-tip-commits@...r.kernel.org,
 geert@...ux-m68k.org, linux-renesas-soc@...r.kernel.org, x86@...nel.org
Subject: Re: [tip: irq/msi] genirq/irqdomain: Remove the param count
 restriction from select()

On Mon, Feb 19 2024 at 15:56, Marc Zyngier wrote:
>> diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c
>> index 0bdef4f..8fee379 100644
>> --- a/kernel/irq/irqdomain.c
>> +++ b/kernel/irq/irqdomain.c
>> @@ -448,7 +448,7 @@ struct irq_domain *irq_find_matching_fwspec(struct irq_fwspec *fwspec,
>>  	 */
>>  	mutex_lock(&irq_domain_mutex);
>>  	list_for_each_entry(h, &irq_domain_list, link) {
>> -		if (h->ops->select && fwspec->param_count)
>> +		if (h->ops->select)
>>  			rc = h->ops->select(h, fwspec, bus_token);
>>  		else if (h->ops->match)
>>  			rc = h->ops->match(h, to_of_node(fwnode), bus_token);
>> 
>> 
>
> Dmitry posted his take on this at [1], and I have suggested another
> possible fix in my reply.

Your core side DOMAIN_BUS_ANY variant makes a lot of sense. Can you
please post a proper patch for that?

Aside of this I just noticed that we need the below too.

Thanks,

        tglx
---
Subject: irqchip/imx-intmux: Handle pure domain searches correctly
From: Thomas Gleixner <tglx@...utronix.de>
Date: Tue, 20 Feb 2024 09:46:19 +0100

The removal of the paremeter count restriction in the core code to allow
pure domain token based select() decisions broke the IMX intmux select
callback as that unconditioally expects that there is a parameter.

Add the missing check for zero parameter count and the token match.

Fixes: de1ff306dcf4 ("genirq/irqdomain: Remove the param count restriction from select()")
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
---
 drivers/irqchip/irq-imx-intmux.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/irqchip/irq-imx-intmux.c
+++ b/drivers/irqchip/irq-imx-intmux.c
@@ -166,6 +166,10 @@ static int imx_intmux_irq_select(struct
 	if (fwspec->fwnode != d->fwnode)
 		return false;
 
+	/* Handle pure domain searches */
+	if (!fwspec->param_count)
+		return d->bus_token == bus_token;
+
 	return irqchip_data->chanidx == fwspec->param[1];
 }
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ