summaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
AgeCommit message (Collapse)Author
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
2015-08-26Convert paths argument of tame(2) to const char **.Doug Hogan
The path will not be modified and this reduces casts. Discussed with many. ok deraadt@
2015-08-22Move to tame(int flags, char *paths[]) API/ABI.Theo de Raadt
The pathlist is a whitelist of dirs and files; anything else returns ENOENT. Recommendation is to use a narrowly defined list. Also add TAME_FATTR, which permits explicit change operations against "struct stat" fields. Some other TAME_ flags are refined slightly. Not cranking libc now, since nothing commited in base uses this and the timing is uncomfortable for others. Discussed with many; thanks for a few bug fixes from semarie, doug, guenther. ok guenther
2015-07-20Add kbind, a syscall for ld.so to use to securely and efficiently updatePhilip Guenther
memory for lazy binding ok deraadt@
2015-07-19tame(2) is a subsystem which restricts programs into a "reduced featureTheo de Raadt
operating model". This is the kernel component; various changes should proceed in-tree for a while before userland programs start using it. ok miod, discussions and help from many
2015-05-06#include <sys/event.h> was removed from init_sysent.c but notJonathan Gray
syscalls.master where the file is generated from. Fix this by removing it from syscalls.master so it doesn't come back. From Nicolas Bedos.
2015-02-09getrtable() can operate NOLOCK; ok guentherTheo de Raadt
2015-02-09make sigprocmask(2) not take the kernel lockMartin Pelikan
Tests on a 4-core CPU show setjmp(3) run four times as fast under load. discussed on tech@ some time ago, now by kettenis and guenther, ok deraadt
2015-02-09getdtablecount() can go NOLOCKTheo de Raadt
ok guenther
2014-12-08Add chflagsat(), modeled on fchmodat() with name to match FreeBSD.Philip Guenther
2014-10-09delete LKM syscall stubsTed Unangst
2014-09-18Correct argument name (int flags -> int amode) in sys_access().Masao Uebayashi
OK guenther@
2014-09-17The 2nd arg of setpgid(2) should be pid_t, not int.Todd C. Miller
No functional change as pid_t is defined as int32_t. OK miod@
2014-09-01Sync readlink(2) with IEEE Std 1003.1-2008.Doug Hogan
discussion, help and ok guenther@
2014-08-31Add additional kernel interfaces for setting close-on-exec on fdsPhilip Guenther
when creating them: pipe2(), dup3(), accept4(), MSG_CMSG_CLOEXEC, SOCK_CLOEXEC. Includes SOCK_NONBLOCK support. ok matthew@
2014-07-10Add new sendsyslog(const char *, size_t) system call which simply passesTheo de Raadt
a message up into syslogd's /dev/log interface. This will be used to make syslog_r work during file descriptor exhaustion, or inside sandboxes which prohibit socket, connect, sendto, etc. The system call is being added about a week before the library and daemon changes. ok guenther tedu miod matthew
2014-07-07Mark get{,e,res}{u,g}id() and getgroups() as NOLOCKMatthew Dempsky
A little while back, guenther moved user credentials to a per-process property, but also kept a per-thread cache that would remain stable for the duration of a thread's system call. These system calls now only access the thread's cached credentials, so they're safe to run without the kernel lock. ok kettenis, guenther
2014-07-06getentropy(2) doesn't need the kernel lock, so mark it with NOLOCK.Mark Kettenis
ok matthew@
2014-06-14Change return value of getentropy() to int 0 for success. MaximumTheo de Raadt
buffersize is enforced strictly, this supplies sufficient entropy payload to act as seed material. Discourage general use of this API, but lock down this function name as the go-to for userland PRNG seeding. Improve documentation. ok miod matthew
2014-06-13Add new getentropy() system call. Code and pressure from matthew.Theo de Raadt
I accepted that he's right (again) to seperate this out from heavy sysctl API and this will simply a variety of things. Functionname is not used by anyone in the ports tree, so we guess we can use it. Shocking that no application has a function called this. ok matthew & others who pushed him to start this early on
2014-02-09nanosleep() isn't actually NOLOCK safe yet: tsleep() still requires kernelPhilip Guenther
lock for PCATCH and ktrace(CSW) handling ok kettenis@
2013-09-14Snapshots for all archs have been built, so remove the T32 codePhilip Guenther
2013-08-16Tweak the getdents() kernel prototype to use "void *"Philip Guenther
Provide a declaration for userspace Fix the kernel's sanity check on the buflen argument lack of prototype pointed out by sthen@ and landry@ ok kettenis@ otto@
2013-08-14The last user of the old __tfork() was updated to the current one,Philip Guenther
so COMPAT_O51 can go. The complete ABI role means COMPAT_O53 can be removed as well. ok jsing@ tedu@
2013-08-13Switch time_t, ino_t, clock_t, and struct kevent's ident and dataPhilip Guenther
members to 64bit types. Assign new syscall numbers for (almost all) the syscalls that involve the affected types, including anything with time_t, timeval, itimerval, timespec, rusage, dirent, stat, or kevent arguments. Add a d_off member to struct dirent and replace getdirentries() with getdents(), thus immensely simplifying and accelerating telldir/seekdir. Build perl with -DBIG_TIME. Bump the major on every single base library: the compat bits included here are only good enough to make the transition; the T32 compat option will be burned as soon as we've reached the new world are are happy with the snapshots for all architectures. DANGER: ABI incompatibility. Updating to this kernel requires extra work or you won't be able to login: install a snapshot instead. Much assistance in fixing userland issues from deraadt@ and tedu@ and build assistance from todd@ and otto@
2013-06-09Constify the mib argument of sysctl().Miod Vallat
ok matthew@ millert@
2013-06-01always implement stub utrace syscall, but keep the body #ifdef KTRACETed Unangst
ok guenther matthew
2013-06-01Add utrace(2), a system call allowing for userland to send its own ktraceMiod Vallat
records. From FreeBSD via otto@, with tweaks suggested by guenther@. Commite on behalf of otto@ who is not around, to ride the libc minor bump. Causes a librthread minor bump as well (new syscall).