[CRIU] Re: [PATCH] restorer: close log file before detaching from
crtools
Cyrill Gorcunov
gorcunov at openvz.org
Mon Feb 20 10:31:07 EST 2012
On Mon, Feb 20, 2012 at 07:12:14PM +0400, Kinsbursky Stanislav wrote:
...
> >>+
> >>+core_restore_failed:
> >>+ asm volatile(
> >>+ "movq %0, %%rsp \n"
> >>+ "jmp *%1 \n"
> >>+ :
> >>+ : "r"(ret), "r"(line)
> >>+ : );
> >>+ return ret;
> >We have a similar code in BUG_ON_HANDLER, but this code is better, so
> >I think you can improve BUG_ON_HANDLER and use it.
>
> Thanks for your valuable opinion. I'll keep that in mind.
>
Since both IP and SP are printed in dmesg I guess we might load
line number into SP and cause NULL dereference, something like
core_restore_failed:
asm volatile(
"movq %0, %%rsp \n"
"xorl %%eax, %%eax \n"
"movl %%eax, (%%eax) \n"
:
: "r"(line)
: );
or, as Andrew mentioned, extend BUG_ON_HANDLER. Hm?
Cyrill
More information about the CRIU
mailing list