linux-efi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sai Praneeth Prakhya <sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
To: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
Cc: linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Ricardo Neri
	<ricardo.neri-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
	Matt Fleming
	<matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>,
	Ard Biesheuvel
	<ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Ravi Shankar
	<ravi.v.shankar-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and efi=old_map
Date: Thu, 11 May 2017 11:44:17 -0700	[thread overview]
Message-ID: <1494528257.8845.11.camel@intel.com> (raw)
In-Reply-To: <20170511111828.pu2i3pn6lyiukgaf-fF5Pk5pvG8Y@public.gmane.org>

On Thu, 2017-05-11 at 13:18 +0200, Borislav Petkov wrote:
> On Wed, May 10, 2017 at 03:49:05PM -0700, Sai Praneeth Prakhya wrote:
> > From: Sai Praneeth <sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > 
> > EFI_PGT_DUMP, as the name suggests dumps efi page tables to dmesg during
> > kernel boot. This feature is very useful while debugging page
> > faults/null pointer dereferences to efi related addresses. Presently,
> > this feature is limited only to x86_64, so let's extend it to other efi
> > configurations like kexec kernel, efi=old_map and to x86_32 as well.
> > This doesn't effect normal boot path because this config option should
> > be used only for debug purposes.
> > 
> > Signed-off-by: Sai Praneeth Prakhya <sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Cc: Borislav Petkov <bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org>
> > Cc: Ricardo Neri <ricardo.neri-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > Cc: Matt Fleming <matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org>
> > Cc: Ard Biesheuvel <ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> > Cc: Ravi Shankar <ravi.v.shankar-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
> > ---
> >  arch/x86/platform/efi/efi.c    | 2 ++
> >  arch/x86/platform/efi/efi_32.c | 9 ++++++++-
> >  arch/x86/platform/efi/efi_64.c | 5 ++++-
> >  3 files changed, 14 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c
> > index 217dc166c649..a6d6cd8fe78a 100644
> > --- a/arch/x86/platform/efi/efi.c
> > +++ b/arch/x86/platform/efi/efi.c
> > @@ -890,6 +890,8 @@ static void __init kexec_enter_virtual_mode(void)
> >  	if (efi_enabled(EFI_OLD_MEMMAP) && (__supported_pte_mask & _PAGE_NX))
> >  		runtime_code_page_mkexec();
> >  
> > +	efi_dump_pagetable();
> 
> You can call that only once at the end of efi_enter_virtual_mode()
> instead of adding it here and leaving it in __efi_enter_virtual_mode().
> 

Thanks for the suggestion Boris,
Sure! will roll out v2 with this change

Regards,
Sai

      parent reply	other threads:[~2017-05-11 18:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-10 22:49 [PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and efi=old_map Sai Praneeth Prakhya
     [not found] ` <1494456545-26300-1-git-send-email-sai.praneeth.prakhya-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-05-11 11:18   ` Borislav Petkov
     [not found]     ` <20170511111828.pu2i3pn6lyiukgaf-fF5Pk5pvG8Y@public.gmane.org>
2017-05-11 18:44       ` Sai Praneeth Prakhya [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1494528257.8845.11.camel@intel.com \
    --to=sai.praneeth.prakhya-ral2jqcrhueavxtiumwx3w@public.gmane.org \
    --cc=ard.biesheuvel-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org \
    --cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=matt-mF/unelCI9GS6iBeEJttW/XRex20P6io@public.gmane.org \
    --cc=ravi.v.shankar-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=ricardo.neri-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).