Skip to content

Commit

Permalink
proc/vmcore: Fix i386 build error of missing copy_oldmem_page_encrypt…
Browse files Browse the repository at this point in the history
…ed()

[ Upstream commit cf089611f4c446285046fcd426d90c18f37d2905 ]

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
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Borislav Petkov authored and hsyncvlk23 committed Mar 21, 2024
1 parent 14ed13d commit 1493464
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions fs/proc/vmcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,16 @@ int __weak remap_oldmem_pfn_range(struct vm_area_struct *vma,
return remap_pfn_range(vma, from, pfn, size, prot);
}

/*
* 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
*/
Expand Down

0 comments on commit 1493464

Please sign in to comment.