x86: check kexec relocation code fits in a page
authorDavid Vrabel <david.vrabel@citrix.com>
Tue, 12 Nov 2013 10:47:26 +0000 (11:47 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Nov 2013 10:47:26 +0000 (11:47 +0100)
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>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Don Slutz <dslutz@verizon.com>
Tested-by: Don Slutz <dslutz@verizon.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
Tested-by: Daniel Kiper <daniel.kiper@oracle.com>
Acked-by: Keir Fraser <keir@xen.org>
xen/arch/x86/xen.lds.S

index 9600cdf19eb6388f7900b00d10084420c7a3a104..17db361dda76376505270d92ba8483d82da7a4a0 100644 (file)
@@ -198,3 +198,5 @@ SECTIONS
   .stab.indexstr 0 : { *(.stab.indexstr) }
   .comment 0 : { *(.comment) }
 }
+
+ASSERT(kexec_reloc_size - kexec_reloc <= PAGE_SIZE, "kexec_reloc is too large")