summaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
authorBorislav Petkov <bp@suse.de>2018-10-08 10:05:20 +0200
committerBorislav Petkov <bp@suse.de>2018-10-09 11:57:28 +0200
commitcf089611f4c446285046fcd426d90c18f37d2905 (patch)
treec5ed14d111dfe1a8455f842c683ccc34b593a513 /fs/proc
parent32b89760ddf4477da436c272be2abc016e169031 (diff)
downloadtalos-obmc-linux-cf089611f4c446285046fcd426d90c18f37d2905.tar.gz
talos-obmc-linux-cf089611f4c446285046fcd426d90c18f37d2905.zip
proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypted()
Lianbo reported a build error with a particular 32-bit config, see Link below for details. Provide a weak copy_oldmem_page_encrypted() function which architectures can override, in the same manner other functionality in that file is supplied. Reported-by: Lianbo Jiang <lijiang@redhat.com> Signed-off-by: Borislav Petkov <bp@suse.de> CC: x86@kernel.org Link: http://lkml.kernel.org/r/710b9d95-2f70-eadf-c4a1-c3dc80ee4ebb@redhat.com
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/vmcore.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 42c32d06f7da..91ae16fbd7d5 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -188,6 +188,16 @@ int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma,
}
/*
+ * Architectures which support memory encryption override this.
+ */
+ssize_t __weak
+copy_oldmem_page_encrypted(unsigned long pfn, char *buf, size_t csize,
+ unsigned long offset, int userbuf)
+{
+ return copy_oldmem_page(pfn, buf, csize, offset, userbuf);
+}
+
+/*
* Copy to either kernel or user space
*/
static int copy_to(void *target, void *src, size_t size, int userbuf)
OpenPOWER on IntegriCloud