[PATCH 3/4] Makedumpfile: Add a new function check_5level_paging()
Baoquan He
bhe at redhat.com
Mon May 7 04:03:43 EDT 2018
On 05/07/18 at 07:21am, Masaki Tachibana wrote:
> Hi Baoquan,
>
> Sorry for the late reply.
>
> > +check_5level_paging(void)
> > +{
> > + if (NUMBER(pgtable_l5_enabled) != 0)
> Is this if (NUMBER(pgtable_l5_enabled) != NOT_FOUND_NUMBER && NUMBER(pgtable_l5_enabled) != 0) ?
> If so, I will correct this.
Yes, you are right. For kernel which includes 5-level code, it export
pgtable_l5_enabled as 0 or 1, however for kernel w/o 5-level code,
should be NOT_FOUND_NUMBER. Please help correct it.
Thanks
Baoquan
>
> > -----Original Message-----
> > From: kexec [mailto:kexec-bounces at lists.infradead.org] On Behalf Of Baoquan He
> > Sent: Friday, March 02, 2018 2:49 PM
> > To: kexec at lists.infradead.org
> > Cc: douly.fnst at cn.fujitsu.com; indou.takao at jp.fujitsu.com; Hayashi Masahiko() <mas-hayashi at tg.jp.nec.com>;
> > Baoquan He <bhe at redhat.com>; Tachibana Masaki() <mas-tachibana at vf.jp.nec.com>
> > Subject: [PATCH 3/4] Makedumpfile: Add a new function check_5level_paging()
> >
> > Use it to check if the corrupted kernel is in 5-level paging.
> >
> > Signed-off-by: Baoquan He <bhe at redhat.com>
> > ---
> > arch/x86_64.c | 9 +++++++++
> > 1 file changed, 9 insertions(+)
> >
> > diff --git a/arch/x86_64.c b/arch/x86_64.c
> > index cbe45c2..e88ee0b 100644
> > --- a/arch/x86_64.c
> > +++ b/arch/x86_64.c
> > @@ -33,6 +33,15 @@ get_xen_p2m_mfn(void)
> > return NOT_FOUND_LONG_VALUE;
> > }
> >
> > +static int
> > +check_5level_paging(void)
> > +{
> > + if (NUMBER(pgtable_l5_enabled) != 0)
> > + return TRUE;
> > + else
> > + return FALSE;
> > +}
> > +
> > unsigned long
> > get_kaslr_offset_x86_64(unsigned long vaddr)
> > {
> > --
> > 2.13.6
> >
> >
> > _______________________________________________
> > kexec mailing list
> > kexec at lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/kexec
>
>
>
> _______________________________________________
> kexec mailing list
> kexec at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
More information about the kexec
mailing list