CVS commit: [netbsd-6] src/usr.bin/ftp
Module Name:src Committed By: msaitoh Date: Mon Nov 3 12:57:42 UTC 2014 Modified Files: src/usr.bin/ftp [netbsd-6]: version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1180): usr.bin/ftp/version.h: revision 1.85 Version 20141026 Ignore special characters unless they're from the command line. Fixes CVE-2014-8517 To generate a diff of this commit: cvs rdiff -u -r1.82.8.1 -r1.82.8.2 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.82.8.1 src/usr.bin/ftp/version.h:1.82.8.2 --- src/usr.bin/ftp/version.h:1.82.8.1 Tue Dec 17 21:07:59 2013 +++ src/usr.bin/ftp/version.h Mon Nov 3 12:57:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.82.8.1 2013/12/17 21:07:59 bouyer Exp $ */ +/* $NetBSD: version.h,v 1.82.8.2 2014/11/03 12:57:42 msaitoh Exp $ */ /*- * Copyright (c) 1999-2009 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION 20130220 +#define FTP_VERSION 20141026 #endif
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:01:25 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1180. To generate a diff of this commit: cvs rdiff -u -r1.1.2.142 -r1.1.2.143 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.142 src/doc/CHANGES-6.2:1.1.2.143 --- src/doc/CHANGES-6.2:1.1.2.142 Mon Oct 27 15:06:06 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 13:01:25 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.142 2014/10/27 15:06:06 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.143 2014/11/03 13:01:25 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -3989,3 +3989,9 @@ common/lib/libc/arch/i386/string/small/s This fixes strchr(s, '\0'), as used by the FAT first-stage bootloader on x86 (bootxx_msdos). Fixes PR port-i386/49208. [khorben, ticket #1158] + +usr.bin/ftp/version.h1.85 + + Change the version that ftp announces to 20141026. It can be a + useful method to determine if CVE-2014-8517 is fixed. + [lukem, ticket #1180]
CVS commit: [netbsd-6-1] src/usr.bin/ftp
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:02:33 UTC 2014 Modified Files: src/usr.bin/ftp [netbsd-6-1]: version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1180): usr.bin/ftp/version.h: revision 1.85 Version 20141026 Ignore special characters unless they're from the command line. Fixes CVE-2014-8517 To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.82.16.1 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.82 src/usr.bin/ftp/version.h:1.82.16.1 --- src/usr.bin/ftp/version.h:1.82 Sat Jun 5 13:59:39 2010 +++ src/usr.bin/ftp/version.h Mon Nov 3 13:02:32 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.82 2010/06/05 13:59:39 lukem Exp $ */ +/* $NetBSD: version.h,v 1.82.16.1 2014/11/03 13:02:32 msaitoh Exp $ */ /*- * Copyright (c) 1999-2009 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION 20100605 +#define FTP_VERSION 20141026 #endif
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:03:03 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket 1180. To generate a diff of this commit: cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.4 src/doc/CHANGES-6.1.6:1.1.2.5 --- src/doc/CHANGES-6.1.6:1.1.2.4 Mon Oct 27 06:01:06 2014 +++ src/doc/CHANGES-6.1.6 Mon Nov 3 13:03:03 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.4 2014/10/27 06:01:06 snj Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.5 2014/11/03 13:03:03 msaitoh Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -120,3 +120,8 @@ usr.bin/ftp/fetch.c1.206 via patch from the command line. [christos, ticket #1175] +usr.bin/ftp/version.h1.85 + + Change the version that ftp announces to 20141026. It can be a + useful method to determine if CVE-2014-8517 is fixed. + [lukem, ticket #1180]
CVS commit: [netbsd-6-0] src/usr.bin/ftp
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:03:19 UTC 2014 Modified Files: src/usr.bin/ftp [netbsd-6-0]: version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1180): usr.bin/ftp/version.h: revision 1.85 Version 20141026 Ignore special characters unless they're from the command line. Fixes CVE-2014-8517 To generate a diff of this commit: cvs rdiff -u -r1.82 -r1.82.14.1 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.82 src/usr.bin/ftp/version.h:1.82.14.1 --- src/usr.bin/ftp/version.h:1.82 Sat Jun 5 13:59:39 2010 +++ src/usr.bin/ftp/version.h Mon Nov 3 13:03:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.82 2010/06/05 13:59:39 lukem Exp $ */ +/* $NetBSD: version.h,v 1.82.14.1 2014/11/03 13:03:19 msaitoh Exp $ */ /*- * Copyright (c) 1999-2009 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION 20100605 +#define FTP_VERSION 20141026 #endif
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:03:53 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket 1180. To generate a diff of this commit: cvs rdiff -u -r1.1.2.4 -r1.1.2.5 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.4 src/doc/CHANGES-6.0.7:1.1.2.5 --- src/doc/CHANGES-6.0.7:1.1.2.4 Mon Oct 27 06:00:32 2014 +++ src/doc/CHANGES-6.0.7 Mon Nov 3 13:03:53 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.4 2014/10/27 06:00:32 snj Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.5 2014/11/03 13:03:53 msaitoh Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -120,3 +120,8 @@ usr.bin/ftp/fetch.c1.206 via patch from the command line. [christos, ticket #1175] +usr.bin/ftp/version.h1.85 + + Change the version that ftp announces to 20141026. It can be a + useful method to determine if CVE-2014-8517 is fixed. + [lukem, ticket #1180]
CVS commit: src/sys/netinet6
Module Name:src Committed By: roy Date: Mon Nov 3 13:04:12 UTC 2014 Modified Files: src/sys/netinet6: in6.c Log Message: Clear IN6_IFF_DUPLICATED when link goes down or up. To generate a diff of this commit: cvs rdiff -u -r1.178 -r1.179 src/sys/netinet6/in6.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/netinet6/in6.c diff -u src/sys/netinet6/in6.c:1.178 src/sys/netinet6/in6.c:1.179 --- src/sys/netinet6/in6.c:1.178 Mon Oct 27 14:10:12 2014 +++ src/sys/netinet6/in6.c Mon Nov 3 13:04:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: in6.c,v 1.178 2014/10/27 14:10:12 christos Exp $ */ +/* $NetBSD: in6.c,v 1.179 2014/11/03 13:04:12 roy Exp $ */ /* $KAME: in6.c,v 1.198 2001/07/18 09:12:38 itojun Exp $ */ /* @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.178 2014/10/27 14:10:12 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: in6.c,v 1.179 2014/11/03 13:04:12 roy Exp $); #include opt_inet.h #include opt_compat_netbsd.h @@ -2167,6 +2167,10 @@ in6_if_link_up(struct ifnet *ifp) if (ia-ia6_flags IN6_IFF_TENTATIVE) { int rand_delay; + + /* Clear the duplicated flag as we're starting DAD. */ + ia-ia6_flags = ~IN6_IFF_DUPLICATED; + /* * The TENTATIVE flag was likely set by hand * beforehand, implicitly indicating the need for DAD. @@ -2196,6 +2200,7 @@ in6_if_up(struct ifnet *ifp) /* interface may not support link state, so bring it up also */ in6_if_link_up(ifp); } + /* * Mark all addresses as detached. */ @@ -2229,7 +2234,8 @@ in6_if_link_down(struct ifnet *ifp) %s marked detached\n, ip6_sprintf(ia-ia_addr.sin6_addr))); ia-ia6_flags |= IN6_IFF_DETACHED; - ia-ia6_flags = ~IN6_IFF_TENTATIVE; + ia-ia6_flags = + ~(IN6_IFF_TENTATIVE | IN6_IFF_DUPLICATED); nd6_newaddrmsg(ifa); } }
CVS commit: [netbsd-5] src/usr.bin/ftp
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:04:49 UTC 2014 Modified Files: src/usr.bin/ftp [netbsd-5]: version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1929): usr.bin/ftp/version.h: revision 1.85 Version 20141026 Ignore special characters unless they're from the command line. Fixes CVE-2014-8517 To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.77.4.1 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.77 src/usr.bin/ftp/version.h:1.77.4.1 --- src/usr.bin/ftp/version.h:1.77 Wed Aug 13 04:59:13 2008 +++ src/usr.bin/ftp/version.h Mon Nov 3 13:04:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.77 2008/08/13 04:59:13 lukem Exp $ */ +/* $NetBSD: version.h,v 1.77.4.1 2014/11/03 13:04:49 msaitoh Exp $ */ /*- * Copyright (c) 1999-2008 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION 20080813 +#define FTP_VERSION 20141026 #endif
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:05:59 UTC 2014 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: Ticket 1929. To generate a diff of this commit: cvs rdiff -u -r1.1.2.73 -r1.1.2.74 src/doc/CHANGES-5.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.3 diff -u src/doc/CHANGES-5.3:1.1.2.73 src/doc/CHANGES-5.3:1.1.2.74 --- src/doc/CHANGES-5.3:1.1.2.73 Mon Oct 27 12:45:25 2014 +++ src/doc/CHANGES-5.3 Mon Nov 3 13:05:59 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.73 2014/10/27 12:45:25 msaitoh Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.74 2014/11/03 13:05:59 msaitoh Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -1103,3 +1103,9 @@ usr.bin/ftp/fetch.c1.206 via patch Don't pay attention to special characters if they don't come from the command line. [jmcneill, ticket #1928] + +usr.bin/ftp/version.h1.85 + + Change the version that ftp announces to 20141026. It can be a + useful method to determine if CVE-2014-8517 is fixed. + [lukem, ticket #1929]
CVS commit: [netbsd-5-2] src/usr.bin/ftp
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:06:15 UTC 2014 Modified Files: src/usr.bin/ftp [netbsd-5-2]: version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1929): usr.bin/ftp/version.h: revision 1.85 Version 20141026 Ignore special characters unless they're from the command line. Fixes CVE-2014-8517 To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.77.2.1 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.77 src/usr.bin/ftp/version.h:1.77.2.1 --- src/usr.bin/ftp/version.h:1.77 Wed Aug 13 04:59:13 2008 +++ src/usr.bin/ftp/version.h Mon Nov 3 13:06:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.77 2008/08/13 04:59:13 lukem Exp $ */ +/* $NetBSD: version.h,v 1.77.2.1 2014/11/03 13:06:15 msaitoh Exp $ */ /*- * Copyright (c) 1999-2008 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION 20080813 +#define FTP_VERSION 20141026 #endif
CVS commit: [netbsd-5-1] src/usr.bin/ftp
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:07:18 UTC 2014 Modified Files: src/usr.bin/ftp [netbsd-5-1]: version.h Log Message: Pull up following revision(s) (requested by lukem in ticket #1929): usr.bin/ftp/version.h: revision 1.85 Version 20141026 Ignore special characters unless they're from the command line. Fixes CVE-2014-8517 To generate a diff of this commit: cvs rdiff -u -r1.77 -r1.77.12.1 src/usr.bin/ftp/version.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/ftp/version.h diff -u src/usr.bin/ftp/version.h:1.77 src/usr.bin/ftp/version.h:1.77.12.1 --- src/usr.bin/ftp/version.h:1.77 Wed Aug 13 04:59:13 2008 +++ src/usr.bin/ftp/version.h Mon Nov 3 13:07:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: version.h,v 1.77 2008/08/13 04:59:13 lukem Exp $ */ +/* $NetBSD: version.h,v 1.77.12.1 2014/11/03 13:07:18 msaitoh Exp $ */ /*- * Copyright (c) 1999-2008 The NetBSD Foundation, Inc. @@ -34,5 +34,5 @@ #endif #ifndef FTP_VERSION -#define FTP_VERSION 20080813 +#define FTP_VERSION 20141026 #endif
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:06:58 UTC 2014 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.3 Log Message: Ticket 1929. To generate a diff of this commit: cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-5.2.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.3 diff -u src/doc/CHANGES-5.2.3:1.1.2.21 src/doc/CHANGES-5.2.3:1.1.2.22 --- src/doc/CHANGES-5.2.3:1.1.2.21 Mon Oct 27 12:45:50 2014 +++ src/doc/CHANGES-5.2.3 Mon Nov 3 13:06:58 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.3,v 1.1.2.21 2014/10/27 12:45:50 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.3,v 1.1.2.22 2014/11/03 13:06:58 msaitoh Exp $ A complete list of changes from the NetBSD 5.2.2 release to the NetBSD 5.2.3 release: @@ -339,3 +339,9 @@ usr.bin/ftp/fetch.c1.206 via patch Don't pay attention to special characters if they don't come from the command line. [jmcneill, ticket #1928] + +usr.bin/ftp/version.h1.85 + + Change the version that ftp announces to 20141026. It can be a + useful method to determine if CVE-2014-8517 is fixed. + [lukem, ticket #1929]
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 13:07:58 UTC 2014 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.5 Log Message: Ticket 1929. To generate a diff of this commit: cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-5.1.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.5 diff -u src/doc/CHANGES-5.1.5:1.1.2.20 src/doc/CHANGES-5.1.5:1.1.2.21 --- src/doc/CHANGES-5.1.5:1.1.2.20 Mon Oct 27 12:46:11 2014 +++ src/doc/CHANGES-5.1.5 Mon Nov 3 13:07:58 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.5,v 1.1.2.20 2014/10/27 12:46:11 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.5,v 1.1.2.21 2014/11/03 13:07:58 msaitoh Exp $ A complete list of changes from the NetBSD 5.1.4 release to the NetBSD 5.1.5 release: @@ -339,3 +339,9 @@ usr.bin/ftp/fetch.c1.206 via patch Don't pay attention to special characters if they don't come from the command line. [jmcneill, ticket #1928] + +usr.bin/ftp/version.h1.85 + + Change the version that ftp announces to 20141026. It can be a + useful method to determine if CVE-2014-8517 is fixed. + [lukem, ticket #1929]
CVS commit: [netbsd-6] xsrc/external/mit/libdrm/dist
Module Name:xsrc Committed By: msaitoh Date: Mon Nov 3 15:01:41 UTC 2014 Modified Files: xsrc/external/mit/libdrm/dist [netbsd-6]: xf86atomic.h Log Message: Pull up following revision(s) (requested by riastradh in ticket #1116): external/mit/libdrm/dist/xf86atomic.h: revision 1.4 Fix libdrm's atomic_dec_and_test on NetBSD (and Solaris, while here). _nv means new value, not old value! This may help to fix various instability in userland graphics, now that we aren't freeing stuff with a reference count of 1 any more. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.2.1 xsrc/external/mit/libdrm/dist/xf86atomic.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/libdrm/dist/xf86atomic.h diff -u xsrc/external/mit/libdrm/dist/xf86atomic.h:1.3 xsrc/external/mit/libdrm/dist/xf86atomic.h:1.3.2.1 --- xsrc/external/mit/libdrm/dist/xf86atomic.h:1.3 Sat Aug 14 10:19:31 2010 +++ xsrc/external/mit/libdrm/dist/xf86atomic.h Mon Nov 3 15:01:41 2014 @@ -85,7 +85,7 @@ typedef struct { uint_t atomic; } atomic # define atomic_read(x) (int) ((x)-atomic) # define atomic_set(x, val) ((x)-atomic = (uint_t)(val)) # define atomic_inc(x) (atomic_inc_uint ((x)-atomic)) -# define atomic_dec_and_test(x) (atomic_dec_uint_nv((x)-atomic) == 1) +# define atomic_dec_and_test(x) (atomic_dec_uint_nv((x)-atomic) == 0) # define atomic_add(x, v) (atomic_add_int((x)-atomic, (v))) # define atomic_dec(x, v) (atomic_add_int((x)-atomic, -(v))) # define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint ((x)-atomic, oldv, newv) @@ -102,7 +102,7 @@ typedef struct { int atomic; } atomic_t; # define atomic_read(x) (int) ((x)-atomic) # define atomic_set(x, val) ((x)-atomic = (val)) # define atomic_inc(x) (atomic_inc_uint ((x)-atomic)) -# define atomic_dec_and_test(x) (atomic_dec_uint_nv((x)-atomic) == 1) +# define atomic_dec_and_test(x) (atomic_dec_uint_nv((x)-atomic) == 0) # define atomic_add(x, v) (atomic_add_int((x)-atomic, (v))) # define atomic_dec(x, v) (atomic_add_int((x)-atomic, -(v))) # define atomic_cmpxchg(x, oldv, newv) atomic_cas_uint ((x)-atomic, oldv, newv)
CVS commit: [netbsd-6] src/sys
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:08:44 UTC 2014 Modified Files: src/sys/altq [netbsd-6]: altq_jobs.c src/sys/dev/ic [netbsd-6]: oosiop.c src/sys/dev/qbus [netbsd-6]: if_qe.c src/sys/dev/rasops [netbsd-6]: rasops.c src/sys/dev/vme [netbsd-6]: if_ie_vme.c src/sys/net [netbsd-6]: if_gre.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1117): sys/dev/rasops/rasops.c: revision 1.72 sys/dev/vme/if_ie_vme.c: revision 1.31 sys/dev/qbus/if_qe.c: revision 1.73 sys/altq/altq_jobs.c: revision 1.7 sys/net/if_gre.c: revision 1.160 sys/dev/ic/oosiop.c: revision 1.14 - Fix error branches in altq_jobs.c to avoid leaks, noted by maxv@. - Fix leaks in oosiop_alloc_cb error branches, noted by maxv@. While here, avoid a sketchy pointer cast that probably falls afoul of strict aliasing rules. Compile-tested only, with hppa. - Don't leak f on failurein rasops.c. Noted by maxv@. Compile-tested only, with zaurus. - Avoid leak in error branch in if_qe.c, noted by maxv@, compile-tested for vax. - Sizeof struct ievme, not sizeof size_t in if_ie_vme.c. Noted by maxv@, compile-tested for sparc. - Don't leak in gre_clone_create error branch. Noted by maxv@, compile-tested for amd64. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.14.1 src/sys/altq/altq_jobs.c cvs rdiff -u -r1.13 -r1.13.14.1 src/sys/dev/ic/oosiop.c cvs rdiff -u -r1.71 -r1.71.14.1 src/sys/dev/qbus/if_qe.c cvs rdiff -u -r1.70 -r1.70.2.1 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.30 -r1.30.8.1 src/sys/dev/vme/if_ie_vme.c cvs rdiff -u -r1.150 -r1.150.6.1 src/sys/net/if_gre.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/altq/altq_jobs.c diff -u src/sys/altq/altq_jobs.c:1.6 src/sys/altq/altq_jobs.c:1.6.14.1 --- src/sys/altq/altq_jobs.c:1.6 Fri Apr 9 19:32:45 2010 +++ src/sys/altq/altq_jobs.c Mon Nov 3 15:08:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $ */ +/* $NetBSD: altq_jobs.c,v 1.6.14.1 2014/11/03 15:08:44 msaitoh Exp $ */ /* $KAME: altq_jobs.c,v 1.11 2005/04/13 03:44:25 suz Exp $ */ /* * Copyright (c) 2001, the Rector and Board of Visitors of the @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6.14.1 2014/11/03 15:08:44 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_altq.h @@ -1158,7 +1158,7 @@ adjust_rates_rdc(struct jobs_if *jif) error = update_error(jif); if (!error) - return (NULL); + goto fail; prop_control = (upper_bound*upper_bound*min_share) /(max_prod*(max_avg_pkt_size 2)); @@ -1252,6 +1252,9 @@ adjust_rates_rdc(struct jobs_if *jif) } } return result; + +fail: free(result, M_DEVBUF); + return NULL; } /* @@ -1284,19 +1287,19 @@ assign_rate_drops_adc(struct jobs_if *ji result = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (result == NULL) - return NULL; + goto fail0; c = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (c == NULL) - return NULL; + goto fail1; n = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (n == NULL) - return NULL; + goto fail2; k = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (k == NULL) - return NULL; + goto fail3; available = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (available == NULL) - return NULL; + goto fail4; for (i = 0; i = jif-jif_maxpri; i++) result[i] = 0; @@ -1525,6 +1528,14 @@ assign_rate_drops_adc(struct jobs_if *ji free(available, M_DEVBUF); return (result); + +fail5: __unused + free(available, M_DEVBUF); +fail4: free(k, M_DEVBUF); +fail3: free(n, M_DEVBUF); +fail2: free(c, M_DEVBUF); +fail1: free(result, M_DEVBUF); +fail0: return NULL; } /* Index: src/sys/dev/ic/oosiop.c diff -u src/sys/dev/ic/oosiop.c:1.13 src/sys/dev/ic/oosiop.c:1.13.14.1 --- src/sys/dev/ic/oosiop.c:1.13 Sat Nov 13 13:52:02 2010 +++ src/sys/dev/ic/oosiop.c Mon Nov 3 15:08:44 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $ */ +/* $NetBSD: oosiop.c,v 1.13.14.1 2014/11/03 15:08:44 msaitoh Exp $ */ /* * Copyright (c) 2001 Shuichiro URATA. All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13.14.1 2014/11/03 15:08:44 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -247,6 +247,7 @@ static int oosiop_alloc_cb(struct oosiop_softc *sc, int ncb) { struct oosiop_cb *cb; + void *xfer_kva; struct oosiop_xfer *xfer; bus_size_t xfersize; bus_dma_segment_t seg; @@ -258,7 +259,8 @@ oosiop_alloc_cb(struct
CVS commit: [netbsd-6-1] src/sys
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:10:39 UTC 2014 Modified Files: src/sys/altq [netbsd-6-1]: altq_jobs.c src/sys/dev/ic [netbsd-6-1]: oosiop.c src/sys/dev/qbus [netbsd-6-1]: if_qe.c src/sys/dev/rasops [netbsd-6-1]: rasops.c src/sys/dev/vme [netbsd-6-1]: if_ie_vme.c src/sys/net [netbsd-6-1]: if_gre.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1117): sys/dev/rasops/rasops.c: revision 1.72 sys/dev/vme/if_ie_vme.c: revision 1.31 sys/dev/qbus/if_qe.c: revision 1.73 sys/altq/altq_jobs.c: revision 1.7 sys/net/if_gre.c: revision 1.160 sys/dev/ic/oosiop.c: revision 1.14 - Fix error branches in altq_jobs.c to avoid leaks, noted by maxv@. - Fix leaks in oosiop_alloc_cb error branches, noted by maxv@. While here, avoid a sketchy pointer cast that probably falls afoul of strict aliasing rules. Compile-tested only, with hppa. - Don't leak f on failurein rasops.c. Noted by maxv@. Compile-tested only, with zaurus. - Avoid leak in error branch in if_qe.c, noted by maxv@, compile-tested for vax. - Sizeof struct ievme, not sizeof size_t in if_ie_vme.c. Noted by maxv@, compile-tested for sparc. - Don't leak in gre_clone_create error branch. Noted by maxv@, compile-tested for amd64. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.28.1 src/sys/altq/altq_jobs.c cvs rdiff -u -r1.13 -r1.13.28.1 src/sys/dev/ic/oosiop.c cvs rdiff -u -r1.71 -r1.71.28.1 src/sys/dev/qbus/if_qe.c cvs rdiff -u -r1.70 -r1.70.8.1 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.30 -r1.30.22.1 src/sys/dev/vme/if_ie_vme.c cvs rdiff -u -r1.150 -r1.150.20.1 src/sys/net/if_gre.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/altq/altq_jobs.c diff -u src/sys/altq/altq_jobs.c:1.6 src/sys/altq/altq_jobs.c:1.6.28.1 --- src/sys/altq/altq_jobs.c:1.6 Fri Apr 9 19:32:45 2010 +++ src/sys/altq/altq_jobs.c Mon Nov 3 15:10:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $ */ +/* $NetBSD: altq_jobs.c,v 1.6.28.1 2014/11/03 15:10:39 msaitoh Exp $ */ /* $KAME: altq_jobs.c,v 1.11 2005/04/13 03:44:25 suz Exp $ */ /* * Copyright (c) 2001, the Rector and Board of Visitors of the @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6.28.1 2014/11/03 15:10:39 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_altq.h @@ -1158,7 +1158,7 @@ adjust_rates_rdc(struct jobs_if *jif) error = update_error(jif); if (!error) - return (NULL); + goto fail; prop_control = (upper_bound*upper_bound*min_share) /(max_prod*(max_avg_pkt_size 2)); @@ -1252,6 +1252,9 @@ adjust_rates_rdc(struct jobs_if *jif) } } return result; + +fail: free(result, M_DEVBUF); + return NULL; } /* @@ -1284,19 +1287,19 @@ assign_rate_drops_adc(struct jobs_if *ji result = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (result == NULL) - return NULL; + goto fail0; c = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (c == NULL) - return NULL; + goto fail1; n = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (n == NULL) - return NULL; + goto fail2; k = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (k == NULL) - return NULL; + goto fail3; available = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (available == NULL) - return NULL; + goto fail4; for (i = 0; i = jif-jif_maxpri; i++) result[i] = 0; @@ -1525,6 +1528,14 @@ assign_rate_drops_adc(struct jobs_if *ji free(available, M_DEVBUF); return (result); + +fail5: __unused + free(available, M_DEVBUF); +fail4: free(k, M_DEVBUF); +fail3: free(n, M_DEVBUF); +fail2: free(c, M_DEVBUF); +fail1: free(result, M_DEVBUF); +fail0: return NULL; } /* Index: src/sys/dev/ic/oosiop.c diff -u src/sys/dev/ic/oosiop.c:1.13 src/sys/dev/ic/oosiop.c:1.13.28.1 --- src/sys/dev/ic/oosiop.c:1.13 Sat Nov 13 13:52:02 2010 +++ src/sys/dev/ic/oosiop.c Mon Nov 3 15:10:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $ */ +/* $NetBSD: oosiop.c,v 1.13.28.1 2014/11/03 15:10:39 msaitoh Exp $ */ /* * Copyright (c) 2001 Shuichiro URATA. All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13.28.1 2014/11/03 15:10:39 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -247,6 +247,7 @@ static int oosiop_alloc_cb(struct oosiop_softc *sc, int ncb) { struct oosiop_cb *cb; + void *xfer_kva; struct oosiop_xfer *xfer; bus_size_t xfersize; bus_dma_segment_t seg; @@ -258,7 +259,8 @@
CVS commit: [netbsd-6-0] src/sys
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:13:31 UTC 2014 Modified Files: src/sys/altq [netbsd-6-0]: altq_jobs.c src/sys/dev/ic [netbsd-6-0]: oosiop.c src/sys/dev/qbus [netbsd-6-0]: if_qe.c src/sys/dev/rasops [netbsd-6-0]: rasops.c src/sys/dev/vme [netbsd-6-0]: if_ie_vme.c src/sys/net [netbsd-6-0]: if_gre.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1117): sys/dev/rasops/rasops.c: revision 1.72 sys/dev/vme/if_ie_vme.c: revision 1.31 sys/dev/qbus/if_qe.c: revision 1.73 sys/altq/altq_jobs.c: revision 1.7 sys/net/if_gre.c: revision 1.160 sys/dev/ic/oosiop.c: revision 1.14 - Fix error branches in altq_jobs.c to avoid leaks, noted by maxv@. - Fix leaks in oosiop_alloc_cb error branches, noted by maxv@. While here, avoid a sketchy pointer cast that probably falls afoul of strict aliasing rules. Compile-tested only, with hppa. - Don't leak f on failurein rasops.c. Noted by maxv@. Compile-tested only, with zaurus. - Avoid leak in error branch in if_qe.c, noted by maxv@, compile-tested for vax. - Sizeof struct ievme, not sizeof size_t in if_ie_vme.c. Noted by maxv@, compile-tested for sparc. - Don't leak in gre_clone_create error branch. Noted by maxv@, compile-tested for amd64. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.6.20.1 src/sys/altq/altq_jobs.c cvs rdiff -u -r1.13 -r1.13.20.1 src/sys/dev/ic/oosiop.c cvs rdiff -u -r1.71 -r1.71.20.1 src/sys/dev/qbus/if_qe.c cvs rdiff -u -r1.70 -r1.70.6.1 src/sys/dev/rasops/rasops.c cvs rdiff -u -r1.30 -r1.30.14.1 src/sys/dev/vme/if_ie_vme.c cvs rdiff -u -r1.150 -r1.150.12.1 src/sys/net/if_gre.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/altq/altq_jobs.c diff -u src/sys/altq/altq_jobs.c:1.6 src/sys/altq/altq_jobs.c:1.6.20.1 --- src/sys/altq/altq_jobs.c:1.6 Fri Apr 9 19:32:45 2010 +++ src/sys/altq/altq_jobs.c Mon Nov 3 15:13:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $ */ +/* $NetBSD: altq_jobs.c,v 1.6.20.1 2014/11/03 15:13:31 msaitoh Exp $ */ /* $KAME: altq_jobs.c,v 1.11 2005/04/13 03:44:25 suz Exp $ */ /* * Copyright (c) 2001, the Rector and Board of Visitors of the @@ -59,7 +59,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6 2010/04/09 19:32:45 plunky Exp $); +__KERNEL_RCSID(0, $NetBSD: altq_jobs.c,v 1.6.20.1 2014/11/03 15:13:31 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_altq.h @@ -1158,7 +1158,7 @@ adjust_rates_rdc(struct jobs_if *jif) error = update_error(jif); if (!error) - return (NULL); + goto fail; prop_control = (upper_bound*upper_bound*min_share) /(max_prod*(max_avg_pkt_size 2)); @@ -1252,6 +1252,9 @@ adjust_rates_rdc(struct jobs_if *jif) } } return result; + +fail: free(result, M_DEVBUF); + return NULL; } /* @@ -1284,19 +1287,19 @@ assign_rate_drops_adc(struct jobs_if *ji result = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (result == NULL) - return NULL; + goto fail0; c = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (c == NULL) - return NULL; + goto fail1; n = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (n == NULL) - return NULL; + goto fail2; k = malloc((jif-jif_maxpri+1)*sizeof(u_int64_t), M_DEVBUF, M_WAITOK); if (k == NULL) - return NULL; + goto fail3; available = malloc((jif-jif_maxpri+1)*sizeof(int64_t), M_DEVBUF, M_WAITOK); if (available == NULL) - return NULL; + goto fail4; for (i = 0; i = jif-jif_maxpri; i++) result[i] = 0; @@ -1525,6 +1528,14 @@ assign_rate_drops_adc(struct jobs_if *ji free(available, M_DEVBUF); return (result); + +fail5: __unused + free(available, M_DEVBUF); +fail4: free(k, M_DEVBUF); +fail3: free(n, M_DEVBUF); +fail2: free(c, M_DEVBUF); +fail1: free(result, M_DEVBUF); +fail0: return NULL; } /* Index: src/sys/dev/ic/oosiop.c diff -u src/sys/dev/ic/oosiop.c:1.13 src/sys/dev/ic/oosiop.c:1.13.20.1 --- src/sys/dev/ic/oosiop.c:1.13 Sat Nov 13 13:52:02 2010 +++ src/sys/dev/ic/oosiop.c Mon Nov 3 15:13:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $ */ +/* $NetBSD: oosiop.c,v 1.13.20.1 2014/11/03 15:13:31 msaitoh Exp $ */ /* * Copyright (c) 2001 Shuichiro URATA. All rights reserved. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13 2010/11/13 13:52:02 uebayasi Exp $); +__KERNEL_RCSID(0, $NetBSD: oosiop.c,v 1.13.20.1 2014/11/03 15:13:31 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -247,6 +247,7 @@ static int oosiop_alloc_cb(struct oosiop_softc *sc, int ncb) { struct oosiop_cb *cb; + void *xfer_kva; struct oosiop_xfer *xfer; bus_size_t xfersize; bus_dma_segment_t seg; @@ -258,7 +259,8 @@
CVS commit: [netbsd-6] src/sys/kern
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:27:46 UTC 2014 Modified Files: src/sys/kern [netbsd-6]: kern_rndpool.c kern_rndq.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1118): sys/kern/kern_rndq.c: revision 1.27 sys/kern/kern_rndpool.c: revision 1.7 buf is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c. done is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/kern/kern_rndpool.c cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/sys/kern/kern_rndq.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/kern/kern_rndpool.c diff -u src/sys/kern/kern_rndpool.c:1.1.2.1 src/sys/kern/kern_rndpool.c:1.1.2.2 --- src/sys/kern/kern_rndpool.c:1.1.2.1 Fri Apr 20 23:35:20 2012 +++ src/sys/kern/kern_rndpool.c Mon Nov 3 15:27:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndpool.c,v 1.1.2.1 2012/04/20 23:35:20 riz Exp $*/ +/* $NetBSD: kern_rndpool.c,v 1.1.2.2 2014/11/03 15:27:46 msaitoh Exp $*/ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndpool.c,v 1.1.2.1 2012/04/20 23:35:20 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndpool.c,v 1.1.2.2 2014/11/03 15:27:46 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -191,8 +191,7 @@ rndpool_add_data(rndpool_t *rp, void *p, buf = p; for (; len 3; len -= 4) { - val = *((u_int32_t *)buf); - + (void)memcpy(val, buf, 4); rndpool_add_one_word(rp, val); buf += 4; } Index: src/sys/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.1.2.5 src/sys/kern/kern_rndq.c:1.1.2.6 --- src/sys/kern/kern_rndq.c:1.1.2.5 Fri Feb 8 20:28:07 2013 +++ src/sys/kern/kern_rndq.c Mon Nov 3 15:27:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.1.2.5 2013/02/08 20:28:07 riz Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.1.2.6 2014/11/03 15:27:46 msaitoh Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.5 2013/02/08 20:28:07 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.6 2014/11/03 15:27:46 msaitoh Exp $); #include sys/param.h #include sys/ioctl.h @@ -663,7 +663,8 @@ rnd_add_data_ts(krndsource_t *rs, const u_int32_t entropy, uint32_t ts) { rnd_sample_t *state = NULL; - const uint32_t *dint = data; + const uint8_t *p = data; + uint32_t dint; int todo, done, filled = 0; SIMPLEQ_HEAD(, _rnd_sample_t) tmp_samples = SIMPLEQ_HEAD_INITIALIZER(tmp_samples); @@ -676,7 +677,7 @@ rnd_add_data_ts(krndsource_t *rs, const * Loop over data packaging it into sample buffers. * If a sample buffer allocation fails, drop all data. */ - todo = len / sizeof(*dint); + todo = len / sizeof(dint); for (done = 0; done todo ; done++) { state = rs-state; if (state == NULL) { @@ -688,7 +689,8 @@ rnd_add_data_ts(krndsource_t *rs, const } state-ts[state-cursor] = ts; - state-values[state-cursor] = dint[done]; + (void)memcpy(dint, p[done*4], 4); + state-values[state-cursor] = dint; state-cursor++; if (state-cursor == RND_SAMPLE_COUNT) {
CVS commit: [netbsd-6-1] src/sys/kern
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:30:10 UTC 2014 Modified Files: src/sys/kern [netbsd-6-1]: kern_rndpool.c kern_rndq.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1118): sys/kern/kern_rndq.c: revision 1.27 sys/kern/kern_rndpool.c: revision 1.7 buf is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c. done is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.1.6.1 src/sys/kern/kern_rndpool.c cvs rdiff -u -r1.1.2.5 -r1.1.2.5.2.1 src/sys/kern/kern_rndq.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/kern/kern_rndpool.c diff -u src/sys/kern/kern_rndpool.c:1.1.2.1 src/sys/kern/kern_rndpool.c:1.1.2.1.6.1 --- src/sys/kern/kern_rndpool.c:1.1.2.1 Fri Apr 20 23:35:20 2012 +++ src/sys/kern/kern_rndpool.c Mon Nov 3 15:30:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndpool.c,v 1.1.2.1 2012/04/20 23:35:20 riz Exp $*/ +/* $NetBSD: kern_rndpool.c,v 1.1.2.1.6.1 2014/11/03 15:30:10 msaitoh Exp $*/ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndpool.c,v 1.1.2.1 2012/04/20 23:35:20 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndpool.c,v 1.1.2.1.6.1 2014/11/03 15:30:10 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -191,8 +191,7 @@ rndpool_add_data(rndpool_t *rp, void *p, buf = p; for (; len 3; len -= 4) { - val = *((u_int32_t *)buf); - + (void)memcpy(val, buf, 4); rndpool_add_one_word(rp, val); buf += 4; } Index: src/sys/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.1.2.5 src/sys/kern/kern_rndq.c:1.1.2.5.2.1 --- src/sys/kern/kern_rndq.c:1.1.2.5 Fri Feb 8 20:28:07 2013 +++ src/sys/kern/kern_rndq.c Mon Nov 3 15:30:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.1.2.5 2013/02/08 20:28:07 riz Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.1.2.5.2.1 2014/11/03 15:30:10 msaitoh Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.5 2013/02/08 20:28:07 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.5.2.1 2014/11/03 15:30:10 msaitoh Exp $); #include sys/param.h #include sys/ioctl.h @@ -663,7 +663,8 @@ rnd_add_data_ts(krndsource_t *rs, const u_int32_t entropy, uint32_t ts) { rnd_sample_t *state = NULL; - const uint32_t *dint = data; + const uint8_t *p = data; + uint32_t dint; int todo, done, filled = 0; SIMPLEQ_HEAD(, _rnd_sample_t) tmp_samples = SIMPLEQ_HEAD_INITIALIZER(tmp_samples); @@ -676,7 +677,7 @@ rnd_add_data_ts(krndsource_t *rs, const * Loop over data packaging it into sample buffers. * If a sample buffer allocation fails, drop all data. */ - todo = len / sizeof(*dint); + todo = len / sizeof(dint); for (done = 0; done todo ; done++) { state = rs-state; if (state == NULL) { @@ -688,7 +689,8 @@ rnd_add_data_ts(krndsource_t *rs, const } state-ts[state-cursor] = ts; - state-values[state-cursor] = dint[done]; + (void)memcpy(dint, p[done*4], 4); + state-values[state-cursor] = dint; state-cursor++; if (state-cursor == RND_SAMPLE_COUNT) {
CVS commit: [netbsd-6-0] src/sys/kern
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:31:15 UTC 2014 Modified Files: src/sys/kern [netbsd-6-0]: kern_rndpool.c kern_rndq.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1118): sys/kern/kern_rndq.c: revision 1.27 sys/kern/kern_rndpool.c: revision 1.7 buf is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndq.c. done is not guaranteed to be aligned; don't *(uint32_t *) it in kern_rndpool.c. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.1.4.1 src/sys/kern/kern_rndpool.c cvs rdiff -u -r1.1.2.2.4.1 -r1.1.2.2.4.2 src/sys/kern/kern_rndq.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/kern/kern_rndpool.c diff -u src/sys/kern/kern_rndpool.c:1.1.2.1 src/sys/kern/kern_rndpool.c:1.1.2.1.4.1 --- src/sys/kern/kern_rndpool.c:1.1.2.1 Fri Apr 20 23:35:20 2012 +++ src/sys/kern/kern_rndpool.c Mon Nov 3 15:31:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndpool.c,v 1.1.2.1 2012/04/20 23:35:20 riz Exp $*/ +/* $NetBSD: kern_rndpool.c,v 1.1.2.1.4.1 2014/11/03 15:31:15 msaitoh Exp $*/ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndpool.c,v 1.1.2.1 2012/04/20 23:35:20 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndpool.c,v 1.1.2.1.4.1 2014/11/03 15:31:15 msaitoh Exp $); #include sys/param.h #include sys/systm.h @@ -191,8 +191,7 @@ rndpool_add_data(rndpool_t *rp, void *p, buf = p; for (; len 3; len -= 4) { - val = *((u_int32_t *)buf); - + (void)memcpy(val, buf, 4); rndpool_add_one_word(rp, val); buf += 4; } Index: src/sys/kern/kern_rndq.c diff -u src/sys/kern/kern_rndq.c:1.1.2.2.4.1 src/sys/kern/kern_rndq.c:1.1.2.2.4.2 --- src/sys/kern/kern_rndq.c:1.1.2.2.4.1 Fri Feb 8 20:28:22 2013 +++ src/sys/kern/kern_rndq.c Mon Nov 3 15:31:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_rndq.c,v 1.1.2.2.4.1 2013/02/08 20:28:22 riz Exp $ */ +/* $NetBSD: kern_rndq.c,v 1.1.2.2.4.2 2014/11/03 15:31:15 msaitoh Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.2.4.1 2013/02/08 20:28:22 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_rndq.c,v 1.1.2.2.4.2 2014/11/03 15:31:15 msaitoh Exp $); #include sys/param.h #include sys/ioctl.h @@ -658,7 +658,8 @@ rnd_add_data_ts(krndsource_t *rs, const u_int32_t entropy, uint32_t ts) { rnd_sample_t *state = NULL; - const uint32_t *dint = data; + const uint8_t *p = data; + uint32_t dint; int todo, done, filled = 0; SIMPLEQ_HEAD(, _rnd_sample_t) tmp_samples = SIMPLEQ_HEAD_INITIALIZER(tmp_samples); @@ -671,7 +672,7 @@ rnd_add_data_ts(krndsource_t *rs, const * Loop over data packaging it into sample buffers. * If a sample buffer allocation fails, drop all data. */ - todo = len / sizeof(*dint); + todo = len / sizeof(dint); for (done = 0; done todo ; done++) { state = rs-state; if (state == NULL) { @@ -683,7 +684,8 @@ rnd_add_data_ts(krndsource_t *rs, const } state-ts[state-cursor] = ts; - state-values[state-cursor] = dint[done]; + (void)memcpy(dint, p[done*4], 4); + state-values[state-cursor] = dint; state-cursor++; if (state-cursor == RND_SAMPLE_COUNT) {
CVS commit: [netbsd-6] src/lib/libc/stdlib
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:45:46 UTC 2014 Modified Files: src/lib/libc/stdlib [netbsd-6]: jemalloc.c Log Message: Pull up following revision(s) (requested by riastradh in ticket #1121): lib/libc/stdlib/jemalloc.c: revision 1.33 Hold arenas_mtx across (still unused) _malloc_pre/postfork (PR 47428). To generate a diff of this commit: cvs rdiff -u -r1.24.6.2 -r1.24.6.3 src/lib/libc/stdlib/jemalloc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdlib/jemalloc.c diff -u src/lib/libc/stdlib/jemalloc.c:1.24.6.2 src/lib/libc/stdlib/jemalloc.c:1.24.6.3 --- src/lib/libc/stdlib/jemalloc.c:1.24.6.2 Mon Apr 23 23:40:40 2012 +++ src/lib/libc/stdlib/jemalloc.c Mon Nov 3 15:45:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: jemalloc.c,v 1.24.6.2 2012/04/23 23:40:40 riz Exp $ */ +/* $NetBSD: jemalloc.c,v 1.24.6.3 2014/11/03 15:45:45 msaitoh Exp $ */ /*- * Copyright (C) 2006,2007 Jason Evans jas...@freebsd.org. @@ -118,7 +118,7 @@ #include sys/cdefs.h /* __FBSDID($FreeBSD: src/lib/libc/stdlib/malloc.c,v 1.147 2007/06/15 22:00:16 jasone Exp $); */ -__RCSID($NetBSD: jemalloc.c,v 1.24.6.2 2012/04/23 23:40:40 riz Exp $); +__RCSID($NetBSD: jemalloc.c,v 1.24.6.3 2014/11/03 15:45:45 msaitoh Exp $); #ifdef __FreeBSD__ #include libc_private.h @@ -3915,7 +3915,6 @@ _malloc_prefork(void) if (arenas[i] != NULL) malloc_mutex_lock(arenas[i]-mtx); } - malloc_mutex_unlock(arenas_mtx); malloc_mutex_lock(base_mtx); @@ -3933,7 +3932,6 @@ _malloc_postfork(void) malloc_mutex_unlock(base_mtx); - malloc_mutex_lock(arenas_mtx); for (i = 0; i narenas; i++) { if (arenas[i] != NULL) malloc_mutex_unlock(arenas[i]-mtx);
CVS commit: [netbsd-6] src/sys/arch
Module Name:src Committed By: msaitoh Date: Mon Nov 3 15:54:50 UTC 2014 Modified Files: src/sys/arch/sparc/dev [netbsd-6]: fd.c src/sys/arch/sparc64/dev [netbsd-6]: fdc.c src/sys/arch/sun3/dev [netbsd-6]: fd.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1139): sys/arch/sun3/dev/fd.c: revision 1.78 sys/arch/sparc/dev/fd.c: revision 1.155 sys/arch/sparc64/dev/fdc.c: revision 1.42 Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). I'm not sure why this 18 year old bug didn't cause problem before (at least my old 5.99.23 kernel worked), but probably it's triggered by new gcc 4.8 which might do more aggressive memory allocation. The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4). Should be pulled up to netbsd-7. Sync with sparc/dev/fd.c:1.155. Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). I'm not sure why this 18 year old bug didn't cause problem before (at least my old 5.99.23 kernel worked), but probably it's triggered by new gcc 4.8 which might do more aggressive memory allocation. The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4). Should be pulled up to netbsd-7. Sync with sparc/dev/fd.c rev 1.155. Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). Note sun3 still uses gcc 4.5.4 but also panicked by this old bug, so probably this problem was triggered by not gcc 4.8 but struct disk changes (struct disk_geom was added in sys/disk.h rev 1.58), which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes. (i.e. now struct fd_softc could be allocated in a different pool block, probably near the wrong pointer of the struct disklabel) Anyway, this fix should be pullued up to netbsd-7. (probably I'm the only user of floppy on sun3 though) To generate a diff of this commit: cvs rdiff -u -r1.150.8.1 -r1.150.8.2 src/sys/arch/sparc/dev/fd.c cvs rdiff -u -r1.36 -r1.36.8.1 src/sys/arch/sparc64/dev/fdc.c cvs rdiff -u -r1.72 -r1.72.8.1 src/sys/arch/sun3/dev/fd.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/arch/sparc/dev/fd.c diff -u src/sys/arch/sparc/dev/fd.c:1.150.8.1 src/sys/arch/sparc/dev/fd.c:1.150.8.2 --- src/sys/arch/sparc/dev/fd.c:1.150.8.1 Wed Oct 17 22:30:08 2012 +++ src/sys/arch/sparc/dev/fd.c Mon Nov 3 15:54:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.150.8.1 2012/10/17 22:30:08 riz Exp $ */ +/* $NetBSD: fd.c,v 1.150.8.2 2014/11/03 15:54:50 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.150.8.1 2012/10/17 22:30:08 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.150.8.2 2014/11/03 15:54:50 msaitoh Exp $); #include opt_ddb.h #include opt_md.h @@ -2227,7 +2227,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp = fd-sc_dk.dk_cpulabel; memset(lp, 0, sizeof(struct disklabel)); - memset(lp, 0, sizeof(struct cpu_disklabel)); + memset(clp, 0, sizeof(struct cpu_disklabel)); lp-d_type = DTYPE_FLOPPY; lp-d_secsize = FD_BSIZE(fd); Index: src/sys/arch/sparc64/dev/fdc.c diff -u src/sys/arch/sparc64/dev/fdc.c:1.36 src/sys/arch/sparc64/dev/fdc.c:1.36.8.1 --- src/sys/arch/sparc64/dev/fdc.c:1.36 Mon Aug 8 14:49:06 2011 +++ src/sys/arch/sparc64/dev/fdc.c Mon Nov 3 15:54:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $ */ +/* $NetBSD: fdc.c,v 1.36.8.1 2014/11/03 15:54:50 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36.8.1 2014/11/03 15:54:50 msaitoh Exp $); #include opt_ddb.h #include opt_md.h @@ -2413,7 +2413,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp = fd-sc_dk.dk_cpulabel; memset(lp, 0, sizeof(struct disklabel)); - memset(lp, 0, sizeof(struct cpu_disklabel)); + memset(clp, 0, sizeof(struct cpu_disklabel)); lp-d_type = DTYPE_FLOPPY; lp-d_secsize = FD_BSIZE(fd); Index: src/sys/arch/sun3/dev/fd.c diff -u src/sys/arch/sun3/dev/fd.c:1.72 src/sys/arch/sun3/dev/fd.c:1.72.8.1 --- src/sys/arch/sun3/dev/fd.c:1.72 Sat Jul 16 20:25:28 2011 +++ src/sys/arch/sun3/dev/fd.c Mon Nov 3 15:54:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $ */ +/* $NetBSD: fd.c,v 1.72.8.1 2014/11/03 15:54:50 msaitoh Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -72,7 +72,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72.8.1 2014/11/03 15:54:50 msaitoh Exp $); #include opt_ddb.h @@ -1855,7 +1855,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp =
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 16:33:01 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1116-1118, 1121 and 1139. To generate a diff of this commit: cvs rdiff -u -r1.1.2.143 -r1.1.2.144 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.143 src/doc/CHANGES-6.2:1.1.2.144 --- src/doc/CHANGES-6.2:1.1.2.143 Mon Nov 3 13:01:25 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 16:33:01 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.143 2014/11/03 13:01:25 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.144 2014/11/03 16:33:01 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -3995,3 +3995,40 @@ usr.bin/ftp/version.h1.85 Change the version that ftp announces to 20141026. It can be a useful method to determine if CVE-2014-8517 is fixed. [lukem, ticket #1180] + +external/mit/libdrm/dist/xf86atomic.h 1.4 + + Fix libdrm's atomic_dec_and_test on NetBSD (and Solaris, while here). + _nv means new value, not old value! This may help to fix various + instability in userland graphics, now that we aren't freeing stuff + with a reference count of 1 any more. + [riastradh, ticket #1116] + +sys/altq/altq_jobs.c1.7 +sys/dev/ic/oosiop.c1.14 +sys/dev/qbus/if_qe.c1.73 +sys/dev/rasops/rasops.c1.72 +sys/dev/vme/if_ie_vme.c1.31 +sys/net/if_gre.c1.160 + + Fix resource leask in miscellaneous error branches noted by maxv@. + [riastradh, ticket #1117] + +sys/kern/kern_rndpool.c1.7 +sys/kern/kern_rndq.c1.27 + + buf and done is not guaranteed to be aligned; don't *(uint32_t *) + it. + [riastradh, ticket #1118] + +lib/libc/stdlib/jemalloc.c 1.33 + + Hold arenas_mtx across (still unused) _malloc_pre/postfork (PR#47428). + [riastradh, ticket #1121] + +sys/arch/sparc/dev/fd.c1.155 +sys/arch/sparc64/dev/fdc.c 1.42 +sys/arch/sun3/dev/fd.c1.78 + + Fix unexpected memory corruption on opening fd(4). + [tsutsui, ticket #1139]
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 16:33:47 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket 1117-1118 and 1139. To generate a diff of this commit: cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.5 src/doc/CHANGES-6.1.6:1.1.2.6 --- src/doc/CHANGES-6.1.6:1.1.2.5 Mon Nov 3 13:03:03 2014 +++ src/doc/CHANGES-6.1.6 Mon Nov 3 16:33:47 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.5 2014/11/03 13:03:03 msaitoh Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.6 2014/11/03 16:33:47 msaitoh Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -125,3 +125,27 @@ usr.bin/ftp/version.h1.85 Change the version that ftp announces to 20141026. It can be a useful method to determine if CVE-2014-8517 is fixed. [lukem, ticket #1180] + +sys/altq/altq_jobs.c1.7 +sys/dev/ic/oosiop.c1.14 +sys/dev/qbus/if_qe.c1.73 +sys/dev/rasops/rasops.c1.72 +sys/dev/vme/if_ie_vme.c1.31 +sys/net/if_gre.c1.160 + + Fix resource leask in miscellaneous error branches noted by maxv@. + [riastradh, ticket #1117] + +sys/kern/kern_rndpool.c1.7 +sys/kern/kern_rndq.c1.27 + + buf and done is not guaranteed to be aligned; don't *(uint32_t *) + it. + [riastradh, ticket #1118] + +sys/arch/sparc/dev/fd.c1.155 +sys/arch/sparc64/dev/fdc.c 1.42 +sys/arch/sun3/dev/fd.c1.78 + + Fix unexpected memory corruption on opening fd(4). + [tsutsui, ticket #1139]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 16:34:09 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket 1117-1118 and 1139. To generate a diff of this commit: cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.5 src/doc/CHANGES-6.0.7:1.1.2.6 --- src/doc/CHANGES-6.0.7:1.1.2.5 Mon Nov 3 13:03:53 2014 +++ src/doc/CHANGES-6.0.7 Mon Nov 3 16:34:08 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.5 2014/11/03 13:03:53 msaitoh Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.6 2014/11/03 16:34:08 msaitoh Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -125,3 +125,27 @@ usr.bin/ftp/version.h1.85 Change the version that ftp announces to 20141026. It can be a useful method to determine if CVE-2014-8517 is fixed. [lukem, ticket #1180] + +sys/altq/altq_jobs.c1.7 +sys/dev/ic/oosiop.c1.14 +sys/dev/qbus/if_qe.c1.73 +sys/dev/rasops/rasops.c1.72 +sys/dev/vme/if_ie_vme.c1.31 +sys/net/if_gre.c1.160 + + Fix resource leask in miscellaneous error branches noted by maxv@. + [riastradh, ticket #1117] + +sys/kern/kern_rndpool.c1.7 +sys/kern/kern_rndq.c1.27 + + buf and done is not guaranteed to be aligned; don't *(uint32_t *) + it. + [riastradh, ticket #1118] + +sys/arch/sparc/dev/fd.c1.155 +sys/arch/sparc64/dev/fdc.c 1.42 +sys/arch/sun3/dev/fd.c1.78 + + Fix unexpected memory corruption on opening fd(4). + [tsutsui, ticket #1139]
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 16:39:11 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Add missing xsrc/ prefix (Ticket 1116). To generate a diff of this commit: cvs rdiff -u -r1.1.2.144 -r1.1.2.145 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.144 src/doc/CHANGES-6.2:1.1.2.145 --- src/doc/CHANGES-6.2:1.1.2.144 Mon Nov 3 16:33:01 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 16:39:11 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.144 2014/11/03 16:33:01 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.145 2014/11/03 16:39:11 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -3996,7 +3996,7 @@ usr.bin/ftp/version.h1.85 useful method to determine if CVE-2014-8517 is fixed. [lukem, ticket #1180] -external/mit/libdrm/dist/xf86atomic.h 1.4 +xsrc/external/mit/libdrm/dist/xf86atomic.h 1.4 Fix libdrm's atomic_dec_and_test on NetBSD (and Solaris, while here). _nv means new value, not old value! This may help to fix various
CVS commit: [netbsd-6-1] src/sys/arch
Module Name:src Committed By: msaitoh Date: Mon Nov 3 16:47:07 UTC 2014 Modified Files: src/sys/arch/sparc/dev [netbsd-6-1]: fd.c src/sys/arch/sparc64/dev [netbsd-6-1]: fdc.c src/sys/arch/sun3/dev [netbsd-6-1]: fd.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1139): sys/arch/sun3/dev/fd.c: revision 1.78 sys/arch/sparc/dev/fd.c: revision 1.155 sys/arch/sparc64/dev/fdc.c: revision 1.42 Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). I'm not sure why this 18 year old bug didn't cause problem before (at least my old 5.99.23 kernel worked), but probably it's triggered by new gcc 4.8 which might do more aggressive memory allocation. The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4). Should be pulled up to netbsd-7. Sync with sparc/dev/fd.c:1.155. Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). I'm not sure why this 18 year old bug didn't cause problem before (at least my old 5.99.23 kernel worked), but probably it's triggered by new gcc 4.8 which might do more aggressive memory allocation. The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4). Should be pulled up to netbsd-7. Sync with sparc/dev/fd.c rev 1.155. Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). Note sun3 still uses gcc 4.5.4 but also panicked by this old bug, so probably this problem was triggered by not gcc 4.8 but struct disk changes (struct disk_geom was added in sys/disk.h rev 1.58), which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes. (i.e. now struct fd_softc could be allocated in a different pool block, probably near the wrong pointer of the struct disklabel) Anyway, this fix should be pullued up to netbsd-7. (probably I'm the only user of floppy on sun3 though) To generate a diff of this commit: cvs rdiff -u -r1.150.8.1 -r1.150.8.1.2.1 src/sys/arch/sparc/dev/fd.c cvs rdiff -u -r1.36 -r1.36.22.1 src/sys/arch/sparc64/dev/fdc.c cvs rdiff -u -r1.72 -r1.72.16.1 src/sys/arch/sun3/dev/fd.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/arch/sparc/dev/fd.c diff -u src/sys/arch/sparc/dev/fd.c:1.150.8.1 src/sys/arch/sparc/dev/fd.c:1.150.8.1.2.1 --- src/sys/arch/sparc/dev/fd.c:1.150.8.1 Wed Oct 17 22:30:08 2012 +++ src/sys/arch/sparc/dev/fd.c Mon Nov 3 16:47:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.150.8.1 2012/10/17 22:30:08 riz Exp $ */ +/* $NetBSD: fd.c,v 1.150.8.1.2.1 2014/11/03 16:47:07 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.150.8.1 2012/10/17 22:30:08 riz Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.150.8.1.2.1 2014/11/03 16:47:07 msaitoh Exp $); #include opt_ddb.h #include opt_md.h @@ -2227,7 +2227,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp = fd-sc_dk.dk_cpulabel; memset(lp, 0, sizeof(struct disklabel)); - memset(lp, 0, sizeof(struct cpu_disklabel)); + memset(clp, 0, sizeof(struct cpu_disklabel)); lp-d_type = DTYPE_FLOPPY; lp-d_secsize = FD_BSIZE(fd); Index: src/sys/arch/sparc64/dev/fdc.c diff -u src/sys/arch/sparc64/dev/fdc.c:1.36 src/sys/arch/sparc64/dev/fdc.c:1.36.22.1 --- src/sys/arch/sparc64/dev/fdc.c:1.36 Mon Aug 8 14:49:06 2011 +++ src/sys/arch/sparc64/dev/fdc.c Mon Nov 3 16:47:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $ */ +/* $NetBSD: fdc.c,v 1.36.22.1 2014/11/03 16:47:07 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36.22.1 2014/11/03 16:47:07 msaitoh Exp $); #include opt_ddb.h #include opt_md.h @@ -2413,7 +2413,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp = fd-sc_dk.dk_cpulabel; memset(lp, 0, sizeof(struct disklabel)); - memset(lp, 0, sizeof(struct cpu_disklabel)); + memset(clp, 0, sizeof(struct cpu_disklabel)); lp-d_type = DTYPE_FLOPPY; lp-d_secsize = FD_BSIZE(fd); Index: src/sys/arch/sun3/dev/fd.c diff -u src/sys/arch/sun3/dev/fd.c:1.72 src/sys/arch/sun3/dev/fd.c:1.72.16.1 --- src/sys/arch/sun3/dev/fd.c:1.72 Sat Jul 16 20:25:28 2011 +++ src/sys/arch/sun3/dev/fd.c Mon Nov 3 16:47:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $ */ +/* $NetBSD: fd.c,v 1.72.16.1 2014/11/03 16:47:07 msaitoh Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -72,7 +72,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72.16.1 2014/11/03 16:47:07 msaitoh Exp $); #include opt_ddb.h @@ -1855,7 +1855,7 @@ fdgetdisklabel(dev_t dev) struct
CVS commit: [netbsd-6-0] src/sys/arch
Module Name:src Committed By: msaitoh Date: Mon Nov 3 16:47:29 UTC 2014 Modified Files: src/sys/arch/sparc/dev [netbsd-6-0]: fd.c src/sys/arch/sparc64/dev [netbsd-6-0]: fdc.c src/sys/arch/sun3/dev [netbsd-6-0]: fd.c Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1139): sys/arch/sun3/dev/fd.c: revision 1.78 sys/arch/sparc/dev/fd.c: revision 1.155 sys/arch/sparc64/dev/fdc.c: revision 1.42 Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). I'm not sure why this 18 year old bug didn't cause problem before (at least my old 5.99.23 kernel worked), but probably it's triggered by new gcc 4.8 which might do more aggressive memory allocation. The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4). Should be pulled up to netbsd-7. Sync with sparc/dev/fd.c:1.155. Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). I'm not sure why this 18 year old bug didn't cause problem before (at least my old 5.99.23 kernel worked), but probably it's triggered by new gcc 4.8 which might do more aggressive memory allocation. The problem is found by Nobuyoshi Sato on trying eject(1) against fd(4). Should be pulled up to netbsd-7. Sync with sparc/dev/fd.c rev 1.155. Fix panic() on opening fd(4), caused by a wrong pointer passed to memset(). Note sun3 still uses gcc 4.5.4 but also panicked by this old bug, so probably this problem was triggered by not gcc 4.8 but struct disk changes (struct disk_geom was added in sys/disk.h rev 1.58), which increased sizeof(struct fd_softc) from 248 bytes to 296 bytes. (i.e. now struct fd_softc could be allocated in a different pool block, probably near the wrong pointer of the struct disklabel) Anyway, this fix should be pullued up to netbsd-7. (probably I'm the only user of floppy on sun3 though) To generate a diff of this commit: cvs rdiff -u -r1.150 -r1.150.14.1 src/sys/arch/sparc/dev/fd.c cvs rdiff -u -r1.36 -r1.36.14.1 src/sys/arch/sparc64/dev/fdc.c cvs rdiff -u -r1.72 -r1.72.14.1 src/sys/arch/sun3/dev/fd.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/arch/sparc/dev/fd.c diff -u src/sys/arch/sparc/dev/fd.c:1.150 src/sys/arch/sparc/dev/fd.c:1.150.14.1 --- src/sys/arch/sparc/dev/fd.c:1.150 Sun Jul 17 23:18:23 2011 +++ src/sys/arch/sparc/dev/fd.c Mon Nov 3 16:47:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.150 2011/07/17 23:18:23 mrg Exp $ */ +/* $NetBSD: fd.c,v 1.150.14.1 2014/11/03 16:47:29 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.150 2011/07/17 23:18:23 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.150.14.1 2014/11/03 16:47:29 msaitoh Exp $); #include opt_ddb.h #include opt_md.h @@ -2227,7 +2227,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp = fd-sc_dk.dk_cpulabel; memset(lp, 0, sizeof(struct disklabel)); - memset(lp, 0, sizeof(struct cpu_disklabel)); + memset(clp, 0, sizeof(struct cpu_disklabel)); lp-d_type = DTYPE_FLOPPY; lp-d_secsize = FD_BSIZE(fd); Index: src/sys/arch/sparc64/dev/fdc.c diff -u src/sys/arch/sparc64/dev/fdc.c:1.36 src/sys/arch/sparc64/dev/fdc.c:1.36.14.1 --- src/sys/arch/sparc64/dev/fdc.c:1.36 Mon Aug 8 14:49:06 2011 +++ src/sys/arch/sparc64/dev/fdc.c Mon Nov 3 16:47:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $ */ +/* $NetBSD: fdc.c,v 1.36.14.1 2014/11/03 16:47:29 msaitoh Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36 2011/08/08 14:49:06 jakllsch Exp $); +__KERNEL_RCSID(0, $NetBSD: fdc.c,v 1.36.14.1 2014/11/03 16:47:29 msaitoh Exp $); #include opt_ddb.h #include opt_md.h @@ -2413,7 +2413,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp = fd-sc_dk.dk_cpulabel; memset(lp, 0, sizeof(struct disklabel)); - memset(lp, 0, sizeof(struct cpu_disklabel)); + memset(clp, 0, sizeof(struct cpu_disklabel)); lp-d_type = DTYPE_FLOPPY; lp-d_secsize = FD_BSIZE(fd); Index: src/sys/arch/sun3/dev/fd.c diff -u src/sys/arch/sun3/dev/fd.c:1.72 src/sys/arch/sun3/dev/fd.c:1.72.14.1 --- src/sys/arch/sun3/dev/fd.c:1.72 Sat Jul 16 20:25:28 2011 +++ src/sys/arch/sun3/dev/fd.c Mon Nov 3 16:47:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $ */ +/* $NetBSD: fd.c,v 1.72.14.1 2014/11/03 16:47:29 msaitoh Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -72,7 +72,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72 2011/07/16 20:25:28 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: fd.c,v 1.72.14.1 2014/11/03 16:47:29 msaitoh Exp $); #include opt_ddb.h @@ -1855,7 +1855,7 @@ fdgetdisklabel(dev_t dev) struct cpu_disklabel *clp =
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: christos Date: Mon Nov 3 16:50:20 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: i915_gem.c Log Message: When moving an object to inactive, make sure that we first flush it from the GTT domain in case it belonged there. Also, fix some compilation issues when turning on WATCH_GTT and WATCH_LISTS, although this is a lost cause; most of the code has rotted beyond repair. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.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/external/bsd/drm2/dist/drm/i915/i915_gem.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.17 src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.18 --- src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c:1.17 Sat Nov 1 17:44:51 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/i915_gem.c Mon Nov 3 11:50:20 2014 @@ -58,6 +58,7 @@ #include linux/time.h #include linux/err.h #include linux/bitops.h +#include linux/printk.h #include asm/param.h #include asm/page.h @@ -2838,10 +2839,18 @@ void i915_vma_move_to_active(struct i915 static void i915_gem_object_move_to_inactive(struct drm_i915_gem_object *obj) { - struct drm_i915_private *dev_priv = obj-base.dev-dev_private; + struct drm_device *dev = obj-base.dev; + struct drm_i915_private *dev_priv = dev-dev_private; struct i915_address_space *vm; struct i915_vma *vma; + if ((obj-base.write_domain I915_GEM_DOMAIN_GTT) != 0) { +#if 0 + printk(KERN_ERR %s: %p 0x%x flushing gtt\n, __func__, obj, + obj-base.write_domain); +#endif + i915_gem_object_flush_gtt_write_domain(obj); + } BUG_ON(obj-base.write_domain ~I915_GEM_GPU_DOMAINS); BUG_ON(!obj-active); @@ -3948,7 +3957,7 @@ static void i915_gem_verify_gtt(struct d struct drm_i915_gem_object *obj; int err = 0; - list_for_each_entry(obj, dev_priv-mm.gtt_list, global_list) { + list_for_each_entry(obj, dev_priv-mm.bound_list, global_list) { if (obj-gtt_space == NULL) { printk(KERN_ERR object found on GTT list with no space reserved\n); err++;
CVS commit: [netbsd-5] src/usr.sbin/ypbind
Module Name:src Committed By: msaitoh Date: Mon Nov 3 18:48:42 UTC 2014 Modified Files: src/usr.sbin/ypbind [netbsd-5]: ypbind.8 ypbind.c Log Message: Pull up following revision(s) (requested by jmcneill in dholland ticket #1925): usr.sbin/ypbind/ypbind.81.19-1.20 usr.sbin/ypbind/ypbind.c1.63-1.98 State handling fixes and cleanups in ypbind; it no longer churns the disk, spams syslogd when the server goes down, or gets confused about its binding state. Fixes PR#15355, PR#32519 and also PR#43900. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.6.1 src/usr.sbin/ypbind/ypbind.8 cvs rdiff -u -r1.57.18.1 -r1.57.18.2 src/usr.sbin/ypbind/ypbind.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/ypbind/ypbind.8 diff -u src/usr.sbin/ypbind/ypbind.8:1.18 src/usr.sbin/ypbind/ypbind.8:1.18.6.1 --- src/usr.sbin/ypbind/ypbind.8:1.18 Wed Apr 30 13:11:03 2008 +++ src/usr.sbin/ypbind/ypbind.8 Mon Nov 3 18:48:42 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: ypbind.8,v 1.18 2008/04/30 13:11:03 martin Exp $ +.\ $NetBSD: ypbind.8,v 1.18.6.1 2014/11/03 18:48:42 msaitoh Exp $ .\ .\ Copyright (c) 1996 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd February 26, 2005 +.Dd June 14, 2014 .Dt YPBIND 8 .Os .Sh NAME @@ -94,9 +94,9 @@ it is bound. If the binding is somehow lost, e.g by server reboot, .Nm marks the domain as unbound and attempts to re-establish the binding. -When the binding is once again successful, +If a binding cannot be re-established within 60 seconds, .Nm -marks the domain as bound and resumes its periodic check. +backs off exponentially to trying only once per hour. .Pp The options are as follows: .Bl -tag -width -broadcast @@ -114,7 +114,7 @@ or servers. .It Fl ypset .Xr ypset 8 -may be used to change the server to which a domain is bound. +may be used from anywhere to change the server to which a domain is bound. .It Fl ypsetme .Xr ypset 8 may be used only from this machine to change the server @@ -122,11 +122,22 @@ to which a domain is bound. .El .Pp The -.Fl broadcast +.Fl broadcast , .Fl ypset , and -.Fl ypsetme , +.Fl ypsetme options are inherently insecure and should be avoided. +.Sh SIGNALS +.Nm +responds to the following signals: +.Bl -tag -width TERM -compact +.It Dv HUP +causes +.Nm +to immediately retry any unbound domains that are currently in +exponential backoff. +Use this to resume immediately after a long network outage is +resolved. .Sh FILES .Pa /var/yp/binding/\*[Lt]domain\*[Gt].version - binding file for \*[Lt]domain\*[Gt]. @@ -147,7 +158,10 @@ facility. .Xr yppoll 8 , .Xr ypset 8 .Sh AUTHORS +.An -nosplit This version of .Nm -was originally implemented by Theo de Raadt. -The ypservers support was implemented by Luke Mewburn. +was originally implemented by +.An Theo de Raadt . +The ypservers support was implemented by +.An Luke Mewburn . Index: src/usr.sbin/ypbind/ypbind.c diff -u src/usr.sbin/ypbind/ypbind.c:1.57.18.1 src/usr.sbin/ypbind/ypbind.c:1.57.18.2 --- src/usr.sbin/ypbind/ypbind.c:1.57.18.1 Wed Feb 16 21:04:03 2011 +++ src/usr.sbin/ypbind/ypbind.c Mon Nov 3 18:48:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ypbind.c,v 1.57.18.1 2011/02/16 21:04:03 bouyer Exp $ */ +/* $NetBSD: ypbind.c,v 1.57.18.2 2014/11/03 18:48:42 msaitoh Exp $ */ /* * Copyright (c) 1992, 1993 Theo de Raadt dera...@fsa.ca @@ -28,138 +28,185 @@ #include sys/cdefs.h #ifndef LINT -__RCSID($NetBSD: ypbind.c,v 1.57.18.1 2011/02/16 21:04:03 bouyer Exp $); +__RCSID($NetBSD: ypbind.c,v 1.57.18.2 2014/11/03 18:48:42 msaitoh Exp $); #endif -#include sys/param.h #include sys/types.h +#include sys/param.h +#include sys/file.h #include sys/ioctl.h #include sys/signal.h #include sys/socket.h -#include sys/file.h -#include sys/uio.h -#include sys/syslog.h #include sys/stat.h +#include sys/syslog.h +#include sys/uio.h +#include arpa/inet.h +#include net/if.h +#include ctype.h +#include dirent.h +#include err.h +#include errno.h #include fcntl.h +#include ifaddrs.h #include limits.h +#include netdb.h +#include signal.h +#include stdarg.h #include stdio.h #include stdlib.h -#include errno.h -#include syslog.h -#include stdarg.h -#include ctype.h -#include dirent.h -#include netdb.h #include string.h -#include err.h +#include syslog.h +#include unistd.h +#include util.h + #include rpc/rpc.h #include rpc/xdr.h -#include net/if.h -#include arpa/inet.h #include rpc/pmap_clnt.h #include rpc/pmap_prot.h #include rpc/pmap_rmt.h -#include unistd.h -#include util.h #include rpcsvc/yp_prot.h #include rpcsvc/ypclnt.h -#include ifaddrs.h #include pathnames.h +#define YPSERVERSSUFF .ypservers +#define BINDINGDIR (_PATH_VAR_YP binding) + #ifndef O_SHLOCK #define O_SHLOCK 0 #endif
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 18:50:31 UTC 2014 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: Ticket 1925. To generate a diff of this commit: cvs rdiff -u -r1.1.2.74 -r1.1.2.75 src/doc/CHANGES-5.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.3 diff -u src/doc/CHANGES-5.3:1.1.2.74 src/doc/CHANGES-5.3:1.1.2.75 --- src/doc/CHANGES-5.3:1.1.2.74 Mon Nov 3 13:05:59 2014 +++ src/doc/CHANGES-5.3 Mon Nov 3 18:50:31 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.74 2014/11/03 13:05:59 msaitoh Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.75 2014/11/03 18:50:31 msaitoh Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -1109,3 +1109,11 @@ usr.bin/ftp/version.h1.85 Change the version that ftp announces to 20141026. It can be a useful method to determine if CVE-2014-8517 is fixed. [lukem, ticket #1929] + +usr.sbin/ypbind/ypbind.8 1.19-1.20 +usr.sbin/ypbind/ypbind.c 1.63-1.98 + + State handling fixes and cleanups in ypbind; it no longer churns the + disk, spams syslogd when the server goes down, or gets confused about + its binding state. Fixes PR#15355, PR#32519 and also PR#43900. + [dholland, ticket #1925]
CVS commit: src/sbin/fsck_msdos
Module Name:src Committed By: jakllsch Date: Mon Nov 3 18:55:04 UTC 2014 Modified Files: src/sbin/fsck_msdos: boot.c dosfs.h Log Message: ClusterOffset actually needs to be able to be negative. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sbin/fsck_msdos/boot.c cvs rdiff -u -r1.6 -r1.7 src/sbin/fsck_msdos/dosfs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_msdos/boot.c diff -u src/sbin/fsck_msdos/boot.c:1.16 src/sbin/fsck_msdos/boot.c:1.17 --- src/sbin/fsck_msdos/boot.c:1.16 Mon Jul 7 19:04:37 2014 +++ src/sbin/fsck_msdos/boot.c Mon Nov 3 18:55:04 2014 @@ -27,7 +27,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: boot.c,v 1.16 2014/07/07 19:04:37 christos Exp $); +__RCSID($NetBSD: boot.c,v 1.17 2014/11/03 18:55:04 jakllsch Exp $); #endif /* not lint */ #include stdlib.h @@ -184,7 +184,7 @@ readboot(int dosfs, struct bootblock *bo return FSFATAL; } - boot-ClusterOffset = (boot-RootDirEnts * 32 + boot-BytesPerSec - 1) + boot-ClusterOffset = (int)(boot-RootDirEnts * 32 + boot-BytesPerSec - 1) / boot-BytesPerSec + boot-ResSectors + boot-FATs * boot-FATsecs @@ -205,8 +205,8 @@ readboot(int dosfs, struct bootblock *bo boot-NumSectors = boot-HugeSectors; boot-NumClusters = (boot-NumSectors - boot-ClusterOffset) / boot-SecPerClust; - if (boot-ClusterOffset boot-NumSectors) { - pfatal(Cluster offset too large (%u clusters)\n, + if (boot-ClusterOffset (intmax_t)boot-NumSectors) { + pfatal(Cluster offset too large (%d sectors)\n, boot-ClusterOffset); return FSFATAL; } Index: src/sbin/fsck_msdos/dosfs.h diff -u src/sbin/fsck_msdos/dosfs.h:1.6 src/sbin/fsck_msdos/dosfs.h:1.7 --- src/sbin/fsck_msdos/dosfs.h:1.6 Fri Jun 13 20:46:09 2008 +++ src/sbin/fsck_msdos/dosfs.h Mon Nov 3 18:55:04 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dosfs.h,v 1.6 2008/06/13 20:46:09 martin Exp $ */ +/* $NetBSD: dosfs.h,v 1.7 2014/11/03 18:55:04 jakllsch Exp $ */ /* * Copyright (C) 1995, 1996, 1997 Wolfgang Solfrank @@ -70,7 +70,7 @@ struct bootblock { u_int32_t NumSectors; /* how many sectors are there */ u_int32_t FATsecs; /* how many sectors are in FAT */ u_int32_t NumFatEntries; /* how many entries really are there */ - u_int ClusterOffset; /* at what sector would sector 0 start */ + int ClusterOffset; /* at what sector would sector 0 start */ u_int ClusterSize; /* Cluster size in bytes */ /* Now some statistics: */
CVS commit: [netbsd-6] src
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:18:09 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c perfuse.c perfuse_priv.h subr.c src/lib/libpuffs [netbsd-6]: creds.c dispatcher.c puffs.h puffs_ops.3 requests.c src/sys/fs/puffs [netbsd-6]: puffs_msgif.h puffs_sys.h puffs_vnops.c src/usr.sbin/perfused [netbsd-6]: msg.c Log Message: Pull up following revision(s) (requested by manu in ticket #1140): lib/libperfuse/ops.c1.63-1.69 lib/libperfuse/perfuse.c1.32-1.33 lib/libperfuse/perfuse_priv.h 1.32-1.34 lib/libperfuse/subr.c 1.20 lib/libpuffs/creds.c1.16 lib/libpuffs/dispatcher.c 1.47 lib/libpuffs/puffs.h1.125 lib/libpuffs/puffs_ops.31.37-1.38 lib/libpuffs/requests.c 1.24 sys/fs/puffs/puffs_msgif.h 1.81 sys/fs/puffs/puffs_sys.h1.85 sys/fs/puffs/puffs_vnops.c 1.183 usr.sbin/perfused/msg.c 1.22 Bring libpuffs, libperfuse and perfused on par with -current: - implement FUSE direct I/O - remove useless code and warnings - fix missing GETATTR bugs - fix exended attribute get and list operations To generate a diff of this commit: cvs rdiff -u -r1.50.2.7 -r1.50.2.8 src/lib/libperfuse/ops.c cvs rdiff -u -r1.25.2.3 -r1.25.2.4 src/lib/libperfuse/perfuse.c cvs rdiff -u -r1.25.2.4 -r1.25.2.5 src/lib/libperfuse/perfuse_priv.h cvs rdiff -u -r1.15.2.3 -r1.15.2.4 src/lib/libperfuse/subr.c cvs rdiff -u -r1.15 -r1.15.8.1 src/lib/libpuffs/creds.c cvs rdiff -u -r1.38.2.4 -r1.38.2.5 src/lib/libpuffs/dispatcher.c cvs rdiff -u -r1.119.4.4 -r1.119.4.5 src/lib/libpuffs/puffs.h cvs rdiff -u -r1.29.4.4 -r1.29.4.5 src/lib/libpuffs/puffs_ops.3 cvs rdiff -u -r1.23 -r1.23.28.1 src/lib/libpuffs/requests.c cvs rdiff -u -r1.77.8.2 -r1.77.8.3 src/sys/fs/puffs/puffs_msgif.h cvs rdiff -u -r1.78.8.2 -r1.78.8.3 src/sys/fs/puffs/puffs_sys.h cvs rdiff -u -r1.163.2.4 -r1.163.2.5 src/sys/fs/puffs/puffs_vnops.c cvs rdiff -u -r1.20.2.1 -r1.20.2.2 src/usr.sbin/perfused/msg.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.7 src/lib/libperfuse/ops.c:1.50.2.8 --- src/lib/libperfuse/ops.c:1.50.2.7 Tue Jul 30 04:05:32 2013 +++ src/lib/libperfuse/ops.c Mon Nov 3 19:18:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.7 2013/07/30 04:05:32 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.8 2014/11/03 19:18:09 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -634,13 +634,23 @@ fuse_to_dirent(struct puffs_usermount *p */ if (fd-ino == PERFUSE_UNKNOWN_INO) { struct puffs_node *pn; + struct perfuse_node_data *pnd = PERFUSE_NODE_DATA(opc); - if (node_lookup_common(pu, opc, NULL, fd-name, - NULL, pn) != 0) { -DWARNX(node_lookup_common failed); + /* + * Avoid breaking out of fs + * by lookup to .. on root + */ + if ((strcmp(fd-name, ..) == 0) + (pnd-pnd_nodeid == FUSE_ROOT_ID)) { +fd-ino = FUSE_ROOT_ID; } else { -fd-ino = pn-pn_va.va_fileid; -(void)perfuse_node_reclaim(pu, pn); +if (node_lookup_common(pu, opc, NULL, fd-name, + NULL, pn) != 0) { + DWARNX(node_lookup_common failed); +} else { + fd-ino = pn-pn_va.va_fileid; + (void)perfuse_node_reclaim(pu, pn); +} } } @@ -1318,6 +1328,13 @@ int perfuse_node_open(struct puffs_usermount *pu, puffs_cookie_t opc, int mode, const struct puffs_cred *pcr) { + return perfuse_node_open2(pu, opc, mode, pcr, NULL); +} + +int +perfuse_node_open2(struct puffs_usermount *pu, puffs_cookie_t opc, int mode, + const struct puffs_cred *pcr, int *oflags) +{ struct perfuse_state *ps; struct perfuse_node_data *pnd; perfuse_msg_t *pm; @@ -1419,6 +1436,12 @@ perfuse_node_open(struct puffs_usermount */ perfuse_new_fh(opc, foo-fh, mode); + /* + * Set direct I/O if the filesystems forces it + */ + if ((foo-open_flags FUSE_FOPEN_DIRECT_IO) (oflags != NULL)) + *oflags |= PUFFS_OPEN_IO_DIRECT; + #ifdef PERFUSE_DEBUG if (perfuse_diagflags (PDF_FH|PDF_FILENAME)) DPRINTF(%s: opc = %p, file = \%s\, @@ -1534,7 +1557,7 @@ perfuse_node_getattr_ttl(struct puffs_us struct fuse_attr_out *fao; int error = 0; - if (pnd-pnd_flags PND_REMOVED) + if ((pnd-pnd_flags PND_REMOVED) !(pnd-pnd_flags PND_OPEN)) return ENOENT; node_ref(opc); @@ -1927,17 +1950,6 @@ out: return error; } -/* ARGSUSED0 */ -int -perfuse_node_mmap(struct puffs_usermount *pu, puffs_cookie_t opc, int flags, - const struct puffs_cred
CVS commit: [netbsd-6] src/usr.bin/flock
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:26:02 UTC 2014 Modified Files: src/usr.bin/flock [netbsd-6]: flock.1 flock.c Log Message: Pull up following revision(s) (requested by manu in ticket #1143): usr.bin/flock/flock.c: revision 1.10 usr.bin/flock/flock.c: revision 1.11 usr.bin/flock/flock.1: revision 1.10 usr.bin/flock/flock.c: revision 1.8 PR/48351: Dennis Ferguson: Fix incorrect parsing of flock flags. XXX: still flock -s 0 fails with EINVAL, why? make this behave like linux. remove XXX, fix error message mention that -x is the default. To generate a diff of this commit: cvs rdiff -u -r1.8.4.3 -r1.8.4.4 src/usr.bin/flock/flock.1 cvs rdiff -u -r1.6.4.3 -r1.6.4.4 src/usr.bin/flock/flock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/flock/flock.1 diff -u src/usr.bin/flock/flock.1:1.8.4.3 src/usr.bin/flock/flock.1:1.8.4.4 --- src/usr.bin/flock/flock.1:1.8.4.3 Sat Sep 21 16:39:58 2013 +++ src/usr.bin/flock/flock.1 Mon Nov 3 19:26:02 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: flock.1,v 1.8.4.3 2013/09/21 16:39:58 riz Exp $ +.\ $NetBSD: flock.1,v 1.8.4.4 2014/11/03 19:26:02 msaitoh Exp $ .\ .\ Copyright (c) 2012 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -28,7 +28,7 @@ .\ POSSIBILITY OF SUCH DAMAGE. .\ .\ -.Dd November 2, 2012 +.Dd August 18, 2014 .Dt FLOCK 1 .Os .Sh NAME @@ -87,6 +87,7 @@ Fail if the lock could not be obtained a .Ar seconds . .It Fl x , Fl Fl exclusive Obtain an exclusive lock. +This is the default. .El .Sh EXIT STATUS .Ex -std Index: src/usr.bin/flock/flock.c diff -u src/usr.bin/flock/flock.c:1.6.4.3 src/usr.bin/flock/flock.c:1.6.4.4 --- src/usr.bin/flock/flock.c:1.6.4.3 Sun Feb 10 23:42:19 2013 +++ src/usr.bin/flock/flock.c Mon Nov 3 19:26:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: flock.c,v 1.6.4.3 2013/02/10 23:42:19 riz Exp $ */ +/* $NetBSD: flock.c,v 1.6.4.4 2014/11/03 19:26:02 msaitoh Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: flock.c,v 1.6.4.3 2013/02/10 23:42:19 riz Exp $); +__RCSID($NetBSD: flock.c,v 1.6.4.4 2014/11/03 19:26:02 msaitoh Exp $); #include stdio.h #include string.h @@ -43,6 +43,7 @@ __RCSID($NetBSD: flock.c,v 1.6.4.3 2013 #include errno.h #include getopt.h #include paths.h +#include limits.h #include time.h static struct option flock_longopts[] = { @@ -149,12 +150,13 @@ int main(int argc, char *argv[]) { int c; - int lock = LOCK_EX; + int lock = 0; double timeout = 0; int cls = 0; int fd = -1; int debug = 0; int verbose = 0; + long l; char *mcargv[] = { __UNCONST(_PATH_BSHELL), __UNCONST(-c), NULL, NULL }; @@ -170,7 +172,8 @@ main(int argc, char *argv[]) debug++; break; case 'x': - if (lock ~LOCK_NB) +#define T(l) (lock ~LOCK_NB) != (l) (lock ~LOCK_NB) != 0 + if (T(LOCK_EX)) goto badlock; lock |= LOCK_EX; break; @@ -178,12 +181,12 @@ main(int argc, char *argv[]) lock |= LOCK_NB; break; case 's': - if (lock ~LOCK_NB) + if (T(LOCK_SH)) goto badlock; lock |= LOCK_SH; break; case 'u': - if (lock ~LOCK_NB) + if (T(LOCK_UN)) goto badlock; lock |= LOCK_UN; break; @@ -205,13 +208,22 @@ main(int argc, char *argv[]) argc -= optind; argv += optind; + if ((lock ~LOCK_NB) == 0) + lock |= LOCK_EX; /* default to exclusive like linux */ + switch (argc) { case 0: usage(Missing lock file argument); case 1: if (cls) - usage(Close is valid only for descriptors); - fd = strtol(argv[0], NULL, 0); // XXX: error checking + usage(Close is not valid for descriptors); + errno = 0; + l = strtol(argv[0], v, 0); + if ((l == LONG_MIN || l == LONG_MAX) errno == ERANGE) + err(EXIT_FAILURE, Bad file descriptor `%s', argv[0]); + if (l INT_MAX || l 0 || *v) + errx(EXIT_FAILURE, Bad file descriptor `%s', argv[0]); + fd = (int)l; if (debug) { fprintf(stderr, descriptor %s lock %s\n, argv[0], lock2name(lock));
CVS commit: [netbsd-6] src/lib/libperfuse
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:31:39 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1144): lib/libperfuse/ops.c: revision 1.70 We used to remove the trailing zeros in FUSE readlink replies, but it seems it does not always happen. Just remove them if present. To generate a diff of this commit: cvs rdiff -u -r1.50.2.8 -r1.50.2.9 src/lib/libperfuse/ops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.8 src/lib/libperfuse/ops.c:1.50.2.9 --- src/lib/libperfuse/ops.c:1.50.2.8 Mon Nov 3 19:18:09 2014 +++ src/lib/libperfuse/ops.c Mon Nov 3 19:31:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.8 2014/11/03 19:18:09 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.9 2014/11/03 19:31:39 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -2623,12 +2623,16 @@ perfuse_node_readlink(struct puffs_userm if (len == 0) DERRX(EX_PROTOCOL, path len = %zd too short, len); + (void)memcpy(linkname, _GET_OUTPAYLOAD(ps, pm, char *), len); + /* * FUSE filesystems return a NUL terminated string, we - * do not want to trailing \0 + * do not want the trailing \0 */ - *linklen = len - 1; - (void)memcpy(linkname, _GET_OUTPAYLOAD(ps, pm, char *), len); + while (len 0 linkname[len - 1] == '\0') + len--; + + *linklen = len; ps-ps_destroy_msg(pm); error = 0;
CVS commit: [netbsd-6] src/lib/libperfuse
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:37:58 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c perfuse.c Log Message: Pull up following revision(s) (requested by manu in ticket #1147): lib/libperfuse/perfuse.c: revision 1.34 lib/libperfuse/ops.c: revision 1.71 Improve POSIX compliance of FUSE filesystems through PERUSE - access denied is EPERM and not EACCES - access to file owned by someone else in a sticy-bit directory should be allowed for the sticy-bit directory owner - setting sticky-bit on a non directory should produce EFTYPE - implement PATHCONF method as much as we can. To generate a diff of this commit: cvs rdiff -u -r1.50.2.9 -r1.50.2.10 src/lib/libperfuse/ops.c cvs rdiff -u -r1.25.2.4 -r1.25.2.5 src/lib/libperfuse/perfuse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.9 src/lib/libperfuse/ops.c:1.50.2.10 --- src/lib/libperfuse/ops.c:1.50.2.9 Mon Nov 3 19:31:39 2014 +++ src/lib/libperfuse/ops.c Mon Nov 3 19:37:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.9 2014/11/03 19:31:39 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.10 2014/11/03 19:37:58 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -269,7 +269,7 @@ sticky_access(puffs_cookie_t opc, struct const struct puffs_cred *pcr) { uid_t uid; - int sticky, owner; + int sticky, owner, parent_owner; /* * This covers the case where the kernel requests a DELETE @@ -288,9 +288,10 @@ sticky_access(puffs_cookie_t opc, struct sticky = puffs_pn_getvap(opc)-va_mode S_ISTXT; owner = puffs_pn_getvap(targ)-va_uid == uid; + parent_owner = puffs_pn_getvap(opc)-va_uid == uid; - if (sticky !owner) - return EACCES; + if (sticky !owner !parent_owner) + return EPERM; return 0; } @@ -1295,7 +1296,7 @@ perfuse_node_mknod(struct puffs_usermoun break; default: /* VNON, VBLK, VCHR, VBAD */ if (!puffs_cred_isjuggernaut(pcn-pcn_cred)) { - error = EACCES; + error = EPERM; goto out; } break; @@ -1686,7 +1687,7 @@ perfuse_node_setattr_ttl(struct puffs_us (vap-va_mtime.tv_sec != (time_t)PUFFS_VNOVAL)) (puffs_access_times(old_va-va_uid, old_va-va_gid, old_va-va_mode, 0, pcr) != 0)) - return EACCES; + return EPERM; /* * Check for permission to change owner and group @@ -1695,7 +1696,15 @@ perfuse_node_setattr_ttl(struct puffs_us (vap-va_gid != (gid_t)PUFFS_VNOVAL)) (puffs_access_chown(old_va-va_uid, old_va-va_gid, vap-va_uid, vap-va_gid, pcr)) != 0) - return EACCES; + return EPERM; + + /* + * Check for sticky bit on non-directory by non root user + */ + if ((vap-va_mode != (mode_t)PUFFS_VNOVAL) + (vap-va_mode S_ISTXT) (old_va-va_type != VDIR) + !puffs_cred_isjuggernaut(pcr)) + return EFTYPE; /* * Check for permission to change permissions @@ -1703,7 +1712,7 @@ perfuse_node_setattr_ttl(struct puffs_us if ((vap-va_mode != (mode_t)PUFFS_VNOVAL) (puffs_access_chmod(old_va-va_uid, old_va-va_gid, old_va-va_type, vap-va_mode, pcr)) != 0) - return EACCES; + return EPERM; node_ref(opc); @@ -2867,13 +2876,68 @@ perfuse_node_print(struct puffs_usermoun return 0; } -/* ARGSUSED0 */ int perfuse_node_pathconf(struct puffs_usermount *pu, puffs_cookie_t opc, int name, int *retval) { - DERRX(EX_SOFTWARE, %s: UNIMPLEMENTED (FATAL), __func__); - return 0; + perfuse_msg_t *pm; + struct perfuse_state *ps; + struct fuse_statfs_out *fso; + int error = 0; + + /* + * Static values copied from UFS + * in src/sys/ufs/ufs/ufs_vnops.c + */ + switch (name) { + case _PC_LINK_MAX: + *retval = LINK_MAX; + break; + case _PC_PATH_MAX: + *retval = PATH_MAX; + break; + case _PC_PIPE_BUF: + *retval = PIPE_BUF; + break; + case _PC_CHOWN_RESTRICTED: + *retval = 1; + break; + case _PC_NO_TRUNC: + *retval = 1; + break; + case _PC_SYNC_IO: + *retval = 1; + break; + case _PC_FILESIZEBITS: + *retval = 42; + break; + case _PC_SYMLINK_MAX: + *retval = MAXPATHLEN; + break; + case _PC_2_SYMLINKS: + *retval = 1; + break; + case _PC_NAME_MAX: + ps = puffs_getspecific(pu); + pm = ps-ps_new_msg(pu, opc, FUSE_STATFS, 0, NULL); + + error = xchg_msg(pu, opc, pm, sizeof(*fso), wait_reply); + if (error != 0) + return error; + + fso = GET_OUTPAYLOAD(ps, pm, fuse_statfs_out); + *retval = fso-st.namelen; + + ps-ps_destroy_msg(pm); + + break; + default: + DWARN(Unimplemented pathconf for name = %d, name); + error = ENOSYS; + break; + } + + return error; } int Index: src/lib/libperfuse/perfuse.c diff -u src/lib/libperfuse/perfuse.c:1.25.2.4 src/lib/libperfuse/perfuse.c:1.25.2.5 --- src/lib/libperfuse/perfuse.c:1.25.2.4 Mon Nov 3 19:18:09 2014 +++ src/lib/libperfuse/perfuse.c Mon Nov 3 19:37:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse.c,v 1.25.2.4
CVS commit: [netbsd-6] src/lib/libperfuse
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:40:10 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1148): lib/libperfuse/ops.c: revision 1.73 rmdir dir/.. must return an error. Use ENOTEMPTY like FFS does. To generate a diff of this commit: cvs rdiff -u -r1.50.2.10 -r1.50.2.11 src/lib/libperfuse/ops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.10 src/lib/libperfuse/ops.c:1.50.2.11 --- src/lib/libperfuse/ops.c:1.50.2.10 Mon Nov 3 19:37:58 2014 +++ src/lib/libperfuse/ops.c Mon Nov 3 19:40:10 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.10 2014/11/03 19:37:58 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.11 2014/11/03 19:40:10 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -2342,6 +2342,12 @@ perfuse_node_rmdir(struct puffs_usermoun (PERFUSE_NODE_DATA(targ)-pnd_flags PND_REMOVED)) return ENOENT; + /* + * Attempt to rmdir dir/.. shoud raise ENOTEMPTY + */ + if (PERFUSE_NODE_DATA(targ)-pnd_nodeid == pnd-pnd_parent_nodeid) + return ENOTEMPTY; + node_ref(opc); node_ref(targ);
CVS commit: [netbsd-6] src/sys/fs/puffs
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:42:34 UTC 2014 Modified Files: src/sys/fs/puffs [netbsd-6]: puffs_node.c puffs_vnops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1149): sys/fs/puffs/puffs_node.c: revision 1.33 sys/fs/puffs/puffs_vnops.c: revision 1.185 When changing a directory content, update the ctime/mtime in kernel cache, otherwise the updated ctime/mtime appears after the cached entry expire. To generate a diff of this commit: cvs rdiff -u -r1.23.2.2 -r1.23.2.3 src/sys/fs/puffs/puffs_node.c cvs rdiff -u -r1.163.2.5 -r1.163.2.6 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_node.c diff -u src/sys/fs/puffs/puffs_node.c:1.23.2.2 src/sys/fs/puffs/puffs_node.c:1.23.2.3 --- src/sys/fs/puffs/puffs_node.c:1.23.2.2 Sun Aug 12 12:59:50 2012 +++ src/sys/fs/puffs/puffs_node.c Mon Nov 3 19:42:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_node.c,v 1.23.2.2 2012/08/12 12:59:50 martin Exp $ */ +/* $NetBSD: puffs_node.c,v 1.23.2.3 2014/11/03 19:42:33 msaitoh Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.23.2.2 2012/08/12 12:59:50 martin Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_node.c,v 1.23.2.3 2014/11/03 19:42:33 msaitoh Exp $); #include sys/param.h #include sys/hash.h @@ -249,6 +249,8 @@ puffs_newnode(struct mount *mp, struct v if (PUFFS_USE_NAMECACHE(pmp)) cache_enter(dvp, vp, cnp); + puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0); + return 0; } Index: src/sys/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.163.2.5 src/sys/fs/puffs/puffs_vnops.c:1.163.2.6 --- src/sys/fs/puffs/puffs_vnops.c:1.163.2.5 Mon Nov 3 19:18:09 2014 +++ src/sys/fs/puffs/puffs_vnops.c Mon Nov 3 19:42:33 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.163.2.5 2014/11/03 19:18:09 msaitoh Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.163.2.6 2014/11/03 19:42:33 msaitoh Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.163.2.5 2014/11/03 19:18:09 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.163.2.6 2014/11/03 19:42:33 msaitoh Exp $); #include sys/param.h #include sys/buf.h @@ -1799,6 +1799,8 @@ puffs_vnop_remove(void *v) PUFFS_MSG_RELEASE(remove); + puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0); + RELEPN_AND_VP(dvp, dpn); RELEPN_AND_VP(vp, pn); @@ -1917,6 +1919,8 @@ puffs_vnop_rmdir(void *v) PUFFS_MSG_RELEASE(rmdir); + puffs_updatenode(VPTOPP(dvp), PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0); + /* XXX: some call cache_purge() *for both vnodes* here, investigate */ RELEPN_AND_VP(dvp, dpn); RELEPN_AND_VP(vp, pn); @@ -1962,8 +1966,11 @@ puffs_vnop_link(void *v) * XXX: stay in touch with the cache. I don't like this, but * don't have a better solution either. See also puffs_rename(). */ - if (error == 0) + if (error == 0) { puffs_updatenode(pn, PUFFS_UPDATECTIME, 0); + puffs_updatenode(VPTOPP(dvp), + PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0); + } RELEPN_AND_VP(dvp, dpn); puffs_releasenode(pn); @@ -2129,6 +2136,12 @@ puffs_vnop_rename(void *v) */ if (error == 0) { puffs_updatenode(fpn, PUFFS_UPDATECTIME, 0); + puffs_updatenode(VPTOPP(fdvp), + PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, 0); + if (fdvp != tdvp) + puffs_updatenode(VPTOPP(tdvp), + PUFFS_UPDATECTIME|PUFFS_UPDATEMTIME, + 0); if (PUFFS_USE_DOTDOTCACHE(pmp) (VPTOPP(fvp)-pn_parent != tdvp))
CVS commit: [netbsd-6] src
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:48:14 UTC 2014 Modified Files: src/lib/libc/sys [netbsd-6]: truncate.2 src/sys/kern [netbsd-6]: vfs_syscalls.c Log Message: Pull up following revision(s) (requested by manu in ticket #1150): lib/libc/sys/truncate.2: revision 1.27 sys/kern/vfs_syscalls.c: revision 1.484 Follow OpenGroup online documents for truncate[1] and ftruncate[2]. Fail with EINVAL for length argument negative values. [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/truncate.html [2] http://pubs.opengroup.org/onlinepubs/9699919799/functions/ftruncate.html To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.26.8.1 src/lib/libc/sys/truncate.2 cvs rdiff -u -r1.449.2.3 -r1.449.2.4 src/sys/kern/vfs_syscalls.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/sys/truncate.2 diff -u src/lib/libc/sys/truncate.2:1.26 src/lib/libc/sys/truncate.2:1.26.8.1 --- src/lib/libc/sys/truncate.2:1.26 Mon May 31 12:16:20 2010 +++ src/lib/libc/sys/truncate.2 Mon Nov 3 19:48:14 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: truncate.2,v 1.26 2010/05/31 12:16:20 njoly Exp $ +.\ $NetBSD: truncate.2,v 1.26.8.1 2014/11/03 19:48:14 msaitoh Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)truncate.2 8.1 (Berkeley) 6/4/93 .\ -.Dd March 16, 2008 +.Dd June 14, 2014 .Dt TRUNCATE 2 .Os .Sh NAME @@ -76,6 +76,10 @@ and .Fn ftruncate are: .Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa length +argument was less than 0. .It Bq Er EISDIR The named file is a directory. .It Bq Er EROFS Index: src/sys/kern/vfs_syscalls.c diff -u src/sys/kern/vfs_syscalls.c:1.449.2.3 src/sys/kern/vfs_syscalls.c:1.449.2.4 --- src/sys/kern/vfs_syscalls.c:1.449.2.3 Mon Apr 21 10:14:17 2014 +++ src/sys/kern/vfs_syscalls.c Mon Nov 3 19:48:14 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_syscalls.c,v 1.449.2.3 2014/04/21 10:14:17 bouyer Exp $ */ +/* $NetBSD: vfs_syscalls.c,v 1.449.2.4 2014/11/03 19:48:14 msaitoh Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.449.2.3 2014/04/21 10:14:17 bouyer Exp $); +__KERNEL_RCSID(0, $NetBSD: vfs_syscalls.c,v 1.449.2.4 2014/11/03 19:48:14 msaitoh Exp $); #ifdef _KERNEL_OPT #include opt_fileassoc.h @@ -3637,6 +3637,9 @@ sys_truncate(struct lwp *l, const struct struct vattr vattr; int error; + if (SCARG(uap, length) 0) + return EINVAL; + error = namei_simple_user(SCARG(uap, path), NSM_FOLLOW_TRYEMULROOT, vp); if (error != 0) @@ -3671,6 +3674,9 @@ sys_ftruncate(struct lwp *l, const struc file_t *fp; int error; + if (SCARG(uap, length) 0) + return EINVAL; + /* fd_getvnode() will use the descriptor for us */ if ((error = fd_getvnode(SCARG(uap, fd), fp)) != 0) return (error);
CVS commit: [netbsd-6] src/sys/fs/puffs
Module Name:src Committed By: msaitoh Date: Mon Nov 3 19:51:37 UTC 2014 Modified Files: src/sys/fs/puffs [netbsd-6]: puffs_vnops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1152): sys/fs/puffs/puffs_vnops.c: revision 1.186 PUFFS fixes for size update ater write plus read/write sanity checks - Always update kernel metadata cache for size when writing This fixes situation where size update after appending to a file lagged - Make read/write nilpotent when called with null size, as FFS does - Return EFBIG instead of EINVAL for negative offsets, as FFS does To generate a diff of this commit: cvs rdiff -u -r1.163.2.6 -r1.163.2.7 src/sys/fs/puffs/puffs_vnops.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/fs/puffs/puffs_vnops.c diff -u src/sys/fs/puffs/puffs_vnops.c:1.163.2.6 src/sys/fs/puffs/puffs_vnops.c:1.163.2.7 --- src/sys/fs/puffs/puffs_vnops.c:1.163.2.6 Mon Nov 3 19:42:33 2014 +++ src/sys/fs/puffs/puffs_vnops.c Mon Nov 3 19:51:36 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: puffs_vnops.c,v 1.163.2.6 2014/11/03 19:42:33 msaitoh Exp $ */ +/* $NetBSD: puffs_vnops.c,v 1.163.2.7 2014/11/03 19:51:36 msaitoh Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Antti Kantee. All Rights Reserved. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.163.2.6 2014/11/03 19:42:33 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: puffs_vnops.c,v 1.163.2.7 2014/11/03 19:51:36 msaitoh Exp $); #include sys/param.h #include sys/buf.h @@ -2199,7 +2199,7 @@ puffs_vnop_read(void *v) if (uio-uio_resid == 0) return 0; if (uio-uio_offset 0) - return EINVAL; + return EFBIG; if (vp-v_type == VREG PUFFS_USE_PAGECACHE(pmp) @@ -2306,6 +2306,12 @@ puffs_vnop_write(void *v) error = uflags = 0; write_msg = NULL; + /* std sanity */ + if (uio-uio_resid == 0) + return 0; + if (uio-uio_offset 0) + return EFBIG; + mutex_enter(pn-pn_sizemtx); if (vp-v_type == VREG @@ -2322,10 +2328,6 @@ puffs_vnop_write(void *v) origoff = uio-uio_offset; while (uio-uio_resid 0) { - if (vp-v_mount-mnt_flag MNT_RELATIME) -uflags |= PUFFS_UPDATEATIME; - uflags |= PUFFS_UPDATECTIME; - uflags |= PUFFS_UPDATEMTIME; oldoff = uio-uio_offset; bytelen = uio-uio_resid; @@ -2386,8 +2388,6 @@ puffs_vnop_write(void *v) error = VOP_PUTPAGES(vp, trunc_page(origoff), round_page(uio-uio_offset), PGO_CLEANIT); } - - puffs_updatenode(VPTOPP(vp), uflags, vp-v_size); } else { /* tomove is non-increasing */ tomove = PUFFS_TOMOVE(uio-uio_resid, pmp); @@ -2421,8 +2421,10 @@ puffs_vnop_write(void *v) } /* adjust file size */ - if (vp-v_size uio-uio_offset) + if (vp-v_size uio-uio_offset) { +uflags |= PUFFS_UPDATESIZE; uvm_vnp_setsize(vp, uio-uio_offset); + } /* didn't move everything? bad userspace. bail */ if (write_msg-pvnr_resid != 0) { @@ -2433,6 +2435,12 @@ puffs_vnop_write(void *v) puffs_msgmem_release(park_write); } + if (vp-v_mount-mnt_flag MNT_RELATIME) + uflags |= PUFFS_UPDATEATIME; + uflags |= PUFFS_UPDATECTIME; + uflags |= PUFFS_UPDATEMTIME; + puffs_updatenode(VPTOPP(vp), uflags, vp-v_size); + mutex_exit(pn-pn_sizemtx); return error; }
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 20:01:51 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1140, 1143-1144, 1147-1150 and 1152. To generate a diff of this commit: cvs rdiff -u -r1.1.2.145 -r1.1.2.146 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.145 src/doc/CHANGES-6.2:1.1.2.146 --- src/doc/CHANGES-6.2:1.1.2.145 Mon Nov 3 16:39:11 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 20:01:51 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.145 2014/11/03 16:39:11 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.146 2014/11/03 20:01:51 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4032,3 +4032,78 @@ sys/arch/sun3/dev/fd.c1.78 Fix unexpected memory corruption on opening fd(4). [tsutsui, ticket #1139] + +lib/libperfuse/ops.c1.63-1.69 +lib/libperfuse/perfuse.c 1.32-1.33 +lib/libperfuse/perfuse_priv.h 1.32-1.34 +lib/libperfuse/subr.c1.20 +lib/libpuffs/creds.c1.16 +lib/libpuffs/dispatcher.c 1.47 +lib/libpuffs/puffs.h1.125 +lib/libpuffs/puffs_ops.3 1.37-1.38 +lib/libpuffs/requests.c1.24 +sys/fs/puffs/puffs_msgif.h 1.81 +sys/fs/puffs/puffs_sys.h 1.85 +sys/fs/puffs/puffs_vnops.c 1.183 +usr.sbin/perfused/msg.c1.22 + + Bring libpuffs, libperfuse and perfused on par with -current: + - implement FUSE direct I/O + - remove useless code and warnings + - fix missing GETATTR bugs + - fix exended attribute get and list operations + [manu, ticket #1140] + +usr.bin/flock/flock.11.10 +usr.bin/flock/flock.c1.8, 1.10-1.11 + + PR/48351: Dennis Ferguson: Fix incorrect parsing of flock flags. + Improve Linux compatibility, by making exclusive lock the default. + Also check for file descriptor value being sane. + [manu, ticket #1143] + +lib/libperfuse/ops.c1.70 + + We used to remove the trailing zeros in FUSE readlink replies, but + it seems it does not always happen. Just remove them if present. + [manu, ticket #1144] + +lib/libperfuse/ops.c1.71 +lib/libperfuse/perfuse.c 1.34 + + Improve POSIX compliance of FUSE filesystems through PERUSE: + - access denied is EPERM and not EACCES + - access to file owned by someone else in a sticy-bit directory should + be allowed for the sticy-bit directory owner + - setting sticky-bit on a non directory should produce EFTYPE + - implement PATHCONF method as much as we can. + [manu, ticket #1147] + +lib/libperfuse/ops.c1.73 + + rmdir dir/.. must return an error. Use ENOTEMPTY like FFS does. + [manu, ticket #1148] + +sys/fs/puffs/puffs_node.c 1.33 +sys/fs/puffs/puffs_vnops.c 1.185 + + When changing a directory content, update the ctime/mtime in kernel + cache, otherwise the updated ctime/mtime appears after the cached + entry expire. + [manu, ticket #1149] + +lib/libc/sys/truncate.21.27 +sys/kern/vfs_syscalls.c1.484 + + Follow OpenGroup online documents for truncate and ftruncate. + Fail with EINVAL for length argument negative values. + [manu, ticket #1150] + +sys/fs/puffs/puffs_vnops.c 1.186 + + PUFFS fixes for size update ater write plus read/write sanity checks: + - Always update kernel metadata cache for size when writing. This + fixes situation where size update after appending to a file lagged. + - Make read/write nilpotent when called with null size, as FFS does + - Return EFBIG instead of EINVAL for negative offsets, as FFS does + [manu, ticket #1152]
CVS commit: src/share/man/man7
Module Name:src Committed By: snj Date: Mon Nov 3 20:06:25 UTC 2014 Modified Files: src/share/man/man7: release.7 Log Message: fix cksum syntax, CDROM - CD-ROM, give a specific example of a kernel set rather than kern.tgz, add dd(1) xref for usb images To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/share/man/man7/release.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/release.7 diff -u src/share/man/man7/release.7:1.34 src/share/man/man7/release.7:1.35 --- src/share/man/man7/release.7:1.34 Fri Sep 7 07:07:15 2012 +++ src/share/man/man7/release.7 Mon Nov 3 20:06:25 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: release.7,v 1.34 2012/09/07 07:07:15 wiz Exp $ +.\ $NetBSD: release.7,v 1.35 2014/11/03 20:06:25 snj Exp $ .\ .\ Copyright (c) 1997, 2000, 2005 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -79,7 +79,7 @@ All .Sy MD5 files are MD5 digests for the various files in that directory, in the format produced by the command: -.Sy cksum -m Aq Sy file . +.Sy cksum -a MD5 Aq Sy file . .Pp All .Sy SHA512 @@ -151,7 +151,7 @@ These images are usually bootable. .It Sy MD5 .It Sy SHA512 .It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy .iso -CDROM images in ISO 9660 format, usually created with +CD-ROM images in ISO 9660 format, usually created with .Dq ./build.sh ... iso-image ... after a .Dq ./build.sh -x ... release ... @@ -288,8 +288,12 @@ This set contains the system configurati and in several other places throughout the file system hierarchy. .It Sy games.tgz This set includes the games and their manual pages. -.It Sy kern.tgz -This set includes a generic kernel. +.It Sy kern-GENERIC.tgz +This set includes a kernel built from the +.Sy GENERIC +kernel configuration file. +This is meant as an example only; different +platforms may have differently named kernels. .It Sy man.tgz This set includes all of the manual pages for the binaries and other software contained in the @@ -336,7 +340,7 @@ platforms may have differently named ker installation helper items .Bl -tag -width diskimage/ .It Sy cdrom/ -CDROM images in ISO 9660 format, created as part of +CD-ROM images in ISO 9660 format, created as part of .Dq build.sh ... release ... in .Pa src . @@ -412,6 +416,7 @@ tape images, on those platforms that pro .El .Sh SEE ALSO .Xr cksum 1 , +.Xr dd 1 , .Xr gzip 1 , .Xr split 1 , .Xr tar 1
CVS commit: src/share/man/man7
Module Name:src Committed By: snj Date: Mon Nov 3 20:16:50 UTC 2014 Modified Files: src/share/man/man7: release.7 Log Message: bump date To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/share/man/man7/release.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man7/release.7 diff -u src/share/man/man7/release.7:1.35 src/share/man/man7/release.7:1.36 --- src/share/man/man7/release.7:1.35 Mon Nov 3 20:06:25 2014 +++ src/share/man/man7/release.7 Mon Nov 3 20:16:50 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: release.7,v 1.35 2014/11/03 20:06:25 snj Exp $ +.\ $NetBSD: release.7,v 1.36 2014/11/03 20:16:50 snj Exp $ .\ .\ Copyright (c) 1997, 2000, 2005 The NetBSD Foundation, Inc. .\ All rights reserved. @@ -27,7 +27,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd September 6, 2012 +.Dd November 3, 2014 .Dt RELEASE 7 .Os .Sh NAME
CVS commit: [netbsd-6] src
Module Name:src Committed By: msaitoh Date: Mon Nov 3 20:38:09 UTC 2014 Modified Files: src/sbin/ifconfig [netbsd-6]: ifconfig.8 vlan.c src/sys/net [netbsd-6]: if_vlan.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1156): sbin/ifconfig/vlan.c: revision 1.14 sbin/ifconfig/ifconfig.8: revision 1.108 sys/net/if_vlan.c: revision 1.71 sys/net/if_vlan.c: revision 1.73 sys/net/if_vlan.c: revision 1.74 - PR#49114: Write about -vlanif in ifconfig.8. Add -vlanif to the help message of ifconfig. - PR#49196: Leave promiscuous mode when detaching a parent (ifconfig -vlanif) We have to call ifpromisc(ifp, 0) for both a VLAN interface and its parent when they are in promiscuous mode. - PR#49197: Delete link local addresses of a vlan interface when detaching its parent. - PR#49112: Restore vlan_ioctl overwritten by ether_ifdetach in vlan_unconfig To generate a diff of this commit: cvs rdiff -u -r1.104 -r1.104.2.1 src/sbin/ifconfig/ifconfig.8 cvs rdiff -u -r1.13 -r1.13.8.1 src/sbin/ifconfig/vlan.c cvs rdiff -u -r1.69.8.1 -r1.69.8.2 src/sys/net/if_vlan.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/ifconfig.8 diff -u src/sbin/ifconfig/ifconfig.8:1.104 src/sbin/ifconfig/ifconfig.8:1.104.2.1 --- src/sbin/ifconfig/ifconfig.8:1.104 Sat Jan 28 15:01:44 2012 +++ src/sbin/ifconfig/ifconfig.8 Mon Nov 3 20:38:09 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: ifconfig.8,v 1.104 2012/01/28 15:01:44 mbalmer Exp $ +.\ $NetBSD: ifconfig.8,v 1.104.2.1 2014/11/03 20:38:09 msaitoh Exp $ .\ .\ Copyright (c) 1983, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\ .\ @(#)ifconfig.8 8.4 (Berkeley) 6/1/94 .\ -.Dd January 28, 2012 +.Dd September 15, 2014 .Dt IFCONFIG 8 .Os .Sh NAME @@ -633,6 +633,12 @@ Note that and .Cm vlan must be set at the same time. +.It Cm -vlanif Ar iface +Dissociate +.Ar iface +from the +.Xr vlan 4 +interface. .It Cm agrport Ar iface Add .Ar iface Index: src/sbin/ifconfig/vlan.c diff -u src/sbin/ifconfig/vlan.c:1.13 src/sbin/ifconfig/vlan.c:1.13.8.1 --- src/sbin/ifconfig/vlan.c:1.13 Tue Jul 28 18:22:33 2009 +++ src/sbin/ifconfig/vlan.c Mon Nov 3 20:38:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vlan.c,v 1.13 2009/07/28 18:22:33 dyoung Exp $ */ +/* $NetBSD: vlan.c,v 1.13.8.1 2014/11/03 20:38:09 msaitoh Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: vlan.c,v 1.13 2009/07/28 18:22:33 dyoung Exp $); +__RCSID($NetBSD: vlan.c,v 1.13.8.1 2014/11/03 20:38:09 msaitoh Exp $); #endif /* not lint */ #include sys/param.h @@ -175,7 +175,7 @@ vlan_status(prop_dictionary_t env, prop_ static void vlan_usage(prop_dictionary_t env) { - fprintf(stderr, \t[ vlan n vlanif i ]\n); + fprintf(stderr, \t[ vlan n vlanif i ] [ -vlanif i ]\n); } static void Index: src/sys/net/if_vlan.c diff -u src/sys/net/if_vlan.c:1.69.8.1 src/sys/net/if_vlan.c:1.69.8.2 --- src/sys/net/if_vlan.c:1.69.8.1 Tue Jun 3 15:34:00 2014 +++ src/sys/net/if_vlan.c Mon Nov 3 20:38:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vlan.c,v 1.69.8.1 2014/06/03 15:34:00 msaitoh Exp $ */ +/* $NetBSD: if_vlan.c,v 1.69.8.2 2014/11/03 20:38:09 msaitoh Exp $ */ /*- * Copyright (c) 2000, 2001 The NetBSD Foundation, Inc. @@ -78,7 +78,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.69.8.1 2014/06/03 15:34:00 msaitoh Exp $); +__KERNEL_RCSID(0, $NetBSD: if_vlan.c,v 1.69.8.2 2014/11/03 20:38:09 msaitoh Exp $); #include opt_inet.h @@ -103,6 +103,9 @@ __KERNEL_RCSID(0, $NetBSD: if_vlan.c,v #include netinet/in.h #include netinet/if_inarp.h #endif +#ifdef INET6 +#include netinet6/in6_ifattach.h +#endif struct vlan_mc_entry { LIST_ENTRY(vlan_mc_entry) mc_entries; @@ -384,6 +387,8 @@ vlan_unconfig(struct ifnet *ifp) } ether_ifdetach(ifp); + /* Restore vlan_ioctl overwritten by ether_ifdetach */ + ifp-if_ioctl = vlan_ioctl; vlan_reset_linkname(ifp); break; } @@ -398,6 +403,12 @@ vlan_unconfig(struct ifnet *ifp) ifv-ifv_if.if_mtu = 0; ifv-ifv_flags = 0; +#ifdef INET6 + /* To delete v6 link local addresses */ + in6_ifdetach(ifp); +#endif + if ((ifp-if_flags IFF_PROMISC) != 0) + ifpromisc(ifp, 0); if_down(ifp); ifp-if_flags = ~(IFF_UP|IFF_RUNNING); ifp-if_capabilities = 0; @@ -482,6 +493,9 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd if ((error = copyin(ifr-ifr_data, vlr, sizeof(vlr))) != 0) break; if (vlr.vlr_parent[0] == '\0') { + if (ifv-ifv_p != NULL + (ifp-if_flags IFF_PROMISC) != 0) +error = ifpromisc(ifv-ifv_p, 0); vlan_unconfig(ifp); break; }
CVS commit: [netbsd-6] src/external/gpl3/gcc/dist/gcc/config/i386
Module Name:src Committed By: msaitoh Date: Mon Nov 3 20:49:32 UTC 2014 Modified Files: src/external/gpl3/gcc/dist/gcc/config/i386 [netbsd-6]: pmm_malloc.h Log Message: Pull up following revision(s) (requested by joerg in ticket #1157): external/gpl3/gcc.old/dist/gcc/config/i386/pmm_malloc.h: revision 1.2 Apply r1.2 from our GCC 4.8 version of the same file: Kill the throw() on a forward declaration for posix_memalign (it does not match our base declaration and may cause warnings). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.4.1 \ src/external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h diff -u src/external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h:1.1.1.1 src/external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h:1.1.1.1.4.1 --- src/external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h:1.1.1.1 Tue Jun 21 01:22:05 2011 +++ src/external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h Mon Nov 3 20:49:32 2014 @@ -31,7 +31,7 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else -extern C int posix_memalign (void **, size_t, size_t) throw (); +extern C int posix_memalign (void **, size_t, size_t); #endif static __inline void *
CVS commit: [netbsd-6] src/etc/mtree
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:17:45 UTC 2014 Modified Files: src/etc/mtree [netbsd-6]: Makefile Log Message: Pull up following revision(s) (requested by gdt in ticket #1163): etc/mtree/Makefile: revision 1.24 silence is golden To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.4.1 src/etc/mtree/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/mtree/Makefile diff -u src/etc/mtree/Makefile:1.22 src/etc/mtree/Makefile:1.22.4.1 --- src/etc/mtree/Makefile:1.22 Sat Sep 10 17:02:46 2011 +++ src/etc/mtree/Makefile Mon Nov 3 21:17:45 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.22 2011/09/10 17:02:46 apb Exp $ +# $NetBSD: Makefile,v 1.22.4.1 2014/11/03 21:17:45 msaitoh Exp $ .include bsd.own.mk @@ -52,7 +52,7 @@ TOOL_MTREE.unpriv= -W # the Makefile. # emit_dist_file: - cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} + @cat ${.CURDIR}/NetBSD.dist.base ${EXTRA_DIST_FILES} distrib-dirs: .PHONY check_DESTDIR NetBSD.dist .if !defined(DISTRIBUTION_DONE) # {
CVS commit: [netbsd-6] src/lib/libc/stdio
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:22:28 UTC 2014 Modified Files: src/lib/libc/stdio [netbsd-6]: printf.3 vsnprintf.c vsnprintf_ss.c Log Message: Pull up following revision(s) (requested by christos in ticket #1161): lib/libc/stdio/printf.3: revision 1.64 via patch lib/libc/stdio/vsnprintf.c: revision 1.28 via patch lib/libc/stdio/vsnprintf_ss.c: revision 1.13 via patch Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX (well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX). Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX (well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX). To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.58.8.1 src/lib/libc/stdio/printf.3 cvs rdiff -u -r1.23 -r1.23.4.1 src/lib/libc/stdio/vsnprintf.c cvs rdiff -u -r1.10 -r1.10.4.1 src/lib/libc/stdio/vsnprintf_ss.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/printf.3 diff -u src/lib/libc/stdio/printf.3:1.58 src/lib/libc/stdio/printf.3:1.58.8.1 --- src/lib/libc/stdio/printf.3:1.58 Sun Dec 26 12:39:54 2010 +++ src/lib/libc/stdio/printf.3 Mon Nov 3 21:22:28 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: printf.3,v 1.58 2010/12/26 12:39:54 jnemeth Exp $ +.\ $NetBSD: printf.3,v 1.58.8.1 2014/11/03 21:22:28 msaitoh Exp $ .\ .\ Copyright (c) 1990, 1991, 1993 .\ The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\ .\ @(#)printf.3 8.1 (Berkeley) 6/4/93 .\ -.Dd December 26, 2010 +.Dd September 29, 2014 .Dt PRINTF 3 .Os .Sh NAME @@ -793,6 +793,13 @@ family of functions may fail if: An invalid wide-character code was encountered. .It Bq Er ENOMEM Insufficient storage space is available. +.It Bq Er EOVERFLOW +The +.Fa size +argument exceeds +.Dv INT_MAX , +or the return value would be too large to be represented by an +.Vt int . .El .Sh SEE ALSO .Xr printf 1 , Index: src/lib/libc/stdio/vsnprintf.c diff -u src/lib/libc/stdio/vsnprintf.c:1.23 src/lib/libc/stdio/vsnprintf.c:1.23.4.1 --- src/lib/libc/stdio/vsnprintf.c:1.23 Sun Jul 17 20:54:34 2011 +++ src/lib/libc/stdio/vsnprintf.c Mon Nov 3 21:22:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vsnprintf.c,v 1.23 2011/07/17 20:54:34 joerg Exp $ */ +/* $NetBSD: vsnprintf.c,v 1.23.4.1 2014/11/03 21:22:28 msaitoh Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)vsnprintf.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: vsnprintf.c,v 1.23 2011/07/17 20:54:34 joerg Exp $); +__RCSID($NetBSD: vsnprintf.c,v 1.23.4.1 2014/11/03 21:22:28 msaitoh Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -69,9 +69,9 @@ vsnprintf(char *str, size_t n, const cha _DIAGASSERT(n == 0 || str != NULL); _DIAGASSERT(fmt != NULL); - if ((int)n 0) { - errno = EINVAL; - return (-1); + if (n INT_MAX) { + errno = EOVERFLOW; + return -1; } _FILEEXT_SETUP(f, fext); Index: src/lib/libc/stdio/vsnprintf_ss.c diff -u src/lib/libc/stdio/vsnprintf_ss.c:1.10 src/lib/libc/stdio/vsnprintf_ss.c:1.10.4.1 --- src/lib/libc/stdio/vsnprintf_ss.c:1.10 Sun Jul 17 20:54:34 2011 +++ src/lib/libc/stdio/vsnprintf_ss.c Mon Nov 3 21:22:28 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vsnprintf_ss.c,v 1.10 2011/07/17 20:54:34 joerg Exp $ */ +/* $NetBSD: vsnprintf_ss.c,v 1.10.4.1 2014/11/03 21:22:28 msaitoh Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)vsnprintf.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: vsnprintf_ss.c,v 1.10 2011/07/17 20:54:34 joerg Exp $); +__RCSID($NetBSD: vsnprintf_ss.c,v 1.10.4.1 2014/11/03 21:22:28 msaitoh Exp $); #endif #endif /* LIBC_SCCS and not lint */ @@ -143,9 +143,9 @@ vsnprintf_ss(char *sbuf, size_t slen, co _DIAGASSERT(slen == 0 || sbuf != NULL); _DIAGASSERT(fmt0 != NULL); - if ((int)slen 0) { - errno = EINVAL; - return (-1); + if (slen INT_MAX) { + errno = EOVERFLOW; + return -1; } tailp = sbuf + slen;
CVS commit: [netbsd-6] src/usr.sbin/route6d
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:26:34 UTC 2014 Modified Files: src/usr.sbin/route6d [netbsd-6]: route6d.c Log Message: Pull up following revision(s) (requested by gdt in ticket #1164): usr.sbin/route6d/route6d.c: revision 1.67 reenable routing functionality by using RT_ROUNDUP for ROUNDUP when available To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.66.4.1 src/usr.sbin/route6d/route6d.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/route6d/route6d.c diff -u src/usr.sbin/route6d/route6d.c:1.66 src/usr.sbin/route6d/route6d.c:1.66.4.1 --- src/usr.sbin/route6d/route6d.c:1.66 Wed Aug 31 16:24:59 2011 +++ src/usr.sbin/route6d/route6d.c Mon Nov 3 21:26:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: route6d.c,v 1.66 2011/08/31 16:24:59 plunky Exp $ */ +/* $NetBSD: route6d.c,v 1.66.4.1 2014/11/03 21:26:34 msaitoh Exp $ */ /* $KAME: route6d.c,v 1.94 2002/10/26 20:08:55 itojun Exp $ */ /* @@ -32,7 +32,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: route6d.c,v 1.66 2011/08/31 16:24:59 plunky Exp $); +__RCSID($NetBSD: route6d.c,v 1.66.4.1 2014/11/03 21:26:34 msaitoh Exp $); #endif #include stdbool.h @@ -83,8 +83,12 @@ __RCSID($NetBSD: route6d.c,v 1.66 2011/ #endif /* alignment constraint for routing socket */ +#if defined(__NetBSD__) defined(RT_ROUNDUP) +#define ROUNDUP(a) RT_ROUNDUP(a) +#else #define ROUNDUP(a) \ ((a) 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) +#endif #define ADVANCE(x, n) (x += ROUNDUP((n)-sa_len)) /*
CVS commit: [netbsd-6] src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:30:58 UTC 2014 Modified Files: src/crypto/external/bsd/openssh/dist [netbsd-6]: auth.c Log Message: Pull up following revision(s) (requested by christos in ticket #1169): crypto/external/bsd/openssh/dist/auth.c: revision 1.9 for consistency use options.use_dns when getting the canonical hostname. [we do the same below for hosts.allow and deny] reported by rudolf. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.4.1 src/crypto/external/bsd/openssh/dist/auth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/auth.c diff -u src/crypto/external/bsd/openssh/dist/auth.c:1.5 src/crypto/external/bsd/openssh/dist/auth.c:1.5.4.1 --- src/crypto/external/bsd/openssh/dist/auth.c:1.5 Wed Sep 7 17:49:19 2011 +++ src/crypto/external/bsd/openssh/dist/auth.c Mon Nov 3 21:30:58 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: auth.c,v 1.5 2011/09/07 17:49:19 christos Exp $ */ +/* $NetBSD: auth.c,v 1.5.4.1 2014/11/03 21:30:58 msaitoh Exp $ */ /* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -25,7 +25,7 @@ */ #include includes.h -__RCSID($NetBSD: auth.c,v 1.5 2011/09/07 17:49:19 christos Exp $); +__RCSID($NetBSD: auth.c,v 1.5.4.1 2014/11/03 21:30:58 msaitoh Exp $); #include sys/types.h #include sys/stat.h #include sys/param.h @@ -99,7 +99,7 @@ allowed_user(struct passwd * pw) return 0; #ifdef HAVE_LOGIN_CAP - hostname = get_canonical_hostname(1); + hostname = get_canonical_hostname(options.use_dns); ipaddr = get_remote_ipaddr(); lc = login_getclass(pw-pw_class);
CVS commit: [netbsd-6-0] src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:31:54 UTC 2014 Modified Files: src/crypto/external/bsd/openssh/dist [netbsd-6-0]: auth.c Log Message: Pull up following revision(s) (requested by christos in ticket #1169): crypto/external/bsd/openssh/dist/auth.c: revision 1.9 for consistency use options.use_dns when getting the canonical hostname. [we do the same below for hosts.allow and deny] reported by rudolf. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.10.1 src/crypto/external/bsd/openssh/dist/auth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/auth.c diff -u src/crypto/external/bsd/openssh/dist/auth.c:1.5 src/crypto/external/bsd/openssh/dist/auth.c:1.5.10.1 --- src/crypto/external/bsd/openssh/dist/auth.c:1.5 Wed Sep 7 17:49:19 2011 +++ src/crypto/external/bsd/openssh/dist/auth.c Mon Nov 3 21:31:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: auth.c,v 1.5 2011/09/07 17:49:19 christos Exp $ */ +/* $NetBSD: auth.c,v 1.5.10.1 2014/11/03 21:31:54 msaitoh Exp $ */ /* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -25,7 +25,7 @@ */ #include includes.h -__RCSID($NetBSD: auth.c,v 1.5 2011/09/07 17:49:19 christos Exp $); +__RCSID($NetBSD: auth.c,v 1.5.10.1 2014/11/03 21:31:54 msaitoh Exp $); #include sys/types.h #include sys/stat.h #include sys/param.h @@ -99,7 +99,7 @@ allowed_user(struct passwd * pw) return 0; #ifdef HAVE_LOGIN_CAP - hostname = get_canonical_hostname(1); + hostname = get_canonical_hostname(options.use_dns); ipaddr = get_remote_ipaddr(); lc = login_getclass(pw-pw_class);
CVS commit: [netbsd-6-1] src/crypto/external/bsd/openssh/dist
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:31:39 UTC 2014 Modified Files: src/crypto/external/bsd/openssh/dist [netbsd-6-1]: auth.c Log Message: Pull up following revision(s) (requested by christos in ticket #1169): crypto/external/bsd/openssh/dist/auth.c: revision 1.9 for consistency use options.use_dns when getting the canonical hostname. [we do the same below for hosts.allow and deny] reported by rudolf. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.5.12.1 src/crypto/external/bsd/openssh/dist/auth.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/openssh/dist/auth.c diff -u src/crypto/external/bsd/openssh/dist/auth.c:1.5 src/crypto/external/bsd/openssh/dist/auth.c:1.5.12.1 --- src/crypto/external/bsd/openssh/dist/auth.c:1.5 Wed Sep 7 17:49:19 2011 +++ src/crypto/external/bsd/openssh/dist/auth.c Mon Nov 3 21:31:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: auth.c,v 1.5 2011/09/07 17:49:19 christos Exp $ */ +/* $NetBSD: auth.c,v 1.5.12.1 2014/11/03 21:31:39 msaitoh Exp $ */ /* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -25,7 +25,7 @@ */ #include includes.h -__RCSID($NetBSD: auth.c,v 1.5 2011/09/07 17:49:19 christos Exp $); +__RCSID($NetBSD: auth.c,v 1.5.12.1 2014/11/03 21:31:39 msaitoh Exp $); #include sys/types.h #include sys/stat.h #include sys/param.h @@ -99,7 +99,7 @@ allowed_user(struct passwd * pw) return 0; #ifdef HAVE_LOGIN_CAP - hostname = get_canonical_hostname(1); + hostname = get_canonical_hostname(options.use_dns); ipaddr = get_remote_ipaddr(); lc = login_getclass(pw-pw_class);
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:35:25 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1156-1157, 1163-1164 and 1169. To generate a diff of this commit: cvs rdiff -u -r1.1.2.146 -r1.1.2.147 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.146 src/doc/CHANGES-6.2:1.1.2.147 --- src/doc/CHANGES-6.2:1.1.2.146 Mon Nov 3 20:01:51 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 21:35:25 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.146 2014/11/03 20:01:51 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.147 2014/11/03 21:35:25 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4107,3 +4107,51 @@ sys/fs/puffs/puffs_vnops.c 1.186 - Make read/write nilpotent when called with null size, as FFS does - Return EFBIG instead of EINVAL for negative offsets, as FFS does [manu, ticket #1152] + +sbin/ifconfig/ifconfig.8 1.108 +sbin/ifconfig/vlan.c1.14 +sys/net/if_vlan.c1.71, 1.73-1.74 + + - PR#49112: Restore vlan_ioctl overwritten by ether_ifdetach in + vlan_unconfig. + - PR#49114: Write about -vlanif in ifconfig.8. + Add -vlanif to the help message of ifconfig. + - PR#49196: Leave promiscuous mode when detaching a parent + (ifconfig -vlanif). We have to call ifpromisc(ifp, 0) for both a VLAN + interface and its parent when they are in promiscuous mode. + - PR#49197: Delete link local addresses of a vlan interface when + detaching its parent. + [ozaki-r, ticket #1156] + +external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h 1.2 + + Kill the throw() on a forward declaration for posix_memalign (it does + not match our base declaration and may cause warnings). + Fixes PR#49199. + [joerg, ticket #1157] + +etc/mtree/Makefile1.24 + + Avoid echoing a make command when running postinstall with a source + directory. + [gdt, ticket #1163] + +lib/libc/stdio/printf.31.64 via patch +lib/libc/stdio/vsnprintf.c 1.28 via patch +lib/libc/stdio/vsnprintf_ss.c 1.13 via patch + + Return EOVERFLOW like FreeBSD does if the buffer size exceeds INT_MAX + (well FreeBSD documents INT_MAX + 1, but in the code it is INT_MAX). + [christos, ticket #1161] + +usr.sbin/route6d/route6d.c 1.67 + + Use system RT_ROUNDUP for correct alignment. + [gdt, ticket #1164] + +crypto/external/bsd/openssh/dist/auth.c 1.9 + + For consistency use options.use_dns when getting the canonical + hostname. [we do the same below for hosts.allow and deny] + Reported by rudolf. + [christos, ticket #1169]
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:37:38 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket 1169. To generate a diff of this commit: cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.6 src/doc/CHANGES-6.1.6:1.1.2.7 --- src/doc/CHANGES-6.1.6:1.1.2.6 Mon Nov 3 16:33:47 2014 +++ src/doc/CHANGES-6.1.6 Mon Nov 3 21:37:38 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.6 2014/11/03 16:33:47 msaitoh Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.7 2014/11/03 21:37:38 msaitoh Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -149,3 +149,10 @@ sys/arch/sun3/dev/fd.c1.78 Fix unexpected memory corruption on opening fd(4). [tsutsui, ticket #1139] + +crypto/external/bsd/openssh/dist/auth.c 1.9 + + For consistency use options.use_dns when getting the canonical + hostname. [we do the same below for hosts.allow and deny] + Reported by rudolf. + [christos, ticket #1169]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 21:38:00 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket 1169. To generate a diff of this commit: cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.6 src/doc/CHANGES-6.0.7:1.1.2.7 --- src/doc/CHANGES-6.0.7:1.1.2.6 Mon Nov 3 16:34:08 2014 +++ src/doc/CHANGES-6.0.7 Mon Nov 3 21:38:00 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.6 2014/11/03 16:34:08 msaitoh Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.7 2014/11/03 21:38:00 msaitoh Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -149,3 +149,10 @@ sys/arch/sun3/dev/fd.c1.78 Fix unexpected memory corruption on opening fd(4). [tsutsui, ticket #1139] + +crypto/external/bsd/openssh/dist/auth.c 1.9 + + For consistency use options.use_dns when getting the canonical + hostname. [we do the same below for hosts.allow and deny] + Reported by rudolf. + [christos, ticket #1169]
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Mon Nov 3 21:48:49 UTC 2014 Modified Files: othersrc/usr.bin/tnftp: ChangeLog NEWS configure.ac Log Message: release tnftp 20141104: * Portability fixes. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 othersrc/usr.bin/tnftp/ChangeLog cvs rdiff -u -r1.10 -r1.11 othersrc/usr.bin/tnftp/NEWS cvs rdiff -u -r1.28 -r1.29 othersrc/usr.bin/tnftp/configure.ac Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/ChangeLog diff -u othersrc/usr.bin/tnftp/ChangeLog:1.65 othersrc/usr.bin/tnftp/ChangeLog:1.66 --- othersrc/usr.bin/tnftp/ChangeLog:1.65 Fri Oct 31 08:32:52 2014 +++ othersrc/usr.bin/tnftp/ChangeLog Mon Nov 3 21:48:49 2014 @@ -1,6 +1,10 @@ -$NetBSD: ChangeLog,v 1.65 2014/10/31 08:32:52 lukem Exp $ +$NetBSD: ChangeLog,v 1.66 2014/11/03 21:48:49 lukem Exp $ +Mon Nov 3 21:43:20 UTC 2014 lukem + + * Release as tnftp 20141104. + Fri Oct 31 08:32:28 UTC 2014 lukem * Use '=' not '==' with test in configure. Index: othersrc/usr.bin/tnftp/NEWS diff -u othersrc/usr.bin/tnftp/NEWS:1.10 othersrc/usr.bin/tnftp/NEWS:1.11 --- othersrc/usr.bin/tnftp/NEWS:1.10 Fri Oct 31 04:06:54 2014 +++ othersrc/usr.bin/tnftp/NEWS Mon Nov 3 21:48:49 2014 @@ -1,6 +1,10 @@ -$NetBSD: NEWS,v 1.10 2014/10/31 04:06:54 lukem Exp $ +$NetBSD: NEWS,v 1.11 2014/11/03 21:48:49 lukem Exp $ -This is tnftp version 20141031. +This is tnftp version 20141104. + +Changes in tnftp from 20141031 to 20141104: + + Portability fixes. Changes in tnftp from 20130505 to 20141031: Index: othersrc/usr.bin/tnftp/configure.ac diff -u othersrc/usr.bin/tnftp/configure.ac:1.28 othersrc/usr.bin/tnftp/configure.ac:1.29 --- othersrc/usr.bin/tnftp/configure.ac:1.28 Fri Oct 31 08:31:52 2014 +++ othersrc/usr.bin/tnftp/configure.ac Mon Nov 3 21:48:49 2014 @@ -1,15 +1,15 @@ -# $NetBSD: configure.ac,v 1.28 2014/10/31 08:31:52 lukem Exp $ +# $NetBSD: configure.ac,v 1.29 2014/11/03 21:48:49 lukem Exp $ # # Process this file with autoconf to produce a configure script. -AC_INIT([tnftp], [20141031], [lu...@netbsd.org]) +AC_INIT([tnftp], [20141104], [lu...@netbsd.org]) AC_PREREQ([2.69]) AC_COPYRIGHT([ Copyright (c) 1999-2014 The NetBSD Foundation, Inc. All rights reserved. ]) -AC_REVISION([$Revision: 1.28 $]) +AC_REVISION([$Revision: 1.29 $]) AS_SHELL_SANITIZE()
CVS commit: othersrc/usr.bin/tnftp
Module Name:othersrc Committed By: lukem Date: Mon Nov 3 21:50:28 UTC 2014 Modified Files: othersrc/usr.bin/tnftp: configure Log Message: regen for tnftp 20141104. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 othersrc/usr.bin/tnftp/configure Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: othersrc/usr.bin/tnftp/configure diff -u othersrc/usr.bin/tnftp/configure:1.43 othersrc/usr.bin/tnftp/configure:1.44 --- othersrc/usr.bin/tnftp/configure:1.43 Fri Oct 31 08:39:10 2014 +++ othersrc/usr.bin/tnftp/configure Mon Nov 3 21:50:27 2014 @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac Revision: 1.28 . +# From configure.ac Revision: 1.29 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for tnftp 20141031. +# Generated by GNU Autoconf 2.69 for tnftp 20141104. # # Report bugs to lu...@netbsd.org. # @@ -596,8 +596,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tnftp' PACKAGE_TARNAME='tnftp' -PACKAGE_VERSION='20141031' -PACKAGE_STRING='tnftp 20141031' +PACKAGE_VERSION='20141104' +PACKAGE_STRING='tnftp 20141104' PACKAGE_BUGREPORT='lu...@netbsd.org' PACKAGE_URL='' @@ -1333,7 +1333,7 @@ if test $ac_init_help = long; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat _ACEOF -\`configure' configures tnftp 20141031 to adapt to many kinds of systems. +\`configure' configures tnftp 20141104 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1403,7 +1403,7 @@ fi if test -n $ac_init_help; then case $ac_init_help in - short | recursive ) echo Configuration of tnftp 20141031:;; + short | recursive ) echo Configuration of tnftp 20141104:;; esac cat \_ACEOF @@ -1518,7 +1518,7 @@ fi test -n $ac_init_help exit $ac_status if $ac_init_version; then cat \_ACEOF -tnftp configure 20141031 +tnftp configure 20141104 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2103,7 +2103,7 @@ cat config.log _ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tnftp $as_me 20141031, which was +It was created by tnftp $as_me 20141104, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3067,7 +3067,7 @@ fi # Define the identity of the package. PACKAGE='tnftp' - VERSION='20141031' + VERSION='20141104' cat confdefs.h _ACEOF @@ -15275,7 +15275,7 @@ cat $CONFIG_STATUS \_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log= -This file was extended by tnftp $as_me 20141031, which was +This file was extended by tnftp $as_me 20141104, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES= $CONFIG_FILES @@ -15341,7 +15341,7 @@ _ACEOF cat $CONFIG_STATUS _ACEOF || ac_write_fail=1 ac_cs_config=`$as_echo $ac_configure_args | sed 's/^ //; s/[\\\`\$]//g'` ac_cs_version=\\ -tnftp config.status 20141031 +tnftp config.status 20141104 configured by $0, generated by GNU Autoconf 2.69, with options \\\$ac_cs_config\\
CVS commit: [netbsd-6] src
Module Name:src Committed By: msaitoh Date: Mon Nov 3 22:05:37 UTC 2014 Modified Files: src/share/man/man4 [netbsd-6]: bio.4 mpt.4 src/sys/dev/ic [netbsd-6]: mpt.c mpt.h mpt_netbsd.c Log Message: Pull up following revision(s) (requested by jmcneill in ticket #1160): sys/dev/ic/mpt_netbsd.c: revision 1.26-1.31 sys/dev/ic/mpt.c: revision 1.17 share/man/man4/bio.4: revision 1.12 share/man/man4/mpt.4: revision 1.6 sys/dev/ic/mpt.h: revision 1.8 - Add bio(4) support. - xref mpt(4) in bio(4). - xref bio(4) in mpt(4). - show sd0 instead of mpt0 for volume device name - include vendor/product/rev info for volumes and their disks. - for BIOCDISK_NOVOL, set bd_disknovol=true for any disk not associated with a volume for BIOCDISK_NOVOL, when setting bd_disknovol=false, also set bv_volid To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.10.1 src/share/man/man4/bio.4 cvs rdiff -u -r1.5 -r1.5.10.1 src/share/man/man4/mpt.4 cvs rdiff -u -r1.15 -r1.15.10.1 src/sys/dev/ic/mpt.c cvs rdiff -u -r1.7 -r1.7.14.1 src/sys/dev/ic/mpt.h cvs rdiff -u -r1.17.2.1 -r1.17.2.2 src/sys/dev/ic/mpt_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/share/man/man4/bio.4 diff -u src/share/man/man4/bio.4:1.9 src/share/man/man4/bio.4:1.9.10.1 --- src/share/man/man4/bio.4:1.9 Mon May 18 14:07:09 2009 +++ src/share/man/man4/bio.4 Mon Nov 3 22:05:37 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: bio.4,v 1.9 2009/05/18 14:07:09 wiz Exp $ +.\ $NetBSD: bio.4,v 1.9.10.1 2014/11/03 22:05:37 msaitoh Exp $ .\ $OpenBSD: bio.4,v 1.19 2006/09/20 22:22:37 jmc Exp $ .\ .\ Copyright (c) 2002 Niklas Hallqvist @@ -28,7 +28,7 @@ .\ ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd May 25, 2008 +.Dd Sep 27, 2014 .Dt BIO 4 .Os .Sh NAME @@ -67,6 +67,8 @@ Compaq RAID array controller Compaq Smart ARRAY 5/6 SAS/SATA/SCSI RAID controller .It Xr mfi 4 LSI Logic \*[Am] Dell MegaRAID SAS RAID controller +.It Xr mpt 4 +LSI Fusion-MPT RAID controller .El .Pp The following ioctl calls apply to the Index: src/share/man/man4/mpt.4 diff -u src/share/man/man4/mpt.4:1.5 src/share/man/man4/mpt.4:1.5.10.1 --- src/share/man/man4/mpt.4:1.5 Tue Feb 16 10:11:47 2010 +++ src/share/man/man4/mpt.4 Mon Nov 3 22:05:37 2014 @@ -1,4 +1,4 @@ -.\ $NetBSD: mpt.4,v 1.5 2010/02/16 10:11:47 msaitoh Exp $ +.\ $NetBSD: mpt.4,v 1.5.10.1 2014/11/03 22:05:37 msaitoh Exp $ .\ .\ Copyright (c) 2003 Wasabi Systems, Inc. .\ All rights reserved. @@ -33,7 +33,7 @@ .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\ POSSIBILITY OF SUCH DAMAGE. .\ -.Dd February 16, 2009 +.Dd Sep 27, 2014 .Dt MPT 4 .Os .Sh NAME @@ -84,6 +84,7 @@ FC929X .Pq Dual 2Gb/s Tn Fibre Channel, PCI-X .El .Sh SEE ALSO +.Xr bio 4 , .Xr cd 4 , .Xr ch 4 , .Xr intro 4 , Index: src/sys/dev/ic/mpt.c diff -u src/sys/dev/ic/mpt.c:1.15 src/sys/dev/ic/mpt.c:1.15.10.1 --- src/sys/dev/ic/mpt.c:1.15 Tue May 24 10:08:03 2011 +++ src/sys/dev/ic/mpt.c Mon Nov 3 22:05:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt.c,v 1.15 2011/05/24 10:08:03 mrg Exp $ */ +/* $NetBSD: mpt.c,v 1.15.10.1 2014/11/03 22:05:37 msaitoh Exp $ */ /* * Copyright (c) 2000, 2001 by Greg Ansley @@ -110,7 +110,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mpt.c,v 1.15 2011/05/24 10:08:03 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: mpt.c,v 1.15.10.1 2014/11/03 22:05:37 msaitoh Exp $); #include dev/ic/mpt.h @@ -565,10 +565,7 @@ mpt_send_ioc_init(mpt_softc_t *mpt, u_in * Utiltity routine to read configuration headers and pages */ -static int -mpt_read_cfg_header(mpt_softc_t *, int, int, int, fCONFIG_PAGE_HEADER *); - -static int +int mpt_read_cfg_header(mpt_softc_t *mpt, int PageType, int PageNumber, int PageAddress, fCONFIG_PAGE_HEADER *rslt) { @@ -1516,4 +1513,10 @@ mpt2host_config_page_raid_phys_disk_0(fC MPT_2_HOST16(rpd0, ErrorData.SmartCount); } +void +mpt2host_config_page_ioc_2(fCONFIG_PAGE_IOC_2 *ioc2) +{ + MPT_2_HOST32(ioc2, CapabilitiesFlags); +} + #endif Index: src/sys/dev/ic/mpt.h diff -u src/sys/dev/ic/mpt.h:1.7 src/sys/dev/ic/mpt.h:1.7.14.1 --- src/sys/dev/ic/mpt.h:1.7 Wed Apr 28 22:45:27 2010 +++ src/sys/dev/ic/mpt.h Mon Nov 3 22:05:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mpt.h,v 1.7 2010/04/28 22:45:27 chs Exp $ */ +/* $NetBSD: mpt.h,v 1.7.14.1 2014/11/03 22:05:37 msaitoh Exp $ */ /* * Copyright (c) 2000, 2001 by Greg Ansley @@ -173,6 +173,7 @@ void mpt_free_request(mpt_softc_t *, req int mpt_intr(void *); void mpt_check_doorbell(mpt_softc_t *); +int mpt_read_cfg_header(mpt_softc_t *, int, int, int, fCONFIG_PAGE_HEADER *); int mpt_read_cfg_page(mpt_softc_t *, int, fCONFIG_PAGE_HEADER *); int mpt_write_cfg_page(mpt_softc_t *, int, fCONFIG_PAGE_HEADER *); @@ -212,6 +213,8 @@ void mpt2host_config_page_fc_port_1(fCON void
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 22:09:32 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1160. To generate a diff of this commit: cvs rdiff -u -r1.1.2.147 -r1.1.2.148 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.147 src/doc/CHANGES-6.2:1.1.2.148 --- src/doc/CHANGES-6.2:1.1.2.147 Mon Nov 3 21:35:25 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 22:09:32 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.147 2014/11/03 21:35:25 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.148 2014/11/03 22:09:32 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4155,3 +4155,19 @@ crypto/external/bsd/openssh/dist/auth.c hostname. [we do the same below for hosts.allow and deny] Reported by rudolf. [christos, ticket #1169] + +sys/dev/ic/mpt_netbsd.c1.26-1.31 +sys/dev/ic/mpt.c1.17 +share/man/man4/bio.41.12 +share/man/man4/mpt.41.6 +sys/dev/ic/mpt.h1.8 + + - Add bio(4) support into mpt(4). + - xref mpt(4) in bio(4). + - xref bio(4) in mpt(4). + - show sd0 instead of mpt0 for volume device name + - include vendor/product/rev info for volumes and their disks. + - for BIOCDISK_NOVOL, set bd_disknovol=true for any disk not + associated with a volume for BIOCDISK_NOVOL, when setting + bd_disknovol=false, also set bv_volid. + [jmcneill, ticket #1160]
CVS commit: [netbsd-6] src/sys/netinet
Module Name:src Committed By: msaitoh Date: Mon Nov 3 23:05:45 UTC 2014 Modified Files: src/sys/netinet [netbsd-6]: tcp_output.c Log Message: Pull up following revision(s) (requested by christos in ticket #1174): sys/netinet/tcp_output.c: revision 1.178 Avoid stack overflow when SACK and TCP_SIGNATURE are both present. Thanks to Jonathan Looney for pointing this out. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.173.2.1 src/sys/netinet/tcp_output.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/netinet/tcp_output.c diff -u src/sys/netinet/tcp_output.c:1.173 src/sys/netinet/tcp_output.c:1.173.2.1 --- src/sys/netinet/tcp_output.c:1.173 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet/tcp_output.c Mon Nov 3 23:05:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.173 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: tcp_output.c,v 1.173.2.1 2014/11/03 23:05:45 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -135,7 +135,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173 2011/12/31 20:41:59 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.2.1 2014/11/03 23:05:45 msaitoh Exp $); #include opt_inet.h #include opt_ipsec.h @@ -561,6 +561,7 @@ tcp_output(struct tcpcb *tp) #endif struct tcphdr *th; u_char opt[MAX_TCPOPTLEN]; +#define OPT_FITS(more) ((optlen + (more)) sizeof(opt)) unsigned optlen, hdrlen, packetlen; unsigned int sack_numblks; int idle, sendalot, txsegsize, rxsegsize; @@ -1127,7 +1128,7 @@ send: tp-snd_nxt = tp-iss; tp-t_ourmss = tcp_mss_to_advertise(synrt != NULL ? synrt-rt_ifp : NULL, af); - if ((tp-t_flags TF_NOOPT) == 0) { + if ((tp-t_flags TF_NOOPT) == 0 OPT_FITS(4)) { opt[0] = TCPOPT_MAXSEG; opt[1] = 4; opt[2] = (tp-t_ourmss 8) 0xff; @@ -1136,7 +1137,8 @@ send: if ((tp-t_flags TF_REQ_SCALE) ((flags TH_ACK) == 0 || - (tp-t_flags TF_RCVD_SCALE))) { + (tp-t_flags TF_RCVD_SCALE)) + OPT_FITS(4)) { *((u_int32_t *) (opt + optlen)) = htonl( TCPOPT_NOP 24 | TCPOPT_WINDOW 16 | @@ -1144,7 +1146,7 @@ send: tp-request_r_scale); optlen += 4; } - if (tcp_do_sack) { + if (tcp_do_sack OPT_FITS(4)) { u_int8_t *cp = (u_int8_t *)(opt + optlen); cp[0] = TCPOPT_SACK_PERMITTED; @@ -1164,7 +1166,7 @@ send: if ((tp-t_flags (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP (flags TH_RST) == 0 ((flags (TH_SYN|TH_ACK)) == TH_SYN || - (tp-t_flags TF_RCVD_TSTMP))) { + (tp-t_flags TF_RCVD_TSTMP)) OPT_FITS(TCPOLEN_TSTAMP_APPA)) { u_int32_t *lp = (u_int32_t *)(opt + optlen); /* Form timestamp option as shown in appendix A of RFC 1323. */ @@ -1188,30 +1190,33 @@ send: struct ipqent *tiqe; sack_len = sack_numblks * 8 + 2; - bp[0] = TCPOPT_NOP; - bp[1] = TCPOPT_NOP; - bp[2] = TCPOPT_SACK; - bp[3] = sack_len; - if ((tp-rcv_sack_flags TCPSACK_HAVED) != 0) { - sack_numblks--; - *lp++ = htonl(tp-rcv_dsack_block.left); - *lp++ = htonl(tp-rcv_dsack_block.right); - tp-rcv_sack_flags = ~TCPSACK_HAVED; - } - for (tiqe = TAILQ_FIRST(tp-timeq); - sack_numblks 0; tiqe = TAILQ_NEXT(tiqe, ipqe_timeq)) { - KASSERT(tiqe != NULL); - sack_numblks--; - *lp++ = htonl(tiqe-ipqe_seq); - *lp++ = htonl(tiqe-ipqe_seq + tiqe-ipqe_len + - ((tiqe-ipqe_flags TH_FIN) != 0 ? 1 : 0)); + if (OPT_FITS(sack_len + 2)) { + bp[0] = TCPOPT_NOP; + bp[1] = TCPOPT_NOP; + bp[2] = TCPOPT_SACK; + bp[3] = sack_len; + if ((tp-rcv_sack_flags TCPSACK_HAVED) != 0) { +sack_numblks--; +*lp++ = htonl(tp-rcv_dsack_block.left); +*lp++ = htonl(tp-rcv_dsack_block.right); +tp-rcv_sack_flags = ~TCPSACK_HAVED; + } + for (tiqe = TAILQ_FIRST(tp-timeq); + sack_numblks 0; + tiqe = TAILQ_NEXT(tiqe, ipqe_timeq)) { +KASSERT(tiqe != NULL); +sack_numblks--; +*lp++ = htonl(tiqe-ipqe_seq); +*lp++ = htonl(tiqe-ipqe_seq + tiqe-ipqe_len + +((tiqe-ipqe_flags TH_FIN) != 0 ? 1 : 0)); + } + optlen += sack_len + 2; } - optlen += sack_len + 2; } TCP_REASS_UNLOCK(tp); #ifdef TCP_SIGNATURE - if (tp-t_flags TF_SIGNATURE) { + if ((tp-t_flags TF_SIGNATURE) OPT_FITS(TCPOLEN_SIGNATURE + 2)) { u_char *bp; /* * Initialize TCP-MD5 option (RFC2385)
CVS commit: [netbsd-6-1] src/sys/netinet
Module Name:src Committed By: msaitoh Date: Mon Nov 3 23:05:59 UTC 2014 Modified Files: src/sys/netinet [netbsd-6-1]: tcp_output.c Log Message: Pull up following revision(s) (requested by christos in ticket #1174): sys/netinet/tcp_output.c: revision 1.178 Avoid stack overflow when SACK and TCP_SIGNATURE are both present. Thanks to Jonathan Looney for pointing this out. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.173.8.1 src/sys/netinet/tcp_output.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/netinet/tcp_output.c diff -u src/sys/netinet/tcp_output.c:1.173 src/sys/netinet/tcp_output.c:1.173.8.1 --- src/sys/netinet/tcp_output.c:1.173 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet/tcp_output.c Mon Nov 3 23:05:59 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.173 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: tcp_output.c,v 1.173.8.1 2014/11/03 23:05:59 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -135,7 +135,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173 2011/12/31 20:41:59 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.8.1 2014/11/03 23:05:59 msaitoh Exp $); #include opt_inet.h #include opt_ipsec.h @@ -561,6 +561,7 @@ tcp_output(struct tcpcb *tp) #endif struct tcphdr *th; u_char opt[MAX_TCPOPTLEN]; +#define OPT_FITS(more) ((optlen + (more)) sizeof(opt)) unsigned optlen, hdrlen, packetlen; unsigned int sack_numblks; int idle, sendalot, txsegsize, rxsegsize; @@ -1127,7 +1128,7 @@ send: tp-snd_nxt = tp-iss; tp-t_ourmss = tcp_mss_to_advertise(synrt != NULL ? synrt-rt_ifp : NULL, af); - if ((tp-t_flags TF_NOOPT) == 0) { + if ((tp-t_flags TF_NOOPT) == 0 OPT_FITS(4)) { opt[0] = TCPOPT_MAXSEG; opt[1] = 4; opt[2] = (tp-t_ourmss 8) 0xff; @@ -1136,7 +1137,8 @@ send: if ((tp-t_flags TF_REQ_SCALE) ((flags TH_ACK) == 0 || - (tp-t_flags TF_RCVD_SCALE))) { + (tp-t_flags TF_RCVD_SCALE)) + OPT_FITS(4)) { *((u_int32_t *) (opt + optlen)) = htonl( TCPOPT_NOP 24 | TCPOPT_WINDOW 16 | @@ -1144,7 +1146,7 @@ send: tp-request_r_scale); optlen += 4; } - if (tcp_do_sack) { + if (tcp_do_sack OPT_FITS(4)) { u_int8_t *cp = (u_int8_t *)(opt + optlen); cp[0] = TCPOPT_SACK_PERMITTED; @@ -1164,7 +1166,7 @@ send: if ((tp-t_flags (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP (flags TH_RST) == 0 ((flags (TH_SYN|TH_ACK)) == TH_SYN || - (tp-t_flags TF_RCVD_TSTMP))) { + (tp-t_flags TF_RCVD_TSTMP)) OPT_FITS(TCPOLEN_TSTAMP_APPA)) { u_int32_t *lp = (u_int32_t *)(opt + optlen); /* Form timestamp option as shown in appendix A of RFC 1323. */ @@ -1188,30 +1190,33 @@ send: struct ipqent *tiqe; sack_len = sack_numblks * 8 + 2; - bp[0] = TCPOPT_NOP; - bp[1] = TCPOPT_NOP; - bp[2] = TCPOPT_SACK; - bp[3] = sack_len; - if ((tp-rcv_sack_flags TCPSACK_HAVED) != 0) { - sack_numblks--; - *lp++ = htonl(tp-rcv_dsack_block.left); - *lp++ = htonl(tp-rcv_dsack_block.right); - tp-rcv_sack_flags = ~TCPSACK_HAVED; - } - for (tiqe = TAILQ_FIRST(tp-timeq); - sack_numblks 0; tiqe = TAILQ_NEXT(tiqe, ipqe_timeq)) { - KASSERT(tiqe != NULL); - sack_numblks--; - *lp++ = htonl(tiqe-ipqe_seq); - *lp++ = htonl(tiqe-ipqe_seq + tiqe-ipqe_len + - ((tiqe-ipqe_flags TH_FIN) != 0 ? 1 : 0)); + if (OPT_FITS(sack_len + 2)) { + bp[0] = TCPOPT_NOP; + bp[1] = TCPOPT_NOP; + bp[2] = TCPOPT_SACK; + bp[3] = sack_len; + if ((tp-rcv_sack_flags TCPSACK_HAVED) != 0) { +sack_numblks--; +*lp++ = htonl(tp-rcv_dsack_block.left); +*lp++ = htonl(tp-rcv_dsack_block.right); +tp-rcv_sack_flags = ~TCPSACK_HAVED; + } + for (tiqe = TAILQ_FIRST(tp-timeq); + sack_numblks 0; + tiqe = TAILQ_NEXT(tiqe, ipqe_timeq)) { +KASSERT(tiqe != NULL); +sack_numblks--; +*lp++ = htonl(tiqe-ipqe_seq); +*lp++ = htonl(tiqe-ipqe_seq + tiqe-ipqe_len + +((tiqe-ipqe_flags TH_FIN) != 0 ? 1 : 0)); + } + optlen += sack_len + 2; } - optlen += sack_len + 2; } TCP_REASS_UNLOCK(tp); #ifdef TCP_SIGNATURE - if (tp-t_flags TF_SIGNATURE) { + if ((tp-t_flags TF_SIGNATURE) OPT_FITS(TCPOLEN_SIGNATURE + 2)) { u_char *bp; /* * Initialize TCP-MD5 option (RFC2385)
CVS commit: [netbsd-6-0] src/sys/netinet
Module Name:src Committed By: msaitoh Date: Mon Nov 3 23:06:13 UTC 2014 Modified Files: src/sys/netinet [netbsd-6-0]: tcp_output.c Log Message: Pull up following revision(s) (requested by christos in ticket #1174): sys/netinet/tcp_output.c: revision 1.178 Avoid stack overflow when SACK and TCP_SIGNATURE are both present. Thanks to Jonathan Looney for pointing this out. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.173.6.1 src/sys/netinet/tcp_output.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/netinet/tcp_output.c diff -u src/sys/netinet/tcp_output.c:1.173 src/sys/netinet/tcp_output.c:1.173.6.1 --- src/sys/netinet/tcp_output.c:1.173 Sat Dec 31 20:41:59 2011 +++ src/sys/netinet/tcp_output.c Mon Nov 3 23:06:13 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.173 2011/12/31 20:41:59 christos Exp $ */ +/* $NetBSD: tcp_output.c,v 1.173.6.1 2014/11/03 23:06:13 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -135,7 +135,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173 2011/12/31 20:41:59 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.173.6.1 2014/11/03 23:06:13 msaitoh Exp $); #include opt_inet.h #include opt_ipsec.h @@ -561,6 +561,7 @@ tcp_output(struct tcpcb *tp) #endif struct tcphdr *th; u_char opt[MAX_TCPOPTLEN]; +#define OPT_FITS(more) ((optlen + (more)) sizeof(opt)) unsigned optlen, hdrlen, packetlen; unsigned int sack_numblks; int idle, sendalot, txsegsize, rxsegsize; @@ -1127,7 +1128,7 @@ send: tp-snd_nxt = tp-iss; tp-t_ourmss = tcp_mss_to_advertise(synrt != NULL ? synrt-rt_ifp : NULL, af); - if ((tp-t_flags TF_NOOPT) == 0) { + if ((tp-t_flags TF_NOOPT) == 0 OPT_FITS(4)) { opt[0] = TCPOPT_MAXSEG; opt[1] = 4; opt[2] = (tp-t_ourmss 8) 0xff; @@ -1136,7 +1137,8 @@ send: if ((tp-t_flags TF_REQ_SCALE) ((flags TH_ACK) == 0 || - (tp-t_flags TF_RCVD_SCALE))) { + (tp-t_flags TF_RCVD_SCALE)) + OPT_FITS(4)) { *((u_int32_t *) (opt + optlen)) = htonl( TCPOPT_NOP 24 | TCPOPT_WINDOW 16 | @@ -1144,7 +1146,7 @@ send: tp-request_r_scale); optlen += 4; } - if (tcp_do_sack) { + if (tcp_do_sack OPT_FITS(4)) { u_int8_t *cp = (u_int8_t *)(opt + optlen); cp[0] = TCPOPT_SACK_PERMITTED; @@ -1164,7 +1166,7 @@ send: if ((tp-t_flags (TF_REQ_TSTMP|TF_NOOPT)) == TF_REQ_TSTMP (flags TH_RST) == 0 ((flags (TH_SYN|TH_ACK)) == TH_SYN || - (tp-t_flags TF_RCVD_TSTMP))) { + (tp-t_flags TF_RCVD_TSTMP)) OPT_FITS(TCPOLEN_TSTAMP_APPA)) { u_int32_t *lp = (u_int32_t *)(opt + optlen); /* Form timestamp option as shown in appendix A of RFC 1323. */ @@ -1188,30 +1190,33 @@ send: struct ipqent *tiqe; sack_len = sack_numblks * 8 + 2; - bp[0] = TCPOPT_NOP; - bp[1] = TCPOPT_NOP; - bp[2] = TCPOPT_SACK; - bp[3] = sack_len; - if ((tp-rcv_sack_flags TCPSACK_HAVED) != 0) { - sack_numblks--; - *lp++ = htonl(tp-rcv_dsack_block.left); - *lp++ = htonl(tp-rcv_dsack_block.right); - tp-rcv_sack_flags = ~TCPSACK_HAVED; - } - for (tiqe = TAILQ_FIRST(tp-timeq); - sack_numblks 0; tiqe = TAILQ_NEXT(tiqe, ipqe_timeq)) { - KASSERT(tiqe != NULL); - sack_numblks--; - *lp++ = htonl(tiqe-ipqe_seq); - *lp++ = htonl(tiqe-ipqe_seq + tiqe-ipqe_len + - ((tiqe-ipqe_flags TH_FIN) != 0 ? 1 : 0)); + if (OPT_FITS(sack_len + 2)) { + bp[0] = TCPOPT_NOP; + bp[1] = TCPOPT_NOP; + bp[2] = TCPOPT_SACK; + bp[3] = sack_len; + if ((tp-rcv_sack_flags TCPSACK_HAVED) != 0) { +sack_numblks--; +*lp++ = htonl(tp-rcv_dsack_block.left); +*lp++ = htonl(tp-rcv_dsack_block.right); +tp-rcv_sack_flags = ~TCPSACK_HAVED; + } + for (tiqe = TAILQ_FIRST(tp-timeq); + sack_numblks 0; + tiqe = TAILQ_NEXT(tiqe, ipqe_timeq)) { +KASSERT(tiqe != NULL); +sack_numblks--; +*lp++ = htonl(tiqe-ipqe_seq); +*lp++ = htonl(tiqe-ipqe_seq + tiqe-ipqe_len + +((tiqe-ipqe_flags TH_FIN) != 0 ? 1 : 0)); + } + optlen += sack_len + 2; } - optlen += sack_len + 2; } TCP_REASS_UNLOCK(tp); #ifdef TCP_SIGNATURE - if (tp-t_flags TF_SIGNATURE) { + if ((tp-t_flags TF_SIGNATURE) OPT_FITS(TCPOLEN_SIGNATURE + 2)) { u_char *bp; /* * Initialize TCP-MD5 option (RFC2385)
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 23:08:44 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1174. To generate a diff of this commit: cvs rdiff -u -r1.1.2.148 -r1.1.2.149 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.148 src/doc/CHANGES-6.2:1.1.2.149 --- src/doc/CHANGES-6.2:1.1.2.148 Mon Nov 3 22:09:32 2014 +++ src/doc/CHANGES-6.2 Mon Nov 3 23:08:44 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.148 2014/11/03 22:09:32 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.149 2014/11/03 23:08:44 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4171,3 +4171,9 @@ sys/dev/ic/mpt.h1.8 associated with a volume for BIOCDISK_NOVOL, when setting bd_disknovol=false, also set bv_volid. [jmcneill, ticket #1160] + +sys/netinet/tcp_output.c 1.178 + + Avoid stack overflow when SACK and TCP_SIGNATURE are both present. + Pointed out by Jonathan Looney. + [christos, ticket #1174]
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 23:09:01 UTC 2014 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket 1174. To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.7 src/doc/CHANGES-6.1.6:1.1.2.8 --- src/doc/CHANGES-6.1.6:1.1.2.7 Mon Nov 3 21:37:38 2014 +++ src/doc/CHANGES-6.1.6 Mon Nov 3 23:09:00 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.7 2014/11/03 21:37:38 msaitoh Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.8 2014/11/03 23:09:00 msaitoh Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -156,3 +156,9 @@ crypto/external/bsd/openssh/dist/auth.c hostname. [we do the same below for hosts.allow and deny] Reported by rudolf. [christos, ticket #1169] + +sys/netinet/tcp_output.c 1.178 + + Avoid stack overflow when SACK and TCP_SIGNATURE are both present. + Pointed out by Jonathan Looney. + [christos, ticket #1174]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: msaitoh Date: Mon Nov 3 23:09:18 UTC 2014 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket 1174. To generate a diff of this commit: cvs rdiff -u -r1.1.2.7 -r1.1.2.8 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.7 src/doc/CHANGES-6.0.7:1.1.2.8 --- src/doc/CHANGES-6.0.7:1.1.2.7 Mon Nov 3 21:38:00 2014 +++ src/doc/CHANGES-6.0.7 Mon Nov 3 23:09:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.7 2014/11/03 21:38:00 msaitoh Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.8 2014/11/03 23:09:17 msaitoh Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -156,3 +156,9 @@ crypto/external/bsd/openssh/dist/auth.c hostname. [we do the same below for hosts.allow and deny] Reported by rudolf. [christos, ticket #1169] + +sys/netinet/tcp_output.c 1.178 + + Avoid stack overflow when SACK and TCP_SIGNATURE are both present. + Pointed out by Jonathan Looney. + [christos, ticket #1174]
CVS commit: src/tests
Module Name:src Committed By: justin Date: Tue Nov 4 00:20:19 UTC 2014 Modified Files: src/tests/include: t_paths.c src/tests/lib/libc/gen: t_floatunditf.c t_fpsetmask.c t_isnan.c t_siginfo.c src/tests/lib/libc/stdlib: t_strtod.c src/tests/lib/libc/sys: t_sigaction.c src/tests/lib/libexecinfo: t_backtrace.c src/tests/lib/libm: t_ldexp.c t_log.c t_precision.c src/tests/lib/libpthread: t_mutex.c t_sem.c Log Message: PR misc/49356 remove unnecessary references to atf-c/config.h The function included via this header is not used and is removed in later versions of atf, so let us avoid it. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/tests/include/t_paths.c cvs rdiff -u -r1.5 -r1.6 src/tests/lib/libc/gen/t_floatunditf.c cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libc/gen/t_fpsetmask.c cvs rdiff -u -r1.4 -r1.5 src/tests/lib/libc/gen/t_isnan.c cvs rdiff -u -r1.23 -r1.24 src/tests/lib/libc/gen/t_siginfo.c cvs rdiff -u -r1.31 -r1.32 src/tests/lib/libc/stdlib/t_strtod.c cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_sigaction.c cvs rdiff -u -r1.15 -r1.16 src/tests/lib/libexecinfo/t_backtrace.c cvs rdiff -u -r1.13 -r1.14 src/tests/lib/libm/t_ldexp.c cvs rdiff -u -r1.11 -r1.12 src/tests/lib/libm/t_log.c cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libm/t_precision.c cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libpthread/t_mutex.c cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libpthread/t_sem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/include/t_paths.c diff -u src/tests/include/t_paths.c:1.13 src/tests/include/t_paths.c:1.14 --- src/tests/include/t_paths.c:1.13 Sun Feb 9 21:26:07 2014 +++ src/tests/include/t_paths.c Tue Nov 4 00:20:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_paths.c,v 1.13 2014/02/09 21:26:07 jmmv Exp $ */ +/* $NetBSD: t_paths.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include sys/cdefs.h -__RCSID($NetBSD: t_paths.c,v 1.13 2014/02/09 21:26:07 jmmv Exp $); +__RCSID($NetBSD: t_paths.c,v 1.14 2014/11/04 00:20:19 justin Exp $); #include sys/param.h #include sys/stat.h @@ -42,7 +42,6 @@ __RCSID($NetBSD: t_paths.c,v 1.13 2014/ #include unistd.h #include atf-c.h -#include atf-c/config.h #define PATH_DEV __BIT(0) /* A device node */ #define PATH_DIR __BIT(1) /* A directory */ Index: src/tests/lib/libc/gen/t_floatunditf.c diff -u src/tests/lib/libc/gen/t_floatunditf.c:1.5 src/tests/lib/libc/gen/t_floatunditf.c:1.6 --- src/tests/lib/libc/gen/t_floatunditf.c:1.5 Sun Feb 2 08:16:22 2014 +++ src/tests/lib/libc/gen/t_floatunditf.c Tue Nov 4 00:20:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_floatunditf.c,v 1.5 2014/02/02 08:16:22 martin Exp $ */ +/* $NetBSD: t_floatunditf.c,v 1.6 2014/11/04 00:20:19 justin Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -27,7 +27,6 @@ */ #include atf-c.h -#include atf-c/config.h #include inttypes.h #include math.h Index: src/tests/lib/libc/gen/t_fpsetmask.c diff -u src/tests/lib/libc/gen/t_fpsetmask.c:1.13 src/tests/lib/libc/gen/t_fpsetmask.c:1.14 --- src/tests/lib/libc/gen/t_fpsetmask.c:1.13 Sun Feb 9 21:26:07 2014 +++ src/tests/lib/libc/gen/t_fpsetmask.c Tue Nov 4 00:20:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_fpsetmask.c,v 1.13 2014/02/09 21:26:07 jmmv Exp $ */ +/* $NetBSD: t_fpsetmask.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */ /*- * Copyright (c) 1995 The NetBSD Foundation, Inc. @@ -29,7 +29,6 @@ #include sys/param.h #include atf-c.h -#include atf-c/config.h #include stdio.h #include signal.h Index: src/tests/lib/libc/gen/t_isnan.c diff -u src/tests/lib/libc/gen/t_isnan.c:1.4 src/tests/lib/libc/gen/t_isnan.c:1.5 --- src/tests/lib/libc/gen/t_isnan.c:1.4 Sun Feb 9 21:26:07 2014 +++ src/tests/lib/libc/gen/t_isnan.c Tue Nov 4 00:20:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_isnan.c,v 1.4 2014/02/09 21:26:07 jmmv Exp $ */ +/* $NetBSD: t_isnan.c,v 1.5 2014/11/04 00:20:19 justin Exp $ */ /* * This file is in the Public Domain. @@ -10,7 +10,6 @@ #include sys/param.h #include atf-c.h -#include atf-c/config.h #include math.h #include string.h Index: src/tests/lib/libc/gen/t_siginfo.c diff -u src/tests/lib/libc/gen/t_siginfo.c:1.23 src/tests/lib/libc/gen/t_siginfo.c:1.24 --- src/tests/lib/libc/gen/t_siginfo.c:1.23 Sun Feb 9 21:26:07 2014 +++ src/tests/lib/libc/gen/t_siginfo.c Tue Nov 4 00:20:19 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: t_siginfo.c,v 1.23 2014/02/09 21:26:07 jmmv Exp $ */ +/* $NetBSD: t_siginfo.c,v 1.24 2014/11/04 00:20:19 justin Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -27,7 +27,6 @@ */ #include atf-c.h -#include atf-c/config.h #include sys/inttypes.h #include sys/resource.h Index: src/tests/lib/libc/stdlib/t_strtod.c diff -u
CVS commit: [netbsd-6] src/gnu/dist/gcc4/gcc/config/i386
Module Name:src Committed By: msaitoh Date: Tue Nov 4 00:52:15 UTC 2014 Modified Files: src/gnu/dist/gcc4/gcc/config/i386 [netbsd-6]: pmm_malloc.h Log Message: Pull up following revision(s) (requested by joerg in ticket #1157): external/gpl3/gcc.old/dist/gcc/config/i386/pmm_malloc.h: revision 1.2 Apply r1.2 from our GCC 4.8 version of the same file: Kill the throw() on a forward declaration for posix_memalign (it does not match our base declaration and may cause warnings). To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r1.1.1.1.44.1 \ src/gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h diff -u src/gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h:1.1.1.1 src/gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h:1.1.1.1.44.1 --- src/gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h:1.1.1.1 Thu Apr 20 09:47:09 2006 +++ src/gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h Tue Nov 4 00:52:15 2014 @@ -34,7 +34,7 @@ #ifndef __cplusplus extern int posix_memalign (void **, size_t, size_t); #else -extern C int posix_memalign (void **, size_t, size_t) throw (); +extern C int posix_memalign (void **, size_t, size_t); #endif static __inline void *
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Tue Nov 4 00:54:16 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Add gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h, too (ticket 1157). To generate a diff of this commit: cvs rdiff -u -r1.1.2.149 -r1.1.2.150 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.149 src/doc/CHANGES-6.2:1.1.2.150 --- src/doc/CHANGES-6.2:1.1.2.149 Mon Nov 3 23:08:44 2014 +++ src/doc/CHANGES-6.2 Tue Nov 4 00:54:16 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.149 2014/11/03 23:08:44 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.150 2014/11/04 00:54:16 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4124,6 +4124,7 @@ sys/net/if_vlan.c1.71, 1.73-1.74 [ozaki-r, ticket #1156] external/gpl3/gcc/dist/gcc/config/i386/pmm_malloc.h 1.2 +gnu/dist/gcc4/gcc/config/i386/pmm_malloc.h patch Kill the throw() on a forward declaration for posix_memalign (it does not match our base declaration and may cause warnings).
CVS commit: [netbsd-6] src/lib/libperfuse
Module Name:src Committed By: msaitoh Date: Tue Nov 4 01:50:42 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c perfuse_priv.h Log Message: Pull up following revision(s) (requested by manu in ticket #1153): lib/libperfuse/ops.c1.72 lib/libperfuse/perfuse_priv.h 1.35 Fix build failure on amd64. To generate a diff of this commit: cvs rdiff -u -r1.50.2.11 -r1.50.2.12 src/lib/libperfuse/ops.c cvs rdiff -u -r1.25.2.5 -r1.25.2.6 src/lib/libperfuse/perfuse_priv.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.11 src/lib/libperfuse/ops.c:1.50.2.12 --- src/lib/libperfuse/ops.c:1.50.2.11 Mon Nov 3 19:40:10 2014 +++ src/lib/libperfuse/ops.c Tue Nov 4 01:50:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.11 2014/11/03 19:40:10 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.12 2014/11/04 01:50:42 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -2884,7 +2884,7 @@ perfuse_node_print(struct puffs_usermoun int perfuse_node_pathconf(struct puffs_usermount *pu, puffs_cookie_t opc, - int name, int *retval) + int name, register_t *retval) { perfuse_msg_t *pm; struct perfuse_state *ps; Index: src/lib/libperfuse/perfuse_priv.h diff -u src/lib/libperfuse/perfuse_priv.h:1.25.2.5 src/lib/libperfuse/perfuse_priv.h:1.25.2.6 --- src/lib/libperfuse/perfuse_priv.h:1.25.2.5 Mon Nov 3 19:18:09 2014 +++ src/lib/libperfuse/perfuse_priv.h Tue Nov 4 01:50:42 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: perfuse_priv.h,v 1.25.2.5 2014/11/03 19:18:09 msaitoh Exp $ */ +/* $NetBSD: perfuse_priv.h,v 1.25.2.6 2014/11/04 01:50:42 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -249,7 +249,7 @@ int perfuse_node_reclaim(struct puffs_us int perfuse_node_inactive(struct puffs_usermount *, puffs_cookie_t); int perfuse_node_print(struct puffs_usermount *, puffs_cookie_t); int perfuse_node_pathconf(struct puffs_usermount *, -puffs_cookie_t, int, int *); +puffs_cookie_t, int, register_t *); int perfuse_node_advlock(struct puffs_usermount *, puffs_cookie_t, void *, int, struct flock *, int); int perfuse_node_read(struct puffs_usermount *, puffs_cookie_t,
CVS commit: [netbsd-6] src/lib/libperfuse
Module Name:src Committed By: msaitoh Date: Tue Nov 4 01:52:53 UTC 2014 Modified Files: src/lib/libperfuse [netbsd-6]: ops.c Log Message: Pull up following revision(s) (requested by manu in ticket #1151): lib/libperfuse/ops.c: revision 1.74 Avoid a file resize serialization deadlock when writing with PUFFS_IO_APPEND flag. The symptom was a hang when appending to a file with a null size. To generate a diff of this commit: cvs rdiff -u -r1.50.2.12 -r1.50.2.13 src/lib/libperfuse/ops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libperfuse/ops.c diff -u src/lib/libperfuse/ops.c:1.50.2.12 src/lib/libperfuse/ops.c:1.50.2.13 --- src/lib/libperfuse/ops.c:1.50.2.12 Tue Nov 4 01:50:42 2014 +++ src/lib/libperfuse/ops.c Tue Nov 4 01:52:53 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ops.c,v 1.50.2.12 2014/11/04 01:50:42 msaitoh Exp $ */ +/* $NetBSD: ops.c,v 1.50.2.13 2014/11/04 01:52:53 msaitoh Exp $ */ /*- * Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved. @@ -3188,16 +3188,6 @@ perfuse_node_write2(struct puffs_usermou requeue_request(pu, opc, PCQ_WRITE); pnd-pnd_flags |= PND_INWRITE; - /* - * Serialize size access, see comment in perfuse_node_setattr(). - */ - if ((u_quad_t)offset + *resid vap-va_size) { - while (pnd-pnd_flags PND_INRESIZE) - requeue_request(pu, opc, PCQ_RESIZE); - pnd-pnd_flags |= PND_INRESIZE; - inresize = 1; - } - /* * append flag: re-read the file size so that * we get the latest value. @@ -3209,6 +3199,16 @@ perfuse_node_write2(struct puffs_usermou offset = vap-va_size; } + /* + * Serialize size access, see comment in perfuse_node_setattr(). + */ + if ((u_quad_t)offset + *resid vap-va_size) { + while (pnd-pnd_flags PND_INRESIZE) + requeue_request(pu, opc, PCQ_RESIZE); + pnd-pnd_flags |= PND_INRESIZE; + inresize = 1; + } + #ifdef PERFUSE_DEBUG if (perfuse_diagflags PDF_RESIZE) DPRINTF( %s %p % PRIu64 \n, __func__,
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Tue Nov 4 01:56:17 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket 1151 and 1153. To generate a diff of this commit: cvs rdiff -u -r1.1.2.150 -r1.1.2.151 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.150 src/doc/CHANGES-6.2:1.1.2.151 --- src/doc/CHANGES-6.2:1.1.2.150 Tue Nov 4 00:54:16 2014 +++ src/doc/CHANGES-6.2 Tue Nov 4 01:56:17 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.150 2014/11/04 00:54:16 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.151 2014/11/04 01:56:17 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -4178,3 +4178,16 @@ sys/netinet/tcp_output.c 1.178 Avoid stack overflow when SACK and TCP_SIGNATURE are both present. Pointed out by Jonathan Looney. [christos, ticket #1174] + +lib/libperfuse/ops.c1.72 +lib/libperfuse/perfuse_priv.h 1.35 + + Fix build failure on amd64. + [manu, ticket #1153] + +lib/libperfuse/ops.c1.74 + + Avoid a file resize serialization deadlock when writing with + PUFFS_IO_APPEND flag. The symptom was a hang when appending to + a file with a null size. + [manu, ticket #1151]
CVS commit: src/sys/external/bsd/drm2/dist/drm/i915
Module Name:src Committed By: jmcneill Date: Tue Nov 4 03:05:36 UTC 2014 Modified Files: src/sys/external/bsd/drm2/dist/drm/i915: intel_panel.c Log Message: Merge https://github.com/torvalds/linux/commit/2e7eeeb59a92d09144fdb7d2dc1af77a10a7945b#diff-528092536eaeb3c5f7ff6dfeed53786d drm/i915: set backlight duty cycle after backlight enable for gen4 For reasons I can't claim to fully understand gen4 seems to require backlight duty cycle setting after the backlight has been enabled, or else black screen follows. I don't have documentation for the correct sequence on gen4 either. Confirmed on Dell Latitude D630 and MacBook4,1. Without this patch, the screen on my T61 (i965) would be blank at boot unless I booted with the AC adapter unplugged. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 \ src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.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/external/bsd/drm2/dist/drm/i915/intel_panel.c diff -u src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c:1.5 src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c:1.6 --- src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c:1.5 Sun Sep 7 23:03:11 2014 +++ src/sys/external/bsd/drm2/dist/drm/i915/intel_panel.c Tue Nov 4 03:05:36 2014 @@ -730,9 +730,6 @@ static void i965_enable_backlight(struct ctl = freq 16; I915_WRITE(BLC_PWM_CTL, ctl); - /* XXX: combine this into above write? */ - intel_panel_actually_set_backlight(connector, panel-backlight.level); - ctl2 = BLM_PIPE(pipe); if (panel-backlight.combination_mode) ctl2 |= BLM_COMBINATION_MODE; @@ -741,6 +738,8 @@ static void i965_enable_backlight(struct I915_WRITE(BLC_PWM_CTL2, ctl2); POSTING_READ(BLC_PWM_CTL2); I915_WRITE(BLC_PWM_CTL2, ctl2 | BLM_PWM_ENABLE); + + intel_panel_actually_set_backlight(connector, panel-backlight.level); } static void vlv_enable_backlight(struct intel_connector *connector)
CVS commit: src/sbin/fsck_msdos
Module Name:src Committed By: msaitoh Date: Tue Nov 4 03:05:43 UTC 2014 Modified Files: src/sbin/fsck_msdos: boot.c Log Message: Add #include inttypes.h for intmax_t to fix compile error. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sbin/fsck_msdos/boot.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/fsck_msdos/boot.c diff -u src/sbin/fsck_msdos/boot.c:1.17 src/sbin/fsck_msdos/boot.c:1.18 --- src/sbin/fsck_msdos/boot.c:1.17 Mon Nov 3 18:55:04 2014 +++ src/sbin/fsck_msdos/boot.c Tue Nov 4 03:05:43 2014 @@ -27,12 +27,13 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: boot.c,v 1.17 2014/11/03 18:55:04 jakllsch Exp $); +__RCSID($NetBSD: boot.c,v 1.18 2014/11/04 03:05:43 msaitoh Exp $); #endif /* not lint */ #include stdlib.h #include string.h #include strings.h +#include inttypes.h #include stdio.h #include unistd.h
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: snj Date: Tue Nov 4 07:16:05 UTC 2014 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: whitespace To generate a diff of this commit: cvs rdiff -u -r1.1.2.74 -r1.1.2.75 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.74 src/doc/CHANGES-7.0:1.1.2.75 --- src/doc/CHANGES-7.0:1.1.2.74 Sun Nov 2 10:16:20 2014 +++ src/doc/CHANGES-7.0 Tue Nov 4 07:16:05 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.74 2014/11/02 10:16:20 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.75 2014/11/04 07:16:05 snj Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -18,7 +18,6 @@ sys/dev/usb/xhci.c1.24 are allowed, i.e. 512 for SS, etc. Maybe these should be used? [skrll, ticket #3] - sys/kern/kern_rndpool.c1.7 sys/kern/kern_rndq.c1.27 @@ -38,7 +37,6 @@ external/gpl3/binutils/dist/bfd/elflink. symbol that will be skipped, we don't have a new definition. [skrll, ticket #5] - sys/dev/usb/motg.c1.7-1.8 Trailing whitespace. @@ -56,7 +54,6 @@ usr.sbin/postinstall/postinstall 1.177- using make -V '${VAR}' instead of make -V 'VAR'. [apb, ticket #8] - usr.sbin/postinstall/postinstall 1.176 FONTCONFIG_DIR not existing does not need to be fixed. @@ -1788,7 +1785,6 @@ sys/kern/vfs_vnode.c1.39 Should prevent the panic from PR kern/49171 (panic when closing a pty). [hannken, ticket #150] - sys/compat/svr4/svr4_stat.c 1.70 sys/dev/dm/dm_target_snapshot.c 1.17 sys/dev/if_ndis/if_ndis_pci.c 1.20 @@ -1799,7 +1795,6 @@ sys/ufs/ext2fs/ext2fs_readwrite.c 1.65 unused macros, respectively in if_ndis and dm, smbfs, svr4 and ext2fs. [maxv, ticket #148] - sys/arch/arm/broadcom/bcm2835_vcaudio.c 1.4-1.7 sys/external/bsd/vchiq/dist/interface/vchiq_arm/vchiq_shim.c 1.5
CVS commit: src/sys/sys
Module Name:src Committed By: mlelstv Date: Tue Nov 4 07:41:38 UTC 2014 Modified Files: src/sys/sys: dkio.h Log Message: Add ioctl to autodiscover wedges. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/sys/dkio.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/sys/dkio.h diff -u src/sys/sys/dkio.h:1.19 src/sys/sys/dkio.h:1.20 --- src/sys/sys/dkio.h:1.19 Fri Jul 25 08:34:48 2014 +++ src/sys/sys/dkio.h Tue Nov 4 07:41:37 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dkio.h,v 1.19 2014/07/25 08:34:48 dholland Exp $ */ +/* $NetBSD: dkio.h,v 1.20 2014/11/04 07:41:37 mlelstv Exp $ */ /* * Copyright (c) 1987, 1988, 1993 @@ -112,4 +112,7 @@ /* 129 was DIOCGDISCARDPARAMS during 6.99 */ /* 130 was DIOCDISCARD during 6.99 */ + /* trigger wedge auto discover */ +#define DIOCMWEDGES _IOR('d', 131, int) /* make wedges */ + #endif /* _SYS_DKIO_H_ */
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Tue Nov 4 07:43:00 UTC 2014 Modified Files: src/sys/dev/dkwedge: dkwedge_gpt.c Log Message: Be less noisy when handling wedge name conflicts. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/dev/dkwedge/dkwedge_gpt.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/dev/dkwedge/dkwedge_gpt.c diff -u src/sys/dev/dkwedge/dkwedge_gpt.c:1.13 src/sys/dev/dkwedge/dkwedge_gpt.c:1.14 --- src/sys/dev/dkwedge/dkwedge_gpt.c:1.13 Sat Oct 18 08:33:27 2014 +++ src/sys/dev/dkwedge/dkwedge_gpt.c Tue Nov 4 07:43:00 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dkwedge_gpt.c,v 1.13 2014/10/18 08:33:27 snj Exp $ */ +/* $NetBSD: dkwedge_gpt.c,v 1.14 2014/11/04 07:43:00 mlelstv Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dkwedge_gpt.c,v 1.13 2014/10/18 08:33:27 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: dkwedge_gpt.c,v 1.14 2014/11/04 07:43:00 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -265,13 +265,15 @@ dkwedge_discover_gpt(struct disk *pdk, s * Try with the partition name first. If that fails, * use the GUID string. If that fails, punt. */ - if ((error = dkwedge_add(dkw)) == EEXIST) { - aprint_error(%s: wedge named '%s' already exists, - trying '%s'\n, pdk-dk_name, - dkw.dkw_wname, /* XXX Unicode */ - ent_guid_str); + if ((error = dkwedge_add(dkw)) == EEXIST + strcmp(dkw.dkw_wname, ent_guid_str) != 0) { strcpy(dkw.dkw_wname, ent_guid_str); error = dkwedge_add(dkw); + if (!error) +aprint_error(%s: wedge named '%s' already +existed, using '%s'\n, pdk-dk_name, +dkw.dkw_wname, /* XXX Unicode */ +ent_guid_str); } if (error == EEXIST) aprint_error(%s: wedge named '%s' already exists,
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Tue Nov 4 07:46:26 UTC 2014 Modified Files: src/sys/dev/dkwedge: dkwedge_mbr.c Log Message: get sector size from disk structure. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/dkwedge/dkwedge_mbr.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/dev/dkwedge/dkwedge_mbr.c diff -u src/sys/dev/dkwedge/dkwedge_mbr.c:1.7 src/sys/dev/dkwedge/dkwedge_mbr.c:1.8 --- src/sys/dev/dkwedge/dkwedge_mbr.c:1.7 Sat Apr 7 05:09:09 2012 +++ src/sys/dev/dkwedge/dkwedge_mbr.c Tue Nov 4 07:46:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dkwedge_mbr.c,v 1.7 2012/04/07 05:09:09 christos Exp $ */ +/* $NetBSD: dkwedge_mbr.c,v 1.8 2014/11/04 07:46:26 mlelstv Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dkwedge_mbr.c,v 1.7 2012/04/07 05:09:09 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: dkwedge_mbr.c,v 1.8 2014/11/04 07:46:26 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -168,7 +168,7 @@ dkwedge_discover_mbr(struct disk *pdk, s mbr_args_t a; a.pdk = pdk; - a.secsize = pdk-dk_label-d_secsize; + a.secsize = DEV_BSIZE pdk-dk_blkshift; a.vp = vp; a.buf = malloc(a.secsize, M_DEVBUF, M_WAITOK); a.error = 0;
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Tue Nov 4 07:45:45 UTC 2014 Modified Files: src/sys/dev/dkwedge: dkwedge_bsdlabel.c Log Message: Handle disks with non DEV_BSIZE sectors. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/dkwedge/dkwedge_bsdlabel.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/dev/dkwedge/dkwedge_bsdlabel.c diff -u src/sys/dev/dkwedge/dkwedge_bsdlabel.c:1.22 src/sys/dev/dkwedge/dkwedge_bsdlabel.c:1.23 --- src/sys/dev/dkwedge/dkwedge_bsdlabel.c:1.22 Sat Aug 30 09:35:10 2014 +++ src/sys/dev/dkwedge/dkwedge_bsdlabel.c Tue Nov 4 07:45:45 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dkwedge_bsdlabel.c,v 1.22 2014/08/30 09:35:10 apb Exp $ */ +/* $NetBSD: dkwedge_bsdlabel.c,v 1.23 2014/11/04 07:45:45 mlelstv Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -79,7 +79,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dkwedge_bsdlabel.c,v 1.22 2014/08/30 09:35:10 apb Exp $); +__KERNEL_RCSID(0, $NetBSD: dkwedge_bsdlabel.c,v 1.23 2014/11/04 07:45:45 mlelstv Exp $); #include sys/param.h #ifdef _KERNEL @@ -137,6 +137,7 @@ typedef struct mbr_args { struct vnode *vp; void *buf; int error; + uint32_t secsize; } mbr_args_t; static const char * @@ -274,7 +275,7 @@ validate_label(mbr_args_t *a, daddr_t la int error, swapped; uint16_t npartitions; - error = dkwedge_read(a-pdk, a-vp, label_sector, a-buf, DEV_BSIZE); + error = dkwedge_read(a-pdk, a-vp, label_sector, a-buf, a-secsize); if (error) { aprint_error(%s: unable to read BSD disklabel @ % PRId64 , error = %d\n, a-pdk-dk_name, label_sector, error); @@ -288,7 +289,7 @@ validate_label(mbr_args_t *a, daddr_t la * in the sector. */ lp = a-buf; - lp_lim = (char *)a-buf + DEV_BSIZE - DISKLABEL_MINSIZE; + lp_lim = (char *)a-buf + a-secsize - DISKLABEL_MINSIZE; for (;; lp = (void *)((char *)lp + sizeof(uint32_t))) { if ((char *)lp (char *)lp_lim) return (SCAN_CONTINUE); @@ -307,7 +308,7 @@ validate_label(mbr_args_t *a, daddr_t la /* Validate label length. */ if ((char *)lp + DISKLABEL_SIZE(npartitions) - (char *)a-buf + DEV_BSIZE) { + (char *)a-buf + a-secsize) { aprint_error(%s: BSD disklabel @ % PRId64 +%zd has bogus partition count (%u)\n, a-pdk-dk_name, label_sector, label_offset, @@ -351,7 +352,7 @@ scan_mbr(mbr_args_t *a, int (*actn)(mbr_ this_ext = 0; for (;;) { a-error = dkwedge_read(a-pdk, a-vp, this_ext, a-buf, - DEV_BSIZE); + a-secsize); if (a-error) { aprint_error(%s: unable to read MBR @ %u, error = %d\n, a-pdk-dk_name, this_ext, @@ -447,8 +448,9 @@ dkwedge_discover_bsdlabel(struct disk *p int rval; a.pdk = pdk; + a.secsize = DEV_BSIZE pdk-dk_blkshift; a.vp = vp; - a.buf = DKW_MALLOC(DEV_BSIZE); + a.buf = DKW_MALLOC(a.secsize); a.error = 0; /* MBR search. */
CVS commit: src/sys/dev/dkwedge
Module Name:src Committed By: mlelstv Date: Tue Nov 4 07:50:39 UTC 2014 Modified Files: src/sys/dev/dkwedge: dk.c Log Message: Implement DIOCMWEDGES ioctl that triggers wedge autodiscovery. Also fix a reference counting bug and clean up some code. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/dev/dkwedge/dk.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/dev/dkwedge/dk.c diff -u src/sys/dev/dkwedge/dk.c:1.73 src/sys/dev/dkwedge/dk.c:1.74 --- src/sys/dev/dkwedge/dk.c:1.73 Thu Aug 28 19:37:46 2014 +++ src/sys/dev/dkwedge/dk.c Tue Nov 4 07:50:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dk.c,v 1.73 2014/08/28 19:37:46 riastradh Exp $ */ +/* $NetBSD: dk.c,v 1.74 2014/11/04 07:50:39 mlelstv Exp $ */ /*- * Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.73 2014/08/28 19:37:46 riastradh Exp $); +__KERNEL_RCSID(0, $NetBSD: dk.c,v 1.74 2014/11/04 07:50:39 mlelstv Exp $); #ifdef _KERNEL_OPT #include opt_dkwedge.h @@ -98,7 +98,10 @@ static void dkrestart(void *); static void dkminphys(struct buf *); static int dklastclose(struct dkwedge_softc *); +static int dkwedge_cleanup_parent(struct dkwedge_softc *, int); static int dkwedge_detach(device_t, int); +static void dkwedge_delall1(struct disk *, bool); +static int dkwedge_del1(struct dkwedge_info *, int); static dev_type_open(dkopen); static dev_type_close(dkclose); @@ -198,7 +201,7 @@ dkwedge_wait_drain(struct dkwedge_softc * Compute the parent disk's dev_t. */ static int -dkwedge_compute_pdev(const char *pname, dev_t *pdevp) +dkwedge_compute_pdev(const char *pname, dev_t *pdevp, enum vtype type) { const char *name, *cp; devmajor_t pmaj; @@ -206,7 +209,18 @@ dkwedge_compute_pdev(const char *pname, char devname[16]; name = pname; - if ((pmaj = devsw_name2blk(name, devname, sizeof(devname))) == -1) + switch (type) { + case VBLK: + pmaj = devsw_name2blk(name, devname, sizeof(devname)); + break; + case VCHR: + pmaj = devsw_name2chr(name, devname, sizeof(devname)); + break; + default: + pmaj = -1; + break; + } + if (pmaj == -1) return (ENODEV); name += strlen(devname); @@ -282,7 +296,7 @@ dkwedge_add(struct dkwedge_info *dkw) if (pdk == NULL) return (ENODEV); - error = dkwedge_compute_pdev(pdk-dk_name, pdev); + error = dkwedge_compute_pdev(pdk-dk_name, pdev, VBLK); if (error) return (error); @@ -331,9 +345,14 @@ dkwedge_add(struct dkwedge_info *dkw) break; } } - if (lsc != NULL) - error = EINVAL; - else { + if (lsc != NULL) { + if (sc-sc_offset == lsc-sc_offset + sc-sc_size == lsc-sc_size + strcmp(sc-sc_wname, lsc-sc_wname) == 0) +error = EEXIST; + else +error = EINVAL; + } else { pdk-dk_nwedges++; LIST_INSERT_HEAD(pdk-dk_wedges, sc, sc_plink); } @@ -497,17 +516,23 @@ dkwedge_find(struct dkwedge_info *dkw, u int dkwedge_del(struct dkwedge_info *dkw) { + return dkwedge_del1(dkw, 0); +} + +int +dkwedge_del1(struct dkwedge_info *dkw, int flags) +{ struct dkwedge_softc *sc = NULL; /* Find our softc. */ if ((sc = dkwedge_find(dkw, NULL)) == NULL) return (ESRCH); - return config_detach(sc-sc_dev, DETACH_FORCE | DETACH_QUIET); + return config_detach(sc-sc_dev, flags); } static int -dkwedge_begindetach(struct dkwedge_softc *sc, int flags) +dkwedge_cleanup_parent(struct dkwedge_softc *sc, int flags) { struct disk *dk = sc-sc_dk; int rc; @@ -546,7 +571,7 @@ dkwedge_detach(device_t self, int flags) } if (unit == ndkwedges) rc = ENXIO; - else if ((rc = dkwedge_begindetach(sc, flags)) == 0) { + else if ((rc = dkwedge_cleanup_parent(sc, flags)) == 0) { /* Mark the wedge as dying. */ sc-sc_state = DKW_STATE_DYING; } @@ -579,20 +604,7 @@ dkwedge_detach(device_t self, int flags) vdevgone(cmaj, unit, unit, VCHR); /* Clean up the parent. */ - mutex_enter(sc-sc_dk.dk_openlock); - if (sc-sc_dk.dk_openmask) { - mutex_enter(sc-sc_parent-dk_rawlock); - if (sc-sc_parent-dk_rawopens-- == 1) { - KASSERT(sc-sc_parent-dk_rawvp != NULL); - mutex_exit(sc-sc_parent-dk_rawlock); - (void) vn_close(sc-sc_parent-dk_rawvp, FREAD | FWRITE, - NOCRED); - sc-sc_parent-dk_rawvp = NULL; - } else - mutex_exit(sc-sc_parent-dk_rawlock); - sc-sc_dk.dk_openmask = 0; - } - mutex_exit(sc-sc_dk.dk_openlock); + dkwedge_cleanup_parent(sc, flags | DETACH_FORCE); /* Announce our departure. */ aprint_normal(%s at %s (%s) deleted\n, device_xname(sc-sc_dev), @@ -631,13 +643,27 @@ dkwedge_detach(device_t self, int flags) void dkwedge_delall(struct disk *pdk) { + dkwedge_delall1(pdk, false); +} + +static void +dkwedge_delall1(struct disk *pdk, bool idleonly) +{ struct dkwedge_info dkw; struct dkwedge_softc *sc; + int flags; + + flags = DETACH_QUIET; + if (!idleonly) flags |= DETACH_FORCE;
CVS commit: src/sys/dev
Module Name:src Committed By: mlelstv Date: Tue Nov 4 07:51:55 UTC 2014 Modified Files: src/sys/dev: dksubr.c ld.c vnd.c src/sys/dev/ata: wd.c src/sys/dev/raidframe: rf_netbsdkintf.c src/sys/dev/scsipi: sd.c Log Message: support DIOCMWEDGES ioctl. To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/dev/dksubr.c cvs rdiff -u -r1.77 -r1.78 src/sys/dev/ld.c cvs rdiff -u -r1.233 -r1.234 src/sys/dev/vnd.c cvs rdiff -u -r1.414 -r1.415 src/sys/dev/ata/wd.c cvs rdiff -u -r1.314 -r1.315 src/sys/dev/raidframe/rf_netbsdkintf.c cvs rdiff -u -r1.309 -r1.310 src/sys/dev/scsipi/sd.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/dev/dksubr.c diff -u src/sys/dev/dksubr.c:1.53 src/sys/dev/dksubr.c:1.54 --- src/sys/dev/dksubr.c:1.53 Sat Oct 11 12:36:25 2014 +++ src/sys/dev/dksubr.c Tue Nov 4 07:51:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dksubr.c,v 1.53 2014/10/11 12:36:25 mlelstv Exp $ */ +/* $NetBSD: dksubr.c,v 1.54 2014/11/04 07:51:54 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2002, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: dksubr.c,v 1.53 2014/10/11 12:36:25 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: dksubr.c,v 1.54 2014/11/04 07:51:54 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -304,6 +304,7 @@ dk_ioctl(struct dk_intf *di, struct dk_s case DIOCAWEDGE: case DIOCDWEDGE: case DIOCLWEDGES: + case DIOCMWEDGES: case DIOCCACHESYNC: #ifdef __HAVE_OLD_DISKLABEL case ODIOCGDINFO: @@ -433,6 +434,15 @@ dk_ioctl(struct dk_intf *di, struct dk_s return (dkwedge_list(dksc-sc_dkdev, dkwl, l)); } + case DIOCMWEDGES: + { + if ((flag FWRITE) == 0) + return (EBADF); + + dkwedge_discover(dksc-sc_dkdev); + return 0; + } + case DIOCGSTRATEGY: { struct disk_strategy *dks = (void *)data; Index: src/sys/dev/ld.c diff -u src/sys/dev/ld.c:1.77 src/sys/dev/ld.c:1.78 --- src/sys/dev/ld.c:1.77 Sat Oct 11 12:01:27 2014 +++ src/sys/dev/ld.c Tue Nov 4 07:51:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.77 2014/10/11 12:01:27 mlelstv Exp $ */ +/* $NetBSD: ld.c,v 1.78 2014/11/04 07:51:54 mlelstv Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ld.c,v 1.77 2014/10/11 12:01:27 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: ld.c,v 1.78 2014/11/04 07:51:54 mlelstv Exp $); #include sys/param.h #include sys/systm.h @@ -555,6 +555,16 @@ ldioctl(dev_t dev, u_long cmd, void *add return (dkwedge_list(sc-sc_dk, dkwl, l)); } + + case DIOCMWEDGES: + { + if ((flag FWRITE) == 0) + return (EBADF); + + dkwedge_discover(sc-sc_dk); + return 0; + } + case DIOCGSTRATEGY: { struct disk_strategy *dks = (void *)addr; Index: src/sys/dev/vnd.c diff -u src/sys/dev/vnd.c:1.233 src/sys/dev/vnd.c:1.234 --- src/sys/dev/vnd.c:1.233 Sat Oct 11 12:01:27 2014 +++ src/sys/dev/vnd.c Tue Nov 4 07:51:54 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vnd.c,v 1.233 2014/10/11 12:01:27 mlelstv Exp $ */ +/* $NetBSD: vnd.c,v 1.234 2014/11/04 07:51:54 mlelstv Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.233 2014/10/11 12:01:27 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.234 2014/11/04 07:51:54 mlelstv Exp $); #if defined(_KERNEL_OPT) #include opt_vnd.h @@ -1592,6 +1592,13 @@ unlock_and_exit: return dkwedge_list(vnd-sc_dkdev, dkwl, l); + case DIOCMWEDGES: + if ((flag FWRITE) == 0) + return EBADF; + + dkwedge_discover(vnd-sc_dkdev); + return 0; + default: return ENOTTY; } Index: src/sys/dev/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.414 src/sys/dev/ata/wd.c:1.415 --- src/sys/dev/ata/wd.c:1.414 Sat Oct 11 14:05:11 2014 +++ src/sys/dev/ata/wd.c Tue Nov 4 07:51:55 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.414 2014/10/11 14:05:11 mlelstv Exp $ */ +/* $NetBSD: wd.c,v 1.415 2014/11/04 07:51:55 mlelstv Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.414 2014/10/11 14:05:11 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.415 2014/11/04 07:51:55 mlelstv Exp $); #include opt_ata.h @@ -1510,6 +1510,15 @@ wdioctl(dev_t dev, u_long xfer, void *ad return (dkwedge_list(wd-sc_dk, dkwl, l)); } + case DIOCMWEDGES: + { + if ((flag FWRITE) == 0) + return (EBADF); + + dkwedge_discover(wd-sc_dk); + return 0; + } + case DIOCGSTRATEGY: { struct disk_strategy *dks = (void *)addr; Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.314 src/sys/dev/raidframe/rf_netbsdkintf.c:1.315 ---