summaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
AgeCommit message (Collapse)Author
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).
2013-04-29Extend P_SIGSUSPEND handling in userret() to properly restore theMatthew Dempsky
sigmask even if there are no pending signals under the temporary sigmask. Refactor existing select() and poll() system calls to introduce the pselect() and ppoll() system calls. Add rthread wrappers for pselect() and ppoll(). While there, update cancellation point comments to reflect recent fdatasync() addition. Minor bumps for libc and librthread due to new symbols. ok guenther, millert, deraadt, jmc
2013-04-15Add an f_mntfromspec member to struct statfs, which specifies the name ofJoel Sing
the special provided when the mount was requested. This may be the same as the special that was actually used for the mount (e.g. in the case of a device node) or it may be different (e.g. in the case of a DUID). Whilst here, change f_ctime to a 64 bit type and remove the pointless f_spare members. Compatibility goo courtesy of guenther@ ok krw@ millert@
2013-03-14the 5.1 era tfork syscall claws its way out of the grave. we failed toTed Unangst
fully deprecate it (notably the go port was still using it as of 5.3) so to give users a little more time to update, __tfork51 lives again. okish deraadt guenther
2013-03-02No longer need the 5.1 version of the __tfork syscallPhilip Guenther
ok deraadt@
2012-09-10compat_o48_sys_getdirentries can die; ok guentherTheo de Raadt
2012-08-23kill nnpfs deadTheo de Raadt
2012-06-21__tfork() needs to set the stack address of the new thread in the kernel,Philip Guenthe
so that it can't get a signal while still running on the parent thread's stack. Also, pass in sizeof(struct __tfork) to provide forward compat when more members are added. This is an ABI change, so switch syscall numbers and bump lib majors this time. ok deraadt@ matthew@
2012-04-12remove rfork(); ok guenther miodTheo de Raadt
2012-04-12kill lfs system call lines and libc stubsTheo de Raadt
2012-04-12New system call: getdtablecount(2) returns the number of fileTheo de Raadt
descriptors the process currently has open. ok guenther miod gilles ...
2012-01-17Reimplement mutexes, condvars, and rwlocks to eliminate bugs,Philip Guenthe
particularly the "consume the signal you just sent" hang, and putting the wait queues in userspace. Do cancellation handling in pthread_cond_*wait(), pthread_join(), and sem_wait(). Add __ prefix to thr{sleep,wakeup,exit,sigdivert}() syscalls; add 'abort" argument to thrsleep to close cancellation race; make thr{sleep,wakeup} return errno values via *retval to avoid touching userspace errno.
2011-10-15"TLS-lite": add kernel support for a per-thread userspace pointer,Philip Guenthe
for pointing to the thread-control-block. Support for mapping this to the correct hardware register can be added as it's finished; start with support for amd64, sparc, and sparc64. Includes syscalls for getting and setting it (for a portable __errno implementation) as well as creating a new thread with an initial value for it. discussed with miod@, kettenis@, deraadt@; committing to get the syscalls in with the impending libc bump and do further refinements in tree
2011-07-18Add support for UTIME_OMIT and UTIME_NOW to utimensat(2), add theMatthew Dempsky
futimens(2) system call, and refactor futimes(2) to share the same code. (As with other openat(2) system call stuff, this is not exposed to userland yet.) naddy@ pointed out rsync expects UTIME_* if openat(2) is available tweaks and ok guenther@; tested by naddy@ in a bulk build
2011-07-09Fix up previous diff: use COMPAT_O48 instead of COMPAT_48, add optionMatthew Dempsky
to GENERIC, wrap compat_o48_sys_getdirentries() with an appropriate #ifdef, and use struct compat_o48_sys_getdirentries_args instead of struct sys_getdirentries_args.