CVS commit: [netbsd-8] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Thu Feb 13 19:34:30 UTC 2020 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32_ioctl.c Log Message: Pull up following revision(s) (requested by mlelstv in ticket #1504): sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.108 sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.109 Don't use strlcpy to copy untrusted input, it may not be NUL-terminated. Where did the +1 came from ? To generate a diff of this commit: cvs rdiff -u -r1.89.8.2 -r1.89.8.3 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.89.8.2 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.89.8.3 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.89.8.2 Mon Jul 22 16:27:29 2019 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Thu Feb 13 19:34:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.89.8.2 2019/07/22 16:27:29 martin Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.89.8.3 2020/02/13 19:34:29 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.89.8.2 2019/07/22 16:27:29 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.89.8.3 2020/02/13 19:34:29 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -145,7 +145,7 @@ static inline void netbsd32_to_if_addrprefreq(const struct netbsd32_if_addrprefreq *ifap32, struct if_addrprefreq *ifap, u_long cmd) { - strlcpy(ifap->ifap_name, ifap32->ifap_name, sizeof(ifap->ifap_name)); + memcpy(ifap->ifap_name, ifap32->ifap_name, IFNAMSIZ); ifap->ifap_preference = ifap32->ifap_preference; memcpy(>ifap_addr, >ifap_addr, min(ifap32->ifap_addr.ss_len, _SS_MAXSIZE)); @@ -341,7 +341,7 @@ static inline void netbsd32_to_ieee80211req(struct netbsd32_ieee80211req *ireq32, struct ieee80211req *ireq, u_long cmd) { - strlcpy(ireq->i_name, ireq32->i_name, IFNAMSIZ); + memcpy(ireq->i_name, ireq32->i_name, IFNAMSIZ); ireq->i_type = ireq32->i_type; ireq->i_val = ireq32->i_val; ireq->i_len = ireq32->i_len; @@ -355,7 +355,7 @@ netbsd32_to_ieee80211_nwkey(struct netbs { int i; - strlcpy(nwk->i_name, nwk32->i_name, IFNAMSIZ); + memcpy(nwk->i_name, nwk32->i_name, IFNAMSIZ); nwk->i_wepon = nwk32->i_wepon; nwk->i_defkid = nwk32->i_defkid; for (i = 0; i < IEEE80211_WEP_NKID; i++) { @@ -569,7 +569,7 @@ static inline void netbsd32_from_if_addrprefreq(const struct if_addrprefreq *ifap, struct netbsd32_if_addrprefreq *ifap32, u_long cmd) { - strlcpy(ifap32->ifap_name, ifap->ifap_name, sizeof(ifap32->ifap_name)); + memcpy(ifap32->ifap_name, ifap->ifap_name, IFNAMSIZ); ifap32->ifap_preference = ifap->ifap_preference; memcpy(>ifap_addr, >ifap_addr, min(ifap->ifap_addr.ss_len, _SS_MAXSIZE)); @@ -770,7 +770,7 @@ static inline void netbsd32_from_ieee80211req(struct ieee80211req *ireq, struct netbsd32_ieee80211req *ireq32, u_long cmd) { - strlcpy(ireq32->i_name, ireq->i_name, IFNAMSIZ); + memcpy(ireq32->i_name, ireq->i_name, IFNAMSIZ); ireq32->i_type = ireq->i_type; ireq32->i_val = ireq->i_val; ireq32->i_len = ireq->i_len; @@ -784,7 +784,7 @@ netbsd32_from_ieee80211_nwkey(struct iee { int i; - strlcpy(nwk32->i_name, nwk->i_name, IFNAMSIZ); + memcpy(nwk32->i_name, nwk->i_name, IFNAMSIZ); nwk32->i_wepon = nwk->i_wepon; nwk32->i_defkid = nwk->i_defkid; for (i = 0; i < IEEE80211_WEP_NKID; i++) {
CVS commit: [netbsd-8] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Tue Mar 12 17:46:59 UTC 2019 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32_compat_60.c Log Message: Pull up following revision(s) (requested by martin in ticket #1211): sys/compat/netbsd32/netbsd32_compat_60.c: 1.3 don't forget to convert the timespec. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.12.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.2 src/sys/compat/netbsd32/netbsd32_compat_60.c:1.2.12.1 --- src/sys/compat/netbsd32/netbsd32_compat_60.c:1.2 Thu Aug 21 06:40:35 2014 +++ src/sys/compat/netbsd32/netbsd32_compat_60.c Tue Mar 12 17:46:59 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_compat_60.c,v 1.2 2014/08/21 06:40:35 maxv Exp $ */ +/* $NetBSD: netbsd32_compat_60.c,v 1.2.12.1 2019/03/12 17:46:59 snj 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.2 2014/08/21 06:40:35 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_60.c,v 1.2.12.1 2019/03/12 17:46:59 snj 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-8] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Thu Dec 27 12:04:09 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32_netbsd.c Log Message: Pull up following revision(s) (requested by mrg in ticket #1146): sys/compat/netbsd32/netbsd32_netbsd.c: revision 1.219 pset_create() takes a pointer so it needs special handling. To generate a diff of this commit: cvs rdiff -u -r1.206.2.1 -r1.206.2.2 \ src/sys/compat/netbsd32/netbsd32_netbsd.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_netbsd.c diff -u src/sys/compat/netbsd32/netbsd32_netbsd.c:1.206.2.1 src/sys/compat/netbsd32/netbsd32_netbsd.c:1.206.2.2 --- src/sys/compat/netbsd32/netbsd32_netbsd.c:1.206.2.1 Tue Dec 25 11:19:52 2018 +++ src/sys/compat/netbsd32/netbsd32_netbsd.c Thu Dec 27 12:04:09 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_netbsd.c,v 1.206.2.1 2018/12/25 11:19:52 martin Exp $ */ +/* $NetBSD: netbsd32_netbsd.c,v 1.206.2.2 2018/12/27 12:04:09 martin Exp $ */ /* * Copyright (c) 1998, 2001, 2008 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.206.2.1 2018/12/25 11:19:52 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_netbsd.c,v 1.206.2.2 2018/12/27 12:04:09 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ddb.h" @@ -2837,8 +2837,11 @@ netbsd32_pset_create(struct lwp *l, /* { syscallarg(netbsd32_psetidp_t) psid; }; */ + struct sys_pset_create_args ua; - return sys_pset_create(l, (const void *)uap, retval); + NETBSD32TOP_UAP(psid, psetid_t); + + return sys_pset_create(l, , retval); } int
CVS commit: [netbsd-8] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Tue Nov 13 16:55:22 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32_socket.c Log Message: Pull up following revision(s) (requested by maxv in ticket #1093): sys/compat/netbsd32/netbsd32_socket.c: 1.48 Fix inverted logic, which leads to buffer overflow. Detected by kASan. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.44.8.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.44 src/sys/compat/netbsd32/netbsd32_socket.c:1.44.8.1 --- src/sys/compat/netbsd32/netbsd32_socket.c:1.44 Tue Sep 13 07:01:07 2016 +++ src/sys/compat/netbsd32/netbsd32_socket.c Tue Nov 13 16:55:22 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_socket.c,v 1.44 2016/09/13 07:01:07 martin Exp $ */ +/* $NetBSD: netbsd32_socket.c,v 1.44.8.1 2018/11/13 16:55:22 snj Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.44 2016/09/13 07:01:07 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_socket.c,v 1.44.8.1 2018/11/13 16:55:22 snj 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-8] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Sat Aug 25 11:13:06 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32.h netbsd32_fs.c Log Message: Pull up following revision(s) (requested by mrg in ticket #977): sys/compat/netbsd32/netbsd32_fs.c: revision 1.81 sys/compat/netbsd32/netbsd32.h: revision 1.119 support nullfs in netbsd32. To generate a diff of this commit: cvs rdiff -u -r1.114.8.2 -r1.114.8.3 src/sys/compat/netbsd32/netbsd32.h cvs rdiff -u -r1.80 -r1.80.2.1 src/sys/compat/netbsd32/netbsd32_fs.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.h diff -u src/sys/compat/netbsd32/netbsd32.h:1.114.8.2 src/sys/compat/netbsd32/netbsd32.h:1.114.8.3 --- src/sys/compat/netbsd32/netbsd32.h:1.114.8.2 Sat Apr 14 03:04:06 2018 +++ src/sys/compat/netbsd32/netbsd32.h Sat Aug 25 11:13:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32.h,v 1.114.8.2 2018/04/14 03:04:06 snj Exp $ */ +/* $NetBSD: netbsd32.h,v 1.114.8.3 2018/08/25 11:13:05 martin Exp $ */ /* * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green @@ -958,7 +958,7 @@ struct netbsd32_tmpfs_args { /* from */ struct netbsd32_iso_args { netbsd32_charp fspec; - struct export_args30 _pad1; + struct netbsd32_export_args30 _pad1; int flags; }; @@ -1014,8 +1014,6 @@ struct netbsd32_mountd_exports_list { netbsd32_export_argsp mel_exports; }; -/* no struct export_args30 yet */ - /* from */ struct netbsd32_nfs_args { int32_t version; /* args structure version number */ @@ -1053,6 +1051,17 @@ struct netbsd32_msdosfs_args { int gmtoff; /* v3: offset from UTC in seconds */ }; +/* from */ +struct netbsd32_layer_args { + netbsd32_charp target; /* Target of loopback */ + struct netbsd32_export_args30 _pad1; /* compat with old userland tools */ +}; + +/* from */ +struct netbsd32_null_args { + struct netbsd32_layer_args la; /* generic layerfs args */ +}; + struct netbsd32_posix_spawn_file_actions_entry { enum { FAE32_OPEN, FAE32_DUP2, FAE32_CLOSE } fae_action; Index: src/sys/compat/netbsd32/netbsd32_fs.c diff -u src/sys/compat/netbsd32/netbsd32_fs.c:1.80 src/sys/compat/netbsd32/netbsd32_fs.c:1.80.2.1 --- src/sys/compat/netbsd32/netbsd32_fs.c:1.80 Thu Jun 1 02:45:08 2017 +++ src/sys/compat/netbsd32/netbsd32_fs.c Sat Aug 25 11:13:05 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_fs.c,v 1.80 2017/06/01 02:45:08 chs Exp $ */ +/* $NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80 2017/06/01 02:45:08 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_fs.c,v 1.80.2.1 2018/08/25 11:13:05 martin Exp $"); #include #include @@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: netbsd32_fs. #include #include #include +#include #define NFS_ARGS_ONLY #include @@ -799,6 +800,7 @@ netbsd32___mount50(struct lwp *l, const struct netbsd32_nfs_args nfs_args; struct netbsd32_msdosfs_args msdosfs_args; struct netbsd32_tmpfs_args tmpfs_args; + struct netbsd32_null_args null_args; } fs_args32; union { struct ufs_args ufs_args; @@ -807,6 +809,7 @@ netbsd32___mount50(struct lwp *l, const struct nfs_args nfs_args; struct msdosfs_args msdosfs_args; struct tmpfs_args tmpfs_args; + struct null_args null_args; } fs_args; const char *type = SCARG_P32(uap, type); const char *path = SCARG_P32(uap, path); @@ -953,6 +956,20 @@ netbsd32___mount50(struct lwp *l, const data_seg = UIO_SYSSPACE; data = _args.nfs_args; data_len = sizeof(fs_args.nfs_args); + } else if (strcmp(mtype, MOUNT_NULL) == 0) { + if (data_len > sizeof(fs_args32.null_args)) + return EINVAL; + if ((flags & MNT_GETARGS) == 0) { + error = copyin(data, _args32.null_args, + sizeof(fs_args32.null_args)); + if (error) +return error; + fs_args.null_args.la.target = + NETBSD32PTR64(fs_args32.null_args.la.target); + } + data_seg = UIO_SYSSPACE; + data = _args.null_args; + data_len = sizeof(fs_args.null_args); } else { data_seg = UIO_USERSPACE; } @@ -1032,6 +1049,13 @@ netbsd32___mount50(struct lwp *l, const fs_args.nfs_args.hostname); error = copyout(_args32.nfs_args, data, sizeof(fs_args32.nfs_args)); + } else if (strcmp(mtype, MOUNT_NULL) == 0) { + if (data_len != sizeof(fs_args.null_args)) +return EINVAL; + NETBSD32PTR32(fs_args32.null_args.la.target, + fs_args.null_args.la.target); + error = copyout(_args32.null_args, data, + sizeof(fs_args32.null_args)); } } return error;
CVS commit: [netbsd-8] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Sat Apr 14 03:04:06 UTC 2018 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32.h Log Message: Pull up revision 1.116 of sys/compat/netbsd32/netbsd32.h to fix fallout from ticket #713: include for siginfo32_t. To generate a diff of this commit: cvs rdiff -u -r1.114.8.1 -r1.114.8.2 src/sys/compat/netbsd32/netbsd32.h 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.h diff -u src/sys/compat/netbsd32/netbsd32.h:1.114.8.1 src/sys/compat/netbsd32/netbsd32.h:1.114.8.2 --- src/sys/compat/netbsd32/netbsd32.h:1.114.8.1 Thu Apr 12 13:42:49 2018 +++ src/sys/compat/netbsd32/netbsd32.h Sat Apr 14 03:04:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32.h,v 1.114.8.1 2018/04/12 13:42:49 martin Exp $ */ +/* $NetBSD: netbsd32.h,v 1.114.8.2 2018/04/14 03:04:06 snj Exp $ */ /* * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green @@ -49,6 +49,7 @@ #include #include #include +#include #include
CVS commit: [netbsd-8] src/sys/compat/netbsd32
Module Name:src Committed By: martin Date: Mon Nov 27 14:07:53 UTC 2017 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32_ioctl.c netbsd32_ioctl.h Log Message: Pull up following revision(s) (requested by jmcneill in ticket #396): sys/compat/netbsd32/netbsd32_ioctl.h: revision 1.57 sys/compat/netbsd32/netbsd32_ioctl.c: revision 1.90 Add support for SIOCGIFGENERIC and SIOCSIFGENERIC ioctls. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.89.8.1 src/sys/compat/netbsd32/netbsd32_ioctl.c cvs rdiff -u -r1.56 -r1.56.8.1 src/sys/compat/netbsd32/netbsd32_ioctl.h 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.89 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.89.8.1 --- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.89 Sat Jan 14 16:34:44 2017 +++ src/sys/compat/netbsd32/netbsd32_ioctl.c Mon Nov 27 14:07:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.c,v 1.89 2017/01/14 16:34:44 maya Exp $ */ +/* $NetBSD: netbsd32_ioctl.c,v 1.89.8.1 2017/11/27 14:07:53 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.89 2017/01/14 16:34:44 maya Exp $"); +__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.89.8.1 2017/11/27 14:07:53 martin Exp $"); #if defined(_KERNEL_OPT) #include "opt_ntp.h" @@ -116,8 +116,14 @@ netbsd32_to_ifreq(struct netbsd32_ifreq * union member needs to be converted to 64 bits... this * is very driver specific and so we ignore it for now.. */ - if (cmd == SIOCGIFDATA || cmd == SIOCZIFDATA) + switch (cmd) { + case SIOCGIFDATA: + case SIOCZIFDATA: + case SIOCGIFGENERIC: + case SIOCSIFGENERIC: p->ifr_data = (void *)NETBSD32PTR64(s32p->ifr_data); + break; + } } static inline void @@ -534,8 +540,14 @@ netbsd32_from_ifreq(struct ifreq *p, str * is very driver specific and so we ignore it for now.. */ memcpy(s32p, p, sizeof *s32p); - if (cmd == SIOCGIFDATA || cmd == SIOCZIFDATA) + switch (cmd) { + case SIOCGIFDATA: + case SIOCZIFDATA: + case SIOCGIFGENERIC: + case SIOCSIFGENERIC: NETBSD32PTR32(s32p->ifr_data, p->ifr_data); + break; + } } static inline void @@ -1233,6 +1245,11 @@ netbsd32_ioctl(struct lwp *l, const stru case SIOCGIFMEDIA32: IOCTL_STRUCT_CONV_TO(SIOCGIFMEDIA, ifmediareq); + case SIOCGIFGENERIC32: + IOCTL_STRUCT_CONV_TO(SIOCGIFGENERIC, ifreq); + case SIOCSIFGENERIC32: + IOCTL_STRUCT_CONV_TO(SIOCSIFGENERIC, ifreq); + case PPPOESETPARMS32: IOCTL_STRUCT_CONV_TO(PPPOESETPARMS, pppoediscparms); case PPPOEGETPARMS32: Index: src/sys/compat/netbsd32/netbsd32_ioctl.h diff -u src/sys/compat/netbsd32/netbsd32_ioctl.h:1.56 src/sys/compat/netbsd32/netbsd32_ioctl.h:1.56.8.1 --- src/sys/compat/netbsd32/netbsd32_ioctl.h:1.56 Mon Dec 26 23:05:06 2016 +++ src/sys/compat/netbsd32/netbsd32_ioctl.h Mon Nov 27 14:07:53 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_ioctl.h,v 1.56 2016/12/26 23:05:06 christos Exp $ */ +/* $NetBSD: netbsd32_ioctl.h,v 1.56.8.1 2017/11/27 14:07:53 martin Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -374,6 +374,9 @@ struct netbsd32_if_clonereq { #define SIOCSIFMEDIA32 _IOWR('i', 53, struct netbsd32_ifreq) /* set net media */ #define OSIOCSIFMEDIA32 _IOWR('i', 53, struct netbsd32_oifreq) /* set net media */ +#define SIOCSIFGENERIC32 _IOW('i', 57, struct netbsd32_ifreq) /* generic IF set op */ +#define SIOCGIFGENERIC32 _IOWR('i', 58, struct netbsd32_ifreq) /* generic IF get op */ + #define SIOCIFGCLONERS32 _IOWR('i', 120, struct netbsd32_if_clonereq) /* get cloners */ #define SIOCSIFMTU32 _IOW('i', 127, struct netbsd32_ifreq) /* set ifnet mtu */
CVS commit: [netbsd-8] src/sys/compat/netbsd32
Module Name:src Committed By: snj Date: Mon Nov 6 10:33:06 UTC 2017 Modified Files: src/sys/compat/netbsd32 [netbsd-8]: netbsd32_conv.h Log Message: Pull up following revision(s) (requested by martin in ticket #339): sys/compat/netbsd32/netbsd32_conv.h: revision 1.33 PR kern/52681: fix msghdr conversion. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.31.8.1 src/sys/compat/netbsd32/netbsd32_conv.h 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_conv.h diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.31 src/sys/compat/netbsd32/netbsd32_conv.h:1.31.8.1 --- src/sys/compat/netbsd32/netbsd32_conv.h:1.31 Sun Nov 13 13:59:45 2016 +++ src/sys/compat/netbsd32/netbsd32_conv.h Mon Nov 6 10:33:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: netbsd32_conv.h,v 1.31 2016/11/13 13:59:45 rin Exp $ */ +/* $NetBSD: netbsd32_conv.h,v 1.31.8.1 2017/11/06 10:33:06 snj Exp $ */ /* * Copyright (c) 1998, 2001 Matthew R. Green @@ -287,10 +287,10 @@ static __inline void netbsd32_from_msghdr(struct netbsd32_msghdr *mhp32, const struct msghdr *mhp) { - mhp32->msg_name = mhp32->msg_name; - mhp32->msg_namelen = mhp32->msg_namelen; - mhp32->msg_iovlen = mhp32->msg_iovlen; - mhp32->msg_control = mhp32->msg_control; + NETBSD32PTR32(mhp32->msg_name, mhp->msg_name); + mhp32->msg_namelen = mhp->msg_namelen; + mhp32->msg_iovlen = mhp->msg_iovlen; + NETBSD32PTR32(mhp32->msg_control, mhp->msg_control); mhp32->msg_controllen = mhp->msg_controllen; mhp32->msg_flags = mhp->msg_flags; }