From: Baoquan He <bhe@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
Vivek Goyal <vgoyal@redhat.com>, Dave Young <dyoung@redhat.com>,
kexec@lists.infradead.org, Tiezhu Yang <yangtiezhu@loongson.cn>,
linux-kernel@vger.kernel.org,
Amit Daniel Kachhap <amit.kachhap@arm.com>,
linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 3/3] vmcore: Convert read_from_oldmem() to take an iov_iter
Date: Mon, 13 Dec 2021 17:29:15 +0800 [thread overview]
Message-ID: <20211213092915.GC29905@MiWiFi-R3L-srv> (raw)
In-Reply-To: <20211213080257.GC20986@lst.de>
On 12/13/21 at 09:02am, Christoph Hellwig wrote:
> >
> > 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));
> > }
>
> elfcorehdr_read should probably also take an iov_iter while we're at it.
>
> I also don't quite understand why we even need the arch overrides for it,
> but that would require some digging into the history of this interface.
>
Below patchset removing sec_active() from generic code added this arch
override on x86_64. Before that, s390 and arm64 have had arch overrides.
And arm64 says "elfcorehdr_read() is simple as the region is always mapped."
in commit e62aaeac42 "arm64: kdump: provide /proc/vmcore file".
[v3,0/6] Remove x86-specific code from generic headers
https://patchwork.kernel.org/project/linux-fsdevel/cover/20190718032858.28744-1-bauerman@linux.ibm.com/
5cbdaeefb655 s390/mm: Remove sev_active() function
ae7eb82a92fa fs/core/vmcore: Move sev_active() reference to x86 arch code
284e21fab2cf x86, s390/mm: Move sme_active() and sme_me_mask to x86-specific header
e740815a97e2 dma-mapping: Remove dma_check_mask()
47e5d8f9ed34 swiotlb: Remove call to sme_active()
0c9c1d563975 x86, s390: Move ARCH_HAS_MEM_ENCRYPT definition to arch/Kconfig
next prev parent reply other threads:[~2021-12-13 9:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 0:06 [PATCH 0/3] Convert vmcore to use an iov_iter Matthew Wilcox (Oracle)
2021-12-13 0:06 ` [PATCH 1/3] vmcore: Convert copy_oldmem_page() to take " Matthew Wilcox (Oracle)
2021-12-13 1:34 ` Matthew Wilcox
2021-12-13 2:33 ` kernel test robot
2021-12-13 7:57 ` Christoph Hellwig
2021-12-16 9:28 ` Heiko Carstens
2021-12-13 0:06 ` [PATCH 2/3] vmcore: Convert __read_vmcore to use " Matthew Wilcox (Oracle)
2021-12-13 3:24 ` kernel test robot
2021-12-13 8:00 ` Christoph Hellwig
2021-12-13 0:06 ` [PATCH 3/3] vmcore: Convert read_from_oldmem() to take " Matthew Wilcox (Oracle)
2021-12-13 4:04 ` kernel test robot
2021-12-13 8:02 ` Christoph Hellwig
2021-12-13 9:29 ` Baoquan He [this message]
2021-12-13 13:42 ` Matthew Wilcox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211213092915.GC29905@MiWiFi-R3L-srv \
--to=bhe@redhat.com \
--cc=amit.kachhap@arm.com \
--cc=dyoung@redhat.com \
--cc=hch@lst.de \
--cc=kexec@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=vgoyal@redhat.com \
--cc=willy@infradead.org \
--cc=yangtiezhu@loongson.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).