diff options
author | Matthew Wilcox (Oracle) <willy@infradead.org> | 2022-04-29 14:37:59 -0700 |
---|---|---|
committer | akpm <akpm@linux-foundation.org> | 2022-04-29 14:37:59 -0700 |
commit | e0690479917cbce740eef51fa3de92c69647a5ad (patch) | |
tree | 7d1dc69c670a059449a7027adec3b38171e5f617 /arch | |
parent | 4a22fd20379ca897a6bfdb8372b4f9601e430332 (diff) | |
download | linux-e0690479917cbce740eef51fa3de92c69647a5ad.tar.bz2 |
vmcore: convert read_from_oldmem() to take an iov_iter
Remove the read_from_oldmem() wrapper introduced earlier and convert all
the remaining callers to pass an iov_iter.
Link: https://lkml.kernel.org/r/20220408090636.560886-4-bhe@redhat.com
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Amit Daniel Kachhap <amit.kachhap@arm.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Matthew Wilcox <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/crash_dump_64.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/crash_dump_64.c b/arch/x86/kernel/crash_dump_64.c index 94fe4aff9694..e75bc2f217ff 100644 --- a/arch/x86/kernel/crash_dump_64.c +++ b/arch/x86/kernel/crash_dump_64.c @@ -54,6 +54,11 @@ ssize_t copy_oldmem_page_encrypted(struct iov_iter *iter, unsigned long pfn, ssize_t elfcorehdr_read(char *buf, size_t count, u64 *ppos) { - return read_from_oldmem(buf, count, ppos, 0, + struct kvec kvec = { .iov_base = buf, .iov_len = count }; + struct iov_iter iter; + + iov_iter_kvec(&iter, READ, &kvec, 1, count); + + return read_from_oldmem(&iter, count, ppos, cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT)); } |