From: Joe Perches Subject: Re: [PATCH 1/4] x86, ptdump: Add the functionality to dump an arbitrary pagetable Date: Sat, 11 Jan 2014 12:59:42 -0800 Message-ID: <1389473982.2537.84.camel@joe-AO722> References: <1389473370-1940-1-git-send-email-bp@alien8.de> <1389473370-1940-2-git-send-email-bp@alien8.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1389473370-1940-2-git-send-email-bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org> Sender: linux-efi-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Borislav Petkov Cc: Linux EFI , LKML , Borislav Petkov , Arjan van de Ven , Matt Fleming , Matthew Garrett , "H. Peter Anvin" , Dave Young , Toshi Kani List-Id: linux-efi@vger.kernel.org On Sat, 2014-01-11 at 21:49 +0100, Borislav Petkov wrote: > From: Borislav Petkov > > With reusing the ->trampoline_pgd page table for mapping EFI regions in > order to use them after having switched to EFI virtual mode, it is very > useful to be able to dump aforementioned page table in dmesg. This adds > that functionality through the walk_pgd_level() interface which can be > called from somewhere else. [] > diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c [] > @@ -306,6 +326,11 @@ static void walk_pgd_level(struct seq_file *m) > int i; > struct pg_state st; > > + if (pgd) { > + start = pgd; > + dump_to_dmesg = true; > + } else dump_to_dmesg = false; ?