Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1639309

Re: [PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and efi=old_map

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and efi=old_map
Date 2017-05-11 13:20 +0200
Message-ID <tFUiu-5Dv-5@gated-at.bofh.it> (permalink)
References <tFIKm-6A2-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, May 10, 2017 at 03:49:05PM -0700, Sai Praneeth Prakhya wrote:
> From: Sai Praneeth <sai.praneeth.prakhya@intel.com>
> 
> 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@intel.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Ricardo Neri <ricardo.neri@intel.com>
> Cc: Matt Fleming <matt@codeblueprint.co.uk>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Ravi Shankar <ravi.v.shankar@intel.com>
> ---
>  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().

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and efi=old_map Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com> - 2017-05-11 01:00 +0200
  Re: [PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and  efi=old_map Borislav Petkov <bp@alien8.de> - 2017-05-11 13:20 +0200
    Re: [PATCH] x86/efi: Add EFI_PGT_DUMP support for x86_32, kexec and  efi=old_map Sai Praneeth Prakhya <sai.praneeth.prakhya@intel.com> - 2017-05-11 20:50 +0200

csiph-web