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: <87blrcbd3n.fsf@nanos.tec.linutronix.de>
Date:   Thu, 09 Jan 2020 21:15:40 +0100
From:   Thomas Gleixner <tglx@...utronix.de>
To:     Hsin-Yi Wang <hsinyi@...omium.org>
Cc:     Josh Poimboeuf <jpoimboe@...hat.com>,
        Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Jiri Kosina <jkosina@...e.cz>,
        Pavankumar Kondeti <pkondeti@...eaurora.org>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Zhenzhong Duan <zhenzhong.duan@...cle.com>,
        Aaro Koskinen <aaro.koskinen@...ia.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Guenter Roeck <groeck@...omium.org>,
        Stephen Boyd <swboyd@...omium.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC v2] reboot: hotplug cpus in migrate_to_reboot_cpu()

Hsin-Yi Wang <hsinyi@...omium.org> writes:

> @@ -220,8 +221,6 @@ void migrate_to_reboot_cpu(void)
>  	/* The boot cpu is always logical cpu 0 */
>  	int cpu = reboot_cpu;
>  
> -	cpu_hotplug_disable();
> -
>  	/* Make certain the cpu I'm about to reboot on is online */
>  	if (!cpu_online(cpu))
>  		cpu = cpumask_first(cpu_online_mask);
> @@ -231,6 +230,11 @@ void migrate_to_reboot_cpu(void)
>  
>  	/* Make certain I only run on the appropriate processor */
>  	set_cpus_allowed_ptr(current, cpumask_of(cpu));
> +
> +	/* Hotplug other cpus if possible */
> +#ifdef CONFIG_HOTPLUG_CPU
> +	offline_secondary_cpus(cpu);
> +#endif

In general I like the idea, but shouldn't this remove the architecture
code as a follow up?

Also this needs to be explicitely enabled per architecture (opt-in) and
not as an unconditional operation for all architectures which support
CPU hotplug.

Thanks,

        tglx

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ