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: <8b15c0fe619640808e1e26aa7c845bb9@hisilicon.com>
Date:   Mon, 1 Feb 2021 10:35:43 +0000
From:   "Song Bao Hua (Barry Song)" <song.bao.hua@...ilicon.com>
To:     Dietmar Eggemann <dietmar.eggemann@....com>,
        Valentin Schneider <valentin.schneider@....com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC:     "mingo@...nel.org" <mingo@...nel.org>,
        "peterz@...radead.org" <peterz@...radead.org>,
        "vincent.guittot@...aro.org" <vincent.guittot@...aro.org>,
        "morten.rasmussen@....com" <morten.rasmussen@....com>,
        "mgorman@...e.de" <mgorman@...e.de>
Subject: RE: [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for
 the deduplicating sort



> -----Original Message-----
> From: Dietmar Eggemann [mailto:dietmar.eggemann@....com]
> Sent: Monday, February 1, 2021 10:54 PM
> To: Valentin Schneider <valentin.schneider@....com>;
> linux-kernel@...r.kernel.org
> Cc: mingo@...nel.org; peterz@...radead.org; vincent.guittot@...aro.org;
> morten.rasmussen@....com; mgorman@...e.de; Song Bao Hua (Barry Song)
> <song.bao.hua@...ilicon.com>
> Subject: Re: [PATCH 1/1] sched/topology: Make sched_init_numa() use a set for
> the deduplicating sort
> 
> On 22/01/2021 13:39, Valentin Schneider wrote:
> 
> [...]
> 
> > @@ -1705,7 +1702,7 @@ void sched_init_numa(void)
> >  	/* Compute default topology size */
> >  	for (i = 0; sched_domain_topology[i].mask; i++);
> >
> > -	tl = kzalloc((i + level + 1) *
> > +	tl = kzalloc((i + nr_levels) *
> >  			sizeof(struct sched_domain_topology_level), GFP_KERNEL);
> >  	if (!tl)
> >  		return;
> 
> This hunk creates issues during startup on my Arm64 juno board on tip/sched/core.

I also reported this kernel panic here:
https://lore.kernel.org/lkml/bfb703294b234e1e926a68fcb73dbee3@hisilicon.com/#t

> 
> ---8<---
> 
> From: Dietmar Eggemann <dietmar.eggemann@....com>
> Date: Mon, 1 Feb 2021 09:58:04 +0100
> Subject: [PATCH] sched/topology: Fix sched_domain_topology_level alloc in
>  sched_init_numa
> 
> Commit "sched/topology: Make sched_init_numa() use a set for the
> deduplicating sort" allocates 'i + nr_levels (level)' instead of
> 'i + nr_levels + 1' sched_domain_topology_level.
> 
> This led to an Oops (on Arm64 juno with CONFIG_SCHED_DEBUG):
> 
> sched_init_domains
>   build_sched_domains()
>     __free_domain_allocs()
>       __sdt_free() {
> 	...
>         for_each_sd_topology(tl)
> 	  ...
>           sd = *per_cpu_ptr(sdd->sd, j); <--
> 	  ...
>       }
> 
> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@....com>
> ---

This patch also resolved my panic. So:

Tested-by: Barry Song <song.bao.hua@...ilicon.com>

Thanks
Barry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ