CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Mon Nov 4 14:52:15 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: Regen for ticket #1711 To generate a diff of this commit: cvs rdiff -u -r1.109.2.3 -r1.109.2.4 \ src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.108.2.3 -r1.108.2.4 \ src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Mon Nov 4 14:52:15 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: Regen for ticket #1711 To generate a diff of this commit: cvs rdiff -u -r1.109.2.3 -r1.109.2.4 \ src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.108.2.3 -r1.108.2.4 \ src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_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/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.3 src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.4 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.3 Fri Nov 6 09:19:24 2015 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Mon Nov 4 14:52:15 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.109.2.3 2015/11/06 09:19:24 martin Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.109.2.4 2019/11/04 14:52:15 martin Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp + * created from NetBSD: syscalls.master,v 1.101.2.4 2019/11/04 14:51:31 martin Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -1231,7 +1231,7 @@ /* syscall: "netbsd32_openat" ret: "int" args: "int" "const netbsd32_charp" "int" "..." */ #define NETBSD32_SYS_netbsd32_openat 468 -/* syscall: "netbsd32_readlinkat" ret: "netbsd32_ssize_t" args: "int" "const netbsd32_charp" "netbsd32_charp" "size_t" */ +/* syscall: "netbsd32_readlinkat" ret: "netbsd32_ssize_t" args: "int" "const netbsd32_charp" "netbsd32_charp" "netbsd32_size_t" */ #define NETBSD32_SYS_netbsd32_readlinkat 469 /* syscall: "netbsd32_symlinkat" ret: "int" args: "const netbsd32_charp" "int" "const netbsd32_charp" */ Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.3 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.4 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.3 Fri Nov 6 09:19:24 2015 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Mon Nov 4 14:52:15 2019 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.109.2.3 2015/11/06 09:19:24 martin Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.109.2.4 2019/11/04 14:52:15 martin Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp + * created from NetBSD: syscalls.master,v 1.101.2.4 2019/11/04 14:51:31 martin Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ @@ -2416,7 +2416,7 @@ struct netbsd32_readlinkat_args { syscallarg(int) fd; syscallarg(const netbsd32_charp) path; syscallarg(netbsd32_charp) buf; - syscallarg(size_t) bufsize; + syscallarg(netbsd32_size_t) bufsize; }; check_syscall_args(netbsd32_readlinkat) Index: src/sys/compat/netbsd32/netbsd32_syscalls.c diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.3 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.4 --- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.3 Fri Nov 6 09:19:24 2015 +++ src/sys/compat/netbsd32/netbsd32_syscalls.c Mon Nov 4 14:52:15 2019 @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_syscalls.c,v 1.108.2.3 2015/11/06 09:19:24 martin Exp $ */ +/* $NetBSD: netbsd32_syscalls.c,v 1.108.2.4 2019/11/04 14:52:15 martin Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp + * created from NetBSD: syscalls.master,v 1.101.2.4 2019/11/04 14:51:31 martin Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.108.2.3 2015/11/06 09:19:24 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.108.2.4 2019/11/04 14:52:15 martin Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) Index: src/sys/compat/netbsd32/netbsd32_sysent.c diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.108.2.3 src/sys/compat/netbsd32/netbsd32_sysent.c:1.108.2.4 --- src/sys/compat/netbsd32/netbsd32_sysent.c:1.108.2.3 Fri Nov 6 09:19:24 2015 +++ src/sys/compat/netbsd32/netbsd32_sysent.c Mon Nov 4 14:52:15 2019 @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_sysent.c,v 1.108.2.3 2015/11/06 09:19:24 martin Exp $ */ +/* $NetBSD: netbsd32_sysent.c,v 1.108.2.4 2019/11/04 14:52:15 martin Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp + * created from NetBSD: syscalls.master,v 1.101.2.4 2019/11/04 14:51:31 martin Exp */ #include
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Mon Nov 4 14:51:31 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: syscalls.master Log Message: Pull up following revision(s) (requested by rin in ticket #1711): sys/compat/netbsd32/syscalls.master: revision 1.129 For netbsd32_readlinkat(2), bufsize is netbsd_size_t, not size_t. Since bufsize is the last argument, this affects only LP64EB. XXX pullup to netbsd-9, -8, and -7 To generate a diff of this commit: cvs rdiff -u -r1.101.2.3 -r1.101.2.4 src/sys/compat/netbsd32/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Mon Nov 4 14:51:31 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: syscalls.master Log Message: Pull up following revision(s) (requested by rin in ticket #1711): sys/compat/netbsd32/syscalls.master: revision 1.129 For netbsd32_readlinkat(2), bufsize is netbsd_size_t, not size_t. Since bufsize is the last argument, this affects only LP64EB. XXX pullup to netbsd-9, -8, and -7 To generate a diff of this commit: cvs rdiff -u -r1.101.2.3 -r1.101.2.4 src/sys/compat/netbsd32/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/netbsd32/syscalls.master diff -u src/sys/compat/netbsd32/syscalls.master:1.101.2.3 src/sys/compat/netbsd32/syscalls.master:1.101.2.4 --- src/sys/compat/netbsd32/syscalls.master:1.101.2.3 Fri Nov 6 09:16:48 2015 +++ src/sys/compat/netbsd32/syscalls.master Mon Nov 4 14:51:31 2019 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp $ + $NetBSD: syscalls.master,v 1.101.2.4 2019/11/04 14:51:31 martin Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -1016,7 +1016,7 @@ 469 STD { netbsd32_ssize_t|netbsd32||readlinkat(int fd, \ const netbsd32_charp path, \ netbsd32_charp buf, \ - size_t bufsize); } + netbsd32_size_t bufsize); } 470 STD { int|netbsd32||symlinkat(const netbsd32_charp path1, \ int fd, \ const netbsd32_charp path2); }
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: msaitoh Date: Wed Mar 13 11:13:48 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_60.c Log Message: Pull up following revision(s) (requested by martin in ticket #1683): sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.3 don't forget to convert the timespec. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/compat/netbsd32/netbsd32_compat_60.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/netbsd32/netbsd32_compat_60.c diff -u src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1 src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1.14.1 --- src/sys/compat/netbsd32/netbsd32_compat_60.c:1.1 Fri Mar 29 01:13:54 2013 +++ src/sys/compat/netbsd32/netbsd32_compat_60.c Wed Mar 13 11:13:48 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $ */ +/* $NetBSD: netbsd32_compat_60.c,v 1.1.14.1 2019/03/13 11:13:48 msaitoh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.1 2013/03/29 01:13:54 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.1.14.1 2019/03/13 11:13:48 msaitoh Exp $"); #include #include @@ -71,6 +71,7 @@ compat_60_netbsd32__lwp_park(struct lwp error = copyin(SCARG_P32(uap, ts), , sizeof ts32); if (error != 0) return error; + netbsd32_to_timespec(, ); tsp = }
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: msaitoh Date: Wed Mar 13 11:13:48 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_60.c Log Message: Pull up following revision(s) (requested by martin in ticket #1683): sys/compat/netbsd32/netbsd32_compat_60.c: revision 1.3 don't forget to convert the timespec. XXX: pullup-8 To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.14.1 src/sys/compat/netbsd32/netbsd32_compat_60.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Wed Nov 21 12:09:03 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1652): sys/compat/netbsd32/netbsd32_socket.c: revision 1.48 (via patch) Fix inverted logic, which leads to buffer overflow. Detected by kASan. To generate a diff of this commit: cvs rdiff -u -r1.41.14.1 -r1.41.14.2 \ src/sys/compat/netbsd32/netbsd32_socket.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/netbsd32/netbsd32_socket.c diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.41.14.1 src/sys/compat/netbsd32/netbsd32_socket.c:1.41.14.2 --- src/sys/compat/netbsd32/netbsd32_socket.c:1.41.14.1 Sat Aug 8 15:41:54 2015 +++ src/sys/compat/netbsd32/netbsd32_socket.c Wed Nov 21 12:09:03 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_socket.c,v 1.41.14.1 2015/08/08 15:41:54 martin Exp $ */ +/* $NetBSD: netbsd32_socket.c,v 1.41.14.2 2018/11/21 12:09:03 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.41.14.1 2015/08/08 15:41:54 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.41.14.2 2018/11/21 12:09:03 martin Exp $"); #include #include @@ -99,7 +99,7 @@ copyout32_msg_control_mbuf(struct lwp *l } ktrkuser("msgcontrol", cmsg, cmsg->cmsg_len); - error = copyout(, *q, MAX(i, sizeof(cmsg32))); + error = copyout(, *q, MIN(i, sizeof(cmsg32))); if (error) return (error); if (i > CMSG32_LEN(0)) {
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Wed Nov 21 12:09:03 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1652): sys/compat/netbsd32/netbsd32_socket.c: revision 1.48 (via patch) Fix inverted logic, which leads to buffer overflow. Detected by kASan. To generate a diff of this commit: cvs rdiff -u -r1.41.14.1 -r1.41.14.2 \ src/sys/compat/netbsd32/netbsd32_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Nov 6 09:19:24 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.109.2.2 -r1.109.2.3 \ src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.108.2.2 -r1.108.2.3 \ src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_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/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.2 src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.3 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.2 Wed Nov 4 17:46:21 2015 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Fri Nov 6 09:19:24 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.109.2.2 2015/11/04 17:46:21 riz Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.109.2.3 2015/11/06 09:19:24 martin Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp + * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -441,9 +441,13 @@ /* syscall: "compat_43_netbsd32_ogetsockname" ret: "int" args: "int" "netbsd32_voidp" "netbsd32_intp" */ #define NETBSD32_SYS_compat_43_netbsd32_ogetsockname 150 +#if defined(NFSSERVER) || !defined(_KERNEL_OPT) /* syscall: "netbsd32_nfssvc" ret: "int" args: "int" "netbsd32_voidp" */ #define NETBSD32_SYS_netbsd32_nfssvc 155 +#else +/* 155 is excluded netbsd32_nfssvc */ +#endif /* syscall: "compat_43_netbsd32_ogetdirentries" ret: "int" args: "int" "netbsd32_charp" "u_int" "netbsd32_longp" */ #define NETBSD32_SYS_compat_43_netbsd32_ogetdirentries 156 Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.2 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.3 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.2 Wed Nov 4 17:46:21 2015 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Fri Nov 6 09:19:24 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.109.2.2 2015/11/04 17:46:21 riz Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.109.2.3 2015/11/06 09:19:24 martin Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp + * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ @@ -815,12 +815,15 @@ struct compat_43_netbsd32_ogetsockname_a syscallarg(netbsd32_intp) alen; }; check_syscall_args(compat_43_netbsd32_ogetsockname) +#if defined(NFSSERVER) || !defined(_KERNEL_OPT) struct netbsd32_nfssvc_args { syscallarg(int) flag; syscallarg(netbsd32_voidp) argp; }; check_syscall_args(netbsd32_nfssvc) +#else +#endif struct compat_43_netbsd32_ogetdirentries_args { syscallarg(int) fd; @@ -2755,8 +2758,11 @@ int compat_43_sys_quota(struct lwp *, co int compat_43_netbsd32_ogetsockname(struct lwp *, const struct compat_43_netbsd32_ogetsockname_args *, register_t *); +#if defined(NFSSERVER) || !defined(_KERNEL_OPT) int netbsd32_nfssvc(struct lwp *, const struct netbsd32_nfssvc_args *, register_t *); +#else +#endif int compat_43_netbsd32_ogetdirentries(struct lwp *, const struct compat_43_netbsd32_ogetdirentries_args *, register_t *); int compat_20_netbsd32_statfs(struct lwp *, const struct compat_20_netbsd32_statfs_args *, register_t *); Index: src/sys/compat/netbsd32/netbsd32_syscalls.c diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.2 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.3 --- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.2 Wed Nov 4 17:46:21 2015 +++ src/sys/compat/netbsd32/netbsd32_syscalls.c Fri Nov 6 09:19:24 2015 @@ -1,18 +1,19 @@ -/* $NetBSD: netbsd32_syscalls.c,v 1.108.2.2 2015/11/04 17:46:21 riz Exp $ */ +/* $NetBSD: netbsd32_syscalls.c,v 1.108.2.3 2015/11/06 09:19:24 martin Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp + * created from NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.108.2.2 2015/11/04 17:46:21 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_syscalls.c,v 1.108.2.3 2015/11/06 09:19:24 martin Exp $"); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" +#include "opt_nfsserver.h" #include
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Nov 6 09:19:24 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.109.2.2 -r1.109.2.3 \ src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.108.2.2 -r1.108.2.3 \ src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Nov 6 09:16:49 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_nfssvc.c syscalls.master Log Message: Additionally pull up following revision(s) (requested by mrg in ticket #956): sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.2 sys/compat/netbsd32/syscalls.master: revision 1.109 Don't reference netbsd32_nfssvc unless NFSSERVER is defined. Fixes PR 49994. add missing opt_nfsserver.h To generate a diff of this commit: cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/sys/compat/netbsd32/netbsd32_nfssvc.c cvs rdiff -u -r1.101.2.2 -r1.101.2.3 src/sys/compat/netbsd32/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/netbsd32/netbsd32_nfssvc.c diff -u src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.3.4.2 src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.3.4.3 --- src/sys/compat/netbsd32/netbsd32_nfssvc.c:1.3.4.2 Wed Nov 4 17:46:21 2015 +++ src/sys/compat/netbsd32/netbsd32_nfssvc.c Fri Nov 6 09:16:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_nfssvc.c,v 1.3.4.2 2015/11/04 17:46:21 riz Exp $ */ +/* $NetBSD: netbsd32_nfssvc.c,v 1.3.4.3 2015/11/06 09:16:48 martin Exp $ */ /* * Copyright (c) 2015 Matthew R. Green @@ -29,10 +29,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.3.4.2 2015/11/04 17:46:21 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_nfssvc.c,v 1.3.4.3 2015/11/06 09:16:48 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_nfs.h" +#include "opt_nfsserver.h" #include "opt_compat_netbsd.h" #endif Index: src/sys/compat/netbsd32/syscalls.master diff -u src/sys/compat/netbsd32/syscalls.master:1.101.2.2 src/sys/compat/netbsd32/syscalls.master:1.101.2.3 --- src/sys/compat/netbsd32/syscalls.master:1.101.2.2 Wed Nov 4 17:46:21 2015 +++ src/sys/compat/netbsd32/syscalls.master Fri Nov 6 09:16:48 2015 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.101.2.2 2015/11/04 17:46:21 riz Exp $ + $NetBSD: syscalls.master,v 1.101.2.3 2015/11/06 09:16:48 martin Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -38,6 +38,7 @@ #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" +#include "opt_nfsserver.h" #include "opt_ntp.h" #include "opt_sysv.h" #include "opt_compat_43.h" @@ -317,7 +318,11 @@ 152 UNIMPL 153 UNIMPL 154 UNIMPL +#if defined(NFSSERVER) || !defined(_KERNEL_OPT) 155 STD { int|netbsd32||nfssvc(int flag, netbsd32_voidp argp); } +#else +155 EXCL netbsd32_nfssvc +#endif 156 COMPAT_43 { int|netbsd32||ogetdirentries(int fd, \ netbsd32_charp buf, u_int count, \ netbsd32_longp basep); }
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Nov 6 09:16:49 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_nfssvc.c syscalls.master Log Message: Additionally pull up following revision(s) (requested by mrg in ticket #956): sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.2 sys/compat/netbsd32/syscalls.master: revision 1.109 Don't reference netbsd32_nfssvc unless NFSSERVER is defined. Fixes PR 49994. add missing opt_nfsserver.h To generate a diff of this commit: cvs rdiff -u -r1.3.4.2 -r1.3.4.3 src/sys/compat/netbsd32/netbsd32_nfssvc.c cvs rdiff -u -r1.101.2.2 -r1.101.2.3 src/sys/compat/netbsd32/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat Aug 8 15:41:54 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #941): sys/compat/netbsd32/netbsd32_socket.c: revision 1.42 Memory leak, triggerable from an unprivileged user. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.14.1 src/sys/compat/netbsd32/netbsd32_socket.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/netbsd32/netbsd32_socket.c diff -u src/sys/compat/netbsd32/netbsd32_socket.c:1.41 src/sys/compat/netbsd32/netbsd32_socket.c:1.41.14.1 --- src/sys/compat/netbsd32/netbsd32_socket.c:1.41 Sat Aug 18 15:25:15 2012 +++ src/sys/compat/netbsd32/netbsd32_socket.c Sat Aug 8 15:41:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_socket.c,v 1.41 2012/08/18 15:25:15 martin Exp $ */ +/* $NetBSD: netbsd32_socket.c,v 1.41.14.1 2015/08/08 15:41:54 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_socket.c,v 1.41 2012/08/18 15:25:15 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_socket.c,v 1.41.14.1 2015/08/08 15:41:54 martin Exp $); #include sys/param.h #include sys/systm.h @@ -331,7 +331,7 @@ netbsd32_sendmsg(struct lwp *l, const st } */ struct msghdr msg; struct netbsd32_msghdr msg32; - struct iovec aiov[UIO_SMALLIOV], *iov; + struct iovec aiov[UIO_SMALLIOV], *iov = aiov; struct netbsd32_iovec *iov32; size_t iovsz; int error; @@ -346,6 +346,7 @@ netbsd32_sendmsg(struct lwp *l, const st error = copyin32_msg_control(l, msg); if (error) return (error); + /* From here on, msg.msg_control is allocated */ } else { msg.msg_control = NULL; msg.msg_controllen = 0; @@ -353,23 +354,32 @@ netbsd32_sendmsg(struct lwp *l, const st iovsz = msg.msg_iovlen * sizeof(struct iovec); if ((u_int)msg.msg_iovlen UIO_SMALLIOV) { - if ((u_int)msg.msg_iovlen IOV_MAX) - return (EMSGSIZE); + if ((u_int)msg.msg_iovlen IOV_MAX) { + error = EMSGSIZE; + goto out; + } iov = kmem_alloc(iovsz, KM_SLEEP); - } else - iov = aiov; + } iov32 = NETBSD32PTR64(msg32.msg_iov); error = netbsd32_to_iovecin(iov32, iov, msg.msg_iovlen); if (error) - goto done; + goto out; msg.msg_iov = iov; error = do_sys_sendmsg(l, SCARG(uap, s), msg, SCARG(uap, flags), retval); -done: + /* msg.msg_control freed by do_sys_sendmsg() */ + if (iov != aiov) kmem_free(iov, iovsz); return (error); + +out: + if (iov != aiov) + kmem_free(iov, iovsz); + if (msg.msg_control) + m_free(msg.msg_control); + return error; } int
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat Aug 8 15:41:54 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #941): sys/compat/netbsd32/netbsd32_socket.c: revision 1.42 Memory leak, triggerable from an unprivileged user. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.41.14.1 src/sys/compat/netbsd32/netbsd32_socket.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sun Aug 2 11:29:10 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_ioctl.c Log Message: Pull up following revision(s) (requested by maxv in ticket #930): sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.82 Wrong logic. Here, userland can control the size and the data copied, which basically means it can overflow kernel memory. ok martin@ christos@ To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.69.4.1 src/sys/compat/netbsd32/netbsd32_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sun Aug 2 11:29:10 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_ioctl.c Log Message: Pull up following revision(s) (requested by maxv in ticket #930): sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.82 Wrong logic. Here, userland can control the size and the data copied, which basically means it can overflow kernel memory. ok martin@ christos@ To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.69.4.1 src/sys/compat/netbsd32/netbsd32_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/netbsd32/netbsd32_ioctl.c diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.69 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.69.4.1 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.69 Fri Jan 24 12:16:10 2014 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Sun Aug 2 11:29:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.69 2014/01/24 12:16:10 bouyer Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.69.4.1 2015/08/02 11:29:10 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.69 2014/01/24 12:16:10 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_ioctl.c,v 1.69.4.1 2015/08/02 11:29:10 martin Exp $); #include sys/param.h #include sys/systm.h @@ -137,7 +137,7 @@ netbsd32_to_if_addrprefreq(const struct strlcpy(ifap-ifap_name, ifap32-ifap_name, sizeof(ifap-ifap_name)); ifap-ifap_preference = ifap32-ifap_preference; memcpy(ifap-ifap_addr, ifap32-ifap_addr, - max(ifap32-ifap_addr.ss_len, _SS_MAXSIZE)); + min(ifap32-ifap_addr.ss_len, _SS_MAXSIZE)); } static inline void @@ -454,7 +454,7 @@ netbsd32_from_if_addrprefreq(const struc strlcpy(ifap32-ifap_name, ifap-ifap_name, sizeof(ifap32-ifap_name)); ifap32-ifap_preference = ifap-ifap_preference; memcpy(ifap32-ifap_addr, ifap-ifap_addr, - max(ifap-ifap_addr.ss_len, _SS_MAXSIZE)); + min(ifap-ifap_addr.ss_len, _SS_MAXSIZE)); } static inline void
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Fri Jul 17 04:34:35 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_time.c Log Message: Pull up following revision(s) (requested by martin in ticket #879): sys/compat/netbsd32/netbsd32_time.c: revision 1.43 Use the right type in sizeof() for copyin() in adjtime To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.12.1 src/sys/compat/netbsd32/netbsd32_time.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/netbsd32/netbsd32_time.c diff -u src/sys/compat/netbsd32/netbsd32_time.c:1.42 src/sys/compat/netbsd32/netbsd32_time.c:1.42.12.1 --- src/sys/compat/netbsd32/netbsd32_time.c:1.42 Tue Oct 2 01:44:28 2012 +++ src/sys/compat/netbsd32/netbsd32_time.c Fri Jul 17 04:34:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_time.c,v 1.42 2012/10/02 01:44:28 christos Exp $ */ +/* $NetBSD: netbsd32_time.c,v 1.42.12.1 2015/07/17 04:34:34 snj Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_time.c,v 1.42 2012/10/02 01:44:28 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_time.c,v 1.42.12.1 2015/07/17 04:34:34 snj Exp $); #if defined(_KERNEL_OPT) #include opt_ntp.h @@ -332,7 +332,7 @@ netbsd32___adjtime50(struct lwp *l, cons if (SCARG_P32(uap, delta)) { error = copyin(SCARG_P32(uap, delta), atv, - sizeof(struct timeval)); + sizeof(atv)); if (error) return (error);
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Fri Jul 17 04:34:35 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_time.c Log Message: Pull up following revision(s) (requested by martin in ticket #879): sys/compat/netbsd32/netbsd32_time.c: revision 1.43 Use the right type in sizeof() for copyin() in adjtime To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.42.12.1 src/sys/compat/netbsd32/netbsd32_time.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat May 16 14:15:50 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_lwp.c Log Message: Pull up the following revisions, requested by matt in ticket #776: src/sys/compat/netbsd32/netbsd32_lwp.c 1.15-1.18 Fix _lwp_ctl for big endian 64-bit platforms. (Little-endian too but not as noticable). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.10.1 src/sys/compat/netbsd32/netbsd32_lwp.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/netbsd32/netbsd32_lwp.c diff -u src/sys/compat/netbsd32/netbsd32_lwp.c:1.15 src/sys/compat/netbsd32/netbsd32_lwp.c:1.15.10.1 --- src/sys/compat/netbsd32/netbsd32_lwp.c:1.15 Fri Mar 29 01:04:30 2013 +++ src/sys/compat/netbsd32/netbsd32_lwp.c Sat May 16 14:15:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_lwp.c,v 1.15 2013/03/29 01:04:30 christos Exp $ */ +/* $NetBSD: netbsd32_lwp.c,v 1.15.10.1 2015/05/16 14:15:50 martin Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_lwp.c,v 1.15 2013/03/29 01:04:30 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_lwp.c,v 1.15.10.1 2015/05/16 14:15:50 martin Exp $); #include sys/types.h #include sys/param.h @@ -280,9 +280,16 @@ netbsd32__lwp_ctl(struct lwp *l, const s syscallarg(int) features; syscallarg(netbsd32_pointer_t) address; } */ - struct sys__lwp_ctl_args ua; - - NETBSD32TO64_UAP(features); - NETBSD32TOP_UAP(address, struct lwpctl *); - return sys__lwp_ctl(l, ua, retval); + netbsd32_pointer_t vaddr32; + int error, features; + vaddr_t vaddr; + + features = SCARG(uap, features); + features = ~(LWPCTL_FEATURE_CURCPU | LWPCTL_FEATURE_PCTR); + if (features != 0) + return ENODEV; + if ((error = lwp_ctl_alloc(vaddr)) != 0) + return error; + NETBSD32PTR32(vaddr32, (void *)vaddr); + return copyout(vaddr32, SCARG_P32(uap, address), sizeof(vaddr32)); }
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat May 16 14:15:50 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_lwp.c Log Message: Pull up the following revisions, requested by matt in ticket #776: src/sys/compat/netbsd32/netbsd32_lwp.c 1.15-1.18 Fix _lwp_ctl for big endian 64-bit platforms. (Little-endian too but not as noticable). To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.15.10.1 src/sys/compat/netbsd32/netbsd32_lwp.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Sat Mar 7 05:27:54 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: regen for ticket 560 To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.109.2.1 src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.108 -r1.108.2.1 src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_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/netbsd32/netbsd32_syscall.h diff -u src/sys/compat/netbsd32/netbsd32_syscall.h:1.109 src/sys/compat/netbsd32/netbsd32_syscall.h:1.109.2.1 --- src/sys/compat/netbsd32/netbsd32_syscall.h:1.109 Fri Jun 13 10:37:22 2014 +++ src/sys/compat/netbsd32/netbsd32_syscall.h Sat Mar 7 05:27:53 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscall.h,v 1.109 2014/06/13 10:37:22 joerg Exp $ */ +/* $NetBSD: netbsd32_syscall.h,v 1.109.2.1 2015/03/07 05:27:53 snj Exp $ */ /* * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2014/06/13 10:36:18 joerg Exp + * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp */ #ifndef _NETBSD32_SYS_SYSCALL_H_ @@ -1224,7 +1224,7 @@ /* syscall: netbsd32_openat ret: int args: int const netbsd32_charp int ... */ #define NETBSD32_SYS_netbsd32_openat 468 -/* syscall: netbsd32_readlinkat ret: int args: int const netbsd32_charp netbsd32_charp size_t */ +/* syscall: netbsd32_readlinkat ret: netbsd32_ssize_t args: int const netbsd32_charp netbsd32_charp size_t */ #define NETBSD32_SYS_netbsd32_readlinkat 469 /* syscall: netbsd32_symlinkat ret: int args: const netbsd32_charp int const netbsd32_charp */ Index: src/sys/compat/netbsd32/netbsd32_syscallargs.h diff -u src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109 src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109.2.1 --- src/sys/compat/netbsd32/netbsd32_syscallargs.h:1.109 Fri Jun 13 10:37:22 2014 +++ src/sys/compat/netbsd32/netbsd32_syscallargs.h Sat Mar 7 05:27:54 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: netbsd32_syscallargs.h,v 1.109 2014/06/13 10:37:22 joerg Exp $ */ +/* $NetBSD: netbsd32_syscallargs.h,v 1.109.2.1 2015/03/07 05:27:54 snj Exp $ */ /* * System call argument lists. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2014/06/13 10:36:18 joerg Exp + * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp */ #ifndef _NETBSD32_SYS_SYSCALLARGS_H_ Index: src/sys/compat/netbsd32/netbsd32_syscalls.c diff -u src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108 src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108.2.1 --- src/sys/compat/netbsd32/netbsd32_syscalls.c:1.108 Fri Jun 13 10:37:22 2014 +++ src/sys/compat/netbsd32/netbsd32_syscalls.c Sat Mar 7 05:27:54 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_syscalls.c,v 1.108 2014/06/13 10:37:22 joerg Exp $ */ +/* $NetBSD: netbsd32_syscalls.c,v 1.108.2.1 2015/03/07 05:27:54 snj Exp $ */ /* * System call names. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2014/06/13 10:36:18 joerg Exp + * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_syscalls.c,v 1.108 2014/06/13 10:37:22 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_syscalls.c,v 1.108.2.1 2015/03/07 05:27:54 snj Exp $); #if defined(_KERNEL_OPT) #if defined(_KERNEL_OPT) Index: src/sys/compat/netbsd32/netbsd32_sysent.c diff -u src/sys/compat/netbsd32/netbsd32_sysent.c:1.108 src/sys/compat/netbsd32/netbsd32_sysent.c:1.108.2.1 --- src/sys/compat/netbsd32/netbsd32_sysent.c:1.108 Fri Jun 13 10:37:22 2014 +++ src/sys/compat/netbsd32/netbsd32_sysent.c Sat Mar 7 05:27:54 2015 @@ -1,14 +1,14 @@ -/* $NetBSD: netbsd32_sysent.c,v 1.108 2014/06/13 10:37:22 joerg Exp $ */ +/* $NetBSD: netbsd32_sysent.c,v 1.108.2.1 2015/03/07 05:27:54 snj Exp $ */ /* * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * created from NetBSD: syscalls.master,v 1.101 2014/06/13 10:36:18 joerg Exp + * created from NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_sysent.c,v 1.108 2014/06/13 10:37:22 joerg Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_sysent.c,v 1.108.2.1 2015/03/07 05:27:54 snj Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Sat Mar 7 05:27:54 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_syscall.h netbsd32_syscallargs.h netbsd32_syscalls.c netbsd32_sysent.c Log Message: regen for ticket 560 To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.109.2.1 src/sys/compat/netbsd32/netbsd32_syscall.h \ src/sys/compat/netbsd32/netbsd32_syscallargs.h cvs rdiff -u -r1.108 -r1.108.2.1 src/sys/compat/netbsd32/netbsd32_syscalls.c \ src/sys/compat/netbsd32/netbsd32_sysent.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Sat Mar 7 05:22:02 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: syscalls.master Log Message: Pull up following revision(s) (requested by khorben in ticket #560): sys/compat/netbsd32/syscalls.master: revision 1.102 readlinkat returns ssize_t To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.101.2.1 src/sys/compat/netbsd32/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/netbsd32/syscalls.master diff -u src/sys/compat/netbsd32/syscalls.master:1.101 src/sys/compat/netbsd32/syscalls.master:1.101.2.1 --- src/sys/compat/netbsd32/syscalls.master:1.101 Fri Jun 13 10:36:18 2014 +++ src/sys/compat/netbsd32/syscalls.master Sat Mar 7 05:22:01 2015 @@ -1,4 +1,4 @@ - $NetBSD: syscalls.master,v 1.101 2014/06/13 10:36:18 joerg Exp $ + $NetBSD: syscalls.master,v 1.101.2.1 2015/03/07 05:22:01 snj Exp $ ; from: NetBSD: syscalls.master,v 1.81 1998/07/05 08:49:50 jonathan Exp ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -1008,7 +1008,7 @@ const netbsd32_charp path, \ int oflags, ... \ mode_t mode); } -469 STD { int|netbsd32||readlinkat(int fd, \ +469 STD { netbsd32_ssize_t|netbsd32||readlinkat(int fd, \ const netbsd32_charp path, \ netbsd32_charp buf, \ size_t bufsize); }
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Sat Mar 7 05:22:02 UTC 2015 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: syscalls.master Log Message: Pull up following revision(s) (requested by khorben in ticket #560): sys/compat/netbsd32/syscalls.master: revision 1.102 readlinkat returns ssize_t To generate a diff of this commit: cvs rdiff -u -r1.101 -r1.101.2.1 src/sys/compat/netbsd32/syscalls.master Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Dec 12 19:12:08 UTC 2014 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_30.c Log Message: Pull up following revision(s) (requested by maxv in ticket #314): sys/compat/netbsd32/netbsd32_compat_30.c: revision 1.31 User-triggerable kmem_alloc(0). Ok martin@ christos@ User To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.34.1 src/sys/compat/netbsd32/netbsd32_compat_30.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/netbsd32/netbsd32_compat_30.c diff -u src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30.34.1 --- src/sys/compat/netbsd32/netbsd32_compat_30.c:1.30 Fri Apr 23 15:19:20 2010 +++ src/sys/compat/netbsd32/netbsd32_compat_30.c Fri Dec 12 19:12:08 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $ */ +/* $NetBSD: netbsd32_compat_30.c,v 1.30.34.1 2014/12/12 19:12:08 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30 2010/04/23 15:19:20 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_30.c,v 1.30.34.1 2014/12/12 19:12:08 martin Exp $); #include sys/param.h #include sys/systm.h @@ -78,6 +78,9 @@ compat_30_netbsd32_getdents(struct lwp * error = EBADF; goto out; } + if (count == 0) + goto out; + buf = kmem_alloc(count, KM_SLEEP); error = vn_readdir(fp, buf, UIO_SYSSPACE, count, done, l, 0, 0); if (error == 0) {
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Fri Dec 12 19:12:08 UTC 2014 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_30.c Log Message: Pull up following revision(s) (requested by maxv in ticket #314): sys/compat/netbsd32/netbsd32_compat_30.c: revision 1.31 User-triggerable kmem_alloc(0). Ok martin@ christos@ User To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.30.34.1 src/sys/compat/netbsd32/netbsd32_compat_30.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Thu Oct 30 12:18:56 UTC 2014 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_50.c Log Message: Pull up following revision(s) (requested by maxv in ticket #166): sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.28 fix multiple mistakes: - error from copyout was ignored - the wrong size was specified in copyin - missing locking. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/compat/netbsd32/netbsd32_compat_50.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/netbsd32/netbsd32_compat_50.c diff -u src/sys/compat/netbsd32/netbsd32_compat_50.c:1.24 src/sys/compat/netbsd32/netbsd32_compat_50.c:1.24.2.1 --- src/sys/compat/netbsd32/netbsd32_compat_50.c:1.24 Tue Jun 24 14:33:57 2014 +++ src/sys/compat/netbsd32/netbsd32_compat_50.c Thu Oct 30 12:18:56 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_50.c,v 1.24 2014/06/24 14:33:57 maxv Exp $ */ +/* $NetBSD: netbsd32_compat_50.c,v 1.24.2.1 2014/10/30 12:18:56 martin Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.24 2014/06/24 14:33:57 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: netbsd32_compat_50.c,v 1.24.2.1 2014/10/30 12:18:56 martin Exp $); #if defined(_KERNEL_OPT) #include opt_sysv.h @@ -248,30 +248,31 @@ compat_50_netbsd32_adjtime(struct lwp *l return (error); if (SCARG_P32(uap, olddelta)) { + mutex_spin_enter(timecounter_lock); atv.tv_sec = time_adjtime / 100; atv.tv_usec = time_adjtime % 100; if (atv.tv_usec 0) { atv.tv_usec += 100; atv.tv_sec--; } - (void) copyout(atv, - SCARG_P32(uap, olddelta), - sizeof(atv)); + mutex_spin_exit(timecounter_lock); + + error = copyout(atv, SCARG_P32(uap, olddelta), sizeof(atv)); if (error) return (error); } if (SCARG_P32(uap, delta)) { - error = copyin(SCARG_P32(uap, delta), atv, - sizeof(struct timeval)); + error = copyin(SCARG_P32(uap, delta), atv, sizeof(atv)); if (error) return (error); + mutex_spin_enter(timecounter_lock); time_adjtime = (int64_t)atv.tv_sec * 100 + atv.tv_usec; - if (time_adjtime) /* We need to save the system time during shutdown */ time_adjusted |= 1; + mutex_spin_exit(timecounter_lock); } return 0;
CVS commit: [netbsd-7] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Thu Oct 30 12:18:56 UTC 2014 Modified Files: src/sys/compat/netbsd32 [netbsd-7]: netbsd32_compat_50.c Log Message: Pull up following revision(s) (requested by maxv in ticket #166): sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.28 fix multiple mistakes: - error from copyout was ignored - the wrong size was specified in copyin - missing locking. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.24.2.1 src/sys/compat/netbsd32/netbsd32_compat_50.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.