All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] x86: SME: Kexec/kdump memory loading fix
@ 2019-06-19 18:40 Lendacky, Thomas
  2019-06-19 18:40 ` [PATCH v3 1/2] x86/mm: Identify the end of the kernel area to be reserved Lendacky, Thomas
  2019-06-19 18:40 ` [PATCH v3 2/2] x86/mm: Create a workarea in the kernel for SME early encryption Lendacky, Thomas
  0 siblings, 2 replies; 32+ messages in thread
From: Lendacky, Thomas @ 2019-06-19 18:40 UTC (permalink / raw)
  To: linux-kernel, x86
  Cc: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen,
	Andy Lutomirski, Peter Zijlstra, Lianbo Jiang, Baoquan He

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 workarea section for use by 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 section that lives outside of the kernel proper, so that it
  will be reclaimed as available memory during boot, thus allowing it to
  be used as a workarea by SME for kernel in-place encryption during early
  boot..

This patch series is based on tip/master.

---

Changes from v2:
- Grammar fixes
- A more generic naming of the scratch/workarea section to indicate it
  is not restricted to SME usage

Changes from v1:
- Clarify how and where the kernel sections/memory is reserved.
- Add an explicit symbol, __end_of_kernel_reserve, for reserving the
  kernel memory rather than using __bss_stop.


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

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

-- 
2.17.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2019-08-20 12:47 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-19 18:40 [PATCH v3 0/2] x86: SME: Kexec/kdump memory loading fix Lendacky, Thomas
2019-06-19 18:40 ` [PATCH v3 1/2] x86/mm: Identify the end of the kernel area to be reserved Lendacky, Thomas
2019-06-20  9:58   ` [tip:x86/kdump] " tip-bot for Thomas Lendacky
2019-07-13 14:59   ` [PATCH v3 1/2] " Mike Lothian
2019-07-14 10:16     ` Thomas Gleixner
2019-07-14 10:27       ` Mike Lothian
2019-07-15  8:12         ` Thomas Gleixner
     [not found]           ` <CAHbf0-F9yUDJ=DKug+MZqsjW+zPgwWaLUC40BLOsr5+t4kYOLQ@mail.gmail.com>
2019-07-15  9:25             ` Thomas Gleixner
2019-07-15 10:35               ` Thomas Gleixner
2019-07-15 20:16                 ` H.J. Lu
2019-07-23 13:05                   ` Greg KH
2019-07-23 13:31                     ` Thomas Gleixner
2019-07-23 13:44                       ` Greg KH
2019-07-24 15:34                         ` Greg KH
2019-07-24 15:49                           ` Thomas Gleixner
2019-07-24 15:57                             ` Greg KH
2019-07-24 16:03                               ` Thomas Gleixner
2019-07-24 16:16                                 ` Greg KH
2019-07-24 20:02                                   ` Thomas Gleixner
2019-07-24 20:20                                     ` Thomas Gleixner
2019-07-25  6:24                                       ` Greg KH
2019-08-14 11:09                                         ` Mike Lothian
2019-08-19 12:53                                           ` Mike Lothian
2019-08-19 13:08                                             ` Thomas Gleixner
2019-08-19 13:21                                               ` Mike Lothian
2019-08-19 13:31                                                 ` Thomas Gleixner
2019-08-20 12:46                                                   ` Mike Lothian
2019-07-24 16:22                               ` Peter Zijlstra
2019-07-24 16:01                             ` Thomas Gleixner
2019-07-23 13:43                     ` Greg KH
2019-06-19 18:40 ` [PATCH v3 2/2] x86/mm: Create a workarea in the kernel for SME early encryption Lendacky, Thomas
2019-06-20  9:58   ` [tip:x86/kdump] " tip-bot for Thomas Lendacky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.