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: <6270a109-85b8-b2d2-d32f-6e24be84448b@redhat.com>
Date:   Wed, 1 Jun 2022 11:40:43 +0800
From:   Gavin Shan <gshan@...hat.com>
To:     Sudeep Holla <sudeep.holla@....com>, linux-kernel@...r.kernel.org
Cc:     Atish Patra <atishp@...shpatra.org>,
        Atish Patra <atishp@...osinc.com>,
        Vincent Guittot <vincent.guittot@...aro.org>,
        Morten Rasmussen <morten.rasmussen@....com>,
        Dietmar Eggemann <dietmar.eggemann@....com>,
        Qing Wang <wangqing@...o.com>,
        linux-arm-kernel@...ts.infradead.org,
        linux-riscv@...ts.infradead.org, Rob Herring <robh+dt@...nel.org>
Subject: Re: [PATCH v3 12/16] arch_topology: Avoid parsing through all the
 CPUs once a outlier CPU is found

On 5/25/22 4:14 PM, Sudeep Holla wrote:
> There is no point in looping through all the CPU's physical package
> identifier to check if it is valid or not once a CPU which is outside
> the topology(i.e. outlier CPU) is found.
> 
> Let us just break out of the loop early in such case.
> 
> Signed-off-by: Sudeep Holla <sudeep.holla@....com>
> ---
>   drivers/base/arch_topology.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 

Reviewed-by: Gavin Shan <gshan@...hat.com>

> diff --git a/drivers/base/arch_topology.c b/drivers/base/arch_topology.c
> index f73a5e669e42..6ae450ca68bb 100644
> --- a/drivers/base/arch_topology.c
> +++ b/drivers/base/arch_topology.c
> @@ -637,8 +637,10 @@ static int __init parse_dt_topology(void)
>   	 * only mark cores described in the DT as possible.
>   	 */
>   	for_each_possible_cpu(cpu)
> -		if (cpu_topology[cpu].package_id < 0)
> +		if (cpu_topology[cpu].package_id < 0) {
>   			ret = -EINVAL;
> +			break;
> +		}
>   
>   out_map:
>   	of_node_put(map);
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ