History log of /openbsd/sys/kern/uipc_syscalls.c (Results 51 – 75 of 219)
Revision Date Author Comments
# bae06bfd 27-Apr-2018 mpi <mpi@openbsd.org>

Move FREF() inside fd_getfile().

ok visa@


# 1a33e2b7 28-Mar-2018 mpi <mpi@openbsd.org>

Call FREF() right after fd_getfile() in getsock().

This ensure that all operations manipulating a 'struct file *' do so
with a properly refcounted element.

ok visa@, bluhm@


# 38f961b9 21-Feb-2018 mpi <mpi@openbsd.org>

Call socreate() before falloc() in sys_socket().

This is similar to what we do in sys_socketpair() and will allow us
to grab the KERNEL_LOCK() only after having created a socket.

This time with cor

Call socreate() before falloc() in sys_socket().

This is similar to what we do in sys_socketpair() and will allow us
to grab the KERNEL_LOCK() only after having created a socket.

This time with correct non-blocking check.

Tested by landry@, previous diff ok tedu@

show more ...


# 2dd1cce3 19-Feb-2018 mpi <mpi@openbsd.org>

Grab solock() inside soconnect2() instead of asserting for it to be held.

ok millert@


# 3e676399 19-Feb-2018 mpi <mpi@openbsd.org>

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from mill

Remove almost unused `flags' argument of suser().

The account flag `ASU' will no longer be set but that makes suser()
mpsafe since it no longer mess with a per-process field.

No objection from millert@, ok tedu@, bluhm@

show more ...


# a4d1fa3f 11-Feb-2018 matthieu <matthieu@openbsd.org>

Revert rev 1.163. Causes network issues in Firefox.

ok mpi@ who will investigate.


# a0801e34 09-Feb-2018 mpi <mpi@openbsd.org>

Call socreate() before falloc() in sys_socket().

This is similar to what we do in sys_socketpair() and will allow us
to grab the KERNEL_LOCK() only after having created a socket.

ok tedu@


# 69dc22ff 09-Jan-2018 mpi <mpi@openbsd.org>

Change `so_state' and `so_error' to unsigned int such that they can
be atomically read from any context.

ok bluhm@, visa@


# 4b1f64dc 02-Jan-2018 guenther <guenther@openbsd.org>

Stop assuming <sys/file.h> will pull in fcntl.h when _KERNEL is defined.

ok millert@ sthen@


# e09b1b7c 01-Sep-2017 mpi <mpi@openbsd.org>

Change sosetopt() to no longer free the mbuf it receives and change
all the callers to call m_freem(9).

Support from deraadt@ and tedu@, ok visa@, bluhm@


# 0bad721a 22-Aug-2017 mpi <mpi@openbsd.org>

Make sogetopt(9) caller responsible for allocating an MT_SOOPTS mbuf.

Move a blocking memory allocation out of the socket lock and create
a simpler alloc/free pattern to review. Now both m_get() an

Make sogetopt(9) caller responsible for allocating an MT_SOOPTS mbuf.

Move a blocking memory allocation out of the socket lock and create
a simpler alloc/free pattern to review. Now both m_get() and m_free()
are in the same place.

Discussed with bluhm@.

Encouragements from deraadt@ and tedu@, ok kettenis@, florian@, visa@

show more ...


# 2b549d88 10-Aug-2017 mpi <mpi@openbsd.org>

Move the solock()/sounlock() dance outside of sobind().

ok phessler@, visa@, bluhm@


# 411c4400 09-Aug-2017 mpi <mpi@openbsd.org>

Move the socket lock "above" sosetopt(), sogetopt() and sosplice().

Protect the fields modifieds by sosetopt() and simplify the dance
with the stars.

ok bluhm@


# 4416ac7e 24-Jul-2017 mpi <mpi@openbsd.org>

Extend the scope of the socket lock to protect `so_state' in connect(2).

As a side effect, soconnect() and soconnect2() now expect a locked socket,
so update all the callers.

ok bluhm@


# c0c4a685 20-Jul-2017 bluhm <bluhm@openbsd.org>

When receiving a struct sockaddr from userland, enforce that memory
for sa_len and sa_family is provided. This will make handling of
socket name mbufs within the kernel safer.
issue reported by Ilja

When receiving a struct sockaddr from userland, enforce that memory
for sa_len and sa_family is provided. This will make handling of
socket name mbufs within the kernel safer.
issue reported by Ilja Van Sprundel; OK claudio@

show more ...


# 25fbc5b2 19-Jul-2017 claudio <claudio@openbsd.org>

Move KTRPOINT call up. The lenght variable i is getting aligned and so
uninitialised data can be dumped into the ktrace message.
Found by Ilja Van Sprundel
OK bluhm@


# 43f6ed69 12-Jul-2017 mpi <mpi@openbsd.org>

Do not call fo_ioctl() in syscall that do, or will, take the socket
lock.

Prevents a future lock recursion since soo_ioctl() will need to grab
the lock.

ok bluhm@, visa@


# 879c5107 03-Jul-2017 bluhm <bluhm@openbsd.org>

Do not grab the socket lock in doaccept() twice. Pass NOTE_SUBMIT
to KNOTE() as we are already holding the lock. Fixes "panic:
rw_enter: netlock locking against myself" reported by Gregor Best
and

Do not grab the socket lock in doaccept() twice. Pass NOTE_SUBMIT
to KNOTE() as we are already holding the lock. Fixes "panic:
rw_enter: netlock locking against myself" reported by Gregor Best
and reproduced with src/regress/lib/libtls/gotls.
OK millert@

show more ...


# 97879693 27-Mar-2017 bluhm <bluhm@openbsd.org>

Reorder FREF() and FRELE() in a way that the the global variable
syslogf always points to a file object with increased reference
count. This makes the implementation independent from the fact
whethe

Reorder FREF() and FRELE() in a way that the the global variable
syslogf always points to a file object with increased reference
count. This makes the implementation independent from the fact
whether changing the reference counter may sleep.
pointed out by Mateusz Guzik; OK deraadt@

show more ...


# 1f21cada 14-Feb-2017 mpi <mpi@openbsd.org>

Wrap the NET_LOCK() into a per-socket solock() that does nothing for
unix domain sockets.

This should prevent the multiple deadlock related to unix domain sockets.

Inputs from millert@ and bluhm@,

Wrap the NET_LOCK() into a per-socket solock() that does nothing for
unix domain sockets.

This should prevent the multiple deadlock related to unix domain sockets.

Inputs from millert@ and bluhm@, ok bluhm@

show more ...


# 65014aeb 11-Feb-2017 guenther <guenther@openbsd.org>

Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd. Make falloc()'s
return arguments non-optional: assert that they're not NULL.

ok mpi@ m

Add a flags argument to falloc() that lets it optionally set the
close-on-exec flag on the newly allocated fd. Make falloc()'s
return arguments non-optional: assert that they're not NULL.

ok mpi@ millert@

show more ...


# 91977051 26-Jan-2017 dhill <dhill@openbsd.org>

Allocate the mbuf before the netlock. While here, move the setting of
nflag closer to where its value is used.

ok mpi@


# c5ec378b 25-Jan-2017 deraadt <deraadt@openbsd.org>

Allocate and connect sockets first, then upon success create file
descriptors so that the NET_LOCK is satisfied.
ok mpi


# dfbeea31 25-Jan-2017 mpi <mpi@openbsd.org>

Enable the NET_LOCK(), take 2.

Recursions are currently known and marked a XXXSMP.

Please report any assert to bugs@


# d5f1cd9d 24-Jan-2017 mpi <mpi@openbsd.org>

In accept(2) and accept4(2) allocate a new file descriptor before
checking if the socket head's queue is empty and possibly sleeping.

This way we avoid lock ordering problems as the NET_LOCK() and
f

In accept(2) and accept4(2) allocate a new file descriptor before
checking if the socket head's queue is empty and possibly sleeping.

This way we avoid lock ordering problems as the NET_LOCK() and
fdplock() won't be held at the same time.

Note that socketpair(2) and close(2) are the two remaining syscalls
holding these locks at the same time. They both respect the same
order: fdplock() then NET_LOCK().

Initial deadlock reported by kettenis@ and ajacoutot@.

ok bluhm@, guenther@, deraadt@

show more ...


123456789