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: <587610C9.1020703@redhat.com>
Date:   Wed, 11 Jan 2017 06:02:33 -0500
From:   Prarit Bhargava <prarit@...hat.com>
To:     bp@...e.de, hpa@...or.com, harish.chegondi@...el.com,
        peterz@...radead.org, tglx@...utronix.de, kan.liang@...el.com,
        mingo@...nel.org, linux-kernel@...r.kernel.org,
        linux-tip-commits@...r.kernel.org
Subject: Re: [tip:x86/urgent] perf/x86/intel/uncore: Do not use hard coded
 physical package id 0

On 01/11/2017 05:33 AM, tip-bot for Prarit Bhargava wrote:
> Commit-ID:  42433049c51e326baa1f45c834af9572fdb65b35
> Gitweb:     http://git.kernel.org/tip/42433049c51e326baa1f45c834af9572fdb65b35
> Author:     Prarit Bhargava <prarit@...hat.com>
> AuthorDate: Tue, 3 Jan 2017 14:24:31 -0500
> Committer:  Thomas Gleixner <tglx@...utronix.de>
> CommitDate: Wed, 11 Jan 2017 11:29:37 +0100
> 
> perf/x86/intel/uncore: Do not use hard coded physical package id 0
> 
> hswep_uncore_cpu_init() uses a hardcoded physical package id 0 for the boot
> cpu. This works as long as the boot CPU is actually on the physical package
> 0, which is normaly the case after power on / reboot.
> 
> But it fails with a NULL pointer dereference when a kdump kernel is started
> on a secondary socket which has a different physical package id because the
> locigal package translation for physical package 0 does not exist.
> 
> Use the physical package id of the boot cpu instead of hard coded 0.
> 
> [ tglx: Rewrote changelog once more ]
> 
> commit cf6d445f6897 ("perf/x86/uncore: Track packages, not per CPU data")
> Signed-off-by: Prarit Bhargava <prarit@...hat.com>
> Cc: Peter Zijlstra <peterz@...radead.org>
> Cc: Kan Liang <kan.liang@...el.com>
> Cc: Harish Chegondi <harish.chegondi@...el.com>
> Cc: Borislav Petkov <bp@...e.de>
> Cc: stable@...r.kernel.org
> Link: http://lkml.kernel.org/r/1483471471-14450-1-git-send-email-prarit@redhat.com
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
>  arch/x86/events/intel/uncore_snbep.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/events/intel/uncore_snbep.c b/arch/x86/events/intel/uncore_snbep.c
> index e6832be..b5fbb59 100644
> --- a/arch/x86/events/intel/uncore_snbep.c
> +++ b/arch/x86/events/intel/uncore_snbep.c
> @@ -2686,7 +2686,7 @@ static struct intel_uncore_type *hswep_msr_uncores[] = {
>  
>  void hswep_uncore_cpu_init(void)
>  {
> -	int pkg = topology_phys_to_logical_pkg(0);
> +	int pkg = topology_phys_to_logical_pkg(boot_cpu_data.phys_proc_id);
>  
>  	if (hswep_uncore_cbox.num_boxes > boot_cpu_data.x86_max_cores)
>  		hswep_uncore_cbox.num_boxes = boot_cpu_data.x86_max_cores;
> 
> 

Thomas, I self-nacked this and posted a v2.  The v2 uses
boot_cpu_data.logical_proc_id instead.  It was picked up here in tip by Ingo
yesterday.

http://git.kernel.org/tip/fa37361e291bfe528872b9aef5c8644a3fc7ff20

P.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ