freebsd-dev/lib/libc/sys/Symbol.map

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

1053 lines
15 KiB
Plaintext
Raw Normal View History

/*
* $FreeBSD$
*/
/*
* It'd be nice to automatically generate the syscall symbols, but we
* don't know to what version they will eventually belong to, so for now
* it has to be manual.
*/
FBSD_1.0 {
__acl_aclcheck_fd;
__acl_aclcheck_file;
__acl_aclcheck_link;
__acl_delete_fd;
__acl_delete_file;
__acl_delete_link;
__acl_get_fd;
__acl_get_file;
__acl_get_link;
__acl_set_fd;
__acl_set_file;
__acl_set_link;
__getcwd;
__mac_execve;
__mac_get_fd;
__mac_get_file;
__mac_get_link;
__mac_get_pid;
__mac_get_proc;
__mac_set_fd;
__mac_set_file;
__mac_set_link;
__mac_set_proc;
__setugid;
__syscall;
__sysctl;
_umtx_op;
abort2;
accept;
access;
acct;
adjtime;
aio_cancel;
aio_error;
aio_fsync;
aio_read;
aio_return;
aio_suspend;
aio_waitcomplete;
aio_write;
audit;
auditctl;
auditon;
bind;
chdir;
chflags;
chmod;
chown;
chroot;
clock_getres;
clock_gettime;
clock_settime;
close;
connect;
dup;
dup2;
eaccess;
execve;
extattr_delete_fd;
extattr_delete_file;
extattr_delete_link;
extattr_get_fd;
extattr_get_file;
extattr_get_link;
extattr_list_fd;
extattr_list_file;
extattr_list_link;
extattr_set_fd;
extattr_set_file;
extattr_set_link;
extattrctl;
fchdir;
fchflags;
fchmod;
fchown;
fcntl;
fhopen;
flock;
fork;
fpathconf;
fsync;
futimes;
getaudit;
getaudit_addr;
getauid;
getcontext;
getdtablesize;
getegid;
geteuid;
getfh;
getgid;
getgroups;
getitimer;
getpeername;
getpgid;
getpgrp;
getpid;
getppid;
getpriority;
getresgid;
getresuid;
getrlimit;
getrusage;
getsid;
getsockname;
getsockopt;
gettimeofday;
getuid;
ioctl;
issetugid;
jail;
jail_attach;
kenv;
kill;
kldfind;
kldfirstmod;
kldload;
kldnext;
kldstat;
kldsym;
kldunload;
kldunloadf;
kqueue;
2007-05-28 11:36:43 +00:00
kmq_notify; /* Do we want these to be public interfaces? */
kmq_open; /* librt uses them to provide mq_xxx. */
kmq_setattr;
kmq_timedreceive;
kmq_timedsend;
kmq_unlink;
ksem_close;
ksem_destroy;
ksem_getvalue;
ksem_init;
ksem_open;
ksem_post;
ksem_timedwait;
ksem_trywait;
ksem_unlink;
ksem_wait;
ktrace;
lchflags;
lchmod;
lchown;
lgetfh;
link;
lio_listio;
listen;
lutimes;
mac_syscall;
madvise;
mincore;
minherit;
mkdir;
mkfifo;
mlock;
mlockall;
modfind;
modfnext;
modnext;
modstat;
mount;
mprotect;
msgget;
msgrcv;
msgsnd;
msgsys;
msync;
munlock;
munlockall;
munmap;
nanosleep;
nfssvc;
nmount;
ntp_adjtime;
ntp_gettime;
open;
pathconf;
pipe;
poll;
Integrate the new MPSAFE TTY layer to the FreeBSD operating system. The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan
2008-08-20 08:31:58 +00:00
posix_openpt;
preadv;
profil;
pselect;
ptrace;
pwritev;
quotactl;
read;
readlink;
readv;
reboot;
recvfrom;
recvmsg;
rename;
revoke;
rfork;
rmdir;
rtprio;
rtprio_thread;
sched_get_priority_max;
sched_get_priority_min;
sched_getparam;
sched_getscheduler;
sched_rr_get_interval;
sched_setparam;
sched_setscheduler;
sched_yield;
select;
semget;
semop;
semsys;
sendfile;
sendmsg;
sendto;
setaudit;
setaudit_addr;
setauid;
setegid;
seteuid;
setgid;
setgroups;
setitimer;
setlogin;
setpgid;
setpriority;
setregid;
setresgid;
setresuid;
setreuid;
setrlimit;
setsid;
setsockopt;
settimeofday;
setuid;
shm_open;
shm_unlink;
shmat;
shmdt;
shmget;
shmsys;
shutdown;
sigaction;
sigaltstack;
sigpending;
sigprocmask;
sigqueue;
sigreturn;
sigsuspend;
sigtimedwait;
sigwait;
sigwaitinfo;
socket;
socketpair;
swapon;
symlink;
sync;
sysarch;
syscall;
thr_create;
thr_exit;
thr_kill;
thr_kill2;
thr_new;
thr_self;
thr_set_name;
thr_suspend;
thr_wake;
2007-05-28 11:36:43 +00:00
ktimer_create; /* Do we want these to be public interfaces? */
ktimer_delete; /* librt uses them to provide timer_xxx. */
ktimer_getoverrun;
ktimer_gettime;
ktimer_settime;
umask;
undelete;
unlink;
unmount;
utimes;
utrace;
uuidgen;
vadvise;
wait4;
write;
writev;
__error;
ftruncate;
lseek;
mmap;
pread;
pwrite;
truncate;
};
FBSD_1.1 {
Change the ABI of some of the structures used by the SYSV IPC API: - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1]
2009-06-24 21:10:52 +00:00
__semctl;
closefrom;
cpuset;
cpuset_getid;
cpuset_setid;
cpuset_getaffinity;
cpuset_setaffinity;
faccessat;
fchmodat;
fchownat;
fexecve;
futimesat;
jail_get;
jail_set;
jail_remove;
linkat;
lpathconf;
mkdirat;
mkfifoat;
Change the ABI of some of the structures used by the SYSV IPC API: - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1]
2009-06-24 21:10:52 +00:00
msgctl;
readlinkat;
renameat;
Add code to allow the system to handle multiple routing tables. This particular implementation is designed to be fully backwards compatible and to be MFC-able to 7.x (and 6.x) Currently the only protocol that can make use of the multiple tables is IPv4 Similar functionality exists in OpenBSD and Linux. From my notes: ----- One thing where FreeBSD has been falling behind, and which by chance I have some time to work on is "policy based routing", which allows different packet streams to be routed by more than just the destination address. Constraints: ------------ I want to make some form of this available in the 6.x tree (and by extension 7.x) , but FreeBSD in general needs it so I might as well do it in -current and back port the portions I need. One of the ways that this can be done is to have the ability to instantiate multiple kernel routing tables (which I will now refer to as "Forwarding Information Bases" or "FIBs" for political correctness reasons). Which FIB a particular packet uses to make the next hop decision can be decided by a number of mechanisms. The policies these mechanisms implement are the "Policies" referred to in "Policy based routing". One of the constraints I have if I try to back port this work to 6.x is that it must be implemented as a EXTENSION to the existing ABIs in 6.x so that third party applications do not need to be recompiled in timespan of the branch. This first version will not have some of the bells and whistles that will come with later versions. It will, for example, be limited to 16 tables in the first commit. Implementation method, Compatible version. (part 1) ------------------------------- For this reason I have implemented a "sufficient subset" of a multiple routing table solution in Perforce, and back-ported it to 6.x. (also in Perforce though not always caught up with what I have done in -current/P4). The subset allows a number of FIBs to be defined at compile time (8 is sufficient for my purposes in 6.x) and implements the changes needed to allow IPV4 to use them. I have not done the changes for ipv6 simply because I do not need it, and I do not have enough knowledge of ipv6 (e.g. neighbor discovery) needed to do it. Other protocol families are left untouched and should there be users with proprietary protocol families, they should continue to work and be oblivious to the existence of the extra FIBs. To understand how this is done, one must know that the current FIB code starts everything off with a single dimensional array of pointers to FIB head structures (One per protocol family), each of which in turn points to the trie of routes available to that family. The basic change in the ABI compatible version of the change is to extent that array to be a 2 dimensional array, so that instead of protocol family X looking at rt_tables[X] for the table it needs, it looks at rt_tables[Y][X] when for all protocol families except ipv4 Y is always 0. Code that is unaware of the change always just sees the first row of the table, which of course looks just like the one dimensional array that existed before. The entry points rtrequest(), rtalloc(), rtalloc1(), rtalloc_ign() are all maintained, but refer only to the first row of the array, so that existing callers in proprietary protocols can continue to do the "right thing". Some new entry points are added, for the exclusive use of ipv4 code called in_rtrequest(), in_rtalloc(), in_rtalloc1() and in_rtalloc_ign(), which have an extra argument which refers the code to the correct row. In addition, there are some new entry points (currently called rtalloc_fib() and friends) that check the Address family being looked up and call either rtalloc() (and friends) if the protocol is not IPv4 forcing the action to row 0 or to the appropriate row if it IS IPv4 (and that info is available). These are for calling from code that is not specific to any particular protocol. The way these are implemented would change in the non ABI preserving code to be added later. One feature of the first version of the code is that for ipv4, the interface routes show up automatically on all the FIBs, so that no matter what FIB you select you always have the basic direct attached hosts available to you. (rtinit() does this automatically). You CAN delete an interface route from one FIB should you want to but by default it's there. ARP information is also available in each FIB. It's assumed that the same machine would have the same MAC address, regardless of which FIB you are using to get to it. This brings us as to how the correct FIB is selected for an outgoing IPV4 packet. Firstly, all packets have a FIB associated with them. if nothing has been done to change it, it will be FIB 0. The FIB is changed in the following ways. Packets fall into one of a number of classes. 1/ locally generated packets, coming from a socket/PCB. Such packets select a FIB from a number associated with the socket/PCB. This in turn is inherited from the process, but can be changed by a socket option. The process in turn inherits it on fork. I have written a utility call setfib that acts a bit like nice.. setfib -3 ping target.example.com # will use fib 3 for ping. It is an obvious extension to make it a property of a jail but I have not done so. It can be achieved by combining the setfib and jail commands. 2/ packets received on an interface for forwarding. By default these packets would use table 0, (or possibly a number settable in a sysctl(not yet)). but prior to routing the firewall can inspect them (see below). (possibly in the future you may be able to associate a FIB with packets received on an interface.. An ifconfig arg, but not yet.) 3/ packets inspected by a packet classifier, which can arbitrarily associate a fib with it on a packet by packet basis. A fib assigned to a packet by a packet classifier (such as ipfw) would over-ride a fib associated by a more default source. (such as cases 1 or 2). 4/ a tcp listen socket associated with a fib will generate accept sockets that are associated with that same fib. 5/ Packets generated in response to some other packet (e.g. reset or icmp packets). These should use the FIB associated with the packet being reponded to. 6/ Packets generated during encapsulation. gif, tun and other tunnel interfaces will encapsulate using the FIB that was in effect withthe proces that set up the tunnel. thus setfib 1 ifconfig gif0 [tunnel instructions] will set the fib for the tunnel to use to be fib 1. Routing messages would be associated with their process, and thus select one FIB or another. messages from the kernel would be associated with the fib they refer to and would only be received by a routing socket associated with that fib. (not yet implemented) In addition Netstat has been edited to be able to cope with the fact that the array is now 2 dimensional. (It looks in system memory using libkvm (!)). Old versions of netstat see only the first FIB. In addition two sysctls are added to give: a) the number of FIBs compiled in (active) b) the default FIB of the calling process. Early testing experience: ------------------------- Basically our (IronPort's) appliance does this functionality already using ipfw fwd but that method has some drawbacks. For example, It can't fully simulate a routing table because it can't influence the socket's choice of local address when a connect() is done. Testing during the generating of these changes has been remarkably smooth so far. Multiple tables have co-existed with no notable side effects, and packets have been routes accordingly. ipfw has grown 2 new keywords: setfib N ip from anay to any count ip from any to any fib N In pf there seems to be a requirement to be able to give symbolic names to the fibs but I do not have that capacity. I am not sure if it is required. SCTP has interestingly enough built in support for this, called VRFs in Cisco parlance. it will be interesting to see how that handles it when it suddenly actually does something. Where to next: -------------------- After committing the ABI compatible version and MFCing it, I'd like to proceed in a forward direction in -current. this will result in some roto-tilling in the routing code. Firstly: the current code's idea of having a separate tree per protocol family, all of the same format, and pointed to by the 1 dimensional array is a bit silly. Especially when one considers that there is code that makes assumptions about every protocol having the same internal structures there. Some protocols don't WANT that sort of structure. (for example the whole idea of a netmask is foreign to appletalk). This needs to be made opaque to the external code. My suggested first change is to add routing method pointers to the 'domain' structure, along with information pointing the data. instead of having an array of pointers to uniform structures, there would be an array pointing to the 'domain' structures for each protocol address domain (protocol family), and the methods this reached would be called. The methods would have an argument that gives FIB number, but the protocol would be free to ignore it. When the ABI can be changed it raises the possibilty of the addition of a fib entry into the "struct route". Currently, the structure contains the sockaddr of the desination, and the resulting fib entry. To make this work fully, one could add a fib number so that given an address and a fib, one can find the third element, the fib entry. Interaction with the ARP layer/ LL layer would need to be revisited as well. Qing Li has been working on this already. This work was sponsored by Ironport Systems/Cisco PR: Reviewed by: several including rwatson, bz and mlair (parts each) Approved by: Obtained from: Ironport systems/Cisco MFC after: Security: PR: Submitted by: Reviewed by: Approved by: Obtained from: MFC after: Security:
2008-05-09 23:00:21 +00:00
setfib;
Change the ABI of some of the structures used by the SYSV IPC API: - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1]
2009-06-24 21:10:52 +00:00
shmctl;
symlinkat;
unlinkat;
};
FBSD_1.2 {
cap_enter;
cap_getmode;
getloginclass;
pdfork;
pdgetpid;
pdkill;
posix_fallocate;
2011-03-30 18:08:31 +00:00
rctl_get_racct;
rctl_get_rules;
rctl_get_limits;
rctl_add_rule;
rctl_remove_rule;
setloginclass;
};
Add the posix_fadvise(2) system call. It is somewhat similar to madvise(2) except that it operates on a file descriptor instead of a memory region. It is currently only supported on regular files. Just as with madvise(2), the advice given to posix_fadvise(2) can be divided into two types. The first type provide hints about data access patterns and are used in the file read and write routines to modify the I/O flags passed down to VOP_READ() and VOP_WRITE(). These modes are thus filesystem independent. Note that to ease implementation (and since this API is only advisory anyway), only a single non-normal range is allowed per file descriptor. The second type of hints are used to hint to the OS that data will or will not be used. These hints are implemented via a new VOP_ADVISE(). A default implementation is provided which does nothing for the WILLNEED request and attempts to move any clean pages to the cache page queue for the DONTNEED request. This latter case required two other changes. First, a new V_CLEANONLY flag was added to vinvalbuf(). This requests vinvalbuf() to only flush clean buffers for the vnode from the buffer cache and to not remove any backing pages from the vnode. This is used to ensure clean pages are not wired into the buffer cache before attempting to move them to the cache page queue. The second change adds a new vm_object_page_cache() method. This method is somewhat similar to vm_object_page_remove() except that instead of freeing each page in the specified range, it attempts to move clean pages to the cache queue if possible. To preserve the ABI of struct file, the f_cdevpriv pointer is now reused in a union to point to the currently active advice region if one is present for regular files. Reviewed by: jilles, kib, arch@ Approved by: re (kib) MFC after: 1 month
2011-11-04 04:02:50 +00:00
FBSD_1.3 {
accept4;
aio_mlock;
bindat;
Merge Capsicum overhaul: - Capability is no longer separate descriptor type. Now every descriptor has set of its own capability rights. - The cap_new(2) system call is left, but it is no longer documented and should not be used in new code. - The new syscall cap_rights_limit(2) should be used instead of cap_new(2), which limits capability rights of the given descriptor without creating a new one. - The cap_getrights(2) syscall is renamed to cap_rights_get(2). - If CAP_IOCTL capability right is present we can further reduce allowed ioctls list with the new cap_ioctls_limit(2) syscall. List of allowed ioctls can be retrived with cap_ioctls_get(2) syscall. - If CAP_FCNTL capability right is present we can further reduce fcntls that can be used with the new cap_fcntls_limit(2) syscall and retrive them with cap_fcntls_get(2). - To support ioctl and fcntl white-listing the filedesc structure was heavly modified. - The audit subsystem, kdump and procstat tools were updated to recognize new syscalls. - Capability rights were revised and eventhough I tried hard to provide backward API and ABI compatibility there are some incompatible changes that are described in detail below: CAP_CREATE old behaviour: - Allow for openat(2)+O_CREAT. - Allow for linkat(2). - Allow for symlinkat(2). CAP_CREATE new behaviour: - Allow for openat(2)+O_CREAT. Added CAP_LINKAT: - Allow for linkat(2). ABI: Reuses CAP_RMDIR bit. - Allow to be target for renameat(2). Added CAP_SYMLINKAT: - Allow for symlinkat(2). Removed CAP_DELETE. Old behaviour: - Allow for unlinkat(2) when removing non-directory object. - Allow to be source for renameat(2). Removed CAP_RMDIR. Old behaviour: - Allow for unlinkat(2) when removing directory. Added CAP_RENAMEAT: - Required for source directory for the renameat(2) syscall. Added CAP_UNLINKAT (effectively it replaces CAP_DELETE and CAP_RMDIR): - Allow for unlinkat(2) on any object. - Required if target of renameat(2) exists and will be removed by this call. Removed CAP_MAPEXEC. CAP_MMAP old behaviour: - Allow for mmap(2) with any combination of PROT_NONE, PROT_READ and PROT_WRITE. CAP_MMAP new behaviour: - Allow for mmap(2)+PROT_NONE. Added CAP_MMAP_R: - Allow for mmap(PROT_READ). Added CAP_MMAP_W: - Allow for mmap(PROT_WRITE). Added CAP_MMAP_X: - Allow for mmap(PROT_EXEC). Added CAP_MMAP_RW: - Allow for mmap(PROT_READ | PROT_WRITE). Added CAP_MMAP_RX: - Allow for mmap(PROT_READ | PROT_EXEC). Added CAP_MMAP_WX: - Allow for mmap(PROT_WRITE | PROT_EXEC). Added CAP_MMAP_RWX: - Allow for mmap(PROT_READ | PROT_WRITE | PROT_EXEC). Renamed CAP_MKDIR to CAP_MKDIRAT. Renamed CAP_MKFIFO to CAP_MKFIFOAT. Renamed CAP_MKNODE to CAP_MKNODEAT. CAP_READ old behaviour: - Allow pread(2). - Disallow read(2), readv(2) (if there is no CAP_SEEK). CAP_READ new behaviour: - Allow read(2), readv(2). - Disallow pread(2) (CAP_SEEK was also required). CAP_WRITE old behaviour: - Allow pwrite(2). - Disallow write(2), writev(2) (if there is no CAP_SEEK). CAP_WRITE new behaviour: - Allow write(2), writev(2). - Disallow pwrite(2) (CAP_SEEK was also required). Added convinient defines: #define CAP_PREAD (CAP_SEEK | CAP_READ) #define CAP_PWRITE (CAP_SEEK | CAP_WRITE) #define CAP_MMAP_R (CAP_MMAP | CAP_SEEK | CAP_READ) #define CAP_MMAP_W (CAP_MMAP | CAP_SEEK | CAP_WRITE) #define CAP_MMAP_X (CAP_MMAP | CAP_SEEK | 0x0000000000000008ULL) #define CAP_MMAP_RW (CAP_MMAP_R | CAP_MMAP_W) #define CAP_MMAP_RX (CAP_MMAP_R | CAP_MMAP_X) #define CAP_MMAP_WX (CAP_MMAP_W | CAP_MMAP_X) #define CAP_MMAP_RWX (CAP_MMAP_R | CAP_MMAP_W | CAP_MMAP_X) #define CAP_RECV CAP_READ #define CAP_SEND CAP_WRITE #define CAP_SOCK_CLIENT \ (CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \ CAP_PEELOFF | CAP_RECV | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN) #define CAP_SOCK_SERVER \ (CAP_ACCEPT | CAP_BIND | CAP_GETPEERNAME | CAP_GETSOCKNAME | \ CAP_GETSOCKOPT | CAP_LISTEN | CAP_PEELOFF | CAP_RECV | CAP_SEND | \ CAP_SETSOCKOPT | CAP_SHUTDOWN) Added defines for backward API compatibility: #define CAP_MAPEXEC CAP_MMAP_X #define CAP_DELETE CAP_UNLINKAT #define CAP_MKDIR CAP_MKDIRAT #define CAP_RMDIR CAP_UNLINKAT #define CAP_MKFIFO CAP_MKFIFOAT #define CAP_MKNOD CAP_MKNODAT #define CAP_SOCK_ALL (CAP_SOCK_CLIENT | CAP_SOCK_SERVER) Sponsored by: The FreeBSD Foundation Reviewed by: Christoph Mallon <christoph.mallon@gmx.de> Many aspects discussed with: rwatson, benl, jonathan ABI compatibility discussed with: kib
2013-03-02 00:53:12 +00:00
cap_fcntls_get;
cap_fcntls_limit;
cap_ioctls_get;
cap_ioctls_limit;
Change the cap_rights_t type from uint64_t to a structure that we can extend in the future in a backward compatible (API and ABI) way. The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough. The structure definition looks like this: struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; }; The initial CAP_RIGHTS_VERSION is 0. The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements. The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future. To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg. #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) We still support aliases that combine few rights, but the rights have to belong to the same array element, eg: #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) There is new API to manage the new cap_rights_t structure: cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg: cap_rights_t rights; cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT); There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg: #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...); Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1: cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL); Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition. This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x. Sponsored by: The FreeBSD Foundation
2013-09-05 00:09:56 +00:00
__cap_rights_get;
Merge Capsicum overhaul: - Capability is no longer separate descriptor type. Now every descriptor has set of its own capability rights. - The cap_new(2) system call is left, but it is no longer documented and should not be used in new code. - The new syscall cap_rights_limit(2) should be used instead of cap_new(2), which limits capability rights of the given descriptor without creating a new one. - The cap_getrights(2) syscall is renamed to cap_rights_get(2). - If CAP_IOCTL capability right is present we can further reduce allowed ioctls list with the new cap_ioctls_limit(2) syscall. List of allowed ioctls can be retrived with cap_ioctls_get(2) syscall. - If CAP_FCNTL capability right is present we can further reduce fcntls that can be used with the new cap_fcntls_limit(2) syscall and retrive them with cap_fcntls_get(2). - To support ioctl and fcntl white-listing the filedesc structure was heavly modified. - The audit subsystem, kdump and procstat tools were updated to recognize new syscalls. - Capability rights were revised and eventhough I tried hard to provide backward API and ABI compatibility there are some incompatible changes that are described in detail below: CAP_CREATE old behaviour: - Allow for openat(2)+O_CREAT. - Allow for linkat(2). - Allow for symlinkat(2). CAP_CREATE new behaviour: - Allow for openat(2)+O_CREAT. Added CAP_LINKAT: - Allow for linkat(2). ABI: Reuses CAP_RMDIR bit. - Allow to be target for renameat(2). Added CAP_SYMLINKAT: - Allow for symlinkat(2). Removed CAP_DELETE. Old behaviour: - Allow for unlinkat(2) when removing non-directory object. - Allow to be source for renameat(2). Removed CAP_RMDIR. Old behaviour: - Allow for unlinkat(2) when removing directory. Added CAP_RENAMEAT: - Required for source directory for the renameat(2) syscall. Added CAP_UNLINKAT (effectively it replaces CAP_DELETE and CAP_RMDIR): - Allow for unlinkat(2) on any object. - Required if target of renameat(2) exists and will be removed by this call. Removed CAP_MAPEXEC. CAP_MMAP old behaviour: - Allow for mmap(2) with any combination of PROT_NONE, PROT_READ and PROT_WRITE. CAP_MMAP new behaviour: - Allow for mmap(2)+PROT_NONE. Added CAP_MMAP_R: - Allow for mmap(PROT_READ). Added CAP_MMAP_W: - Allow for mmap(PROT_WRITE). Added CAP_MMAP_X: - Allow for mmap(PROT_EXEC). Added CAP_MMAP_RW: - Allow for mmap(PROT_READ | PROT_WRITE). Added CAP_MMAP_RX: - Allow for mmap(PROT_READ | PROT_EXEC). Added CAP_MMAP_WX: - Allow for mmap(PROT_WRITE | PROT_EXEC). Added CAP_MMAP_RWX: - Allow for mmap(PROT_READ | PROT_WRITE | PROT_EXEC). Renamed CAP_MKDIR to CAP_MKDIRAT. Renamed CAP_MKFIFO to CAP_MKFIFOAT. Renamed CAP_MKNODE to CAP_MKNODEAT. CAP_READ old behaviour: - Allow pread(2). - Disallow read(2), readv(2) (if there is no CAP_SEEK). CAP_READ new behaviour: - Allow read(2), readv(2). - Disallow pread(2) (CAP_SEEK was also required). CAP_WRITE old behaviour: - Allow pwrite(2). - Disallow write(2), writev(2) (if there is no CAP_SEEK). CAP_WRITE new behaviour: - Allow write(2), writev(2). - Disallow pwrite(2) (CAP_SEEK was also required). Added convinient defines: #define CAP_PREAD (CAP_SEEK | CAP_READ) #define CAP_PWRITE (CAP_SEEK | CAP_WRITE) #define CAP_MMAP_R (CAP_MMAP | CAP_SEEK | CAP_READ) #define CAP_MMAP_W (CAP_MMAP | CAP_SEEK | CAP_WRITE) #define CAP_MMAP_X (CAP_MMAP | CAP_SEEK | 0x0000000000000008ULL) #define CAP_MMAP_RW (CAP_MMAP_R | CAP_MMAP_W) #define CAP_MMAP_RX (CAP_MMAP_R | CAP_MMAP_X) #define CAP_MMAP_WX (CAP_MMAP_W | CAP_MMAP_X) #define CAP_MMAP_RWX (CAP_MMAP_R | CAP_MMAP_W | CAP_MMAP_X) #define CAP_RECV CAP_READ #define CAP_SEND CAP_WRITE #define CAP_SOCK_CLIENT \ (CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \ CAP_PEELOFF | CAP_RECV | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN) #define CAP_SOCK_SERVER \ (CAP_ACCEPT | CAP_BIND | CAP_GETPEERNAME | CAP_GETSOCKNAME | \ CAP_GETSOCKOPT | CAP_LISTEN | CAP_PEELOFF | CAP_RECV | CAP_SEND | \ CAP_SETSOCKOPT | CAP_SHUTDOWN) Added defines for backward API compatibility: #define CAP_MAPEXEC CAP_MMAP_X #define CAP_DELETE CAP_UNLINKAT #define CAP_MKDIR CAP_MKDIRAT #define CAP_RMDIR CAP_UNLINKAT #define CAP_MKFIFO CAP_MKFIFOAT #define CAP_MKNOD CAP_MKNODAT #define CAP_SOCK_ALL (CAP_SOCK_CLIENT | CAP_SOCK_SERVER) Sponsored by: The FreeBSD Foundation Reviewed by: Christoph Mallon <christoph.mallon@gmx.de> Many aspects discussed with: rwatson, benl, jonathan ABI compatibility discussed with: kib
2013-03-02 00:53:12 +00:00
cap_rights_limit;
cap_sandboxed;
chflagsat;
clock_getcpuclockid2;
connectat;
ffclock_getcounter;
ffclock_getestimate;
ffclock_setestimate;
pipe2;
Add the posix_fadvise(2) system call. It is somewhat similar to madvise(2) except that it operates on a file descriptor instead of a memory region. It is currently only supported on regular files. Just as with madvise(2), the advice given to posix_fadvise(2) can be divided into two types. The first type provide hints about data access patterns and are used in the file read and write routines to modify the I/O flags passed down to VOP_READ() and VOP_WRITE(). These modes are thus filesystem independent. Note that to ease implementation (and since this API is only advisory anyway), only a single non-normal range is allowed per file descriptor. The second type of hints are used to hint to the OS that data will or will not be used. These hints are implemented via a new VOP_ADVISE(). A default implementation is provided which does nothing for the WILLNEED request and attempts to move any clean pages to the cache page queue for the DONTNEED request. This latter case required two other changes. First, a new V_CLEANONLY flag was added to vinvalbuf(). This requests vinvalbuf() to only flush clean buffers for the vnode from the buffer cache and to not remove any backing pages from the vnode. This is used to ensure clean pages are not wired into the buffer cache before attempting to move them to the cache page queue. The second change adds a new vm_object_page_cache() method. This method is somewhat similar to vm_object_page_remove() except that instead of freeing each page in the specified range, it attempts to move clean pages to the cache queue if possible. To preserve the ABI of struct file, the f_cdevpriv pointer is now reused in a union to point to the currently active advice region if one is present for regular files. Reviewed by: jilles, kib, arch@ Approved by: re (kib) MFC after: 1 month
2011-11-04 04:02:50 +00:00
posix_fadvise;
procctl;
wait6;
Add the posix_fadvise(2) system call. It is somewhat similar to madvise(2) except that it operates on a file descriptor instead of a memory region. It is currently only supported on regular files. Just as with madvise(2), the advice given to posix_fadvise(2) can be divided into two types. The first type provide hints about data access patterns and are used in the file read and write routines to modify the I/O flags passed down to VOP_READ() and VOP_WRITE(). These modes are thus filesystem independent. Note that to ease implementation (and since this API is only advisory anyway), only a single non-normal range is allowed per file descriptor. The second type of hints are used to hint to the OS that data will or will not be used. These hints are implemented via a new VOP_ADVISE(). A default implementation is provided which does nothing for the WILLNEED request and attempts to move any clean pages to the cache page queue for the DONTNEED request. This latter case required two other changes. First, a new V_CLEANONLY flag was added to vinvalbuf(). This requests vinvalbuf() to only flush clean buffers for the vnode from the buffer cache and to not remove any backing pages from the vnode. This is used to ensure clean pages are not wired into the buffer cache before attempting to move them to the cache page queue. The second change adds a new vm_object_page_cache() method. This method is somewhat similar to vm_object_page_remove() except that instead of freeing each page in the specified range, it attempts to move clean pages to the cache queue if possible. To preserve the ABI of struct file, the f_cdevpriv pointer is now reused in a union to point to the currently active advice region if one is present for regular files. Reviewed by: jilles, kib, arch@ Approved by: re (kib) MFC after: 1 month
2011-11-04 04:02:50 +00:00
};
FBSD_1.4 {
futimens;
ppoll;
utimensat;
Add an initial NUMA affinity/policy configuration for threads and processes. This is based on work done by jeff@ and jhb@, as well as the numa.diff patch that has been circulating when someone asks for first-touch NUMA on -10 or -11. * Introduce a simple set of VM policy and iterator types. * tie the policy types into the vm_phys path for now, mirroring how the initial first-touch allocation work was enabled. * add syscalls to control changing thread and process defaults. * add a global NUMA VM domain policy. * implement a simple cascade policy order - if a thread policy exists, use it; if a process policy exists, use it; use the default policy. * processes inherit policies from their parent processes, threads inherit policies from their parent threads. * add a simple tool (numactl) to query and modify default thread/process policities. * add documentation for the new syscalls, for numa and for numactl. * re-enable first touch NUMA again by default, as now policies can be set in a variety of methods. This is only relevant for very specific workloads. This doesn't pretend to be a final NUMA solution. The previous defaults in -HEAD (with MAXMEMDOM set) can be achieved by 'sysctl vm.default_policy=rr'. This is only relevant if MAXMEMDOM is set to something other than 1. Ie, if you're using GENERIC or a modified kernel with non-NUMA, then this is a glorified no-op for you. Thank you to Norse Corp for giving me access to rather large (for FreeBSD!) NUMA machines in order to develop and verify this. Thank you to Dell for providing me with dual socket sandybridge and westmere v3 hardware to do NUMA development with. Thank you to Scott Long at Netflix for providing me with access to the two-socket, four-domain haswell v3 hardware. Thank you to Peter Holm for running the stress testing suite against the NUMA branch during various stages of development! Tested: * MIPS (regression testing; non-NUMA) * i386 (regression testing; non-NUMA GENERIC) * amd64 (regression testing; non-NUMA GENERIC) * westmere, 2 socket (thankyou norse!) * sandy bridge, 2 socket (thankyou dell!) * ivy bridge, 2 socket (thankyou norse!) * westmere-EX, 4 socket / 1TB RAM (thankyou norse!) * haswell, 2 socket (thankyou norse!) * haswell v3, 2 socket (thankyou dell) * haswell v3, 2x18 core (thankyou scott long / netflix!) * Peter Holm ran a stress test suite on this work and found one issue, but has not been able to verify it (it doesn't look NUMA related, and he only saw it once over many testing runs.) * I've tested bhyve instances running in fixed NUMA domains and cpusets; all seems to work correctly. Verified: * intel-pcm - pcm-numa.x and pcm-memory.x, whilst selecting different NUMA policies for processes under test. Review: This was reviewed through phabricator (https://reviews.freebsd.org/D2559) as well as privately and via emails to freebsd-arch@. The git history with specific attributes is available at https://github.com/erikarn/freebsd/ in the NUMA branch (https://github.com/erikarn/freebsd/compare/local/adrian_numa_policy). This has been reviewed by a number of people (stas, rpaulo, kib, ngie, wblock) but not achieved a clear consensus. My hope is that with further exposure and testing more functionality can be implemented and evaluated. Notes: * The VM doesn't handle unbalanced domains very well, and if you have an overly unbalanced memory setup whilst under high memory pressure, VM page allocation may fail leading to a kernel panic. This was a problem in the past, but it's much more easily triggered now with these tools. * This work only controls the path through vm_phys; it doesn't yet strongly/predictably affect contigmalloc, KVA placement, UMA, etc. So, driver placement of memory isn't really guaranteed in any way. That's next on my plate. Sponsored by: Norse Corp, Inc.; Dell
2015-07-11 15:21:37 +00:00
numa_setaffinity;
numa_getaffinity;
sendmmsg;
recvmmsg;
};
FBSD_1.5 {
clock_nanosleep;
fdatasync;
Commit the 64-bit inode project. Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_namlen to 16-bits, and change the required alignment. Increase struct statfs f_mntfromname[] and f_mntonname[] array length MNAMELEN to 1024. ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways. Kinfo sysctl MIBs ABI is changed in backward-compatible way, but there is no general mechanism to handle other sysctl MIBS which return structures where the layout has changed. It was considered that the breakage is either in the management interfaces, where we usually allow ABI slip, or is not important. Struct xvnode changed layout, no compat shims are provided. For struct xtty, dev_t tty device member was reduced to uint32_t. It was decided that keeping ABI compat in this case is more useful than reporting 64-bit dev_t, for the sake of pstat. Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world. Credits: The 64-bit inode project, also known as ino64, started life many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick (mckusick) then picked up and updated the patch, and acted as a flag-waver. Feedback, suggestions, and discussions were carried by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial ports investigation followed by an exp-run by Antoine Brodin (antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib). Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision: https://reviews.freebsd.org/D10439
2017-05-23 09:29:05 +00:00
fhstat;
fhstatfs;
fstat;
fstatat;
fstatfs;
getdents;
getdirentries;
getfsstat;
getrandom;
kevent;
Commit the 64-bit inode project. Extend the ino_t, dev_t, nlink_t types to 64-bit ints. Modify struct dirent layout to add d_off, increase the size of d_fileno to 64-bits, increase the size of d_namlen to 16-bits, and change the required alignment. Increase struct statfs f_mntfromname[] and f_mntonname[] array length MNAMELEN to 1024. ABI breakage is mitigated by providing compatibility using versioned symbols, ingenious use of the existing padding in structures, and by employing other tricks. Unfortunately, not everything can be fixed, especially outside the base system. For instance, third-party APIs which pass struct stat around are broken in backward and forward incompatible ways. Kinfo sysctl MIBs ABI is changed in backward-compatible way, but there is no general mechanism to handle other sysctl MIBS which return structures where the layout has changed. It was considered that the breakage is either in the management interfaces, where we usually allow ABI slip, or is not important. Struct xvnode changed layout, no compat shims are provided. For struct xtty, dev_t tty device member was reduced to uint32_t. It was decided that keeping ABI compat in this case is more useful than reporting 64-bit dev_t, for the sake of pstat. Update note: strictly follow the instructions in UPDATING. Build and install the new kernel with COMPAT_FREEBSD11 option enabled, then reboot, and only then install new world. Credits: The 64-bit inode project, also known as ino64, started life many years ago as a project by Gleb Kurtsou (gleb). Kirk McKusick (mckusick) then picked up and updated the patch, and acted as a flag-waver. Feedback, suggestions, and discussions were carried by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles), and Rick Macklem (rmacklem). Kris Moore (kris) performed an initial ports investigation followed by an exp-run by Antoine Brodin (antoine). Essential and all-embracing testing was done by Peter Holm (pho). The heavy lifting of coordinating all these efforts and bringing the project to completion were done by Konstantin Belousov (kib). Sponsored by: The FreeBSD Foundation (emaste, kib) Differential revision: https://reviews.freebsd.org/D10439
2017-05-23 09:29:05 +00:00
lstat;
mknod;
mknodat;
stat;
statfs;
cpuset_getdomain;
cpuset_setdomain;
};
FBSD_1.6 {
__sysctlbyname;
aio_readv;
aio_writev;
close_range;
copy_file_range;
fhlink;
fhlinkat;
fhreadlink;
getfhat;
funlinkat;
memfd_create;
shm_create_largepage;
shm_rename;
};
FBSD_1.7 {
_Fork;
fspacectl;
kqueuex;
swapoff;
};
FBSDprivate_1.0 {
___acl_aclcheck_fd;
__sys___acl_aclcheck_fd;
___acl_aclcheck_file;
__sys___acl_aclcheck_file;
___acl_aclcheck_link;
__sys___acl_aclcheck_link;
___acl_delete_fd;
__sys___acl_delete_fd;
___acl_delete_file;
__sys___acl_delete_file;
___acl_delete_link;
__sys___acl_delete_link;
___acl_get_fd;
__sys___acl_get_fd;
___acl_get_file;
__sys___acl_get_file;
___acl_get_link;
__sys___acl_get_link;
___acl_set_fd;
__sys___acl_set_fd;
___acl_set_file;
__sys___acl_set_file;
___acl_set_link;
__sys___acl_set_link;
___getcwd;
__sys___getcwd;
___mac_execve;
__sys___mac_execve;
___mac_get_fd;
__sys___mac_get_fd;
___mac_get_file;
__sys___mac_get_file;
___mac_get_link;
__sys___mac_get_link;
___mac_get_pid;
__sys___mac_get_pid;
___mac_get_proc;
__sys___mac_get_proc;
___mac_set_fd;
__sys___mac_set_fd;
___mac_set_file;
__sys___mac_set_file;
___mac_set_link;
__sys___mac_set_link;
___mac_set_proc;
__sys___mac_set_proc;
___semctl;
__sys___semctl;
___setugid;
__sys___setugid;
___syscall;
__sys___syscall;
___sysctl;
__sys___sysctl;
__umtx_op;
__sys__umtx_op;
_abort2;
__sys_abort2;
_accept;
__sys_accept;
_accept4;
__sys_accept4;
_access;
__sys_access;
_acct;
__sys_acct;
_adjtime;
__sys_adjtime;
__sys_aio_cancel;
__sys_aio_error;
__sys_aio_fsync;
__sys_aio_read;
__sys_aio_readv;
__sys_aio_return;
__sys_aio_suspend;
__sys_aio_waitcomplete;
__sys_aio_write;
__sys_aio_writev;
_audit;
__sys_audit;
_auditctl;
__sys_auditctl;
_auditon;
__sys_auditon;
_bind;
__sys_bind;
_chdir;
__sys_chdir;
_chflags;
__sys_chflags;
_chmod;
__sys_chmod;
_chown;
__sys_chown;
_chroot;
__sys_chroot;
_clock_getcpuclockid2;
__sys_clock_getcpuclockid2;
_clock_getres;
__sys_clock_getres;
_clock_gettime;
__sys_clock_gettime;
__sys_clock_nanosleep;
_clock_settime;
__sys_clock_settime;
_close;
__sys_close;
_connect;
__sys_connect;
_cpuset;
__sys_cpuset;
_cpuset_getid;
__sys_cpuset_getid;
_cpuset_setid;
__sys_cpuset_setid;
_cpuset_getaffinity;
__sys_cpuset_getaffinity;
_cpuset_setaffinity;
__sys_cpuset_setaffinity;
_dup;
__sys_dup;
_dup2;
__sys_dup2;
_eaccess;
__sys_eaccess;
_execve;
__sys_execve;
_extattr_delete_fd;
__sys_extattr_delete_fd;
_extattr_delete_file;
__sys_extattr_delete_file;
_extattr_delete_link;
__sys_extattr_delete_link;
_extattr_get_fd;
__sys_extattr_get_fd;
_extattr_get_file;
__sys_extattr_get_file;
_extattr_get_link;
__sys_extattr_get_link;
_extattr_list_fd;
__sys_extattr_list_fd;
_extattr_list_file;
__sys_extattr_list_file;
_extattr_list_link;
__sys_extattr_list_link;
_extattr_set_fd;
__sys_extattr_set_fd;
_extattr_set_file;
__sys_extattr_set_file;
_extattr_set_link;
__sys_extattr_set_link;
_extattrctl;
__sys_extattrctl;
__sys_sigfastblock;
_fchdir;
__sys_fchdir;
_fchflags;
__sys_fchflags;
_fchmod;
__sys_fchmod;
_fchown;
__sys_fchown;
_fcntl;
__sys_fcntl;
__fcntl_compat;
_fhopen;
__sys_fhopen;
_fhstat;
__sys_fhstat;
_fhstatfs;
__sys_fhstatfs;
_flock;
__sys_flock;
_fork;
__sys_fork;
_fpathconf;
__sys_fpathconf;
_fstat;
__sys_fstat;
_fstatfs;
__sys_fstatfs;
_fsync;
__sys_fsync;
_fdatasync;
__sys_fdatasync;
_futimes;
__sys_futimes;
_getaudit;
__sys_getaudit;
_getaudit_addr;
__sys_getaudit_addr;
_getauid;
__sys_getauid;
_getcontext;
__sys_getcontext;
_getdirentries;
__sys_getdirentries;
_getdtablesize;
__sys_getdtablesize;
_getegid;
__sys_getegid;
_geteuid;
__sys_geteuid;
_getfh;
__sys_getfh;
_getfsstat;
__sys_getfsstat;
_getgid;
__sys_getgid;
_getgroups;
__sys_getgroups;
_getitimer;
__sys_getitimer;
_getpeername;
__sys_getpeername;
_getpgid;
__sys_getpgid;
_getpgrp;
__sys_getpgrp;
_getpid;
__sys_getpid;
_getppid;
__sys_getppid;
_getpriority;
__sys_getpriority;
_getresgid;
__sys_getresgid;
_getresuid;
__sys_getresuid;
_getrlimit;
__sys_getrlimit;
_getrusage;
__sys_getrusage;
_getsid;
__sys_getsid;
_getsockname;
__sys_getsockname;
_getsockopt;
__sys_getsockopt;
_gettimeofday;
__sys_gettimeofday;
_getuid;
__sys_getuid;
_ioctl;
__sys_ioctl;
_issetugid;
__sys_issetugid;
_jail;
__sys_jail;
_jail_attach;
__sys_jail_attach;
_kenv;
__sys_kenv;
_kevent;
__sys_kevent;
_kill;
__sys_kill;
_kldfind;
__sys_kldfind;
_kldfirstmod;
__sys_kldfirstmod;
_kldload;
__sys_kldload;
_kldnext;
__sys_kldnext;
_kldstat;
__sys_kldstat;
_kldsym;
__sys_kldsym;
_kldunload;
__sys_kldunload;
_kldunloadf;
__sys_kldunloadf;
_kmq_notify;
__sys_kmq_notify;
_kmq_open;
__sys_kmq_open;
_kmq_setattr;
__sys_kmq_setattr;
_kmq_timedreceive;
__sys_kmq_timedreceive;
_kmq_timedsend;
__sys_kmq_timedsend;
_kmq_unlink;
__sys_kmq_unlink;
_kqueue;
__sys_kqueue;
_ksem_close;
__sys_ksem_close;
_ksem_destroy;
__sys_ksem_destroy;
_ksem_getvalue;
__sys_ksem_getvalue;
_ksem_init;
__sys_ksem_init;
_ksem_open;
__sys_ksem_open;
_ksem_post;
__sys_ksem_post;
_ksem_timedwait;
__sys_ksem_timedwait;
_ksem_trywait;
__sys_ksem_trywait;
_ksem_unlink;
__sys_ksem_unlink;
_ksem_wait;
__sys_ksem_wait;
_ktrace;
__sys_ktrace;
_lchflags;
__sys_lchflags;
_lchmod;
__sys_lchmod;
_lchown;
__sys_lchown;
_lgetfh;
__sys_lgetfh;
_link;
__sys_link;
__sys_lio_listio;
_listen;
__sys_listen;
_lutimes;
__sys_lutimes;
_mac_syscall;
__sys_mac_syscall;
_madvise;
__sys_madvise;
_mincore;
__sys_mincore;
_minherit;
__sys_minherit;
_mkdir;
__sys_mkdir;
_mkfifo;
__sys_mkfifo;
_mknod;
__sys_mknod;
_mlock;
__sys_mlock;
_mlockall;
__sys_mlockall;
_mmap;
__sys_mmap;
_modfind;
__sys_modfind;
_modfnext;
__sys_modfnext;
_modnext;
__sys_modnext;
_modstat;
__sys_modstat;
_mount;
__sys_mount;
_mprotect;
__sys_mprotect;
_msgctl;
__sys_msgctl;
_msgget;
__sys_msgget;
_msgrcv;
__sys_msgrcv;
_msgsnd;
__sys_msgsnd;
_msgsys;
__sys_msgsys;
_msync;
__sys_msync;
_munlock;
__sys_munlock;
_munlockall;
__sys_munlockall;
_munmap;
__sys_munmap;
_nanosleep;
__sys_nanosleep;
_nfssvc;
__sys_nfssvc;
_nmount;
__sys_nmount;
_ntp_adjtime;
__sys_ntp_adjtime;
_ntp_gettime;
__sys_ntp_gettime;
_open;
__sys_open;
_openat;
__sys_openat;
_pathconf;
__sys_pathconf;
__sys_pdfork;
_pipe;
__sys_pipe;
_poll;
__sys_poll;
_ppoll;
__sys_ppoll;
_preadv;
__sys_preadv;
_procctl;
__sys_procctl;
_profil;
__sys_profil;
_pselect;
__sys_pselect;
_ptrace;
__sys_ptrace;
_pwritev;
__sys_pwritev;
_quotactl;
__sys_quotactl;
_read;
__sys_read;
_readlink;
__sys_readlink;
_readv;
__sys_readv;
_reboot;
__sys_reboot;
_recvfrom;
__sys_recvfrom;
_recvmsg;
__sys_recvmsg;
_rename;
__sys_rename;
_revoke;
__sys_revoke;
_rfork;
__sys_rfork;
_rmdir;
__sys_rmdir;
_rtprio;
__sys_rtprio;
_rtprio_thread;
__sys_rtprio_thread;
_sched_get_priority_max;
__sys_sched_get_priority_max;
_sched_get_priority_min;
__sys_sched_get_priority_min;
_sched_getparam;
__sys_sched_getparam;
_sched_getscheduler;
__sys_sched_getscheduler;
_sched_rr_get_interval;
__sys_sched_rr_get_interval;
_sched_setparam;
__sys_sched_setparam;
_sched_setscheduler;
__sys_sched_setscheduler;
_sched_yield;
__sys_sched_yield;
_select;
__sys_select;
_semget;
__sys_semget;
_semop;
__sys_semop;
_semsys;
__sys_semsys;
_sendfile;
__sys_sendfile;
_sendmsg;
__sys_sendmsg;
_sendto;
__sys_sendto;
_setaudit;
__sys_setaudit;
_setaudit_addr;
__sys_setaudit_addr;
_setauid;
__sys_setauid;
_setcontext;
__sys_setcontext;
_setegid;
__sys_setegid;
_seteuid;
__sys_seteuid;
_setgid;
__sys_setgid;
_setgroups;
__sys_setgroups;
_setitimer;
__sys_setitimer;
_setlogin;
__sys_setlogin;
_setpgid;
__sys_setpgid;
_setpriority;
__sys_setpriority;
_setregid;
__sys_setregid;
_setresgid;
__sys_setresgid;
_setresuid;
__sys_setresuid;
_setreuid;
__sys_setreuid;
_setrlimit;
__sys_setrlimit;
_setsid;
__sys_setsid;
_setsockopt;
__sys_setsockopt;
_settimeofday;
__sys_settimeofday;
_setuid;
__sys_setuid;
_shm_open;
__sys_shm_open;
__sys_shm_open2;
_shm_unlink;
__sys_shm_unlink;
_shmat;
__sys_shmat;
_shmctl;
__sys_shmctl;
_shmdt;
__sys_shmdt;
_shmget;
__sys_shmget;
_shmsys;
__sys_shmsys;
_shutdown;
__sys_shutdown;
_sigaction;
__sys_sigaction;
_sigaltstack;
__sys_sigaltstack;
_sigpending;
__sys_sigpending;
_sigprocmask;
__sys_sigprocmask;
_sigqueue;
__sys_sigqueue;
_sigreturn;
__sys_sigreturn;
_sigsuspend;
__sys_sigsuspend;
_sigtimedwait;
__sys_sigtimedwait;
_sigwait;
__sigwait;
__sys_sigwait;
_sigwaitinfo;
__sys_sigwaitinfo;
_socket;
__sys_socket;
_socketpair;
__sys_socketpair;
_statfs;
__sys_statfs;
_swapcontext;
__sys_swapcontext;
_swapoff;
__sys_swapoff;
_swapon;
__sys_swapon;
_symlink;
__sys_symlink;
_sync;
__sys_sync;
_sysarch;
__sys_sysarch;
_syscall;
__sys_syscall;
_thr_create;
__sys_thr_create;
_thr_exit;
__sys_thr_exit;
_thr_kill;
__sys_thr_kill;
_thr_kill2;
__sys_thr_kill2;
_thr_new;
__sys_thr_new;
_thr_self;
__sys_thr_self;
_thr_set_name;
__sys_thr_set_name;
_thr_suspend;
__sys_thr_suspend;
_thr_wake;
__sys_thr_wake;
_ktimer_create;
__sys_ktimer_create;
_ktimer_delete;
__sys_ktimer_delete;
_ktimer_getoverrun;
__sys_ktimer_getoverrun;
_ktimer_gettime;
__sys_ktimer_gettime;
_ktimer_settime;
__sys_ktimer_settime;
_umask;
__sys_umask;
_undelete;
__sys_undelete;
_unlink;
__sys_unlink;
_unmount;
__sys_unmount;
_utimes;
__sys_utimes;
_utrace;
__sys_utrace;
_uuidgen;
__sys_uuidgen;
_wait4;
__sys_wait4;
_wait6;
__sys_wait6;
_write;
__sys_write;
_writev;
__sys_writev;
__set_error_selector;
Add the new kernel-mode NFS Lock Manager. To use it instead of the user-mode lock manager, build a kernel with the NFSLOCKD option and add '-k' to 'rpc_lockd_flags' in rc.conf. Highlights include: * Thread-safe kernel RPC client - many threads can use the same RPC client handle safely with replies being de-multiplexed at the socket upcall (typically driven directly by the NIC interrupt) and handed off to whichever thread matches the reply. For UDP sockets, many RPC clients can share the same socket. This allows the use of a single privileged UDP port number to talk to an arbitrary number of remote hosts. * Single-threaded kernel RPC server. Adding support for multi-threaded server would be relatively straightforward and would follow approximately the Solaris KPI. A single thread should be sufficient for the NLM since it should rarely block in normal operation. * Kernel mode NLM server supporting cancel requests and granted callbacks. I've tested the NLM server reasonably extensively - it passes both my own tests and the NFS Connectathon locking tests running on Solaris, Mac OS X and Ubuntu Linux. * Userland NLM client supported. While the NLM server doesn't have support for the local NFS client's locking needs, it does have to field async replies and granted callbacks from remote NLMs that the local client has contacted. We relay these replies to the userland rpc.lockd over a local domain RPC socket. * Robust deadlock detection for the local lock manager. In particular it will detect deadlocks caused by a lock request that covers more than one blocking request. As required by the NLM protocol, all deadlock detection happens synchronously - a user is guaranteed that if a lock request isn't rejected immediately, the lock will eventually be granted. The old system allowed for a 'deferred deadlock' condition where a blocked lock request could wake up and find that some other deadlock-causing lock owner had beaten them to the lock. * Since both local and remote locks are managed by the same kernel locking code, local and remote processes can safely use file locks for mutual exclusion. Local processes have no fairness advantage compared to remote processes when contending to lock a region that has just been unlocked - the local lock manager enforces a strict first-come first-served model for both local and remote lockers. Sponsored by: Isilon Systems PR: 95247 107555 115524 116679 MFC after: 2 weeks
2008-03-26 15:23:12 +00:00
nlm_syscall;
Implement support for RPCSEC_GSS authentication to both the NFS client and server. This replaces the RPC implementation of the NFS client and server with the newer RPC implementation originally developed (actually ported from the userland sunrpc code) to support the NFS Lock Manager. I have tested this code extensively and I believe it is stable and that performance is at least equal to the legacy RPC implementation. The NFS code currently contains support for both the new RPC implementation and the older legacy implementation inherited from the original NFS codebase. The default is to use the new implementation - add the NFS_LEGACYRPC option to fall back to the old code. When I merge this support back to RELENG_7, I will probably change this so that users have to 'opt in' to get the new code. To use RPCSEC_GSS on either client or server, you must build a kernel which includes the KGSSAPI option and the crypto device. On the userland side, you must build at least a new libc, mountd, mount_nfs and gssd. You must install new versions of /etc/rc.d/gssd and /etc/rc.d/nfsd and add 'gssd_enable=YES' to /etc/rc.conf. As long as gssd is running, you should be able to mount an NFS filesystem from a server that requires RPCSEC_GSS authentication. The mount itself can happen without any kerberos credentials but all access to the filesystem will be denied unless the accessing user has a valid ticket file in the standard place (/tmp/krb5cc_<uid>). There is currently no support for situations where the ticket file is in a different place, such as when the user logged in via SSH and has delegated credentials from that login. This restriction is also present in Solaris and Linux. In theory, we could improve this in future, possibly using Brooks Davis' implementation of variant symlinks. Supporting RPCSEC_GSS on a server is nearly as simple. You must create service creds for the server in the form 'nfs/<fqdn>@<REALM>' and install them in /etc/krb5.keytab. The standard heimdal utility ktutil makes this fairly easy. After the service creds have been created, you can add a '-sec=krb5' option to /etc/exports and restart both mountd and nfsd. The only other difference an administrator should notice is that nfsd doesn't fork to create service threads any more. In normal operation, there will be two nfsd processes, one in userland waiting for TCP connections and one in the kernel handling requests. The latter process will create as many kthreads as required - these should be visible via 'top -H'. The code has some support for varying the number of service threads according to load but initially at least, nfsd uses a fixed number of threads according to the value supplied to its '-n' option. Sponsored by: Isilon Systems MFC after: 1 month
2008-11-03 10:38:00 +00:00
gssd_syscall;
Fix known issues which blow up the process after dlopen("libthr.so") (or loading a dso linked to libthr.so into process which was not linked against threading library). - Remove libthr interposers of the libc functions, including __error(). Instead, functions calls are indirected through the interposing table, similar to how pthread stubs in libc are already done. Libc by default points either to syscall trampolines or to existing libc implementations. On libthr load, libthr rewrites the pointers to the cancellable implementations already in libthr. The interposition table is separate from pthreads stubs indirection table to not pull pthreads stubs into static binaries. - Postpone the malloc(3) internal mutexes initialization until libthr is loaded. This avoids recursion between calloc(3) and static pthread_mutex_t initialization. - Reinstall signal handlers with wrapper on libthr load. The _rtld_is_dlopened(3) is used to avoid useless calls to sigaction(2) when libthr is statically referenced from the main binary. In the process, fix openat(2), swapcontext(2) and setcontext(2) interposing. The libc symbols were exported at different versions than libthr interposers. Export both libc and libthr versions from libc now, with default set to the higher version from libthr. Remove unused and disconnected swapcontext(3) userspace implementation from libc/gen. No objections from: deischen Tested by: pho, antoine (exp-run) (previous versions) Sponsored by: The FreeBSD Foundation MFC after: 1 week
2015-01-03 18:38:46 +00:00
__libc_interposing_slot;
__libc_sigwait;
_cpuset_getdomain;
__sys_cpuset_getdomain;
_cpuset_setdomain;
__sys_cpuset_setdomain;
rpctls_syscall;
};