[PATCH 5/8] kexec: extend hypercall with improved load/unload ops
Daniel Kiper
daniel.kiper at oracle.com
Fri Apr 19 04:08:41 EDT 2013
On Thu, Apr 18, 2013 at 05:29:33PM +0100, David Vrabel wrote:
> On 17/04/13 13:51, Daniel Kiper wrote:
> > On Tue, Apr 16, 2013 at 06:13:07PM +0100, David Vrabel wrote:
> >>
> >> }
> >>
> >> + code_page = __map_domain_page(image->control_code_page);
> >> + memcpy(code_page, kexec_reloc, PAGE_SIZE);
> >
> > memcpy(code_page, kexec_reloc, kexec_reloc_size);
>
> kexec_reloc_size is absolute symbol and doing this give linker errors.
Yes, it should be changed to something like that:
kexec_reloc_size:
.long . - xen_relocate_kernel
Somwhere in xen/include/asm-x86/machine_kexec.h:
extern unsigned int kexec_reloc_size;
> FWIW, Linux also uses a #define'd value for its similar memcpy.
I saw that sometime ago and I think this is a bug.
We should copy only kexec_reloc() code and nothing else.
Otherwise we ask for problems.
I am going to post relevant patches for this and
others kexec issues found in Linux Kernel.
> I have added a link time check that kexec_reloc_size <= PAGE_SIZE.
Good idea but it should be kexec_reloc_size <= KEXEC_CONTROL_PAGE_SIZE.
Daniel
More information about the kexec
mailing list