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: <87r1567vnq.wl-maz@kernel.org>
Date:   Fri, 06 May 2022 12:22:33 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Pali Rohár <pali@...nel.org>
Cc:     Andrew Lunn <andrew@...n.ch>,
        Gregory Clement <gregory.clement@...tlin.com>,
        Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1

On Mon, 25 Apr 2022 12:37:06 +0100,
Pali Rohár <pali@...nel.org> wrote:
> 
> IRQs 0 and 1 cannot be mapped, they are handled internally by this driver
> and this driver does not call generic_handle_domain_irq() for these IRQs.
> So do not allow mapping these IRQs and correctly propagate error from the
> .irq_map callback.
> 
> Signed-off-by: Pali Rohár <pali@...nel.org>
> Cc: stable@...r.kernel.org
> ---
>  drivers/irqchip/irq-armada-370-xp.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/irqchip/irq-armada-370-xp.c b/drivers/irqchip/irq-armada-370-xp.c
> index 1120084cba09..ebd76ea1c69b 100644
> --- a/drivers/irqchip/irq-armada-370-xp.c
> +++ b/drivers/irqchip/irq-armada-370-xp.c
> @@ -546,6 +546,10 @@ static struct irq_chip armada_370_xp_irq_chip = {
>  static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
>  				      unsigned int virq, irq_hw_number_t hw)
>  {
> +	/* IRQs 0 and 1 cannot be mapped, they are handled internally */
> +	if (hw <= 1)
> +		return -EINVAL;
> +
>  	armada_370_xp_irq_mask(irq_get_irq_data(virq));
>  	if (!is_percpu_irq(hw))
>  		writel(hw, per_cpu_int_base +
> -- 
> 2.20.1
> 
> 

Given that this is completely academic and obviously doesn't affect
anyone, I have removed the Cc: stable from the patch when applying it.

	M.

-- 
Without deviation from the norm, progress is not possible.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ