From 1fab023d3f58ed2b40c90c0d9cd078c3afcbcfc7 Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Tue, 12 Nov 2013 11:47:26 +0100 Subject: [PATCH] x86: check kexec relocation code fits in a page The kexec relocation (control) code must fit in a single page so add a link time check for this. Signed-off-by: David Vrabel Reviewed-by: Andrew Cooper Reviewed-by: Don Slutz Tested-by: Don Slutz Reviewed-by: Daniel Kiper Tested-by: Daniel Kiper Acked-by: Keir Fraser --- xen/arch/x86/xen.lds.S | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 9600cdf19e..17db361dda 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 - kexec_reloc <= PAGE_SIZE, "kexec_reloc is too large") -- 2.30.2