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: <165183631358.4207.11410029183803941850.tip-bot2@tip-bot2>
Date:   Fri, 06 May 2022 11:25:13 -0000
From:   irqchip-bot for Pali Rohár 
        <tip-bot2@...utronix.de>
To:     linux-kernel@...r.kernel.org
Cc:     pali@...nel.org, Marc Zyngier <maz@...nel.org>, tglx@...utronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/armada-370-xp: Do not allow
 mapping IRQ 0 and 1

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     baf78c1078b474aed18864796a8161784dd81fc2
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/baf78c1078b474aed18864796a8161784dd81fc2
Author:        Pali Rohár <pali@...nel.org>
AuthorDate:    Mon, 25 Apr 2022 13:37:06 +02:00
Committer:     Marc Zyngier <maz@...nel.org>
CommitterDate: Fri, 06 May 2022 12:20:27 +01:00

irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1

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>
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20220425113706.29310-2-pali@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 ee18eb3..ab02b44 100644
--- a/drivers/irqchip/irq-armada-370-xp.c
+++ b/drivers/irqchip/irq-armada-370-xp.c
@@ -567,6 +567,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 +

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ