summaryrefslogtreecommitdiffstats
path: root/sys/kern/syscalls.master
Commit message (Collapse)AuthorAgeFilesLines
* Split 4.x and 5.x signal handling so that we can keep 4.x signalpeter2002-10-251-5/+6
| | | | | | | | | | | | | | | | handling clean and functional as 5.x evolves. This allows some of the nasty bandaids in the 5.x codepaths to be unwound. Encapsulate 4.x signal handling under COMPAT_FREEBSD4 (there is an anti-foot-shooting measure in place, 5.x folks need this for a while) and finish encapsulating the older stuff under COMPAT_43. Since the ancient stuff is required on alpha (longjmp(3) passes a 'struct osigcontext *' to the current sigreturn(2), instead of the 'ucontext_t *' that sigreturn is supposed to take), add a compile time check to prevent foot shooting there too. Add uniform COMPAT_43 stubs for ia64/sparc64/powerpc. Tested on: i386, alpha, ia64. Compiled on sparc64 (a few days ago). Approved by: re
* Flesh out prototypes for __mac_get_pid, __mac_get_link, andrwatson2002-10-221-3/+5
| | | | | | | | | | __mac_set_link, based on __mac_get_proc() except with a pid, and __mac_get_file(), __mac_set_file() except that they do not follow symlinks. First in a series of commits to flesh out the user API. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Stake a claim on 418 (__xstat), 419 (__xfstat), 420 (__xlstat)peter2002-10-191-0/+3
|
* Grab 416/417 real estate before I get burned while testing again.peter2002-10-191-0/+2
| | | | | | This is for the not-quite-ready signal/fpu abi stuff. It may not see the light of day, but I'm certainly not going to be able to validate it when getting shot in the foot due to syscall number conflicts.
* Add a placeholder for the execve_mac() system call, similar to SELinux'srwatson2002-10-191-0/+1
| | | | | | | | | | | | execve_secure() system call, which permits a process to pass in a label for a label change during exec. This permits SELinux to change the label for the resulting exec without a race following a manual label change on the process. Because this interface uses our general purpose MAC label abstraction, we call it execve_mac(), and wrap our port of SELinux's execve_secure() around it with appropriate sid mappings. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Restore pointer that was removed in 1.128. This wasn't a merge-o.peter2002-10-151-0/+4
|
* Fix what looks like a merge-o from a conflict in the last commit torwatson2002-10-101-9/+4
| | | | syscalls.master.
* Add a pointer to the alternate syscall tables on 64 bit platforms.peter2002-10-091-0/+8
|
* Flesh out the extattr_{delete,get,set}_link() system calls: variationsrwatson2002-10-091-3/+8
| | | | | | | on the _file() theme that do not follow symlinks. Sync to MAC tree. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Let kse_wakeup() take a KSE mailbox pointer argument.archie2002-10-021-1/+1
| | | | Reviewed by: julian
* Reserve system call numbers for the following system calls:rwatson2002-10-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | __mac_get_pid Retrieve MAC label of a process by pid Similar to __mac_get_proc() except that the target process of the operation is explicitly specified rather than assuming curthread. __mac_get_link Retrieve MAC label of a path with NOFOLLOW __mac_set_link Set MAC label of a path with NOFOLLOW extattr_set_link Set EAs on a path with NOFOLLOW extattr_get_link Retrieve EAs on a path with NOFOLLOW extattr_delete_link Delete EAs on a path with NOFOLLOW These calls are similar to __mac_get_file(), __mac_set_file(), extattr_set_file(), extattr_get_file(), and extattr_delete_file(), except that they do not follow symlinks. The distinction between these calls is similar to lchown() vs chown(). Implementations to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, Network Associates Laboratories
* Make the following name changes to KSE related functions, etc., to betterarchie2002-09-251-4/+4
| | | | | | | | | | | | | | | represent their purpose and minimize namespace conflicts: kse_fn_t -> kse_func_t struct thread_mailbox -> struct kse_thr_mailbox thread_interrupt() -> kse_thr_interrupt() kse_yield() -> kse_release() kse_new() -> kse_create() Add missing declaration of kse_thr_interrupt() to <sys/kse.h>. Regenerate the various generated syscall files. Minor style fixes. Reviewed by: julian
* Add the rest of the kernel support for the sem_ API in kern/uipc_sem.c.alfred2002-09-191-0/+15
| | | | | | | | | | Option 'P1003_1B_SEMAPHORES' to compile them in, or load the "sem" module to activate them. Have kern/makesyscalls.sh emit an include for sys/_semaphore.h into sysproto.h to pull in the typedef for semid_t. Add the syscalls to the syscall table as module stubs.
* mac_syscall is now implemented, switch to MSTD.rwatson2002-08-191-1/+1
| | | | | Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Rename mac_policy() to mac_syscall() to be more reflective of itsrwatson2002-08-061-1/+1
| | | | | | | | purpose. Submitted by: cvance@tislabs.com Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Introduce support for Mandatory Access Control and extensiblerwatson2002-07-301-6/+8
| | | | | | | | | | | kernel access control. Replace 'void *' with 'struct mac *' now that mac.h is in the base tree. The current POSIX.1e-derived userland MAC interface is schedule for replacement, but will act as a functional placeholder until the replacement is done. These system calls allow userland processes to get and set labels on both the current process, as well as file system objects and file descriptor backed objects.
* Introduce a mac_policy() system call that will provide MAC policiesrwatson2002-07-301-0/+2
| | | | | | | | | with a general purpose front end entry point for user applications to invoke. The MAC framework will route the system call to the appropriate policy by name. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Prototype function arguments, only with MAC-specific structuresrwatson2002-07-301-6/+6
| | | | | | | replaced with void until we bring in the actual structure definitions. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Remove incorrect comment about now corrected manpage.alfred2002-07-131-1/+0
|
* Create a bug-for-bug FreeBSD4 compatible version of sendfile and move thealfred2002-07-121-2/+5
| | | | | fixed sendfile over. This is needed to preserve binary compatibility from 4.x to 5.x.
* Part 1 of KSE-IIIjulian2002-06-291-1/+1
| | | | | | | | | | | | | The ability to schedule multiple threads per process (one one cpu) by making ALL system calls optionally asynchronous. to come: ia64 and power-pc patches, patches for gdb, test program (in tools) Reviewed by: Almost everyone who counts (at various times, peter, jhb, matt, alfred, mini, bernd, and a cast of thousands) NOTE: this is still Beta code, and contains lots of debugging stuff. expect slight instability in signals..
* Keep POSIX.1e capabilities system call placeholders, but remove definitions.rwatson2002-06-131-6/+6
|
* Add syscall uuidgen() for generating Univerally Unique Identifiersmarcel2002-05-281-0/+1
| | | | | | (UUIDs). On ia64 UUIDs, aka GUIDs, are used by EFI and the firmware among others. To create GUID Partition Tables (GPTs), we need to be able to generate UUIDs.
* Add an entry for the lchflags(2) syscall. It's useful to preventmux2002-05-051-0/+1
| | | | | | a symlink deletion. Reviewed by: rwatson
* Add an entry for the kenv(2) syscall (code to follow).mux2002-04-171-0/+2
| | | | Reviewed by: peter
* Remove the requirement that Giant be held around sigreturn().alc2002-04-141-1/+1
|
* Remove the requirement that Giant be held around osigreturn(). All platform-alc2002-04-111-1/+1
| | | | specific implementations are MPSAFE.
* Reserve system call numbers for the MAC framework. This will preventrwatson2002-03-051-1/+6
| | | | | | | | | people working on the MAC tree from getting toasted whenever system call numbers are allocated in the main tree (for example, for KSE :-). Calls allocated: __mac_{get,set}_proc, __mac_{get,set}_{fd,file}(). Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Add stub syscalls and definitions for KSE calls.julian2002-02-191-1/+1
| | | | "Book'em Danno"
* Add 5 KSE syscalls. Two will be implemented with the next KSEjulian2002-02-191-0/+6
| | | | | | | | step and the others are reservations for coming code. All will be stubbed in this kernel in the next commit. This will allow people to easily make KSE binaries for userland testing (the syscalls will be in libc) but they will still need a real KSE kernel to test it. (libc looks in /sys to decide what it should add stubs for).
* Fix prototype to sigreturn to use struct __ucontext instead of ucontext_t.deischen2002-02-171-1/+1
|
* Part I: Update extended attribute API and ABI:rwatson2002-02-101-8/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | o Modify the system call syntax for extattr_{get,set}_{fd,file}() so as not to use the scatter gather API (which appeared not to be used by any consumers, and be less portable), rather, accepts 'data' and 'nbytes' in the style of other simple read/write interfaces. This changes the API and ABI. o Modify system call semantics so that extattr_get_{fd,file}() return a size_t. When performing a read, the number of bytes read will be returned, unless the data pointer is NULL, in which case the number of bytes of data are returned. This changes the API only. o Modify the VOP_GETEXTATTR() vnode operation to accept a *size_t argument so as to return the size, if desirable. If set to NULL, the size will not be returned. o Update various filesystems (pseodofs, ufs) to DTRT. These changes should make extended attributes more useful and more portable. More commits to rebuild the system call files, as well as update userland utilities to follow. Obtained from: TrustedBSD Project Sponsored by: DARPA, NAI Labs
* Made osigreturn(2) standard so that SYS_osigreturn can be used in thebde2002-02-011-1/+1
| | | | | | | | | | | | signal trampoline for old signals. The arches that support old signals currently abuse sigreturn(2) instead. This mainly complicates things and slightly breaks the the new sigreturn(2). COMPAT is too limited to support the correct configuration of osigreturn, and this commit doesn't attempt to fix it; it just moves the bogusness: osigreturn() must now be provided unconditionally even on arches that don't really need it; previously it had to be provided under the bogus condition defined(COMPAT_43).
* Make AIO a loadable module.alfred2001-12-291-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | Remove the explicit call to aio_proc_rundown() from exit1(), instead AIO will use at_exit(9). Add functions at_exec(9), rm_at_exec(9) which function nearly the same as at_exec(9) and rm_at_exec(9), these functions are called on behalf of modules at the time of execve(2) after the image activator has run. Use a modified version of tegge's suggestion via at_exec(9) to close an exploitable race in AIO. Fix SYSCALL_MODULE_HELPER such that it's archetecuterally neutral, the problem was that one had to pass it a paramater indicating the number of arguments which were actually the number of "int". Fix it by using an inline version of the AS macro against the syscall arguments. (AS should be available globally but we'll get to that later.) Add a primative system for dynamically adding kqueue ops, it's really not as sophisticated as it should be, but I'll discuss with jlemon when he's around.
* Reserve 378 for the new mount syscall Maxime Henrion <mux@qualys.com>phk2001-11-021-0/+3
| | | | is working on. (This is to get us more than 32 mountoptions).
* o Reserve system call 377 for afs_syscall; by reserving a system callrwatson2001-10-131-0/+1
| | | | | | | | number, portable OpenAFS applications don't have to attempt to determine what system call number was dynamically allocated. No system call prototype or implementation is defined. Requested by: Tom Maher <tardis@watson.org>
* o Introduce eaccess(2), a version of access(2) that uses the effectiverwatson2001-09-211-0/+1
| | | | | | | | | | | | | | | | | | credentials rather than the real credentials. This is useful for implementing GUI's which need to modify icons based on access rights, but where use of open(2) is too expensive, use of stat(2) doesn't reflect the file system's real protection model, and use of access() suffers from real/effective credential confusion. This implementation provides the same semantics as the call of the same name on SCO OpenServer. Note: using this call improperly can leave you subject to some of the same races present in the access(2) call. o To implement this, break out the basic logic of access(2) into vpaccess(), which accepts a passed credential to perform the invocation of VOP_ACCESS(). Add eaccess(2) to invoke vpaccess(), and modify access(2) to use vpaccess(). Obtained from: TrustedBSD Project
* Cleanup and split of nfs client and server code.peter2001-09-181-0/+1
| | | | This builds on the top of several repo-copies.
* Synchronize syscalls.master(s) with recent Giant pushdown workdillon2001-09-011-104/+104
|
* Make yield() MPSAFE.dillon2001-09-011-19/+19
| | | | | | Synchronize syscalls.master with all MPSAFE changes to date. Synchronize new syscall generation follows because yield() will panic if it is out of sync with syscalls.master.
* Giant pushdown syscalls in kern/uipc_syscalls.c. Affected calls:dillon2001-08-311-24/+24
| | | | | | recvmsg(), sendmsg(), recvfrom(), accept(), getpeername(), getsockname(), socket(), connect(), accept(), send(), recv(), bind(), setsockopt(), listen(), sendto(), shutdown(), socketpair(), sendfile()
* Giant Pushdown: sysv shm, sem, and msg calls.dillon2001-08-311-14/+14
|
* Remove the MPSAFE keyword from the parser for syscalls.master.dillon2001-08-301-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead introduce the [M] prefix to existing keywords. e.g. MSTD is the MP SAFE version of STD. This is prepatory for a massive Giant lock pushdown. The old MPSAFE keyword made syscalls.master too messy. Begin comments MP-Safe procedures with the comment: /* * MPSAFE */ This comments means that the procedure may be called without Giant held (The procedure itself may still need to obtain Giant temporarily to do its thing). sv_prepsyscall() is now MP SAFE and assumed to be MP SAFE sv_transtrap() is now MP SAFE and assumed to be MP SAFE ktrsyscall() and ktrsysret() are now MP SAFE (Giant Pushdown) trapsignal() is now MP SAFE (Giant Pushdown) Places which used to do the if (mtx_owned(&Giant)) mtx_unlock(&Giant) test in syscall[2]() in */*/trap.c now do not. Instead they explicitly unlock Giant if they previously obtained it, and then assert that it is no longer held to catch broken system calls. Rebuild syscall tables.
* Remove a comment which was past its shelf life.phk2001-05-291-1/+0
| | | | | PR: 18750 Submitted by: Tony Finch <dot@dotat.at>
* Introduce a global lock for the vm subsystem (vm_mtx).alfred2001-05-191-17/+17
| | | | | | | | | | | | | | | | | | | vm_mtx does not recurse and is required for most low level vm operations. faults can not be taken without holding Giant. Memory subsystems can now call the base page allocators safely. Almost all atomic ops were removed as they are covered under the vm mutex. Alpha and ia64 now need to catch up to i386's trap handlers. FFS and NFS have been tested, other filesystems will need minor changes (grabbing the vm lock when twiddling page properties). Reviewed (partially) by: jake, jhb
* gettimeofday() is MP safe on both -current and -stable.tegge2001-05-111-1/+1
|
* o Introduce a new system call, __setsugid(), which allows a process torwatson2001-04-111-0/+1
| | | | | | | | | | | | | | | | | toggle the P_SUGID bit explicitly, rather than relying on it being set implicitly by other protection and credential logic. This feature is introduced to support inter-process authorization regression testing by simplifying userland credential management allowing the easy isolation and reproduction of authorization events with specific security contexts. This feature is enabled only by "options REGRESSION" and is not intended to be used by applications. While the feature is not known to introduce security vulnerabilities, it does allow processes to enter previously inaccessible parts of the credential state machine, and is therefore disabled by default. It may not constitute a risk, and therefore in the future pending further analysis (and appropriate need) may become a published interface. Obtained from: TrustedBSD Project
* o Introduce extattr_{delete,get,set}_fd() to allow extended attributerwatson2001-03-311-0/+8
| | | | | | | | | | | | | operations on file descriptors, which complement the existing set of calls, extattr_{delete,get,set}_file() which act on paths. In doing so, restructure the system call implementation such that the two sets of functions share most of the relevant code, rather than duplicating it. This pushes the vnode locking into the shared code, but keeps the copying in of some arguments in the system call code. Allowing access via file descriptors reduces the opportunity for race conditions when managing extended attributes. Obtained from: TrustedBSD Project
* o Rename "namespace" argument to "attrnamespace" as namespace is a C++rwatson2001-03-191-4/+4
| | | | | | | reserved word. Submitted by: jkh Obtained from: TrustedBSD Project
* o Change the API and ABI of the Extended Attribute kernel interfaces torwatson2001-03-151-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce a new argument, "namespace", rather than relying on a first- character namespace indicator. This is in line with more recent thinking on EA interfaces on various mailing lists, including the posix1e, Linux acl-devel, and trustedbsd-discuss forums. Two namespaces are defined by default, EXTATTR_NAMESPACE_SYSTEM and EXTATTR_NAMESPACE_USER, where the primary distinction lies in the access control model: user EAs are accessible based on the normal MAC and DAC file/directory protections, and system attributes are limited to kernel-originated or appropriately privileged userland requests. o These API changes occur at several levels: the namespace argument is introduced in the extattr_{get,set}_file() system call interfaces, at the vnode operation level in the vop_{get,set}extattr() interfaces, and in the UFS extended attribute implementation. Changes are also introduced in the VFS extattrctl() interface (system call, VFS, and UFS implementation), where the arguments are modified to include a namespace field, as well as modified to advoid direct access to userspace variables from below the VFS layer (in the style of recent changes to mount by adrian@FreeBSD.org). This required some cleanup and bug fixing regarding VFS locks and the VFS interface, as a vnode pointer may now be optionally submitted to the VFS_EXTATTRCTL() call. Updated documentation for the VFS interface will be committed shortly. o In the near future, the auto-starting feature will be updated to search two sub-directories to the ".attribute" directory in appropriate file systems: "user" and "system" to locate attributes intended for those namespaces, as the single filename is no longer sufficient to indicate what namespace the attribute is intended for. Until this is committed, all attributes auto-started by UFS will be placed in the EXTATTR_NAMESPACE_SYSTEM namespace. o The default POSIX.1e attribute names for ACLs and Capabilities have been updated to no longer include the '$' in their filename. As such, if you're using these features, you'll need to rename the attribute backing files to the same names without '$' symbols in front. o Note that these changes will require changes in userland, which will be committed shortly. These include modifications to the extended attribute utilities, as well as to libutil for new namespace string conversion routines. Once the matching userland changes are committed, a buildworld is recommended to update all the necessary include files and verify that the kernel and userland environments are in sync. Note: If you do not use extended attributes (most people won't), upgrading is not imperative although since the system call API has changed, the new userland extended attribute code will no longer compile with old include files. o Couple of minor cleanups while I'm there: make more code compilation conditional on FFS_EXTATTR, which should recover a bit of space on kernels running without EA's, as well as update copyright dates. Obtained from: TrustedBSD Project
OpenPOWER on IntegriCloud