lkml.org 
[lkml]   [2008]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] kexec based hibernation: a prototype of kexec multi-stage load
"Huang, Ying" <ying.huang@intel.com> writes:

> On Thu, 2008-05-15 at 11:39 -0700, Eric W. Biederman wrote:
> [...]
>> 2) After we figure out our address read the stack pointer from
>> a fixed location and simply set it. (This is my preference)
>
> Just for confirmation (My English is poor).
>
> Do you mean that kernel A just read the stack top as re-entry point,
> regardless of whether it is return address or argument 1?

What I was thinking was:

In kernel A()

relocate_new_kernel:

...

call *%eax

kexec_jump_back_entry:
/* This code should be PIC so figure out where we are */
call 1f
1:
popl %edi
subl $(1b - relocate_kernel), %edi

/* Setup a safe stack */
leal PAGE_SIZE(%edi), %esp
...


Then in purgatory we can read the address of kexec_jump_back_entry
by examining 0(%esp) and export it in whatever fashion is sane.

However we reach kexec_jump_back_entry we should be fine.

Eric


\
 
 \ /
  Last update: 2008-05-16 04:33    [W:0.058 / U:0.412 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site