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
| ||
|
Message-ID: <87mtg392fm.wl-maz@kernel.org> Date: Fri, 29 Apr 2022 19:20:29 +0100 From: Marc Zyngier <maz@...nel.org> To: "Guilherme G. Piccoli" <gpiccoli@...lia.com> Cc: akpm@...ux-foundation.org, bhe@...hat.com, pmladek@...e.com, kexec@...ts.infradead.org, linux-kernel@...r.kernel.org, bcm-kernel-feedback-list@...adcom.com, coresight@...ts.linaro.org, linuxppc-dev@...ts.ozlabs.org, linux-alpha@...r.kernel.org, linux-arm-kernel@...ts.infradead.org, linux-edac@...r.kernel.org, linux-hyperv@...r.kernel.org, linux-leds@...r.kernel.org, linux-mips@...r.kernel.org, linux-parisc@...r.kernel.org, linux-pm@...r.kernel.org, linux-remoteproc@...r.kernel.org, linux-s390@...r.kernel.org, linux-tegra@...r.kernel.org, linux-um@...ts.infradead.org, linux-xtensa@...ux-xtensa.org, netdev@...r.kernel.org, openipmi-developer@...ts.sourceforge.net, rcu@...r.kernel.org, sparclinux@...r.kernel.org, xen-devel@...ts.xenproject.org, x86@...nel.org, kernel-dev@...lia.com, kernel@...ccoli.net, halves@...onical.com, fabiomirmar@...il.com, alejandro.j.jimenez@...cle.com, andriy.shevchenko@...ux.intel.com, arnd@...db.de, bp@...en8.de, corbet@....net, d.hatayama@...fujitsu.com, dave.hansen@...ux.intel.com, dyoung@...hat.com, feng.tang@...el.com, gregkh@...uxfoundation.org, mikelley@...rosoft.com, hidehiro.kawai.ez@...achi.com, jgross@...e.com, john.ogness@...utronix.de, keescook@...omium.org, luto@...nel.org, mhiramat@...nel.org, mingo@...hat.com, paulmck@...nel.org, peterz@...radead.org, rostedt@...dmis.org, senozhatsky@...omium.org, stern@...land.harvard.edu, tglx@...utronix.de, vgoyal@...hat.com, vkuznets@...hat.com, will@...nel.org, Russell King <linux@...linux.org.uk> Subject: Re: [PATCH 02/30] ARM: kexec: Disable IRQs/FIQs also on crash CPUs shutdown path On Wed, 27 Apr 2022 23:48:56 +0100, "Guilherme G. Piccoli" <gpiccoli@...lia.com> wrote: > > Currently the regular CPU shutdown path for ARM disables IRQs/FIQs > in the secondary CPUs - smp_send_stop() calls ipi_cpu_stop(), which > is responsible for that. This makes sense, since we're turning off > such CPUs, putting them in an endless busy-wait loop. > > Problem is that there is an alternative path for disabling CPUs, > in the form of function crash_smp_send_stop(), used for kexec/panic > paths. This functions relies in a SMP call that also triggers a > busy-wait loop [at machine_crash_nonpanic_core()], but *without* > disabling interrupts. This might lead to odd scenarios, like early > interrupts in the boot of kexec'd kernel or even interrupts in > other CPUs while the main one still works in the panic path and > assumes all secondary CPUs are (really!) off. > > This patch mimics the ipi_cpu_stop() interrupt disable mechanism > in the crash CPU shutdown path, hence disabling IRQs/FIQs in all > secondary CPUs in the kexec/panic path as well. > > Cc: Marc Zyngier <maz@...nel.org> > Cc: Russell King <linux@...linux.org.uk> > Signed-off-by: Guilherme G. Piccoli <gpiccoli@...lia.com> > --- > arch/arm/kernel/machine_kexec.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/arch/arm/kernel/machine_kexec.c b/arch/arm/kernel/machine_kexec.c > index f567032a09c0..ef788ee00519 100644 > --- a/arch/arm/kernel/machine_kexec.c > +++ b/arch/arm/kernel/machine_kexec.c > @@ -86,6 +86,9 @@ void machine_crash_nonpanic_core(void *unused) > set_cpu_online(smp_processor_id(), false); > atomic_dec(&waiting_for_crash_ipi); > > + local_fiq_disable(); > + local_irq_disable(); > + My expectations would be that, since we're getting here using an IPI, interrupts are already masked. So what reenabled them the first place? Thanks, M. -- Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists