Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/12 19:38:26: > > On 12 July 2014 18:30, Joakim Tjernlund wrote: > > Peter Maydell wrote on 2014/07/12 17:47:56: > >> That would work with the current kernel implementation, but > >> the API definition (as described in the socket(7) manpage) > >> says we should pa

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Peter Maydell
On 12 July 2014 18:30, Joakim Tjernlund wrote: > Peter Maydell wrote on 2014/07/12 17:47:56: >> That would work with the current kernel implementation, but >> the API definition (as described in the socket(7) manpage) >> says we should pass a NUL-terminated string to the kernel, >> so it's more r

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/12 17:47:56: > From: Peter Maydell > To: Joakim Tjernlund , > Cc: QEMU Developers > Date: 2014/07/12 17:48 > Subject: Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE) > > On 12 July 2014 16:13, Joakim Tjernlu

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Peter Maydell
On 12 July 2014 16:13, Joakim Tjernlund wrote: > Peter Maydell wrote on 2014/07/11 19:02:30: >> > >> > hmm, should we not pass through as is to the kernel? >> > Since we don't copy anything we could just remove this >> > check and let the kernel decide policy? >> >> I thought about that, but ther

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/11 19:02:30: > > > > hmm, should we not pass through as is to the kernel? > > Since we don't copy anything we could just remove this > > check and let the kernel decide policy? > > I thought about that, but there's a corner case: > the kernel does the clamping of th

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/12 12:42:48: > > On 12 July 2014 10:48, Joakim Tjernlund wrote: > > Peter Maydell wrote on 2014/07/12 11:01:55: > > OK, 2 new patches sent > > Thanks. > > > I hope these will all make it to the impending release? > > I'm not sure at this point; they are bug fi

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Peter Maydell
On 12 July 2014 10:48, Joakim Tjernlund wrote: > Peter Maydell wrote on 2014/07/12 11:01:55: > OK, 2 new patches sent Thanks. > I hope these will all make it to the impending release? I'm not sure at this point; they are bug fixes, and reasonably small ones, but we're in freeze and only a few

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/12 11:01:55: > > On 12 July 2014 09:31, Joakim Tjernlund wrote: > > Peter Maydell 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

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Peter Maydell
On 12 July 2014 09:31, Joakim Tjernlund wrote: > Peter Maydell 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 o

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-12 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/11 19:02:30: > From: Peter Maydell > To: Joakim Tjernlund , > Cc: QEMU Developers > Date: 2014/07/11 19:02 > Subject: Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE) > Snip > > >> > >> Also, the

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-11 Thread Peter Maydell
On 11 July 2014 17:07, Joakim Tjernlund wrote: > Peter Maydell wrote on 2014/07/11 17:46:28: >> This needs braces for our coding style; you might like >> to run your patches through scripts/checkpatch.pl, which >> will warn about this kind of thing. > > Ahh, I figured you had kernel style. No, w

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-11 Thread Joakim Tjernlund
Peter Maydell wrote on 2014/07/11 17:46:28: > From: Peter Maydell > To: Joakim Tjernlund , > Cc: QEMU Developers > Date: 2014/07/11 17:46 > Subject: Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE) > > On 11 July 2014 16:18, Joakim Tjernlund

Re: [Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-11 Thread Peter Maydell
On 11 July 2014 16:18, Joakim Tjernlund wrote: > Signed-off-by: Joakim Tjernlund > --- > linux-user/syscall.c | 12 > 1 file changed, 12 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index 5a272d3..1380f4e 100644 > --- a/linux-user/syscall.c > +++ b/li

[Qemu-devel] [PATCH 1/4] qemu-user: Impl. setsockopt(SO_BINDTODEVICE)

2014-07-11 Thread Joakim Tjernlund
Signed-off-by: Joakim Tjernlund --- linux-user/syscall.c | 12 1 file changed, 12 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 5a272d3..1380f4e 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1497,6 +1497,18 @@ set_timeout: