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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 20 Sep 2016 15:38:13 +0200
From:   Robert Richter <rric@...nel.org>
To:     Hanjun Guo <hanjun.guo@...aro.org>
Cc:     David Daney <ddaney.cavm@...il.com>, linux-kernel@...r.kernel.org,
        Marc Zyngier <marc.zyngier@....com>,
        "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
        Will Deacon <will.deacon@....com>,
        Ganapatrao Kulkarni <gkulkarni@...iumnetworks.com>,
        linux-arm-kernel@...ts.infradead.org,
        David Daney <david.daney@...ium.com>, xieyisheng1@...wei.com
Subject: Re: [PATCH] arm64, numa: Add cpu_to_node() implementation.

On 20.09.16 19:32:34, Hanjun Guo wrote:
> On 09/20/2016 06:43 PM, Robert Richter wrote:

> >Instead we need to make sure the set_*numa_node() functions are called
> >earlier before secondary cpus are booted. My suggested change for that
> >is this:
> >
> >
> >diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
> >index d93d43352504..952365c2f100 100644
> >--- a/arch/arm64/kernel/smp.c
> >+++ b/arch/arm64/kernel/smp.c
> >@@ -204,7 +204,6 @@ int __cpu_up(unsigned int cpu, struct task_struct *idle)
> >  static void smp_store_cpu_info(unsigned int cpuid)
> >  {
> >  	store_cpu_topology(cpuid);
> >-	numa_store_cpu_info(cpuid);
> >  }
> >
> >  /*
> >@@ -719,6 +718,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
> >  			continue;
> >
> >  		set_cpu_present(cpu, true);
> >+		numa_store_cpu_info(cpu);
> >  	}
> >  }
> 
> We tried a similar approach which add numa_store_cpu_info() in
> early_map_cpu_to_node(), and remove it from smp_store_cpu_info,
> but didn't work for us, we will try your approach to see if works.

Calling it in early_map_cpu_to_node() is probably too early since
setup_node_to_cpumask_map() is called in numa_init() afterwards
overwriting it again.

Actually, early_map_cpu_to_node() is used to temporarily store the
mapping until it can be setup in numa_store_cpu_info().

-Robert

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ