mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Lendacky, Thomas" <Thomas.Lendacky@amd.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"x86@kernel.org" <x86@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>
Subject: [PATCH 0/2] x86: SME: Kexec/kdump memory loading fix
Date: Fri, 14 Jun 2019 21:15:17 +0000	[thread overview]
Message-ID: <cover.1560546537.git.thomas.lendacky@amd.com> (raw)

This series addresses an issue related to kexec/kdump when SME is active.
The SME support uses a workarea located after the end of the kernel to
perform "in-place" encryption of the kernel. When kexec/kdump is used, it
is possible that some other data used by kexec/kdump could be in this area
of memory which would cause the kexec/kdump of the kernel to fail.

Create a section for SME in vmlinux.lds.S that is positioned after "_end",
so that the memory it occupies will be reclaimed after its use during
boot. Since it is part of the kernel image, there is no worry now that
kexec/kdump will place data in the SME workarea when installing the kexec/
kdump kernel. As part of this fix, clarify what occupied kernel memory is
reserved and what parts of the kernel memory are discarded.

The following patches are included:
- Identify and document what parts of the kernel image are reserved (saved)
  and what is discarded.
- Create a new SME workarea section that will be reclaimed after its use
  during boot, thus allow

This patch series is based on tip/master.

---

Tom Lendacky (2):
  x86/mm: Identify the end of the kernel area to be reserved
  x86/mm: Create an SME workarea in the kernel for early encryption

 arch/x86/include/asm/sections.h    |  2 ++
 arch/x86/kernel/setup.c            |  8 +++++++-
 arch/x86/kernel/vmlinux.lds.S      | 33 +++++++++++++++++++++++++++++-
 arch/x86/mm/mem_encrypt_identity.c | 22 ++++++++++++++++++--
 4 files changed, 61 insertions(+), 4 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-06-14 21:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-14 21:15 Lendacky, Thomas [this message]
2019-06-14 21:15 ` [PATCH v2 1/2] x86/mm: Identify the end of the kernel area to be reserved Lendacky, Thomas
2019-06-14 22:06   ` Dave Hansen
2019-06-16 12:03   ` lijiang
2019-06-17  1:54   ` Baoquan He
2019-06-17 10:47   ` Borislav Petkov
2019-06-18  1:43     ` Lendacky, Thomas
2019-06-18  9:37       ` Borislav Petkov
2019-06-14 21:15 ` [PATCH v2 2/2] x86/mm: Create an SME workarea in the kernel for early encryption Lendacky, Thomas
2019-06-17 11:02   ` Borislav Petkov
2019-06-18  1:49     ` Lendacky, Thomas
2019-06-18 10:11       ` Borislav Petkov

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.1560546537.git.thomas.lendacky@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    --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

Powered by JetHome