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: <20190325193113.GA14852@kroah.com>
Date:   Tue, 26 Mar 2019 04:31:13 +0900
From:   Greg KH <gregkh@...uxfoundation.org>
To:     lantianyu1986@...il.com
Cc:     tglx@...utronix.de, mingo@...nel.org, konrad.wilk@...cle.com,
        jpoimboe@...hat.com, peterz@...raded.org, mojha@...eaurora.org,
        peterz@...radead.org, jkosina@...e.cz, riel@...riel.com,
        luto@...nel.org, Tianyu.Lan@...rosoft.com,
        michael.h.kelley@...rosoft.com, kys@...rosoft.com,
        linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [Fix PATCH] cpu/hotplug: Fix bug report when add "nosmt"
 parameter with CONFIG_HOTPLUG_CPU=N

On Mon, Mar 25, 2019 at 09:51:23PM +0800, lantianyu1986@...il.com wrote:
> From: Lan Tianyu <Tianyu.Lan@...rosoft.com>
> 
> When add "nosmt" parameter, kernel still boots up all logical cpus once
> and set CR4.MCE on each CPU. This is to avoid shutting down machine
> when a broadacasted MCE is observed CR4.MCE=0b. (Detail please see comment
> in the cpu_smt_allowed()). Smt cpus will bring up and bring down during
> kernel boot with "nosmt" parameter.
> 
> When CONFIG_HOTPLUG_CPU=Y, CPU_DYING callbacks will be called inside
> stop-machine and irq is disabled. This happens in the take_cpu_down()
> callback. When CONFIG_HOTPLUG_CPU=N,CPU_DYING callbacks will be called
> with irq enabled.
> 
> smpcfd_dying_cpu() is one of CPU_DYING callbacks and it assumes to be
> called when irq is disabled. smpcfd_dying_cpu() calls flush_smp_call_
> function_queue() which requires to be called with irq disabled.
> 
> When CONFIG_HOTPLUG_CPU=N and add "nosmt" parameter, smpcfd_dying_cpu()
> is called with irq enalbed and this triggers BUG_ON(!irqs_disabled())
> in the irq_work_run_list(). This patch is to fix the issue.
> 
> Fixes: 0cc3cd21657b ("cpu/hotplug: Boot HT siblings at least once")
> Signed-off-by: Lan Tianyu <Tianyu.Lan@...rosoft.com>
> ---
>  kernel/smp.c | 5 +++++
>  1 file changed, 5 insertions(+)

<formletter>

This is not the correct way to submit patches for inclusion in the
stable kernel tree.  Please read:
    https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.

</formletter>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ