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: <678F3D1BB717D949B966B68EAEB446ED340B3211@dggemm526-mbx.china.huawei.com>
Date:   Mon, 6 Jan 2020 01:52:18 +0000
From:   "Zengtao (B)" <prime.zeng@...ilicon.com>
To:     Valentin Schneider <valentin.schneider@....com>,
        Sudeep Holla <sudeep.holla@....com>
CC:     Linuxarm <linuxarm@...wei.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Morten Rasmussen" <morten.rasmussen@....com>
Subject: RE: [PATCH] cpu-topology: warn if NUMA configurations conflicts
 with lower layer

> -----Original Message-----
> From: Valentin Schneider [mailto:valentin.schneider@....com]
> Sent: Friday, January 03, 2020 8:15 PM
> To: Zengtao (B); Sudeep Holla
> Cc: Linuxarm; Greg Kroah-Hartman; Rafael J. Wysocki;
> linux-kernel@...r.kernel.org; Morten Rasmussen
> Subject: Re: [PATCH] cpu-topology: warn if NUMA configurations conflicts
> with lower layer
> 
> On 03/01/2020 10:57, Valentin Schneider wrote:
> > I'm juggling with other things atm, but let me have a think and see if we
> > couldn't detect that in the scheduler itself.
> >
> 
> Something like this ought to catch your case; might need to compare group
> spans rather than pure group pointers.
> 

Good suggestion, I will need to have a think and try
Thanks. 

> ---
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index 6ec1e595b1d4..c4151e11afcd 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -1120,6 +1120,13 @@ build_sched_groups(struct sched_domain *sd,
> int cpu)
> 
>  		sg = get_group(i, sdd);
> 
> +		/* sg's are inited as self-looping. If 'last' is not self
> +		 * looping, we set it in a previous visit. No further visit
> +		 * should change the link order, if we do then the topology
> +		 * description is terminally broken.
> +		 */
> +		BUG_ON(last && last->next != last && last->next != sg);
> +
>  		cpumask_or(covered, covered, sched_group_span(sg));
> 
>  		if (!first)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ