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]
Message-ID: <20191119223234.ov323rcln4slj7br@e107158-lin.cambridge.arm.com>
Date:   Tue, 19 Nov 2019 22:32:35 +0000
From:   Qais Yousef <qais.yousef@....com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Tony Luck <tony.luck@...el.com>,
        Fenghua Yu <fenghua.yu@...el.com>, linux-ia64@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 04/12] ia64: Replace cpu_down with freeze_secondary_cpus

On 11/19/19 23:21, Thomas Gleixner wrote:
> On Wed, 30 Oct 2019, Qais Yousef wrote:
> 
> > Use freeze_secondary_cpus() instead of open coding using cpu_down()
> > directly.
> > 
> > This also prepares to make cpu_up/down a private interface for anything
> > but the cpu subsystem.
> > 
> > Signed-off-by: Qais Yousef <qais.yousef@....com>
> > CC: Tony Luck <tony.luck@...el.com>
> > CC: Fenghua Yu <fenghua.yu@...el.com>
> > CC: linux-ia64@...r.kernel.org
> > CC: linux-kernel@...r.kernel.org
> > ---
> >  arch/ia64/kernel/process.c | 8 ++------
> >  1 file changed, 2 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/ia64/kernel/process.c b/arch/ia64/kernel/process.c
> > index 968b5f33e725..70b433eafa5c 100644
> > --- a/arch/ia64/kernel/process.c
> > +++ b/arch/ia64/kernel/process.c
> > @@ -647,12 +647,8 @@ cpu_halt (void)
> >  void machine_shutdown(void)
> >  {
> >  #ifdef CONFIG_HOTPLUG_CPU
> > -	int cpu;
> > -
> > -	for_each_online_cpu(cpu) {
> > -		if (cpu != smp_processor_id())
> > -			cpu_down(cpu);
> > -	}
> > +	/* TODO: Can we use disable_nonboot_cpus()? */
> > +	freeze_secondary_cpus(smp_processor_id());
> 
> freeze_secondary_cpus() is only available for CONFIG_PM_SLEEP_SMP=y and
> disable_nonboot_cpus() is a NOOP for CONFIG_PM_SLEEP_SMP=n :)

I thought I replied to this :-(

My plan was to simply make freeze_secondary_cpus() available and protected by
CONFIG_SMP only instead.

Good plan?

I'll probably do it as a separate patch before this one.

Thanks

--
Qais Yousef

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ