aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/crash_dump.h
diff options
context:
space:
mode:
authorLianbo Jiang <lijiang@redhat.com>2018-09-30 16:37:41 +0800
committerBorislav Petkov <bp@suse.de>2018-10-06 12:09:26 +0200
commit992b649a3f013465d8128da02e5449def662a4c3 (patch)
tree2c06ce22ae25ee51011631c7570cc67c7f76be1b /include/linux/crash_dump.h
parentiommu/amd: Remap the IOMMU device table with the memory encryption mask for kdump (diff)
downloadlinux-dev-992b649a3f013465d8128da02e5449def662a4c3.tar.xz
linux-dev-992b649a3f013465d8128da02e5449def662a4c3.zip
kdump, proc/vmcore: Enable kdumping encrypted memory with SME enabled
In the kdump kernel, the memory of the first kernel needs to be dumped into the vmcore file. If SME is enabled in the first kernel, the old memory has to be remapped with the memory encryption mask in order to access it properly. Split copy_oldmem_page() functionality to handle encrypted memory properly. [ bp: Heavily massage everything. ] Signed-off-by: Lianbo Jiang <lijiang@redhat.com> Signed-off-by: Borislav Petkov <bp@suse.de> Cc: kexec@lists.infradead.org Cc: tglx@linutronix.de Cc: mingo@redhat.com Cc: hpa@zytor.com Cc: akpm@linux-foundation.org Cc: dan.j.williams@intel.com Cc: bhelgaas@google.com Cc: baiyaowei@cmss.chinamobile.com Cc: tiwai@suse.de Cc: brijesh.singh@amd.com Cc: dyoung@redhat.com Cc: bhe@redhat.com Cc: jroedel@suse.de Link: https://lkml.kernel.org/r/be7b47f9-6be6-e0d1-2c2a-9125bc74b818@redhat.com
Diffstat (limited to 'include/linux/crash_dump.h')
-rw-r--r--include/linux/crash_dump.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/crash_dump.h b/include/linux/crash_dump.h
index 3e4ba9d753c8..f774c5eb9e3c 100644
--- a/include/linux/crash_dump.h
+++ b/include/linux/crash_dump.h
@@ -26,6 +26,10 @@ extern int remap_oldmem_pfn_range(struct vm_area_struct *vma,
extern ssize_t copy_oldmem_page(unsigned long, char *, size_t,
unsigned long, int);
+extern ssize_t copy_oldmem_page_encrypted(unsigned long pfn, char *buf,
+ size_t csize, unsigned long offset,
+ int userbuf);
+
void vmcore_cleanup(void);
/* Architecture code defines this if there are other possible ELF