David Vrabel
2013-Sep-12 19:49 UTC
[PATCH 8/9] x86: check kexec relocation code fits in a page
From: David Vrabel <david.vrabel@citrix.com> The kexec relocation (control) code must fit in a single page so add a link time check for this. Signed-off-by: David Vrabel <david.vrabel@citrix.com> --- xen/arch/x86/xen.lds.S | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 9600cdf..078bac6 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -198,3 +198,5 @@ SECTIONS .stab.indexstr 0 : { *(.stab.indexstr) } .comment 0 : { *(.comment) } } + +ASSERT(__kexec_reloc_size <= PAGE_SIZE, "kexec control code is too large") -- 1.7.2.5
Daniel Kiper
2013-Sep-16 12:34 UTC
Re: [PATCH 8/9] x86: check kexec relocation code fits in a page
On Thu, Sep 12, 2013 at 08:49:06PM +0100, David Vrabel wrote:> From: David Vrabel <david.vrabel@citrix.com> > > The kexec relocation (control) code must fit in a single page so add a > link time check for this. > > Signed-off-by: David Vrabel <david.vrabel@citrix.com> > --- > xen/arch/x86/xen.lds.S | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S > index 9600cdf..078bac6 100644 > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@ -198,3 +198,5 @@ SECTIONS > .stab.indexstr 0 : { *(.stab.indexstr) } > .comment 0 : { *(.comment) } > } > + > +ASSERT(__kexec_reloc_size <= PAGE_SIZE, "kexec control code is too large")ASSERT(kexec_reloc_size - kexec_reloc <= PAGE_SIZE, "kexec control code is too large") This way you could remove this crazy __kexec_reloc_size variable. Last time I sent broken solution for that issue. This one works. Daniel