CVS commit: src/sys/kern
Module Name:src Committed By: dholland Date: Sun Jul 31 04:05:32 UTC 2016 Modified Files: src/sys/kern: vfs_bio.c Log Message: In bwrite, add assertion that vp != NULL. (vp is the vnode from the buffer being written.) There's some logic here that carefully checks for vp being null, and other logic that will crash if it is. It appears that it's all needless paranoia. See tech-kern for more info. Unless someone sees the assertion go off (in which case a lot more investigation is needed) I or someone will clean out the logic at some future point. Spotted by coypu. To generate a diff of this commit: cvs rdiff -u -r1.259 -r1.260 src/sys/kern/vfs_bio.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/vfs_bio.c diff -u src/sys/kern/vfs_bio.c:1.259 src/sys/kern/vfs_bio.c:1.260 --- src/sys/kern/vfs_bio.c:1.259 Mon Feb 1 05:05:43 2016 +++ src/sys/kern/vfs_bio.c Sun Jul 31 04:05:32 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_bio.c,v 1.259 2016/02/01 05:05:43 riz Exp $ */ +/* $NetBSD: vfs_bio.c,v 1.260 2016/07/31 04:05:32 dholland Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -123,7 +123,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.259 2016/02/01 05:05:43 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_bio.c,v 1.260 2016/07/31 04:05:32 dholland Exp $"); #ifdef _KERNEL_OPT #include "opt_bufcache.h" @@ -800,6 +800,14 @@ bwrite(buf_t *bp) KASSERT(!cv_has_waiters(>b_done)); vp = bp->b_vp; + + /* + * dholland 20160728 AFAICT vp==NULL must be impossible as it + * will crash upon reaching VOP_STRATEGY below... see further + * analysis on tech-kern. + */ + KASSERTMSG(vp != NULL, "bwrite given buffer with null vnode"); + if (vp != NULL) { KASSERT(bp->b_objlock == vp->v_interlock); if (vp->v_type == VBLK)
CVS commit: [pgoyette-localcount] src/tests/dev/fss
Module Name:src Committed By: pgoyette Date: Sun Jul 31 03:56:57 UTC 2016 Modified Files: src/tests/dev/fss [pgoyette-localcount]: t_fss.sh Log Message: Import changes from HEAD To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/tests/dev/fss/t_fss.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/dev/fss/t_fss.sh diff -u src/tests/dev/fss/t_fss.sh:1.1.2.2 src/tests/dev/fss/t_fss.sh:1.1.2.3 --- src/tests/dev/fss/t_fss.sh:1.1.2.2 Fri Jul 29 10:57:32 2016 +++ src/tests/dev/fss/t_fss.sh Sun Jul 31 03:56:57 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_fss.sh,v 1.1.2.2 2016/07/29 10:57:32 pgoyette Exp $ +# $NetBSD: t_fss.sh,v 1.1.2.3 2016/07/31 03:56:57 pgoyette Exp $ # # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -52,7 +52,7 @@ basic_body() { # configure and mount a snapshot of the file system fssconfig -c fss0 ./m1 ./backup - mount /dev/fss0 ./m2 + mount -o rdonly /dev/fss0 ./m2 # Modify the data on the underlying file system @@ -65,15 +65,17 @@ basic_body() { # Unmount our temporary stuff - umount /dev/vnd0a || true umount /dev/fss0 || true + fssconfig -u fss0 || true + umount /dev/vnd0a || true + vndconfig -u vnd0 || true } basic_cleanup() { umount /dev/vnd0a || true + fssconfig -u fss0 || true umount /dev/fss0 || true vndconfig -u vnd0 || true - fssconfig -u fss0 || true } atf_init_test_cases()
CVS commit: src/usr.sbin/fssconfig
Module Name:src Committed By: pgoyette Date: Sun Jul 31 02:15:55 UTC 2016 Added Files: src/usr.sbin/fssconfig: fssconfig_hostops.c fssconfig_rumpops.c prog_ops.h Log Message: Include rump-vs-host ops files To generate a diff of this commit: cvs rdiff -u -r0 -r1.2 src/usr.sbin/fssconfig/fssconfig_hostops.c \ src/usr.sbin/fssconfig/fssconfig_rumpops.c \ src/usr.sbin/fssconfig/prog_ops.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.sbin/fssconfig/fssconfig_hostops.c diff -u /dev/null src/usr.sbin/fssconfig/fssconfig_hostops.c:1.2 --- /dev/null Sun Jul 31 02:15:55 2016 +++ src/usr.sbin/fssconfig/fssconfig_hostops.c Sun Jul 31 02:15:54 2016 @@ -0,0 +1,52 @@ +/* $NetBSD: fssconfig_hostops.c,v 1.2 2016/07/31 02:15:54 pgoyette Exp $ */ + +/* + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#ifndef lint +__RCSID("$NetBSD: fssconfig_hostops.c,v 1.2 2016/07/31 02:15:54 pgoyette Exp $"); +#endif /* !lint */ + +#include +#include +#include +#include + +#include +#include + +#include "prog_ops.h" + +const struct prog_ops prog_ops = { + .op_open = open, + .op_ioctl = ioctl, + .op_pread = pread, + .op_close = close, + .op_stat = stat, + .op_fstat = fstat, + .op_statvfs1 = statvfs1, +}; Index: src/usr.sbin/fssconfig/fssconfig_rumpops.c diff -u /dev/null src/usr.sbin/fssconfig/fssconfig_rumpops.c:1.2 --- /dev/null Sun Jul 31 02:15:55 2016 +++ src/usr.sbin/fssconfig/fssconfig_rumpops.c Sun Jul 31 02:15:54 2016 @@ -0,0 +1,54 @@ +/* $NetBSD: fssconfig_rumpops.c,v 1.2 2016/07/31 02:15:54 pgoyette Exp $ */ + +/* + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#ifndef lint +__RCSID("$NetBSD: fssconfig_rumpops.c,v 1.2 2016/07/31 02:15:54 pgoyette Exp $"); +#endif /* !lint */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "prog_ops.h" + +const struct prog_ops prog_ops = { + .op_init = rumpclient_init, + .op_open = rump_sys_open, + .op_ioctl = rump_sys_ioctl, + .op_pread = rump_sys_pread, + .op_close = rump_sys_close, +.op_stat = rump_sys_stat, +.op_fstat = rump_sys_fstat, +.op_statvfs1 = rump_sys_statvfs1, +}; Index:
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: pgoyette Date: Sun Jul 31 02:14:13 UTC 2016 Modified Files: src/distrib/sets/lists/base: mi src/distrib/sets/lists/debug: mi Log Message: Add rump.fssconfig to sets lists To generate a diff of this commit: cvs rdiff -u -r1.1132 -r1.1133 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.161 -r1.162 src/distrib/sets/lists/debug/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.1132 src/distrib/sets/lists/base/mi:1.1133 --- src/distrib/sets/lists/base/mi:1.1132 Thu Jul 28 19:24:08 2016 +++ src/distrib/sets/lists/base/mi Sun Jul 31 02:14:12 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1132 2016/07/28 19:24:08 nakayama Exp $ +# $NetBSD: mi,v 1.1133 2016/07/31 02:14:12 pgoyette Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1838,6 +1838,7 @@ ./usr/sbin/rtsoldbase-obsolete obsolete ./usr/sbin/rump.arpbase-netutil-bin rump ./usr/sbin/rump.envstatbase-sysutil-bin rump +./usr/sbin/rump.fssconfig base-sysutil-root rump ./usr/sbin/rump.ndpbase-netutil-bin inet6,rump ./usr/sbin/rump.powerdbase-sysutil-bin rump ./usr/sbin/rump.rtadvdbase-router-bin use_inet6,rump Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.161 src/distrib/sets/lists/debug/mi:1.162 --- src/distrib/sets/lists/debug/mi:1.161 Sat Jul 30 11:03:54 2016 +++ src/distrib/sets/lists/debug/mi Sun Jul 31 02:14:12 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.161 2016/07/30 11:03:54 njoly Exp $ +# $NetBSD: mi,v 1.162 2016/07/31 02:14:12 pgoyette Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -1214,6 +1214,7 @@ ./usr/libdata/debug/usr/sbin/rtsold.debug comp-obsolete obsolete ./usr/libdata/debug/usr/sbin/rump.arp.debug comp-netutil-debug debug,rump ./usr/libdata/debug/usr/sbin/rump.envstat.debug comp-sysutil-debug debug,rump +./usr/libdata/debug/usr/sbin/rump.fssconfig.debug comp-sysutil-debug debug,rump ./usr/libdata/debug/usr/sbin/rump.ndp.debug comp-netutil-debug inet6,debug,rump ./usr/libdata/debug/usr/sbin/rump.powerd.debug comp-sysutil-debug debug,rump ./usr/libdata/debug/usr/sbin/rump.traceroute.debug comp-netutil-debug debug,rump
CVS commit: src/usr.sbin/fssconfig
Module Name:src Committed By: pgoyette Date: Sun Jul 31 02:13:26 UTC 2016 Modified Files: src/usr.sbin/fssconfig: Makefile fssconfig.c Log Message: Add rump.fssconfig To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/fssconfig/Makefile cvs rdiff -u -r1.11 -r1.12 src/usr.sbin/fssconfig/fssconfig.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/fssconfig/Makefile diff -u src/usr.sbin/fssconfig/Makefile:1.1 src/usr.sbin/fssconfig/Makefile:1.2 --- src/usr.sbin/fssconfig/Makefile:1.1 Wed Dec 10 11:40:12 2003 +++ src/usr.sbin/fssconfig/Makefile Sun Jul 31 02:13:26 2016 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2003/12/10 11:40:12 hannken Exp $ +# $NetBSD: Makefile,v 1.2 2016/07/31 02:13:26 pgoyette Exp $ -PROG= fssconfig +RUMPPRG= fssconfig MAN= fssconfig.8 DPADD+= ${LIBUTIL} LDADD+= -lutil Index: src/usr.sbin/fssconfig/fssconfig.c diff -u src/usr.sbin/fssconfig/fssconfig.c:1.11 src/usr.sbin/fssconfig/fssconfig.c:1.12 --- src/usr.sbin/fssconfig/fssconfig.c:1.11 Sat Jul 30 12:33:27 2016 +++ src/usr.sbin/fssconfig/fssconfig.c Sun Jul 31 02:13:26 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fssconfig.c,v 1.11 2016/07/30 12:33:27 pgoyette Exp $ */ +/* $NetBSD: fssconfig.c,v 1.12 2016/07/31 02:13:26 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -46,6 +46,8 @@ #include +#include "prog_ops.h" + static int vflag = 0; static int xflag = 0; @@ -124,7 +126,8 @@ config(int argc, char **argv) fss.fss_mount = argv[1]; fss.fss_bstore = argv[2]; - if (statvfs(argv[1], ) != 0 || stat(argv[1], ) != 0) + if (prog_statvfs1(argv[1], , ST_WAIT) != 0 || + prog_stat(argv[1], ) != 0) err(1, "stat %s", argv[1]); mountdev = sbuf.st_dev; if (stat(argv[2], ) == 0 && @@ -155,7 +158,8 @@ config(int argc, char **argv) * Create the backing store. If it is a directory, create a temporary * file and set the unlink flag. */ - if ((fd = open(fss.fss_bstore, O_CREAT|O_TRUNC|O_WRONLY, 0600)) < 0) { + fd = prog_open(fss.fss_bstore, O_CREAT|O_TRUNC|O_WRONLY, 0600); + if (fd < 0) { if (errno != EISDIR) err(1, "create: %s", fss.fss_bstore); snprintf(path, sizeof(path), "%s/XX", fss.fss_bstore); @@ -164,17 +168,18 @@ config(int argc, char **argv) fss.fss_bstore = path; istmp = 1; } - if (fstat(fd, ) < 0) + if (prog_fstat(fd, ) < 0) err(1, "stat: %s", fss.fss_bstore); if (!ispersistent && sbuf.st_dev == mountdev) ispersistent = 1; isreg = S_ISREG(sbuf.st_mode); if (!ispersistent && isreg && ftruncate(fd, bssize) < 0) err(1, "truncate %s", fss.fss_bstore); - close(fd); + prog_close(fd); configure: - if ((fd = opendisk(argv[0], O_RDWR, full, sizeof(full), 0)) < 0) { + fd = opendisk1(argv[0], O_RDWR, full, sizeof(full), 0, prog_open); + if (fd < 0) { if (istmp) unlink(fss.fss_bstore); err(1, "open: %s", argv[0]); @@ -184,7 +189,7 @@ configure: if ((xflag || istmp) && isreg) fss.fss_flags |= FSS_UNLINK_ON_CREATE; - if (ioctl(fd, FSSIOCSET, ) < 0) { + if (prog_ioctl(fd, FSSIOCSET, ) < 0) { if (istmp) unlink(fss.fss_bstore); err(1, "%s: FSSIOCSET", full); @@ -206,10 +211,11 @@ unconfig(int argc, char **argv) if (vflag) list(1, argv); - if ((fd = opendisk(argv[0], O_RDWR, full, sizeof(full), 0)) < 0) + fd = opendisk1(argv[0], O_RDWR, full, sizeof(full), 0, prog_open); + if (fd < 0) err(1, "open: %s", argv[0]); - if (ioctl(fd, FSSIOCCLR) < 0) + if (prog_ioctl(fd, FSSIOCCLR) < 0) err(1, "%s: FSSIOCCLR", full); } @@ -233,16 +239,17 @@ list(int argc, char **argv) for (n = 0; ; n++) { if (argc == 0) snprintf(path, sizeof(path), "fss%d", n); - if ((fd = opendisk(dev, O_RDONLY, full, sizeof(full), 0)) < 0) { + fd = opendisk1(dev, O_RDONLY, full, sizeof(full), 0, prog_open); + if (fd < 0) { if (argc == 0 && (errno == ENOENT || errno == ENXIO)) break; err(1, "open: %s", dev); } - if (ioctl(fd, FSSIOFGET, ) < 0) + if (prog_ioctl(fd, FSSIOFGET, ) < 0) flags = 0; - if (ioctl(fd, FSSIOCGET, ) < 0) { + if (prog_ioctl(fd, FSSIOCGET, ) < 0) { if (errno == ENXIO) printf("%s: not in use\n", dev); else @@ -270,7 +277,7 @@ list(int argc, char **argv) } else printf("%s: %s\n", dev, fsg.fsg_mount); - close(fd); + prog_close(fd); if (argc > 0) break;
CVS commit: [pgoyette-localcount] src/distrib/sets/lists
Module Name:src Committed By: pgoyette Date: Sun Jul 31 02:11:42 UTC 2016 Modified Files: src/distrib/sets/lists/base [pgoyette-localcount]: mi src/distrib/sets/lists/debug [pgoyette-localcount]: mi Log Message: Add rump.fssconfig to sets lists To generate a diff of this commit: cvs rdiff -u -r1.1131 -r1.1131.2.1 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.160 -r1.160.2.1 src/distrib/sets/lists/debug/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.1131 src/distrib/sets/lists/base/mi:1.1131.2.1 --- src/distrib/sets/lists/base/mi:1.1131 Fri Jul 1 22:52:06 2016 +++ src/distrib/sets/lists/base/mi Sun Jul 31 02:11:41 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1131 2016/07/01 22:52:06 christos Exp $ +# $NetBSD: mi,v 1.1131.2.1 2016/07/31 02:11:41 pgoyette Exp $ # # Note: Don't delete entries from here - mark them as "obsolete" instead, # unless otherwise stated below. @@ -1838,6 +1838,7 @@ ./usr/sbin/rtsoldbase-obsolete obsolete ./usr/sbin/rump.arpbase-netutil-bin rump ./usr/sbin/rump.envstatbase-sysutil-bin rump +./usr/sbin/rump.fssconfig base-sysutil-root rump ./usr/sbin/rump.ndpbase-netutil-bin inet6,rump ./usr/sbin/rump.powerdbase-sysutil-bin rump ./usr/sbin/rump.rtadvdbase-router-bin use_inet6,rump Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.160 src/distrib/sets/lists/debug/mi:1.160.2.1 --- src/distrib/sets/lists/debug/mi:1.160 Sat Jul 2 15:40:51 2016 +++ src/distrib/sets/lists/debug/mi Sun Jul 31 02:11:42 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.160 2016/07/02 15:40:51 christos Exp $ +# $NetBSD: mi,v 1.160.2.1 2016/07/31 02:11:42 pgoyette Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -1214,6 +1214,7 @@ ./usr/libdata/debug/usr/sbin/rtsold.debug comp-obsolete obsolete ./usr/libdata/debug/usr/sbin/rump.arp.debug comp-netutil-debug debug,rump ./usr/libdata/debug/usr/sbin/rump.envstat.debug comp-sysutil-debug debug,rump +./usr/libdata/debug/usr/sbin/rump.fssconfig.debug comp-sysutil-debug debug,rump ./usr/libdata/debug/usr/sbin/rump.ndp.debug comp-netutil-debug inet6,debug,rump ./usr/libdata/debug/usr/sbin/rump.powerd.debug comp-sysutil-debug debug,rump ./usr/libdata/debug/usr/sbin/rump.traceroute.debug comp-netutil-debug debug,rump
CVS commit: [pgoyette-localcount] src/usr.sbin/fssconfig
Module Name:src Committed By: pgoyette Date: Sun Jul 31 02:02:20 UTC 2016 Modified Files: src/usr.sbin/fssconfig [pgoyette-localcount]: Makefile Added Files: src/usr.sbin/fssconfig [pgoyette-localcount]: fssconfig_hostops.c fssconfig_rumpops.c prog_ops.h Log Message: Add a rump version of fssconfig To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.1.78.1 src/usr.sbin/fssconfig/Makefile cvs rdiff -u -r0 -r1.1.2.1 src/usr.sbin/fssconfig/fssconfig_hostops.c \ src/usr.sbin/fssconfig/fssconfig_rumpops.c \ src/usr.sbin/fssconfig/prog_ops.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.sbin/fssconfig/Makefile diff -u src/usr.sbin/fssconfig/Makefile:1.1 src/usr.sbin/fssconfig/Makefile:1.1.78.1 --- src/usr.sbin/fssconfig/Makefile:1.1 Wed Dec 10 11:40:12 2003 +++ src/usr.sbin/fssconfig/Makefile Sun Jul 31 02:02:20 2016 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2003/12/10 11:40:12 hannken Exp $ +# $NetBSD: Makefile,v 1.1.78.1 2016/07/31 02:02:20 pgoyette Exp $ -PROG= fssconfig +RUMPPRG= fssconfig MAN= fssconfig.8 DPADD+= ${LIBUTIL} LDADD+= -lutil Added files: Index: src/usr.sbin/fssconfig/fssconfig_hostops.c diff -u /dev/null src/usr.sbin/fssconfig/fssconfig_hostops.c:1.1.2.1 --- /dev/null Sun Jul 31 02:02:20 2016 +++ src/usr.sbin/fssconfig/fssconfig_hostops.c Sun Jul 31 02:02:20 2016 @@ -0,0 +1,52 @@ +/* $NetBSD: fssconfig_hostops.c,v 1.1.2.1 2016/07/31 02:02:20 pgoyette Exp $ */ + +/* + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +#ifndef lint +__RCSID("$NetBSD: fssconfig_hostops.c,v 1.1.2.1 2016/07/31 02:02:20 pgoyette Exp $"); +#endif /* !lint */ + +#include +#include +#include +#include + +#include +#include + +#include "prog_ops.h" + +const struct prog_ops prog_ops = { + .op_open = open, + .op_ioctl = ioctl, + .op_pread = pread, + .op_close = close, + .op_stat = stat, + .op_fstat = fstat, + .op_statvfs1 = statvfs1, +}; Index: src/usr.sbin/fssconfig/fssconfig_rumpops.c diff -u /dev/null src/usr.sbin/fssconfig/fssconfig_rumpops.c:1.1.2.1 --- /dev/null Sun Jul 31 02:02:20 2016 +++ src/usr.sbin/fssconfig/fssconfig_rumpops.c Sun Jul 31 02:02:20 2016 @@ -0,0 +1,54 @@ +/* $NetBSD: fssconfig_rumpops.c,v 1.1.2.1 2016/07/31 02:02:20 pgoyette Exp $ */ + +/* + * Copyright (c) 2009 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT
CVS commit: [pgoyette-localcount] src/sys
Module Name:src Committed By: pgoyette Date: Sun Jul 31 01:36:49 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: fss.c src/sys/rump/dev/lib/libfss [pgoyette-localcount]: fss_component.c Log Message: When initializing the rump component, detach the [bc]devsw after using the devmajors to create the device nodes. Normal module initialization will reattach them. XXX This code sequence is fairly common, and probably should be XXX extracted into a separate routine and/or macro. But there's XXX a lot of variables/parameters involved... To generate a diff of this commit: cvs rdiff -u -r1.93.2.5 -r1.93.2.6 src/sys/dev/fss.c cvs rdiff -u -r1.2 -r1.2.2.1 src/sys/rump/dev/lib/libfss/fss_component.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/fss.c diff -u src/sys/dev/fss.c:1.93.2.5 src/sys/dev/fss.c:1.93.2.6 --- src/sys/dev/fss.c:1.93.2.5 Wed Jul 27 03:25:00 2016 +++ src/sys/dev/fss.c Sun Jul 31 01:36:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $ */ +/* $NetBSD: fss.c,v 1.93.2.6 2016/07/31 01:36:49 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.5 2016/07/27 03:25:00 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93.2.6 2016/07/31 01:36:49 pgoyette Exp $"); #include #include @@ -1321,10 +1321,11 @@ fss_bs_thread(void *arg) MODULE(MODULE_CLASS_DRIVER, fss, NULL); CFDRIVER_DECL(fss, DV_DISK, NULL); +devmajor_t fss_bmajor = -1, fss_cmajor = -1; + static int fss_modcmd(modcmd_t cmd, void *arg) { - devmajor_t bmajor = -1, cmajor = -1; int error = 0; switch (cmd) { @@ -1342,9 +1343,8 @@ fss_modcmd(modcmd_t cmd, void *arg) break; } error = devsw_attach(fss_cd.cd_name, - _bdevsw, , _cdevsw, ); - if (error == EEXIST) - error = 0; + _bdevsw, _bmajor, _cdevsw, _cmajor); + if (error) { config_cfattach_detach(fss_cd.cd_name, _ca); config_cfdriver_detach(_cd); @@ -1354,11 +1354,14 @@ fss_modcmd(modcmd_t cmd, void *arg) break; case MODULE_CMD_FINI: + devsw_detach(_bdevsw, _cdevsw); error = config_cfattach_detach(fss_cd.cd_name, _ca); - if (error) + if (error) { + devsw_attach(fss_cd.cd_name, _bdevsw, _bmajor, + _cdevsw, _cmajor); break; + } config_cfdriver_detach(_cd); - devsw_detach(_bdevsw, _cdevsw); mutex_destroy(_device_lock); break; Index: src/sys/rump/dev/lib/libfss/fss_component.c diff -u src/sys/rump/dev/lib/libfss/fss_component.c:1.2 src/sys/rump/dev/lib/libfss/fss_component.c:1.2.2.1 --- src/sys/rump/dev/lib/libfss/fss_component.c:1.2 Tue Jan 26 23:12:15 2016 +++ src/sys/rump/dev/lib/libfss/fss_component.c Sun Jul 31 01:36:49 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss_component.c,v 1.2 2016/01/26 23:12:15 pooka Exp $ */ +/* $NetBSD: fss_component.c,v 1.2.2.1 2016/07/31 01:36:49 pgoyette Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.2 2016/01/26 23:12:15 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.2.2.1 2016/07/31 01:36:49 pgoyette Exp $"); #include #include @@ -40,20 +40,22 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV) { extern const struct bdevsw fss_bdevsw; extern const struct cdevsw fss_cdevsw; - devmajor_t bmaj, cmaj; + extern devmajor_t fss_bmajor, fss_cmajor; int error; - bmaj = bdevsw_lookup_major(_bdevsw); - cmaj = cdevsw_lookup_major(_cdevsw); + fss_bmajor = bdevsw_lookup_major(_bdevsw); + fss_cmajor = cdevsw_lookup_major(_cdevsw); - if ((error = devsw_attach("fss", _bdevsw, , - _cdevsw, )) != 0) + if ((error = devsw_attach("fss", _bdevsw, _bmajor, + _cdevsw, _cmajor)) != 0) panic("cannot attach fss: %d", error); if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/fss", '0', - bmaj, 0, 4)) != 0) + fss_bmajor, 0, 4)) != 0) panic("cannot create cooked fss dev nodes: %d", error); if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rfss", '0', - cmaj, 0, 4)) != 0) + fss_cmajor, 0, 4)) != 0) panic("cannot create raw fss dev nodes: %d", error); + + devsw_detach(_bdevsw, _cdevsw); }
CVS commit: [pgoyette-localcount] src/tests/dev
Module Name:src Committed By: pgoyette Date: Sun Jul 31 01:33:21 UTC 2016 Modified Files: src/tests/dev [pgoyette-localcount]: Makefile Log Message: Descend into fss subdirectory To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.2.1 src/tests/dev/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/Makefile diff -u src/tests/dev/Makefile:1.10 src/tests/dev/Makefile:1.10.2.1 --- src/tests/dev/Makefile:1.10 Tue Jan 5 17:22:38 2016 +++ src/tests/dev/Makefile Sun Jul 31 01:33:21 2016 @@ -1,11 +1,11 @@ -# $NetBSD: Makefile,v 1.10 2016/01/05 17:22:38 jakllsch Exp $ +# $NetBSD: Makefile,v 1.10.2.1 2016/07/31 01:33:21 pgoyette Exp $ # .include TESTSDIR= ${TESTSBASE}/dev -TESTS_SUBDIRS+= cgd raidframe +TESTS_SUBDIRS+= cgd fss raidframe .if (${MKRUMP} != "no") && !defined(BSD_MK_COMPAT_FILE) TESTS_SUBDIRS+= audio md scsipi sysmon usb .endif
CVS commit: [pgoyette-localcount] src/sys/dev
Module Name:src Committed By: pgoyette Date: Sun Jul 31 01:32:00 UTC 2016 Modified Files: src/sys/dev [pgoyette-localcount]: ld.c Log Message: Use after initialization, not before To generate a diff of this commit: cvs rdiff -u -r1.94.2.4 -r1.94.2.5 src/sys/dev/ld.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/ld.c diff -u src/sys/dev/ld.c:1.94.2.4 src/sys/dev/ld.c:1.94.2.5 --- src/sys/dev/ld.c:1.94.2.4 Wed Jul 27 01:13:50 2016 +++ src/sys/dev/ld.c Sun Jul 31 01:32:00 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.94.2.4 2016/07/27 01:13:50 pgoyette Exp $ */ +/* $NetBSD: ld.c,v 1.94.2.5 2016/07/31 01:32:00 pgoyette Exp $ */ /*- * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94.2.4 2016/07/27 01:13:50 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.94.2.5 2016/07/31 01:32:00 pgoyette Exp $"); #include #include @@ -627,10 +627,11 @@ static void ld_config_interrupts(device_t d) { struct ld_softc *sc; - struct dk_softc *dksc = >sc_dksc; + struct dk_softc *dksc; device_acquire(d); sc = device_private(d); + dksc = >sc_dksc; dkwedge_discover(>sc_dkdev); device_release(d); } @@ -654,6 +655,7 @@ ld_discard(device_t dev, off_t pos, off_ static int lddiscard(dev_t dev, off_t pos, off_t len) { + device_t self; struct ld_softc *sc; struct dk_softc *dksc; int unit;
CVS commit: [pgoyette-localcount] src/etc/mtree
Module Name:src Committed By: pgoyette Date: Sun Jul 31 01:28:52 UTC 2016 Modified Files: src/etc/mtree [pgoyette-localcount]: NetBSD.dist.tests Log Message: Add directories for the fss(4) test To generate a diff of this commit: cvs rdiff -u -r1.127 -r1.127.2.1 src/etc/mtree/NetBSD.dist.tests 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/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.127 src/etc/mtree/NetBSD.dist.tests:1.127.2.1 --- src/etc/mtree/NetBSD.dist.tests:1.127 Fri Apr 15 01:38:17 2016 +++ src/etc/mtree/NetBSD.dist.tests Sun Jul 31 01:28:52 2016 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.127 2016/04/15 01:38:17 ozaki-r Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.127.2.1 2016/07/31 01:28:52 pgoyette Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -17,6 +17,7 @@ ./usr/libdata/debug/usr/tests/dev ./usr/libdata/debug/usr/tests/dev/audio ./usr/libdata/debug/usr/tests/dev/cgd +./usr/libdata/debug/usr/tests/dev/fss ./usr/libdata/debug/usr/tests/dev/md ./usr/libdata/debug/usr/tests/dev/scsipi ./usr/libdata/debug/usr/tests/dev/sysmon @@ -186,6 +187,7 @@ ./usr/tests/dev ./usr/tests/dev/audio ./usr/tests/dev/cgd +./usr/tests/dev/fss ./usr/tests/dev/md ./usr/tests/dev/raidframe ./usr/tests/dev/scsipi
CVS commit: [pgoyette-localcount] src/distrib/sets/lists/tests
Module Name:src Committed By: pgoyette Date: Sun Jul 31 01:28:02 UTC 2016 Modified Files: src/distrib/sets/lists/tests [pgoyette-localcount]: mi Log Message: Add the fss(4) test To generate a diff of this commit: cvs rdiff -u -r1.678 -r1.678.2.1 src/distrib/sets/lists/tests/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/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.678 src/distrib/sets/lists/tests/mi:1.678.2.1 --- src/distrib/sets/lists/tests/mi:1.678 Wed Jul 13 15:58:37 2016 +++ src/distrib/sets/lists/tests/mi Sun Jul 31 01:28:02 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.678 2016/07/13 15:58:37 matt Exp $ +# $NetBSD: mi,v 1.678.2.1 2016/07/31 01:28:02 pgoyette Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -25,6 +25,7 @@ ./usr/libdata/debug/usr/tests/dev tests-fs-debug compattestfile,atf ./usr/libdata/debug/usr/tests/dev/audio tests-fs-debug compattestfile,atf ./usr/libdata/debug/usr/tests/dev/cgd tests-fs-debug compattestfile,atf +./usr/libdata/debug/usr/tests/dev/fss tests-fs-debug compattestfile,atf ./usr/libdata/debug/usr/tests/dev/cgd/h_img2cgdtests-obsolete obsolete ./usr/libdata/debug/usr/tests/dev/md tests-fs-debug compattestfile,atf ./usr/libdata/debug/usr/tests/dev/scsipitests-fs-debug compattestfile,atf @@ -1364,6 +1365,10 @@ ./usr/tests/dev/cgd/h_img2cgd/h_img2cgd tests-obsolete obsolete ./usr/tests/dev/cgd/paramsfile tests-fs-tests compattestfile,atf ./usr/tests/dev/cgd/t_cgd tests-fs-tests compattestfile,atf +./usr/tests/dev/fsstests-fs-tests compattestfile,atf +./usr/tests/dev/fss/Atffile tests-fs-tests compattestfile,atf +./usr/tests/dev/fss/Kyuafile tests-fs-tests compattestfile,atf,kyua +./usr/tests/dev/fss/t_fss tests-fs-tests compattestfile,atf ./usr/tests/dev/mdtests-fs-tests compattestfile,atf ./usr/tests/dev/md/Atffile tests-fs-tests atf,rump ./usr/tests/dev/md/Kyuafile tests-fs-tests atf,rump,kyua
CVS commit: src/sys/rump/dev/lib/libfss
Module Name:src Committed By: pgoyette Date: Sat Jul 30 23:07:23 UTC 2016 Modified Files: src/sys/rump/dev/lib/libfss: fss_component.c Log Message: Fix variable names in previous To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/rump/dev/lib/libfss/fss_component.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/rump/dev/lib/libfss/fss_component.c diff -u src/sys/rump/dev/lib/libfss/fss_component.c:1.3 src/sys/rump/dev/lib/libfss/fss_component.c:1.4 --- src/sys/rump/dev/lib/libfss/fss_component.c:1.3 Sat Jul 30 22:36:14 2016 +++ src/sys/rump/dev/lib/libfss/fss_component.c Sat Jul 30 23:07:23 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss_component.c,v 1.3 2016/07/30 22:36:14 pgoyette Exp $ */ +/* $NetBSD: fss_component.c,v 1.4 2016/07/30 23:07:23 pgoyette Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.3 2016/07/30 22:36:14 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.4 2016/07/30 23:07:23 pgoyette Exp $"); #include #include @@ -40,7 +40,7 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV) { extern const struct bdevsw fss_bdevsw; extern const struct cdevsw fss_cdevsw; - extern devmajor_t fss_bmaj, fss_cmaj; + extern devmajor_t fss_bmajor, fss_cmajor; int error; fss_bmajor = bdevsw_lookup_major(_bdevsw);
CVS commit: src/sys
Module Name:src Committed By: pgoyette Date: Sat Jul 30 22:36:14 UTC 2016 Modified Files: src/sys/dev: fss.c src/sys/rump/dev/lib/libfss: fss_component.c Log Message: More adaptation of the rump component init, to avoid EEXIST during regular module initialization. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/dev/fss.c cvs rdiff -u -r1.2 -r1.3 src/sys/rump/dev/lib/libfss/fss_component.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/fss.c diff -u src/sys/dev/fss.c:1.93 src/sys/dev/fss.c:1.94 --- src/sys/dev/fss.c:1.93 Thu Aug 20 14:40:17 2015 +++ src/sys/dev/fss.c Sat Jul 30 22:36:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss.c,v 1.93 2015/08/20 14:40:17 christos Exp $ */ +/* $NetBSD: fss.c,v 1.94 2016/07/30 22:36:14 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.93 2015/08/20 14:40:17 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss.c,v 1.94 2016/07/30 22:36:14 pgoyette Exp $"); #include #include @@ -1290,10 +1290,11 @@ fss_bs_thread(void *arg) MODULE(MODULE_CLASS_DRIVER, fss, NULL); CFDRIVER_DECL(fss, DV_DISK, NULL); +devmajor_t fss_bmajor = -1, fss_cmajor = -1; + static int fss_modcmd(modcmd_t cmd, void *arg) { - devmajor_t bmajor = -1, cmajor = -1; int error = 0; switch (cmd) { @@ -1311,9 +1312,8 @@ fss_modcmd(modcmd_t cmd, void *arg) break; } error = devsw_attach(fss_cd.cd_name, - _bdevsw, , _cdevsw, ); - if (error == EEXIST) - error = 0; + _bdevsw, _bmajor, _cdevsw, _cmajor); + if (error) { config_cfattach_detach(fss_cd.cd_name, _ca); config_cfdriver_detach(_cd); @@ -1323,11 +1323,14 @@ fss_modcmd(modcmd_t cmd, void *arg) break; case MODULE_CMD_FINI: + devsw_detach(_bdevsw, _cdevsw); error = config_cfattach_detach(fss_cd.cd_name, _ca); - if (error) + if (error) { + devsw_attach(fss_cd.cd_name, _bdevsw, _bmajor, + _cdevsw, _cmajor); break; + } config_cfdriver_detach(_cd); - devsw_detach(_bdevsw, _cdevsw); mutex_destroy(_device_lock); break; Index: src/sys/rump/dev/lib/libfss/fss_component.c diff -u src/sys/rump/dev/lib/libfss/fss_component.c:1.2 src/sys/rump/dev/lib/libfss/fss_component.c:1.3 --- src/sys/rump/dev/lib/libfss/fss_component.c:1.2 Tue Jan 26 23:12:15 2016 +++ src/sys/rump/dev/lib/libfss/fss_component.c Sat Jul 30 22:36:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fss_component.c,v 1.2 2016/01/26 23:12:15 pooka Exp $ */ +/* $NetBSD: fss_component.c,v 1.3 2016/07/30 22:36:14 pgoyette Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.2 2016/01/26 23:12:15 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: fss_component.c,v 1.3 2016/07/30 22:36:14 pgoyette Exp $"); #include #include @@ -40,20 +40,22 @@ RUMP_COMPONENT(RUMP_COMPONENT_DEV) { extern const struct bdevsw fss_bdevsw; extern const struct cdevsw fss_cdevsw; - devmajor_t bmaj, cmaj; + extern devmajor_t fss_bmaj, fss_cmaj; int error; - bmaj = bdevsw_lookup_major(_bdevsw); - cmaj = cdevsw_lookup_major(_cdevsw); + fss_bmajor = bdevsw_lookup_major(_bdevsw); + fss_cmajor = cdevsw_lookup_major(_cdevsw); - if ((error = devsw_attach("fss", _bdevsw, , - _cdevsw, )) != 0) + if ((error = devsw_attach("fss", _bdevsw, _bmajor, + _cdevsw, _cmajor)) != 0) panic("cannot attach fss: %d", error); if ((error = rump_vfs_makedevnodes(S_IFBLK, "/dev/fss", '0', - bmaj, 0, 4)) != 0) + fss_bmajor, 0, 4)) != 0) panic("cannot create cooked fss dev nodes: %d", error); if ((error = rump_vfs_makedevnodes(S_IFCHR, "/dev/rfss", '0', - cmaj, 0, 4)) != 0) + fss_cmajor, 0, 4)) != 0) panic("cannot create raw fss dev nodes: %d", error); + + devsw_detach(_bdevsw, _cdevsw); }
CVS commit: src/sys/kern
Module Name:src Committed By: christos Date: Sat Jul 30 15:38:17 UTC 2016 Modified Files: src/sys/kern: sys_sched.c Log Message: Fix reversed test. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/kern/sys_sched.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/sys_sched.c diff -u src/sys/kern/sys_sched.c:1.45 src/sys/kern/sys_sched.c:1.46 --- src/sys/kern/sys_sched.c:1.45 Thu Jul 7 02:55:43 2016 +++ src/sys/kern/sys_sched.c Sat Jul 30 11:38:17 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sys_sched.c,v 1.45 2016/07/07 06:55:43 msaitoh Exp $ */ +/* $NetBSD: sys_sched.c,v 1.46 2016/07/30 15:38:17 christos Exp $ */ /* * Copyright (c) 2008, 2011 Mindaugas Rasiukevicius @@ -42,7 +42,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sys_sched.c,v 1.45 2016/07/07 06:55:43 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sys_sched.c,v 1.46 2016/07/30 15:38:17 christos Exp $"); #include @@ -570,7 +570,7 @@ sys__sched_protect(struct lwp *l, } } else if (pri < 0) { /* Just retrieve the current value, for debugging */ - if (l->l_protectprio != -1) + if (l->l_protectprio == -1) error = ENOENT; else *retval = l->l_protectprio - PRI_USER_RT;
CVS commit: src/usr.sbin/fssconfig
Module Name:src Committed By: pgoyette Date: Sat Jul 30 12:33:27 UTC 2016 Modified Files: src/usr.sbin/fssconfig: fssconfig.c Log Message: Update command line parsing to match reality. Only one of -c, -u, or -l can be specified, and the -x option is available only for -c. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/usr.sbin/fssconfig/fssconfig.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/fssconfig/fssconfig.c diff -u src/usr.sbin/fssconfig/fssconfig.c:1.10 src/usr.sbin/fssconfig/fssconfig.c:1.11 --- src/usr.sbin/fssconfig/fssconfig.c:1.10 Sun Nov 4 22:21:11 2012 +++ src/usr.sbin/fssconfig/fssconfig.c Sat Jul 30 12:33:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: fssconfig.c,v 1.10 2012/11/04 22:21:11 christos Exp $ */ +/* $NetBSD: fssconfig.c,v 1.11 2016/07/30 12:33:27 pgoyette Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -60,18 +60,27 @@ main(int argc, char **argv) int ch; void (*action)(int, char **); - action = config; + action = NULL; while ((ch = getopt(argc, argv, "cluvx")) != -1) { switch (ch) { case 'c': - action = config; + if (action) +usage(); + else +action = config; break; case 'l': - action = list; + if (action) +usage(); + else +action = list; break; case 'u': - action = unconfig; + if (action) +usage(); + else +action = unconfig; break; case 'v': vflag++; @@ -85,6 +94,8 @@ main(int argc, char **argv) /* NOTREACHED */ } } + if (action == NULL) + action = config; argc -= optind; argv += optind; @@ -189,7 +200,7 @@ unconfig(int argc, char **argv) int fd; char full[64]; - if (argc != 1) + if (argc != 1 || xflag) usage(); if (vflag) @@ -211,7 +222,7 @@ list(int argc, char **argv) time_t t; struct fss_get fsg; - if (argc > 1) + if (argc > 1 || xflag) usage(); if (argc > 0)
CVS commit: src/lib/libc/sys
Module Name:src Committed By: wiz Date: Sat Jul 30 11:31:00 UTC 2016 Modified Files: src/lib/libc/sys: getsockname.2 Log Message: Sort errors. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/lib/libc/sys/getsockname.2 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/getsockname.2 diff -u src/lib/libc/sys/getsockname.2:1.25 src/lib/libc/sys/getsockname.2:1.26 --- src/lib/libc/sys/getsockname.2:1.25 Sat Jul 30 11:10:40 2016 +++ src/lib/libc/sys/getsockname.2 Sat Jul 30 11:31:00 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: getsockname.2,v 1.25 2016/07/30 11:10:40 njoly Exp $ +.\" $NetBSD: getsockname.2,v 1.26 2016/07/30 11:31:00 wiz Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -126,20 +126,20 @@ The call succeeds unless: The argument .Fa s is not a valid descriptor. -.It Bq Er ENOTSOCK -The argument -.Fa s -is a file, not a socket. +.It Bq Er EFAULT +The +.Fa name +parameter points to memory not in a valid part of the process address space. .It Bq Er EINVAL The socket has been shut down. .It Bq Er ENOBUFS Insufficient resources were available in the system to perform the operation. .It Bq Er ENOTCONN The socket is not connected. -.It Bq Er EFAULT -The -.Fa name -parameter points to memory not in a valid part of the process address space. +.It Bq Er ENOTSOCK +The argument +.Fa s +is a file, not a socket. .El .Sh SEE ALSO .Xr bind 2 ,
CVS commit: src/lib/libc/sys
Module Name:src Committed By: njoly Date: Sat Jul 30 11:10:40 UTC 2016 Modified Files: src/lib/libc/sys: getsockname.2 Log Message: Remove obsolete BUGS section. getsockname(2) report sensible values for bound UNIX domain sockets. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/sys/getsockname.2 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/getsockname.2 diff -u src/lib/libc/sys/getsockname.2:1.24 src/lib/libc/sys/getsockname.2:1.25 --- src/lib/libc/sys/getsockname.2:1.24 Mon Jul 9 21:22:21 2012 +++ src/lib/libc/sys/getsockname.2 Sat Jul 30 11:10:40 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: getsockname.2,v 1.24 2012/07/09 21:22:21 jdf Exp $ +.\" $NetBSD: getsockname.2,v 1.25 2016/07/30 11:10:40 njoly Exp $ .\" .\" Copyright (c) 1983, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" @(#)getsockname.2 8.1 (Berkeley) 6/4/93 .\" -.Dd July 9, 2012 +.Dd July 30, 2016 .Dt GETSOCKNAME 2 .Os .Sh NAME @@ -149,9 +149,3 @@ The .Fn getsockname function call appeared in .Bx 4.2 . -.Sh BUGS -Names bound to sockets in the -.Ux -domain are inaccessible; -.Fn getsockname -returns a zero length name.
CVS commit: src
Module Name:src Committed By: njoly Date: Sat Jul 30 11:03:54 UTC 2016 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/tests/lib/libc/sys: Makefile Added Files: src/tests/lib/libc/sys: t_getsockname.c Log Message: New getsockname(2) testcase for UNIX domain sockets. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.679 -r1.680 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.42 -r1.43 src/tests/lib/libc/sys/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/sys/t_getsockname.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/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.160 src/distrib/sets/lists/debug/mi:1.161 --- src/distrib/sets/lists/debug/mi:1.160 Sat Jul 2 15:40:51 2016 +++ src/distrib/sets/lists/debug/mi Sat Jul 30 11:03:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.160 2016/07/02 15:40:51 christos Exp $ +# $NetBSD: mi,v 1.161 2016/07/30 11:03:54 njoly Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -2007,6 +2007,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getpid.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getrusage.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_getsid.debug tests-lib-debug debug,atf,compattestfile +./usr/libdata/debug/usr/tests/lib/libc/sys/t_getsockname.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_gettimeofday.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_issetugid.debug tests-lib-debug debug,atf,compattestfile ./usr/libdata/debug/usr/tests/lib/libc/sys/t_kevent.debug tests-lib-debug debug,atf,compattestfile Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.679 src/distrib/sets/lists/tests/mi:1.680 --- src/distrib/sets/lists/tests/mi:1.679 Fri Jul 29 07:02:24 2016 +++ src/distrib/sets/lists/tests/mi Sat Jul 30 11:03:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.679 2016/07/29 07:02:24 pgoyette Exp $ +# $NetBSD: mi,v 1.680 2016/07/30 11:03:54 njoly Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -2682,6 +2682,7 @@ ./usr/tests/lib/libc/sys/t_getpid tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/sys/t_getrusage tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/sys/t_getsid tests-lib-tests compattestfile,atf +./usr/tests/lib/libc/sys/t_getsockname tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/sys/t_gettimeofday tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/sys/t_issetugid tests-lib-tests compattestfile,atf ./usr/tests/lib/libc/sys/t_kevent tests-lib-tests compattestfile,atf Index: src/tests/lib/libc/sys/Makefile diff -u src/tests/lib/libc/sys/Makefile:1.42 src/tests/lib/libc/sys/Makefile:1.43 --- src/tests/lib/libc/sys/Makefile:1.42 Wed Apr 6 00:45:53 2016 +++ src/tests/lib/libc/sys/Makefile Sat Jul 30 11:03:54 2016 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.42 2016/04/06 00:45:53 christos Exp $ +# $NetBSD: Makefile,v 1.43 2016/07/30 11:03:54 njoly Exp $ MKMAN= no @@ -23,6 +23,7 @@ TESTS_C+= t_getlogin TESTS_C+= t_getpid TESTS_C+= t_getrusage TESTS_C+= t_getsid +TESTS_C+= t_getsockname TESTS_C+= t_gettimeofday TESTS_C+= t_issetugid TESTS_C+= t_kevent Added files: Index: src/tests/lib/libc/sys/t_getsockname.c diff -u /dev/null src/tests/lib/libc/sys/t_getsockname.c:1.1 --- /dev/null Sat Jul 30 11:03:55 2016 +++ src/tests/lib/libc/sys/t_getsockname.c Sat Jul 30 11:03:54 2016 @@ -0,0 +1,82 @@ +/* $NetBSD: t_getsockname.c,v 1.1 2016/07/30 11:03:54 njoly Exp $ */ +/* + * Copyright (c) 2016 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND + * CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Sat Jul 30 07:10:42 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Correct comment To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.75 src/sys/arch/mips/mips/mipsX_subr.S:1.76 --- src/sys/arch/mips/mips/mipsX_subr.S:1.75 Sat Jul 30 07:09:03 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Sat Jul 30 07:10:42 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.75 2016/07/30 07:09:03 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.76 2016/07/30 07:10:42 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2694,7 +2694,7 @@ MIPSX(user_intr_return): REG_L t9, CALLFRAME_SIZ+TF_REG_T9(k1) # $25 REG_L k0, CALLFRAME_SIZ+TF_REG_SR(k1) # status register DYNAMIC_STATUS_MASK(k0, sp) # machine dependent masking - REG_L gp, CALLFRAME_SIZ+TF_REG_GP(k1) # $29 + REG_L gp, CALLFRAME_SIZ+TF_REG_GP(k1) # $28 REG_L sp, CALLFRAME_SIZ+TF_REG_SP(k1) # $29 REG_L ra, CALLFRAME_SIZ+TF_REG_RA(k1) # $31 mtc0 k0, MIPS_COP_0_STATUS
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: skrll Date: Sat Jul 30 07:09:03 UTC 2016 Modified Files: src/sys/arch/mips/mips: mipsX_subr.S Log Message: Don't always include PARANOIA code To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/mips/mipsX_subr.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/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.74 src/sys/arch/mips/mips/mipsX_subr.S:1.75 --- src/sys/arch/mips/mips/mipsX_subr.S:1.74 Thu Jul 21 12:17:07 2016 +++ src/sys/arch/mips/mips/mipsX_subr.S Sat Jul 30 07:09:03 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.74 2016/07/21 12:17:07 skrll Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.75 2016/07/30 07:09:03 skrll Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -706,7 +706,7 @@ MIPSX(slowfault): NESTED_NOPROFILE(MIPSX(kern_gen_exception), KERNFRAME_SIZ, ra) .set noat .mask 0x8000, -4 -#if defined(PARANOIA) || 1 +#if defined(PARANOIA) PTR_L k0, L_PCB(MIPS_CURLWP) slt k0, k0, sp # k0 = L_PCB(MIPS_CURLWP) < sp 1: beqz k0, 1b # loop forever if false
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jul 30 06:29:28 UTC 2016 Modified Files: src/sys/arch/mips/mips: bus_dma.c Log Message: Supply lastvaddr to load_buffer. Fix printf formats. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/mips/mips/bus_dma.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/mips/mips/bus_dma.c diff -u src/sys/arch/mips/mips/bus_dma.c:1.36 src/sys/arch/mips/mips/bus_dma.c:1.37 --- src/sys/arch/mips/mips/bus_dma.c:1.36 Fri Jul 22 19:50:44 2016 +++ src/sys/arch/mips/mips/bus_dma.c Sat Jul 30 06:29:28 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.36 2016/07/22 19:50:44 matt Exp $ */ +/* $NetBSD: bus_dma.c,v 1.37 2016/07/30 06:29:28 matt Exp $ */ /*- * Copyright (c) 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.36 2016/07/22 19:50:44 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.37 2016/07/30 06:29:28 matt Exp $"); #define _MIPS_BUS_DMA_PRIVATE @@ -104,10 +104,10 @@ paddr_t kvtophys(vaddr_t); /* XXX */ static int _bus_dmamap_load_buffer(bus_dma_tag_t t, bus_dmamap_t map, void *buf, bus_size_t buflen, struct vmspace *vm, int flags, -int *segp, bool first) +int *segp, vaddr_t lastvaddr, bool first) { paddr_t baddr, curaddr, lastaddr; - vaddr_t vaddr = (vaddr_t)buf, lastvaddr; + vaddr_t vaddr = (vaddr_t)buf; bus_dma_segment_t *ds = >dm_segs[*segp]; bus_dma_segment_t * const eds = >dm_segs[map->_dm_segcnt]; const bus_addr_t bmask = ~(map->_dm_boundary - 1); @@ -115,7 +115,6 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, (mips_options.mips_cpu_flags & CPU_MIPS_D_CACHE_COHERENT) != 0; lastaddr = ds->ds_addr + ds->ds_len; - lastvaddr = ds->_ds_vaddr + ds->ds_len; while (buflen > 0) { /* @@ -166,12 +165,8 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, * Insert chunk into a segment, coalescing with * the previous segment if possible. */ - if (first) { - ds->ds_addr = curaddr; - ds->ds_len = sgsize; - ds->_ds_vaddr = vaddr; - first = false; - } else if (curaddr == lastaddr + if (!first + && curaddr == lastaddr && (d_cache_coherent #ifndef __mips_o32 || !MIPS_CACHE_VIRTUAL_ALIAS @@ -182,11 +177,12 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, || ((ds->ds_addr ^ curaddr) & bmask) == 0)) { ds->ds_len += sgsize; } else { - if (++ds >= eds) + if (!first && ++ds >= eds) break; ds->ds_addr = curaddr; ds->ds_len = sgsize; - ds->_ds_vaddr = vaddr; + ds->_ds_vaddr = (intptr_t)vaddr; + first = false; /* * If this segment uses the correct color, try to see * if we can use a direct-mapped VA for the segment. @@ -206,6 +202,9 @@ _bus_dmamap_load_buffer(bus_dma_tag_t t, MIPS_PHYS_TO_XKPHYS_CACHED(curaddr); #endif } + /* Make sure this is a valid kernel address */ + KASSERTMSG(ds->_ds_vaddr < 0, + "_ds_vaddr %#"PRIxREGISTER, ds->_ds_vaddr); } lastaddr = curaddr + sgsize; @@ -266,7 +265,7 @@ _bus_dma_load_bouncebuf(bus_dma_tag_t t, cookie->id_buftype = buftype; seg = 0; error = _bus_dmamap_load_buffer(t, map, cookie->id_bouncebuf, - buflen, vm, flags, , true); + buflen, vm, flags, , 0, true); if (error) return (error); @@ -457,7 +456,7 @@ _bus_dmamap_load(bus_dma_tag_t t, bus_dm seg = 0; error = _bus_dmamap_load_buffer(t, map, buf, buflen, - vm, flags, , true); + vm, flags, , 0, true); if (error == 0) { map->dm_mapsize = buflen; map->dm_nsegs = seg + 1; @@ -502,7 +501,6 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, b int seg, error; struct mbuf *m; struct vmspace * vm = vmspace_kernel(); - bool first; if (map->dm_nsegs > 0) { #ifdef _MIPS_NEED_BUS_DMA_BOUNCE @@ -533,15 +531,17 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, b if (m0->m_pkthdr.len > map->_dm_size) return (EINVAL); - first = true; + vaddr_t lastvaddr = 0; + bool first = true; seg = 0; error = 0; for (m = m0; m != NULL && error == 0; m = m->m_next) { if (m->m_len == 0) continue; error = _bus_dmamap_load_buffer(t, map, m->m_data, m->m_len, - vm, flags, , first); + vm, flags, , lastvaddr, first); first = false; + lastvaddr = (vaddr_t)m->m_data + m->m_len; } if (error == 0) { map->dm_mapsize = m0->m_pkthdr.len; @@ -572,7 +572,6 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bu struct uio *uio, int flags) { int seg, i, error; - bool first; bus_size_t minlen, resid; struct iovec *iov; void *addr; @@ -600,7 +599,8 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bu resid = uio->uio_resid; iov = uio->uio_iov; - first = true; + vaddr_t lastvaddr = 0; + bool first = true; seg = 0; error = 0; for (i = 0; i < uio->uio_iovcnt && resid != 0 && error == 0; i++) { @@ -612,8 +612,9 @@ _bus_dmamap_load_uio(bus_dma_tag_t t, bu
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Jul 30 06:27:45 UTC 2016 Modified Files: src/sys/arch/mips/include: psl.h Log Message: KX needs to set on !O32 kernels To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/mips/include/psl.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/arch/mips/include/psl.h diff -u src/sys/arch/mips/include/psl.h:1.18 src/sys/arch/mips/include/psl.h:1.19 --- src/sys/arch/mips/include/psl.h:1.18 Mon Dec 14 00:46:05 2009 +++ src/sys/arch/mips/include/psl.h Sat Jul 30 06:27:45 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: psl.h,v 1.18 2009/12/14 00:46:05 matt Exp $ */ +/* $NetBSD: psl.h,v 1.19 2016/07/30 06:27:45 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -48,11 +48,7 @@ #define MIPS3_PSL_LOWIPL (MIPS3_INT_MASK | MIPS_SR_INT_IE) #if !defined(__mips_o32) -# ifdef _LP64 -# define MIPS3_PSL_XFLAGS (MIPS3_SR_XX | MIPS_SR_KX) -# else -# define MIPS3_PSL_XFLAGS (MIPS3_SR_XX) -# endif +# define MIPS3_PSL_XFLAGS (MIPS3_SR_XX | MIPS_SR_KX) #else # define MIPS3_PSL_XFLAGS (0) #endif
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat Jul 30 06:28:05 UTC 2016 Modified Files: src/sys/arch/mips/include: bus_dma_defs.h Log Message: Use register_t for _ds_vaddr To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/include/bus_dma_defs.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/arch/mips/include/bus_dma_defs.h diff -u src/sys/arch/mips/include/bus_dma_defs.h:1.2 src/sys/arch/mips/include/bus_dma_defs.h:1.3 --- src/sys/arch/mips/include/bus_dma_defs.h:1.2 Thu Jun 11 08:22:09 2015 +++ src/sys/arch/mips/include/bus_dma_defs.h Sat Jul 30 06:28:05 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma_defs.h,v 1.2 2015/06/11 08:22:09 matt Exp $ */ +/* $NetBSD: bus_dma_defs.h,v 1.3 2016/07/30 06:28:05 matt Exp $ */ /*- * Copyright (c) 1997, 1998, 2000, 2001 The NetBSD Foundation, Inc. @@ -112,7 +112,7 @@ typedef struct mips_bus_dmamap *bus_dmam struct mips_bus_dma_segment { bus_addr_t ds_addr; /* DMA address */ bus_size_t ds_len; /* length of transfer */ - bus_addr_t _ds_vaddr; /* virtual address, 0 if invalid */ + register_t _ds_vaddr; /* virtual address, 0 if invalid */ }; typedef struct mips_bus_dma_segment bus_dma_segment_t;
CVS commit: src/sys/arch/mips/mips
Module Name:src Committed By: matt Date: Sat Jul 30 06:20:54 UTC 2016 Modified Files: src/sys/arch/mips/mips: vm_machdep.c Log Message: For LP64 and N32 make sure KX is set in the trapframe as well. To generate a diff of this commit: cvs rdiff -u -r1.148 -r1.149 src/sys/arch/mips/mips/vm_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/mips/mips/vm_machdep.c diff -u src/sys/arch/mips/mips/vm_machdep.c:1.148 src/sys/arch/mips/mips/vm_machdep.c:1.149 --- src/sys/arch/mips/mips/vm_machdep.c:1.148 Sat Jul 30 05:58:15 2016 +++ src/sys/arch/mips/mips/vm_machdep.c Sat Jul 30 06:20:54 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.148 2016/07/30 05:58:15 skrll Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.149 2016/07/30 06:20:54 matt Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.148 2016/07/30 05:58:15 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.149 2016/07/30 06:20:54 matt Exp $"); #include "opt_ddb.h" #include "opt_coredump.h" @@ -144,6 +144,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp pcb2->pcb_context.val[_L_RA] = mips_locore_jumpvec.ljv_lwp_trampoline; /* RA */ #if defined(_LP64) || defined(__mips_n32) + KASSERT(tf->tf_regs[_R_SR] & MIPS_SR_KX); KASSERT(pcb2->pcb_context.val[_L_SR] & MIPS_SR_KX); #endif KASSERTMSG(pcb2->pcb_context.val[_L_SR] & MIPS_SR_INT_IE,
CVS commit: src/doc
Module Name:src Committed By: dholland Date: Sat Jul 30 06:20:14 UTC 2016 Modified Files: src/doc: TODO.8 Log Message: stick my neck out for a runnable-but-experimental lfs64 To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/doc/TODO.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/TODO.8 diff -u src/doc/TODO.8:1.2 src/doc/TODO.8:1.3 --- src/doc/TODO.8:1.2 Wed Jul 27 02:33:40 2016 +++ src/doc/TODO.8 Sat Jul 30 06:20:14 2016 @@ -1,4 +1,4 @@ -$NetBSD: TODO.8,v 1.2 2016/07/27 02:33:40 christos Exp $ +$NetBSD: TODO.8,v 1.3 2016/07/30 06:20:14 dholland Exp $ Items we (currently) plan to finish before branching netbsd-8: @@ -8,6 +8,7 @@ Items we (currently) plan to finish befo - switch all architectures to new binutils and gdb - enable PIE/ASLR on all architectures (that have switched to gcc 5.4 if we fail previous item) where it works + - get lfs64 done for experimental use [dholland] and of course: fix as many bugs as possible.
CVS commit: src/external/bsd/blacklist/bin
Module Name:src Committed By: dholland Date: Sat Jul 30 06:09:29 UTC 2016 Modified Files: src/external/bsd/blacklist/bin: blacklistd.8 Log Message: typo To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/bsd/blacklist/bin/blacklistd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/blacklist/bin/blacklistd.8 diff -u src/external/bsd/blacklist/bin/blacklistd.8:1.17 src/external/bsd/blacklist/bin/blacklistd.8:1.18 --- src/external/bsd/blacklist/bin/blacklistd.8:1.17 Wed Jun 8 12:48:37 2016 +++ src/external/bsd/blacklist/bin/blacklistd.8 Sat Jul 30 06:09:29 2016 @@ -1,4 +1,4 @@ -.\" $NetBSD: blacklistd.8,v 1.17 2016/06/08 12:48:37 wiz Exp $ +.\" $NetBSD: blacklistd.8,v 1.18 2016/07/30 06:09:29 dholland Exp $ .\" .\" Copyright (c) 2015 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -47,7 +47,7 @@ .Nm is a daemon similar to .Xr syslogd 8 -that listens to a sockets at paths specified in the +that listens to sockets at paths specified in the .Ar sockpathsfile for notifications from other daemons about successful or failed connection attempts.