CVS commit: [netbsd-5-2] src/sys/ufs/lfs
Module Name:src Committed By: snj Date: Mon Nov 9 22:50:18 UTC 2015 Modified Files: src/sys/ufs/lfs [netbsd-5-2]: lfs_segment.c Log Message: Fix ticket #1974 fallout. To generate a diff of this commit: cvs rdiff -u -r1.213.22.1 -r1.213.22.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.22.1 src/sys/ufs/lfs/lfs_segment.c:1.213.22.2 --- src/sys/ufs/lfs/lfs_segment.c:1.213.22.1 Sat Nov 7 20:31:22 2015 +++ src/sys/ufs/lfs/lfs_segment.c Mon Nov 9 22:50:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_segment.c,v 1.213.22.1 2015/11/07 20:31:22 snj Exp $ */ +/* $NetBSD: lfs_segment.c,v 1.213.22.2 2015/11/09 22:50:18 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.22.1 2015/11/07 20:31:22 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.22.2 2015/11/09 22:50:18 snj 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-1] src/sys/ufs/lfs
Module Name:src Committed By: snj Date: Mon Nov 9 22:49:50 UTC 2015 Modified Files: src/sys/ufs/lfs [netbsd-5-1]: lfs_segment.c Log Message: Fix ticket #1974 fallout. To generate a diff of this commit: cvs rdiff -u -r1.213.18.1 -r1.213.18.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.18.1 src/sys/ufs/lfs/lfs_segment.c:1.213.18.2 --- src/sys/ufs/lfs/lfs_segment.c:1.213.18.1 Sat Nov 7 20:30:56 2015 +++ src/sys/ufs/lfs/lfs_segment.c Mon Nov 9 22:49:50 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lfs_segment.c,v 1.213.18.1 2015/11/07 20:30:56 snj Exp $ */ +/* $NetBSD: lfs_segment.c,v 1.213.18.2 2015/11/09 22:49:50 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.18.1 2015/11/07 20:30:56 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lfs_segment.c,v 1.213.18.2 2015/11/09 22:49:50 snj 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/doc
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 watermar
CVS commit: [netbsd-5] src/sys/dev/pci
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 bridg
CVS commit: [netbsd-5] src/sys/dev/pci
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 Ether
CVS commit: [netbsd-5] src/doc
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/dev/mii
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 BROA
CVS commit: [netbsd-5] src/sys/dev/mii
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 MII_MO
CVS commit: [netbsd-5] src/sys/ufs/lfs
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-2] src/doc
Module Name:src Committed By: snj Date: Sat Nov 7 20:57:58 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: tickets 1974, 1978-1981 To generate a diff of this commit: cvs rdiff -u -r1.1.2.35 -r1.1.2.36 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.35 src/doc/CHANGES-5.2.4:1.1.2.36 --- src/doc/CHANGES-5.2.4:1.1.2.35 Fri Aug 14 06:00:34 2015 +++ src/doc/CHANGES-5.2.4 Sat Nov 7 20:57:58 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.35 2015/08/14 06:00:34 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.36 2015/11/07 20:57:58 snj Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2696,3 +2696,76 @@ 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] + +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] + +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-1] src/doc
Module Name:src Committed By: snj Date: Sat Nov 7 20:55:34 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: tickets 1974, 1978-1981 To generate a diff of this commit: cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.34 src/doc/CHANGES-5.1.6:1.1.2.35 --- src/doc/CHANGES-5.1.6:1.1.2.34 Fri Aug 14 06:00:50 2015 +++ src/doc/CHANGES-5.1.6 Sat Nov 7 20:55:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.34 2015/08/14 06:00:50 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.35 2015/11/07 20:55:34 snj Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2696,3 +2696,76 @@ 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] + +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] + +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
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/sys/kern
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-1] src/sys/kern
Module Name:src Committed By: snj Date: Sat Nov 7 20:49:19 UTC 2015 Modified Files: src/sys/kern [netbsd-5-1]: 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.2.2.1 -r1.214.4.2.2.2 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.2.2.1 src/sys/kern/kern_exit.c:1.214.4.2.2.2 --- src/sys/kern/kern_exit.c:1.214.4.2.2.1 Sat Nov 7 20:42:59 2015 +++ src/sys/kern/kern_exit.c Sat Nov 7 20:49:19 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.214.4.2.2.1 2015/11/07 20:42:59 snj Exp $ */ +/* $NetBSD: kern_exit.c,v 1.214.4.2.2.2 2015/11/07 20:49:19 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.2.1 2015/11/07 20:42:59 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2.2.2 2015/11/07 20:49:19 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-2] src/sys/kern
Module Name:src Committed By: snj Date: Sat Nov 7 20:48:58 UTC 2015 Modified Files: src/sys/kern [netbsd-5-2]: 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.2.6.1 -r1.214.4.2.6.2 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.2.6.1 src/sys/kern/kern_exit.c:1.214.4.2.6.2 --- src/sys/kern/kern_exit.c:1.214.4.2.6.1 Sat Nov 7 20:42:25 2015 +++ src/sys/kern/kern_exit.c Sat Nov 7 20:48:58 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_exit.c,v 1.214.4.2.6.1 2015/11/07 20:42:25 snj Exp $ */ +/* $NetBSD: kern_exit.c,v 1.214.4.2.6.2 2015/11/07 20:48:58 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.6.1 2015/11/07 20:42:25 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_exit.c,v 1.214.4.2.6.2 2015/11/07 20:48:58 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-2] src/sys/kern
Module Name:src Committed By: snj Date: Sat Nov 7 20:47:08 UTC 2015 Modified Files: src/sys/kern [netbsd-5-2]: 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.8.2.1 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.8.2.1 --- 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:47:08 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.8.2.1 2015/11/07 20:47:08 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.8.2.1 2015/11/07 20:47:08 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-1] src/sys/kern
Module Name:src Committed By: snj Date: Sat Nov 7 20:46:38 UTC 2015 Modified Files: src/sys/kern [netbsd-5-1]: 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.6.2.1 -r1.289.4.6.2.2 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.6.2.1 src/sys/kern/kern_sig.c:1.289.4.6.2.2 --- src/sys/kern/kern_sig.c:1.289.4.6.2.1 Sat Mar 17 19:15:12 2012 +++ src/sys/kern/kern_sig.c Sat Nov 7 20:46:37 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_sig.c,v 1.289.4.6.2.1 2012/03/17 19:15:12 bouyer Exp $ */ +/* $NetBSD: kern_sig.c,v 1.289.4.6.2.2 2015/11/07 20:46:37 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.6.2.1 2012/03/17 19:15:12 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.289.4.6.2.2 2015/11/07 20:46:37 snj Exp $"); #include "opt_ptrace.h" #include "opt_compat_sunos.h" @@ -1391,14 +1391,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/kern
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/kern
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->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(&kq); sigclearall(p, &contsigmask, &kq); 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->l_biglocks); sigclearall(p, &contsigmask, &kq); + + 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.
CVS commit: [netbsd-5-1] src/sys/kern
Module Name:src Committed By: snj Date: Sat Nov 7 20:42:59 UTC 2015 Modified Files: src/sys/kern [netbsd-5-1]: 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.3.6.1 src/sys/kern/kern_exec.c cvs rdiff -u -r1.214.4.2 -r1.214.4.2.2.1 src/sys/kern/kern_exit.c cvs rdiff -u -r1.254.2.6 -r1.254.2.6.6.1 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.3.6.1 --- 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:42:59 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.3.6.1 2015/11/07 20:42:59 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.3.6.1 2015/11/07 20:42:59 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->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(&kq); sigclearall(p, &contsigmask, &kq); 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.2.2.1 --- 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:42:59 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.2.2.1 2015/11/07 20:42:59 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.2.2.1 2015/11/07 20:42:59 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->l_biglocks); sigclearall(p, &contsigmask, &kq); + + 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.6.6.1 --- 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:42:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.254.2.6 2009/04/23 17:47:13 s
CVS commit: [netbsd-5-2] src/sys/kern
Module Name:src Committed By: snj Date: Sat Nov 7 20:42:26 UTC 2015 Modified Files: src/sys/kern [netbsd-5-2]: 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.3.10.1 src/sys/kern/kern_exec.c cvs rdiff -u -r1.214.4.2 -r1.214.4.2.6.1 src/sys/kern/kern_exit.c cvs rdiff -u -r1.254.2.6 -r1.254.2.6.10.1 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.3.10.1 --- 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:42:25 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.3.10.1 2015/11/07 20:42:25 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.3.10.1 2015/11/07 20:42:25 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->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(&kq); sigclearall(p, &contsigmask, &kq); 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.2.6.1 --- 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:42:25 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.2.6.1 2015/11/07 20:42:25 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.2.6.1 2015/11/07 20:42:25 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->l_biglocks); sigclearall(p, &contsigmask, &kq); + + 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.6.10.1 --- 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:42:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.254.2.6 2009/04/23 17:4
CVS commit: [netbsd-5-1] src/sys/dev/mii
Module Name:src Committed By: snj Date: Sat Nov 7 20:36:42 UTC 2015 Modified Files: src/sys/dev/mii [netbsd-5-1]: 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. To generate a diff of this commit: cvs rdiff -u -r1.5.2.2 -r1.5.2.2.2.1 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.2.2.1 --- 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:36:42 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.2.2.1 2015/11/07 20:36:42 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.2.2.1 2015/11/07 20:36:42 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-2] src/sys/dev/mii
Module Name:src Committed By: snj Date: Sat Nov 7 20:37:09 UTC 2015 Modified Files: src/sys/dev/mii [netbsd-5-2]: 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. To generate a diff of this commit: cvs rdiff -u -r1.5.2.2 -r1.5.2.2.6.1 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.2.6.1 --- 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:37:09 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.2.6.1 2015/11/07 20:37:09 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.2.6.1 2015/11/07 20:37:09 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/dev/mii
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/libexec/ftpd
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, &buf) == 0) { + (void)memset(&ut, 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(&ut.ut_ss, &haddr->si_su, haddr->su_len); - else - (void)memset(&ut.ut_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-2] src/sys/ufs/lfs
Module Name:src Committed By: snj Date: Sat Nov 7 20:31:22 UTC 2015 Modified Files: src/sys/ufs/lfs [netbsd-5-2]: 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.22.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.22.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:31:22 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.22.1 2015/11/07 20:31:22 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.22.1 2015/11/07 20:31:22 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/ufs/lfs
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-1] src/sys/ufs/lfs
Module Name:src Committed By: snj Date: Sat Nov 7 20:30:56 UTC 2015 Modified Files: src/sys/ufs/lfs [netbsd-5-1]: 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.18.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.18.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:56 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.18.1 2015/11/07 20:30:56 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.18.1 2015/11/07 20:30:56 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/lib/libm/src
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-1] src/doc
Module Name:src Committed By: riz Date: Tue Sep 15 00:03:24 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.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.53 -r1.1.2.54 src/doc/CHANGES-5.1.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.1.3 diff -u src/doc/CHANGES-5.1.3:1.1.2.53 src/doc/CHANGES-5.1.3:1.1.2.54 --- src/doc/CHANGES-5.1.3:1.1.2.53 Sun Sep 22 22:12:05 2013 +++ src/doc/CHANGES-5.1.3 Tue Sep 15 00:03:24 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.3,v 1.1.2.53 2013/09/22 22:12:05 riz Exp $ +# $NetBSD: CHANGES-5.1.3,v 1.1.2.54 2015/09/15 00:03:24 riz Exp $ A complete list of changes from the NetBSD 5.1.2 release to the NetBSD 5.1.3 release: @@ -2393,54 +2393,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 +xsrc/external/mit/libXe
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: riz Date: Tue Sep 15 00:03:37 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.1 Log Message: Fix file list for ticket 1865; add a missing "/" To generate a diff of this commit: cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-5.2.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.1 diff -u src/doc/CHANGES-5.2.1:1.1.2.22 src/doc/CHANGES-5.2.1:1.1.2.23 --- src/doc/CHANGES-5.2.1:1.1.2.22 Sun Sep 22 22:43:10 2013 +++ src/doc/CHANGES-5.2.1 Tue Sep 15 00:03:37 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.1,v 1.1.2.22 2013/09/22 22:43:10 riz Exp $ +# $NetBSD: CHANGES-5.2.1,v 1.1.2.23 2015/09/15 00:03:37 riz Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.2.1 release: @@ -107,54 +107,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 +xsrc/external/mit/libXext/d
CVS commit: [netbsd-5] src/doc
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 +xsrc/external/mit/libXext/dist/src/Xdb
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: msaitoh Date: Fri Aug 14 06:00:34 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket 1976. To generate a diff of this commit: cvs rdiff -u -r1.1.2.34 -r1.1.2.35 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.34 src/doc/CHANGES-5.2.4:1.1.2.35 --- src/doc/CHANGES-5.2.4:1.1.2.34 Fri Jul 24 07:46:03 2015 +++ src/doc/CHANGES-5.2.4 Fri Aug 14 06:00:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.34 2015/07/24 07:46:03 martin Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.35 2015/08/14 06:00:34 msaitoh Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2655,3 +2655,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-1] src/doc
Module Name:src Committed By: msaitoh Date: Fri Aug 14 06:00:50 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket 1976. To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.33 src/doc/CHANGES-5.1.6:1.1.2.34 --- src/doc/CHANGES-5.1.6:1.1.2.33 Fri Jul 24 07:47:34 2015 +++ src/doc/CHANGES-5.1.6 Fri Aug 14 06:00:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.33 2015/07/24 07:47:34 martin Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.34 2015/08/14 06:00:50 msaitoh Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2655,3 +2655,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/doc
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-1] src/crypto/dist/openssl
Module Name:src Committed By: msaitoh Date: Fri Aug 14 05:59:39 UTC 2015 Modified Files: src/crypto/dist/openssl [netbsd-5-1]: e_os2.h src/crypto/dist/openssl/crypto/asn1 [netbsd-5-1]: a_int.c tasn_new.c src/crypto/dist/openssl/crypto/bn [netbsd-5-1]: bn.h bn_err.c bn_print.c bn_rand.c bn_shift.c src/crypto/dist/openssl/crypto/cms [netbsd-5-1]: cms_smime.c src/crypto/dist/openssl/crypto/ec [netbsd-5-1]: 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-1]: ecdsatest.c ecs_ossl.c src/crypto/dist/openssl/crypto/objects [netbsd-5-1]: obj_dat.c src/crypto/dist/openssl/crypto/ocsp [netbsd-5-1]: ocsp_vfy.c src/crypto/dist/openssl/crypto/pem [netbsd-5-1]: pem_pk8.c src/crypto/dist/openssl/crypto/pkcs7 [netbsd-5-1]: pk7_doit.c src/crypto/dist/openssl/crypto/x509 [netbsd-5-1]: x509_lu.c x509_vfy.c src/crypto/dist/openssl/doc/crypto [netbsd-5-1]: BN_rand.pod BN_set_bit.pod pem.pod src/crypto/dist/openssl/ssl [netbsd-5-1]: 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-1]: 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.12.1 src/crypto/dist/openssl/e_os2.h cvs rdiff -u -r1.1.1.8 -r1.1.1.8.12.1 \ src/crypto/dist/openssl/crypto/asn1/a_int.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.12.1 \ src/crypto/dist/openssl/crypto/asn1/tasn_new.c cvs rdiff -u -r1.12.12.1 -r1.12.12.2 src/crypto/dist/openssl/crypto/bn/bn.h cvs rdiff -u -r1.1.1.7 -r1.1.1.7.12.1 \ src/crypto/dist/openssl/crypto/bn/bn_err.c cvs rdiff -u -r1.9 -r1.9.12.1 src/crypto/dist/openssl/crypto/bn/bn_print.c cvs rdiff -u -r1.1.1.6 -r1.1.1.6.34.1 \ src/crypto/dist/openssl/crypto/bn/bn_rand.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.34.1 \ src/crypto/dist/openssl/crypto/bn/bn_shift.c cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.1.6.1 \ src/crypto/dist/openssl/crypto/cms/cms_smime.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.12.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.34.1 \ src/crypto/dist/openssl/crypto/ec/ec_check.c cvs rdiff -u -r1.1.1.1.34.1 -r1.1.1.1.34.2 \ src/crypto/dist/openssl/crypto/ec/ec_key.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.12.1 \ src/crypto/dist/openssl/crypto/ec/ec_lib.c cvs rdiff -u -r1.1.1.4.34.1 -r1.1.1.4.34.2 \ src/crypto/dist/openssl/crypto/ec/ecp_smpl.c cvs rdiff -u -r1.1.1.2 -r1.1.1.2.12.1 \ src/crypto/dist/openssl/crypto/ecdsa/ecdsatest.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.12.1 \ src/crypto/dist/openssl/crypto/ecdsa/ecs
CVS commit: [netbsd-5-2] src/crypto/dist/openssl
Module Name:src Committed By: msaitoh Date: Fri Aug 14 05:58:12 UTC 2015 Modified Files: src/crypto/dist/openssl [netbsd-5-2]: e_os2.h src/crypto/dist/openssl/crypto/asn1 [netbsd-5-2]: a_int.c tasn_new.c src/crypto/dist/openssl/crypto/bn [netbsd-5-2]: bn.h bn_err.c bn_print.c bn_rand.c bn_shift.c src/crypto/dist/openssl/crypto/cms [netbsd-5-2]: cms_smime.c src/crypto/dist/openssl/crypto/ec [netbsd-5-2]: 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-2]: ecdsatest.c ecs_ossl.c src/crypto/dist/openssl/crypto/objects [netbsd-5-2]: obj_dat.c src/crypto/dist/openssl/crypto/ocsp [netbsd-5-2]: ocsp_vfy.c src/crypto/dist/openssl/crypto/pem [netbsd-5-2]: pem_pk8.c src/crypto/dist/openssl/crypto/pkcs7 [netbsd-5-2]: pk7_doit.c src/crypto/dist/openssl/crypto/x509 [netbsd-5-2]: x509_lu.c x509_vfy.c src/crypto/dist/openssl/doc/crypto [netbsd-5-2]: BN_rand.pod BN_set_bit.pod pem.pod src/crypto/dist/openssl/ssl [netbsd-5-2]: 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-2]: 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.2.1 src/crypto/dist/openssl/e_os2.h cvs rdiff -u -r1.1.1.8 -r1.1.1.8.2.1 \ src/crypto/dist/openssl/crypto/asn1/a_int.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.2.1 \ src/crypto/dist/openssl/crypto/asn1/tasn_new.c cvs rdiff -u -r1.12.2.1 -r1.12.2.2 src/crypto/dist/openssl/crypto/bn/bn.h cvs rdiff -u -r1.1.1.7 -r1.1.1.7.2.1 \ src/crypto/dist/openssl/crypto/bn/bn_err.c cvs rdiff -u -r1.9 -r1.9.2.1 src/crypto/dist/openssl/crypto/bn/bn_print.c cvs rdiff -u -r1.1.1.6 -r1.1.1.6.38.1 \ src/crypto/dist/openssl/crypto/bn/bn_rand.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.38.1 \ src/crypto/dist/openssl/crypto/bn/bn_shift.c cvs rdiff -u -r1.1.1.1.8.1 -r1.1.1.1.8.1.10.1 \ src/crypto/dist/openssl/crypto/cms/cms_smime.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.2.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.38.1 \ src/crypto/dist/openssl/crypto/ec/ec_check.c cvs rdiff -u -r1.1.1.1.38.1 -r1.1.1.1.38.2 \ src/crypto/dist/openssl/crypto/ec/ec_key.c cvs rdiff -u -r1.1.1.4 -r1.1.1.4.2.1 \ src/crypto/dist/openssl/crypto/ec/ec_lib.c cvs rdiff -u -r1.1.1.4.38.1 -r1.1.1.4.38.2 \ src/crypto/dist/openssl/crypto/ec/ecp_smpl.c cvs rdiff -u -r1.1.1.2 -r1.1.1.2.2.1 \ src/crypto/dist/openssl/crypto/ecdsa/ecdsatest.c cvs rdiff -u -r1.1.1.3 -r1.1.1.3.2.1 \ src/crypto/dist/openssl/crypto/ecdsa/ecs_ossl.c cv
CVS commit: [netbsd-5] src/crypto/dist/openssl
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 \ src/cr
CVS commit: [netbsd-5] src/doc
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/doc
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-1] src/doc
Module Name:src Committed By: martin Date: Fri Jul 24 07:47:34 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket #1973 To generate a diff of this commit: cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.32 src/doc/CHANGES-5.1.6:1.1.2.33 --- src/doc/CHANGES-5.1.6:1.1.2.32 Wed Jul 1 07:19:29 2015 +++ src/doc/CHANGES-5.1.6 Fri Jul 24 07:47:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.32 2015/07/01 07:19:29 bouyer Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.33 2015/07/24 07:47:34 martin Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2647,3 +2647,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-1] src/sys/netinet
Module Name:src Committed By: martin Date: Fri Jul 24 07:47:03 UTC 2015 Modified Files: src/sys/netinet [netbsd-5-1]: 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.5.2.1 src/sys/netinet/tcp_input.c cvs rdiff -u -r1.167.20.1 -r1.167.20.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.5.2.1 --- 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:47:02 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.5.2.1 2015/07/24 07:47:02 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -145,7 +145,7 @@ */ #include -__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.5.2.1 2015/07/24 07:47:02 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.20.1 src/sys/netinet/tcp_output.c:1.167.20.2 --- src/sys/netinet/tcp_output.c:1.167.20.1 Tue Mar 29 20:13:03 2011 +++ src/sys/netinet/tcp_output.c Fri Jul 24 07:47:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tcp_output.c,v 1.167.20.1 2011/03/29 20:13:03 riz Exp $ */ +/* $NetBSD: tcp_output.c,v 1.167.20.2 2015/07/24 07:47:02 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -135,7 +135,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.167.20.1 2011/03/29 20:13:03 riz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.167.20.2 2015/07/24 07:47:02 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-2] src/doc
Module Name:src Committed By: martin Date: Fri Jul 24 07:46:03 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket #1973 To generate a diff of this commit: cvs rdiff -u -r1.1.2.33 -r1.1.2.34 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.33 src/doc/CHANGES-5.2.4:1.1.2.34 --- src/doc/CHANGES-5.2.4:1.1.2.33 Wed Jul 1 07:19:30 2015 +++ src/doc/CHANGES-5.2.4 Fri Jul 24 07:46:03 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.33 2015/07/01 07:19:30 bouyer Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.34 2015/07/24 07:46:03 martin Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2647,3 +2647,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-2] src/sys/netinet
Module Name:src Committed By: martin Date: Fri Jul 24 07:44:35 UTC 2015 Modified Files: src/sys/netinet [netbsd-5-2]: 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.5.6.1 src/sys/netinet/tcp_input.c cvs rdiff -u -r1.167.10.1 -r1.167.10.1.2.1 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.5.6.1 --- 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:44:35 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.5.6.1 2015/07/24 07:44:35 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -145,7 +145,7 @@ */ #include -__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.5.6.1 2015/07/24 07:44:35 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.1.2.1 --- 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:44:35 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.1.2.1 2015/07/24 07:44:35 martin Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -135,7 +135,7 @@ */ #include -__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.1.2.1 2015/07/24 07:44:35 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/sys/netinet
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 -__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 -__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-1] src/doc
Module Name:src Committed By: bouyer Date: Wed Jul 1 07:19:29 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: ticket 1971 To generate a diff of this commit: cvs rdiff -u -r1.1.2.31 -r1.1.2.32 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.31 src/doc/CHANGES-5.1.6:1.1.2.32 --- src/doc/CHANGES-5.1.6:1.1.2.31 Thu Jun 4 09:07:28 2015 +++ src/doc/CHANGES-5.1.6 Wed Jul 1 07:19:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.31 2015/06/04 09:07:28 martin Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.32 2015/07/01 07:19:29 bouyer Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2633,3 +2633,17 @@ sys/arch/x86/x86/intel_busclock.c 1.10, [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
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-2] src/doc
Module Name:src Committed By: bouyer Date: Wed Jul 1 07:19:30 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: ticket 1971 To generate a diff of this commit: cvs rdiff -u -r1.1.2.32 -r1.1.2.33 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.32 src/doc/CHANGES-5.2.4:1.1.2.33 --- src/doc/CHANGES-5.2.4:1.1.2.32 Thu Jun 4 09:05:29 2015 +++ src/doc/CHANGES-5.2.4 Wed Jul 1 07:19:30 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.32 2015/06/04 09:05:29 martin Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.33 2015/07/01 07:19:30 bouyer Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2633,3 +2633,17 @@ sys/arch/x86/x86/intel_busclock.c 1.10, [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-2] src/usr.bin/calendar
Module Name:src Committed By: bouyer Date: Wed Jul 1 07:18:42 UTC 2015 Modified Files: src/usr.bin/calendar [netbsd-5-2]: 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.2.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.2.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:42 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.2.1 2015/07/01 07:18:42 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.2.1 2015/07/01 07:18:42 bouyer Exp $"); #endif /* not lint */ #include @@ -48,6 +48,7 @@ __RCSID("$NetBSD: calendar.c,v 1.47 2008 #include #include +#include #include #include #include @@ -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/usr.bin/calendar
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 @@ -48,6 +48,7 @@ __RCSID("$NetBSD: calendar.c,v 1.47 2008 #include #include +#include #include #include #include @@ -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-1] src/usr.bin/calendar
Module Name:src Committed By: bouyer Date: Wed Jul 1 07:18:37 UTC 2015 Modified Files: src/usr.bin/calendar [netbsd-5-1]: 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.12.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.12.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:37 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.12.1 2015/07/01 07:18:37 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.12.1 2015/07/01 07:18:37 bouyer Exp $"); #endif /* not lint */ #include @@ -48,6 +48,7 @@ __RCSID("$NetBSD: calendar.c,v 1.47 2008 #include #include +#include #include #include #include @@ -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/lib/libcurses
Module Name:src Committed By: snj Date: Fri Jun 19 17:14:04 UTC 2015 Modified Files: src/lib/libcurses [netbsd-5]: curses.h Log Message: Pull up following revision(s) (requested by joerg in ticket #1970): lib/libcurses/curses.h: revision 1.107 mvgetnstr should have a length argument as the name implies. To generate a diff of this commit: cvs rdiff -u -r1.93.8.1 -r1.93.8.2 src/lib/libcurses/curses.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libcurses/curses.h diff -u src/lib/libcurses/curses.h:1.93.8.1 src/lib/libcurses/curses.h:1.93.8.2 --- src/lib/libcurses/curses.h:1.93.8.1 Thu Dec 10 23:18:48 2009 +++ src/lib/libcurses/curses.h Fri Jun 19 17:14:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: curses.h,v 1.93.8.1 2009/12/10 23:18:48 snj Exp $ */ +/* $NetBSD: curses.h,v 1.93.8.2 2015/06/19 17:14:04 snj Exp $ */ /* * Copyright (c) 1981, 1993, 1994 @@ -475,7 +475,7 @@ extern int ESCDELAY; /* Delay between #define mvaddstr(y, x, s) mvwaddstr(stdscr, y, x, s) #define mvdelch(y, x) mvwdelch(stdscr, y, x) #define mvgetch(y, x) mvwgetch(stdscr, y, x) -#define mvgetnstr(y, x, s) mvwgetnstr(stdscr, y, x, s, n) +#define mvgetnstr(y, x, s, n) mvwgetnstr(stdscr, y, x, s, n) #define mvgetstr(y, x, s) mvwgetstr(stdscr, y, x, s) #define mvinch(y, x) mvwinch(stdscr, y, x) #define mvinchnstr(y, x, c, n) mvwinchnstr(stdscr, y, x, c, n)
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: martin Date: Thu Jun 4 09:07:28 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket #1963 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.30 src/doc/CHANGES-5.1.6:1.1.2.31 --- src/doc/CHANGES-5.1.6:1.1.2.30 Mon Jun 1 15:54:15 2015 +++ src/doc/CHANGES-5.1.6 Thu Jun 4 09:07:28 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.30 2015/06/01 15:54:15 sborrill Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.31 2015/06/04 09:07:28 martin Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2625,3 +2625,11 @@ 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-2] src/doc
Module Name:src Committed By: martin Date: Thu Jun 4 09:05:30 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket #1963 To generate a diff of this commit: cvs rdiff -u -r1.1.2.31 -r1.1.2.32 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.31 src/doc/CHANGES-5.2.4:1.1.2.32 --- src/doc/CHANGES-5.2.4:1.1.2.31 Mon Jun 1 15:53:39 2015 +++ src/doc/CHANGES-5.2.4 Thu Jun 4 09:05:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.31 2015/06/01 15:53:39 sborrill Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.32 2015/06/04 09:05:29 martin Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2625,3 +2625,11 @@ 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/doc
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-1] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Thu Jun 4 08:58:54 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-5-1]: 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.4 -r1.5.10.4.2.1 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.4 src/sys/arch/x86/x86/intel_busclock.c:1.5.10.4.2.1 --- src/sys/arch/x86/x86/intel_busclock.c:1.5.10.4 Tue Aug 31 10:50:22 2010 +++ src/sys/arch/x86/x86/intel_busclock.c Thu Jun 4 08:58:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: intel_busclock.c,v 1.5.10.4 2010/08/31 10:50:22 bouyer Exp $ */ +/* $NetBSD: intel_busclock.c,v 1.5.10.4.2.1 2015/06/04 08:58:54 martin Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.5.10.4 2010/08/31 10:50:22 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intel_busclock.c,v 1.5.10.4.2.1 2015/06/04 08:58:54 martin Exp $"); #include #include @@ -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) - * 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: @@ -122,7 +121,11 @@ p3_get_bus_clock(struct cpu_info *ci) } break; case 0xd: /* Pentium M (90 nm, Dothan) */ - msr = rdmsr(MSR_FSB_FREQ); + 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 0: @@ -138,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: @@ -172,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); @@ -198,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; + default: + aprint_debug("%s: unknown Atom FSB_FREQ value %d", + device_xname(ci->ci_dev), bus); + goto print_msr; + } + break; + case 0x37: /* Silvermont */ + case 0x4a: + case 0x4d: + case 0x5a: + case 0x5d: + 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
CVS commit: [netbsd-5-2] src/sys/arch/x86/x86
Module Name:src Committed By: martin Date: Thu Jun 4 08:57:03 UTC 2015 Modified Files: src/sys/arch/x86/x86 [netbsd-5-2]: 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.5.2.1 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.5.2.1 --- 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:57:03 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.5.2.1 2015/06/04 08:57:03 martin Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__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.5.2.1 2015/06/04 08:57:03 martin Exp $"); #include #include @@ -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: +
CVS commit: [netbsd-5] src/sys/arch/x86/x86
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 -__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 #include @@ -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;
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:54:58 UTC 2015 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: Reword ticket #1968 To generate a diff of this commit: cvs rdiff -u -r1.1.2.118 -r1.1.2.119 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.118 src/doc/CHANGES-5.3:1.1.2.119 --- src/doc/CHANGES-5.3:1.1.2.118 Mon Jun 1 15:48:07 2015 +++ src/doc/CHANGES-5.3 Mon Jun 1 15:54:58 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.118 2015/06/01 15:48:07 sborrill Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.119 2015/06/01 15:54:58 sborrill Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -3911,7 +3911,7 @@ sys/arch/i386/i386/cpufunc.S 1.16-1.17 sys/arch/x86/include/specialreg.h 1.72 via patch - Add CPUID_TO_*() macros to avoid bug. Old macros are kept for + Backport CPUID_TO_*() macros. Old macros are kept for compatibility. [msaitoh, ticket #1968]
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:54:15 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Reword ticket #1968 To generate a diff of this commit: cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.29 src/doc/CHANGES-5.1.6:1.1.2.30 --- src/doc/CHANGES-5.1.6:1.1.2.29 Mon Jun 1 15:52:03 2015 +++ src/doc/CHANGES-5.1.6 Mon Jun 1 15:54:15 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.29 2015/06/01 15:52:03 sborrill Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.30 2015/06/01 15:54:15 sborrill Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2621,7 +2621,7 @@ sys/arch/i386/i386/cpufunc.S 1.16-1.17 sys/arch/x86/include/specialreg.h 1.72 via patch - Add CPUID_TO_*() macros to avoid bug. Old macros are kept for + Backport CPUID_TO_*() macros. Old macros are kept for compatibility. [msaitoh, ticket #1968]
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:52:41 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket #1968 To generate a diff of this commit: cvs rdiff -u -r1.1.2.29 -r1.1.2.30 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.29 src/doc/CHANGES-5.2.4:1.1.2.30 --- src/doc/CHANGES-5.2.4:1.1.2.29 Mon Jun 1 14:46:33 2015 +++ src/doc/CHANGES-5.2.4 Mon Jun 1 15:52:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.29 2015/06/01 14:46:33 sborrill Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.30 2015/06/01 15:52:41 sborrill Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2619,3 +2619,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-2] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:53:39 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Reword ticket #1968 To generate a diff of this commit: cvs rdiff -u -r1.1.2.30 -r1.1.2.31 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.30 src/doc/CHANGES-5.2.4:1.1.2.31 --- src/doc/CHANGES-5.2.4:1.1.2.30 Mon Jun 1 15:52:41 2015 +++ src/doc/CHANGES-5.2.4 Mon Jun 1 15:53:39 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.30 2015/06/01 15:52:41 sborrill Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.31 2015/06/01 15:53:39 sborrill Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2621,7 +2621,7 @@ sys/arch/i386/i386/cpufunc.S 1.16-1.17 sys/arch/x86/include/specialreg.h 1.72 via patch - Add CPUID_TO_*() macros to avoid bug. Old macros are kept for + Backport CPUID_TO_*() macros. Old macros are kept for compatibility. [msaitoh, ticket #1968]
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:52:03 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket #1968 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.28 src/doc/CHANGES-5.1.6:1.1.2.29 --- src/doc/CHANGES-5.1.6:1.1.2.28 Mon Jun 1 14:45:27 2015 +++ src/doc/CHANGES-5.1.6 Mon Jun 1 15:52:03 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.28 2015/06/01 14:45:27 sborrill Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.29 2015/06/01 15:52:03 sborrill Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2619,3 +2619,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-2] src/sys/arch/x86/include
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:49:16 UTC 2015 Modified Files: src/sys/arch/x86/include [netbsd-5-2]: 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 Backup CPUID_TO_*() macros. Old macros are kept for compatibility. To generate a diff of this commit: cvs rdiff -u -r1.31.4.2 -r1.31.4.2.2.1 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.2 src/sys/arch/x86/include/specialreg.h:1.31.4.2.2.1 --- src/sys/arch/x86/include/specialreg.h:1.31.4.2 Wed Nov 28 04:39:03 2012 +++ src/sys/arch/x86/include/specialreg.h Mon Jun 1 15:49:16 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.31.4.2 2012/11/28 04:39:03 riz Exp $ */ +/* $NetBSD: specialreg.h,v 1.31.4.2.2.1 2015/06/01 15:49:16 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-1] src/sys/arch/x86/include
Module Name:src Committed By: sborrill Date: Mon Jun 1 15:49:47 UTC 2015 Modified Files: src/sys/arch/x86/include [netbsd-5-1]: 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 Backup CPUID_TO_*() macros. Old macros are kept for compatibility. To generate a diff of this commit: cvs rdiff -u -r1.31.4.1 -r1.31.4.1.2.1 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.1 src/sys/arch/x86/include/specialreg.h:1.31.4.1.2.1 --- src/sys/arch/x86/include/specialreg.h:1.31.4.1 Tue Jun 16 02:23:31 2009 +++ src/sys/arch/x86/include/specialreg.h Mon Jun 1 15:49:47 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: specialreg.h,v 1.31.4.1 2009/06/16 02:23:31 snj Exp $ */ +/* $NetBSD: specialreg.h,v 1.31.4.1.2.1 2015/06/01 15:49:47 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
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
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-2] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 14:46:33 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket #1969 To generate a diff of this commit: cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.28 src/doc/CHANGES-5.2.4:1.1.2.29 --- src/doc/CHANGES-5.2.4:1.1.2.28 Fri May 22 11:45:01 2015 +++ src/doc/CHANGES-5.2.4 Mon Jun 1 14:46:33 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.28 2015/05/22 11:45:01 sborrill Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.29 2015/06/01 14:46:33 sborrill Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2612,3 +2612,10 @@ sys/arch/xen/xen/xenevt.c 1.42 Fix off by one error, addresses port-xen/49919. [bouyer, ticket #1965] +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-1] src/doc
Module Name:src Committed By: sborrill Date: Mon Jun 1 14:45:27 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket #1969 To generate a diff of this commit: cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.27 src/doc/CHANGES-5.1.6:1.1.2.28 --- src/doc/CHANGES-5.1.6:1.1.2.27 Fri May 22 11:22:34 2015 +++ src/doc/CHANGES-5.1.6 Mon Jun 1 14:45:27 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.27 2015/05/22 11:22:34 sborrill Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.28 2015/06/01 14:45:27 sborrill Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2612,3 +2612,10 @@ sys/arch/xen/xen/xenevt.c 1.42 Fix off by one error, addresses port-xen/49919. [bouyer, ticket #1965] +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/doc
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-1] src/sys/arch
Module Name:src Committed By: sborrill Date: Mon Jun 1 14:43:48 UTC 2015 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5-1]: cpufunc.S src/sys/arch/i386/i386 [netbsd-5-1]: cpufunc.S src/sys/arch/x86/include [netbsd-5-1]: 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.16.1 src/sys/arch/amd64/amd64/cpufunc.S cvs rdiff -u -r1.13 -r1.13.10.1 src/sys/arch/i386/i386/cpufunc.S cvs rdiff -u -r1.8.10.3 -r1.8.10.3.6.1 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.16.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:43:47 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.16.1 2015/06/01 14:43:47 sborrill Exp $ */ /*- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -33,6 +33,8 @@ * Functions to provide access to i386-specific instructions. */ +#include + #include #include #include @@ -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.10.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:43:48 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.10.1 2015/06/01 14:43:48 sborrill Exp $ */ /*- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. @@ -35,8 +35,10 @@ * These are shared with NetBSD/xen. */ +#include + #include -__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.10.1 2015/06/01 14:43:48 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.3.6.1 --- 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:43:48 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.3.6.1 2015/06/01 14:43:48 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-2] src/sys/arch
Module Name:src Committed By: sborrill Date: Mon Jun 1 14:42:40 UTC 2015 Modified Files: src/sys/arch/amd64/amd64 [netbsd-5-2]: cpufunc.S src/sys/arch/i386/i386 [netbsd-5-2]: cpufunc.S src/sys/arch/x86/include [netbsd-5-2]: 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.20.1 src/sys/arch/amd64/amd64/cpufunc.S cvs rdiff -u -r1.13 -r1.13.14.1 src/sys/arch/i386/i386/cpufunc.S cvs rdiff -u -r1.8.10.3 -r1.8.10.3.10.1 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.20.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:42:40 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.20.1 2015/06/01 14:42:40 sborrill Exp $ */ /*- * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc. @@ -33,6 +33,8 @@ * Functions to provide access to i386-specific instructions. */ +#include + #include #include #include @@ -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.14.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:42:40 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.14.1 2015/06/01 14:42:40 sborrill Exp $ */ /*- * Copyright (c) 1998, 2007 The NetBSD Foundation, Inc. @@ -35,8 +35,10 @@ * These are shared with NetBSD/xen. */ +#include + #include -__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.14.1 2015/06/01 14:42:40 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.3.10.1 --- 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:42:40 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.3.10.1 2015/06/01 14:42:40 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/arch
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 + #include #include #include @@ -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 + #include -__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/doc
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/sys/dev/usb
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 -__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 #include @@ -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-2] src/doc
Module Name:src Committed By: sborrill Date: Fri May 22 11:45:01 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket #1965 To generate a diff of this commit: cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.27 src/doc/CHANGES-5.2.4:1.1.2.28 --- src/doc/CHANGES-5.2.4:1.1.2.27 Sun Apr 26 12:53:34 2015 +++ src/doc/CHANGES-5.2.4 Fri May 22 11:45:01 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.27 2015/04/26 12:53:34 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.28 2015/05/22 11:45:01 sborrill Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2565,13 +2565,13 @@ xsrc/xfree/xc/lib/font/bitmap/bdfread.c (bdfReadCharacters: ensure metrics fit into xCharInfo struct) [mrg, ticket #1953] -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 +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) @@ -2606,3 +2606,9 @@ sys/kern/sys_select.cpatch exceeded, then return EINVAL instead of silently truncating the list. Addresses PR/17507. [prlw1, ticket #1957] + +sys/arch/xen/xen/xenevt.c 1.42 + + Fix off by one error, addresses port-xen/49919. + [bouyer, ticket #1965] +
CVS commit: [netbsd-5-2] src/sys/arch/xen/xen
Module Name:src Committed By: sborrill Date: Fri May 22 11:44:25 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-5-2]: 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.2.6.1 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.2.6.1 --- 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:44:25 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.2.6.1 2015/05/22 11:44:25 sborrill Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include -__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.2.6.1 2015/05/22 11:44:25 sborrill Exp $"); #include "opt_xen.h" #include @@ -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-1] src/doc
Module Name:src Committed By: sborrill Date: Fri May 22 11:22:34 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket #1965 To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.26 src/doc/CHANGES-5.1.6:1.1.2.27 --- src/doc/CHANGES-5.1.6:1.1.2.26 Sun Apr 26 12:55:28 2015 +++ src/doc/CHANGES-5.1.6 Fri May 22 11:22:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.26 2015/04/26 12:55:28 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.27 2015/05/22 11:22:34 sborrill Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2606,3 +2606,9 @@ sys/kern/sys_select.cpatch exceeded, then return EINVAL instead of silently truncating the list. Addresses PR/17507. [prlw1, ticket #1957] + +sys/arch/xen/xen/xenevt.c 1.42 + + Fix off by one error, addresses port-xen/49919. + [bouyer, ticket #1965] +
CVS commit: [netbsd-5-1] src/sys/arch/xen/xen
Module Name:src Committed By: sborrill Date: Fri May 22 11:22:03 UTC 2015 Modified Files: src/sys/arch/xen/xen [netbsd-5-1]: 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.2.2.1 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.2.2.1 --- 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:22:03 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.2.2.1 2015/05/22 11:22:03 sborrill Exp $ */ /* * Copyright (c) 2005 Manuel Bouyer. @@ -31,7 +31,7 @@ */ #include -__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.2.2.1 2015/05/22 11:22:03 sborrill Exp $"); #include "opt_xen.h" #include @@ -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/doc
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
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 -__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 @@ -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
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 -__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
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
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 /* C2000
CVS commit: [netbsd-5-1] src/doc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:55:28 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Update ticket 1958. To generate a diff of this commit: cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.25 src/doc/CHANGES-5.1.6:1.1.2.26 --- src/doc/CHANGES-5.1.6:1.1.2.25 Fri Apr 24 05:49:18 2015 +++ src/doc/CHANGES-5.1.6 Sun Apr 26 12:55:28 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.25 2015/04/24 05:49:18 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.26 2015/04/26 12:55:28 msaitoh Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2584,7 +2584,10 @@ crypto/dist/openssl/dist/ssl/s2_srvr.c 1 X509_to_X509_REQ NULL pointer deref (CVE-2015-0288) [spz, ticket #1954] -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-1] src/sys/arch/sparc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:54:38 UTC 2015 Modified Files: src/sys/arch/sparc/include [netbsd-5-1]: openfirm.h src/sys/arch/sparc/stand/ofwboot [netbsd-5-1]: 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.92.1 src/sys/arch/sparc/include/openfirm.h cvs rdiff -u -r1.10.40.1 -r1.10.40.2 \ src/sys/arch/sparc/stand/ofwboot/Locore.c cvs rdiff -u -r1.6 -r1.6.14.1 \ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c cvs rdiff -u -r1.3 -r1.3.82.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.92.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 26 12:54:38 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.92.1 2015/04/26 12:54:38 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.40.1 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.40.2 --- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.40.1 Fri Apr 17 10:51:28 2015 +++ src/sys/arch/sparc/stand/ofwboot/Locore.c Sun Apr 26 12:54:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.10.40.1 2015/04/17 10:51:28 msaitoh Exp $ */ +/* $NetBSD: Locore.c,v 1.10.40.2 2015/04/26 12:54:38 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -36,15 +36,6 @@ #include -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(paddr>>32); - 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_hi<<32)|((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(phys>>32); - 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-2] src/doc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:53:34 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Update ticket 1958. To generate a diff of this commit: cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.26 src/doc/CHANGES-5.2.4:1.1.2.27 --- src/doc/CHANGES-5.2.4:1.1.2.26 Fri Apr 24 05:48:57 2015 +++ src/doc/CHANGES-5.2.4 Sun Apr 26 12:53:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.26 2015/04/24 05:48:57 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.27 2015/04/26 12:53:34 msaitoh Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2584,7 +2584,10 @@ crypto/dist/openssl/dist/ssl/s2_srvr.c 1 X509_to_X509_REQ NULL pointer deref (CVE-2015-0288) [spz, ticket #1954] -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-2] src/sys/arch/sparc
Module Name:src Committed By: msaitoh Date: Sun Apr 26 12:52:12 UTC 2015 Modified Files: src/sys/arch/sparc/include [netbsd-5-2]: openfirm.h src/sys/arch/sparc/stand/ofwboot [netbsd-5-2]: 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.96.1 src/sys/arch/sparc/include/openfirm.h cvs rdiff -u -r1.10.44.1 -r1.10.44.2 \ src/sys/arch/sparc/stand/ofwboot/Locore.c cvs rdiff -u -r1.6 -r1.6.18.1 \ src/sys/arch/sparc/stand/ofwboot/loadfile_machdep.c cvs rdiff -u -r1.3 -r1.3.86.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.96.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 26 12:52:12 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.96.1 2015/04/26 12:52:12 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.44.1 src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.44.2 --- src/sys/arch/sparc/stand/ofwboot/Locore.c:1.10.44.1 Fri Apr 17 10:51:15 2015 +++ src/sys/arch/sparc/stand/ofwboot/Locore.c Sun Apr 26 12:52:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.10.44.1 2015/04/17 10:51:15 msaitoh Exp $ */ +/* $NetBSD: Locore.c,v 1.10.44.2 2015/04/26 12:52:12 msaitoh Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -36,15 +36,6 @@ #include -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(paddr>>32); - 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_hi<<32)|((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(phys>>32); - 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
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/dev/pci
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 -__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-1] src/doc
Module Name:src Committed By: msaitoh Date: Fri Apr 24 05:49:18 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket 1957. To generate a diff of this commit: cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.24 src/doc/CHANGES-5.1.6:1.1.2.25 --- src/doc/CHANGES-5.1.6:1.1.2.24 Sun Apr 19 07:46:48 2015 +++ src/doc/CHANGES-5.1.6 Fri Apr 24 05:49:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.24 2015/04/19 07:46:48 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.25 2015/04/24 05:49:18 msaitoh Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2595,3 +2595,11 @@ xsrc/xfree/xc/lib/X11/Xlibint.h1.2 Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11. [mrg, ticket #1959] + +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-2] src/doc
Module Name:src Committed By: msaitoh Date: Fri Apr 24 05:48:57 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket 1957. To generate a diff of this commit: cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.25 src/doc/CHANGES-5.2.4:1.1.2.26 --- src/doc/CHANGES-5.2.4:1.1.2.25 Sun Apr 19 07:46:18 2015 +++ src/doc/CHANGES-5.2.4 Fri Apr 24 05:48:57 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.25 2015/04/19 07:46:18 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.26 2015/04/24 05:48:57 msaitoh Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2595,3 +2595,11 @@ xsrc/xfree/xc/lib/X11/Xlibint.h1.2 Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11. [mrg, ticket #1959] + +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
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-1] src/sys/kern
Module Name:src Committed By: msaitoh Date: Fri Apr 24 05:46:33 UTC 2015 Modified Files: src/sys/kern [netbsd-5-1]: 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. [prlw1, ticket #1957] To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.10.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.10.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:46:33 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.10.1 2015/04/24 05:46:33 msaitoh Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__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.10.1 2015/04/24 05:46:33 msaitoh Exp $"); #include #include @@ -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-2] src/sys/kern
Module Name:src Committed By: msaitoh Date: Fri Apr 24 05:46:09 UTC 2015 Modified Files: src/sys/kern [netbsd-5-2]: 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. [prlw1, ticket #1957] To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.10.14.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.14.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:46:09 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.14.1 2015/04/24 05:46:09 msaitoh Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -70,7 +70,7 @@ */ #include -__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.14.1 2015/04/24 05:46:09 msaitoh Exp $"); #include #include @@ -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/sys/kern
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 -__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 #include @@ -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-1] src/doc
Module Name:src Committed By: msaitoh Date: Sun Apr 19 07:46:49 UTC 2015 Modified Files: src/doc [netbsd-5-1]: CHANGES-5.1.6 Log Message: Ticket 1959. To generate a diff of this commit: cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-5.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1.6 diff -u src/doc/CHANGES-5.1.6:1.1.2.23 src/doc/CHANGES-5.1.6:1.1.2.24 --- src/doc/CHANGES-5.1.6:1.1.2.23 Fri Apr 17 10:52:38 2015 +++ src/doc/CHANGES-5.1.6 Sun Apr 19 07:46:48 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1.6,v 1.1.2.23 2015/04/17 10:52:38 msaitoh Exp $ +# $NetBSD: CHANGES-5.1.6,v 1.1.2.24 2015/04/19 07:46:48 msaitoh Exp $ A complete list of changes from the NetBSD 5.1.5 release to the NetBSD 5.1.6 release: @@ -2589,3 +2589,9 @@ sys/arch/sparc/stand/ofwboot/Locore.c 1 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]
CVS commit: [netbsd-5-2] src/doc
Module Name:src Committed By: msaitoh Date: Sun Apr 19 07:46:18 UTC 2015 Modified Files: src/doc [netbsd-5-2]: CHANGES-5.2.4 Log Message: Ticket 1959. To generate a diff of this commit: cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-5.2.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.2.4 diff -u src/doc/CHANGES-5.2.4:1.1.2.24 src/doc/CHANGES-5.2.4:1.1.2.25 --- src/doc/CHANGES-5.2.4:1.1.2.24 Fri Apr 17 10:52:21 2015 +++ src/doc/CHANGES-5.2.4 Sun Apr 19 07:46:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.2.4,v 1.1.2.24 2015/04/17 10:52:21 msaitoh Exp $ +# $NetBSD: CHANGES-5.2.4,v 1.1.2.25 2015/04/19 07:46:18 msaitoh Exp $ A complete list of changes from the NetBSD 5.2.3 release to the NetBSD 5.2.4 release: @@ -2589,3 +2589,9 @@ sys/arch/sparc/stand/ofwboot/Locore.c 1 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]
CVS commit: [netbsd-5] src/doc
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/lib/libc/arch/sh3/gen
Module Name:src Committed By: msaitoh Date: Sun Apr 19 07:43:02 UTC 2015 Modified Files: src/lib/libc/arch/sh3/gen [netbsd-5]: swapcontext.S Log Message: Pull up following revision(s) (requested by uwe in ticket #1960): 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. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.9.6.1 src/lib/libc/arch/sh3/gen/swapcontext.S 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/arch/sh3/gen/swapcontext.S diff -u src/lib/libc/arch/sh3/gen/swapcontext.S:1.9 src/lib/libc/arch/sh3/gen/swapcontext.S:1.9.6.1 --- src/lib/libc/arch/sh3/gen/swapcontext.S:1.9 Mon Apr 28 20:22:57 2008 +++ src/lib/libc/arch/sh3/gen/swapcontext.S Sun Apr 19 07:43:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: swapcontext.S,v 1.9 2008/04/28 20:22:57 martin Exp $ */ +/* $NetBSD: swapcontext.S,v 1.9.6.1 2015/04/19 07:43:02 msaitoh Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(SYSLIBC_SCCS) && !defined(lint) - RCSID("$NetBSD: swapcontext.S,v 1.9 2008/04/28 20:22:57 martin Exp $") + RCSID("$NetBSD: swapcontext.S,v 1.9.6.1 2015/04/19 07:43:02 msaitoh Exp $") #endif /* SYSLIBC_SCCS and not lint */ /* @@ -40,33 +40,33 @@ */ ENTRY(swapcontext) PIC_PROLOGUE(.L_got) - mov.l r5, @-sp sts.l pr, @-sp mov.l .L__getcontext, r0 -1: CALL r0 /* _getcontext(oucp) */ + mov.l r5, @-sp +1: CALL r0 ! _getcontext(oucp) mov.l r4, @-sp - mov.l @sp+, r1 + !! getcontext captures oucp resuming here with r12 (when PIC), + !! pr, r5 and r4 pushed onto the stack + tst r0, r0 - bf 3f /* return error from getcontext */ + bf.s 3f ! return error from getcontext + mov.l @sp, r1 ! saved oucp + + !! adjust oucp to resume after setcontext below + mova 3f, r0 + mov.l r0, @(36 + 1 * 4, r1) ! _UC_MACHINE_SET_PC(oucp, pr) - /* Note: getcontext does _UC_MACHINE_INTRV(oucp) = 0 for us */ - mov.l @sp, r0 - mov.l r0, @(36 + 1 * 4, r1) /* _UC_MACHINE_SET_PC(oucp, pr) */ mov.l .L_setcontext, r2 -2: CALL r2 /* setcontext(ucp) */ - mov.l @(4, sp), r4 - /* if we get here, return error from setcontext */ -3: +2: CALL r2 ! setcontext(ucp) + mov.l @(4, sp), r4 ! saved ucp + + .align 2 +3: !! we get here on errors and when resuming oucp + add #8, sp ! skip r4 and r5 lds.l @sp+, pr -#ifdef PIC - add #4, sp - rts - PIC_EPILOGUE -#else rts - add #4, sp -#endif + PIC_EPILOGUE_SLOT .align 2 .L_got: PIC_GOT_DATUM