From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Vrabel Subject: [PATCH 8/9] x86: check kexec relocation code fits in a page Date: Fri, 20 Sep 2013 14:10:54 +0100 Message-ID: <1379682655-14157-9-git-send-email-david.vrabel@citrix.com> References: <1379682655-14157-1-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1379682655-14157-1-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: kexec@list.infradead.org, Daniel Kiper , Keir Fraser , David Vrabel , Jan Beulich List-Id: xen-devel@lists.xenproject.org From: David Vrabel The kexec relocation (control) code must fit in a single page so add a link time check for this. Signed-off-by: David Vrabel --- 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..17db361 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") -- 1.7.2.5