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]
Date:   Tue, 25 Oct 2016 14:32:16 -0400
From:   Prarit Bhargava <prarit@...hat.com>
To:     ville.syrjala@...ux.intel.com, linux-kernel@...r.kernel.org
CC:     stable@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
        Peter Zijlstra <peterz@...radead.org>,
        Len Brown <len.brown@...el.com>, Borislav Petkov <bp@...e.de>,
        Andi Kleen <ak@...ux.intel.com>, Jiri Olsa <jolsa@...hat.com>,
        Juergen Gross <jgross@...e.com>, dyoung@...hat.com,
        Eric Biederman <ebiederm@...ssion.com>,
        kexec@...ts.infradead.org, Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [PATCH] arch/x86: Don't try to poke disabled/non-existent APIC



On 10/21/2016 10:18 PM, ville.syrjala@...ux.intel.com wrote:
> From: Ville Syrjälä <ville.syrjala@...ux.intel.com>
> 
> Apparently trying to poke a disabled or non-existent APIC
> leads to a box that doesn't even boot. Let's not do that.
> 
> No real clue if this is the right fix, but at least my
> P3 machine boots again.
> 
> Cc: stable@...r.kernel.org
> Cc: Ingo Molnar <mingo@...hat.com>
> Cc: "H. Peter Anvin" <hpa@...or.com>
> Cc: x86@...nel.org
> Cc: Prarit Bhargava <prarit@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Len Brown <len.brown@...el.com>
> Cc: Borislav Petkov <bp@...e.de>
> Cc: Andi Kleen <ak@...ux.intel.com>
> Cc: Jiri Olsa <jolsa@...hat.com>
> Cc: Juergen Gross <jgross@...e.com>
> Cc: dyoung@...hat.com
> Cc: Eric Biederman <ebiederm@...ssion.com>
> Cc: kexec@...ts.infradead.org
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Fixes: 2a51fe083eba ("arch/x86: Handle non enumerated CPU after physical hotplug")
> Signed-off-by: Ville Syrjälä <ville.syrjala@...ux.intel.com>
> ---
>  arch/x86/kernel/smpboot.c | 16 +++++++++-------
>  1 file changed, 9 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 951f093a96fe..42f5eb7b4f6c 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -1409,15 +1409,17 @@ __init void prefill_possible_map(void)
>  
>  	/* No boot processor was found in mptable or ACPI MADT */
>  	if (!num_processors) {
> -		int apicid = boot_cpu_physical_apicid;
> -		int cpu = hard_smp_processor_id();
> +		if (boot_cpu_has(X86_FEATURE_APIC)) {


It looks okay to gate on X86_FEATURE_APIC, but not sure if it should be

     cpu_has(&cpu_data(0), X86_FEATURE_APIC)

since smp_store_boot_cpu_info() was already called.

tglx?

P.




> +			int apicid = boot_cpu_physical_apicid;
> +			int cpu = hard_smp_processor_id();
>  
> -		pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
> +			pr_warn("Boot CPU (id %d) not listed by BIOS\n", cpu);
>  
> -		/* Make sure boot cpu is enumerated */
> -		if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> -		    apic->apic_id_valid(apicid))
> -			generic_processor_info(apicid, boot_cpu_apic_version);
> +			/* Make sure boot cpu is enumerated */
> +			if (apic->cpu_present_to_apicid(0) == BAD_APICID &&
> +			    apic->apic_id_valid(apicid))
> +				generic_processor_info(apicid, boot_cpu_apic_version);
> +		}
>  
>  		if (!num_processors)
>  			num_processors = 1;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ