summaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
AgeCommit message (Collapse)Author
2020-03-18Unlock flock(2).anton
ok mpi@ visa@
2020-03-10Unlock fcntl(2).anton
ok visa@
2020-02-22Unlock ioctl(2).anton
ok kettenis@ mpi@ visa@
2020-01-30Unlock close*(2) and dup*(2).Visa Hankala
Tested by krw@, anton@ OK mpi@, anton@
2020-01-26add a new __tmpfd system call that creates a new unnamed file in /tmp.Ted Unangst
intended for shm/fd passing, but for programs that may otherwise like filesystem access. ok beck deraadt kettenis
2020-01-21Make __thrsleep(2) and __thrwakeup(2) MP-safeVisa Hankala
Threads in __thrsleep(2) are tracked using queues, one queue per each process for synchronization between threads of a process, and one system-wide queue for the special ident -1 handling. Each of these queues has an associated rwlock that serializes access. The queue lock is released when calling copyin() and copyout() in thrsleep(). This preserves the existing behaviour where a blocked copy operation does not prevent other threads from making progress. Tested by anton@, claudio@ OK anton@, claudio@, tedu@, mpi@
2020-01-13Unlock a tiny part of the kqueue subsystem: kqueue(2).Visa Hankala
Tested by and OK anton@ OK mpi@, kettenis@
2020-01-02Unlock pipe(2) and pipe2(2). The kernel lock does not provide anyanton
serialization at this point since everything is protected by the pipe_lock. Thanks to tb@ and visa@ for testing; ok mpi@ visa@
2019-12-24Unlock nanosleep(2).Visa Hankala
OK cheloha@, anton@, mpi@
2019-11-27Add dummy msyscall(2) system call which is currently a noop. This willTheo de Raadt
be used by kernel and ld.so in the near future. Adding the system call earlier will reduce the number of people who try to build through and encounter agony. ok kettenis guenther
2019-08-13Revert unlock of lseek(2) since vn_lock() could end up calling tsleep()anton
which is not allowed without holding the kernel lock. Otherwise, wakeups could be lost. Reported-by: syzbot+57588681ca9e3e9ba926@syzkaller.appspotmail.com
2019-08-12Unlock lseek(2) since the file offset is MP-safe by now. Callinganton
VOP_GETATTR() must still be serialized using the kernel lock since the underlying file system implementation is not MP-safe. no objection from deraadt@ and ok mpi@ visa@
2019-07-09backout the unlock of pipe(2) and pipe2(2)Sebastien Marie
assert "cpipe->pipe_buffer.cnt == 0" occured whereas it shouldn't. Reported-by: syzbot+b559fa9d3292c3cb0343@syzkaller.appspotmail.com
2019-07-09unlock pipe(2) and pipe2(2) syscallsSebastien Marie
initial work from mpi@ ok visa@ mpi@
2019-06-24Unlock getrlimit(2) and setrlimit(2).Visa Hankala
OK semarie@ mpi@ deraadt@ anton@
2019-06-22push the KERNEL_LOCK deeper on read(2) and write(2)Sebastien Marie
unlocks read(2) and write(2) syscalls families, and push the KERNEL_LOCK deeper in the code path. KERNEL_LOCK is managed per file type in fileops handlers (fo_read, fo_write, and fo_close). read(2) and write(2) on socket are KERNEL_LOCK-free. initial work from mpi@ and ians@ ok mpi@ kettenis@ visa@ ians@
2019-05-13Add a kernel implementation of realpath() as __realpath().Bob Beck
We want this so that we can stop allowing readlink() on traversed vnodes in unveil(). This includes all the kernel side and the system call. This is not yet used in libc for realpath, so nothing calls this yet. The libc wrapper will be committed later. Testing by many, and ports build by naddy@ ok deraadt@
2019-05-09Unlock adjfreq(2), adjtime(2), clock_settime(2), and settimeofday(2).cheloha
clock_settime(2)/settimeofday(2) still need KERNEL_LOCK for a moment when resetting the RTC, as that's done periodically from a task under KERNEL_LOCK. Not quite sure how to approach that one yet. ok visa@ mpi@, "good stuff" tedu@, "please wait until after [tree] unlock" deraadt@
2019-01-11mincore() is a relic from the past, exposing physical machine informationTheo de Raadt
about shared resources which no program should see. only a few pieces of software use it, generally poorly thought out. they are being fixed, so mincore() can be deleted. ok guenther tedu jca sthen, others
2018-07-30Unlock sendmsg(2), sendto(2), recvfrom(2) and recvmsg(2).Martin Pieuchot
ok kettenis@, sthen@, deraadt@, visa@, krw@
2018-07-30rename 2nd argument of unveil from vague "flags" to "permissions";Theo de Raadt
man page change will follow
2018-07-13Unveiling unveil(2).Bob Beck
This brings unveil into the tree, disabled by default - Currently this will return EPERM on all attempts to use it until we are fully certain it is ready for people to start using, but this now allows for others to do more tweaking and experimentation. Still needs to send the unveil's across forks and execs before fully enabling. Many thanks to robert@ and deraadt@ for extensive testing. ok deraadt@
2018-07-05Put back sendto(2) and sendmsg(2) under KERNEL_LOCK().Martin Pieuchot
malloc(9) is apparently not mpsafe as found the hardway by sthen@.
2018-06-27Revert previous, at least one pool need its IPL to be IPL_MPFLOOR asMartin Pieuchot
found by visa@.
2018-06-27Unlock 12 network-related syscalls.Martin Pieuchot
This is possible now that the code doing file refcounting is mp-safe. Tested by many, ok tb@, visa@
2018-06-20Unlock sendmsg(2) and sendto(2).Martin Pieuchot
These syscalls can now be executed w/o the KERNEL_LOCK() depending on the kind of socket. The current solution uses a single global mutex to serialize access to, and reference count, 'struct file'. ok visa@, kettenis@
2018-05-28Grab the KERNEL_LOCK() after socreate() and soconnect2() in socket(2)Martin Pieuchot
and socketpair(2). Tested by many as part of a larger diff, ok visa@ some time ago.
2017-12-12pledge()'s 2nd argument becomes char *execpromises, which becomes theTheo de Raadt
pledge for a new execve image immediately upon start. Also introduces "error" which makes violations return -1 ENOSYS instead of killing the program ("error" may not be handed to a setuid/setgid program, which may be missing/ignoring syscall return values and would continue with inconsistant state) Discussion with many florian has used this to improve the strictness of a daemon
2017-11-28Delete fktrace(2). The consequences of it were not thought throughPhilip Guenther
sufficiently and at least one horrific security hole was the result. ok deraadt@ beck@
2017-09-25sendsyslog should take a const char * everywhere.Marc Espie
okay bluhm@, deraadt@
2017-08-12add a fktrace syscall that takes a file descriptor instead of a name.Ted Unangst
libc and man page parts to come. ok guenther
2017-04-28Add futex(2) syscall based on a sane subset of its Linux equivalent.Martin Pieuchot
The syscall is marked NOLOCK and only FUTEX_WAIT grabs the KERNEL_LOCK() because of PCATCH and the signal nightmare. Serialization of threads is currently done with a global & exclusive rwlock. Note that the current implementation still use copyin(9) which is not guaranteed to be atomic. Committing now such that remaining issues can be addressed in-tree. With inputs from guenther@, kettenis@ and visa@. ok deraadt@, visa@
2017-04-13Delete the getlogin59 syscall, which was last used one year, two releases,Philip Guenther
and four libc major versions ago ok sthen@ jsing@ deraadt@ jca@
2016-09-04Remove sys_o58_kill since OpenBSD 6.0 has been tagged/released.Joel Sing
ok deraadt@
2016-06-27Restore the sys_o58_kill system call.Joel Sing
2016-05-31sys_osendsyslog can go away; we have transitioned to the new version withTheo de Raadt
a flags argument ok guenther sthen
2016-05-31sys_o58_kill is no longer needed for compat.Theo de Raadt
ok guenther sthen
2016-05-17Document NOLOCK, from Michal Mazurek.Martin Pieuchot
2016-03-30Add getlogin_r syscall that checks and returns errors like userspacePhilip Guenther
getlogin_r() API; keep existing syscall as getlogin59 for temporary compat. ok kettenis@ deraadt@
2016-03-28Make sure that a thread that calls sched_yield(2) ends up on the run queueMark Kettenis
behind all other threads in the process by temporarily lowering its priority. This isn't optimal but it is the easiest way to guarantee that we make progress when we're waiting on an other thread to release a lock. This results in significant improvements for processes that suffer from lock contention, most notably firefox. Unfortunately this means that sched_yield(2) needs to grab the kernel lock again. All the hard work was done by mpi@, based on observations of the behaviour of the BFS scheduler diff by Michal Mazurek. ok deraadt@
2016-03-21Rename the system call sendsyslog2 to sendsyslog. Keep the old oneAlexander Bluhm
as osendsyslog for a while. The three argument variant is the only one that will stay. input kettenis@; OK deraadt@
2015-11-24Add sendsyslog2... this has an additional flags variable to permitTheo de Raadt
passing LOG_CONS ok millert kettenis beck
2015-11-10Split the intra-thread functionality from kill(2) into its own syscallPhilip Guenther
thrkill(2), rolling the kill(2) syscall number with the ABI change to avoid breaking binaries during during the transition. thrkill(2) includes a 'tcb' argument that eliminates the need for locking in pthread_kill() and simplifies pthread_cancel(). Switch __stack_smash_handler() to use thrkill(2) and explicitly unblock SIGABRT. Minor bump to both libc and libpthread: make sure you install a new kernel! ok semarie@
2015-10-28The short-lived dnssocket/dnsconnect calls are being required because weTheo de Raadt
suspect everyone has upgraded through the approx week-long window since SOCK_DNS became available and the libc resolver started using them.
2015-10-18Add two new system calls: dnssocket() and dnsconnect(). This creates aTheo de Raadt
SS_DNS tagged socket which has limited functionality (for example, you cannot accept on them...) The libc resolver will switch to using these, therefore pledge can identify a DNS transaction better. ok tedu guenther kettenis beck and others
2015-10-09Rename tame() to pledge(). This fairly interface has evolved to be moreTheo de Raadt
strict than anticipated. It allows a programmer to pledge/promise/covenant that their program will operate within an easily defined subset of the Unix environment, or it pays the price.
2015-10-02Revert previous commit; something is not quite right yet in the bowels of uvmMark Kettenis
as Theo is seeing vnode-related panics on several architectures in the codepath that implements mmap(2).
2015-09-26unlock the mmap! reminded and ok kettenisTed Unangst
2015-09-13Rename __sysctl syscall to just sysctl, as the userland wrapper is no longerPhilip Guenther
necessary ok deraadt@ jsing@
2015-09-09Move to next tame() API. The flags are now passed as a very simple string,Theo de Raadt
which results in tame() code placements being much more recognizeable. tame() can be moved to unistd.h and does not need cpp symbols to turn the bits on and off. The resulting API is a bit unexpected, but simplifies the mapping to enabling bits in the kernel substantially. vague ok's from various including guenther doug semarie