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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Fri, 7 Dec 2007 21:28:55 +0800
From:	"huang ying" <>
To:	"Rafael J. Wysocki" <>
Cc:	"Huang, Ying" <>,
	"Eric W. Biederman" <>,
	"Pavel Machek" <>,,
	"Andrew Morton" <>,
	"Jeremy Maitin-Shepard" <>,,,
	"Kexec Mailing List" <>
Subject: Re: [PATCH 3/4 -mm] kexec based hibernation -v7 : kexec hibernate/resume

On Dec 7, 2007 8:52 PM, Rafael J. Wysocki <> wrote:
> On Friday, 7 of December 2007, Huang, Ying wrote:
> > This patch implements kexec based hibernate/resume. This is based on
> > the facility provided by kexec_jump. The states save/restore code of
> > ordinary kexec_jump is overridden by hibernate/resume specific
> > code.
> Can you explain in more details how this works?

Two blocking notifier chain named kjump_chain_pre and kjump_chain_post
are defined, the basic procedure of kexec jump is as follow:

call functions in kjump_chain_pre
jump to peer kernel
call functions in kjump_chain_post

A command is the first parameter of functions in chain. If A command
is processed in a function, the function will execute and stop the
chain (return NOTIFY_STOP), otherwise it will do nothing (return
NOTIFY_DONE). If no function has interest in the command, the default
behavior will be executed (kexec_vcall_pre, kexec_vcall_post).

So for each command the procedure is as follow:

[chain] kexec_snapshot
jump to kexeced kernel
[chain] kexec_prepare_write_image /* in kexeced kernel */

[chain] kexec_prepare_resume /* in kexeced kernel */
jump to kexec kernel
[chain] kexec_resume

> > The ACPI methods are called at specified environment to conform
> > the ACPI specification. A new reboot command is added to go to ACPI S4
> > state from user space.
> Well, I still don't like the amount of duplicated code introduced by this patch.

Yes, there are too many duplicated code. They should be merged. But I
want to delay the merging until the kexec based hibernation code goes
more stable.

> Also, IMO it should be using the mutual exclusion mechanisms used by the
> existing hibernation code, ie. pm_mutex and the snapshot_device_available
> atomic variable.

Now the kexec_lock is used as a mutex between kexec related
operations. It seems reasonable to use pm_mutex and maybe
snapshot_device_available to eliminate potential conflict between
kexec based hibernation and u/swsusp.

Best Regards,
Huang Ying
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists