qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/2] linux-user: Fix length handling in cmsg con


From: Riku Voipio
Subject: Re: [Qemu-devel] [PATCH 0/2] linux-user: Fix length handling in cmsg conversions
Date: Sat, 06 Jun 2015 13:07:15 +0300

On Jun 5, 2015 6:03 PM, Peter Maydell <address@hidden> wrote:
>
> Ping?

I'll collect and review linux-user patches from the list on monday.

Riku

>
> thanks 
> -- PMM 
>
> On 26 May 2015 at 19:46, Peter Maydell <address@hidden> wrote: 
> > This patchset fixes some problems in conversions of cmsg structures 
> > in target_to_host_cmsg() (used in send/recvmsg handling). Specifically: 
> > 
> >      * we required the msg->msg_controllen to declare the buffer 
> >        to have enough space for final trailing padding (we were 
> >        checking against CMSG_SPACE), whereas the kernel does not 
> >        require this, and common userspace code assumes this. 
> >      * we weren't correctly handling the fact that the SO_TIMESTAMP 
> >        payload may be larger for the target than the host 
> >      * we weren't marking the messages with MSG_CTRUNC when we did 
> >        need to truncate a message that wasn't truncated by the host, 
> >        but were instead logging a QEMU message; since truncation is 
> >        always the result of a guest giving us an insufficiently 
> >        sized buffer, we should report it to the guest as the kernel 
> >        does and don't log anything 
> >      * we weren't handling the possibility of the host having a 
> >        more restrictive alignment requirement for payload structs 
> > 
> > The major visible issue I wanted to fix is that glibc's "try to talk 
> > to nscd" code that it will run on startup will receive a cmsg with a 
> > 4 byte payload and only allocates 4 bytes for it, which was causing 
> > us to do the wrong thing on architectures that need 8-alignment 
> > (we dropped the cmsg and printed a diagnostic message). 
> > 
> > 
> > Peter Maydell (2): 
> >   linux-user: Fix length handling in host_to_target_cmsg 
> >   linux-user: use __get_user and __put_user in cmsg conversions 
> > 
> >  linux-user/syscall.c | 89 
> >++++++++++++++++++++++++++++++++++++++++++---------- 
> >  1 file changed, 72 insertions(+), 17 deletions(-) 
> > 
> > -- 
> > 1.9.1 

reply via email to

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