summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-08-14 05:26:14 +0000
committerguenther <guenther@openbsd.org>2013-08-14 05:26:14 +0000
commit97f309f1cb2a852e6bad8d8b433b7c1a4949042c (patch)
treef3a66c001701eb3168b24ef496718fa2647af6d7
parentdrm_heap.c is no longer needed (diff)
downloadwireguard-openbsd-97f309f1cb2a852e6bad8d8b433b7c1a4949042c.tar.xz
wireguard-openbsd-97f309f1cb2a852e6bad8d8b433b7c1a4949042c.zip
The last user of the old __tfork() was updated to the current one,
so COMPAT_O51 can go. The complete ABI role means COMPAT_O53 can be removed as well. ok jsing@ tedu@
-rw-r--r--sys/conf/GENERIC4
-rw-r--r--sys/kern/kern_fork.c27
-rw-r--r--sys/kern/syscalls.conf4
-rw-r--r--sys/kern/syscalls.master15
-rw-r--r--sys/kern/vfs_syscalls.c190
-rw-r--r--sys/sys/mount.h36
-rw-r--r--sys/sys/unistd.h9
7 files changed, 13 insertions, 272 deletions
diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC
index 2e0fc9d8616..55ef74cac56 100644
--- a/sys/conf/GENERIC
+++ b/sys/conf/GENERIC
@@ -1,4 +1,4 @@
-# $OpenBSD: GENERIC,v 1.198 2013/08/07 22:00:29 naddy Exp $
+# $OpenBSD: GENERIC,v 1.199 2013/08/14 05:28:04 guenther Exp $
#
# Machine-independent option; used by all architectures for their
# GENERIC kernel
@@ -29,8 +29,6 @@ option SYSVSHM # System V-like memory sharing
option UVM_SWAP_ENCRYPT# support encryption of pages going to swap
option COMPAT_43 # Kernel compatibility with 4.3BSD
-option COMPAT_O51 # Kernel compatibility with OpenBSD 5.1
-option COMPAT_O53 # Kernel compatibility with OpenBSD 5.3
option LKM # loadable kernel modules
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 48fea3532fc..fb04e7befc0 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kern_fork.c,v 1.152 2013/06/11 13:00:31 tedu Exp $ */
+/* $OpenBSD: kern_fork.c,v 1.153 2013/08/14 05:26:14 guenther Exp $ */
/* $NetBSD: kern_fork.c,v 1.29 1996/02/09 18:59:34 christos Exp $ */
/*
@@ -140,31 +140,6 @@ sys___tfork(struct proc *p, void *v, register_t *retval)
tfork_child_return, param.tf_tcb, retval, NULL));
}
-#ifdef COMPAT_O51
-int
-compat_o51_sys___tfork(struct proc *p, void *v, register_t *retval)
-{
- struct compat_o51_sys___tfork_args /* {
- syscallarg(struct __tfork51) *param;
- } */ *uap = v;
- struct __tfork51 param;
- int flags;
- int error;
-
- if ((error = copyin(SCARG(uap, param), &param, sizeof(param))))
- return (error);
-
- if (param.tf_flags != 0)
- return (EINVAL);
-
- flags = FORK_TFORK | FORK_THREAD | FORK_SIGHAND | FORK_SHAREVM
- | FORK_NOZOMBIE | FORK_SHAREFILES;
-
- return (fork1(p, 0, flags, NULL, param.tf_tid, tfork_child_return,
- param.tf_tcb, retval, NULL));
-}
-#endif
-
void
tfork_child_return(void *arg)
{
diff --git a/sys/kern/syscalls.conf b/sys/kern/syscalls.conf
index f83c66f588b..1d1f7a45cf7 100644
--- a/sys/kern/syscalls.conf
+++ b/sys/kern/syscalls.conf
@@ -1,4 +1,4 @@
-# $OpenBSD: syscalls.conf,v 1.18 2013/08/13 05:52:24 guenther Exp $
+# $OpenBSD: syscalls.conf,v 1.19 2013/08/14 05:26:14 guenther Exp $
# $NetBSD: syscalls.conf,v 1.2 1994/10/26 06:45:57 cgd Exp $
sysnames="syscalls.c"
@@ -9,7 +9,7 @@ sysarghdr="../sys/syscallargs.h"
# Any additions to the next line for options that are required for the
# (new) kernel to boot an existing userland must be coordinated with
# the snapshot builders
-compatopts="compat_o51 compat_o53 t32"
+compatopts="t32"
libcompatopts=""
switchname="sysent"
diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master
index e237a76ee5e..b2b27eef986 100644
--- a/sys/kern/syscalls.master
+++ b/sys/kern/syscalls.master
@@ -1,4 +1,4 @@
-; $OpenBSD: syscalls.master,v 1.134 2013/08/13 05:52:24 guenther Exp $
+; $OpenBSD: syscalls.master,v 1.135 2013/08/14 05:26:14 guenther Exp $
; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -555,13 +555,10 @@
304 STD { int sys___getcwd(char *buf, size_t len); }
305 STD { int sys_adjfreq(const int64_t *freq, \
int64_t *oldfreq); }
-306 COMPAT_O53 { int sys_getfsstat(struct statfs53 *buf, \
- size_t bufsize, int flags); }
-307 COMPAT_O53 { int sys_statfs(const char *path, \
- struct statfs53 *buf); }
-308 COMPAT_O53 { int sys_fstatfs(int fd, struct statfs53 *buf); }
-309 COMPAT_O53 { int sys_fhstatfs(const fhandle_t *fhp, \
- struct statfs53 *buf); }
+306 OBSOL getfsstat53
+307 OBSOL statfs53
+308 OBSOL fstatfs53
+309 OBSOL fhstatfs53
310 STD { int sys_setrtable(int rtableid); }
311 STD { int sys_getrtable(void); }
312 T32 { int sys_getdirentries(int fd, char *buf, \
@@ -596,6 +593,6 @@
const struct timespec32 *times, int flag); }
327 T32 { int sys_futimens(int fd, \
const struct timespec32 *times); }
-328 COMPAT_O51 { int sys___tfork(struct __tfork51 *param); }
+328 OBSOL __tfork51
329 STD NOLOCK { void sys___set_tcb(void *tcb); }
330 STD NOLOCK { void *sys___get_tcb(void); }
diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c
index 1b4af5c0a46..aaa87bb2739 100644
--- a/sys/kern/vfs_syscalls.c
+++ b/sys/kern/vfs_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vfs_syscalls.c,v 1.195 2013/08/13 05:52:24 guenther Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.196 2013/08/14 05:26:14 guenther Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
@@ -68,9 +68,6 @@ static int change_dir(struct nameidata *, struct proc *);
void checkdirs(struct vnode *);
int copyout_statfs(struct statfs *, void *, struct proc *);
-#ifdef COMPAT_O53
-int copyout_statfs53(struct statfs *, void *, struct proc *);
-#endif
int doopenat(struct proc *, int, const char *, int, mode_t, register_t *);
int domknodat(struct proc *, int, const char *, mode_t, dev_t);
@@ -682,191 +679,6 @@ sys_getfsstat(struct proc *p, void *v, register_t *retval)
return (0);
}
-#ifdef COMPAT_O53
-int
-copyout_statfs53(struct statfs *sp, void *uaddr, struct proc *p)
-{
- struct statfs53 st;
-
- /* make sure any padding in the changed area is zeroed */
- memset(&st, 0, sizeof(st));
- memcpy(&st, sp, offsetof(struct statfs53, f_owner) +
- sizeof(st.f_owner));
- st.f_ctime = sp->f_ctime;
- memcpy(&st.f_fstypename, &sp->f_fstypename, sizeof(st.f_fstypename));
- memcpy(&st.f_mntonname, &sp->f_mntonname, sizeof(st.f_mntonname));
- memcpy(&st.f_mntfromname, &sp->f_mntfromname, sizeof(st.f_mntfromname));
- memcpy(&st.mount_info, &sp->mount_info, sizeof(st.mount_info));
-
- /* Don't let non-root see filesystem id (for NFS security) */
- if (suser(p, 0))
- memset(&st.f_fsid, 0, sizeof(st.f_fsid));
-
- return (copyout(&st, uaddr, sizeof(st)));
-}
-
-/*
- * Get filesystem statistics.
- */
-/* ARGSUSED */
-int
-compat_o53_sys_statfs(struct proc *p, void *v, register_t *retval)
-{
- struct compat_o53_sys_statfs_args /* {
- syscallarg(const char *) path;
- syscallarg(struct statfs53 *) buf;
- } */ *uap = v;
- struct mount *mp;
- struct statfs *sp;
- int error;
- struct nameidata nd;
-
- NDINIT(&nd, LOOKUP, FOLLOW, UIO_USERSPACE, SCARG(uap, path), p);
- if ((error = namei(&nd)) != 0)
- return (error);
- mp = nd.ni_vp->v_mount;
- sp = &mp->mnt_stat;
- vrele(nd.ni_vp);
- if ((error = VFS_STATFS(mp, sp, p)) != 0)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-
- return (copyout_statfs53(sp, SCARG(uap, buf), p));
-}
-
-/*
- * Get filesystem statistics.
- */
-/* ARGSUSED */
-int
-compat_o53_sys_fstatfs(struct proc *p, void *v, register_t *retval)
-{
- struct compat_o53_sys_fstatfs_args /* {
- syscallarg(int) fd;
- syscallarg(struct statfs53 *) buf;
- } */ *uap = v;
- struct file *fp;
- struct mount *mp;
- struct statfs *sp;
- int error;
-
- if ((error = getvnode(p->p_fd, SCARG(uap, fd), &fp)) != 0)
- return (error);
- mp = ((struct vnode *)fp->f_data)->v_mount;
- if (!mp) {
- FRELE(fp, p);
- return (ENOENT);
- }
- sp = &mp->mnt_stat;
- error = VFS_STATFS(mp, sp, p);
- FRELE(fp, p);
- if (error)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-
- return (copyout_statfs53(sp, SCARG(uap, buf), p));
-}
-
-int
-compat_o53_sys_getfsstat(struct proc *p, void *v, register_t *retval)
-{
- struct compat_o53_sys_getfsstat_args /* {
- syscallarg(struct statfs53 *) buf;
- syscallarg(size_t) bufsize;
- syscallarg(int) flags;
- } */ *uap = v;
- struct mount *mp, *nmp;
- struct statfs *sp;
- struct statfs53 *sfsp;
- size_t count, maxcount;
- int error, flags = SCARG(uap, flags);
-
- maxcount = SCARG(uap, bufsize) / sizeof(struct statfs53);
- sfsp = SCARG(uap, buf);
- count = 0;
-
- for (mp = CIRCLEQ_FIRST(&mountlist); mp != CIRCLEQ_END(&mountlist);
- mp = nmp) {
- if (vfs_busy(mp, VB_READ|VB_NOWAIT)) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- continue;
- }
- if (sfsp && count < maxcount) {
- sp = &mp->mnt_stat;
-
- /* Refresh stats unless MNT_NOWAIT is specified */
- if (flags != MNT_NOWAIT &&
- flags != MNT_LAZY &&
- (flags == MNT_WAIT ||
- flags == 0) &&
- (error = VFS_STATFS(mp, sp, p))) {
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- vfs_unbusy(mp);
- continue;
- }
-
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
-#if notyet
- if (mp->mnt_flag & MNT_SOFTDEP)
- sp->f_eflags = STATFS_SOFTUPD;
-#endif
- error = (copyout_statfs53(sp, sfsp, p));
- if (error) {
- vfs_unbusy(mp);
- return (error);
- }
- sfsp++;
- }
- count++;
- nmp = CIRCLEQ_NEXT(mp, mnt_list);
- vfs_unbusy(mp);
- }
-
- if (sfsp && count > maxcount)
- *retval = maxcount;
- else
- *retval = count;
-
- return (0);
-}
-
-/* ARGSUSED */
-int
-compat_o53_sys_fhstatfs(struct proc *p, void *v, register_t *retval)
-{
- struct compat_o53_sys_fhstatfs_args /* {
- syscallarg(const fhandle_t *) fhp;
- syscallarg(struct statfs53 *) buf;
- } */ *uap = v;
- struct statfs *sp;
- fhandle_t fh;
- struct mount *mp;
- struct vnode *vp;
- int error;
-
- /*
- * Must be super user
- */
- if ((error = suser(p, 0)))
- return (error);
-
- if ((error = copyin(SCARG(uap, fhp), &fh, sizeof(fhandle_t))) != 0)
- return (error);
-
- if ((mp = vfs_getvfs(&fh.fh_fsid)) == NULL)
- return (ESTALE);
- if ((error = VFS_FHTOVP(mp, &fh.fh_fid, &vp)))
- return (error);
- mp = vp->v_mount;
- sp = &mp->mnt_stat;
- vput(vp);
- if ((error = VFS_STATFS(mp, sp, p)) != 0)
- return (error);
- sp->f_flags = mp->mnt_flag & MNT_VISFLAGMASK;
- return (copyout_statfs53(sp, SCARG(uap, buf), p));
-}
-#endif /* COMPAT_O53 */
-
/*
* Change current working directory to a given file descriptor.
*/
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 5fe8c75e35a..2bd10809c40 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: mount.h,v 1.114 2013/07/09 15:37:43 beck Exp $ */
+/* $OpenBSD: mount.h,v 1.115 2013/08/14 05:26:14 guenther Exp $ */
/* $NetBSD: mount.h,v 1.48 1996/02/18 11:55:47 fvdl Exp $ */
/*
@@ -319,40 +319,6 @@ struct statfs {
union mount_info mount_info; /* per-filesystem mount options */
};
-#ifdef _KERNEL
-/* COMPAT_O53 version without f_mntfromspec and smaller f_ctime */
-struct statfs53 {
- u_int32_t f_flags; /* copy of mount flags */
- u_int32_t f_bsize; /* file system block size */
- u_int32_t f_iosize; /* optimal transfer block size */
-
- /* unit is f_bsize */
- u_int64_t f_blocks; /* total data blocks in file system */
- u_int64_t f_bfree; /* free blocks in fs */
- int64_t f_bavail; /* free blocks avail to non-superuser */
-
- u_int64_t f_files; /* total file nodes in file system */
- u_int64_t f_ffree; /* free file nodes in fs */
- int64_t f_favail; /* free file nodes avail to non-root */
-
- u_int64_t f_syncwrites; /* count of sync writes since mount */
- u_int64_t f_syncreads; /* count of sync reads since mount */
- u_int64_t f_asyncwrites; /* count of async writes since mount */
- u_int64_t f_asyncreads; /* count of async reads since mount */
-
- fsid_t f_fsid; /* file system id */
- u_int32_t f_namemax; /* maximum filename length */
- uid_t f_owner; /* user that mounted the file system */
- u_int32_t f_ctime; /* last mount [-u] time */
- u_int32_t f_spare[3]; /* spare for later */
-
- char f_fstypename[MFSNAMELEN]; /* fs type name */
- char f_mntonname[MNAMELEN]; /* directory on which mounted */
- char f_mntfromname[MNAMELEN]; /* mounted file system */
- union mount_info mount_info; /* per-filesystem mount options */
-};
-#endif /* _KERNEL */
-
/*
* File system types.
diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h
index ac174567cdd..855320d497f 100644
--- a/sys/sys/unistd.h
+++ b/sys/sys/unistd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: unistd.h,v 1.28 2013/03/28 03:29:44 guenther Exp $ */
+/* $OpenBSD: unistd.h,v 1.29 2013/08/14 05:26:14 guenther Exp $ */
/* $NetBSD: unistd.h,v 1.10 1994/06/29 06:46:06 cgd Exp $ */
/*
@@ -68,13 +68,6 @@ struct __tfork {
pid_t *tf_tid;
void *tf_stack;
};
-
-/* COMPAT_O51 */
-struct __tfork51 {
- void *tf_tcb;
- pid_t *tf_tid;
- int tf_flags;
-};
#endif
/* the pathconf(2) variable values are part of the ABI */