[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE
From: |
Joakim Tjernlund |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE) |
Date: |
Sat, 12 Jul 2014 11:48:13 +0200 |
Peter Maydell <address@hidden> wrote on 2014/07/12 11:01:55:
>
> On 12 July 2014 09:31, Joakim Tjernlund <address@hidden>
wrote:
> > Peter Maydell <address@hidden> wrote on 2014/07/11 19:02:30:
> >> I thought about that, but there's a corner case:
> >> the kernel does the clamping of the optlen before the
> >> copy_from_user(), which means if you have:
> >> [interface name] [unreadable memory]
> >> and optlen is long enough that optval_addr + optlen
> >> reaches into the unreadable memory, then QEMU will return
> >> EFAULT (whereas the native kernel implementation will
> >> succeed) unless we do the clamping of the optlen ourselves.
> >
> > I can live with that IMHO very minor flaw that I dont think is
> > going to matter in practice for simplicity and speed of QEMU.
> > It is your call though, do we go for exact emulation or can we
> > cut some corners?
>
> In this case I would prefer to get it right:
> * it's purely localised to this function
> * it's not all that hard to get right
> * we've already done the hard work of looking at the
> kernel and determining the correct behaviour
>
> SO_BINDTODEVICE is not going to be on any guest's
> speed-critical fastpath anyway...
OK, 2 new patches sent
I hope these will all make it to the impending release?
- Re: [Qemu-devel] [Qemu-ppc] [PATCH 4/4] ppc: remove excessive logging, (continued)
[Qemu-devel] [PATCH 3/4] alloca one extra byte sockets, Joakim Tjernlund, 2014/07/11
[Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/11
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Peter Maydell, 2014/07/11
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/11
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Peter Maydell, 2014/07/11
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/12
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Peter Maydell, 2014/07/12
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE),
Joakim Tjernlund <=
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Peter Maydell, 2014/07/12
- Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/12
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/12
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Peter Maydell, 2014/07/12
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/12
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Peter Maydell, 2014/07/12
Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE), Joakim Tjernlund, 2014/07/12