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, 9 Jul 2019 11:52:18 -0400 (EDT)
From:   Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     paulmck <paulmck@...ux.ibm.com>, Ingo Molnar <mingo@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        x86 <x86@...nel.org>, Nadav Amit <namit@...are.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Will Deacon <will.deacon@....com>
Subject: Re: [PATCH V3] cpu/hotplug: Cache number of online CPUs

----- On Jul 9, 2019, at 10:23 AM, Thomas Gleixner tglx@...utronix.de wrote:
[...]
> +void set_cpu_online(unsigned int cpu, bool online)
> +{
> +	/*
> +	 * atomic_inc/dec() is required to handle the horrid abuse of this
> +	 * function by the reboot and kexec code which invokes it from

invokes -> invoke

> +	 * IPI/NMI broadcasts when shutting down CPUs. Inocation from

Inocation -> Invocation

The rest looks good!

Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@...icios.com>

> +	 * regular CPU hotplug is properly serialized.
> +	 *
> +	 * Note, that the fact that __num_online_cpus is of type atomic_t
> +	 * does not protect readers which are not serialized against
> +	 * concurrent hotplug operations.
> +	 */
> +	if (online) {
> +		if (!cpumask_test_and_set_cpu(cpu, &__cpu_online_mask))
> +			atomic_inc(&__num_online_cpus);
> +	} else {
> +		if (cpumask_test_and_clear_cpu(cpu, &__cpu_online_mask))
> +			atomic_dec(&__num_online_cpus);
> +	}
> +}
> +
> /*
>  * Activate the first processor.
>   */

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ