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-next>] [day] [month] [year] [list]
Message-Id: <20210222201332.30253-1-noltari@gmail.com>
Date:   Mon, 22 Feb 2021 21:13:32 +0100
From:   Álvaro Fernández Rojas 
        <noltari@...il.com>
To:     jonas.gorski@...il.com, Florian Fainelli <f.fainelli@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Marc Zyngier <maz@...nel.org>,
        bcm-kernel-feedback-list@...adcom.com, linux-mips@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     Álvaro Fernández Rojas 
        <noltari@...il.com>
Subject: [PATCH] irqchip/bcm-6345-l1: fix SMP support

Some BCM6358 devices start with Core #1 instead of Core #0.
Apart from that, SMP is restricted to 1 CPU since BCM6358 has a shared TLB,
which makes it impossible for the current SMP support to start both CPUs.

The problem is that smp_processor_id() returns 0 and then cpu_logical_map()
converts that to 1, which accesses an uninitialized position of intc->cpus[],
resulting in a kernel panic.

Signed-off-by: Álvaro Fernández Rojas <noltari@...il.com>
---
 drivers/irqchip/irq-bcm6345-l1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-bcm6345-l1.c b/drivers/irqchip/irq-bcm6345-l1.c
index e3483789f4df..b2173ce4743d 100644
--- a/drivers/irqchip/irq-bcm6345-l1.c
+++ b/drivers/irqchip/irq-bcm6345-l1.c
@@ -121,7 +121,7 @@ static void bcm6345_l1_irq_handle(struct irq_desc *desc)
 	unsigned int idx;
 
 #ifdef CONFIG_SMP
-	cpu = intc->cpus[cpu_logical_map(smp_processor_id())];
+	cpu = intc->cpus[smp_processor_id()];
 #else
 	cpu = intc->cpus[0];
 #endif
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ