Re: Fixed sys_socket() plumbing

2018-02-19 Thread Martin Pieuchot
On 12/02/18(Mon) 09:22, Martin Pieuchot wrote: > I found my mistake in the previous diff. `SS_NBIO' was never set on > non blocking sockets. Diff below fixes that by checking `nonblock' > like it is done in sys_socketpair(). > > Tests & oks welcome :) Anyone? > Index: kern/uipc_syscalls.c >

Re: Fixed sys_socket() plumbing

2018-02-12 Thread Landry Breuil
On Mon, Feb 12, 2018 at 09:22:54AM +0100, Martin Pieuchot wrote: > I found my mistake in the previous diff. `SS_NBIO' was never set on > non blocking sockets. Diff below fixes that by checking `nonblock' > like it is done in sys_socketpair(). > > Tests & oks welcome :) Running with it now on

Fixed sys_socket() plumbing

2018-02-12 Thread Martin Pieuchot
I found my mistake in the previous diff. `SS_NBIO' was never set on non blocking sockets. Diff below fixes that by checking `nonblock' like it is done in sys_socketpair(). Tests & oks welcome :) Index: kern/uipc_syscalls.c === RCS

Re: sys_socket() plumbing

2018-02-08 Thread Martin Pieuchot
On 07/02/18(Wed) 16:11, Ted Unangst wrote: > Martin Pieuchot wrote: > > Diff below shuffles sys_socket() to look like sys_socketpair(). > > > > The goal is to do socket operations first in both functions. Since > > they don't need the KERNEL_LOCK(), we will be able to mark the syscalls > >

Re: sys_socket() plumbing

2018-02-07 Thread Ted Unangst
Martin Pieuchot wrote: > Diff below shuffles sys_socket() to look like sys_socketpair(). > > The goal is to do socket operations first in both functions. Since > they don't need the KERNEL_LOCK(), we will be able to mark the syscalls > NOLOCK and only grab it before messing with file

sys_socket() plumbing

2018-02-07 Thread Martin Pieuchot
Diff below shuffles sys_socket() to look like sys_socketpair(). The goal is to do socket operations first in both functions. Since they don't need the KERNEL_LOCK(), we will be able to mark the syscalls NOLOCK and only grab it before messing with file descriptors. ok? Index: