CVS commit: src/distrib/notes/hpcarm
Module Name:src Committed By: tsutsui Date: Sat May 21 07:09:09 UTC 2011 Added Files: src/distrib/notes/hpcarm: Makefile hardware install legal prep upgrade xfer Log Message: First cut at INSTALL notes for NetBSD/hpcarm. Mostly taken from hpcmips and hpcsh. Needs more improvements. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/distrib/notes/hpcarm/Makefile \ src/distrib/notes/hpcarm/hardware src/distrib/notes/hpcarm/install \ src/distrib/notes/hpcarm/legal src/distrib/notes/hpcarm/prep \ src/distrib/notes/hpcarm/upgrade src/distrib/notes/hpcarm/xfer Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/distrib/notes/hpcarm/Makefile diff -u /dev/null src/distrib/notes/hpcarm/Makefile:1.1 --- /dev/null Sat May 21 07:09:09 2011 +++ src/distrib/notes/hpcarm/Makefile Sat May 21 07:09:09 2011 @@ -0,0 +1,5 @@ +# $NetBSD: Makefile,v 1.1 2011/05/21 07:09:09 tsutsui Exp $ + +MERGED_SRCS+= ${COMMON}/upgrade ${COMMON}/xfer + +.include Index: src/distrib/notes/hpcarm/hardware diff -u /dev/null src/distrib/notes/hpcarm/hardware:1.1 --- /dev/null Sat May 21 07:09:09 2011 +++ src/distrib/notes/hpcarm/hardware Sat May 21 07:09:09 2011 @@ -0,0 +1,104 @@ +.\" $NetBSD: hardware,v 1.1 2011/05/21 07:09:09 tsutsui Exp $ +. +A H/PC machine contains a keyboard and a touch screen and +generally has 32 MB or more of RAM. +The port supports the HPC form factor, +as well as the H/PC Pro and PsPC (Palmsized PC) form factors. +More information can also be found at the +.Nx*M +homepage: +.Lk http://www.NetBSD.org/ports/\*M/ +.Pp +. +.Ss2 Supported WindowsCE / Windows Mobile machines +.(bullet -offset indent +Hewlett-Packard / Compaq +.(bullet -compact +Jornada 720 +.It +Jornada 728 +.It +Jornada 820 +.It +iPAQ H3600 +.bullet) +Sharp / Willcom +.(bullet -compact +W-ZERO3 WS003SH +.It +W-ZERO3 WS004SH +.It +W-ZERO3[es] WS007SH +.It +Advanced / W-ZERO3[es] WS011SH +.It +WILLCOM 03 WS020SH +.bullet) +.bullet) +. +.Ss2 Supported WindowsCE devices +.(bullet -offset indent +CPUs +.(bullet -compact +StrongARM SA-1100 +.It +StrongARM SA-1110 +.It +XScale PXA270S +.bullet) +.It +RAM requirements +.(bullet -compact +16 MB of RAM is required to run +.Nx*M . +32 MB is recommended for modern applications. +.bullet) +.It +Console devices +.(bullet -compact +built-in LCD screen +.It +built-in keyboard +.It +serial port on Jornada (with boot option +.Sq Li h ) +.bullet) +.It +Storage devices +.(bullet -compact +Flash ATA card, CF card (wd) +.It +Adaptec APA-1460[Slim SCSI](aic) +.It +Builtin SD card (including SDHC media) on W-ZERO3 machines (ld) +.It +USB mass storage devices on W-ZERO3 machines (umass) +.bullet) +.It +Network interfaces +.(bullet -compact +PCMCIA MB8696x based Ethernet (mbe) +.It +PCMCIA NE2000-compatible Ethernet (ne) +.It +Misc USB network devices on W-ZERO3 (auc, cue, axe, kue etc) +.It +Misc USB wireless LAN devices on W-ZERO3 (rum, zyd) +.It +Internal wireless LAN on WS003SH and WS004SH (upgt) +.bullet) +.It +Input devices +.(bullet -compact +Keyboard. +.It +USB keyboard on W-ZERO3 (ukbd) +.It +USB mice on W-ZERO3 (ums) +.bullet) +.It +Miscellaneous +.(bullet -compact +Battery-backed real-time clock. +.bullet) +.bullet) Index: src/distrib/notes/hpcarm/install diff -u /dev/null src/distrib/notes/hpcarm/install:1.1 --- /dev/null Sat May 21 07:09:09 2011 +++ src/distrib/notes/hpcarm/install Sat May 21 07:09:09 2011 @@ -0,0 +1,42 @@ +.\" $NetBSD: install,v 1.1 2011/05/21 07:09:09 tsutsui Exp $ +. +To start installation, you have to put +.Dq Pa netbsd +kernel prepared in +.Pa installation +directory into some folder on +.Tn Windows CE +or +.Tn Windows Mobile +and boot it using bootloader +.Pq Pa hpcboot.exe . +On +.Pa hpcboot +window, you have to specify a folder where name your kernel is stored, +your kernel name, and your machine type. +You can also specify some options for debug. +.Pp +Once the installation kernel is loaded by +.Pa hpcboot +properly, +.Ic sysinst +will automatically start. +.Pp +The +.Nx*M +kernel and system install consume about 7 MB of memory. +Please configure the +.Tn "Windows CE" +or +.Tn "Windows Mobile" +memory setting to allow this amount of memory to be used. +If bootloader failed with a +.Dq cannot allocate heap +error, configure more RAM for memory and less for disk with the dialog at +[Setting]-\*[Gt][ControlPanel]-\*[Gt][System]-\*[Gt][Memory] under +.Tn "Windows CE" +or +.Tn "Windows Mobile" . +.Pp +. +.so ../common/sysinst Index: src/distrib/notes/hpcarm/legal diff -u /dev/null src/distrib/notes/hpcarm/legal:1.1 --- /dev/null Sat May 21 07:09:09 2011 +++ src/distrib/notes/hpcarm/legal Sat May 21 07:09:09 2011 @@ -0,0 +1,2 @@ +.\" $NetBSD: legal,v 1.1 2011/05/21 07:09:09 tsutsui Exp $ +. Index: src/distrib/notes/hpcarm/prep diff -u /dev/null src/distrib/notes/hpcarm/prep:1.1 --- /dev/null Sat May 21 07:09:09 2011 +++ src/distrib/notes/hpcarm/prep Sat M
CVS commit: src/usr.bin/make
Module Name:src Committed By: tsutsui Date: Sat May 21 07:30:42 UTC 2011 Modified Files: src/usr.bin/make: var.c Log Message: Explicitly #include for time(3) and strftime(3). Fixes warnings on some non NetBSD hosts. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/usr.bin/make/var.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/make/var.c diff -u src/usr.bin/make/var.c:1.165 src/usr.bin/make/var.c:1.166 --- src/usr.bin/make/var.c:1.165 Mon Apr 11 14:49:09 2011 +++ src/usr.bin/make/var.c Sat May 21 07:30:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: var.c,v 1.165 2011/04/11 14:49:09 sjg Exp $ */ +/* $NetBSD: var.c,v 1.166 2011/05/21 07:30:42 tsutsui Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,14 +69,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: var.c,v 1.165 2011/04/11 14:49:09 sjg Exp $"; +static char rcsid[] = "$NetBSD: var.c,v 1.166 2011/05/21 07:30:42 tsutsui Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)var.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: var.c,v 1.165 2011/04/11 14:49:09 sjg Exp $"); +__RCSID("$NetBSD: var.c,v 1.166 2011/05/21 07:30:42 tsutsui Exp $"); #endif #endif /* not lint */ #endif @@ -132,6 +132,7 @@ #include #include #include +#include #include"make.h" #include"buf.h"
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Sat May 21 10:04:04 UTC 2011 Modified Files: src/sys/opencrypto: cryptosoft.c Log Message: fix a logics bug (which has been here from the beginning) which made that only 96 random bits were used for IV generation, this caused eg that the last 4 bytes of the IV in ESP/AES-CBC were constant, leaking kernel memory affects FAST_IPSEC only To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/opencrypto/cryptosoft.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/opencrypto/cryptosoft.c diff -u src/sys/opencrypto/cryptosoft.c:1.30 src/sys/opencrypto/cryptosoft.c:1.31 --- src/sys/opencrypto/cryptosoft.c:1.30 Thu May 5 17:44:39 2011 +++ src/sys/opencrypto/cryptosoft.c Sat May 21 10:04:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft.c,v 1.30 2011/05/05 17:44:39 drochner Exp $ */ +/* $NetBSD: cryptosoft.c,v 1.31 2011/05/21 10:04:03 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/cryptosoft.c,v 1.2.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: cryptosoft.c,v 1.35 2002/04/26 08:43:50 deraadt Exp $ */ @@ -24,7 +24,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.30 2011/05/05 17:44:39 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cryptosoft.c,v 1.31 2011/05/21 10:04:03 drochner Exp $"); #include #include @@ -95,7 +95,7 @@ else { /* Get random IV */ for (i = 0; - i + sizeof (u_int32_t) < EALG_MAX_BLOCK_LEN; + i + sizeof (u_int32_t) <= EALG_MAX_BLOCK_LEN; i += sizeof (u_int32_t)) { u_int32_t temp = arc4random();
CVS commit: src
Module Name:src Committed By: tsutsui Date: Sat May 21 11:38:53 UTC 2011 Modified Files: src/distrib/sets/lists/xserver: md.zaurus Added Files: src/external/mit/xorg/etc/etc.zaurus: xorg.conf.sample Removed Files: src/external/mit/xorg/etc/etc.zaurus: xorg.conf Log Message: Rename xorg.conf in the xserver set to xorg.conf.sample to avoid overwriting a possibly modified user config file. Suggested by jmmv@. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/distrib/sets/lists/xserver/md.zaurus cvs rdiff -u -r1.1 -r0 src/external/mit/xorg/etc/etc.zaurus/xorg.conf cvs rdiff -u -r0 -r1.1 src/external/mit/xorg/etc/etc.zaurus/xorg.conf.sample 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/xserver/md.zaurus diff -u src/distrib/sets/lists/xserver/md.zaurus:1.6 src/distrib/sets/lists/xserver/md.zaurus:1.7 --- src/distrib/sets/lists/xserver/md.zaurus:1.6 Fri May 20 09:29:08 2011 +++ src/distrib/sets/lists/xserver/md.zaurus Sat May 21 11:38:53 2011 @@ -1,5 +1,5 @@ -# $NetBSD: md.zaurus,v 1.6 2011/05/20 09:29:08 tsutsui Exp $ -./etc/X11/xorg.conf -unknown- xorg +# $NetBSD: md.zaurus,v 1.7 2011/05/21 11:38:53 tsutsui Exp $ +./etc/X11/xorg.conf.sample-unknown- xorg ./usr/X11R7/bin/X -unknown- xorg ./usr/X11R7/bin/Xorg -unknown- xorg ./usr/X11R7/bin/cvt -unknown- xorg Added files: Index: src/external/mit/xorg/etc/etc.zaurus/xorg.conf.sample diff -u /dev/null src/external/mit/xorg/etc/etc.zaurus/xorg.conf.sample:1.1 --- /dev/null Sat May 21 11:38:53 2011 +++ src/external/mit/xorg/etc/etc.zaurus/xorg.conf.sample Sat May 21 11:38:52 2011 @@ -0,0 +1,57 @@ +# $NetBSD: xorg.conf.sample,v 1.1 2011/05/21 11:38:52 tsutsui Exp $ + +Section "ServerLayout" + Identifier "wsfb" + Screen 0 "Screen0" 0 0 + InputDevice "TouchScreen0" "CorePointer" + InputDevice "Keyboard0" "CoreKeyboard" +EndSection + +Section "Files" +# FontPath "/usr/pkg/lib/X11/fonts/TTF/" +EndSection + +Section "InputDevice" + Identifier "Keyboard0" + Driver "kbd" + Option "XkbModel" "sl-c3x00" +EndSection + +Section "InputDevice" + Identifier "TouchScreen0" + Driver "ws" + + Option "device" "/dev/wsmouse" + Option "ZAxisMapping" "4 5" + + Option "MinX" "0" + Option "MaxX" "479" + Option "MinY" "0" + Option "MaxY" "639" + + Option "Rotate" "CW" +EndSection + +Section "Device" + Identifier "Wsdisplay0" + Driver "wsfb" + + Option "Rotate" "CW" +EndSection + +Section "Monitor" + Identifier "Monitor" + VendorName "Sharp" + ModelName "Zaurus" +EndSection + +Section "Screen" + Identifier "Screen0" + Device "Wsdisplay0" + Monitor "Monitor" + DefaultDepth 16 + + SubSection "Display" + Depth 16 + EndSubSection +EndSection
CVS commit: src/sys/uvm
Module Name:src Committed By: tsutsui Date: Sat May 21 11:49:34 UTC 2011 Modified Files: src/sys/uvm: uvm_fault.c Log Message: No need to pass UVM_FLAG_COLORMATCH to uvm_pagealloc() if no valid vaddr is specified. To generate a diff of this commit: cvs rdiff -u -r1.184 -r1.185 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.184 src/sys/uvm/uvm_fault.c:1.185 --- src/sys/uvm/uvm_fault.c:1.184 Sat Apr 23 18:14:12 2011 +++ src/sys/uvm/uvm_fault.c Sat May 21 11:49:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.184 2011/04/23 18:14:12 rmind Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.185 2011/05/21 11:49:34 tsutsui Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.184 2011/04/23 18:14:12 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.185 2011/05/21 11:49:34 tsutsui Exp $"); #include "opt_uvmhist.h" @@ -354,7 +354,7 @@ pg = uvm_pagealloc(NULL, ufi != NULL ? ufi->orig_rvaddr : 0, - anon, UVM_FLAG_COLORMATCH); + anon, ufi != NULL ? UVM_FLAG_COLORMATCH : 0); if (pg == NULL) { /* out of RAM. */ uvmfault_unlockall(ufi, amap, NULL, anon); uvmexp.fltnoram++;
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: tsutsui Date: Sat May 21 11:52:30 UTC 2011 Modified Files: src/distrib/sets/lists/xcomp: md.newsmips src/distrib/sets/lists/xserver: md.newsmips Log Message: Prepare xorg files for newsmips. It will work with standard wsfb driver. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/distrib/sets/lists/xcomp/md.newsmips cvs rdiff -u -r1.5 -r1.6 src/distrib/sets/lists/xserver/md.newsmips 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/xcomp/md.newsmips diff -u src/distrib/sets/lists/xcomp/md.newsmips:1.1 src/distrib/sets/lists/xcomp/md.newsmips:1.2 --- src/distrib/sets/lists/xcomp/md.newsmips:1.1 Mon Mar 15 07:27:05 2010 +++ src/distrib/sets/lists/xcomp/md.newsmips Sat May 21 11:52:29 2011 @@ -1,3 +1,6 @@ -# $NetBSD: md.newsmips,v 1.1 2010/03/15 07:27:05 mrg Exp $ -./usr/libdata/debug/usr/X11R6/bin/Xnewsmips.debug -unknown- debug -./usr/libdata/debug/usr/X11R6/bin/Xvfb.debug -unknown- debug +# $NetBSD: md.newsmips,v 1.2 2011/05/21 11:52:29 tsutsui Exp $ +./usr/libdata/debug/usr/X11R6/bin/Xnewsmips.debug -unknown- debug,x11 +./usr/libdata/debug/usr/X11R6/bin/Xvfb.debug -unknown- debug,x11 +./usr/libdata/debug/usr/X11R7/bin/Xorg.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/bin/cvt.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/bin/gtf.debug -unknown- debug,xorg Index: src/distrib/sets/lists/xserver/md.newsmips diff -u src/distrib/sets/lists/xserver/md.newsmips:1.5 src/distrib/sets/lists/xserver/md.newsmips:1.6 --- src/distrib/sets/lists/xserver/md.newsmips:1.5 Tue Sep 2 02:17:48 2008 +++ src/distrib/sets/lists/xserver/md.newsmips Sat May 21 11:52:30 2011 @@ -1,6 +1,120 @@ -# $NetBSD: md.newsmips,v 1.5 2008/09/02 02:17:48 lukem Exp $ +# $NetBSD: md.newsmips,v 1.6 2011/05/21 11:52:30 tsutsui Exp $ ./usr/X11R6/bin/X -unknown- x11 ./usr/X11R6/bin/Xnewsmips-unknown- x11 ./usr/X11R6/man/cat1/Xnewsmips.0 -unknown- .cat,x11 ./usr/X11R6/man/html1/Xnewsmips.html -unknown- html,x11 ./usr/X11R6/man/man1/Xnewsmips.1 -unknown- .man,x11 +./usr/X11R7/bin/X -unknown- xorg +./usr/X11R7/bin/Xorg -unknown- xorg +./usr/X11R7/bin/cvt -unknown- xorg +./usr/X11R7/bin/gtf -unknown- xorg +./usr/X11R7/lib/X11/doc/README.DRI -unknown- xorg +./usr/X11R7/lib/X11/doc/README.rapidaccess -unknown- xorg +./usr/X11R7/lib/modules/drivers/kbd_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/kbd_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/mouse_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/mouse_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/wsfb_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe_g.a -unknown- debuglib,xorg +./usr/X11R7/lib/modules/extensions/libdbe_pic.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri_g.a -unknown- debuglib,xorg +./usr/X11R7/lib/modules/extensions/libdri_pic.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdri2_g.a -unknown- debuglib,xorg +./usr/X11R7/lib/modules/extensions/libdri2_pic.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libextmod.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libextmod.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libextmod.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libextmod_g.a -unknown- debuglib,xorg +./usr/X11R7/lib/modules/extensions/libextmod_pic.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libglx.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libglx.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libglx.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libglx_pic.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/librecord.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/librecord.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/librecord.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/librecord_g.a -unknown- debuglib,xorg +./usr/X11R7/lib/modules/extensions/librecord_pic.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libshadow.a -unknown- xorg +./usr/X11R7/lib/modules/extensions/libshadow.so -unknown- xorg +./usr/X11R7/li
CVS commit: src/etc/etc.x68k
Module Name:src Committed By: tsutsui Date: Sat May 21 11:56:00 UTC 2011 Modified Files: src/etc/etc.x68k: ttys Log Message: Device nodes for zs serial have been renamed from tty0[0-3] to ttyZ[0-3]. There are still compat symlinks but it looks ttys(5) doesn't like it. XXX: no /dev/com[01] nodes for in MAKEDEV. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/etc/etc.x68k/ttys Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.x68k/ttys diff -u src/etc/etc.x68k/ttys:1.10 src/etc/etc.x68k/ttys:1.11 --- src/etc/etc.x68k/ttys:1.10 Tue Oct 7 10:00:03 2008 +++ src/etc/etc.x68k/ttys Sat May 21 11:56:00 2011 @@ -1,5 +1,5 @@ # -# $NetBSD: ttys,v 1.10 2008/10/07 10:00:03 abs Exp $ +# $NetBSD: ttys,v 1.11 2011/05/21 11:56:00 tsutsui Exp $ # # from: @(#)ttys 5.1 (Berkeley) 4/17/89 # @@ -10,9 +10,9 @@ console "/usr/libexec/getty Pc" x68k off secure constty "/usr/libexec/getty Pc" x68k off secure ttye0 "/usr/libexec/getty std.9600" x68k on secure # ITE -tty00 "/usr/libexec/getty std.9600" vt100 on secure # int. serial. -#tty00 noneunknown off rtcsts # dialup PPP. -tty02 "/usr/libexec/getty std.9600" unknown off secure # ext. serial. -tty03 "/usr/libexec/getty std.9600" unknown off secure # ext. serial. +ttyZ0 "/usr/libexec/getty std.9600" vt100 on secure # int. serial. +#ttyZ0 noneunknown off rtcsts # dialup PPP. +ttyZ2 "/usr/libexec/getty std.9600" unknown off secure # ext. serial. +ttyZ3 "/usr/libexec/getty std.9600" unknown off secure # ext. serial. com0 "/usr/libexec/getty std.9600" unknown off secure # ext. serial. com1 "/usr/libexec/getty std.9600" unknown off secure # ext. serial.
CVS commit: src/sys/arch/dreamcast/dev
Module Name:src Committed By: tsutsui Date: Sat May 21 12:00:18 UTC 2011 Modified Files: src/sys/arch/dreamcast/dev: pvr.c Log Message: Move several static wsdisplay variables into proper device specific structures to resolve XXX comments. Tested on GXemul. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/dreamcast/dev/pvr.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/dreamcast/dev/pvr.c diff -u src/sys/arch/dreamcast/dev/pvr.c:1.31 src/sys/arch/dreamcast/dev/pvr.c:1.32 --- src/sys/arch/dreamcast/dev/pvr.c:1.31 Wed Jan 26 13:14:07 2011 +++ src/sys/arch/dreamcast/dev/pvr.c Sat May 21 12:00:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pvr.c,v 1.31 2011/01/26 13:14:07 tsutsui Exp $ */ +/* $NetBSD: pvr.c,v 1.32 2011/05/21 12:00:18 tsutsui Exp $ */ /*- * Copyright (c) 2001 Marcus Comstedt. @@ -35,7 +35,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.31 2011/01/26 13:14:07 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pvr.c,v 1.32 2011/05/21 12:00:18 tsutsui Exp $"); #include #include @@ -144,6 +144,9 @@ int dc_tvsystem; /* TV broadcast system */ struct rasops_info dc_rinfo; + + char dc_wsscrname[32]; + struct wsscreen_descr dc_wsscrdescr; }; #define PVR_RGBMODE 0x01 /* RGB or composite */ @@ -153,6 +156,8 @@ device_t sc_dev; struct fb_devconfig *sc_dc; /* device configuration */ int sc_nscreens; + const struct wsscreen_descr *sc_scrdescs[1]; + struct wsscreen_list sc_scrlist; }; static int pvr_match(device_t, cfdata_t, void *); @@ -165,23 +170,6 @@ static struct fb_devconfig pvr_console_dc; -static char pvr_stdscreen_textgeom[32] = { "std" }; /* XXX yuck */ - -static struct wsscreen_descr pvr_stdscreen = { - pvr_stdscreen_textgeom, 0, 0, - 0, /* textops */ - 0, 0, - WSSCREEN_WSCOLORS, -}; - -static const struct wsscreen_descr *_pvr_scrlist[] = { - &pvr_stdscreen, -}; - -static const struct wsscreen_list pvr_screenlist = { - sizeof(_pvr_scrlist) / sizeof(struct wsscreen_descr *), _pvr_scrlist -}; - static int pvrioctl(void *, void *, u_long, void *, int, struct lwp *); static paddr_t pvrmmap(void *, void *, off_t, int); @@ -266,15 +254,14 @@ rasops_init(&dc->dc_rinfo, 500, 500); - /* XXX shouldn't be global */ - pvr_stdscreen.nrows = dc->dc_rinfo.ri_rows; - pvr_stdscreen.ncols = dc->dc_rinfo.ri_cols; - pvr_stdscreen.textops = &dc->dc_rinfo.ri_ops; - pvr_stdscreen.capabilities = dc->dc_rinfo.ri_caps; - - /* XXX yuck */ - sprintf(pvr_stdscreen_textgeom, "%dx%d", pvr_stdscreen.ncols, - pvr_stdscreen.nrows); + dc->dc_wsscrdescr.name = dc->dc_wsscrname; + dc->dc_wsscrdescr.ncols = dc->dc_rinfo.ri_cols; + dc->dc_wsscrdescr.nrows = dc->dc_rinfo.ri_rows; + dc->dc_wsscrdescr.textops = &dc->dc_rinfo.ri_ops; + dc->dc_wsscrdescr.capabilities = dc->dc_rinfo.ri_caps; + + sprintf(dc->dc_wsscrname, "%dx%d", + dc->dc_wsscrdescr.ncols, dc->dc_wsscrdescr.nrows); } void @@ -305,8 +292,12 @@ /* XXX Colormap initialization? */ + sc->sc_scrdescs[0] = &sc->sc_dc->dc_wsscrdescr; + sc->sc_scrlist.nscreens = 1; + sc->sc_scrlist.screens = sc->sc_scrdescs; + waa.console = console; - waa.scrdata = &pvr_screenlist; + waa.scrdata = &sc->sc_scrlist; waa.accessops = &pvr_accessops; waa.accesscookie = sc; @@ -588,7 +579,7 @@ pvr_getdevconfig(dcp); (*dcp->dc_rinfo.ri_ops.allocattr)(&dcp->dc_rinfo, 0, 0, 0, &defattr); - wsdisplay_cnattach(&pvr_stdscreen, &dcp->dc_rinfo, 0, 0, defattr); + wsdisplay_cnattach(&dcp->dc_wsscrdescr, &dcp->dc_rinfo, 0, 0, defattr); pvr_is_console = 1;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: tsutsui Date: Sat May 21 12:02:55 UTC 2011 Modified Files: src/sys/dev/ic: sti.c Log Message: Add a kludge to make this build on hp300. (anyway bus independent driver should not include bus dependent sti_pci.h) To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/sti.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/ic/sti.c diff -u src/sys/dev/ic/sti.c:1.14 src/sys/dev/ic/sti.c:1.15 --- src/sys/dev/ic/sti.c:1.14 Wed Nov 24 19:12:08 2010 +++ src/sys/dev/ic/sti.c Sat May 21 12:02:55 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sti.c,v 1.14 2010/11/24 19:12:08 skrll Exp $ */ +/* $NetBSD: sti.c,v 1.15 2011/05/21 12:02:55 tsutsui Exp $ */ /* $OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $ */ @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.14 2010/11/24 19:12:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.15 2011/05/21 12:02:55 tsutsui Exp $"); #include "wsdisplay.h" @@ -54,7 +54,9 @@ #include #include +#ifndef hp300 /* XXX */ #include "sti_pci.h" +#endif #ifdef STIDEBUG
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Sat May 21 12:06:14 UTC 2011 Modified Files: src/sys/arch/hp300/conf: GENERIC files.hp300 Log Message: Add sti at sgc configuration for SGC EVRX framebuffers found on some later HP4xx models. Untested, and disabled in GENERIC for now. To generate a diff of this commit: cvs rdiff -u -r1.165 -r1.166 src/sys/arch/hp300/conf/GENERIC cvs rdiff -u -r1.83 -r1.84 src/sys/arch/hp300/conf/files.hp300 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/hp300/conf/GENERIC diff -u src/sys/arch/hp300/conf/GENERIC:1.165 src/sys/arch/hp300/conf/GENERIC:1.166 --- src/sys/arch/hp300/conf/GENERIC:1.165 Sun Mar 6 17:08:24 2011 +++ src/sys/arch/hp300/conf/GENERIC Sat May 21 12:06:14 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.165 2011/03/06 17:08:24 bouyer Exp $ +# $NetBSD: GENERIC,v 1.166 2011/05/21 12:06:14 tsutsui Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.165 $" +#ident "GENERIC-$Revision: 1.166 $" maxusers 32 # estimated number of users @@ -241,6 +241,9 @@ gendiofb* at dio? scode ? # dumb framebuffer support for 362/382 wsdisplay* at gendiofb? +#sti* at sgc? slot ? # SGC EVRX framebuffers +#wsdisplay* at sti? + com0 at dio0 scode 9 # DCA serial interfaces com* at dio? scode ? Index: src/sys/arch/hp300/conf/files.hp300 diff -u src/sys/arch/hp300/conf/files.hp300:1.83 src/sys/arch/hp300/conf/files.hp300:1.84 --- src/sys/arch/hp300/conf/files.hp300:1.83 Fri Feb 18 16:06:20 2011 +++ src/sys/arch/hp300/conf/files.hp300 Sat May 21 12:06:14 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.hp300,v 1.83 2011/02/18 16:06:20 tsutsui Exp $ +# $NetBSD: files.hp300,v 1.84 2011/05/21 12:06:14 tsutsui Exp $ # # hp300-specific configuration info @@ -182,6 +182,13 @@ attach spc at dio file arch/hp300/dev/spc.c spc needs-flag +# +# Devices on the SGC bus +# + +attach sti at sgc with sti_sgc +file arch/hp300/dev/sti_sgc.c sti_sgc + # Memory Disk for ramdisk file dev/md_root.c memory_disk_hooks
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sat May 21 12:48:59 UTC 2011 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some iwn(4) devices. To generate a diff of this commit: cvs rdiff -u -r1.1077 -r1.1078 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1077 src/sys/dev/pci/pcidevs:1.1078 --- src/sys/dev/pci/pcidevs:1.1077 Fri May 20 00:50:19 2011 +++ src/sys/dev/pci/pcidevs Sat May 21 12:48:59 2011 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1077 2011/05/20 00:50:19 msaitoh Exp $ +$NetBSD: pcidevs,v 1.1078 2011/05/21 12:48:59 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -2335,6 +2335,10 @@ product INTEL WIFI_LINK_6005_2X2_2 0x0085 Centrino Advanced-N 6205 product INTEL WIFI_LINK_6050_2X2_1 0x0087 Centrino Advanced-N 6250 product INTEL WIFI_LINK_6050_2X2_2 0x0089 Centrino Advanced-N 6250 +product INTEL WIFI_LINK_1030_1 0x008a Centrino Wireless-N 1030 +product INTEL WIFI_LINK_1030_2 0x008b Centrino Wireless-N 1030 +product INTEL WIFI_LINK_6230_1 0x0090 Centrino Advanced-N 6230 +product INTEL WIFI_LINK_6230_2 0x0091 Centrino Advanced-N 6230 product INTEL 80960RM 0x0962 i960 RM PCI-PCI product INTEL 80960RN 0x0964 i960 RN PCI-PCI product INTEL 82542 0x1000 i82542 Gigabit Ethernet @@ -2988,8 +2992,10 @@ product INTEL WIFI_LINK_4965_1 0x4229 Wireless WiFi Link 4965 product INTEL WIFI_LINK_6000_3X3_1 0x422b Centrino Ultimate-N 6300 product INTEL WIFI_LINK_6000_IPA_1 0x422c Centrino Advanced-N 6200 +product INTEL WIFI_LINK_4965_3 0x422d Wireless WiFi Link 4965 product INTEL WIFI_LINK_4965_2 0x4230 Wireless WiFi Link 4965 product INTEL WIFI_LINK_5100_1 0x4232 WiFi Link 5100 +product INTEL WIFI_LINK_4965_4 0x4233 Wireless WiFi Link 4965 product INTEL WIFI_LINK_5300_1 0x4235 WiFi Link 5300 product INTEL WIFI_LINK_5300_2 0x4236 WiFi Link 5300 product INTEL WIFI_LINK_5100_2 0x4237 WiFi Link 5100
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sat May 21 12:51:47 UTC 2011 Modified Files: src/sys/dev/pci: if_iwn.c Log Message: Add newer Wireless WiFi Link 4965 devices, Centrino Wireless-N 1030 and Centrino Advanced-N 6230 To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/pci/if_iwn.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_iwn.c diff -u src/sys/dev/pci/if_iwn.c:1.55 src/sys/dev/pci/if_iwn.c:1.56 --- src/sys/dev/pci/if_iwn.c:1.55 Fri May 20 01:59:15 2011 +++ src/sys/dev/pci/if_iwn.c Sat May 21 12:51:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_iwn.c,v 1.55 2011/05/20 01:59:15 msaitoh Exp $ */ +/* $NetBSD: if_iwn.c,v 1.56 2011/05/21 12:51:47 msaitoh Exp $ */ /* $OpenBSD: if_iwn.c,v 1.96 2010/05/13 09:25:03 damien Exp $ */ /*- @@ -22,7 +22,7 @@ * adapters. */ #include -__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.55 2011/05/20 01:59:15 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_iwn.c,v 1.56 2011/05/21 12:51:47 msaitoh Exp $"); #define IWN_USE_RBUF /* Use local storage for RX */ #undef IWN_HWCRYPTO /* XXX does not even compile yet */ @@ -73,8 +73,12 @@ #include static const pci_product_id_t iwn_devices[] = { + PCI_PRODUCT_INTEL_WIFI_LINK_1030_1, + PCI_PRODUCT_INTEL_WIFI_LINK_1030_2, PCI_PRODUCT_INTEL_WIFI_LINK_4965_1, PCI_PRODUCT_INTEL_WIFI_LINK_4965_2, + PCI_PRODUCT_INTEL_WIFI_LINK_4965_3, + PCI_PRODUCT_INTEL_WIFI_LINK_4965_4, PCI_PRODUCT_INTEL_WIFI_LINK_5100_1, PCI_PRODUCT_INTEL_WIFI_LINK_5100_2, PCI_PRODUCT_INTEL_WIFI_LINK_5150_1, @@ -93,19 +97,8 @@ PCI_PRODUCT_INTEL_WIFI_LINK_6050_2X2_2, PCI_PRODUCT_INTEL_WIFI_LINK_6005_2X2_1, PCI_PRODUCT_INTEL_WIFI_LINK_6005_2X2_2, -#ifdef notyet - /* - * XXX NetBSD: the 6005A replaces the two 6005, above - * (see OpenBSD rev 1.96). - */ - PCI_PRODUCT_INTEL_WIFI_LINK_6005A_2X2_1, - PCI_PRODUCT_INTEL_WIFI_LINK_6005A_2X2_2, - PCI_PRODUCT_INTEL_WIFI_LINK_6005B_1X1_1, - PCI_PRODUCT_INTEL_WIFI_LINK_6005B_1X1_2, - PCI_PRODUCT_INTEL_WIFI_LINK_6005B_2X2_1, - PCI_PRODUCT_INTEL_WIFI_LINK_6005B_2X2_2, - PCI_PRODUCT_INTEL_WIFI_LINK_6005B_2X2_3 -#endif + PCI_PRODUCT_INTEL_WIFI_LINK_6230_1, + PCI_PRODUCT_INTEL_WIFI_LINK_6230_2, }; /*
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Sat May 21 13:22:45 UTC 2011 Modified Files: src/sys/opencrypto: cryptosoft_xform.c Log Message: check key size on initialization -- othwise the rijndael code can fail silently To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/opencrypto/cryptosoft_xform.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/opencrypto/cryptosoft_xform.c diff -u src/sys/opencrypto/cryptosoft_xform.c:1.15 src/sys/opencrypto/cryptosoft_xform.c:1.16 --- src/sys/opencrypto/cryptosoft_xform.c:1.15 Thu May 5 17:44:39 2011 +++ src/sys/opencrypto/cryptosoft_xform.c Sat May 21 13:22:45 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cryptosoft_xform.c,v 1.15 2011/05/05 17:44:39 drochner Exp $ */ +/* $NetBSD: cryptosoft_xform.c,v 1.16 2011/05/21 13:22:45 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $ */ @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.15 2011/05/05 17:44:39 drochner Exp $"); +__KERNEL_RCSID(1, "$NetBSD: cryptosoft_xform.c,v 1.16 2011/05/21 13:22:45 drochner Exp $"); #include #include @@ -66,7 +66,7 @@ const struct enc_xform *enc_xform; void (*encrypt)(void *, uint8_t *); void (*decrypt)(void *, uint8_t *); - int (*setkey)(uint8_t **, const uint8_t *, int len); + int (*setkey)(uint8_t **, const uint8_t *, int); void (*zerokey)(uint8_t **); }; @@ -555,6 +555,8 @@ { int err; + if (len != 16 && len != 24 && len != 32) + return EINVAL; *sched = malloc(sizeof(rijndael_ctx), M_CRYPTO_DATA, M_NOWAIT|M_ZERO); if (*sched != NULL) {
CVS commit: src/sys/opencrypto
Module Name:src Committed By: drochner Date: Sat May 21 13:23:37 UTC 2011 Modified Files: src/sys/opencrypto: xform.c Log Message: sync minimum key size for AES with reality To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/opencrypto/xform.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/opencrypto/xform.c diff -u src/sys/opencrypto/xform.c:1.22 src/sys/opencrypto/xform.c:1.23 --- src/sys/opencrypto/xform.c:1.22 Thu May 5 17:42:17 2011 +++ src/sys/opencrypto/xform.c Sat May 21 13:23:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xform.c,v 1.22 2011/05/05 17:42:17 drochner Exp $ */ +/* $NetBSD: xform.c,v 1.23 2011/05/21 13:23:36 drochner Exp $ */ /* $FreeBSD: src/sys/opencrypto/xform.c,v 1.1.2.1 2002/11/21 23:34:23 sam Exp $ */ /* $OpenBSD: xform.c,v 1.19 2002/08/16 22:47:25 dhartmei Exp $ */ @@ -40,7 +40,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xform.c,v 1.22 2011/05/05 17:42:17 drochner Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xform.c,v 1.23 2011/05/21 13:23:36 drochner Exp $"); #include #include @@ -122,7 +122,7 @@ const struct enc_xform enc_xform_rijndael128 = { CRYPTO_RIJNDAEL128_CBC, "Rijndael-128/AES", - 16, 8, 32 + 16, 16, 32 }; const struct enc_xform enc_xform_arc4 = {
CVS commit: [netbsd-5-0] src/external/bsd/dhcpcd/dist
Module Name:src Committed By: bouyer Date: Sat May 21 13:31:00 UTC 2011 Modified Files: src/external/bsd/dhcpcd/dist [netbsd-5-0]: dhcp.c dhcpcd-run-hooks.8.in dhcpcd-run-hooks.in src/external/bsd/dhcpcd/dist/dhcpcd-hooks [netbsd-5-0]: 20-resolv.conf 30-hostname Log Message: Apply patch, requested by spz in ticket 1603: external/bsd/dhcpcd/dist/dhcp.c patch external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in patch external/bsd/dhcpcd/dist/dhcpcd-run-hooks.inpatch external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.confpatch external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname patch Escape | and & characters before passing the value to the shell Ensure we set a valid hostname, DNS domain and NIS domain. Document the need for input validation in dhcpcd-run-hooks(8). Fixes CVE-2011-996 To generate a diff of this commit: cvs rdiff -u -r1.1.1.2.6.2.2.1 -r1.1.1.2.6.2.2.2 \ src/external/bsd/dhcpcd/dist/dhcp.c cvs rdiff -u -r1.1.1.2.6.1.2.1 -r1.1.1.2.6.1.2.2 \ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in cvs rdiff -u -r1.1.1.2.6.1 -r1.1.1.2.6.1.2.1 \ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in cvs rdiff -u -r1.1.1.2 -r1.1.1.2.10.1 \ src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf \ src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname 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/dhcpcd/dist/dhcp.c diff -u src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.2.2.1 src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.2.2.2 --- src/external/bsd/dhcpcd/dist/dhcp.c:1.1.1.2.6.2.2.1 Tue Aug 4 20:23:37 2009 +++ src/external/bsd/dhcpcd/dist/dhcp.c Sat May 21 13:31:00 2011 @@ -1056,6 +1056,8 @@ case '$': /* FALLTHROUGH */ case '`': /* FALLTHROUGH */ case '\\': /* FALLTHROUGH */ + case '|': /* FALLTHROUGH */ + case '&': if (s) { if (len < 3) { errno = ENOBUFS; Index: src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in diff -u src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.1.2.1 src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.1.2.2 --- src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in:1.1.1.2.6.1.2.1 Tue Aug 4 20:23:37 2009 +++ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in Sat May 21 13:31:00 2011 @@ -1,4 +1,4 @@ -.\" Copyright 2006-2008 Roy Marples +.\" Copyright (c) 2006-2011 Roy Marples .\" All rights reserved .\" .\" Redistribution and use in source and binary forms, with or without @@ -112,3 +112,11 @@ .An Roy Marples .Sh BUGS Please report them to http://roy.marples.name/projects/dhcpcd +.Sh SECURITY CONSIDERATIONS +Little validation of DHCP options is done in dhcpcd itself. +Instead, it is up to the hooks to handle any validation needed. +To this end, some helper functions are provided, such as valid_domainname as +used by the +.Pa 20-resolv.conf +hook to ensure that the hostname is not set to an invalid value. +valid_path is also provided, but is currently unused by a stock hook script. Index: src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in diff -u src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.1 src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.1.2.1 --- src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in:1.1.1.2.6.1 Fri Feb 6 02:25:38 2009 +++ src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in Sat May 21 13:31:00 2011 @@ -115,6 +115,46 @@ mv -f "$1"-pre."${interface}" "$1" } +# Check for a valid domain name as per RFC1123 with the exception of +# allowing - and _ as they seem to be widely used. +valid_domainname() +{ +local name="$1" label + +[ -z "$name" -o ${#name} -gt 255 ] && return 1 + +while [ -n "$name" ]; do +label="${name%%.*}" +[ -z "$label" -o ${#label} -gt 63 ] && return 1 +case "$label" in +-*|_*|*-|*_)return 1;; +*[![:alnum:]-_]*) return 1;; +esac +[ "$name" = "${name#*.}" ] && break +name="${name#*.}" +done +return 0 +} + +valid_domainname_list() +{ +local name + +for name in $@; do +valid_domainname "$name" || return $? +done +return 0 +} + +# Check for a valid path +valid_path() +{ +case "$@" in +*[![:alnum:]#%+-_:\.,@~\\/\[\]=\ ]*) return 1;; +esac +return 0 +} + # We source each script into this one so that scripts run earlier can # remove variables from the environment so later scripts don't see them. Index: src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf diff -u src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf:1.1.1.2 src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf:1.1
CVS commit: [netbsd-5-0] src/doc
Module Name:src Committed By: bouyer Date: Sat May 21 13:32:28 UTC 2011 Modified Files: src/doc [netbsd-5-0]: CHANGES-5.0.3 Log Message: ticket 1603 To generate a diff of this commit: cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-5.0.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.0.3 diff -u src/doc/CHANGES-5.0.3:1.1.2.40 src/doc/CHANGES-5.0.3:1.1.2.41 --- src/doc/CHANGES-5.0.3:1.1.2.40 Thu May 19 19:52:44 2011 +++ src/doc/CHANGES-5.0.3 Sat May 21 13:32:27 2011 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.0.3,v 1.1.2.40 2011/05/19 19:52:44 bouyer Exp $ +# $NetBSD: CHANGES-5.0.3,v 1.1.2.41 2011/05/21 13:32:27 bouyer Exp $ A complete list of changes from the NetBSD 5.0.2 release to the NetBSD 5.0.3 release: @@ -2736,3 +2736,15 @@ (the bt one was ok, but set errno and make it the same for consistency). [christos, ticket #1602] +external/bsd/dhcpcd/dist/dhcp.cpatch +external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in patch +external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in patch +external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf patch +external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname patch + +Escape | and & characters before passing the value to the shell + Ensure we set a valid hostname, DNS domain and NIS domain. + Document the need for input validation in dhcpcd-run-hooks(8). + Fixes CVE-2011-996 + [spz, ticket #1603] +
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc
Module Name:xsrc Committed By: christos Date: Sat May 21 14:30:33 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc: vidc.c Log Message: find cfb.h in the correct place. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c:1.7 xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c:1.8 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c:1.7 Thu May 19 21:22:37 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/arm32vidc/vidc.c Sat May 21 10:30:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vidc.c,v 1.7 2011/05/20 01:22:37 christos Exp $ */ +/* $NetBSD: vidc.c,v 1.8 2011/05/21 14:30:33 christos Exp $ */ /* * Copyright (c) 1999 Neil A. Carson & Mark Brinicombe @@ -67,7 +67,7 @@ #include "resource.h" #include "wscons.h" #include "mi.h" -#include "cfb/cfb.h" +#include "cfb.h" /* #define DEBUG */
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga
Module Name:xsrc Committed By: christos Date: Sat May 21 14:34:56 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga: tgamap.h Log Message: include file for tga_map_t To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h:1.2 Thu May 19 21:28:02 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/alpha/tga/tgamap.h Sat May 21 10:34:56 2011 @@ -18,6 +18,8 @@ #define alphaTgaTEOps alphaTga32TEOps #define alphaTgaNonTEOps alphaTga32NonTEOps +#include + void alphaTgaDoBitbltSimple(unsigned int *, unsigned int *, unsigned int, unsigned int, tga_reg_t **, int, int, int, int, int, int, int, int, int);
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: christos Date: Sat May 21 14:49:35 UTC 2011 Modified Files: src/sys/arch/amiga/dev: grf_cvreg.h Log Message: ifdef _KERNEL the inlines To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/amiga/dev/grf_cvreg.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/amiga/dev/grf_cvreg.h diff -u src/sys/arch/amiga/dev/grf_cvreg.h:1.16 src/sys/arch/amiga/dev/grf_cvreg.h:1.17 --- src/sys/arch/amiga/dev/grf_cvreg.h:1.16 Tue Feb 9 13:13:10 2010 +++ src/sys/arch/amiga/dev/grf_cvreg.h Sat May 21 10:49:35 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cvreg.h,v 1.16 2010/02/09 18:13:10 phx Exp $ */ +/* $NetBSD: grf_cvreg.h,v 1.17 2011/05/21 14:49:35 christos Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -371,7 +371,7 @@ /* Gfx engine busy wait */ - +#ifdef _KERNEL static inline void GfxBusyWait (ba) volatile void *ba; @@ -441,5 +441,6 @@ vgaw(ba, GCT_ADDRESS, idx); return vgar(ba, GCT_ADDRESS_R); } +#endif #endif /* _GRF_RHREG_H */
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k
Module Name:xsrc Committed By: christos Date: Sat May 21 14:52:52 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k: mac68k.h mac68kInit.c Log Message: add prototypes and missing return types. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h cvs rdiff -u -r1.4 -r1.5 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68kInit.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h:1.3 xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h:1.4 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h:1.3 Thu May 19 21:39:25 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68k.h Sat May 21 10:52:52 2011 @@ -95,3 +95,5 @@ void mac68k_processkbd(DeviceIntPtr, adb_event_t *); void mac68k_processmouse(DeviceIntPtr, adb_event_t *); +void mac68k_getmouse(void); +void mac68k_getkbd(void); Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68kInit.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68kInit.c:1.4 xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68kInit.c:1.5 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68kInit.c:1.4 Wed Mar 30 14:12:12 2005 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/mac68k/mac68kInit.c Sat May 21 10:52:52 2011 @@ -127,7 +127,8 @@ signal(SIGIO, handle_sigio); } -choose_best_depths() +void +choose_best_depths(void) { #if 0 int scr, mode, best; @@ -175,6 +176,7 @@ +void parse_args( int argc, char **argv) @@ -185,6 +187,7 @@ } +void setup_screens( ScreenInfo *xsi, int argc,
CVS commit: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb
Module Name:xsrc Committed By: christos Date: Sat May 21 14:59:35 UTC 2011 Modified Files: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb: decCfb.c Log Message: add prototype and include To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c diff -u xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c:1.2 xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c:1.3 --- xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c:1.2 Thu May 19 21:48:17 2011 +++ xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/cfb/decCfb.c Sat May 21 10:59:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: decCfb.c,v 1.2 2011/05/20 01:48:17 christos Exp $ */ +/* $NetBSD: decCfb.c,v 1.3 2011/05/21 14:59:34 christos Exp $ */ /* XConsortium: sunCfb.c,v 1.15.1.2 95/01/12 18:54:42 kaleb Exp */ /* XFree86: xc/programs/Xserver/hw/sun/sunCfb.c,v 3.2 1995/02/12 02:36:22 dawes Exp */ @@ -88,6 +88,9 @@ #include "dec.h" #include "cfb.h" +#include "cfb32.h" + +static Bool decCfbScreenInit(ScreenPtr, pointer, int, int, int, int, int, int); Bool decCFBInit ( int screen, /* what screen am I going to be */ @@ -208,7 +211,7 @@ return retval; } -Bool +static Bool decCfbScreenInit( ScreenPtr pScreen, pointer pbits, /* pointer to screen bitmap */
CVS commit: xsrc/external/mit/xf86-input-mouse/dist/src
Module Name:xsrc Committed By: christos Date: Sat May 21 15:00:59 UTC 2011 Modified Files: xsrc/external/mit/xf86-input-mouse/dist/src: mouse.c Log Message: prototype for ioctl To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 \ xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c diff -u xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.11 xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.12 --- xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c:1.11 Mon Nov 22 02:29:23 2010 +++ xsrc/external/mit/xf86-input-mouse/dist/src/mouse.c Sat May 21 11:00:58 2011 @@ -73,6 +73,7 @@ #ifdef __NetBSD__ #include #include +#include #endif #include "compiler.h"
CVS commit: xsrc/external/mit/xf86-video-crime/dist/src
Module Name:xsrc Committed By: christos Date: Sat May 21 15:03:24 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-crime/dist/src: crime_accel.c Log Message: add missing includes To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 \ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c diff -u xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.13 xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.14 --- xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c:1.13 Tue Oct 20 23:28:40 2009 +++ xsrc/external/mit/xf86-video-crime/dist/src/crime_accel.c Sat May 21 11:03:24 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: crime_accel.c,v 1.13 2009/10/21 03:28:40 macallan Exp $ */ +/* $NetBSD: crime_accel.c,v 1.14 2011/05/21 15:03:24 christos Exp $ */ /* * Copyright (c) 2008 Michael Lorenz * All rights reserved. @@ -35,6 +35,8 @@ #include "picturestr.h" #include "xaalocal.h" #include "xaa.h" +#include "fb.h" +#include "mi.h" #include "mipict.h" uint32_t regcache[0x1000];
CVS commit: xsrc/external/mit/xf86-video-chips/dist/src
Module Name:xsrc Committed By: christos Date: Sat May 21 15:08:37 UTC 2011 Modified Files: xsrc/external/mit/xf86-video-chips/dist/src: ct_driver.c Log Message: Don't return random values from a function that supposed to return something. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c diff -u xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.7 xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.8 --- xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c:1.7 Sun May 15 18:54:29 2011 +++ xsrc/external/mit/xf86-video-chips/dist/src/ct_driver.c Sat May 21 11:08:36 2011 @@ -902,7 +902,7 @@ pScrn->FreeScreen= CHIPSFreeScreen; pScrn->ValidMode = CHIPSValidMode; if (!CHIPSGetRec(pScrn)) { - return; + return FALSE; } cPtr = CHIPSPTR(pScrn); cPtr->Chipset = chipset;
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: christos Date: Sat May 21 15:10:34 UTC 2011 Modified Files: src/sys/arch/sparc/stand/ofwboot: net.c Log Message: more missing includes To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sparc/stand/ofwboot/net.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/stand/ofwboot/net.c diff -u src/sys/arch/sparc/stand/ofwboot/net.c:1.5 src/sys/arch/sparc/stand/ofwboot/net.c:1.6 --- src/sys/arch/sparc/stand/ofwboot/net.c:1.5 Wed May 6 20:01:31 2009 +++ src/sys/arch/sparc/stand/ofwboot/net.c Sat May 21 11:10:34 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: net.c,v 1.5 2009/05/07 00:01:31 roy Exp $ */ +/* $NetBSD: net.c,v 1.6 2011/05/21 15:10:34 christos Exp $ */ /* * Copyright (C) 1995 Wolfgang Solfrank. @@ -60,6 +60,8 @@ #include #include #include +#include +#include #include
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: jym Date: Sat May 21 15:22:49 UTC 2011 Modified Files: src/sys/arch/xen/xen: xbdback_xenbus.c Log Message: In xbdback(4), move the code that copies segments after the bound checks of the ``nr_segments'' variable. In cases where we are running domUs with an architecture different from the dom0 one (for example: 32 bits domUs on 64 bits dom0), copying segments with an invalid nr_segments value will lead to the corruption of the xbdback instance structure and quickly crash the dom0 backend. Tested under 64 bits dom0 with 32 bits domUs. No regression observed. ok bouyer@. Will be pulled up to -4 and -5. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/xen/xen/xbdback_xenbus.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/xen/xen/xbdback_xenbus.c diff -u src/sys/arch/xen/xen/xbdback_xenbus.c:1.36 src/sys/arch/xen/xen/xbdback_xenbus.c:1.37 --- src/sys/arch/xen/xen/xbdback_xenbus.c:1.36 Sun May 15 20:58:54 2011 +++ src/sys/arch/xen/xen/xbdback_xenbus.c Sat May 21 15:22:49 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdback_xenbus.c,v 1.36 2011/05/15 20:58:54 jym Exp $ */ +/* $NetBSD: xbdback_xenbus.c,v 1.37 2011/05/21 15:22:49 jym Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.36 2011/05/15 20:58:54 jym Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbdback_xenbus.c,v 1.37 2011/05/21 15:22:49 jym Exp $"); #include #include @@ -873,7 +873,6 @@ blkif_request_t *req = &xbdi->xbdi_xen_req; blkif_x86_32_request_t *req32; blkif_x86_64_request_t *req64; - int i; (void)obj; if (xbdi->xbdi_ring.ring_n.req_cons != xbdi->xbdi_req_prod) { @@ -891,8 +890,6 @@ req->handle = req32->handle; req->id = req32->id; req->sector_number = req32->sector_number; - for (i = 0; i < req->nr_segments; i++) -req->seg[i] = req32->seg[i]; break; case XBDIP_64: @@ -903,8 +900,6 @@ req->handle = req64->handle; req->id = req64->id; req->sector_number = req64->sector_number; - for (i = 0; i < req->nr_segments; i++) -req->seg[i] = req64->seg[i]; break; } XENPRINTF(("xbdback op %d req_cons 0x%x req_prod 0x%x " @@ -1019,16 +1014,23 @@ static void * xbdback_co_io(struct xbdback_instance *xbdi, void *obj) { - int error; + int i, error; + blkif_request_t *req; + blkif_x86_32_request_t *req32; + blkif_x86_64_request_t *req64; (void)obj; - if (xbdi->xbdi_xen_req.nr_segments < 1 || - xbdi->xbdi_xen_req.nr_segments > BLKIF_MAX_SEGMENTS_PER_REQUEST ) { + + /* some sanity checks */ + req = &xbdi->xbdi_xen_req; + if (req->nr_segments < 1 || + req->nr_segments > BLKIF_MAX_SEGMENTS_PER_REQUEST) { printf("xbdback_io domain %d: %d segments\n", xbdi->xbdi_domid, xbdi->xbdi_xen_req.nr_segments); error = EINVAL; goto end; } + if (xbdi->xbdi_xen_req.operation == BLKIF_OP_WRITE) { if (xbdi->xbdi_ro) { error = EROFS; @@ -1038,6 +1040,25 @@ xbdi->xbdi_segno = 0; + /* copy request segments */ + switch(xbdi->xbdi_proto) { + case XBDIP_NATIVE: + /* already copied in xbdback_co_main_loop */ + break; + case XBDIP_32: + req32 = RING_GET_REQUEST(&xbdi->xbdi_ring.ring_32, + xbdi->xbdi_ring.ring_n.req_cons); + for (i = 0; i < req->nr_segments; i++) + req->seg[i] = req32->seg[i]; + break; + case XBDIP_64: + req64 = RING_GET_REQUEST(&xbdi->xbdi_ring.ring_64, + xbdi->xbdi_ring.ring_n.req_cons); + for (i = 0; i < req->nr_segments; i++) + req->seg[i] = req64->seg[i]; + break; + } + xbdi->xbdi_cont = xbdback_co_io_gotreq; return xbdback_pool_get(&xbdback_request_pool, xbdi); end:
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: tsutsui Date: Sat May 21 15:50:42 UTC 2011 Modified Files: src/sys/arch/sparc/stand/ofwboot: Locore.c Makefile boot.c loadfile_machdep.c net.c net.h netif_of.c ofdev.c openfirm.h promlib.c Log Message: WARNSfy and fix dumb bugs noticed by warnings. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/sparc/stand/ofwboot/Locore.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/sparc/stand/ofwboot/Makefile cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sparc/stand/ofwboot/boot.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sparc/stand/ofwboot/net.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc/stand/ofwboot/net.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sparc/stand/ofwboot/netif_of.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sparc/stand/ofwboot/ofdev.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sparc/stand/ofwboot/openfirm.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/sparc/stand/ofwboot/promlib.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/stand/ofwboot/Locore.c diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.11 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.12 --- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.11 Mon May 18 11:39:30 2009 +++ src/sys/arch/sparc/stand/ofwboot/Locore.c Sat May 21 15:50:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.11 2009/05/18 11:39:30 nakayama Exp $ */ +/* $NetBSD: Locore.c,v 1.12 2011/05/21 15:50:42 tsutsui Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -764,12 +764,12 @@ if (virt == NULL) { if ((virt = (void*)OF_alloc_virt(size, align)) == (void*)-1) { - printf("OF_alloc_virt(%d,%d) failed w/%x\n", size, align, virt); + printf("OF_alloc_virt(%d,%d) failed w/%p\n", size, align, virt); return (void *)-1; } } else { if ((newvirt = (void*)OF_claim_virt((vaddr_t)virt, size)) == (void*)-1) { - printf("OF_claim_virt(%x,%d) failed w/%x\n", virt, size, newvirt); + printf("OF_claim_virt(%p,%d) failed w/%p\n", virt, size, newvirt); return (void *)-1; } } @@ -779,7 +779,8 @@ return (void *)-1; } if (OF_map_phys(paddr, size, (vaddr_t)virt, -1) == -1) { - printf("OF_map_phys(%x,%d,%x,%d) failed\n", paddr, size, virt, -1); + printf("OF_map_phys(0x%lx,%d,%p,%d) failed\n", + (u_long)paddr, size, virt, -1); OF_free_phys((paddr_t)paddr, size); OF_free_virt((vaddr_t)virt, size); return (void *)-1; Index: src/sys/arch/sparc/stand/ofwboot/Makefile diff -u src/sys/arch/sparc/stand/ofwboot/Makefile:1.28 src/sys/arch/sparc/stand/ofwboot/Makefile:1.29 --- src/sys/arch/sparc/stand/ofwboot/Makefile:1.28 Sun Jan 23 11:29:46 2011 +++ src/sys/arch/sparc/stand/ofwboot/Makefile Sat May 21 15:50:42 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.28 2011/01/23 11:29:46 nakayama Exp $ +# $NetBSD: Makefile,v 1.29 2011/05/21 15:50:42 tsutsui Exp $ CURDIR= ${.CURDIR} S= ${CURDIR}/../../../.. @@ -7,7 +7,7 @@ # Override normal settings # -WARNS= 0 +WARNS?= 2 PROG?= ofwboot SRCS= srt0.s Locore.c boot.c ofdev.c alloc.c net.c netif_of.c vers.c Index: src/sys/arch/sparc/stand/ofwboot/boot.c diff -u src/sys/arch/sparc/stand/ofwboot/boot.c:1.27 src/sys/arch/sparc/stand/ofwboot/boot.c:1.28 --- src/sys/arch/sparc/stand/ofwboot/boot.c:1.27 Sat Jan 22 19:19:24 2011 +++ src/sys/arch/sparc/stand/ofwboot/boot.c Sat May 21 15:50:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.27 2011/01/22 19:19:24 joerg Exp $ */ +/* $NetBSD: boot.c,v 1.28 2011/05/21 15:50:42 tsutsui Exp $ */ /* * Copyright (c) 1997, 1999 Eduardo E. Horvath. All rights reserved. @@ -230,8 +230,8 @@ static void ksyms_copyout(void **ssym, void **esym) { - void *addr; - int kssize = (int)(long)(*esym - *ssym + 1); + uint8_t *addr; + int kssize = (int)(long)((char *)*esym - (char *)*ssym + 1); DPRINTF(("ksyms_copyout(): ssym = %p, esym = %p, kssize = %d\n", *ssym, *esym, kssize)); @@ -253,7 +253,6 @@ static void jump_to_kernel(u_long *marks, char *kernel, char *args, void *ofw) { - extern char end[]; int l, machine_tag; long newargs[4]; void *ssym, *esym; @@ -467,7 +466,7 @@ static void check_boot_config(void) { - int fd, err, off, len; + int fd, off, len; struct stat st; char *bc; @@ -515,7 +514,7 @@ for (;; *kernel = '\0') { if (boothowto & RB_ASKNAME) { - char *cp, cmdline[PROM_MAX_PATH]; + char cmdline[PROM_MAX_PATH]; printf("Boot: "); gets(cmdline); Index: src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c diff -u src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.8 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.9 --- src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.8 Fri May 20 14:49:54 2011 +++ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c Sat May 21 15:50:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_machdep.c,v 1.8 2011/05/20 14:49:5
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: nakayama Date: Sat May 21 16:32:01 UTC 2011 Modified Files: src/sys/arch/sparc/stand/ofwboot: loadfile_machdep.c ofdev.c Log Message: Fix debug build. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sparc/stand/ofwboot/ofdev.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c diff -u src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.9 src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.10 --- src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c:1.9 Sat May 21 15:50:42 2011 +++ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c Sat May 21 16:32:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_machdep.c,v 1.9 2011/05/21 15:50:42 tsutsui Exp $ */ +/* $NetBSD: loadfile_machdep.c,v 1.10 2011/05/21 16:32:00 nakayama Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -251,7 +251,8 @@ if (itlb_slot >= itlb_slot_max) panic("mmu_mapin: out of itlb_slots"); - DPRINTF(("mmu_mapin: %p:%p.%p\n", va, hi(pa), lo(pa))); + DPRINTF(("mmu_mapin: 0x%lx:0x%x.0x%x\n", va, + hi(pa), lo(pa))); data = TSB_DATA(0, /* global */ PGSZ_4M, /* 4mb page */ Index: src/sys/arch/sparc/stand/ofwboot/ofdev.c diff -u src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.30 src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.31 --- src/sys/arch/sparc/stand/ofwboot/ofdev.c:1.30 Sat May 21 15:50:42 2011 +++ src/sys/arch/sparc/stand/ofwboot/ofdev.c Sat May 21 16:32:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ofdev.c,v 1.30 2011/05/21 15:50:42 tsutsui Exp $ */ +/* $NetBSD: ofdev.c,v 1.31 2011/05/21 16:32:00 nakayama Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -126,7 +126,7 @@ sizeof devtype) < 0) devtype[0] = 0; } - DPRINTF(("filename: not found\n",lp)); + DPRINTF(("filename: not found\n")); return 0; } @@ -501,12 +501,12 @@ } else { part = partition ? partition - 'a' : 0; ofdev.partoff = label.d_partitions[part].p_offset; - DPRINTF(("devopen: setting partition %d offset %x\n", + DPRINTF(("devopen: setting partition %d offset %lx\n", part, ofdev.partoff)); if (label.d_partitions[part].p_fstype == FS_RAID) { ofdev.partoff += RF_PROTECTED_SECTORS; DPRINTF(("devopen: found RAID partition, " -"adjusting offset to %x\n", ofdev.partoff)); +"adjusting offset to %lx\n", ofdev.partoff)); } }
CVS commit: src/gnu/usr.bin/groff/tmac
Module Name:src Committed By: wiz Date: Sat May 21 17:15:46 UTC 2011 Modified Files: src/gnu/usr.bin/groff/tmac: mdoc.local Log Message: Do not use TAB to line up library arguments, use spaces. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/gnu/usr.bin/groff/tmac/mdoc.local Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/gnu/usr.bin/groff/tmac/mdoc.local diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.63 src/gnu/usr.bin/groff/tmac/mdoc.local:1.64 --- src/gnu/usr.bin/groff/tmac/mdoc.local:1.63 Mon Feb 28 23:23:08 2011 +++ src/gnu/usr.bin/groff/tmac/mdoc.local Sat May 21 17:15:46 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: mdoc.local,v 1.63 2011/02/28 23:23:08 haad Exp $ +.\" $NetBSD: mdoc.local,v 1.64 2011/05/21 17:15:46 wiz Exp $ .\" .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -82,17 +82,17 @@ .ds doc-volume-as-xen xen . .\" Local libraries not in groff -.ds doc-str-Lb-libarchive Reading and Writing Streaming Archives Library (libarchive, \-larchive) -.ds doc-str-Lb-libbluetooth Bluetooth Library (libbluetooth, \-lbluetooth) -.ds doc-str-Lb-libdm Device-mapper Library (libdm, \-ldm) -.ds doc-str-Lb-libfetch File Transfer Library for URLs (libfetch, \-lfetch) -.ds doc-str-Lb-libiscsi iSCSI protocol library (libiscsi, \-liscsi) -.ds doc-str-Lb-libisns Internet Storage Name Service Library (libisns, \-lisns) -.ds doc-str-Lb-libnetpgp Netpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp) -.ds doc-str-Lb-libperfuse PUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse) -.ds doc-str-Lb-libprop Property Container Object Library (libprop, \-lprop) -.ds doc-str-Lb-libpuffs puffs Convenience Library (libpuffs, \-lpuffs) -.ds doc-str-Lb-librefuse File System in Userspace Convenience Library (librefuse, \-lrefuse) -.ds doc-str-Lb-libsaslc Simple Authentication and Security Layer client library (libsaslc, \-lsaslc) -.ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp) -.ds doc-str-Lb-libterminfo Terminal Information Library (libterminfo, \-lterminfo) +.ds doc-str-Lb-libarchive Reading and Writing Streaming Archives Library (libarchive, \-larchive) +.ds doc-str-Lb-libbluetooth Bluetooth Library (libbluetooth, \-lbluetooth) +.ds doc-str-Lb-libdmDevice-mapper Library (libdm, \-ldm) +.ds doc-str-Lb-libfetch File Transfer Library for URLs (libfetch, \-lfetch) +.ds doc-str-Lb-libiscsi iSCSI protocol library (libiscsi, \-liscsi) +.ds doc-str-Lb-libisns Internet Storage Name Service Library (libisns, \-lisns) +.ds doc-str-Lb-libnetpgpNetpgp signing, verification, encryption and decryption (libnetpgp, \-lnetpgp) +.ds doc-str-Lb-libperfuse PUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse) +.ds doc-str-Lb-libprop Property Container Object Library (libprop, \-lprop) +.ds doc-str-Lb-libpuffs puffs Convenience Library (libpuffs, \-lpuffs) +.ds doc-str-Lb-librefuseFile System in Userspace Convenience Library (librefuse, \-lrefuse) +.ds doc-str-Lb-libsaslc Simple Authentication and Security Layer client library (libsaslc, \-lsaslc) +.ds doc-str-Lb-libssp Buffer Overflow Protection Library (libssp, \-lssp) +.ds doc-str-Lb-libterminfo Terminal Information Library (libterminfo, \-lterminfo)
CVS commit: src/lib/libc/gen
Module Name:src Committed By: dholland Date: Sat May 21 19:06:44 UTC 2011 Modified Files: src/lib/libc/gen: getprogname.3 Log Message: Clarify paragraph about calling setprogname, requested by Tobias Ulmer on freenode. Bump date. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/lib/libc/gen/getprogname.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/getprogname.3 diff -u src/lib/libc/gen/getprogname.3:1.7 src/lib/libc/gen/getprogname.3:1.8 --- src/lib/libc/gen/getprogname.3:1.7 Sat Mar 29 16:51:40 2008 +++ src/lib/libc/gen/getprogname.3 Sat May 21 19:06:44 2011 @@ -1,4 +1,4 @@ -.\" $NetBSD: getprogname.3,v 1.7 2008/03/29 16:51:40 dholland Exp $ +.\" $NetBSD: getprogname.3,v 1.8 2011/05/21 19:06:44 dholland Exp $ .\" .\" Copyright (c) 2001 Christopher G. Demetriou .\" All rights reserved. @@ -32,7 +32,7 @@ .\" .\" <> .\" -.Dd March 29, 2008 +.Dd May 21, 2011 .Dt GETPROGNAME 3 .Os .Sh NAME @@ -87,18 +87,19 @@ .Nx , calling .Fn setprogname +explicitly has no effect. +However, portable programs that wish to use +.Fn getprogname +should call +.Fn setprogname from -.Fn main -has no effect. -However, it does serve to increase the portability of the program: -on other operating systems, +.Fn main . +On operating systems where .Fn getprogname and .Fn setprogname -may be implemented by a portability library, and a call to -.Fn setprogname -allows that library to know the program name without -modifications to that system's program start-up code. +are implemented via a portability library, this call is needed to +make the name available. .Sh SEE ALSO .Xr err 3 , .Xr setproctitle 3
CVS commit: src/sbin/mount_ptyfs
Module Name:src Committed By: riastradh Date: Sat May 21 20:05:02 UTC 2011 Modified Files: src/sbin/mount_ptyfs: mount_ptyfs.c Log Message: Make `mount_ptyfs -c' actually work. The ALTF_* are bit masks, not indices, so use 4, not 3, for the one after 2. Use 0x on all the values to emphasize this. ok rmind To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sbin/mount_ptyfs/mount_ptyfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/mount_ptyfs/mount_ptyfs.c diff -u src/sbin/mount_ptyfs/mount_ptyfs.c:1.10 src/sbin/mount_ptyfs/mount_ptyfs.c:1.11 --- src/sbin/mount_ptyfs/mount_ptyfs.c:1.10 Sun Mar 15 16:47:45 2009 +++ src/sbin/mount_ptyfs/mount_ptyfs.c Sat May 21 20:05:02 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mount_ptyfs.c,v 1.10 2009/03/15 16:47:45 christos Exp $ */ +/* $NetBSD: mount_ptyfs.c,v 1.11 2011/05/21 20:05:02 riastradh Exp $ */ /* * Copyright (c) 1992, 1993, 1994 @@ -77,7 +77,7 @@ #if 0 static char sccsid[] = "@(#)mount_ptyfs.c 8.3 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: mount_ptyfs.c,v 1.10 2009/03/15 16:47:45 christos Exp $"); +__RCSID("$NetBSD: mount_ptyfs.c,v 1.11 2011/05/21 20:05:02 riastradh Exp $"); #endif #endif /* not lint */ @@ -98,9 +98,9 @@ #include -#define ALTF_GROUP 1 -#define ALTF_MODE 2 -#define ALTF_CHROOT 3 +#define ALTF_GROUP 0x1 +#define ALTF_MODE 0x2 +#define ALTF_CHROOT 0x4 static const struct mntopt mopts[] = { MOPT_STDOPTS,
CVS commit: [rmind-uvmplock] src/sys/uvm
Module Name:src Committed By: rmind Date: Sat May 21 21:26:48 UTC 2011 Modified Files: src/sys/uvm [rmind-uvmplock]: uvm_fault.c Log Message: uvm_fault_lower_promote: fix assert (move a bit up, where logic applies). To generate a diff of this commit: cvs rdiff -u -r1.173.2.7 -r1.173.2.8 src/sys/uvm/uvm_fault.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/uvm/uvm_fault.c diff -u src/sys/uvm/uvm_fault.c:1.173.2.7 src/sys/uvm/uvm_fault.c:1.173.2.8 --- src/sys/uvm/uvm_fault.c:1.173.2.7 Thu May 19 03:43:05 2011 +++ src/sys/uvm/uvm_fault.c Sat May 21 21:26:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: uvm_fault.c,v 1.173.2.7 2011/05/19 03:43:05 rmind Exp $ */ +/* $NetBSD: uvm_fault.c,v 1.173.2.8 2011/05/21 21:26:48 rmind Exp $ */ /* * Copyright (c) 1997 Charles D. Cranor and Washington University. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.173.2.7 2011/05/19 03:43:05 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uvm_fault.c,v 1.173.2.8 2011/05/21 21:26:48 rmind Exp $"); #include "opt_uvmhist.h" @@ -2039,14 +2039,12 @@ int error; UVMHIST_FUNC("uvm_fault_lower_promote"); UVMHIST_CALLED(maphist); + KASSERT(amap != NULL); + /* - * if we are going to promote the data to an anon we + * If we are going to promote the data to an anon we * allocate a blank anon here and plug it into our amap. */ -#if DIAGNOSTIC - if (amap == NULL) - panic("uvm_fault: want to promote data, but no anon"); -#endif error = uvmfault_promote(ufi, NULL, uobjpage, &anon, &flt->anon_spare); switch (error) { @@ -2061,8 +2059,9 @@ pg = anon->an_page; /* - * fill in the data + * Fill in the data. */ + KASSERT(uobj == NULL || (uobjpage->flags & PG_BUSY) != 0); if (uobjpage != PGO_DONTCARE) { uvmexp.flt_prcopy++; @@ -2107,7 +2106,6 @@ anon, pg, 0, 0); } - KASSERT(uobj == NULL || (uobjpage->flags & PG_BUSY) != 0); return uvm_fault_lower_enter(ufi, flt, uobj, anon, pg); }
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: rmind Date: Sun May 22 04:20:51 UTC 2011 Modified Files: src/sys/fs/tmpfs: tmpfs_subr.c Log Message: tmpfs_alloc_vp: - Do not check for vn_lock(9) error, if LK_RETRY. - Fix/improve comments. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/sys/fs/tmpfs/tmpfs_subr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.63 src/sys/fs/tmpfs/tmpfs_subr.c:1.64 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.63 Fri Apr 1 17:40:54 2011 +++ src/sys/fs/tmpfs/tmpfs_subr.c Sun May 22 04:20:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.63 2011/04/01 17:40:54 hannken Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.64 2011/05/22 04:20:50 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.63 2011/04/01 17:40:54 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.64 2011/05/22 04:20:50 rmind Exp $"); #include #include @@ -332,36 +332,28 @@ tmpfs_dirent_put(tmp, de); } -/* - */ - /* - * Allocates a new vnode for the node node or returns a new reference to - * an existing one if the node had already a vnode referencing it. The - * resulting locked vnode is returned in *vpp. + * tmpfs_alloc_vp: allocate or reclaim a vnode for a specified inode. * - * Returns zero on success or an appropriate error code on failure. + * => Returns vnode (*vpp) locked. */ int tmpfs_alloc_vp(struct mount *mp, struct tmpfs_node *node, struct vnode **vpp) { + vnode_t *vp; int error; - struct vnode *vp; - - /* If there is already a vnode, then lock it. */ - for (;;) { - mutex_enter(&node->tn_vlock); - if ((vp = node->tn_vnode) != NULL) { - mutex_enter(&vp->v_interlock); - mutex_exit(&node->tn_vlock); - error = vget(vp, LK_EXCLUSIVE); - if (error == ENOENT) { -/* vnode was reclaimed. */ -continue; - } - *vpp = vp; - return error; +again: + /* If there is already a vnode, try to reclaim it. */ + mutex_enter(&node->tn_vlock); + if ((vp = node->tn_vnode) != NULL) { + mutex_enter(&vp->v_interlock); + mutex_exit(&node->tn_vlock); + error = vget(vp, LK_EXCLUSIVE); + if (error == ENOENT) { + goto again; } - break; + *vpp = vp; + return error; } /* Get a new vnode and associate it with our node. */ @@ -371,13 +363,7 @@ return error; } - error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - if (error != 0) { - mutex_exit(&node->tn_vlock); - ungetnewvnode(vp); - return error; - } - + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vp->v_type = node->tn_type; /* Type-specific initialization. */ @@ -421,8 +407,6 @@ return error; } -/* - */ - /* * Destroys the association between the vnode vp and the node it * references.
CVS commit: src/sys/arch/xen
Module Name:src Committed By: rmind Date: Sun May 22 04:27:16 UTC 2011 Modified Files: src/sys/arch/xen/xen: xenevt.c src/sys/arch/xen/xenbus: xenbus_xs.c Log Message: - Replace uses of simple_lock and ltsleep with mutex and condvar. - Improve some parts of the code to be more MP-friendly. Tested by jakllsch@. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/xen/xen/xenevt.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/xen/xenbus/xenbus_xs.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/xen/xen/xenevt.c diff -u src/sys/arch/xen/xen/xenevt.c:1.36 src/sys/arch/xen/xen/xenevt.c:1.37 --- src/sys/arch/xen/xen/xenevt.c:1.36 Sun Dec 20 09:36:05 2009 +++ src/sys/arch/xen/xen/xenevt.c Sun May 22 04:27:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: xenevt.c,v 1.36 2009/12/20 09:36:05 dsl Exp $ */ +/* $NetBSD: xenevt.c,v 1.37 2011/05/22 04:27:15 rmind Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -26,12 +26,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.36 2009/12/20 09:36:05 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xenevt.c,v 1.37 2011/05/22 04:27:15 rmind Exp $"); #include "opt_xen.h" #include #include #include +#include #include #include #include @@ -42,7 +43,6 @@ #include #include #include -#include #include @@ -103,7 +103,8 @@ #define BYTES_PER_PORT (sizeof(evtchn_port_t) / sizeof(uint8_t)) struct xenevt_d { - struct simplelock lock; + kmutex_t lock; + kcondvar_t cv; STAILQ_ENTRY(xenevt_d) pendingq; bool pending; evtchn_port_t ring[2048]; @@ -119,9 +120,8 @@ /* pending events */ static void *devevent_sih; -struct simplelock devevent_pending_lock = SIMPLELOCK_INITIALIZER; -STAILQ_HEAD(, xenevt_d) devevent_pending = -STAILQ_HEAD_INITIALIZER(devevent_pending); +static kmutex_t devevent_lock; +static STAILQ_HEAD(, xenevt_d) devevent_pending; static void xenevt_donotify(struct xenevt_d *); static void xenevt_record(struct xenevt_d *, evtchn_port_t); @@ -142,6 +142,8 @@ bool mpsafe = (level != IPL_VM); #endif /* MULTIPROCESSOR */ + mutex_init(&devevent_lock, MUTEX_DEFAULT, IPL_HIGH); + STAILQ_INIT(&devevent_pending); devevent_sih = softint_establish(SOFTINT_SERIAL, (void (*)(void *))xenevt_notify, NULL); @@ -218,10 +220,11 @@ return; } - simple_lock(&devevent_pending_lock); + mutex_enter(&devevent_lock); STAILQ_INSERT_TAIL(&devevent_pending, d, pendingq); - simple_unlock(&devevent_pending_lock); d->pending = true; + mutex_exit(&devevent_lock); + softint_schedule(devevent_sih); } } @@ -229,43 +232,31 @@ void xenevt_notify(void) { + struct xenevt_d *d; - int s = splhigh(); - simple_lock(&devevent_pending_lock); - while (/* CONSTCOND */ 1) { - struct xenevt_d *d; - + for (;;) { + mutex_enter(&devevent_lock); d = STAILQ_FIRST(&devevent_pending); if (d == NULL) { + mutex_exit(&devevent_lock); break; } STAILQ_REMOVE_HEAD(&devevent_pending, pendingq); - simple_unlock(&devevent_pending_lock); - splx(s); - d->pending = false; - xenevt_donotify(d); + mutex_exit(&devevent_lock); - s = splhigh(); - simple_lock(&devevent_pending_lock); + xenevt_donotify(d); } - simple_unlock(&devevent_pending_lock); - splx(s); } static void xenevt_donotify(struct xenevt_d *d) { - int s; - s = splsoftserial(); - simple_lock(&d->lock); - + mutex_enter(&d->lock); selnotify(&d->sel, 0, 1); - wakeup(&d->ring_read); - - simple_unlock(&d->lock); - splx(s); + cv_broadcast(&d->cv); + mutex_exit(&d->lock); } static void @@ -303,7 +294,8 @@ return error; d = malloc(sizeof(*d), M_DEVBUF, M_WAITOK | M_ZERO); - simple_lock_init(&d->lock); + mutex_init(&d->lock, MUTEX_DEFAULT, IPL_SOFTSERIAL); + cv_init(&d->cv, "xenevt"); selinit(&d->sel); return fd_clone(fp, fd, flags, &xenevt_fileops, d); case DEV_XSD: @@ -380,8 +372,10 @@ } } seldestroy(&d->sel); - free(d, M_DEVBUF); + cv_destroy(&d->cv); + mutex_destroy(&d->lock); fp->f_data = NULL; + free(d, M_DEVBUF); return (0); } @@ -391,15 +385,11 @@ kauth_cred_t cred, int flags) { struct xenevt_d *d = fp->f_data; - int error; + int error, ring_read, ring_write; size_t len, uio_len; - int ring_read; - int ring_write; - int s; error = 0; - s = splsoftserial(); - simple_lock(&d->lock); + mutex_enter(&d->lock); while (error == 0) { ring_read = d->ring_read; ring_write = d->ring_write; @@ -411,18 +401,16 @@ } /* nothing to read */ - if (fp->f_flag & FNONBLOCK) { - error = EAGAIN; + if ((fp->f_flag & FNONBLOCK) == 0) { + error = cv_wait_sig(&d->cv, &d->lock); } else { - error = ltsleep(&d->ring_read, PRIBIO | PCATCH, - "xenevt", 0, &d->lock); + error = EAGAIN; } } if (error == 0 && (d->flags & XENEVT_F_OVERFLOW)) { error = EFBIG; } - simple_unlock(&d->lock); - splx(s); + mutex_exit(&d->loc
CVS commit: [rmind-uvmplock] src/sys
Module Name:src Committed By: rmind Date: Sun May 22 04:29:04 UTC 2011 Modified Files: src/sys/fs/tmpfs [rmind-uvmplock]: tmpfs_subr.c src/sys/kern [rmind-uvmplock]: vfs_vnode.c Log Message: Fix vnode interlock sharing. To generate a diff of this commit: cvs rdiff -u -r1.56.4.5 -r1.56.4.6 src/sys/fs/tmpfs/tmpfs_subr.c cvs rdiff -u -r1.5.2.3 -r1.5.2.4 src/sys/kern/vfs_vnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/tmpfs/tmpfs_subr.c diff -u src/sys/fs/tmpfs/tmpfs_subr.c:1.56.4.5 src/sys/fs/tmpfs/tmpfs_subr.c:1.56.4.6 --- src/sys/fs/tmpfs/tmpfs_subr.c:1.56.4.5 Thu May 19 03:43:02 2011 +++ src/sys/fs/tmpfs/tmpfs_subr.c Sun May 22 04:29:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_subr.c,v 1.56.4.5 2011/05/19 03:43:02 rmind Exp $ */ +/* $NetBSD: tmpfs_subr.c,v 1.56.4.6 2011/05/22 04:29:04 rmind Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.56.4.5 2011/05/19 03:43:02 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tmpfs_subr.c,v 1.56.4.6 2011/05/22 04:29:04 rmind Exp $"); #include #include @@ -373,6 +373,7 @@ /* Set UVM object to use vnode_t::v_interlock (share it). */ uvm_obj_setlock(node->tn_spec.tn_reg.tn_aobj, vp->v_interlock); + mutex_obj_hold(vp->v_interlock); error = vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error != 0) { Index: src/sys/kern/vfs_vnode.c diff -u src/sys/kern/vfs_vnode.c:1.5.2.3 src/sys/kern/vfs_vnode.c:1.5.2.4 --- src/sys/kern/vfs_vnode.c:1.5.2.3 Thu May 19 03:43:03 2011 +++ src/sys/kern/vfs_vnode.c Sun May 22 04:29:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: vfs_vnode.c,v 1.5.2.3 2011/05/19 03:43:03 rmind Exp $ */ +/* $NetBSD: vfs_vnode.c,v 1.5.2.4 2011/05/22 04:29:04 rmind Exp $ */ /*- * Copyright (c) 1997-2011 The NetBSD Foundation, Inc. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.5.2.3 2011/05/19 03:43:03 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vfs_vnode.c,v 1.5.2.4 2011/05/22 04:29:04 rmind Exp $"); #include #include @@ -424,6 +424,7 @@ if (svp) { /* Set the interlock and mark that it is shared. */ KASSERT(vp->v_mount == NULL); + mutex_obj_hold(svp->v_interlock); uvm_obj_setlock(&vp->v_uobj, svp->v_interlock); KASSERT(vp->v_interlock == svp->v_interlock); vp->v_iflag |= VI_LOCKSHARE;