CVS commit: [netbsd-6] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Sep 24 12:56:16 UTC 2016 Modified Files: src/sys/dev/pci [netbsd-6]: if_vioif.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1401): sys/dev/pci/if_vioif.c: revision 1.25 Fix initializing wrong queues Pointed out by Mike Larkin. PR kern/51448 To generate a diff of this commit: cvs rdiff -u -r1.2.8.2 -r1.2.8.3 src/sys/dev/pci/if_vioif.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/pci/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.2.8.2 src/sys/dev/pci/if_vioif.c:1.2.8.3 --- src/sys/dev/pci/if_vioif.c:1.2.8.2 Thu Aug 7 09:31:09 2014 +++ src/sys/dev/pci/if_vioif.c Sat Sep 24 12:56:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.2.8.2 2014/08/07 09:31:09 msaitoh Exp $ */ +/* $NetBSD: if_vioif.c,v 1.2.8.3 2016/09/24 12:56:16 bouyer Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2.8.2 2014/08/07 09:31:09 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2.8.3 2016/09/24 12:56:16 bouyer Exp $"); #include #include @@ -378,7 +378,7 @@ vioif_alloc_mems(struct vioif_softc *sc) } for (i = 0; i < txqsize; i++) { - C_L1(txhdr_dmamaps[i], rx_hdrs[i], + C_L1(txhdr_dmamaps[i], tx_hdrs[i], sizeof(struct virtio_net_hdr), 1, WRITE, "tx header"); C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 256 /* XXX */, 0,
CVS commit: [netbsd-6-1] src/etc/namedb
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:01:33 UTC 2016 Modified Files: src/etc/namedb [netbsd-6-1]: root.cache Log Message: Pull up following revision(s) (requested by taca in ticket #1403): etc/namedb/root.cache: revision 1.21 Update root.cache to 2016/8/25 version, l.root-servers.net has record now. To generate a diff of this commit: cvs rdiff -u -r1.16.4.1.2.2 -r1.16.4.1.2.3 src/etc/namedb/root.cache Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/namedb/root.cache diff -u src/etc/namedb/root.cache:1.16.4.1.2.2 src/etc/namedb/root.cache:1.16.4.1.2.3 --- src/etc/namedb/root.cache:1.16.4.1.2.2 Fri May 6 18:33:59 2016 +++ src/etc/namedb/root.cache Sat Sep 24 13:01:33 2016 @@ -1,4 +1,4 @@ -; $NetBSD: root.cache,v 1.16.4.1.2.2 2016/05/06 18:33:59 snj Exp $ +; $NetBSD: root.cache,v 1.16.4.1.2.3 2016/09/24 13:01:33 bouyer Exp $ ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . " @@ -41,6 +41,7 @@ D.ROOT-SERVERS.NET. 360 AA ; .360 NSE.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 360 A 192.203.230.10 +E.ROOT-SERVERS.NET. 360 2001:500:a8::e ; ; FORMERLY NS.ISC.ORG ;
CVS commit: [netbsd-6-0] src/etc/namedb
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:01:38 UTC 2016 Modified Files: src/etc/namedb [netbsd-6-0]: root.cache Log Message: Pull up following revision(s) (requested by taca in ticket #1403): etc/namedb/root.cache: revision 1.21 Update root.cache to 2016/8/25 version, l.root-servers.net has record now. To generate a diff of this commit: cvs rdiff -u -r1.16.10.3 -r1.16.10.4 src/etc/namedb/root.cache Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/namedb/root.cache diff -u src/etc/namedb/root.cache:1.16.10.3 src/etc/namedb/root.cache:1.16.10.4 --- src/etc/namedb/root.cache:1.16.10.3 Fri May 6 18:34:56 2016 +++ src/etc/namedb/root.cache Sat Sep 24 13:01:38 2016 @@ -1,4 +1,4 @@ -; $NetBSD: root.cache,v 1.16.10.3 2016/05/06 18:34:56 snj Exp $ +; $NetBSD: root.cache,v 1.16.10.4 2016/09/24 13:01:38 bouyer Exp $ ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . " @@ -41,6 +41,7 @@ D.ROOT-SERVERS.NET. 360 AA ; .360 NSE.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 360 A 192.203.230.10 +E.ROOT-SERVERS.NET. 360 2001:500:a8::e ; ; FORMERLY NS.ISC.ORG ;
CVS commit: [netbsd-6] src/etc/namedb
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:01:42 UTC 2016 Modified Files: src/etc/namedb [netbsd-6]: root.cache Log Message: Pull up following revision(s) (requested by taca in ticket #1403): etc/namedb/root.cache: revision 1.21 Update root.cache to 2016/8/25 version, l.root-servers.net has record now. To generate a diff of this commit: cvs rdiff -u -r1.16.4.5 -r1.16.4.6 src/etc/namedb/root.cache Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/namedb/root.cache diff -u src/etc/namedb/root.cache:1.16.4.5 src/etc/namedb/root.cache:1.16.4.6 --- src/etc/namedb/root.cache:1.16.4.5 Fri May 6 18:33:30 2016 +++ src/etc/namedb/root.cache Sat Sep 24 13:01:42 2016 @@ -1,4 +1,4 @@ -; $NetBSD: root.cache,v 1.16.4.5 2016/05/06 18:33:30 snj Exp $ +; $NetBSD: root.cache,v 1.16.4.6 2016/09/24 13:01:42 bouyer Exp $ ; This file holds the information on root name servers needed to ; initialize cache of Internet domain name servers ; (e.g. reference this file in the "cache . " @@ -41,6 +41,7 @@ D.ROOT-SERVERS.NET. 360 AA ; .360 NSE.ROOT-SERVERS.NET. E.ROOT-SERVERS.NET. 360 A 192.203.230.10 +E.ROOT-SERVERS.NET. 360 2001:500:a8::e ; ; FORMERLY NS.ISC.ORG ;
CVS commit: [netbsd-6] src/lib/libc/gen
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:04:51 UTC 2016 Modified Files: src/lib/libc/gen [netbsd-6]: glob.c Log Message: Pull up following revision(s) (requested by joerg in ticket #1404): lib/libc/gen/glob.c: revision 1.36 Bump the glob limits to 512KB for total string size and 64K path entries. The old limits were too small for some important FTP use cases like a pkgsrc repository. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.31.4.1 src/lib/libc/gen/glob.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/gen/glob.c diff -u src/lib/libc/gen/glob.c:1.31 src/lib/libc/gen/glob.c:1.31.4.1 --- src/lib/libc/gen/glob.c:1.31 Sun Oct 30 21:53:43 2011 +++ src/lib/libc/gen/glob.c Sat Sep 24 13:04:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: glob.c,v 1.31 2011/10/30 21:53:43 christos Exp $ */ +/* $NetBSD: glob.c,v 1.31.4.1 2016/09/24 13:04:51 bouyer Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #else -__RCSID("$NetBSD: glob.c,v 1.31 2011/10/30 21:53:43 christos Exp $"); +__RCSID("$NetBSD: glob.c,v 1.31.4.1 2016/09/24 13:04:51 bouyer Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -87,9 +87,9 @@ __RCSID("$NetBSD: glob.c,v 1.31 2011/10/ #define NO_GETPW_R #endif -#define GLOB_LIMIT_STRING 65536 /* number of readdirs */ +#define GLOB_LIMIT_STRING 524288 /* number of readdirs */ #define GLOB_LIMIT_STAT 128 /* number of stat system calls */ -#define GLOB_LIMIT_READDIR 16384 /* total buffer size of path strings */ +#define GLOB_LIMIT_READDIR 65536 /* total buffer size of path strings */ #define GLOB_LIMIT_PATH 1024 /* number of path elements */ #define GLOB_LIMIT_BRACE 128 /* Number of brace calls */
CVS commit: [netbsd-6] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:06:41 UTC 2016 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6]: kobj_machdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #1405): sys/arch/sparc64/sparc64/kobj_machdep.c: revision 1.5 sys/arch/sparc64/sparc64/kobj_machdep.c: revision 1.6 Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. The target of the OLO10 relocation is the simd13 field of the instruction, so use a 13 bit target mask. Fixes PR kern/51436 (I broke this myself in rev 1.4) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.14.1 src/sys/arch/sparc64/sparc64/kobj_machdep.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/sparc64/sparc64/kobj_machdep.c diff -u src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4 src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4.14.1 --- src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4 Sun May 2 11:43:30 2010 +++ src/sys/arch/sparc64/sparc64/kobj_machdep.c Sat Sep 24 13:06:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj_machdep.c,v 1.4 2010/05/02 11:43:30 martin Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.4.14.1 2016/09/24 13:06:41 bouyer Exp $ */ /*- * Copyright (c) 2001 Jake Burkholder. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4 2010/05/02 11:43:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4.14.1 2016/09/24 13:06:41 bouyer Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -164,15 +164,15 @@ static const long reloc_target_bitmask[] _BM(22), _BM(10), /* _HIPLT22, LOPLT10 */ _BM(32), _BM(22), _BM(10), /* _PCPLT32, _PCPLT22, _PCPLT10 */ _BM(10), _BM(11), -1, /* _10, _11, _64 */ - _BM(10), _BM(22), /* _OLO10, _HH22 */ + _BM(13), _BM(22), /* _OLO10, _HH22 */ _BM(10), _BM(22), /* _HM10, _LM22 */ _BM(22), _BM(10), _BM(22), /* _PC_HH22, _PC_HM10, _PC_LM22 */ _BM(16), _BM(19), /* _WDISP16, _WDISP19 */ -1,/* GLOB_JMP */ - _BM(7), _BM(5), _BM(6) /* _7, _5, _6 */ + _BM(7), _BM(5), _BM(6), /* _7, _5, _6 */ -1, -1,/* DISP64, PLT64 */ _BM(22), _BM(13), /* HIX22, LOX10 */ - _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ + _BM(22), _BM(10), _BM(12), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ #undef _BM };
CVS commit: [netbsd-6-0] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:06:48 UTC 2016 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-0]: kobj_machdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #1405): sys/arch/sparc64/sparc64/kobj_machdep.c: revision 1.5 sys/arch/sparc64/sparc64/kobj_machdep.c: revision 1.6 Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. The target of the OLO10 relocation is the simd13 field of the instruction, so use a 13 bit target mask. Fixes PR kern/51436 (I broke this myself in rev 1.4) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.20.1 src/sys/arch/sparc64/sparc64/kobj_machdep.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/sparc64/sparc64/kobj_machdep.c diff -u src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4 src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4.20.1 --- src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4 Sun May 2 11:43:30 2010 +++ src/sys/arch/sparc64/sparc64/kobj_machdep.c Sat Sep 24 13:06:47 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj_machdep.c,v 1.4 2010/05/02 11:43:30 martin Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.4.20.1 2016/09/24 13:06:47 bouyer Exp $ */ /*- * Copyright (c) 2001 Jake Burkholder. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4 2010/05/02 11:43:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4.20.1 2016/09/24 13:06:47 bouyer Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -164,15 +164,15 @@ static const long reloc_target_bitmask[] _BM(22), _BM(10), /* _HIPLT22, LOPLT10 */ _BM(32), _BM(22), _BM(10), /* _PCPLT32, _PCPLT22, _PCPLT10 */ _BM(10), _BM(11), -1, /* _10, _11, _64 */ - _BM(10), _BM(22), /* _OLO10, _HH22 */ + _BM(13), _BM(22), /* _OLO10, _HH22 */ _BM(10), _BM(22), /* _HM10, _LM22 */ _BM(22), _BM(10), _BM(22), /* _PC_HH22, _PC_HM10, _PC_LM22 */ _BM(16), _BM(19), /* _WDISP16, _WDISP19 */ -1,/* GLOB_JMP */ - _BM(7), _BM(5), _BM(6) /* _7, _5, _6 */ + _BM(7), _BM(5), _BM(6), /* _7, _5, _6 */ -1, -1,/* DISP64, PLT64 */ _BM(22), _BM(13), /* HIX22, LOX10 */ - _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ + _BM(22), _BM(10), _BM(12), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ #undef _BM };
CVS commit: [netbsd-6-1] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:06:45 UTC 2016 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-1]: kobj_machdep.c Log Message: Pull up following revision(s) (requested by martin in ticket #1405): sys/arch/sparc64/sparc64/kobj_machdep.c: revision 1.5 sys/arch/sparc64/sparc64/kobj_machdep.c: revision 1.6 Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. The target of the OLO10 relocation is the simd13 field of the instruction, so use a 13 bit target mask. Fixes PR kern/51436 (I broke this myself in rev 1.4) To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.4.28.1 src/sys/arch/sparc64/sparc64/kobj_machdep.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/sparc64/sparc64/kobj_machdep.c diff -u src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4 src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4.28.1 --- src/sys/arch/sparc64/sparc64/kobj_machdep.c:1.4 Sun May 2 11:43:30 2010 +++ src/sys/arch/sparc64/sparc64/kobj_machdep.c Sat Sep 24 13:06:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: kobj_machdep.c,v 1.4 2010/05/02 11:43:30 martin Exp $ */ +/* $NetBSD: kobj_machdep.c,v 1.4.28.1 2016/09/24 13:06:45 bouyer Exp $ */ /*- * Copyright (c) 2001 Jake Burkholder. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4 2010/05/02 11:43:30 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kobj_machdep.c,v 1.4.28.1 2016/09/24 13:06:45 bouyer Exp $"); #define ELFSIZE ARCH_ELFSIZE @@ -164,15 +164,15 @@ static const long reloc_target_bitmask[] _BM(22), _BM(10), /* _HIPLT22, LOPLT10 */ _BM(32), _BM(22), _BM(10), /* _PCPLT32, _PCPLT22, _PCPLT10 */ _BM(10), _BM(11), -1, /* _10, _11, _64 */ - _BM(10), _BM(22), /* _OLO10, _HH22 */ + _BM(13), _BM(22), /* _OLO10, _HH22 */ _BM(10), _BM(22), /* _HM10, _LM22 */ _BM(22), _BM(10), _BM(22), /* _PC_HH22, _PC_HM10, _PC_LM22 */ _BM(16), _BM(19), /* _WDISP16, _WDISP19 */ -1,/* GLOB_JMP */ - _BM(7), _BM(5), _BM(6) /* _7, _5, _6 */ + _BM(7), _BM(5), _BM(6), /* _7, _5, _6 */ -1, -1,/* DISP64, PLT64 */ _BM(22), _BM(13), /* HIX22, LOX10 */ - _BM(22), _BM(10), _BM(13), /* H44, M44, L44 */ + _BM(22), _BM(10), _BM(12), /* H44, M44, L44 */ -1, -1, _BM(16), /* REGISTER, UA64, UA16 */ #undef _BM };
CVS commit: [netbsd-6-0] src/sys/lib/libsa
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:10:57 UTC 2016 Modified Files: src/sys/lib/libsa [netbsd-6-0]: checkpasswd.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1406): sys/lib/libsa/checkpasswd.c: revision 1.10 Check bounds on input. From Michael Plass. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.20.1 src/sys/lib/libsa/checkpasswd.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/lib/libsa/checkpasswd.c diff -u src/sys/lib/libsa/checkpasswd.c:1.9 src/sys/lib/libsa/checkpasswd.c:1.9.20.1 --- src/sys/lib/libsa/checkpasswd.c:1.9 Thu Jan 6 02:45:13 2011 +++ src/sys/lib/libsa/checkpasswd.c Sat Sep 24 13:10:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: checkpasswd.c,v 1.9 2011/01/06 02:45:13 jakllsch Exp $ */ +/* $NetBSD: checkpasswd.c,v 1.9.20.1 2016/09/24 13:10:57 bouyer Exp $ */ /*- * Copyright (c) 1993 @@ -84,8 +84,10 @@ getpass(const char *prompt) putchar('\n'); break; default: - *lp++ = c; - putchar('*'); + if ((size_t)(lp - buf) < sizeof(buf) - 1) { +*lp++ = c; +putchar('*'); + } break; } }
CVS commit: [netbsd-6] src/sys/lib/libsa
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:10:52 UTC 2016 Modified Files: src/sys/lib/libsa [netbsd-6]: checkpasswd.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1406): sys/lib/libsa/checkpasswd.c: revision 1.10 Check bounds on input. From Michael Plass. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.14.1 src/sys/lib/libsa/checkpasswd.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/lib/libsa/checkpasswd.c diff -u src/sys/lib/libsa/checkpasswd.c:1.9 src/sys/lib/libsa/checkpasswd.c:1.9.14.1 --- src/sys/lib/libsa/checkpasswd.c:1.9 Thu Jan 6 02:45:13 2011 +++ src/sys/lib/libsa/checkpasswd.c Sat Sep 24 13:10:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: checkpasswd.c,v 1.9 2011/01/06 02:45:13 jakllsch Exp $ */ +/* $NetBSD: checkpasswd.c,v 1.9.14.1 2016/09/24 13:10:52 bouyer Exp $ */ /*- * Copyright (c) 1993 @@ -84,8 +84,10 @@ getpass(const char *prompt) putchar('\n'); break; default: - *lp++ = c; - putchar('*'); + if ((size_t)(lp - buf) < sizeof(buf) - 1) { +*lp++ = c; +putchar('*'); + } break; } }
CVS commit: [netbsd-6-1] src/sys/lib/libsa
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:10:55 UTC 2016 Modified Files: src/sys/lib/libsa [netbsd-6-1]: checkpasswd.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1406): sys/lib/libsa/checkpasswd.c: revision 1.10 Check bounds on input. From Michael Plass. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.28.1 src/sys/lib/libsa/checkpasswd.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/lib/libsa/checkpasswd.c diff -u src/sys/lib/libsa/checkpasswd.c:1.9 src/sys/lib/libsa/checkpasswd.c:1.9.28.1 --- src/sys/lib/libsa/checkpasswd.c:1.9 Thu Jan 6 02:45:13 2011 +++ src/sys/lib/libsa/checkpasswd.c Sat Sep 24 13:10:55 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: checkpasswd.c,v 1.9 2011/01/06 02:45:13 jakllsch Exp $ */ +/* $NetBSD: checkpasswd.c,v 1.9.28.1 2016/09/24 13:10:55 bouyer Exp $ */ /*- * Copyright (c) 1993 @@ -84,8 +84,10 @@ getpass(const char *prompt) putchar('\n'); break; default: - *lp++ = c; - putchar('*'); + if ((size_t)(lp - buf) < sizeof(buf) - 1) { +*lp++ = c; +putchar('*'); + } break; } }
CVS commit: [netbsd-6] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:14:57 UTC 2016 Modified Files: src/sys/dev/pci [netbsd-6]: if_wm.c Log Message: Apply patch, requested by martin in ticket #1407: sys/dev/pci/if_wm.c patch fix evbppc build, where the older gcc wrongly warns about uninitialized variable. To generate a diff of this commit: cvs rdiff -u -r1.227.2.19 -r1.227.2.20 src/sys/dev/pci/if_wm.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/pci/if_wm.c diff -u src/sys/dev/pci/if_wm.c:1.227.2.19 src/sys/dev/pci/if_wm.c:1.227.2.20 --- src/sys/dev/pci/if_wm.c:1.227.2.19 Fri May 6 18:43:34 2016 +++ src/sys/dev/pci/if_wm.c Sat Sep 24 13:14:57 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_wm.c,v 1.227.2.19 2016/05/06 18:43:34 snj Exp $ */ +/* $NetBSD: if_wm.c,v 1.227.2.20 2016/09/24 13:14:57 bouyer Exp $ */ /* * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc. @@ -84,7 +84,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.19 2016/05/06 18:43:34 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.20 2016/09/24 13:14:57 bouyer Exp $"); #include #include @@ -6003,7 +6003,7 @@ wm_nvm_version_invm(struct wm_softc *sc) static void wm_nvm_version(struct wm_softc *sc) { - uint16_t major, minor, build, patch; + uint16_t major, minor, patch, build = 0; /* XXX old gcc */ uint16_t uid0, uid1; uint16_t nvm_data; uint16_t off;
CVS commit: [netbsd-6] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:18:43 UTC 2016 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6]: locore.s Log Message: Pull up following revision(s) (requested by nakayama in ticket #1408): sys/arch/sparc64/sparc64/locore.s: revision 1.401 Fix RAS for 32-bit kernels. trapframe is always 64-bit. To generate a diff of this commit: cvs rdiff -u -r1.338.8.7 -r1.338.8.8 src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.7 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.8 --- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.7 Sun Nov 15 21:02:13 2015 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Sep 24 13:18:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.338.8.7 2015/11/15 21:02:13 bouyer Exp $ */ +/* $NetBSD: locore.s,v 1.338.8.8 2016/09/24 13:18:43 bouyer Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5202,12 +5202,12 @@ ENTRY(cpu_switchto) brz,pt %o1, Lsw_noras ! no, skip RAS check LDPTR [%i1 + L_TF], %l3 ! pointer to trap frame call _C_LABEL(ras_lookup) - LDPTR [%l3 + TF_PC], %o1 + ldx [%l3 + TF_PC], %o1 cmp %o0, -1 - be,pt %xcc, Lsw_noras + be,pt CCCR, Lsw_noras add %o0, 4, %o1 - STPTR %o0, [%l3 + TF_PC] ! store rewound %pc - STPTR %o1, [%l3 + TF_NPC] ! and %npc + stx %o0, [%l3 + TF_PC] ! store rewound %pc + stx %o1, [%l3 + TF_NPC] ! and %npc Lsw_noras:
CVS commit: [netbsd-6-1] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:19:08 UTC 2016 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-1]: locore.s Log Message: Pull up following revision(s) (requested by nakayama in ticket #1408): sys/arch/sparc64/sparc64/locore.s: revision 1.401 Fix RAS for 32-bit kernels. trapframe is always 64-bit. To generate a diff of this commit: cvs rdiff -u -r1.338.8.4.2.2 -r1.338.8.4.2.3 \ src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4.2.2 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4.2.3 --- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.4.2.2 Sun Nov 15 21:02:22 2015 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Sep 24 13:19:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.338.8.4.2.2 2015/11/15 21:02:22 bouyer Exp $ */ +/* $NetBSD: locore.s,v 1.338.8.4.2.3 2016/09/24 13:19:08 bouyer Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5206,12 +5206,12 @@ ENTRY(cpu_switchto) brz,pt %o1, Lsw_noras ! no, skip RAS check LDPTR [%i1 + L_TF], %l3 ! pointer to trap frame call _C_LABEL(ras_lookup) - LDPTR [%l3 + TF_PC], %o1 + ldx [%l3 + TF_PC], %o1 cmp %o0, -1 - be,pt %xcc, Lsw_noras + be,pt CCCR, Lsw_noras add %o0, 4, %o1 - STPTR %o0, [%l3 + TF_PC] ! store rewound %pc - STPTR %o1, [%l3 + TF_NPC] ! and %npc + stx %o0, [%l3 + TF_PC] ! store rewound %pc + stx %o1, [%l3 + TF_NPC] ! and %npc Lsw_noras:
CVS commit: [netbsd-6-0] src/sys/arch/sparc64/sparc64
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:19:09 UTC 2016 Modified Files: src/sys/arch/sparc64/sparc64 [netbsd-6-0]: locore.s Log Message: Pull up following revision(s) (requested by nakayama in ticket #1408): sys/arch/sparc64/sparc64/locore.s: revision 1.401 Fix RAS for 32-bit kernels. trapframe is always 64-bit. To generate a diff of this commit: cvs rdiff -u -r1.338.8.2.4.2 -r1.338.8.2.4.3 \ src/sys/arch/sparc64/sparc64/locore.s 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/sparc64/sparc64/locore.s diff -u src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2.4.2 src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2.4.3 --- src/sys/arch/sparc64/sparc64/locore.s:1.338.8.2.4.2 Sun Nov 15 21:01:52 2015 +++ src/sys/arch/sparc64/sparc64/locore.s Sat Sep 24 13:19:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.338.8.2.4.2 2015/11/15 21:01:52 bouyer Exp $ */ +/* $NetBSD: locore.s,v 1.338.8.2.4.3 2016/09/24 13:19:09 bouyer Exp $ */ /* * Copyright (c) 2006-2010 Matthew R. Green @@ -5203,12 +5203,12 @@ ENTRY(cpu_switchto) brz,pt %o1, Lsw_noras ! no, skip RAS check LDPTR [%i1 + L_TF], %l3 ! pointer to trap frame call _C_LABEL(ras_lookup) - LDPTR [%l3 + TF_PC], %o1 + ldx [%l3 + TF_PC], %o1 cmp %o0, -1 - be,pt %xcc, Lsw_noras + be,pt CCCR, Lsw_noras add %o0, 4, %o1 - STPTR %o0, [%l3 + TF_PC] ! store rewound %pc - STPTR %o1, [%l3 + TF_NPC] ! and %npc + stx %o0, [%l3 + TF_PC] ! store rewound %pc + stx %o1, [%l3 + TF_NPC] ! and %npc Lsw_noras:
CVS commit: [netbsd-6-1] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:21:06 UTC 2016 Modified Files: src/sys/dev/pci [netbsd-6-1]: if_vioif.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1401): sys/dev/pci/if_vioif.c: revision 1.25 Fix initializing wrong queues Pointed out by Mike Larkin. PR kern/51448 To generate a diff of this commit: cvs rdiff -u -r1.2.8.1.2.1 -r1.2.8.1.2.2 src/sys/dev/pci/if_vioif.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/pci/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.2.8.1.2.1 src/sys/dev/pci/if_vioif.c:1.2.8.1.2.2 --- src/sys/dev/pci/if_vioif.c:1.2.8.1.2.1 Thu Aug 7 09:34:21 2014 +++ src/sys/dev/pci/if_vioif.c Sat Sep 24 13:21:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.2.8.1.2.1 2014/08/07 09:34:21 msaitoh Exp $ */ +/* $NetBSD: if_vioif.c,v 1.2.8.1.2.2 2016/09/24 13:21:06 bouyer Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2.8.1.2.1 2014/08/07 09:34:21 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2.8.1.2.2 2016/09/24 13:21:06 bouyer Exp $"); #include #include @@ -378,7 +378,7 @@ vioif_alloc_mems(struct vioif_softc *sc) } for (i = 0; i < txqsize; i++) { - C_L1(txhdr_dmamaps[i], rx_hdrs[i], + C_L1(txhdr_dmamaps[i], tx_hdrs[i], sizeof(struct virtio_net_hdr), 1, WRITE, "tx header"); C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 256 /* XXX */, 0,
CVS commit: [netbsd-6-0] src/sys/dev/pci
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:21:10 UTC 2016 Modified Files: src/sys/dev/pci [netbsd-6-0]: if_vioif.c Log Message: Pull up following revision(s) (requested by ozaki-r in ticket #1401): sys/dev/pci/if_vioif.c: revision 1.25 Fix initializing wrong queues Pointed out by Mike Larkin. PR kern/51448 To generate a diff of this commit: cvs rdiff -u -r1.2.14.2 -r1.2.14.3 src/sys/dev/pci/if_vioif.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/pci/if_vioif.c diff -u src/sys/dev/pci/if_vioif.c:1.2.14.2 src/sys/dev/pci/if_vioif.c:1.2.14.3 --- src/sys/dev/pci/if_vioif.c:1.2.14.2 Thu Aug 7 09:35:22 2014 +++ src/sys/dev/pci/if_vioif.c Sat Sep 24 13:21:10 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: if_vioif.c,v 1.2.14.2 2014/08/07 09:35:22 msaitoh Exp $ */ +/* $NetBSD: if_vioif.c,v 1.2.14.3 2016/09/24 13:21:10 bouyer Exp $ */ /* * Copyright (c) 2010 Minoura Makoto. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2.14.2 2014/08/07 09:35:22 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.2.14.3 2016/09/24 13:21:10 bouyer Exp $"); #include #include @@ -378,7 +378,7 @@ vioif_alloc_mems(struct vioif_softc *sc) } for (i = 0; i < txqsize; i++) { - C_L1(txhdr_dmamaps[i], rx_hdrs[i], + C_L1(txhdr_dmamaps[i], tx_hdrs[i], sizeof(struct virtio_net_hdr), 1, WRITE, "tx header"); C(tx_dmamaps[i], NULL, ETHER_MAX_LEN, 256 /* XXX */, 0,
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:24:36 UTC 2016 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: tickets 1401, 1403, 1405, 1406, 1408 To generate a diff of this commit: cvs rdiff -u -r1.1.2.74 -r1.1.2.75 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.74 src/doc/CHANGES-6.1.6:1.1.2.75 --- src/doc/CHANGES-6.1.6:1.1.2.74 Sun Aug 28 10:49:38 2016 +++ src/doc/CHANGES-6.1.6 Sat Sep 24 13:24:36 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.74 2016/08/28 10:49:38 bouyer Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.75 2016/09/24 13:24:36 bouyer Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -8446,3 +8446,33 @@ sys/arch/i386/stand/misc/rawr32.exe.uue New Rawrite32 release [martin, ticket #1385] + +sys/dev/pci/if_vioif.c1.25 + + Fix initializing wrong queue, pointed out by Mike Larkin. + PR kern/51448 + [ozaki-r, ticket #1401] + +etc/namedb/root.cache1.21 + + Update root.cache to 2016/8/25 version, l.root-servers.net has + record now. + [taca, ticket #1403] + +sys/arch/sparc64/sparc64/kobj_machdep.c 1.5, 1.6 + + Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. + The target of the OLO10 relocation is the simd13 field of the + instruction, so use a 13 bit target mask. + Fixes PR kern/51436 (I broke this myself in rev 1.4) + [martin, ticket #1405] + +sys/lib/libsa/checkpasswd.c 1.10 + + Check bounds on input. From Michael Plass. + [dholland, ticket #1406] + +sys/arch/sparc64/sparc64/locore.s 1.401 + + Fix RAS for 32-bit kernels. trapframe is always 64-bit. + [nakayama, ticket #1408]
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:24:43 UTC 2016 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: tickets 1401, 1403, 1405, 1406, 1408 To generate a diff of this commit: cvs rdiff -u -r1.1.2.76 -r1.1.2.77 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.76 src/doc/CHANGES-6.0.7:1.1.2.77 --- src/doc/CHANGES-6.0.7:1.1.2.76 Sun Aug 28 10:49:31 2016 +++ src/doc/CHANGES-6.0.7 Sat Sep 24 13:24:43 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.76 2016/08/28 10:49:31 bouyer Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.77 2016/09/24 13:24:43 bouyer Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -8726,3 +8726,33 @@ sys/arch/i386/stand/misc/rawr32.exe.uue New Rawrite32 release [martin, ticket #1385] +sys/dev/pci/if_vioif.c1.25 + + Fix initializing wrong queue, pointed out by Mike Larkin. + PR kern/51448 + [ozaki-r, ticket #1401] + +etc/namedb/root.cache1.21 + + Update root.cache to 2016/8/25 version, l.root-servers.net has + record now. + [taca, ticket #1403] + +sys/arch/sparc64/sparc64/kobj_machdep.c 1.5, 1.6 + + Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. + The target of the OLO10 relocation is the simd13 field of the + instruction, so use a 13 bit target mask. + Fixes PR kern/51436 (I broke this myself in rev 1.4) + [martin, ticket #1405] + +sys/lib/libsa/checkpasswd.c 1.10 + + Check bounds on input. From Michael Plass. + [dholland, ticket #1406] + +sys/arch/sparc64/sparc64/locore.s 1.401 + + Fix RAS for 32-bit kernels. trapframe is always 64-bit. + [nakayama, ticket #1408] +
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: bouyer Date: Sat Sep 24 13:25:33 UTC 2016 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: tickets 1401, 1403, 1404, 1405, 1406, 1407, 1408 To generate a diff of this commit: cvs rdiff -u -r1.1.2.263 -r1.1.2.264 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.263 src/doc/CHANGES-6.2:1.1.2.264 --- src/doc/CHANGES-6.2:1.1.2.263 Sat Sep 3 11:36:54 2016 +++ src/doc/CHANGES-6.2 Sat Sep 24 13:25:33 2016 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.263 2016/09/03 11:36:54 bouyer Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.264 2016/09/24 13:25:33 bouyer Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -14759,3 +14759,46 @@ sys/net80211/ieee80211_input.c 1.83, 1 interface is in promiscous mode or doesn't filter packets itself. [mlelstv, ticket #1382] +sys/dev/pci/if_vioif.c1.25 + + Fix initializing wrong queues, pointed out by Mike Larkin. + Fixes PR kern/51448 + [ozaki-r, ticket #1401] + +etc/namedb/root.cache1.21 + + Update root.cache to 2016/8/25 version, l.root-servers.net has + record now. + [taca, ticket #1403] + +lib/libc/gen/glob.c1.36 + + Bump the glob limits to 512KB for total string size and 64K path + entries. The old limits were too small for some important FTP use cases + like a pkgsrc repository. + [joerg, ticket #1404] + +sys/arch/sparc64/sparc64/kobj_machdep.c 1.5, 1.6 + + Follow rev. 1.54, 1.55 of libexec/ld.elf_so/arch/sparc64/mdreloc.c. + The target of the OLO10 relocation is the simd13 field of the + instruction, so use a 13 bit target mask. + Fixes PR kern/51436 (I broke this myself in rev 1.4) + [martin, ticket #1405] + +sys/lib/libsa/checkpasswd.c 1.10 + + Check bounds on input. From Michael Plass. + [dholland, ticket #1406] + +sys/dev/pci/if_wm.c patch + + fix evbppc build, where the older gcc wrongly warns about uninitialized + variable. + [martin, ticket #1407] + +sys/arch/sparc64/sparc64/locore.s 1.401 + + Fix RAS for 32-bit kernels. trapframe is always 64-bit. + [nakayama, ticket #1408] +
CVS commit: src/sbin/gpt
Module Name:src Committed By: christos Date: Sat Sep 24 13:40:55 UTC 2016 Modified Files: src/sbin/gpt: gpt.c Log Message: say that you need to destroy it first. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sbin/gpt/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/sbin/gpt/gpt.c diff -u src/sbin/gpt/gpt.c:1.68 src/sbin/gpt/gpt.c:1.69 --- src/sbin/gpt/gpt.c:1.68 Thu Jun 9 11:12:54 2016 +++ src/sbin/gpt/gpt.c Sat Sep 24 09:40:55 2016 @@ -35,7 +35,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/gpt.c,v 1.16 2006/07/07 02:44:23 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: gpt.c,v 1.68 2016/06/09 15:12:54 christos Exp $"); +__RCSID("$NetBSD: gpt.c,v 1.69 2016/09/24 13:40:55 christos Exp $"); #endif #include @@ -795,7 +795,8 @@ gpt_create(gpt_t gpt, off_t last, u_int if (map_find(gpt, MAP_TYPE_PRI_GPT_HDR) != NULL || map_find(gpt, MAP_TYPE_SEC_GPT_HDR) != NULL) { - gpt_warnx(gpt, "Device already contains a GPT"); + gpt_warnx(gpt, "Device already contains a GPT, " + "destroy it first"); return -1; }
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Sat Sep 24 14:55:17 UTC 2016 Modified Files: src/sys/dev/ic: sl811hsreg.h Log Message: Use bit defines to create bit groups for SL11_EPSTAT To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/dev/ic/sl811hsreg.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/dev/ic/sl811hsreg.h diff -u src/sys/dev/ic/sl811hsreg.h:1.4 src/sys/dev/ic/sl811hsreg.h:1.5 --- src/sys/dev/ic/sl811hsreg.h:1.4 Sun Sep 22 06:54:35 2013 +++ src/sys/dev/ic/sl811hsreg.h Sat Sep 24 14:55:16 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hsreg.h,v 1.4 2013/09/22 06:54:35 skrll Exp $ */ +/* $NetBSD: sl811hsreg.h,v 1.5 2016/09/24 14:55:16 skrll Exp $ */ /* * Not (c) 2007 Matthew Orgass @@ -76,8 +76,23 @@ #define SL11_EPSTAT_OVERFLOW (0x20) #define SL11_EPSTAT_NAK (0x40) #define SL11_EPSTAT_STALL (0x80) -#define SL11_EPSTAT_STATBITS (0xf7) -#define SL11_EPSTAT_ERRBITS (0xf6) +#define SL11_EPSTAT_STATBITS ( \ +SL11_EPSTAT_ACK | \ +SL11_EPSTAT_ERROR | \ +SL11_EPSTAT_TIMEOUT | \ +SL11_EPSTAT_SETUP | \ +SL11_EPSTAT_OVERFLOW | \ +SL11_EPSTAT_NAK | \ +SL11_EPSTAT_STALL \ +) +#define SL11_EPSTAT_ERRBITS ( \ +SL11_EPSTAT_ERROR | \ +SL11_EPSTAT_TIMEOUT | \ +SL11_EPSTAT_SETUP | \ +SL11_EPSTAT_OVERFLOW | \ +SL11_EPSTAT_NAK | \ +SL11_EPSTAT_STALL \ +) #define SL11_CTRL_ENABLESOF (0x01) /* #define SL11_CTRL_EOF2 (0x04) XXX ? Reserved in 1.5 */
CVS commit: src/sys/dev/ic
Module Name:src Committed By: skrll Date: Sat Sep 24 15:06:29 UTC 2016 Modified Files: src/sys/dev/ic: sl811hs.c sl811hsreg.h Log Message: Truncate the transfer length if an overflow is seen rather than halting. Don't consider an EP11_STAT_SETUP as an error as it's not valid for host operation. Should fix kern/51500: axe(4) at slhci(4) does not attach, but there are more problems with axe(4) To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/sys/dev/ic/sl811hs.c cvs rdiff -u -r1.5 -r1.6 src/sys/dev/ic/sl811hsreg.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/dev/ic/sl811hs.c diff -u src/sys/dev/ic/sl811hs.c:1.95 src/sys/dev/ic/sl811hs.c:1.96 --- src/sys/dev/ic/sl811hs.c:1.95 Thu Sep 15 21:45:37 2016 +++ src/sys/dev/ic/sl811hs.c Sat Sep 24 15:06:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hs.c,v 1.95 2016/09/15 21:45:37 jdolecek Exp $ */ +/* $NetBSD: sl811hs.c,v 1.96 2016/09/24 15:06:29 skrll Exp $ */ /* * Not (c) 2007 Matthew Orgass @@ -68,7 +68,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.95 2016/09/15 21:45:37 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sl811hs.c,v 1.96 2016/09/24 15:06:29 skrll Exp $"); #ifdef _KERNEL_OPT #include "opt_slhci.h" @@ -2047,24 +2047,21 @@ slhci_abdone(struct slhci_softc *sc, int #endif if (!(status & SL11_EPSTAT_ERRBITS)) { - unsigned int cont; - cont = slhci_read(sc, slhci_tregs[ab][CONT]); - if (cont != 0) - DLOG(D_XFER, "cont %d len %d", cont, - spipe->tregs[LEN], 0,0); - if (__predict_false(cont > spipe->tregs[LEN])) { - DDOLOG("cont > len! cont %d len %d xfer->ux_length %d " - "spipe %p", cont, spipe->tregs[LEN], xfer->ux_length, - spipe); - printf("%s: cont > len! cont %d len %d xfer->ux_length " - "%d", SC_NAME(sc), cont, spipe->tregs[LEN], - xfer->ux_length); - slhci_halt(sc, spipe, xfer); - return; + unsigned int cont = slhci_read(sc, slhci_tregs[ab][CONT]); + unsigned int len = spipe->tregs[LEN]; + DLOG(D_XFER, "cont %d len %d", cont, len, 0, 0); + if ((status & SL11_EPSTAT_OVERFLOW) || cont > len) { + DDOLOG("overflow - cont %d len %d xfer->ux_length %d " + "xfer->actlen %d", cont, len, xfer->ux_length, + xfer->ux_actlen); + printf("%s: overflow cont %d len %d xfer->ux_length" + " %d xfer->ux_actlen %d\n", SC_NAME(sc), cont, + len, xfer->ux_length, xfer->ux_actlen); + actlen = len; } else { - spipe->nerrs = 0; - actlen = spipe->tregs[LEN] - cont; + actlen = len - cont; } + spipe->nerrs = 0; } /* Actual copyin done after starting next transfer. */ @@ -2120,16 +2117,6 @@ slhci_abdone(struct slhci_softc *sc, int 0); DDOLOGSTATUS(status); - if (status & SL11_EPSTAT_OVERFLOW && - ratecheck(&sc->sc_overflow_warn_rate, - &overflow_warn_rate)) { -printf("%s: Overflow condition: " -"data corruption possible\n", -SC_NAME(sc)); -DDOLOG("Overflow condition: " -"data corruption possible", -0, 0, 0, 0); - } head = Q_CALLBACKS; } else { head = Q_NEXT_CB; Index: src/sys/dev/ic/sl811hsreg.h diff -u src/sys/dev/ic/sl811hsreg.h:1.5 src/sys/dev/ic/sl811hsreg.h:1.6 --- src/sys/dev/ic/sl811hsreg.h:1.5 Sat Sep 24 14:55:16 2016 +++ src/sys/dev/ic/sl811hsreg.h Sat Sep 24 15:06:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sl811hsreg.h,v 1.5 2016/09/24 14:55:16 skrll Exp $ */ +/* $NetBSD: sl811hsreg.h,v 1.6 2016/09/24 15:06:29 skrll Exp $ */ /* * Not (c) 2007 Matthew Orgass @@ -88,8 +88,6 @@ #define SL11_EPSTAT_ERRBITS ( \ SL11_EPSTAT_ERROR | \ SL11_EPSTAT_TIMEOUT | \ -SL11_EPSTAT_SETUP | \ -SL11_EPSTAT_OVERFLOW | \ SL11_EPSTAT_NAK | \ SL11_EPSTAT_STALL \ )
CVS commit: src/lib/libc/db/hash
Module Name:src Committed By: christos Date: Sat Sep 24 20:08:29 UTC 2016 Modified Files: src/lib/libc/db/hash: hash_page.c Log Message: When writing out pages in the "other endian" format, make a copy instead of trashing the in-memory one. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/lib/libc/db/hash/hash_page.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/db/hash/hash_page.c diff -u src/lib/libc/db/hash/hash_page.c:1.28 src/lib/libc/db/hash/hash_page.c:1.29 --- src/lib/libc/db/hash/hash_page.c:1.28 Wed Nov 18 13:22:42 2015 +++ src/lib/libc/db/hash/hash_page.c Sat Sep 24 16:08:29 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: hash_page.c,v 1.28 2015/11/18 18:22:42 christos Exp $ */ +/* $NetBSD: hash_page.c,v 1.29 2016/09/24 20:08:29 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #endif #include -__RCSID("$NetBSD: hash_page.c,v 1.28 2015/11/18 18:22:42 christos Exp $"); +__RCSID("$NetBSD: hash_page.c,v 1.29 2016/09/24 20:08:29 christos Exp $"); /* * PACKAGE: hashing @@ -593,6 +593,7 @@ __put_page(HTAB *hashp, char *p, uint32_ { int fd, page, size; ssize_t wsize; + char pbuf[MAX_BSIZE]; size = HASH_BSIZE(hashp); if ((hashp->fp == -1) && (hashp->fp = __dbtemp("_hash", NULL)) == -1) @@ -603,15 +604,18 @@ __put_page(HTAB *hashp, char *p, uint32_ int i; int max; + memcpy(pbuf, p, size); if (is_bitmap) { max = (uint32_t)hashp->BSIZE >> 2; /* divide by 4 */ for (i = 0; i < max; i++) -M_32_SWAP(((int *)(void *)p)[i]); +M_32_SWAP(((int *)(void *)pbuf)[i]); } else { - max = ((uint16_t *)(void *)p)[0] + 2; + uint16_t *bp = (uint16_t *)(void *)pbuf; + max = bp[0] + 2; for (i = 0; i <= max; i++) -M_16_SWAP(((uint16_t *)(void *)p)[i]); +M_16_SWAP(bp[i]); } + p = pbuf; } if (is_bucket) page = BUCKET_TO_PAGE(bucket);
CVS commit: src/lib/libc/db
Module Name:src Committed By: christos Date: Sat Sep 24 20:11:12 UTC 2016 Modified Files: src/lib/libc/db/btree: bt_close.c bt_conv.c bt_debug.c bt_delete.c bt_open.c bt_overflow.c bt_page.c bt_put.c bt_search.c bt_seq.c bt_split.c extern.h src/lib/libc/db/mpool: mpool.c src/lib/libc/db/recno: rec_open.c rec_search.c Log Message: Merge the recursive tree traversal changes from the mit kerberos tree. This Also make the tracefile customizable. Unfortunately we can't merge any of the hash changes because they have a different on-disk format. That does not matter really because we've fixed most of the problems... To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/db/btree/bt_close.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/btree/bt_conv.c cvs rdiff -u -r1.16 -r1.17 src/lib/libc/db/btree/bt_debug.c cvs rdiff -u -r1.17 -r1.18 src/lib/libc/db/btree/bt_delete.c \ src/lib/libc/db/btree/bt_search.c cvs rdiff -u -r1.27 -r1.28 src/lib/libc/db/btree/bt_open.c cvs rdiff -u -r1.20 -r1.21 src/lib/libc/db/btree/bt_overflow.c \ src/lib/libc/db/btree/bt_put.c src/lib/libc/db/btree/bt_split.c cvs rdiff -u -r1.13 -r1.14 src/lib/libc/db/btree/bt_page.c cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/btree/bt_seq.c cvs rdiff -u -r1.12 -r1.13 src/lib/libc/db/btree/extern.h cvs rdiff -u -r1.21 -r1.22 src/lib/libc/db/mpool/mpool.c cvs rdiff -u -r1.20 -r1.21 src/lib/libc/db/recno/rec_open.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/recno/rec_search.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/db/btree/bt_close.c diff -u src/lib/libc/db/btree/bt_close.c:1.15 src/lib/libc/db/btree/bt_close.c:1.16 --- src/lib/libc/db/btree/bt_close.c:1.15 Wed Aug 31 02:23:51 2016 +++ src/lib/libc/db/btree/bt_close.c Sat Sep 24 16:11:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_close.c,v 1.15 2016/08/31 06:23:51 christos Exp $ */ +/* $NetBSD: bt_close.c,v 1.16 2016/09/24 20:11:12 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #endif #include -__RCSID("$NetBSD: bt_close.c,v 1.15 2016/08/31 06:23:51 christos Exp $"); +__RCSID("$NetBSD: bt_close.c,v 1.16 2016/09/24 20:11:12 christos Exp $"); #include "namespace.h" @@ -164,7 +164,7 @@ bt_meta(BTREE *t) BTMETA m; void *p; - if ((p = mpool_get(t->bt_mp, P_META, 0)) == NULL) + if ((p = mpool_getf(t->bt_mp, P_META, 0)) == NULL) return (RET_ERROR); /* Fill in metadata. */ Index: src/lib/libc/db/btree/bt_conv.c diff -u src/lib/libc/db/btree/bt_conv.c:1.14 src/lib/libc/db/btree/bt_conv.c:1.15 --- src/lib/libc/db/btree/bt_conv.c:1.14 Wed Sep 10 13:52:35 2008 +++ src/lib/libc/db/btree/bt_conv.c Sat Sep 24 16:11:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_conv.c,v 1.14 2008/09/10 17:52:35 joerg Exp $ */ +/* $NetBSD: bt_conv.c,v 1.15 2016/09/24 20:11:12 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,10 +37,11 @@ #endif #include -__RCSID("$NetBSD: bt_conv.c,v 1.14 2008/09/10 17:52:35 joerg Exp $"); +__RCSID("$NetBSD: bt_conv.c,v 1.15 2016/09/24 20:11:12 christos Exp $"); #include #include +#include #include #include "btree.h" @@ -64,6 +65,7 @@ __bt_pgin(void *t, pgno_t pg, void *pp) indx_t i, top; uint8_t flags; char *p; + uint32_t ksize; if (!F_ISSET(((BTREE *)t), B_NEEDSWAP)) return; @@ -101,6 +103,7 @@ __bt_pgin(void *t, pgno_t pg, void *pp) M_16_SWAP(h->linp[i]); p = (char *)(void *)GETBLEAF(h, i); P_32_SWAP(p); + memcpy(&ksize, p, sizeof(ksize)); p += sizeof(uint32_t); P_32_SWAP(p); p += sizeof(uint32_t); @@ -113,7 +116,7 @@ __bt_pgin(void *t, pgno_t pg, void *pp) P_32_SWAP(p); } if (flags & P_BIGDATA) { - p += sizeof(uint32_t); + p += ksize; P_32_SWAP(p); p += sizeof(pgno_t); P_32_SWAP(p); @@ -129,6 +132,7 @@ __bt_pgout(void *t, pgno_t pg, void *pp) indx_t i, top; uint8_t flags; char *p; + uint32_t ksize; if (!F_ISSET(((BTREE *)t), B_NEEDSWAP)) return; @@ -157,6 +161,7 @@ __bt_pgout(void *t, pgno_t pg, void *pp) else if ((h->flags & P_TYPE) == P_BLEAF) for (i = 0; i < top; i++) { p = (char *)(void *)GETBLEAF(h, i); + ksize = GETBLEAF(h, i)->ksize; P_32_SWAP(p); p += sizeof(uint32_t); P_32_SWAP(p); @@ -170,7 +175,7 @@ __bt_pgout(void *t, pgno_t pg, void *pp) P_32_SWAP(p); } if (flags & P_BIGDATA) { - p += sizeof(uint32_t); + p += ksize; P_32_SWAP(p); p += sizeof(pgno_t); P_32_SWAP(p); Index: src/lib/libc/db/btree/bt_debug.c diff -u src/lib/libc/db/btree/bt_debug.c:1.16 src/lib/libc/db/btree/bt_debug.c:1.17 --- src/lib/libc/db/btree/bt_debug.c:1.16 Sun Jul 17 16:47:39 2011 +++ src/lib/libc/db/btree/bt_debug.c Sat Sep 24 16:11:12 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_debug.c,v 1.16 2011/07/17 20:47:39 christos Exp $ */ +/* $NetBSD: bt_debug.c,v 1.17 2016/09/24 20:11:12 christos
CVS commit: src/include
Module Name:src Committed By: christos Date: Sat Sep 24 20:11:43 UTC 2016 Modified Files: src/include: db.h mpool.h Log Message: sync with mit/kerberos db To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/include/db.h cvs rdiff -u -r1.14 -r1.15 src/include/mpool.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/db.h diff -u src/include/db.h:1.26 src/include/db.h:1.27 --- src/include/db.h:1.26 Sat Nov 30 19:23:11 2013 +++ src/include/db.h Sat Sep 24 16:11:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: db.h,v 1.26 2013/12/01 00:23:11 christos Exp $ */ +/* $NetBSD: db.h,v 1.27 2016/09/24 20:11:43 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -69,6 +69,23 @@ typedef struct { #define R_SETCURSOR 10 /* put (RECNO) */ #define R_RECNOSYNC 11 /* sync (RECNO) */ +/* + * Recursive sequential scan. + * + * This avoids using sibling pointers, permitting (possibly partial) + * recovery from some kinds of btree corruption. Start a sequential + * scan as usual, but use R_RNEXT or R_RPREV to move forward or + * backward. + * + * This probably doesn't work with btrees that allow duplicate keys. + * Database modifications during the scan can also modify the parent + * page stack needed for correct functioning. Intermixing + * non-recursive traversal by using R_NEXT or R_PREV can also make the + * page stack inconsistent with the cursor and cause problems. + */ +#define R_RNEXT 128 /* seq (BTREE, RECNO) */ +#define R_RPREV 129 /* seq (BTREE, RECNO) */ + typedef enum { DB_BTREE, DB_HASH, DB_RECNO } DBTYPE; /* Index: src/include/mpool.h diff -u src/include/mpool.h:1.14 src/include/mpool.h:1.15 --- src/include/mpool.h:1.14 Fri Nov 22 11:25:01 2013 +++ src/include/mpool.h Sat Sep 24 16:11:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mpool.h,v 1.14 2013/11/22 16:25:01 christos Exp $ */ +/* $NetBSD: mpool.h,v 1.15 2016/09/24 20:11:43 christos Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -56,6 +56,7 @@ typedef struct _bkt { #define MPOOL_DIRTY 0x01 /* page needs to be written */ #define MPOOL_PINNED 0x02 /* page is pinned into memory */ +#define MPOOL_INUSE 0x04 /* page address is valid */ uint8_t flags; /* flags */ } BKT; @@ -86,12 +87,23 @@ typedef struct MPOOL { #endif } MPOOL; +/* flags for get/put */ +#define MPOOL_IGNOREPIN 0x01 /* Ignore if the page is pinned. */ +/* flags for newf */ +#define MPOOL_PAGE_REQUEST 0x01 /* Allocate a new page with a + specific page number. */ +#define MPOOL_PAGE_NEXT 0x02 /* Allocate a new page with the next + page number. */ + __BEGIN_DECLS MPOOL *mpool_open(void *, int, pgno_t, pgno_t); void mpool_filter(MPOOL *, void (*)(void *, pgno_t, void *), void (*)(void *, pgno_t, void *), void *); void *mpool_new(MPOOL *, pgno_t *); -void *mpool_get(MPOOL *, pgno_t, unsigned int); +void *mpool_newf(MPOOL *, pgno_t *, unsigned int); +int mpool_delete(MPOOL *, void *); +void *mpool_get(MPOOL *, pgno_t); +void *mpool_getf(MPOOL *, pgno_t, unsigned int); int mpool_put(MPOOL *, void *, unsigned int); int mpool_sync(MPOOL *); int mpool_close(MPOOL *);
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Sat Sep 24 20:12:07 UTC 2016 Modified Files: src/lib/libc: shlib_version src/lib/libc/include: namespace.h Log Message: bump for the flags version of db routines To generate a diff of this commit: cvs rdiff -u -r1.268 -r1.269 src/lib/libc/shlib_version cvs rdiff -u -r1.180 -r1.181 src/lib/libc/include/namespace.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/libc/shlib_version diff -u src/lib/libc/shlib_version:1.268 src/lib/libc/shlib_version:1.269 --- src/lib/libc/shlib_version:1.268 Wed Sep 21 06:54:36 2016 +++ src/lib/libc/shlib_version Sat Sep 24 16:12:07 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shlib_version,v 1.268 2016/09/21 10:54:36 roy Exp $ +# $NetBSD: shlib_version,v 1.269 2016/09/24 20:12:07 christos Exp $ # Remember to update distrib/sets/lists/base/shl.* when changing # # things we wish to do on next major version bump: @@ -46,4 +46,4 @@ # - stop all math functions from setting errno # - boot obsolete signal functions to libcompat major=12 -minor=204 +minor=205 Index: src/lib/libc/include/namespace.h diff -u src/lib/libc/include/namespace.h:1.180 src/lib/libc/include/namespace.h:1.181 --- src/lib/libc/include/namespace.h:1.180 Sat Apr 2 20:19:42 2016 +++ src/lib/libc/include/namespace.h Sat Sep 24 16:12:07 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.180 2016/04/03 00:19:42 christos Exp $ */ +/* $NetBSD: namespace.h,v 1.181 2016/09/24 20:12:07 christos Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -489,7 +489,9 @@ #define mpool_close _mpool_close #define mpool_filter _mpool_filter #define mpool_get _mpool_get +#define mpool_getf _mpool_getf #define mpool_new _mpool_new +#define mpool_newf _mpool_newf #define mpool_open _mpool_open #define mpool_put _mpool_put #define mpool_sync _mpool_sync
CVS commit: src/tests/lib/libc/db
Module Name:src Committed By: christos Date: Sat Sep 24 20:12:33 UTC 2016 Modified Files: src/tests/lib/libc/db: Makefile h_db.c t_db.sh Log Message: Add more of the torture tests from the mit kerberos tree. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libc/db/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/db/h_db.c cvs rdiff -u -r1.6 -r1.7 src/tests/lib/libc/db/t_db.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/lib/libc/db/Makefile diff -u src/tests/lib/libc/db/Makefile:1.3 src/tests/lib/libc/db/Makefile:1.4 --- src/tests/lib/libc/db/Makefile:1.3 Wed Nov 18 13:35:35 2015 +++ src/tests/lib/libc/db/Makefile Sat Sep 24 16:12:33 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2015/11/18 18:35:35 christos Exp $ +# $NetBSD: Makefile,v 1.4 2016/09/24 20:12:33 christos Exp $ .include @@ -13,6 +13,7 @@ MKMAN= no PROGS+= h_db PROGS+= h_lfsr +CPPFLAGS.h_db.c += -I${NETBSDSRCDIR}/lib/libc/db/btree FILESDIR= ${TESTSDIR} Index: src/tests/lib/libc/db/h_db.c diff -u src/tests/lib/libc/db/h_db.c:1.1 src/tests/lib/libc/db/h_db.c:1.2 --- src/tests/lib/libc/db/h_db.c:1.1 Fri Jan 7 10:05:58 2011 +++ src/tests/lib/libc/db/h_db.c Sat Sep 24 16:12:33 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: h_db.c,v 1.1 2011/01/07 15:05:58 pgoyette Exp $ */ +/* $NetBSD: h_db.c,v 1.2 2016/09/24 20:12:33 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94"; #else -__RCSID("$NetBSD: h_db.c,v 1.1 2011/01/07 15:05:58 pgoyette Exp $"); +__RCSID("$NetBSD: h_db.c,v 1.2 2016/09/24 20:12:33 christos Exp $"); #endif #endif /* not lint */ @@ -57,12 +57,13 @@ __RCSID("$NetBSD: h_db.c,v 1.1 2011/01/0 #include #include #include +#include "btree.h" enum S { COMMAND, COMPARE, GET, PUT, REMOVE, SEQ, SEQFLAG, KEY, DATA }; static void compare(DBT *, DBT *); static DBTYPE dbtype(const char *); -static void dump(DB *, int); +static void dump(DB *, int, int); static void get(DB *, DBT *); static void getdata(DB *, DBT *, DBT *); static void put(DB *, DBT *, DBT *); @@ -73,6 +74,7 @@ static void *rfile(char *, size_t *); static void seq(DB *, DBT *); static u_int setflags(char *); static void *setinfo(DBTYPE, char *); +static void unlinkpg(DB *); static void usage(void) __attribute__((__noreturn__)); static void *xcopy(void *, size_t); static void chkcmd(enum S); @@ -82,6 +84,7 @@ static void chkkey(enum S); #ifdef STATISTICS extern void __bt_stat(DB *); #endif +extern int __bt_relink(BTREE *, PAGE *); static DBTYPE type; /* Database type. */ static void *infop; /* Iflags. */ @@ -315,7 +318,13 @@ lkey: switch (command) { } break; case 'o': - dump(dbp, p[1] == 'r'); + dump(dbp, p[1] == 'r', 0); + break; + case 'O': + dump(dbp, p[1] == 'r', 1); + break; + case 'u': + unlinkpg(dbp); break; default: errx(1, "line %zu: %s: unknown command character", @@ -483,17 +492,17 @@ seq(DB *dbp, DBT *kp) } static void -dump(DB *dbp, int rev) +dump(DB *dbp, int rev, int recurse) { DBT key, data; int xflags, nflags; if (rev) { xflags = R_LAST; - nflags = R_PREV; + nflags = recurse ? R_RPREV : R_PREV; } else { xflags = R_FIRST; - nflags = R_NEXT; + nflags = recurse ? R_RNEXT : R_NEXT; } for (;; xflags = nflags) switch (dbp->seq(dbp, &key, &data, xflags)) { @@ -511,6 +520,40 @@ dump(DB *dbp, int rev) done: return; } +void +unlinkpg(DB *dbp) +{ + BTREE *t = dbp->internal; + PAGE *h = NULL; + pgno_t pg; + + for (pg = P_ROOT; pg < t->bt_mp->npages; + mpool_put(t->bt_mp, h, 0), pg++) { + if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL) + break; + /* Look for a nonempty leaf page that has both left + * and right siblings. */ + if (h->prevpg == P_INVALID || h->nextpg == P_INVALID) + continue; + if (NEXTINDEX(h) == 0) + continue; + if ((h->flags & (P_BLEAF | P_RLEAF))) + break; + } + if (h == NULL || pg == t->bt_mp->npages) { + errx(1, "%s: no appropriate page found", __func__); + return; + } + if (__bt_relink(t, h) != 0) { + perror("unlinkpg"); + goto cleanup; + } + h->prevpg = P_INVALID; + h->nextpg = P_INVALID; +cleanup: + mpool_put(t->bt_mp, h, MPOOL_DIRTY); +} + static u_int setflags(char *s) { @@ -725,7 +768,7 @@ static void usage(void) { (void)fprintf(stderr, - "Usage: %s [-l] [-f file] [-i info] [-o file] type script\n", - getprogname()); + "Usage: %s [-lu] [-f file] [-i info] [-o file] [-O file] " + "type script\n", getprogname()); exit(1); } Index: src/tests/lib/libc/db/t_db.sh diff -u src/tests/lib/libc/db/t_db.sh:1.6 src/tests/lib/libc/db/t_db.sh:1.7 --- src/tests/lib/libc/db/t_db.sh:1.6 Wed Nov 18 13:35:35 2015 +++ src/tests/lib/libc/db/t_db.sh Sat Sep 24 16:12:33 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_db.sh,
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Sat Sep 24 20:13:48 UTC 2016 Modified Files: src/distrib/sets/lists/base: mi shl.mi src/distrib/sets/lists/debug: shl.mi Log Message: bump libc To generate a diff of this commit: cvs rdiff -u -r1.1134 -r1.1135 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.785 -r1.786 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.145 -r1.146 src/distrib/sets/lists/debug/shl.mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1134 src/distrib/sets/lists/base/mi:1.1135 --- src/distrib/sets/lists/base/mi:1.1134 Sat Aug 20 07:34:49 2016 +++ src/distrib/sets/lists/base/mi Sat Sep 24 16:13:48 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1134 2016/08/20 11:34:49 christos Exp $ +# $NetBSD: mi,v 1.1135 2016/09/24 20:13:48 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -105,6 +105,7 @@ ./etc/mtree base-sys-root ./etc/mtree/set.basebase-sys-root ./etc/namedb base-bind-root +./etc/nsd base-sys-root ./etc/obsolete base-obsolete obsolete ./etc/openldap base-ldap-root ./etc/openssl base-crypto-root @@ -5897,6 +5898,12 @@ ./var/chroot/named/var/run/lwresd base-bind-root ./var/chroot/named/var/run/named base-bind-root ./var/chroot/named/var/tmp base-bind-root +./var/chroot/nsdbase-sys-root +./var/chroot/nsd/etcbase-sys-root +./var/chroot/nsd/etc/nsd base-sys-root +./var/chroot/nsd/varbase-sys-root +./var/chroot/nsd/var/dbbase-sys-root +./var/chroot/nsd/var/db/nsd base-sys-root ./var/chroot/ntpdbase-ntp-root ./var/chroot/ntpd/devbase-ntp-root ./var/chroot/ntpd/etcbase-ntp-root Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.785 src/distrib/sets/lists/base/shl.mi:1.786 --- src/distrib/sets/lists/base/shl.mi:1.785 Wed Sep 21 10:00:29 2016 +++ src/distrib/sets/lists/base/shl.mi Sat Sep 24 16:13:48 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.785 2016/09/21 14:00:29 roy Exp $ +# $NetBSD: shl.mi,v 1.786 2016/09/24 20:13:48 christos Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -18,7 +18,7 @@ ./lib/libblacklist.so.0.0 base-sys-shlib dynamicroot ./lib/libc.so base-sys-shlib dynamicroot ./lib/libc.so.12base-sys-shlib dynamicroot -./lib/libc.so.12.204base-sys-shlib dynamicroot +./lib/libc.so.12.205base-sys-shlib dynamicroot ./lib/libcrypt.sobase-sys-shlib dynamicroot ./lib/libcrypt.so.1base-sys-shlib dynamicroot ./lib/libcrypt.so.1.0base-sys-shlib dynamicroot @@ -214,7 +214,7 @@ ./usr/lib/libc++.so.1.0base-sys-shlib compatfile,libcxx ./usr/lib/libc.sobase-sys-shlib compatfile ./usr/lib/libc.so.12base-sys-shlib compatfile -./usr/lib/libc.so.12.204 base-sys-shlib compatfile +./usr/lib/libc.so.12.205 base-sys-shlib compatfile ./usr/lib/libcdk.sobase-obsolete compatfile,obsolete ./usr/lib/libcom_err.sobase-krb5-shlib compatfile,kerberos ./usr/lib/libcom_err.so.7 base-krb5-shlib compatfile,kerberos Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.145 src/distrib/sets/lists/debug/shl.mi:1.146 --- src/distrib/sets/lists/debug/shl.mi:1.145 Wed Sep 21 10:00:29 2016 +++ src/distrib/sets/lists/debug/shl.mi Sat Sep 24 16:13:48 2016 @@ -1,7 +1,7 @@ -# $NetBSD: shl.mi,v 1.145 2016/09/21 14:00:29 roy Exp $ +# $NetBSD: shl.mi,v 1.146 2016/09/24 20:13:48 christos Exp $ ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libblacklist.so.0.0.debug comp-sys-debug debug,dynamicroot -./usr/libdata/debug/lib/libc.so.12.204.debug comp-sys-debug debug,dynamicroot +./usr/libdata/debug/lib/libc.so.12.205.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libcrypt.so.1.0.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libcrypto.so.11.0.debug comp-sys-debug debug,dynamicroot,crypto ./usr/libdata/debug/lib/libdevmapper.so.1.0.debug comp-sys-debug debug,dynamicroot @@ -69,7 +69,7 @@ ./usr/libdata/debug/usr/lib/libbsdmalloc.so.0.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libbz2.so.1.1.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libc++.so.1.0.debug comp-sys-debug debug,compatfile,libcxx -./usr/libdata/debug/usr/lib/libc.so.12.204.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libc.so.12.205.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libcom_err.so.7.0.debug comp-krb5-debug debug,compatfile,kerberos ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libcrypto.so.11.0.debug comp-crypto-debug debug,compatfile,cr
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: jdolecek Date: Sat Sep 24 20:59:51 UTC 2016 Modified Files: src/sys/ufs/ffs: ffs_wapbl.c Log Message: i/o optimization for wapbl flush - only sync superblock and cgs when they were actually changed To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/ufs/ffs/ffs_wapbl.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/ufs/ffs/ffs_wapbl.c diff -u src/sys/ufs/ffs/ffs_wapbl.c:1.30 src/sys/ufs/ffs/ffs_wapbl.c:1.31 --- src/sys/ufs/ffs/ffs_wapbl.c:1.30 Sat Mar 28 19:24:04 2015 +++ src/sys/ufs/ffs/ffs_wapbl.c Sat Sep 24 20:59:51 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_wapbl.c,v 1.30 2015/03/28 19:24:04 maxv Exp $ */ +/* $NetBSD: ffs_wapbl.c,v 1.31 2016/09/24 20:59:51 jdolecek Exp $ */ /*- * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.30 2015/03/28 19:24:04 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.31 2016/09/24 20:59:51 jdolecek Exp $"); #define WAPBL_INTERNAL @@ -174,6 +174,8 @@ ffs_wapbl_sync_metadata(struct mount *mp struct fs *fs = ump->um_fs; int i, error __diagused; + UFS_WAPBL_JLOCK_ASSERT(mp); + #ifdef WAPBL_DEBUG_INODES ufs_wapbl_verify_inodes(mp, "ffs_wapbl_sync_metadata"); #endif @@ -187,10 +189,12 @@ ffs_wapbl_sync_metadata(struct mount *mp FFS_DBTOFSB(fs, deallocblks[i]), dealloclens[i], -1); } - fs->fs_fmod = 0; - fs->fs_time = time_second; - error = ffs_cgupdate(ump, 0); - KASSERT(error == 0); + if (fs->fs_fmod != 0) { + fs->fs_fmod = 0; + fs->fs_time = time_second; + error = ffs_cgupdate(ump, 0); + KASSERT(error != 0); + } } void
CVS commit: src/sys/ufs/ffs
Module Name:src Committed By: jdolecek Date: Sat Sep 24 21:00:54 UTC 2016 Modified Files: src/sys/ufs/ffs: ffs_wapbl.c Log Message: fix swapped KASSERT() To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/ufs/ffs/ffs_wapbl.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/ufs/ffs/ffs_wapbl.c diff -u src/sys/ufs/ffs/ffs_wapbl.c:1.31 src/sys/ufs/ffs/ffs_wapbl.c:1.32 --- src/sys/ufs/ffs/ffs_wapbl.c:1.31 Sat Sep 24 20:59:51 2016 +++ src/sys/ufs/ffs/ffs_wapbl.c Sat Sep 24 21:00:54 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ffs_wapbl.c,v 1.31 2016/09/24 20:59:51 jdolecek Exp $ */ +/* $NetBSD: ffs_wapbl.c,v 1.32 2016/09/24 21:00:54 jdolecek Exp $ */ /*- * Copyright (c) 2003,2006,2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.31 2016/09/24 20:59:51 jdolecek Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ffs_wapbl.c,v 1.32 2016/09/24 21:00:54 jdolecek Exp $"); #define WAPBL_INTERNAL @@ -193,7 +193,7 @@ ffs_wapbl_sync_metadata(struct mount *mp fs->fs_fmod = 0; fs->fs_time = time_second; error = ffs_cgupdate(ump, 0); - KASSERT(error != 0); + KASSERT(error == 0); } }
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: dholland Date: Sat Sep 24 21:13:44 UTC 2016 Modified Files: src/sys/arch/x86/x86: pmap.c sys_machdep.c Log Message: LDT handling fixes: - add missing membar_store_store ("membar_producer") when setting a new ldt; - use UVM_KMF_WAITVA when allocating space for a new ldt instead of crashing if uvm_km_alloc fails; - if uvm_km_alloc fails in pmap_fork, bail instead of crashing; - clarify what else is going on in pmap_fork; - don't uvm_km_free while holding a mutex. To generate a diff of this commit: cvs rdiff -u -r1.221 -r1.222 src/sys/arch/x86/x86/pmap.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/x86/x86/sys_machdep.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/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.221 src/sys/arch/x86/x86/pmap.c:1.222 --- src/sys/arch/x86/x86/pmap.c:1.221 Sat Aug 27 16:07:26 2016 +++ src/sys/arch/x86/x86/pmap.c Sat Sep 24 21:13:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.221 2016/08/27 16:07:26 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.222 2016/09/24 21:13:44 dholland Exp $ */ /*- * Copyright (c) 2008, 2010, 2016 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.221 2016/08/27 16:07:26 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.222 2016/09/24 21:13:44 dholland Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -2443,30 +2443,49 @@ pmap_fork(struct pmap *pmap1, struct pma return; } + /* + * Copy the LDT into the new process. + * + * Read pmap1's ldt pointer and length unlocked; if it changes + * behind our back we'll retry. This will starve if there's a + * stream of LDT changes in another thread but that should not + * happen. + */ + retry: if (pmap1->pm_ldt != NULL) { len = pmap1->pm_ldt_len; + /* Allocate space for the new process's LDT */ new_ldt = (union descriptor *)uvm_km_alloc(kernel_map, len, 0, UVM_KMF_WIRED); + if (new_ldt == NULL) { + printf("WARNING: pmap_fork: " + "unable to allocate LDT space\n"); + return; + } mutex_enter(&cpu_lock); + /* Get a GDT slot for it */ sel = ldt_alloc(new_ldt, len); if (sel == -1) { mutex_exit(&cpu_lock); uvm_km_free(kernel_map, (vaddr_t)new_ldt, len, UVM_KMF_WIRED); - printf("WARNING: pmap_fork: unable to allocate LDT\n"); + printf("WARNING: pmap_fork: " + "unable to allocate LDT selector\n"); return; } } else { + /* Wasn't anything there after all. */ len = -1; new_ldt = NULL; sel = -1; mutex_enter(&cpu_lock); } - /* Copy the LDT, if necessary. */ + /* If there's still something there now that we have cpu_lock... */ if (pmap1->pm_ldt != NULL) { if (len != pmap1->pm_ldt_len) { + /* Oops, it changed. Drop what we did and try again */ if (len != -1) { ldt_free(sel); uvm_km_free(kernel_map, (vaddr_t)new_ldt, @@ -2476,6 +2495,7 @@ pmap_fork(struct pmap *pmap1, struct pma goto retry; } + /* Copy the LDT data and install it in pmap2 */ memcpy(new_ldt, pmap1->pm_ldt, len); pmap2->pm_ldt = new_ldt; pmap2->pm_ldt_len = pmap1->pm_ldt_len; @@ -2484,11 +2504,14 @@ pmap_fork(struct pmap *pmap1, struct pma } if (len != -1) { + /* There wasn't still something there, so mop up */ ldt_free(sel); + mutex_exit(&cpu_lock); uvm_km_free(kernel_map, (vaddr_t)new_ldt, len, UVM_KMF_WIRED); + } else { + mutex_exit(&cpu_lock); } - mutex_exit(&cpu_lock); #endif /* USER_LDT */ } #endif /* PMAP_FORK */ Index: src/sys/arch/x86/x86/sys_machdep.c diff -u src/sys/arch/x86/x86/sys_machdep.c:1.29 src/sys/arch/x86/x86/sys_machdep.c:1.30 --- src/sys/arch/x86/x86/sys_machdep.c:1.29 Fri Oct 23 18:53:26 2015 +++ src/sys/arch/x86/x86/sys_machdep.c Sat Sep 24 21:13:44 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_machdep.c,v 1.29 2015/10/23 18:53:26 christos Exp $ */ +/* $NetBSD: sys_machdep.c,v 1.30 2016/09/24 21:13:44 dholland Exp $ */ /*- * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.29 2015/10/23 18:53:26 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_machdep.c,v 1.30 2016/09/24 21:13:44 dholland Exp $"); #include "opt_mtrr.h" #include "opt_perfctrs.h" @@ -327,7 +327,7 @@ x86_set_ldt1(struct lwp *l, struct x86_s new_len = max(new_len, NLDT * sizeof(union descriptor)); new_len = round_page(new_len); new_ldt = (union descriptor *)uvm_km_alloc(kernel_map, - new_len, 0, UVM_KMF_WIRED | UVM_KMF_ZERO); + new_len, 0, UVM_KMF_WIRED | UVM_KMF_ZERO | UVM_KMF_WAITVA); mutex_enter(&cpu_lock); if (pmap->pm_ldt_len <= new_len) { break; @@ -365,9 +365,11 @@ x86_set_ldt1(struct lwp *l, struct x86_s } /* All changes are now globally visible. Swap in the new LDT. */ - pmap->pm_ldt = new_ldt; pmap->pm_ldt_len
CVS commit: src/include
Module Name:src Committed By: christos Date: Sat Sep 24 21:18:09 UTC 2016 Modified Files: src/include: mpool.h Log Message: remove mpool_getf To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/include/mpool.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/mpool.h diff -u src/include/mpool.h:1.15 src/include/mpool.h:1.16 --- src/include/mpool.h:1.15 Sat Sep 24 16:11:43 2016 +++ src/include/mpool.h Sat Sep 24 17:18:09 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mpool.h,v 1.15 2016/09/24 20:11:43 christos Exp $ */ +/* $NetBSD: mpool.h,v 1.16 2016/09/24 21:18:09 christos Exp $ */ /*- * Copyright (c) 1991, 1993, 1994 @@ -102,8 +102,7 @@ void mpool_filter(MPOOL *, void (*)(voi void *mpool_new(MPOOL *, pgno_t *); void *mpool_newf(MPOOL *, pgno_t *, unsigned int); int mpool_delete(MPOOL *, void *); -void *mpool_get(MPOOL *, pgno_t); -void *mpool_getf(MPOOL *, pgno_t, unsigned int); +void *mpool_get(MPOOL *, pgno_t, unsigned int); int mpool_put(MPOOL *, void *, unsigned int); int mpool_sync(MPOOL *); int mpool_close(MPOOL *);
CVS commit: src/tests/lib/libc/db
Module Name:src Committed By: christos Date: Sat Sep 24 21:18:23 UTC 2016 Modified Files: src/tests/lib/libc/db: h_db.c Log Message: remove mpool_getf To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/db/h_db.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/lib/libc/db/h_db.c diff -u src/tests/lib/libc/db/h_db.c:1.2 src/tests/lib/libc/db/h_db.c:1.3 --- src/tests/lib/libc/db/h_db.c:1.2 Sat Sep 24 16:12:33 2016 +++ src/tests/lib/libc/db/h_db.c Sat Sep 24 17:18:22 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: h_db.c,v 1.2 2016/09/24 20:12:33 christos Exp $ */ +/* $NetBSD: h_db.c,v 1.3 2016/09/24 21:18:22 christos Exp $ */ /*- * Copyright (c) 1992, 1993, 1994 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1992, 19 #if 0 static char sccsid[] = "@(#)dbtest.c 8.17 (Berkeley) 9/1/94"; #else -__RCSID("$NetBSD: h_db.c,v 1.2 2016/09/24 20:12:33 christos Exp $"); +__RCSID("$NetBSD: h_db.c,v 1.3 2016/09/24 21:18:22 christos Exp $"); #endif #endif /* not lint */ @@ -529,7 +529,7 @@ unlinkpg(DB *dbp) for (pg = P_ROOT; pg < t->bt_mp->npages; mpool_put(t->bt_mp, h, 0), pg++) { - if ((h = mpool_getf(t->bt_mp, pg, 0)) == NULL) + if ((h = mpool_get(t->bt_mp, pg, 0)) == NULL) break; /* Look for a nonempty leaf page that has both left * and right siblings. */
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Sat Sep 24 21:31:25 UTC 2016 Modified Files: src/lib/libc/db/btree: bt_close.c bt_debug.c bt_delete.c bt_open.c bt_overflow.c bt_page.c bt_put.c bt_search.c bt_seq.c bt_split.c src/lib/libc/db/mpool: mpool.c src/lib/libc/db/recno: rec_open.c rec_search.c src/lib/libc/include: namespace.h Log Message: remove mpool_getf To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/lib/libc/db/btree/bt_close.c cvs rdiff -u -r1.17 -r1.18 src/lib/libc/db/btree/bt_debug.c cvs rdiff -u -r1.18 -r1.19 src/lib/libc/db/btree/bt_delete.c \ src/lib/libc/db/btree/bt_search.c cvs rdiff -u -r1.28 -r1.29 src/lib/libc/db/btree/bt_open.c cvs rdiff -u -r1.21 -r1.22 src/lib/libc/db/btree/bt_overflow.c \ src/lib/libc/db/btree/bt_put.c src/lib/libc/db/btree/bt_split.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/db/btree/bt_page.c cvs rdiff -u -r1.19 -r1.20 src/lib/libc/db/btree/bt_seq.c cvs rdiff -u -r1.22 -r1.23 src/lib/libc/db/mpool/mpool.c cvs rdiff -u -r1.21 -r1.22 src/lib/libc/db/recno/rec_open.c cvs rdiff -u -r1.15 -r1.16 src/lib/libc/db/recno/rec_search.c cvs rdiff -u -r1.181 -r1.182 src/lib/libc/include/namespace.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/libc/db/btree/bt_close.c diff -u src/lib/libc/db/btree/bt_close.c:1.16 src/lib/libc/db/btree/bt_close.c:1.17 --- src/lib/libc/db/btree/bt_close.c:1.16 Sat Sep 24 16:11:12 2016 +++ src/lib/libc/db/btree/bt_close.c Sat Sep 24 17:31:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_close.c,v 1.16 2016/09/24 20:11:12 christos Exp $ */ +/* $NetBSD: bt_close.c,v 1.17 2016/09/24 21:31:25 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #endif #include -__RCSID("$NetBSD: bt_close.c,v 1.16 2016/09/24 20:11:12 christos Exp $"); +__RCSID("$NetBSD: bt_close.c,v 1.17 2016/09/24 21:31:25 christos Exp $"); #include "namespace.h" @@ -164,7 +164,7 @@ bt_meta(BTREE *t) BTMETA m; void *p; - if ((p = mpool_getf(t->bt_mp, P_META, 0)) == NULL) + if ((p = mpool_get(t->bt_mp, P_META, 0)) == NULL) return (RET_ERROR); /* Fill in metadata. */ Index: src/lib/libc/db/btree/bt_debug.c diff -u src/lib/libc/db/btree/bt_debug.c:1.17 src/lib/libc/db/btree/bt_debug.c:1.18 --- src/lib/libc/db/btree/bt_debug.c:1.17 Sat Sep 24 16:11:12 2016 +++ src/lib/libc/db/btree/bt_debug.c Sat Sep 24 17:31:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_debug.c,v 1.17 2016/09/24 20:11:12 christos Exp $ */ +/* $NetBSD: bt_debug.c,v 1.18 2016/09/24 21:31:25 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #endif #include -__RCSID("$NetBSD: bt_debug.c,v 1.17 2016/09/24 20:11:12 christos Exp $"); +__RCSID("$NetBSD: bt_debug.c,v 1.18 2016/09/24 21:31:25 christos Exp $"); #include #include @@ -111,7 +111,7 @@ __bt_dump(DB *dbp) #undef X for (i = P_ROOT; i < t->bt_mp->npages && - (h = mpool_getf(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i) + (h = mpool_get(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i) __bt_dpage(h); (void)fflush(tracefp); @@ -183,7 +183,7 @@ __bt_dnpage(DB *dbp, pgno_t pgno) __bt_dinit(); t = dbp->internal; - if ((h = mpool_getf(t->bt_mp, pgno, MPOOL_IGNOREPIN)) != NULL) { + if ((h = mpool_get(t->bt_mp, pgno, MPOOL_IGNOREPIN)) != NULL) { __bt_dpage(h); (void)mpool_put(t->bt_mp, h, 0); } @@ -312,7 +312,7 @@ __bt_stat(DB *dbp) pcont = pinternal = pleaf = 0; nkeys = ifree = lfree = 0; for (i = P_ROOT; i < t->bt_mp->npages && - (h = mpool_getf(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i) + (h = mpool_get(t->bt_mp, i, MPOOL_IGNOREPIN)) != NULL; ++i) switch (h->flags & P_TYPE) { case P_BINTERNAL: case P_RINTERNAL: @@ -334,7 +334,7 @@ __bt_stat(DB *dbp) /* Count the levels of the tree. */ for (i = P_ROOT, levels = 0 ;; ++levels) { - h = mpool_getf(t->bt_mp, i, MPOOL_IGNOREPIN); + h = mpool_get(t->bt_mp, i, MPOOL_IGNOREPIN); if (h->flags & (P_BLEAF|P_RLEAF)) { if (levels == 0) levels = 1; Index: src/lib/libc/db/btree/bt_delete.c diff -u src/lib/libc/db/btree/bt_delete.c:1.18 src/lib/libc/db/btree/bt_delete.c:1.19 --- src/lib/libc/db/btree/bt_delete.c:1.18 Sat Sep 24 16:11:12 2016 +++ src/lib/libc/db/btree/bt_delete.c Sat Sep 24 17:31:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bt_delete.c,v 1.18 2016/09/24 20:11:12 christos Exp $ */ +/* $NetBSD: bt_delete.c,v 1.19 2016/09/24 21:31:25 christos Exp $ */ /*- * Copyright (c) 1990, 1993, 1994 @@ -37,7 +37,7 @@ #endif #include -__RCSID("$NetBSD: bt_delete.c,v 1.18 2016/09/24 20:11:12 christos Exp $"); +__RCSID("$NetBSD: bt_delete.c,v 1.19 2016/09/24 21:31:25 christos Exp $"); #include "namespace.h" #include @@ -96,7 +96,7 @@ __bt_delete(const DB *dbp, const DBT *ke if (F_ISSET(c, CURS_INIT)) { if (F_ISSET(c, CURS_ACQUIRE | CURS_AFTER | CURS_BEFORE)) return (RET_SPECIAL); - if ((h = mpoo
CVS commit: src
Module Name:src Committed By: mrg Date: Sat Sep 24 23:12:54 UTC 2016 Modified Files: src/distrib/sets/lists/base: shl.mi src/distrib/sets/lists/debug: shl.mi src/lib/libpci: pci.3 pci.h pci_drvname.c shlib_version src/sys/dev/pci: pci_usrreq.c pciio.h src/usr.sbin/pcictl: pcictl.c Log Message: introduce a better pci_drvname() and PCI_IOC_DRVNAME as pciio_drvnameonbus() and PCI_IOC_DRVNAMEONBUS. the new ones also take a (autoconf) PCI bus number, which allows lookups for any device on any pci bus node. use this in pcictl which current reports the wrong values sometimes. up next: use these in libpciaccess. To generate a diff of this commit: cvs rdiff -u -r1.786 -r1.787 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r1.146 -r1.147 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r1.12 -r1.13 src/lib/libpci/pci.3 cvs rdiff -u -r1.8 -r1.9 src/lib/libpci/pci.h cvs rdiff -u -r1.1 -r1.2 src/lib/libpci/pci_drvname.c cvs rdiff -u -r1.4 -r1.5 src/lib/libpci/shlib_version cvs rdiff -u -r1.29 -r1.30 src/sys/dev/pci/pci_usrreq.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/pci/pciio.h cvs rdiff -u -r1.21 -r1.22 src/usr.sbin/pcictl/pcictl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/shl.mi diff -u src/distrib/sets/lists/base/shl.mi:1.786 src/distrib/sets/lists/base/shl.mi:1.787 --- src/distrib/sets/lists/base/shl.mi:1.786 Sat Sep 24 20:13:48 2016 +++ src/distrib/sets/lists/base/shl.mi Sat Sep 24 23:12:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.786 2016/09/24 20:13:48 christos Exp $ +# $NetBSD: shl.mi,v 1.787 2016/09/24 23:12:54 mrg Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -432,7 +432,7 @@ ./usr/lib/libpcap.so.5.1 base-net-shlib compatfile ./usr/lib/libpci.sobase-sys-shlib compatfile ./usr/lib/libpci.so.2base-sys-shlib compatfile -./usr/lib/libpci.so.2.1base-sys-shlib compatfile +./usr/lib/libpci.so.2.2base-sys-shlib compatfile ./usr/lib/libperfuse.sobase-perfuse-shlib compatfile ./usr/lib/libperfuse.so.0 base-perfuse-shlib compatfile ./usr/lib/libperfuse.so.0.0 base-perfuse-shlib compatfile Index: src/distrib/sets/lists/debug/shl.mi diff -u src/distrib/sets/lists/debug/shl.mi:1.146 src/distrib/sets/lists/debug/shl.mi:1.147 --- src/distrib/sets/lists/debug/shl.mi:1.146 Sat Sep 24 20:13:48 2016 +++ src/distrib/sets/lists/debug/shl.mi Sat Sep 24 23:12:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: shl.mi,v 1.146 2016/09/24 20:13:48 christos Exp $ +# $NetBSD: shl.mi,v 1.147 2016/09/24 23:12:54 mrg Exp $ ./usr/libdata/debug/lib base-sys-usr debug,dynamicroot,compatdir ./usr/libdata/debug/lib/libblacklist.so.0.0.debug comp-sys-debug debug,dynamicroot ./usr/libdata/debug/lib/libc.so.12.205.debug comp-sys-debug debug,dynamicroot @@ -152,7 +152,7 @@ ./usr/libdata/debug/usr/lib/libpam.so.4.0.debug comp-sys-debug debug,compatfile,pam ./usr/libdata/debug/usr/lib/libpanel.so.1.0.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libpcap.so.5.1.debug comp-net-debug debug,compatfile -./usr/libdata/debug/usr/lib/libpci.so.2.1.debug comp-sys-debug debug,compatfile +./usr/libdata/debug/usr/lib/libpci.so.2.2.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libperfuse.so.0.0.debug comp-perfuse-debug debug,compatfile ./usr/libdata/debug/usr/lib/libposix.so.0.1.debug comp-sys-debug debug,compatfile ./usr/libdata/debug/usr/lib/libppath.so.0.0.debug comp-sys-debug debug,compatfile Index: src/lib/libpci/pci.3 diff -u src/lib/libpci/pci.3:1.12 src/lib/libpci/pci.3:1.13 --- src/lib/libpci/pci.3:1.12 Sat Jan 23 07:21:18 2016 +++ src/lib/libpci/pci.3 Sat Sep 24 23:12:54 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: pci.3,v 1.12 2016/01/23 07:21:18 wiz Exp $ +.\" $NetBSD: pci.3,v 1.13 2016/09/24 23:12:54 mrg Exp $ .\" .\" Copyright 2001 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 December 16, 2014 +.Dd September 23, 2016 .Dt PCI 3 .Os .Sh NAME @@ -61,6 +61,8 @@ .Fn pci_conf_print "int pcifd" "unsigned int bus" "unsigned int dev" "unsigned int func" .Ft int .Fn pci_drvname "int pcifd" "unsigned int dev" "unsigned int func" "char *drvname" "size_t len" +.Ft int +.Fn pci_drvnameonbus "int pcifd" "u_int bus" "u_int dev" "u_int func" "char *drvname" "size_t len" .Sh DESCRIPTION The .Nm @@ -151,6 +153,10 @@ into using .Fa len as the buffer length. +.It Fn pci_drvnameonbus +Just like +.Fn pci_drvname +but also allows looking up via PCI bus number. .El .Sh RETURN VALUES The Index: src/lib/libpci/pci.h diff -u src/lib/libpci/pci.h:1.8 src/lib/libpci/pci.h:1.9 --- src/lib/libpci/pci.h:1.8 Sat Jan 23 01:26:14 2016 +++ src/lib/libpci/pci.h Sat Sep 24 23:12:54 2016 @@ -
CVS commit: xsrc/external/mit/libpciaccess/dist/src
Module Name:xsrc Committed By: mrg Date: Sat Sep 24 23:14:21 UTC 2016 Modified Files: xsrc/external/mit/libpciaccess/dist/src: netbsd_pci.c Log Message: use PCI_IOC_DRVNAMEONBUS if it exists. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 \ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c 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/libpciaccess/dist/src/netbsd_pci.c diff -u xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.15 xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.16 --- xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c:1.15 Sun Jul 19 23:32:00 2015 +++ xsrc/external/mit/libpciaccess/dist/src/netbsd_pci.c Sat Sep 24 23:14:21 2016 @@ -848,9 +848,11 @@ pci_device_netbsd_has_kernel_driver(stru { #ifdef PCI_IOC_DRVNAME /* - * NetBSD PCI_IOC_DRVNAME appears at the same time as pci_drvname(3) + * NetBSD PCI_IOC_DRVNAME appears at the same time as pci_drvname(3), + * same as the better onbus version. */ char drvname[16]; + int i; if (dev->bus >= nbuses) return 0; @@ -858,10 +860,22 @@ pci_device_netbsd_has_kernel_driver(stru /* * vga(4) should be considered "not bound". */ - if (pci_drvname(buses[dev->bus].fd, dev->dev, dev->func, - drvname, sizeof drvname) == 0 && - strncmp(drvname, "vga", 3) != 0) - return 1; + for (i = 0; i < nbuses; i++) { + if (buses[i].num == dev->bus) { + int rv; + +#ifdef PCI_IOC_DRVNAMEONBUS + rv = pci_drvnameonbus(buses[i].fd, dev->bus, + dev->dev, dev->func, drvname, sizeof drvname); +#else + rv = pci_drvname(buses[i].fd, + dev->dev, dev->func, drvname, sizeof drvname); +#endif + if (rv == 0 && strncmp(drvname, "vga", 3) != 0) +return 1; + return 0; + } + } #endif return 0; }
CVS commit: src/distrib/sets/lists/base
Module Name:src Committed By: mrg Date: Sat Sep 24 23:15:26 UTC 2016 Modified Files: src/distrib/sets/lists/base: mi Log Message: revert the previous; it seems to have been a mistake (adding nsd entries) and had nothing to do with the message (libc bump.) To generate a diff of this commit: cvs rdiff -u -r1.1135 -r1.1136 src/distrib/sets/lists/base/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/base/mi diff -u src/distrib/sets/lists/base/mi:1.1135 src/distrib/sets/lists/base/mi:1.1136 --- src/distrib/sets/lists/base/mi:1.1135 Sat Sep 24 20:13:48 2016 +++ src/distrib/sets/lists/base/mi Sat Sep 24 23:15:26 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1135 2016/09/24 20:13:48 christos Exp $ +# $NetBSD: mi,v 1.1136 2016/09/24 23:15:26 mrg Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -105,7 +105,6 @@ ./etc/mtree base-sys-root ./etc/mtree/set.basebase-sys-root ./etc/namedb base-bind-root -./etc/nsd base-sys-root ./etc/obsolete base-obsolete obsolete ./etc/openldap base-ldap-root ./etc/openssl base-crypto-root @@ -5898,12 +5897,6 @@ ./var/chroot/named/var/run/lwresd base-bind-root ./var/chroot/named/var/run/named base-bind-root ./var/chroot/named/var/tmp base-bind-root -./var/chroot/nsdbase-sys-root -./var/chroot/nsd/etcbase-sys-root -./var/chroot/nsd/etc/nsd base-sys-root -./var/chroot/nsd/varbase-sys-root -./var/chroot/nsd/var/dbbase-sys-root -./var/chroot/nsd/var/db/nsd base-sys-root ./var/chroot/ntpdbase-ntp-root ./var/chroot/ntpd/devbase-ntp-root ./var/chroot/ntpd/etcbase-ntp-root
CVS commit: src/sys/dev/cardbus
Module Name:src Committed By: mrg Date: Sat Sep 24 23:54:49 UTC 2016 Modified Files: src/sys/dev/cardbus: cardslot.c Log Message: weak alias some pcmcia functions (to an returns error function) so this links when pcmcia isn't in the kernel. PR#7253. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/cardbus/cardslot.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/cardbus/cardslot.c diff -u src/sys/dev/cardbus/cardslot.c:1.55 src/sys/dev/cardbus/cardslot.c:1.56 --- src/sys/dev/cardbus/cardslot.c:1.55 Sat Oct 12 16:49:00 2013 +++ src/sys/dev/cardbus/cardslot.c Sat Sep 24 23:54:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: cardslot.c,v 1.55 2013/10/12 16:49:00 christos Exp $ */ +/* $NetBSD: cardslot.c,v 1.56 2016/09/24 23:54:49 mrg Exp $ */ /* * Copyright (c) 1999 and 2000 @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.55 2013/10/12 16:49:00 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cardslot.c,v 1.56 2016/09/24 23:54:49 mrg Exp $"); #include "opt_cardslot.h" @@ -56,6 +56,16 @@ __KERNEL_RCSID(0, "$NetBSD: cardslot.c,v #define DPRINTF(a) #endif +int pcmcia_error(device_t); +int +pcmcia_error(device_t dev) +{ + + return 1; +} +__weak_alias(pcmcia_card_attach, pcmcia_error); +__weak_alias(pcmcia_card_deactivate, pcmcia_error); +__weak_alias(pcmcia_card_detach, pcmcia_error); STATIC void cardslotchilddet(device_t, device_t);
CVS commit: src/usr.sbin/pcictl
Module Name:src Committed By: mrg Date: Sun Sep 25 00:06:49 UTC 2016 Modified Files: src/usr.sbin/pcictl: pcictl.8 Log Message: add some examples: "pcictl pci0 list" and "pcictl pci0 list -N". inspired by PR 51243. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.sbin/pcictl/pcictl.8 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/pcictl/pcictl.8 diff -u src/usr.sbin/pcictl/pcictl.8:1.16 src/usr.sbin/pcictl/pcictl.8:1.17 --- src/usr.sbin/pcictl/pcictl.8:1.16 Wed Sep 10 21:13:50 2014 +++ src/usr.sbin/pcictl/pcictl.8 Sun Sep 25 00:06:49 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: pcictl.8,v 1.16 2014/09/10 21:13:50 wiz Exp $ +.\" $NetBSD: pcictl.8,v 1.17 2016/09/25 00:06:49 mrg Exp $ .\" .\" Copyright 2001 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 August 31, 2014 +.Dd September 23, 2016 .Dt PCICTL 8 .Os .Sh NAME @@ -126,6 +126,14 @@ system. It is meant as a diagnostic tool for experiments or to debug device drivers. Do not use it as a substitute for a device driver! +.Sh EXAMPLES +This show all PCI devices on the system: +.Pp +.Dl pcictl pci0 list +.Pp +This show all PCI devices on the system, including attached drivers: +.Pp +.Dl pcictl pci0 list -N .Sh FILES .Pa /dev/pci* - PCI bus device nodes