From: Baoquan He <bhe@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Dave Young <dyoung@redhat.com>, Lianbo Jiang <lijiang@redhat.com>,
linux-kernel@vger.kernel.org, tglx@linutronix.de,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com, x86@kernel.org,
jgross@suse.com, dhowells@redhat.com, Thomas.Lendacky@amd.com,
kexec@lists.infradead.org, Vivek Goyal <vgoyal@redhat.com>
Subject: Re: [PATCH] x86/kdump: Fix 'kmem -s' reported an invalid freepointer when SME was active
Date: Tue, 1 Oct 2019 15:40:12 +0800 [thread overview]
Message-ID: <20191001074012.GK31919@MiWiFi-R3L-srv> (raw)
In-Reply-To: <87zhimks5j.fsf@x220.int.ebiederm.org>
On 09/30/19 at 05:14am, Eric W. Biederman wrote:
> Baoquan He <bhe@redhat.com> writes:
> >> needs a little better description. I know it is not a lot on modern
> >> systems but reserving an extra 1M of memory to avoid having to special
> >> case it later seems in need of calling out.
> >>
> >> I have an old system around that I think that 640K is about 25% of
> >> memory.
> >
> > Understood. Basically 640K is wasted in this case. But we only do like
> > this in SME case, a condition checking is added. And system with SME is
> > pretty new model, it may not impact the old system.
>
> The conditional really should be based on if we are reserving memory
> for a kdump kernel. AKA if crash_kernel=XXX is specified on the kernel
> command line.
>
> At which point I think it would be very reasonable to unconditionally
> reserve the low 640k, and make the whole thing a non-issue. This would
> allow the kdump code to just not do anything special for any of the
> weird special case.
>
> It isn't perfect because we need a page or so used in the first kernel
> for bootstrapping the secondary cpus, but that seems like the least of
> evils. Especially as no one will DMA to that memory.
>
> So please let's just change what memory we reserve when crash_kernel is
> specified.
Yes, makes sense, thanks for pointing it out.
>
> >> How we interact with BIOS tables in the first 640k needs some
> >> explanation. Both in the first kernel and in the crash kernel.
> >
> > Yes, totally agree.
> >
> > Those BIOS tables have been reserved as e820 reserved regions and will
> > be passed to kdump kernel for reusing. Memblock reserved 640K doesn't
> > mean it will cover the whole [0, 640K) region, it only searches for
> > available system RAM from memblock allocator.
>
> Careful with that assumption. My memory is that the e820 memory map
> frequently fails to cover areas like the real mode interrupt descriptor
> table at address 0.
OK, will think more about this. Thanks.
next prev parent reply other threads:[~2019-10-01 7:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-20 3:53 [PATCH] x86/kdump: Fix 'kmem -s' reported an invalid freepointer when SME was active Lianbo Jiang
2019-09-27 5:15 ` Dave Young
2019-09-27 20:49 ` Eric W. Biederman
2019-09-27 23:51 ` Baoquan He
2019-09-28 0:05 ` Baoquan He
2019-09-28 2:32 ` Eric W. Biederman
2019-09-28 3:09 ` Baoquan He
2019-09-30 10:14 ` Eric W. Biederman
2019-10-01 7:40 ` Baoquan He [this message]
2019-10-05 7:35 ` lijiang
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=20191001074012.GK31919@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=Thomas.Lendacky@amd.com \
--cc=bp@alien8.de \
--cc=dhowells@redhat.com \
--cc=dyoung@redhat.com \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=kexec@lists.infradead.org \
--cc=lijiang@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=vgoyal@redhat.com \
--cc=x86@kernel.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