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]
Date:	Mon, 1 Aug 2016 13:40:31 +1000
From:	Nicholas Piggin <npiggin@...il.com>
To:	Andrey Smirnov <andrew.smirnov@...il.com>
Cc:	linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
	Scott Wood <oss@...error.net>,
	Alessio Igor Bogani <alessio.bogani@...ttra.eu>,
	Paul Mackerras <paulus@...ba.org>,
	Daniel Axtens <dja@...ens.net>
Subject: Re: [PATCH v2 1/3] powerpc: Factor out common code in
 setup-common.c

On Thu, 28 Jul 2016 16:07:16 -0700
Andrey Smirnov <andrew.smirnov@...il.com> wrote:

> Factor out a small bit of common code in machine_restart(),
> machine_power_off() and machine_halt().
> 
> Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
> ---
> 
> No changes compared to v1.
> 
>  arch/powerpc/kernel/setup-common.c | 23 ++++++++++++++---------
>  1 file changed, 14 insertions(+), 9 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/setup-common.c
> b/arch/powerpc/kernel/setup-common.c index 714b4ba..5cd3283 100644
> --- a/arch/powerpc/kernel/setup-common.c
> +++ b/arch/powerpc/kernel/setup-common.c
> @@ -130,15 +130,22 @@ void machine_shutdown(void)
>  		ppc_md.machine_shutdown();
>  }
>  
> +static void machine_hang(void)
> +{
> +	pr_emerg("System Halted, OK to turn off power\n");
> +	local_irq_disable();
> +	while (1)
> +		;
> +}

What's the intended semantics of this function? A default power
off handler when the platform supplies none? Would ppc_power_off()
be a good name? Should the smp_send_stop() call be moved here?

It seems like a reasonable cleanup though.

Thanks,
Nick

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ