From: sashiko-bot@kernel.org
To: "Yuanhe Shu" <xiangzao@linux.alibaba.com>,
jarkko@kernel.org, dave.hansen@linux.intel.com, tglx@kernel.org,
mingo@redhat.com, bp@alien8.de, hpa@zytor.com
Cc: x86@kernel.org, kexec@lists.infradead.org, challvy.tee@gmail.com
Subject: Re: [PATCH] x86/sgx: Skip EPC initialization in the kdump kernel
Date: Wed, 11 Nov 2026 12:54:04 +0000 [thread overview]
Message-ID: <sashiko-outbox-209022@kernel.org> (raw)
In-Reply-To: <20261111123942.3842771-1-xiangzao@linux.alibaba.com>
> The kdump capture kernel cannot use SGX: EPC memory is e820-reserved,
> so it is not part of the crash dump, and no enclave will ever run
> during dump capture. Yet sgx_init() runs unconditionally and pays the
> full EPC bookkeeping: sgx_setup_epc_section() allocates one struct
> sgx_epc_page (32 bytes) per 4K EPC page, i.e. EPC/128, plus a memremap
> of the whole EPC range.
>
> The capture kernel has no memory other than the crashkernel
> reservation. On a VM with 15.5G EPC the bookkeeping alone costs
> 124 MB of vmalloc - nearly half of the stock crashkernel=256M -
> and the cost scales with EPC size, not RAM.
>
> That is enough to break kdump outright: with the default 256M the
> capture kernel OOMs in early userspace (udevadm and journald are killed
> before the root device is enumerated) and no vmcore is produced, while
> 512M works. With this change the same 256M reservation captures a
> complete vmcore; SGX initializes as usual on normal boots.
>
> Reported-by: Challvy Tee <challvy.tee@gmail.com>
> Signed-off-by: Yuanhe Shu <xiangzao@linux.alibaba.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111123942.3842771-1-xiangzao@linux.alibaba.com?part=1
next prev parent reply other threads:[~2026-11-11 12:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 12:39 [PATCH] x86/sgx: Skip EPC initialization in the kdump kernel Yuanhe Shu
2026-11-11 12:54 ` sashiko-bot [this message]
2026-11-11 15:06 ` Dave Hansen
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=sashiko-outbox-209022@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=bp@alien8.de \
--cc=challvy.tee@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=jarkko@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=tglx@kernel.org \
--cc=x86@kernel.org \
--cc=xiangzao@linux.alibaba.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