From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Kiper Subject: Re: [PATCH 09/10] x86: check kexec relocation code fits in a page Date: Tue, 25 Jun 2013 21:00:59 +0200 Message-ID: <20130625190059.GB10322@debian70-amd64.local.net-space.pl> References: <1372095741-27012-1-git-send-email-david.vrabel@citrix.com> <1372095741-27012-10-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1372095741-27012-10-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: David Vrabel Cc: Keir Fraser , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Mon, Jun 24, 2013 at 06:42:20PM +0100, David Vrabel wrote: > 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 | 4 ++++ > 1 files changed, 4 insertions(+), 0 deletions(-) > > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S > index d959941..eebed01 100644 > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@ -186,3 +186,7 @@ SECTIONS > .stab.indexstr 0 : { *(.stab.indexstr) } > .comment 0 : { *(.comment) } > } > + > +#ifdef CONFIG_KEXEC > +ASSERT(__kexec_reloc_size <= PAGE_SIZE, "kexec control code is too large") ASSERT(kexec_reloc_size <= KEXEC_CONTROL_PAGE_SIZE, "kexec control code is too large") Daniel