CVS commit: src

2014-04-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Tue Apr 29 06:51:57 UTC 2014

Modified Files:
src: build.sh

Log Message:
resolvepath: Resolve .. in absolute paths.


To generate a diff of this commit:
cvs rdiff -u -r1.278 -r1.279 src/build.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/build.sh
diff -u src/build.sh:1.278 src/build.sh:1.279
--- src/build.sh:1.278	Mon Mar 31 19:29:21 2014
+++ src/build.sh	Tue Apr 29 06:51:57 2014
@@ -1,5 +1,5 @@
 #! /usr/bin/env sh
-#	$NetBSD: build.sh,v 1.278 2014/03/31 19:29:21 martin Exp $
+#	$NetBSD: build.sh,v 1.279 2014/04/29 06:51:57 uebayasi Exp $
 #
 # Copyright (c) 2001-2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -889,6 +889,7 @@ resolvepath()
 		val="${TOP}/${val%/}"
 		;;
 	esac
+	val="$( /bin/mkdir -p ${val} && cd ${val} && /bin/pwd )"
 	eval ${var}=\"\${val}\"
 }
 
@@ -1746,7 +1747,7 @@ createmakewrapper()
 	eval cat <

CVS commit: src

2014-04-28 Thread Masao Uebayashi
Module Name:src
Committed By:   uebayasi
Date:   Tue Apr 29 06:29:02 UTC 2014

Modified Files:
src/distrib/sets/lists/debug: mi
src/distrib/sets/lists/tests: mi
src/etc/mtree: NetBSD.dist.tests
src/tests/lib/libc/gen: Makefile
Added Files:
src/tests/lib/libc/gen/execve: Makefile t_execve.c

Log Message:
Minimal execve(2) ATF test.


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/debug/mi
cvs rdiff -u -r1.566 -r1.567 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.103 -r1.104 src/etc/mtree/NetBSD.dist.tests
cvs rdiff -u -r1.39 -r1.40 src/tests/lib/libc/gen/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/execve/Makefile \
src/tests/lib/libc/gen/execve/t_execve.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.59 src/distrib/sets/lists/debug/mi:1.60
--- src/distrib/sets/lists/debug/mi:1.59	Thu Apr 24 21:46:44 2014
+++ src/distrib/sets/lists/debug/mi	Tue Apr 29 06:29:02 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.59 2014/04/24 21:46:44 pooka Exp $
+# $NetBSD: mi,v 1.60 2014/04/29 06:29:02 uebayasi Exp $
 
 ./etc/mtree/set.debug   comp-sys-root
 ./usr/lib/i18n/libBIG5_g.a			comp-c-debuglib		debuglib
@@ -1792,6 +1792,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/c063/t_unlinkat.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/c063/t_utimensat.debug		tests-lib-debug		debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/db/h_db.debug			tests-lib-debug		debug,atf
+./usr/libdata/debug/usr/tests/lib/libc/gen/execve/t_execve.debug	tests-kernel-tests	debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/h_fileactions.debug	tests-kernel-tests	debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/h_spawn.debug		tests-kernel-tests	debug,atf
 ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/h_spawnattr.debug	tests-kernel-tests	debug,atf

Index: src/distrib/sets/lists/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.566 src/distrib/sets/lists/tests/mi:1.567
--- src/distrib/sets/lists/tests/mi:1.566	Thu Apr 17 23:15:27 2014
+++ src/distrib/sets/lists/tests/mi	Tue Apr 29 06:29:02 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.566 2014/04/17 23:15:27 pgoyette Exp $
+# $NetBSD: mi,v 1.567 2014/04/29 06:29:02 uebayasi Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -85,6 +85,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/c063tests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/dbtests-lib-debug
 ./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug
+./usr/libdata/debug/usr/tests/lib/libc/gen/execve			tests-kernel-tests
 ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn			tests-kernel-tests
 ./usr/libdata/debug/usr/tests/lib/libc/getaddrinfo			tests-obsolete		obsolete
 ./usr/libdata/debug/usr/tests/lib/libc/getaddrinfo/data			tests-obsolete		obsolete
@@ -1910,6 +1911,10 @@
 ./usr/tests/lib/libc/gen			tests-lib-tests
 ./usr/tests/lib/libc/gen/Atffile		tests-lib-tests		atf
 ./usr/tests/lib/libc/gen/Kyuafile		tests-lib-tests		atf,kyua
+./usr/tests/lib/libc/gen/execve			tests-kernel-tests
+./usr/tests/lib/libc/gen/execve/Atffile		tests-kernel-tests	atf
+./usr/tests/lib/libc/gen/execve/Kyuafile	tests-kernel-tests	atf,kyua
+./usr/tests/lib/libc/gen/execve/t_execve	tests-kernel-tests	atf
 ./usr/tests/lib/libc/gen/posix_spawn			tests-kernel-tests
 ./usr/tests/lib/libc/gen/posix_spawn/Atffile		tests-kernel-tests	atf
 ./usr/tests/lib/libc/gen/posix_spawn/Kyuafile		tests-kernel-tests	atf,kyua

Index: src/etc/mtree/NetBSD.dist.tests
diff -u src/etc/mtree/NetBSD.dist.tests:1.103 src/etc/mtree/NetBSD.dist.tests:1.104
--- src/etc/mtree/NetBSD.dist.tests:1.103	Sat Feb  8 19:45:51 2014
+++ src/etc/mtree/NetBSD.dist.tests	Tue Apr 29 06:29:02 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.tests,v 1.103 2014/02/08 19:45:51 jmmv Exp $
+#	$NetBSD: NetBSD.dist.tests,v 1.104 2014/04/29 06:29:02 uebayasi Exp $
 
 ./usr/libdata/debug/usr/tests
 ./usr/libdata/debug/usr/tests/atf
@@ -75,6 +75,7 @@
 ./usr/libdata/debug/usr/tests/lib/libc/c063
 ./usr/libdata/debug/usr/tests/lib/libc/db
 ./usr/libdata/debug/usr/tests/lib/libc/gen
+./usr/libdata/debug/usr/tests/lib/libc/gen/execve
 ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn
 ./usr/libdata/debug/usr/tests/lib/libc/hash
 ./usr/libdata/debug/usr/tests/lib/libc/locale
@@ -236,6 +237,7 @@
 ./usr/tests/lib/libc/c063
 ./usr/tests/lib/libc/db
 ./usr/tests/lib/libc/gen
+./usr/tests/lib/libc/gen/execve
 ./usr/tests/lib/libc/gen/posix_spawn
 ./usr/tests/lib/libc/hash
 ./usr/tests/lib/libc/hash/data

Index: src/tests/lib/libc/gen/Makefile
diff -u src/tests/lib/libc/gen/Makefile:1.39 src/tests/lib/libc/gen/Makefile:1.40
--- src/tests/lib/libc/gen/Makefile:1.39	Thu Jan 30 15:04:04 2014
+++ src/tests/lib/libc/gen/Makefile	Tue Ap

CVS commit: src/usr.bin/getaddrinfo

2014-04-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Apr 29 01:21:02 UTC 2014

Modified Files:
src/usr.bin/getaddrinfo: Makefile

Log Message:
need bsd.own.mk


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/getaddrinfo/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/getaddrinfo/Makefile
diff -u src/usr.bin/getaddrinfo/Makefile:1.1 src/usr.bin/getaddrinfo/Makefile:1.2
--- src/usr.bin/getaddrinfo/Makefile:1.1	Mon Sep 30 02:19:22 2013
+++ src/usr.bin/getaddrinfo/Makefile	Mon Apr 28 21:21:02 2014
@@ -1,4 +1,6 @@
-#	$NetBSD: Makefile,v 1.1 2013/09/30 06:19:22 riastradh Exp $
+#	$NetBSD: Makefile,v 1.2 2014/04/29 01:21:02 christos Exp $
+
+.include 
 
 PROG=	getaddrinfo
 



CVS commit: src/sys/arch/mips/conf

2014-04-28 Thread Matt Thomas
Module Name:src
Committed By:   matt
Date:   Mon Apr 28 22:59:49 UTC 2014

Modified Files:
src/sys/arch/mips/conf: files.ralink

Log Message:
Add pci attachment


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/conf/files.ralink

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/conf/files.ralink
diff -u src/sys/arch/mips/conf/files.ralink:1.3 src/sys/arch/mips/conf/files.ralink:1.4
--- src/sys/arch/mips/conf/files.ralink:1.3	Tue Aug  2 03:40:00 2011
+++ src/sys/arch/mips/conf/files.ralink	Mon Apr 28 22:59:49 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: files.ralink,v 1.3 2011/08/02 03:40:00 cliff Exp $
+#	$NetBSD: files.ralink,v 1.4 2014/04/28 22:59:49 matt Exp $
 
 file	arch/mips/ralink/ralink_intr.c
 file	arch/mips/ralink/ralink_bus.c
@@ -43,3 +43,7 @@ device  cfi: norbus
 attach	cfi at mainbus with ralink_cfi
 file	arch/mips/ralink/ralink_cfi.c		ralink_cfi
 
+# Ralink PCIe
+device	rpci: pcibus
+attach	rpci at mainbus with ralink_pci
+file	arch/mips/ralink/ralink_pci.c		ralink_pci



CVS commit: src/external/cddl/osnet/usr.bin/ctfdump

2014-04-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 28 21:56:20 UTC 2014

Modified Files:
src/external/cddl/osnet/usr.bin/ctfdump: Makefile

Log Message:
need bsd.own.mk


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/usr.bin/ctfdump/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/cddl/osnet/usr.bin/ctfdump/Makefile
diff -u src/external/cddl/osnet/usr.bin/ctfdump/Makefile:1.6 src/external/cddl/osnet/usr.bin/ctfdump/Makefile:1.7
--- src/external/cddl/osnet/usr.bin/ctfdump/Makefile:1.6	Sun Mar  9 18:01:31 2014
+++ src/external/cddl/osnet/usr.bin/ctfdump/Makefile	Mon Apr 28 17:56:20 2014
@@ -1,7 +1,9 @@
-#	$NetBSD: Makefile,v 1.6 2014/03/09 22:01:31 christos Exp $
+#	$NetBSD: Makefile,v 1.7 2014/04/28 21:56:20 christos Exp $
 
 # $FreeBSD: src/cddl/usr.bin/ctfdump/Makefile,v 1.1.4.1 2009/08/03 08:13:06 kensmith Exp $
 
+.include 
+
 .include	"../../Makefile.inc"
 .include	"../../Makefile.ctf"
 



CVS commit: src/sys/lib/libgnuefi

2014-04-28 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Mon Apr 28 19:09:29 UTC 2014

Added Files:
src/sys/lib/libgnuefi: Makefile Makefile.inc

Log Message:
Makefile glue to build libgnuefi; similar to libsa or libkern.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/lib/libgnuefi/Makefile \
src/sys/lib/libgnuefi/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: src/sys/lib/libgnuefi/Makefile
diff -u /dev/null src/sys/lib/libgnuefi/Makefile:1.1
--- /dev/null	Mon Apr 28 19:09:29 2014
+++ src/sys/lib/libgnuefi/Makefile	Mon Apr 28 19:09:29 2014
@@ -0,0 +1,47 @@
+#	$NetBSD: Makefile,v 1.1 2014/04/28 19:09:29 jakllsch Exp $
+
+LIB=	gnuefi
+LIBISPRIVATE?= yes
+
+GNUEFI_USE_CREAD?= no		# Read compressed kernels
+GNUEFI_INCLUDE_NET?= yes		# Netboot via TFTP, NFS
+GNUEFI_USE_LOADFILE?= no		# Generic executable loading support
+GNUEFI_ENABLE_LS_OP?= no		# Filesystems ls operation
+
+CPPFLAGS=	-I${GNUEFIDIR} ${GNUEFICPPFLAGS} ${GNUEFIMISCCPPFLAGS}
+
+.if ${MACHINE_ARCH} == "i386"
+GNUEFIARCH=ia32
+.else
+GNUEFIARCH=${MACHINE_ARCH}
+.endif
+
+.if defined(GNUEFI_EXTRADIR)
+.-include "${GNUEFI_EXTRADIR}/Makefile.inc"
+.endif
+
+.include 
+
+.PATH.c: ${GNUEFIDIR} ${GNUEFIDIR}/../../external/bsd/gnu-efi/dist/lib/${GNUEFIARCH} ${GNUEFIDIR}/../../external/bsd/gnu-efi/dist/lib ${GNUEFIDIR}/../../external/bsd/gnu-efi/dist/lib/runtime
+
+SRCS+=	boxdraw.c smbios.c console.c crc.c data.c debug.c dpath.c \
+	error.c event.c guid.c hand.c hw.c init.c lock.c \
+	misc.c print.c sread.c str.c \
+	rtlock.c efirtlib.c rtstr.c vm.c rtdata.c \
+	initplat.c math.c
+
+COPTS.boxdraw.c= -Wno-missing-field-initializers
+COPTS.guid.c= -Wno-missing-field-initializers
+COPTS.smbios.c= -Wno-int-to-pointer-cast
+COPTS.dpath.c= -Wno-missing-prototypes
+COPTS.print.c= -Wno-missing-prototypes
+COPTS.hw.c= -Wno-shadow
+
+.include 
+
+lib${LIB}.o:: ${OBJS}
+	@echo building standard ${LIB} library
+	@rm -f lib${LIB}.o
+	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
+
+CPPFLAGS+=	-Wno-pointer-sign
Index: src/sys/lib/libgnuefi/Makefile.inc
diff -u /dev/null src/sys/lib/libgnuefi/Makefile.inc:1.1
--- /dev/null	Mon Apr 28 19:09:29 2014
+++ src/sys/lib/libgnuefi/Makefile.inc	Mon Apr 28 19:09:29 2014
@@ -0,0 +1,87 @@
+#	$NetBSD: Makefile.inc,v 1.1 2014/04/28 19:09:29 jakllsch Exp $
+#
+#	Configuration variables (default values are below):
+#
+#	S	must be set to the top of the 'sys' tree.
+#	GNUEFIDST	may be set to the location of the directory where library
+#		objects are to be built.  Defaults to ${.OBJDIR}/lib/gnuefi.
+#	GNUEFI_AS	may be set to 'obj' to build a object from the library's
+#		object files.  (Otherwise, a library will be built.)
+#		Defaults to 'library'.
+#	GNUEFIMISCCPPFLAGS
+#		Miscellaneous cpp flags to be passed to the library's Makefile
+#		when building.
+#	GNUEFIMISCMAKEFLAGS
+#		Miscellaneous flags to be passed to the library's Makefile when
+#		building.  See library's Makefile for more details about
+#		supported flags and their default values.
+
+# Default values:
+GNUEFIDST?=		${.OBJDIR}/lib/gnuefi
+GNUEFI_AS?=		library
+GNUEFIDOTDIR?= ../../.
+
+CWARNFLAGS.clang+=	-Wno-format-extra-args
+
+GNUEFIDIR=		${S:S@^.@${GNUEFIDOTDIR}@:Q}/lib/libgnuefi
+.if (${GNUEFI_AS} == "obj")
+GNUEFILIB=		${GNUEFIDST}/libgnuefi.o
+GNUEFILIB_PROF=	${GNUEFIDST}/libgnuefi.po
+.else
+GNUEFILIB=		${GNUEFIDST}/libgnuefi.a
+GNUEFILIB_PROF=	${GNUEFIDST}/libgnuefi_p.a
+.endif
+ZLIBSRCDIR:=	${.PARSEDIR}/../../../common/dist/zlib
+GNUEFIMISCCPPFLAGS+=-I${ZLIBSRCDIR}
+
+GNUEFIMAKE= \
+	cd ${GNUEFIDST} && ${MAKE} -f ${GNUEFIDIR:Q}/Makefile \
+	GNUEFIDIR=${GNUEFIDIR:Q} \
+	CC=${CC:Q} CFLAGS=${CFLAGS:Q} CPUFLAGS= \
+	AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
+	LORDER=${LORDER:Q} \
+	TSORT=${TSORT:Q} \
+	LD=${LD:Q} STRIP=${STRIP:Q} \
+	AR=${AR:Q} NM=${NM:Q} \
+	RANLIB=${RANLIB:Q} SIZE=${SIZE:Q} \
+	MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
+	GNUEFICPPFLAGS=${CPPFLAGS:S@^-I.@-I${GNUEFIDOTDIR}@g:Q} \
+	GNUEFIMISCCPPFLAGS=${GNUEFIMISCCPPFLAGS:Q} \
+	${GNUEFIMISCMAKEFLAGS}
+
+${GNUEFILIB}:		.NOTMAIN .MAKE __always_make_gnuefilib
+	@echo making sure the gnuefi library is up to date...
+.if (${GNUEFI_AS} == "library")
+	@${GNUEFIMAKE} libgnuefi.a
+.else
+	@${GNUEFIMAKE} libgnuefi.o
+.endif
+
+${GNUEFILIB_PROF}:		.NOTMAIN .MAKE __always_make_gnuefilib
+	@echo making sure the profiled gnuefi library is up to date...
+.if (${GNUEFI_AS} == "library")
+	@${GNUEFIMAKE} libgnuefi_p.a
+.else
+	@${GNUEFIMAKE} libgnuefi.po
+.endif
+
+clean:			.NOTMAIN cleangnuefilib
+cleangnuefilib:		.NOTMAIN
+	@echo cleaning the gnuefi library objects
+	@if [ -d "${GNUEFIDST}" ]; then ${GNUEFIMAKE} clean; fi
+
+cleandir distclean:	.NOTMAIN cleandirgnuefilib
+cleandirgnuefilib:		.NOTMAIN
+	@echo cleandiring the gnuefi library objects
+	@if [ -d "${GNUEFIDST}" ]; then ${GNUEFIMAKE} cleandir; fi
+
+dependall depend:

CVS commit: [netbsd-5-2] src/doc

2014-04-28 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Apr 28 16:06:47 UTC 2014

Modified Files:
src/doc [netbsd-5-2]: CHANGES-5.2.3

Log Message:
Ticket #1901


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/doc/CHANGES-5.2.3

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-5.2.3
diff -u src/doc/CHANGES-5.2.3:1.1.2.2 src/doc/CHANGES-5.2.3:1.1.2.3
--- src/doc/CHANGES-5.2.3:1.1.2.2	Wed Apr 16 06:57:19 2014
+++ src/doc/CHANGES-5.2.3	Mon Apr 28 16:06:47 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.2.3,v 1.1.2.2 2014/04/16 06:57:19 msaitoh Exp $
+# $NetBSD: CHANGES-5.2.3,v 1.1.2.3 2014/04/28 16:06:47 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2.2 release to the NetBSD 5.2.3
 release:
@@ -14,3 +14,38 @@ sys/kern/kern_verifiedexec.c			1.132
 
 	Reorder code to avoid use-after-free on error. From Maxime Villard.
 	[maxv, ticket #1899]
+
+sys/kern/vfs_syscalls.c1.478, 1.480 via patch
+sys/coda/coda_vfsops.c1.81
+sys/fs/adosfs/advfsops.c			1.70
+sys/fs/cd9660/cd9660_vfsops.c			1.84
+sys/fs/efs/efs_vfsops.c1.25
+sys/fs/filecorefs/filecore_vfsops.c		1.76
+sys/fs/hfs/hfs_vfsops.c1.31
+sys/fs/msdosfs/msdosfs_vfsops.c			1.107
+sys/fs/ntfs/ntfs_vfsops.c			1.94
+sys/fs/ptyfs/ptyfs_vfsops.c			1.50 via patch
+sys/fs/puffs/puffs_vfsops.c			1.110 via patch
+sys/fs/smbfs/smbfs_vfsops.c			1.100
+sys/fs/sysvbfs/sysvbfs_vfsops.c			1.43
+sys/fs/tmpfs/tmpfs_vfsops.c			1.59 via patch
+sys/fs/udf/udf_vfsops.c1.67
+sys/fs/union/union_vfsops.c			1.72
+sys/fs/unionfs/unionfs_vfsops.c			1.13
+sys/kern/vfs_syscalls.c1.479
+sys/miscfs/nullfs/null_vfsops.c			1.88 via patch
+sys/miscfs/overlay/overlay_vfsops.c		1.61
+sys/miscfs/procfs/procfs_vfsops.c		1.91
+sys/miscfs/umapfs/umap_vfsops.c			1.92
+sys/nfs/nfs_vfsops.c1.227
+sys/ufs/ext2fs/ext2fs_vfsops.c			1.180
+sys/ufs/ffs/ffs_vfsops.c			1.297
+sys/ufs/lfs/lfs_vfsops.c			1.321
+sys/ufs/mfs/mfs_vfsops.c			1.107
+
+	Due to missing checks in the mount syscall, and a wrong
+	assumption on the file systems side, the kernel could allocate
+	an unbounded or zero-sized memory buffer, and could dereference
+	a NULL pointer when particular arguments are given by a user.
+	[maxv, ticket #1901]
+



CVS commit: [netbsd-5-2] src/sys

2014-04-28 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Apr 28 16:05:37 UTC 2014

Modified Files:
src/sys/coda [netbsd-5-2]: coda_vfsops.c
src/sys/fs/adosfs [netbsd-5-2]: advfsops.c
src/sys/fs/cd9660 [netbsd-5-2]: cd9660_vfsops.c
src/sys/fs/efs [netbsd-5-2]: efs_vfsops.c
src/sys/fs/filecorefs [netbsd-5-2]: filecore_vfsops.c
src/sys/fs/hfs [netbsd-5-2]: hfs_vfsops.c
src/sys/fs/msdosfs [netbsd-5-2]: msdosfs_vfsops.c
src/sys/fs/ntfs [netbsd-5-2]: ntfs_vfsops.c
src/sys/fs/ptyfs [netbsd-5-2]: ptyfs_vfsops.c
src/sys/fs/puffs [netbsd-5-2]: puffs_vfsops.c
src/sys/fs/smbfs [netbsd-5-2]: smbfs_vfsops.c
src/sys/fs/sysvbfs [netbsd-5-2]: sysvbfs_vfsops.c
src/sys/fs/tmpfs [netbsd-5-2]: tmpfs_vfsops.c
src/sys/fs/udf [netbsd-5-2]: udf_vfsops.c
src/sys/fs/union [netbsd-5-2]: union_vfsops.c
src/sys/fs/unionfs [netbsd-5-2]: unionfs_vfsops.c
src/sys/kern [netbsd-5-2]: vfs_syscalls.c
src/sys/miscfs/nullfs [netbsd-5-2]: null_vfsops.c
src/sys/miscfs/overlay [netbsd-5-2]: overlay_vfsops.c
src/sys/miscfs/procfs [netbsd-5-2]: procfs_vfsops.c
src/sys/miscfs/umapfs [netbsd-5-2]: umap_vfsops.c
src/sys/nfs [netbsd-5-2]: nfs_vfsops.c
src/sys/ufs/ext2fs [netbsd-5-2]: ext2fs_vfsops.c
src/sys/ufs/ffs [netbsd-5-2]: ffs_vfsops.c
src/sys/ufs/lfs [netbsd-5-2]: lfs_vfsops.c
src/sys/ufs/mfs [netbsd-5-2]: mfs_vfsops.c

Log Message:
Pull up the following revisions(s) (requested by maxv in ticket #1901):
sys/kern/vfs_syscalls.c:revision 1.478, 1.480 via patch
sys/coda/coda_vfsops.c: revision 1.81
sys/fs/adosfs/advfsops.c:   revision 1.70
sys/fs/cd9660/cd9660_vfsops.c:  revision 1.84
sys/fs/efs/efs_vfsops.c:revision 1.25
sys/fs/filecorefs/filecore_vfsops.c:revision 1.76
sys/fs/hfs/hfs_vfsops.c:revision 1.31
sys/fs/msdosfs/msdosfs_vfsops.c:revision 1.107
sys/fs/ntfs/ntfs_vfsops.c:  revision 1.94
sys/fs/ptyfs/ptyfs_vfsops.c:revision 1.50 via patch
sys/fs/puffs/puffs_vfsops.c:revision 1.110 via patch
sys/fs/smbfs/smbfs_vfsops.c:revision 1.100
sys/fs/sysvbfs/sysvbfs_vfsops.c:revision 1.43
sys/fs/tmpfs/tmpfs_vfsops.c:revision 1.59 via patch
sys/fs/udf/udf_vfsops.c:revision 1.67
sys/fs/union/union_vfsops.c:revision 1.72
sys/fs/unionfs/unionfs_vfsops.c:revision 1.13
sys/kern/vfs_syscalls.c:revision 1.479
sys/miscfs/nullfs/null_vfsops.c:revision 1.88 via patch
sys/miscfs/overlay/overlay_vfsops.c:revision 1.61
sys/miscfs/procfs/procfs_vfsops.c:  revision 1.91
sys/miscfs/umapfs/umap_vfsops.c:revision 1.92
sys/nfs/nfs_vfsops.c:   revision 1.227
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/ufs/ffs/ffs_vfsops.c:   revision 1.297
sys/ufs/lfs/lfs_vfsops.c:   revision 1.321
sys/ufs/mfs/mfs_vfsops.c:   revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.66.22.1 src/sys/coda/coda_vfsops.c
cvs rdiff -u -r1.53 -r1.53.20.1 src/sys/fs/adosfs/advfsops.c
cvs rdiff -u -r1.63.6.1 -r1.63.6.1.6.1 src/sys/fs/cd9660/cd9660_vfsops.c
cvs rdiff -u -r1.16.4.1 -r1.16.4.1.10.1 src/sys/fs/efs/efs_vfsops.c
cvs rdiff -u -r1.55 -r1.55.20.1 src/sys/fs/filecorefs/filecore_vfsops.c
cvs rdiff -u -r1.19 -r1.19.16.1 src/sys/fs/hfs/hfs_vfsops.c
cvs rdiff -u -r1.68.6.2 -r1.68.6.2.10.1 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.72.6.1 -r1.72.6.1.6.1 src/sys/fs/ntfs/ntfs_vfsops.c
cvs rdiff -u -r1.37 -r1.37.18.1 src/sys/fs/ptyfs/ptyfs_vfsops.c
cvs rdiff -u -r1.81.8.3 -r1.81.8.3.2.1 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.85.4.1 -r1.85.4.1.6.1 src/sys/fs/smbfs/smbfs_vfsops.c
cvs rdiff -u -r1.26 -r1.26.18.1 src/sys/fs/sysvbfs/sysvbfs_vfsops.c
cvs rdiff -u -r1.44 -r1.44.22.1 src/sys/fs/tmpfs/tmpfs_vfsops.c
cvs rdiff -u -r1.52.2.3 -r1.52.2.3.6.1 src/sys/fs/udf/udf_vfsops.c
cvs rdiff -u -r1.57.6.2 -r1.57.6.2.2.1 src/sys/fs/union/union_vfsops.c
cvs rdiff -u -r1.5 -r1.5.16.1 src/sys/fs/unionfs/unionfs_vfsops.c
cvs rdiff -u -r1.376.4.7 -r1.376.4.7.2.1 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.77 -r1.77.16.1 src/sys/miscfs/nullfs/null_vfsops.c
cvs rdiff -u -r1.53 -r1.53.16.1 src/sys/miscfs/overlay/overlay_vfsops.c
cvs rdiff -u -r1.81 -r1.81.20.1 src/sys/miscfs/procfs/procfs_vfsops.c
cvs rdiff -u -r1.80 -r1.80.16.1 src/sys/miscfs/umapfs/umap_vfsops.c
cvs rdiff -u -r1.203 -r1.203.14.1 src/sys/nfs/nfs_vfsops.c
cvs rdiff -u -r1.137.6.6 -r1.137.6.6.2.

CVS commit: [netbsd-5-1] src/doc

2014-04-28 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Apr 28 16:04:09 UTC 2014

Modified Files:
src/doc [netbsd-5-1]: CHANGES-5.1.5

Log Message:
Ticket #1901


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/doc/CHANGES-5.1.5

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/doc/CHANGES-5.1.5
diff -u src/doc/CHANGES-5.1.5:1.1.2.2 src/doc/CHANGES-5.1.5:1.1.2.3
--- src/doc/CHANGES-5.1.5:1.1.2.2	Wed Apr 16 06:57:55 2014
+++ src/doc/CHANGES-5.1.5	Mon Apr 28 16:04:09 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.1.5,v 1.1.2.2 2014/04/16 06:57:55 msaitoh Exp $
+# $NetBSD: CHANGES-5.1.5,v 1.1.2.3 2014/04/28 16:04:09 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.1.4 release to the NetBSD 5.1.5
 release:
@@ -14,3 +14,38 @@ sys/kern/kern_verifiedexec.c			1.132
 
 	Reorder code to avoid use-after-free on error. From Maxime Villard.
 	[maxv, ticket #1899]
+
+sys/kern/vfs_syscalls.c1.478, 1.480 via patch
+sys/coda/coda_vfsops.c1.81
+sys/fs/adosfs/advfsops.c			1.70
+sys/fs/cd9660/cd9660_vfsops.c			1.84
+sys/fs/efs/efs_vfsops.c1.25
+sys/fs/filecorefs/filecore_vfsops.c		1.76
+sys/fs/hfs/hfs_vfsops.c1.31
+sys/fs/msdosfs/msdosfs_vfsops.c			1.107
+sys/fs/ntfs/ntfs_vfsops.c			1.94
+sys/fs/ptyfs/ptyfs_vfsops.c			1.50 via patch
+sys/fs/puffs/puffs_vfsops.c			1.110 via patch
+sys/fs/smbfs/smbfs_vfsops.c			1.100
+sys/fs/sysvbfs/sysvbfs_vfsops.c			1.43
+sys/fs/tmpfs/tmpfs_vfsops.c			1.59 via patch
+sys/fs/udf/udf_vfsops.c1.67
+sys/fs/union/union_vfsops.c			1.72
+sys/fs/unionfs/unionfs_vfsops.c			1.13
+sys/kern/vfs_syscalls.c1.479
+sys/miscfs/nullfs/null_vfsops.c			1.88 via patch
+sys/miscfs/overlay/overlay_vfsops.c		1.61
+sys/miscfs/procfs/procfs_vfsops.c		1.91
+sys/miscfs/umapfs/umap_vfsops.c			1.92
+sys/nfs/nfs_vfsops.c1.227
+sys/ufs/ext2fs/ext2fs_vfsops.c			1.180
+sys/ufs/ffs/ffs_vfsops.c			1.297
+sys/ufs/lfs/lfs_vfsops.c			1.321
+sys/ufs/mfs/mfs_vfsops.c			1.107
+
+	Due to missing checks in the mount syscall, and a wrong
+	assumption on the file systems side, the kernel could allocate
+	an unbounded or zero-sized memory buffer, and could dereference
+	a NULL pointer when particular arguments are given by a user.
+	[maxv, ticket #1901]
+



CVS commit: [netbsd-5-1] src/sys

2014-04-28 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Apr 28 16:03:16 UTC 2014

Modified Files:
src/sys/coda [netbsd-5-1]: coda_vfsops.c
src/sys/fs/adosfs [netbsd-5-1]: advfsops.c
src/sys/fs/cd9660 [netbsd-5-1]: cd9660_vfsops.c
src/sys/fs/efs [netbsd-5-1]: efs_vfsops.c
src/sys/fs/filecorefs [netbsd-5-1]: filecore_vfsops.c
src/sys/fs/hfs [netbsd-5-1]: hfs_vfsops.c
src/sys/fs/msdosfs [netbsd-5-1]: msdosfs_vfsops.c
src/sys/fs/ntfs [netbsd-5-1]: ntfs_vfsops.c
src/sys/fs/ptyfs [netbsd-5-1]: ptyfs_vfsops.c
src/sys/fs/puffs [netbsd-5-1]: puffs_vfsops.c
src/sys/fs/smbfs [netbsd-5-1]: smbfs_vfsops.c
src/sys/fs/sysvbfs [netbsd-5-1]: sysvbfs_vfsops.c
src/sys/fs/tmpfs [netbsd-5-1]: tmpfs_vfsops.c
src/sys/fs/udf [netbsd-5-1]: udf_vfsops.c
src/sys/fs/union [netbsd-5-1]: union_vfsops.c
src/sys/fs/unionfs [netbsd-5-1]: unionfs_vfsops.c
src/sys/kern [netbsd-5-1]: vfs_syscalls.c
src/sys/miscfs/nullfs [netbsd-5-1]: null_vfsops.c
src/sys/miscfs/overlay [netbsd-5-1]: overlay_vfsops.c
src/sys/miscfs/procfs [netbsd-5-1]: procfs_vfsops.c
src/sys/miscfs/umapfs [netbsd-5-1]: umap_vfsops.c
src/sys/nfs [netbsd-5-1]: nfs_vfsops.c
src/sys/ufs/ext2fs [netbsd-5-1]: ext2fs_vfsops.c
src/sys/ufs/ffs [netbsd-5-1]: ffs_vfsops.c
src/sys/ufs/lfs [netbsd-5-1]: lfs_vfsops.c
src/sys/ufs/mfs [netbsd-5-1]: mfs_vfsops.c

Log Message:
Pull up the following revisions(s) (requested by maxv in ticket #1901):
sys/kern/vfs_syscalls.c:revision 1.478, 1.480 via patch
sys/coda/coda_vfsops.c: revision 1.81
sys/fs/adosfs/advfsops.c:   revision 1.70
sys/fs/cd9660/cd9660_vfsops.c:  revision 1.84
sys/fs/efs/efs_vfsops.c:revision 1.25
sys/fs/filecorefs/filecore_vfsops.c:revision 1.76
sys/fs/hfs/hfs_vfsops.c:revision 1.31
sys/fs/msdosfs/msdosfs_vfsops.c:revision 1.107
sys/fs/ntfs/ntfs_vfsops.c:  revision 1.94
sys/fs/ptyfs/ptyfs_vfsops.c:revision 1.50 via patch
sys/fs/puffs/puffs_vfsops.c:revision 1.110 via patch
sys/fs/smbfs/smbfs_vfsops.c:revision 1.100
sys/fs/sysvbfs/sysvbfs_vfsops.c:revision 1.43
sys/fs/tmpfs/tmpfs_vfsops.c:revision 1.59 via patch
sys/fs/udf/udf_vfsops.c:revision 1.67
sys/fs/union/union_vfsops.c:revision 1.72
sys/fs/unionfs/unionfs_vfsops.c:revision 1.13
sys/kern/vfs_syscalls.c:revision 1.479
sys/miscfs/nullfs/null_vfsops.c:revision 1.88 via patch
sys/miscfs/overlay/overlay_vfsops.c:revision 1.61
sys/miscfs/procfs/procfs_vfsops.c:  revision 1.91
sys/miscfs/umapfs/umap_vfsops.c:revision 1.92
sys/nfs/nfs_vfsops.c:   revision 1.227
sys/ufs/ext2fs/ext2fs_vfsops.c: revision 1.180
sys/ufs/ffs/ffs_vfsops.c:   revision 1.297
sys/ufs/lfs/lfs_vfsops.c:   revision 1.321
sys/ufs/mfs/mfs_vfsops.c:   revision 1.107

Due to missing checks in the mount syscall, and a wrong assumption on the
file systems side, the kernel could allocate an unbounded or zero-sized
memory buffer, and could dereference a NULL pointer when particular
arguments are given by a user.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.66.18.1 src/sys/coda/coda_vfsops.c
cvs rdiff -u -r1.53 -r1.53.16.1 src/sys/fs/adosfs/advfsops.c
cvs rdiff -u -r1.63.6.1 -r1.63.6.1.2.1 src/sys/fs/cd9660/cd9660_vfsops.c
cvs rdiff -u -r1.16.4.1 -r1.16.4.1.6.1 src/sys/fs/efs/efs_vfsops.c
cvs rdiff -u -r1.55 -r1.55.16.1 src/sys/fs/filecorefs/filecore_vfsops.c
cvs rdiff -u -r1.19 -r1.19.12.1 src/sys/fs/hfs/hfs_vfsops.c
cvs rdiff -u -r1.68.6.2 -r1.68.6.2.6.1 src/sys/fs/msdosfs/msdosfs_vfsops.c
cvs rdiff -u -r1.72.6.1 -r1.72.6.1.2.1 src/sys/fs/ntfs/ntfs_vfsops.c
cvs rdiff -u -r1.37 -r1.37.14.1 src/sys/fs/ptyfs/ptyfs_vfsops.c
cvs rdiff -u -r1.81.8.1 -r1.81.8.1.2.1 src/sys/fs/puffs/puffs_vfsops.c
cvs rdiff -u -r1.85.4.1 -r1.85.4.1.2.1 src/sys/fs/smbfs/smbfs_vfsops.c
cvs rdiff -u -r1.26 -r1.26.14.1 src/sys/fs/sysvbfs/sysvbfs_vfsops.c
cvs rdiff -u -r1.44 -r1.44.18.1 src/sys/fs/tmpfs/tmpfs_vfsops.c
cvs rdiff -u -r1.52.2.3 -r1.52.2.3.2.1 src/sys/fs/udf/udf_vfsops.c
cvs rdiff -u -r1.57.6.1 -r1.57.6.1.6.1 src/sys/fs/union/union_vfsops.c
cvs rdiff -u -r1.5 -r1.5.12.1 src/sys/fs/unionfs/unionfs_vfsops.c
cvs rdiff -u -r1.376.4.5.2.1 -r1.376.4.5.2.2 src/sys/kern/vfs_syscalls.c
cvs rdiff -u -r1.77 -r1.77.12.1 src/sys/miscfs/nullfs/null_vfsops.c
cvs rdiff -u -r1.53 -r1.53.12.1 src/sys/miscfs/overlay/overlay_vfsops.c
cvs rdiff -u -r1.81 -r1.81.16.1 src/sys/miscfs/procfs/procfs_vfsops.c
cvs rdiff -u -r1.80 -r1.80.12.1 src/sys/miscfs/umapfs/umap_vfsops.c
cvs rdiff -u -r1.203 -r1.203.10.1 src/sys/nfs/nfs_vfsops.c
cvs rdiff -u -r1.137.6.5 -r1.137.6.5.

CVS commit: src/usr.bin/netstat

2014-04-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 28 15:41:15 UTC 2014

Modified Files:
src/usr.bin/netstat: main.c netstat.h route.c show.c

Log Message:
use the same for the route metrics part, both in the sysctl and kmem paths.
>From Takahiro HAYASHI


To generate a diff of this commit:
cvs rdiff -u -r1.89 -r1.90 src/usr.bin/netstat/main.c
cvs rdiff -u -r1.49 -r1.50 src/usr.bin/netstat/netstat.h
cvs rdiff -u -r1.81 -r1.82 src/usr.bin/netstat/route.c
cvs rdiff -u -r1.18 -r1.19 src/usr.bin/netstat/show.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/netstat/main.c
diff -u src/usr.bin/netstat/main.c:1.89 src/usr.bin/netstat/main.c:1.90
--- src/usr.bin/netstat/main.c:1.89	Thu Apr 24 10:56:29 2014
+++ src/usr.bin/netstat/main.c	Mon Apr 28 11:41:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.89 2014/04/24 14:56:29 christos Exp $	*/
+/*	$NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19
 #if 0
 static char sccsid[] = "from: @(#)main.c	8.4 (Berkeley) 3/1/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.89 2014/04/24 14:56:29 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.90 2014/04/28 15:41:15 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -356,7 +356,6 @@ prepare(const char *nf, const char *mf, 
 #ifndef SMALL
 		   gflag ||
 #endif
-		   (rflag && vflag) ||
 		   (pflag && tp->pr_sindex == N_PIMSTAT) ||
 		   Pflag) {
 		/* These flags are not yet supported via sysctl(3). */

Index: src/usr.bin/netstat/netstat.h
diff -u src/usr.bin/netstat/netstat.h:1.49 src/usr.bin/netstat/netstat.h:1.50
--- src/usr.bin/netstat/netstat.h:1.49	Thu Apr 24 10:54:51 2014
+++ src/usr.bin/netstat/netstat.h	Mon Apr 28 11:41:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: netstat.h,v 1.49 2014/04/24 14:54:51 christos Exp $	*/
+/*	$NetBSD: netstat.h,v 1.50 2014/04/28 15:41:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -116,6 +116,8 @@ void	impstats(u_long, u_long);
 
 void	pr_rthdr(int, int);
 void	pr_family(int);
+struct rt_metrics;
+void	pr_rtrmx(struct rt_metrics *);
 void	rt_stats(u_long);
 char	*ns_phost(struct sockaddr *);
 

Index: src/usr.bin/netstat/route.c
diff -u src/usr.bin/netstat/route.c:1.81 src/usr.bin/netstat/route.c:1.82
--- src/usr.bin/netstat/route.c:1.81	Thu Apr 24 10:56:29 2014
+++ src/usr.bin/netstat/route.c	Mon Apr 28 11:41:15 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: route.c,v 1.81 2014/04/24 14:56:29 christos Exp $	*/
+/*	$NetBSD: route.c,v 1.82 2014/04/28 15:41:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)route.c	8.3 (Berkeley) 3/9/94";
 #else
-__RCSID("$NetBSD: route.c,v 1.81 2014/04/24 14:56:29 christos Exp $");
+__RCSID("$NetBSD: route.c,v 1.82 2014/04/28 15:41:15 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -286,27 +286,26 @@ p_krtentry(struct rtentry *rt)
 			rt->rt_nodes[0].rn_dupedkey ? " =>" : "");
 	}
 	putchar('\n');
- 	if (vflag) {
- 		printf("\texpire   %10"PRId64"%c  recvpipe %10"PRIu64"%c  "
-		   "sendpipe %10"PRIu64"%c\n",
- 			(int64_t)rt->rt_rmx.rmx_expire, 
- 			(rt->rt_rmx.rmx_locks & RTV_EXPIRE) ? 'L' : ' ',
- 			rt->rt_rmx.rmx_recvpipe,
- 			(rt->rt_rmx.rmx_locks & RTV_RPIPE) ? 'L' : ' ',
- 			rt->rt_rmx.rmx_sendpipe,
- 			(rt->rt_rmx.rmx_locks & RTV_SPIPE) ? 'L' : ' ');
- 		printf("\tssthresh %10"PRIu64"%c  rtt  %10"PRIu64"%c  "
-		   "rttvar   %10"PRIu64"%c\n",
- 			rt->rt_rmx.rmx_ssthresh, 
- 			(rt->rt_rmx.rmx_locks & RTV_SSTHRESH) ? 'L' : ' ',
- 			rt->rt_rmx.rmx_rtt, 
- 			(rt->rt_rmx.rmx_locks & RTV_RTT) ? 'L' : ' ',
- 			rt->rt_rmx.rmx_rttvar, 
-			(rt->rt_rmx.rmx_locks & RTV_RTTVAR) ? 'L' : ' ');
- 		printf("\thopcount %10"PRIu64"%c\n",
- 			rt->rt_rmx.rmx_hopcount, 
-			(rt->rt_rmx.rmx_locks & RTV_HOPCOUNT) ? 'L' : ' ');
- 	}
+	if (vflag)
+		pr_rtrmx(&rt->rt_rmx);
+}
+
+void
+pr_rtrmx(struct rt_metrics *rmx)
+{
+	printf("\texpire   %10"PRId64"%c  recvpipe %10"PRIu64"%c  "
+	"sendpipe %10"PRIu64"%c\n",
+	(int64_t)rmx->rmx_expire, 
+	(rmx->rmx_locks & RTV_EXPIRE) ? 'L' : ' ', rmx->rmx_recvpipe,
+	(rmx->rmx_locks & RTV_RPIPE) ? 'L' : ' ', rmx->rmx_sendpipe,
+	(rmx->rmx_locks & RTV_SPIPE) ? 'L' : ' ');
+	printf("\tssthresh %10"PRIu64"%c  rtt  %10"PRIu64"%c  "
+	"rttvar   %10"PRIu64"%c\n", rmx->rmx_ssthresh, 
+	(rmx->rmx_locks & RTV_SSTHRESH) ? 'L' : ' ',
+	rmx->rmx_rtt, (rmx->rmx_locks & RTV_RTT) ? 'L' : ' ',
+	rmx->rmx_rttvar, (rmx->rmx_locks & RTV_RTTVAR) ? 'L' : ' ');
+	printf("\thopcount %10"PRIu64"%c\n",
+	rmx->rmx_hopcount, (rmx->rmx_locks & RTV_HOPCOUNT) ? 'L' : ' ');
 }
 
 /*

Index: src/usr.bin/netstat/show.c
diff -u src/usr.bin/netstat/show.c:1.18 src/usr.bin/netstat/show.c:1.19
--- src/usr.bin/netstat/show.c:1.18	Sat Oct 19 11:56:06 2013
+++ src/usr.bin/netstat/show.c	Mon Apr 28 11:41:15 2014
@@ -1

CVS commit: src/sys/lib/libunwind

2014-04-28 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Mon Apr 28 13:39:23 UTC 2014

Modified Files:
src/sys/lib/libunwind: AddressSpace.hpp UnwindCursor.hpp

Log Message:
GC unwind_info_size.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/lib/libunwind/AddressSpace.hpp
cvs rdiff -u -r1.2 -r1.3 src/sys/lib/libunwind/UnwindCursor.hpp

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/libunwind/AddressSpace.hpp
diff -u src/sys/lib/libunwind/AddressSpace.hpp:1.4 src/sys/lib/libunwind/AddressSpace.hpp:1.5
--- src/sys/lib/libunwind/AddressSpace.hpp:1.4	Wed Apr  2 22:22:37 2014
+++ src/sys/lib/libunwind/AddressSpace.hpp	Mon Apr 28 13:39:23 2014
@@ -41,7 +41,6 @@ struct unw_proc_info_t {
   uintptr_t lsda;// Address of Language Specific Data Area
   uintptr_t handler; // Personality routine
   uintptr_t extra_args;  // Extra stack space for frameless routines
-  uint32_t unwind_info_size; // Size of DWARF unwind info
   uintptr_t unwind_info; // Address of DWARF unwind info
 };
 

Index: src/sys/lib/libunwind/UnwindCursor.hpp
diff -u src/sys/lib/libunwind/UnwindCursor.hpp:1.2 src/sys/lib/libunwind/UnwindCursor.hpp:1.3
--- src/sys/lib/libunwind/UnwindCursor.hpp:1.2	Thu Mar 20 01:35:45 2014
+++ src/sys/lib/libunwind/UnwindCursor.hpp	Mon Apr 28 13:39:23 2014
@@ -135,7 +135,6 @@ void UnwindCursor::setInfoBasedOnI
   fInfo.handler = cieInfo.personality;
   fInfo.extra_args = prolog.spExtraArgSize;
   fInfo.unwind_info = fdeInfo.fdeStart;
-  fInfo.unwind_info_size = fdeInfo.fdeLength;
 }
 
 }; // namespace _Unwind



CVS commit: src/lib/libm

2014-04-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Apr 28 08:47:43 UTC 2014

Modified Files:
src/lib/libm: Makefile

Log Message:
Tune COPTS for alpha


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/lib/libm/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libm/Makefile
diff -u src/lib/libm/Makefile:1.156 src/lib/libm/Makefile:1.157
--- src/lib/libm/Makefile:1.156	Tue Apr  1 19:12:37 2014
+++ src/lib/libm/Makefile	Mon Apr 28 08:47:43 2014
@@ -1,4 +1,4 @@
-#  $NetBSD: Makefile,v 1.156 2014/04/01 19:12:37 christos Exp $
+#  $NetBSD: Makefile,v 1.157 2014/04/28 08:47:43 martin Exp $
 #
 #  @(#)Makefile 5.1beta 93/09/24
 #
@@ -53,6 +53,7 @@ LINTFLAGS += -g
 .if (${MACHINE_ARCH} == "alpha")
 .PATH: ${.CURDIR}/arch/alpha
 ARCH_SRCS = s_copysign.S s_copysignf.S lrint.S
+COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
 .elif (${MACHINE_CPU} == "arm")
 .PATH: ${.CURDIR}/arch/arm
 COMMON_SRCS+= fenv.c s_nexttowardf.c \



CVS commit: src/tests/lib/libm

2014-04-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Apr 28 08:46:35 UTC 2014

Modified Files:
src/tests/lib/libm: Makefile

Log Message:
Tune COPTS for alpha


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/tests/lib/libm/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/lib/libm/Makefile
diff -u src/tests/lib/libm/Makefile:1.21 src/tests/lib/libm/Makefile:1.22
--- src/tests/lib/libm/Makefile:1.21	Mon Mar  3 12:15:27 2014
+++ src/tests/lib/libm/Makefile	Mon Apr 28 08:46:35 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.21 2014/03/03 12:15:27 martin Exp $
+# $NetBSD: Makefile,v 1.22 2014/04/28 08:46:35 martin Exp $
 
 .include 
 
@@ -10,6 +10,10 @@ TESTSDIR=	${TESTSBASE}/lib/libm
 CPPFLAGS+=	-DHAVE_FENV_H
 .endif
 
+.if ${MACHINE} == "alpha"
+COPTS+=	-mfloat-ieee -mieee-with-inexact -mfp-trap-mode=sui -mtrap-precision=i
+.endif
+
 TESTS_C+=	t_acos
 TESTS_C+=	t_asin
 TESTS_C+=	t_atan



CVS commit: src/tests/kernel

2014-04-28 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Apr 28 08:34:16 UTC 2014

Modified Files:
src/tests/kernel: t_kauth_pr_47598.c

Log Message:
Skip the curtain test case if curtain is not enabled and we would not
be able to restore it to its old value later due to running at securelevel
above 0.
Previously this would fail and leave curtain enabled untill next reboot (but
causing further runs of the test to suceed, just to maximize confusion).
This went unnoticed initial since most modular test kernels run with options
INSECURE to allow exercising the kernel module loader.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/kernel/t_kauth_pr_47598.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/kernel/t_kauth_pr_47598.c
diff -u src/tests/kernel/t_kauth_pr_47598.c:1.2 src/tests/kernel/t_kauth_pr_47598.c:1.3
--- src/tests/kernel/t_kauth_pr_47598.c:1.2	Thu Feb 28 20:41:21 2013
+++ src/tests/kernel/t_kauth_pr_47598.c	Mon Apr 28 08:34:16 2014
@@ -27,7 +27,7 @@
 #include 
 __COPYRIGHT("@(#) Copyright (c) 2013\
  The NetBSD Foundation, inc. All rights reserved.");
-__RCSID("$NetBSD: t_kauth_pr_47598.c,v 1.2 2013/02/28 20:41:21 martin Exp $");
+__RCSID("$NetBSD: t_kauth_pr_47598.c,v 1.3 2014/04/28 08:34:16 martin Exp $");
 
 #include 
 #include 
@@ -40,6 +40,48 @@ __RCSID("$NetBSD: t_kauth_pr_47598.c,v 1
 #include 
 
 /*
+ * helper function
+ */
+static const char curtain_name[] = "security.models.bsd44.curtain";
+static const char securelevel_name[] = "security.models.bsd44.securelevel";
+
+static bool may_lower_curtain(void);
+static int get_curtain(void);
+static void set_curtain(int newval);
+
+static bool
+may_lower_curtain(void)
+{
+	int seclevel;
+	size_t len = sizeof(seclevel);
+
+	if (sysctlbyname(securelevel_name, &seclevel, &len, NULL, 0) != 0)
+		atf_tc_fail("failed to read %s", securelevel_name);
+
+	return seclevel <= 0;
+}
+
+static int
+get_curtain(void)
+{
+	int curtain;
+	size_t len = sizeof(curtain);
+
+	if (sysctlbyname(curtain_name, &curtain, &len, NULL, 0) != 0)
+		atf_tc_fail("failed to read %s", curtain_name);
+
+	return curtain;
+}
+
+static void
+set_curtain(int newval)
+{
+
+	if (sysctlbyname(curtain_name, NULL, 0, &newval, sizeof(newval)) != 0)
+		atf_tc_fail("failed to set %s to %d", curtain_name, newval);
+}
+
+/*
  * PR kern/47598: if security.models.extensions.curtain = 1 we crash when
  * doing a netstat while an embryonic (not yet fully accepted) connection
  * exists.
@@ -59,19 +101,20 @@ ATF_TC_HEAD(kauth_curtain, tc)
 
 ATF_TC_BODY(kauth_curtain, tc)
 {
-	static const char curtain_name[] = "security.models.bsd44.curtain";
 
-	int old_curtain, new_curtain = 1, s, s2, err;
-	size_t old_curtain_len = sizeof(old_curtain);
+	int old_curtain, s, s2, err;
 	socklen_t slen;
 	struct sockaddr_in sa;
 
 	/*
 	 * save old value of "curtain" and enable it
 	 */
-	if (sysctlbyname(curtain_name, &old_curtain, &old_curtain_len,
-	&new_curtain, sizeof(new_curtain)) != 0)
-		atf_tc_fail("failed to enable %s", curtain_name);
+	old_curtain = get_curtain();
+	if (old_curtain < 1 && !may_lower_curtain())
+		atf_tc_skip("curtain is not enabled and we would not be able"
+		" to drop it later due to securelevel settings");
+
+	set_curtain(1);
 
 	/*
 	 * create a socket and bind it to some arbitray free port
@@ -113,9 +156,7 @@ ATF_TC_BODY(kauth_curtain, tc)
 	/*
 	 * restore old value of curtain
 	 */
-	if (sysctlbyname(curtain_name, NULL, 0,
-	&old_curtain, sizeof(old_curtain)) != 0)
-		atf_tc_fail("failed to restore %s", curtain_name);
+	set_curtain(old_curtain);
 }
 
 ATF_TP_ADD_TCS(tp)