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>] [day] [month] [year] [list]
Message-ID: <46F3DBAB.9010308@kolumbus.fi>
Date:	Fri, 21 Sep 2007 17:56:43 +0300
From:	Mika Penttilä <mika.penttila@...umbus.fi>
To:	huang ying <huang.ying.caritas@...il.com>
CC:	"Huang, Ying" <ying.huang@...el.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>,
	Pavel Machek <pavel@....cz>, nigel@...el.suspend2.net,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jeremy Maitin-Shepard <jbms@....edu>,
	linux-pm@...ts.linux-foundation.org,
	Kexec Mailing List <kexec@...ts.infradead.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [linux-pm] [RFC][PATCH 0/2 -mm] kexec based hibernation -v3

huang ying wrote:
> On 9/21/07, Mika Penttilä <mika.penttila@...umbus.fi> wrote:
>   
>>> Usage:
>>>
>>> 1. Compile kernel with following options selected:
>>>
>>> CONFIG_X86_32=y
>>> CONFIG_RELOCATABLE=y # not needed strictly, but it is more convenient with it
>>> CONFIG_KEXEC=y
>>> CONFIG_CRASH_DUMP=y # only needed by kexeced kernel to save/restore memory image
>>> CONFIG_PM=y
>>> CONFIG_KEXEC_JUMP=y
>>>
>>> 2. Download the kexec-tools-testing git tree, apply the kexec-tools
>>>    kjump patches (or download the source tar ball directly) and
>>>    compile.
>>>
>>> 3. Download and compile the krestore tool.
>>>
>>> 4. Prepare 2 root partition used by kernel A and kernel B/C, referred
>>>    as /dev/hda, /dev/hdb in following text. This is not strictly
>>>    necessary, I use this scheme for testing during development.
>>>
>>> 5. Boot kernel compiled for normal usage (kernal A).
>>>
>>> 6. Load kernel compiled for hibernating/restore usage (kernel B) with
>>>    kexec, the same kernel as that of 5 can be used if
>>>    CONFIG_RELOCATABLE=y and CONFIG_CRASH_DUMP=y are selected.
>>>
>>>    The --elf64-core-headers should be specified in command line of
>>>    kexec, because only the 64bit ELF is supported by krestore tool.
>>>
>>>    For example, the shell command line can be as follow:
>>>
>>>    kexec -p -n /boot/bzImage --mem-min=0x100000 --mem-max=0xffffff
>>>        --elf64-core-headers --append="root=/dev/hdb single"
>>>
>>> 7. Jump to the hibernating kernel (kernel B) with following shell
>>>    command line:
>>>
>>>    kexec -j
>>>
>>> 8. In the hibernating kernel (kernel B), the memory image of
>>>    hibernated kernel (kernel A) can be saved as follow:
>>>
>>>    cp /proc/vmcore .
>>>    cp /sys/kernel/kexec_jump_back_entry .
>>>
>>>       
>> Here we save also kernel B's pages.
>>     
>
> No, the kernel B's pages will not be saved. Because when we build the
> elfcore (/proc/vmcore) header, we exclude memory area used by kernel
> B. The details can be found in kexec-tools patches.
>
>   
Ok I see. But should the kernel B's e820 mem map be limited to 1m-16m in 
order not to allocate pages found also in A's space? Or does does the 
--mem-min and --mem-max do that also?
Thanks,
Mika


-
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