-/* $OpenBSD: trap.c,v 1.156 2021/12/23 18:50:32 guenther Exp $ */
+/* $OpenBSD: trap.c,v 1.157 2022/07/20 05:56:34 deraadt Exp $ */
/*
* Copyright (c) 1998-2004 Michael Shalayeff
case SYS_pwrite: i = 4; break;
case SYS_mquery:
case SYS_mmap: i = 6; break;
-#ifdef SYS_pad_lseek
- case SYS_pad_lseek: retq = 0;
- case SYS_pad_truncate:
- case SYS_pad_ftruncate: i = 2; break;
- case SYS_pad_preadv:
- case SYS_pad_pwritev:
- case SYS_pad_pread:
- case SYS_pad_pwrite: i = 4; break;
- case SYS_pad_mquery:
- case SYS_pad_mmap: i = 6; break;
-#endif
}
if (i) {
-/* $OpenBSD: kern_ktrace.c,v 1.106 2022/02/22 17:14:14 deraadt Exp $ */
+/* $OpenBSD: kern_ktrace.c,v 1.107 2022/07/20 05:56:36 deraadt Exp $ */
/* $NetBSD: kern_ktrace.c,v 1.23 1996/02/09 18:59:36 christos Exp $ */
/*
else if (code == SYS_lseek)
/* the one exception: lseek on ILP32 needs more */
len = sizeof(long long);
-#if 1
- else if (code == SYS_pad_lseek)
- len = sizeof(long long);
-#endif
else
len = sizeof(register_t);
ktrwrite2(p, &kth, &ktp, sizeof(ktp), retval, len);
-/* $OpenBSD: vfs_syscalls.c,v 1.357 2022/05/23 15:17:11 millert Exp $ */
+/* $OpenBSD: vfs_syscalls.c,v 1.358 2022/07/20 05:56:36 deraadt Exp $ */
/* $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $ */
/*
return (error);
}
-#if 1
-int
-sys_pad_lseek(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_lseek_args *uap = v;
- struct sys_lseek_args unpad;
-
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, offset) = SCARG(uap, offset);
- SCARG(&unpad, whence) = SCARG(uap, whence);
- return sys_lseek(p, &unpad, retval);
-}
-#endif
-
/*
* Check access permissions.
*/
return (error);
}
-#if 1
-int
-sys_pad_truncate(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_truncate_args *uap = v;
- struct sys_truncate_args unpad;
-
- SCARG(&unpad, path) = SCARG(uap, path);
- SCARG(&unpad, length) = SCARG(uap, length);
- return sys_truncate(p, &unpad, retval);
-}
-
-int
-sys_pad_ftruncate(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_ftruncate_args *uap = v;
- struct sys_ftruncate_args unpad;
-
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, length) = SCARG(uap, length);
- return sys_ftruncate(p, &unpad, retval);
-}
-#endif
-
/*
* Sync an open file.
*/
iovec_free(iov, iovcnt);
return (error);
}
-
-#if 1
-int
-sys_pad_pread(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_pread_args *uap = v;
- struct sys_pread_args unpad;
-
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, buf) = SCARG(uap, buf);
- SCARG(&unpad, nbyte) = SCARG(uap, nbyte);
- SCARG(&unpad, offset) = SCARG(uap, offset);
- return sys_pread(p, &unpad, retval);
-}
-
-int
-sys_pad_preadv(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_preadv_args *uap = v;
- struct sys_preadv_args unpad;
-
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, iovp) = SCARG(uap, iovp);
- SCARG(&unpad, iovcnt) = SCARG(uap, iovcnt);
- SCARG(&unpad, offset) = SCARG(uap, offset);
- return sys_preadv(p, &unpad, retval);
-}
-
-int
-sys_pad_pwrite(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_pwrite_args *uap = v;
- struct sys_pwrite_args unpad;
-
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, buf) = SCARG(uap, buf);
- SCARG(&unpad, nbyte) = SCARG(uap, nbyte);
- SCARG(&unpad, offset) = SCARG(uap, offset);
- return sys_pwrite(p, &unpad, retval);
-}
-
-int
-sys_pad_pwritev(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_pwritev_args *uap = v;
- struct sys_pwritev_args unpad;
-
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, iovp) = SCARG(uap, iovp);
- SCARG(&unpad, iovcnt) = SCARG(uap, iovcnt);
- SCARG(&unpad, offset) = SCARG(uap, offset);
- return sys_pwritev(p, &unpad, retval);
-}
-#endif
-/* $OpenBSD: uvm_mmap.c,v 1.170 2022/06/27 14:26:06 cheloha Exp $ */
+/* $OpenBSD: uvm_mmap.c,v 1.171 2022/07/20 05:56:36 deraadt Exp $ */
/* $NetBSD: uvm_mmap.c,v 1.49 2001/02/18 21:19:08 chs Exp $ */
/*
return error;
}
-#if 1
-int
-sys_pad_mquery(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_mquery_args *uap = v;
- struct sys_mquery_args unpad;
-
- SCARG(&unpad, addr) = SCARG(uap, addr);
- SCARG(&unpad, len) = SCARG(uap, len);
- SCARG(&unpad, prot) = SCARG(uap, prot);
- SCARG(&unpad, flags) = SCARG(uap, flags);
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, pos) = SCARG(uap, pos);
- return sys_mquery(p, &unpad, retval);
-}
-
-int
-sys_pad_mmap(struct proc *p, void *v, register_t *retval)
-{
- struct sys_pad_mmap_args *uap = v;
- struct sys_mmap_args unpad;
-
- SCARG(&unpad, addr) = SCARG(uap, addr);
- SCARG(&unpad, len) = SCARG(uap, len);
- SCARG(&unpad, prot) = SCARG(uap, prot);
- SCARG(&unpad, flags) = SCARG(uap, flags);
- SCARG(&unpad, fd) = SCARG(uap, fd);
- SCARG(&unpad, pos) = SCARG(uap, pos);
- return sys_mmap(p, &unpad, retval);
-}
-#endif
-
/*
* sys_msync: the msync system call (a front-end for flush)
*/
-/* $OpenBSD: kdump.c,v 1.148 2022/02/22 17:31:31 deraadt Exp $ */
+/* $OpenBSD: kdump.c,v 1.149 2022/07/20 05:56:36 deraadt Exp $ */
/*-
* Copyright (c) 1988, 1993
[SYS_sysarch] = { Pdecint, Pptr },
[SYS_pread] = { Pfd, Pptr, Pbigsize, Poff_t, END64 },
[SYS_pwrite] = { Pfd, Pptr, Pbigsize, Poff_t, END64 },
-#ifdef SYS_pad_pread
- [SYS_pad_pread] = { Pfd, Pptr, Pbigsize, PAD, Poff_t },
- [SYS_pad_pwrite] = { Pfd, Pptr, Pbigsize, PAD, Poff_t },
-#endif
[SYS_setgid] = { Gidname },
[SYS_setegid] = { Gidname },
[SYS_seteuid] = { Uidname },
[SYS_lseek] = { Pfd, Poff_t, Whencename, END64 },
[SYS_truncate] = { Ppath, Poff_t, END64 },
[SYS_ftruncate] = { Pfd, Poff_t, END64 },
-#ifdef SYS_pad_mmap
- [SYS_pad_mmap] = { Pptr, Pbigsize, Mmapprotname, Mmapflagsname, Pfd, PAD, Poff_t },
- [SYS_pad_lseek] = { Pfd, PAD, Poff_t, Whencename },
- [SYS_pad_truncate] = { Ppath, PAD, Poff_t },
- [SYS_pad_ftruncate] = { Pfd, PAD, Poff_t },
-#endif
[SYS_sysctl] = { Pptr, Pcount, Pptr, Pptr, Pptr, Psize },
[SYS_mlock] = { Pptr, Pbigsize },
[SYS_munlock] = { Pptr, Pbigsize },
[SYS_fhopen] = { Pptr, Openflagsname },
[SYS_preadv] = { Pfd, Pptr, Pcount, Poff_t, END64 },
[SYS_pwritev] = { Pfd, Pptr, Pcount, Poff_t, END64 },
-#ifdef SYS_pad_preadv
- [SYS_pad_preadv] = { Pfd, Pptr, Pcount, PAD, Poff_t },
- [SYS_pad_pwritev] = { Pfd, Pptr, Pcount, PAD, Poff_t },
-#endif
[SYS_mlockall] = { Mlockallname },
[SYS_getresuid] = { Pptr, Pptr, Pptr },
[SYS_setresuid] = { Uidname, Uidname, Uidname },
[SYS_getresgid] = { Pptr, Pptr, Pptr },
[SYS_setresgid] = { Gidname, Gidname, Gidname },
[SYS_mquery] = { Pptr, Pbigsize, Mmapprotname, Mmapflagsname, Pfd, Poff_t, END64 },
-#ifdef SYS_pad_mquery
- [SYS_pad_mquery] = { Pptr, Pbigsize, Mmapprotname, Mmapflagsname, Pfd, PAD, Poff_t },
-#endif
[SYS_closefrom] = { Pfd },
[SYS_sigaltstack] = { Pptr, Pptr },
[SYS_shmget] = { Pkey_t, Pbigsize, Semgetname },
if (fancy) {
switch (code) {
case SYS_lseek:
-#ifdef SYS_pad_lseek
- case SYS_pad_lseek:
-#endif
(void)printf("%lld", retll);
if (retll < 0 || retll > 9)
(void)printf("/%#llx", retll);