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] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.20.1709262102340.2078@nanos>
Date:   Tue, 26 Sep 2017 21:03:08 +0200 (CEST)
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Borislav Petkov <bp@...en8.de>
cc:     X86 ML <x86@...nel.org>, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] x86/apic: Do not use smp_processor_id() in preemptible
 code

On Tue, 26 Sep 2017, Borislav Petkov wrote:

> From: Borislav Petkov <bp@...e.de>
> 
> Call stack is:
> 
>   check_preemption_disabled
>   ? x2apic_prepare_cpu
>   x2apic_dead_cpu
>   cpuhp_invoke_callback
>   ? cpuhp_kick_ap_work
>   ? cpumask_next
>   _cpu_down
>   freeze_secondary_cpus
>   hibernation_snapshot
>   ...
> 
> i.e., box is doing suspend-to-disk.
> Signed-off-by: Borislav Petkov <bp@...e.de>
> ---
>  arch/x86/kernel/apic/x2apic_cluster.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/apic/x2apic_cluster.c b/arch/x86/kernel/apic/x2apic_cluster.c
> index 3da94277140f..6050c5364bdc 100644
> --- a/arch/x86/kernel/apic/x2apic_cluster.c
> +++ b/arch/x86/kernel/apic/x2apic_cluster.c
> @@ -156,7 +156,7 @@ static int x2apic_dead_cpu(unsigned int dead_cpu)
>  {
>  	struct cluster_mask *cmsk = per_cpu(cluster_masks, dead_cpu);
>  
> -	cpumask_clear_cpu(smp_processor_id(), &cmsk->mask);
> +	cpumask_clear_cpu(dead_cpu, &cmsk->mask);

Duh......

>  	free_cpumask_var(per_cpu(ipi_mask, dead_cpu));
>  	return 0;
>  }
> -- 
> 2.13.0
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ