The exported interface read_from_oldmem() passes user pointer
without __user annotation and does unnecessary user/kernel pointer
conversions during the pointer propagation.
Hence it is modified to have a new parameter for user pointer.
Also a helper macro read_from_oldmem_to_kernel is added for c
On Fri, Dec 03, 2021 at 04:12:18PM +0530, Amit Daniel Kachhap wrote:
> + return read_from_oldmem_to_kernel(buf, count, ppos,
> +
> cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT));
Overly long line.
> +ssize_t read_from_oldmem(char __user *ubuf, char *kbuf, s
On Mon, Dec 06, 2021 at 03:04:51PM +0100, Christoph Hellwig wrote:
> This looks like a huge mess. What speak against using an iov_iter
> here?
I coincidentally made a start on this last night. Happy to stop.
What do you think to adding a generic copy_pfn_to_iter()? Not sure
which APIs to use to
On Mon, Dec 06, 2021 at 02:17:24PM +, Matthew Wilcox wrote:
> On Mon, Dec 06, 2021 at 03:04:51PM +0100, Christoph Hellwig wrote:
> > This looks like a huge mess. What speak against using an iov_iter
> > here?
>
> I coincidentally made a start on this last night. Happy to stop.
Don't stop!
On Mon, Dec 06, 2021 at 03:54:22PM +0100, Christoph Hellwig wrote:
> On Mon, Dec 06, 2021 at 02:17:24PM +, Matthew Wilcox wrote:
> > On Mon, Dec 06, 2021 at 03:04:51PM +0100, Christoph Hellwig wrote:
> > > This looks like a huge mess. What speak against using an iov_iter
> > > here?
> >
> > I
On 12/6/21 7:34 PM, Christoph Hellwig wrote:
On Fri, Dec 03, 2021 at 04:12:18PM +0530, Amit Daniel Kachhap wrote:
+ return read_from_oldmem_to_kernel(buf, count, ppos,
+
cc_platform_has(CC_ATTR_GUEST_MEM_ENCRYPT));
Overly long line.
+ssize_t
On Mon, Dec 06, 2021 at 03:07:15PM +, Matthew Wilcox wrote:
> > > What do you think to adding a generic copy_pfn_to_iter()? Not sure
> > > which APIs to use to implement it ... some architectures have weird
> > > requirements about which APIs can be used for what kinds of PFNs.
> >
> > Hmm.