aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/syscalls.master
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2017-05-23 09:29:05 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2017-05-23 09:29:05 +0000
commit69921123490b99c2588b0c743bc4af32bbe6601c (patch)
tree4828066c23bd9bbd1672af14fbf0a9e31e47f4a0 /sys/kern/syscalls.master
parent5f7c516f216995249523ed43e57e3f91bd8f5ff0 (diff)
downloadsrc-69921123490b99c2588b0c743bc4af32bbe6601c.tar.gz
src-69921123490b99c2588b0c743bc4af32bbe6601c.zip
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
Notes
Notes: svn path=/head/; revision=318736
Diffstat (limited to 'sys/kern/syscalls.master')
-rw-r--r--sys/kern/syscalls.master64
1 files changed, 42 insertions, 22 deletions
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index 999da9c884ce..ad0fdb27545f 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -12,7 +12,7 @@
; case where the event exists, but we don't want auditing, the
; event should be #defined to AUE_NULL in audit_kevents.h.
; type one of STD, OBSOL, UNIMPL, COMPAT, COMPAT4, COMPAT6,
-; COMPAT7, NODEF, NOARGS, NOPROTO, NOSTD
+; COMPAT7, COMPAT11, NODEF, NOARGS, NOPROTO, NOSTD
; The COMPAT* options may be combined with one or more NO*
; options separated by '|' with no spaces (e.g. COMPAT|NOARGS)
; name psuedo-prototype of syscall routine
@@ -29,6 +29,7 @@
; COMPAT6 included on COMPAT_FREEBSD6 #ifdef (FreeBSD 6 compat)
; COMPAT7 included on COMPAT_FREEBSD7 #ifdef (FreeBSD 7 compat)
; COMPAT10 included on COMPAT_FREEBSD10 #ifdef (FreeBSD 10 compat)
+; COMPAT11 included on COMPAT11 #ifdef (FreeBSD 11 compat)
; OBSOL obsolete, not included in system, only specifies name
; UNIMPL not implemented, placeholder only
; NOSTD implemented but as a lkm that can be statically
@@ -79,7 +80,7 @@
11 AUE_NULL OBSOL execv
12 AUE_CHDIR STD { int chdir(char *path); }
13 AUE_FCHDIR STD { int fchdir(int fd); }
-14 AUE_MKNOD STD { int mknod(char *path, int mode, int dev); }
+14 AUE_MKNOD COMPAT11 { int mknod(char *path, int mode, int dev); }
15 AUE_CHMOD STD { int chmod(char *path, int mode); }
16 AUE_CHOWN STD { int chown(char *path, int uid, int gid); }
17 AUE_NULL STD { int obreak(char *nsize); } break \
@@ -363,9 +364,12 @@
185 AUE_NULL UNIMPL lfs_markv
186 AUE_NULL UNIMPL lfs_segclean
187 AUE_NULL UNIMPL lfs_segwait
-188 AUE_STAT STD { int stat(char *path, struct stat *ub); }
-189 AUE_FSTAT STD { int fstat(int fd, struct stat *sb); }
-190 AUE_LSTAT STD { int lstat(char *path, struct stat *ub); }
+188 AUE_STAT COMPAT11 { int stat(char *path, \
+ struct freebsd11_stat *ub); }
+189 AUE_FSTAT COMPAT11 { int fstat(int fd, \
+ struct freebsd11_stat *sb); }
+190 AUE_LSTAT COMPAT11 { int lstat(char *path, \
+ struct freebsd11_stat *ub); }
191 AUE_PATHCONF STD { int pathconf(char *path, int name); }
192 AUE_FPATHCONF STD { int fpathconf(int fd, int name); }
193 AUE_NULL UNIMPL nosys
@@ -375,7 +379,7 @@
195 AUE_SETRLIMIT STD { int setrlimit(u_int which, \
struct rlimit *rlp); } setrlimit \
__setrlimit_args int
-196 AUE_GETDIRENTRIES STD { int getdirentries(int fd, char *buf, \
+196 AUE_GETDIRENTRIES COMPAT11 { int getdirentries(int fd, char *buf, \
u_int count, long *basep); }
197 AUE_MMAP COMPAT6 { caddr_t mmap(caddr_t addr, \
size_t len, int prot, int flags, int fd, \
@@ -496,7 +500,7 @@
269 AUE_NULL UNIMPL nosys
270 AUE_NULL UNIMPL nosys
271 AUE_NULL UNIMPL nosys
-272 AUE_O_GETDENTS STD { int getdents(int fd, char *buf, \
+272 AUE_O_GETDENTS COMPAT11 { int getdents(int fd, char *buf, \
size_t count); }
273 AUE_NULL UNIMPL nosys
274 AUE_LCHMOD STD { int lchmod(char *path, mode_t mode); }
@@ -507,9 +511,9 @@
struct timeval *tptr); }
277 AUE_MSYNC NOPROTO { int msync(void *addr, size_t len, \
int flags); } netbsd_msync msync_args int
-278 AUE_STAT STD { int nstat(char *path, struct nstat *ub); }
-279 AUE_FSTAT STD { int nfstat(int fd, struct nstat *sb); }
-280 AUE_LSTAT STD { int nlstat(char *path, struct nstat *ub); }
+278 AUE_STAT COMPAT11 { int nstat(char *path, struct nstat *ub); }
+279 AUE_FSTAT COMPAT11 { int nfstat(int fd, struct nstat *sb); }
+280 AUE_LSTAT COMPAT11 { int nlstat(char *path, struct nstat *ub); }
281 AUE_NULL UNIMPL nosys
282 AUE_NULL UNIMPL nosys
283 AUE_NULL UNIMPL nosys
@@ -535,8 +539,8 @@
struct ostatfs *buf); }
298 AUE_FHOPEN STD { int fhopen(const struct fhandle *u_fhp, \
int flags); }
-299 AUE_FHSTAT STD { int fhstat(const struct fhandle *u_fhp, \
- struct stat *sb); }
+299 AUE_FHSTAT COMPAT11 { int fhstat(const struct fhandle *u_fhp, \
+ struct freebsd11_stat *sb); }
; syscall numbers for FreeBSD
300 AUE_NULL STD { int modnext(int modid); }
301 AUE_NULL STD { int modstat(int modid, \
@@ -707,13 +711,14 @@
off_t *sbytes, int flags); }
394 AUE_NULL STD { int mac_syscall(const char *policy, \
int call, void *arg); }
-395 AUE_GETFSSTAT STD { int getfsstat(struct statfs *buf, \
+395 AUE_GETFSSTAT COMPAT11 { int getfsstat(struct freebsd11_statfs *buf, \
long bufsize, int mode); }
-396 AUE_STATFS STD { int statfs(char *path, \
- struct statfs *buf); }
-397 AUE_FSTATFS STD { int fstatfs(int fd, struct statfs *buf); }
-398 AUE_FHSTATFS STD { int fhstatfs(const struct fhandle *u_fhp, \
- struct statfs *buf); }
+396 AUE_STATFS COMPAT11 { int statfs(char *path, \
+ struct freebsd11_statfs *buf); }
+397 AUE_FSTATFS COMPAT11 { int fstatfs(int fd, \
+ struct freebsd11_statfs *buf); }
+398 AUE_FHSTATFS COMPAT11 { int fhstatfs(const struct fhandle *u_fhp, \
+ struct freebsd11_statfs *buf); }
399 AUE_NULL UNIMPL nosys
400 AUE_SEMCLOSE NOSTD { int ksem_close(semid_t id); }
401 AUE_SEMPOST NOSTD { int ksem_post(semid_t id); }
@@ -883,16 +888,16 @@
gid_t gid, int flag); }
492 AUE_FEXECVE STD { int fexecve(int fd, char **argv, \
char **envv); }
-493 AUE_FSTATAT STD { int fstatat(int fd, char *path, \
- struct stat *buf, int flag); }
+493 AUE_FSTATAT COMPAT11 { int fstatat(int fd, char *path, \
+ struct freebsd11_stat *buf, int flag); }
494 AUE_FUTIMESAT STD { int futimesat(int fd, char *path, \
struct timeval *times); }
495 AUE_LINKAT STD { int linkat(int fd1, char *path1, int fd2, \
char *path2, int flag); }
496 AUE_MKDIRAT STD { int mkdirat(int fd, char *path, mode_t mode); }
497 AUE_MKFIFOAT STD { int mkfifoat(int fd, char *path, mode_t mode); }
-498 AUE_MKNODAT STD { int mknodat(int fd, char *path, mode_t mode, \
- dev_t dev); }
+498 AUE_MKNODAT COMPAT11 { int mknodat(int fd, char *path, mode_t mode, \
+ uint32_t dev); }
; XXX: see the comment for open
499 AUE_OPENAT_RWTC STD { int openat(int fd, char *path, int flag, \
mode_t mode); }
@@ -997,6 +1002,21 @@
id_t id, const struct \
vm_domain_policy_entry *policy); }
550 AUE_FSYNC STD { int fdatasync(int fd); }
+551 AUE_FSTAT STD { int fstat(int fd, struct stat *sb); }
+552 AUE_FSTATAT STD { int fstatat(int fd, char *path, \
+ struct stat *buf, int flag); }
+553 AUE_FHSTAT STD { int fhstat(const struct fhandle *u_fhp, \
+ struct stat *sb); }
+554 AUE_GETDIRENTRIES STD { ssize_t getdirentries(int fd, char *buf, \
+ size_t count, off_t *basep); }
+555 AUE_STATFS STD { int statfs(char *path, struct statfs *buf); }
+556 AUE_FSTATFS STD { int fstatfs(int fd, struct statfs *buf); }
+557 AUE_GETFSSTAT STD { int getfsstat(struct statfs *buf, \
+ long bufsize, int mode); }
+558 AUE_FHSTATFS STD { int fhstatfs(const struct fhandle *u_fhp, \
+ struct statfs *buf); }
+559 AUE_MKNODAT STD { int mknodat(int fd, char *path, mode_t mode, \
+ dev_t dev); }
; Please copy any additions and changes to the following compatability tables:
; sys/compat/freebsd32/syscalls.master