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:	Tue, 27 Nov 2007 01:29:29 +0100
From:	Pavel Machek <pavel@....cz>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	pm list <linux-pm@...ts.linux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/6] Hibernation: Move low level resume to disk.c

Hi!

> From: Rafael J. Wysocki <rjw@...k.pl>
> 
> Move the low level restore code to kernel/power/disk.c , since the
> corresponding low level hibernation code is already there.
> 
> Make restore fail if device_power_down(PMSG_PRETHAW) returns an
> error.
> 
> Signed-off-by: Rafael J. Wysocki <rjw@...k.pl>

Move looks ok to me.


>  /**
> + *	resume_target_kernel - prepare devices that need to be suspended with
> + *	interrupts off, restore the contents of highmem that have not been
> + *	restored yet from the image and run the low level code that will restore
> + *	the remaining contents of memory and switch to the just restored target
> + *	kernel.
> + */
> +
> +static int resume_target_kernel(void)
> +{
> +	int error;
> +
> +	local_irq_disable();
> +	error = device_power_down(PMSG_PRETHAW);
> +	if (error) {
> +		printk(KERN_ERR "Some devices failed to power down, "
> +			KERN_ERR "aborting resume\n");
> +		goto Enable_irqs;

Too many KERN_ERR's ;-). Plus... are you sure this does the right
thing? ... .. ... yes, it does. If one device fails,
device_power_down() powers up the rest using dpm_power_up(). Good.

ACK... modulo double KERN_ERR.
								Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
-
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