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:	Wed, 19 Mar 2014 13:47:38 -0700
From:	Sebastian Capella <sebastian.capella@...aro.org>
To:	Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
Cc:	Stefano Stabellini <stefano.stabellini@...citrix.com>,
	Len Brown <len.brown@...el.com>,
	"linaro-kernel@...ts.linaro.org" <linaro-kernel@...ts.linaro.org>,
	Russell King <linux@....linux.org.uk>,
	Jonathan Austin <jonathan.austin@....com>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Victor Kamensky <victor.kamensky@...aro.org>,
	Will Deacon <will.deacon@....com>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	Sricharan R <r.sricharan@...com>,
	Santosh Shilimkar <santosh.shilimkar@...com>,
	Ben Dooks <ben.dooks@...ethink.co.uk>,
	Russ Dill <Russ.Dill@...com>, Nicolas Pitre <nico@...aro.org>,
	Uwe Kleine-König 
	<u.kleine-koenig@...gutronix.de>,
	Laura Abbott <lauraa@...eaurora.org>,
	Catalin Marinas <catalin.marinas@....com>,
	Stephen Boyd <sboyd@...eaurora.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Jiang Liu <liuj97@...il.com>
Subject: Re: [PATCH v7 2/2] ARM hibernation / suspend-to-disk

On 19 March 2014 08:44, Ezequiel Garcia
<ezequiel.garcia@...e-electrons.com> wrote:
> Tested-by: Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>
Thanks!
> On the other side, this board has no pm_power_off() support, which means
> kernel_halt() is called after kernel_power_off().
>
> I'm not sure if a NULL pm_power_off() is supported, but this makes my kernel
> crash in a reboot notifier that's called twice (first in kernel_power_off
> and then in kernel_halt):

The omap board I'm using has a null pm_power_off.  I added code to
bypass kernel_power_off in the event pm_power_off is null like this:


diff --git a/kernel/power/hibernate.c b/kernel/power/hibernate.c
index a5f702a..d96b910 100644
--- a/kernel/power/hibernate.c
+++ b/kernel/power/hibernate.c
@@ -594,7 +594,8 @@ static void power_down(void)
        case HIBERNATION_PLATFORM:
                hibernation_platform_enter();
        case HIBERNATION_SHUTDOWN:
-               kernel_power_off();
+               if (pm_power_off)
+                       kernel_power_off();
                break;
 #ifdef CONFIG_SUSPEND
        case HIBERNATION_SUSPEND:


This follows the behavior in the reboot syscall which does it this way
also.  I'm testing this now, and it seems work fine.  If this looks
good, I can add it as an additional patch.

Thanks,

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ