sync with netbsd-6-0-RELEASE. matt-nb6-plus
authormatt <matt@NetBSD.org>
Thu, 01 Nov 2012 16:44:44 +0000
branchmatt-nb6-plus
changeset 280043 b2ee52d0ce1b
parent 256127 4b123ee6797f
child 280044 3e5b4de3cc08
sync with netbsd-6-0-RELEASE.
UPDATING
distrib/notes/common/main
distrib/notes/macppc/install
distrib/sets/lists/base/ad.mips64eb
distrib/sets/lists/base/ad.mips64el
distrib/sets/lists/base/md.amd64
distrib/sets/lists/base/md.sparc64
distrib/sets/lists/base/mi
distrib/sets/lists/base/shl.mi
distrib/sets/lists/comp/ad.mips64eb
distrib/sets/lists/comp/ad.mips64el
distrib/sets/lists/comp/md.amd64
distrib/sets/lists/comp/md.sparc64
distrib/sets/lists/comp/mi
distrib/sets/lists/comp/shl.mi
distrib/sets/lists/tests/mi
distrib/sets/sets.subr
distrib/utils/sysinst/msg.mi.de
distrib/utils/sysinst/msg.mi.en
distrib/utils/sysinst/msg.mi.es
distrib/utils/sysinst/msg.mi.fr
distrib/utils/sysinst/msg.mi.pl
distrib/utils/sysinst/net.c
doc/3RDPARTY
doc/CHANGES
doc/CHANGES-6.0
doc/README.files
etc/MAKEDEV.tmpl
etc/Makefile
etc/mtree/NetBSD.dist.base
etc/rc.d/named
external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c
external/bsd/bind/dist/CHANGES
external/bsd/bind/dist/bin/named/query.c
external/bsd/bind/dist/lib/dns/include/dns/rdata.h
external/bsd/bind/dist/lib/dns/master.c
external/bsd/bind/dist/lib/dns/rdata.c
external/bsd/bind/dist/lib/dns/rdataslab.c
external/bsd/bind/dist/lib/dns/tests/Makefile.in
external/bsd/bind/dist/lib/dns/tests/master_test.c
external/bsd/bind/dist/version
external/bsd/ntp/dist/ntpd/ntp_io.c
external/bsd/wpa/dist/src/eap_server/eap_server_tls_common.c
external/gpl3/binutils/dist/bfd/elf32-vax.c
external/gpl3/gcc/dist/gcc/builtins.c
lib/libc/arch/arm/gen/swapcontext.S
lib/libp2k/p2k.c
lib/libperfuse/perfuse.c
lib/libpuffs/dispatcher.c
lib/libpuffs/pnode.c
lib/libpuffs/puffs.3
lib/libpuffs/puffs.h
lib/libpuffs/puffs_ops.3
sbin/mount_ptyfs/mount_ptyfs.8
sbin/mount_ptyfs/mount_ptyfs.c
share/examples/Makefile
share/man/man3/rbtree.3
share/man/man5/ifconfig.if.5
share/man/man5/mk.conf.5
share/man/man5/rc.conf.5
share/man/man7/release.7
share/mk/bsd.README
share/mk/bsd.own.mk
share/zoneinfo/australasia
sys/arch/algor/conf/P5064
sys/arch/amd64/amd64/machdep.c
sys/arch/arm/include/byte_swap.h
sys/arch/evbmips/conf/MALTA
sys/arch/evbmips/conf/MALTA64
sys/arch/i386/i386/i386func.S
sys/arch/macppc/conf/GENERIC
sys/arch/macppc/include/param.h
sys/arch/powerpc/include/param.h
sys/arch/powerpc/pic/intr.c
sys/arch/powerpc/powerpc/trap.c
sys/arch/vax/vax/machdep.c
sys/arch/x86/acpi/acpi_wakeup.c
sys/dev/ic/isp_netbsd.c
sys/dev/pci/ehci_pci.c
sys/dev/pci/if_wm.c
sys/dev/pci/if_wmreg.h
sys/dev/pci/mfi_pci.c
sys/dev/sbus/isp_sbus.c
sys/dev/scsipi/scsiconf.c
sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c
sys/fs/ptyfs/ptyfs.h
sys/fs/ptyfs/ptyfs_vfsops.c
sys/kern/kern_exit.c
sys/kern/kern_lwp.c
sys/kern/sys_lwp.c
sys/kern/uipc_usrreq.c
sys/net/npf/npf_alg_icmp.c
sys/net/npf/npf_handler.c
sys/netipsec/key.c
sys/netipsec/key.h
sys/nfs/nfs_serv.c
sys/sys/lwp.h
sys/sys/param.h
sys/ufs/ffs/ffs_vfsops.c
sys/ufs/ufs/ufs_extattr.c
sys/ufs/ufs/ufs_quota.c
sys/ufs/ufs/ufs_quota2.c
sys/uvm/uvm_km.c
sys/uvm/uvm_map.c
tests/crypto/libcrypto/Makefile
tests/crypto/libcrypto/idea/Makefile
tests/crypto/libcrypto/mdc2/Makefile
tests/crypto/libcrypto/t_ciphers.sh
tests/crypto/libcrypto/t_hashes.sh
tests/fs/ffs/h_quota2_tests.c
tests/fs/ffs/t_miscquota.sh
usr.sbin/npf/npfctl/npf.conf.5
usr.sbin/npf/npfctl/npf_parse.y
usr.sbin/npf/npfctl/npfctl.c
usr.sbin/postinstall/postinstall
usr.sbin/racoon/Makefile
usr.sbin/traceroute/traceroute.c
--- a/UPDATING	Tue Aug 21 05:36:23 2012 +0000
+++ b/UPDATING	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: UPDATING,v 1.234.2.1 2012/02/16 19:56:43 riz Exp $
+$NetBSD: UPDATING,v 1.234.2.1.2.1 2012/11/01 16:44:44 matt Exp $
 
 This file (UPDATING) is intended to be a brief reference to recent
 changes that might cause problems in the build process, and a guide for
@@ -16,10 +16,17 @@
 Recent changes:
 ^^^^^^^^^^^^^^^
 
+20120813:
+	The update of openssl requires cleaning both the openssl build
+	directory and DESTDIR. *Even non-update builds require cleaning
+	DESTDIR.* Builds done without taking these steps may fail, or in
+	some cases may succeed and install broken openssl libraries that
+	cause third-party software to link incorrectly and/or crash.
+
 20120216:
 	Default for MKCATPAGES changed to NO. Update builds will fail
 	unless DESTDIR is cleaned manually. If you built between 20120207
-	and 20120216, daily and weekly could have created an unreable
+	and 20120216, daily and weekly could have created an unreadable
 	/var/db/man.db index for apropos. Running makemandb -f or
 	the next run of weekly will fix it.
 
--- a/distrib/notes/common/main	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/notes/common/main	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: main,v 1.484.2.1 2012/08/17 23:53:48 riz Exp $
+.\"	$NetBSD: main,v 1.484.2.1.2.1 2012/11/01 16:44:45 matt Exp $
 .\"
 .\" Copyright (c) 1999-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -121,7 +121,11 @@
 on an FTP site near you, usually located in the
 .Pa /pub/NetBSD/iso/
 directory.
-Check the NetBSD website for details.
+Check the list of
+.Nx
+mirrors at
+.Lk http://www.NetBSD.org/mirrors
+for details.
 .Pp
 Option 2: bootable CD-ROM images from
 .Pa \*M/installation/cdrom/ .
@@ -477,7 +481,1253 @@
 .Lk http://ftp.NetBSD.org/pub/NetBSD/NetBSD-6.0/CHANGES-6.0
 files in the top level directory of the NetBSD 6.0 release tree.
 .Pp
-.\" fill in with changes.mdoc
+Some highlights include:
+.Ss2 General kernel
+.(bullet
+.Dv "time_t"
+and
+.Dv "dev_t"
+are now 64 bits.
+.It
+Much-improved compat_linux support for running Linux binaries.
+.It
+Added a generic producer/consumer queue.
+.It
+Added a new ptree ( Patricia / RADIX tree ) implementation.
+.It
+Removed
+.Dv "MALLOC()"
+and
+.Dv "FREE()"
+macros.
+.It
+Compute
+.Dv "kern.ipc.shmmaxpages"
+on startup based on physical memory. Can be overridden via
+.Xr sysctl 8 .
+.It
+.Xr kmem_alloc 9 :
+Add more extensive runtime debugging facilities.
+.It
+File descriptor access performance improvements were made.
+.It
+.Xr cpu_reboot 9 :
+tear down stacks of devices and file systems in an orderly fashion during shutdown.
+.It
+Added 'show vmem' and 'show all vmems' commands to
+.Xr ddb 4 .
+.It
+Added high-priority
+.Xr xcall 9
+support.
+.It
+Added direct select()/poll() support.
+.It
+Add PCU (Per-CPU Unit) interface to unify synchronization of per CPU context, like lazy FPU management.
+.It
+Added new system calls
+.Xr pipe2 2 ,
+.Xr paccept 2 ,
+.Xr kqueue1 2 ,
+flags SOCK_CLOEXEC/SOCK_NONBLOCK to
+.Xr socket 2 ,
+.Xr socketpair 2 ,
+F_DUPFD_CLOEXEC to
+.Xr fcntl 2 ,
+and a MSG_CMSG_CLOEXEC to
+.Xr recvfrom 2
+to be able to set close-on-exec to all newly created file descriptors.
+.It
+Major improvements to
+.Xr uvm_map 9 ,
+.Xr uvm_km 9 ,
+.Xr vmem 9 ,
+and
+.Xr kmem 9
+layers.
+.It
+Removed
+.Xr ltsleep 9
+and wakeup_one(9).
+.It
+Rewrote most of the entropy-gathering and entropy-distributing code, separating the
+.Xr rnd 4
+pseudodevice from the bitstream generation code
+.Xr cprng 9
+and entropy-pool code
+.Xr rnd 9 .
+.It
+.Xr kmem_alloc 9 :
+add more extensive runtime debugging facilities.
+.It
+Kernel support for
+.Xr posix_spawn 3 .
+.bullet)
+.
+.Ss2 Networking
+.(bullet
+.Xr ip 4 :
+added IP_RECVTTL option to let
+.Xr recvmsg 2
+return the TTL of the received datagram.
+.It
+.Xr ip 4 :
+added IP_MINTTL option to discard packets with a TTL lower than the option value.
+.It
+Added SOCK_SEQPACKET for local sockets.
+.It
+Added
+.Dv "net.inet.icmp.bmcastecho"
+.Xr sysctl 7 ,
+to disable ICMP replies to the braodcast address.
+.It
+Make TCP window size autoscaling the default.
+.It
+Derive the mbuf cluster (NMBCLUSTERS) at boot time from the available memory. The default can be raised by changing
+.Dv "kern.mbuf.nmbclusters"
+.
+.It
+Added NPF, the NetBSD Packet Filter.
+.It
+.Xr udp 4 :
+implement RFC6056 port selection algorithms.
+.bullet)
+.
+.Ss2 File systems
+.(bullet
+Added CHFS, a file system for flash devices.
+.It
+The default behavior when mounting empty msdosfs file systems has been changed to assume long filenames. The behavior with populated file systems has not changed.
+.It
+UDF: Added support for session opening/closing on sequential media.
+.It
+ext2fs: Added support for >128 byte inodes.
+.It
+Import OpenSolaris ZFS code. Experimental-only; does not work yet.
+.It
+ffs: New quota support. This adds a new on-disk format to store disk quota usage and limits, integrated with ffs metadata. Usage is checked by
+.Xr fsck_ffs 8
+(no more quotacheck) and is covered by the WAPBL journal. Enabled with kernel option QUOTA2.
+.bullet)
+.
+.Ss2 Security
+.(bullet
+.Xr secmodel_bsd44 9 ,
+.Xr secmodel_securelevel 9 :
+Add provisions to control access to
+.Xr gpio 4
+pins.
+.It
+.Xr security.conf 5 :
+Add check_pkg_vulnerabilities and check_pkg_signatures to validate the installed packages against the vulnerabilities database and the expected checksums for their files.
+.bullet)
+.
+.Ss2 Drivers
+.(bullet
+Audio:
+.(bullet
+Added
+.Xr gcscaudio 4
+driver for AMD Geode CS5536.
+.It
+Added
+.Xr hdaudio 4 ,
+a new standards-compliant Intel High Definition Audio driver written to replace
+.Xr azalia 4 .
+.It
+.Xr audio 9 :
+Audio drivers are now MP-safe.
+.bullet)
+.
+.It
+Hardware Monitoring:
+.(bullet
+.Xr sysmon_envsys 9 :
+Enhancements to allow access to driver-internal limit values.
+.It
+.Xr acpicpu 4 :
+Add a driver for ACPI-based processor functionality.
+.It
+.Xr acpipmtr 4 :
+Add a driver for ACPI power meters.
+.It
+.Xr acpismbus 4 :
+ACPI SMBus Control Method Interface driver.
+.It
+.Xr acpiwdrt 4 :
+ACPI Watchdog Resource Tables driver.
+.It
+.Xr acpiwmi 4 :
+Windows Management Instrumentation support for ACPI. Also added mappings for
+.Xr wmidell 4 ,
+.Xr wmieeepc 4 ,
+.Xr wmihp 4 ,
+and
+.Xr wmimsi 4 .
+.It
+.Xr aibs 4 :
+New driver for ASUSTeK AI Booster (ACPI ASOC ATK0110) hardware monitor with limit support.
+.It
+.Xr amdtemp 4 :
+Add support for Family 12h.
+.It
+.Xr dbcool 4 :
+Added support for ADM1031 thermal sensor / fan controller.
+.bullet)
+.
+.It
+Networking:
+.(bullet
+Added support for more chip revisions to
+.Xr re 4 .
+Added hardware checksum support for newer PCIe 8168C/8111C/8102E chips.
+.It
+Switch
+.Xr ath 4
+from the binary HAL to the open-source HAL from Sam Leffler.
+.It
+Added
+.Xr bwi 4
+driver for Broadcom AirForce / Apple Airport Extreme network cards.
+.It
+Added flow control and RTL8211C(L) PHY support to
+.Xr rgephy 4 .
+.It
+Added
+.Xr age 4
+and
+.Xr atphy 4
+drivers for Attansic/Atheros L1 Gigabit Ethernet and F1 PHY, respectively.
+.It
+Added support for flow control to
+.Xr sk 4 .
+.It
+Added support for flow control on MCP65 to
+.Xr nfe 4 .
+.It
+Added TCPv4/UDPv4 RX hardware checksum support for i82559 and later chips to
+.Xr fxp 4 .
+.It
+.Xr wm 4 :
+Added ICH10, PCH, PCH2, 82575, 82576, 82580 and I350 devices support. Added some other improvements and workarounds.
+.It
+.Xr bge 4 :
+added misc quirk code for chip specific bugs.
+.It
+Added
+.Xr ale 4 :
+Attansic/Atheros L1E Gigabit Ethernet.
+.It
+.Xr agr 4 :
+added support for layering vlans on top, and allow LACP to be disabled.
+.It
+.Xr alc 4 :
+Add a driver for Atheros AR813x/AR815x Ethernet.
+.It
+.Xr aue 4 :
+Add support for I-O DATA ETX-US2.
+.It
+.Xr bnx 4 :
+Added support for Broadcom BCM5709 and BCM5716 chips. Add support for Broadcom BCM5709S (SerDes) chip.
+.It
+.Xr et 4 ,
+.Xr etphy 4 :
+Add a driver for Agere/LSI ET1310/ET1301 10/100/Gigabit Ethernet device and the Agere/LSI ET1011 TruePHY Gigabit Ethernet PHY.
+.It
+.Xr kue 4 :
+fixed unaligned memory accesses so it now works on ARM and MIPS machines.
+.It
+.Xr ne 4 :
+add proper support for NE2000 8-bit mode.
+.It
+.Xr nfe 4 :
+Add support for flow control for MCP65.
+.It
+.Xr otus 4 :
+Atheros AR9100U driver.
+.It
+.Xr smsh 4 :
+Add a SMSC LAN9118 Family Ethernet driver.
+.It
+.Xr upgt 4 :
+Add a driver for Conexant/Intersil PrismGT SoftMAC USB IEEE 802.11b/g WLAN.
+.bullet)
+.
+.It
+Storage:
+.(bullet
+Added an experimental in-kernel iSCSI initiator, from Wasabi Systems.
+.It
+.Xr viaide 4 :
+Added VT8237S Integrated SATA controller support, and VT6410 PATA RAID controller support (without RAID).
+.It
+Added LVM functionality with
+.Xr dm 4
+driver and lvm2 userland tools.
+.It
+Added support for 82965PM to
+.Xr piixide 4 .
+.It
+.Xr vnd 4 :
+implemented DIOCCACHESYNC. Also, allow
+.Xr vnd 4
+to be backed by a sparse file.
+.It
+Added
+.Xr sdmmc 4
+driver for SD/MMC.
+.It
+.Xr mvsata 4 :
+support the Marvell Hercules-I/II SATA controllers.
+.It
+.Xr flash 9 :
+Add a subsystem to handle flash memory devices, and
+.Xr nand 9 ,
+a subsystem to handle NAND controllers.
+.It
+.Xr mfi 4 :
+Add support for LSI's newer (GEN2) RAID controller.
+.It
+.Xr nside 4 :
+Add a driver for the National Semiconductor PC87415 IDE controller.
+.It
+.Xr raid 4 :
+.(bullet
+RAIDFrame parity maps, which greatly improve parity rewrite times after unclean shutdown.
+.It
+Added support for non 512-byte sector devices.
+.It
+Added support for >2TB devices.
+.bullet)
+.
+.bullet)
+.
+.It
+USB:
+.(bullet
+.Xr uftdi 4 :
+Added support for REX-USB60F.
+.It
+.Xr ehci 4 :
+work around USB subsystem freeze for SB600/SB700 chipsets.
+.It
+.Xr ums 4 :
+Added touchpanel support.
+.bullet)
+.
+.It
+Graphics and Video:
+.(bullet
+.Xr drm 4 :
+updated to mesa-drm 85b9f737db0d2a845e4d7e2bbf9ad12ff9e2227c.
+.It
+.Xr acpivga 4 :
+ACPI Video Extensions driver.
+.It
+.Xr agp 4 :
+Added support for Intel G35, Intel G45, and Intel 82855GM.
+.It
+.Xr auvitek 4 :
+Add a driver for Auvitek AU0828 family USB video capture controllers.
+.It
+.Xr dtv 4 :
+Add new digital TV framework.
+.It
+.Xr cxdtv 4 :
+Add driver for Conexant CX23880-based DTV cards.
+.It
+.Xr emdtv 4 :
+Add a driver for Empia EM28xx family USB video capture controllers.
+.It
+.Xr omapfb 4 :
+a simple driver for OMAP 3xxx on-chip video, especially the Beagleboard.
+.bullet)
+.
+.It
+Miscellaneous:
+.(bullet
+Added Elantech multi-touch trackpad support to
+.Xr pms 4 .
+.It
+Added the
+.Xr altmem 4
+.Dq alternative memory
+
+disk driver, which allows memory that is normally inaccessible by the machine-dependent
+.Xr pmap 9
+to be used (as swap space).
+.It
+.Xr ichlpcib 4 :
+support 82801IEM LPC Interface Bridge.
+.It
+Complete rework of
+.Xr gpio 4
+to integrate with
+.Xr kauth 9 ,
+allow for runtime driver attachment, and naming of individual pins. Add
+.Xr gpiosim 4
+driver to simulate a
+.Xr gpio 4
+device for testing purposes.
+.It
+Added
+.Xr gpioiic 4
+driver to bit-bang an I2C bus using GPIO pins.
+.It
+.Xr btmagic 4 :
+Apple Magic Mouse driver.
+.It
+.Xr vmt 4 :
+Add a VMware Tools driver, from OpenBSD.
+.bullet)
+.
+.bullet)
+.
+.Ss2 Platforms
+.(bullet
+x86 (
+i386,
+amd64):
+.(bullet
+.Xr pxeboot 8
+now parses
+.Xr boot.cfg 5 .
+.It
+The bootloader has been enhanced to support framebuffer consoles using VESA BIOS extensions. x86 ports now work with the
+.Xr genfb 4
+framebuffer, and the i386-only
+.Xr vesafb 4
+framebuffer has been obsoleted.
+.It
+Added
+.Xr ucas 9
+support for x86.
+.It
+.Xr sysinst 8
+now defaults to UFS2 for x86 platforms.
+.It
+CPU topology detection suport for AMD processors.
+.It
+Enable Ext2fs support in bootloader.
+.It
+Booting from a disk with a GUID Partition Table (GPT) is now possible.
+.It
+Support
+.Xr userconf 4
+command in
+.Xr boot.cfg 5 .
+.bullet)
+.
+.It
+i386:
+.(bullet
+Use
+.Dq i486
+
+as GNU_ARCH.
+.It
+Added PAE (Physical Address Extension) support.
+.It
+Better support for VIA C7 CPUs.
+.bullet)
+.
+.It
+amd64:
+.(bullet
+Added direct map support (mapping of all physical memory using large pages).
+.bullet)
+.
+.It
+alpha:
+.(bullet
+X11: add support for X11FLAVOUR=xorg.
+.It
+Support for Avalon A12 removed.
+.It
+Converted Alpha to use PCU to manage FPU.
+.bullet)
+.
+.It
+amiga:
+.(bullet
+Added basic PCI support.
+.It
+.Xr efa 4 :
+ELBOX FastATA 1200 driver.
+.It
+Add a driver for BlizzardPPC 603e+ SCSI.
+.bullet)
+.
+.It
+amigappc:
+.(bullet
+A CSPPC system with
+.Xr ahsc 4
+or
+.Xr cbiiisc 4
+boots into multiuser;
+.It
+Onboard serial now works.
+.It
+.Xr efa 4 :
+ELBOX FastATA 1200 driver.
+.bullet)
+.
+.It
+ARM ports(
+acorn26,
+acorn32,
+cats,
+evbarm,
+hpcarm,
+iyonix,
+netwinder,
+shark,
+zaurus):
+.(bullet
+Cortex-A8 CPU support is available.
+.It
+i.MX51 SoC support is available.
+.bullet)
+.
+.It
+atari:
+.(bullet
+Add support for the SMC Elite Ultra Ethernet with the SMC_TT VME-ISA bridge.
+.It
+Add support for the EtherNEC, ISA NE2000 based Ethernet connected to Atari ROM cartridge slot.
+.bullet)
+.
+.It
+bebox:
+.(bullet
+Support xserver. Tested on s3(TRIO 64V+).
+.bullet)
+.
+.It
+cobalt:
+.(bullet
+Add LBA48 support to bootloader so that it can safely load a kernel from NetBSD partition beyond >137GB boundary.
+.bullet)
+.
+.It
+dreamcast:
+.(bullet
+Fixed a long standing GD-ROM driver bug so that file system on GD-ROM works properly.
+.It
+Build and put a raw binary format kernel into distribution.
+.It
+Switch to using Xorg servers and binaries.
+.bullet)
+.
+.It
+evbarm:
+.(bullet
+.It
+Added support for Gumstix Verdex and Verdex Pro.
+.It
+Support Marvell Sheevaplug and some Marvell SoC NAS boxes.
+.It
+Add initial support for Sharp NetWalker MID.
+.It
+Add driver for OMAP NAND controllers.
+.It
+Add FriendlyARM Mini2440 support.
+.It
+Add initial support for the RaspberryPi. No support yet for the USB controller, the Ethernet interface, or the video chip. Serial console works, and boots multiuser.
+.bullet)
+.
+.It
+evbmips:
+.(bullet
+Added
+.Xr voyagerfb 4
+driver, for the Gdium Liberty 1000's video controller.
+.It
+Added support for RMI XLS6ATX_7A board and XL SoC family.
+.It
+Added support for RMI (NetLogic) XLS/XLR models.
+.bullet)
+.
+.It
+evbppc:
+.(bullet
+Enable builds for OEA, ibm4xx and Book-E modules.
+.bullet)
+.
+.It
+evbsh3:
+.(bullet
+Add support for Alpha Project MS104-SH4, TAC T-SH7706LAN Rev.3 and TAC T-SH7706LSR Rev.1.
+.bullet)
+.
+.It
+hp300:
+.(bullet
+Switch NetBSD/hp300 to wscons with rasops.
+.It
+Add support for framebuffers on HP362 and HP382.
+.It
+Add support for Apollo Domain keyboard.
+.bullet)
+.
+.It
+hp700:
+.(bullet
+Added support for UFS2 boot.
+.It
+pmap update: Support PA 2.0 machines in 32 bit mode. Improve support for machines without the PA7100LC or PA7300LC CPUs.
+.It
+Added
+.Xr ucas 9
+support for hp700.
+.It
+com at dino now works.
+.It
+.Xr lcd 4 :
+Driver for hp700 lcds added.
+.It
+Add support for
+.Xr elroy 4 ,
+.Xr astro 4 ,
+and
+.Xr ssio 4
+based 64-bit machines running in 32-bit mode.
+.It
+Update
+.Xr sti 4
+and add
+.Xr pci 4
+attachment.
+.It
+Add support for HIL devices.
+.It
+Support added for machines with the uturn(4) I/O subsystem.
+.bullet)
+.
+.It
+hpcarm:
+.(bullet
+Add support for Sharp W-ZERO3 series.
+.It
+Use rtc_offset passed from hpcboot.
+.It
+Bump MAXPARTITIONS from 8 to 16.
+.It
+Switch to using Xorg servers and binaries.
+.It
+Improve console speed on W-ZERO3 machines using write through mapping for framebuffer memory.
+.It
+Improve install on JORNADA720.
+.bullet)
+.
+.It
+hpcmips:
+.(bullet
+Switch to using Xorg servers and binaries.
+.bullet)
+.
+.It
+hpcsh:
+.(bullet
+Switch to using Xorg servers and binaries.
+.It
+Add
+.Xr sysinst 8
+support.
+.bullet)
+.
+.It
+landisk:
+.(bullet
+Added UFS2 boot support.
+.It
+Enable to build a bootable install disk image.
+.bullet)
+.
+.It
+luna68k:
+.(bullet
+Enable LUNA to load -current kernels director from firmware.
+.It
+Make SCSI work properly.
+.It
+Use the original OMRON font derived from 4.4BSD-Lite/luna68k rather than gallant19 which is used on Sun workstations.
+.It
+Complete LUNA-II support.
+.bullet)
+.
+.It
+mac68k:
+.(bullet
+Add timecounter support to the CSI Hurdler Centronics Parallel Interface
+.Xr cpi 4
+driver.
+.bullet)
+.
+.It
+macppc:
+.(bullet
+Support new-style
+.Xr module 7
+kernel modules.
+.bullet)
+.
+.It
+m68k ports (
+amiga,
+atari,
+cesfic,
+hp300,
+luna68k,
+mac68k,
+mvme68k,
+news68k,
+next68k,
+sun2,
+sun3,
+x68k):
+.(bullet
+Re-enable m68k optimized in_cksum routine.
+.It
+Support
+.Xr module 7
+loading.
+.It
+Fixed a regression in FPU_EMULATE code that caused weird
+.Xr awk 1
+behavior.
+.It
+Add hyperbotic and trigonometric functions to m68k FPE.
+.bullet)
+.
+.It
+mips ports (
+algor,
+arc,
+cobalt,
+emips,
+evbmips,
+ews4800,
+hpcmips,
+mipsco,
+newsmips,
+pmax,
+sbmips,
+sgimips):
+.(bullet
+Added support for 64-bit MIPS processors (O32, N32, N64 ABIs are supported).
+.It
+Added SMP support for MIPS architecture.
+.It
+Rewritten interrupt handling to be much more efficient, added "fast" software interrupts and kernel preemption.
+.It
+Converted MIPS to use PCU to manage FPU.
+.It
+Added MIPS32R2 and MIPS64R2 support.
+.It
+Rework Atheros MIPS-based SoC support. Add initial support for AR71xx (24K) and AR9344 (74K) SoCs
+.It
+Added support for ralink RT3883 SoC from CradlePoint Technologies.
+.It
+Added support for MIPS DSP v2 ASE.
+.bullet)
+.
+.It
+ofppc:
+.(bullet
+Support Gigabit Ethernet Controller for MV64361 on PegasosII.
+.It
+Support for RDB partitions.
+.bullet)
+.
+.It
+pmax:
+.(bullet
+Added UFS2 boot support.
+.bullet)
+.
+.It
+powerpc ports (
+amigappc,
+bebox,
+evbppc,
+ibmnws,
+macppc,
+mvmeppc,
+ofppc,
+pmppc,
+prep,
+rs6000,
+sandpoint,
+walnut):
+.(bullet
+Add support for using secure PLT (thereby allowing data and bss of powerpc programs and shared library to be set non-executable).
+.It
+Added support for Book E Freescale MPC85xx (e500 core) processors. Added "fast" software interrupts support and SOFTFLOAT for PowerPC (Book E only), reworked FPU/VEC support for e500 SPE, other improvements.
+.It
+Converted PowerPC to use PCU to manage FPU/AltiVec/SPE.
+.It
+Initial SMP support for MPC85xx, reworked and unified IPI code, various other improvements.
+.It
+Switch to using direct-mapped uareas (pcb + kernel stacks).
+.It
+The generic PIC code now supports Matt Thomas's fast softintr code.
+.bullet)
+.
+.It
+prep:
+.(bullet
+Support Xserver. Tested with on-board s3(864).
+.bullet)
+.
+.It
+sandpoint:
+.(bullet
+Added support for Marvell-SKnet in netboot.
+.It
+D-Link DSM-G600 support.
+.It
+Add support for booting from RAID 1.
+.It
+Iomega Storcenter support.
+.It
+Netronix NH-230/231 and compatible NAS are supported.
+.bullet)
+.
+.It
+sgimips:
+.(bullet
+Added support for Personal IRIS 4D/20 and 4D/25 (IP6 and IP10).
+.It
+.Xr mec 4 :
+Added RX hardware checksum support on O2.
+.It
+.bullet)
+.
+.It
+sh3ports (
+dreamcast,
+evbsh3,
+hpcsh,
+landisk,
+mmeye):
+.(bullet
+Add some support for SH7706.
+.bullet)
+.
+.It
+shark:
+.(bullet
+Added support for
+.Xr module 7
+-style kernel modules.
+.It
+.Xr chipsfb 4
+now works on shark.
+.bullet)
+.
+.It
+sparc:
+.(bullet
+Switch sparc port to use
+.Xr wscons 4
+.It
+.Xr zx 4 :
+added
+.Xr wscons 4
+support.
+.It
+.Xr tcx 4 :
+support
+.Xr wsdisplay 4
+and acceleration.
+.It
+.Xr apc 4 :
+a driver for the Aurora Personality Chip (APC) found on SPARCstation-4/5 and qemu. Allows to idle the CPU when in the idle loop.
+.It
+Re-enable sparc optimized in_cksum routine.
+.It
+Added support for
+.Xr module 7
+-style kernel modules.
+.bullet)
+.
+.It
+sparc64:
+.(bullet
+.Xr zx 4 :
+added
+.Xr wscons 4
+support.
+.It
+Add a driver for LOMlite lights out management hardware monitor and watchdog timer.
+.It
+Add real UltraSPARC-III* CPU support.
+.It
+Add initial support for Fujitsu SPARC64 systems, not yet stable.
+.It
+.Xr ffb 4 :
+Added EDID (Extended Display Identification Data) reading, and video mode setting support.
+.It
+Added fast
+.Xr softint 9
+support.
+.It
+Add support for Enterprise systems (Ex[45]00) systems.
+.bullet)
+.
+.It
+x68k:
+.(bullet
+Switched
+.Xr pow 4
+to use
+.Xr powerd 8 .
+.It
+Fix bootloader failure on X68030+060turbo.
+.It
+Removed pow(4) and rtcalarm(8).
+.It
+.Xr powsw 4 :
+a revised power switch driver.
+.bullet)
+.
+.It
+xen:
+.(bullet
+Add PCI pass-through support for Xen3. Dom0 kernel gets a
+.Xr pciback 4
+driver, to which the device specified in the pciback.hide boot parameter will attach. DomU kernels get a
+.Xr xpci 4
+driver, to which PCI busses will attach.
+.It
+Added XEN3PAE_DOM0, an i386 dom0 kernel with PAE support. Requires an i386PAE or x86_64 hypervisor.
+.It
+.Xr balloon 4 :
+Balloon driver now enabled for all Xen kernels.
+.It
+Dropped Xen 2 support. Xen 3.1 or later is now required.
+.It
+Added support for request-rx-copy in the virtual network device backend.
+.It
+Provide experimental support for suspend/resume in NetBSD domUs.
+.It
+Enable no-execute bit feature for i386pae and amd64 kernels.
+.It
+Added support for feature-flush-cache in block device backend, used in block device frontend for DIOCCACHESYNC.
+.bullet)
+.
+.It
+zaurus:
+.(bullet
+Added zboot.
+.It
+Added playback and recording support to
+.Xr zaudio 4 .
+.It
+Add Xorg support.
+.It
+Add ioexp driver for SL-C1000.
+.It
+Add PXA25x based Zaurus SL-C700/750/760/860 support.
+.bullet)
+.
+.bullet)
+.
+.Ss2 Userland
+.(bullet
+3rd party software updates:
+.(bullet
+.Xr acpi 4 :
+ACPICA updated to 20110623.
+.It
+.Xr atf 7
+is version 0.15.
+.It
+ISC
+.Xr cron 8
+4.1.
+.It
+OpenSSH version 1.0.1c
+.It
+lvm2tools 2.02.44 and libdevmapper 1.02.30
+.It
+dhcpcd-5.5.4
+.It
+am-utils updated from head; adds UDF support and
+.Dv "-uu"
+.It
+CVS 1.12.13
+.It
+BIND 9.9.1-P4.
+.It
+libbind 6.0-rc1.
+.It
+FSF binutils 2.21.1a.
+.It
+.Xr httpd 8 :
+bozohttpd-20111118
+.It
+.Xr file 1
+5.09
+.It
+ntp 4.2.6p5
+.It
+.Xr flex 1
+version 2.5.35.
+.It
+.Xr gcc 1
+version 4.5.3.
+.It
+.Xr gdb 1
+version 7.3.1.
+.It
+GNU MP 5.0.2.
+.It
+.Xr less 1
+version 444.
+.It
+libfetch 2.23
+.It
+Lua 5.1.4
+.It
+OpenLDAP 2.4.23
+.It
+SQLite 3.6.9
+.It
+.Xr tmux 1
+1.5
+.It
+trousers-0.3.8; tmp-tools 1.3.7.1
+.It
+.Xr xz 1
+5.0.0
+.It
+byacc-20110908
+.It
+tzdata2011n
+.It
+.Xr dns-sd 1 :
+Import mDNSResponder 212.1.
+.bullet)
+.
+.It
+Libraries:
+.(bullet
+libc:
+.(bullet
+Add new ptree (Patricia / RADIX tree) implementation.
+.It
+Added
+.Xr fopendir 3 .
+.It
+Added RFC 2045 MIME Quoted-Printable support.
+.It
+Added
+.Xr glob_pattern_p 3 .
+.It
+Added
+.Xr memrchr 3 .
+.It
+Added
+.Xr stpcpy 3 ,
+.Xr stpncpy 3 ,
+and
+.Xr strnlen 3 .
+.It
+Added %s (seconds since the Epoch) to
+.Xr strptime 3 ,
+for symmetry with
+.Xr strftime 3 .
+.It
+Added the getdate(3) and getdate_err value, conforming to IEEE Std 1003.1 (
+.Dq POSIX.1
+
+) and the Open Group Base Specifications X/Open System Interfaces extension (
+.Dq XSI
+
+).
+.It
+Added
+.Xr getdelim 3
+and
+.Xr getline 3 .
+.It
+Added
+.Xr posix_spawn 3 .
+.It
+Added a space-efficient write-once database (
+.Xr cdbr 3 ,
+.Xr cdbw 3
+).
+.It
+Provide a re-entrant and thread-safe set of timezone APIs that don't require locking and can operate on user-specified timezones.
+.bullet)
+.
+.It
+libm: Add f{dim,max,min}{,f,l} from FreeBSD.
+.It
+Replaced termcap with
+.Xr terminfo 3 .
+.It
+perfuse: Add the PUFFS RElay to FUSE library, which bridges the kernel level API for FUSE filesystems with native PUFFS.
+.It
+.Xr rump 3
+.(bullet
+Moved VFS functionality from librump to a new library, librumpvfs.
+.It
+Added support for remote system calls.
+.It
+Add IPv6 support to rumpnet.
+.It
+Support kernel config framework and devices in rumpdev.
+.It
+rumpfs: support registering exernal files which are accessed from the host OS file system namespace instead of from within the rump virtual kernel.
+.It
+rumpvfs: Use the unmodified kernel vnode pager.
+.bullet)
+.
+.It
+.Xr bluetooth 3 :
+updated the Bluetooth service discovery API and merged it into libbluetooth, retiring the separate libsdp.
+.bullet)
+.
+.It
+Installer (sysinst):
+.(bullet
+Default to
+.Xr wapbl 4
+logging for UFS partitions.
+.It
+Make sure the installer rejects UFS2 for root partitions on ports whose bootloaders don't support booting from UFS2.
+.bullet)
+.
+.It
+Changes to the way
+.Xr make 1
+processes
+.Dv ".for"
+loops.
+.It
+.Xr makefs 8 :
+Added support for encoding RISC OS metadata into ISO9660 file systems.
+.It
+.Xr mount 8 :
+Added
+.Dv "-o rump"
+, which mounts the file system as a userspace server via
+.Xr puffs 4
+and
+.Xr rump 3
+instead of using a kernel drver.
+.It
+.Xr dkctl 8 :
+Display cache, strategy and list of wedges if no command is specified on the command line.
+.It
+.Xr ar 1 :
+Added support for
+.Dq deterministic mode
+
+.
+.It
+Added
+.Xr crash 8 ,
+a new utility to debug kernel images, based on the in-kernel debugger,
+.Xr ddb 4 .
+.It
+.Xr eject 1
+now has
+.Xr amd 8
+support.
+.It
+.Xr mtree 8 :
+add -S option to sort entries.
+.It
+Imported
+.Xr netpgp 1 ,
+a BSD-licensed PGP implementation.
+.It
+.Xr install 1 :
+Added support for writing sha256, sha384, or sha512 hashes to a METALOG.
+.It
+.Xr rpcgen 1 :
+Added support for
+.Dv "hyper"
+and
+.Dv "quad"
+keywords.
+.It
+New
+.Xr wakeonlan 8
+command to send Wake-on-LAN packets to machines on the local Ethernet.
+.It
+Added
+.Xr nbperf 1 ,
+a minimal perfect hash function generator.
+.It
+.Xr unzip 1 :
+a libarchive-based unzip frontend.
+.It
+.Xr apropos 1 :
+new implementation using SQLite Full Text Index.
+.It
+.Xr audiocfg 1 :
+new tool to control audio defaults.
+.It
+.Xr devpubd 8 :
+Add a device publishing daemon for automatic device node creation.
+.It
+.Xr disklabel 8 :
+Disable COMPAT_386BSD_MBRPART.
+.It
+.Xr dkctl 8 :
+Display cache, strategy, and list of wedges if no command is specified in the command line.
+.It
+.Xr fincore 1 :
+Add a utility to query file cache.
+.It
+.Xr ifconfig 8 :
+Add the
+.Dv "linkstr"
+command which can be used to communicate an arbitrary string with the interface driver.
+.It
+.Xr man 1 :
+display a manpage when specified with a path.
+.It
+.Xr mkubootimage 1 :
+Added a tool to generate u-boot kernel images.
+.bullet)
+.
+.Pp
+Besides this list, there have also been innumerable bug fixes and miscellaneous enhancements.
+.Ss2 Components removed from NetBSD
+.Pp
+In this release of NetBSD, the following software components have been removed from the system. Some were not useful anymore, or their utility did not justify the maintenance overhead. Others were not working properly and there was a lack of interest in fixing them.
+.(bullet
+Support for Xen 2 has been dropped. Xen 3.1 or later is now required to run NetBSD.
+.It
+Support for LKMs (Loadable Kernel Modules) was dropped; use the new
+.Xr module 7
+framework.
+.It
+.Dq softdep
+
+support is no longer available in FFS; use
+.Xr wapbl 4
+logging instead.
+.It
+The
+
+      playstation2:
+.Lk http://www.NetBSD.org/ports/playstation2/
+port.
+.It
+tn3270 was removed from base; it is available in pkgsrc.
+.It
+Support for Darwin, Mach, IRIX and PECOFF emulation was retired.
+.bullet)
+.
 .
 .\} \" \n[FOR_RELEASE]
 .
@@ -500,6 +1750,15 @@
 .Xr groff 1
 can still be found in pkgsrc as
 .Pa textproc/groff .
+.It
+.Xr kame_ipsec 4
+has been replaced by
+.Xr fast_ipsec 4 .
+The option to use the old implementation (see
+.Xr options 4 )
+will be removed in the next
+.Nx
+release.
 .bullet)
 .
 .Ss "The NetBSD Foundation"
@@ -747,6 +2006,12 @@
 .Xr sysctl 8
 command or through
 .Xr sysctl.conf 5 .
+.Pp
+The implementation of SHA2-HMAC in KAME_IPSEC as used in NetBSD-5
+and before did not comply to current standards.
+FAST_IPSEC does, with the result that old and new systems cannot
+communicate over IPSEC, if one of the affected authentication
+algorithms (hmac_sha256, hmac_sha384, hmac_sha512) is used.
 .
 .Ss2 Issues affecting an upgrade from NetBSD 4.x releases
 .Pp
--- a/distrib/notes/macppc/install	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/notes/macppc/install	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: install,v 1.38 2011/05/30 06:19:53 wiz Exp $
+.\"	$NetBSD: install,v 1.38.8.1 2012/11/01 16:44:45 matt Exp $
 .
 .Ss2 Open Firmware boot syntax
 .
@@ -650,6 +650,25 @@
 may have turned down the brightness of the backlight.
 Use the buttons to turn your brightness back up.
 .Pp
+Open Firmware 3.x and newer often won't setup the console if you don't
+drop to a prompt, and
+.Nx
+doesn't know how to setup the console itself.
+To get the system to boot when you have auto-boot? set to true, you
+can try this workaround.
+First, try one of the following commands:
+.sp
+.Dl setenv boot-command \*[q] screen\*[q] output boot
+.Dl setenv boot-command ." screen" output boot
+.Dl setenv boot-command ." Booting NetBSD..." cr \*[q] screen\*[q] output boot
+.sp
+You should follow the command with:
+.sp
+.Dl reset-all
+.sp
+This will cause Open Firmware to output some text to the screen prior
+to booting, thus forcing it to setup the console.
+.Pp
 Otherwise, you need a serial console.
 See the section entitled
 .Sx "Open Firmware 1 and 2 System Preparation"
--- a/distrib/sets/lists/base/ad.mips64eb	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/base/ad.mips64eb	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.82.2.4 2012/08/13 20:19:24 riz Exp $
+# $NetBSD: ad.mips64eb,v 1.82.2.4.2.1 2012/11/01 16:44:45 matt Exp $
 ./libexec/ld.elf_so-64				base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32				base-sysutil-bin	compat,pic
 ./usr/lib/64					base-compat-lib
@@ -73,6 +73,8 @@
 ./usr/lib/64/libcrypt.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libcrypto.so.8			base-compat-shlib	compat,pic,crypto
 ./usr/lib/64/libcrypto.so.8.0			base-compat-shlib	compat,pic,crypto
+./usr/lib/64/libcrypto_rc5.so.7			base-compat-shlib	compat,pic,crypto,crypto_rc5
+./usr/lib/64/libcrypto_rc5.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/64/libcurses.so.7			base-compat-shlib	compat,pic
 ./usr/lib/64/libcurses.so.7.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libdes.so.8			base-compat-shlib	compat,pic,crypto
--- a/distrib/sets/lists/base/ad.mips64el	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/base/ad.mips64el	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.81.2.4 2012/08/13 20:19:24 riz Exp $
+# $NetBSD: ad.mips64el,v 1.81.2.4.2.1 2012/11/01 16:44:45 matt Exp $
 ./libexec/ld.elf_so-64				base-compat-shlib	compat,pic
 ./libexec/ld.elf_so-o32				base-sysutil-bin	compat,pic
 ./usr/lib/64					base-compat-lib
@@ -73,6 +73,8 @@
 ./usr/lib/64/libcrypt.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libcrypto.so.8			base-compat-shlib	compat,pic,crypto
 ./usr/lib/64/libcrypto.so.8.0			base-compat-shlib	compat,pic,crypto
+./usr/lib/64/libcrypto_rc5.so.7			base-compat-shlib	compat,pic,crypto,crypto_rc5
+./usr/lib/64/libcrypto_rc5.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/64/libcurses.so.7			base-compat-shlib	compat,pic
 ./usr/lib/64/libcurses.so.7.0			base-compat-shlib	compat,pic
 ./usr/lib/64/libdes.so.8			base-compat-shlib	compat,pic,crypto
--- a/distrib/sets/lists/base/md.amd64	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/base/md.amd64	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.156.2.4 2012/08/13 20:19:23 riz Exp $
+# $NetBSD: md.amd64,v 1.156.2.4.2.1 2012/11/01 16:44:46 matt Exp $
 ./dev/lms0					base-obsolete		obsolete
 ./dev/mms0					base-obsolete		obsolete
 ./libexec/ld.elf_so-i386			base-sys-shlib		compat,pic
@@ -76,6 +76,8 @@
 ./usr/lib/i386/libcrypt.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/i386/libcrypto.so.8			base-compat-shlib	compat,pic
 ./usr/lib/i386/libcrypto.so.8.0			base-compat-shlib	compat,pic
+./usr/lib/i386/libcrypto_rc5.so.7		base-compat-shlib	compat,pic,crypto,crypto_rc5
+./usr/lib/i386/libcrypto_rc5.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/i386/libcurses.so.7			base-compat-shlib	compat,pic
 ./usr/lib/i386/libcurses.so.7.0			base-compat-shlib	compat,pic
 ./usr/lib/i386/libgmp.so.10			base-compat-shlib	obsolete
--- a/distrib/sets/lists/base/md.sparc64	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/base/md.sparc64	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.147.2.4 2012/08/13 20:19:24 riz Exp $
+# $NetBSD: md.sparc64,v 1.147.2.4.2.1 2012/11/01 16:44:46 matt Exp $
 ./libexec/ld.elf_so-sparc			base-sysutil-bin	compat,pic
 ./sbin/edlabel					base-sysutil-root	obsolete
 ./usr/bin/fdformat				base-util-bin
@@ -74,6 +74,8 @@
 ./usr/lib/sparc/libcrypt.so.1.0			base-compat-shlib	compat,pic
 ./usr/lib/sparc/libcrypto.so.8			base-compat-shlib	compat,pic,crypto
 ./usr/lib/sparc/libcrypto.so.8.0		base-compat-shlib	compat,pic,crypto
+./usr/lib/sparc/libcrypto_rc5.so.7		base-compat-shlib	compat,pic,crypto,crypto_rc5
+./usr/lib/sparc/libcrypto_rc5.so.7.0		base-compat-shlib	compat,pic,crypto,crypto_rc5
 ./usr/lib/sparc/libcurses.so.7			base-compat-shlib	compat,pic
 ./usr/lib/sparc/libcurses.so.7.0		base-compat-shlib	compat,pic
 ./usr/lib/sparc/libdes.so.8			base-compat-shlib	compat,pic,crypto
--- a/distrib/sets/lists/base/mi	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/base/mi	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.984.2.9 2012/08/19 17:43:20 riz Exp $
+# $NetBSD: mi,v 1.984.2.9.2.1 2012/11/01 16:44:46 matt Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -1659,6 +1659,11 @@
 ./usr/share/examples/lua/sqlite.lua		base-sys-examples	share
 ./usr/share/examples/mount_portal		base-miscfs-examples
 ./usr/share/examples/named			base-obsolete	obsolete
+./usr/share/examples/npf			base-netutil-examples
+./usr/share/examples/npf/host-npf.conf		base-netutil-examples
+./usr/share/examples/npf/soho_gw-npf.conf	base-netutil-examples
+./usr/share/examples/npf/hashtablefile		base-netutil-examples
+./usr/share/examples/npf/treetablefile		base-netutil-examples
 ./usr/share/examples/openssl			base-crypto-examples
 ./usr/share/examples/pf				base-netutil-examples
 ./usr/share/examples/postfix			base-postfix-examples
--- a/distrib/sets/lists/base/shl.mi	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/base/shl.mi	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.616.2.4 2012/08/13 20:19:23 riz Exp $
+# $NetBSD: shl.mi,v 1.616.2.4.2.1 2012/11/01 16:44:47 matt Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -184,6 +184,10 @@
 ./usr/lib/libcrypto.so				base-crypto-shlib	crypto
 ./usr/lib/libcrypto.so.8			base-crypto-shlib	crypto
 ./usr/lib/libcrypto.so.8.0			base-crypto-shlib	crypto
+./usr/lib/libcrypto_rc5.so			base-crypto-shlib	crypto,crypto_rc5
+./usr/lib/libcrypto_rc5.so.7			base-crypto-shlib	crypto,crypto_rc5
+./usr/lib/libcrypto_rc5.so.7.0			base-crypto-shlib	crypto,crypto_rc5
+./usr/lib/libcrypto_rc5_pic.a			base-crypto-shlib	crypto,crypto_rc5
 ./usr/lib/libctf.so				base-sys-shlib		dtrace
 ./usr/lib/libctf.so.2				base-sys-shlib		dtrace
 ./usr/lib/libctf.so.2.0				base-sys-shlib		dtrace
--- a/distrib/sets/lists/comp/ad.mips64eb	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/comp/ad.mips64eb	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64eb,v 1.69.2.4 2012/08/13 20:19:22 riz Exp $
+# $NetBSD: ad.mips64eb,v 1.69.2.4.2.1 2012/11/01 16:44:47 matt Exp $
 ./usr/bin/elf2aout				comp-obsolete		obsolete
 ./usr/bin/elf2ecoff				comp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
@@ -213,14 +213,17 @@
 ./usr/lib/64/libcrypt_pic.a			comp-c-piclib		compat,pic
 ./usr/lib/64/libcrypto.a			comp-c-lib		compat,crypto
 ./usr/lib/64/libcrypto.so			base-sys-shlib		compat,crypto,pic
-./usr/lib/64/libcrypto_idea.a			comp-c-lib		crypto_idea,compat
-./usr/lib/64/libcrypto_idea_p.a			comp-c-proflib		crypto_idea,compat,profile
-./usr/lib/64/libcrypto_mdc2.a			comp-c-lib		crypto_mdc2,compat
-./usr/lib/64/libcrypto_mdc2_p.a			comp-c-proflib		crypto_mdc2,compat,profile
+./usr/lib/64/libcrypto_idea.a			comp-obsolete		obsolete
+./usr/lib/64/libcrypto_idea_p.a			comp-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2.a			comp-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2_p.a			comp-obsolete		obsolete
 ./usr/lib/64/libcrypto_p.a			comp-c-proflib		compat,crypto,profile
 ./usr/lib/64/libcrypto_pic.a			comp-c-piclib		compat,crypto,pic
 ./usr/lib/64/libcrypto_rc5.a			comp-c-lib		crypto_rc5,compat
+./usr/lib/64/libcrypto_rc5.so			base-sys-shlib		compat,crypto,crypto_rc5,pic
+./usr/lib/64/libcrypto_rc5_g.a			comp-c-proflib		compat,crypto,crypto_rc5,debuglib
 ./usr/lib/64/libcrypto_rc5_p.a			comp-c-proflib		crypto_rc5,compat,profile
+./usr/lib/64/libcrypto_rc5_pic.a		comp-c-piclib		compat,crypto,crypto_rc5,pic
 ./usr/lib/64/libcurses.a			comp-c-lib		compat
 ./usr/lib/64/libcurses.so			base-sys-shlib		compat,pic
 ./usr/lib/64/libcurses_p.a			comp-c-proflib		compat,profile
--- a/distrib/sets/lists/comp/ad.mips64el	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/comp/ad.mips64el	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ad.mips64el,v 1.69.2.5 2012/08/13 20:19:21 riz Exp $
+# $NetBSD: ad.mips64el,v 1.69.2.5.2.1 2012/11/01 16:44:47 matt Exp $
 ./usr/bin/elf2aout				comp-obsolete		obsolete
 ./usr/bin/elf2ecoff				comp-sysutil-bin
 ./usr/include/gcc-4.5/loongson.h		comp-c-include		gcccmds,gcc=45
@@ -213,14 +213,17 @@
 ./usr/lib/64/libcrypt_pic.a			comp-c-piclib		compat,pic
 ./usr/lib/64/libcrypto.a			comp-c-lib		compat,crypto
 ./usr/lib/64/libcrypto.so			base-sys-shlib		compat,crypto,pic
-./usr/lib/64/libcrypto_idea.a			comp-c-lib		crypto_idea,compat
-./usr/lib/64/libcrypto_idea_p.a			comp-c-proflib		crypto_idea,compat,profile
-./usr/lib/64/libcrypto_mdc2.a			comp-c-lib		crypto_mdc2,compat
-./usr/lib/64/libcrypto_mdc2_p.a			comp-c-proflib		crypto_mdc2,compat,profile
+./usr/lib/64/libcrypto_idea.a			comp-obsolete		obsolete
+./usr/lib/64/libcrypto_idea_p.a			comp-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2.a			comp-obsolete		obsolete
+./usr/lib/64/libcrypto_mdc2_p.a			comp-obsolete		obsolete
 ./usr/lib/64/libcrypto_p.a			comp-c-proflib		compat,crypto,profile
 ./usr/lib/64/libcrypto_pic.a			comp-c-piclib		compat,crypto,pic
 ./usr/lib/64/libcrypto_rc5.a			comp-c-lib		crypto_rc5,compat
+./usr/lib/64/libcrypto_rc5.so			base-sys-shlib		compat,crypto,crypto_rc5,pic
+./usr/lib/64/libcrypto_rc5_g.a			comp-c-proflib		compat,crypto,crypto_rc5,debuglib
 ./usr/lib/64/libcrypto_rc5_p.a			comp-c-proflib		crypto_rc5,compat,profile
+./usr/lib/64/libcrypto_rc5_pic.a		comp-c-piclib		compat,crypto,crypto_rc5,pic
 ./usr/lib/64/libcurses.a			comp-c-lib		compat
 ./usr/lib/64/libcurses.so			base-sys-shlib		compat,pic
 ./usr/lib/64/libcurses_p.a			comp-c-proflib		compat,profile
--- a/distrib/sets/lists/comp/md.amd64	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/comp/md.amd64	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.amd64,v 1.155.2.4 2012/08/13 20:19:23 riz Exp $
+# $NetBSD: md.amd64,v 1.155.2.4.2.1 2012/11/01 16:44:47 matt Exp $
 ./usr/include/amd64				comp-c-include
 ./usr/include/amd64/ansi.h			comp-c-include
 ./usr/include/amd64/aout_machdep.h		comp-c-include
@@ -479,14 +479,17 @@
 ./usr/lib/i386/libcrypto.a			comp-c-lib		compat
 ./usr/lib/i386/libcrypto.so			comp-sys-shlib		compat,pic
 ./usr/lib/i386/libcrypto_g.a			comp-c-proflib		compat,debuglib
-./usr/lib/i386/libcrypto_idea.a			comp-c-lib		crypto_idea,compat
-./usr/lib/i386/libcrypto_idea_p.a		comp-c-proflib		crypto_idea,compat,profile
-./usr/lib/i386/libcrypto_mdc2.a			comp-c-lib		crypto_mdc2,compat
-./usr/lib/i386/libcrypto_mdc2_p.a		comp-c-proflib		crypto_mdc2,compat,profile
+./usr/lib/i386/libcrypto_idea.a			comp-obsolete		obsolete
+./usr/lib/i386/libcrypto_idea_p.a		comp-obsolete		obsolete
+./usr/lib/i386/libcrypto_mdc2.a			comp-obsolete		obsolete
+./usr/lib/i386/libcrypto_mdc2_p.a		comp-obsolete		obsolete
 ./usr/lib/i386/libcrypto_p.a			comp-c-proflib		compat,profile
 ./usr/lib/i386/libcrypto_pic.a			comp-c-piclib		compat,pic
 ./usr/lib/i386/libcrypto_rc5.a			comp-c-lib		crypto_rc5,compat
+./usr/lib/i386/libcrypto_rc5.so			base-sys-shlib		compat,crypto,crypto_rc5,pic
+./usr/lib/i386/libcrypto_rc5_g.a		comp-c-proflib		compat,crypto,crypto_rc5,debuglib
 ./usr/lib/i386/libcrypto_rc5_p.a		comp-c-proflib		crypto_rc5,compat,profile
+./usr/lib/i386/libcrypto_rc5_pic.a		comp-c-piclib		compat,crypto,crypto_rc5,pic
 ./usr/lib/i386/libcurses.a			comp-c-lib		compat
 ./usr/lib/i386/libcurses.so			comp-sys-shlib		compat,pic
 ./usr/lib/i386/libcurses_g.a			comp-c-proflib		compat,debuglib
--- a/distrib/sets/lists/comp/md.sparc64	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/comp/md.sparc64	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: md.sparc64,v 1.138.2.4 2012/08/13 20:19:22 riz Exp $
+# $NetBSD: md.sparc64,v 1.138.2.4.2.1 2012/11/01 16:44:48 matt Exp $
 ./usr/include/gcc-4.5/tgmath.h			comp-c-include		gcccmds,gcc=45
 ./usr/include/ieeefp.h				comp-c-include
 ./usr/include/sparc				comp-c-include
@@ -326,17 +326,19 @@
 ./usr/lib/sparc/libcrypto.a			comp-c-lib		compat,crypto
 ./usr/lib/sparc/libcrypto.so			base-sys-shlib		compat,pic,crypto
 ./usr/lib/sparc/libcrypto_g.a			-unknown-		compat,debuglib,crypto
-./usr/lib/sparc/libcrypto_idea.a		comp-c-lib		crypto_idea,compat
-./usr/lib/sparc/libcrypto_idea_g.a		-unknown-		crypto_idea,compat,debuglib
-./usr/lib/sparc/libcrypto_idea_p.a		comp-c-proflib		crypto_idea,compat,profile
-./usr/lib/sparc/libcrypto_mdc2.a		comp-c-lib		crypto_mdc2,compat
-./usr/lib/sparc/libcrypto_mdc2_g.a		-unknown-		crypto_mdc2,compat,debuglib
-./usr/lib/sparc/libcrypto_mdc2_p.a		comp-c-proflib		crypto_mdc2,compat,profile
+./usr/lib/sparc/libcrypto_idea.a		comp-obsolete		obsolete
+./usr/lib/sparc/libcrypto_idea_g.a		comp-obsolete		obsolete
+./usr/lib/sparc/libcrypto_idea_p.a		comp-obsolete		obsolete
+./usr/lib/sparc/libcrypto_mdc2.a		comp-obsolete		obsolete
+./usr/lib/sparc/libcrypto_mdc2_g.a		comp-obsolete		obsolete
+./usr/lib/sparc/libcrypto_mdc2_p.a		comp-obsolete		obsolete
 ./usr/lib/sparc/libcrypto_p.a			comp-c-proflib		compat,profile,crypto
 ./usr/lib/sparc/libcrypto_pic.a			comp-c-piclib		compat,pic,crypto
 ./usr/lib/sparc/libcrypto_rc5.a			comp-c-lib		crypto_rc5,compat
+./usr/lib/sparc/libcrypto_rc5.so		base-sys-shlib		compat,crypto,crypto_rc5,pic
 ./usr/lib/sparc/libcrypto_rc5_g.a		-unknown-		crypto_rc5,compat,debuglib
 ./usr/lib/sparc/libcrypto_rc5_p.a		comp-c-proflib		crypto_rc5,compat,profile
+./usr/lib/sparc/libcrypto_rc5_pic.a		comp-c-piclib		compat,crypto,crypto_rc5,pic
 ./usr/lib/sparc/libcurses.a			comp-c-lib		compat
 ./usr/lib/sparc/libcurses.so			base-sys-shlib		compat,pic
 ./usr/lib/sparc/libcurses_g.a			-unknown-		compat,debuglib
--- a/distrib/sets/lists/comp/mi	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/comp/mi	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.1738.2.6 2012/08/13 20:19:20 riz Exp $
+#	$NetBSD: mi,v 1.1738.2.6.2.1 2012/11/01 16:44:48 matt Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -2765,12 +2765,12 @@
 ./usr/lib/libcrypt_p.a				comp-c-proflib		profile
 ./usr/lib/libcrypto.a				comp-c-lib		crypto
 ./usr/lib/libcrypto_g.a				-unknown-		debuglib,crypto
-./usr/lib/libcrypto_idea.a			comp-c-lib		crypto_idea
-./usr/lib/libcrypto_idea_g.a			-unknown-		debuglib,crypto_idea
-./usr/lib/libcrypto_idea_p.a			comp-c-proflib		profile,crypto_idea
-./usr/lib/libcrypto_mdc2.a			comp-c-lib		crypto_mdc2
-./usr/lib/libcrypto_mdc2_g.a			-unknown-		debuglib,crypto_mdc2
-./usr/lib/libcrypto_mdc2_p.a			comp-c-proflib		profile,crypto_mdc2
+./usr/lib/libcrypto_idea.a			comp-obsolete		obsolete
+./usr/lib/libcrypto_idea_g.a			comp-obsolete		obsolete
+./usr/lib/libcrypto_idea_p.a			comp-obsolete		obsolete
+./usr/lib/libcrypto_mdc2.a			comp-obsolete		obsolete
+./usr/lib/libcrypto_mdc2_g.a			comp-obsolete		obsolete
+./usr/lib/libcrypto_mdc2_p.a			comp-obsolete		obsolete
 ./usr/lib/libcrypto_p.a				comp-c-proflib		profile,crypto
 ./usr/lib/libcrypto_rc5.a			comp-c-lib		crypto_rc5
 ./usr/lib/libcrypto_rc5_g.a			-unknown-		debuglib,crypto_rc5
@@ -4354,8 +4354,8 @@
 ./usr/libdata/lint/llib-lcompat.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lcrypt.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-lcrypto.ln		comp-c-lintlib		lint,crypto
-./usr/libdata/lint/llib-lcrypto_idea.ln		comp-c-lintlib		lint,crypto_idea
-./usr/libdata/lint/llib-lcrypto_mdc2.ln		comp-c-lintlib		lint,crypto_mdc2
+./usr/libdata/lint/llib-lcrypto_idea.ln		comp-obsolete		obsolete
+./usr/libdata/lint/llib-lcrypto_mdc2.ln		comp-obsolete		obsolete
 ./usr/libdata/lint/llib-lcrypto_rc5.ln		comp-c-lintlib		lint,crypto_rc5
 ./usr/libdata/lint/llib-lcurses.ln		comp-c-lintlib		lint
 ./usr/libdata/lint/llib-ldes.ln			comp-c-lintlib		lint,crypto
--- a/distrib/sets/lists/comp/shl.mi	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/comp/shl.mi	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.209.2.4 2012/08/13 20:19:22 riz Exp $
+# $NetBSD: shl.mi,v 1.209.2.4.2.1 2012/11/01 16:44:51 matt Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -253,6 +253,7 @@
 ./usr/libdata/debug/usr/lib/libcom_err.so.7.0.debug	comp-krb5-debug	kerberos,debug
 ./usr/libdata/debug/usr/lib/libcrypt.so.1.0.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libcrypto.so.8.0.debug	comp-crypto-debug	crypto,debug
+./usr/libdata/debug/usr/lib/libcrypto_rc5.so.7.0.debug	comp-crypto-debug	crypto,crypto_rc5,debug
 ./usr/libdata/debug/usr/lib/libctf.so.2.0.debug		comp-sys-debug	dtrace,debug
 ./usr/libdata/debug/usr/lib/libcurses.so.7.0.debug	comp-sys-debug	debug
 ./usr/libdata/debug/usr/lib/libdes.so.8.1.debug		comp-crypto-debug	crypto,debug
--- a/distrib/sets/lists/tests/mi	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/lists/tests/mi	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.439.2.2 2012/06/23 22:54:59 riz Exp $
+# $NetBSD: mi,v 1.439.2.2.2.1 2012/11/01 16:44:51 matt Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -195,13 +195,13 @@
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_enginetest.debug	tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_evp_test.debug	tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_exptest.debug		tests-crypto-debug	debug,crypto
-./usr/libdata/debug/usr/tests/crypto/libcrypto/h_ideatest.debug		tests-crypto-debug	debug,crypto_idea,crypto
+./usr/libdata/debug/usr/tests/crypto/libcrypto/h_ideatest.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_hmactest.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_lhashtest.debug	tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_md2test.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_md4test.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_md5test.debug		tests-crypto-debug	debug,crypto
-./usr/libdata/debug/usr/tests/crypto/libcrypto/h_mdc2test.debug		tests-crypto-debug	debug,crypto_mdc2,crypto
+./usr/libdata/debug/usr/tests/crypto/libcrypto/h_mdc2test.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_randtest.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_rc2test.debug		tests-crypto-debug	debug,crypto
 ./usr/libdata/debug/usr/tests/crypto/libcrypto/h_rc4test.debug		tests-crypto-debug	debug,crypto
@@ -1367,12 +1367,12 @@
 ./usr/tests/crypto/libcrypto/evptests.txt	tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_exptest		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_hmactest		tests-crypto-tests	crypto
-./usr/tests/crypto/libcrypto/h_ideatest		tests-crypto-tests	crypto_idea,crypto
+./usr/tests/crypto/libcrypto/h_ideatest		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_lhashtest	tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_md2test		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_md4test		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_md5test		tests-crypto-tests	crypto
-./usr/tests/crypto/libcrypto/h_mdc2test		tests-crypto-tests	crypto_mdc2,crypto
+./usr/tests/crypto/libcrypto/h_mdc2test		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_randtest		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_rc2test		tests-crypto-tests	crypto
 ./usr/tests/crypto/libcrypto/h_rc4test		tests-crypto-tests	crypto
--- a/distrib/sets/sets.subr	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/sets/sets.subr	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: sets.subr,v 1.135.2.1 2012/02/17 00:08:37 riz Exp $
+#	$NetBSD: sets.subr,v 1.135.2.1.2.1 2012/11/01 16:44:45 matt Exp $
 #
 
 #
@@ -172,7 +172,7 @@
 # In each file, a record consists of a path and a System Package name,
 # separated by whitespace. E.g.,
 #
-# 	# $NetBSD: sets.subr,v 1.135.2.1 2012/02/17 00:08:37 riz Exp $
+# 	# $NetBSD: sets.subr,v 1.135.2.1.2.1 2012/11/01 16:44:45 matt Exp $
 # 	.			base-sys-root	[keyword[,...]]
 # 	./altroot		base-sys-root
 # 	./bin			base-sys-root
@@ -199,8 +199,6 @@
 #	catpages		${MKCATPAGES} != no
 #	compat			${MKCOMPAT} != no
 #	crypto			${MKCRYPTO} != no
-#	crypto_idea		${MKCRYPTO_IDEA} != no
-#	crypto_mdc2		${MKCRYPTO_MDC2} != no
 #	crypto_rc5		${MKCRYPTO_RC5} != no
 #	cvs			${MKCVS} != no
 #	debug			${MKDEBUG} != no
--- a/distrib/utils/sysinst/msg.mi.de	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.de	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.61.2.2 2012/07/05 17:29:15 riz Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.61.2.2.2.1 2012/11/01 16:44:52 matt Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -955,6 +955,7 @@
 message Re_install_sets_or_install_additional_sets {Erneute Installation oder zusätzliche Pakete installieren}
 message Reboot_the_computer {Computer neu starten}
 message Utility_menu {Extras}
+message Config_menu {Konfigurationsmenü}
 message exit_utility_menu {Zurück zum Hauptmenü}
 message NetBSD_VERSION_Utilities {NetBSD-@@VERSION@@ Extras}
 message Run_bin_sh {Ausführen von /bin/sh}
--- a/distrib/utils/sysinst/msg.mi.en	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.en	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.169.2.2 2012/07/05 17:29:15 riz Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.169.2.2.2.1 2012/11/01 16:44:52 matt Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -895,6 +895,7 @@
 message Re_install_sets_or_install_additional_sets {Re-install sets or install additional sets}
 message Reboot_the_computer {Reboot the computer}
 message Utility_menu {Utility menu}
+message Config_menu {Config menu}
 message exit_utility_menu {Back to main menu}
 message NetBSD_VERSION_Utilities {NetBSD-@@VERSION@@ Utilities}
 message Run_bin_sh {Run /bin/sh}
--- a/distrib/utils/sysinst/msg.mi.es	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.es	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.es,v 1.39.2.2 2012/07/05 17:29:16 riz Exp $	*/
+/*	$NetBSD: msg.mi.es,v 1.39.2.2.2.1 2012/11/01 16:44:52 matt Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -125,7 +125,7 @@
 }
 
 message mount_failed
-{Mounting %s failed. Continue?
+{No se ha podido montar %s.  ¿Desea continuar?
 }
 
 message nodisk
@@ -703,8 +703,9 @@
 }
 
 message badfs
-{Parece que /dev/%s%c no es un sistema de archivos BSD o el fsck no ha sido
-correcto.  ¿Continuar?  (Error número %d.)
+{Parece ser que /dev/%s%c no es un sistema de archivos BSD o bien el
+fsck ha fallado.  ¿Desea montarlo de todos modos?  (Código de error:
+%d.)
 }
 
 message rootmissing
@@ -920,6 +921,7 @@
 message Re_install_sets_or_install_additional_sets {Reinstalar conjuntos o instalar conjuntos adicionales}
 message Reboot_the_computer {Reiniciar la computadora}
 message Utility_menu {Menú de utilidades}
+message Config_menu {Menu de configuración}
 message exit_utility_menu {Exit}
 message NetBSD_VERSION_Utilities {Utilidades de NetBSD-@@VERSION@@}
 message Run_bin_sh {Ejecutar /bin/sh}
@@ -1011,63 +1013,74 @@
 de correo electrónico se envíen correctamente.}
 
 message license
-{To use the network interface %s, you must agree to the license in
-file %s.
-To view this file now, you can type ^Z, look at the contents of
-the file and then type "fg" to resume.}
+{Para usar la interfaz de red %s, debe de aceptar la licencia en el archivo %s.
+Para ver este archivo ahora, pulse ^Z, mire el contendido del archivo, y luego
+teclee "fg" para continuar la instalación.}
 
 message binpkg
-{To configure the binary package system, please choose the network location
-to fetch packages from.  Once your system comes up, you can use 'pkgin'
-to install additional packages, or remove packages.}
-
+{Para configurar el sistema de paquetes binários, por favor escoja el
+sitio de red desde el cual descargar los paquetes.  Una vez el sistema
+arranque, puede usar 'pkgin' para instalar paquetes adicionales, o
+eliminar paquetes ya instalados.}
+	
 message pkgpath
-{The following are the protocol, host, directory, user, and password that
-will be used.  If "user" is "ftp", then the password is not needed.
+{Las siguientes entradas representan el protocolo, la máquina, el
+directorio, el usuario y la contraseña que se usarán.  Si el "usuario"
+es "ftp", entonces la contraseña es opcional.
 
 }
-message rcconf_backup_failed {Making backup of rc.conf failed. Continue?}
-message rcconf_backup_succeeded {rc.conf backup saved to %s.}
-message rcconf_restore_failed {Restoring backup rc.conf failed.}
-message rcconf_delete_failed {Deleting old %s entry failed.}
-message Pkg_dir {Package directory}
+message rcconf_backup_failed
+{Error al intentar hacer una cópia de seguridad de rc.conf.  ¿Desea continuar?}
+message rcconf_backup_succeeded
+{La cópia de seguridad de rc.conf se ha guardado en %s.}
+message rcconf_restore_failed
+{La recuperación de rc.conf desde su cópia de seguridad ha fallado.}
+message rcconf_delete_failed {La eliminación del viejo %s ha fallado.}
+message Pkg_dir {Directorio del paquete}
 message configure_prior {configure a prior installation of}
-message configure {configure}
-message change {change}
-message password_set {password set}
-message YES {YES}
+message configure {Configurar}
+message change {Cambiar}
+message password_set {Contraseña configurada}
+message YES {SI}
 message NO {NO}
-message DONE {DONE}
-message abandoned {Abandoned}
-message empty {***EMPTY***}
-message timezone {Timezone}
-message change_rootpw {Change root password}
-message enable_binpkg {Enable installation of binary packages}
-message enable_sshd {Enable sshd}
-message enable_ntpd {Enable ntpd}
-message run_ntpdate {Run ntpdate at boot}
-message enable_mdnsd {Enable mdnsd}
-message configmenu {Configure the additional items as needed.}
-message doneconfig {Finished configuring}
-message Install_pkgin {Install pkgin and update package summary}
+message DONE {HECHO}
+message abandoned {Abandonado}
+message empty {***VACÍO***}
+message timezone {Zona horaria}
+message change_rootpw {Cambiar la contraseña de root}
+message enable_binpkg {Activar la instalación de paquetes binarios}
+message enable_sshd {Activar sshd}
+message enable_ntpd {Activar ntpd}
+message run_ntpdate {Ejecutar ntpdate durante el arranque}
+message enable_mdnsd {Activar mdnsd}
+message configmenu {Configurar elementos adicionales bajo demanda.}
+message doneconfig {Terminar configuración}
+message Install_pkgin {Instalar pkgin y actualizar la lista de paquetes}
 message binpkg_installed 
-{You are now configured to use pkgin to install binary packages.  To
-install a package, run:
+{El sistema se ha configurado para usar pkgin para instalar paquetes
+binarios.  Para instalar un paquete, ejecute:
 
-pkgin install <packagename>
+pkgin install <nombre_del_paquete>
 
-from a root shell.  Read the pkgin(1) manual page for further information.}
-message Install_pkgsrc {Fetch and unpack pkgsrc}
+desde una línea de comandos de root.  Lea la página de manual pkgin(1)
+para más detalles.}
+message Install_pkgsrc {Descargar y desempaquetar pkgsrc}
 message pkgsrc
-{Installing pkgsrc requires unpacking an archive retrieved over the network.
-The following are the host, directory, user, and password that
-will be used.  If "user" is "ftp", then the password is not needed.
+{La instalación de pkgsrc necesita desempaquetar un archivo descargado
+desde la red.
+Las siguientes entradas corresponden a la máquina, directorio, usuario
+y contraseña a usar para la conexión.  Si "usuario" es "ftp", entonces
+la contraseña es opcional.
 
 }
-message Pkgsrc_dir {pkgsrc directory}
-message get_pkgsrc {Fetch and unpack pkgsrc for building from source}
-message retry_pkgsrc_network {Network configuration failed.  Retry?}
-message quit_pkgsrc {Quit without installing pkgsrc}
+message Pkgsrc_dir {Directorio de pkgsrc}
+message get_pkgsrc
+{Descargar y desempaquetar pkgsrc para compilar desde código fuente}
+message retry_pkgsrc_network
+{La configuración de la red ha fallado.  ¿Reintentar?}
+message quit_pkgsrc {Salir sin instalar pkgsrc}
 message pkgin_failed 
-{Installation of pkgin failed, possibly because no binary packages  exist.  Please check the package path and try again.}
-message failed {Failed}
+{La instalación de pkgin ha fallado, posiblemente porque no existen
+paquetes binarios.  Por favor verifique el camino a los paquetes y
+reinténtelo de nuevo.}
+message failed {Error}
--- a/distrib/utils/sysinst/msg.mi.fr	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.fr	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.119.2.2 2012/07/05 17:29:15 riz Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.119.2.2.2.1 2012/11/01 16:44:52 matt Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -993,6 +993,7 @@
 message Re_install_sets_or_install_additional_sets {Réinstaller ou installer de nouveaux composants}
 message Reboot_the_computer {Redémarrer l'ordinateur}
 message Utility_menu {Utilitaires}
+message Config_menu {Configuration}
 message exit_utility_menu {Quitter}
 message NetBSD_VERSION_Utilities {Utilitaires NetBSD-@@VERSION@@}
 message Run_bin_sh {Exécuter /bin/sh}
--- a/distrib/utils/sysinst/msg.mi.pl	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/utils/sysinst/msg.mi.pl	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.pl,v 1.78.2.2 2012/07/05 17:29:15 riz Exp $	*/
+/*	$NetBSD: msg.mi.pl,v 1.78.2.2.2.1 2012/11/01 16:44:52 matt Exp $	*/
 /*	Based on english version: */
 /*	NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp       */
 
@@ -72,6 +72,9 @@
 message upgrade
 {zaktualizowac}
 
+message mount_failed
+{Montowanie %s nie powiodlo sie. Kontynuowac?
+}
 
 message hello
 {Witaj w sysinst, systemie instalacyjnym NetBSD-@@VERSION@@.
@@ -121,11 +124,6 @@
 twoich dyskach.)
 }
 
-message mount_failed
-{Mounting %s failed. Continue?
-}
-/* XXX: Translate. */
-
 message nodisk
 {Nie moge znalezc zadnych twardych dyskow do uzycia z NetBSD. Zostaniesz
 przeniesiony do menu glownego.
@@ -684,9 +682,9 @@
 * +not successful (Error number %d.). Try mounting it anyway?
 */
 message badfs
-{Wyglada na to, ze /dev/%s%c nie jest systemem plikow BSD albo nie powiodlo sie
-jego sprawdzenie. Aktualizacja zostala przerwana. (Blad numer %d.)
-}
+{Wyglada na to, ze /dev/%s%c nie jest systemem plikow BSD ewentualnie
+fsck dysku nie powiodlo sie. Zamontowac dysk pomimo tego? (Numer
+bledu %d.)}
 
 message rootmissing
 { docelowy / jest zagubiony %s.
@@ -894,6 +892,7 @@
 message Re_install_sets_or_install_additional_sets {Przeinstaluj albo zainstaluj dodatkowe pakiety}
 message Reboot_the_computer {Zrestartuj komputer}
 message Utility_menu {Menu Narzedziowe}
+message Config_menu {Menu konfiguracji}
 message exit_utility_menu {Exit}
 message NetBSD_VERSION_Utilities {Narzedzia NetBSD-@@VERSION@@}
 message Run_bin_sh {Uruchom /bin/sh}
@@ -977,57 +976,66 @@
 a nastepnie wpisac "fg".}
 
 message binpkg
-{To configure the binary package system, please choose the network location
-to fetch packages from.  Once your system comes up, you can use 'pkgin'
-to install additional packages, or remove packages.}
+{Aby skonfigurowac binarny system pakietow, wybierz lokalizacje siecowa, z
+ktorej nalezy pobrac pakiety. Gdy system wstanie, mozesz wykorzystac 'pkgin' do
+zainstalowania albo odinstalowania dodatkowych pakietow.}
 
 message pkgpath
-{The following are the protocol, host, directory, user, and password that
-will be used.  If "user" is "ftp", then the password is not needed.
+{Ponizej wyszczegolniono protokol, hosta, katalog, nazwe uzytkownika oraz haslo,
+ktore beda wykorzystane do nawiazania polaczenia. Haslo nie jest wymagane gdy
+nazwa uzytkownika to "ftp".
 
 }
-message rcconf_backup_failed {Making backup of rc.conf failed. Continue?}
-message rcconf_backup_succeeded {rc.conf backup saved to %s.}
-message rcconf_restore_failed {Restoring backup rc.conf failed.}
-message rcconf_delete_failed {Deleting old %s entry failed.}
-message Pkg_dir {Package directory}
-message configure_prior {configure a prior installation of}
-message configure {configure}
-message change {change}
-message password_set {password set}
-message YES {YES}
-message NO {NO}
-message DONE {DONE}
-message abandoned {Abandoned}
-message empty {***EMPTY***}
-message timezone {Timezone}
-message change_rootpw {Change root password}
-message enable_binpkg {Enable installation of binary packages}
-message enable_sshd {Enable sshd}
-message enable_ntpd {Enable ntpd}
-message run_ntpdate {Run ntpdate at boot}
-message enable_mdnsd {Enable mdnsd}
-message configmenu {Configure the additional items as needed.}
-message doneconfig {Finished configuring}
-message Install_pkgin {Install pkgin and update package summary}
+message rcconf_backup_failed {Stworzenie kopii zapasowej rc.conf nie powiodlo
+sie. Kontynuowac?}
+message rcconf_backup_succeeded {Kopia zapasowa rc.conf zostala zapisana do %s.}
+message rcconf_restore_failed {Przywracania kopii zapasowej rc.conf nie powiodlo
+sie.}
+message rcconf_delete_failed {Usuwanie starego wpisu %s nie powiodlo sie.}
+message Pkg_dir {Katalog z pakietami}
+message configure_prior {skonfiguruj przed instalacja}
+message configure {skonfiguruj}
+message change {zmien}
+message password_set {ustawiono haslo}
+message YES {TAK}
+message NO {NIE}
+message DONE {ZAKONCZ}
+message abandoned {Porzucony}
+message empty {***PUSTE***}
+message timezone {Strefa czasowa}
+message change_rootpw {Zmien haslo root'a}
+message enable_binpkg {Wlacz instalacje pakietow binarnych}
+message enable_sshd {Wlacz sshd}
+message enable_ntpd {Wlacz ntpd}
+message run_ntpdate {uruchom ntpdate podczas startu systemu}
+message enable_mdnsd {Wlacz mdnsd}
+message configmenu {Skonfiguruj dodatkowe elementy w razie potrzeby.}
+message doneconfig {Konfiguracja zakonczona}
+message Install_pkgin {Zainstaluj pkgin i uaktualnij podsumowanie pakietow}
 message binpkg_installed 
-{You are now configured to use pkgin to install binary packages.  To
-install a package, run:
+{Skonfigurowales system tak aby wykorzystywal pkgin do instalacji pakietow
+binarnych. Aby zainstalowac pakiet, wykonaj:
 
 pkgin install <packagename>
 
-from a root shell.  Read the pkgin(1) manual page for further information.}
-message Install_pkgsrc {Fetch and unpack pkgsrc}
+z powloki root'a. Jesli potrzebujesz wiecej informacji przeczytaj strone
+podrecznika pkgin(1).}
+message Install_pkgsrc {Pobierz i rozpakuj pkgsrc}
 message pkgsrc
-{Installing pkgsrc requires unpacking an archive retrieved over the network.
-The following are the host, directory, user, and password that
-will be used.  If "user" is "ftp", then the password is not needed.
+{Instalacja pkgsrc wymaga rozpakowania archiwum pobranego z sieci.
+Ponizej wyszczegolniono protokol, hosta, katalog, nazwe uzytkownika oraz haslo,
+ktore beda wykorzystane do nawiazania polaczenia. Haslo nie jest wymagane gdy
+nazwa uzytkownika to "ftp".
 
 }
-message Pkgsrc_dir {pkgsrc directory}
-message get_pkgsrc {Fetch and unpack pkgsrc for building from source}
-message retry_pkgsrc_network {Network configuration failed.  Retry?}
-message quit_pkgsrc {Quit without installing pkgsrc}
+message Pkgsrc_dir {katalog pkgsrc}
+message get_pkgsrc {Pobierz i rozpakuj pkgsrc w celu tworzenia pakietow ze
+zrodel}
+message retry_pkgsrc_network {Konfiguracja sieci nie powiodla sie. Sprobowac
+ponownie?}
+message quit_pkgsrc {Zakoncz bez zainstalowania pkgsrc}
 message pkgin_failed 
-{Installation of pkgin failed, possibly because no binary packages  exist.  Please check the package path and try again.}
-message failed {Failed}
+{Instalacja pkgin nie powiodla sie, prawdopodobnie dlatego ze nie znaleziono 
+pakietow binarnych.
+Sprawdz sciezke pakietow i sprobuj ponownie.}
+message failed {Nie powiodlo sie}
--- a/distrib/utils/sysinst/net.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/distrib/utils/sysinst/net.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: net.c,v 1.130.2.1 2012/05/17 18:57:11 sborrill Exp $	*/
+/*	$NetBSD: net.c,v 1.130.2.1.2.1 2012/11/01 16:44:52 matt Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -435,9 +435,9 @@
 
 	strlcpy(recombined, net_host, sizeof(recombined));
 
-	if (l <= 0 ||
+	if (strlen(net_domain) != 0 && (l <= 0 ||
 	    net_host[l - 1] != '.' ||
-	    strcasecmp(net_domain, net_host + l) != 0) {
+	    strcasecmp(net_domain, net_host + l) != 0)) {
 		/* net_host isn't an FQDN. */
 		strlcat(recombined, ".", sizeof(recombined));
 		strlcat(recombined, net_domain, sizeof(recombined));
--- a/doc/3RDPARTY	Tue Aug 21 05:36:23 2012 +0000
+++ b/doc/3RDPARTY	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.909.2.13 2012/08/13 20:19:20 riz Exp $
+#	$NetBSD: 3RDPARTY,v 1.909.2.13.2.1 2012/11/01 16:44:53 matt Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -1143,8 +1143,8 @@
 Added changes from a5 -> a12 manually.
 
 Package:	tz
-Version:	tzcode2011i / tzdata2012e
-Current Vers:	tzcode2012e / tzdata2012e
+Version:	tzcode2011i / tzdata2012f
+Current Vers:	tzcode2012f / tzdata2012f
 Maintainer:	Arthur David Olson <ado@elsie.nci.nih.gov>
 Maintainer:	Robert Elz <kre@munnari.oz.au>
 Archive Site:	ftp://elsie.nci.nih.gov/pub/
--- a/doc/CHANGES	Tue Aug 21 05:36:23 2012 +0000
+++ b/doc/CHANGES	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1670.2.8 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.1670.2.8.2.1 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -70,7 +70,7 @@
 	ddb(4): Add 'show vmem' and 'show all vmems' commands.
 		[cegger 20081207]
 	re(4): Add support for a 8168C/8111C revision. [alc 20081208]
-	tab(1): Add tabs utility, fixes PR bin/11227. [roy 20081211]
+	tabs(1): Add tabs utility, fixes PR bin/11227. [roy 20081211]
 	httpd(8): Add rc.d script to control httpd daemon. [mishka 20081211]
 	ath(4): Switch from the binary HAL to the open-source HAL released by
 		Sam Leffler. [alc 20081211]
@@ -245,7 +245,7 @@
 		cd9660 and sysvbfs.  [pooka 20090414]
 	dhcpcd(8): Import dhcpcd-4.0.13 [roy 20090417]
 	zaurus: Add recoding support to zaudio(4). [nonaka 20090418]
-	httpd(8): Import bozohttpd-20090418. [mrg 20090418]
+	httpd(8): Update to bozohttpd-20090418. [mrg 20090418]
 	bge(4): Add misc quirk code for chip specific bugs.
 		From FreeBSD and OpenBSD.  [msaitoh 20090419]
 	queue(3): Add SLIST_FOREACH_SAFE, STAILQ_FOREACH_SAFE, STAILQ_LAST,
@@ -301,7 +301,7 @@
 		Specifications X/Open System Interfaces extension (``XSI'').
 		[ginsbach 20090514]
 	hp700: com at dino now works [skrll 20090518]
-	httpd(8): Import bozohttpd-20090522. [mrg 20090522]
+	httpd(8): Update to bozohttpd-20090522. [mrg 20090522]
 	libc: Add %s (seconds since the Epoch) to strptime(3) for symmetry
 		with strftime(3). [ginsbach 20090524]
 	kernel: File descriptor access performance improvements.
@@ -332,7 +332,7 @@
 		i386 and sparc64 are finished. [dyoung 20090625]
 	dhcpcd(8): Import dhcpcd-5.0.5 [roy 20090704]
 	dhcpcd(8): Import dhcpcd-5.0.6 [roy 20090708]
-	sysmon_envsys(8): Enhancements to allow access to driver-internal
+	sysmon_envsys(9): Enhancements to allow access to driver-internal
 		limit values [pgoyette 20090710]
 	libc: Add getdelim(3) and getline(3) conforming to
 		IEEE Std 1003.1-2008 (``POSIX.1'') [roy 20090713]
@@ -372,7 +372,7 @@
 		[jmcneill 20090804]
 	openssl(1): Import SNAP-20090805 to fix the namespace issues
 		(BLOCK, CSTRING, etc) [christos 20090805]
-	tcx(8):	support wsdisplay and acceleration [macallan 20090806]
+	sparc: support wsdisplay and acceleration for tcx(4) [macallan 20090806]
 	rumpvfs: Use unmodified kernel vnode pager.  [pooka 20090806]
 	zfs: Import OpenSolaris zfs source code to NetBSD, add NetBSD
 		patches. [haad 20090808]
@@ -380,8 +380,8 @@
 	evbarm: Support for Gumstix Verdex and Verdex Pro. [kiyohara 20090809]
 	gpioiic(4): New driver to create an I2C bus using GPIO pins in
 		bit-banging mode. [mbalmer 20090809]
-	voyagerfb(8): a driver for the Gdium Liberty 1000's video controller
-		[macallan 20090812]
+	mips/voyagerfb(4): a driver for the Gdium Liberty 1000's video
+		controller [macallan 20090812]
 	mips: removed a.out support [matt 20090812]
 	secmode_keylock, keylock, gpiolock(4): Add support for multi-position
 		keylocks. [mbalmer 20090814]
@@ -393,13 +393,13 @@
 		[jmcneill 20090818]
 	amd64, i386: Suspend and resume is now supported when using the
 		genfb(4) display driver. [jmcneill 20090823]
-	tcx(4): imported the xf86-video-suntcx driver and added hardware
+	sparc/tcx(4): imported the xf86-video-suntcx driver and added hardware
 		acceleration [macallan 20090827]
 	unzip(1): A libarchive-based unzip frontend, emulating most of
 		infozip's command line. [joerg 20090903]
 	rumpcrypto: Add rump component for kernel crypto routines.
 		[pooka 20090903]
-	zx(4): imported the xf86-video-sunleo 1.2.0 driver from Xorg
+	sparc/zx(4): imported the xf86-video-sunleo 1.2.0 driver from Xorg
 		[macallan 20090905]
 	hdaudio(4): New standards-compliant Intel High Definition Audio driver
 		written to replace azalia(4). [sborrill 20090906]
@@ -435,7 +435,7 @@
 		[jmcneill 20090930]
 	mdnsd(8), dns-sd(1), libdns_sd: import mDNSResponder 212.1
 		[tsarna 20090929]
-	lom(4), sparc64: Add a driver for LOMlite lights out management
+	sparc64/lom(4): Add a driver for LOMlite lights out management
 		hardware monitor and watchdog timer. [nakayama 20091002]
 	i386: Add support for enhanced speedstep on VIA C7 Esther CPUs.
 		[jmcneill 20091002]
@@ -466,9 +466,9 @@
 	m4(1): Import the OpenBSD one since it implements features from gm4
 		that the new flex wants [christos 20091026]
 	yacc(1): Import byacc-20091028 [christos 20091028]
-	pm2fb: A driver for Permedia2-based graphics cards like Sun's PGX32
-		[macallan 20091028]
-	xf86-video-igs: an Xorg driver for IGS CyberPro 20x0 graphics
+	sparc/pm2fb(4): A driver for Permedia2-based graphics cards like
+		Sun's PGX32 [macallan 20091028]
+	shark: xf86-video-igs: an Xorg driver for IGS CyberPro 20x0 graphics
 		controllers, currently only for rev. 5 sharks
 		[macallan 20091110]
 	raid(4): RAIDframe parity maps, which greatly improve parity rewrite
@@ -515,7 +515,7 @@
 	bind: Update to 9.7.0-rc1. [christos 20091226]
 	openssl(1): Import SNAP-20091226 [christos 20091226]
 	openssh: Import 5.3. [christos 20091226]
-	gfb: Add a driver for Sun XVR-1000 graphics boards
+	sparc/gfb(4): Add a driver for Sun XVR-1000 graphics boards
 		[macallan 20091229]
 	wm(4): Add support for i82583V	[msaitoh 20091230]
 	libc: Import tzcode2009k [mlelstv 20091231]
@@ -571,7 +571,7 @@
 	u3g(4): Support Huawei K3765.  [pooka 20100219]
 	wbsio(4): New driver for Winbond Super I/O attachment of
 		lm(4) on any port.	[cnst 20100221]
-	wcfb: A driver for 3Dlabs Wildcat graphics cards [macallan 20100224]
+	wcfb(4): A driver for 3Dlabs Wildcat graphics cards [macallan 20100224]
 	netstat(8): Add -h which humanizes numbers from -bi.  [pooka 20100224]
 	ld.elf_so(1): Implement negative symbol lookup cache [roy 20100227]
 	dhcpcd(8): Import dhcpcd-5.2.1. [roy 20100227]
@@ -594,7 +594,7 @@
 	aibs(4): Remove aiboost(4) as obsolete and redundant
 		since the introduction of aibs(4).	[cnst 20100319]
 	rump(3): Support bluetooth.  [pooka 20100322]
-	cgtwelve: A driver for Sun CG12 / Matrox SG3 graphics boards
+	sparc/cgtwelve(4): A driver for Sun CG12 / Matrox SG3 graphics boards
 		[macallan 20100323]
 	rump(3): Support unionfs, layerfs, nullfs and umapfs.  [pooka 20100330]
 	dhcpcd(8): Import dhcpcd-5.2.2. [roy 20100331]
@@ -646,7 +646,7 @@
 		[jym 20100505]
 	cron(8): Import 4.1 from isc. [christos 20100506]
 	atf(7): Import 0.8.  [jmmv 20100508]
-	bozohttpd: Update to bozohttpd-20100509.  [mrg 20100509]
+	httpd(8): Update to bozohttpd-20100509.  [mrg 20100509]
 	rump(3): Add uniprocessor locking routines.  They can be used in
 		virtual uniprocessor configurations for a significant
 		performance boost.  [pooka 20100518]
@@ -669,7 +669,7 @@
 	dhcpcd(8): Import dhcpcd-5.2.4. [roy 20100604]
 	vnode(9): Remove member v_vnlock. [hannken 20100605]
 	acpi(4): Updated ACPICA to 20100528. [jruoho 20100606]
-	lcd(4): Driver for hp700 lcds added. [skrll 20100601]
+	hp700/lcd(4): Driver for hp700 lcds added. [skrll 20100601]
 	ofppc: Support Gigabit Ethernet Controller for MV64361 on PegasosII
 		by mvgbe@gt.  [kiyohara 20100609]
 	arm: Added support for Cortex-A8 CPUs. [jmcneill 20100616]
@@ -677,7 +677,7 @@
 	vnsubr(9): Remove recursive vnode locks. [hannken 20100618]
 	mkubootimage(1): Added tool to generate u-boot kernel images.
 		[jmcneill 20100618]
-	httpd(8): Import bozohttpd-20100621. [mrg 20100621]
+	httpd(8): Update to bozohttpd-20100621. [mrg 20100621]
 	kernel: Add high-priority xcall(9) support. [rmind 20100622]
 	hp700: Add support for uturn(4) based machines. [skrll 20100624]
 	autoconf(9): Add config_mountroot(9), which defers device configuration
@@ -713,7 +713,7 @@
 	bebox: Support xserver.  It tested only s3(TRIO 64V+).
 		[kiyohara 20100801]
 	tests(7): Convert the sort tests to ATF.  [jmmv 20100801]
-	wpa: New wpa_supplicant and hostapd 0.7.2 [christos 20100804]
+	wpa: New wpa_supplicant(8) and hostapd(8) 0.7.2 [christos 20100804]
 	tests(7): Add elementary tests for the audio subsystem.
 		[pooka 20100804]
 	hpcarm: Improve console speed on W-ZERO3 machines using
@@ -737,7 +737,7 @@
 	dreamcast: Fix a long standing GD-ROM driver bug so that file system
 		on GD-ROM works properly.  The problem is reported and tracked
 		by Yasushi Oshima. [tsutsui 20100831]
-	omapfb: a simple driver for OMAP 3xxx on-chip video, especially the
+	omapfb(4): a simple driver for OMAP 3xxx on-chip video, especially the
 		Beagleboard [macallan 20100831]
 	rump_lwproc(3): Add an interface for process/thread management
 		in a rump kernel.  [pooka 20100901]
@@ -756,7 +756,7 @@
 	m68k: Re-enable m68k optimized in_cksum routine.  Makes
 		~5% improvements of ttcp(1) xfer rates. [tsutsui 20100919]
 	sparc: Re-enable sparc optimized in_cksum routine. [tsutsui 20100920]
-	httpd(8): Import bozohttpd-20100920. [mrg 20100921]
+	httpd(8): Update to bozohttpd-20100920. [mrg 20100921]
 	aue(4): Add support for I-O DATA ETX-US2. [tsutsui 20100925]
 	evbarm: Support Marvell Sheevaplug and some Marvell SoC NAS box.
 		[kiyohara 20101002]
@@ -830,8 +830,9 @@
 	raid(4):  Add support for non 512-byte sector devices.  [mrg 20101203]
 	sysinst(8): Drop the question to select a password cipher algorithm.
 		[jmmv 20101204]
-	libpcap(3): Update to 1.1.1; see src/external/bsd/libpcap/dist/CHANGES
-		for the list of changes [christos 20101205]
+	pcap(3): Update libpcap to 1.1.1; see
+		src/external/bsd/libpcap/dist/CHANGES for the list of changes
+		[christos 20101205]
 	tcpdump(8): Update to 4.1.1; see src/external/bsd/tcpdump/dist/CHANGES
 		for the list of changes [christos 20101205]
 	prenice(1): Add new command to change process priorities based upon
@@ -912,7 +913,7 @@
 		available via sysctl. [matt 20110129]
 	route: make routing socket interface 64-bit clean. [matt 20110131]
 	dhcpcd(8): Import dhcpcd-5.2.11. [roy 20110204]
-	hp300: Switch NetBSD/hp300 to wscons with rasops.
+	hp300: Switch NetBSD/hp300 to wscons(4) with rasops(9).
 		Simply ported from OpenBSD/hp300.  [tsutsui 20110206]
 	rumphijack(3): Improve select(2) emulation.  Commit was done
 		through a rump TCP/IP stack.  [pooka 20110211]
@@ -989,13 +990,13 @@
 	hppa: add TLS support.  [skrll 20110317]
 	gdtoa: Import the latest [christos 20110319]
 	sandpoint: D-Link DSM-G600 support. [phx 20110319]
-	shark: chipsfb now works on shark. [macallan 20110323]
+	shark: chipsfb(4) now works on shark. [macallan 20110323]
 	postfix(1): Import version 2.8.2 [tron 20110323]
 	sparc: add TLS (thread local storage) support.  [martin 20110330]
 	sparc64: add TLS (thread local storage) support.  [martin 20110330]
 	alpha: add TLS (thread local storage) support.  [skrll 20110331]
 	atf(7): Import 0.13.  [jmmv 20110331]
-	ssh-askpass: Updated to 1.2.0. [mbalmer 20110403]
+	ssh-askpass(1): Updated to 1.2.0. [mbalmer 20110403]
 	rdcide(4): add a driver for the IDE controller found in RDC's
 		vortex86 and PMX-1000 system-on-chip.  [bouyer 20110404]
 	rdcpcib(4): add a driver for the PCI/ISA bridge and watchdog timer
@@ -1108,8 +1109,8 @@
 	mips: Switch to GCC 4.5.3  [matt 20110804]
 	powerpc: Switch to GCC 4.5.3  [matt 20110804]
 	amiga: Add basic PCI support. [rkujawa 20110804]
-	p5pb(4): Add driver for Phase5 PCI bridge, as present on CyberVision
-		PPC and BlizzardVision PPC. [rkujawa 20110804]
+	amiga/p5pb(4): Add driver for Phase5 PCI bridge, as present on
+		CyberVision PPC and BlizzardVision PPC. [rkujawa 20110804]
 	modload(8): A module name must contain at least one / character when
 		the module is to be loaded from a filesystem path, it must not
 		contain a / character when the module is to be loaded from
@@ -1131,12 +1132,12 @@
 	postfix(1): Import version 2.8.5 [tron 20110910]
 	build: Both the source tree and the obj directories will be cleaned
 		by "make clean" or "make cleandir".  [apb 20110910]
-	wpa: New wpa_supplicant and hostapd 0.7.3 [christos 20110910]
+	wpa: New wpa_supplicant(8) and hostapd(8) 0.7.3 [christos 20110910]
 	yacc(1): Import byacc-20110908 [christos 20110910]
 	traceroute(8): Updated to 1.4a12 [christos 20110910]
 	bind: Update to 9.9.0a1 [christos 20110911]
 	file(1): Update to 5.09 [christos 20110916]
-	mppb(4): Add driver for Prometheus Zorro III to PCI bridge.
+	amiga/mppb(4): Add driver for Prometheus Zorro III to PCI bridge.
 		[rkujawa 20110917]
 	xen: Provide experimental support for suspend/resume in
 		NetBSD domUs. [jym 20110920]
@@ -1164,7 +1165,7 @@
 	sparc64: Switch to GDB 7.3.1.  [mrg 20111024]
 	arm: Switch to GDB 7.3.1.  [mrg 20111024]
 	powerpc: Switch to GDB 7.3.1.  [mrg 20111024]
-	efa(4): Add driver for ELBOX FastATA 1200. [rkujawa 20111028]
+	amiga/efa(4): Add driver for ELBOX FastATA 1200. [rkujawa 20111028]
 	postfix(1): Import version 2.8.6 [tron 20111028]
 	zoneinfo: Import tzdata2011n. [apb 20111102]
 	tre: Incorporate library. Adds agrep. This library provides
@@ -1184,7 +1185,7 @@
 	luna68k: Finally complete LUNA-II support. [tsutsui 20111112]
 	gpiopwm(4): A new driver to pulse GPIO pins in software.
 		[mbalmer 20111113]
-	httpd(8): Import bozohttpd-20111118. [mrg 20111118]
+	httpd(8): Update to bozohttpd-20111118. [mrg 20111118]
 	x68k: Remove pow(4) and rtcalarm(8) [isaki 20111119]
 	news68k: Add preliminary PROM function based framebuffer text console
 		support. [tsutsui 20111120]
@@ -1192,12 +1193,14 @@
 	m68k: Add TLS (thread local storage) support.  [joerg 20111122]
 	audio(9): Audio drivers are now MP-safe. [jmcneill 20111123]
 	xbdback(4): driver is now MP-SAFE. [jym 20111123]
+	rndctl(8): implement boot-time save/restore of kernel RNG state.
+		[tls 20111123]
 	resolvconf(8): import openresolv-3.4.5 [roy 20111124]
 	mount_chfs(8): Add mount_chfs(8), a tool for mounting CHFS volumes.
 		[ahoka 20111124]
 	chfs: Add CHFS, a file system for flash(9) devices. [ahoka 20111124]
-	x68k: Add powsw(4), a revised power switch driver [isaki 20111127]
-	rtadvd: Add RDNSS and DNSSL support (RFC6106) [roy 20111210]
+	x68k: Add x68k/powsw(4), a revised power switch driver [isaki 20111127]
+	rtadvd(8): Add RDNSS and DNSSL support (RFC6106) [roy 20111210]
 	isibootd(8): Add isibootd(8), a dumb netboot server command for
 		OMRON luna68k machines.  [tsutsui 20111217]
 	libsa: Allow libsa to have a file system dependent ls command and
@@ -1213,17 +1216,19 @@
 		using large pages). [chs 20111204]
 	adventure(6): New save file format. Please regenerate (restore
 		and re-save) any old save files. [dholland 20120107]
+	ipsec(4): Make FAST_IPSEC the default IPSEC implementation.
+		[drochner 20120109]
 	x86, xen: Add cpu ucode loading support via cpuctl(8). [cegger 20120113]
 	sandpoint: Netronix NH-230/231 and compatible NAS are supported.
 		[phx 20120114]
 	atf(7): Import 0.15.  [jmmv 20120116]
-	p5pb(4): DCE Computer G-REX 1200 and G-REX 4000 PCI bridges are now
-		supported. [rkujawa 20120119]
+	amiga/p5pb(4): DCE Computer G-REX 1200 and G-REX 4000 PCI bridges are
+		now supported. [rkujawa 20120119]
 	build.sh: Add live-image and install-image targets.  [tsutsui 20120122]
 	tpm(4):	 Add a Trusted Computing Module driver from bsssd
 		[christos 20120122]
-	valkyriefb and videopll: drivers to support the onboard video
-		circuitry found in for example the Performa 6360.
+	macppc/valkyriefb(4) and macppc/videopll(4): drivers to support the
+		onboard video circuitry found in for example the Performa 6360.
 		[macallan 20120123]
 	dhcpcd(8): Import dhcpcd-5.5.0 [roy 20120125]
 	x86: Stop building boot ROM images for old NICs. [jnemeth 20120127]
@@ -1247,20 +1252,20 @@
 		the libquota(3) API. [dholland 20120201]
 	repquota(8): The repquota -x dump format is now tabular, not XML.
 		[dholland 20120201]
-	mac68k: Add timecounter support to the CSI Hurdler Centronics
-		Parallel Interface cpi(4) driver. [hauke 20120201]
+	mac68k: Add timecounter(9) support to the CSI Hurdler Centronics
+		Parallel Interface mac68k/cpi(4) driver. [hauke 20120201]
 	ntp: import ntp 4.2.6p5.
 		[kardel 20120201]
 	dhcpcd(8): Import dhcpcd-5.5.3 [roy 20120202]
 	dhcpcd(8): Import dhcpcd-5.5.4 [roy 20120206]
-	userland: New apropos implementation using SQLite Full Text Index
+	userland: New apropos(1) implementation using SQLite Full Text Index
 		[joerg 20120207]
-	userland: Man pages are formatted with mandoc by default.
+	userland: Man pages are formatted with mandoc(1) by default.
 		[joerg 20120207]
-	posix_spawn: Import Charles Zhang's summer of code project.
+	posix_spawn(3): Import Charles Zhang's summer of code project.
 		[martin 20120212]
-	quotactl(8): quotactl(8) was removed in favor of quotadump and
-		quotarestore. [dholland 20120212]
+	quotactl(8): quotactl(8) was removed in favor of quotadump(8) and
+		quotarestore(8). [dholland 20120212]
 	quotadump(8): Added quotadump, which is the same as repquota -x,
 		for creating backups of quota information.
 		[dholland 20120212]
@@ -1274,6 +1279,10 @@
 	kernel: Add urtwn(4), a driver for Realtek RTL8188CU/RTL8192CU USB IEEE
 		802.11b/g/n wireless network devices, ported from OpenBSD.
 		[nonaka 20120325]
+	kernel: Rewrite most of the entropy-gathering and entropy-distributing
+		code, separating the rnd(4) pseudodevice from the bitstream
+		generation code (now cprng(9)) and entropy-pool code (rnd(9))
+		[tls 20120417]
 	wm(4): Add support for Intel I350 Ethernet. [msaitoh 20120525]
 	postfix(1): Import version 2.8.11 [tron 20120609]
 	evbarm: Add initial support for the RaspberryPi. [skrll 20120726]
--- a/doc/CHANGES-6.0	Tue Aug 21 05:36:23 2012 +0000
+++ b/doc/CHANGES-6.0	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-6.0,v 1.1.2.197 2012/08/21 05:36:23 riz Exp $
+# $NetBSD: CHANGES-6.0,v 1.1.2.197.2.1 2012/11/01 16:44:53 matt Exp $
 
 A complete list of changes from the initial NetBSD 6.0 branch on 15 Feb 2012
 until the 6.0 release:
@@ -8410,3 +8410,444 @@
 
 	Welcome to NetBSD 6.0_RC1!
 
+external/bsd/ntp/dist/ntpd/ntp_io.c		1.10
+
+	Make ntpd broadcast transmission work again.
+	[kardel, ticket #522]
+
+sys/dev/scsipi/scsiconf.c			1.269
+
+	Don't send more than 256 commands per target, to avoid a panic.
+	[bouyer, ticket #523]
+
+sys/dev/ic/isp_netbsd.c				1.86
+
+	Avoid a DIAGNOSTIC panic in the isp(4) driver.
+	[bouyer, ticket #524]
+
+share/man/man3/rbtree.3				1.7 via patch
+
+	Add more function argument names to the man page.  PR#46814.
+	[dholland, ticket #526]
+
+doc/CHANGES					patch
+distrib/notes/common/main			patch
+
+	Mention switch to FAST_IPSEC in January.
+	[drochner, ticket #527]
+
+sys/arch/macppc/conf/GENERIC				patch
+
+	Disable radeonfb for the release, as it causes problems on
+	some (but not all) hardware.
+	[macallan, ticket #528]
+
+sys/arch/x86/acpi/acpi_wakeup.c			1.32
+
+	Fix inverted test, which unbreaks ACPI suspend on UP, and possibly
+	other bugs on MP.
+	[jakllsch, ticket #529]
+
+sys/nfs/nfs_serv.c				1.164
+
+	Fix panic that can happen when an NFS rename fails.
+	[chs, ticket #530]
+
+external/gpl3/binutils/dist/bfd/elf32-vax.c	1.7
+
+	Fix vax shared libraries, so the vax port works again.
+	[martin, ticket #531]
+
+sys/arch/vax/vax/machdep.c			1.189
+
+	Silence savecore warnings on vax - crash dumps are not
+	properly implemented on vax.
+	[martin, ticket #532]
+
+sys/arch/i386/i386/i386func.S			1.17
+
+	Fix support for 486.
+	[rmind, ticket #533]
+
+sys/dev/pci/if_wm.c				1.232-1.234
+sys/dev/pci/if_wmreg.h				1.48
+
+	Make VLANs and checksum offload work for WM_F_NEWQUEUE devices.
+	Tested on 82575{EB,GB}, 82576, 82580, I350 and ICH9.
+	[bouyer, ticket #534]
+
+sys/arch/powerpc/pic/intr.c			1.23
+
+	Fix interrupt problems on PPC.
+	[macallan, ticket #535]
+
+sys/dev/pci/mfi_pci.c				1.17
+
+	Add missing definition for Symbios SAS 9261-8i.  PR#46877.
+	[jnemeth, ticket #536]
+
+sys/nfs/nfs_serv.c				1.165
+
+	Clean up properly after unloading nfsserver module, to avoid
+	crashes.
+	[christos, ticket #537]
+
+sys/netipsec/key.c				patch
+sys/netipsec/key.h				patch
+
+	Prevent a panic with FAST_IPSEC.
+	[msaitoh, ticket #538]
+
+sys/arch/amd64/amd64/machdep.c			1.190 via patch
+
+	Fix X on NetBSD/amd64 Xen DOM0.  PR#46634.
+	[cherry, ticket #539]
+
+external/gpl3/gcc/dist/gcc/builtins.c		1.2
+
+	Fix gcc on STRICT_ALIGNMENT arches. PR#46865.
+	[martin, ticket #540]
+
+sys/uvm/uvm_km.c				1.129-1.135
+sys/uvm/uvm_map.c				1.320-1.322
+
+	Fix a pmap_growkernel issue which caused some systems to reset
+	very early in the boot sequence. PR#46885.
+	[para, ticket #547]
+
+doc/README.files				1.5
+share/man/man7/release.7			1.33, 1.34
+
+	Update documentation regarding bootable images.
+	[riz, ticket #548]
+
+UPDATING					1.238 via patch
+	Add note about cleaning required by last month's openssl update.
+	Closes PR 46816. 
+	[dholland, ticket #549]
+
+external/bsd/bind/dist/CHANGES			1.6
+external/bsd/bind/dist/lib/dns/include/dns/rdata.h 1.5
+external/bsd/bind/dist/lib/dns/master.c		1.7
+external/bsd/bind/dist/lib/dns/rdata.c		1.5
+external/bsd/bind/dist/lib/dns/rdataslab.c	1.6
+external/bsd/bind/dist/lib/dns/tests/Makefile.in 1.2
+external/bsd/bind/dist/lib/dns/tests/master_test.c 1.2
+external/bsd/bind/dist/lib/dns/tests/rdata_test.c 1.1
+external/bsd/bind/dist/lib/dns/tests/testdata/master/master15.data 1.1
+external/bsd/bind/dist/lib/dns/tests/testdata/master/master16.data 1.1
+external/bsd/bind/dist/version			1.3
+
+	apply fix for CVE-2012-4244 from upstream
+
+	upstream changelog:
+	          --- 9.9.1-P3 released ---
+	   3364.  [security]      Named could die on specially crafted record.
+                          [RT #30416]
+	[spz, ticket #559]
+
+
+lib/libp2k/p2k.c				1.57
+lib/libpuffs/dispatcher.c			1.44
+lib/libpuffs/pnode.c				1.13
+lib/libpuffs/puffs.3				1.56
+lib/libpuffs/puffs.h				1.124
+lib/libpuffs/puffs_ops.3			1.35
+
+	Fix a regression in libpuffs for third-party file systems which
+	do not map cookies to struct puffs_node.  We are not aware of
+	the existence of any such file systems.
+	[manu, ticket #525]
+
+sys/arch/arm/include/byte_swap.h		1.9,1.12
+
+	Disable arm32 __asm for _byte_swap_u16_variable since gcc4.5 produces
+	decent code for it.  Fixes PR/46898.
+	[martin, ticket #542]
+
+etc/MAKEDEV.tmpl				1.158
+
+	Make the "init" target create optys as well.  PR#46902.
+	[martin, ticket #543]
+
+sys/dev/sbus/isp_sbus.c				1.81
+
+	Fix isp(4) at sbus so it doesn't hang the machine.
+	[macallan, ticket #550]
+
+sys/ufs/ufs/ufs_quota.c				1.112
+
+	Fix quotactl authorization.
+	[manu, ticket #551]
+
+sbin/mount_ptyfs/mount_ptyfs.8			1.9-1.10
+
+	ptyfs(8) is not experimental.
+	[dholland, ticket #552]
+
+sys/ufs/ffs/ffs_vfsops.c			1.278
+
+	Fix unmount of file systems with extended attributes enabled.
+	[manu, ticket #553]
+
+lib/libperfuse/perfuse.c			1.31
+
+	Don't unmount FUSE file systems on a non-fatal error.
+	[manu, ticket #554]
+
+sys/net/npf/npf_alg_icmp.c			1.12
+
+	Fix a bug in NPF's icmp handling.
+	[rmind, ticket #555]
+
+sys/ufs/ufs/ufs_extattr.c			1.40
+
+	Fix unmount in the case where an attribute was autocreated.
+	[manu, ticket #556]
+
+sys/arch/evbmips/conf/MALTA			1.68
+
+	Bump SYMTAB_SPACE by 30k.
+	[cyber, ticket #564]
+
+distrib/sets/lists/base/ad.mips64eb		1.94-1.95 via patch
+distrib/sets/lists/base/ad.mips64el		1.93-1.94 via patch
+distrib/sets/lists/base/md.amd64		1.169-1.170 via patch
+distrib/sets/lists/base/md.sparc64		1.159-1.160 via patch
+distrib/sets/lists/base/shl.mi			1.629,1.630,1.632 via patch
+distrib/sets/lists/comp/ad.mips64eb		1.81-1.82 via patch
+distrib/sets/lists/comp/ad.mips64el		1.821.83 via patch
+distrib/sets/lists/comp/md.amd64		1.168-1.169 via patch
+distrib/sets/lists/comp/md.sparc64		1.150-1.151 via patch
+distrib/sets/lists/comp/mi			1.1769 via patch
+distrib/sets/lists/comp/shl.mi			1.226-1.227 via patch
+distrib/sets/lists/tests/mi			1.477 via patch
+distrib/sets/sets.subr				1.137 via patch
+etc/Makefile					1.397 via patch
+share/man/man5/mk.conf.5			1.60 via patch
+share/mk/bsd.README				1.297 via patch
+share/mk/bsd.own.mk				1.700 via patch
+tests/crypto/libcrypto/Makefile			patch
+tests/crypto/libcrypto/t_ciphers.sh		1.4 via patch
+tests/crypto/libcrypto/t_hashes.sh		1.2 via patch
+tests/crypto/libcrypto/idea/Makefile		patch
+tests/crypto/libcrypto/mdc2/Makefile		patch
+usr.sbin/racoon/Makefile			1.25 via patch
+
+	Clean up MKCRYPTO_IDEA and MKCRYPTO_MDC2 removal, so that
+	a tree with MKCRYPTO_RC5=yes actually builds.
+	[spz, ticket #557]
+
+sys/sys/param.h					patched by hand
+
+	Welcome to NetBSD 6.0_RC2!
+
+doc/3RDPARTY					1.970 via patch
+share/zoneinfo/australasia			1.27 via patch
+
+	Merge tzdata2012f from
+	http://www.iana.org/time-zones/repository/releases/tzdata2012f.tar.gz
+	Changes from tzdata2012e to tzdata2012f:
+	    * australasia (Pacific/Fiji): Fiji DST is October 21 through
+	      January 20 this year.  (Thanks to Steffen Thorsen.)
+	[apb, ticket #578]
+
+UPDATING					1.239
+
+	Fix typo, noticed by stu314 on freenode.
+	[dholland, ticket #561]
+
+doc/CHANGES				patch
+
+	Add forgotten CHANGES entries for rndctl entropy save/load and all the
+	kernel entropy changes.
+	[tls, ticket #562]
+
+distrib/utils/sysinst/msg.mi.es			1.47
+
+	Add Spanish translations for sysinst's new configuration menu,
+	plus adding a few that were left previously.
+	Translation provided by jmmv.
+	[martin, ticket #563]
+
+UPDATING					1.240
+
+	Strengthen the entry about the openssl update, to clarify and emphasize
+	that just doing a non-update build isn't enough; you really do have to
+	nuke $DESTDIR.
+	[dholland, ticket #565]
+
+distrib/utils/sysinst/menus.mi			1.47
+distrib/utils/sysinst/msg.mi.de			1.70
+distrib/utils/sysinst/msg.mi.en			1.175
+distrib/utils/sysinst/msg.mi.es			1.46
+distrib/utils/sysinst/msg.mi.fr			1.129
+distrib/utils/sysinst/msg.mi.pl			1.86
+
+	Add translations for "Config menu" (was hardcoded before)
+	Add translations for Polish config menu entries (provided by
+	Marcin Piotr Pawlowski).
+	Add Spanish translations for sysinst's new configuration menu,
+	plus adding a few that were left previously.  Translation provided
+	by jmmv.
+	[jdf, ticket #567]
+
+usr.sbin/postinstall/postinstall		1.147
+
+	Make sure that the "to fix, run: ..." instructions actually work
+	cut-and-paste.
+	[ast, ticket #568]
+
+sbin/mount_ptyfs/mount_ptyfs.8			1.11-1.12
+sbin/mount_ptyfs/mount_ptyfs.c			1.13-1.14
+sys/fs/ptyfs/ptyfs.h				1.9
+sys/fs/ptyfs/ptyfs_vfsops.c			1.43-1.44
+
+	Update ptyfs to allow multiple mounts, remove some always-on
+	options, and update the documentation.
+	[christos, ticket #566]
+
+sys/dev/pci/ehci_pci.c				1.57
+
+	Fix fatal hangup during EHCI probe on some HP boxes.  PR#46828.
+	[tstsui, ticket #569]
+
+distrib/utils/sysinst/net.c			1.133
+
+	Prevent sysinst from setting an FQDN in rc.conf when the user entered no
+	domain (i.e., sets only the hostname).  PR#46946.
+	[jdf, ticket #570]
+
+external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c 1.4
+
+	Fix setsockopt(2) error in 64bit environment.  Makes ntpd(8) stop
+	complaining at boot. PR#46693.
+	[taca, ticket #571]
+
+usr.sbin/traceroute/traceroute.c		1.81
+
+	Fix display of multipath routes.
+	[zafer, ticket #573]
+
+sys/arch/macppc/include/param.h			1.20
+sys/arch/powerpc/include/param.h		1.28
+
+	Increase powerpc NKMEMPAGES_MAX_DEFAULT to 256MB. Fixes
+	hangs on platforms (ofppc) which did not already have this overridden.
+	[mrg, ticket #575]
+
+lib/libc/arch/arm/gen/swapcontext.S		1.7
+
+	Fix up the stack pointer in the ucontext returned by getcontext.
+	[skrll, ticket #576]
+
+sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c	1.8
+
+	Avoid crashing when writing to certain DRM sysctls.
+	[chs, ticket #579]
+
+sys/ufs/ufs/ufs_quota2.c			1.35
+tests/fs/ffs/h_quota2_tests.c			1.4
+tests/fs/ffs/t_miscquota.sh			1.7
+
+	Fix quota2 list corruption issue when defaultquotas are 0 (deny any file
+	and block allocation).
+	[bouyer, ticket #580]
+
+usr.sbin/npf/npfctl/npf.conf.5			1.16-1.23
+usr.sbin/npf/npfctl/npfctl.c			1.19
+
+	Improve npf.conf(5) manpage, minor formatting fix for npfctl.
+	[rmind, ticket #582]
+
+distrib/sets/lists/base/mi			1.1003
+etc/mtree/NetBSD.dist.base			1.104
+share/examples/Makefile				1.21
+share/examples/npf/Makefile			1.1
+share/examples/npf/hashtablefile		1.1
+share/examples/npf/host-npf.conf		1.1-1.2
+share/examples/npf/soho_gw-npf.conf		1.1-1.2
+share/examples/npf/treetablefile		1.1
+
+	Update the NPF examples, and install them.
+	[rmind, ticket #584]
+
+sys/kern/kern_exit.c				1.242 via patch
+sys/kern/kern_lwp.c				1.173 via patch
+sys/kern/sys_lwp.c				1.55 via patch
+sys/sys/lwp.h					1.164 via patch
+
+	Fix a race condition in exit_lwps, lwp_rwait.  PR#46168, PR#46402.
+	[rmind, ticket #583]
+
+etc/rc.d/named					1.23
+
+	Handle "keys" directory and directory permissions better, so
+	that DNSSEC validation works out of the box. PR#47024.
+	[christos, ticket #587]
+
+share/man/man5/ifconfig.if.5			1.16
+share/man/man5/rc.conf.5			1.154 via patch
+
+	Discourage the use of ifconfig_bge0=dhcp and prefer setting dhcpcd=YES
+	in rc.conf(5) instead.
+	[roy, ticket #588]
+
+sys/arch/powerpc/powerpc/trap.c			patch
+
+	Silence trap printfs caused by OpenSSL.
+	[christos, ticket #589]
+
+usr.sbin/npf/npfctl/npf_parse.y			1.14
+
+	Print the correct line number in npfctl.
+	[rmind, ticket #590]
+
+sys/kern/uipc_usrreq.c				1.140 via patch
+
+	Avoid a NULL dereferencing crash.
+	[christos, ticket #593]
+
+sys/net/npf/npf_handler.c			1.23
+
+	npf_packet_handler: drop the packet if IPv6 reassembly did not work.
+	[rmind, ticket #594]
+
+distrib/notes/macppc/install			1.39
+
+	Add some text to "Common Problems" about Open Firmware 3.x not
+	setting up the console and how to work around the problem. PR#35348.
+	[jnemeth, ticket #595]
+
+external/bsd/wpa/dist/src/eap_server/eap_server_tls_common.c	patch
+
+	Fix overflow in hostapd.  PRE-SA-2012-07.
+	[christos, ticket #597]
+
+external/bsd/bind/dist/CHANGES			1.7
+external/bsd/bind/dist/bin/named/query.c	1.9
+external/bsd/bind/dist/version			1.4
+
+	Update to BIND 9.9.1-P4, to address CVE-2012-5166.
+	[christos, ticket #598]
+
+distrib/notes/common/main			1.490
+
+	Refer to the list of mirrors at http://www.NetBSD.org/mirrors
+	in "Quick install notes for the impatient".
+	[apb, ticket #599]
+
+distrib/notes/common/main			patched by hand
+
+	Update the release notes.
+
+sys/arch/algor/conf/P5064			1.74
+sys/arch/evbmips/conf/MALTA64			1.6
+
+	Bump SYMTAB_SPACE so these kernels build again.
+	[riz, ticket #607]
+
+sys/sys/param.h					patched by hand
+
+	Welcome to 6.0!
+
--- a/doc/README.files	Tue Aug 21 05:36:23 2012 +0000
+++ b/doc/README.files	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: README.files,v 1.4 2007/12/14 21:15:52 pavel Exp $
+#	$NetBSD: README.files,v 1.4.22.1 2012/11/01 16:44:53 matt Exp $
 
 What's in this directory:
 
@@ -10,6 +10,8 @@
 
 README.files	This file.
 
+images/		Bootable images, including ISOs and USB disk images.
+
 patches/	Post-release binary code patches.
 
 shared/		Binary sets shared between multiple ports.
--- a/etc/MAKEDEV.tmpl	Tue Aug 21 05:36:23 2012 +0000
+++ b/etc/MAKEDEV.tmpl	Thu Nov 01 16:44:44 2012 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh -
-#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.5 2012/08/13 19:55:10 riz Exp $
+#	$NetBSD: MAKEDEV.tmpl,v 1.151.2.5.2.1 2012/11/01 16:44:53 matt Exp $
 #
 # Copyright (c) 2003,2007,2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -836,7 +836,7 @@
 
 init)
 	# unless overridden by MD entry, this is equal to 'all'
-	makedev all
+	makedev all opty
 	;;
 
 %MI_DEVICES_BEGIN%
--- a/etc/Makefile	Tue Aug 21 05:36:23 2012 +0000
+++ b/etc/Makefile	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.396.2.1 2012/08/17 20:50:51 martin Exp $
+#	$NetBSD: Makefile,v 1.396.2.1.2.1 2012/11/01 16:44:53 matt Exp $
 #	from: @(#)Makefile	8.7 (Berkeley) 5/25/95
 
 # Environment variables without default values:
@@ -188,7 +188,7 @@
 		MACHINE MACHINE_ARCH MAKE MAKECONF MAKEFLAGS \
 		MAKEOBJDIR MAKEOBJDIRPREFIX MAKEVERBOSE \
 		MKBFD MKBINUTILS MKCATPAGES \
-		MKCRYPTO MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKCVS \
+		MKCRYPTO MKCRYPTO_RC5 MKCVS \
 		MKDEBUG MKDEBUGLIB MKDOC MKDTRACE MKDYNAMICROOT \
 		MKGCC MKGCCCMDS MKGDB \
 		MKHESIOD MKHTML MKIEEEFP MKINET6 MKINFO MKIPFILTER \
--- a/etc/mtree/NetBSD.dist.base	Tue Aug 21 05:36:23 2012 +0000
+++ b/etc/mtree/NetBSD.dist.base	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.97.2.3 2012/08/13 23:18:23 riz Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.97.2.3.2.1 2012/11/01 16:44:54 matt Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -342,6 +342,7 @@
 ./usr/share/examples/libsaslc/mech
 ./usr/share/examples/lua
 ./usr/share/examples/mount_portal
+./usr/share/examples/npf
 ./usr/share/examples/openssl
 ./usr/share/examples/pf
 ./usr/share/examples/pppd
--- a/etc/rc.d/named	Tue Aug 21 05:36:23 2012 +0000
+++ b/etc/rc.d/named	Thu Nov 01 16:44:44 2012 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: named,v 1.22 2009/08/03 17:45:48 perry Exp $
+# $NetBSD: named,v 1.22.10.1 2012/11/01 16:44:54 matt Exp $
 #
 
 # PROVIDE: named
@@ -20,38 +20,43 @@
 
 named_migrate()
 {
-	local src=$1
-	local dst=$2$1
+	local src="$1"
+	local dst="$2$1"
 	echo "Migrating $src to $dst"
 (
 	diff=false
-	cd $src
+	cd "$src"
+	mkdir -p "$dst"
 	for f in $(find . -type f)
 	do
-		f=${f##./}
-		case $f in
+		f="${f##./}"
+		case "$f" in
 		*/*)
-			d=$dst/$(dirname $f)
+			ds="$(dirname "$f")"
+			dd="$dst/$ds"
+			mkdir -p "$dd"
+			chmod "$(stat -f "%p" "$ds" |
+			    sed -e 's/.*\([0-7][0-7][0-7][0-7]\)$/\1/g')" "$dd"
+			chown "$(stat -f %u:%g "$ds")" "$dd"
 			;;
-		*)	d=$dst
+		*)
 			;;
 		esac
-		mkdir -p $d
 		if [ -r "$dst/$f" ]
 		then
-			if ! cmp $f $dst/$f; then
+			if ! cmp "$f" "$dst/$f"; then
 				diff=true
 			fi
 		else
-			cp -p $f $dst/$f
+			cp -p "$f" "$dst/$f"
 		fi
 	done
 	if $diff; then
 		echo "Cannot complete migration because files are different"
 		echo "Run 'diff -r $src $dst' resolve the differences"
 	else
-		rm -fr $src
-		ln -s $dst $src
+		rm -fr "$src"
+		ln -s "$dst" "$src"
 	fi
 )
 }
@@ -59,6 +64,10 @@
 named_precmd()
 {
 	if [ -z "$named_chrootdir" ]; then
+		if [ ! -d "/etc/namedb/keys" ]; then
+			mkdir -m 775 "/etc/namedb/keys"
+			chown named:named "/etc/namedb/keys"
+		fi
 		return 0;
 	fi
 
@@ -87,8 +96,7 @@
 		;;
 	esac
 
-	for i in null random
-	do
+	for i in null random; do
 		if [ ! -c "${named_chrootdir}/dev/$i" ]; then
 			rm -f "${named_chrootdir}/dev/$i"
 			(cd /dev && 
@@ -99,12 +107,15 @@
 	if [ ! -h /etc/namedb ]; then
 		named_migrate /etc/namedb ${named_chrootdir}
 	fi
-	if [ \( -r /etc/named.conf \) -a \( ! -h /etc/named.conf \) -a \
-	     \( ! -r ${named_chrootdir}/etc/named.conf \) ]
-	then
-		mv /etc/named.conf ${named_chrootdir}/etc/named.conf
-		ln -s ${named_chrootdir}/etc/named.conf /etc/named.conf
-	fi
+
+	for i in named.conf rndc.key; do
+		if [ \( -r "/etc/$i" \) -a \( ! -h "/etc/$i" \) -a \
+		     \( ! -r "${named_chrootdir}/etc/$i" \) ]; then
+			mv "/etc/$i" "${named_chrootdir}/etc/$i"
+			ln -s "${named_chrootdir}/etc/$i" "/etc/$i"
+		fi
+	done
+
 	if [ \( ! -r ${named_chrootdir}/etc/named.conf \) -a \
 	    \( -r ${named_chrootdir}/etc/namedb/named.conf \) ]; then
 		ln -s namedb/named.conf ${named_chrootdir}/etc
--- a/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/apache2/mDNSResponder/dist/mDNSShared/dnssd_clientstub.c	Thu Nov 01 16:44:44 2012 +0000
@@ -636,7 +636,7 @@
 	else
 		{
 		#ifdef SO_NOSIGPIPE
-		const unsigned long optval = 1;
+		int optval = 1;
 		#endif
 		*ref = NULL;
 		sdr->sockfd    = socket(AF_DNSSD, SOCK_STREAM, 0);
--- a/external/bsd/bind/dist/CHANGES	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/CHANGES	Thu Nov 01 16:44:44 2012 +0000
@@ -1,3 +1,14 @@
+	--- 9.9.1-P4 released ---
+
+3383.	[security]	A certain combination of records in the RBT could
+                        cause named to hang while populating the additional
+                        section of a response. [RT #31090]
+
+	--- 9.9.1-P3 released ---
+
+3364.	[security]	Named could die on specially crafted record.
+			[RT #30416]
+
 	--- 9.9.1-P2 released ---
 
 3349.	[bug]		Change #3345 was incomplete. [RT #30233]
--- a/external/bsd/bind/dist/bin/named/query.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/bin/named/query.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.7.2.1 2012/06/05 21:15:20 bouyer Exp $	*/
+/*	$NetBSD: query.c,v 1.7.2.1.2.1 2012/11/01 16:44:55 matt Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. ("ISC")
@@ -1121,13 +1121,6 @@
 		mname = NULL;
 	}
 
-	/*
-	 * If the dns_name_t we're looking up is already in the message,
-	 * we don't want to trigger the caller's name replacement logic.
-	 */
-	if (name == mname)
-		mname = NULL;
-
 	if (mnamep != NULL)
 		*mnamep = mname;
 
@@ -1332,6 +1325,7 @@
 	if (dns_rdataset_isassociated(rdataset) &&
 	    !query_isduplicate(client, fname, type, &mname)) {
 		if (mname != NULL) {
+			INSIST(mname != fname);
 			query_releasename(client, &fname);
 			fname = mname;
 		} else
@@ -1401,11 +1395,13 @@
 #endif
 			if (!query_isduplicate(client, fname,
 					       dns_rdatatype_a, &mname)) {
-				if (mname != NULL) {
-					query_releasename(client, &fname);
-					fname = mname;
-				} else
-					need_addname = ISC_TRUE;
+				if (mname != fname) {
+					if (mname != NULL) {
+						query_releasename(client, &fname);
+						fname = mname;
+					} else
+						need_addname = ISC_TRUE;
+				}
 				ISC_LIST_APPEND(fname->list, rdataset, link);
 				added_something = ISC_TRUE;
 				if (sigrdataset != NULL &&
@@ -1458,11 +1454,13 @@
 #endif
 			if (!query_isduplicate(client, fname,
 					       dns_rdatatype_aaaa, &mname)) {
-				if (mname != NULL) {
-					query_releasename(client, &fname);
-					fname = mname;
-				} else
-					need_addname = ISC_TRUE;
+				if (mname != fname) {
+					if (mname != NULL) {
+						query_releasename(client, &fname);
+						fname = mname;
+					} else
+						need_addname = ISC_TRUE;
+				}
 				ISC_LIST_APPEND(fname->list, rdataset, link);
 				added_something = ISC_TRUE;
 				if (sigrdataset != NULL &&
@@ -1993,22 +1991,24 @@
 		    crdataset->type == dns_rdatatype_aaaa) {
 			if (!query_isduplicate(client, fname, crdataset->type,
 					       &mname)) {
-				if (mname != NULL) {
-					/*
-					 * A different type of this name is
-					 * already stored in the additional
-					 * section.  We'll reuse the name.
-					 * Note that this should happen at most
-					 * once.  Otherwise, fname->link could
-					 * leak below.
-					 */
-					INSIST(mname0 == NULL);
-
-					query_releasename(client, &fname);
-					fname = mname;
-					mname0 = mname;
-				} else
-					need_addname = ISC_TRUE;
+				if (mname != fname) {
+					if (mname != NULL) {
+						/*
+						 * A different type of this name is
+						 * already stored in the additional
+						 * section.  We'll reuse the name.
+						 * Note that this should happen at most
+						 * once.  Otherwise, fname->link could
+						 * leak below.
+						 */
+						INSIST(mname0 == NULL);
+
+						query_releasename(client, &fname);
+						fname = mname;
+						mname0 = mname;
+					} else
+						need_addname = ISC_TRUE;
+				}
 				ISC_LIST_UNLINK(cfname.list, crdataset, link);
 				ISC_LIST_APPEND(fname->list, crdataset, link);
 				added_something = ISC_TRUE;
--- a/external/bsd/bind/dist/lib/dns/include/dns/rdata.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/lib/dns/include/dns/rdata.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdata.h,v 1.3.4.1 2012/06/05 21:14:56 bouyer Exp $	*/
+/*	$NetBSD: rdata.h,v 1.3.4.1.2.1 2012/11/01 16:44:55 matt Exp $	*/
 
 /*
  * Copyright (C) 2004-2009, 2011  Internet Systems Consortium, Inc. ("ISC")
@@ -149,6 +149,17 @@
 	(((rdata)->flags & ~(DNS_RDATA_UPDATE|DNS_RDATA_OFFLINE)) == 0)
 
 /*
+ * The maximum length of a RDATA that can be sent on the wire.
+ * Max packet size (65535) less header (12), less name (1), type (2),
+ * class (2), ttl(4), length (2).
+ *
+ * None of the defined types that support name compression can exceed
+ * this and all new types are to be sent uncompressed.
+ */
+
+#define DNS_RDATA_MAXLENGTH	65512U
+
+/*
  * Flags affecting rdata formatting style.  Flags 0xFFFF0000
  * are used by masterfile-level formatting and defined elsewhere.
  * See additional comments at dns_rdata_tofmttext().
--- a/external/bsd/bind/dist/lib/dns/master.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/lib/dns/master.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: master.c,v 1.5.4.1 2012/06/05 21:15:04 bouyer Exp $	*/
+/*	$NetBSD: master.c,v 1.5.4.1.2.1 2012/11/01 16:44:55 matt Exp $	*/
 
 /*
  * Copyright (C) 2004-2009, 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
@@ -77,7 +77,7 @@
 /*%
  * max message size - header - root - type - class - ttl - rdlen
  */
-#define MINTSIZ (65535 - 12 - 1 - 2 - 2 - 4 - 2)
+#define MINTSIZ DNS_RDATA_MAXLENGTH
 /*%
  * Size for tokens in the presentation format,
  * The largest tokens are the base64 blocks in KEY and CERT records,
--- a/external/bsd/bind/dist/lib/dns/rdata.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/lib/dns/rdata.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdata.c,v 1.3.4.1 2012/06/05 21:15:04 bouyer Exp $	*/
+/*	$NetBSD: rdata.c,v 1.3.4.1.2.1 2012/11/01 16:44:55 matt Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. ("ISC")
@@ -440,6 +440,7 @@
 	isc_buffer_t st;
 	isc_boolean_t use_default = ISC_FALSE;
 	isc_uint32_t activelength;
+	size_t length;
 
 	REQUIRE(dctx != NULL);
 	if (rdata != NULL) {
@@ -470,6 +471,14 @@
 	}
 
 	/*
+	 * Reject any rdata that expands out to more than DNS_RDATA_MAXLENGTH
+	 * as we cannot transmit it.
+	 */
+	length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
+	if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
+		result = DNS_R_FORMERR;
+
+	/*
 	 * We should have consumed all of our buffer.
 	 */
 	if (result == ISC_R_SUCCESS && !buffer_empty(source))
@@ -477,8 +486,7 @@
 
 	if (rdata != NULL && result == ISC_R_SUCCESS) {
 		region.base = isc_buffer_used(&st);
-		region.length = isc_buffer_usedlength(target) -
-				isc_buffer_usedlength(&st);
+		region.length = length;
 		dns_rdata_fromregion(rdata, rdclass, type, &region);
 	}
 
@@ -613,6 +621,7 @@
 	unsigned long line;
 	void (*callback)(dns_rdatacallbacks_t *, const char *, ...);
 	isc_result_t tresult;
+	size_t length;
 
 	REQUIRE(origin == NULL || dns_name_isabsolute(origin) == ISC_TRUE);
 	if (rdata != NULL) {
@@ -684,10 +693,13 @@
 		}
 	} while (1);
 
+	length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
+	if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
+		result = ISC_R_NOSPACE;
+
 	if (rdata != NULL && result == ISC_R_SUCCESS) {
 		region.base = isc_buffer_used(&st);
-		region.length = isc_buffer_usedlength(target) -
-				isc_buffer_usedlength(&st);
+		region.length = length;
 		dns_rdata_fromregion(rdata, rdclass, type, &region);
 	}
 	if (result != ISC_R_SUCCESS) {
@@ -821,6 +833,7 @@
 	isc_buffer_t st;
 	isc_region_t region;
 	isc_boolean_t use_default = ISC_FALSE;
+	size_t length;
 
 	REQUIRE(source != NULL);
 	if (rdata != NULL) {
@@ -835,10 +848,13 @@
 	if (use_default)
 		(void)NULL;
 
+	length = isc_buffer_usedlength(target) - isc_buffer_usedlength(&st);
+	if (result == ISC_R_SUCCESS && length > DNS_RDATA_MAXLENGTH)
+		result = ISC_R_NOSPACE;
+
 	if (rdata != NULL && result == ISC_R_SUCCESS) {
 		region.base = isc_buffer_used(&st);
-		region.length = isc_buffer_usedlength(target) -
-				isc_buffer_usedlength(&st);
+		region.length = length;
 		dns_rdata_fromregion(rdata, rdclass, type, &region);
 	}
 	if (result != ISC_R_SUCCESS)
--- a/external/bsd/bind/dist/lib/dns/rdataslab.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/lib/dns/rdataslab.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: rdataslab.c,v 1.4.4.1 2012/06/05 21:15:02 bouyer Exp $	*/
+/*	$NetBSD: rdataslab.c,v 1.4.4.1.2.1 2012/11/01 16:44:55 matt Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. ("ISC")
@@ -307,6 +307,7 @@
 		length = x[i].rdata.length;
 		if (rdataset->type == dns_rdatatype_rrsig)
 			length++;
+		INSIST(length <= 0xffff);
 		*rawbuf++ = (length & 0xff00) >> 8;
 		*rawbuf++ = (length & 0x00ff);
 #if DNS_RDATASET_FIXED
--- a/external/bsd/bind/dist/lib/dns/tests/Makefile.in	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/lib/dns/tests/Makefile.in	Thu Nov 01 16:44:44 2012 +0000
@@ -39,13 +39,13 @@
 OBJS =		dnstest.@O@
 SRCS =		dnstest.c master_test.c dbiterator_test.c time_test.c \
 		private_test.c update_test.c zonemgr_test.c zt_test.c \
-		dbdiff_test.c nsec3_test.c
+		dbdiff_test.c nsec3_test.c rdata_test.c
 
 SUBDIRS =
 TARGETS =	master_test@EXEEXT@ dbiterator_test@EXEEXT@ time_test@EXEEXT@ \
 		private_test@EXEEXT@ update_test@EXEEXT@ zonemgr_test@EXEEXT@ \
 		zt_test@EXEEXT@ dbversion_test@EXEEXT@ dbdiff_test@EXEEXT@ \
-		nsec3_test@EXEEXT@
+		nsec3_test@EXEEXT@ rdata_test@EXEEXT@ 
 
 @BIND9_MAKE_RULES@
 
@@ -105,6 +105,10 @@
 			nsec3_test.@O@ dnstest.@O@ ${DNSLIBS} \
 				${ISCLIBS} ${LIBS}
 
+rdata_test@EXEEXT@: rdata_test.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
+	${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
+			rdata_test.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
+
 unit::
 	sh ${top_srcdir}/unit/unittest.sh
 
--- a/external/bsd/bind/dist/lib/dns/tests/master_test.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/lib/dns/tests/master_test.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: master_test.c,v 1.1.1.1.4.1 2012/06/06 18:18:18 bouyer Exp $	*/
+/*	$NetBSD: master_test.c,v 1.1.1.1.4.1.2.1 2012/11/01 16:44:56 matt Exp $	*/
 
 /*
  * Copyright (C) 2011, 2012  Internet Systems Consortium, Inc. ("ISC")
@@ -43,7 +43,7 @@
  */
 
 #define	BUFLEN		255
-#define	BIGBUFLEN	(64 * 1024)
+#define	BIGBUFLEN	(70 * 1024)
 #define TEST_ORIGIN	"test"
 
 static dns_masterrawheader_t header;
@@ -230,6 +230,49 @@
 	dns_test_end();
 }
 
+/* Too big rdata test */
+ATF_TC(toobig);
+ATF_TC_HEAD(toobig, tc) {
+	atf_tc_set_md_var(tc, "descr", "dns_master_loadfile() returns "
+				       "ISC_R_NOSPACE when record is too big");
+}
+ATF_TC_BODY(toobig, tc) {
+	isc_result_t result;
+
+	UNUSED(tc);
+
+	result = dns_test_begin(NULL, ISC_FALSE);
+	ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+	result = test_master("testdata/master/master15.data",
+			     dns_masterformat_text);
+	ATF_REQUIRE_EQ(result, ISC_R_NOSPACE);
+
+	dns_test_end();
+}
+
+/* Maximum rdata test */
+ATF_TC(maxrdata);
+ATF_TC_HEAD(maxrdata, tc) {
+	atf_tc_set_md_var(tc, "descr", "dns_master_loadfile() returns "
+				       "ISC_R_SUCCESS when record is maximum "
+				       "size");
+}
+ATF_TC_BODY(maxrdata, tc) {
+	isc_result_t result;
+
+	UNUSED(tc);
+
+	result = dns_test_begin(NULL, ISC_FALSE);
+	ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+	result = test_master("testdata/master/master16.data",
+			     dns_masterformat_text);
+	ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
+
+	dns_test_end();
+}
+
 /* DNSKEY test */
 ATF_TC(dnskey);
 ATF_TC_HEAD(dnskey, tc) {
@@ -532,6 +575,8 @@
 	ATF_TP_ADD_TC(tp, totext);
 	ATF_TP_ADD_TC(tp, loadraw);
 	ATF_TP_ADD_TC(tp, dumpraw);
+	ATF_TP_ADD_TC(tp, toobig);
+	ATF_TP_ADD_TC(tp, maxrdata);
 
 	return (atf_no_error());
 }
--- a/external/bsd/bind/dist/version	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/bind/dist/version	Thu Nov 01 16:44:44 2012 +0000
@@ -7,4 +7,4 @@
 MINORVER=9
 PATCHVER=1
 RELEASETYPE=-P
-RELEASEVER=2
+RELEASEVER=4
--- a/external/bsd/ntp/dist/ntpd/ntp_io.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/ntp/dist/ntpd/ntp_io.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ntp_io.c,v 1.9 2012/02/01 21:21:25 kardel Exp $	*/
+/*	$NetBSD: ntp_io.c,v 1.9.4.1 2012/11/01 16:44:56 matt Exp $	*/
 
 /*
  * ntp_io.c - input/output routines for ntpd.	The socket-opening code
@@ -1592,9 +1592,11 @@
 {
 #ifdef  OS_MISSES_SPECIFIC_ROUTE_UPDATES
 	if (interface->fd != INVALID_SOCKET) {
+		int bcast = (interface->flags & INT_BCASTOPEN) != 0;
 		close_and_delete_fd_from_list(interface->fd);
+		interface->flags &= ~INT_BCASTOPEN;
 		interface->fd = open_socket(&interface->sin,
-					    0, 0, interface);
+					    bcast, 0, interface);
 		 /*
 		  * reset TTL indication so TTL is is set again 
 		  * next time around
@@ -2047,6 +2049,9 @@
 		msyslog(LOG_INFO, "peers refreshed");
 	}
 
+	if (sys_bclient)
+		io_setbclient();
+
 	return new_interface_found;
 }
 
@@ -2074,9 +2079,6 @@
 
 	update_interfaces(port, NULL, NULL);
 
-	if (sys_bclient)
-		io_setbclient();
-
 	/*
 	 * Now that we have opened all the sockets, turn off the reuse
 	 * flag for security.
--- a/external/bsd/wpa/dist/src/eap_server/eap_server_tls_common.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/bsd/wpa/dist/src/eap_server/eap_server_tls_common.c	Thu Nov 01 16:44:44 2012 +0000
@@ -225,6 +225,13 @@
 			return -1;
 		}
 
+		if (len > message_length) {
+			wpa_printf(MSG_INFO, "SSL: Too much data (%zu bytes) "
+				   "in first fragment of frame (TLS Message "
+				   "Length %u bytes)", len, message_length);
+			return -1;
+		}
+
 		data->tls_in = wpabuf_alloc(message_length);
 		if (data->tls_in == NULL) {
 			wpa_printf(MSG_DEBUG, "SSL: No memory for message");
--- a/external/gpl3/binutils/dist/bfd/elf32-vax.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/gpl3/binutils/dist/bfd/elf32-vax.c	Thu Nov 01 16:44:44 2012 +0000
@@ -52,7 +52,7 @@
 
 static bfd_boolean elf32_vax_set_private_flags (bfd *, flagword);
 static bfd_boolean elf32_vax_merge_private_bfd_data (bfd *, bfd *);
-static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, PTR);
+static bfd_boolean elf32_vax_print_private_bfd_data (bfd *, void *);
 
 static reloc_howto_type howto_table[] = {
   HOWTO (R_VAX_NONE,		/* type */
@@ -422,7 +422,7 @@
 #define elf_vax_link_hash_traverse(table, func, info)			\
   (elf_link_hash_traverse						\
    ((table),								\
-    (bfd_boolean (*) (struct elf_link_hash_entry *, PTR)) (func),	\
+    (bfd_boolean (*) (struct elf_link_hash_entry *, void *)) (func),	\
     (info)))
 
 /* Create an entry in an VAX ELF linker hash table.  */
@@ -531,7 +531,7 @@
 
 /* Display the flags field */
 static bfd_boolean
-elf32_vax_print_private_bfd_data (bfd *abfd, PTR ptr)
+elf32_vax_print_private_bfd_data (bfd *abfd, void * ptr)
 {
   FILE *file = (FILE *) ptr;
 
@@ -640,14 +640,13 @@
 	      srelgot = bfd_get_section_by_name (dynobj, ".rela.got");
 	      if (srelgot == NULL)
 		{
+		  flagword flags = (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+				    | SEC_IN_MEMORY | SEC_LINKER_CREATED
+				    | SEC_READONLY);
+
 		  srelgot = bfd_make_section_with_flags (dynobj,
 							 ".rela.got",
-							 (SEC_ALLOC
-							  | SEC_LOAD
-							  | SEC_HAS_CONTENTS
-							  | SEC_IN_MEMORY
-							  | SEC_LINKER_CREATED
-							  | SEC_READONLY));
+							 flags);
 		  if (srelgot == NULL
 		      || !bfd_set_section_alignment (dynobj, srelgot, 2))
 		    return FALSE;
@@ -769,30 +768,14 @@
 		  if (sreloc == NULL)
 		    return FALSE;
 
-#if 0
-		  BFD_ASSERT (CONST_STRNEQ (name, ".rela")
-			      && strcmp (bfd_get_section_name (abfd, sec),
-					 name + 5) == 0);
-
-		  sreloc = bfd_get_section_by_name (dynobj, name);
-		  if (sreloc == NULL)
+		  if (sec->flags & SEC_READONLY)
 		    {
-		      sreloc = bfd_make_section_with_flags (dynobj,
-							    name,
-							    (SEC_ALLOC
-							     | SEC_LOAD
-							     | SEC_HAS_CONTENTS
-							     | SEC_IN_MEMORY
-							     | SEC_LINKER_CREATED
-							     | SEC_READONLY));
-		      if (sreloc == NULL
-			  || !bfd_set_section_alignment (dynobj, sreloc, 2))
-			return FALSE;
+			if (info->warn_shared_textrel)
+			  (*_bfd_error_handler)
+			    (_("warning: dynamic relocation in readonly section `%s'"),
+			     sec->name);
+			info->flags |= DF_TEXTREL;
 		    }
-#endif
-
-		  if (sec->flags & SEC_READONLY)
-		    info->flags |= DF_TEXTREL;
 		}
 
 	      sreloc->size += sizeof (Elf32_External_Rela);
@@ -973,14 +956,14 @@
   if (h->type == STT_FUNC
       || h->needs_plt)
     {
-      if (h->plt.refcount == 0
-	  || SYMBOL_CALLS_LOCAL (info, 0)
+      if (h->plt.refcount <= 0
+	  || SYMBOL_CALLS_LOCAL (info, h)
 	  || (ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
 	      && h->root.type == bfd_link_hash_undefweak))
 	{
 	  /* This case can occur if we saw a PLTxx reloc in an input
 	     file, but the symbol was never referred to by a dynamic
-	     object, or if all references were garbage collected..  In
+	     object, or if all references were garbage collected.  In
 	     such a case, we don't actually need to build a procedure
 	     linkage table, and we can just do a PCxx reloc instead.  */
 	  h->plt.offset = (bfd_vma) -1;
@@ -1057,13 +1040,6 @@
   if (info->shared)
     return TRUE;
 
-  if (h->size == 0)
-    {
-      (*_bfd_error_handler) (_("dynamic variable `%s' is zero size"),
-			     h->root.root.string);
-      return TRUE;
-    }
-
   /* We must allocate the symbol in our .dynbss section, which will
      become part of the .bss section of the executable.  There will be
      an entry for this symbol in the .dynsym section.  The dynamic
@@ -1081,7 +1057,7 @@
      copy the initial value out of the dynamic object and into the
      runtime process image.  We need to remember the offset into the
      .rela.bss section we are going to use.  */
-  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0)
+  if ((h->root.u.def.section->flags & SEC_ALLOC) != 0 && h->size != 0)
     {
       asection *srel;
 
@@ -1151,7 +1127,7 @@
      instantiate (allocate space for them).  */
   elf_link_hash_traverse (elf_hash_table (info),
 			  elf_vax_instantiate_got_entries,
-			  (PTR) info);
+			  info);
 
   /* The check_relocs and adjust_dynamic_symbol entry points have
      determined the sizes of the various dynamic sections.  Allocate
@@ -1295,7 +1271,7 @@
 
 static bfd_boolean
 elf_vax_discard_copies (struct elf_vax_link_hash_entry *h,
-			PTR ignore ATTRIBUTE_UNUSED)
+			void * ignore ATTRIBUTE_UNUSED)
 {
   struct elf_vax_pcrel_relocs_copied *s;
 
@@ -1340,7 +1316,6 @@
 
   if (!elf_hash_table (info)->dynamic_sections_created
       || (info->shared && info->symbolic)
-      || ELF_ST_VISIBILITY (h->other) != STV_DEFAULT
       || h->forced_local)
     {
       h->got.refcount = 0;
@@ -1361,7 +1336,9 @@
 
       dyn = elf_hash_table (info)->dynamic_sections_created;
       /* Allocate space in the .got and .rela.got sections.  */
-      if (info->shared || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h))
+      if (ELF_ST_VISIBILITY (h->other) == STV_DEFAULT
+	  && (info->shared
+	      || WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, 0, h)))
 	{
 	  sgot->size += 4;
 	  srelgot->size += sizeof (Elf32_External_Rela);
@@ -1433,13 +1410,7 @@
 	{
 	  sym = local_syms + r_symndx;
 	  sec = local_sections[r_symndx];
-#if 0 /* XXXMRG */
-	  relocation = (sec->output_section->vma
-			+ sec->output_offset
-			+ sym->st_value);
-#else
 	  relocation = _bfd_elf_rela_local_sym (output_bfd, sym, &sec, rel);
-#endif
 	}
       else
 	{
@@ -1577,7 +1548,6 @@
 	    break;
 
 	  if (h->plt.offset == (bfd_vma) -1
-	      || h->forced_local
 	      || !elf_hash_table (info)->dynamic_sections_created)
 	    {
 	      /* We didn't make a PLT entry for this symbol.  This
@@ -1642,7 +1612,7 @@
 	      && ((r_type != R_VAX_PC8
 		   && r_type != R_VAX_PC16
 		   && r_type != R_VAX_PC32)
-	          || ((input_section->flags & SEC_CODE) != 0
+		  || ((input_section->flags & SEC_CODE)
 		      && (!info->symbolic
 			  || (!h->def_regular && h->type != STT_SECTION)))))
 	    {
@@ -1736,12 +1706,12 @@
 	      if (input_section->flags & SEC_READONLY)
 		 info->flags |= DF_TEXTREL;
 
-	      if (input_section->flags & SEC_READONLY
-		  || (ELF32_R_TYPE(outrel.r_info) != R_VAX_32
-		      && ELF32_R_TYPE(outrel.r_info) != R_VAX_RELATIVE
-		      && ELF32_R_TYPE(outrel.r_info) != R_VAX_COPY
-		      && ELF32_R_TYPE(outrel.r_info) != R_VAX_JMP_SLOT
-		      && ELF32_R_TYPE(outrel.r_info) != R_VAX_GLOB_DAT))
+	      if ((input_section->flags & SEC_READONLY) != 0
+		  || (ELF32_R_TYPE (outrel.r_info) != R_VAX_32
+		      && ELF32_R_TYPE (outrel.r_info) != R_VAX_RELATIVE
+		      && ELF32_R_TYPE (outrel.r_info) != R_VAX_COPY
+		      && ELF32_R_TYPE (outrel.r_info) != R_VAX_JMP_SLOT
+		      && ELF32_R_TYPE (outrel.r_info) != R_VAX_GLOB_DAT))
 		{
 		  if (h != NULL)
 		    (*_bfd_error_handler)
--- a/external/gpl3/gcc/dist/gcc/builtins.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/external/gpl3/gcc/dist/gcc/builtins.c	Thu Nov 01 16:44:44 2012 +0000
@@ -347,7 +347,7 @@
 can_trust_pointer_alignment (void)
 {
   /* We rely on TER to compute accurate alignment information.  */
-  return (optimize && flag_tree_ter);
+  return (!STRICT_ALIGNMENT && optimize && flag_tree_ter);
 }
 
 /* Return the alignment in bits of EXP, a pointer valued expression.
--- a/lib/libc/arch/arm/gen/swapcontext.S	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libc/arch/arm/gen/swapcontext.S	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $	*/
+/*	$NetBSD: swapcontext.S,v 1.5.26.1 2012/11/01 16:44:57 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #include "SYS.h"
 
 #if defined(LIBC_SCCS) && !defined(lint)
-        RCSID("$NetBSD: swapcontext.S,v 1.5 2008/04/28 20:22:55 martin Exp $")
+        RCSID("$NetBSD: swapcontext.S,v 1.5.26.1 2012/11/01 16:44:57 matt Exp $")
 #endif /* LIBC_SCCS && !lint */
 
 ENTRY(swapcontext)
@@ -41,6 +41,7 @@
 	cmp	r0, #0
 	ldmfd	sp!, {r0-r1, lr}
 	RETc(ne)
+	str	sp, [r0, #(36 + 13*4)]	/* Adjust saved SP. */
 	str	lr, [r0, #(36 + 15*4)]	/* Adjust saved PC. */
 #ifdef SOFTFLOAT
 	/* Ahem. */
--- a/lib/libp2k/p2k.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libp2k/p2k.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: p2k.c,v 1.55.4.1 2012/08/12 13:02:59 martin Exp $	*/
+/*	$NetBSD: p2k.c,v 1.55.4.1.2.1 2012/11/01 16:44:57 matt Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009  Antti Kantee.  All Rights Reserved.
@@ -358,6 +358,13 @@
 		}
 	}
 
+	/*
+	 * Explicitely tell that our cookies can be treated as
+	 * puffs_node, since we never let libpuffs know by 
+	 * calling  call puffs_pn_new()
+	 */
+	puffs_flags |= PUFFS_FLAG_PNCOOKIE;
+
 	p2m = allocp2m();
 	if (p2m == NULL)
 		return NULL;
--- a/lib/libperfuse/perfuse.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libperfuse/perfuse.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*  $NetBSD: perfuse.c,v 1.25.2.2 2012/08/12 13:13:20 martin Exp $ */
+/*  $NetBSD: perfuse.c,v 1.25.2.2.2.1 2012/11/01 16:44:57 matt Exp $ */
 
 /*-
  *  Copyright (c) 2010-2011 Emmanuel Dreyfus. All rights reserved.
@@ -682,9 +682,8 @@
 		DWARN("operation unique = %"PRId64" failed", foh->unique);
 		break;
 	default:
-		DERRX(EX_SOFTWARE,
-		     "Unexpected frame: unique = %"PRId64", error = %d",
-		     foh->unique, foh->error);
+		DWARNX("Unexpected frame: unique = %"PRId64", error = %d",
+		        foh->unique, foh->error);
 		/* NOTREACHED */
 		break;
 	}
--- a/lib/libpuffs/dispatcher.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libpuffs/dispatcher.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: dispatcher.c,v 1.38.2.3 2012/08/12 13:13:21 martin Exp $	*/
+/*	$NetBSD: dispatcher.c,v 1.38.2.3.2.1 2012/11/01 16:44:57 matt Exp $	*/
 
 /*
  * Copyright (c) 2006, 2007, 2008 Antti Kantee.  All Rights Reserved.
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: dispatcher.c,v 1.38.2.3 2012/08/12 13:13:21 martin Exp $");
+__RCSID("$NetBSD: dispatcher.c,v 1.38.2.3.2.1 2012/11/01 16:44:57 matt Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -125,7 +125,7 @@
 	struct puffs_req *preq = puffs__framebuf_getdataptr(pcc->pcc_pb);
 	void *auxbuf; /* help with typecasting */
 	puffs_cookie_t opcookie;
-	int error = 0, buildpath;
+	int error = 0, buildpath, pncookie;
 
 	/* XXX: smaller hammer, please */
 	if ((PUFFSOP_OPCLASS(preq->preq_opclass == PUFFSOP_VFS &&
@@ -145,6 +145,9 @@
 	assert((pcc->pcc_flags & PCC_DONE) == 0);
 
 	buildpath = pu->pu_flags & PUFFS_FLAG_BUILDPATH;
+	pncookie = pu->pu_flags & PUFFS_FLAG_PNCOOKIE;
+	assert(!buildpath || pncookie);
+
 	preq->preq_setbacks = 0;
 
 	if (pu->pu_flags & PUFFS_FLAG_OPDUMP)
@@ -302,7 +305,7 @@
 				}
 			}
 
-			if (!error) {
+			if (pncookie && !error) {
 				if (pn == NULL)
 					pn = PU_CMAP(pu, auxt->pvnr_newnode);
 				pn->pn_nlookup++;
@@ -349,7 +352,7 @@
 				}
 			}
 
-			if (!error) {
+			if (pncookie && !error) {
 				if (pn == NULL)
 					pn = PU_CMAP(pu, auxt->pvnr_newnode);
 				pn->pn_nlookup++;
@@ -396,7 +399,7 @@
 				}
 			}
 
-			if (!error) {
+			if (pncookie && !error) {
 				if (pn == NULL)
 					pn = PU_CMAP(pu, auxt->pvnr_newnode);
 				pn->pn_nlookup++;
@@ -701,7 +704,7 @@
 				}
 			}
 
-			if (!error) {
+			if (pncookie && !error) {
 				if (pn == NULL)
 					pn = PU_CMAP(pu, auxt->pvnr_newnode);
 				pn->pn_nlookup++;
@@ -766,7 +769,7 @@
 				}
 			}
 
-			if (!error) {
+			if (pncookie && !error) {
 				if (pn == NULL)
 					pn = PU_CMAP(pu, auxt->pvnr_newnode);
 				pn->pn_nlookup++;
@@ -835,6 +838,12 @@
 			struct puffs_vnmsg_reclaim *auxt = auxbuf;
 			struct puffs_node *pn;
 		
+			if (pops->puffs_node_reclaim2 != NULL) {
+				error = pops->puffs_node_reclaim2(pu, opcookie,
+					     auxt->pvnr_nlookup);
+				break;
+			}
+
 			if (pops->puffs_node_reclaim == NULL) {
 				error = 0;
 				break;
@@ -847,11 +856,13 @@
 			 * but before the reply, leaving the kernel
 			 * with a invalid vnode/cookie reference.
 			 */
-			pn = PU_CMAP(pu, opcookie);
-			pn->pn_nlookup -= auxt->pvnr_nlookup;
-			if (pn->pn_nlookup >= 1) {
-				error = 0;
-				break;
+			if (pncookie) {
+				pn = PU_CMAP(pu, opcookie);
+				pn->pn_nlookup -= auxt->pvnr_nlookup;
+				if (pn->pn_nlookup >= 1) {
+					error = 0;
+					break;
+				}
 			}
 
 			error = pops->puffs_node_reclaim(pu, opcookie);
--- a/lib/libpuffs/pnode.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libpuffs/pnode.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: pnode.c,v 1.10.20.1 2012/04/23 16:48:57 riz Exp $	*/
+/*	$NetBSD: pnode.c,v 1.10.20.1.2.1 2012/11/01 16:44:57 matt Exp $	*/
 
 /*
  * Copyright (c) 2006 Antti Kantee.  All Rights Reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #if !defined(lint)
-__RCSID("$NetBSD: pnode.c,v 1.10.20.1 2012/04/23 16:48:57 riz Exp $");
+__RCSID("$NetBSD: pnode.c,v 1.10.20.1.2.1 2012/11/01 16:44:57 matt Exp $");
 #endif /* !lint */
 
 #include <sys/types.h>
@@ -60,6 +60,8 @@
 
 	LIST_INSERT_HEAD(&pu->pu_pnodelst, pn, pn_entries);
 
+	pu->pu_flags |= PUFFS_FLAG_PNCOOKIE;
+
 	return pn;
 }
 
--- a/lib/libpuffs/puffs.3	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libpuffs/puffs.3	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: puffs.3,v 1.49.2.2 2012/08/12 13:13:21 martin Exp $
+.\"	$NetBSD: puffs.3,v 1.49.2.2.2.1 2012/11/01 16:44:57 matt Exp $
 .\"
 .\" Copyright (c) 2006, 2007, 2008 Antti Kantee.  All rights reserved.
 .\"
@@ -235,6 +235,12 @@
 the one searched for.
 Especially if the file system uses the abovementioned function, it
 is a good idea to define this flag.
+.It Dv PUFFS_FLAG_PNCOOKIE
+Tell puffs that cookies map to
+.Vt struct pnode .
+This is automagically set if
+.Fn puffs_pn_new
+is called.
 .It Dv PUFFS_KFLAG_CACHE_FS_TTL
 Enforce name and attribute caches based on file system-supplied TTL.
 In lookup, create, mknod, mkdir, and symlink, the file system must
--- a/lib/libpuffs/puffs.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libpuffs/puffs.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: puffs.h,v 1.119.4.3 2012/08/12 13:13:21 martin Exp $	*/
+/*	$NetBSD: puffs.h,v 1.119.4.3.2.1 2012/11/01 16:44:57 matt Exp $	*/
 
 /*
  * Copyright (c) 2005, 2006, 2007  Antti Kantee.  All Rights Reserved.
@@ -248,8 +248,10 @@
 	    struct timespec *, int);
 	int (*puffs_node_write2)(struct puffs_usermount *, puffs_cookie_t,
 	    uint8_t *, off_t, size_t *, const struct puffs_cred *, int, int);
+	int (*puffs_node_reclaim2)(struct puffs_usermount *,
+	    puffs_cookie_t, int);
 
-	void *puffs_ops_spare[29];
+	void *puffs_ops_spare[28];
 };
 
 typedef	int (*pu_pathbuild_fn)(struct puffs_usermount *,
@@ -283,7 +285,8 @@
 #define PUFFS_FLAG_BUILDPATH	0x80000000	/* node paths in pnode */
 #define PUFFS_FLAG_OPDUMP	0x40000000	/* dump all operations */
 #define PUFFS_FLAG_HASHPATH	0x20000000	/* speedup: hash paths */
-#define PUFFS_FLAG_MASK		0xe0000000
+#define PUFFS_FLAG_PNCOOKIE	0x10000000	/* cookies are pnodes */
+#define PUFFS_FLAG_MASK		0xf0000000
 
 #define PUFFS_FLAG_KERN(a)	((a) & PUFFS_KFLAG_MASK)
 #define PUFFS_FLAG_LIB(a)	((a) & PUFFS_FLAG_MASK)
@@ -405,7 +408,9 @@
 	    struct timespec *, int);					\
 	int fsname##_node_write2(struct puffs_usermount *,		\
 	    puffs_cookie_t, uint8_t *, off_t, size_t *,			\
-	    const struct puffs_cred *, int, int);
+	    const struct puffs_cred *, int, int);			\
+	int fsname##_node_reclaim2(struct puffs_usermount *,		\
+	    puffs_cookie_t, int);
 
 
 #define PUFFSOP_INIT(ops)						\
--- a/lib/libpuffs/puffs_ops.3	Tue Aug 21 05:36:23 2012 +0000
+++ b/lib/libpuffs/puffs_ops.3	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: puffs_ops.3,v 1.29.4.3 2012/08/12 13:13:21 martin Exp $
+.\"	$NetBSD: puffs_ops.3,v 1.29.4.3.2.1 2012/11/01 16:44:57 matt Exp $
 .\"
 .\" Copyright (c) 2007 Antti Kantee.  All rights reserved.
 .\"
@@ -228,6 +228,10 @@
 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
 .Fc
 .Ft int
+.Fo puffs_node_reclaim2
+.Fa "struct puffs_usermount *pu" "puffs_cookie_t opc" "int nlookup"
+.Fc
+.Ft int
 .Fo puffs_node_inactive
 .Fa "struct puffs_usermount *pu" "puffs_cookie_t opc"
 .Fc
@@ -618,6 +622,8 @@
 open file semantics.
 The data may be removed only when
 .Fn puffs_node_reclaim
+or
+.Fn puffs_node_reclaim2
 is called for the node, as this assures there are no further users.
 .It Fn puffs_node_link "pu" "opc" "targ" "pcn"
 Create a hard link for the node
@@ -792,6 +798,22 @@
 In case the file
 .Fa opc
 has a link count of zero, it may be safely removed now.
+.It Fn puffs_node_reclaim2 "pu" "opc" "nlookup"
+Same as
+.Fn puffs_node_reclaim 
+with an addditional argument for the number of lookups that have been done
+on the node (Node creation is counted as a lookup). This can be used by the
+filesystem to avoid a race condition, where the kernel sends a reclaim 
+while it does not have received the reply for a lookup. If the filesystem
+tracks lookup count, and compares to 
+.Fa nlookup
+it can detect this situation and ignore the reclaim. 
+.Pp
+If the filesystem maps cookies to
+.Vt struct puffs_node
+then the framework will do that work, and 
+.Fn puffs_node_reclaim
+can be reliabily used without the race condition.
 .It Fn puffs_node_abortop "pu" "opc" "pcn"
 In case the operation following lookup (e.g., mkdir or remove) is not
 executed for some reason, abortop will be issued.
@@ -803,6 +825,8 @@
 has lost its last reference in the kernel.
 However, the cookie must still remain valid until
 .Fn puffs_node_reclaim
+or
+.Fn puffs_node_reclaim2
 is called.
 .It Fn puffs_setback "pcc" "op"
 Issue a "setback" operation which will be handled when the request response
--- a/sbin/mount_ptyfs/mount_ptyfs.8	Tue Aug 21 05:36:23 2012 +0000
+++ b/sbin/mount_ptyfs/mount_ptyfs.8	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mount_ptyfs.8,v 1.8 2009/03/18 10:46:58 wiz Exp $
+.\"	$NetBSD: mount_ptyfs.8,v 1.8.10.1 2012/11/01 16:44:57 matt Exp $
 .\"
 .\"
 .\" Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 15, 2009
+.Dd September 19, 2012
 .Dt MOUNT_PTYFS 8
 .Os
 .Sh NAME
@@ -36,7 +36,6 @@
 .Nd mount the /dev/pts file system
 .Sh SYNOPSIS
 .Nm
-.Op Fl c
 .Op Fl g Ar group|gid
 .Op Fl m Ar mode
 .Op Fl o Ar options
@@ -63,10 +62,6 @@
 .Pp
 The options are as follows:
 .Bl -tag -width indent
-.It Fl c
-Allows
-.Ar ptyfs
-to be mounted inside a chrooted environment.
 .It Fl g Ar group|gid
 Specify the group ownership of the slave pseudo-tty.
 .It Fl m Ar mode
@@ -80,9 +75,6 @@
 .Pp
 .Nm
 specific options are
-.Dv chroot
-which corresponds to
-.Fl c ,
 .Dv group
 which corresponds to
 .Fl g ,
@@ -111,5 +103,5 @@
 utility first appeared in
 .Nx 3.0 .
 .Sh BUGS
-This filesystem may not be NFS-exported.
-This filesystem is experimental.
+When multiple instances are mounted, they all display the union of the ptys
+used in each instance, not just the ones used in the particular instance.
--- a/sbin/mount_ptyfs/mount_ptyfs.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sbin/mount_ptyfs/mount_ptyfs.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: mount_ptyfs.c,v 1.12 2011/08/29 14:35:02 joerg Exp $	*/
+/*	$NetBSD: mount_ptyfs.c,v 1.12.6.1 2012/11/01 16:44:57 matt 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.12 2011/08/29 14:35:02 joerg Exp $");
+__RCSID("$NetBSD: mount_ptyfs.c,v 1.12.6.1 2012/11/01 16:44:57 matt Exp $");
 #endif
 #endif /* not lint */
 
@@ -100,14 +100,12 @@
 
 #define ALTF_GROUP	0x1
 #define ALTF_MODE	0x2
-#define ALTF_CHROOT	0x4
 
 static const struct mntopt mopts[] = {
 	MOPT_STDOPTS,
 	MOPT_GETARGS,
 	{ "group", 0, ALTF_GROUP, 1 },
 	{ "mode", 0, ALTF_MODE, 1 },
-	{ "chroot", 0, ALTF_CHROOT, 1 },
 	MOPT_NULL,
 };
 
@@ -165,7 +163,7 @@
 	args.mode = S_IRUSR|S_IWUSR|S_IWGRP;
 	args.flags = 0;
 
-	while ((ch = getopt(argc, argv, "cg:m:o:")) != -1)
+	while ((ch = getopt(argc, argv, "g:m:o:")) != -1)
 		switch (ch) {
 		case 'o':
 			altflags = 0;
@@ -176,13 +174,8 @@
 				args.gid = getgrp(getmntoptstr(mp, "group"));
 			if (altflags & ALTF_MODE)
 				args.mode = (mode_t)getmntoptnum(mp, "mode");
-			if (altflags & ALTF_CHROOT)
-				args.flags |= PTYFSMNT_CHROOT;
 			freemntopts(mp);
 			break;
-		case 'c':
-			args.flags |= PTYFSMNT_CHROOT;
-			break;
 		case 'g':
 			args.gid = getgrp(optarg);
 			break;
@@ -210,11 +203,8 @@
 	if (mount(MOUNT_PTYFS, canon_dir, mntflags, &args, sizeof args) == -1)
 		err(1, "ptyfs on %s", canon_dir);
 	if (mntflags & MNT_GETARGS) {
-		char buf[1024];
-		(void)snprintb(buf, sizeof(buf), PTYFSMNT_BITS, args.flags);
-		printf("version=%d, flags=%s\n", args.version, buf);
-		printf("version=%d, gid=%lu, mode=0%o flags=%s\n", args.version,
-		    (unsigned long)args.gid, args.mode, buf);
+		printf("version=%d, gid=%lu, mode=0%o\n", args.version,
+		    (unsigned long)args.gid, args.mode);
 	}
 	return 0;
 }
@@ -223,7 +213,7 @@
 usage(void)
 {
 	(void)fprintf(stderr,
-	    "Usage: %s [-c] [-g <group|gid>] [-m <mode>] [-o options] "
+	    "Usage: %s [-g <group|gid>] [-m <mode>] [-o options] "
 	    "ptyfs mountpoint\n", getprogname());
 	exit(1);
 }
--- a/share/examples/Makefile	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/examples/Makefile	Thu Nov 01 16:44:44 2012 +0000
@@ -1,6 +1,6 @@
-#	$NetBSD: Makefile,v 1.20 2011/11/12 01:18:40 jmmv Exp $
+#	$NetBSD: Makefile,v 1.20.4.1 2012/11/01 16:44:58 matt Exp $
 
-SUBDIR= amd apm asm disktab emul fstab ftpd getdate hostapd isdn lua pppd \
-	racoon supfiles syslogd wsmoused
+SUBDIR= amd apm asm disktab emul fstab ftpd getdate hostapd \
+        isdn lua npf pppd racoon supfiles syslogd wsmoused
 
 .include <bsd.subdir.mk>
--- a/share/man/man3/rbtree.3	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/man/man3/rbtree.3	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: rbtree.3,v 1.5 2011/03/28 13:46:14 ahoka Exp $
+.\"     $NetBSD: rbtree.3,v 1.5.8.1 2012/11/01 16:44:58 matt Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 17, 2011
+.Dd August 19, 2012
 .Dt RBTREE 3
 .Os
 .Sh NAME
@@ -38,19 +38,19 @@
 .Sh SYNOPSIS
 .In sys/rbtree.h
 .Ft void
-.Fn rb_tree_init "rb_tree_t *" "const rb_tree_ops_t *"
+.Fn rb_tree_init "rb_tree_t *rbt" "const rb_tree_ops_t *ops"
 .Ft void *
-.Fn rb_tree_insert_node "rb_tree_t *" "void *"
+.Fn rb_tree_insert_node "rb_tree_t *rbt" "void *rb"
 .Ft void
-.Fn rb_tree_remove_node "rb_tree_t *" "void *"
+.Fn rb_tree_remove_node "rb_tree_t *rbt" "void *rb"
 .Ft void *
-.Fn rb_tree_find_node "rb_tree_t *" "const void *"
+.Fn rb_tree_find_node "rb_tree_t *rbt" "const void *key"
 .Ft void *
-.Fn rb_tree_find_node_geq "rb_tree_t *" "const void *"
+.Fn rb_tree_find_node_geq "rb_tree_t *rbt" "const void *key"
 .Ft void *
-.Fn rb_tree_find_node_leq "rb_tree_t *" "const void *"
+.Fn rb_tree_find_node_leq "rb_tree_t *rbt" "const void *key"
 .Ft void *
-.Fn rb_tree_iterate "rb_tree_t *" "void *" "const unsigned int"
+.Fn rb_tree_iterate "rb_tree_t *rbt" "void *rb" "const unsigned int direction"
 .Sh DESCRIPTION
 .Nm
 provides red-black trees.
@@ -74,20 +74,39 @@
 .It Vt rb_tree_t
 A red-black tree.
 .It Vt typedef signed int \
-(*const rbto_compare_nodes_fn)(void *, const void *, const void *);
+(*const rbto_compare_nodes_fn)(void *context, const void *node1, const void *node2);
 The node-comparison operator.
 Defines an ordering on nodes.
-Returns a negative value if the first node precedes the second node.
-Returns a positive value if the first node follows the second node.
-Returns 0 if the first node and the second are identical according
-to the ordering.
+Returns a negative value if the first node
+.Ar node1
+precedes the second node
+.Ar node2 .
+Returns a positive value if the first node
+.Ar node1
+follows the second node
+.Ar node2 .
+Returns 0 if the first node
+.Ar node1
+and the second node
+.Ar node2
+are identical according to the ordering.
 .It Vt typedef signed int \
-(*const rbto_compare_key_fn)(void *, const void *, const void *);
+(*const rbto_compare_key_fn)(void *context, const void *node, const void *key);
 The node-key comparison operator.
 Defines the order of nodes and keys.
-Returns a negative value if the node precedes the key.
-Returns a positive value if the node follows the key.
-Returns 0 if the node is identical to the key according to the ordering.
+Returns a negative value if the node
+.Ar node
+precedes the key
+.Ar key .
+Returns a positive value if the node
+.Ar node
+follows the key
+.Ar key .
+Returns 0 if the node
+.Ar node
+is identical to the key
+.Ar key
+according to the ordering.
 .It Vt rb_tree_ops_t
 Defines the operator for comparing two nodes in the same tree,
 the operator for comparing a node in the tree with a key,
--- a/share/man/man5/ifconfig.if.5	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/man/man5/ifconfig.if.5	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: ifconfig.if.5,v 1.15 2011/04/07 00:22:59 jym Exp $
+.\"	$NetBSD: ifconfig.if.5,v 1.15.8.1 2012/11/01 16:44:58 matt Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -87,6 +87,12 @@
 .Dq dhcp ,
 .Xr dhcpcd 8
 will be started for the interface.
+However, it is instead recommended that
+.Sy dhcpcd
+is set to true in
+.Xr rc.conf 5
+and any per interface configuration or restriction is done in
+.Xr dhcpcd.conf 5 .
 .Pp
 If a line is empty, or starts with
 .Sq # ,
--- a/share/man/man5/mk.conf.5	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/man/man5/mk.conf.5	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mk.conf.5,v 1.58 2011/11/06 22:34:47 tron Exp $
+.\"	$NetBSD: mk.conf.5,v 1.58.4.1 2012/11/01 16:44:58 matt Exp $
 .\"
 .\"  Copyright (c) 1999-2003 The NetBSD Foundation, Inc.
 .\"  All rights reserved.
@@ -266,18 +266,6 @@
 acts as
 .Sy MKKERBEROS=no .
 .
-.It Sy MKCRYPTO_IDEA
-.YorN
-Indicates whether IDEA support will be built into
-.Sy libcrypto_idea.a .
-.DFLTn
-.
-.It Sy MKCRYPTO_MDC2
-.YorN
-Indicates whether MDC2 support will be built into
-.Sy libcrypto_mdc2.a .
-.DFLTn
-.
 .It Sy MKCRYPTO_RC5
 .YorN
 Indicates whether RC5 support will be built into
--- a/share/man/man5/rc.conf.5	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/man/man5/rc.conf.5	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: rc.conf.5,v 1.151.2.1 2012/06/23 22:54:59 riz Exp $
+.\"	$NetBSD: rc.conf.5,v 1.151.2.1.2.1 2012/11/01 16:44:58 matt Exp $
 .\"
 .\" Copyright (c) 1996 Matthew R. Green
 .\" All rights reserved.
@@ -642,13 +642,30 @@
 file in the
 .Sy dhclient_flags
 variable - for example, "-lf /tmp/dhclient.leases".
+.It Sy dhcpcd
+Boolean value.
+Set true to configure some or all network interfaces using dhcpcd.
+If you set
+.Sy dhcpcd
+true, then
+.Pa /var
+must be in
+.Sy critical_filesystems_local ,
+or
+.Pa /var
+must be on the root file system.
+If you need to restrict dhcpcd to one or a number of interfaces,
+or need a separate configuration per interface,
+then this should be done in the configuration file - see
+.Xr dhcpcd.conf 5
+for details.
 .It Sy dhcpcd_flags
-Additional arguments to pass to
+Passes
+.Sy dhcpcd_flags
+to dhcpcd.
+See
 .Xr dhcpcd 8
-when requesting configuration via
-.Sy ifconfig_xxN
-or
-.Pa /etc/ifconfig.xxN .
+for complete documentation.
 .It Sy flushroutes
 Boolean value.
 Flushes the route table on networking startup.
@@ -816,12 +833,7 @@
 then the value is split into multiple lines prior to further parsing,
 treating the semicolon as a line separator.
 .Pp
-One common case is to set
-.Sy ifconfig_xxN Ns Li \&= Ns Qq dhcp ,
-which will cause
-.Xr dhcpcd 8
-to be started for the interface.
-Another common case it to set the
+One common case it to set the
 .Sy ifconfig_xxN
 variable to a set of arguments to be passed to an
 .Xr ifconfig 8
--- a/share/man/man7/release.7	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/man/man7/release.7	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"	$NetBSD: release.7,v 1.32 2012/01/14 22:56:31 jmcneill Exp $
+.\"	$NetBSD: release.7,v 1.32.4.1 2012/11/01 16:44:58 matt Exp $
 .\"
 .\" Copyright (c) 1997, 2000, 2005 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd January 14, 2012
+.Dd September 6, 2012
 .Dt RELEASE 7
 .Os
 .Sh NAME
@@ -122,7 +122,35 @@
 files and subdirectories:
 .Pp
 .Bl -tag -width "\*[Lt]machine\*[Gt]"
-.It Sy iso/
+.It Sy images/
+Image files intended for use in installing
+.Nx .
+There are different types of images for different platforms, and sometimes
+multiple different image types for a single platform.
+.Pp
+Images in this directory, unlike images in the
+.Sm off
+.Xo
+.Sy .../NetBSD-
+.Aq Em rel
+.Sy /
+.Aq Em machine
+.Sy /installation/\\*/
+.Xc
+.Sm on
+directories, contain file systems that
+have an internal layout that corresponds to
+a complete release for a given machine type.
+If built with
+.Dq iso-image-source ,
+then it will also contain a
+.Dq source
+directory.
+These images are usually bootable.
+.Bl -tag -width "NetBSD-\*[Lt]rel\*[Gt]-\*[Lt]machine\*[Gt].iso"
+.It Sy MD5
+.It Sy SHA512
+.It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy .iso
 CDROM images in ISO 9660 format, usually created with
 .Dq ./build.sh ... iso-image ...
 after a
@@ -135,30 +163,15 @@
 .Dq ./build.sh -x ... release sourcesets ...
 in
 .Pa src .
-.Pp
-Images in this directory, unlike images in the
-.Sm off
-.Xo
-.Sy .../NetBSD-
-.Aq Em rel
-.Sy /
-.Aq Em machine
-.Sy /installation/cdrom/
-.Xc
-.Sm on
-directory, contain file systems that
-have an internal layout that corresponds to
-a complete release for a given machine type.
-If built with
-.Dq iso-image-source ,
-then it will also contain a
-.Dq source
-directory.
-These images are usually bootable.
-.Bl -tag -width "NetBSD-\*[Lt]rel\*[Gt]-\*[Lt]machine_arch\*[Gt].iso"
-.It Sy MD5
-.It Sy SHA512
-.It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy .iso
+.It Sy NetBSD- Ns Ao Em rel Ac Ns Sy - Ns Ao Em machine Ac Ns Sy -install.img.gz
+Bootable installation images intended to be written to any drive which
+appears as an
+.Xr sd 4
+type, such as USB flash disks.
+These images are created with
+.Dq ./build.sh ... install-image
+in
+.Pa src .
 .El
 .
 .It Sy shared/
--- a/share/mk/bsd.README	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/mk/bsd.README	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.292.2.2 2012/03/02 18:27:55 riz Exp $
+#	$NetBSD: bsd.README,v 1.292.2.2.2.1 2012/11/01 16:44:58 matt Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -140,12 +140,6 @@
 		and also acts as "MKKERBEROS=no".
 		Default: yes
 
-MKCRYPTO_IDEA	If not "no", IDEA support will be built into libcrypto_idea.a.
-		Default: no
-
-MKCRYPTO_MDC2	If not "no", MDC2 support will be built into libcrypto_mdc2.a
-		Default: no
-
 MKCRYPTO_RC5	If not "no", RC5 support will be built into libcrypto_rc5.a.
 		Default: no
 
@@ -1402,8 +1396,6 @@
 		LIBCRT0?=	${DESTDIR}/usr/lib/crt0.o
 		LIBCRYPT?=	${DESTDIR}/usr/lib/libcrypt.a
 		LIBCRYPTO?=	${DESTDIR}/usr/lib/libcrypto.a
-		LIBCRYPTO_IDEA?=${DESTDIR}/usr/lib/libcrypto_idea.a
-		LIBCRYPTO_MDC2?=${DESTDIR}/usr/lib/libcrypto_mdc2.a
 		LIBCRYPTO_RC5?=	${DESTDIR}/usr/lib/libcrypto_rc5.a
 		LIBCURSES?=	${DESTDIR}/usr/lib/libcurses.a
 		LIBC_PIC?=	${DESTDIR}/usr/lib/libc_pic.a
--- a/share/mk/bsd.own.mk	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/mk/bsd.own.mk	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.own.mk,v 1.696.2.2 2012/05/17 18:02:30 riz Exp $
+#	$NetBSD: bsd.own.mk,v 1.696.2.2.2.1 2012/11/01 16:44:58 matt Exp $
 
 # This needs to be before bsd.init.mk
 .if defined(BSD_MK_COMPAT_FILE)
@@ -840,7 +840,7 @@
 #
 _MKVARS.no= \
 	MKBSDGREP MKBSDTAR \
-	MKCATPAGES MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG \
+	MKCATPAGES MKCRYPTO_RC5 MKDEBUG \
 	MKDEBUGLIB MKDTRACE MKEXTSRC \
 	MKMANZ MKOBJDIRS \
 	MKLLVM MKPCC \
--- a/share/zoneinfo/australasia	Tue Aug 21 05:36:23 2012 +0000
+++ b/share/zoneinfo/australasia	Thu Nov 01 16:44:44 2012 +0000
@@ -321,15 +321,23 @@
 # The commencement of daylight saving will remain unchanged and start
 # on the  23rd of October, 2011.
 
+# From the Fiji Government Online Portal (2012-08-21) via Steffen Thorsen:
+# The Minister for Labour, Industrial Relations and Employment Mr Jone Usamate
+# today confirmed that Fiji will start daylight savings at 2 am on Sunday 21st
+# October 2012 and end at 3 am on Sunday 20th January 2013.
+# http://www.fiji.gov.fj/index.php?option=com_content&view=article&id=6702&catid=71&Itemid=155
+#
+# From Paul Eggert (2012-08-31):
+# For now, guess a pattern of the penultimate Sundays in October and January.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Fiji	1998	1999	-	Nov	Sun>=1	2:00	1:00	S
 Rule	Fiji	1999	2000	-	Feb	lastSun	3:00	0	-
 Rule	Fiji	2009	only	-	Nov	29	2:00	1:00	S
 Rule	Fiji	2010	only	-	Mar	lastSun	3:00	0	-
-Rule	Fiji	2010	only	-	Oct	24	2:00	1:00	S
+Rule	Fiji	2010	max	-	Oct	Sun>=18	2:00	1:00	S
 Rule	Fiji	2011	only	-	Mar	Sun>=1	3:00	0	-
-Rule	Fiji	2011	only	-	Oct	23	2:00	1:00	S
-Rule	Fiji	2012	only	-	Jan	22	3:00	0	-
+Rule	Fiji	2012	max	-	Jan	Sun>=18	3:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Pacific/Fiji	11:53:40 -	LMT	1915 Oct 26	# Suva
 			12:00	Fiji	FJ%sT	# Fiji Time
--- a/sys/arch/algor/conf/P5064	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/algor/conf/P5064	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: P5064,v 1.72 2012/02/04 19:02:25 christos Exp $
+#	$NetBSD: P5064,v 1.72.4.1 2012/11/01 16:44:59 matt Exp $
 #
 # Algorithmics P-5064 kernel.
 #
@@ -7,7 +7,7 @@
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"P5064-$Revision: 1.72 $"
+#ident 		"P5064-$Revision: 1.72.4.1 $"
 
 maxusers 32
 
@@ -25,7 +25,7 @@
 options 	DDB			# kernel debugger
 makeoptions	DEBUG="-g"
 #makeoptions	DEBUGLIST="pattern1 pattern2 ..."
-options 	SYMTAB_SPACE=475000
+options 	SYMTAB_SPACE=485000
 
 # File systems
 file-system	FFS		# Fast file system
--- a/sys/arch/amd64/amd64/machdep.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/amd64/amd64/machdep.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.175.2.6 2012/06/12 23:13:07 riz Exp $	*/
+/*	$NetBSD: machdep.c,v 1.175.2.6.2.1 2012/11/01 16:44:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.6 2012/06/12 23:13:07 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.175.2.6.2.1 2012/11/01 16:44:59 matt Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -1758,8 +1758,8 @@
 	/* Determine physical address space */
 	avail_start = first_avail;
 	avail_end = ctob(xen_start_info.nr_pages);
-	pmap_pa_start = XPMAP_OFFSET;
-	pmap_pa_end = pmap_pa_start + ctob(xen_start_info.nr_pages);
+	pmap_pa_start = (KERNTEXTOFF - KERNBASE);
+	pmap_pa_end = avail_end;
 	__PRINTK(("pmap_pa_start 0x%lx avail_start 0x%lx avail_end 0x%lx\n",
 	    pmap_pa_start, avail_start, avail_end));
 #endif	/* !XEN */
--- a/sys/arch/arm/include/byte_swap.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/arm/include/byte_swap.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: byte_swap.h,v 1.8 2008/04/28 20:23:14 martin Exp $	*/
+/*	$NetBSD: byte_swap.h,v 1.8.42.1 2012/11/01 16:44:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1999, 2002 The NetBSD Foundation, Inc.
@@ -40,16 +40,20 @@
 static __inline uint32_t
 __byte_swap_u32_variable(uint32_t v)
 {
+	uint32_t t1;
+
 #ifdef _ARM_ARCH_6
-	__asm("rev\t%0, %1" : "=r" (v) : "0" (v));
-#else
-	uint32_t t1;
+	if (!__builtin_constant_p(v)) {
+		__asm("rev\t%0, %1" : "=r" (v) : "0" (v));
+		return v;
+	}
+#endif
 
 	t1 = v ^ ((v << 16) | (v >> 16));
 	t1 &= 0xff00ffffU;
 	v = (v >> 8) | (v << 24);
 	v ^= (t1 >> 8);
-#endif
+
 	return (v);
 }
 
@@ -59,18 +63,24 @@
 {
 
 #ifdef _ARM_ARCH_6
-	__asm("rev16\t%0, %1" : "=r" (v) : "0" (v));
-#elif !defined(__thumb__)
-	__asm volatile(
-		"mov	%0, %1, ror #8\n"
-		"orr	%0, %0, %0, lsr #16\n"
-		"bic	%0, %0, %0, lsl #16"
-	: "=r" (v)
-	: "0" (v));
-#else
+	if (!__builtin_constant_p(v)) {
+		__asm("rev16\t%0, %1" : "=r" (v) : "0" (v));
+		return v;
+	}
+#elif !defined(__thumb__) && 0	/* gcc produces decent code for this */
+	if (!__builtin_constant_p(v)) {
+		uint32_t v0 = v;
+		__asm volatile(
+			"mov	%0, %1, ror #8\n"
+			"orr	%0, %0, %0, lsr #16\n"
+			"bic	%0, %0, %0, lsl #16"
+		: "=&r" (v0)
+		: "0" (v0));
+		return v0;
+	}
+#endif
 	v &= 0xffff;
 	v = (v >> 8) | (v << 8);
-#endif
 
 	return (v);
 }
--- a/sys/arch/evbmips/conf/MALTA	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/evbmips/conf/MALTA	Thu Nov 01 16:44:44 2012 +0000
@@ -1,10 +1,10 @@
-#	$NetBSD: MALTA,v 1.65 2012/02/09 18:58:14 matt Exp $
+#	$NetBSD: MALTA,v 1.65.4.1 2012/11/01 16:44:59 matt Exp $
 
 include 	"arch/evbmips/conf/std.malta"
 
 #options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"MALTA-$Revision: 1.65 $"
+#ident 		"MALTA-$Revision: 1.65.4.1 $"
 
 maxusers	32
 
@@ -37,7 +37,7 @@
 options 	DDB		# kernel dynamic debugger
 options 	DDB_HISTORY_SIZE=100 # enable history editing in DDB
 makeoptions 	DEBUG="-g"	# compile full symbol table
-options 	SYMTAB_SPACE=445000	# size for embedded symbol table
+options 	SYMTAB_SPACE=475000	# size for embedded symbol table
 
 # Compatibility options
 #options 	COMPAT_43	# compatibility with 4.3BSD binaries
--- a/sys/arch/evbmips/conf/MALTA64	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/evbmips/conf/MALTA64	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: MALTA64,v 1.5 2012/02/09 18:58:44 matt Exp $
+# $NetBSD: MALTA64,v 1.5.4.1 2012/11/01 16:44:59 matt Exp $
 #
 include "arch/evbmips/conf/MALTA"
 
@@ -9,7 +9,7 @@
 options 	EXEC_ELF64
 options 	COMPAT_NETBSD32
 no options 	SYMTAB_SPACE
-options 	SYMTAB_SPACE=480000	# size for embedded symbol table
+options 	SYMTAB_SPACE=490000	# size for embedded symbol table
 
 #options 	UVMHIST, UVMHIST_PRINT
 
--- a/sys/arch/i386/i386/i386func.S	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/i386/i386/i386func.S	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386func.S,v 1.16 2011/06/12 03:35:42 rmind Exp $	*/
+/*	$NetBSD: i386func.S,v 1.16.10.1 2012/11/01 16:44:59 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include <machine/asm.h>
-__KERNEL_RCSID(0, "$NetBSD: i386func.S,v 1.16 2011/06/12 03:35:42 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i386func.S,v 1.16.10.1 2012/11/01 16:44:59 matt Exp $");
 
 #include <machine/specialreg.h>
 #include <machine/segments.h>
@@ -99,9 +99,13 @@
  *
  * (the alternatives not quoted above are not an option here.)
  *
- * If PGE is not in use, we reload CR3.
+ * If PGE is not in use, we reload CR3.  Check for the PGE feature
+ * first since i486 does not have CR4.  Note: the feature flag may
+ * be present while the actual PGE functionality not yet enabled.
  */
 ENTRY(tlbflushg)
+	testl	$CPUID_PGE, _C_LABEL(cpu_feature)
+	jz	1f
 	movl	%cr4, %eax
 	testl	$CR4_PGE, %eax
 	jz	1f
--- a/sys/arch/macppc/conf/GENERIC	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/macppc/conf/GENERIC	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.297 2012/01/23 13:55:02 hauke Exp $
+# $NetBSD: GENERIC,v 1.297.4.1 2012/11/01 16:45:00 matt Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.297 $"
+#ident 		"GENERIC-$Revision: 1.297.4.1 $"
 
 maxusers	32
 
@@ -283,8 +283,8 @@
 chipsfb*	at pci?	function ?	# C&T 65550
 machfb*		at pci? function ?	# ATI Mach 64, Rage, Rage Pro
 
-radeonfb*	at pci? function ?	# ATI Radeon. R3xx is problematic
-options 	RADEONFB_MMAP_BARS	# allow mmap()ing BARs - needed for X
+#radeonfb*	at pci? function ?	# ATI Radeon. R3xx is problematic
+#options 	RADEONFB_MMAP_BARS	# allow mmap()ing BARs - needed for X
 
 voodoofb*	at pci? function ?	# 3Dfx Voodoo3 
 r128fb*		at pci? function ?	# ATI Rage 128
--- a/sys/arch/macppc/include/param.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/macppc/include/param.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.19 2012/02/10 17:35:48 para Exp $	*/
+/*	$NetBSD: param.h,v 1.19.4.1 2012/11/01 16:45:00 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -46,13 +46,6 @@
 #define	MSGBUFSIZE		(3*NBPG)
 #endif
 
-/*
- * Minimum and maximum sizes of the kernel malloc arena in PAGE_SIZE-sized
- * logical pages.
- */
-#define	NKMEMPAGES_MIN_DEFAULT		((16 * 1024 * 1024) >> PAGE_SHIFT)
-#define	NKMEMPAGES_MAX_DEFAULT		((256 * 1024 * 1024) >> PAGE_SHIFT)
-
 #endif /* _KERNEL && !_MODULE */
 
 /* at this offset we mmap() the PCI IO range in display drivers */
--- a/sys/arch/powerpc/include/param.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/powerpc/include/param.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.27 2012/01/30 06:04:32 matt Exp $	*/
+/*	$NetBSD: param.h,v 1.27.4.1 2012/11/01 16:45:00 matt Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -110,7 +110,7 @@
 #define	NKMEMPAGES_MIN_DEFAULT	((16 * 1024 * 1024) >> PAGE_SHIFT)
 #endif
 #ifndef NKMEMPAGES_MAX_DEFAULT
-#define	NKMEMPAGES_MAX_DEFAULT	((128 * 1024 * 1024) >> PAGE_SHIFT)
+#define	NKMEMPAGES_MAX_DEFAULT	((256 * 1024 * 1024) >> PAGE_SHIFT)
 #endif
 
 #if defined(_KERNEL) && !defined(_LOCORE)
--- a/sys/arch/powerpc/pic/intr.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/powerpc/pic/intr.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.20.2.1 2012/06/12 19:35:46 riz Exp $ */
+/*	$NetBSD: intr.c,v 1.20.2.1.2.1 2012/11/01 16:45:00 matt Exp $ */
 
 /*-
  * Copyright (c) 2007 Michael Lorenz
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20.2.1 2012/06/12 19:35:46 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.20.2.1.2.1 2012/11/01 16:45:00 matt Exp $");
 
 #include "opt_interrupt.h"
 #include "opt_multiprocessor.h"
@@ -352,8 +352,9 @@
 static void
 intr_calculatemasks(void)
 {
-	imask_t newmask[NIPL] = { [IPL_NONE...IPL_HIGH] = 0 };
+	imask_t newmask[NIPL];
 	struct intr_source *is;
+	struct intrhand *ih;
 	int irq;
 
 	for (u_int ipl = IPL_NONE; ipl < NIPL; ipl++) {
@@ -362,7 +363,9 @@
 
 	/* First, figure out which ipl each IRQ uses. */
 	for (irq = 0, is = intrsources; irq < NVIRQ; irq++, is++) {
-		newmask[is->is_ipl] |= PIC_VIRQ_TO_MASK(irq);
+		for (ih = is->is_hand; ih != NULL; ih = ih->ih_next) {
+			newmask[ih->ih_ipl] |= PIC_VIRQ_TO_MASK(irq);
+		}
 	}
 
 	/*
@@ -379,7 +382,7 @@
 		newmask[ipl] |= newmask[ipl - 1];
 	}
 
-#ifdef DEBUG_IPL
+#ifdef PIC_DEBUG
 	for (u_int ipl = 0; ipl < NIPL; ipl++) {
 		printf("%u: %08x -> %08x\n", ipl, imask[ipl], newmask[ipl]);
 	}
@@ -661,10 +664,10 @@
 void
 genppc_cpu_configure(void)
 {
-	aprint_normal("biomask %x netmask %x ttymask %x\n",
-	    (u_int)imask[IPL_BIO] & 0x1fffffff,
-	    (u_int)imask[IPL_NET] & 0x1fffffff,
-	    (u_int)imask[IPL_TTY] & 0x1fffffff);
+	aprint_normal("vmmask %x schedmask %x highmask %x\n",
+	    (u_int)imask[IPL_VM] & 0x7fffffff,
+	    (u_int)imask[IPL_SCHED] & 0x7fffffff,
+	    (u_int)imask[IPL_HIGH] & 0x7fffffff);
 
 	spl0();
 }
--- a/sys/arch/powerpc/powerpc/trap.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/powerpc/powerpc/trap.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.145 2011/09/27 01:02:36 jym Exp $	*/
+/*	$NetBSD: trap.c,v 1.145.10.1 2012/11/01 16:45:00 matt Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.145 2011/09/27 01:02:36 jym Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.145.10.1 2012/11/01 16:45:00 matt Exp $");
 
 #include "opt_altivec.h"
 #include "opt_ddb.h"
@@ -258,7 +258,9 @@
 			break;
 		}
 		ci->ci_ev_udsi_fatal.ev_count++;
-		if (cpu_printfataltraps) {
+		if (cpu_printfataltraps
+		    && (p->p_slflag & PSL_TRACED) == 0
+		    && !sigismember(&p->p_sigctx.ps_sigcatch, SIGSEGV)) {
 			printf("trap: pid %d.%d (%s): user %s DSI trap @ %#lx "
 			    "by %#lx (DSISR %#x, err=%d)\n",
 			    p->p_pid, l->l_lid, p->p_comm,
@@ -325,7 +327,9 @@
 			break;
 		}
 		ci->ci_ev_isi_fatal.ev_count++;
-		if (cpu_printfataltraps) {
+		if (cpu_printfataltraps
+		    && (p->p_slflag & PSL_TRACED) == 0
+		    && !sigismember(&p->p_sigctx.ps_sigcatch, SIGSEGV)) {
 			printf("trap: pid %d.%d (%s): user ISI trap @ %#lx "
 			    "(SRR1=%#lx)\n", p->p_pid, l->l_lid, p->p_comm,
 			    tf->tf_srr0, tf->tf_srr1);
@@ -352,7 +356,9 @@
 		ci->ci_ev_ali.ev_count++;
 		if (fix_unaligned(l, tf) != 0) {
 			ci->ci_ev_ali_fatal.ev_count++;
-			if (cpu_printfataltraps) {
+			if (cpu_printfataltraps
+			    && (p->p_slflag & PSL_TRACED) == 0
+			    && !sigismember(&p->p_sigctx.ps_sigcatch, SIGBUS)) {
 				printf("trap: pid %d.%d (%s): user ALI trap @ "
 				    "%#lx by %#lx (DSISR %#x)\n",
 				    p->p_pid, l->l_lid, p->p_comm,
@@ -376,7 +382,9 @@
 		vec_load();
 		break;
 #else
-		if (cpu_printfataltraps) {
+		if (cpu_printfataltraps
+		    && (p->p_slflag & PSL_TRACED) == 0
+		    && !sigismember(&p->p_sigctx.ps_sigcatch, SIGILL)) {
 			printf("trap: pid %d.%d (%s): user VEC trap @ %#lx "
 			    "(SRR1=%#lx)\n",
 			    p->p_pid, l->l_lid, p->p_comm,
@@ -392,7 +400,9 @@
 #endif
 	case EXC_MCHK|EXC_USER:
 		ci->ci_ev_umchk.ev_count++;
-		if (cpu_printfataltraps) {
+		if (cpu_printfataltraps
+		    && (p->p_slflag & PSL_TRACED) == 0
+		    && !sigismember(&p->p_sigctx.ps_sigcatch, SIGBUS)) {
 			printf("trap: pid %d (%s): user MCHK trap @ %#lx "
 			    "(SRR1=%#lx)\n",
 			    p->p_pid, p->p_comm, tf->tf_srr0, tf->tf_srr1);
@@ -436,10 +446,14 @@
 				ksi.ksi_code = ILL_PRVOPC;
 			} else
 				ksi.ksi_code = ILL_ILLOPC;
-			if (cpu_printfataltraps)
+			if (cpu_printfataltraps
+			    && (p->p_slflag & PSL_TRACED) == 0
+			    && !sigismember(&p->p_sigctx.ps_sigcatch,
+				    ksi.ksi_signo)) {
 				printf("trap: pid %d.%d (%s): user PGM trap @"
 				    " %#lx (SRR1=%#lx)\n", p->p_pid, l->l_lid,
 				    p->p_comm, tf->tf_srr0, tf->tf_srr1);
+			}
 			(*p->p_emul->e_trapsignal)(l, &ksi);
 		}
 		break;
--- a/sys/arch/vax/vax/machdep.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/vax/vax/machdep.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.185.2.1 2012/05/21 15:25:56 riz Exp $	 */
+/* $NetBSD: machdep.c,v 1.185.2.1.2.1 2012/11/01 16:45:01 matt Exp $	 */
 
 /*
  * Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -83,7 +83,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185.2.1 2012/05/21 15:25:56 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.185.2.1.2.1 2012/11/01 16:45:01 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -247,6 +247,13 @@
 	 */
 	if (dumplo < btodb(PAGE_SIZE))
 		dumplo = btodb(PAGE_SIZE);
+
+	/*
+	 * If we have nothing to dump (XXX implement crash dumps),
+	 * make it clear for savecore that there is no dump.
+	 */
+	if (dumpsize <= 0)
+		dumplo = 0;
 }
 
 static int
--- a/sys/arch/x86/acpi/acpi_wakeup.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/arch/x86/acpi/acpi_wakeup.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: acpi_wakeup.c,v 1.29.8.1 2012/05/09 03:22:54 riz Exp $	*/
+/*	$NetBSD: acpi_wakeup.c,v 1.29.8.1.2.1 2012/11/01 16:45:01 matt Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2011 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.29.8.1 2012/05/09 03:22:54 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.29.8.1.2.1 2012/11/01 16:45:01 matt Exp $");
 
 /*-
  * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
@@ -62,7 +62,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.29.8.1 2012/05/09 03:22:54 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: acpi_wakeup.c,v 1.29.8.1.2.1 2012/11/01 16:45:01 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -320,7 +320,7 @@
 	/* Save and suspend Application Processors. */
 	x86_broadcast_ipi(X86_IPI_ACPI_CPU_SLEEP);
 	cid = cpu_index(curcpu());
-	while (!kcpuset_isotherset(kcpuset_running, cid)) {
+	while (kcpuset_isotherset(kcpuset_running, cid)) {
 		delay(1);
 	}
 #endif
--- a/sys/dev/ic/isp_netbsd.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/ic/isp_netbsd.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_netbsd.c,v 1.85 2011/12/12 18:28:34 jdc Exp $ */
+/* $NetBSD: isp_netbsd.c,v 1.85.4.1 2012/11/01 16:45:01 matt Exp $ */
 /*
  * Platform (NetBSD) dependent common attachment code for Qlogic adapters.
  */
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.85 2011/12/12 18:28:34 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_netbsd.c,v 1.85.4.1 2012/11/01 16:45:01 matt Exp $");
 
 #include <dev/ic/isp_netbsd.h>
 #include <dev/ic/isp_ioctl.h>
@@ -1603,14 +1603,14 @@
 		tv.tv_sec = 0;
 		tv.tv_usec = 0;
 		for (olim = 0; olim < maxc; olim++) {
-			utv.tv_sec = 0;
-			utv.tv_usec = usecs;
+			utv.tv_sec = usecs / 1000000;
+			utv.tv_usec = usecs % 1000000;
 			timeradd(&tv, &utv, &tv);
 		}
-		timeradd(&tv, &start, &tv);
-		to = tvhzto(&tv);
+		to = tvtohz(&tv);
 		if (to == 0)
 			to = 1;
+		timeradd(&tv, &start, &tv);
 
 		isp->isp_osinfo.mbox_sleep_ok = 0;
 		isp->isp_osinfo.mbox_sleeping = 1;
--- a/sys/dev/pci/ehci_pci.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/pci/ehci_pci.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ehci_pci.c,v 1.54 2012/01/30 19:41:19 drochner Exp $	*/
+/*	$NetBSD: ehci_pci.c,v 1.54.4.1 2012/11/01 16:45:01 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.54 2012/01/30 19:41:19 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ehci_pci.c,v 1.54.4.1 2012/11/01 16:45:01 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -386,10 +386,8 @@
 		legsup = pci_conf_read(pc, tag, addr + PCI_EHCI_USBLEGSUP);
 		if (legsup & EHCI_LEG_HC_BIOS_OWNED) {
 			/* Ask BIOS to give up ownership */
-			legsup &= ~EHCI_LEG_HC_BIOS_OWNED;
-			legsup |= EHCI_LEG_HC_OS_OWNED;
 			pci_conf_write(pc, tag, addr + PCI_EHCI_USBLEGSUP,
-			    legsup);
+			    legsup | EHCI_LEG_HC_OS_OWNED);
 			for (ms = 0; ms < EHCI_MAX_BIOS_WAIT; ms++) {
 				legsup = pci_conf_read(pc, tag,
 				    addr + PCI_EHCI_USBLEGSUP);
--- a/sys/dev/pci/if_wm.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/pci/if_wm.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.227.2.2 2012/08/09 08:00:55 martin Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.227.2.2.2.1 2012/11/01 16:45:01 matt Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -76,7 +76,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.2 2012/08/09 08:00:55 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.227.2.2.2.1 2012/11/01 16:45:01 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -194,7 +194,10 @@
 	 * The transmit descriptors.  Put these at the end, because
 	 * we might use a smaller number of them.
 	 */
-	wiseman_txdesc_t wcd_txdescs[WM_NTXDESC_82544];
+	union {
+		wiseman_txdesc_t wcdu_txdescs[WM_NTXDESC_82544];
+		nq_txdesc_t      wcdu_nq_txdescs[WM_NTXDESC_82544];
+	} wdc_u;
 };
 
 struct wm_control_data_82542 {
@@ -203,7 +206,7 @@
 };
 
 #define	WM_CDOFF(x)	offsetof(struct wm_control_data_82544, x)
-#define	WM_CDTXOFF(x)	WM_CDOFF(wcd_txdescs[(x)])
+#define	WM_CDTXOFF(x)	WM_CDOFF(wdc_u.wcdu_txdescs[(x)])
 #define	WM_CDRXOFF(x)	WM_CDOFF(wcd_rxdescs[(x)])
 
 /*
@@ -294,7 +297,8 @@
 	int sc_cd_rseg;			/* real number of control segment */
 	size_t sc_cd_size;		/* control data size */
 #define	sc_cddma	sc_cddmamap->dm_segs[0].ds_addr
-#define	sc_txdescs	sc_control_data->wcd_txdescs
+#define	sc_txdescs	sc_control_data->wdc_u.wcdu_txdescs
+#define	sc_nq_txdescs	sc_control_data->wdc_u.wcdu_nq_txdescs
 #define	sc_rxdescs	sc_control_data->wcd_rxdescs
 
 #ifdef WM_EVENT_COUNTERS
@@ -490,6 +494,7 @@
 } while (/*CONSTCOND*/0)
 
 static void	wm_start(struct ifnet *);
+static void	wm_nq_start(struct ifnet *);
 static void	wm_watchdog(struct ifnet *);
 static int	wm_ifflags_cb(struct ethercom *);
 static int	wm_ioctl(struct ifnet *, u_long, void *);
@@ -1877,7 +1882,10 @@
 	ifp->if_softc = sc;
 	ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
 	ifp->if_ioctl = wm_ioctl;
-	ifp->if_start = wm_start;
+	if ((sc->sc_flags & WM_F_NEWQUEUE) != 0)
+		ifp->if_start = wm_nq_start;
+	else
+		ifp->if_start = wm_start;
 	ifp->if_watchdog = wm_watchdog;
 	ifp->if_init = wm_init;
 	ifp->if_stop = wm_stop;
@@ -1926,9 +1934,7 @@
 	/*
 	 * If we're a i82543 or greater, we can support VLANs.
 	 */
-	if (sc->sc_type == WM_T_82575 || sc->sc_type == WM_T_82576)
-		sc->sc_ethercom.ec_capabilities |= ETHERCAP_VLAN_MTU;
-	else if (sc->sc_type >= WM_T_82543)
+	if (sc->sc_type >= WM_T_82543)
 		sc->sc_ethercom.ec_capabilities |=
 		    ETHERCAP_VLAN_MTU | ETHERCAP_VLAN_HWTAGGING;
 
@@ -2761,6 +2767,483 @@
 }
 
 /*
+ * wm_nq_tx_offload:
+ *
+ *	Set up TCP/IP checksumming parameters for the
+ *	specified packet, for NEWQUEUE devices
+ */
+static int
+wm_nq_tx_offload(struct wm_softc *sc, struct wm_txsoft *txs,
+    uint32_t *cmdlenp, uint32_t *fieldsp, bool *do_csum)
+{
+	struct mbuf *m0 = txs->txs_mbuf;
+	struct m_tag *mtag;
+	uint32_t vl_len, mssidx, cmdc;
+	struct ether_header *eh;
+	int offset, iphl;
+
+	/*
+	 * XXX It would be nice if the mbuf pkthdr had offset
+	 * fields for the protocol headers.
+	 */
+	*cmdlenp = 0;
+	*fieldsp = 0;
+
+	eh = mtod(m0, struct ether_header *);
+	switch (htons(eh->ether_type)) {
+	case ETHERTYPE_IP:
+	case ETHERTYPE_IPV6:
+		offset = ETHER_HDR_LEN;
+		break;
+
+	case ETHERTYPE_VLAN:
+		offset = ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN;
+		break;
+
+	default:
+		/*
+		 * Don't support this protocol or encapsulation.
+		 */
+		*do_csum = false;
+		return 0;
+	}
+	*do_csum = true;
+	*cmdlenp = NQTX_DTYP_D | NQTX_CMD_DEXT | NQTX_CMD_IFCS;
+	cmdc = NQTX_DTYP_C | NQTX_CMD_DEXT;
+
+	vl_len = (offset << NQTXC_VLLEN_MACLEN_SHIFT);
+	KASSERT((offset & ~NQTXC_VLLEN_MACLEN_MASK) == 0);
+
+	if ((m0->m_pkthdr.csum_flags &
+	    (M_CSUM_TSOv4|M_CSUM_UDPv4|M_CSUM_TCPv4|M_CSUM_IPv4)) != 0) {
+		iphl = M_CSUM_DATA_IPv4_IPHL(m0->m_pkthdr.csum_data);
+	} else {
+		iphl = M_CSUM_DATA_IPv6_HL(m0->m_pkthdr.csum_data);
+	}
+	vl_len |= (iphl << NQTXC_VLLEN_IPLEN_SHIFT);
+	KASSERT((iphl & ~NQTXC_VLLEN_IPLEN_MASK) == 0);
+
+	if ((mtag = VLAN_OUTPUT_TAG(&sc->sc_ethercom, m0)) != NULL) {
+		vl_len |= ((VLAN_TAG_VALUE(mtag) & NQTXC_VLLEN_VLAN_MASK)
+		     << NQTXC_VLLEN_VLAN_SHIFT);
+		*cmdlenp |= NQTX_CMD_VLE;
+	}
+
+	mssidx = 0;
+
+	if ((m0->m_pkthdr.csum_flags & (M_CSUM_TSOv4 | M_CSUM_TSOv6)) != 0) {
+		int hlen = offset + iphl;
+		int tcp_hlen;
+		bool v4 = (m0->m_pkthdr.csum_flags & M_CSUM_TSOv4) != 0;
+
+		if (__predict_false(m0->m_len <
+				    (hlen + sizeof(struct tcphdr)))) {
+			/*
+			 * TCP/IP headers are not in the first mbuf; we need
+			 * to do this the slow and painful way.  Let's just
+			 * hope this doesn't happen very often.
+			 */
+			struct tcphdr th;
+
+			WM_EVCNT_INCR(&sc->sc_ev_txtsopain);
+
+			m_copydata(m0, hlen, sizeof(th), &th);
+			if (v4) {
+				struct ip ip;
+
+				m_copydata(m0, offset, sizeof(ip), &ip);
+				ip.ip_len = 0;
+				m_copyback(m0,
+				    offset + offsetof(struct ip, ip_len),
+				    sizeof(ip.ip_len), &ip.ip_len);
+				th.th_sum = in_cksum_phdr(ip.ip_src.s_addr,
+				    ip.ip_dst.s_addr, htons(IPPROTO_TCP));
+			} else {
+				struct ip6_hdr ip6;
+
+				m_copydata(m0, offset, sizeof(ip6), &ip6);
+				ip6.ip6_plen = 0;
+				m_copyback(m0,
+				    offset + offsetof(struct ip6_hdr, ip6_plen),
+				    sizeof(ip6.ip6_plen), &ip6.ip6_plen);
+				th.th_sum = in6_cksum_phdr(&ip6.ip6_src,
+				    &ip6.ip6_dst, 0, htonl(IPPROTO_TCP));
+			}
+			m_copyback(m0, hlen + offsetof(struct tcphdr, th_sum),
+			    sizeof(th.th_sum), &th.th_sum);
+
+			tcp_hlen = th.th_off << 2;
+		} else {
+			/*
+			 * TCP/IP headers are in the first mbuf; we can do
+			 * this the easy way.
+			 */
+			struct tcphdr *th;
+
+			if (v4) {
+				struct ip *ip =
+				    (void *)(mtod(m0, char *) + offset);
+				th = (void *)(mtod(m0, char *) + hlen);
+
+				ip->ip_len = 0;
+				th->th_sum = in_cksum_phdr(ip->ip_src.s_addr,
+				    ip->ip_dst.s_addr, htons(IPPROTO_TCP));
+			} else {
+				struct ip6_hdr *ip6 =
+				    (void *)(mtod(m0, char *) + offset);
+				th = (void *)(mtod(m0, char *) + hlen);
+
+				ip6->ip6_plen = 0;
+				th->th_sum = in6_cksum_phdr(&ip6->ip6_src,
+				    &ip6->ip6_dst, 0, htonl(IPPROTO_TCP));
+			}
+			tcp_hlen = th->th_off << 2;
+		}
+		hlen += tcp_hlen;
+		*cmdlenp |= NQTX_CMD_TSE;
+
+		if (v4) {
+			WM_EVCNT_INCR(&sc->sc_ev_txtso);
+			*fieldsp |= NQTXD_FIELDS_IXSM | NQTXD_FIELDS_TUXSM;
+		} else {
+			WM_EVCNT_INCR(&sc->sc_ev_txtso6);
+			*fieldsp |= NQTXD_FIELDS_TUXSM;
+		}
+		*fieldsp |= ((m0->m_pkthdr.len - hlen) << NQTXD_FIELDS_PAYLEN_SHIFT);
+		KASSERT(((m0->m_pkthdr.len - hlen) & ~NQTXD_FIELDS_PAYLEN_MASK) == 0);
+		mssidx |= (m0->m_pkthdr.segsz << NQTXC_MSSIDX_MSS_SHIFT);
+		KASSERT((m0->m_pkthdr.segsz & ~NQTXC_MSSIDX_MSS_MASK) == 0);
+		mssidx |= (tcp_hlen << NQTXC_MSSIDX_L4LEN_SHIFT);
+		KASSERT((tcp_hlen & ~NQTXC_MSSIDX_L4LEN_MASK) == 0);
+	} else {
+		*fieldsp |= (m0->m_pkthdr.len << NQTXD_FIELDS_PAYLEN_SHIFT);
+		KASSERT((m0->m_pkthdr.len & ~NQTXD_FIELDS_PAYLEN_MASK) == 0);
+	}
+
+	if (m0->m_pkthdr.csum_flags & M_CSUM_IPv4) {
+		*fieldsp |= NQTXD_FIELDS_IXSM;
+		cmdc |= NQTXC_CMD_IP4;
+	}
+
+	if (m0->m_pkthdr.csum_flags &
+	    (M_CSUM_UDPv4 | M_CSUM_TCPv4 | M_CSUM_TSOv4)) {
+		WM_EVCNT_INCR(&sc->sc_ev_txtusum);
+		if (m0->m_pkthdr.csum_flags & (M_CSUM_TCPv4 | M_CSUM_TSOv4)) {
+			cmdc |= NQTXC_CMD_TCP;
+		} else {
+			cmdc |= NQTXC_CMD_UDP;
+		}
+		cmdc |= NQTXC_CMD_IP4;
+		*fieldsp |= NQTXD_FIELDS_TUXSM;
+	}
+	if (m0->m_pkthdr.csum_flags &
+	    (M_CSUM_UDPv6 | M_CSUM_TCPv6 | M_CSUM_TSOv6)) {
+		WM_EVCNT_INCR(&sc->sc_ev_txtusum6);
+		if (m0->m_pkthdr.csum_flags & (M_CSUM_TCPv6 | M_CSUM_TSOv6)) {
+			cmdc |= NQTXC_CMD_TCP;
+		} else {
+			cmdc |= NQTXC_CMD_UDP;
+		}
+		cmdc |= NQTXC_CMD_IP6;
+		*fieldsp |= NQTXD_FIELDS_TUXSM;
+	}
+
+	/* Fill in the context descriptor. */
+	sc->sc_nq_txdescs[sc->sc_txnext].nqrx_ctx.nqtxc_vl_len =
+	    htole32(vl_len);
+	sc->sc_nq_txdescs[sc->sc_txnext].nqrx_ctx.nqtxc_sn = 0;
+	sc->sc_nq_txdescs[sc->sc_txnext].nqrx_ctx.nqtxc_cmd = 
+	    htole32(cmdc);
+	sc->sc_nq_txdescs[sc->sc_txnext].nqrx_ctx.nqtxc_mssidx = 
+	    htole32(mssidx);
+	WM_CDTXSYNC(sc, sc->sc_txnext, 1, BUS_DMASYNC_PREWRITE);
+	DPRINTF(WM_DEBUG_TX,
+	    ("%s: TX: context desc %d 0x%08x%08x\n", device_xname(sc->sc_dev),
+	    sc->sc_txnext, 0, vl_len));
+	DPRINTF(WM_DEBUG_TX, ("\t0x%08x%08x\n", mssidx, cmdc));
+	sc->sc_txnext = WM_NEXTTX(sc, sc->sc_txnext);
+	txs->txs_ndesc++;
+	return 0;
+}
+
+/*
+ * wm_nq_start:		[ifnet interface function]
+ *
+ *	Start packet transmission on the interface for NEWQUEUE devices
+ */
+static void
+wm_nq_start(struct ifnet *ifp)
+{
+	struct wm_softc *sc = ifp->if_softc;
+	struct mbuf *m0;
+	struct m_tag *mtag;
+	struct wm_txsoft *txs;
+	bus_dmamap_t dmamap;
+	int error, nexttx, lasttx = -1, seg, segs_needed;
+	bool do_csum, sent;
+
+	if ((ifp->if_flags & (IFF_RUNNING|IFF_OACTIVE)) != IFF_RUNNING)
+		return;
+
+	sent = false;
+
+	/*
+	 * Loop through the send queue, setting up transmit descriptors
+	 * until we drain the queue, or use up all available transmit
+	 * descriptors.
+	 */
+	for (;;) {
+		/* Grab a packet off the queue. */
+		IFQ_POLL(&ifp->if_snd, m0);
+		if (m0 == NULL)
+			break;
+
+		DPRINTF(WM_DEBUG_TX,
+		    ("%s: TX: have packet to transmit: %p\n",
+		    device_xname(sc->sc_dev), m0));
+
+		/* Get a work queue entry. */
+		if (sc->sc_txsfree < WM_TXQUEUE_GC(sc)) {
+			wm_txintr(sc);
+			if (sc->sc_txsfree == 0) {
+				DPRINTF(WM_DEBUG_TX,
+				    ("%s: TX: no free job descriptors\n",
+					device_xname(sc->sc_dev)));
+				WM_EVCNT_INCR(&sc->sc_ev_txsstall);
+				break;
+			}
+		}
+
+		txs = &sc->sc_txsoft[sc->sc_txsnext];
+		dmamap = txs->txs_dmamap;
+
+		/*
+		 * Load the DMA map.  If this fails, the packet either
+		 * didn't fit in the allotted number of segments, or we
+		 * were short on resources.  For the too-many-segments
+		 * case, we simply report an error and drop the packet,
+		 * since we can't sanely copy a jumbo packet to a single
+		 * buffer.
+		 */
+		error = bus_dmamap_load_mbuf(sc->sc_dmat, dmamap, m0,
+		    BUS_DMA_WRITE|BUS_DMA_NOWAIT);
+		if (error) {
+			if (error == EFBIG) {
+				WM_EVCNT_INCR(&sc->sc_ev_txdrop);
+				log(LOG_ERR, "%s: Tx packet consumes too many "
+				    "DMA segments, dropping...\n",
+				    device_xname(sc->sc_dev));
+				IFQ_DEQUEUE(&ifp->if_snd, m0);
+				wm_dump_mbuf_chain(sc, m0);
+				m_freem(m0);
+				continue;
+			}
+			/*
+			 * Short on resources, just stop for now.
+			 */
+			DPRINTF(WM_DEBUG_TX,
+			    ("%s: TX: dmamap load failed: %d\n",
+			    device_xname(sc->sc_dev), error));
+			break;
+		}
+
+		segs_needed = dmamap->dm_nsegs;
+
+		/*
+		 * Ensure we have enough descriptors free to describe
+		 * the packet.  Note, we always reserve one descriptor
+		 * at the end of the ring due to the semantics of the
+		 * TDT register, plus one more in the event we need
+		 * to load offload context.
+		 */
+		if (segs_needed > sc->sc_txfree - 2) {
+			/*
+			 * Not enough free descriptors to transmit this
+			 * packet.  We haven't committed anything yet,
+			 * so just unload the DMA map, put the packet
+			 * pack on the queue, and punt.  Notify the upper
+			 * layer that there are no more slots left.
+			 */
+			DPRINTF(WM_DEBUG_TX,
+			    ("%s: TX: need %d (%d) descriptors, have %d\n",
+			    device_xname(sc->sc_dev), dmamap->dm_nsegs,
+			    segs_needed, sc->sc_txfree - 1));
+			ifp->if_flags |= IFF_OACTIVE;
+			bus_dmamap_unload(sc->sc_dmat, dmamap);
+			WM_EVCNT_INCR(&sc->sc_ev_txdstall);
+			break;
+		}
+
+		IFQ_DEQUEUE(&ifp->if_snd, m0);
+
+		/*
+		 * WE ARE NOW COMMITTED TO TRANSMITTING THE PACKET.
+		 */
+
+		DPRINTF(WM_DEBUG_TX,
+		    ("%s: TX: packet has %d (%d) DMA segments\n",
+		    device_xname(sc->sc_dev), dmamap->dm_nsegs, segs_needed));
+
+		WM_EVCNT_INCR(&sc->sc_ev_txseg[dmamap->dm_nsegs - 1]);
+
+		/*
+		 * Store a pointer to the packet so that we can free it
+		 * later.
+		 *
+		 * Initially, we consider the number of descriptors the
+		 * packet uses the number of DMA segments.  This may be
+		 * incremented by 1 if we do checksum offload (a descriptor
+		 * is used to set the checksum context).
+		 */
+		txs->txs_mbuf = m0;
+		txs->txs_firstdesc = sc->sc_txnext;
+		txs->txs_ndesc = segs_needed;
+
+		/* Set up offload parameters for this packet. */
+		uint32_t cmdlen, fields, dcmdlen;
+		if (m0->m_pkthdr.csum_flags &
+		    (M_CSUM_TSOv4|M_CSUM_TSOv6|
+		    M_CSUM_IPv4|M_CSUM_TCPv4|M_CSUM_UDPv4|
+		    M_CSUM_TCPv6|M_CSUM_UDPv6)) {
+			if (wm_nq_tx_offload(sc, txs, &cmdlen, &fields,
+			    &do_csum) != 0) {
+				/* Error message already displayed. */
+				bus_dmamap_unload(sc->sc_dmat, dmamap);
+				continue;
+			}
+		} else {
+			do_csum = false;
+			cmdlen = 0;
+			fields = 0;
+		}
+
+		/* Sync the DMA map. */
+		bus_dmamap_sync(sc->sc_dmat, dmamap, 0, dmamap->dm_mapsize,
+		    BUS_DMASYNC_PREWRITE);
+
+		/*
+		 * Initialize the first transmit descriptor.
+		 */
+		nexttx = sc->sc_txnext;
+		if (!do_csum) {
+			/* setup a legacy descriptor */
+			wm_set_dma_addr(
+			    &sc->sc_txdescs[nexttx].wtx_addr,
+			    dmamap->dm_segs[0].ds_addr);
+			sc->sc_txdescs[nexttx].wtx_cmdlen =
+			    htole32(WTX_CMD_IFCS | dmamap->dm_segs[0].ds_len);
+			sc->sc_txdescs[nexttx].wtx_fields.wtxu_status = 0;
+			sc->sc_txdescs[nexttx].wtx_fields.wtxu_options = 0;
+			if ((mtag = VLAN_OUTPUT_TAG(&sc->sc_ethercom, m0)) !=
+			    NULL) {
+				sc->sc_txdescs[nexttx].wtx_cmdlen |=
+				    htole32(WTX_CMD_VLE);
+				sc->sc_txdescs[nexttx].wtx_fields.wtxu_vlan =
+				    htole16(VLAN_TAG_VALUE(mtag) & 0xffff);
+			} else {
+				sc->sc_txdescs[nexttx].wtx_fields.wtxu_vlan = 0;
+			}
+			dcmdlen = 0;
+		} else {
+			/* setup an advanced data descriptor */
+			sc->sc_nq_txdescs[nexttx].nqtx_data.nqtxd_addr =
+			    htole64(dmamap->dm_segs[0].ds_addr);
+			KASSERT((dmamap->dm_segs[0].ds_len & cmdlen) == 0);
+			sc->sc_nq_txdescs[nexttx].nqtx_data.nqtxd_cmdlen =
+			    htole32(dmamap->dm_segs[0].ds_len | cmdlen );
+			sc->sc_nq_txdescs[nexttx].nqtx_data.nqtxd_fields =
+			    htole32(fields);
+			DPRINTF(WM_DEBUG_TX,
+			    ("%s: TX: adv data desc %d 0x%" PRIx64 "\n",
+			    device_xname(sc->sc_dev), nexttx, 
+			    dmamap->dm_segs[0].ds_addr));
+			DPRINTF(WM_DEBUG_TX,
+			    ("\t 0x%08x%08x\n", fields,
+			    (uint32_t)dmamap->dm_segs[0].ds_len | cmdlen));
+			dcmdlen = NQTX_DTYP_D | NQTX_CMD_DEXT;
+		}
+
+		lasttx = nexttx;
+		nexttx = WM_NEXTTX(sc, nexttx);
+		/*
+		 * fill in the next descriptors. legacy or adcanced format
+		 * is the same here
+		 */
+		for (seg = 1; seg < dmamap->dm_nsegs;
+		    seg++, nexttx = WM_NEXTTX(sc, nexttx)) {
+			sc->sc_nq_txdescs[nexttx].nqtx_data.nqtxd_addr =
+			    htole64(dmamap->dm_segs[seg].ds_addr);
+			sc->sc_nq_txdescs[nexttx].nqtx_data.nqtxd_cmdlen =
+			    htole32(dcmdlen | dmamap->dm_segs[seg].ds_len);
+			KASSERT((dcmdlen & dmamap->dm_segs[seg].ds_len) == 0);
+			sc->sc_nq_txdescs[nexttx].nqtx_data.nqtxd_fields = 0;
+			lasttx = nexttx;
+
+			DPRINTF(WM_DEBUG_TX,
+			    ("%s: TX: desc %d: %#" PRIxPADDR ", "
+			     "len %#04zx\n",
+			    device_xname(sc->sc_dev), nexttx,
+			    dmamap->dm_segs[seg].ds_addr,
+			    dmamap->dm_segs[seg].ds_len));
+		}
+
+		KASSERT(lasttx != -1);
+
+		/*
+		 * Set up the command byte on the last descriptor of
+		 * the packet.  If we're in the interrupt delay window,
+		 * delay the interrupt.
+		 */
+		KASSERT((WTX_CMD_EOP | WTX_CMD_RS) ==
+		    (NQTX_CMD_EOP | NQTX_CMD_RS));
+		sc->sc_txdescs[lasttx].wtx_cmdlen |=
+		    htole32(WTX_CMD_EOP | WTX_CMD_RS);
+
+		txs->txs_lastdesc = lasttx;
+
+		DPRINTF(WM_DEBUG_TX,
+		    ("%s: TX: desc %d: cmdlen 0x%08x\n",
+		    device_xname(sc->sc_dev),
+		    lasttx, le32toh(sc->sc_txdescs[lasttx].wtx_cmdlen)));
+
+		/* Sync the descriptors we're using. */
+		WM_CDTXSYNC(sc, sc->sc_txnext, txs->txs_ndesc,
+		    BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE);
+
+		/* Give the packet to the chip. */
+		CSR_WRITE(sc, sc->sc_tdt_reg, nexttx);
+		sent = true;
+
+		DPRINTF(WM_DEBUG_TX,
+		    ("%s: TX: TDT -> %d\n", device_xname(sc->sc_dev), nexttx));
+
+		DPRINTF(WM_DEBUG_TX,
+		    ("%s: TX: finished transmitting packet, job %d\n",
+		    device_xname(sc->sc_dev), sc->sc_txsnext));
+
+		/* Advance the tx pointer. */
+		sc->sc_txfree -= txs->txs_ndesc;
+		sc->sc_txnext = nexttx;
+
+		sc->sc_txsfree--;
+		sc->sc_txsnext = WM_NEXTTXS(sc, sc->sc_txsnext);
+
+		/* Pass the packet to any BPF listeners. */
+		bpf_mtap(ifp, m0);
+	}
+
+	if (sc->sc_txsfree == 0 || sc->sc_txfree <= 2) {
+		/* No more slots; notify upper layer. */
+		ifp->if_flags |= IFF_OACTIVE;
+	}
+
+	if (sent) {
+		/* Set a watchdog timer in case the chip flakes out. */
+		ifp->if_timer = 5;
+	}
+}
+
+/*
  * wm_watchdog:		[ifnet interface function]
  *
  *	Watchdog timer handler.
@@ -2777,18 +3260,39 @@
 	wm_txintr(sc);
 
 	if (sc->sc_txfree != WM_NTXDESC(sc)) {
+#ifdef WM_DEBUG
+		int i, j;
+		struct wm_txsoft *txs;
+#endif
 		log(LOG_ERR,
 		    "%s: device timeout (txfree %d txsfree %d txnext %d)\n",
 		    device_xname(sc->sc_dev), sc->sc_txfree, sc->sc_txsfree,
 		    sc->sc_txnext);
 		ifp->if_oerrors++;
-
+#ifdef WM_DEBUG
+		for (i = sc->sc_txsdirty; i != sc->sc_txsnext ;
+		    i = WM_NEXTTXS(sc, i)) {
+		    txs = &sc->sc_txsoft[i];
+		    printf("txs %d tx %d -> %d\n",
+			i, txs->txs_firstdesc, txs->txs_lastdesc);
+		    for (j = txs->txs_firstdesc; ;
+			j = WM_NEXTTX(sc, j)) {
+			printf("\tdesc %d: 0x%" PRIx64 "\n", j,
+			    sc->sc_nq_txdescs[j].nqtx_data.nqtxd_addr);
+			printf("\t %#08x%08x\n",
+			    sc->sc_nq_txdescs[j].nqtx_data.nqtxd_fields,
+			    sc->sc_nq_txdescs[j].nqtx_data.nqtxd_cmdlen);
+			if (j == txs->txs_lastdesc)
+				break;
+			}
+		}
+#endif
 		/* Reset the interface. */
 		(void) wm_init(ifp);
 	}
 
 	/* Try to get more packets going. */
-	wm_start(ifp);
+	ifp->if_start(ifp);
 }
 
 static int
@@ -2877,7 +3381,7 @@
 	}
 
 	/* Try to get more packets going. */
-	wm_start(ifp);
+	ifp->if_start(ifp);
 
 	splx(s);
 	return error;
@@ -2940,7 +3444,7 @@
 
 	if (handled) {
 		/* Try to get more packets going. */
-		wm_start(ifp);
+		ifp->if_start(ifp);
 	}
 
 	return handled;
@@ -5438,7 +5942,7 @@
 			DPRINTF(WM_DEBUG_LINK, ("RXCFG storm! (%d)\n",
 				sc->sc_tbi_nrxcfg - sc->sc_tbi_lastnrxcfg));
 			wm_init(ifp);
-			wm_start(ifp);
+			ifp->if_start(ifp);
 		} else if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO) {
 			/* If the timer expired, retry autonegotiation */
 			if (++sc->sc_tbi_ticks >= sc->sc_tbi_anegticks) {
--- a/sys/dev/pci/if_wmreg.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/pci/if_wmreg.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wmreg.h,v 1.46.2.1 2012/06/28 16:06:36 riz Exp $	*/
+/*	$NetBSD: if_wmreg.h,v 1.46.2.1.2.1 2012/11/01 16:45:02 matt Exp $	*/
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -963,3 +963,60 @@
 
 /* for PCI express Capability registers */
 #define	WM_PCI_PCIE_DCSR2_16MS	0x00000005
+
+/* advanced TX descriptor for 82575 and newer */
+typedef union nq_txdesc {
+	struct {
+		uint64_t nqtxd_addr;
+		uint32_t nqtxd_cmdlen;
+		uint32_t nqtxd_fields;
+	} nqtx_data;
+	struct {
+		uint32_t nqtxc_vl_len;
+		uint32_t nqtxc_sn;
+		uint32_t nqtxc_cmd;
+		uint32_t nqtxc_mssidx;
+	} nqrx_ctx;
+} __packed nq_txdesc_t;
+
+
+/* Commands for nqtxd_cmdlen and nqtxc_cmd */
+#define	NQTX_CMD_EOP	(1U << 24)	/* end of packet */
+#define	NQTX_CMD_IFCS	(1U << 25)	/* insert FCS */
+#define	NQTX_CMD_RS	(1U << 27)	/* report status */
+#define	NQTX_CMD_DEXT	(1U << 29)	/* descriptor extension */
+#define	NQTX_CMD_VLE	(1U << 30)	/* VLAN enable */
+#define	NQTX_CMD_TSE	(1U << 31)	/* TCP segmentation enable */
+
+/* Descriptor types (if DEXT is set) */
+#define	NQTX_DTYP_C	(2U << 20)	/* context */
+#define	NQTX_DTYP_D	(3U << 20)	/* data */
+
+#define NQTXD_FIELDS_IDX_SHIFT		4	/* context index shift */
+#define NQTXD_FIELDS_IDX_MASK		0xf
+#define NQTXD_FIELDS_PAYLEN_SHIFT	14	/* payload len shift */
+#define NQTXD_FIELDS_PAYLEN_MASK	0x3ffff
+
+#define NQTXD_FIELDS_IXSM		(1U << 8) /* do IP checksum */
+#define NQTXD_FIELDS_TUXSM		(1U << 9) /* do TCP/UDP checksum */
+
+#define NQTXC_VLLEN_IPLEN_SHIFT		0	/* IP header len */
+#define NQTXC_VLLEN_IPLEN_MASK		0x1ff
+#define NQTXC_VLLEN_MACLEN_SHIFT	9	/* MAC header len */
+#define NQTXC_VLLEN_MACLEN_MASK		0x7f
+#define NQTXC_VLLEN_VLAN_SHIFT		16	/* vlan number */
+#define NQTXC_VLLEN_VLAN_MASK		0xffff
+
+#define NQTXC_CMD_MKRLOC_SHIFT		0	/* IP checksum offset */
+#define NQTXC_CMD_MKRLOC_MASK		0x1ff
+#define NQTXC_CMD_SNAP			(1U << 9)
+#define NQTXC_CMD_IP4			(1U << 10)
+#define NQTXC_CMD_IP6			(0U << 10)
+#define NQTXC_CMD_TCP			(1U << 11)
+#define NQTXC_CMD_UDP			(0U << 11)
+#define NQTXC_MSSIDX_IDX_SHIFT		4	/* context index shift */
+#define NQTXC_MSSIDX_IDX_MASK		0xf
+#define NQTXC_MSSIDX_L4LEN_SHIFT	8	/* L4 header len shift */
+#define NQTXC_MSSIDX_L4LEN_MASK		0xff
+#define NQTXC_MSSIDX_MSS_SHIFT		16	/* MSS */
+#define NQTXC_MSSIDX_MSS_MASK		0xffff
--- a/sys/dev/pci/mfi_pci.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/pci/mfi_pci.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfi_pci.c,v 1.12.16.2 2012/05/19 15:06:03 riz Exp $ */
+/* $NetBSD: mfi_pci.c,v 1.12.16.2.2.1 2012/11/01 16:45:02 matt Exp $ */
 /* $OpenBSD: mfi_pci.c,v 1.11 2006/08/06 04:40:08 brad Exp $ */
 /*
  * Copyright (c) 2006 Marco Peereboom <marco@peereboom.us>
@@ -17,7 +17,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfi_pci.c,v 1.12.16.2 2012/05/19 15:06:03 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfi_pci.c,v 1.12.16.2.2.1 2012/11/01 16:45:02 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -85,6 +85,7 @@
 
 static const struct mfi_pci_subtype mfi_gen2_subtypes[] = {
 	{ PCI_VENDOR_SYMBIOS,	0x9261,		"SAS 9260-8i" },
+	{ PCI_VENDOR_SYMBIOS,	0x9263,		"SAS 9261-8i" },
 	{ PCI_VENDOR_IBM,	0x03c7,		"IBM ServeRAID M5014 SAS/SATA" },
 	{ 0x0,			0,		"" }
 };
--- a/sys/dev/sbus/isp_sbus.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/sbus/isp_sbus.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: isp_sbus.c,v 1.80 2010/03/26 20:52:01 mjacob Exp $ */
+/* $NetBSD: isp_sbus.c,v 1.80.16.1 2012/11/01 16:45:02 matt Exp $ */
 /*
  * SBus specific probe and attach routines for Qlogic ISP SCSI adapters.
  *
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.80 2010/03/26 20:52:01 mjacob Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isp_sbus.c,v 1.80.16.1 2012/11/01 16:45:02 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -46,6 +46,7 @@
 #include <machine/autoconf.h>
 #include <dev/sbus/sbusvar.h>
 #include <sys/reboot.h>
+#include "opt_isp.h"
 
 static void isp_sbus_reset0(ispsoftc_t *);
 static void isp_sbus_reset1(ispsoftc_t *);
@@ -357,6 +358,7 @@
 	for (n = 0; n < isp->isp_maxcmds - 1; n++) {
 		isp->isp_xflist[n].cmd = &isp->isp_xflist[n+1];
 	}
+	isp->isp_xffree = isp->isp_xflist;
 	n = sizeof (bus_dmamap_t) * isp->isp_maxcmds;
 	sbc->sbus_dmamap = (bus_dmamap_t *) malloc(n, M_DEVBUF, M_WAITOK);
 	if (sbc->sbus_dmamap == NULL) {
--- a/sys/dev/scsipi/scsiconf.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/dev/scsipi/scsiconf.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.262.10.3 2012/05/22 18:46:09 riz Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.262.10.3.2.1 2012/11/01 16:45:02 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.10.3 2012/05/22 18:46:09 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.262.10.3.2.1 2012/11/01 16:45:02 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -209,6 +209,22 @@
 	    chan->chan_nluns,
 	    chan->chan_nluns == 1 ? "" : "s");
 
+	/*
+	 * XXX 
+	 * newer adapters support more than 256 outstanding commands
+	 * per periph and don't use the tag (they eventually allocate one
+	 * internally). Right now scsipi always allocate a tag and
+	 * is limited to 256 tags, per scsi specs.
+	 * this should be revisited
+	 */
+	if (chan->chan_flags & SCSIPI_CHAN_OPENINGS) {
+		if (chan->chan_max_periph > 256)
+			chan->chan_max_periph = 256;
+	} else {
+		if (chan->chan_adapter->adapt_max_periph > 256)
+			chan->chan_adapter->adapt_max_periph = 256;
+	}
+
 	if (scsipi_adapter_addref(chan->chan_adapter))
 		return;
 
--- a/sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/external/bsd/drm/dist/bsd-core/drm_sysctl.c	Thu Nov 01 16:44:44 2012 +0000
@@ -164,7 +164,55 @@
 
 #ifdef __NetBSD__
 #define SYSCTL_OUT(x, y, z) \
-	(len+=z,(len<*oldlenp)?(strcat((char*)oldp, y),0):EOVERFLOW)
+	drm_sysctl_out(oldp, oldlenp, &len, y, z, &error, &retcode);
+
+static int
+drm_sysctl_out(void *oldp, size_t *oldlenp, size_t *lenp,
+	       const char *buf, size_t buflen,
+	       int *errorp, int *retcodep)
+{
+	size_t copylen;
+	int error = 0;
+
+	/*
+	 * If there's room left in the user buffer,
+	 * copy out as much data as there is room for.
+	 */
+
+	if (*lenp < *oldlenp) {
+		copylen = MIN(buflen, *oldlenp - *lenp);
+		error = copyout(buf, (char *)oldp + *lenp, copylen);
+		if (error) {
+			*errorp = error;
+		}
+	} else {
+		copylen = 0;
+	}
+	*lenp += buflen;
+
+	/*
+	 * If we didn't copy everything, remember that we should
+	 * return ENOMEM at the end.
+	 */
+
+	if (copylen < buflen && *errorp == 0) {
+		*errorp = ENOMEM;
+	}
+
+	/*
+	 * If this is the final call (indicated by the buffer
+	 * being the string terminator byte), return the
+	 * total space required in *oldlenp and return
+	 * the saved error in *retcodep.
+	 */
+
+	if (buflen == 1 && *buf == 0) {
+		*oldlenp = *lenp;
+		*retcodep = *errorp;
+	}
+	return error;
+}
+
 #endif
 
 #define DRM_SYSCTL_PRINT(fmt, arg...)				\
@@ -181,7 +229,8 @@
 	struct drm_device *dev = arg1;
 #elif   defined(__NetBSD__)
 	struct drm_device *dev = rnode->sysctl_data;
-	int len = 0;
+	size_t len = 0;
+	int error = 0;
 #endif
 	char buf[128];
 	int retcode;
@@ -219,7 +268,8 @@
 	struct drm_device *dev = arg1;
 #elif   defined(__NetBSD__)
 	struct drm_device *dev = rnode->sysctl_data;
-	int len = 0;
+	size_t len = 0;
+	int error = 0;
 #endif
 	drm_local_map_t *map, *tempmaps;
 	const char   *types[] = { "FB", "REG", "SHM", "AGP", "SG", "GEM", "TTM" };
@@ -284,7 +334,8 @@
 	struct drm_device *dev = arg1;
 #elif   defined(__NetBSD__)
 	struct drm_device *dev = rnode->sysctl_data;
-	int len = 0;
+	size_t len = 0;
+	int error = 0;
 #endif
 	drm_device_dma_t *dma = dev->dma;
 	drm_device_dma_t tempdma;
@@ -346,7 +397,8 @@
 	struct drm_device *dev = arg1;
 #elif   defined(__NetBSD__)
 	struct drm_device *dev = rnode->sysctl_data;
-	int len = 0;
+	size_t len = 0;
+	int error = 0;
 #endif
 	struct drm_file *priv, *tempprivs;
 	char buf[128];
--- a/sys/fs/ptyfs/ptyfs.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/fs/ptyfs/ptyfs.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs.h,v 1.8 2009/03/15 16:43:55 christos Exp $	*/
+/*	$NetBSD: ptyfs.h,v 1.8.20.1 2012/11/01 16:45:02 matt Exp $	*/
 
 /*
  * Copyright (c) 1993
@@ -124,11 +124,6 @@
 
 #define PTYFS_ARGSVERSION	2
 
-#define PTYFSMNT_CHROOT		0x01
-
-#define PTYFSMNT_BITS "\177\20" \
-    "b\00chroot\0"
-
 /*
  * Kernel stuff follows
  */
--- a/sys/fs/ptyfs/ptyfs_vfsops.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/fs/ptyfs/ptyfs_vfsops.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ptyfs_vfsops.c,v 1.42 2010/01/08 11:35:09 pooka Exp $	*/
+/*	$NetBSD: ptyfs_vfsops.c,v 1.42.20.1 2012/11/01 16:45:02 matt Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993, 1995
@@ -38,7 +38,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.42 2010/01/08 11:35:09 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ptyfs_vfsops.c,v 1.42.20.1 2012/11/01 16:45:02 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -101,11 +101,9 @@
 	size_t len;
 	char *bp;
 	int error;
-	struct ptyfsmount *pmnt = mp->mnt_data;
 
 	rv = mp->mnt_stat.f_mntonname;
-	if (cwdi->cwdi_rdir == NULL ||
-	    (pmnt->pmnt_flags & PTYFSMNT_CHROOT) == 0)
+	if (cwdi->cwdi_rdir == NULL)
 		return rv;
 
 	buf = malloc(MAXBUF, M_TEMP, M_WAITOK);
@@ -243,9 +241,11 @@
 		return 0;
 	}
 
+#if 0
 	/* Don't allow more than one mount */
 	if (ptyfs_count)
 		return EBUSY;
+#endif
 
 	if (mp->mnt_flag & MNT_UPDATE)
 		return EOPNOTSUPP;
@@ -272,9 +272,10 @@
 	}
 
 	/* Point pty access to us */
-
-	ptm_ptyfspty.arg = mp;
-	ptyfs_save_ptm = pty_sethandler(&ptm_ptyfspty);
+	if (ptyfs_count == 0) {
+		ptm_ptyfspty.arg = mp;
+		ptyfs_save_ptm = pty_sethandler(&ptm_ptyfspty);
+	}
 	ptyfs_count++;
 	return 0;
 }
@@ -297,19 +298,21 @@
 		flags |= FORCECLOSE;
 
 	if ((error = vflush(mp, 0, flags)) != 0)
-		return (error);
+		return error;
 
-	/* Restore where pty access was pointing */
-	(void)pty_sethandler(ptyfs_save_ptm);
-	ptyfs_save_ptm = NULL;
-	ptm_ptyfspty.arg = NULL;
+	ptyfs_count--;
+	if (ptyfs_count == 0) {
+		/* Restore where pty access was pointing */
+		(void)pty_sethandler(ptyfs_save_ptm);
+		ptyfs_save_ptm = NULL;
+		ptm_ptyfspty.arg = NULL;
+	}
 
 	/*
 	 * Finally, throw away the ptyfsmount structure
 	 */
 	free(mp->mnt_data, M_PTYFSMNT);
 	mp->mnt_data = NULL;
-	ptyfs_count--;
 
 	return 0;
 }
--- a/sys/kern/kern_exit.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/kern/kern_exit.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.236.2.1 2012/04/12 17:05:36 riz Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.236.2.1.2.1 2012/11/01 16:45:03 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236.2.1 2012/04/12 17:05:36 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.236.2.1.2.1 2012/11/01 16:45:03 matt Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -598,17 +598,12 @@
 void
 exit_lwps(struct lwp *l)
 {
-	struct proc *p;
-	struct lwp *l2;
-	int error;
-	lwpid_t waited;
+	proc_t *p = l->l_proc;
+	lwp_t *l2;
 	int nlocks;
 
 	KERNEL_UNLOCK_ALL(l, &nlocks);
 
-	p = l->l_proc;
-	KASSERT(mutex_owned(p->p_lock));
-
 #ifdef KERN_SA
 	if (p->p_sa != NULL) {
 		struct sadata_vp *vp;
@@ -642,6 +637,8 @@
 #endif
 
  retry:
+	KASSERT(mutex_owned(p->p_lock));
+
 	/*
 	 * Interrupt LWPs in interruptable sleep, unsuspend suspended
 	 * LWPs and then wait for everyone else to finish.
@@ -656,30 +653,20 @@
 		    l2->l_stat == LSSUSPENDED || l2->l_stat == LSSTOP) {
 		    	/* setrunnable() will release the lock. */
 			setrunnable(l2);
-			DPRINTF(("exit_lwps: Made %d.%d runnable\n",
-			    p->p_pid, l2->l_lid));
 			continue;
 		}
 		lwp_unlock(l2);
 	}
+
+	/*
+	 * Wait for every LWP to exit.  Note: LWPs can get suspended/slept
+	 * behind us or there may even be new LWPs created.  Therefore, a
+	 * full retry is required on error.
+	 */
 	while (p->p_nlwps > 1) {
-		DPRINTF(("exit_lwps: waiting for %d LWPs (%d zombies)\n",
-		    p->p_nlwps, p->p_nzlwps));
-		error = lwp_wait1(l, 0, &waited, LWPWAIT_EXITCONTROL);
-		if (p->p_nlwps == 1)
-			break;
-		if (error == EDEADLK) {
-			/*
-			 * LWPs can get suspended/slept behind us.
-			 * (eg. sa_setwoken)
-			 * kick them again and retry.
-			 */
+		if (lwp_wait(l, 0, NULL, true)) {
 			goto retry;
 		}
-		if (error)
-			panic("exit_lwps: lwp_wait1 failed with error %d",
-			    error);
-		DPRINTF(("exit_lwps: Got LWP %d from lwp_wait1()\n", waited));
 	}
 
 	KERNEL_LOCK(nlocks, l);
--- a/sys/kern/kern_lwp.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/kern/kern_lwp.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_lwp.c,v 1.166 2012/02/11 23:16:17 martin Exp $	*/
+/*	$NetBSD: kern_lwp.c,v 1.166.4.1 2012/11/01 16:45:03 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -211,7 +211,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.166 2012/02/11 23:16:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.166.4.1 2012/11/01 16:45:03 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_lockdebug.h"
@@ -489,22 +489,21 @@
  * Must be called with p->p_lock held.
  */
 int
-lwp_wait1(struct lwp *l, lwpid_t lid, lwpid_t *departed, int flags)
+lwp_wait(struct lwp *l, lwpid_t lid, lwpid_t *departed, bool exiting)
 {
-	struct proc *p = l->l_proc;
-	struct lwp *l2;
-	int nfound, error;
-	lwpid_t curlid;
-	bool exiting;
+	const lwpid_t curlid = l->l_lid;
+	proc_t *p = l->l_proc;
+	lwp_t *l2;
+	int error;
 
 	KASSERT(mutex_owned(p->p_lock));
 
 	p->p_nlwpwait++;
 	l->l_waitingfor = lid;
-	curlid = l->l_lid;
-	exiting = ((flags & LWPWAIT_EXITCONTROL) != 0);
 
 	for (;;) {
+		int nfound;
+
 		/*
 		 * Avoid a race between exit1() and sigexit(): if the
 		 * process is dumping core, then we need to bail out: call
@@ -514,10 +513,7 @@
 		if ((p->p_sflag & PS_WCORE) != 0) {
 			mutex_exit(p->p_lock);
 			lwp_userret(l);
-#ifdef DIAGNOSTIC
-			panic("lwp_wait1");
-#endif
-			/* NOTREACHED */
+			KASSERT(false);
 		}
 
 		/*
@@ -607,13 +603,14 @@
 		}
 
 		/*
-		 * The kernel is careful to ensure that it can not deadlock
-		 * when exiting - just keep waiting.
+		 * Note: since the lock will be dropped, need to restart on
+		 * wakeup to run all LWPs again, e.g. there may be new LWPs.
 		 */
 		if (exiting) {
 			KASSERT(p->p_nlwps > 1);
 			cv_wait(&p->p_lwpcv, p->p_lock);
-			continue;
+			error = EAGAIN;
+			break;
 		}
 
 		/*
--- a/sys/kern/sys_lwp.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/kern/sys_lwp.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_lwp.c,v 1.52.14.1 2012/05/21 15:25:56 riz Exp $	*/
+/*	$NetBSD: sys_lwp.c,v 1.52.14.1.2.1 2012/11/01 16:45:03 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.52.14.1 2012/05/21 15:25:56 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_lwp.c,v 1.52.14.1.2.1 2012/11/01 16:45:03 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -373,19 +373,14 @@
 	lwpid_t dep;
 
 	mutex_enter(p->p_lock);
-	error = lwp_wait1(l, SCARG(uap, wait_for), &dep, 0);
+	error = lwp_wait(l, SCARG(uap, wait_for), &dep, false);
 	mutex_exit(p->p_lock);
 
-	if (error)
-		return error;
-
-	if (SCARG(uap, departed)) {
+	if (!error && SCARG(uap, departed)) {
 		error = copyout(&dep, SCARG(uap, departed), sizeof(dep));
-		if (error)
-			return error;
 	}
 
-	return 0;
+	return error;
 }
 
 int
--- a/sys/kern/uipc_usrreq.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/kern/uipc_usrreq.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: uipc_usrreq.c,v 1.136.8.1 2012/06/11 23:20:38 riz Exp $	*/
+/*	$NetBSD: uipc_usrreq.c,v 1.136.8.1.2.1 2012/11/01 16:45:03 matt Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000, 2004, 2008, 2009 The NetBSD Foundation, Inc.
@@ -96,7 +96,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.136.8.1 2012/06/11 23:20:38 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_usrreq.c,v 1.136.8.1.2.1 2012/11/01 16:45:03 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1235,78 +1235,66 @@
 int
 unp_externalize(struct mbuf *rights, struct lwp *l, int flags)
 {
-	struct cmsghdr *cm = mtod(rights, struct cmsghdr *);
-	struct proc *p = l->l_proc;
-	int i, *fdp;
+	struct cmsghdr * const cm = mtod(rights, struct cmsghdr *);
+	struct proc * const p = l->l_proc;
 	file_t **rp;
-	file_t *fp;
-	int nfds, error = 0;
+	int error = 0;
 
-	nfds = (cm->cmsg_len - CMSG_ALIGN(sizeof(*cm))) /
+	const size_t nfds = (cm->cmsg_len - CMSG_ALIGN(sizeof(*cm))) /
 	    sizeof(file_t *);
-	rp = (file_t **)CMSG_DATA(cm);
 
-	fdp = malloc(nfds * sizeof(int), M_TEMP, M_WAITOK);
+	int * const fdp = kmem_alloc(nfds * sizeof(int), KM_SLEEP);
 	rw_enter(&p->p_cwdi->cwdi_lock, RW_READER);
 
 	/* Make sure the recipient should be able to see the files.. */
-	if (p->p_cwdi->cwdi_rdir != NULL) {
-		rp = (file_t **)CMSG_DATA(cm);
-		for (i = 0; i < nfds; i++) {
-			fp = *rp++;
-			/*
-			 * If we are in a chroot'ed directory, and
-			 * someone wants to pass us a directory, make
-			 * sure it's inside the subtree we're allowed
-			 * to access.
-			 */
-			if (fp->f_type == DTYPE_VNODE) {
-				vnode_t *vp = (vnode_t *)fp->f_data;
-				if ((vp->v_type == VDIR) &&
-				    !vn_isunder(vp, p->p_cwdi->cwdi_rdir, l)) {
-					error = EPERM;
-					break;
-				}
+	rp = (file_t **)CMSG_DATA(cm);
+	for (size_t i = 0; i < nfds; i++) {
+		file_t * const fp = *rp++;
+		if (fp == NULL) {
+			error = EINVAL;
+			goto out;
+		}
+		/*
+		 * If we are in a chroot'ed directory, and
+		 * someone wants to pass us a directory, make
+		 * sure it's inside the subtree we're allowed
+		 * to access.
+		 */
+		if (p->p_cwdi->cwdi_rdir != NULL && fp->f_type == DTYPE_VNODE) {
+			vnode_t *vp = (vnode_t *)fp->f_data;
+			if ((vp->v_type == VDIR) &&
+			    !vn_isunder(vp, p->p_cwdi->cwdi_rdir, l)) {
+				error = EPERM;
+				goto out;
 			}
 		}
 	}
 
  restart:
-	rp = (file_t **)CMSG_DATA(cm);
-	if (error != 0) {
-		for (i = 0; i < nfds; i++) {
-			fp = *rp;
-			*rp++ = 0;
-			unp_discard_now(fp);
-		}
-		goto out;
-	}
-
 	/*
 	 * First loop -- allocate file descriptor table slots for the
 	 * new files.
 	 */
-	for (i = 0; i < nfds; i++) {
-		fp = *rp++;
+	for (size_t i = 0; i < nfds; i++) {
 		if ((error = fd_alloc(p, 0, &fdp[i])) != 0) {
 			/*
 			 * Back out what we've done so far.
 			 */
-			for (--i; i >= 0; i--) {
+			while (i-- > 0) {
 				fd_abort(p, NULL, fdp[i]);
 			}
 			if (error == ENOSPC) {
 				fd_tryexpand(p);
 				error = 0;
-			} else {
-				/*
-				 * This is the error that has historically
-				 * been returned, and some callers may
-				 * expect it.
-				 */
-				error = EMSGSIZE;
+				goto restart;
 			}
-			goto restart;
+			/*
+			 * This is the error that has historically
+			 * been returned, and some callers may
+			 * expect it.
+			 */
+			error = EMSGSIZE;
+			goto out;
 		}
 	}
 
@@ -1315,12 +1303,17 @@
 	 * file passing state and affix the descriptors.
 	 */
 	rp = (file_t **)CMSG_DATA(cm);
-	for (i = 0; i < nfds; i++) {
-		int fd = fdp[i];
-		fp = *rp++;
+	int *ofdp = (int *)CMSG_DATA(cm);
+	for (size_t i = 0; i < nfds; i++) {
+		file_t * const fp = *rp++;
+		const int fd = fdp[i];
 		atomic_dec_uint(&unp_rights);
 		fd_set_exclose(l, fd, (flags & O_CLOEXEC) != 0);
 		fd_affix(p, fp, fd);
+		/*
+		 * Done with this file pointer, replace it with a fd;
+		 */
+		*ofdp++ = fd;
 		mutex_enter(&fp->f_lock);
 		fp->f_msgcount--;
 		mutex_exit(&fp->f_lock);
@@ -1334,16 +1327,26 @@
 	}
 
 	/*
-	 * Copy temporary array to message and adjust length, in case of
-	 * transition from large file_t pointers to ints.
+	 * Adjust length, in case of transition from large file_t
+	 * pointers to ints.
 	 */
-	memcpy(CMSG_DATA(cm), fdp, nfds * sizeof(int));
-	cm->cmsg_len = CMSG_LEN(nfds * sizeof(int));
-	rights->m_len = CMSG_SPACE(nfds * sizeof(int));
+	if (sizeof(file_t *) != sizeof(int)) {
+		cm->cmsg_len = CMSG_LEN(nfds * sizeof(int));
+		rights->m_len = CMSG_SPACE(nfds * sizeof(int));
+	}
  out:
+	if (__predict_false(error != 0)) {
+		rp = (file_t **)CMSG_DATA(cm);
+		for (size_t i = 0; i < nfds; i++) {
+			file_t * const fp = *rp;
+			*rp++ = 0;
+			unp_discard_now(fp);
+		}
+	}
+
 	rw_exit(&p->p_cwdi->cwdi_lock);
-	free(fdp, M_TEMP);
-	return (error);
+	kmem_free(fdp, nfds * sizeof(int));
+	return error;
 }
 
 int
--- a/sys/net/npf/npf_alg_icmp.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/net/npf/npf_alg_icmp.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_alg_icmp.c,v 1.8.4.3 2012/07/25 20:45:23 jdc Exp $	*/
+/*	$NetBSD: npf_alg_icmp.c,v 1.8.4.3.2.1 2012/11/01 16:45:03 matt Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.8.4.3 2012/07/25 20:45:23 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_alg_icmp.c,v 1.8.4.3.2.1 2012/11/01 16:45:03 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/module.h>
@@ -155,13 +155,14 @@
  * or TCP/UDP ports of the original packet, which is embedded.
  */
 static bool
-npf_icmp_uniqid(const int type, npf_cache_t *npc, nbuf_t *nbuf, void *n_ptr)
+npf_icmp_uniqid(const int npcinf, const int type,
+    npf_cache_t *npc, nbuf_t *nbuf, void *n_ptr)
 {
 	struct icmp      *ic;
 	struct icmp6_hdr *ic6;
 	u_int            offby;
 
-	if (npf_iscached(npc, NPC_IP4)) {
+	if (npcinf & NPC_IP4) {
 		/* Per RFC 792. */
 		switch (type) {
 		case ICMP_UNREACH:
@@ -209,7 +210,7 @@
 		/* No unique IDs. */
 		return false;
 	}
-	if (npf_iscached(npc, NPC_IP6)) {
+	if (npcinf & NPC_IP6) {
 		switch (type) {
 		/* Per RFC 4443. */
 		case ICMP6_DST_UNREACH:
@@ -307,7 +308,8 @@
 
 	/* Fetch relevant data into the separate ("key") cache. */
 	struct icmp *ic = &npc->npc_l4.icmp;
-	if (!npf_icmp_uniqid(ic->icmp_type, key, nbuf, n_ptr)) {
+	if (!npf_icmp_uniqid(npc->npc_info & NPC_IP46, ic->icmp_type,
+	    key, nbuf, n_ptr)) {
 		return false;
 	}
 
--- a/sys/net/npf/npf_handler.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/net/npf/npf_handler.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_handler.c,v 1.13.2.5 2012/08/13 17:49:52 riz Exp $	*/
+/*	$NetBSD: npf_handler.c,v 1.13.2.5.2.1 2012/11/01 16:45:04 matt Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.13.2.5 2012/08/13 17:49:52 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: npf_handler.c,v 1.13.2.5.2.1 2012/11/01 16:45:04 matt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -136,8 +136,10 @@
 		nbuf = (nbuf_t *)*mp;
 		npc.npc_info = 0;
 
-		int ret __unused = npf_cache_all(&npc, nbuf);
-		KASSERT((ret & NPC_IPFRAG) == 0);
+		if (npf_cache_all(&npc, nbuf) & NPC_IPFRAG) {
+			se = NULL;
+			goto out;
+		}
 		npf_stats_inc(NPF_STAT_REASSEMBLY);
 	}
 
--- a/sys/netipsec/key.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/netipsec/key.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.c,v 1.76 2012/01/09 15:42:08 drochner Exp $	*/
+/*	$NetBSD: key.c,v 1.76.4.1 2012/11/01 16:45:04 matt Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.c,v 1.3.2.3 2004/02/14 22:23:23 bms Exp $	*/
 /*	$KAME: key.c,v 1.191 2001/06/27 10:46:49 sakane Exp $	*/
 	
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.76 2012/01/09 15:42:08 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: key.c,v 1.76.4.1 2012/11/01 16:45:04 matt Exp $");
 
 /*
  * This code is referd to RFC 2367
@@ -139,6 +139,10 @@
 
 static u_int32_t acq_seq = 0;
 
+/* XXX: referenced by kernfs, but not implemented... */
+struct _satailq satailq;
+struct _sptailq sptailq;
+
 static LIST_HEAD(_sptree, secpolicy) sptree[IPSEC_DIR_MAX];	/* SPD */
 static LIST_HEAD(_sahtree, secashead) sahtree;			/* SAD */
 static LIST_HEAD(_regtree, secreg) regtree[SADB_SATYPE_MAX + 1];
@@ -7777,6 +7781,9 @@
 #endif
 	LIST_INIT(&spacqtree);
 
+	TAILQ_INIT(&satailq);
+	TAILQ_INIT(&sptailq);
+
 	/* system default */
 	ip4_def_policy.policy = IPSEC_POLICY_NONE;
 	ip4_def_policy.refcnt++;	/*never reclaim this*/
--- a/sys/netipsec/key.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/netipsec/key.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: key.h,v 1.11 2011/06/09 19:54:18 drochner Exp $	*/
+/*	$NetBSD: key.h,v 1.11.10.1 2012/11/01 16:45:04 matt Exp $	*/
 /*	$FreeBSD: src/sys/netipsec/key.h,v 1.1.4.1 2003/01/24 05:11:36 sam Exp $	*/
 /*	$KAME: key.h,v 1.21 2001/07/27 03:51:30 itojun Exp $	*/
 
@@ -117,5 +117,9 @@
 MALLOC_DECLARE(M_SECA);
 #endif /* MALLOC_DECLARE */
 
+/* XXX: referenced by kernfs, but not implemented... */
+extern TAILQ_HEAD(_satailq, secasvar) satailq;
+extern TAILQ_HEAD(_sptailq, secpolicy) sptailq;
+
 #endif /* defined(_KERNEL) */
 #endif /* !_NETIPSEC_KEY_H_ */
--- a/sys/nfs/nfs_serv.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/nfs/nfs_serv.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: nfs_serv.c,v 1.163 2012/02/01 02:27:24 matt Exp $	*/
+/*	$NetBSD: nfs_serv.c,v 1.163.4.1 2012/11/01 16:45:04 matt Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.163 2012/02/01 02:27:24 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nfs_serv.c,v 1.163.4.1 2012/11/01 16:45:04 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -142,6 +142,7 @@
 
 		/* Server uses server cache, so kill cache last. */
 		nfsrv_finicache();
+		nfs_fini();
 		return 0;
 	default:
 		return ENOTTY;
@@ -1931,6 +1932,7 @@
 			VOP_UNLOCK(fdirp);
 	}
 	if (error) {
+		fromnd.ni_cnd.cn_nameiop = 0;
 		nfsm_reply(2 * NFSX_WCCDATA(v3));
 		nfsm_srvwcc_data(fdirfor_ret, &fdirfor, fdiraft_ret, &fdiraft);
 		nfsm_srvwcc_data(tdirfor_ret, &tdirfor, tdiraft_ret, &tdiraft);
--- a/sys/sys/lwp.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/sys/lwp.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.159.2.1 2012/05/21 15:25:56 riz Exp $	*/
+/*	$NetBSD: lwp.h,v 1.159.2.1.2.1 2012/11/01 16:45:04 matt Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -320,9 +320,7 @@
 bool	lwp_alive(lwp_t *);
 lwp_t	*lwp_find_first(proc_t *);
 
-/* Flags for _lwp_wait1 */
-#define LWPWAIT_EXITCONTROL	0x00000001
-int	lwp_wait1(lwp_t *, lwpid_t, lwpid_t *, int);
+int	lwp_wait(lwp_t *, lwpid_t, lwpid_t *, bool);
 void	lwp_continue(lwp_t *);
 void	lwp_unsleep(lwp_t *, bool);
 void	lwp_unstop(lwp_t *);
--- a/sys/sys/param.h	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/sys/param.h	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.408.2.3 2012/08/17 23:57:22 riz Exp $	*/
+/*	$NetBSD: param.h,v 1.408.2.3.2.1 2012/11/01 16:45:04 matt Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	600000000	/* NetBSD 6.0_RC1 */
+#define	__NetBSD_Version__	600000000	/* NetBSD 6.0 */
 
 #define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
     (m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
--- a/sys/ufs/ffs/ffs_vfsops.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/ufs/ffs/ffs_vfsops.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ffs_vfsops.c,v 1.275.2.1 2012/05/07 03:01:12 riz Exp $	*/
+/*	$NetBSD: ffs_vfsops.c,v 1.275.2.1.2.1 2012/11/01 16:45:04 matt Exp $	*/
 
 /*-
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.1 2012/05/07 03:01:12 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ffs_vfsops.c,v 1.275.2.1.2.1 2012/11/01 16:45:04 matt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ffs.h"
@@ -1464,12 +1464,6 @@
 		return error;
 	}
 #endif /* WAPBL */
-#ifdef UFS_EXTATTR
-	if (ump->um_fstype == UFS1) {
-		ufs_extattr_stop(mp, l);
-		ufs_extattr_uepm_destroy(&ump->um_extattr);
-	}
-#endif /* UFS_EXTATTR */
 
 	if (ump->um_devvp->v_type != VBAD)
 		ump->um_devvp->v_specmountpoint = NULL;
@@ -1517,6 +1511,14 @@
 	if ((error = quota2_umount(mp, flags)) != 0)
 		return (error);
 #endif
+#ifdef UFS_EXTATTR
+	if (ump->um_fstype == UFS1) {
+		if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_STARTED)
+			ufs_extattr_stop(mp, l);
+		if (ump->um_extattr.uepm_flags & UFS_EXTATTR_UEPM_INITIALIZED)
+			ufs_extattr_uepm_destroy(&ump->um_extattr);
+	}
+#endif
 	if ((error = vflush(mp, 0, SKIPSYSTEM | flags)) != 0)
 		return (error);
 	ffs_snapshot_unmount(mp);
--- a/sys/ufs/ufs/ufs_extattr.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/ufs/ufs/ufs_extattr.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_extattr.c,v 1.36.2.1 2012/05/19 15:03:31 riz Exp $	*/
+/*	$NetBSD: ufs_extattr.c,v 1.36.2.1.2.1 2012/11/01 16:45:05 matt Exp $	*/
 
 /*-
  * Copyright (c) 1999-2002 Robert N. M. Watson
@@ -48,7 +48,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_extattr.c,v 1.36.2.1 2012/05/19 15:03:31 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_extattr.c,v 1.36.2.1.2.1 2012/11/01 16:45:05 matt Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ffs.h"
@@ -257,12 +257,6 @@
 	}
 
 	/*
-	 * ufs_extattr_enable_with_open increases the vnode reference
-	 * count. Not sure why, but do the same here.
-	 */
-	vref(vp);
-
-	/*
 	 * Now enable attribute. 
 	 */
 	error = ufs_extattr_enable(ump,attrnamespace, attrname, backing_vp, l);
--- a/sys/ufs/ufs/ufs_quota.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: ufs_quota.c,v 1.108.2.1 2012/07/30 08:24:57 martin Exp $	*/
+/*	$NetBSD: ufs_quota.c,v 1.108.2.1.2.1 2012/11/01 16:45:05 matt Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993, 1995
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.108.2.1 2012/07/30 08:24:57 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota.c,v 1.108.2.1.2.1 2012/11/01 16:45:05 matt Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_quota.h"
@@ -336,7 +336,7 @@
 static int
 quota_get_auth(struct mount *mp, struct lwp *l, uid_t id) {
 	/* The user can always query about his own quota. */
-	if (id == kauth_cred_getuid(l->l_cred))
+	if (id == kauth_cred_geteuid(l->l_cred))
 		return 0;
 	return kauth_authorize_system(l->l_cred, KAUTH_SYSTEM_FS_QUOTA,
 	    KAUTH_REQ_SYSTEM_FS_QUOTA_GET, mp, KAUTH_ARG(id), NULL);
--- a/sys/ufs/ufs/ufs_quota2.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/ufs/ufs/ufs_quota2.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ufs_quota2.c,v 1.34 2012/02/13 06:23:41 dholland Exp $ */
+/* $NetBSD: ufs_quota2.c,v 1.34.4.1 2012/11/01 16:45:05 matt Exp $ */
 /*-
   * Copyright (c) 2010 Manuel Bouyer
   * All rights reserved.
@@ -26,7 +26,7 @@
   */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.34 2012/02/13 06:23:41 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ufs_quota2.c,v 1.34.4.1 2012/11/01 16:45:05 matt Exp $");
 
 #include <sys/buf.h>
 #include <sys/param.h>
@@ -290,8 +290,7 @@
 }
 
 static int 
-quota2_q2ealloc(struct ufsmount *ump, int type, uid_t uid, struct dquot *dq,
-    struct buf **bpp, struct quota2_entry **q2ep)
+quota2_q2ealloc(struct ufsmount *ump, int type, uid_t uid, struct dquot *dq)
 {
 	int error, error2;
 	struct buf *hbp, *bp;
@@ -361,8 +360,7 @@
 	if (hbp != bp) {
 		bwrite(hbp);
 	}
-	*q2ep = q2e;
-	*bpp = bp;
+	bwrite(bp);
 	return 0;
 }
 
@@ -416,18 +414,17 @@
 			}
 			/* need to alloc a new on-disk quot */
 			mutex_enter(&dqlock);
-			error = quota2_q2ealloc(ump, i, ino_ids[i], dq,
-			    &bpp[i], &q2ep[i]);
+			error = quota2_q2ealloc(ump, i, ino_ids[i], dq);
 			mutex_exit(&dqlock);
 			if (error)
 				return error;
-		} else {
-			error = getq2e(ump, i, dq->dq2_lblkno,
-			    dq->dq2_blkoff, &bpp[i], &q2ep[i],
-			    modify ? B_MODIFY : 0);
-			if (error)
-				return error;
 		}
+		KASSERT(dq->dq2_lblkno != 0 || dq->dq2_blkoff != 0);
+		error = getq2e(ump, i, dq->dq2_lblkno,
+		    dq->dq2_blkoff, &bpp[i], &q2ep[i],
+		    modify ? B_MODIFY : 0);
+		if (error)
+			return error;
 	}
 	return 0;
 }
@@ -622,13 +619,14 @@
 	if (dq->dq2_lblkno == 0 && dq->dq2_blkoff == 0) {
 		/* need to alloc a new on-disk quot */
 		mutex_enter(&dqlock);
-		error = quota2_q2ealloc(ump, key->qk_idtype, key->qk_id, dq,
-		    &bp, &q2ep);
+		error = quota2_q2ealloc(ump, key->qk_idtype, key->qk_id, dq);
 		mutex_exit(&dqlock);
-	} else {
-		error = getq2e(ump, key->qk_idtype, dq->dq2_lblkno,
-		    dq->dq2_blkoff, &bp, &q2ep, B_MODIFY);
+		if (error)
+			goto out_il;
 	}
+	KASSERT(dq->dq2_lblkno != 0 || dq->dq2_blkoff != 0);
+	error = getq2e(ump, key->qk_idtype, dq->dq2_lblkno,
+	    dq->dq2_blkoff, &bp, &q2ep, B_MODIFY);
 	if (error)
 		goto out_il;
 	
--- a/sys/uvm/uvm_km.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/uvm/uvm_km.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_km.c,v 1.120.2.2 2012/03/17 17:29:34 bouyer Exp $	*/
+/*	$NetBSD: uvm_km.c,v 1.120.2.2.2.1 2012/11/01 16:45:05 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -120,7 +120,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.120.2.2 2012/03/17 17:29:34 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_km.c,v 1.120.2.2.2.1 2012/11/01 16:45:05 matt Exp $");
 
 #include "opt_uvmhist.h"
 
@@ -170,7 +170,7 @@
 vaddr_t kmembase;
 vsize_t kmemsize;
 
-vmem_t *kmem_arena;
+vmem_t *kmem_arena = NULL;
 vmem_t *kmem_va_arena;
 
 /*
@@ -297,6 +297,18 @@
 	kmem_arena = vmem_create("kmem", kmembase, kmemsize, PAGE_SIZE,
 	    NULL, NULL, NULL,
 	    0, VM_NOSLEEP | VM_BOOTSTRAP, IPL_VM);
+#ifdef PMAP_GROWKERNEL
+	/*
+	 * kmem_arena VA allocations happen independently of uvm_map.
+	 * grow kernel to accommodate the kmem_arena.
+	 */
+	if (uvm_maxkaddr < kmembase + kmemsize) {
+		uvm_maxkaddr = pmap_growkernel(kmembase + kmemsize);
+		KASSERTMSG(uvm_maxkaddr >= kmembase + kmemsize,
+		    "%#"PRIxVADDR" %#"PRIxVADDR" %#"PRIxVSIZE,
+		    uvm_maxkaddr, kmembase, kmemsize);
+	}
+#endif
 
 	vmem_init(kmem_arena);
 
@@ -747,6 +759,16 @@
 	if (rc != 0)
 		return rc;
 
+#ifdef PMAP_GROWKERNEL
+	/*
+	 * These VA allocations happen independently of uvm_map 
+	 * so this allocation must not extend beyond the current limit.
+	 */
+	KASSERTMSG(uvm_maxkaddr >= va + size,
+	    "%#"PRIxVADDR" %#"PRIxPTR" %#zx",
+	    uvm_maxkaddr, va, size);
+#endif
+
 	loopva = va;
 	loopsize = size;
 
@@ -811,6 +833,9 @@
 	vmem_size_t total;
 	vmem_size_t free;
 
+	if (kmem_arena == NULL)
+		return false;
+
 	total = vmem_size(kmem_arena, VMEM_ALLOC|VMEM_FREE);
 	free = vmem_size(kmem_arena, VMEM_FREE);
 
--- a/sys/uvm/uvm_map.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/sys/uvm/uvm_map.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: uvm_map.c,v 1.313.2.3 2012/08/18 22:03:24 riz Exp $	*/
+/*	$NetBSD: uvm_map.c,v 1.313.2.3.2.1 2012/11/01 16:45:06 matt Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -66,7 +66,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.313.2.3 2012/08/18 22:03:24 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvm_map.c,v 1.313.2.3.2.1 2012/11/01 16:45:06 matt Exp $");
 
 #include "opt_ddb.h"
 #include "opt_uvmhist.h"
--- a/tests/crypto/libcrypto/Makefile	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/crypto/libcrypto/Makefile	Thu Nov 01 16:44:44 2012 +0000
@@ -1,21 +1,16 @@
-# $NetBSD: Makefile,v 1.8 2011/10/22 21:13:25 mrg Exp $
+# $NetBSD: Makefile,v 1.8.6.1 2012/11/01 16:45:06 matt Exp $
 
 .include <bsd.own.mk>
 
 .if ${MKCRYPTO} != "no"
 
 SUBDIR+=bf bn cast conf des dh dsa ec ecdh ecdsa engine evp hmac lhash \
-	md2 md4 md5 rand rc2 rc4 ripemd rsa sha sha1 srp threads x509v3
+	md2 md4 md5 rand rc2 rc4 ripemd rsa sha sha1 srp threads x509v3 \
+	idea mdc2
 
-.if ${MKCRYPTO_IDEA} != "no"
-SUBDIR+=idea
-.endif
 .if ${MKCRYPTO_RC5} != "no"
 SUBDIR+=rc5
 .endif
-.if ${MKCRYPTO_MDC2} != "no"
-SUBDIR+=mdc2
-.endif
 
 TESTSDIR=	${TESTSBASE}/crypto/libcrypto
 
--- a/tests/crypto/libcrypto/idea/Makefile	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/crypto/libcrypto/idea/Makefile	Thu Nov 01 16:44:44 2012 +0000
@@ -1,14 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2011/07/05 10:03:09 spz Exp $
+# $NetBSD: Makefile,v 1.3.6.1 2012/11/01 16:45:06 matt Exp $
 
 HELPER_NAME=	ideatest
 HELPER_DIR=	idea
 
 .include <bsd.init.mk>
 
-.if ${MKCRYPTO_IDEA} != "no"
-LDADD= -lcrypto_idea -lcrypto
-.else
-CPPFLAGS+= -DOPENSSL_NO_IDEA
-.endif
+LDADD= -lcrypto
 
 LDADD+=		-Wl,--no-fatal-warnings
--- a/tests/crypto/libcrypto/mdc2/Makefile	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/crypto/libcrypto/mdc2/Makefile	Thu Nov 01 16:44:44 2012 +0000
@@ -1,14 +1,10 @@
-# $NetBSD: Makefile,v 1.3 2011/07/05 10:03:10 spz Exp $
+# $NetBSD: Makefile,v 1.3.6.1 2012/11/01 16:45:06 matt Exp $
 
 HELPER_NAME=	mdc2test
 HELPER_DIR=	mdc2
 
 .include <bsd.init.mk>
 
-.if ${MKCRYPTO_MDC2} != "no"
-LDADD= -lcrypto_mdc2 -lcrypto
-.else
-CPPFLAGS+= -DOPENSSL_NO_MDC2
-.endif
+LDADD= -lcrypto
 
 LDADD+=         -Wl,--no-fatal-warnings
--- a/tests/crypto/libcrypto/t_ciphers.sh	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/crypto/libcrypto/t_ciphers.sh	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_ciphers.sh,v 1.3 2011/06/09 05:25:21 spz Exp $
+# $NetBSD: t_ciphers.sh,v 1.3.6.1 2012/11/01 16:45:06 matt Exp $
 #
 # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -93,9 +93,6 @@
 }
 idea_body()
 {
-	[ -x "$(atf_get_srcdir)/h_ideatest" ] \
-	    || atf_skip "IDEA support not available; system built" \
-	                "with MKCRYPTO_IDEA=no"
 	atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_ideatest"
 }
 
--- a/tests/crypto/libcrypto/t_hashes.sh	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/crypto/libcrypto/t_hashes.sh	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_hashes.sh,v 1.1 2010/07/10 16:43:25 jmmv Exp $
+# $NetBSD: t_hashes.sh,v 1.1.10.1 2012/11/01 16:45:06 matt Exp $
 #
 # Copyright (c) 2008, 2009, 2010 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -93,9 +93,6 @@
 }
 mdc2_body()
 {
-	[ -x "$(atf_get_srcdir)/h_mdc2test" ] \
-	    || atf_skip "MDC2 support not available; system built" \
-	                "with MKCRYPTO_MDC2=no"
 	atf_check -o ignore -e ignore "$(atf_get_srcdir)/h_mdc2test"
 }
 
--- a/tests/fs/ffs/h_quota2_tests.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/fs/ffs/h_quota2_tests.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: h_quota2_tests.c,v 1.3 2011/06/11 18:03:17 christos Exp $	*/
+/*	$NetBSD: h_quota2_tests.c,v 1.3.6.1 2012/11/01 16:45:07 matt Exp $	*/
 
 /*
  * rump server for advanced quota tests
@@ -34,7 +34,19 @@
 	static char buf[512];
 	int fd;
 	int error;
-	rump_sys_chown(".", TEST_NONROOT_ID, TEST_NONROOT_ID);
+	unsigned int i;
+	int chowner = 1;
+	for (i =0; testopts && i < strlen(testopts); i++) {
+		switch(testopts[i]) {
+		case 'C':
+			chowner = 0;
+			break;
+		default:
+			errx(1, "test4: unknown option %c", testopts[i]);
+		}
+	}
+	if (chowner)
+		rump_sys_chown(".", TEST_NONROOT_ID, TEST_NONROOT_ID);
 	rump_sys_chmod(".", 0777);
 	if (rump_sys_setegid(TEST_NONROOT_ID) != 0) {
 		error = errno;
--- a/tests/fs/ffs/t_miscquota.sh	Tue Aug 21 05:36:23 2012 +0000
+++ b/tests/fs/ffs/t_miscquota.sh	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_miscquota.sh,v 1.6 2012/02/13 17:55:12 dholland Exp $ 
+# $NetBSD: t_miscquota.sh,v 1.6.4.1 2012/11/01 16:45:07 matt Exp $ 
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -53,6 +53,13 @@
     -oRL le 1 user
 
 
+test_case_root defaut_deny_user quota_defaut_deny \
+    "new quota entry denied by default entry" 5 -b le 1 user
+
+test_case_root defaut_deny_user_big quota_defaut_deny \
+    "new quota entry denied by default entry, with list on more than one block" 5000 -b le 1 user
+
+
 quota_walk_list()
 {
 	create_ffs_server $*
@@ -162,3 +169,45 @@
 	#shutdown and check filesystem
 	rump_quota_shutdown
 }
+
+quota_defaut_deny()
+{
+	local nusers=$1; shift
+	create_ffs_server $*
+	local q=$4
+	local expect
+
+	case ${q} in
+	user)
+		expect=u
+		fail=g
+		;;
+	group)
+		expect=g
+		fail=u
+		;;
+	*)
+		atf_fail "wrong quota type"
+		;;
+	esac
+
+	# create $nusers users, so we are sure the free list has entries
+	# from block 1. Start from 10, as non-root id is 1.
+	# set default to deny all
+	( echo "@format netbsd-quota-dump v1"
+	  echo "# idtype id objtype   hard soft usage expire grace"
+	  echo "$q default block   0 0 0 0 0"
+	  echo "$q default file   0 0 0 0 0"
+	  local i=10;
+	  while [ $i -lt $(($nusers + 10)) ]; do
+		echo "$q $i block   0 0 0 0 0"
+		echo "$q $i file   0 0 0 0 0"
+		i=$((i + 1))
+	  done
+	) | atf_check -s exit:0 \
+		   env LD_PRELOAD=/usr/lib/librumphijack.so RUMPHIJACK=vfs=getvfsstat,blanket=/mnt quotarestore -d /mnt
+	atf_check -s exit:0 rump.halt
+	#now start the server which does the limits tests
+	$(atf_get_srcdir)/h_quota2_tests -oC -b 0 ${IMG} ${RUMP_SERVER}
+	rump_quota_shutdown
+}
--- a/usr.sbin/npf/npfctl/npf.conf.5	Tue Aug 21 05:36:23 2012 +0000
+++ b/usr.sbin/npf/npfctl/npf.conf.5	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: npf.conf.5,v 1.9.2.3 2012/08/13 19:43:44 riz Exp $
+.\"    $NetBSD: npf.conf.5,v 1.9.2.3.2.1 2012/11/01 16:45:07 matt Exp $
 .\"
 .\" Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 12, 2012
+.Dd September 30, 2012
 .Dt NPF.CONF 5
 .Os
 .Sh NAME
@@ -36,144 +36,222 @@
 .\" -----
 .Sh DESCRIPTION
 .Nm
-is the default configuration file for NPF packet filter.
-It can contain definitions, grouped rules, rule procedures,
-translation policies, and tables.
-.Ss Definitions
-Definitions are general purpose keywords which can be used in the
-ruleset to make it more flexible and easier to manage.
-Most commonly, definitions are used to define one of the following:
-IP addresses, networks, ports, or interfaces.
-Definitions can contain multiple elements.
-.Ss Groups
-Having one huge ruleset for all interfaces or directions might be
-inefficient; therefore, NPF requires that all rules be defined within groups.
-Groups can be thought of as higher level rules which have subrules.
-The main properties of a group are its interface and traffic direction.
-Packets matching group criteria are passed to the ruleset of that group.
-If a packet does not match any group, it is passed to the default group.
-The default group must always be defined.
-.Ss Rules
-Rules, which are the main part of NPF configuration, describe the criteria
-used to inspect and make decisions about packets.
-Currently, NPF supports filtering on the following criteria: interface,
-traffic direction, protocol, IP address or network, TCP/UDP port
-or range, TCP flags, and ICMP type/code.
-Supported actions are blocking or passing the packet.
+is the default configuration file for the NPF packet filter.
+.Pp
+This manual page serves as a reference for editing
+.Nm .
+Please refer to the official NPF documentation for comprehensive and
+in-depth information.
+.Pp
+There are multiple structural elements
+.Nm
+may contain:
+.Cd variable
+and
+.Cd table
+definitions (with or without content), abstraction
+.Cd groups ,
+packet filtering
+.Cd rules ,
+.Cd map
+rules for address translation and
+.Cd procedure
+definitions to call on filtered packets.
+The minimal
+.Nm
+must contain a mandatory
+.Cd default group .
+.Sh SYNTAX
+.Ss Variables
+Variables are specified using the dollar ($) sign, which is used both
+in definitions and uses of a variable.
+Variables are defined by assigning a value to them as follows:
+.Bd -literal
+$var1 = 10.0.0.1
+.Ed
+.Pp
+A variable may also be defined as a set:
+.Bd -literal
+$var2 = { 10.0.0.1, 10.0.0.2 }
+.Ed
+.Pp
+Common variable definitions are for IP addresses, networks, ports,
+and interfaces.
+.Ss Tables
+Tables are specified using a number between angle brackets
+\*[Lt] and \*[Gt].
+The number used to specify a table should be between 0 and 15.
+The following is an example of table definition:
+.Bd -literal
+table <1> type hash dynamic
 .Pp
-Each rule has a priority, which is set according to its order in the ruleset.
-Rules defined first are accordingly inspected first.
-All rules in the group are inspected sequentially, and the last matching
-dictates the action to be taken.
-Rules, however, may be explicitly marked as final.
-In such cases, processing stops after encountering the first matching rule
-marked as final.
-If there is no matching rule in the custom group, then rules in the default
-group will be inspected.
+.Ed
+Currently, tables support two storage types: "hash" or "tree".
+They can also be "dynamic" or static i.e. loaded from the specified file.
 .Pp
-Stateful filtering is supported using the "stateful" keyword.
-In such cases, state (a session) is created and any further packets
-of the connection are tracked.
-Packets in backwards stream, after having been confirmed to belong to
-the same connection, are passed without ruleset inspection.
-Rules may have associated rule procedures (described in a later section),
-which are applied for all packets of a connection.
+The file should contain a list of IP addresses and/or networks in the form of:
+.Bd -literal
+10.0.0.0/24
+10.1.1.1
+.Ed
+.Pp
+Tables of type "hash" can only contain IP addresses.
+.Ss Groups
+Groups may have the following options: name, interface, and direction.
+They are defined in the following form:
 .Pp
-Definitions (prefixed with "$") and tables (specified by an ID within
-"\*[Lt]\*[Gt]" marks) can be used in the filter options of rules.
-.Ss Rule procedures and normalisation
-Rule procedures are provided to perform packet transformations and various
-additional procedures on the packets.
-It should be noted that rule procedures are applied for the connections,
-that is, both for packets which match the rule and for further packets
-of the connection, which are passed without ruleset inspection.
-Currently, two facilities are supported:
-traffic normalisation and packet logging.
-Packet normalisation has the following functionality:
-IP ID randomisation, IP_DF flag cleansing, TCP minimum TTL enforcement,
-and maximum MSS enforcement ("MSS clamping").
-If a matching rule is going to drop the packet, normalisation functions
-are not performed.
-Packet logging is performed both in packet passing and blocking cases.
-Note that the logging interface has to be created manually, using
-.Xr ifconfig 8
-routine, for example:
+.Bd -literal
+group (name "my_group", interface wm0, in) {
+	# List of rules
+}
+.Ed
+.Ss Rules
+With a rule statement NPF is instructed to
+.Cd pass
+or
+.Cd block
+a packet depending on packet header information, transit direction and
+interface it arrives on, either immediately upon match (keyword
+.Cd final )
+or using the last match.
+The rule can also instruct NPF to create an entry in the state table
+when passing the packet, to notify the sender when blocking it, and
+to apply a procedure to the packet (e.g. "log") in either case.
+.Pp
+A "fully-featured" rule would for example be:
+.Bd -literal
+pass stateful in final family inet proto tcp flags S/SA \\
+	from $source port $sport to $dest port $dport apply "someproc"
+.Ed
+.Pp
+Any protocol in
+.Pa /etc/protocols
+can be specified.
+Further packet
+specification at present is limited to protocol TCP understanding flags,
+TCP and UDP understanding source and destination ports, and ICMP and
+IPv6-ICMP understanding icmp-type.
+.Pp
+Fragments are not selectable since NPF always reassembles packets
+before further processing.
+.Ss Map
+Network Address Translation (NAT) is expressed in a form of segment mapping.
+At present, only dynamic translation is supported.
+The following mapping types are available:
 .Pp
-ifconfig npflog0 create
-.Ss Network address translation
-Rules for address translation can be added.
-Translation is performed on the specified interface, assigning the specified
-address of said interface.
-Currently, three types of translation are supported:
-Network Address Port Translation (NAPT) - a regular NAT,
-also known as "outbound NAT";
-Port forwarding (redirection) - also known as "inbound NAT";
-Bi-directional NAT - a combination of inbound and outbound NAT.
+.Bl -tag -width <-> -compact
+.It Pa ->
+outbound NAT (translation of the source)
+.It Pa <-
+inbound NAT (translation of the destination)
+.It Pa <->
+bi-directional NAT (combination of inbound and outbound NAT)
+.El
+.Pp
+The following would translate the source to the IP address specified
+by the $pub_ip for the packets on the interface $ext_if.
+.Bd -literal
+map $ext_if dynamic 10.1.1.0/24 -> $pub_if
+.Ed
 .Pp
-Minimal filtering criteria on local network and destination are provided.
-Note that address translation implies routing, therefore IP forwarding
-is required to be enabled:
-net.inet.ip.forwarding = 1.
-See
-.Xr sysctl 7
-for more details.
-.Ss Tables
-Certain configurations might use very large sets of IP addresses or change
-sets frequently.
-Storing large IP sets in the configuration file or performing frequent
-reloads can have a significant performance cost.
+Translations are implicitly filtered by limiting the operation to the
+network segments specified, that is, translation would be performed only
+on packets originating from 10.1.1.0/24 network.
+Explicit filter criteria can be specified using "pass <criteria>" as
+an additional option of the mapping.
+.Ss Procedures
+A rule procedure is defined as a collection of extension calls (it
+may have none).
+Every extension call has a name and a list of options in the form of
+key-value pairs.
+Depending on the call, the key might represent the argument and the value
+might be optional.
+For example:
+.Bd -literal
+procedure "someproc" {
+	log: npflog0
+	normalise: "random-id", "min-ttl" 64
+}
+.Ed
 .Pp
-In order to achieve high performance, NPF has tables.
-NPF tables provide separate storage designed for large IP sets and frequent
-updates without reloading the entire ruleset.
-Tables can be managed dynamically or loaded from a separate file, which
-is useful for large static tables.
-There are two types of storage: "tree" (red-black tree is used) and
-"hash".
-.\" -----
+In this case, the procedure calls the logging and normalisation modules.
+.Ss Misc
+Text after a hash
+.Pq Sq #
+character is considered a comment.
+The backslash
+.Pq Sq \e
+character at the end of a line marks a continuation line,
+i.e., the next line is considered an extension of the present line.
 .Sh GRAMMAR
+The following is a non-formal BNF-like definition of the grammar.
+The definition is simplified and is intended to be human readable,
+therefore it does not strictly represent the full syntax, which
+is more flexible.
 .Bd -literal
-line		= ( def | table | map | group | rproc )
+; Syntax of a single line.  Lines can be separated by LF (\n) or
+; a semicolon.  Comments start with a hash (#) character.
+
+syntax		= var-def | table-def | map | group | rproc | comment
 
-var		= $\*[Lt]name\*[Gt]
-iface		= ( \*[Lt]interface\*[Gt] | var )
-def		= ( var "=" "{ "\*[Lt]value_1\*[Gt]", "\*[Lt]value_2\*[Gt]", ... }" | "\*[Lt]value\*[Gt]" )
+; Variable definition.  Names can be alpha-numeric, including "_" character.
+
+var-name	= "$" . string
+interface	= interface-name | var-name
+var-def		= var "=" ( var-value | "{" value *[ "," value ] "}" )
 
-table		= "table" \*[Lt]tid\*[Gt] "type" ( "hash" | "tree" )
-		  ( "dynamic" | "file" \*[Lt]path\*[Gt] )
+; Table definition.  Table ID shall be numeric.  Path is in the double quotes.
+
+table-id	= \*[Lt]tid\*[Gt]
+table-def	= "table" table-id "type" ( "hash" | "tree" )
+		  ( "dynamic" | "file" path )
 
-map-di		= ( "->" | "<-" | "<->" )
-map-type	= ( "static" | "dynamic" )
-map		= "map" iface map-type \*[Lt]seg1\*[Gt] map-di \*[Lt]seg2\*[Gt] [ "pass" filt-opts ]
+; Mapping for address translation.
+
+map		= "map" interface ( "static" | "dynamic" )
+		  net-seg ( "->" | "<-" | "<->" ) net-seg
+		  [ "pass" filt-opts ]
 
-rproc		= "procedure" \*[Lt]name\*[Gt] procs
-procs		= "{" op1 \*[Lt]newline\*[Gt], op2 \*[Lt]newline\*[Gt], ... "}"
-op		= ( "log" iface | "normalise" "(" norm-opt1 "," norm-opt2 ... ")" )
-norm-opt	= [ "random-id" | "min-ttl" \*[Lt]num\*[Gt] | "max-mss" \*[Lt]num\*[Gt] | "no-df" ]
+; Rule procedure definition.  The name should be in the double quotes.
+;
+; Each call can have its own options in a form of key-value pairs.
+; Both key and values may be strings (either in double quotes or not)
+; and numbers, depending on the extension.
 
-group		= "group" "(" ( "default" | group-opts ) ")" ruleset
-group-opts	= [ name \*[Lt]name\*[Gt] "," ] "interface" iface [ "," ( "in" | "out" ) ]
+proc		= "procedure" proc-name "{" *( proc-call [ new-line ] ) "}"
+proc-opts	= key " " val [ "," proc-opts ]
+proc-call	= call-name ":" proc-opts new-line
 
-ruleset		= "{" rule1 \*[Lt]newline\*[Gt], rule2 \*[Lt]newline\*[Gt], ... "}"
+; Group definition and the ruleset.
 
-rule		= ( "block" block-opts | "pass" ) [ "stateful" ] [ "in" | out" ] [ "final" ]
-		  [ "on" iface ] [ "family" fam-opt ] [ "proto" \*[Lt]protocol\*[Gt] [ proto-opts ] ]
-		  ( "all" | filt-opts ) [ "apply" rproc ] }
+group		= "group" "(" ( "default" | group-opts ) ")" "{" ruleset "}"
+group-opts	= [ "name" string ] [ "interface" interface ] [ "in" | "out" ]
+ruleset		= [ rule new-line ] [ ruleset ]
+
+rule		= ( "block" [ block-opts ] | "pass" ) [ "stateful" ]
+		  [ "in" | out" ] [ "final" ] [ "on" iface ]
+		  [ "family" fam-opt ] [ "proto" protocol [ proto-opts ] ]
+		  ( "all" | filt-opts ) [ "apply" proc-name ]
 
-fam-opt		= [ "inet" | "inet6" ]
-block-opts	= [ "return-rst" | "return-icmp" | "return" ]
-filt-addr	= iface | var | \*[Lt]addr/mask\*[Gt] | \*[Lt]tid\*[Gt]
-port-opts	= [ "port" ( \*[Lt]port-num\*[Gt] | \*[Lt]port-from\*[Gt] "-" \*[Lt]port-to\*[Gt] | var ) ]
-filt-opts	= [ "from" filt-addr [ port-opts ] ] [ "to" filt-addr [ port-opts ] ]
-proto-opts	= [ "flags" \*[Lt]tcp_flags\*[Gt] | "icmp-type" \*[Lt]type\*[Gt] "code" \*[Lt]code\*[Gt] ]
+block-opts	= "return-rst" | "return-icmp" | "return"
+fam-opt		= "inet" | "inet6"
+proto-opts	= "flags" tcp-flags [ "/" tcp-flag-mask ] |
+		  "icmp-type" type [ "code" icmp-code ]
+
+addr-mask	= addr [ "/" mask ]
+filt-opts	= "from" filt-addr [ port-opts ] "to" filt-addr [ port-opts ]
+filt-addr	= [ interface | var-name | addr-mask | table-id | "any" ]
+filt-port	= "port" ( port-num | port-from "-" port-to | var-name )
 .Ed
 .\" -----
 .Sh FILES
-.Bl -tag -width /dev/npf.conf -compact
+.Bl -tag -width /usr/share/examples/npf -compact
 .It Pa /dev/npf
 control device
 .It Pa /etc/npf.conf
 default configuration file
+.It Pa /usr/share/examples/npf
+directory containing further examples
 .El
 .\" -----
 .Sh EXAMPLES
@@ -197,12 +275,8 @@
 	log: npflog0
 }
 
-procedure "rid" {
-	normalise: "random-id"
-}
-
 group (name "external", interface $ext_if) {
-	pass stateful out final from $ext_if apply "rid"
+	pass stateful out final from $ext_if
 
 	block in final from \*[Lt]1\*[Gt]
 	pass stateful in final family inet proto tcp to $ext_if port ssh apply "log"
--- a/usr.sbin/npf/npfctl/npf_parse.y	Tue Aug 21 05:36:23 2012 +0000
+++ b/usr.sbin/npf/npfctl/npf_parse.y	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: npf_parse.y,v 1.3.2.6 2012/08/13 17:49:52 riz Exp $	*/
+/*	$NetBSD: npf_parse.y,v 1.3.2.6.2.1 2012/11/01 16:45:07 matt Exp $	*/
 
 /*-
  * Copyright (c) 2011-2012 The NetBSD Foundation, Inc.
@@ -55,17 +55,23 @@
 	extern char *yytext;
 
 	char *msg, *context = xstrndup(yytext, yyleng);
-	size_t len = strlen(context);
-	char *dst = zalloc(len * 4 + 1);
+	bool eol = (*context == '\n');
 	va_list ap;
 
 	va_start(ap, fmt);
 	vasprintf(&msg, fmt, ap);
 	va_end(ap);
 
-	strvisx(dst, context, len, VIS_WHITE|VIS_CSTYLE);
-	fprintf(stderr, "%s:%d:%d: %s near '%s'\n", yyfilename, yylineno,
-	    yycolumn, msg, dst);
+	fprintf(stderr, "%s:%d:%d: %s", yyfilename,
+	    yylineno - (int)eol, yycolumn, msg);
+	if (!eol) {
+		size_t len = strlen(context);
+		char *dst = zalloc(len * 4 + 1);
+
+		strvisx(dst, context, len, VIS_WHITE|VIS_CSTYLE);
+		fprintf(stderr, " near '%s'", dst);
+	}
+	fprintf(stderr, "\n");
 	exit(EXIT_FAILURE);
 }
 
--- a/usr.sbin/npf/npfctl/npfctl.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/usr.sbin/npf/npfctl/npfctl.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: npfctl.c,v 1.10.2.5 2012/08/13 17:49:52 riz Exp $	*/
+/*	$NetBSD: npfctl.c,v 1.10.2.5.2.1 2012/11/01 16:45:07 matt Exp $	*/
 
 /*-
  * Copyright (c) 2009-2012 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: npfctl.c,v 1.10.2.5 2012/08/13 17:49:52 riz Exp $");
+__RCSID("$NetBSD: npfctl.c,v 1.10.2.5.2.1 2012/11/01 16:45:07 matt Exp $");
 
 #include <sys/ioctl.h>
 #include <sys/stat.h>
@@ -139,7 +139,7 @@
 	    "usage:\t%s [ start | stop | reload | flush | show | stats ]\n",
 	    progname);
 	fprintf(stderr,
-	    "usage:\t%s [ sess-save | sess-load ]\n",
+	    "\t%s ( sess-save | sess-load )\n",
 	    progname);
 	fprintf(stderr,
 	    "\t%s table <tid> [ flush ]\n",
--- a/usr.sbin/postinstall/postinstall	Tue Aug 21 05:36:23 2012 +0000
+++ b/usr.sbin/postinstall/postinstall	Thu Nov 01 16:44:44 2012 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.129.2.9 2012/08/15 17:36:46 sborrill Exp $
+# $NetBSD: postinstall,v 1.129.2.9.2.1 2012/11/01 16:45:07 matt Exp $
 #
 # Copyright (c) 2002-2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -2077,7 +2077,7 @@
 			[ "$MACHINE" = "$(uname -m)" ] && m= || m=" -m $MACHINE"
 			cat <<_Fix_me_
 To fix, run:
-    ${0} ${SRC_ARGLIST} -d ${DEST_DIR:-/}$m fix${items_failed}
+    ${HOST_SH} ${0} ${SRC_ARGLIST} -d ${DEST_DIR:-/}$m fix${items_failed}
 Note that this may overwrite local changes.
 _Fix_me_
 		    fi
--- a/usr.sbin/racoon/Makefile	Tue Aug 21 05:36:23 2012 +0000
+++ b/usr.sbin/racoon/Makefile	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.24 2012/01/04 15:55:36 drochner Exp $
+# $NetBSD: Makefile,v 1.24.4.1 2012/11/01 16:45:07 matt Exp $
 
 WARNS?=	0	# XXX third-party program, many issues
 NOCLANGERROR=	# defined
@@ -51,11 +51,6 @@
 DPADD+= ${LIBGSSAPI} ${LIBKRB5} ${LIBHX509} ${LIBHEIMNTLM} ${LIBCOM_ERR} \
 	${LIBROKEN} ${LIBASN1}
 .endif
-.if (${MKCRYPTO_IDEA} != "no")
-CPPFLAGS+=-DHAVE_OPENSSL_IDEA_H
-LDADD+= -lcrypto_idea
-LDADD+= ${LIBCRYPTO_IDEA}
-.endif
 .if (${MKCRYPTO_RC5} != "no")
 CPPFLAGS+=-DHAVE_OPENSSL_RC5_H
 LDADD+= -lcrypto_rc5
--- a/usr.sbin/traceroute/traceroute.c	Tue Aug 21 05:36:23 2012 +0000
+++ b/usr.sbin/traceroute/traceroute.c	Thu Nov 01 16:44:44 2012 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: traceroute.c,v 1.80 2012/01/04 16:09:44 drochner Exp $	*/
+/*	$NetBSD: traceroute.c,v 1.80.4.1 2012/11/01 16:45:07 matt Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999, 2000
@@ -30,7 +30,7 @@
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1991, 1994, 1995, 1996, 1997,\
  1998, 1999, 2000\
  The Regents of the University of California.  All rights reserved.");
-__RCSID("$NetBSD: traceroute.c,v 1.80 2012/01/04 16:09:44 drochner Exp $");
+__RCSID("$NetBSD: traceroute.c,v 1.80.4.1 2012/11/01 16:45:07 matt Exp $");
 #endif
 #endif
 
@@ -984,6 +984,7 @@
 					continue;
 				if (!gotlastaddr ||
 				    from->sin_addr.s_addr != lastaddr) {
+					if (gotlastaddr) printf("\n   ");
 					print(packet, cc, from);
 					lastaddr = from->sin_addr.s_addr;
 					++gotlastaddr;