From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Fleming Subject: Re: [PATCH] x86/efi: Only map kernel text for EFI mixed mode Date: Thu, 11 Feb 2016 15:15:47 +0000 Message-ID: <20160211151547.GH4134@codeblueprint.co.uk> References: <1454116233-7074-1-git-send-email-sai.praneeth.prakhya@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1454116233-7074-1-git-send-email-sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Sai Praneeth Prakhya Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Borislav Petkov , Ricardo Neri , Ravi Shankar List-Id: linux-efi@vger.kernel.org On Fri, 29 Jan, at 05:10:33PM, Sai Praneeth Prakhya wrote: > From: Sai Praneeth > > The correct symbol to use when figuring out the size of the kernel > text is '_etext', not '_end' which is the symbol for the entire kernel > image includes data and debug sections. > > Cc: Borislav Petkov > Cc: Ricardo Neri > Cc: Ravi Shankar > Signed-off-by: Matt Fleming > Signed-off-by: Sai Praneeth Prakhya > --- > arch/x86/platform/efi/efi_64.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/x86/platform/efi/efi_64.c b/arch/x86/platform/efi/efi_64.c > index b492521503fe..040fff163d96 100644 > --- a/arch/x86/platform/efi/efi_64.c > +++ b/arch/x86/platform/efi/efi_64.c > @@ -275,7 +275,7 @@ int __init efi_setup_page_tables(unsigned long pa_memmap, unsigned num_pages) > efi_scratch.phys_stack = virt_to_phys(page_address(page)); > efi_scratch.phys_stack += PAGE_SIZE; /* stack grows down */ > > - npages = (_end - _text) >> PAGE_SHIFT; > + npages = (_etext - _text) >> PAGE_SHIFT; > text = __pa(_text); > pfn = text >> PAGE_SHIFT; > Thanks, applied.