[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <15897206-c1a6-ced6-3a1b-f71da8fc9c83@redhat.com>
Date: Mon, 29 Oct 2018 18:12:19 +0800
From: lijiang <lijiang@...hat.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Baoquan He <bhe@...hat.com>, Petr Tesarik <ptesarik@...e.cz>,
linux-kernel@...r.kernel.org, x86@...nel.org,
kexec@...ts.infradead.org, mingo@...hat.com, tglx@...utronix.de,
dyoung@...hat.com
Subject: Re: [PATCH] kdump, vmcoreinfo: Export sme_me_mask value to vmcoreinfo
在 2018年10月29日 17:57, Borislav Petkov 写道:
> On Mon, Oct 29, 2018 at 05:29:16PM +0800, lijiang wrote:
>> Ok, i will change it to a local variable and export it.
>
> Why do you have to export it at all?!
>
I mean that i will write the value of local variable to the vmcoreinfo. For example:
diff --git a/arch/x86/kernel/machine_kexec_64.c b/arch/x86/kernel/machine_kexec_64.c
index 4c8acdfdc5a7..3cc975e7ff8f 100644
--- a/arch/x86/kernel/machine_kexec_64.c
+++ b/arch/x86/kernel/machine_kexec_64.c
@@ -352,11 +352,16 @@ void machine_kexec(struct kimage *image)
void arch_crash_save_vmcoreinfo(void)
{
+ u64 sme_mask = 0;
+
VMCOREINFO_NUMBER(phys_base);
VMCOREINFO_SYMBOL(init_top_pgt);
vmcoreinfo_append_str("NUMBER(pgtable_l5_enabled)=%d\n",
pgtable_l5_enabled());
+ sme_mask = sme_me_mask;
+ VMCOREINFO_NUMBER(sme_mask);
+
#ifdef CONFIG_NUMA
VMCOREINFO_SYMBOL(node_data);
VMCOREINFO_LENGTH(node_data, MAX_NUMNODES);
--
Because the crash kernel's page table(pgd/pud/pmd/pte) contains
the memory encryption mask(bit 47), makedumpfile needs to remove
the sme mask to obtain the true physical address.
Thanks.
Lianbo
Powered by blists - more mailing lists