qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 2/6] virtio/console: Add a failback for unst


From: Borislav Petkov
Subject: Re: [Qemu-devel] [RFC PATCH 2/6] virtio/console: Add a failback for unstealable pipe buffer
Date: Thu, 9 Aug 2012 11:24:46 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Aug 09, 2012 at 02:33:12PM +0530, Amit Shah wrote:
> > @@ -807,9 +807,31 @@ static int pipe_to_sg(struct pipe_inode_info *pipe, 
> > struct pipe_buffer *buf,
> >  
> >             len = min(buf->len, sd->len);
> >             sg_set_page(&(sgl->sg[sgl->n]), buf->page, len, buf->offset);
> > -           sgl->n++;
> > -           sgl->len += len;
> > +   } else {
> > +           /* Failback to copying a page */
> > +           struct page *page = alloc_page(GFP_KERNEL);
> 
> I prefer zeroing out the page.  If there's not enough data to be
> filled in the page, the remaining data can be leaked to the host.

get_zeroed_page()?

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551



reply via email to

[Prev in Thread] Current Thread [Next in Thread]