CVS commit: [netbsd-5] src/doc

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 12:38:41 UTC 2015

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

Log Message:
Ticket #1983


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.127 -r1.1.2.128 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.127 src/doc/CHANGES-5.3:1.1.2.128
--- src/doc/CHANGES-5.3:1.1.2.127	Mon Nov  9 10:36:46 2015
+++ src/doc/CHANGES-5.3	Mon Nov  9 12:38:41 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.127 2015/11/09 10:36:46 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.128 2015/11/09 12:38:41 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -4101,3 +4101,131 @@ sys/dev/mii/miidevs_data.h			regen
 	- Update comment.
 	[msaitoh, ticket #1982]
 
+sys/dev/pci/pcidevs			1.1079, 1.1134, 1.1148-1.1149, 1.1151
+sys/dev/pci/pcidevs.h			regen
+sys/dev/pci/pcidevs_data.h		regen
+sys/dev/pci/if_bge.c			1.183-1.185, 1.187, 1.189-1.193, 1.195-1.199, 1.202-1.226, 1.228-1.237, 1.240-1.264, 1.267-1.276, 1.278-1.280, 1.283-1.287 via patch
+sys/dev/pci/if_bgereg.h			1.57-1.74, 1.76-1.90 via patch
+sys/dev/pci/if_bgevar.h			1.6, 1.10-1.13, 1.15-1.17 via patch
+sys/dev/pci/if_bnx.c			1.32, 1.34-1.43, 1.48-1.49, 1.52
+sys/dev/pci/if_bnxreg.h			1.8, 1.11-1.14
+sys/dev/pci/if_bnxvar.h			1.1-1.3
+sys/dev/mii/brgphy.c			1.53-1.63, 1.65-69, 1.72-1.74 via patch
+sys/dev/mii/brgphyreg.h			1.5-1.8
+sys/dev/mii/miivar.h			1.61
+sys/dev/pci/pcireg.h			patch
+
+	Sync bge(4) up to if_bge.c rev. 1.287. Sync brgphy(4) up to 1.74.
+	Fix some bugs on bnx(4). Details as follows:
+	Common:
+	- Add device IDs for Broadcom BCM57710, BCM57711(E), BCM57712(E) and
+	  BCM57766 (pcidevs only).
+	- Fix BCM5709 PHY detection.
+	- Fix detection of BGEPHYF_FIBER_{MII|TBI}
+	- Add BCM5708S support in brgphy(4).
+	- Don't use the WIRESPEED function for fiber devices.
+	bge(4):
+	- Add some Fujitsu's device support from Michael Moll.
+	- Add BCM57762 support (PR#46961 from Ryo Onodera).
+	- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F. BCM5785G,
+	  BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
+	- Fix DMA setting for read/write on conventional PCI bus devices.
+	- Fix printing "discarding oversize frame (len=-4)" message and crash
+	  by NULL pointer dereferencing.
+	- The BCM5785 is a PCIe chip but does not report PCIe capabilities.
+	  Check for this chip explicitly and enable PCIe. Fixes
+	  'firmware handshake timeout'.
+	- Allow disabling interrupt mitigation.
+	- Workaround for BCM5906 silicon bug. When auto-negotiation results in
+	  half-duplex operation, excess collision on the ethernet link may
+	  cause internal chip delays that may result in subsequent valid
+	  frames being dropped due to insufficient receive buffer resources.
+	  (FreeBSD: r214219, r214251, r214292).
+	- Allow write DMA to request larger DMA burst size to get better
+	  performance on BCM5785. (FreeBSD r21: OpenBSD 1.294)
+	- Enable TX MAC state machine lockup fix for both BCM5755 or higher
+	  and BCM5906. Publicly available data sheet just says it may happen
+	  due to corrupted TxMbuf. (FreeBSD r214216)
+	- Follow Broadcom datasheet:
+	  Delay 100 microseconds after enabling transmit MAC.
+	  Delay 10 microseconds after enabling receive MAC. (FreeBSD r241220)
+	- Insert the completion barrier between register write and the
+	  consecutive delay(). It will fix some device timeout problems we have
+	  seen before.
+	- Add DELAY(40) after turning on write DMA state machine.
+	- Add some workarounds for 5717 A0 and 5776[56] to be stable.
+	- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case. Note that
+	  {tcp,udp}6csum flag is currently not added in the capability.
+	- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link
+	  checking.
+	- Do not touch the jumbo replenish threshold register on chips that do
+	  not have jumbo support.
+	- Wait for the bootcode to complete initialization for 5717 and newer
+	  devices.
+	- 5718 and 57785 document say we should wait 100us in init.
+	- Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.
+	- Fix the setting of Tx Random Backoff Register.
+	- Check the hardware config words and print them.
+	- Set BGE_MISC_CTL's byte/word swap options before using
+	  bge_readmem_ind(). Fixes PR#47716.
+	- For BGE_IS_575X_PLUS() devices, don't set
+	  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
+	- Document says 5717 and newer chips have no
+	  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
+	  chips. Same as OpenBSD.
+	- Fix a bug that the PHY address bits in MI_MODE register is wrongly
+	  cleared. Set the PHY address correctly.
+	- Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL
+	  register to not to modify some GPIO bits.
+	- Set DMA 

CVS commit: [netbsd-5] src/sys/dev/pci

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 12:35:32 UTC 2015

Added Files:
src/sys/dev/pci [netbsd-5]: if_bnxvar.h

Log Message:
Pull up the following revisions(s) (requested by msaitoh in ticket #1983):
sys/dev/pci/pcidevs:revisions 1.1079, 1.1134, 
1.1148-1.1149, 1.1151
sys/dev/pci/pcidevs.h:  regen
sys/dev/pci/pcidevs_data.h: regen
sys/dev/pci/if_bge.c:   revisions 1.183-1.185, 1.187, 
1.189-1.193, 1.195-1.199, 1.202-1.226, 1.228-1.237, 1.240-1.264, 1.267-1.276, 
1.278-1.280, 1.283-1.287 via patch
sys/dev/pci/if_bgereg.h:revisions 1.57-1.74, 1.76-1.90 via patch
sys/dev/pci/if_bgevar.h:revisions 1.6, 1.10-1.13, 1.15-1.17 via 
patch
sys/dev/pci/if_bnx.c:   revisions 1.32, 1.34-1.43, 1.48-1.49, 
1.52
sys/dev/pci/if_bnxreg.h:revisions 1.8, 1.11-1.14
sys/dev/pci/if_bnxvar.h:revisions 1.1-1.3
sys/dev/mii/brgphy.c:   revisions 1.53-1.63, 1.65-69, 1.72-1.74 
via patch
sys/dev/mii/brgphyreg.h:revisions 1.5-1.8
sys/dev/mii/miivar.h:   revisions 1.61
sys/dev/pci/pcireg.h:   patch

Sync bge(4) up to if_bge.c rev. 1.287. Sync brgphy(4) up to 1.74.
Fix some bugs on bnx(4).

Common:
- Add device IDs for Broadcom BCM57710, BCM57711(E), BCM57712(E) and
  BCM57766 (pcidevs only).
- Fix BCM5709 PHY detection.
- Fix detection of BGEPHYF_FIBER_{MII|TBI}
- Add BCM5708S support in brgphy(4).
- Don't use the WIRESPEED function for fiber devices.
bge(4):
- Add some Fujitsu's device support from Michael Moll.
- Add BCM57762 support (PR#46961 from Ryo Onodera).
- Add Altima AC1003, APPLE BCM5701, Broadcom BCM5785F. BCM5785G,
  BCM5787F, BCM5719, BCM5720, BCM57766, BCM57782 and BCM57786.
- Fix DMA setting for read/write on conventional PCI bus devices.
  This bug was added in rev. 1.166.
- Fix printing "discarding oversize frame (len=-4)" message and
  crash by NULL pointer dereferencing.
- The BCM5785 is a PCIe chip but does not report PCIe capabilities.
  Check for this chip explicitely and enable PCIe. Fixes
  'firmware handshake timeout'.
- Allow disabling interrupt mitigation.
- Workaround for BCM5906 silicon bug. When auto-negotiation results
  in half-duplex operation, excess collision on the ethernet link may
  cause internal chip delays that may result in subsequent valid
  frames being dropped due to insufficient receive buffer resources.
  (FreeBSD: r214219, r214251, r214292).
- Allow write DMA to request larger DMA burst size to get better
  performance on BCM5785. (FreeBSD r21: OpenBSD 1.294)
- Enable TX MAC state machine lockup fix for both BCM5755 or higher
  and BCM5906. Publicly available data sheet just says it may happen
  due to corrupted TxMbuf. (FreeBSD r214216)
- Follow Broadcom datasheet:
  Delay 100 microseconds after enabling transmit MAC.
  Delay 10 microseconds after enabling receive MAC. (FreeBSD
  r241220)
- Insert the completion barrier between register write and the
  consecutive delay(). It will fix some device timeout problems we have
  seen before.
- Add DELAY(40) after turning on write DMA state machine.
- Add some workarounds for 5717 A0 and 5776[56] to be stable.
- Check BGE_RXBDFLAG_IPV6 flag for 5717_PLUS case. Note that
  {tcp,udp}6csum flag is currently not added in the capability.
- Add delay after clearing BGE_MACMODE_TBI_SEND_CFGS for the link
  checking.
- Do not touch the jumbo replenish threshold register on chips that do
  not have jumbo support.
- Wait for the bootcode to complete initialization for 5717 and newer
  devices.
- 5718 and 57785 document say we should wait 100us in init.
- Fix a bug that chips which have BCM5906 ASIC touch GPIO wrongly.
- Fix the setting of Tx Random Backoff Register.
- Check the hardware config words and print them.
- Set BGE_MISC_CTL's byte/word swap options before using
  bge_readmem_ind(). Fixes PR#47716.
- For BGE_IS_575X_PLUS() devices, don't set
  BGE_RXLPSTATCONTROL_DACK_FIX bits because these bits are reserved.
- Document says 5717 and newer chips have no
  BGE_PCISTATE_INTR_NOT_ACTIVE bit, so don't use the bit on those
  chips. Same as OpenBSD.
- Fix a bug that the PHY address bits in MI_MODE register is wrongly
  cleard. Set the PHY address correctly.
- Use BGE_SETBIT() instead of CSR_WRITE_4() for the BGE_MISC_LOCAL_CTL
  register to not to modify some GPIO bits.
- Set DMA watermark depend on the PCI max payload size.
- Set BGE_JUMBO_CAPABLE correctly.
- Fix a link detect bug on non-autopoll systems.
- Change the TX ring size for 5717 series and 57764 series.
- Set maximum read byte count to 2048 for PCI-X BCM5703/5704 devices.
- For PCI-X BCM5704, set maximum outstanding split transactions to 0.
- Add 40bit DMA bug workaround(BGEF_40BIT_BUG) from FreeBSD.
  This workaround is for 5714/5715 controllers and is not actually a
  MAC controller bug but an issue with the embedded PCIe to PCI-X
  

CVS commit: [netbsd-5] src/sys/dev/pci

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 12:33:51 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.20 -r1.963.4.21 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.20 -r1.962.4.21 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.963.4.20 src/sys/dev/pci/pcidevs.h:1.963.4.21
--- src/sys/dev/pci/pcidevs.h:1.963.4.20	Thu Apr 30 20:01:45 2015
+++ src/sys/dev/pci/pcidevs.h	Mon Nov  9 12:33:32 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.20 2015/04/30 20:01:45 snj Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.21 2015/11/09 12:33:32 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.20 2015/04/30 20:00:27 snj Exp
+ *	NetBSD: pcidevs,v 1.962.4.21 2015/11/09 12:33:02 sborrill Exp
  */
 
 /*
@@ -261,7 +261,8 @@
 #define	PCI_VENDOR_ADVSYS	0x10cd		/* Advanced System Products */
 #define	PCI_VENDOR_RADIUS	0x10ce		/* Radius */
 #define	PCI_VENDOR_CITICORP	0x10cf		/* Citicorp TTI */
-#define	PCI_VENDOR_FUJITSU2	0x10d0		/* Fujitsu Limited (2nd PCI Vendor ID) */
+#define	PCI_VENDOR_FUJITSU4	0x10cf		/* Fujitsu (4th PCI Vendor ID) */
+#define	PCI_VENDOR_FUJITSU2	0x10d0		/* Fujitsu (2nd PCI Vendor ID) */
 #define	PCI_VENDOR_FUTUREPLUS	0x10d1		/* Future+ Systems */
 #define	PCI_VENDOR_MOLEX	0x10d2		/* Molex */
 #define	PCI_VENDOR_JABIL	0x10d3		/* Jabil Circuit */
@@ -885,6 +886,7 @@
 #define	PCI_PRODUCT_ALTIMA_AC1000	0x03e8		/* AC1000 Gigabit Ethernet */
 #define	PCI_PRODUCT_ALTIMA_AC1001	0x03e9		/* AC1001 Gigabit Ethernet */
 #define	PCI_PRODUCT_ALTIMA_AC9100	0x03ea		/* AC9100 Gigabit Ethernet */
+#define	PCI_PRODUCT_ALTIMA_AC1003	0x03eb		/* AC1003 Gigabit Ethernet */
 
 /* AMD products */
 #define	PCI_PRODUCT_AMD_AMD64_HT	0x1100		/* K8 AMD64 HyperTransport configuration */
@@ -1034,6 +1036,7 @@
 #define	PCI_PRODUCT_APPLE_INTREPID2_ATA	0x0069		/* Intrepid 2 ATA */
 #define	PCI_PRODUCT_APPLE_INTREPID2_FW	0x006a		/* Intrepid 2 FireWire */
 #define	PCI_PRODUCT_APPLE_INTREPID2_GMAC	0x006b		/* Intrepid 2 GMAC */
+#define	PCI_PRODUCT_APPLE_BCM5701	0x1645		/* BCM5701 */
 
 /* ARC Logic products */
 #define	PCI_PRODUCT_ARC_1000PV	0xa091		/* 1000PV */
@@ -1426,17 +1429,23 @@
 #define	PCI_PRODUCT_BROADCOM_BCM5706	0x164a		/* BCM5706 NetXtreme II 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5708	0x164c		/* BCM5708 NetXtreme II 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5702FE	0x164d		/* BCM5702FE 10/100 Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57710	0x164e		/* BCM57710 NetXtreme II 10Gb Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57711	0x164f		/* BCM57711 NetXtreme II 10Gb Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57711E	0x1650		/* BCM57711E NetXtreme II 10Gb Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705	0x1653		/* BCM5705 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705K	0x1654		/* BCM5705K 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5717	0x1655		/* BCM5717 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5718	0x1656		/* BCM5718 10/100/1000 Ethernet */
-#define	PCI_PRODUCT_BROADCOM_BCM5720	0x1658		/* BCM5720 NetXtreme 1000baseT Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM5719	0x1657		/* BCM5719 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5721	0x1659		/* BCM5721 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5722	0x165a		/* BCM5722 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5723	0x165b		/* BCM5723 NetXtreme 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5724	0x165c		/* BCM5724 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705M	0x165d		/* BCM5705M 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5705M_ALT	0x165e		/* BCM5705M 10/100/1000 Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM5720	0x165f		/* BCM5720 NetXtreme 1000baseT Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57712	0x1662		/* BCM57712 NetXtreme II 10Gb Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57712E	0x1663		/* BCM57712E NetXtreme II 10Gb Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5714	0x1668		/* BCM5714 1000baseT Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5714S	0x1669		/* BCM5714S 1000baseSX Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5780	0x166a		/* BCM5780 NetXtreme 1000baseT Ethernet */
@@ -1457,7 +1466,9 @@
 #define	PCI_PRODUCT_BROADCOM_BCM5787F	0x167f		/* BCM5787F 10/100 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5761E	0x1680		/* BCM5761E 10/100/1000 Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5761	0x1681		/* BCM5761 10/100/1000 Ethernet */
+#define	PCI_PRODUCT_BROADCOM_BCM57762	0x1682		/* BCM57762 Gigabit Ethernet */
 #define	PCI_PRODUCT_BROADCOM_BCM5764	0x1684		/* BCM5764 NetXtreme 1000baseT 

CVS commit: [netbsd-5] src/sys/dev/mii

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 10:31:26 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5]: miidevs.h miidevs_data.h

Log Message:
Regen


To generate a diff of this commit:
cvs rdiff -u -r1.81.4.5 -r1.81.4.6 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.71.4.5 -r1.71.4.6 src/sys/dev/mii/miidevs_data.h

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

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.81.4.5 src/sys/dev/mii/miidevs.h:1.81.4.6
--- src/sys/dev/mii/miidevs.h:1.81.4.5	Wed Jun 19 07:51:45 2013
+++ src/sys/dev/mii/miidevs.h	Mon Nov  9 10:31:26 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.81.4.5 2013/06/19 07:51:45 bouyer Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.81.4.6 2015/11/09 10:31:26 sborrill Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.78.4.5 2013/06/19 07:50:15 bouyer Exp
+ *	NetBSD: miidevs,v 1.78.4.6 2015/11/09 10:31:06 sborrill Exp
  */
 
 /*-
@@ -47,7 +47,7 @@
  * mapping; the bit positions are defined in IEEE 802-1990, figure 5.2.
  * (There is a formal 802.3 interpretation, number 1-07/98 of July 09 1998,
  * about this.)
- * The MII_OUI() macro in "mii.h" reflects this.
+ * The MII_OUI() macro in "miivar.h" reflects this.
  * If a vendor uses a different mapping, an "xx" prefixed OUI is defined here
  * which is mangled accordingly to compensate.
  */
@@ -56,12 +56,14 @@
 * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
 */
 
+#define	MII_OUI_AGERE	0x00053d	/* Agere */
 #define	MII_OUI_ALTIMA	0x0010a9	/* Altima Communications */
 #define	MII_OUI_AMD	0x1a	/* Advanced Micro Devices */
 #define	MII_OUI_ATHEROS	0x001374	/* Atheros */
 #define	MII_OUI_ATTANSIC	0x00c82e	/* Attansic Technology */
 #define	MII_OUI_BROADCOM	0x001018	/* Broadcom Corporation */
 #define	MII_OUI_BROADCOM2	0x000af7	/* Broadcom Corporation */
+#define	MII_OUI_BROADCOM3	0x001be9	/* Broadcom Corporation */
 #define	MII_OUI_CICADA	0x0003F1	/* Cicada Semiconductor */
 #define	MII_OUI_DAVICOM	0x00606e	/* Davicom Semiconductor */
 #define	MII_OUI_ENABLESEMI	0x0010dd	/* Enable Semiconductor */
@@ -71,13 +73,16 @@
 #define	MII_OUI_JMICRON	0x00d831	/* JMicron */
 #define	MII_OUI_LEVEL1	0x00207b	/* Level 1 */
 #define	MII_OUI_MARVELL	0x005043	/* Marvell Semiconductor */
+#define	MII_OUI_MICREL	0x0010a1	/* Micrel */
 #define	MII_OUI_MYSON	0x00c0b4	/* Myson Technology */
 #define	MII_OUI_NATSEMI	0x080017	/* National Semiconductor */
 #define	MII_OUI_PMCSIERRA	0x00e004	/* PMC-Sierra */
+#define	MII_OUI_RDC	0x00d02d	/* RDC Semiconductor */
 #define	MII_OUI_REALTEK	0x00e04c	/* RealTek */
 #define	MII_OUI_QUALSEMI	0x006051	/* Quality Semiconductor */
 #define	MII_OUI_SEEQ	0x00a07d	/* Seeq */
 #define	MII_OUI_SIS	0x00e006	/* Silicon Integrated Systems */
+#define	MII_OUI_SMSC	0x00800f	/* SMSC */
 #define	MII_OUI_TI	0x080028	/* Texas Instruments */
 #define	MII_OUI_TSC	0x00c039	/* TDK Semiconductor */
 #define	MII_OUI_XAQTI	0x00e0ae	/* XaQti Corp. */
@@ -125,6 +130,16 @@
 #define	MII_STR_ATTANSIC_L1	"L1 10/100/1000 PHY"
 #define	MII_MODEL_ATTANSIC_L2	0x0002
 #define	MII_STR_ATTANSIC_L2	"L2 10/100 PHY"
+#define	MII_MODEL_ATTANSIC_AR8021	0x0004
+#define	MII_STR_ATTANSIC_AR8021	"Atheros AR8021 10/100/1000 PHY"
+#define	MII_MODEL_ATTANSIC_AR8035	0x0007
+#define	MII_STR_ATTANSIC_AR8035	"Atheros AR8035 10/100/1000 PHY"
+
+/*
+ * Agere PHYs
+ */
+#define	MII_MODEL_AGERE_ET1011	0x0004
+#define	MII_STR_AGERE_ET1011	"Agere ET1011 10/100/1000baseT PHY"
 
 /* Altima Communications PHYs */
 /* Don't know the model for ACXXX */
@@ -166,6 +181,8 @@
 #define	MII_STR_xxBROADCOM_BCM5222	"BCM5222 Dual 10/100 media interface"
 #define	MII_MODEL_xxBROADCOM_BCM4401	0x0036
 #define	MII_STR_xxBROADCOM_BCM4401	"BCM4401 10/100 media interface"
+#define	MII_MODEL_xxBROADCOM_BCM5365	0x0037
+#define	MII_STR_xxBROADCOM_BCM5365	"BCM5365 10/100 5-port PHY switch"
 #define	MII_MODEL_BROADCOM_BCM5400	0x0004
 #define	MII_STR_BROADCOM_BCM5400	"BCM5400 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5401	0x0005
@@ -184,6 +201,8 @@
 #define	MII_STR_BROADCOM_BCM5752	"BCM5752 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5701	0x0011
 #define	MII_STR_BROADCOM_BCM5701	"BCM5701 1000BASE-T media interface"
+#define	MII_MODEL_BROADCOM_BCM5706	0x0015
+#define	MII_STR_BROADCOM_BCM5706	"BCM5706 1000BASE-T/SX media interface"
 #define	MII_MODEL_BROADCOM_BCM5703	0x0016
 #define	MII_STR_BROADCOM_BCM5703	"BCM5703 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5750	0x0018
@@ -195,17 +214,29 @@
 #define	MII_MODEL_BROADCOM_BCM54K2	0x002e
 #define	MII_STR_BROADCOM_BCM54K2	"BCM54K2 1000BASE-T media interface"
 #define	MII_MODEL_BROADCOM_BCM5714	0x0034
-#define	MII_STR_BROADCOM_BCM5714	"BCM5714 1000BASE-T media interface"
+#define	MII_STR_BROADCOM_BCM5714	"BCM5714 1000BASE-T/X media interface"
 #define	

CVS commit: [netbsd-5] src/sys/dev/mii

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 10:31:06 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5]: miidevs

Log Message:
Pull up the following revisions(s) (requested by msaitoh in ticket #1982):
sys/dev/mii/miidevs:revisions 1.79-1.80, 1.84, 1.86-1.88,
1.91-1.92, 1.94-1.96, 1.98-1.99, 1.101-1.112 via patch

Sync miidevs up to rev. 1.112:
- Add Agere ET1101 (PR#39094)
- Add some CICADA PHYs.
- AddMarvell 88E1000[S], 88E1116R, 88E1118, 88E1145, 88E1149[R],
- 88E1543, 88E3016, PHYG65G
- Add NS DP83849(PR#41256), DP83865.
- Add Broadcom BCM5325, BCM5365, BCM548[12], BCM5706, BCM570[89]S,
- BCM571[79]C, BCM5720C, BCM5756, BCM5785, BCM57765, BCM57780
- Add Atheros AR8021, AR8035
- Add RDC Semiconductor R6040 10/100 integrated PHY
- Add Vitesse VSC8221
- Add SMSC LAN 87[012]0
- Add Intel I21[07].
- Add IC Plus IP100, IP1000A and IP1001
- Add Micrel KSZ9021RN
- Add Relatek RTL8251
- Update comment.


To generate a diff of this commit:
cvs rdiff -u -r1.78.4.5 -r1.78.4.6 src/sys/dev/mii/miidevs

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

Modified files:

Index: src/sys/dev/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.78.4.5 src/sys/dev/mii/miidevs:1.78.4.6
--- src/sys/dev/mii/miidevs:1.78.4.5	Wed Jun 19 07:50:15 2013
+++ src/sys/dev/mii/miidevs	Mon Nov  9 10:31:06 2015
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.78.4.5 2013/06/19 07:50:15 bouyer Exp $
+$NetBSD: miidevs,v 1.78.4.6 2015/11/09 10:31:06 sborrill Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@ $NetBSD: miidevs,v 1.78.4.5 2013/06/19 0
  * mapping; the bit positions are defined in IEEE 802-1990, figure 5.2.
  * (There is a formal 802.3 interpretation, number 1-07/98 of July 09 1998,
  * about this.)
- * The MII_OUI() macro in "mii.h" reflects this.
+ * The MII_OUI() macro in "miivar.h" reflects this.
  * If a vendor uses a different mapping, an "xx" prefixed OUI is defined here
  * which is mangled accordingly to compensate.
  */
@@ -49,12 +49,14 @@ $NetBSD: miidevs,v 1.78.4.5 2013/06/19 0
 * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
 */
 
+oui AGERE			0x00053d	Agere
 oui ALTIMA			0x0010a9	Altima Communications
 oui AMD0x1a	Advanced Micro Devices
 oui ATHEROS			0x001374	Atheros
 oui ATTANSIC			0x00c82e	Attansic Technology
 oui BROADCOM			0x001018	Broadcom Corporation
 oui BROADCOM2			0x000af7	Broadcom Corporation
+oui BROADCOM3			0x001be9	Broadcom Corporation
 oui CICADA			0x0003F1	Cicada Semiconductor
 oui DAVICOM			0x00606e	Davicom Semiconductor
 oui ENABLESEMI			0x0010dd	Enable Semiconductor
@@ -64,13 +66,16 @@ oui INTEL			0x00aa00	Intel
 oui JMICRON			0x00d831	JMicron
 oui LEVEL1			0x00207b	Level 1
 oui MARVELL			0x005043	Marvell Semiconductor
+oui MICREL			0x0010a1	Micrel
 oui MYSON			0x00c0b4	Myson Technology
 oui NATSEMI			0x080017	National Semiconductor
 oui PMCSIERRA			0x00e004	PMC-Sierra
+oui RDC0x00d02d	RDC Semiconductor
 oui REALTEK			0x00e04c	RealTek
 oui QUALSEMI			0x006051	Quality Semiconductor
 oui SEEQ			0x00a07d	Seeq
 oui SIS0x00e006	Silicon Integrated Systems
+oui SMSC			0x00800f	SMSC
 oui TI0x080028	Texas Instruments
 oui TSC0x00c039	TDK Semiconductor
 oui XAQTI			0x00e0ae	XaQti Corp.
@@ -114,6 +119,13 @@ model ATHEROS F2		0x0002 F2 10/100 PHY
 /* Attansic PHYs */
 model ATTANSIC L1		0x0001 L1 10/100/1000 PHY
 model ATTANSIC L2		0x0002 L2 10/100 PHY
+model ATTANSIC AR8021		0x0004 Atheros AR8021 10/100/1000 PHY
+model ATTANSIC AR8035		0x0007 Atheros AR8035 10/100/1000 PHY
+
+/*
+ * Agere PHYs
+ */
+model AGERE ET1011		0x0004 Agere ET1011 10/100/1000baseT PHY
 
 /* Altima Communications PHYs */
 /* Don't know the model for ACXXX */
@@ -139,6 +151,7 @@ model xxBROADCOM BCM5214	0x0028 BCM5214 
 model xxBROADCOM BCM5221	0x001e BCM5221 10/100 media interface
 model xxBROADCOM BCM5222	0x0032 BCM5222 Dual 10/100 media interface
 model xxBROADCOM BCM4401	0x0036 BCM4401 10/100 media interface
+model xxBROADCOM BCM5365	0x0037 BCM5365 10/100 5-port PHY switch
 model BROADCOM BCM5400		0x0004 BCM5400 1000BASE-T media interface
 model BROADCOM BCM5401		0x0005 BCM5401 1000BASE-T media interface
 model BROADCOM BCM5411		0x0007 BCM5411 1000BASE-T media interface
@@ -148,28 +161,45 @@ model BROADCOM BCM5462		0x000d BCM5462 1
 model BROADCOM BCM5421		0x000e BCM5421 1000BASE-T media interface
 model BROADCOM BCM5752		0x0010 BCM5752 1000BASE-T media interface
 model BROADCOM BCM5701		0x0011 BCM5701 1000BASE-T media interface
+model BROADCOM BCM5706		0x0015 BCM5706 1000BASE-T/SX media interface
 model BROADCOM BCM5703		0x0016 BCM5703 1000BASE-T media interface
 model BROADCOM BCM5750		0x0018 BCM5750 1000BASE-T media interface
 model BROADCOM BCM5704		0x0019 BCM5704 1000BASE-T media interface
 model BROADCOM BCM5705		0x001a BCM5705 1000BASE-T media interface
 model BROADCOM BCM54K2		0x002e BCM54K2 1000BASE-T media interface
-model 

CVS commit: [netbsd-5] src/doc

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 10:36:46 UTC 2015

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

Log Message:
Ticket #1982


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.126 -r1.1.2.127 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.126 src/doc/CHANGES-5.3:1.1.2.127
--- src/doc/CHANGES-5.3:1.1.2.126	Sat Nov  7 20:52:40 2015
+++ src/doc/CHANGES-5.3	Mon Nov  9 10:36:46 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.126 2015/11/07 20:52:40 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.127 2015/11/09 10:36:46 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -4078,3 +4078,26 @@ sys/kern/kern_exit.c1.248
 	Update value of p_stat before we release the proc_lock.
 	[pgoyette, ticket #1981]
 
+sys/dev/mii/miidevs1.79-1.80, 1.84, 1.86-1.88, 1.91-1.92, 1.94-1.96, 1.98-1.99, 1.101-1.112 via patch
+sys/dev/mii/miidevs.hregen
+sys/dev/mii/miidevs_data.h			regen
+
+	Sync miidevs up to rev. 1.112:
+	- Add Agere ET1101 (PR#39094)
+	- Add some CICADA PHYs.
+	- AddMarvell 88E1000[S], 88E1116R, 88E1118, 88E1145, 88E1149[R],
+	  88E1543, 88E3016, PHYG65G
+	- Add NS DP83849(PR#41256), DP83865.
+	- Add Broadcom BCM5325, BCM5365, BCM548[12], BCM5706, BCM570[89]S,
+	  BCM571[79]C, BCM5720C, BCM5756, BCM5785, BCM57765, BCM57780
+	- Add Atheros AR8021, AR8035
+	- Add RDC Semiconductor R6040 10/100 integrated PHY
+	- Add Vitesse VSC8221
+	- Add SMSC LAN 87[012]0
+	- Add Intel I21[07].
+	- Add IC Plus IP100, IP1000A and IP1001
+	- Add Micrel KSZ9021RN
+	- Add Relatek RTL8251
+	- Update comment.
+	[msaitoh, ticket #1982]
+



CVS commit: [netbsd-5] src/sys/ufs/lfs

2015-11-09 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Nov  9 09:59:18 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5]: lfs_segment.c

Log Message:
Fix breakage from ticket #1974


To generate a diff of this commit:
cvs rdiff -u -r1.213.8.1 -r1.213.8.2 src/sys/ufs/lfs/lfs_segment.c

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

Modified files:

Index: src/sys/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.213.8.1 src/sys/ufs/lfs/lfs_segment.c:1.213.8.2
--- src/sys/ufs/lfs/lfs_segment.c:1.213.8.1	Sat Nov  7 20:30:41 2015
+++ src/sys/ufs/lfs/lfs_segment.c	Mon Nov  9 09:59:18 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.8.2 2015/11/09 09:59:18 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.8.2 2015/11/09 09:59:18 sborrill Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1700,7 +1700,7 @@ lfs_rewind(struct lfs *fs, int newsn)
 		panic("lfs_rewind: no clean segments");
 	if (newsn >= 0 && sn >= newsn)
 		return ENOENT;
-	fs->lfs_nextseg = lfs_sntod(fs, sn);
+	fs->lfs_nextseg = sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: [netbsd-5] src/lib/libm/src

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:25:23 UTC 2015

Modified Files:
src/lib/libm/src [netbsd-5]: lrint.c lrintf.c

Log Message:
Pull up following revision(s) (requested by nat in ticket #1972):
lib/libm/src/lrintf.c: revision 1.6
lib/libm/src/lrint.c: revision 1.5
Return x for >= DBL_FRACBITS in lrint.c.
Return x for >= SNG_FRACBITS in lrintf.c
Addresses PR lib/49690
This commit was approved by christos@


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/lib/libm/src/lrint.c
cvs rdiff -u -r1.5 -r1.5.6.1 src/lib/libm/src/lrintf.c

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

Modified files:

Index: src/lib/libm/src/lrint.c
diff -u src/lib/libm/src/lrint.c:1.4 src/lib/libm/src/lrint.c:1.4.6.1
--- src/lib/libm/src/lrint.c:1.4	Sat Apr 26 23:49:50 2008
+++ src/lib/libm/src/lrint.c	Sat Nov  7 20:25:23 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lrint.c,v 1.4 2008/04/26 23:49:50 christos Exp $ */
+/* $NetBSD: lrint.c,v 1.4.6.1 2015/11/07 20:25:23 snj Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -70,7 +70,8 @@ LRINTNAME(double x)
 		/* round, using current direction */
 		x += TWO52[s];
 		x -= TWO52[s];
-	}
+	} else
+		return x;
 
 	EXTRACT_WORDS(i0, i1, x);
 	e = ((i0 >> 20) & 0x7ff) - DBL_EXP_BIAS;

Index: src/lib/libm/src/lrintf.c
diff -u src/lib/libm/src/lrintf.c:1.5 src/lib/libm/src/lrintf.c:1.5.6.1
--- src/lib/libm/src/lrintf.c:1.5	Sat Apr 26 23:49:50 2008
+++ src/lib/libm/src/lrintf.c	Sat Nov  7 20:25:23 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: lrintf.c,v 1.5 2008/04/26 23:49:50 christos Exp $ */
+/* $NetBSD: lrintf.c,v 1.5.6.1 2015/11/07 20:25:23 snj Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -74,7 +74,8 @@ LRINTNAME(float x)
 		/* round, using current direction */
 		w = TWO23[s] + x;
 		x = w - TWO23[s];
-	}
+	} else
+		return x;
 
 	GET_FLOAT_WORD(i0, x);
 	e = ((i0 >> SNG_FRACBITS) & 0xff) - SNG_EXP_BIAS;



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

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:43:23 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: kern_exec.c kern_exit.c kern_synch.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1979):
sys/kern/kern_synch.c: revision 1.309
sys/kern/kern_exit.c: revisions 1.246, 1.247
sys/kern/kern_exec.c: revision 1.419
In execve_runproc(), update the p_waited entry for the process being
moved to SSTOP state, not for its parent.  (It is correct to update
the parent's p_nstopchild count.)  If the value is not already zero,
it could prevent its parent from waiting for the process.
Fixes PR kern/50298
--
When clearing out the scheduler queues during system shutdown, we move
all processes to the SSTOP state.  Make sure we update each process's
p_waited and the parents' p_nstopchild counters to maintain consistent
values.  Should not make any real difference this late in the shutdown
process, but we should still be consistent just in case.
Fixes PR kern/50318
--
Currently, if a process is exiting and its parent has indicated no intent
of reaping the process (nor any other children), the process wil get
reparented to init.  Since the state of the exiting process at this point
is SDEAD, proc_reparent() will not update either the old or new parent's
p_nstopchild counters.
This change causes both old and new parents to be properly updated.
Fixes PR kern/50300
--
For processes marked with PS_STOPEXIT, update the process's p_waited
value, and update its parent's p_nstopchild value when marking the
process's p_stat to SSTOP.  The process needed to be SACTIVE to get
here, so this transition represents an additional process for which
the parent needs to wait.
Fixes PR kern/50308


To generate a diff of this commit:
cvs rdiff -u -r1.280.4.3 -r1.280.4.4 src/sys/kern/kern_exec.c
cvs rdiff -u -r1.214.4.2 -r1.214.4.3 src/sys/kern/kern_exit.c
cvs rdiff -u -r1.254.2.6 -r1.254.2.7 src/sys/kern/kern_synch.c

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

Modified files:

Index: src/sys/kern/kern_exec.c
diff -u src/sys/kern/kern_exec.c:1.280.4.3 src/sys/kern/kern_exec.c:1.280.4.4
--- src/sys/kern/kern_exec.c:1.280.4.3	Wed Apr  1 21:03:04 2009
+++ src/sys/kern/kern_exec.c	Sat Nov  7 20:43:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $	*/
+/*	$NetBSD: kern_exec.c,v 1.280.4.4 2015/11/07 20:43:23 snj Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.3 2009/04/01 21:03:04 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exec.c,v 1.280.4.4 2015/11/07 20:43:23 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_syscall_debug.h"
@@ -1104,7 +1104,7 @@ execve1(struct lwp *l, const char *path,
 	if (p->p_sflag & PS_STOPEXEC) {
 		KERNEL_UNLOCK_ALL(l, >l_biglocks);
 		p->p_pptr->p_nstopchild++;
-		p->p_pptr->p_waited = 0;
+		p->p_waited = 0;
 		mutex_enter(p->p_lock);
 		ksiginfo_queue_init();
 		sigclearall(p, , );

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.214.4.2 src/sys/kern/kern_exit.c:1.214.4.3
--- src/sys/kern/kern_exit.c:1.214.4.2	Wed Jul  1 22:30:30 2009
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:43:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.2 2009/07/01 22:30:30 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2 2009/07/01 22:30:30 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -234,8 +234,15 @@ exit1(struct lwp *l, int rv)
 	if (__predict_false(p->p_sflag & PS_STOPEXIT)) {
 		KERNEL_UNLOCK_ALL(l, >l_biglocks);
 		sigclearall(p, , );
+
+		if (!mutex_tryenter(proc_lock)) {
+			mutex_exit(p->p_lock);
+			mutex_enter(proc_lock);
+			mutex_enter(p->p_lock);
+		}
 		p->p_waited = 0;
-		membar_producer();
+		p->p_pptr->p_nstopchild++;
+		mutex_exit(proc_lock);
 		p->p_stat = SSTOP;
 		lwp_lock(l);
 		p->p_nrlwps--;
@@ -1011,7 +1018,7 @@ proc_reparent(struct proc *child, struct
 	if (child->p_pptr == parent)
 		return;
 
-	if (child->p_stat == SZOMB ||
+	if (child->p_stat == SZOMB || child->p_stat == SDEAD ||
 	(child->p_stat == SSTOP && !child->p_waited)) {
 		child->p_pptr->p_nstopchild--;
 		parent->p_nstopchild++;

Index: src/sys/kern/kern_synch.c
diff -u src/sys/kern/kern_synch.c:1.254.2.6 src/sys/kern/kern_synch.c:1.254.2.7
--- src/sys/kern/kern_synch.c:1.254.2.6	Thu Apr 23 17:47:13 2009
+++ src/sys/kern/kern_synch.c	Sat Nov  7 20:43:23 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_synch.c,v 1.254.2.6 2009/04/23 17:47:13 snj Exp $	*/
+/*	$NetBSD: kern_synch.c,v 1.254.2.7 2015/11/07 20:43:23 snj Exp $	

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

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:45:20 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: kern_sig.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1980):
sys/kern/kern_sig.c: revision 1.321
When delivering a signal, it's possible that the process's state in
p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting for other
lwp's to stop).  In that case, we don't want to adjust the parent's
p_nstopchild count.
Found by Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.289.4.8 -r1.289.4.9 src/sys/kern/kern_sig.c

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

Modified files:

Index: src/sys/kern/kern_sig.c
diff -u src/sys/kern/kern_sig.c:1.289.4.8 src/sys/kern/kern_sig.c:1.289.4.9
--- src/sys/kern/kern_sig.c:1.289.4.8	Sat Mar 17 19:14:08 2012
+++ src/sys/kern/kern_sig.c	Sat Nov  7 20:45:19 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_sig.c,v 1.289.4.8 2012/03/17 19:14:08 bouyer Exp $	*/
+/*	$NetBSD: kern_sig.c,v 1.289.4.9 2015/11/07 20:45:19 snj Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -66,7 +66,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.8 2012/03/17 19:14:08 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.9 2015/11/07 20:45:19 snj Exp $");
 
 #include "opt_ptrace.h"
 #include "opt_compat_sunos.h"
@@ -1402,14 +1402,13 @@ kpsignal2(struct proc *p, ksiginfo_t *ks
 		}
 		if ((prop & SA_CONT) != 0 || signo == SIGKILL) {
 			/*
-			 * Re-adjust p_nstopchild if the process wasn't
-			 * collected by its parent.
+			 * Re-adjust p_nstopchild if the process was
+			 * stopped but not yet collected by its parent.
 			 */
+			if (p->p_stat == SSTOP && !p->p_waited)
+p->p_pptr->p_nstopchild--;
 			p->p_stat = SACTIVE;
 			p->p_sflag &= ~PS_STOPPING;
-			if (!p->p_waited) {
-p->p_pptr->p_nstopchild--;
-			}
 			if (p->p_slflag & PSL_TRACED) {
 KASSERT(signo == SIGKILL);
 goto deliver;



CVS commit: [netbsd-5] src/sys/ufs/lfs

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:30:41 UTC 2015

Modified Files:
src/sys/ufs/lfs [netbsd-5]: lfs_segment.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1974):
sys/ufs/lfs/lfs_segment.c: revision 1.247 via patch
Fix catastrophic bug in lfs_rewind() that changed segment numbers
(lfs_curseg/lfs_nextseg in the superblock) using the wrong units.
These fields are for whatever reason the start addresses of segments
(measured in frags) rather than the segment numbers 0..n.
This only apparently affects dumping from a mounted fs; however, it
trashes the fs.
I would really, really like to have a static analysis tool that can
keep track of the units things are measured in, since fs code is full
of conversion macros and the macros are named inscrutable things like
"sntod" whose letters don't necessarily even correspond to the units
they convert. It is surprising that more of these are not wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.213 -r1.213.8.1 src/sys/ufs/lfs/lfs_segment.c

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

Modified files:

Index: src/sys/ufs/lfs/lfs_segment.c
diff -u src/sys/ufs/lfs/lfs_segment.c:1.213 src/sys/ufs/lfs/lfs_segment.c:1.213.8.1
--- src/sys/ufs/lfs/lfs_segment.c:1.213	Mon Jun  2 16:25:34 2008
+++ src/sys/ufs/lfs/lfs_segment.c	Sat Nov  7 20:30:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: lfs_segment.c,v 1.213 2008/06/02 16:25:34 ad Exp $	*/
+/*	$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213 2008/06/02 16:25:34 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.8.1 2015/11/07 20:30:41 snj Exp $");
 
 #ifdef DEBUG
 # define vndebug(vp, str) do {		\
@@ -1669,7 +1669,7 @@ lfs_updatemeta(struct segment *sp)
 }
 
 /*
- * Move lfs_offset to a segment earlier than sn.
+ * Move lfs_offset to a segment earlier than newsn.
  */
 int
 lfs_rewind(struct lfs *fs, int newsn)
@@ -1700,7 +1700,7 @@ lfs_rewind(struct lfs *fs, int newsn)
 		panic("lfs_rewind: no clean segments");
 	if (newsn >= 0 && sn >= newsn)
 		return ENOENT;
-	fs->lfs_nextseg = sn;
+	fs->lfs_nextseg = lfs_sntod(fs, sn);
 	lfs_newseg(fs);
 	fs->lfs_offset = fs->lfs_curseg;
 



CVS commit: [netbsd-5] src/sys/dev/mii

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:35:53 UTC 2015

Modified Files:
src/sys/dev/mii [netbsd-5]: atphy.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1978):
sys/dev/mii/atphy.c: revision 1.17
Fix incorrect argument of mii_anar(). Fixes PR#50206.
XXX pullup -[567]


To generate a diff of this commit:
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/dev/mii/atphy.c

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

Modified files:

Index: src/sys/dev/mii/atphy.c
diff -u src/sys/dev/mii/atphy.c:1.5.2.2 src/sys/dev/mii/atphy.c:1.5.2.3
--- src/sys/dev/mii/atphy.c:1.5.2.2	Sun May  3 23:45:47 2009
+++ src/sys/dev/mii/atphy.c	Sat Nov  7 20:35:52 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: atphy.c,v 1.5.2.2 2009/05/03 23:45:47 snj Exp $ */
+/*	$NetBSD: atphy.c,v 1.5.2.3 2015/11/07 20:35:52 snj Exp $ */
 /*	$OpenBSD: atphy.c,v 1.1 2008/09/25 20:47:16 brad Exp $	*/
 
 /*-
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.5.2.2 2009/05/03 23:45:47 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atphy.c,v 1.5.2.3 2015/11/07 20:35:52 snj Exp $");
 
 #include 
 #include 
@@ -202,7 +202,7 @@ atphy_service(struct mii_softc *sc, stru
 			return EINVAL;
 		}
 
-		anar = mii_anar(ife->ifm_media);
+		anar = mii_anar(IFM_SUBTYPE(ife->ifm_media));
 		if (((ife->ifm_media & IFM_GMASK) & IFM_FDX) != 0) {
 			bmcr |= BMCR_FDX;
 			/* Enable pause. */



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

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:50:07 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: kern_exit.c

Log Message:
Pull up following revision(s) (requested by pgoyette in ticket #1981):
sys/kern/kern_exit.c: revision 1.248
Update value of p_stat before we release the proc_lock.  Thanks to
Robert Elz.


To generate a diff of this commit:
cvs rdiff -u -r1.214.4.3 -r1.214.4.4 src/sys/kern/kern_exit.c

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

Modified files:

Index: src/sys/kern/kern_exit.c
diff -u src/sys/kern/kern_exit.c:1.214.4.3 src/sys/kern/kern_exit.c:1.214.4.4
--- src/sys/kern/kern_exit.c:1.214.4.3	Sat Nov  7 20:43:23 2015
+++ src/sys/kern/kern_exit.c	Sat Nov  7 20:50:07 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj Exp $	*/
+/*	$NetBSD: kern_exit.c,v 1.214.4.4 2015/11/07 20:50:07 snj Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.3 2015/11/07 20:43:23 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.4 2015/11/07 20:50:07 snj Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_perfctrs.h"
@@ -242,8 +242,8 @@ exit1(struct lwp *l, int rv)
 		}
 		p->p_waited = 0;
 		p->p_pptr->p_nstopchild++;
-		mutex_exit(proc_lock);
 		p->p_stat = SSTOP;
+		mutex_exit(proc_lock);
 		lwp_lock(l);
 		p->p_nrlwps--;
 		l->l_stat = LSSTOP;



CVS commit: [netbsd-5] src/libexec/ftpd

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:33:26 UTC 2015

Modified Files:
src/libexec/ftpd [netbsd-5]: logwtmp.c

Log Message:
Pull up following revision(s) (requested by shm in ticket #1975):
libexec/ftpd/logwtmp.c: revision 1.26
libexec/ftpd/logwtmp.c: revision 1.27
Removed unnecessary memset(3) call
--
Clear utmpx struct before writing it to wtmpx files


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.25.24.1 src/libexec/ftpd/logwtmp.c

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

Modified files:

Index: src/libexec/ftpd/logwtmp.c
diff -u src/libexec/ftpd/logwtmp.c:1.25 src/libexec/ftpd/logwtmp.c:1.25.24.1
--- src/libexec/ftpd/logwtmp.c:1.25	Sat Sep 23 16:03:50 2006
+++ src/libexec/ftpd/logwtmp.c	Sat Nov  7 20:33:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: logwtmp.c,v 1.25 2006/09/23 16:03:50 xtraeme Exp $	*/
+/*	$NetBSD: logwtmp.c,v 1.25.24.1 2015/11/07 20:33:26 snj Exp $	*/
 
 /*
  * Copyright (c) 1988, 1993
@@ -36,7 +36,7 @@
 #if 0
 static char sccsid[] = "@(#)logwtmp.c	8.1 (Berkeley) 6/4/93";
 #else
-__RCSID("$NetBSD: logwtmp.c,v 1.25 2006/09/23 16:03:50 xtraeme Exp $");
+__RCSID("$NetBSD: logwtmp.c,v 1.25.24.1 2015/11/07 20:33:26 snj Exp $");
 #endif
 #endif /* not lint */
 
@@ -124,13 +124,12 @@ ftpd_logwtmpx(const char *line, const ch
 	if (fdx < 0) 
 		return;
 	if (fstat(fdx, ) == 0) {
+		(void)memset(, 0, sizeof(ut));
 		(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
 		(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
 		(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
 		if (haddr)
 			(void)memcpy(_ss, >si_su, haddr->su_len);
-		else
-			(void)memset(_ss, 0, sizeof(ut.ut_ss));
 		ut.ut_type = utx_type;
 		if (WIFEXITED(status))
 			ut.ut_exit.e_exit = (uint16_t)WEXITSTATUS(status);



CVS commit: [netbsd-5] src/doc

2015-11-07 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sat Nov  7 20:52:40 UTC 2015

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

Log Message:
tickets 1972, 1974, 1975, 1978-1981


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.125 -r1.1.2.126 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.125 src/doc/CHANGES-5.3:1.1.2.126
--- src/doc/CHANGES-5.3:1.1.2.125	Tue Sep 15 00:03:00 2015
+++ src/doc/CHANGES-5.3	Sat Nov  7 20:52:40 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.125 2015/09/15 00:03:00 riz Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.126 2015/11/07 20:52:40 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3990,3 +3990,91 @@ crypto/dist/openssl/util/mkerr.pl		patch
 	POODLE fix in October last year that caused the SSL server side	to
 	fail to handshake.
 	[spz, ticket#1976]
+
+lib/libm/src/lrint.c1.5
+lib/libm/src/lrintf.c1.6
+
+	Return x for >= DBL_FRACBITS in lrint.c.
+	Return x for >= SNG_FRACBITS in lrintf.c
+
+	Addresses PR lib/49690
+	[nat, ticket #1972]
+
+sys/ufs/lfs/lfs_segment.c			1.247 via patch
+
+	Fix catastrophic bug in lfs_rewind() that changed segment
+	numbers (lfs_curseg/lfs_nextseg in the superblock) using the
+	wrong units.  These fields are for whatever reason the start
+	addresses of segments (measured in frags) rather than the
+	segment numbers 0..n.  Only affects dumping from a mounted
+	file system.
+	[dholland, ticket #1974]
+
+libexec/ftpd/logwtmp.c1.26
+libexec/ftpd/logwtmp.c1.27
+
+	ftpd(8): Don't write uninitialized data to wtmpx files.
+	[shm, ticket #1975]
+
+sys/dev/mii/atphy.c1.17
+
+	Fix incorrect argument of mii_anar(). Fixes PR#50206.
+	[msaitoh, ticket #1978]
+
+sys/kern/kern_exec.c1.419, 1.420
+sys/kern/kern_exit.c1.246, 1.247
+sys/kern/kern_synch.c1.309
+
+	In execve_runproc(), update the p_waited entry for the process
+	being moved to SSTOP state, not for its parent.  If the value is
+	not already zero, it could prevent its parent from waiting for
+	the process.  Fixes PR kern/50298
+	--
+	When clearing out the scheduler queues during system shutdown,
+	we move all processes to the SSTOP state.  Make sure we update
+	each process's p_waited and the parents' p_nstopchild counters
+	to maintain consistent values.  Fixes PR kern/50318
+	--
+	Currently, if a process is exiting and its parent has indicated
+	no intent of reaping the process (nor any other children), the
+	process will get reparented to init.  Since the state of the
+	exiting process at this point is SDEAD, proc_reparent() will not
+	update either the old or new parent's p_nstopchild counters.
+	This change causes both old and new parents to be properly
+	updated.  Fixes PR kern/50300
+	--
+	For processes marked with PS_STOPEXIT, update the process's
+	p_waited value, and update its parent's p_nstopchild value when
+	marking the process's p_stat to SSTOP.  The process needed to be
+	SACTIVE to get here, so this transition represents an additional
+	process for which the parent needs to wait.  Fixes PR kern/50308
+	--
+	In spawn_return() we temporarily move the process state to SSTOP,
+	but without updating its p_waited value or its parent's
+	p_nstopchild counter.  Later, we restore the original state,
+	again without any adjustment of the related values.  This leaves
+	a relatively short window when the values are inconsistent and
+	could interfere with the proper operation of sys_wait() for the
+	parent.  If during this window, any of the checks being made
+	result in an error, we call exit1() which will eventually migrate
+	the process's state to SDEAD (with an intermediate transition to
+	SDYING).  At this point the other variables get updated, and we
+	finally restore a consistent state.
+	This change updates the p_waited and parent's p_nstopchild at each
+	step to eliminate any windows during which the values could lead
+	to incorrect decisions.  Fixes PR kern/50330
+	[pgoyette, ticket #1979]
+
+sys/kern/kern_sig.c1.321
+
+	When delivering a signal, it's possible that the process's state
+	in p_stat is SACTIVE yet p_sflag is PS_STOPPING (while waiting
+	for other lwp's to stop).  In that case, we don't want to adjust
+	the parent's p_nstopchild count.
+	[pgoyette, ticket #1980]
+
+sys/kern/kern_exit.c1.248
+
+	Update value of p_stat before we release the proc_lock.
+	[pgoyette, ticket #1981]
+



CVS commit: [netbsd-5] src/doc

2015-09-14 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Tue Sep 15 00:03:00 UTC 2015

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

Log Message:
Fix file list for ticket 1865;  add a missing "/"


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.124 -r1.1.2.125 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.124 src/doc/CHANGES-5.3:1.1.2.125
--- src/doc/CHANGES-5.3:1.1.2.124	Fri Aug 14 06:00:19 2015
+++ src/doc/CHANGES-5.3	Tue Sep 15 00:03:00 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.124 2015/08/14 06:00:19 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.125 2015/09/15 00:03:00 riz Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -221,54 +221,54 @@ distrib/utils/sysinst/menus.mi		1.35, 1.
 	public servers.
 	[msaitoh, ticket #1846]
 
-xsrc/external/mitMesaLib/dist/src/glx/x11/XF86dri.c	patch
-xsrc/external/mitlibFS/dist/src/FSOpenServ.c		patch
-xsrc/external/mitlibX11/dist/modules/im/ximcp/imLcPrs.c	patch
-xsrc/external/mitlibX11/dist/modules/im/ximcp/imTrX.c	patch
-xsrc/external/mitlibX11/dist/src/AllCells.c		patch
-xsrc/external/mitlibX11/dist/src/Font.c			patch
-xsrc/external/mitlibX11/dist/src/FontInfo.c		patch
-xsrc/external/mitlibX11/dist/src/FontNames.c		patch
-xsrc/external/mitlibX11/dist/src/GetFPath.c		patch
-xsrc/external/mitlibX11/dist/src/GetImage.c		patch
-xsrc/external/mitlibX11/dist/src/GetMoEv.c		patch
-xsrc/external/mitlibX11/dist/src/GetPntMap.c		patch
-xsrc/external/mitlibX11/dist/src/GetProp.c		patch
-xsrc/external/mitlibX11/dist/src/LiHosts.c		patch
-xsrc/external/mitlibX11/dist/src/ListExt.c		patch
-xsrc/external/mitlibX11/dist/src/ModMap.c		patch
-xsrc/external/mitlibX11/dist/src/Xrm.c			patch
-xsrc/external/mitlibX11/dist/src/xcms/cmsColNm.c	patch
-xsrc/external/mitlibX11/dist/src/xkb/XKBExtDev.c	patch
-xsrc/external/mitlibX11/dist/src/xkb/XKBGeom.c		patch
-xsrc/external/mitlibX11/dist/src/xkb/XKBGetMap.c	patch
-xsrc/external/mitlibX11/dist/src/xkb/XKBNames.c		patch
-xsrc/external/mitlibXcursor/dist/src/file.c		patch
-xsrc/external/mitlibXext/dist/src/XEVI.c		patch
-xsrc/external/mitlibXext/dist/src/XShape.c		patch
-xsrc/external/mitlibXext/dist/src/XSync.c		patch
-xsrc/external/mitlibXext/dist/src/Xcup.c		patch
-xsrc/external/mitlibXext/dist/src/Xdbe.c		patch
-xsrc/external/mitlibXfixes/dist/src/Cursor.c		patch
-xsrc/external/mitlibXi/dist/src/XGMotion.c		patch
-xsrc/external/mitlibXi/dist/src/XGetBMap.c		patch
-xsrc/external/mitlibXi/dist/src/XGetDCtl.c		patch
-xsrc/external/mitlibXi/dist/src/XGetDProp.c		patch
-xsrc/external/mitlibXi/dist/src/XGetFCtl.c		patch
-xsrc/external/mitlibXi/dist/src/XGetProp.c		patch
-xsrc/external/mitlibXi/dist/src/XListDev.c		patch
-xsrc/external/mitlibXi/dist/src/XQueryDv.c		patch
-xsrc/external/mitlibXinerama/dist/src/Xinerama.c	patch
-xsrc/external/mitlibXrandr/dist/src/XrrProperty.c	patch
-xsrc/external/mitlibXrender/dist/src/Filter.c		patch
-xsrc/external/mitlibXrender/dist/src/Xrender.c		patch
-xsrc/external/mitlibXres/dist/src/XRes.c		patch
-xsrc/external/mitlibXt/dist/src/ResConfig.c		patch
-xsrc/external/mitlibXt/dist/src/Selection.c		patch
-xsrc/external/mitlibXv/dist/src/Xv.c			patch
-xsrc/external/mitlibXvMC/dist/src/XvMC.c		patch
-xsrc/external/mitlibXxf86dga/dist/src/XF86DGA2.c	patch
-xsrc/external/mitlibXxf86vm/dist/src/XF86VMode.c	patch
+xsrc/external/mit/MesaLib/dist/src/glx/x11/XF86dri.c	patch
+xsrc/external/mit/libFS/dist/src/FSOpenServ.c		patch
+xsrc/external/mit/libX11/dist/modules/im/ximcp/imLcPrs.c patch
+xsrc/external/mit/libX11/dist/modules/im/ximcp/imTrX.c	patch
+xsrc/external/mit/libX11/dist/src/AllCells.c		patch
+xsrc/external/mit/libX11/dist/src/Font.c		patch
+xsrc/external/mit/libX11/dist/src/FontInfo.c		patch
+xsrc/external/mit/libX11/dist/src/FontNames.c		patch
+xsrc/external/mit/libX11/dist/src/GetFPath.c		patch
+xsrc/external/mit/libX11/dist/src/GetImage.c		patch
+xsrc/external/mit/libX11/dist/src/GetMoEv.c		patch
+xsrc/external/mit/libX11/dist/src/GetPntMap.c		patch
+xsrc/external/mit/libX11/dist/src/GetProp.c		patch
+xsrc/external/mit/libX11/dist/src/LiHosts.c		patch
+xsrc/external/mit/libX11/dist/src/ListExt.c		patch
+xsrc/external/mit/libX11/dist/src/ModMap.c		patch
+xsrc/external/mit/libX11/dist/src/Xrm.c			patch
+xsrc/external/mit/libX11/dist/src/xcms/cmsColNm.c	patch
+xsrc/external/mit/libX11/dist/src/xkb/XKBExtDev.c	patch
+xsrc/external/mit/libX11/dist/src/xkb/XKBGeom.c		patch
+xsrc/external/mit/libX11/dist/src/xkb/XKBGetMap.c	patch
+xsrc/external/mit/libX11/dist/src/xkb/XKBNames.c	patch
+xsrc/external/mit/libXcursor/dist/src/file.c		patch
+xsrc/external/mit/libXext/dist/src/XEVI.c		patch
+xsrc/external/mit/libXext/dist/src/XShape.c		patch
+xsrc/external/mit/libXext/dist/src/XSync.c		patch
+xsrc/external/mit/libXext/dist/src/Xcup.c		patch

CVS commit: [netbsd-5] src/doc

2015-08-14 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug 14 06:00:19 UTC 2015

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

Log Message:
Ticket 1976.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.123 -r1.1.2.124 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.123 src/doc/CHANGES-5.3:1.1.2.124
--- src/doc/CHANGES-5.3:1.1.2.123	Tue Aug  4 20:09:02 2015
+++ src/doc/CHANGES-5.3	Fri Aug 14 06:00:19 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.123 2015/08/04 20:09:02 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.124 2015/08/14 06:00:19 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3949,3 +3949,44 @@ sys/netinet/tcp_output.c			1.184
 	Make sure that snd_win doesn't go negative.
 	[matt, ticket #1973]
 
+crypto/dist/openssl/e_os2.h			patch
+crypto/dist/openssl/crypto/asn1/a_int.c		patch
+crypto/dist/openssl/crypto/asn1/tasn_new.c	patch
+crypto/dist/openssl/crypto/bn/bn.h		patch
+crypto/dist/openssl/crypto/bn/bn_err.c		patch
+crypto/dist/openssl/crypto/bn/bn_print.c	patch
+crypto/dist/openssl/crypto/bn/bn_rand.c		patch
+crypto/dist/openssl/crypto/bn/bn_shift.c	patch
+crypto/dist/openssl/crypto/cms/cms_smime.c	patch
+crypto/dist/openssl/crypto/ec/ec2_smpl.c	patch
+crypto/dist/openssl/crypto/ec/ec_check.c	patch
+crypto/dist/openssl/crypto/ec/ec_key.c		patch
+crypto/dist/openssl/crypto/ec/ec_lib.c		patch
+crypto/dist/openssl/crypto/ec/ecp_smpl.c	patch
+crypto/dist/openssl/crypto/ec/ectest.c		patch
+crypto/dist/openssl/crypto/ecdsa/ecdsatest.c	patch
+crypto/dist/openssl/crypto/ecdsa/ecs_ossl.c	patch
+crypto/dist/openssl/crypto/objects/obj_dat.c	patch
+crypto/dist/openssl/crypto/ocsp/ocsp_vfy.c	patch
+crypto/dist/openssl/crypto/pem/pem_pk8.c	patch
+crypto/dist/openssl/crypto/pkcs7/pk7_doit.c	patch
+crypto/dist/openssl/crypto/x509/x509_lu.c	patch
+crypto/dist/openssl/crypto/x509/x509_vfy.c	patch
+crypto/dist/openssl/doc/crypto/BN_rand.pod	patch
+crypto/dist/openssl/doc/crypto/BN_set_bit.pod	patch
+crypto/dist/openssl/doc/crypto/pem.pod		patch
+crypto/dist/openssl/ssl/d1_lib.c		patch
+crypto/dist/openssl/ssl/s3_clnt.c		patch
+crypto/dist/openssl/ssl/s3_srvr.c		patch
+crypto/dist/openssl/ssl/ssl.h			patch
+crypto/dist/openssl/ssl/ssl_err.c		patch
+crypto/dist/openssl/ssl/ssl_lib.c		patch
+crypto/dist/openssl/ssl/ssl_locl.h		patch
+crypto/dist/openssl/ssl/ssl_sess.c		patch
+crypto/dist/openssl/util/mkerr.pl		patch
+
+	This change covers the vulnerabilities relevant to netbsd-5 from the
+	June OpenSSL advisory, and also fixes a regression introduced with the
+	POODLE fix in October last year that caused the SSL server side	to
+	fail to handshake.
+	[spz, ticket#1976]



CVS commit: [netbsd-5] src/crypto/dist/openssl

2015-08-13 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Aug 14 05:56:28 UTC 2015

Modified Files:
src/crypto/dist/openssl [netbsd-5]: e_os2.h
src/crypto/dist/openssl/crypto/asn1 [netbsd-5]: a_int.c tasn_new.c
src/crypto/dist/openssl/crypto/bn [netbsd-5]: bn.h bn_err.c bn_print.c
bn_rand.c bn_shift.c
src/crypto/dist/openssl/crypto/cms [netbsd-5]: cms_smime.c
src/crypto/dist/openssl/crypto/ec [netbsd-5]: ec2_smpl.c ec_check.c
ec_key.c ec_lib.c ecp_smpl.c ectest.c
src/crypto/dist/openssl/crypto/ecdsa [netbsd-5]: ecdsatest.c ecs_ossl.c
src/crypto/dist/openssl/crypto/objects [netbsd-5]: obj_dat.c
src/crypto/dist/openssl/crypto/ocsp [netbsd-5]: ocsp_vfy.c
src/crypto/dist/openssl/crypto/pem [netbsd-5]: pem_pk8.c
src/crypto/dist/openssl/crypto/pkcs7 [netbsd-5]: pk7_doit.c
src/crypto/dist/openssl/crypto/x509 [netbsd-5]: x509_lu.c x509_vfy.c
src/crypto/dist/openssl/doc/crypto [netbsd-5]: BN_rand.pod
BN_set_bit.pod pem.pod
src/crypto/dist/openssl/ssl [netbsd-5]: d1_lib.c s3_clnt.c s3_srvr.c
ssl.h ssl_err.c ssl_lib.c ssl_locl.h ssl_sess.c
src/crypto/dist/openssl/util [netbsd-5]: mkerr.pl

Log Message:
Pull up following revision(s) (requested by spz in ticket #1976):

crypto/dist/openssl/e_os2.h patch
crypto/dist/openssl/crypto/asn1/a_int.c patch
crypto/dist/openssl/crypto/asn1/tasn_new.c  patch
crypto/dist/openssl/crypto/bn/bn.h  patch
crypto/dist/openssl/crypto/bn/bn_err.c  patch
crypto/dist/openssl/crypto/bn/bn_print.cpatch
crypto/dist/openssl/crypto/bn/bn_rand.c patch
crypto/dist/openssl/crypto/bn/bn_shift.cpatch
crypto/dist/openssl/crypto/cms/cms_smime.c  patch
crypto/dist/openssl/crypto/ec/ec2_smpl.cpatch
crypto/dist/openssl/crypto/ec/ec_check.cpatch
crypto/dist/openssl/crypto/ec/ec_key.c  patch
crypto/dist/openssl/crypto/ec/ec_lib.c  patch
crypto/dist/openssl/crypto/ec/ecp_smpl.cpatch
crypto/dist/openssl/crypto/ec/ectest.c  patch
crypto/dist/openssl/crypto/ecdsa/ecdsatest.cpatch
crypto/dist/openssl/crypto/ecdsa/ecs_ossl.c patch
crypto/dist/openssl/crypto/objects/obj_dat.cpatch
crypto/dist/openssl/crypto/ocsp/ocsp_vfy.c  patch
crypto/dist/openssl/crypto/pem/pem_pk8.cpatch
crypto/dist/openssl/crypto/pkcs7/pk7_doit.c patch
crypto/dist/openssl/crypto/x509/x509_lu.c   patch
crypto/dist/openssl/crypto/x509/x509_vfy.c  patch
crypto/dist/openssl/doc/crypto/BN_rand.pod  patch
crypto/dist/openssl/doc/crypto/BN_set_bit.pod   patch
crypto/dist/openssl/doc/crypto/pem.pod  patch
crypto/dist/openssl/ssl/d1_lib.cpatch
crypto/dist/openssl/ssl/s3_clnt.c   patch
crypto/dist/openssl/ssl/s3_srvr.c   patch
crypto/dist/openssl/ssl/ssl.h   patch
crypto/dist/openssl/ssl/ssl_err.c   patch
crypto/dist/openssl/ssl/ssl_lib.c   patch
crypto/dist/openssl/ssl/ssl_locl.h  patch
crypto/dist/openssl/ssl/ssl_sess.c  patch
crypto/dist/openssl/util/mkerr.pl   patch

This change covers the vulnerabilities relevant to netbsd-5 from the
June OpenSSL advisory, and also fixes a regression introduced with the
POODLE fix in October last year that caused the SSL server side to
fail to handshake.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.4.1 src/crypto/dist/openssl/e_os2.h
cvs rdiff -u -r1.1.1.8 -r1.1.1.8.4.1 \
src/crypto/dist/openssl/crypto/asn1/a_int.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.4.1 \
src/crypto/dist/openssl/crypto/asn1/tasn_new.c
cvs rdiff -u -r1.12.4.1 -r1.12.4.2 src/crypto/dist/openssl/crypto/bn/bn.h
cvs rdiff -u -r1.1.1.7 -r1.1.1.7.4.1 \
src/crypto/dist/openssl/crypto/bn/bn_err.c
cvs rdiff -u -r1.9 -r1.9.4.1 src/crypto/dist/openssl/crypto/bn/bn_print.c
cvs rdiff -u -r1.1.1.6 -r1.1.1.6.26.1 \
src/crypto/dist/openssl/crypto/bn/bn_rand.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.26.1 \
src/crypto/dist/openssl/crypto/bn/bn_shift.c
cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.2 \
src/crypto/dist/openssl/crypto/cms/cms_smime.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.4.1 \
src/crypto/dist/openssl/crypto/ec/ec2_smpl.c \
src/crypto/dist/openssl/crypto/ec/ectest.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.26.1 \
src/crypto/dist/openssl/crypto/ec/ec_check.c
cvs rdiff -u -r1.1.1.1.26.1 -r1.1.1.1.26.2 \
src/crypto/dist/openssl/crypto/ec/ec_key.c
cvs rdiff -u -r1.1.1.4 -r1.1.1.4.4.1 \
src/crypto/dist/openssl/crypto/ec/ec_lib.c
cvs rdiff -u -r1.1.1.4.26.1 -r1.1.1.4.26.2 \
src/crypto/dist/openssl/crypto/ec/ecp_smpl.c
cvs rdiff -u -r1.1.1.2 -r1.1.1.2.4.1 \
src/crypto/dist/openssl/crypto/ecdsa/ecdsatest.c
cvs rdiff -u -r1.1.1.3 -r1.1.1.3.4.1 \
src/crypto/dist/openssl/crypto/ecdsa/ecs_ossl.c
cvs rdiff -u -r1.10.4.1 -r1.10.4.2 \

CVS commit: [netbsd-5] src/doc

2015-08-04 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Aug  4 20:09:02 UTC 2015

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

Log Message:
belatedly add ticket 1970


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.122 -r1.1.2.123 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.122 src/doc/CHANGES-5.3:1.1.2.123
--- src/doc/CHANGES-5.3:1.1.2.122	Fri Jul 24 07:43:27 2015
+++ src/doc/CHANGES-5.3	Tue Aug  4 20:09:02 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.122 2015/07/24 07:43:27 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.123 2015/08/04 20:09:02 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3892,6 +3892,11 @@ sys/dev/pci/pcidevs_data.h			regen
 	- Fix debug message.
 	[msaitoh, ticket #1962]
 
+lib/libcurses/curses.h1.107
+
+	mvgetnstr should have a length argument as the name implies.
+	[joerg, ticket #1970]
+
 sys/arch/xen/xen/xenevt.c			1.42
 
 	Fix off by one error, addresses port-xen/49919.



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

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:42:43 UTC 2015

Modified Files:
src/sys/netinet [netbsd-5]: tcp_input.c tcp_output.c

Log Message:
Pull up following revision(s) (requested by matt in ticket #1973):
sys/netinet/tcp_output.c: revision 1.184
sys/netinet/tcp_input.c: revision 1.343

If we are sending a window probe and there's unacked data in the
socket, make sure at least the persist timer is running.
Make sure that snd_win doesn't go negative.


To generate a diff of this commit:
cvs rdiff -u -r1.291.4.5 -r1.291.4.6 src/sys/netinet/tcp_input.c
cvs rdiff -u -r1.167.10.1 -r1.167.10.2 src/sys/netinet/tcp_output.c

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

Modified files:

Index: src/sys/netinet/tcp_input.c
diff -u src/sys/netinet/tcp_input.c:1.291.4.5 src/sys/netinet/tcp_input.c:1.291.4.6
--- src/sys/netinet/tcp_input.c:1.291.4.5	Fri Jun 11 23:36:07 2010
+++ src/sys/netinet/tcp_input.c	Fri Jul 24 07:42:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $	*/
+/*	$NetBSD: tcp_input.c,v 1.291.4.6 2015/07/24 07:42:43 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -145,7 +145,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.5 2010/06/11 23:36:07 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_input.c,v 1.291.4.6 2015/07/24 07:42:43 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -2438,7 +2438,10 @@ after_listen:
 tp-t_lastm = NULL;
 			sbdrop(so-so_snd, acked);
 			tp-t_lastoff -= acked;
-			tp-snd_wnd -= acked;
+			if (tp-snd_wnd  acked)
+tp-snd_wnd -= acked;
+			else
+tp-snd_wnd = 0;
 			ourfinisacked = 0;
 		}
 		sowwakeup(so);

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.167.10.1 src/sys/netinet/tcp_output.c:1.167.10.2
--- src/sys/netinet/tcp_output.c:1.167.10.1	Tue Mar 29 20:12:14 2011
+++ src/sys/netinet/tcp_output.c	Fri Jul 24 07:42:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.167.10.1 2011/03/29 20:12:14 riz Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.167.10.2 2015/07/24 07:42:43 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.10.1 2011/03/29 20:12:14 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: tcp_output.c,v 1.167.10.2 2015/07/24 07:42:43 martin Exp $);
 
 #include opt_inet.h
 #include opt_ipsec.h
@@ -1524,14 +1524,24 @@ send:
 		 * of retransmit time.
 		 */
 timer:
-		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0 
-			((sack_rxmit  tp-snd_nxt != tp-snd_max) ||
-		tp-snd_nxt != tp-snd_una)) {
-			if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
-TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+		if (TCP_TIMER_ISARMED(tp, TCPT_REXMT) == 0) {
+			if ((sack_rxmit  tp-snd_nxt != tp-snd_max)
+			|| tp-snd_nxt != tp-snd_una) {
+if (TCP_TIMER_ISARMED(tp, TCPT_PERSIST)) {
+	TCP_TIMER_DISARM(tp, TCPT_PERSIST);
+	tp-t_rxtshift = 0;
+}
+TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
+			} else if (len == 0  so-so_snd.sb_cc  0
+			 TCP_TIMER_ISARMED(tp, TCPT_PERSIST) == 0) {
+/*
+ * If we are sending a window probe and there's
+ * unacked data in the socket, make sure at
+ * least the persist timer is running.
+ */
 tp-t_rxtshift = 0;
+tcp_setpersist(tp);
 			}
-			TCP_TIMER_ARM(tp, TCPT_REXMT, tp-t_rxtcur);
 		}
 	} else
 		if (SEQ_GT(tp-snd_nxt + len, tp-snd_max))



CVS commit: [netbsd-5] src/doc

2015-07-24 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jul 24 07:43:27 UTC 2015

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

Log Message:
Ticket #1973


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.121 -r1.1.2.122 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.121 src/doc/CHANGES-5.3:1.1.2.122
--- src/doc/CHANGES-5.3:1.1.2.121	Wed Jul  1 07:19:25 2015
+++ src/doc/CHANGES-5.3	Fri Jul 24 07:43:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.121 2015/07/01 07:19:25 bouyer Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.122 2015/07/24 07:43:27 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3936,3 +3936,11 @@ usr.bin/calendar/calendar.c			1.51
 	are serious if they happen.
 	[dholland, ticket #1971]
 
+sys/netinet/tcp_input.c1.343
+sys/netinet/tcp_output.c			1.184
+
+	If we are sending a window probe and there's unacked data in the
+	socket, make sure at least the persist timer is running.
+	Make sure that snd_win doesn't go negative.
+	[matt, ticket #1973]
+



CVS commit: [netbsd-5] src/usr.bin/calendar

2015-07-01 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul  1 07:18:32 UTC 2015

Modified Files:
src/usr.bin/calendar [netbsd-5]: calendar.c

Log Message:
Pull up following revision(s) (requested by dholland in ticket #1971):
usr.bin/calendar/calendar.c: revision 1.51
Correct privilege handling problems in calendar -a (which runs as root
from /etc/daily); do not exec other programs while the real uid is
still 0.
Also, clear the supplementary groups list up front and call initgroups
when becoming another user, to avoid leaking any extra group
privileges that we might have.
And finally, don't silently ignore errors changing uid and gid; those
are serious if they happen.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.4.1 src/usr.bin/calendar/calendar.c

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

Modified files:

Index: src/usr.bin/calendar/calendar.c
diff -u src/usr.bin/calendar/calendar.c:1.47 src/usr.bin/calendar/calendar.c:1.47.4.1
--- src/usr.bin/calendar/calendar.c:1.47	Tue Sep 30 05:51:41 2008
+++ src/usr.bin/calendar/calendar.c	Wed Jul  1 07:18:32 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: calendar.c,v 1.47 2008/09/30 05:51:41 dholland Exp $	*/
+/*	$NetBSD: calendar.c,v 1.47.4.1 2015/07/01 07:18:32 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1989, 1993, 1994
@@ -39,7 +39,7 @@ __COPYRIGHT(@(#) Copyright (c) 1989, 19
 #if 0
 static char sccsid[] = @(#)calendar.c	8.4 (Berkeley) 1/7/95;
 #endif
-__RCSID($NetBSD: calendar.c,v 1.47 2008/09/30 05:51:41 dholland Exp $);
+__RCSID($NetBSD: calendar.c,v 1.47.4.1 2015/07/01 07:18:32 bouyer Exp $);
 #endif /* not lint */
 
 #include sys/param.h
@@ -48,6 +48,7 @@ __RCSID($NetBSD: calendar.c,v 1.47 2008
 #include sys/uio.h
 #include sys/wait.h
 
+#include assert.h
 #include ctype.h
 #include err.h
 #include errno.h
@@ -105,6 +106,7 @@ static const char *months[] = {
 static void	 atodays(int, char *, unsigned short *);
 static void	 cal(void);
 static void	 closecal(FILE *);
+static void	 changeuser(void);
 static int	 getday(char *);
 static int	 getfield(char *, char **, int *);
 static void	 getmmdd(struct tm *, char *);
@@ -164,12 +166,24 @@ main(int argc, char **argv)
 		 * XXX - This ignores the user's CALENDAR_DIR variable.
 		 *   Run under user's login shell?
 		 */
+		if (setgroups(0, NULL) == -1) {
+			err(EXIT_FAILURE, setgroups);
+		}
 		while ((pw = getpwent()) != NULL) {
-			(void)setegid(pw-pw_gid);
-			(void)seteuid(pw-pw_uid);
-			if (chdir(pw-pw_dir) != -1)
+			if (setegid(pw-pw_gid) == -1) {
+warn(%s: setegid, pw-pw_name);
+continue;
+			}
+			if (seteuid(pw-pw_uid) == -1) {
+warn(%s: seteuid, pw-pw_name);
+continue;
+			}
+			if (chdir(pw-pw_dir) != -1) {
 cal();
-			(void)seteuid(0);
+			}
+			if (seteuid(0) == -1) {
+warn(%s: seteuid back to 0, pw-pw_name);
+			}
 		}
 	} else if ((caldir = getenv(CALENDAR_DIR)) != NULL) {
 		if (chdir(caldir) != -1)
@@ -405,6 +419,10 @@ opencal(void)
 			(void)close(pdes[1]);
 		}
 		(void)close(pdes[0]);
+		if (doall) {
+			/* become the user properly */
+			changeuser();
+		}
 		/* tell CPP to only open regular files */
 		if(!cpp_restricted  setenv(CPP_RESTRICTED, , 1) == -1)
 			err(EXIT_FAILURE, Cannot restrict cpp);
@@ -469,6 +487,10 @@ closecal(FILE *fp)
 			(void)close(pdes[0]);
 		}
 		(void)close(pdes[1]);
+		if (doall) {
+			/* become the user properly */
+			changeuser();
+		}
 		(void)execl(_PATH_SENDMAIL, sendmail, -i, -t, -F,
 		\Reminder Service\, -f, root, NULL);
 		err(EXIT_FAILURE, Cannot exec `%s', _PATH_SENDMAIL);
@@ -492,6 +514,34 @@ done:	(void)fclose(fp);
 		continue;
 }
 
+static void
+changeuser(void)
+{
+	uid_t uid;
+	gid_t gid;
+
+	uid = geteuid();
+	gid = getegid();
+	assert(uid == pw-pw_uid);
+	assert(gid == pw-pw_gid);
+
+	if (seteuid(0) == -1) {
+		err(EXIT_FAILURE, %s: changing user: cannot reassert uid 0,
+		pw-pw_name);
+	}
+	if (setgid(gid) == -1) {
+		err(EXIT_FAILURE, %s: cannot assume gid %d,
+		pw-pw_name, (int)gid);
+	}
+	if (initgroups(pw-pw_name, gid) == -1) {
+		err(EXIT_FAILURE, %s: cannot initgroups, pw-pw_name);
+	}
+	if (setuid(uid) == -1) {
+		err(EXIT_FAILURE, %s: cannot assume uid %d,
+		pw-pw_name, (int)uid);
+	}
+}
+
 static int
 getmonth(char *s)
 {



CVS commit: [netbsd-5] src/doc

2015-07-01 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Wed Jul  1 07:19:25 UTC 2015

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

Log Message:
ticket 1971


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.120 -r1.1.2.121 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.120 src/doc/CHANGES-5.3:1.1.2.121
--- src/doc/CHANGES-5.3:1.1.2.120	Thu Jun  4 09:02:21 2015
+++ src/doc/CHANGES-5.3	Wed Jul  1 07:19:25 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.120 2015/06/04 09:02:21 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.121 2015/07/01 07:19:25 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3922,3 +3922,17 @@ sys/arch/x86/x86/intel_busclock.c		1.10,
 	to access MSRs safely.
 	[sborrill, ticket #1963]
 
+usr.bin/calendar/calendar.c			1.51
+
+	Correct privilege handling problems in calendar -a (which runs as root
+	from /etc/daily); do not exec other programs while the real uid is
+	still 0.
+
+	Also, clear the supplementary groups list up front and call initgroups
+	when becoming another user, to avoid leaking any extra group
+	privileges that we might have.
+
+	And finally, don't silently ignore errors changing uid and gid; those
+	are serious if they happen.
+	[dholland, ticket #1971]
+



CVS commit: [netbsd-5] src/doc

2015-06-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun  4 09:02:21 UTC 2015

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

Log Message:
Ticket #1963


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.119 src/doc/CHANGES-5.3:1.1.2.120
--- src/doc/CHANGES-5.3:1.1.2.119	Mon Jun  1 15:54:58 2015
+++ src/doc/CHANGES-5.3	Thu Jun  4 09:02:21 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.119 2015/06/01 15:54:58 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.120 2015/06/04 09:02:21 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3915,3 +3915,10 @@ sys/arch/x86/include/specialreg.h		1.72 
 	compatibility.
 	[msaitoh, ticket #1968]
 
+sys/arch/x86/x86/intel_busclock.c		1.10, 1.13-23 via patch
+
+	Update p[34]_get_bus_clock() to avoid panic in est(4).
+	Return correct bus clock on some CPUs. Use rdmsr_safe()
+	to access MSRs safely.
+	[sborrill, ticket #1963]
+



CVS commit: [netbsd-5] src/sys/arch/x86/x86

2015-06-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Jun  4 08:55:24 UTC 2015

Modified Files:
src/sys/arch/x86/x86 [netbsd-5]: intel_busclock.c

Log Message:
Pull up the following revisions, requested by sborrill in #1963:

sys/arch/x86/x86/intel_busclock.c   1.10, 1.13-23

Update p[34]_get_bus_clock() to avoid panic in est(4).
Return correct bus clock on some CPUs. Use rdmsr_safe()
to access MSRs safely.


To generate a diff of this commit:
cvs rdiff -u -r1.5.10.5 -r1.5.10.6 src/sys/arch/x86/x86/intel_busclock.c

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

Modified files:

Index: src/sys/arch/x86/x86/intel_busclock.c
diff -u src/sys/arch/x86/x86/intel_busclock.c:1.5.10.5 src/sys/arch/x86/x86/intel_busclock.c:1.5.10.6
--- src/sys/arch/x86/x86/intel_busclock.c:1.5.10.5	Wed Aug 22 21:18:19 2012
+++ src/sys/arch/x86/x86/intel_busclock.c	Thu Jun  4 08:55:24 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: intel_busclock.c,v 1.5.10.5 2012/08/22 21:18:19 bouyer Exp $	*/
+/*	$NetBSD: intel_busclock.c,v 1.5.10.6 2015/06/04 08:55:24 martin Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.5.10.5 2012/08/22 21:18:19 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: intel_busclock.c,v 1.5.10.6 2015/06/04 08:55:24 martin Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -91,25 +91,24 @@ p3_get_bus_clock(struct cpu_info *ci)
 {
 	uint64_t msr;
 	int bus, bus_clock = 0;
+	uint32_t model;
 
-	switch (CPUID2MODEL(ci-ci_signature)) {
+	model = CPUID_TO_MODEL(ci-ci_signature);
+		
+	switch (model) {
 	case 0x9: /* Pentium M (130 nm, Banias) */
 		bus_clock = 1;
 		break;
 	case 0xc: /* Core i7, Atom, model 1 */
 		/*
-		 * XXX (See also case 0xe and 0xd)
-		 * Some core i7 CPUs can report model 0xc.
 		 * Newer CPUs will GP when attemping to access MSR_FSB_FREQ.
 		 * In the long-term, use ACPI instead of all this.
 		 */
-		switch (CPUID2EXTMODEL(ci-ci_signature)) {
-		case 0x2:
-			aprint_debug(%s: unable to determine bus speed,
-			device_xname(ci-ci_dev));
+		if (rdmsr_safe(MSR_FSB_FREQ, msr) == EFAULT) {
+			aprint_debug_dev(ci-ci_dev,
+			unable to determine bus speed);
 			goto print_msr;
 		}
-		msr = rdmsr(MSR_FSB_FREQ);
 		bus = (msr  0)  0x7;
 		switch (bus) {
 		case 1:
@@ -121,20 +120,12 @@ p3_get_bus_clock(struct cpu_info *ci)
 			goto print_msr;
 		}
 		break;
-	case 0xd: /* Pentium M (90 nm, Dothan), some Xeons */
-		/*
-		 * XXX (See also case 0xc and 0xd)
-		 * Some Xeons can report model 0xd, e.g. E5-2630
-		 * Newer CPUs will GP when attemping to access MSR_FSB_FREQ.
-		 * In the long-term, use ACPI instead of all this.
-		 */
-		switch (CPUID2EXTMODEL(ci-ci_signature)) {
-		case 0x2:
-			aprint_debug(%s: unable to determine bus speed,
-			device_xname(ci-ci_dev));
+	case 0xd: /* Pentium M (90 nm, Dothan) */
+		if (rdmsr_safe(MSR_FSB_FREQ, msr) == EFAULT) {
+			aprint_debug_dev(ci-ci_dev,
+			unable to determine bus speed);
 			goto print_msr;
 		}
-		msr = rdmsr(MSR_FSB_FREQ);
 		bus = (msr  0)  0x7;
 		switch (bus) {
 		case 0:
@@ -150,20 +141,13 @@ p3_get_bus_clock(struct cpu_info *ci)
 		}
 		break;
 	case 0xe: /* Core Duo/Solo */
-		/*
-		 * XXX (See also case 0xc)
-		 * Newer CPUs will GP when attemping to access MSR_FSB_FREQ.
-		 * In the long-term, use ACPI instead of all this.
-		 */
-		switch (CPUID2EXTMODEL(ci-ci_signature)) {
-		case 0x1:
-			aprint_debug(%s: unable to determine bus speed,
-			device_xname(ci-ci_dev));
+	case 0xf: /* Core Xeon */
+	case 0x17: /* Xeon [35]000, Core 2 Quad [89]00 */
+		if (rdmsr_safe(MSR_FSB_FREQ, msr) == EFAULT) {
+			aprint_debug_dev(ci-ci_dev,
+			unable to determine bus speed);
 			goto print_msr;
 		}
-		/* FALLTHROUGH */
-	case 0xf: /* Core Xeon */
-		msr = rdmsr(MSR_FSB_FREQ);
 		bus = (msr  0)  0x7;
 		switch (bus) {
 		case 5:
@@ -184,6 +168,9 @@ p3_get_bus_clock(struct cpu_info *ci)
 		case 4:
 			bus_clock = 3;
 			break;
+		case 6:
+			bus_clock = 4;
+			break;
 		default:
 			aprint_debug(%s: unknown Core FSB_FREQ value %d,
 			device_xname(ci-ci_dev), bus);
@@ -210,16 +197,135 @@ p3_get_bus_clock(struct cpu_info *ci)
 		case 2:
 			bus_clock = 1;
 			break;
+		case 3:
+			bus_clock = 10666;
+			break;
 		default:
 			aprint_debug(%s: unknown i686 EBL_CR_POWERON 
 			value %d , device_xname(ci-ci_dev), bus);
 			goto print_msr;
 		}
 		break;
+	case 0x1c: /* Atom */
+	case 0x26:
+	case 0x27:
+	case 0x35:
+	case 0x36:
+		if (rdmsr_safe(MSR_FSB_FREQ, msr) == EFAULT) {
+			aprint_debug_dev(ci-ci_dev,
+			unable to determine bus speed);
+			goto print_msr;
+		}
+		bus = (msr  0)  0x7;
+		switch (bus) {
+		case 7:
+			bus_clock =  8333;
+			break;
+		case 5:
+			bus_clock = 1;
+			break;
+		case 1:
+			bus_clock = 1;
+			break;
+		case 3:
+			bus_clock = 16667;
+			break;
+		

CVS commit: [netbsd-5] src/doc

2015-06-01 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Jun  1 15:48:07 UTC 2015

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

Log Message:
Ticket #1968


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.117 -r1.1.2.118 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.117 src/doc/CHANGES-5.3:1.1.2.118
--- src/doc/CHANGES-5.3:1.1.2.117	Mon Jun  1 14:44:31 2015
+++ src/doc/CHANGES-5.3	Mon Jun  1 15:48:07 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.117 2015/06/01 14:44:31 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.118 2015/06/01 15:48:07 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3909,3 +3909,9 @@ sys/arch/i386/i386/cpufunc.S			1.16-1.17
 	Backport rdmsr_safe() to access MSR safely.
 	[msaitoh, ticket #1969]
 
+sys/arch/x86/include/specialreg.h		1.72 via patch
+
+	Add CPUID_TO_*() macros to avoid bug. Old macros are kept for
+	compatibility.
+	[msaitoh, ticket #1968]
+



CVS commit: [netbsd-5] src/sys/arch/x86/include

2015-06-01 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Jun  1 15:45:46 UTC 2015

Modified Files:
src/sys/arch/x86/include [netbsd-5]: specialreg.h

Log Message:
Pull up the following revisions(s) (requested by msaitoh in ticket #1968):
sys/arch/x86/include/specialreg.h: revision 1.72 via patch

Backport CPUID_TO_*() macros. Old macros are kept for compatibility.


To generate a diff of this commit:
cvs rdiff -u -r1.31.4.3 -r1.31.4.4 src/sys/arch/x86/include/specialreg.h

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

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.31.4.3 src/sys/arch/x86/include/specialreg.h:1.31.4.4
--- src/sys/arch/x86/include/specialreg.h:1.31.4.3	Wed Jun 19 07:44:42 2013
+++ src/sys/arch/x86/include/specialreg.h	Mon Jun  1 15:45:46 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.31.4.3 2013/06/19 07:44:42 bouyer Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.31.4.4 2015/06/01 15:45:46 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -240,13 +240,39 @@
 			\11TM2\12SSSE3\13CID\16CX16\17xTPR\20PDCM\23DCA \
 			\24SSE41\25SSE42\26X2APIC\30POPCNT
 
-#define CPUID2FAMILY(cpuid)	(((cpuid)  8)  0xf)
-#define CPUID2MODEL(cpuid)	(((cpuid)  4)  0xf)
-#define CPUID2STEPPING(cpuid)	((cpuid)  0xf)
-
-/* Extended family and model are defined on amd64 processors */
-#define CPUID2EXTFAMILY(cpuid)	(((cpuid)  20)  0xff)
-#define CPUID2EXTMODEL(cpuid)	(((cpuid)  16)  0xf)
+/* CPUID Fn0001 %eax */
+
+#define CPUID_TO_BASEFAMILY(cpuid)	(((cpuid)  8)  0xf)
+#define CPUID_TO_BASEMODEL(cpuid)	(((cpuid)  4)  0xf)
+#define CPUID_TO_STEPPING(cpuid)	((cpuid)  0xf)
+
+/* Old macros for compatibility */
+#define CPUID2FAMILY(cpuid)	CPUID_TO_BASEFAMILY(cpuid)
+#define CPUID2MODEL(cpuid)	CPUID_TO_BASEMODEL(cpuid)
+#define CPUID2STEPPING(cpuid)	CPUID_TO_STEPPING(cpuid)
+
+/*
+ * The Extended family bits should only be inspected when CPUID_TO_BASEFAMILY()
+ * returns 15. They are use to encode family value 16 to 270 (add 15).
+ * The Extended model bits are the high 4 bits of the model.
+ * They are only valid for family = 15 or family 6 (intel, but all amd
+ * family 6 are documented to return zero bits for them).
+ */
+#define CPUID_TO_EXTFAMILY(cpuid)	(((cpuid)  20)  0xff)
+#define CPUID_TO_EXTMODEL(cpuid)	(((cpuid)  16)  0xf)
+
+/* Old macros for compatibility */
+#define CPUID2EXTFAMILY(cpuid)	CPUID_TO_EXTFAMILY(cpuid)
+#define CPUID2EXTMODEL(cpuid)	CPUID_TO_EXTMODEL(cpuid)
+
+/* The macros for the Display Family and the Display Model */
+#define CPUID_TO_FAMILY(cpuid)	(CPUID_TO_BASEFAMILY(cpuid)	\
+	+ ((CPUID_TO_BASEFAMILY(cpuid) != 0x0f)		\
+		? 0 : CPUID_TO_EXTFAMILY(cpuid)))
+#define CPUID_TO_MODEL(cpuid)	(CPUID_TO_BASEMODEL(cpuid)	\
+	| ((CPUID_TO_BASEFAMILY(cpuid) != 0x0f)		\
+		 (CPUID_TO_BASEFAMILY(cpuid) != 0x06)		\
+		? 0 : (CPUID_TO_EXTMODEL(cpuid)  4)))
 
 /*
  * Model-specific registers for the i386 family



CVS commit: [netbsd-5] src/doc

2015-06-01 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Jun  1 14:44:31 UTC 2015

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

Log Message:
Ticket #1969


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.116 -r1.1.2.117 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.116 src/doc/CHANGES-5.3:1.1.2.117
--- src/doc/CHANGES-5.3:1.1.2.116	Wed May 27 06:19:25 2015
+++ src/doc/CHANGES-5.3	Mon Jun  1 14:44:31 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.116 2015/05/27 06:19:25 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.117 2015/06/01 14:44:31 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3901,3 +3901,11 @@ sys/dev/usb/uftdi.c1.53
 
 	Use as large a packet size as the ftdi endpoint specifies.
 	[riastradh, ticket #1964]
+
+sys/arch/x86/include/cpufunc.h			1.13
+sys/arch/amd64/amd64/cpufunc.S			1.20-1.21 via patch
+sys/arch/i386/i386/cpufunc.S			1.16-1.17, 1.21 via patch
+
+	Backport rdmsr_safe() to access MSR safely.
+	[msaitoh, ticket #1969]
+



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

2015-06-01 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Mon Jun  1 14:38:32 UTC 2015

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-5]: cpufunc.S
src/sys/arch/i386/i386 [netbsd-5]: cpufunc.S
src/sys/arch/x86/include [netbsd-5]: cpufunc.h

Log Message:
Pull up the following revisions(s) (requested by msaitoh in ticket #1969):
sys/arch/x86/include/cpufunc.h: revision 1.13
sys/arch/amd64/amd64/cpufunc.S: revision 1.20-1.21 via patch
sys/arch/i386/i386/cpufunc.S:   revision 1.16-1.17, 1.21 via 
patch

Backport rdmsr_safe() to access MSR safely.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.6.1 src/sys/arch/amd64/amd64/cpufunc.S
cvs rdiff -u -r1.13 -r1.13.4.1 src/sys/arch/i386/i386/cpufunc.S
cvs rdiff -u -r1.8.10.3 -r1.8.10.4 src/sys/arch/x86/include/cpufunc.h

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

Modified files:

Index: src/sys/arch/amd64/amd64/cpufunc.S
diff -u src/sys/arch/amd64/amd64/cpufunc.S:1.15 src/sys/arch/amd64/amd64/cpufunc.S:1.15.6.1
--- src/sys/arch/amd64/amd64/cpufunc.S:1.15	Tue Jun 24 16:32:53 2008
+++ src/sys/arch/amd64/amd64/cpufunc.S	Mon Jun  1 14:38:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.S,v 1.15 2008/06/24 16:32:53 ad Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.15.6.1 2015/06/01 14:38:31 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -33,6 +33,8 @@
  * Functions to provide access to i386-specific instructions.
  */
 
+#include sys/errno.h
+
 #include machine/asm.h
 #include machine/specialreg.h
 #include machine/segments.h
@@ -215,6 +217,37 @@ ENTRY(wrmsr_locked)
 	wrmsr
 	ret
 
+/*
+ * Support for reading MSRs in the safe manner (returns EFAULT on fault)
+ */
+/* int rdmsr_safe(u_int msr, uint64_t *data) */
+ENTRY(rdmsr_safe)
+	movq	CPUVAR(CURLWP), %r8
+	movq	L_ADDR(%r8), %r8
+	movq	$_C_LABEL(msr_onfault), PCB_ONFAULT(%r8)
+
+	movl	%edi, %ecx /* u_int msr */
+	rdmsr			/* Read MSR pointed by %ecx. Returns
+   hi byte in edx, lo in %eax */
+	salq	$32, %rdx	/* sign-shift %rdx left */
+	movl	%eax, %eax	/* zero-extend %eax - %rax */
+	orq	%rdx, %rax
+	movq	%rax, (%rsi)  /* *data */
+	xorq	%rax, %rax/* no error */
+
+	movq	%rax, PCB_ONFAULT(%r8)
+	ret
+
+/*
+ * MSR operations fault handler
+ */
+NENTRY(msr_onfault)
+	movq	CPUVAR(CURLWP), %r8
+	movq	L_ADDR(%r8), %r8
+	movq	$0, PCB_ONFAULT(%r8)
+	movl	$EFAULT, %eax
+	ret
+
 #ifndef XEN
 ENTRY(wbinvd)
 	wbinvd

Index: src/sys/arch/i386/i386/cpufunc.S
diff -u src/sys/arch/i386/i386/cpufunc.S:1.13 src/sys/arch/i386/i386/cpufunc.S:1.13.4.1
--- src/sys/arch/i386/i386/cpufunc.S:1.13	Tue Sep 23 08:50:11 2008
+++ src/sys/arch/i386/i386/cpufunc.S	Mon Jun  1 14:38:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.S,v 1.13 2008/09/23 08:50:11 ad Exp $	*/
+/*	$NetBSD: cpufunc.S,v 1.13.4.1 2015/06/01 14:38:31 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -35,8 +35,10 @@
  * These are shared with NetBSD/xen.
  */
 
+#include sys/errno.h
+
 #include machine/asm.h
-__KERNEL_RCSID(0, $NetBSD: cpufunc.S,v 1.13 2008/09/23 08:50:11 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: cpufunc.S,v 1.13.4.1 2015/06/01 14:38:31 sborrill Exp $);
 
 #include opt_xen.h
 
@@ -141,6 +143,39 @@ ENTRY(wrmsr_locked)
 	ret
 END(wrmsr_locked)
 
+/*
+ * Support for reading MSRs in the safe manner (returns EFAULT on fault)
+ */
+/* int rdmsr_safe(u_int msr, uint64_t *data) */
+ENTRY(rdmsr_safe)
+	movl	CPUVAR(CURLWP), %ecx
+	movl	L_ADDR(%ecx), %ecx
+	movl	$_C_LABEL(msr_onfault), PCB_ONFAULT(%ecx)
+
+	movl	4(%esp), %ecx /* u_int msr */
+	rdmsr
+	movl	8(%esp), %ecx /* *data */
+	movl	%eax, (%ecx)  /* low-order bits */
+	movl	%edx, 4(%ecx) /* high-order bits */
+	xorl	%eax, %eax/* no error */
+
+	movl	CPUVAR(CURLWP), %ecx
+	movl	L_ADDR(%ecx), %ecx
+	movl	%eax, PCB_ONFAULT(%ecx)
+
+	ret
+
+/*
+ * MSR operations fault handler
+ */
+NENTRY(msr_onfault)
+	movl	CPUVAR(CURLWP), %ecx
+	movl	L_ADDR(%ecx), %ecx
+	movl	$0, PCB_ONFAULT(%ecx)
+	movl	$EFAULT, %eax
+	ret
+END(msr_onfault)
+
 ENTRY(cpu_counter)
 	rdtsc
 	addl	CPUVAR(CC_SKEW), %eax

Index: src/sys/arch/x86/include/cpufunc.h
diff -u src/sys/arch/x86/include/cpufunc.h:1.8.10.3 src/sys/arch/x86/include/cpufunc.h:1.8.10.4
--- src/sys/arch/x86/include/cpufunc.h:1.8.10.3	Mon Feb  2 21:38:50 2009
+++ src/sys/arch/x86/include/cpufunc.h	Mon Jun  1 14:38:31 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.h,v 1.8.10.3 2009/02/02 21:38:50 snj Exp $	*/
+/*	$NetBSD: cpufunc.h,v 1.8.10.4 2015/06/01 14:38:31 sborrill Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc.
@@ -118,6 +118,7 @@ void	x86_reset(void);
 
 uint64_t	rdmsr(u_int);
 uint64_t	rdmsr_locked(u_int, u_int);
+int		rdmsr_safe(u_int, uint64_t *);
 uint64_t	rdtsc(void);
 uint64_t	rdpmc(u_int);
 void		wrmsr(u_int, uint64_t);



CVS commit: [netbsd-5] src/sys/dev/usb

2015-05-27 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 27 06:18:05 UTC 2015

Modified Files:
src/sys/dev/usb [netbsd-5]: uftdi.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1964):
sys/dev/usb/uftdi.c: revision 1.53
Use as large a packet size as the ftdi endpoint specifies.
Now I can read from my beaglebone!


To generate a diff of this commit:
cvs rdiff -u -r1.39.4.1 -r1.39.4.2 src/sys/dev/usb/uftdi.c

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

Modified files:

Index: src/sys/dev/usb/uftdi.c
diff -u src/sys/dev/usb/uftdi.c:1.39.4.1 src/sys/dev/usb/uftdi.c:1.39.4.2
--- src/sys/dev/usb/uftdi.c:1.39.4.1	Sat Oct 10 20:34:45 2009
+++ src/sys/dev/usb/uftdi.c	Wed May 27 06:18:05 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: uftdi.c,v 1.39.4.1 2009/10/10 20:34:45 sborrill Exp $	*/
+/*	$NetBSD: uftdi.c,v 1.39.4.2 2015/05/27 06:18:05 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.39.4.1 2009/10/10 20:34:45 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: uftdi.c,v 1.39.4.2 2015/05/27 06:18:05 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -63,12 +63,19 @@ int uftdidebug = 0;
 #define UFTDI_MAX_PORTS		4
 
 /*
- * These are the maximum number of bytes transferred per frame.
- * The output buffer size cannot be increased due to the size encoding.
+ * These are the default number of bytes transferred per frame if the
+ * endpoint doesn't tell us.  The output buffer size is a hard limit
+ * for devices that use a 6-bit size encoding.
  */
 #define UFTDIIBUFSIZE 64
 #define UFTDIOBUFSIZE 64
 
+/*
+ * Magic constants!  Where do these come from?  They're what Linux uses...
+ */
+#define	UFTDI_MAX_IBUFSIZE	512
+#define	UFTDI_MAX_OBUFSIZE	256
+
 struct uftdi_softc {
 	USBBASEDEVICE		sc_dev;		/* base device */
 	usbd_device_handle	sc_udev;	/* device */
@@ -243,6 +250,7 @@ USB_ATTACH(uftdi)
 		sc-sc_iface[idx] = iface;
 
 		uca.bulkin = uca.bulkout = -1;
+		uca.ibufsize = uca.obufsize = 0;
 		for (i = 0; i  id-bNumEndpoints; i++) {
 			int addr, dir, attr;
 			ed = usbd_interface2endpoint_descriptor(iface, i);
@@ -256,11 +264,22 @@ USB_ATTACH(uftdi)
 			addr = ed-bEndpointAddress;
 			dir = UE_GET_DIR(ed-bEndpointAddress);
 			attr = ed-bmAttributes  UE_XFERTYPE;
-			if (dir == UE_DIR_IN  attr == UE_BULK)
+			if (dir == UE_DIR_IN  attr == UE_BULK) {
 uca.bulkin = addr;
-			else if (dir == UE_DIR_OUT  attr == UE_BULK)
+uca.ibufsize = UGETW(ed-wMaxPacketSize);
+if (uca.ibufsize = UFTDI_MAX_IBUFSIZE)
+	uca.ibufsize = UFTDI_MAX_IBUFSIZE;
+			} else if (dir == UE_DIR_OUT  attr == UE_BULK) {
 uca.bulkout = addr;
-			else {
+uca.obufsize = UGETW(ed-wMaxPacketSize)
+- sc-sc_hdrlen;
+if (uca.obufsize = UFTDI_MAX_OBUFSIZE)
+	uca.obufsize = UFTDI_MAX_OBUFSIZE;
+/* Limit length if we have a 6-bit header.  */
+if ((sc-sc_hdrlen  0) 
+(uca.obufsize  UFTDIOBUFSIZE))
+	uca.obufsize = UFTDIOBUFSIZE;
+			} else {
 aprint_error_dev(self,
 unexpected endpoint\n);
 goto bad;
@@ -279,9 +298,11 @@ USB_ATTACH(uftdi)
 
 		uca.portno = FTDI_PIT_SIOA + idx;
 		/* bulkin, bulkout set above */
-		uca.ibufsize = UFTDIIBUFSIZE;
-		uca.obufsize = UFTDIOBUFSIZE - sc-sc_hdrlen;
-		uca.ibufsizepad = UFTDIIBUFSIZE;
+		if (uca.ibufsize == 0)
+			uca.ibufsize = UFTDIIBUFSIZE;
+		uca.ibufsizepad = uca.ibufsize;
+		if (uca.obufsize == 0)
+			uca.obufsize = UFTDIOBUFSIZE - sc-sc_hdrlen;
 		uca.opkthdrlen = sc-sc_hdrlen;
 		uca.device = dev;
 		uca.iface = iface;
@@ -289,7 +310,9 @@ USB_ATTACH(uftdi)
 		uca.arg = sc;
 		uca.info = NULL;
 
-		DPRINTF((uftdi: in=0x%x out=0x%x\n, uca.bulkin, uca.bulkout));
+		DPRINTF((uftdi: in=0x%x out=0x%x isize=0x%x osize=0x%x\n,
+			uca.bulkin, uca.bulkout,
+			uca.ibufsize, uca.obufsize));
 		sc-sc_subdev[idx] = config_found_sm_loc(self, ucombus, NULL,
 		uca, ucomprint, ucomsubmatch);
 	}



CVS commit: [netbsd-5] src/doc

2015-05-27 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed May 27 06:19:25 UTC 2015

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

Log Message:
Ticket 1964.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.115 -r1.1.2.116 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.115 src/doc/CHANGES-5.3:1.1.2.116
--- src/doc/CHANGES-5.3:1.1.2.115	Fri May 22 11:05:57 2015
+++ src/doc/CHANGES-5.3	Wed May 27 06:19:25 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.115 2015/05/22 11:05:57 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.116 2015/05/27 06:19:25 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3897,3 +3897,7 @@ sys/arch/xen/xen/xenevt.c			1.42
 	Fix off by one error, addresses port-xen/49919.
 	[bouyer, ticket #1965]
 
+sys/dev/usb/uftdi.c1.53
+
+	Use as large a packet size as the ftdi endpoint specifies.
+	[riastradh, ticket #1964]



CVS commit: [netbsd-5] src/doc

2015-05-22 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri May 22 11:05:57 UTC 2015

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

Log Message:
Ticket #1965


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.114 -r1.1.2.115 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.114 src/doc/CHANGES-5.3:1.1.2.115
--- src/doc/CHANGES-5.3:1.1.2.114	Thu Apr 30 20:04:33 2015
+++ src/doc/CHANGES-5.3	Fri May 22 11:05:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.114 2015/04/30 20:04:33 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.115 2015/05/22 11:05:57 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3892,3 +3892,8 @@ sys/dev/pci/pcidevs_data.h			regen
 	- Fix debug message.
 	[msaitoh, ticket #1962]
 
+sys/arch/xen/xen/xenevt.c			1.42
+
+	Fix off by one error, addresses port-xen/49919.
+	[bouyer, ticket #1965]
+



CVS commit: [netbsd-5] src/sys/arch/xen/xen

2015-05-22 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri May 22 11:04:28 UTC 2015

Modified Files:
src/sys/arch/xen/xen [netbsd-5]: xenevt.c

Log Message:
Pull up the following revisions(s) (requested by bouyer in ticket #1965):
sys/arch/xen/xen/xenevt.c:  revision 1.42

Fix off by one error, addresses port-xen/49919.


To generate a diff of this commit:
cvs rdiff -u -r1.29.4.2 -r1.29.4.3 src/sys/arch/xen/xen/xenevt.c

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

Modified files:

Index: src/sys/arch/xen/xen/xenevt.c
diff -u src/sys/arch/xen/xen/xenevt.c:1.29.4.2 src/sys/arch/xen/xen/xenevt.c:1.29.4.3
--- src/sys/arch/xen/xen/xenevt.c:1.29.4.2	Wed Sep 30 00:08:03 2009
+++ src/sys/arch/xen/xen/xenevt.c	Fri May 22 11:04:28 2015
@@ -1,4 +1,4 @@
-/*  $NetBSD: xenevt.c,v 1.29.4.2 2009/09/30 00:08:03 snj Exp $  */
+/*  $NetBSD: xenevt.c,v 1.29.4.3 2015/05/22 11:04:28 sborrill Exp $  */
 
 /*
  * Copyright (c) 2005 Manuel Bouyer.
@@ -31,7 +31,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: xenevt.c,v 1.29.4.2 2009/09/30 00:08:03 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: xenevt.c,v 1.29.4.3 2015/05/22 11:04:28 sborrill Exp $);
 
 #include opt_xen.h
 #include sys/param.h
@@ -496,7 +496,7 @@ xenevt_fwrite(struct file *fp, off_t *of
 	if (uio-uio_resid == 0)
 		return (0);
 	nentries = uio-uio_resid / sizeof(uint16_t);
-	if (nentries  NR_EVENT_CHANNELS)
+	if (nentries = NR_EVENT_CHANNELS)
 		return EMSGSIZE;
 	chans = kmem_alloc(nentries * sizeof(uint16_t), KM_SLEEP);
 	if (chans == NULL)
@@ -580,7 +580,7 @@ xenevt_fioctl(struct file *fp, u_long cm
 	{
 		struct ioctl_evtchn_unbind *unbind = addr;
 		
-		if (unbind-port  NR_EVENT_CHANNELS)
+		if (unbind-port = NR_EVENT_CHANNELS)
 			return EINVAL;
 		if (devevent[unbind-port] != d)
 			return ENOTCONN;
@@ -596,7 +596,7 @@ xenevt_fioctl(struct file *fp, u_long cm
 	{
 		struct ioctl_evtchn_notify *notify = addr;
 		
-		if (notify-port  NR_EVENT_CHANNELS)
+		if (notify-port = NR_EVENT_CHANNELS)
 			return EINVAL;
 		if (devevent[notify-port] != d)
 			return ENOTCONN;



CVS commit: [netbsd-5] src/sys/dev/pci

2015-04-30 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 30 20:00:27 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-5]: if_wm.c if_wmreg.h if_wmvar.h pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1962):
sys/dev/pci/if_wm.c: revisions 1.259-1.266, 1.269, 1.271, 1.273-1.274, 
1.277-1.278, 1.282, 1.284-1.285, 1.287, 1.290, 1.294, 1.297-1.298, 1.300-1.301, 
1.304-1.307, 1.310, 1.312-1.314, 1.316 via patch
sys/dev/pci/if_wmreg.c: revisions 1.54-1.57, 1.59-1.60, 1.62, 1.64-1.66 
via patch
sys/dev/pci/if_wmvar.c: revisions 1.17, 1.20-1.21 via patch
sys/dev/pci/pcidevs: revisions 1.1172, 1.1195, 1.1201 via patch
- Fix MDIC write error bug for 82574 and 82583. For those chips, the
  semaphore must be released after chip reset. Found and tested by
  Mark Davies.
- Fix BMC related bugs.
- Fix yet another NVM bank detect problem in wm(4). Use bank 0 if the detect
  function failed. It's the same as FreeBSD. Observed and tested with
  Asus P8P67 Deluxe motherboard and tested by jnemeth.
- Add support for I354 DH89xxCC and some new I218 devices.
- Fix definition of CTRL_GIO_M_DIS bit.
- Insert completion barrier between register write and delay().
- Bump max TX DMA size to avoid pathological condition with TSO. From dyoung.
- Fix semaphore related bugs.
- Call wm_set_pcie_completion_timeout() on I350, I354, I210 and I211, too.
  Same as FreeBSD and OpenBSD.
- Drop PHPM_GO_LINK_D bit in WMREG_PHPM on some chips. From FreeBSD.
-  Fix fiber link problem (PR#44776 and PR#30880).
- WM_T_82545 is not 1000base-SX but 1000base-LX. Same as FreeBSD.
- Set the WM_F_ATTACHED flag if wm_attach() finished succesfully and check
  the flag in wm_detach(). It will avoid to panic in wm_detach().
  Fixes PR#49102.
- It's not required to print failed to detect NVM bank with
  aprint_error_dev(). Use DPRINTF(). Same as {Free,Open}BSD.
- Fix a bug that the offset of alt MAC address is wrongly calculated to 0
  when alt MAC address function is really used. This bug does not appear
  as real bug if the same MAC address is written in the default location
  and alt MAC address's location.
- Initialize some hardware bits for 8257[1234], 82583, 80003, ICH* and PCH*.
  Some of them are workaround code. From other *BSDs, Linux and documents.
- Fix a bug that wm_sgmii_writereg() function doesn't pass the val argument
  to the I2CCMD register. Reported by Bernard Merindol in PR#49789.
- Delete 82580ER related code. It was from FreeBSD and was removed
  in r203049.
- Remove extra debug message.
- Remove unused variable.
- Remove a duplicated error message.
- Cleanup comments.
- Fix debug message.


To generate a diff of this commit:
cvs rdiff -u -r1.162.4.20 -r1.162.4.21 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.24.20.8 -r1.24.20.9 src/sys/dev/pci/if_wmreg.h
cvs rdiff -u -r1.2.46.6 -r1.2.46.7 src/sys/dev/pci/if_wmvar.h
cvs rdiff -u -r1.962.4.19 -r1.962.4.20 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.162.4.20 src/sys/dev/pci/if_wm.c:1.162.4.21
--- src/sys/dev/pci/if_wm.c:1.162.4.20	Sun Apr 26 09:03:12 2015
+++ src/sys/dev/pci/if_wm.c	Thu Apr 30 20:00:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.162.4.20 2015/04/26 09:03:12 martin Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.162.4.21 2015/04/30 20:00:26 snj 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.162.4.20 2015/04/26 09:03:12 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.21 2015/04/30 20:00:26 snj Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -176,7 +176,7 @@ int	wm_debug = WM_DEBUG_TX | WM_DEBUG_RX
 #define	WM_NEXTTX(sc, x)	(((x) + 1)  WM_NTXDESC_MASK(sc))
 #define	WM_NEXTTXS(sc, x)	(((x) + 1)  WM_TXQUEUELEN_MASK(sc))
 
-#define	WM_MAXTXDMA		round_page(IP_MAXPACKET) /* for TSO */
+#define	WM_MAXTXDMA		 (2 * round_page(IP_MAXPACKET)) /* for TSO */
 
 /*
  * Receive descriptor list size.  We have one Rx buffer for normal
@@ -273,6 +273,7 @@ struct wm_softc {
 	int sc_pcixe_capoff;		/* PCI[Xe] capability register offset */
 
 	const struct wm_product *sc_wmp; /* Pointer to the wm_product entry */
+	uint16_t sc_pcidevid;		/* PCI device ID */
 	wm_chip_type sc_type;		/* MAC type */
 	int sc_rev;			/* MAC revision */
 	wm_phy_type sc_phytype;		/* PHY type */
@@ -285,7 +286,8 @@ struct wm_softc {
 	void *sc_ih;			/* interrupt cookie */
 	callout_t sc_tick_ch;		/* tick callout */
 
-	int sc_ee_addrbits;		/* EEPROM address bits */
+	int sc_nvm_addrbits;		/* NVM address bits */
+	unsigned int sc_nvm_wordsize;		/* NVM word size */
 	int sc_ich8_flash_base;
 	int sc_ich8_flash_bank_size;
 	int sc_nvm_k1_enabled;
@@ -383,8 +385,6 @@ struct wm_softc {
 	int sc_tbi_linkup;		/* TBI link status */
 	int sc_tbi_anegticks;		/* 

CVS commit: [netbsd-5] src/doc

2015-04-30 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 30 20:04:33 UTC 2015

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

Log Message:
1962


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.113 -r1.1.2.114 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.113 src/doc/CHANGES-5.3:1.1.2.114
--- src/doc/CHANGES-5.3:1.1.2.113	Sun Apr 26 09:04:32 2015
+++ src/doc/CHANGES-5.3	Thu Apr 30 20:04:33 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.113 2015/04/26 09:04:32 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.114 2015/04/30 20:04:33 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3846,3 +3846,49 @@ sys/dev/pci/if_wm.c:patch
 	pointer as the first argument of bpf_mtap() on 82575 and newer chips.
 	[msaitoh, #1961]
 
+sys/dev/pci/if_wm.c1.259-1.266, 1.269, 1.271, 1.273-1.274, 1.277-1.278, 1.282, 1.284-1.285, 1.287, 1.290, 1.294, 1.297-1.298, 1.300-1.301, 1.304-1.307, 1.310, 1.312-1.314, 1.316 via patch
+sys/dev/pci/if_wmreg.c1.54-1.57, 1.59-1.60, 1.62, 1.64-1.66 via patch
+sys/dev/pci/if_wmvar.c1.17, 1.20-1.21 via patch
+sys/dev/pci/pcidevs1.1172, 1.1195, 1.1201 via patch
+sys/dev/pci/pcidevs.hregen
+sys/dev/pci/pcidevs_data.h			regen
+
+	- Fix MDIC write error bug for 82574 and 82583. For those chips, the
+	  semaphore must be released after chip reset. Found and tested by
+	  Mark Davies.
+	- Fix BMC related bugs.
+	- Fix yet another NVM bank detect problem in wm(4). Use bank 0 if the detect
+	  function failed. It's the same as FreeBSD. Observed and tested with
+	  Asus P8P67 Deluxe motherboard and tested by jnemeth.
+	- Add support for I354 DH89xxCC and some new I218 devices.
+	- Fix definition of CTRL_GIO_M_DIS bit.
+	- Insert completion barrier between register write and delay().
+	- Bump max TX DMA size to avoid pathological condition with TSO. From dyoung.
+	- Fix semaphore related bugs.
+	- Call wm_set_pcie_completion_timeout() on I350, I354, I210 and I211, too.
+	  Same as FreeBSD and OpenBSD.
+	- Drop PHPM_GO_LINK_D bit in WMREG_PHPM on some chips. From FreeBSD.
+	-  Fix fiber link problem (PR#44776 and PR#30880).
+	- WM_T_82545 is not 1000base-SX but 1000base-LX. Same as FreeBSD.
+	- Set the WM_F_ATTACHED flag if wm_attach() finished succesfully and check
+	  the flag in wm_detach(). It will avoid to panic in wm_detach().
+	  Fixes PR#49102.
+	- It's not required to print failed to detect NVM bank with
+	  aprint_error_dev(). Use DPRINTF(). Same as {Free,Open}BSD.
+	- Fix a bug that the offset of alt MAC address is wrongly calculated to 0
+	  when alt MAC address function is really used. This bug does not appear
+	  as real bug if the same MAC address is written in the default location
+	  and alt MAC address's location.
+	- Initialize some hardware bits for 8257[1234], 82583, 80003, ICH* and PCH*.
+	  Some of them are workaround code. From other *BSDs, Linux and documents.
+	- Fix a bug that wm_sgmii_writereg() function doesn't pass the val argument
+	  to the I2CCMD register. Reported by Bernard Merindol in PR#49789.
+	- Delete 82580ER related code. It was from FreeBSD and was removed
+	  in r203049.
+	- Remove extra debug message.
+	- Remove unused variable.
+	- Remove a duplicated error message.
+	- Cleanup comments.
+	- Fix debug message.
+	[msaitoh, ticket #1962]
+



CVS commit: [netbsd-5] src/sys/dev/pci

2015-04-30 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 30 20:02:02 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-5]: pcidevs.h pcidevs_data.h

Log Message:
regen for ticket 1962


To generate a diff of this commit:
cvs rdiff -u -r1.963.4.19 -r1.963.4.20 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.962.4.19 -r1.962.4.20 src/sys/dev/pci/pcidevs_data.h

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

Modified files:

Index: src/sys/dev/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.963.4.19 src/sys/dev/pci/pcidevs.h:1.963.4.20
--- src/sys/dev/pci/pcidevs.h:1.963.4.19	Sat Sep  7 17:11:18 2013
+++ src/sys/dev/pci/pcidevs.h	Thu Apr 30 20:01:45 2015
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.963.4.19 2013/09/07 17:11:18 bouyer Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.963.4.20 2015/04/30 20:01:45 snj Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.962.4.19 2013/09/07 17:10:18 bouyer Exp
+ *	NetBSD: pcidevs,v 1.962.4.20 2015/04/30 20:00:27 snj Exp
  */
 
 /*
@@ -2145,6 +2145,11 @@
 #define	PCI_PRODUCT_INTEL_SRCZCRX	0x0407		/* RAID controller */
 #define	PCI_PRODUCT_INTEL_SRCU42E	0x0408		/* SCSI RAID controller */
 #define	PCI_PRODUCT_INTEL_SRCS28X	0x0409		/* SATA RAID controller */
+#define	PCI_PRODUCT_INTEL_DH89XXCC_IQIA	0x0434		/* DH89xx CC PCIe Endpoint and QuiskAssit */
+#define	PCI_PRODUCT_INTEL_DH89XXCC_SGMII	0x0438		/* DH89XXCC SGMII */
+#define	PCI_PRODUCT_INTEL_DH89XXCC_SERDES	0x043a		/* DH89XXCC SerDes */
+#define	PCI_PRODUCT_INTEL_DH89XXCC_BPLANE	0x043c		/* DH89XXCC backplane */
+#define	PCI_PRODUCT_INTEL_DH89XXCC_SFP	0x0440		/* DH89XXCC SFP */
 #define	PCI_PRODUCT_INTEL_PCEB	0x0482		/* 82375EB/SB PCI-EISA Bridge */
 #define	PCI_PRODUCT_INTEL_CDC	0x0483		/* 82424ZX Cache and DRAM controller */
 #define	PCI_PRODUCT_INTEL_SIO	0x0484		/* 82378ZB System I/O */
@@ -2331,6 +2336,10 @@
 #define	PCI_PRODUCT_INTEL_I217_V	0x153b		/* I217-V Ethernet Connection */
 #define	PCI_PRODUCT_INTEL_I218_V	0x1559		/* I218-V Ethernet Connection */
 #define	PCI_PRODUCT_INTEL_I218_LM	0x155a		/* I218-LM Ethernet Connection */
+#define	PCI_PRODUCT_INTEL_I218_LM2	0x15a0		/* I218-LM Ethernet Connection */
+#define	PCI_PRODUCT_INTEL_I218_V2	0x15a1		/* I218-V Ethernet Connection */
+#define	PCI_PRODUCT_INTEL_I218_LM3	0x15a2		/* I218-LM Ethernet Connection */
+#define	PCI_PRODUCT_INTEL_I218_V3	0x15a3		/* I218-V Ethernet Connection */
 #define	PCI_PRODUCT_INTEL_80960_RP	0x1960		/* ROB-in i960RP Microprocessor */
 #define	PCI_PRODUCT_INTEL_80960RM_2	0x1962		/* i960 RM PCI-PCI */
 #define	PCI_PRODUCT_INTEL_82840_HB	0x1a21		/* 82840 Host */
@@ -2363,6 +2372,56 @@
 #define	PCI_PRODUCT_INTEL_6SERIES_EHCI_2	0x1c2d		/* 6 Series USB */
 #define	PCI_PRODUCT_INTEL_6SERIES_MEI	0x1c3a		/* 6 Series MEI */
 #define	PCI_PRODUCT_INTEL_6SERIES_KT	0x1c3d		/* 6 Series KT */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_0	0x1f00		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_1	0x1f01		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_2	0x1f02		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_3	0x1f03		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_4	0x1f04		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_5	0x1f05		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_6	0x1f06		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_7	0x1f07		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_8	0x1f08		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_9	0x1f09		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_A	0x1f0a		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_B	0x1f0b		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_C	0x1f0c		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_D	0x1f0d		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_E	0x1f0e		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_TROUTER_F	0x1f0f		/* C2000 Transaction Router */
+#define	PCI_PRODUCT_INTEL_C2000_PCIE_1	0x1f10		/* C2000 PCIe Root Port */
+#define	PCI_PRODUCT_INTEL_C2000_PCIE_2	0x1f11		/* C2000 PCIe Root Port */
+#define	PCI_PRODUCT_INTEL_C2000_PCIE_3	0x1f12		/* C2000 PCIe Root Port */
+#define	PCI_PRODUCT_INTEL_C2000_PCIE_4	0x1f13		/* C2000 PCIe Root Port */
+#define	PCI_PRODUCT_INTEL_C2000_RAS	0x1f14		/* C2000 RAS */
+#define	PCI_PRODUCT_INTEL_C2000_SMBUS	0x1f15		/* C2000 SMBus 2.0 */
+#define	PCI_PRODUCT_INTEL_C2000_RCEC	0x1f16		/* C2000 RCEC */
+#define	PCI_PRODUCT_INTEL_C2000_IQIA_PHYS	0x1f18		/* C2000 IQIA Physical Function */
+#define	PCI_PRODUCT_INTEL_C2000_IQIA	0x1f19		/* C2000 IQIA */
+#define	PCI_PRODUCT_INTEL_C2000_SATA2	0x1f22		/* C2000 SATA2 */
+#define	PCI_PRODUCT_INTEL_C2000_USB	0x1f2c		/* 

CVS commit: [netbsd-5] src/sys/dev/pci

2015-04-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 26 09:03:12 UTC 2015

Modified Files:
src/sys/dev/pci [netbsd-5]: if_wm.c

Log Message:
Apply patch, requested by msaitoh in ticket #1961:

sys/dev/pci/if_wm.c:(patch)

 Fix a bug (in the backport for #1850) that passed the wrong pointer as the
first argument of bpf_mtap() on 82575 and newer chip.


To generate a diff of this commit:
cvs rdiff -u -r1.162.4.19 -r1.162.4.20 src/sys/dev/pci/if_wm.c

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

Modified files:

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.162.4.19 src/sys/dev/pci/if_wm.c:1.162.4.20
--- src/sys/dev/pci/if_wm.c:1.162.4.19	Sat Sep  7 17:10:18 2013
+++ src/sys/dev/pci/if_wm.c	Sun Apr 26 09:03:12 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.162.4.19 2013/09/07 17:10:18 bouyer Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.162.4.20 2015/04/26 09:03:12 martin 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.162.4.19 2013/09/07 17:10:18 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: if_wm.c,v 1.162.4.20 2015/04/26 09:03:12 martin Exp $);
 
 #include bpfilter.h
 #include rnd.h
@@ -3304,7 +3304,7 @@ wm_nq_start(struct ifnet *ifp)
 #if NBPFILTER  0
 		/* Pass the packet to any BPF listeners. */
 		if (ifp-if_bpf)
-			bpf_mtap(ifp, m0);
+			bpf_mtap(ifp-if_bpf, m0);
 #endif
 	}
 



CVS commit: [netbsd-5] src/doc

2015-04-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Apr 26 09:04:32 UTC 2015

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

Log Message:
Ticket #1961


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.112 -r1.1.2.113 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.112 src/doc/CHANGES-5.3:1.1.2.113
--- src/doc/CHANGES-5.3:1.1.2.112	Fri Apr 24 05:48:35 2015
+++ src/doc/CHANGES-5.3	Sun Apr 26 09:04:32 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.112 2015/04/24 05:48:35 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.113 2015/04/26 09:04:32 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3840,3 +3840,9 @@ sys/kern/sys_select.cpatch
 	exceeded, then return EINVAL instead of silently truncating the list.
 	Addresses PR/17507.
 	[prlw1, ticket #1957]
+
+sys/dev/pci/if_wm.c:patch
+	Fix a bug (in the backport for #1850) that passed the wrong
+	pointer as the first argument of bpf_mtap() on 82575 and newer chips.
+	[msaitoh, #1961]
+



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

2015-04-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 24 05:45:48 UTC 2015

Modified Files:
src/sys/kern [netbsd-5]: sys_select.c

Log Message:
Pull up following revision(s) (requested by prlw1 in ticket #1957):

sys/kern/sys_select.c   patch

Limit nfds arg to poll() to a large enough value that user programs
cannot allocate indefinite sized blocks of kvm. If the limit is
exceeded, then return EINVAL instead of silently truncating the list.
Addresses PR/17507.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.4.1 src/sys/kern/sys_select.c

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

Modified files:

Index: src/sys/kern/sys_select.c
diff -u src/sys/kern/sys_select.c:1.10 src/sys/kern/sys_select.c:1.10.4.1
--- src/sys/kern/sys_select.c:1.10	Wed Oct 15 08:13:17 2008
+++ src/sys/kern/sys_select.c	Fri Apr 24 05:45:48 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: sys_select.c,v 1.10 2008/10/15 08:13:17 ad Exp $	*/
+/*	$NetBSD: sys_select.c,v 1.10.4.1 2015/04/24 05:45:48 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: sys_select.c,v 1.10 2008/10/15 08:13:17 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: sys_select.c,v 1.10.4.1 2015/04/24 05:45:48 msaitoh Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -432,9 +432,17 @@ pollcommon(lwp_t *l, register_t *retval,
 	struct timeval	sleeptv;
 	selcpu_t	*sc;
 
-	if (nfds  p-p_fd-fd_nfiles) {
-		/* forgiving; slightly wrong */
-		nfds = p-p_fd-fd_nfiles;
+	if (nfds  1000 + p-p_fd-fd_nfiles) {
+		/*  
+		 * Either the user passed in a very sparse 'fds' or junk!
+		 * The kmem_alloc() call below would be bad news.
+		 * We could process the 'fds' array in chunks, but that
+		 * is a lot of code that isn't normally useful.
+		 * (Or just move the copyin/out into pollscan().)
+		 * Historically the code silently truncated 'fds' to
+		 * dt_nfiles entries - but that does cause issues.
+		 */
+		return EINVAL;
 	}
 	ni = nfds * sizeof(struct pollfd);
 	if (ni  sizeof(smallbits)) {



CVS commit: [netbsd-5] src/doc

2015-04-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 24 05:48:35 UTC 2015

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

Log Message:
Ticket 1957.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.111 -r1.1.2.112 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.111 src/doc/CHANGES-5.3:1.1.2.112
--- src/doc/CHANGES-5.3:1.1.2.111	Sun Apr 19 07:45:47 2015
+++ src/doc/CHANGES-5.3	Fri Apr 24 05:48:35 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.111 2015/04/19 07:45:47 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.112 2015/04/24 05:48:35 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3832,3 +3832,11 @@ lib/libc/arch/sh3/gen/swapcontext.S		1.1
 	Correctly preserve old sate in swapcontext(3).
 	Fixes PR port-sh3/49597 reported by Yasushi Oshima.
 	[uwe, ticket #1960]
+
+sys/kern/sys_select.cpatch
+
+	Limit nfds arg to poll() to a large enough value that user programs
+	cannot allocate indefinite sized blocks of kvm. If the limit is
+	exceeded, then return EINVAL instead of silently truncating the list.
+	Addresses PR/17507.
+	[prlw1, ticket #1957]



CVS commit: [netbsd-5] src/doc

2015-04-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 06:12:57 UTC 2015

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

Log Message:
Update ticket 1958.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.109 -r1.1.2.110 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.109 src/doc/CHANGES-5.3:1.1.2.110
--- src/doc/CHANGES-5.3:1.1.2.109	Fri Apr 17 10:51:57 2015
+++ src/doc/CHANGES-5.3	Sun Apr 19 06:12:56 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.109 2015/04/17 10:51:57 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.110 2015/04/19 06:12:56 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3812,7 +3812,10 @@ lib/libc/stdio/gettemp.c			1.16 via patc
 	an absolute path.
 	[msaitoh, ticket #1955]
 
-sys/arch/sparc/stand/ofwboot/Locore.c		1.14
+sys/arch/sparc/include/openfirm.h		1.7
+sys/arch/sparc/stand/ofwboot/Locore.c		1.11, 1.14
+sys/arch/sparc/stand/ofwboot/loadfile_machdep.c	1.7
+sys/arch/sparc/stand/ofwboot/openfirm.h		1.4
 
 	Fix kernel loading failures from partitions started from over first
 	4GB of disks on sparc64.



CVS commit: [netbsd-5] src/sys/arch/sparc

2015-04-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 06:11:17 UTC 2015

Modified Files:
src/sys/arch/sparc/include [netbsd-5]: openfirm.h
src/sys/arch/sparc/stand/ofwboot [netbsd-5]: Locore.c
loadfile_machdep.c openfirm.h

Log Message:
Pullup another commit for ticket #1958 requested by martin:

sys/arch/sparc/include/openfirm.h   1.7
sys/arch/sparc/stand/ofwboot/Locore.c   1.11
sys/arch/sparc/stand/ofwboot/loadfile_machdep.c 1.7
sys/arch/sparc/stand/ofwboot/openfirm.h 1.4

Make ofwboot can handle over 4GB physical memory by using OpenFirmware
calls properly, and some cosmetic changes.  Idea from OpenBSD.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.82.1 src/sys/arch/sparc/include/openfirm.h
cvs rdiff -u -r1.10.30.1 -r1.10.30.2 \
src/sys/arch/sparc/stand/ofwboot/Locore.c
cvs rdiff -u -r1.6 -r1.6.4.1 \
src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c
cvs rdiff -u -r1.3 -r1.3.72.1 src/sys/arch/sparc/stand/ofwboot/openfirm.h

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

Modified files:

Index: src/sys/arch/sparc/include/openfirm.h
diff -u src/sys/arch/sparc/include/openfirm.h:1.6 src/sys/arch/sparc/include/openfirm.h:1.6.82.1
--- src/sys/arch/sparc/include/openfirm.h:1.6	Sat Mar  4 02:56:21 2006
+++ src/sys/arch/sparc/include/openfirm.h	Sun Apr 19 06:11:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: openfirm.h,v 1.6 2006/03/04 02:56:21 uwe Exp $	*/
+/*	$NetBSD: openfirm.h,v 1.6.82.1 2015/04/19 06:11:17 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -49,6 +49,9 @@ typedef uint64_t cell_t;
 #define HDL2CELL(x)	(cell_t)(u_int)(int)(x)
 #define ADR2CELL(x)	(cell_t)(u_int)(int)(x)
 #endif
+#define HDQ2CELL_HI(x)	(cell_t)(0)
+#define HDQ2CELL_LO(x)	(cell_t)(x)
+#define CELL2HDQ(hi,lo)	(lo)
 #else /* SUN4U */
 /* All cells are 4 byte slots */
 typedef uint32_t cell_t;

Index: src/sys/arch/sparc/stand/ofwboot/Locore.c
diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.30.1 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.30.2
--- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.30.1	Fri Apr 17 10:49:16 2015
+++ src/sys/arch/sparc/stand/ofwboot/Locore.c	Sun Apr 19 06:11:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: Locore.c,v 1.10.30.1 2015/04/17 10:49:16 msaitoh Exp $	*/
+/*	$NetBSD: Locore.c,v 1.10.30.2 2015/04/19 06:11:17 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -36,15 +36,6 @@
 
 #include machine/cpu.h
 
-vaddr_t	OF_claim_virt(vaddr_t, int);
-vaddr_t	OF_alloc_virt(int, int);
-int	OF_free_virt(vaddr_t, int);
-int	OF_unmap_virt(vaddr_t, int);
-vaddr_t	OF_map_phys(paddr_t, off_t, vaddr_t, int);
-paddr_t	OF_alloc_phys(int, int);
-paddr_t	OF_claim_phys(paddr_t, int);
-int	OF_free_phys(paddr_t, int);
-
 extern int openfirmware(void *);
 
 
@@ -450,9 +441,9 @@ OF_claim_virt(vaddr_t vaddr, int len)
 	args.align = 0;
 	args.len = len;
 	args.vaddr = ADR2CELL(vaddr);
-	if(openfirmware(args) != 0)
+	if (openfirmware(args) != 0)
 		return -1LL;
-	return args.retaddr; /* Kluge till we go 64-bit */
+	return (vaddr_t)args.retaddr;
 }
 
 /* 
@@ -486,13 +477,13 @@ OF_alloc_virt(int len, int align)
 	args.nargs = 4;
 	args.nreturns = 2;
 	args.method = ADR2CELL(claim);
-	args.ihandle = mmuh;
+	args.ihandle = HDL2CELL(mmuh);
 	args.align = align;
 	args.len = len;
 	args.retaddr = ADR2CELL(retaddr);
-	if(openfirmware(args) != 0)
+	if (openfirmware(args) != 0)
 		return -1LL;
-	return (vaddr_t)args.retaddr; /* Kluge till we go 64-bit */
+	return (vaddr_t)args.retaddr;
 }
 
 /* 
@@ -601,8 +592,8 @@ OF_map_phys(paddr_t paddr, off_t size, v
 	args.mode = mode;
 	args.size = size;
 	args.vaddr = ADR2CELL(vaddr);
-	args.paddr_hi = ADR2CELL(paddr32);
-	args.paddr_lo = ADR2CELL(paddr);
+	args.paddr_hi = HDQ2CELL_HI(paddr);
+	args.paddr_lo = HDQ2CELL_LO(paddr);
 
 	if (openfirmware(args) == -1)
 		return -1;
@@ -620,7 +611,6 @@ OF_map_phys(paddr_t paddr, off_t size, v
 paddr_t
 OF_alloc_phys(int len, int align)
 {
-	paddr_t paddr;
 	struct {
 		cell_t name;
 		cell_t nargs;
@@ -647,10 +637,9 @@ OF_alloc_phys(int len, int align)
 	args.ihandle = HDL2CELL(memh);
 	args.align = align;
 	args.len = len;
-	if(openfirmware(args) != 0)
+	if (openfirmware(args) != 0)
 		return -1LL;
-	paddr = (paddr_t)(args.phys_hi32)|((unsigned int)(args.phys_lo));
-	return paddr; /* Kluge till we go 64-bit */
+	return (paddr_t)CELL2HDQ(args.phys_hi, args.phys_lo);
 }
 
 /* 
@@ -661,7 +650,6 @@ OF_alloc_phys(int len, int align)
 paddr_t
 OF_claim_phys(paddr_t phys, int len)
 {
-	paddr_t paddr;
 	struct {
 		cell_t name;
 		cell_t nargs;
@@ -691,12 +679,11 @@ OF_claim_phys(paddr_t phys, int len)
 	args.ihandle = HDL2CELL(memh);
 	args.align = 0;
 	args.len = len;
-	args.phys_hi = HDL2CELL(phys32);
-	args.phys_lo = HDL2CELL(phys);
-	if(openfirmware(args) != 0)
+	args.phys_hi = HDQ2CELL_HI(phys);
+	args.phys_lo = HDQ2CELL_LO(phys);
+	if 

CVS commit: [netbsd-5] src/doc

2015-04-19 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Apr 19 07:45:47 UTC 2015

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

Log Message:
Ticket 1959 and 1960.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.110 -r1.1.2.111 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.110 src/doc/CHANGES-5.3:1.1.2.111
--- src/doc/CHANGES-5.3:1.1.2.110	Sun Apr 19 06:12:56 2015
+++ src/doc/CHANGES-5.3	Sun Apr 19 07:45:47 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.110 2015/04/19 06:12:56 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.111 2015/04/19 07:45:47 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3820,3 +3820,15 @@ sys/arch/sparc/stand/ofwboot/openfirm.h	
 	Fix kernel loading failures from partitions started from over first
 	4GB of disks on sparc64.
 	[nakayama, ticket #1958]
+
+xsrc/external/mit/libX11/dist/include/X11/Xlibint.h	patch
+xsrc/xfree/xc/lib/X11/Xlibint.h1.2
+
+	Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11.
+	[mrg, ticket #1959]
+
+lib/libc/arch/sh3/gen/swapcontext.S		1.11-1.12 via patch
+
+	Correctly preserve old sate in swapcontext(3).
+	Fixes PR port-sh3/49597 reported by Yasushi Oshima.
+	[uwe, ticket #1960]



CVS commit: [netbsd-5] src/doc

2015-04-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 17 10:51:58 UTC 2015

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

Log Message:
Ticket 1958.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.108 -r1.1.2.109 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.108 src/doc/CHANGES-5.3:1.1.2.109
--- src/doc/CHANGES-5.3:1.1.2.108	Thu Apr 16 06:35:27 2015
+++ src/doc/CHANGES-5.3	Fri Apr 17 10:51:57 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.108 2015/04/16 06:35:27 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.109 2015/04/17 10:51:57 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3812,3 +3812,8 @@ lib/libc/stdio/gettemp.c			1.16 via patc
 	an absolute path.
 	[msaitoh, ticket #1955]
 
+sys/arch/sparc/stand/ofwboot/Locore.c		1.14
+
+	Fix kernel loading failures from partitions started from over first
+	4GB of disks on sparc64.
+	[nakayama, ticket #1958]



CVS commit: [netbsd-5] src/sys/arch/sparc/stand/ofwboot

2015-04-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Apr 17 10:49:16 UTC 2015

Modified Files:
src/sys/arch/sparc/stand/ofwboot [netbsd-5]: Locore.c

Log Message:
Pull up following revision(s) (requested by nakayama in ticket #1958):
sys/arch/sparc/stand/ofwboot/Locore.c: revision 1.14
Fix kernel loading failures from partitions started from over first
4GB of disks on sparc64.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.30.1 src/sys/arch/sparc/stand/ofwboot/Locore.c

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

Modified files:

Index: src/sys/arch/sparc/stand/ofwboot/Locore.c
diff -u src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.30.1
--- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10	Wed Oct 17 19:57:16 2007
+++ src/sys/arch/sparc/stand/ofwboot/Locore.c	Fri Apr 17 10:49:16 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: Locore.c,v 1.10 2007/10/17 19:57:16 garbled Exp $	*/
+/*	$NetBSD: Locore.c,v 1.10.30.1 2015/04/17 10:49:16 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -311,8 +311,8 @@ OF_seek(int handle, u_quad_t pos)
 	args.nargs = 3;
 	args.nreturns = 1;
 	args.handle = HDL2CELL(handle);
-	args.poshi = HDL2CELL(pos  32);
-	args.poslo = HDL2CELL(pos);
+	args.poshi = HDQ2CELL_HI(pos);
+	args.poslo = HDQ2CELL_LO(pos);
 	if (openfirmware(args) == -1) {
 		return -1;
 	}



CVS commit: [netbsd-5] src/doc

2015-04-16 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 16 06:35:27 UTC 2015

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

Log Message:
1955


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.107 -r1.1.2.108 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.107 src/doc/CHANGES-5.3:1.1.2.108
--- src/doc/CHANGES-5.3:1.1.2.107	Thu Mar 19 18:12:20 2015
+++ src/doc/CHANGES-5.3	Thu Apr 16 06:35:27 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.107 2015/03/19 18:12:20 riz Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.108 2015/04/16 06:35:27 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3806,3 +3806,9 @@ crypto/dist/openssl/dist/ssl/s2_srvr.c	1
 	X509_to_X509_REQ NULL pointer deref (CVE-2015-0288)
 	[spz, ticket #1954]
 
+lib/libc/stdio/gettemp.c			1.16 via patch
+
+	Fix PR bin/47757: mktemp(3) mangles the pathname if not given
+	an absolute path.
+	[msaitoh, ticket #1955]
+



CVS commit: [netbsd-5] src/lib/libc/stdio

2015-04-16 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Apr 16 06:33:59 UTC 2015

Modified Files:
src/lib/libc/stdio [netbsd-5]: gettemp.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1955):
lib/libc/stdio/gettemp.c: revision 1.16 via patch
PR/47757: Eric Radman: mktemp(3) mangles the pathname if not given an absolute
path
1. on error, gettemp() did not restore the path string
2. when emulating mktemp() it is not an error for the pattern not to represent
   a real directory structure
XXX[1]: pullup-5, pullup-6
XXX[2]: the default pattern is the simplistic pidX for mktemp.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.14.2.1 src/lib/libc/stdio/gettemp.c

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

Modified files:

Index: src/lib/libc/stdio/gettemp.c
diff -u src/lib/libc/stdio/gettemp.c:1.14 src/lib/libc/stdio/gettemp.c:1.14.2.1
--- src/lib/libc/stdio/gettemp.c:1.14	Mon Oct 20 10:28:38 2008
+++ src/lib/libc/stdio/gettemp.c	Thu Apr 16 06:33:59 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gettemp.c,v 1.14 2008/10/20 10:28:38 apb Exp $	*/
+/*	$NetBSD: gettemp.c,v 1.14.2.1 2015/04/16 06:33:59 snj Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -40,7 +40,7 @@
 #if 0
 static char sccsid[] = @(#)mktemp.c	8.1 (Berkeley) 6/4/93;
 #else
-__RCSID($NetBSD: gettemp.c,v 1.14 2008/10/20 10:28:38 apb Exp $);
+__RCSID($NetBSD: gettemp.c,v 1.14.2.1 2015/04/16 06:33:59 snj Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -122,14 +122,16 @@ GETTEMP(path, doopen, domkdir)
 		if (trv = path)
 			break;
 		if (*trv == '/') {
+			int e;
 			*trv = '\0';
-			if (stat(path, sbuf))
-return (0);
+			e = stat(path, sbuf);
+			*trv = '/';
+			if (e == -1)
+return doopen == NULL  !domkdir;
 			if (!S_ISDIR(sbuf.st_mode)) {
 errno = ENOTDIR;
-return (0);
+return doopen == NULL  !domkdir;
 			}
-			*trv = '/';
 			break;
 		}
 	}



CVS commit: [netbsd-5] src/doc

2015-03-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Mar 19 18:12:20 UTC 2015

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

Log Message:
Fix paths in previous.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.106 -r1.1.2.107 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.106 src/doc/CHANGES-5.3:1.1.2.107
--- src/doc/CHANGES-5.3:1.1.2.106	Thu Mar 19 16:39:50 2015
+++ src/doc/CHANGES-5.3	Thu Mar 19 18:12:20 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.106 2015/03/19 16:39:50 riz Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.107 2015/03/19 18:12:20 riz Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3787,13 +3787,13 @@ sys/compat/linux32/common/linux32_stat.c
 	- Add fstatfs syscall.
 	[joerg, ticket #1149]
 
-crypto/external/bsd/openssl/dist/crypto/asn1/a_type.c 1.2
-crypto/external/bsd/openssl/dist/crypto/asn1/tasn_dec.c 1.2
-crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_doit.c 1.2
-crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_lib.c 1.2
-crypto/external/bsd/openssl/dist/doc/crypto/d2i_X509.pod 1.2
-crypto/external/bsd/openssl/dist/ssl/s2_lib.c	1.3
-crypto/external/bsd/openssl/dist/ssl/s2_srvr.c	1.2
+crypto/dist/openssl/dist/crypto/asn1/a_type.c 1.2
+crypto/dist/openssl/dist/crypto/asn1/tasn_dec.c 1.2
+crypto/dist/openssl/dist/crypto/pkcs7/pk7_doit.c 1.2
+crypto/dist/openssl/dist/crypto/pkcs7/pk7_lib.c 1.2
+crypto/dist/openssl/dist/doc/crypto/d2i_X509.pod 1.2
+crypto/dist/openssl/dist/ssl/s2_lib.c	1.3
+crypto/dist/openssl/dist/ssl/s2_srvr.c	1.2
 
 	Address OpenSSL Security Advisory [19 Mar 2015]:
 	RSA silently downgrades to EXPORT_RSA [Client] (CVE-2015-0204)



CVS commit: [netbsd-5] src/crypto/dist/openssl

2015-03-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Mar 19 16:39:09 UTC 2015

Modified Files:
src/crypto/dist/openssl/crypto/asn1 [netbsd-5]: a_type.c tasn_dec.c
src/crypto/dist/openssl/crypto/pkcs7 [netbsd-5]: pk7_doit.c pk7_lib.c
src/crypto/dist/openssl/doc/crypto [netbsd-5]: d2i_X509.pod
src/crypto/dist/openssl/ssl [netbsd-5]: s2_lib.c s2_srvr.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1954):
crypto/external/bsd/openssl/dist/ssl/s2_lib.c: revision 1.3
crypto/external/bsd/openssl/dist/crypto/asn1/a_type.c: revision 1.2
crypto/external/bsd/openssl/dist/doc/crypto/d2i_X509.pod: revision 1.2
crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_doit.c: revision 1.2
crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_lib.c: revision 1.2
crypto/external/bsd/openssl/dist/ssl/s2_srvr.c: revision 1.2
crypto/external/bsd/openssl/dist/crypto/asn1/tasn_dec.c: revision 1.2
patches for todays' OpenSSL security advisory from OpenSSL, as relevant
to NetBSD base:
OpenSSL Security Advisory [19 Mar 2015]
===
Reclassified: RSA silently downgrades to EXPORT_RSA [Client] (CVE-2015-0204)

Severity: High
This security issue was previously announced by the OpenSSL project and
classified as low severity. This severity rating has now been changed to
high.
This was classified low because it was originally thought that server RSA
export ciphersuite support was rare: a client was only vulnerable to a MITM
attack against a server which supports an RSA export ciphersuite. Recent
studies have shown that RSA export ciphersuites support is far more common.
This issue affects OpenSSL versions: 1.0.1, 1.0.0 and 0.9.8.
** issue already committed see last release **
OpenSSL 1.0.1 users should upgrade to 1.0.1k.
OpenSSL 1.0.0 users should upgrade to 1.0.0p.
OpenSSL 0.9.8 users should upgrade to 0.9.8zd.
This issue was reported to OpenSSL on 22nd October 2014 by Karthikeyan
Bhargavan of the PROSECCO team at INRIA. The fix was developed by Stephen
Henson of the OpenSSL core team. It was previously announced in the OpenSSL
security advisory on 8th January 2015.
Segmentation fault in ASN1_TYPE_cmp (CVE-2015-0286)
===
Severity: Moderate
The function ASN1_TYPE_cmp will crash with an invalid read if an attempt is
made to compare ASN.1 boolean types. Since ASN1_TYPE_cmp is used to check
certificate signature algorithm consistency this can be used to crash any
certificate verification operation and exploited in a DoS attack. Any
application which performs certificate verification is vulnerable including
OpenSSL clients and servers which enable client authentication.
This issue affects all current OpenSSL versions: 1.0.2, 1.0.1, 1.0.0 and 0.9.8.
OpenSSL 1.0.2 users should upgrade to 1.0.2a
commit 1b8ac2b07d02207f2b88e0b009b0bff4ef7eda96
OpenSSL 1.0.1 users should upgrade to 1.0.1m.
commit ee5a1253285e5c9f406c8b57b0686319b70c07d8
OpenSSL 1.0.0 users should upgrade to 1.0.0r.
commit 1e3ca524cb38ec92deea37629718e98aba43bc5d
OpenSSL 0.9.8 users should upgrade to 0.9.8zf.
commit 7058bd1712828a78d34457b1cfc32bdc1e6d3d33
This issue was discovered and fixed by Stephen Henson of the OpenSSL
development team.
ASN.1 structure reuse memory corruption (CVE-2015-0287)
===
Severity: Moderate
Reusing a structure in ASN.1 parsing may allow an attacker to cause
memory corruption via an invalid write. Such reuse is and has been
strongly discouraged and is believed to be rare.
Applications that parse structures containing CHOICE or ANY DEFINED BY
components may be affected. Certificate parsing (d2i_X509 and related
functions) are however not affected. OpenSSL clients and servers are
not affected.
This issue affects all current OpenSSL versions: 1.0.2, 1.0.1, 1.0.0
and 0.9.8.
OpenSSL 1.0.2 users should upgrade to 1.0.2a
commit 0ca8edbe6ec402e39c9e095f8ae11dba8fa93fc1
OpenSSL 1.0.1 users should upgrade to 1.0.1m.
commit a9f34a7aac5fd89f33a34fb71e954b85fbf35875
OpenSSL 1.0.0 users should upgrade to 1.0.0r.
commit d96692c933fe02829c3e922bf7f239e0bd003759
OpenSSL 0.9.8 users should upgrade to 0.9.8zf.
commit 5722767d5dc1a3b5505058fe27877fc993fe9a5a
This issue was discovered by Emilia K�sper and a fix developed by
Stephen Henson of the OpenSSL development team.
PKCS7 NULL pointer dereferences (CVE-2015-0289)
===
Severity: Moderate
The PKCS#7 parsing code does not handle missing outer ContentInfo correctly.
An attacker can craft malformed ASN.1-encoded PKCS#7 blobs with
missing content and trigger a NULL pointer dereference on parsing.
Applications that verify PKCS#7 signatures, decrypt PKCS#7 data or
otherwise parse PKCS#7 structures from untrusted sources are
affected. OpenSSL clients and servers are not 

CVS commit: [netbsd-5] src/doc

2015-03-19 Thread Jeff Rizzo
Module Name:src
Committed By:   riz
Date:   Thu Mar 19 16:39:50 UTC 2015

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

Log Message:
Ticket 1594.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.105 src/doc/CHANGES-5.3:1.1.2.106
--- src/doc/CHANGES-5.3:1.1.2.105	Wed Mar 18 17:28:11 2015
+++ src/doc/CHANGES-5.3	Thu Mar 19 16:39:50 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.105 2015/03/18 17:28:11 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.106 2015/03/19 16:39:50 riz Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3787,3 +3787,22 @@ sys/compat/linux32/common/linux32_stat.c
 	- Add fstatfs syscall.
 	[joerg, ticket #1149]
 
+crypto/external/bsd/openssl/dist/crypto/asn1/a_type.c 1.2
+crypto/external/bsd/openssl/dist/crypto/asn1/tasn_dec.c 1.2
+crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_doit.c 1.2
+crypto/external/bsd/openssl/dist/crypto/pkcs7/pk7_lib.c 1.2
+crypto/external/bsd/openssl/dist/doc/crypto/d2i_X509.pod 1.2
+crypto/external/bsd/openssl/dist/ssl/s2_lib.c	1.3
+crypto/external/bsd/openssl/dist/ssl/s2_srvr.c	1.2
+
+	Address OpenSSL Security Advisory [19 Mar 2015]:
+	RSA silently downgrades to EXPORT_RSA [Client] (CVE-2015-0204)
+	Segmentation fault in ASN1_TYPE_cmp (CVE-2015-0286)
+	ASN.1 structure reuse memory corruption (CVE-2015-0287)
+	PKCS7 NULL pointer dereferences (CVE-2015-0289)
+	Base64 decode (CVE-2015-0292)
+	DoS via reachable assert in SSLv2 servers (CVE-2015-0293)
+	Use After Free following d2i_ECPrivatekey error (CVE-2015-0209)
+	X509_to_X509_REQ NULL pointer deref (CVE-2015-0288)
+	[spz, ticket #1954]
+



CVS commit: [netbsd-5] src/doc

2015-03-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 18 17:28:11 UTC 2015

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

Log Message:
1149 and 1952


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.104 -r1.1.2.105 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.104 src/doc/CHANGES-5.3:1.1.2.105
--- src/doc/CHANGES-5.3:1.1.2.104	Tue Mar 17 18:43:09 2015
+++ src/doc/CHANGES-5.3	Wed Mar 18 17:28:11 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.104 2015/03/17 18:43:09 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.105 2015/03/18 17:28:11 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3768,3 +3768,22 @@ xsrc/xfree/xc/lib/font/bitmap/bdfread.c 
 	(bdfReadCharacters: ensure metrics fit into xCharInfo struct)
 	[mrg, ticket #1953]
 
+sys/dev/cons.c	1.74 via patch
+
+	Fix strange kernel output sequence \n\r observed in serial
+	consoles.  Output '\r' before '\n' in conversion.  PR 36306.
+	[nakayama, ticket #1952]
+
+sys/compat/linux32/arch/amd64/linux32_syscall.h	regen
+sys/compat/linux32/arch/amd64/linux32_syscallargs.h regen
+sys/compat/linux32/arch/amd64/linux32_syscalls.c regen
+sys/compat/linux32/arch/amd64/linux32_sysent.c	regen
+sys/compat/linux32/arch/amd64/syscalls.master	1.52, 1.53 via patch
+sys/compat/linux32/common/linux32_misc.c	1.17 via patch
+sys/compat/linux32/common/linux32_stat.c	1.14-1.16 via patch
+
+	- Fix inverted lst_ino/__lst_ino assignment in linux32_from_stat.
+	- Add stat/lstat/fstat syscalls.
+	- Add fstatfs syscall.
+	[joerg, ticket #1149]
+



CVS commit: [netbsd-5] src/sys/compat/linux32/arch/amd64

2015-03-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 18 17:21:22 UTC 2015

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-5]: linux32_syscall.h
linux32_syscallargs.h linux32_syscalls.c linux32_sysent.c

Log Message:
regen for ticket 1149


To generate a diff of this commit:
cvs rdiff -u -r1.41.4.1 -r1.41.4.2 \
src/sys/compat/linux32/arch/amd64/linux32_syscall.h \
src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h \
src/sys/compat/linux32/arch/amd64/linux32_syscalls.c \
src/sys/compat/linux32/arch/amd64/linux32_sysent.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/linux32_syscall.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.41.4.1 src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.41.4.2
--- src/sys/compat/linux32/arch/amd64/linux32_syscall.h:1.41.4.1	Thu Nov 20 16:51:42 2008
+++ src/sys/compat/linux32/arch/amd64/linux32_syscall.h	Wed Mar 18 17:21:22 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscall.h,v 1.41.4.1 2008/11/20 16:51:42 snj Exp $ */
+/* $NetBSD: linux32_syscall.h,v 1.41.4.2 2015/03/18 17:21:22 snj Exp $ */
 
 /*
  * System call numbers.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.38.4.1 2008/11/20 03:03:05 snj Exp
+ * created from	NetBSD: syscalls.master,v 1.38.4.2 2015/03/18 17:20:09 snj Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALL_H_
@@ -262,6 +262,9 @@
 /* syscall: statfs ret: int args: netbsd32_charp linux32_statfsp */
 #define	LINUX32_SYS_statfs	99
 
+/* syscall: fstatfs ret: int args: int linux32_statfsp */
+#define	LINUX32_SYS_fstatfs	100
+
 /* syscall: socketcall ret: int args: int netbsd32_voidp */
 #define	LINUX32_SYS_socketcall	102
 
@@ -271,6 +274,15 @@
 /* syscall: netbsd32_getitimer ret: int args: int netbsd32_itimervalp_t */
 #define	LINUX32_SYS_netbsd32_getitimer	105
 
+/* syscall: stat ret: int args: netbsd32_charp linux32_statp */
+#define	LINUX32_SYS_stat	106
+
+/* syscall: lstat ret: int args: netbsd32_charp linux32_statp */
+#define	LINUX32_SYS_lstat	107
+
+/* syscall: fstat ret: int args: int linux32_statp */
+#define	LINUX32_SYS_fstat	108
+
 /* syscall: olduname ret: int args: linux32_oldutsnamep_t */
 #define	LINUX32_SYS_olduname	109
 
Index: src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h
diff -u src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.41.4.1 src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.41.4.2
--- src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h:1.41.4.1	Thu Nov 20 16:51:42 2008
+++ src/sys/compat/linux32/arch/amd64/linux32_syscallargs.h	Wed Mar 18 17:21:22 2015
@@ -1,10 +1,10 @@
-/* $NetBSD: linux32_syscallargs.h,v 1.41.4.1 2008/11/20 16:51:42 snj Exp $ */
+/* $NetBSD: linux32_syscallargs.h,v 1.41.4.2 2015/03/18 17:21:22 snj Exp $ */
 
 /*
  * System call argument lists.
  *
  * DO NOT EDIT-- this file is automatically generated.
- * created from	NetBSD: syscalls.master,v 1.38.4.1 2008/11/20 03:03:05 snj Exp
+ * created from	NetBSD: syscalls.master,v 1.38.4.2 2015/03/18 17:20:09 snj Exp
  */
 
 #ifndef _LINUX32_SYS_SYSCALLARGS_H_
@@ -314,6 +314,12 @@ struct linux32_sys_statfs_args {
 };
 check_syscall_args(linux32_sys_statfs)
 
+struct linux32_sys_fstatfs_args {
+	syscallarg(int) fd;
+	syscallarg(linux32_statfsp) sp;
+};
+check_syscall_args(linux32_sys_fstatfs)
+
 struct linux32_sys_socketcall_args {
 	syscallarg(int) what;
 	syscallarg(netbsd32_voidp) args;
@@ -324,6 +330,24 @@ struct netbsd32_setitimer_args;
 
 struct netbsd32_getitimer_args;
 
+struct linux32_sys_stat_args {
+	syscallarg(netbsd32_charp) path;
+	syscallarg(linux32_statp) sp;
+};
+check_syscall_args(linux32_sys_stat)
+
+struct linux32_sys_lstat_args {
+	syscallarg(netbsd32_charp) path;
+	syscallarg(linux32_statp) sp;
+};
+check_syscall_args(linux32_sys_lstat)
+
+struct linux32_sys_fstat_args {
+	syscallarg(int) fd;
+	syscallarg(linux32_statp) sp;
+};
+check_syscall_args(linux32_sys_fstat)
+
 struct linux32_sys_olduname_args {
 	syscallarg(linux32_oldutsnamep_t) up;
 };
@@ -836,12 +860,20 @@ int	netbsd32_setpriority(struct lwp *, c
 
 int	linux32_sys_statfs(struct lwp *, const struct linux32_sys_statfs_args *, register_t *);
 
+int	linux32_sys_fstatfs(struct lwp *, const struct linux32_sys_fstatfs_args *, register_t *);
+
 int	linux32_sys_socketcall(struct lwp *, const struct linux32_sys_socketcall_args *, register_t *);
 
 int	netbsd32_setitimer(struct lwp *, const struct netbsd32_setitimer_args *, register_t *);
 
 int	netbsd32_getitimer(struct lwp *, const struct netbsd32_getitimer_args *, register_t *);
 
+int	linux32_sys_stat(struct lwp *, const struct linux32_sys_stat_args *, register_t *);
+
+int	linux32_sys_lstat(struct lwp *, const struct linux32_sys_lstat_args *, register_t *);
+
+int	linux32_sys_fstat(struct lwp *, const struct linux32_sys_fstat_args *, register_t *);
+
 int	

CVS commit: [netbsd-5] src/sys/compat/linux32

2015-03-18 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Mar 18 17:20:09 UTC 2015

Modified Files:
src/sys/compat/linux32/arch/amd64 [netbsd-5]: syscalls.master
src/sys/compat/linux32/common [netbsd-5]: linux32_misc.c linux32_stat.c

Log Message:
Pull up following revision(s) (requested by joerg in ticket #1149):
sys/compat/linux32/arch/amd64/syscalls.master: revisions 1.52, 1.53 via 
patch
sys/compat/linux32/common/linux32_misc.c: revision 1.17 via patch
sys/compat/linux32/common/linux32_stat.c: revision 1.14-1.16 via patch
Fix inverted lst_ino/__lst_ino assignment in linux32_from_stat().
--
Cleanup (no functional changes).
Kill some unneeded variables and return stattement.
Rename linux32_from_stat() to better bsd_to_linux32_stat64().
Fix some types.
Add stat/lstat/fstat syscalls.
--
Add fstatfs syscall.


To generate a diff of this commit:
cvs rdiff -u -r1.38.4.1 -r1.38.4.2 \
src/sys/compat/linux32/arch/amd64/syscalls.master
cvs rdiff -u -r1.12 -r1.12.6.1 src/sys/compat/linux32/common/linux32_misc.c
cvs rdiff -u -r1.11 -r1.11.14.1 src/sys/compat/linux32/common/linux32_stat.c

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

Modified files:

Index: src/sys/compat/linux32/arch/amd64/syscalls.master
diff -u src/sys/compat/linux32/arch/amd64/syscalls.master:1.38.4.1 src/sys/compat/linux32/arch/amd64/syscalls.master:1.38.4.2
--- src/sys/compat/linux32/arch/amd64/syscalls.master:1.38.4.1	Thu Nov 20 03:03:05 2008
+++ src/sys/compat/linux32/arch/amd64/syscalls.master	Wed Mar 18 17:20:09 2015
@@ -1,4 +1,4 @@
-	$NetBSD: syscalls.master,v 1.38.4.1 2008/11/20 03:03:05 snj Exp $
+	$NetBSD: syscalls.master,v 1.38.4.2 2015/03/18 17:20:09 snj Exp $
 
 ; NetBSD i386 COMPAT_LINUX32 system call name/number master file.
 ; (See syscalls.conf to see what it is processed into.)
@@ -199,7 +199,7 @@
 98	UNIMPL	profil
 99	STD	{ int linux32_sys_statfs(netbsd32_charp path, \
 		linux32_statfsp sp); }
-100	UNIMPL	fstatfs
+100	STD	{ int linux32_sys_fstatfs(int fd, linux32_statfsp sp); }
 101	UNIMPL	ioperm
 102	STD	{ int linux32_sys_socketcall(int what, netbsd32_voidp args); }
 103	UNIMPL	syslog
@@ -207,9 +207,11 @@
 		netbsd32_itimervalp_t itv, netbsd32_itimervalp_t oitv); }
 105	NOARGS	{ int netbsd32_getitimer(int which, \
 		netbsd32_itimervalp_t itv); }
-106	UNIMPL	stat
-107	UNIMPL	lstat
-108	UNIMPL	fstat
+106	STD	{ int linux32_sys_stat(netbsd32_charp path, \
+		linux32_statp sp); }
+107	STD	{ int linux32_sys_lstat(netbsd32_charp path, \
+		linux32_statp sp); }
+108	STD	{ int linux32_sys_fstat(int fd, linux32_statp sp); }
 109	STD	{ int linux32_sys_olduname(linux32_oldutsnamep_t up); }
 110	UNIMPL	iopl
 111	UNIMPL	vhangup

Index: src/sys/compat/linux32/common/linux32_misc.c
diff -u src/sys/compat/linux32/common/linux32_misc.c:1.12 src/sys/compat/linux32/common/linux32_misc.c:1.12.6.1
--- src/sys/compat/linux32/common/linux32_misc.c:1.12	Wed Jun 18 22:58:21 2008
+++ src/sys/compat/linux32/common/linux32_misc.c	Wed Mar 18 17:20:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_misc.c,v 1.12 2008/06/18 22:58:21 njoly Exp $	*/
+/*	$NetBSD: linux32_misc.c,v 1.12.6.1 2015/03/18 17:20:09 snj Exp $	*/
 
 /*-
  * Copyright (c) 1995, 1998, 1999 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: linux32_misc.c,v 1.12 2008/06/18 22:58:21 njoly Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_misc.c,v 1.12.6.1 2015/03/18 17:20:09 snj Exp $);
 
 #if defined(_KERNEL_OPT)
 #include opt_ptrace.h
@@ -90,6 +90,28 @@ linux32_sys_statfs(struct lwp *l, const 
 	return error;
 }
 
+int
+linux32_sys_fstatfs(struct lwp *l, const struct linux32_sys_fstatfs_args *uap, register_t *retval)
+{
+	/* {
+		syscallarg(int) fd;
+		syscallarg(linux32_statfsp) sp;
+	} */
+	struct statvfs *sb;
+	struct linux_statfs ltmp;
+	int error;
+
+	sb = STATVFSBUF_GET();
+	error = do_sys_fstatvfs(l, SCARG(uap, fd), ST_WAIT, sb);
+	if (error == 0) {
+		bsd_to_linux_statfs(sb, ltmp);
+		error = copyout(ltmp, SCARG_P32(uap, sp), sizeof ltmp);
+	}
+	STATVFSBUF_PUT(sb);
+
+	return error;
+}
+
 extern const int linux_ptrace_request_map[];
 
 int

Index: src/sys/compat/linux32/common/linux32_stat.c
diff -u src/sys/compat/linux32/common/linux32_stat.c:1.11 src/sys/compat/linux32/common/linux32_stat.c:1.11.14.1
--- src/sys/compat/linux32/common/linux32_stat.c:1.11	Fri Mar 21 21:54:58 2008
+++ src/sys/compat/linux32/common/linux32_stat.c	Wed Mar 18 17:20:09 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux32_stat.c,v 1.11 2008/03/21 21:54:58 ad Exp $ */
+/*	$NetBSD: linux32_stat.c,v 1.11.14.1 2015/03/18 17:20:09 snj Exp $ */
 
 /*-
  * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
 
 #include sys/cdefs.h
 
-__KERNEL_RCSID(0, $NetBSD: linux32_stat.c,v 1.11 2008/03/21 21:54:58 ad Exp $);
+__KERNEL_RCSID(0, $NetBSD: linux32_stat.c,v 1.11.14.1 2015/03/18 17:20:09 snj Exp $);
 
 #include sys/types.h
 

CVS commit: [netbsd-5] src/doc

2015-03-17 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Mar 17 18:43:10 UTC 2015

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

Log Message:
1953


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.103 -r1.1.2.104 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.103 src/doc/CHANGES-5.3:1.1.2.104
--- src/doc/CHANGES-5.3:1.1.2.103	Mon Mar 16 21:22:43 2015
+++ src/doc/CHANGES-5.3	Tue Mar 17 18:43:09 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.103 2015/03/16 21:22:43 bouyer Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.104 2015/03/17 18:43:09 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3759,3 +3759,12 @@ distrib/utils/x_gzip/Makefile			patch
 	Sync gzip core with HEAD.
 	[mrg, ticket #1951]
 
+xsrc/external/mit/libXfont/dist/src/bitmap/bdfread.c patch
+xsrc/xfree/xc/lib/font/bitmap/bdfread.c 	patch
+
+	Fix CVE-2015-1802 (bdfReadProperties: property count needs
+	range check), CVE-2015-1803 (bdfReadCharacters: bailout if a
+	char's bitmap cannot be read), and CVE-2015-1804
+	(bdfReadCharacters: ensure metrics fit into xCharInfo struct)
+	[mrg, ticket #1953]
+



CVS commit: [netbsd-5] src/doc

2015-03-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Mar 16 21:22:43 UTC 2015

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

Log Message:
complete list for ticket #1951


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.102 -r1.1.2.103 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.102 src/doc/CHANGES-5.3:1.1.2.103
--- src/doc/CHANGES-5.3:1.1.2.102	Sun Mar 15 21:18:04 2015
+++ src/doc/CHANGES-5.3	Mon Mar 16 21:22:43 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.102 2015/03/15 21:18:04 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.103 2015/03/16 21:22:43 bouyer Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3754,6 +3754,7 @@ usr.bin/gzip/Makefilepatch
 usr.bin/gzip/gzip.11.20-1.24
 usr.bin/gzip/gzip.c1.98-1.107
 usr.bin/gzip/zuncompress.c			1.7-1.8
+distrib/utils/x_gzip/Makefile			patch
 
 	Sync gzip core with HEAD.
 	[mrg, ticket #1951]



CVS commit: [netbsd-5] src/distrib/utils/x_gzip

2015-03-16 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Mon Mar 16 21:20:06 UTC 2015

Modified Files:
src/distrib/utils/x_gzip [netbsd-5]: Makefile

Log Message:
usr.bin/gzip/Makefile   patch
usr.bin/gzip/gzip.1 1.20-1.24
usr.bin/gzip/gzip.c 1.98-1.107
usr.bin/gzip/zuncompress.c  1.7-1.8
distrib/utils/x_gzip/Makefile   patch

Sync gzip core with HEAD.
[mrg, ticket #1951]


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.7.40.1 src/distrib/utils/x_gzip/Makefile

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

Modified files:

Index: src/distrib/utils/x_gzip/Makefile
diff -u src/distrib/utils/x_gzip/Makefile:1.7 src/distrib/utils/x_gzip/Makefile:1.7.40.1
--- src/distrib/utils/x_gzip/Makefile:1.7	Sun Mar 28 04:10:43 2004
+++ src/distrib/utils/x_gzip/Makefile	Mon Mar 16 21:20:06 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.7 2004/03/28 04:10:43 mrg Exp $
+#	$NetBSD: Makefile,v 1.7.40.1 2015/03/16 21:20:06 bouyer Exp $
 # Build a tiny limited gzip (i.e. for tiny boot media)
 
 SRCDIR= ${.CURDIR}/../../../usr.bin/gzip
@@ -6,7 +6,7 @@ SRCDIR= ${.CURDIR}/../../../usr.
 PROG=		gzip
 NOMAN=		# defined
 
-CPPFLAGS+=	-DSMALL -DNO_BZIP2_SUPPORT -DNO_COMPRESS_SUPPORT
+CPPFLAGS+=	-DSMALL -DNO_BZIP2_SUPPORT -DNO_COMPRESS_SUPPORT -DNO_XZ_SUPPORT
 
 DPADD=		${LIBZ}
 LDADD=		-lz



CVS commit: [netbsd-5] src/doc

2015-03-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 15 21:18:04 UTC 2015

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

Log Message:
1951


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.101 -r1.1.2.102 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.101 src/doc/CHANGES-5.3:1.1.2.102
--- src/doc/CHANGES-5.3:1.1.2.101	Fri Feb 27 02:55:45 2015
+++ src/doc/CHANGES-5.3	Sun Mar 15 21:18:04 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.101 2015/02/27 02:55:45 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.102 2015/03/15 21:18:04 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3750,3 +3750,11 @@ include/wchar.h	patch
 	_POSIX_C_SOURCE = 200112L and _XOPEN_SOURCE = 600.
 	[christos, ticket #1943]
 
+usr.bin/gzip/Makefilepatch
+usr.bin/gzip/gzip.11.20-1.24
+usr.bin/gzip/gzip.c1.98-1.107
+usr.bin/gzip/zuncompress.c			1.7-1.8
+
+	Sync gzip core with HEAD.
+	[mrg, ticket #1951]
+



CVS commit: [netbsd-5] src/usr.bin/gzip

2015-03-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Mar 15 21:15:01 UTC 2015

Modified Files:
src/usr.bin/gzip [netbsd-5]: Makefile gzip.1 gzip.c zuncompress.c

Log Message:
Pull up following revision(s) (requested by mrg in ticket #1951):
usr.bin/gzip/Makefile: patch
usr.bin/gzip/gzip.1: revisions 1.20-1.24
usr.bin/gzip/gzip.c: revisions 1.98-1.107
usr.bin/gzip/zuncompress.c: revisions 1.7-1.8
Sync gzip core with HEAD.


To generate a diff of this commit:
cvs rdiff -u -r1.12.4.1 -r1.12.4.2 src/usr.bin/gzip/Makefile
cvs rdiff -u -r1.19 -r1.19.4.1 src/usr.bin/gzip/gzip.1
cvs rdiff -u -r1.93.4.3 -r1.93.4.4 src/usr.bin/gzip/gzip.c
cvs rdiff -u -r1.6.28.1 -r1.6.28.2 src/usr.bin/gzip/zuncompress.c

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

Modified files:

Index: src/usr.bin/gzip/Makefile
diff -u src/usr.bin/gzip/Makefile:1.12.4.1 src/usr.bin/gzip/Makefile:1.12.4.2
--- src/usr.bin/gzip/Makefile:1.12.4.1	Sun Nov 17 17:59:55 2013
+++ src/usr.bin/gzip/Makefile	Sun Mar 15 21:15:01 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12.4.1 2013/11/17 17:59:55 bouyer Exp $
+#	$NetBSD: Makefile,v 1.12.4.2 2015/03/15 21:15:01 snj Exp $
 
 USE_FORT?= yes	# data-driven bugs?
 
@@ -32,3 +32,6 @@ LINKS+=		${BINDIR}/gzip ${BINDIR}/gunzip
 .if (defined(HAVE_GCC)  ${HAVE_GCC} == 4) || defined(HAVE_PCC)
 COPTS.gzip.c+=	-Wno-pointer-sign
 .endif
+
+# NetBSD-5 has no -lzma
+CPPFLAGS+=	-DNO_XZ_SUPPORT

Index: src/usr.bin/gzip/gzip.1
diff -u src/usr.bin/gzip/gzip.1:1.19 src/usr.bin/gzip/gzip.1:1.19.4.1
--- src/usr.bin/gzip/gzip.1:1.19	Thu May 29 14:51:27 2008
+++ src/usr.bin/gzip/gzip.1	Sun Mar 15 21:15:01 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: gzip.1,v 1.19 2008/05/29 14:51:27 mrg Exp $
+.\	$NetBSD: gzip.1,v 1.19.4.1 2015/03/15 21:15:01 snj Exp $
 .\
 .\ Copyright (c) 1997, 2003, 2004 Matthew R. Green
 .\ All rights reserved.
@@ -24,7 +24,7 @@
 .\ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\ SUCH DAMAGE.
 .\
-.Dd April 27, 2004
+.Dd January 13, 2015
 .Dt GZIP 1
 .Os
 .Sh NAME
@@ -138,8 +138,8 @@ embedded in the file.
 This option causes the stored filename in the input file to be used
 as the output file.
 .It Fl n , -no-name
-This option stops the filename from being stored in the output
-file.
+This option stops the filename and timestamp from being stored in
+the output file.
 .It Fl q , -quiet
 With this option, no warnings or errors are printed.
 .It Fl r , -recursive
@@ -171,6 +171,7 @@ Options on the command line will overrid
 .Sh SEE ALSO
 .Xr bzip2 1 ,
 .Xr compress 1 ,
+.Xr xz 1 ,
 .Xr fts 3 ,
 .Xr zlib 3
 .Sh HISTORY
@@ -190,9 +191,9 @@ program for
 This manual documents
 .Nx
 .Nm
-version 20040427.
+version 20150113.
 .Sh AUTHORS
 This implementation of
 .Nm
 was written by
-.An Matthew R. Green Aq m...@eterna.com.au .
+.An Matthew R. Green Aq Mt m...@eterna.com.au .

Index: src/usr.bin/gzip/gzip.c
diff -u src/usr.bin/gzip/gzip.c:1.93.4.3 src/usr.bin/gzip/gzip.c:1.93.4.4
--- src/usr.bin/gzip/gzip.c:1.93.4.3	Sun Nov  8 22:55:24 2009
+++ src/usr.bin/gzip/gzip.c	Sun Mar 15 21:15:01 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: gzip.c,v 1.93.4.3 2009/11/08 22:55:24 snj Exp $	*/
+/*	$NetBSD: gzip.c,v 1.93.4.4 2015/03/15 21:15:01 snj Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998, 2003, 2004, 2006 Matthew R. Green
@@ -30,7 +30,7 @@
 #ifndef lint
 __COPYRIGHT(@(#) Copyright (c) 1997, 1998, 2003, 2004, 2006\
  Matthew R. Green.  All rights reserved.);
-__RCSID($NetBSD: gzip.c,v 1.93.4.3 2009/11/08 22:55:24 snj Exp $);
+__RCSID($NetBSD: gzip.c,v 1.93.4.4 2015/03/15 21:15:01 snj Exp $);
 #endif /* not lint */
 
 /*
@@ -81,6 +81,9 @@ enum filetype {
 #ifndef NO_PACK_SUPPORT
 	FT_PACK,
 #endif
+#ifndef NO_XZ_SUPPORT
+	FT_XZ,
+#endif
 	FT_LAST,
 	FT_UNKNOWN
 };
@@ -101,6 +104,12 @@ enum filetype {
 #define PACK_MAGIC	\037\036
 #endif
 
+#ifndef NO_XZ_SUPPORT
+#include lzma.h
+#define XZ_SUFFIX	.xz
+#define XZ_MAGIC	\3757zXZ
+#endif
+
 #define GZ_SUFFIX	.gz
 
 #define BUFLEN		(64 * 1024)
@@ -141,6 +150,9 @@ static suffixes_t suffixes[] = {
 #ifndef NO_COMPRESS_SUPPORT
 	SUFFIX(Z_SUFFIX,	),
 #endif
+#ifndef NO_XZ_SUPPORT
+	SUFFIX(XZ_SUFFIX,	),
+#endif
 	SUFFIX(GZ_SUFFIX,	),	/* Overwritten by -S  */
 #endif /* SMALL */
 #undef SUFFIX
@@ -148,7 +160,7 @@ static suffixes_t suffixes[] = {
 #define NUM_SUFFIXES (sizeof suffixes / sizeof suffixes[0])
 #define SUFFIX_MAXLEN	30
 
-static	const char	gzip_version[] = NetBSD gzip 20091011;
+static	const char	gzip_version[] = NetBSD gzip 20150113;
 
 static	int	cflag;			/* stdout mode */
 static	int	dflag;			/* decompress mode */
@@ -157,6 +169,7 @@ static	int	numflag = 6;		/* gzip -1..-9 
 
 #ifndef SMALL
 static	int	fflag;			/* force mode */
+static	int	kflag;			/* don't delete input files */
 static	int	nflag;			/* don't save name/timestamp */
 static	int	Nflag;			/* don't restore name/timestamp */
 static	int	qflag;			/* quiet mode */
@@ -172,16 +185,17 @@ static	int	

CVS commit: [netbsd-5] src/include

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Feb 26 21:59:43 UTC 2015

Modified Files:
src/include [netbsd-5]: wchar.h

Log Message:
Apply patch (requested by christos in ticket #1943):
Properly expose wcsto{f,ld,ll,ull} and v{fw,sw,ws}scanf when
_POSIX_C_SOURCE = 200112L and _XOPEN_SOURCE = 600.


To generate a diff of this commit:
cvs rdiff -u -r1.27.8.1 -r1.27.8.2 src/include/wchar.h

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

Modified files:

Index: src/include/wchar.h
diff -u src/include/wchar.h:1.27.8.1 src/include/wchar.h:1.27.8.2
--- src/include/wchar.h:1.27.8.1	Fri May 20 19:18:37 2011
+++ src/include/wchar.h	Thu Feb 26 21:59:43 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: wchar.h,v 1.27.8.1 2011/05/20 19:18:37 bouyer Exp $	*/
+/*	$NetBSD: wchar.h,v 1.27.8.2 2015/02/26 21:59:43 snj Exp $	*/
 
 /*-
  * Copyright (c)1999 Citrus Project,
@@ -138,7 +138,8 @@ long int wcstol(const wchar_t * __restri
 double wcstod(const wchar_t * __restrict, wchar_t ** __restrict);
 
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0)  199901L || \
-defined(_NETBSD_SOURCE)
+defined(_NETBSD_SOURCE) || \
+(_POSIX_C_SOURCE - 0) = 200112L || (_XOPEN_SOURCE - 0) = 600
 float wcstof(const wchar_t * __restrict, wchar_t ** __restrict);
 long double wcstold(const wchar_t * __restrict, wchar_t ** __restrict);
 
@@ -174,7 +175,8 @@ int vwprintf(const wchar_t * __restrict,
 int wprintf(const wchar_t * __restrict, ...);
 int wscanf(const wchar_t * __restrict, ...);
 #if defined(_ISOC99_SOURCE) || (__STDC_VERSION__ - 0)  199901L || \
-defined(_NETBSD_SOURCE)
+defined(_NETBSD_SOURCE) || \
+	(_POSIX_C_SOURCE - 0) = 200112L || (_XOPEN_SOURCE - 0) = 600
 int vfwscanf(FILE * __restrict, const wchar_t * __restrict, _BSD_VA_LIST_);
 int vswscanf(const wchar_t * __restrict, const wchar_t * __restrict,
 _BSD_VA_LIST_);



CVS commit: [netbsd-5] src/doc

2015-02-26 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Feb 27 02:55:45 UTC 2015

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

Log Message:
1943


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.100 -r1.1.2.101 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.100 src/doc/CHANGES-5.3:1.1.2.101
--- src/doc/CHANGES-5.3:1.1.2.100	Mon Feb 23 09:43:18 2015
+++ src/doc/CHANGES-5.3	Fri Feb 27 02:55:45 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.100 2015/02/23 09:43:18 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.101 2015/02/27 02:55:45 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3743,3 +3743,10 @@ dist/bind/lib/dns/zone.c			patch
 	an untrusted replacement could cause named to crash with an assertion
 	failure.
 	[spz, ticket #1950]
+
+include/wchar.h	patch
+
+	Properly expose wcsto{f,ld,ll,ull} and v{fw,sw,ws}scanf when
+	_POSIX_C_SOURCE = 200112L and _XOPEN_SOURCE = 600.
+	[christos, ticket #1943]
+



CVS commit: [netbsd-5] src/doc

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:33:18 UTC 2015

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

Log Message:
Ticket 1950.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.98 -r1.1.2.99 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.98 src/doc/CHANGES-5.3:1.1.2.99
--- src/doc/CHANGES-5.3:1.1.2.98	Wed Feb 11 15:42:19 2015
+++ src/doc/CHANGES-5.3	Mon Feb 23 09:33:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.98 2015/02/11 15:42:19 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.99 2015/02/23 09:33:18 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3737,3 +3737,10 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
+Pull up following revision(s) (requested by spz in ticket #1950):
+dist/bind/lib/dns/zone.c			patch
+
+	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
+	an untrusted replacement could cause named to crash with an assertion
+	failure.
+	[spz, ticket #1950]



CVS commit: [netbsd-5] src/dist/bind/lib/dns

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:32:26 UTC 2015

Modified Files:
src/dist/bind/lib/dns [netbsd-5]: zone.c

Log Message:
Pull up following revision(s) (requested by spz in ticket #1950):
dist/bind/lib/dns/zone.cpatch

Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying
an untrusted replacement could cause named to crash with an assertion
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.5 src/dist/bind/lib/dns/zone.c

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

Modified files:

Index: src/dist/bind/lib/dns/zone.c
diff -u src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4 src/dist/bind/lib/dns/zone.c:1.1.1.6.4.5
--- src/dist/bind/lib/dns/zone.c:1.1.1.6.4.4	Wed Jul 25 11:58:51 2012
+++ src/dist/bind/lib/dns/zone.c	Mon Feb 23 09:32:26 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: zone.c,v 1.1.1.6.4.4 2012/07/25 11:58:51 jdc Exp $	*/
+/*	$NetBSD: zone.c,v 1.1.1.6.4.5 2015/02/23 09:32:26 msaitoh Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -7671,8 +7671,15 @@ keyfetch_done(isc_task_t *task, isc_even
 	 namebuf, tag);
 trustkey = ISC_TRUE;
 			}
+		} else {
+			/*
+			 * No previously known key, and the key is not
+			 * secure, so skip it.
+			 */
+			continue;
 		}
 
+
 		/* Delete old version */
 		if (deletekey || !newkey)
 			CHECK(update_one_rr(kfetch-db, ver, diff,
@@ -7717,7 +7724,7 @@ keyfetch_done(isc_task_t *task, isc_even
 			trust_key(zone, keyname, dnskey, mctx);
 		}
 
-		if (!deletekey)
+		if (secure  !deletekey)
 			set_refreshkeytimer(zone, keydata, now);
 	}
 



CVS commit: [netbsd-5] src/doc

2015-02-23 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Feb 23 09:43:18 UTC 2015

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

Log Message:
Remove extra line.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.99 -r1.1.2.100 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.99 src/doc/CHANGES-5.3:1.1.2.100
--- src/doc/CHANGES-5.3:1.1.2.99	Mon Feb 23 09:33:18 2015
+++ src/doc/CHANGES-5.3	Mon Feb 23 09:43:18 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.99 2015/02/23 09:33:18 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.100 2015/02/23 09:43:18 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3737,7 +3737,6 @@ sys/dev/usb/usbdi.c1.163 (via patch)
 	Clip xfer-actlen also in the !DIAGNOSTIC case.
 	[aymeric, ticket #1948]
 
-Pull up following revision(s) (requested by spz in ticket #1950):
 dist/bind/lib/dns/zone.c			patch
 
 	Patch for CVE-2015-1349: Revoking a managed trust anchor and supplying



CVS commit: [netbsd-5] src/sys/dev/usb

2015-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 11 15:39:33 UTC 2015

Modified Files:
src/sys/dev/usb [netbsd-5]: usbdi.c

Log Message:
Pull up following revision(s) (requested by aymeric in ticket #1948):
sys/dev/usb/usbdi.c: revision 1.163
clip xfer-actlen also in the !DIAGNOSTIC case


To generate a diff of this commit:
cvs rdiff -u -r1.124.4.2 -r1.124.4.3 src/sys/dev/usb/usbdi.c

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

Modified files:

Index: src/sys/dev/usb/usbdi.c
diff -u src/sys/dev/usb/usbdi.c:1.124.4.2 src/sys/dev/usb/usbdi.c:1.124.4.3
--- src/sys/dev/usb/usbdi.c:1.124.4.2	Wed Jan 27 20:56:45 2010
+++ src/sys/dev/usb/usbdi.c	Wed Feb 11 15:39:33 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.c,v 1.124.4.2 2010/01/27 20:56:45 sborrill Exp $	*/
+/*	$NetBSD: usbdi.c,v 1.124.4.3 2015/02/11 15:39:33 martin Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usbdi.c,v 1.28 1999/11/17 22:33:49 n_hibma Exp $	*/
 
 /*
@@ -32,7 +32,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: usbdi.c,v 1.124.4.2 2010/01/27 20:56:45 sborrill Exp $);
+__KERNEL_RCSID(0, $NetBSD: usbdi.c,v 1.124.4.3 2015/02/11 15:39:33 martin Exp $);
 
 #include opt_compat_netbsd.h
 
@@ -773,13 +773,13 @@ usb_transfer_complete(usbd_xfer_handle x
 
 	if (!(xfer-flags  USBD_NO_COPY)  xfer-actlen != 0 
 	usbd_xfer_isread(xfer)) {
-#ifdef DIAGNOSTIC
 		if (xfer-actlen  xfer-length) {
+#ifdef DIAGNOSTIC
 			printf(usb_transfer_complete: actlen  len %d  %d\n,
 			   xfer-actlen, xfer-length);
+#endif
 			xfer-actlen = xfer-length;
 		}
-#endif
 		memcpy(xfer-buffer, KERNADDR(dmap, 0), xfer-actlen);
 	}
 



CVS commit: [netbsd-5] src/doc

2015-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 11 15:33:42 UTC 2015

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

Log Message:
Ticket #1949


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.96 -r1.1.2.97 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.96 src/doc/CHANGES-5.3:1.1.2.97
--- src/doc/CHANGES-5.3:1.1.2.96	Wed Feb  4 04:47:17 2015
+++ src/doc/CHANGES-5.3	Wed Feb 11 15:33:42 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.96 2015/02/04 04:47:17 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.97 2015/02/11 15:33:42 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3725,3 +3725,10 @@ lib/libevent/buffer.cpatch
 	Fix CVE-2014-6272.
 	[spz, ticket #1947]
 
+external/mit/xorg-server/dist/xkb/xkb.c		1.2 (via patch)
+xfree/xc/programs/Xserver/xkb/xkb.c		1.2 (via patch)
+
+	Apply fixes for CVE-2015-0255:
+	Information leak in the XkbSetGeometry request of X servers.
+	[mrg, ticket #1949]
+



CVS commit: [netbsd-5] src/doc

2015-02-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Feb 11 15:42:19 UTC 2015

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

Log Message:
Ticket #1948


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.97 -r1.1.2.98 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.97 src/doc/CHANGES-5.3:1.1.2.98
--- src/doc/CHANGES-5.3:1.1.2.97	Wed Feb 11 15:33:42 2015
+++ src/doc/CHANGES-5.3	Wed Feb 11 15:42:19 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.97 2015/02/11 15:33:42 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.98 2015/02/11 15:42:19 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3732,3 +3732,8 @@ xfree/xc/programs/Xserver/xkb/xkb.c		1.2
 	Information leak in the XkbSetGeometry request of X servers.
 	[mrg, ticket #1949]
 
+sys/dev/usb/usbdi.c1.163 (via patch)
+
+	Clip xfer-actlen also in the !DIAGNOSTIC case.
+	[aymeric, ticket #1948]
+



CVS commit: [netbsd-5] src/lib/libevent

2015-02-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Feb  4 04:44:36 UTC 2015

Modified Files:
src/lib/libevent [netbsd-5]: buffer.c

Log Message:
Apply patch (requested by spz in ticket 1947):
Fix CVE-2014-6272.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.1 -r1.4.4.2 src/lib/libevent/buffer.c

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

Modified files:

Index: src/lib/libevent/buffer.c
diff -u src/lib/libevent/buffer.c:1.4.4.1 src/lib/libevent/buffer.c:1.4.4.2
--- src/lib/libevent/buffer.c:1.4.4.1	Tue Aug  4 18:32:08 2009
+++ src/lib/libevent/buffer.c	Wed Feb  4 04:44:36 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: buffer.c,v 1.4.4.1 2009/08/04 18:32:08 snj Exp $	*/
+/*	$NetBSD: buffer.c,v 1.4.4.2 2015/02/04 04:44:36 snj Exp $	*/
 /*
  * Copyright (c) 2002, 2003 Niels Provos pro...@citi.umich.edu
  * All rights reserved.
@@ -120,7 +120,8 @@ evbuffer_add_vprintf(struct evbuffer *bu
 	va_list aq;
 
 	/* make sure that at least some space is available */
-	evbuffer_expand(buf, 64);
+	if (evbuffer_expand(buf, 64)  0)
+		return (-1);
 	for (;;) {
 		size_t used = buf-misalign + buf-off;
 		buffer = (char *)buf-buffer + buf-off;
@@ -233,31 +234,47 @@ evbuffer_align(struct evbuffer *buf)
 	buf-misalign = 0;
 }
 
+#ifndef SIZE_MAX
+#define SIZE_MAX ((size_t)-1)
+#endif
+
 /* Expands the available space in the event buffer to at least datlen */
 
 int
 evbuffer_expand(struct evbuffer *buf, size_t datlen)
 {
-	size_t need = buf-misalign + buf-off + datlen;
+	size_t used = buf-misalign + buf-off;
+
+	assert(buf-totallen = used);
 
 	/* If we can fit all the data, then we don't have to do anything */
-	if (buf-totallen = need)
+	if (buf-totallen - used = datlen)
 		return (0);
+	/* If we would need to overflow to fit this much data, we can't
+	 * do anything. */
+	if (datlen  SIZE_MAX - buf-off)
+		return (-1);
 
 	/*
 	 * If the misalignment fulfills our data needs, we just force an
 	 * alignment to happen.  Afterwards, we have enough space.
 	 */
-	if (buf-misalign = datlen) {
+	if (buf-totallen - buf-off = datlen) {
 		evbuffer_align(buf);
 	} else {
 		void *newbuf;
 		size_t length = buf-totallen;
+		size_t need = buf-off + datlen;
 
 		if (length  256)
 			length = 256;
-		while (length  need)
-			length = 1;
+		if (need  SIZE_MAX / 2) {
+			while (length  need) {
+length = 1;
+			}
+		} else {
+			length = need;
+		}
 
 		if (buf-orig_buffer != buf-buffer)
 			evbuffer_align(buf);
@@ -274,10 +291,10 @@ evbuffer_expand(struct evbuffer *buf, si
 int
 evbuffer_add(struct evbuffer *buf, const void *data, size_t datlen)
 {
-	size_t need = buf-misalign + buf-off + datlen;
+	size_t used = buf-misalign + buf-off;
 	size_t oldoff = buf-off;
 
-	if (buf-totallen  need) {
+	if (buf-totallen - used  datlen) {
 		if (evbuffer_expand(buf, datlen) == -1)
 			return (-1);
 	}



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

2015-02-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Feb  4 04:31:41 UTC 2015

Modified Files:
src/sys/dev [netbsd-5]: vnd.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1946):
sys/dev/vnd.c: revision 1.240, 1.241 via patch
As discussed in
http://mail-index.netbsd.org/tech-kern/2015/01/24/msg018339.html
don't bump v_numoutput if we need to vn_lock() the vnode before queuing
the corresponding I/O, because this may deadlock with genfs_do_putpages()
when called with the vnode locked (as can happen with fsync(2)).
Instead bump is just before the last VOP_STRATEGY(), or before calling
nestiobuf_done().
Thanks to Taylor R Campbell for review.
--
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.187.4.6 -r1.187.4.7 src/sys/dev/vnd.c

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

Modified files:

Index: src/sys/dev/vnd.c
diff -u src/sys/dev/vnd.c:1.187.4.6 src/sys/dev/vnd.c:1.187.4.7
--- src/sys/dev/vnd.c:1.187.4.6	Wed Aug 22 20:29:20 2012
+++ src/sys/dev/vnd.c	Wed Feb  4 04:31:41 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnd.c,v 1.187.4.6 2012/08/22 20:29:20 bouyer Exp $	*/
+/*	$NetBSD: vnd.c,v 1.187.4.7 2015/02/04 04:31:41 snj Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -130,7 +130,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.187.4.6 2012/08/22 20:29:20 bouyer Exp $);
+__KERNEL_RCSID(0, $NetBSD: vnd.c,v 1.187.4.7 2015/02/04 04:31:41 snj Exp $);
 
 #if defined(_KERNEL_OPT)
 #include fs_nfs.h
@@ -794,16 +794,10 @@ handle_with_strategy(struct vnd_softc *v
 	size_t resid, sz;
 	off_t bn, offset;
 	struct vnode *vp;
+	struct buf *nbp = NULL;
 
 	flags = obp-b_flags;
 
-	if (!(flags  B_READ)) {
-		vp = bp-b_vp;
-		mutex_enter(vp-v_interlock);
-		vp-v_numoutput++;
-		mutex_exit(vp-v_interlock);
-	}
-
 	/* convert to a byte offset within the file. */
 	bn = obp-b_rawblkno * vnd-sc_dkdev.dk_label-d_secsize;
 
@@ -819,9 +813,8 @@ handle_with_strategy(struct vnd_softc *v
 	 */
 	error = 0;
 	bp-b_resid = bp-b_bcount;
-	for (offset = 0, resid = bp-b_resid; resid;
+	for (offset = 0, resid = bp-b_resid; /* true */;
 	resid -= sz, offset += sz) {
-		struct buf *nbp;
 		daddr_t nbn;
 		int off, nra;
 
@@ -874,10 +867,34 @@ handle_with_strategy(struct vnd_softc *v
 			nbp-vb_buf.b_flags, nbp-vb_buf.b_data,
 			nbp-vb_buf.b_bcount);
 #endif
+		if (resid == sz) {
+			break;
+		}
 		VOP_STRATEGY(vp, nbp);
 		bn += sz;
 	}
-	nestiobuf_done(bp, skipped, error);
+	if (!(flags  B_READ)) {
+		struct vnode *w_vp;
+		/*
+		 * this is the last nested buf, account for
+		 * the parent buf write too.
+		 * This has to be done last, so that
+		 * fsync won't wait for this write which
+		 * has no chance to complete before all nested bufs
+		 * have been queued. But it has to be done
+		 * before the last VOP_STRATEGY() 
+		 * or the call to nestiobuf_done().
+		 */
+		w_vp = bp-b_vp;
+		mutex_enter(w_vp-v_interlock);
+		w_vp-v_numoutput++;
+		mutex_exit(w_vp-v_interlock);
+	}
+	KASSERT(skipped != 0 || nbp != NULL);
+	if (skipped) 
+		nestiobuf_done(bp, skipped, error);
+	else 
+		VOP_STRATEGY(vp, nbp);
 }
 
 static void



CVS commit: [netbsd-5] src/doc

2015-02-03 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Feb  4 04:47:17 UTC 2015

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

Log Message:
tickets 194[67]


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.95 -r1.1.2.96 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.95 src/doc/CHANGES-5.3:1.1.2.96
--- src/doc/CHANGES-5.3:1.1.2.95	Mon Jan 26 13:35:41 2015
+++ src/doc/CHANGES-5.3	Wed Feb  4 04:47:17 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.95 2015/01/26 13:35:41 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.96 2015/02/04 04:47:17 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3714,3 +3714,14 @@ sys/arch/x86/pci/ichlpcib.c			1.46 (via 
 	bus_space_map() directly.
 	[msaitoh, ticket #1944]
 
+sys/dev/vnd.c	1.240, 1.241 via patch
+
+	Fix a deadlock when a write occurs on the vnd while the attached
+	file is being fsync(2)ed.
+	[bouyer, ticket #1946]
+
+lib/libevent/buffer.cpatch
+
+	Fix CVE-2014-6272.
+	[spz, ticket #1947]
+



CVS commit: [netbsd-5] src/sys/arch/x86/pci

2015-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 26 13:34:03 UTC 2015

Modified Files:
src/sys/arch/x86/pci [netbsd-5]: ichlpcib.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1944):
sys/arch/x86/pci/ichlpcib.c: revision 1.46

The PMBASE and GPIOBASE registers are not compltible with the PCI spec
and the map sizes are fixed to 128bytes. The pci_mapreg_submap()
function has a code to check the range of the BAR. The
PCI_MAPREG_IO_SIZE() macro returns lower than 128bytes on some
machines. It makes impossible to use pci_mapreg_submap(). Use
pci_conf_read() and bus_space_map() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.3 -r1.14.4.4 src/sys/arch/x86/pci/ichlpcib.c

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

Modified files:

Index: src/sys/arch/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.14.4.3 src/sys/arch/x86/pci/ichlpcib.c:1.14.4.4
--- src/sys/arch/x86/pci/ichlpcib.c:1.14.4.3	Fri Jan 23 16:24:55 2015
+++ src/sys/arch/x86/pci/ichlpcib.c	Mon Jan 26 13:34:03 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.14.4.3 2015/01/23 16:24:55 martin Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.14.4.4 2015/01/26 13:34:03 martin Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.14.4.3 2015/01/23 16:24:55 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.14.4.4 2015/01/26 13:34:03 martin Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -184,6 +184,7 @@ lpcibattach(device_t parent, device_t se
 	struct pci_attach_args *pa = aux;
 	struct lpcib_softc *sc = device_private(self);
 	struct lpcib_device *lpcib_dev;
+	pcireg_t pmbase;
 
 	sc-sc_pa = *pa;
 
@@ -205,11 +206,16 @@ lpcibattach(device_t parent, device_t se
 	 *
 	 * The PMBASE register is alike PCI BAR but not completely compatible
 	 * with it. The PMBASE define the base address and the type but
-	 * not describe the size.
+	 * not describe the size. The value of the register may be lower
+	 * than LPCIB_PCI_PM_SIZE. It makes impossible to use
+	 * pci_mapreg_submap() because the function does range check.
 	 */
-	if (pci_mapreg_submap(pa, LPCIB_PCI_PMBASE, PCI_MAPREG_TYPE_IO, 0,
-		LPCIB_PCI_PM_SIZE, 0, sc-sc_iot, sc-sc_ioh, NULL, NULL)) {
-		aprint_error_dev(self, can't map power management i/o space\n);
+	sc-sc_iot = pa-pa_iot;
+	pmbase = pci_conf_read(pa-pa_pc, pa-pa_tag, LPCIB_PCI_PMBASE);
+	if (bus_space_map(sc-sc_iot, PCI_MAPREG_IO_ADDR(pmbase),
+	LPCIB_PCI_PM_SIZE, 0, sc-sc_ioh) != 0) {
+		aprint_error_dev(self,
+		can't map power management i/o space\n);
 		return;
 	}
 



CVS commit: [netbsd-5] src

2015-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 26 10:10:20 UTC 2015

Modified Files:
src/crypto/dist/openssl/apps [netbsd-5]: s_client.c s_server.c speed.c
src/crypto/dist/openssl/crypto [netbsd-5]: Makefile
constant_time_locl.h cversion.c
src/crypto/dist/openssl/crypto/asn1 [netbsd-5]: a_bitstr.c a_type.c
a_verify.c asn1.h asn1_err.c tasn_dec.c x_algor.c
src/crypto/dist/openssl/crypto/bio [netbsd-5]: bio.h bss_dgram.c
src/crypto/dist/openssl/crypto/bn [netbsd-5]: bn_asm.c bntest.c
src/crypto/dist/openssl/crypto/bn/asm [netbsd-5]: mips3.s x86_64-gcc.c
src/crypto/dist/openssl/crypto/dsa [netbsd-5]: dsa_vrf.c
src/crypto/dist/openssl/crypto/ec [netbsd-5]: ec_mult.c ec_pmeth.c
src/crypto/dist/openssl/crypto/ecdsa [netbsd-5]: ecs_vrf.c
src/crypto/dist/openssl/crypto/evp [netbsd-5]: Makefile evp_enc.c
src/crypto/dist/openssl/crypto/objects [netbsd-5]: obj_xref.h
objxref.pl
src/crypto/dist/openssl/crypto/ts [netbsd-5]: ts_rsp_sign.c
src/crypto/dist/openssl/crypto/x509 [netbsd-5]: x509.h x509_vpm.c
x_all.c
src/crypto/dist/openssl/ssl [netbsd-5]: d1_both.c d1_clnt.c d1_enc.c
d1_lib.c d1_pkt.c d1_srvr.c dtls1.h s23_srvr.c s2_enc.c s2_pkt.c
s2_srvr.c s3_both.c s3_clnt.c s3_enc.c s3_lib.c s3_pkt.c s3_srvr.c
ssl.h ssl_cert.c ssl_lib.c ssl_locl.h
src/crypto/dist/openssl/util [netbsd-5]: libeay.num mk1mf.pl
src/distrib/sets/lists/base [netbsd-5]: md.amd64 md.sparc64 shl.mi
src/lib/libcrypto [netbsd-5]: shlib_version
src/lib/libssl [netbsd-5]: shlib_version

Log Message:
Change the following, requested by spz in ticket #1945:
crypto/dist/openssl/apps/s_client.c  patch
crypto/dist/openssl/apps/s_server.c  patch
crypto/dist/openssl/apps/speed.c patch
crypto/dist/openssl/crypto/Makefile  patch
crypto/dist/openssl/crypto/constant_time_locl.h  patch
crypto/dist/openssl/crypto/cversion.cpatch
crypto/dist/openssl/crypto/asn1/a_bitstr.c   patch
crypto/dist/openssl/crypto/asn1/a_type.c patch
crypto/dist/openssl/crypto/asn1/a_verify.c   patch
crypto/dist/openssl/crypto/asn1/asn1.h   patch
crypto/dist/openssl/crypto/asn1/asn1_err.c   patch
crypto/dist/openssl/crypto/asn1/tasn_dec.c   patch
crypto/dist/openssl/crypto/asn1/x_algor.cpatch
crypto/dist/openssl/crypto/bio/bio.h patch
crypto/dist/openssl/crypto/bio/bss_dgram.c   patch
crypto/dist/openssl/crypto/bn/bn_asm.c   patch
crypto/dist/openssl/crypto/bn/bntest.c   patch
crypto/dist/openssl/crypto/bn/asm/mips3.spatch
crypto/dist/openssl/crypto/bn/asm/x86_64-gcc.c   patch
crypto/dist/openssl/crypto/dsa/dsa_vrf.c patch
crypto/dist/openssl/crypto/ec/ec_mult.c  patch
crypto/dist/openssl/crypto/ec/ec_pmeth.c patch
crypto/dist/openssl/crypto/ecdsa/ecs_vrf.c   patch
crypto/dist/openssl/crypto/evp/Makefile  patch
crypto/dist/openssl/crypto/evp/evp_enc.c patch
crypto/dist/openssl/crypto/objects/obj_xref.hpatch
crypto/dist/openssl/crypto/objects/objxref.plpatch
crypto/dist/openssl/crypto/ts/ts_rsp_sign.c  patch
crypto/dist/openssl/crypto/x509/x509.h   patch
crypto/dist/openssl/crypto/x509/x509_vpm.c   patch
crypto/dist/openssl/crypto/x509/x_all.c  patch
crypto/dist/openssl/ssl/d1_both.cpatch
crypto/dist/openssl/ssl/d1_clnt.cpatch
crypto/dist/openssl/ssl/d1_enc.c patch
crypto/dist/openssl/ssl/d1_lib.c patch
crypto/dist/openssl/ssl/d1_pkt.c patch
crypto/dist/openssl/ssl/d1_srvr.cpatch
crypto/dist/openssl/ssl/dtls1.h  patch
crypto/dist/openssl/ssl/s23_srvr.c   patch
crypto/dist/openssl/ssl/s2_enc.c patch
crypto/dist/openssl/ssl/s2_pkt.c patch
crypto/dist/openssl/ssl/s2_srvr.cpatch
crypto/dist/openssl/ssl/s3_both.c

CVS commit: [netbsd-5] src/doc

2015-01-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Jan 26 10:11:20 UTC 2015

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

Log Message:
Ticket #1945


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.93 -r1.1.2.94 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.93 src/doc/CHANGES-5.3:1.1.2.94
--- src/doc/CHANGES-5.3:1.1.2.93	Fri Jan 23 16:27:46 2015
+++ src/doc/CHANGES-5.3	Mon Jan 26 10:11:20 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.93 2015/01/23 16:27:46 martin Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.94 2015/01/26 10:11:20 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3630,3 +3630,75 @@ sys/dev/pci/pci_map.c			1.32 via patch
 	[msaitoh, ticket #1942]
 
 
+crypto/dist/openssl/apps/s_client.c   patch
+crypto/dist/openssl/apps/s_server.c   patch
+crypto/dist/openssl/apps/speed.c  patch
+crypto/dist/openssl/crypto/Makefile   patch
+crypto/dist/openssl/crypto/constant_time_locl.h   patch
+crypto/dist/openssl/crypto/cversion.c patch
+crypto/dist/openssl/crypto/asn1/a_bitstr.cpatch
+crypto/dist/openssl/crypto/asn1/a_type.c  patch
+crypto/dist/openssl/crypto/asn1/a_verify.cpatch
+crypto/dist/openssl/crypto/asn1/asn1.hpatch
+crypto/dist/openssl/crypto/asn1/asn1_err.cpatch
+crypto/dist/openssl/crypto/asn1/tasn_dec.cpatch
+crypto/dist/openssl/crypto/asn1/x_algor.c patch
+crypto/dist/openssl/crypto/bio/bio.h  patch
+crypto/dist/openssl/crypto/bio/bss_dgram.cpatch
+crypto/dist/openssl/crypto/bn/bn_asm.cpatch
+crypto/dist/openssl/crypto/bn/bntest.cpatch
+crypto/dist/openssl/crypto/bn/asm/mips3.s patch
+crypto/dist/openssl/crypto/bn/asm/x86_64-gcc.cpatch
+crypto/dist/openssl/crypto/dsa/dsa_vrf.c  patch
+crypto/dist/openssl/crypto/ec/ec_mult.c   patch
+crypto/dist/openssl/crypto/ec/ec_pmeth.c  patch
+crypto/dist/openssl/crypto/ecdsa/ecs_vrf.cpatch
+crypto/dist/openssl/crypto/evp/Makefile   patch
+crypto/dist/openssl/crypto/evp/evp_enc.c  patch
+crypto/dist/openssl/crypto/objects/obj_xref.h patch
+crypto/dist/openssl/crypto/objects/objxref.pl patch
+crypto/dist/openssl/crypto/ts/ts_rsp_sign.c   patch
+crypto/dist/openssl/crypto/x509/x509.hpatch
+crypto/dist/openssl/crypto/x509/x509_vpm.cpatch
+crypto/dist/openssl/crypto/x509/x_all.c   patch
+crypto/dist/openssl/ssl/d1_both.c patch
+crypto/dist/openssl/ssl/d1_clnt.c patch
+crypto/dist/openssl/ssl/d1_enc.c  patch
+crypto/dist/openssl/ssl/d1_lib.c  patch
+crypto/dist/openssl/ssl/d1_pkt.c  patch
+crypto/dist/openssl/ssl/d1_srvr.c patch
+crypto/dist/openssl/ssl/dtls1.h   patch
+crypto/dist/openssl/ssl/s23_srvr.cpatch
+crypto/dist/openssl/ssl/s2_enc.c  patch
+crypto/dist/openssl/ssl/s2_pkt.c  patch
+crypto/dist/openssl/ssl/s2_srvr.c patch
+crypto/dist/openssl/ssl/s3_both.c patch
+crypto/dist/openssl/ssl/s3_clnt.c patch
+crypto/dist/openssl/ssl/s3_enc.c  patch
+crypto/dist/openssl/ssl/s3_lib.c  patch
+crypto/dist/openssl/ssl/s3_pkt.c  patch
+crypto/dist/openssl/ssl/s3_srvr.c patch
+crypto/dist/openssl/ssl/ssl.h patch
+crypto/dist/openssl/ssl/ssl_cert.cpatch
+crypto/dist/openssl/ssl/ssl_lib.c patch
+crypto/dist/openssl/ssl/ssl_locl.hpatch
+crypto/dist/openssl/util/libeay.num   patch
+crypto/dist/openssl/util/mk1mf.pl patch
+crypto/dist/openssl/util/mkbuildinf.plpatch
+distrib/sets/lists/base/md.amd64   

CVS commit: [netbsd-5] src/sbin/brconfig

2015-01-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 23 16:01:05 UTC 2015

Modified Files:
src/sbin/brconfig [netbsd-5]: brconfig.8

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1941):
sbin/brconfig/brconfig.8: revision 1.18
Add missing addr and static commands.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.20.1 src/sbin/brconfig/brconfig.8

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

Modified files:

Index: src/sbin/brconfig/brconfig.8
diff -u src/sbin/brconfig/brconfig.8:1.17 src/sbin/brconfig/brconfig.8:1.17.20.1
--- src/sbin/brconfig/brconfig.8:1.17	Mon Jan  8 07:22:12 2007
+++ src/sbin/brconfig/brconfig.8	Fri Jan 23 16:01:05 2015
@@ -1,4 +1,4 @@
-.\	$NetBSD: brconfig.8,v 1.17 2007/01/08 07:22:12 wiz Exp $
+.\	$NetBSD: brconfig.8,v 1.17.20.1 2015/01/23 16:01:05 martin Exp $
 .\
 .\ Copyright 2001 Wasabi Systems, Inc.
 .\ All rights reserved.
@@ -33,7 +33,7 @@
 .\ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\ POSSIBILITY OF SUCH DAMAGE.
 .\
-.Dd January 7, 2007
+.Dd January 5, 2015
 .Dt BRCONFIG 8
 .Os
 .Sh NAME
@@ -102,6 +102,8 @@ Remove the interface named by
 from the bridge.
 Promiscuous mode is disabled on the interface when
 it is removed from the bridge.
+.It Cm addr
+Display the addresses that have been learned by the bridge.
 .It Cm maxaddr Ar size
 Set the size of the bridge address cache to
 .Ar size .
@@ -166,6 +168,11 @@ This is the default for all interfaces a
 Clear the
 .Dq learning
 attribute on a member interface.
+.It Cm static Ar interface address
+Add a static entry into the address cache pointing to
+.Ar interface .
+Static entries are never aged out of the cache or replaced, even if the address
+is seen on a different interface.
 .It Cm stp Ar interface
 Enable Spanning Tree protocol on
 .Ar interface .



CVS commit: [netbsd-5] src/sys

2015-01-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 23 16:24:55 UTC 2015

Modified Files:
src/sys/arch/x86/pci [netbsd-5]: ichlpcib.c
src/sys/dev/ic [netbsd-5]: i82801lpcreg.h
src/sys/dev/pci [netbsd-5]: pci_map.c

Log Message:
Pull up the following changes, requested by msaitoh in ticket #1942:

sys/arch/x86/pci/ichlpcib.c 1.40, 1.45 via patch
sys/dev/ic/i82801lpcreg.h   1.12
sys/dev/pci/pci_map.c   1.32 via patch

- Fix a bug that ichlpcib(4) maps I/O area incorrectly. It might also
  fixes ACPI related problem described in PR#48960:
  - The LPCIB_PCI_PMBASE and LPCIB_PCI_GPIO register are alike PCI BAR
but not completely compatible with it. It's ok because the
registers' addresses are out of BAR0-BAR5(0x10-0x24) and are
located in the device-dependent header. The PMBASE and GPIO
registers define the base address and the type but not describe
the size. The size is fixed to 128bytes. So use
pci_mapreg_submap().
  - Fix the calculation of the map size in pci_mapreg_submap().
- Use '\n' at the end of aprint_error_dev() format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.14.4.2 -r1.14.4.3 src/sys/arch/x86/pci/ichlpcib.c
cvs rdiff -u -r1.8 -r1.8.10.1 src/sys/dev/ic/i82801lpcreg.h
cvs rdiff -u -r1.24 -r1.24.4.1 src/sys/dev/pci/pci_map.c

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

Modified files:

Index: src/sys/arch/x86/pci/ichlpcib.c
diff -u src/sys/arch/x86/pci/ichlpcib.c:1.14.4.2 src/sys/arch/x86/pci/ichlpcib.c:1.14.4.3
--- src/sys/arch/x86/pci/ichlpcib.c:1.14.4.2	Sun Aug 16 00:16:28 2009
+++ src/sys/arch/x86/pci/ichlpcib.c	Fri Jan 23 16:24:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichlpcib.c,v 1.14.4.2 2009/08/16 00:16:28 snj Exp $	*/
+/*	$NetBSD: ichlpcib.c,v 1.14.4.3 2015/01/23 16:24:55 martin Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.14.4.2 2009/08/16 00:16:28 snj Exp $);
+__KERNEL_RCSID(0, $NetBSD: ichlpcib.c,v 1.14.4.3 2015/01/23 16:24:55 martin Exp $);
 
 #include sys/types.h
 #include sys/param.h
@@ -202,10 +202,14 @@ lpcibattach(device_t parent, device_t se
 	 * Part of our I/O registers are used as ACPI PM regs.
 	 * Since our ACPI subsystem accesses the I/O space directly so far,
 	 * we do not have to bother bus_space I/O map confliction.
+	 *
+	 * The PMBASE register is alike PCI BAR but not completely compatible
+	 * with it. The PMBASE define the base address and the type but
+	 * not describe the size.
 	 */
-	if (pci_mapreg_map(pa, LPCIB_PCI_PMBASE, PCI_MAPREG_TYPE_IO, 0,
-			   sc-sc_iot, sc-sc_ioh, NULL, NULL)) {
-		aprint_error_dev(self, can't map power management i/o space);
+	if (pci_mapreg_submap(pa, LPCIB_PCI_PMBASE, PCI_MAPREG_TYPE_IO, 0,
+		LPCIB_PCI_PM_SIZE, 0, sc-sc_iot, sc-sc_ioh, NULL, NULL)) {
+		aprint_error_dev(self, can't map power management i/o space\n);
 		return;
 	}
 
@@ -221,14 +225,14 @@ lpcibattach(device_t parent, device_t se
 		rcba = pci_conf_read(sc-sc_pcib.sc_pc, sc-sc_pcib.sc_tag,
 		 LPCIB_RCBA);
 		if ((rcba  LPCIB_RCBA_EN) == 0) {
-			aprint_error_dev(self, RCBA is not enabled);
+			aprint_error_dev(self, RCBA is not enabled\n);
 			return;
 		}
 		rcba = ~LPCIB_RCBA_EN;
 
 		if (bus_space_map(sc-sc_rcbat, rcba, LPCIB_RCBA_SIZE, 0,
   sc-sc_rcbah)) {
-			aprint_error_dev(self, RCBA could not be mapped);
+			aprint_error_dev(self, RCBA could not be mapped\n);
 			return;
 		}
 	}

Index: src/sys/dev/ic/i82801lpcreg.h
diff -u src/sys/dev/ic/i82801lpcreg.h:1.8 src/sys/dev/ic/i82801lpcreg.h:1.8.10.1
--- src/sys/dev/ic/i82801lpcreg.h:1.8	Mon Apr 28 20:23:50 2008
+++ src/sys/dev/ic/i82801lpcreg.h	Fri Jan 23 16:24:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: i82801lpcreg.h,v 1.8 2008/04/28 20:23:50 martin Exp $	*/
+/*	$NetBSD: i82801lpcreg.h,v 1.8.10.1 2015/01/23 16:24:55 martin Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -40,11 +40,13 @@
  * PCI configuration registers
  */
 #define LPCIB_PCI_PMBASE	0x40
+#define LPCIB_PCI_PM_SIZE	0x0080
 #define LPCIB_PCI_ACPI_CNTL	0x44
 # define LPCIB_PCI_ACPI_CNTL_EN	(1  4)
 #define LPCIB_PCI_BIOS_CNTL	0x4e
 #define LPCIB_PCI_TCO_CNTL	0x54
 #define LPCIB_PCI_GPIO_BASE	0x58
+#define LPCIB_PCI_GPIO_SIZE	0x0080
 #define LPCIB_PCI_GPIO_CNTL	0x5c
 #define LPCIB_PCI_PIRQA_ROUT	0x60
 #define LPCIB_PCI_PIRQB_ROUT	0x61

Index: src/sys/dev/pci/pci_map.c
diff -u src/sys/dev/pci/pci_map.c:1.24 src/sys/dev/pci/pci_map.c:1.24.4.1
--- src/sys/dev/pci/pci_map.c:1.24	Tue Jul 22 04:52:19 2008
+++ src/sys/dev/pci/pci_map.c	Fri Jan 23 16:24:55 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_map.c,v 1.24 2008/07/22 04:52:19 bjs Exp $	*/
+/*	$NetBSD: pci_map.c,v 1.24.4.1 2015/01/23 16:24:55 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 

CVS commit: [netbsd-5] src/doc

2015-01-23 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Jan 23 16:27:47 UTC 2015

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

Log Message:
Tickets #1941 and #1942


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.92 -r1.1.2.93 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.92 src/doc/CHANGES-5.3:1.1.2.93
--- src/doc/CHANGES-5.3:1.1.2.92	Wed Jan  7 19:23:14 2015
+++ src/doc/CHANGES-5.3	Fri Jan 23 16:27:46 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.92 2015/01/07 19:23:14 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.93 2015/01/23 16:27:46 martin Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3606,3 +3606,27 @@ etc/rc.d/ntpd	1.15
 	New ntpd wants to be able to translate ntp into a port number after
 	chroot, so give it its own small copy of /etc/services in the chroot
 	[he, ticket #1940]
+
+sbin/brconfig/brconfig.8			1.18
+
+	Add missing addr and static commands.
+	[msaitoh, ticket #1941]
+
+sys/arch/x86/pci/ichlpcib.c		1.40, 1.45 via patch
+sys/dev/ic/i82801lpcreg.h		1.12
+sys/dev/pci/pci_map.c			1.32 via patch
+
+	- Fix a bug that ichlpcib(4) maps I/O area incorrectly. It might also
+	  fixes ACPI related problem described in PR#48960:
+	  - The LPCIB_PCI_PMBASE and LPCIB_PCI_GPIO register are alike PCI BAR
+	but not completely compatible with it. It's ok because the
+	registers' addresses are out of BAR0-BAR5(0x10-0x24) and are
+	located in the device-dependent header. The PMBASE and GPIO
+	registers define the base address and the type but not describe
+	the size. The size is fixed to 128bytes. So use
+	pci_mapreg_submap().
+	  - Fix the calculation of the map size in pci_mapreg_submap().
+	- Use '\n' at the end of aprint_error_dev() format strings.
+	[msaitoh, ticket #1942]
+
+



CVS commit: [netbsd-5] src/sys/arch/arm/arm

2015-01-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  7 13:03:42 UTC 2015

Modified Files:
src/sys/arch/arm/arm [netbsd-5]: disassem.c

Log Message:
Pull up following revision(s) (requested by hick in ticket #1939):
sys/arch/arm/arm/disassem.c: revision 1.26
The mode synonyms are different for stm and ldm - handle this.
PR/49520: arm/disassem.c doesn't use proper address mode name for loads


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.10.1 src/sys/arch/arm/arm/disassem.c

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

Modified files:

Index: src/sys/arch/arm/arm/disassem.c
diff -u src/sys/arch/arm/arm/disassem.c:1.18 src/sys/arch/arm/arm/disassem.c:1.18.10.1
--- src/sys/arch/arm/arm/disassem.c:1.18	Sun Apr 27 18:58:43 2008
+++ src/sys/arch/arm/arm/disassem.c	Wed Jan  7 13:03:42 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: disassem.c,v 1.18 2008/04/27 18:58:43 matt Exp $	*/
+/*	$NetBSD: disassem.c,v 1.18.10.1 2015/01/07 13:03:42 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1996 Mark Brinicombe.
@@ -49,7 +49,7 @@
 
 #include sys/param.h
 
-__KERNEL_RCSID(0, $NetBSD: disassem.c,v 1.18 2008/04/27 18:58:43 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: disassem.c,v 1.18.10.1 2015/01/07 13:03:42 msaitoh Exp $);
 
 #include sys/systm.h
 #include arch/arm/arm/disassem.h
@@ -233,7 +233,8 @@ static char const insn_block_transfers[]
 };
 
 static char const insn_stack_block_transfers[][4] = {
-	ed, ea, fd, fa
+	ed, ea, fd, fa,	/* stm */
+	fa, fd, ea, ed,	/* ldm */
 };
 
 static char const op_shifts[][4] = {
@@ -255,7 +256,7 @@ static char const insn_fpaconstants[][8]
 
 #define insn_condition(x)	arm32_insn_conditions[(x  28)  0x0f]
 #define insn_blktrans(x)	insn_block_transfers[(x  23)  3]
-#define insn_stkblktrans(x)	insn_stack_block_transfers[(x  23)  3]
+#define insn_stkblktrans(x)	insn_stack_block_transfers[((x  (20 - 2))  4)|((x  23)  3)]
 #define op2_shift(x)		op_shifts[(x  5)  3]
 #define insn_fparnd(x)		insn_fpa_rounding[(x  5)  0x03]
 #define insn_fpaprec(x)		insn_fpa_precision[(((x  18)  2)|(x  7))  1]



CVS commit: [netbsd-5] src/doc

2015-01-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  7 18:43:14 UTC 2015

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

Log Message:
Ticket 1938-1940.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.90 -r1.1.2.91 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.90 src/doc/CHANGES-5.3:1.1.2.91
--- src/doc/CHANGES-5.3:1.1.2.90	Mon Jan  5 23:33:10 2015
+++ src/doc/CHANGES-5.3	Wed Jan  7 18:43:14 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.90 2015/01/05 23:33:10 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.91 2015/01/07 18:43:14 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1302,3 +1302,2307 @@ usr.sbin/bind/include/isc/platform.h		1.
 	setup can cause BIND to issue an unlimited sequence of queries to
 	follow a delegation.
 	[spz, ticket #1937]
+
+dist/ntp/COPYRIGHT		delete
+dist/ntp/ChangeLog		delete
+dist/ntp/CommitLog		delete
+dist/ntp/CommitLog-4.1.0	delete
+dist/ntp/ElectricFence/CHANGES	delete
+dist/ntp/ElectricFence/COPYING	delete
+dist/ntp/ElectricFence/Makefile.amdelete
+dist/ntp/ElectricFence/Makefile.indelete
+dist/ntp/ElectricFence/README	delete
+dist/ntp/ElectricFence/efence.c	delete
+dist/ntp/ElectricFence/efence.h	delete
+dist/ntp/ElectricFence/eftest.c	delete
+dist/ntp/ElectricFence/libefence.3delete
+dist/ntp/ElectricFence/page.c	delete
+dist/ntp/ElectricFence/print.c	delete
+dist/ntp/ElectricFence/tstheap.cdelete
+dist/ntp/INSTALL		delete
+dist/ntp/Makefile.am		delete
+dist/ntp/Makefile.in		delete
+dist/ntp/NEWS			delete
+dist/ntp/NOTES.y2kfixes		delete
+dist/ntp/README			delete
+dist/ntp/README.bk		delete
+dist/ntp/README.hackers		delete
+dist/ntp/README.patches		delete
+dist/ntp/README.refclocks	delete
+dist/ntp/README.versions	delete
+dist/ntp/TODO			delete
+dist/ntp/WHERE-TO-START		delete
+dist/ntp/aclocal.m4		delete
+dist/ntp/adjtimed/Makefile.am	delete
+dist/ntp/adjtimed/Makefile.in	delete
+dist/ntp/adjtimed/README	delete
+dist/ntp/adjtimed/adjtimed.c	delete
+dist/ntp/arlib/COPYING		delete
+dist/ntp/arlib/INSTALL		delete
+dist/ntp/arlib/Makefile.am	delete
+dist/ntp/arlib/Makefile.in	delete
+dist/ntp/arlib/README		delete
+dist/ntp/arlib/UNSHAR.HDR	delete
+dist/ntp/arlib/aclocal.m4	delete
+dist/ntp/arlib/arlib.3		delete
+dist/ntp/arlib/arlib.c		delete
+dist/ntp/arlib/arlib.h		delete
+dist/ntp/arlib/arplib.h		delete
+dist/ntp/arlib/configure	delete
+dist/ntp/arlib/configure.in	delete
+dist/ntp/arlib/depcomp		delete
+dist/ntp/arlib/install-sh	delete
+dist/ntp/arlib/missing		delete
+dist/ntp/arlib/sample.c		delete
+dist/ntp/bincheck.mf		delete
+dist/ntp/bootstrap		delete
+dist/ntp/build			delete
+dist/ntp/clockstuff/Makefile.am	delete
+dist/ntp/clockstuff/Makefile.in	delete
+dist/ntp/clockstuff/README	delete
+dist/ntp/clockstuff/chutest.c	delete
+dist/ntp/clockstuff/clktest.c	delete
+dist/ntp/clockstuff/propdelay.c	delete
+dist/ntp/compile		delete
+dist/ntp/conf/README		delete
+dist/ntp/conf/baldwin.conf	delete
+dist/ntp/conf/beauregard.conf	delete
+dist/ntp/conf/grundoon.conf	delete
+dist/ntp/conf/malarky.conf	delete
+dist/ntp/conf/pogo.conf		delete
+dist/ntp/conf/rackety.conf	delete
+dist/ntp/config.guess		delete
+dist/ntp/config.h.in		delete
+dist/ntp/config.sub		delete
+dist/ntp/configure		delete
+dist/ntp/configure.ac		delete
+dist/ntp/depcomp		delete
+dist/ntp/dot.emacs		delete
+dist/ntp/excludes		delete
+dist/ntp/flock-build		delete
+dist/ntp/html/accopt.html	delete
+dist/ntp/html/assoc.html	delete
+dist/ntp/html/audio.html	delete
+dist/ntp/html/authopt.html	delete
+dist/ntp/html/build/build.html	delete
+dist/ntp/html/build/config.html	delete
+dist/ntp/html/build/hints.html	delete
+dist/ntp/html/build/hints/a-ux	delete
+dist/ntp/html/build/hints/aix	delete
+dist/ntp/html/build/hints/bsdi	delete
+dist/ntp/html/build/hints/changesdelete
+dist/ntp/html/build/hints/decosf1delete
+dist/ntp/html/build/hints/decosf2delete
+dist/ntp/html/build/hints/freebsddelete
+dist/ntp/html/build/hints/hpux	delete
+dist/ntp/html/build/hints/linux	delete
+dist/ntp/html/build/hints/mpeix	delete
+dist/ntp/html/build/hints/netbsddelete
+dist/ntp/html/build/hints/notes-xntp-v3delete
+dist/ntp/html/build/hints/parse	delete
+dist/ntp/html/build/hints/refclocksdelete
+dist/ntp/html/build/hints/rs6000delete
+dist/ntp/html/build/hints/sco.htmldelete
+dist/ntp/html/build/hints/sgi	delete
+dist/ntp/html/build/hints/solaris-dosynctodr.html		delete

CVS commit: [netbsd-5] src/etc/rc.d

2015-01-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  7 18:18:45 UTC 2015

Modified Files:
src/etc/rc.d [netbsd-5]: ntpd

Log Message:
Pull up following revision(s) (requested by he in ticket #1940):
etc/rc.d/ntpd: revision 1.15
new ntpd wants to be able to translate ntp into a port number after chr=
oot,
so give it its own small copy of /etc/services in the chroot


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.13.34.1 src/etc/rc.d/ntpd

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

Modified files:

Index: src/etc/rc.d/ntpd
diff -u src/etc/rc.d/ntpd:1.13 src/etc/rc.d/ntpd:1.13.34.1
--- src/etc/rc.d/ntpd:1.13	Fri Aug 13 18:08:03 2004
+++ src/etc/rc.d/ntpd	Wed Jan  7 18:18:45 2015
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: ntpd,v 1.13 2004/08/13 18:08:03 mycroft Exp $
+# $NetBSD: ntpd,v 1.13.34.1 2015/01/07 18:18:45 msaitoh Exp $
 #
 
 # PROVIDE: ntpd
@@ -49,6 +49,21 @@ ntpd_precmd()
 	fi
 	ln -fs ${ntpd_chrootdir}/var/db/ntp.drift /var/db/ntp.drift
 
+	if [ ! -d ${ntpd_chrootdir}/etc ]; then
+		mkdir ${ntpd_chrootdir}/etc
+	fi
+	if [ ! -f ${ntpd_chrootdir}/etc/services ]; then
+		getent services ntp/udp ntp/tcp \
+			 ${ntpd_chrootdir}/etc/services
+	fi
+	if [ ! -d ${ntpd_chrootdir}/var/db ]; then
+		mkdir -p ${ntpd_chrootdir}/var/db
+	fi
+	if [ ! -f ${ntpd_chrootdir}/var/db/services.cdb ]; then
+		services_mkdb -o ${ntpd_chrootdir}/var/db/services.cdb \
+			${ntpd_chrootdir}/etc/services
+	fi
+
 	#	Change run_rc_commands()'s internal copy of $ntpd_flags
 	#
 	rc_flags=-u ntpd:ntpd -i ${ntpd_chrootdir} $rc_flags



CVS commit: [netbsd-5] src/doc

2015-01-07 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  7 19:23:14 UTC 2015

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

Log Message:
s/nick/skrll/


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.91 -r1.1.2.92 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.91 src/doc/CHANGES-5.3:1.1.2.92
--- src/doc/CHANGES-5.3:1.1.2.91	Wed Jan  7 18:43:14 2015
+++ src/doc/CHANGES-5.3	Wed Jan  7 19:23:14 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.91 2015/01/07 18:43:14 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.92 2015/01/07 19:23:14 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -3599,7 +3599,7 @@ sys/arch/arm/arm/disassem.c			1.26
 
 	The mode synonyms are different for stm and ldm - handle this.
 	Fixes PR#49520 reported by Paul Guyot.
-	[nick, ticket #1939]
+	[skrll, ticket #1939]
 
 etc/rc.d/ntpd	1.15
 



CVS commit: [netbsd-5] src/dist/ntp

2015-01-06 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Wed Jan  7 04:50:22 UTC 2015

Removed Files:
src/dist/ntp [netbsd-5]: COPYRIGHT ChangeLog CommitLog CommitLog-4.1.0
INSTALL Makefile.am Makefile.in NEWS NOTES.y2kfixes README
README.bk README.hackers README.patches README.refclocks
README.versions TODO WHERE-TO-START aclocal.m4 bincheck.mf
bootstrap build compile config.guess config.h.in config.sub
configure configure.ac depcomp dot.emacs excludes flock-build
install-sh ltmain.sh missing ntp-html2mdoc.pl ntp2netbsd
packageinfo.sh readme.y2kfixes results.y2kfixes version version.m4
src/dist/ntp/ElectricFence [netbsd-5]: CHANGES COPYING Makefile.am
Makefile.in README efence.c efence.h eftest.c libefence.3 page.c
print.c tstheap.c
src/dist/ntp/adjtimed [netbsd-5]: Makefile.am Makefile.in README
adjtimed.c
src/dist/ntp/arlib [netbsd-5]: COPYING INSTALL Makefile.am Makefile.in
README UNSHAR.HDR aclocal.m4 arlib.3 arlib.c arlib.h arplib.h
configure configure.in depcomp install-sh missing sample.c
src/dist/ntp/clockstuff [netbsd-5]: Makefile.am Makefile.in README
chutest.c clktest.c propdelay.c
src/dist/ntp/conf [netbsd-5]: README baldwin.conf beauregard.conf
grundoon.conf malarky.conf pogo.conf rackety.conf
src/dist/ntp/html [netbsd-5]: accopt.html assoc.html audio.html
authopt.html clockopt.html confopt.html copyright.html debug.html
extern.html gadget.html groups.html howto.html index.html kern.html
keygen.html ldisc.html manyopt.html measure.html miscopt.html
monopt.html msyslog.html mx4200data.html notes.html ntp_conf.html
ntpd.html ntpdate.html ntpdc.html ntpdsim.html ntpdsim_new.html
ntpq.html ntptime.html ntptrace.html parsedata.html parsenew.html
pps.html prefer.html rdebug.html refclock.html release.html
sntp.html tickadj.html
src/dist/ntp/html/build [netbsd-5]: build.html config.html hints.html
patches.html porting.html quick.html
src/dist/ntp/html/build/hints [netbsd-5]: a-ux aix bsdi changes decosf1
decosf2 freebsd hpux linux mpeix netbsd notes-xntp-v3 parse
refclocks rs6000 sco.html sgi solaris-dosynctodr.html solaris.html
solaris.xtra.4023118 solaris.xtra.4095849 solaris.xtra.S99ntpd
solaris.xtra.patchfreq sun4 svr4-dell svr4_package todo
vxworks.html winnt.html
src/dist/ntp/html/build/scripts [netbsd-5]: footer.txt links10.txt
links11.txt links12.txt links7.txt links8.txt links9.txt style.css
src/dist/ntp/html/drivers [netbsd-5]: driver1.html driver10.html
driver11.html driver12.html driver16.html driver18.html
driver19.html driver2.html driver20.html driver22.html
driver26.html driver27.html driver28.html driver29.html
driver3.html driver30.html driver31.html driver32.html
driver33.html driver34.html driver35.html driver36.html
driver37.html driver38.html driver39.html driver4.html
driver40.html driver42.html driver43.html driver44.html
driver5.html driver6.html driver7.html driver8.html driver9.html
oncore-shmem.html tf582_4.html
src/dist/ntp/html/drivers/icons [netbsd-5]: home.gif mail2.gif
src/dist/ntp/html/drivers/scripts [netbsd-5]: footer.txt style.css
src/dist/ntp/html/icons [netbsd-5]: home.gif mail2.gif
src/dist/ntp/html/scripts [netbsd-5]: footer.txt links10.txt
links11.txt links12.txt links7.txt links8.txt links9.txt style.css
src/dist/ntp/include [netbsd-5]: Makefile.am Makefile.in README
adjtime.h ascii.h audio.h autogen-version.def binio.h copyright.def
debug-opt.def global.h gps.h homerc.def hopf6039.h icom.h
ieee754io.h iosignal.h l_stdlib.h mbg_gps166.h mx4200.h ntif.h
ntp.h ntp_calendar.h ntp_cmdargs.h ntp_config.h ntp_control.h
ntp_crypto.h ntp_datum.h ntp_debug.h ntp_filegen.h ntp_fp.h
ntp_if.h ntp_io.h ntp_machine.h ntp_malloc.h ntp_md5.h ntp_proto.h
ntp_random.h ntp_refclock.h ntp_request.h ntp_rfc2553.h
ntp_select.h ntp_sprintf.h ntp_stdlib.h ntp_string.h ntp_syscall.h
ntp_syslog.h ntp_tty.h ntp_types.h ntp_unixtime.h ntpd.h ntpsim.h
parse.h parse_conf.h recvbuff.h rsa_md5.h timepps-SCO.h
timepps-Solaris.h timepps-SunOS.h trimble.h version.def
src/dist/ntp/include/isc [netbsd-5]: Makefile.am Makefile.in app.h
assertions.h boolean.h buffer.h error.h formatcheck.h int.h
interfaceiter.h ipv6.h lang.h lib.h list.h magic.h mem.h msgcat.h
msgs.h mutex.h net.h netaddr.h netscope.h offset.h once.h

CVS commit: [netbsd-5] src/usr.sbin/bind/include/isc

2015-01-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jan  5 23:21:24 UTC 2015

Modified Files:
src/usr.sbin/bind/include/isc [netbsd-5]: platform.h

Log Message:
Pullup the following revision (requested by he in ticket #1937):

src/external/bsd/bind/include/isc/platform.hrev. 1.18

What ISC wraps under ISC_PLATFORM_HAVEXADD appears to be 32-bit
atomic adds, and I beleive all our platforms can do that.  Therefore,
no need to conditionalize that definition under __HAVE_ATOMIC64_OPS.


To generate a diff of this commit:
cvs rdiff -u -r1.9.4.1 -r1.9.4.2 src/usr.sbin/bind/include/isc/platform.h

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

Modified files:

Index: src/usr.sbin/bind/include/isc/platform.h
diff -u src/usr.sbin/bind/include/isc/platform.h:1.9.4.1 src/usr.sbin/bind/include/isc/platform.h:1.9.4.2
--- src/usr.sbin/bind/include/isc/platform.h:1.9.4.1	Thu Jan  6 21:42:52 2011
+++ src/usr.sbin/bind/include/isc/platform.h	Mon Jan  5 23:21:24 2015
@@ -258,9 +258,7 @@
  * If the xadd operation is available on this architecture,
  * ISC_PLATFORM_HAVEXADD will be defined.
  */
-#ifdef __HAVE_ATOMIC64_OPS
 #define ISC_PLATFORM_HAVEXADD 1
-#endif
 
 /*
  * If the xaddq operation (64bit xadd) is available on this architecture,



CVS commit: [netbsd-5] src/doc

2015-01-05 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Jan  5 23:33:10 UTC 2015

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

Log Message:
Update ticket 1937.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.89 -r1.1.2.90 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.89 src/doc/CHANGES-5.3:1.1.2.90
--- src/doc/CHANGES-5.3:1.1.2.89	Thu Dec 25 23:20:19 2014
+++ src/doc/CHANGES-5.3	Mon Jan  5 23:33:10 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.89 2014/12/25 23:20:19 he Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.90 2015/01/05 23:33:10 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1295,6 +1295,7 @@ dist/bind/lib/isc/include/isc/types.h		p
 dist/bind/lib/isccfg/namedconf.c		patch
 lib/libisc/Makefilepatch
 usr.sbin/bind/Makefile.inc			patch
+usr.sbin/bind/include/isc/platform.h		1.18
 
 	Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
 	This is a fix for CVE-2014-8500, where a maliciously constructed



CVS commit: [netbsd-5] src

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:19:10 UTC 2014

Modified Files:
src/dist/bind/bin/named [netbsd-5]: config.c query.c server.c
src/dist/bind/lib/dns [netbsd-5]: adb.c resolver.c
src/dist/bind/lib/dns/include/dns [netbsd-5]: adb.h resolver.h
src/dist/bind/lib/export/isc [netbsd-5]: Makefile.in
src/dist/bind/lib/isc [netbsd-5]: Makefile.in
src/dist/bind/lib/isc/include/isc [netbsd-5]: Makefile.in types.h
src/dist/bind/lib/isccfg [netbsd-5]: namedconf.c
src/lib/libisc [netbsd-5]: Makefile
src/usr.sbin/bind [netbsd-5]: Makefile.inc
Added Files:
src/dist/bind/lib/isc [netbsd-5]: counter.c
src/dist/bind/lib/isc/include/isc [netbsd-5]: counter.h

Log Message:
Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
This is a fix for CVE-2014-8500, where a maliciously constructed
setup can cause BIND to issue an unlimited sequence of queries to
follow a delegation.
[spz, ticket #1937]


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.8.4.4 -r1.1.1.8.4.5 src/dist/bind/bin/named/config.c
cvs rdiff -u -r1.8.4.8 -r1.8.4.9 src/dist/bind/bin/named/query.c
cvs rdiff -u -r1.1.1.9.4.4 -r1.1.1.9.4.5 src/dist/bind/bin/named/server.c
cvs rdiff -u -r1.6.4.4 -r1.6.4.5 src/dist/bind/lib/dns/adb.c
cvs rdiff -u -r1.8.4.6 -r1.8.4.7 src/dist/bind/lib/dns/resolver.c
cvs rdiff -u -r1.1.1.5.4.3 -r1.1.1.5.4.4 \
src/dist/bind/lib/dns/include/dns/adb.h
cvs rdiff -u -r1.1.1.5.4.4 -r1.1.1.5.4.5 \
src/dist/bind/lib/dns/include/dns/resolver.h
cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/dist/bind/lib/export/isc/Makefile.in
cvs rdiff -u -r1.1.1.6.4.4 -r1.1.1.6.4.5 src/dist/bind/lib/isc/Makefile.in
cvs rdiff -u -r0 -r1.1.2.1 src/dist/bind/lib/isc/counter.c
cvs rdiff -u -r1.1.1.5.4.4 -r1.1.1.5.4.5 \
src/dist/bind/lib/isc/include/isc/Makefile.in \
src/dist/bind/lib/isc/include/isc/types.h
cvs rdiff -u -r0 -r1.1.2.1 src/dist/bind/lib/isc/include/isc/counter.h
cvs rdiff -u -r1.1.1.7.4.4 -r1.1.1.7.4.5 src/dist/bind/lib/isccfg/namedconf.c
cvs rdiff -u -r1.2.4.2 -r1.2.4.3 src/lib/libisc/Makefile
cvs rdiff -u -r1.32.4.1 -r1.32.4.2 src/usr.sbin/bind/Makefile.inc

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

Modified files:

Index: src/dist/bind/bin/named/config.c
diff -u src/dist/bind/bin/named/config.c:1.1.1.8.4.4 src/dist/bind/bin/named/config.c:1.1.1.8.4.5
--- src/dist/bind/bin/named/config.c:1.1.1.8.4.4	Wed Jul 25 11:57:23 2012
+++ src/dist/bind/bin/named/config.c	Thu Dec 25 23:19:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: config.c,v 1.1.1.8.4.4 2012/07/25 11:57:23 jdc Exp $	*/
+/*	$NetBSD: config.c,v 1.1.1.8.4.5 2014/12/25 23:19:09 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2010  Internet Systems Consortium, Inc. (ISC)
@@ -75,6 +75,8 @@ options {\n\
 	listen-on {any;};\n\
 	listen-on-v6 {none;};\n\
 	match-mapped-addresses no;\n\
+	max-recursion-depth 7;\n\
+	max-recursion-queries 50;\n\
 	memstatistics-file \named.memstats\;\n\
 	multiple-cnames no;\n\
 #	named-xfer obsolete;\n\

Index: src/dist/bind/bin/named/query.c
diff -u src/dist/bind/bin/named/query.c:1.8.4.8 src/dist/bind/bin/named/query.c:1.8.4.9
--- src/dist/bind/bin/named/query.c:1.8.4.8	Wed Jan 15 10:11:20 2014
+++ src/dist/bind/bin/named/query.c	Thu Dec 25 23:19:09 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: query.c,v 1.8.4.8 2014/01/15 10:11:20 bouyer Exp $	*/
+/*	$NetBSD: query.c,v 1.8.4.9 2014/12/25 23:19:09 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -3338,11 +3338,11 @@ query_recurse(ns_client_t *client, dns_r
 		peeraddr = client-peeraddr;
 	else
 		peeraddr = NULL;
-	result = dns_resolver_createfetch2(client-view-resolver,
+	result = dns_resolver_createfetch3(client-view-resolver,
 	   client-query.qname,
 	   qtype, qdomain, nameservers,
 	   NULL, peeraddr, client-message-id,
-	   client-query.fetchoptions,
+	   client-query.fetchoptions, 0, NULL,
 	   client-task,
 	   query_resume, client,
 	   rdataset, sigrdataset,

Index: src/dist/bind/bin/named/server.c
diff -u src/dist/bind/bin/named/server.c:1.1.1.9.4.4 src/dist/bind/bin/named/server.c:1.1.1.9.4.5
--- src/dist/bind/bin/named/server.c:1.1.1.9.4.4	Wed Jul 25 11:57:25 2012
+++ src/dist/bind/bin/named/server.c	Thu Dec 25 23:19:10 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: server.c,v 1.1.1.9.4.4 2012/07/25 11:57:25 jdc Exp $	*/
+/*	$NetBSD: server.c,v 1.1.1.9.4.5 2014/12/25 23:19:10 he Exp $	*/
 
 /*
  * Copyright (C) 2004-2012  Internet Systems Consortium, Inc. (ISC)
@@ -1837,6 +1837,16 @@ configure_view(dns_view_t *view, cfg_obj
 		udpsize = 4096;
 	dns_resolver_setudpsize(view-resolver, (isc_uint16_t)udpsize);
 
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-depth, obj);
+	INSIST(result == ISC_R_SUCCESS);
+	dns_resolver_setmaxdepth(view-resolver, cfg_obj_asuint32(obj));
+
+	obj = NULL;
+	result = ns_config_get(maps, max-recursion-queries, obj);
+	

CVS commit: [netbsd-5] src/doc

2014-12-25 Thread Havard Eidnes
Module Name:src
Committed By:   he
Date:   Thu Dec 25 23:20:19 UTC 2014

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

Log Message:
Ticket 1937.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.88 -r1.1.2.89 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.88 src/doc/CHANGES-5.3:1.1.2.89
--- src/doc/CHANGES-5.3:1.1.2.88	Mon Dec 22 12:57:54 2014
+++ src/doc/CHANGES-5.3	Thu Dec 25 23:20:19 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.88 2014/12/22 12:57:54 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.89 2014/12/25 23:20:19 he Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1278,3 +1278,26 @@ sys/dev/ic/rtl8169.c1.142
 	Force software recalculation of UDP checksum if bad checksum is
 	reported by the hardware.
 	[uwe, ticket #1936]
+
+dist/bind/lib/isc/counter.c			new, via patch
+dist/bind/lib/isc/include/isc/counter.h		new, via patch
+dist/bind/bin/named/config.c			patch
+dist/bind/bin/named/query.c			patch
+dist/bind/bin/named/server.c			patch
+dist/bind/lib/dns/adb.cpatch
+dist/bind/lib/dns/resolver.c			patch
+dist/bind/lib/dns/include/dns/adb.h		patch
+dist/bind/lib/dns/include/dns/resolver.h	patch
+dist/bind/lib/export/isc/Makefile.in		patch
+dist/bind/lib/isc/Makefile.in			patch
+dist/bind/lib/isc/include/isc/Makefile.in	patch
+dist/bind/lib/isc/include/isc/types.h		patch
+dist/bind/lib/isccfg/namedconf.c		patch
+lib/libisc/Makefilepatch
+usr.sbin/bind/Makefile.inc			patch
+
+	Apply fix for BIND, backported from the patch for 9.8.8 from ISC.
+	This is a fix for CVE-2014-8500, where a maliciously constructed
+	setup can cause BIND to issue an unlimited sequence of queries to
+	follow a delegation.
+	[spz, ticket #1937]



CVS commit: [netbsd-5] src/doc

2014-12-22 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Dec 22 12:57:54 UTC 2014

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

Log Message:
Update ticket 1935.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.87 -r1.1.2.88 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.87 src/doc/CHANGES-5.3:1.1.2.88
--- src/doc/CHANGES-5.3:1.1.2.87	Sun Dec 21 20:51:04 2014
+++ src/doc/CHANGES-5.3	Mon Dec 22 12:57:54 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.87 2014/12/21 20:51:04 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.88 2014/12/22 12:57:54 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1197,6 +1197,7 @@ xsrc/external/mit/xorg-server/dist/Xi/se
 xsrc/external/mit/xorg-server/dist/Xi/xiproperty.c patch
 xsrc/external/mit/xorg-server/dist/dbe/dbe.cpatch
 xsrc/external/mit/xorg-server/dist/dix/dispatch.c patch
+xsrc/external/mit/xorg-server/dist/exa/exa_render.c  1.2
 xsrc/external/mit/xorg-server/dist/glx/glxcmds.c patch
 xsrc/external/mit/xorg-server/dist/glx/glxcmdsswap.c patch
 xsrc/external/mit/xorg-server/dist/glx/glxserver.h patch
@@ -1218,6 +1219,7 @@ xsrc/external/mit/xorg-server/dist/inclu
 xsrc/external/mit/xorg-server/dist/os/access.c  patch, 1.3 via patch
 xsrc/external/mit/xorg-server/dist/os/rpcauth.c patch
 xsrc/external/mit/xorg-server/dist/randr/rrsdispatch.c patch
+xsrc/external/mit/xorg-server/dist/render/picture.h  1.2
 xsrc/external/mit/xorg-server/dist/render/render.c patch
 xsrc/external/mit/xorg-server/dist/xfixes/select.c patch
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmds.c	1.2
@@ -1265,6 +1267,9 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2014-8101
 	CVE-2014-8102
 	CVE-2014-8103
+	If t-bottom is close to MIN_INT, removing top can wraparound, so do
+	the check properly.
+	CVE-2013-6424
 	[mrg, ticket #1935]
 
 sys/dev/ic/rtl8169.c1.142



CVS commit: [netbsd-5] src/sys/dev/ic

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:49:43 UTC 2014

Modified Files:
src/sys/dev/ic [netbsd-5]: rtl8169.c

Log Message:
Pull up following revision(s) (requested by uwe in ticket #1936):
sys/dev/ic/rtl8169.c: revision 1.142
RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
Force software recalculation of UDP checksum if bad checksum is
reported by the hardware.


To generate a diff of this commit:
cvs rdiff -u -r1.105.4.9 -r1.105.4.10 src/sys/dev/ic/rtl8169.c

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

Modified files:

Index: src/sys/dev/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.105.4.9 src/sys/dev/ic/rtl8169.c:1.105.4.10
--- src/sys/dev/ic/rtl8169.c:1.105.4.9	Wed Jan 25 18:02:44 2012
+++ src/sys/dev/ic/rtl8169.c	Sun Dec 21 20:49:43 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rtl8169.c,v 1.105.4.9 2012/01/25 18:02:44 riz Exp $	*/
+/*	$NetBSD: rtl8169.c,v 1.105.4.10 2014/12/21 20:49:43 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.105.4.9 2012/01/25 18:02:44 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rtl8169.c,v 1.105.4.10 2014/12/21 20:49:43 msaitoh Exp $);
 /* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
 
 /*
@@ -1276,9 +1276,19 @@ re_rxeof(struct rtk_softc *sc)
 		M_CSUM_TCP_UDP_BAD;
 } else if (RE_UDPPKT(rxstat)) {
 	m-m_pkthdr.csum_flags |= M_CSUM_UDPv4;
-	if (rxstat  RE_RDESC_STAT_UDPSUMBAD)
-		m-m_pkthdr.csum_flags |=
-		M_CSUM_TCP_UDP_BAD;
+	if (rxstat  RE_RDESC_STAT_UDPSUMBAD) {
+		/*
+		 * XXX: 8139C+ thinks UDP csum
+		 * 0x is bad, force software
+		 * calculation.
+		 */
+		if (sc-sc_quirk  RTKQ_8139CPLUS)
+			m-m_pkthdr.csum_flags
+			= ~M_CSUM_UDPv4;
+		else
+			m-m_pkthdr.csum_flags
+			|= M_CSUM_TCP_UDP_BAD;
+	}
 }
 			}
 		} else {



CVS commit: [netbsd-5] src/doc

2014-12-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Dec 21 20:51:04 UTC 2014

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

Log Message:
Ticket 1936.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.86 -r1.1.2.87 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.86 src/doc/CHANGES-5.3:1.1.2.87
--- src/doc/CHANGES-5.3:1.1.2.86	Mon Dec 15 07:12:24 2014
+++ src/doc/CHANGES-5.3	Sun Dec 21 20:51:04 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.86 2014/12/15 07:12:24 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.87 2014/12/21 20:51:04 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1267,3 +1267,9 @@ xsrc/xfree/xc/programs/Xserver/render/re
 	CVE-2014-8103
 	[mrg, ticket #1935]
 
+sys/dev/ic/rtl8169.c1.142
+
+	RealTek 8139C+ incorrectly identifies UDP checksum 0x as bad.
+	Force software recalculation of UDP checksum if bad checksum is
+	reported by the hardware.
+	[uwe, ticket #1936]



CVS commit: [netbsd-5] src/doc

2014-12-14 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Dec 15 07:12:24 UTC 2014

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

Log Message:
update 1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.85 -r1.1.2.86 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.85 src/doc/CHANGES-5.3:1.1.2.86
--- src/doc/CHANGES-5.3:1.1.2.85	Fri Dec 12 06:56:12 2014
+++ src/doc/CHANGES-5.3	Mon Dec 15 07:12:24 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.85 2014/12/12 06:56:12 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.86 2014/12/15 07:12:24 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1224,12 +1224,14 @@ xsrc/xfree/xc/programs/Xserver/GL/glx/gl
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/glxserver.h 1.2
 xsrc/xfree/xc/programs/Xserver/GL/glx/rensize.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2
-xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2, patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2, patch
 xsrc/xfree/xc/programs/Xserver/GL/glx/unpack.h	1.2
+xsrc/xfree/xc/programs/Xserver/Xext/EVI.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xcmisc.c	1.3
+xsrc/xfree/xc/programs/Xserver/Xext/xf86vmode.c	patch
 xsrc/xfree/xc/programs/Xserver/Xext/xvdisp.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgdctl.c	1.2
 xsrc/xfree/xc/programs/Xserver/Xi/chgfctl.c	1.2



CVS commit: [netbsd-5] src/doc

2014-12-11 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Fri Dec 12 06:56:12 UTC 2014

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

Log Message:
update 1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.84 -r1.1.2.85 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.84 src/doc/CHANGES-5.3:1.1.2.85
--- src/doc/CHANGES-5.3:1.1.2.84	Wed Dec 10 23:01:20 2014
+++ src/doc/CHANGES-5.3	Fri Dec 12 06:56:12 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.84 2014/12/10 23:01:20 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.85 2014/12/12 06:56:12 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1220,6 +1220,28 @@ xsrc/external/mit/xorg-server/dist/os/rp
 xsrc/external/mit/xorg-server/dist/randr/rrsdispatch.c patch
 xsrc/external/mit/xorg-server/dist/render/render.c patch
 xsrc/external/mit/xorg-server/dist/xfixes/select.c patch
+xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmds.c	1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/glxcmdsswap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/glxserver.h 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/rensize.c	1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2.c	1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/single2swap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepix.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/singlepixswap.c 1.2
+xsrc/xfree/xc/programs/Xserver/GL/glx/unpack.h	1.2
+xsrc/xfree/xc/programs/Xserver/Xext/xcmisc.c	1.3
+xsrc/xfree/xc/programs/Xserver/Xext/xvdisp.c	1.2
+xsrc/xfree/xc/programs/Xserver/Xi/chgdctl.c	1.2
+xsrc/xfree/xc/programs/Xserver/Xi/chgfctl.c	1.2
+xsrc/xfree/xc/programs/Xserver/Xi/sendexev.c	1.2
+xsrc/xfree/xc/programs/Xserver/dbe/dbe.c	1.3
+xsrc/xfree/xc/programs/Xserver/dix/dispatch.c	1.2
+xsrc/xfree/xc/programs/Xserver/include/dix.h	1.2
+xsrc/xfree/xc/programs/Xserver/include/misc.h	1.2
+xsrc/xfree/xc/programs/Xserver/os/access.c	1.7
+xsrc/xfree/xc/programs/Xserver/os/rpcauth.c	1.2
+xsrc/xfree/xc/programs/Xserver/randr/randr.c	1.2
+xsrc/xfree/xc/programs/Xserver/render/render.c	1.4
 
 	apply fixes for X.Org Security Advisory:  Dec. 9, 2014
 	Protocol handling issues in X Window System servers



CVS commit: [netbsd-5] src/doc

2014-12-10 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Dec 10 23:01:21 UTC 2014

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

Log Message:
update 1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.83 -r1.1.2.84 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.83 src/doc/CHANGES-5.3:1.1.2.84
--- src/doc/CHANGES-5.3:1.1.2.83	Tue Dec  9 19:59:09 2014
+++ src/doc/CHANGES-5.3	Wed Dec 10 23:01:20 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.83 2014/12/09 19:59:09 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.84 2014/12/10 23:01:20 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1213,9 +1213,9 @@ xsrc/external/mit/xorg-server/dist/glx/s
 xsrc/external/mit/xorg-server/dist/glx/swap_interval.c patch
 xsrc/external/mit/xorg-server/dist/glx/unpack.h patch
 xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2ext.c patch
-xsrc/external/mit/xorg-server/dist/include/dix.h patch
+xsrc/external/mit/xorg-server/dist/include/dix.h patch, 1.3
 xsrc/external/mit/xorg-server/dist/include/misc.h patch
-xsrc/external/mit/xorg-server/dist/os/access.c  patch
+xsrc/external/mit/xorg-server/dist/os/access.c  patch, 1.3 via patch
 xsrc/external/mit/xorg-server/dist/os/rpcauth.c patch
 xsrc/external/mit/xorg-server/dist/randr/rrsdispatch.c patch
 xsrc/external/mit/xorg-server/dist/render/render.c patch



CVS commit: [netbsd-5] src/doc

2014-12-09 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Dec  9 19:59:09 UTC 2014

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

Log Message:
1935


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.82 -r1.1.2.83 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.82 src/doc/CHANGES-5.3:1.1.2.83
--- src/doc/CHANGES-5.3:1.1.2.82	Sun Nov 23 04:52:53 2014
+++ src/doc/CHANGES-5.3	Tue Dec  9 19:59:09 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.82 2014/11/23 04:52:53 snj Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.83 2014/12/09 19:59:09 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1189,3 +1189,57 @@ share/zoneinfo/zone1970.tab			patch
 	* Changes to historical data.
 	[apb, ticket #1934]
 
+xsrc/external/mit/xorg-server/dist/Xext/xcmisc.c patch
+xsrc/external/mit/xorg-server/dist/Xext/xvdisp.c patch
+xsrc/external/mit/xorg-server/dist/Xi/chgdctl.c patch
+xsrc/external/mit/xorg-server/dist/Xi/chgfctl.c patch
+xsrc/external/mit/xorg-server/dist/Xi/sendexev.c patch
+xsrc/external/mit/xorg-server/dist/Xi/xiproperty.c patch
+xsrc/external/mit/xorg-server/dist/dbe/dbe.cpatch
+xsrc/external/mit/xorg-server/dist/dix/dispatch.c patch
+xsrc/external/mit/xorg-server/dist/glx/glxcmds.c patch
+xsrc/external/mit/xorg-server/dist/glx/glxcmdsswap.c patch
+xsrc/external/mit/xorg-server/dist/glx/glxserver.h patch
+xsrc/external/mit/xorg-server/dist/glx/indirect_program.c patch
+xsrc/external/mit/xorg-server/dist/glx/indirect_reqsize.c patch
+xsrc/external/mit/xorg-server/dist/glx/indirect_reqsize.h patch
+xsrc/external/mit/xorg-server/dist/glx/indirect_texture_compression.c patch
+xsrc/external/mit/xorg-server/dist/glx/indirect_util.c patch
+xsrc/external/mit/xorg-server/dist/glx/rensize.c patch
+xsrc/external/mit/xorg-server/dist/glx/single2.c patch
+xsrc/external/mit/xorg-server/dist/glx/single2swap.c patch
+xsrc/external/mit/xorg-server/dist/glx/singlepix.c patch
+xsrc/external/mit/xorg-server/dist/glx/singlepixswap.c patch
+xsrc/external/mit/xorg-server/dist/glx/swap_interval.c patch
+xsrc/external/mit/xorg-server/dist/glx/unpack.h patch
+xsrc/external/mit/xorg-server/dist/hw/xfree86/dri2/dri2ext.c patch
+xsrc/external/mit/xorg-server/dist/include/dix.h patch
+xsrc/external/mit/xorg-server/dist/include/misc.h patch
+xsrc/external/mit/xorg-server/dist/os/access.c  patch
+xsrc/external/mit/xorg-server/dist/os/rpcauth.c patch
+xsrc/external/mit/xorg-server/dist/randr/rrsdispatch.c patch
+xsrc/external/mit/xorg-server/dist/render/render.c patch
+xsrc/external/mit/xorg-server/dist/xfixes/select.c patch
+
+	apply fixes for X.Org Security Advisory:  Dec. 9, 2014
+	Protocol handling issues in X Window System servers
+	included are fixes for:
+	denial of service due to unchecked malloc in client authentication
+	CVE-2014-8091
+	integer overflows calculating memory needs for requests
+	CVE-2014-8092
+	CVE-2014-8093
+	CVE-2014-8094
+	out of bounds access due to not validating length or offset values
+	in requests
+	CVE-2014-8095
+	CVE-2014-8096
+	CVE-2014-8097
+	CVE-2014-8098
+	CVE-2014-8099
+	CVE-2014-8100
+	CVE-2014-8101
+	CVE-2014-8102
+	CVE-2014-8103
+	[mrg, ticket #1935]
+



CVS commit: [netbsd-5] src/doc

2014-11-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Nov 23 04:52:53 UTC 2014

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

Log Message:
addition to ticket 1934


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.81 -r1.1.2.82 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.81 src/doc/CHANGES-5.3:1.1.2.82
--- src/doc/CHANGES-5.3:1.1.2.81	Fri Nov 21 08:58:32 2014
+++ src/doc/CHANGES-5.3	Sun Nov 23 04:52:53 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.81 2014/11/21 08:58:32 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.82 2014/11/23 04:52:53 snj Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1164,6 +1164,7 @@ sys/dev/raidframe/rf_reconstruct.c		1.12
 	Fixes PR kern/49244.
 	[oster, ticket #1933]
 
+distrib/sets/lists/base/mi			1.1090
 doc/3RDPARTY	patch
 share/zoneinfo/NEWSnew
 share/zoneinfo/africapatch



CVS commit: [netbsd-5] src/distrib/sets/lists/base

2014-11-22 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Sun Nov 23 04:52:14 UTC 2014

Modified Files:
src/distrib/sets/lists/base [netbsd-5]: mi

Log Message:
Pull up following revision(s) (requested by apb in ticket #1934):
distrib/sets/lists/base/mi: revision 1.1090
Add ./usr/share/zoneinfo/Pacific/Bougainville for tzdata2014i


To generate a diff of this commit:
cvs rdiff -u -r1.780.2.30 -r1.780.2.31 src/distrib/sets/lists/base/mi

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.780.2.30 src/distrib/sets/lists/base/mi:1.780.2.31
--- src/distrib/sets/lists/base/mi:1.780.2.30	Fri Aug 15 22:54:35 2014
+++ src/distrib/sets/lists/base/mi	Sun Nov 23 04:52:14 2014
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.780.2.30 2014/08/15 22:54:35 riz Exp $
+# $NetBSD: mi,v 1.780.2.31 2014/11/23 04:52:14 snj Exp $
 #
 # Note:	Don't delete entries from here - mark them as obsolete instead,
 #	unless otherwise stated below.
@@ -4881,6 +4881,7 @@
 ./usr/share/zoneinfo/Pacific			base-sys-share
 ./usr/share/zoneinfo/Pacific/Apia		base-sys-share		share
 ./usr/share/zoneinfo/Pacific/Auckland		base-sys-share		share
+./usr/share/zoneinfo/Pacific/Bougainville	base-sys-share		share
 ./usr/share/zoneinfo/Pacific/Chatham		base-sys-share		share
 ./usr/share/zoneinfo/Pacific/Chuuk		base-sys-share		share
 ./usr/share/zoneinfo/Pacific/Easter		base-sys-share		share



CVS commit: [netbsd-5] src/doc

2014-11-21 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Fri Nov 21 08:58:32 UTC 2014

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

Log Message:
Ticket #1934


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.80 -r1.1.2.81 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.80 src/doc/CHANGES-5.3:1.1.2.81
--- src/doc/CHANGES-5.3:1.1.2.80	Thu Nov 20 12:19:27 2014
+++ src/doc/CHANGES-5.3	Fri Nov 21 08:58:32 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.80 2014/11/20 12:19:27 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.81 2014/11/21 08:58:32 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1164,3 +1164,27 @@ sys/dev/raidframe/rf_reconstruct.c		1.12
 	Fixes PR kern/49244.
 	[oster, ticket #1933]
 
+doc/3RDPARTY	patch
+share/zoneinfo/NEWSnew
+share/zoneinfo/africapatch
+share/zoneinfo/antarctica			patch
+share/zoneinfo/asiapatch
+share/zoneinfo/australasia			patch
+share/zoneinfo/backwardpatch
+share/zoneinfo/backzonenew
+share/zoneinfo/europepatch
+share/zoneinfo/leapseconds			patch
+share/zoneinfo/leapseconds.awk			patch
+share/zoneinfo/northamerica			patch
+share/zoneinfo/southamerica			patch
+share/zoneinfo/zone.tabpatch
+share/zoneinfo/zone1970.tab			patch
+
+	Update tzdata from 2014f to 2014j.  Some of the changes are:
+	* A new Zone Pacific/Bougainville, for the part of Papua New Guinea
+	  that plans to switch from UTC+10 to UTC+11 on 2014-12-28 at 02:00.
+	* Changes for Fiji, Belarus, and Turks  Caicos that take effect
+	  at various times in 2014.
+	* Changes to historical data.
+	[apb, ticket #1934]
+



CVS commit: [netbsd-5] src/lib/libc/resolv

2014-11-20 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Nov 20 08:41:31 UTC 2014

Modified Files:
src/lib/libc/resolv [netbsd-5]: res_mkquery.c

Log Message:
Pull up the following revisions(s) (requested by christos in ticket #1932):
lib/libc/resolv/res_mkquery.c:  revision 1.14

Fix EDNS option being broken with unbound by clipping MAXPACKET to
64K - 1. Addresses PR/48475


To generate a diff of this commit:
cvs rdiff -u -r1.10.4.1 -r1.10.4.2 src/lib/libc/resolv/res_mkquery.c

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

Modified files:

Index: src/lib/libc/resolv/res_mkquery.c
diff -u src/lib/libc/resolv/res_mkquery.c:1.10.4.1 src/lib/libc/resolv/res_mkquery.c:1.10.4.2
--- src/lib/libc/resolv/res_mkquery.c:1.10.4.1	Thu Jan  6 21:42:48 2011
+++ src/lib/libc/resolv/res_mkquery.c	Thu Nov 20 08:41:31 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: res_mkquery.c,v 1.10.4.1 2011/01/06 21:42:48 riz Exp $	*/
+/*	$NetBSD: res_mkquery.c,v 1.10.4.2 2014/11/20 08:41:31 sborrill Exp $	*/
 
 /*
  * Portions Copyright (C) 2004, 2005, 2008  Internet Systems Consortium, Inc. (ISC)
@@ -76,7 +76,7 @@
 static const char sccsid[] = @(#)res_mkquery.c	8.1 (Berkeley) 6/4/93;
 static const char rcsid[] = Id: res_mkquery.c,v 1.10 2008/12/11 09:59:00 marka Exp;
 #else
-__RCSID($NetBSD: res_mkquery.c,v 1.10.4.1 2011/01/06 21:42:48 riz Exp $);
+__RCSID($NetBSD: res_mkquery.c,v 1.10.4.2 2014/11/20 08:41:31 sborrill Exp $);
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -249,7 +249,9 @@ res_nopt(res_state statp,
 	*cp++ = 0;/*% . */
 	ns_put16(ns_t_opt, cp);			/*% TYPE */
 	cp += INT16SZ;
-	ns_put16(anslen  0x, cp);		/*% CLASS = UDP payload size */
+	if (anslen  0x)
+		anslen = 0x;
+	ns_put16(anslen, cp);			/*% CLASS = UDP payload size */
 	cp += INT16SZ;
 	*cp++ = NOERROR;			/*% extended RCODE */
 	*cp++ = 0;/*% EDNS version */



CVS commit: [netbsd-5] src/doc

2014-11-20 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Nov 20 08:42:03 UTC 2014

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

Log Message:
Ticket #1932 plus grammatical fix for previous entry


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.78 -r1.1.2.79 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.78 src/doc/CHANGES-5.3:1.1.2.79
--- src/doc/CHANGES-5.3:1.1.2.78	Sun Nov  9 05:29:20 2014
+++ src/doc/CHANGES-5.3	Thu Nov 20 08:42:03 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.78 2014/11/09 05:29:20 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.79 2014/11/20 08:42:03 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1145,6 +1145,13 @@ distrib/vax/cdroms/installcd/Makefile		1
 etc/Makefile	1.394
 share/man/man7/release.7			1.32
 
-	Change release ISO's more meaningful names like NetBSD-5.2.3-i386.iso
-	instead of i386cd.iso. Fix PR# install/44593.
+	Change release ISOs to have more meaningful names like
+	NetBSD-5.2.3-i386.iso instead of i386cd.iso. Fix PR# install/44593.
 	[snj, ticket #1931]
+
+lib/libc/resolv/res_mkquery.c			1.14
+
+	Fix EDNS option being broken with unbound by clipping MAXPACKET
+	to 64K - 1. Addresses PR/48475
+	[christos, ticket #1932]
+



CVS commit: [netbsd-5] src/sys/dev/raidframe

2014-11-20 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Nov 20 09:38:56 UTC 2014

Modified Files:
src/sys/dev/raidframe [netbsd-5]: raidframevar.h rf_netbsdkintf.c
rf_reconstruct.c

Log Message:
Pull up the following revisions(s) (requested by oster in ticket #1933):
sys/dev/raidframe/raidframevar.h:   revision 1.17
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.316
sys/dev/raidframe/rf_reconstruct.c: revision 1.121 via patch

Fix a long-standing bug related to rebooting while a reconstruct-to-spare
is underway but not yet complete. Fixes PR kern/49244.


To generate a diff of this commit:
cvs rdiff -u -r1.12.10.3 -r1.12.10.4 src/sys/dev/raidframe/raidframevar.h
cvs rdiff -u -r1.250.4.13 -r1.250.4.14 src/sys/dev/raidframe/rf_netbsdkintf.c
cvs rdiff -u -r1.105.4.6 -r1.105.4.7 src/sys/dev/raidframe/rf_reconstruct.c

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

Modified files:

Index: src/sys/dev/raidframe/raidframevar.h
diff -u src/sys/dev/raidframe/raidframevar.h:1.12.10.3 src/sys/dev/raidframe/raidframevar.h:1.12.10.4
--- src/sys/dev/raidframe/raidframevar.h:1.12.10.3	Wed Jun 13 14:00:49 2012
+++ src/sys/dev/raidframe/raidframevar.h	Thu Nov 20 09:38:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: raidframevar.h,v 1.12.10.3 2012/06/13 14:00:49 sborrill Exp $ */
+/*	$NetBSD: raidframevar.h,v 1.12.10.4 2014/11/20 09:38:56 sborrill Exp $ */
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -384,17 +384,17 @@ struct RF_SparetWait_s {
  * IF YOU ADD A STATE, CHECK TO SEE IF YOU NEED TO MODIFY RF_DEAD_DISK().
  */
 enum RF_DiskStatus_e {
-rf_ds_optimal,  /* no problems */
-rf_ds_failed,   /* reconstruction ongoing */
-rf_ds_reconstructing,   /* reconstruction complete to spare, dead disk
- * not yet replaced */
-rf_ds_dist_spared,  /* reconstruction complete to distributed
+	rf_ds_optimal,  /* no problems */
+	rf_ds_failed,   /* disk has failed */
+	rf_ds_reconstructing,   /* reconstruction ongoing */
+	rf_ds_dist_spared,  /* reconstruction complete to distributed
  * spare space, dead disk not yet replaced */
-rf_ds_spared,   /* reconstruction complete to distributed
- * spare space, dead disk not yet replaced */
-rf_ds_spare,/* an available spare disk */
-rf_ds_used_spare/* a spare which has been used, and hence is
+	rf_ds_spared,   /* reconstruction complete, dead disk not 
+   yet replaced */
+	rf_ds_spare,/* an available spare disk */
+	rf_ds_used_spare,   /* a spare which has been used, and hence is
  * not available */
+	rf_ds_rebuilding_spare	/* a spare which is being rebuilt to */
 };
 typedef enum RF_DiskStatus_e RF_DiskStatus_t;
 

Index: src/sys/dev/raidframe/rf_netbsdkintf.c
diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.13 src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.14
--- src/sys/dev/raidframe/rf_netbsdkintf.c:1.250.4.13	Wed Oct 24 03:03:53 2012
+++ src/sys/dev/raidframe/rf_netbsdkintf.c	Thu Nov 20 09:38:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.13 2012/10/24 03:03:53 riz Exp $	*/
+/*	$NetBSD: rf_netbsdkintf.c,v 1.250.4.14 2014/11/20 09:38:56 sborrill Exp $	*/
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -139,7 +139,7 @@
  ***/
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.250.4.13 2012/10/24 03:03:53 riz Exp $);
+__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.250.4.14 2014/11/20 09:38:56 sborrill Exp $);
 
 #include sys/param.h
 #include sys/errno.h
@@ -1466,6 +1466,10 @@ raidioctl(dev_t dev, u_long cmd, void *d
 		}
 		for (j = d_cfg-cols, i = 0; i  d_cfg-nspares; i++, j++) {
 			d_cfg-spares[i] = raidPtr-Disks[j];
+			if (d_cfg-spares[i].status == rf_ds_rebuilding_spare) {
+/* XXX: raidctl(8) expects to see this as a used spare */
+d_cfg-spares[i].status = rf_ds_used_spare;
+			}
 		}
 		retcode = copyout(d_cfg, *ucfgp, sizeof(RF_DeviceConfig_t));
 		RF_Free(d_cfg, sizeof(RF_DeviceConfig_t));

Index: src/sys/dev/raidframe/rf_reconstruct.c
diff -u src/sys/dev/raidframe/rf_reconstruct.c:1.105.4.6 src/sys/dev/raidframe/rf_reconstruct.c:1.105.4.7
--- src/sys/dev/raidframe/rf_reconstruct.c:1.105.4.6	Wed Jun 13 14:00:49 2012
+++ src/sys/dev/raidframe/rf_reconstruct.c	Thu Nov 20 09:38:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rf_reconstruct.c,v 1.105.4.6 2012/06/13 14:00:49 sborrill Exp $	*/
+/*	$NetBSD: rf_reconstruct.c,v 1.105.4.7 2014/11/20 09:38:56 sborrill Exp $	*/
 /*
  * Copyright (c) 1995 Carnegie-Mellon University.
  * All rights reserved.
@@ -33,7 +33,7 @@
  

CVS commit: [netbsd-5] src/doc

2014-11-20 Thread Stephen Borrill
Module Name:src
Committed By:   sborrill
Date:   Thu Nov 20 12:19:27 UTC 2014

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

Log Message:
Ticket #1933


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.79 -r1.1.2.80 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.79 src/doc/CHANGES-5.3:1.1.2.80
--- src/doc/CHANGES-5.3:1.1.2.79	Thu Nov 20 08:42:03 2014
+++ src/doc/CHANGES-5.3	Thu Nov 20 12:19:27 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.79 2014/11/20 08:42:03 sborrill Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.80 2014/11/20 12:19:27 sborrill Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1155,3 +1155,12 @@ lib/libc/resolv/res_mkquery.c			1.14
 	to 64K - 1. Addresses PR/48475
 	[christos, ticket #1932]
 
+sys/dev/raidframe/raidframevar.h		1.17
+sys/dev/raidframe/rf_netbsdkintf.c		1.316
+sys/dev/raidframe/rf_reconstruct.c		1.121 via patch
+
+	Fix a long-standing bug related to rebooting while a
+	reconstruct-to-spare is underway but not yet complete.
+	Fixes PR kern/49244.
+	[oster, ticket #1933]
+



CVS commit: [netbsd-5] src/distrib

2014-11-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sat Nov  8 11:35:46 UTC 2014

Modified Files:
src/distrib/alpha/cdroms/installcd [netbsd-5]: Makefile
src/distrib/pmax/cdroms/installcd [netbsd-5]: Makefile
src/distrib/prep/cdroms/installcd [netbsd-5]: Makefile
src/distrib/sgimips/cdroms/installcd [netbsd-5]: Makefile
src/distrib/sparc/cdroms/installcd [netbsd-5]: Makefile
src/distrib/sparc64/cdroms/installcd [netbsd-5]: Makefile
src/distrib/sun3/cdroms/installcd [netbsd-5]: Makefile
src/distrib/vax/cdroms/installcd [netbsd-5]: Makefile

Log Message:
Pullup follwoing revisons to fix build break of ticket 1931 on some archs:

distrib/alpha/cdroms/installcd/Makefile 1.2
distrib/pmax/cdroms/installcd/Makefile  1.2
distrib/prep/cdroms/installcd/Makefile  1.3
distrib/sgimips/cdroms/installcd/Makefile   1.2
distrib/sparc/cdroms/installcd/Makefile 1.2
distrib/sparc64/cdroms/installcd/Makefile   1.14
distrib/sun3/cdroms/installcd/Makefile  1.2
distrib/vax/cdroms/installcd/Makefile   1.2

Use ${CDIMAGE} instead of ${CDBASE}.iso.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/alpha/cdroms/installcd/Makefile
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/pmax/cdroms/installcd/Makefile
cvs rdiff -u -r1.2 -r1.2.4.1 src/distrib/prep/cdroms/installcd/Makefile
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/sgimips/cdroms/installcd/Makefile
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/sparc/cdroms/installcd/Makefile
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/sparc64/cdroms/installcd/Makefile
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/sun3/cdroms/installcd/Makefile
cvs rdiff -u -r1.1 -r1.1.22.1 src/distrib/vax/cdroms/installcd/Makefile

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

Modified files:

Index: src/distrib/alpha/cdroms/installcd/Makefile
diff -u src/distrib/alpha/cdroms/installcd/Makefile:1.1 src/distrib/alpha/cdroms/installcd/Makefile:1.1.22.1
--- src/distrib/alpha/cdroms/installcd/Makefile:1.1	Tue Mar  6 21:56:49 2007
+++ src/distrib/alpha/cdroms/installcd/Makefile	Sat Nov  8 11:35:45 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2007/03/06 21:56:49 bouyer Exp $
+#	$NetBSD: Makefile,v 1.1.22.1 2014/11/08 11:35:45 msaitoh Exp $
 CDBASE=		alphacd		# gives ${CDBASE}.iso
 CDINSTKERNEL=	../../instkernel/instkernel
 CDKERNELS=	netbsd netbsd
@@ -6,7 +6,7 @@ CDRELEASE=	true			# include $RELEASEDIR/
 
 #make the CD bootable
 image_md_post:
-	${TOOL_INSTALLBOOT} -m${MACHINE} ${CDBASE}.iso bootxx.${MACHINE}
+	${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE}
 
 .include ${.CURDIR}/../../../common/Makefile.bootcd
 

Index: src/distrib/pmax/cdroms/installcd/Makefile
diff -u src/distrib/pmax/cdroms/installcd/Makefile:1.1 src/distrib/pmax/cdroms/installcd/Makefile:1.1.22.1
--- src/distrib/pmax/cdroms/installcd/Makefile:1.1	Tue Mar  6 21:57:16 2007
+++ src/distrib/pmax/cdroms/installcd/Makefile	Sat Nov  8 11:35:45 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.1 2007/03/06 21:57:16 bouyer Exp $
+#	$NetBSD: Makefile,v 1.1.22.1 2014/11/08 11:35:45 msaitoh Exp $
 CDBASE=		pmaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	netbsd-INSTALL.gz netbsd
@@ -6,6 +6,6 @@ CDINSTKERNEL=	../../instkernel
 
 #make the CD bootable
 image_md_post:
-	${TOOL_INSTALLBOOT} -m${MACHINE} ${CDBASE}.iso bootxx.${MACHINE}
+	${TOOL_INSTALLBOOT} -m${MACHINE} ${CDIMAGE} bootxx.${MACHINE}
 
 .include ${.CURDIR}/../../../common/Makefile.bootcd

Index: src/distrib/prep/cdroms/installcd/Makefile
diff -u src/distrib/prep/cdroms/installcd/Makefile:1.2 src/distrib/prep/cdroms/installcd/Makefile:1.2.4.1
--- src/distrib/prep/cdroms/installcd/Makefile:1.2	Wed Apr 30 08:08:32 2008
+++ src/distrib/prep/cdroms/installcd/Makefile	Sat Nov  8 11:35:45 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.2 2008/04/30 08:08:32 garbled Exp $
+#	$NetBSD: Makefile,v 1.2.4.1 2014/11/08 11:35:45 msaitoh Exp $
 CDBASE=		prepcd		# gives ${CDBASE}.iso
 CDRELEASE=	true		# include $RELEASEDIR/$MACHINE
 CDMAKEFSOPTIONS=bootimage=powerpc;cdrom/prep/installation/floppy/sysinst_com0.fs
@@ -8,7 +8,7 @@ CDMAKEFSOPTIONS=bootimage=powerpc;cdrom/
 # it.
 
 image_md_post:
-	${TOOL_FDISK} -F -f -b 1/255/16065 -0 -s 65/80/2799 -i ${CDBASE}.iso
-	${TOOL_FDISK} -F -f -b 1/255/16065 -0 -s 65/80/2799 -u ${CDBASE}.iso
+	${TOOL_FDISK} -F -f -b 1/255/16065 -0 -s 65/80/2799 -i ${CDIMAGE}
+	${TOOL_FDISK} -F -f -b 1/255/16065 -0 -s 65/80/2799 -u ${CDIMAGE}
 
 .include ${.CURDIR}/../../../common/Makefile.bootcd

Index: src/distrib/sgimips/cdroms/installcd/Makefile
diff -u src/distrib/sgimips/cdroms/installcd/Makefile:1.1 src/distrib/sgimips/cdroms/installcd/Makefile:1.1.22.1
--- src/distrib/sgimips/cdroms/installcd/Makefile:1.1	Tue Mar  6 21:57:22 2007
+++ src/distrib/sgimips/cdroms/installcd/Makefile	Sat Nov  8 11:35:45 2014
@@ -1,4 +1,4 @@
-#	

CVS commit: [netbsd-5] src/doc

2014-11-08 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov  9 05:29:20 UTC 2014

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

Log Message:
Add some files for ticket 1931.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.77 -r1.1.2.78 src/doc/CHANGES-5.3

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

Modified files:

Index: src/doc/CHANGES-5.3
diff -u src/doc/CHANGES-5.3:1.1.2.77 src/doc/CHANGES-5.3:1.1.2.78
--- src/doc/CHANGES-5.3:1.1.2.77	Fri Nov  7 08:02:16 2014
+++ src/doc/CHANGES-5.3	Sun Nov  9 05:29:20 2014
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-5.3,v 1.1.2.77 2014/11/07 08:02:16 msaitoh Exp $
+# $NetBSD: CHANGES-5.3,v 1.1.2.78 2014/11/09 05:29:20 msaitoh Exp $
 
 A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3
 release:
@@ -1134,6 +1134,14 @@ distrib/common/Makefile.bootcd			1.18
 distrib/notes/common/main			1.484
 distrib/notes/macppc/prep.OPENFIRMWARE		1.15
 distrib/notes/sparc/install			1.57
+distrib/alpha/cdroms/installcd/Makefile		1.2
+distrib/pmax/cdroms/installcd/Makefile		1.2
+distrib/prep/cdroms/installcd/Makefile		1.3
+distrib/sgimips/cdroms/installcd/Makefile	1.2
+distrib/sparc/cdroms/installcd/Makefile		1.2
+distrib/sparc64/cdroms/installcd/Makefile	1.14
+distrib/sun3/cdroms/installcd/Makefile		1.2
+distrib/vax/cdroms/installcd/Makefile		1.2
 etc/Makefile	1.394
 share/man/man7/release.7			1.32
 



  1   2   3   4   5   6   7   8   9   10   >