Kexec Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Hongyan Xia <hx242@xen.org>
To: kexec@lists.infradead.org
Cc: horms@verge.net.au, raphning@amazon.com, jgrall@amazon.com,
	hx242@xen.org
Subject: [PATCH 0/2] Fix early boot OOM issues for some platforms
Date: Tue,  6 Apr 2021 15:11:51 +0100	[thread overview]
Message-ID: <cover.1617716819.git.hongyxia@amazon.com> (raw)

From: Hongyan Xia <hongyxia@amazon.com>

We have observed a couple of cases where after a successful kexec, the
crash kernel loaded in the 2nd kernel will run out of memory and
crash. We narrowed down to two issues:

1. when preparing the memory map, kexec excludes the Interrupt Vector
   Table. However, the end address of IVT is incorrect.
2. The wrong end address of IVT is not 1KiB aligned. When preparing the
   crashkernel, the memory map will reject unaligned memory chunks. On
   many x86 platforms this means the entire bottom 1MiB range is
   excluded from the crashkernel memory map, resulting in OOM when the
   crashkernel boots.

Patch 1 fixes 1 which is actually enough to eliminate the issue but we
feel that such issue may happen again (e.g., with a weird BIOS that has
unaligned e820 map), so we also have patch 2 to improve the handling of
unaligned memory.

Hongyan Xia (2):
  Fix where the real mode interrupt vector ends
  Shrink segments to fit alignment instead of throwing them away

 kexec/arch/i386/crashdump-x86.c    | 15 ++++++++++++---
 kexec/arch/i386/kexec-x86-common.c | 10 ++++++++--
 2 files changed, 20 insertions(+), 5 deletions(-)

-- 
2.23.3


_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

             reply	other threads:[~2021-04-06 14:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-06 14:11 Hongyan Xia [this message]
2021-04-06 14:11 ` [PATCH 1/2] Fix where the real mode interrupt vector ends Hongyan Xia
2021-04-06 14:11 ` [PATCH 2/2] Shrink segments to fit alignment instead of throwing them away Hongyan Xia
2021-04-07 19:28 ` [PATCH 0/2] Fix early boot OOM issues for some platforms Simon Horman

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=cover.1617716819.git.hongyxia@amazon.com \
    --to=hx242@xen.org \
    --cc=horms@verge.net.au \
    --cc=jgrall@amazon.com \
    --cc=kexec@lists.infradead.org \
    --cc=raphning@amazon.com \
    /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