CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: maxv Date: Wed Aug 9 18:55:21 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_misc.c Log Message: Remove __i386__. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/compat/ibcs2/ibcs2_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_misc.c diff -u src/sys/compat/ibcs2/ibcs2_misc.c:1.114 src/sys/compat/ibcs2/ibcs2_misc.c:1.115 --- src/sys/compat/ibcs2/ibcs2_misc.c:1.114 Fri Jul 28 15:34:06 2017 +++ src/sys/compat/ibcs2/ibcs2_misc.c Wed Aug 9 18:55:21 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_misc.c,v 1.114 2017/07/28 15:34:06 riastradh Exp $ */ +/* $NetBSD: ibcs2_misc.c,v 1.115 2017/08/09 18:55:21 maxv Exp $ */ /* * Copyright (c) 1992, 1993 @@ -95,7 +95,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.114 2017/07/28 15:34:06 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c,v 1.115 2017/08/09 18:55:21 maxv Exp $"); #include #include @@ -135,10 +135,6 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_misc.c #include #include -#if defined(__i386__) -#include -#endif - #include #include #include @@ -208,29 +204,16 @@ ibcs2_sys_ulimit(struct lwp *l, const st int ibcs2_sys_waitsys(struct lwp *l, const struct ibcs2_sys_waitsys_args *uap, register_t *retval) { -#if defined(__i386__) /* { syscallarg(int) a1; syscallarg(int) a2; syscallarg(int) a3; } */ -#endif int error, options, status, pid; -#if defined(__i386__) -#define WAITPID_EFLAGS 0x8c4 /* OF, SF, ZF, PF */ - if ((l->l_md.md_regs->tf_eflags & WAITPID_EFLAGS) == WAITPID_EFLAGS) { - /* waitpid */ - pid = SCARG(uap, a1); - options = SCARG(uap, a3); - } else { -#endif - /* wait */ - pid = WAIT_ANY; - options = 0; -#if defined(__i386__) - } -#endif + /* wait */ + pid = WAIT_ANY; + options = 0; error = do_sys_wait(, , options, NULL); retval[0] = pid;
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riastradh Date: Sat Jul 29 01:14:00 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_stat.c Log Message: Little happy on the commit trigger. Actually use the out label. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/compat/ibcs2/ibcs2_stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_stat.c diff -u src/sys/compat/ibcs2/ibcs2_stat.c:1.49 src/sys/compat/ibcs2/ibcs2_stat.c:1.50 --- src/sys/compat/ibcs2/ibcs2_stat.c:1.49 Sat Jul 29 01:05:54 2017 +++ src/sys/compat/ibcs2/ibcs2_stat.c Sat Jul 29 01:14:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_stat.c,v 1.49 2017/07/29 01:05:54 riastradh Exp $ */ +/* $NetBSD: ibcs2_stat.c,v 1.50 2017/07/29 01:14:00 riastradh Exp $ */ /* * Copyright (c) 1995, 1998 Scott Bartram * All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.49 2017/07/29 01:05:54 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.50 2017/07/29 01:14:00 riastradh Exp $"); #include #include @@ -203,7 +203,7 @@ ibcs2_sys_statvfs(struct lwp *l, const s mp = vp->v_mount; sp = >mnt_stat; if ((error = VFS_STATVFS(mp, sp)) != 0) - return (error); + goto out; sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; error = cvt_statvfs(sp, (void *)SCARG(uap, buf), sizeof(struct ibcs2_statvfs));
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riastradh Date: Sat Jul 29 01:05:54 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_stat.c Log Message: Don't drop vnode ref until we're done with mount in ibcs2_stat(v)fs. Nothing else guarantees the mount will stick around. >From Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/compat/ibcs2/ibcs2_stat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_stat.c diff -u src/sys/compat/ibcs2/ibcs2_stat.c:1.48 src/sys/compat/ibcs2/ibcs2_stat.c:1.49 --- src/sys/compat/ibcs2/ibcs2_stat.c:1.48 Fri Sep 5 09:21:54 2014 +++ src/sys/compat/ibcs2/ibcs2_stat.c Sat Jul 29 01:05:54 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_stat.c,v 1.48 2014/09/05 09:21:54 matt Exp $ */ +/* $NetBSD: ibcs2_stat.c,v 1.49 2017/07/29 01:05:54 riastradh Exp $ */ /* * Copyright (c) 1995, 1998 Scott Bartram * All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.48 2014/09/05 09:21:54 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_stat.c,v 1.49 2017/07/29 01:05:54 riastradh Exp $"); #include #include @@ -147,11 +147,13 @@ ibcs2_sys_statfs(struct lwp *l, const st return (error); mp = vp->v_mount; sp = >mnt_stat; - vrele(vp); if ((error = VFS_STATVFS(mp, sp)) != 0) - return (error); + goto out; sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; - return cvt_statfs(sp, (void *)SCARG(uap, buf), SCARG(uap, len)); + error = cvt_statfs(sp, (void *)SCARG(uap, buf), SCARG(uap, len)); +out: + vrele(vp); + return (error); } int @@ -200,12 +202,14 @@ ibcs2_sys_statvfs(struct lwp *l, const s return (error); mp = vp->v_mount; sp = >mnt_stat; - vrele(vp); if ((error = VFS_STATVFS(mp, sp)) != 0) return (error); sp->f_flag = mp->mnt_flag & MNT_VISFLAGMASK; - return cvt_statvfs(sp, (void *)SCARG(uap, buf), - sizeof(struct ibcs2_statvfs)); + error = cvt_statvfs(sp, (void *)SCARG(uap, buf), + sizeof(struct ibcs2_statvfs)); +out: + vrele(vp); + return error; } int
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riastradh Date: Fri Jul 28 17:57:48 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_ioctl.c Log Message: Zero buffers in ibcs2 ioctl to avoid disclosing stack to userland. >From Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/compat/ibcs2/ibcs2_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_ioctl.c diff -u src/sys/compat/ibcs2/ibcs2_ioctl.c:1.45 src/sys/compat/ibcs2/ibcs2_ioctl.c:1.46 --- src/sys/compat/ibcs2/ibcs2_ioctl.c:1.45 Tue Jun 24 10:03:17 2008 +++ src/sys/compat/ibcs2/ibcs2_ioctl.c Fri Jul 28 17:57:48 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_ioctl.c,v 1.45 2008/06/24 10:03:17 gmcgarry Exp $ */ +/* $NetBSD: ibcs2_ioctl.c,v 1.46 2017/07/28 17:57:48 riastradh Exp $ */ /* * Copyright (c) 1994, 1995 Scott Bartram @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.45 2008/06/24 10:03:17 gmcgarry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_ioctl.c,v 1.46 2017/07/28 17:57:48 riastradh Exp $"); #include #include @@ -402,8 +402,10 @@ ibcs2_sys_ioctl(struct lwp *l, const str if ((error = (*ctl)(fp, TIOCGETA, )) != 0) goto out; + memset(, 0, sizeof(sts)); btios2stios(, ); if (SCARG(uap, cmd) == IBCS2_TCGETA) { + memset(, 0, sizeof(st)); stios2stio(, ); error = copyout(, SCARG(uap, data), sizeof(st)); if (error) @@ -559,6 +561,7 @@ ibcs2_sys_gtty(struct lwp *l, const stru fd_putfile(SCARG(uap, fd)); + memset(, 0, sizeof(itb)); itb.sg_ispeed = tb.sg_ispeed; itb.sg_ospeed = tb.sg_ospeed; itb.sg_erase = tb.sg_erase;
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riastradh Date: Fri Jul 28 15:51:35 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_exec_coff.c Log Message: Make sure we move forward over the buffer. >From Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/compat/ibcs2/ibcs2_exec_coff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_exec_coff.c diff -u src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.28 src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.29 --- src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.28 Fri Jul 28 15:50:04 2017 +++ src/sys/compat/ibcs2/ibcs2_exec_coff.c Fri Jul 28 15:51:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec_coff.c,v 1.28 2017/07/28 15:50:04 riastradh Exp $ */ +/* $NetBSD: ibcs2_exec_coff.c,v 1.29 2017/07/28 15:51:35 riastradh Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.28 2017/07/28 15:50:04 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.29 2017/07/28 15:51:35 riastradh Exp $"); #include #include @@ -469,7 +469,8 @@ exec_ibcs2_coff_prep_zmagic(struct lwp * /* path_index = slhdr->path_index * sizeof(long); */ entry_len = slhdr->entry_len * sizeof(long); - if (entry_len > len || + if (entry_len < sizeof(struct coff_slhdr) || + entry_len > len || strnlen(slhdr->sl_name, entry_len) == entry_len) { free(tbuf, M_TEMP); return ENOEXEC;
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riastradh Date: Fri Jul 28 15:50:04 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_exec_coff.c Log Message: Make sure we have enough space in the buffer before reading it. >From Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/compat/ibcs2/ibcs2_exec_coff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_exec_coff.c diff -u src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.27 src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.28 --- src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.27 Fri Jul 28 15:47:23 2017 +++ src/sys/compat/ibcs2/ibcs2_exec_coff.c Fri Jul 28 15:50:04 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec_coff.c,v 1.27 2017/07/28 15:47:23 riastradh Exp $ */ +/* $NetBSD: ibcs2_exec_coff.c,v 1.28 2017/07/28 15:50:04 riastradh Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.27 2017/07/28 15:47:23 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.28 2017/07/28 15:50:04 riastradh Exp $"); #include #include @@ -454,6 +454,10 @@ exec_ibcs2_coff_prep_zmagic(struct lwp * } bufp = tbuf; while (len) { + if (len < sizeof(struct coff_slhdr)) { +free(tbuf, M_TEMP); +return ENOEXEC; + } slhdr = (struct coff_slhdr *)bufp; if (slhdr->path_index > LONG_MAX / sizeof(long) ||
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riastradh Date: Fri Jul 28 15:47:23 UTC 2017 Modified Files: src/sys/compat/ibcs2: ibcs2_exec_coff.c Log Message: Check for NUL termination within the buffer we have. >From Ilja Van Sprundel. To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/compat/ibcs2/ibcs2_exec_coff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_exec_coff.c diff -u src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.26 src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.27 --- src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.26 Fri Oct 25 14:46:35 2013 +++ src/sys/compat/ibcs2/ibcs2_exec_coff.c Fri Jul 28 15:47:23 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec_coff.c,v 1.26 2013/10/25 14:46:35 martin Exp $ */ +/* $NetBSD: ibcs2_exec_coff.c,v 1.27 2017/07/28 15:47:23 riastradh Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.26 2013/10/25 14:46:35 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_exec_coff.c,v 1.27 2017/07/28 15:47:23 riastradh Exp $"); #include #include @@ -465,7 +465,8 @@ exec_ibcs2_coff_prep_zmagic(struct lwp * /* path_index = slhdr->path_index * sizeof(long); */ entry_len = slhdr->entry_len * sizeof(long); - if (entry_len > len) { + if (entry_len > len || + strnlen(slhdr->sl_name, entry_len) == entry_len) { free(tbuf, M_TEMP); return ENOEXEC; }
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: christos Date: Thu Sep 24 14:41:39 UTC 2015 Modified Files: src/sys/compat/ibcs2: ibcs2_syscall.h ibcs2_syscallargs.h ibcs2_syscalls.c ibcs2_sysent.c Log Message: Regen To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/compat/ibcs2/ibcs2_syscall.h cvs rdiff -u -r1.52 -r1.53 src/sys/compat/ibcs2/ibcs2_syscallargs.h \ src/sys/compat/ibcs2/ibcs2_syscalls.c cvs rdiff -u -r1.53 -r1.54 src/sys/compat/ibcs2/ibcs2_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_syscall.h diff -u src/sys/compat/ibcs2/ibcs2_syscall.h:1.51 src/sys/compat/ibcs2/ibcs2_syscall.h:1.52 --- src/sys/compat/ibcs2/ibcs2_syscall.h:1.51 Sat Mar 7 11:41:53 2015 +++ src/sys/compat/ibcs2/ibcs2_syscall.h Thu Sep 24 10:41:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_syscall.h,v 1.51 2015/03/07 16:41:53 christos Exp $ */ +/* $NetBSD: ibcs2_syscall.h,v 1.52 2015/09/24 14:41:39 christos Exp $ */ /* * System call numbers. Index: src/sys/compat/ibcs2/ibcs2_syscallargs.h diff -u src/sys/compat/ibcs2/ibcs2_syscallargs.h:1.52 src/sys/compat/ibcs2/ibcs2_syscallargs.h:1.53 --- src/sys/compat/ibcs2/ibcs2_syscallargs.h:1.52 Sat Mar 7 11:41:53 2015 +++ src/sys/compat/ibcs2/ibcs2_syscallargs.h Thu Sep 24 10:41:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_syscallargs.h,v 1.52 2015/03/07 16:41:53 christos Exp $ */ +/* $NetBSD: ibcs2_syscallargs.h,v 1.53 2015/09/24 14:41:39 christos Exp $ */ /* * System call argument lists. Index: src/sys/compat/ibcs2/ibcs2_syscalls.c diff -u src/sys/compat/ibcs2/ibcs2_syscalls.c:1.52 src/sys/compat/ibcs2/ibcs2_syscalls.c:1.53 --- src/sys/compat/ibcs2/ibcs2_syscalls.c:1.52 Sat Mar 7 11:41:53 2015 +++ src/sys/compat/ibcs2/ibcs2_syscalls.c Thu Sep 24 10:41:39 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_syscalls.c,v 1.52 2015/03/07 16:41:53 christos Exp $ */ +/* $NetBSD: ibcs2_syscalls.c,v 1.53 2015/09/24 14:41:39 christos Exp $ */ /* * System call names. @@ -8,7 +8,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibcs2_syscalls.c,v 1.52 2015/03/07 16:41:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibcs2_syscalls.c,v 1.53 2015/09/24 14:41:39 christos Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -25,6 +25,8 @@ __KERNEL_RCSID(0, "$NetBSD: ibcs2_syscal #include #include #include +#else /* _KERNEL_OPT */ +#include #endif /* _KERNEL_OPT */ const char *const ibcs2_syscallnames[] = { @@ -553,3 +555,532 @@ const char *const ibcs2_syscallnames[] = /* 510 */ "# filler", /* 511 */ "# filler", }; + + +/* libc style syscall names */ +const char *const altibcs2_syscallnames[] = { + /* 0 */ "nosys", + /* 1 */ NULL, /* exit */ + /* 2 */ NULL, /* fork */ + /* 3 */ NULL, /* read */ + /* 4 */ NULL, /* write */ + /* 5 */ NULL, /* open */ + /* 6 */ NULL, /* close */ + /* 7 */ NULL, /* waitsys */ + /* 8 */ NULL, /* creat */ + /* 9 */ NULL, /* link */ + /* 10 */ NULL, /* unlink */ + /* 11 */ NULL, /* execv */ + /* 12 */ NULL, /* chdir */ + /* 13 */ NULL, /* time */ + /* 14 */ NULL, /* mknod */ + /* 15 */ NULL, /* chmod */ + /* 16 */ NULL, /* __posix_chown */ + /* 17 */ NULL, /* obreak */ + /* 18 */ NULL, /* stat */ + /* 19 */ NULL, /* lseek */ + /* 20 */ NULL, /* getpid_with_ppid */ + /* 21 */ NULL, /* mount */ + /* 22 */ NULL, /* umount */ + /* 23 */ NULL, /* setuid */ + /* 24 */ NULL, /* getuid_with_euid */ + /* 25 */ NULL, /* stime */ + /* 26 */ NULL, /* unimplemented ibcs2_ptrace */ + /* 27 */ NULL, /* alarm */ + /* 28 */ NULL, /* fstat */ + /* 29 */ NULL, /* pause */ + /* 30 */ NULL, /* utime */ + /* 31 */ NULL, /* unimplemented was stty */ + /* 32 */ NULL, /* gtty */ + /* 33 */ NULL, /* access */ + /* 34 */ NULL, /* nice */ + /* 35 */ NULL, /* statfs */ + /* 36 */ NULL, /* sync */ + /* 37 */ NULL, /* kill */ + /* 38 */ NULL, /* fstatfs */ + /* 39 */ NULL, /* pgrpsys */ + /* 40 */ NULL, /* unimplemented ibcs2_xenix */ + /* 41 */ NULL, /* dup */ + /* 42 */ NULL, /* pipe */ + /* 43 */ NULL, /* times */ + /* 44 */ NULL, /* unimplemented profil */ + /* 45 */ NULL, /* plock */ + /* 46 */ NULL, /* setgid */ + /* 47 */ NULL, /* getgid_with_egid */ + /* 48 */ NULL, /* sigsys */ +#ifdef SYSVMSG + /* 49 */ NULL, /* msgsys */ +#else + /* 49 */ NULL, /* unimplemented msgsys */ +#endif + /* 50 */ NULL, /* sysmachine */ + /* 51 */ NULL, /* unimplemented ibcs2_acct */ +#ifdef SYSVSHM + /* 52 */ NULL, /* shmsys */ +#else + /* 52 */ NULL, /* unimplemented shmsys */ +#endif +#ifdef SYSVSEM + /* 53 */ NULL, /* semsys */ +#else + /* 53 */ NULL, /* unimplemented semsys */ +#endif + /* 54 */ NULL, /* ioctl */ + /* 55 */ NULL, /* uadmin */ + /* 56 */ NULL, /* unimplemented */ + /* 57 */ NULL, /* utssys */ + /* 58 */ NULL, /* fsync */ + /* 59 */ NULL, /* execve */ + /* 60 */ NULL, /* umask */ + /* 61 */ NULL, /* chroot */ + /* 62
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: nakayama Date: Sat Mar 8 01:51:58 UTC 2014 Modified Files: src/sys/compat/ibcs2: ibcs2_mod.c Log Message: Redo previous. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/compat/ibcs2/ibcs2_mod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_mod.c diff -u src/sys/compat/ibcs2/ibcs2_mod.c:1.4 src/sys/compat/ibcs2/ibcs2_mod.c:1.5 --- src/sys/compat/ibcs2/ibcs2_mod.c:1.4 Fri Mar 7 02:03:32 2014 +++ src/sys/compat/ibcs2/ibcs2_mod.c Sat Mar 8 01:51:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_mod.c,v 1.4 2014/03/07 02:03:32 christos Exp $ */ +/* $NetBSD: ibcs2_mod.c,v 1.5 2014/03/08 01:51:58 nakayama Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_mod.c,v 1.4 2014/03/07 02:03:32 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_mod.c,v 1.5 2014/03/08 01:51:58 nakayama Exp $); #ifdef _KERNEL_OPT #include opt_execfmt.h @@ -67,7 +67,7 @@ static struct execsw ibcs2_execsw[] = { .es_hdrsz = sizeof (Elf32_Ehdr), .es_makecmds = exec_elf32_makecmds, .u = { - .ecoff_probe_func = ibcs2_elf32_probe, + .elf_probe_func = ibcs2_elf32_probe, }, .es_emul = emul_ibcs2, .es_prio = EXECSW_PRIO_ANY,
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: christos Date: Fri Mar 7 02:03:32 UTC 2014 Modified Files: src/sys/compat/ibcs2: ibcs2_mod.c Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/compat/ibcs2/ibcs2_mod.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_mod.c diff -u src/sys/compat/ibcs2/ibcs2_mod.c:1.3 src/sys/compat/ibcs2/ibcs2_mod.c:1.4 --- src/sys/compat/ibcs2/ibcs2_mod.c:1.3 Thu Mar 6 20:33:43 2014 +++ src/sys/compat/ibcs2/ibcs2_mod.c Thu Mar 6 21:03:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_mod.c,v 1.3 2014/03/07 01:33:43 christos Exp $ */ +/* $NetBSD: ibcs2_mod.c,v 1.4 2014/03/07 02:03:32 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_mod.c,v 1.3 2014/03/07 01:33:43 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_mod.c,v 1.4 2014/03/07 02:03:32 christos Exp $); #ifdef _KERNEL_OPT #include opt_execfmt.h @@ -67,7 +67,7 @@ static struct execsw ibcs2_execsw[] = { .es_hdrsz = sizeof (Elf32_Ehdr), .es_makecmds = exec_elf32_makecmds, .u = { - .coff_probe_func = ibcs2_elf32_probe, + .ecoff_probe_func = ibcs2_elf32_probe, }, .es_emul = emul_ibcs2, .es_prio = EXECSW_PRIO_ANY,
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: martin Date: Fri Oct 25 14:46:35 UTC 2013 Modified Files: src/sys/compat/ibcs2: ibcs2_exec_coff.c Log Message: Remove a variable To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/compat/ibcs2/ibcs2_exec_coff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_exec_coff.c diff -u src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.25 src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.26 --- src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.25 Thu Jul 22 03:19:02 2010 +++ src/sys/compat/ibcs2/ibcs2_exec_coff.c Fri Oct 25 14:46:35 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec_coff.c,v 1.25 2010/07/22 03:19:02 christos Exp $ */ +/* $NetBSD: ibcs2_exec_coff.c,v 1.26 2013/10/25 14:46:35 martin Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_exec_coff.c,v 1.25 2010/07/22 03:19:02 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_exec_coff.c,v 1.26 2013/10/25 14:46:35 martin Exp $); #include sys/param.h #include sys/systm.h @@ -431,7 +431,7 @@ exec_ibcs2_coff_prep_zmagic(struct lwp * size_t resid; struct coff_slhdr *slhdr; char *tbuf, *bufp; - size_t len = sh.s_size, path_index, entry_len; + size_t len = sh.s_size, /* path_index, */ entry_len; if (len 64 * 1024) return ENOEXEC; @@ -462,7 +462,7 @@ exec_ibcs2_coff_prep_zmagic(struct lwp * return ENOEXEC; } - path_index = slhdr-path_index * sizeof(long); + /* path_index = slhdr-path_index * sizeof(long); */ entry_len = slhdr-entry_len * sizeof(long); if (entry_len len) {
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: christos Date: Wed Jun 26 16:29:50 UTC 2013 Modified Files: src/sys/compat/ibcs2: ibcs2_syscall.h ibcs2_syscallargs.h ibcs2_syscalls.c ibcs2_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/compat/ibcs2/ibcs2_syscall.h cvs rdiff -u -r1.49 -r1.50 src/sys/compat/ibcs2/ibcs2_syscallargs.h \ src/sys/compat/ibcs2/ibcs2_syscalls.c cvs rdiff -u -r1.50 -r1.51 src/sys/compat/ibcs2/ibcs2_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_syscall.h diff -u src/sys/compat/ibcs2/ibcs2_syscall.h:1.48 src/sys/compat/ibcs2/ibcs2_syscall.h:1.49 --- src/sys/compat/ibcs2/ibcs2_syscall.h:1.48 Sun Dec 13 19:58:36 2009 +++ src/sys/compat/ibcs2/ibcs2_syscall.h Wed Jun 26 12:29:50 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: ibcs2_syscall.h,v 1.48 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: ibcs2_syscall.h,v 1.49 2013/06/26 16:29:50 christos Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.37 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.40 2013/06/26 16:29:41 christos Exp */ #ifndef _IBCS2_SYS_SYSCALL_H_ Index: src/sys/compat/ibcs2/ibcs2_syscallargs.h diff -u src/sys/compat/ibcs2/ibcs2_syscallargs.h:1.49 src/sys/compat/ibcs2/ibcs2_syscallargs.h:1.50 --- src/sys/compat/ibcs2/ibcs2_syscallargs.h:1.49 Sun Dec 13 19:58:36 2009 +++ src/sys/compat/ibcs2/ibcs2_syscallargs.h Wed Jun 26 12:29:50 2013 @@ -1,10 +1,10 @@ -/* $NetBSD: ibcs2_syscallargs.h,v 1.49 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: ibcs2_syscallargs.h,v 1.50 2013/06/26 16:29:50 christos Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.37 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.40 2013/06/26 16:29:41 christos Exp */ #ifndef _IBCS2_SYS_SYSCALLARGS_H_ @@ -27,7 +27,7 @@ } #undef check_syscall_args -#define check_syscall_args(call) \ +#define check_syscall_args(call) /*LINTED*/ \ typedef char call##_check_args[sizeof (struct call##_args) \ = IBCS2_SYS_MAXSYSARGS * sizeof (register_t) ? 1 : -1]; Index: src/sys/compat/ibcs2/ibcs2_syscalls.c diff -u src/sys/compat/ibcs2/ibcs2_syscalls.c:1.49 src/sys/compat/ibcs2/ibcs2_syscalls.c:1.50 --- src/sys/compat/ibcs2/ibcs2_syscalls.c:1.49 Sun Dec 13 19:58:36 2009 +++ src/sys/compat/ibcs2/ibcs2_syscalls.c Wed Jun 26 12:29:50 2013 @@ -1,14 +1,14 @@ -/* $NetBSD: ibcs2_syscalls.c,v 1.49 2009/12/14 00:58:36 matt Exp $ */ +/* $NetBSD: ibcs2_syscalls.c,v 1.50 2013/06/26 16:29:50 christos Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.37 2009/01/13 22:27:43 pooka Exp + * created from NetBSD: syscalls.master,v 1.40 2013/06/26 16:29:41 christos Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_syscalls.c,v 1.49 2009/12/14 00:58:36 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_syscalls.c,v 1.50 2013/06/26 16:29:50 christos Exp $); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) @@ -122,43 +122,43 @@ const char *const ibcs2_syscallnames[] = /* 79 */ rmdir, /* 80 */ mkdir, /* 81 */ getdents, - /* 82 */ #82 (unimplemented), - /* 83 */ #83 (unimplemented), + /* 82 */ #82 (unimplemented libattach), + /* 83 */ #83 (unimplemented libdetach), /* 84 */ sysfs, /* 85 */ getmsg, /* 86 */ putmsg, /* 87 */ poll, - /* 88 */ #88 (unimplemented), - /* 89 */ #89 (unimplemented), + /* 88 */ #88 (unimplemented unknown), + /* 89 */ #89 (unimplemented secure), /* 90 */ symlink, /* 91 */ lstat, /* 92 */ readlink, /* 93 */ fchmod, /* 94 */ fchown, - /* 95 */ #95 (unimplemented), + /* 95 */ #95 (unimplemented sigprocmask), /* 96 */ sigreturn, /* 97 */ sigaltstack, - /* 98 */ #98 (unimplemented), - /* 99 */ #99 (unimplemented), + /* 98 */ #98 (unimplemented sigaction), + /* 99 */ #99 (unimplemented sigpending), /* 100 */ #100 (unimplemented getcontext/setcontext/sigsetjmp), - /* 101 */ #101 (unimplemented), - /* 102 */ #102 (unimplemented), + /* 101 */ #101 (unimplemented envsys), + /* 102 */ #102 (unimplemented evtrapret), /* 103 */ statvfs, /* 104 */ fstatvfs, - /* 105 */ #105 (unimplemented), - /* 106 */ #106 (unimplemented), - /* 107 */ #107 (unimplemented waitid), - /* 108 */ #108 (unimplemented sigsendset), - /* 109 */ #109 (unimplemented), - /* 110 */ #110 (unimplemented), - /* 111 */ #111 (unimplemented), - /* 112 */ #112 (unimplemented priocntl), - /* 113 */ #113 (unimplemented), - /* 114 */ #114 (unimplemented), + /* 105 */ #105 (unimplemented isc), + /* 106 */ #106 (unimplemented nfssys), + /* 107 */ #107 (unimplemented waitsys), + /* 108 */ #108 (unimplemented
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: christos Date: Wed Jun 26 16:29:41 UTC 2013 Modified Files: src/sys/compat/ibcs2: syscalls.master Log Message: remove dups document more. From FreeBSD. Still there is disagreement as to where sigreturn is. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/compat/ibcs2/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/syscalls.master diff -u src/sys/compat/ibcs2/syscalls.master:1.39 src/sys/compat/ibcs2/syscalls.master:1.40 --- src/sys/compat/ibcs2/syscalls.master:1.39 Tue Jun 25 00:10:17 2013 +++ src/sys/compat/ibcs2/syscalls.master Wed Jun 26 12:29:41 2013 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.39 2013/06/25 04:10:17 riz Exp $ + $NetBSD: syscalls.master,v 1.40 2013/06/26 16:29:41 christos Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -172,10 +172,8 @@ struct ibcs2_stropts *dat, int flags); } 87 NOARGS { int|sys||poll(struct pollfd *fds, u_int nfds, \ int timeout); } -88 STD { int|ibcs2_sys||lstat(const char *path, \ - struct ibcs2_stat *st); } -89 NOARGS { int|sys||symlink(const char *path, \ - const char *link); } +88 UNIMPL unknown +89 UNIMPL secure 90 NOARGS { int|sys||symlink(const char *path, \ const char *link); } 91 STD { int|ibcs2_sys||lstat(const char *path, \ @@ -200,7 +198,7 @@ struct ibcs2_statvfs *buf); } 104 STD { int|ibcs2_sys||fstatvfs(int fd, \ struct ibcs2_statvfs *buf); } -105 UNIMPL +105 UNIMPL isc 106 UNIMPL nfssys 107 UNIMPL waitsys 108 UNIMPL sigsendsys
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: riz Date: Tue Jun 25 04:10:17 UTC 2013 Modified Files: src/sys/compat/ibcs2: syscalls.master Log Message: UNIMP-UNIMPL To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/compat/ibcs2/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/syscalls.master diff -u src/sys/compat/ibcs2/syscalls.master:1.38 src/sys/compat/ibcs2/syscalls.master:1.39 --- src/sys/compat/ibcs2/syscalls.master:1.38 Fri Jul 23 02:46:12 2010 +++ src/sys/compat/ibcs2/syscalls.master Tue Jun 25 04:10:17 2013 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.38 2010/07/23 02:46:12 christos Exp $ + $NetBSD: syscalls.master,v 1.39 2013/06/25 04:10:17 riz Exp $ ; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 @@ -195,7 +195,7 @@ 99 UNIMPL sigpending 100 UNIMPL getcontext/setcontext/sigsetjmp 101 UNIMPL envsys -102 UNIMP evtrapret +102 UNIMPL evtrapret 103 STD { int|ibcs2_sys||statvfs(const char *path, \ struct ibcs2_statvfs *buf); } 104 STD { int|ibcs2_sys||fstatvfs(int fd, \
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: christos Date: Thu Jul 22 03:18:31 UTC 2010 Modified Files: src/sys/compat/ibcs2: ibcs2_exec.c Log Message: fix wrong preprocessor symbol. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/compat/ibcs2/ibcs2_exec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_exec.c diff -u src/sys/compat/ibcs2/ibcs2_exec.c:1.74 src/sys/compat/ibcs2/ibcs2_exec.c:1.75 --- src/sys/compat/ibcs2/ibcs2_exec.c:1.74 Tue Jul 6 21:30:32 2010 +++ src/sys/compat/ibcs2/ibcs2_exec.c Wed Jul 21 23:18:30 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec.c,v 1.74 2010/07/07 01:30:32 chs Exp $ */ +/* $NetBSD: ibcs2_exec.c,v 1.75 2010/07/22 03:18:30 christos Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_exec.c,v 1.74 2010/07/07 01:30:32 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_exec.c,v 1.75 2010/07/22 03:18:30 christos Exp $); #if defined(_KERNEL_OPT) #include opt_syscall_debug.h @@ -70,7 +70,7 @@ void syscall(void); #endif -#ifdef IBCS2_DEBUG +#ifdef DEBUG_IBCS2 int ibcs2_debug = 1; #endif
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: christos Date: Thu Jul 22 03:19:02 UTC 2010 Modified Files: src/sys/compat/ibcs2: ibcs2_exec_coff.c Log Message: Add more debugging printfs To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/compat/ibcs2/ibcs2_exec_coff.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_exec_coff.c diff -u src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.24 src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.25 --- src/sys/compat/ibcs2/ibcs2_exec_coff.c:1.24 Mon Jun 29 01:08:16 2009 +++ src/sys/compat/ibcs2/ibcs2_exec_coff.c Wed Jul 21 23:19:02 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_exec_coff.c,v 1.24 2009/06/29 05:08:16 dholland Exp $ */ +/* $NetBSD: ibcs2_exec_coff.c,v 1.25 2010/07/22 03:19:02 christos Exp $ */ /* * Copyright (c) 1994, 1995, 1998 Scott Bartram @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_exec_coff.c,v 1.24 2009/06/29 05:08:16 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_exec_coff.c,v 1.25 2010/07/22 03:19:02 christos Exp $); #include sys/param.h #include sys/systm.h @@ -120,11 +120,15 @@ error = exec_ibcs2_coff_prep_zmagic(l, epp, fp, ap); break; default: + DPRINTF((ibcs2: bad coff magic %x\n, ap-a_magic)); return ENOEXEC; } - if (error) + if (error) { kill_vmcmds(epp-ep_vmcmds); + DPRINTF((ibcs2: error loading magic %x (%d)\n, ap-a_magic, + error)); + } return error; }
CVS commit: src/sys/compat/ibcs2
Module Name:src Committed By: pooka Date: Fri May 15 16:59:08 UTC 2009 Modified Files: src/sys/compat/ibcs2: ibcs2_misc.c Log Message: pad - PAD To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/compat/ibcs2/ibcs2_misc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/compat/ibcs2/ibcs2_misc.c diff -u src/sys/compat/ibcs2/ibcs2_misc.c:1.106 src/sys/compat/ibcs2/ibcs2_misc.c:1.107 --- src/sys/compat/ibcs2/ibcs2_misc.c:1.106 Wed Apr 15 20:44:26 2009 +++ src/sys/compat/ibcs2/ibcs2_misc.c Fri May 15 16:59:07 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ibcs2_misc.c,v 1.106 2009/04/15 20:44:26 elad Exp $ */ +/* $NetBSD: ibcs2_misc.c,v 1.107 2009/05/15 16:59:07 pooka Exp $ */ /* * Copyright (c) 1992, 1993 @@ -95,7 +95,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ibcs2_misc.c,v 1.106 2009/04/15 20:44:26 elad Exp $); +__KERNEL_RCSID(0, $NetBSD: ibcs2_misc.c,v 1.107 2009/05/15 16:59:07 pooka Exp $); #include sys/param.h #include sys/systm.h @@ -1230,7 +1230,7 @@ struct sys_ftruncate_args sa; SCARG(sa, fd) = SCARG(uap, fd); - SCARG(sa, pad) = 0; + SCARG(sa, PAD) = 0; SCARG(sa, length) = SCARG(uap, size); return sys_ftruncate(l, sa, retval); }