From jhb at freebsd.org Wed Apr 1 11:47:03 2009 From: jhb at freebsd.org (John Baldwin) Date: Wed Apr 1 11:47:15 2009 Subject: svn commit: r190520 - in stable/7/sys: . amd64/amd64 amd64/linux32 arm/arm compat/ia32 compat/svr4 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 i386/linux ia64/ia64 kern powerpc/powerpc sparc64/sp... In-Reply-To: <200903290807.n2T87b4D025770@svn.freebsd.org> References: <200903290807.n2T87b4D025770@svn.freebsd.org> Message-ID: <200904011446.51822.jhb@freebsd.org> On Sunday 29 March 2009 4:07:37 am Dmitry Chagin wrote: > Author: dchagin > Date: Sun Mar 29 08:07:36 2009 > New Revision: 190520 > URL: http://svn.freebsd.org/changeset/base/190520 > > Log: > Merge from head to stable/7: > > r189771: > Implement new way of branding ELF binaries by looking to a > ".note.ABI-tag" section. > > The search order of a brand is changed, now first of all the > ".note.ABI-tag" is looked through. > > Move code which fetch osreldate for ELF binary to check_note() handler. I think this breaks the ABI of older ELF ABI kernel modules (e.g. older linux.ko binaries) since it changes the layout of the 'ElfN(Brandinfo)' structure. I think you can fix this by making the following changes in 7.x only: 1) Move the new field (brand_note) to the end of the structure. 2) Add a new flag BI_BRAND_NOTE (or some such) that indicates that the brandnote pointer is valid. Only use the brandnote field if the new flag is set and set it in all the new places that now have notes. Old modules won't have the flag set, so the new field (which would really be garbage) would be ignored. -- John Baldwin From weongyo at FreeBSD.org Wed Apr 1 19:26:59 2009 From: weongyo at FreeBSD.org (Weongyo Jeong) Date: Wed Apr 1 19:27:15 2009 Subject: svn commit: r190637 - stable/7/share/man/man4 Message-ID: <200904020226.n322QwA7049220@svn.freebsd.org> Author: weongyo Date: Thu Apr 2 02:26:58 2009 New Revision: 190637 URL: http://svn.freebsd.org/changeset/base/190637 Log: MFC r190437: bump date. Pointed by: yongari Approved by: re (kib) Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/igb.4 (props changed) stable/7/share/man/man4/malo.4 Modified: stable/7/share/man/man4/malo.4 ============================================================================== --- stable/7/share/man/man4/malo.4 Thu Apr 2 01:46:57 2009 (r190636) +++ stable/7/share/man/man4/malo.4 Thu Apr 2 02:26:58 2009 (r190637) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\"/ -.Dd March 25, 2008 +.Dd March 26, 2009 .Dt MALO 4 .Os .Sh NAME From rnoland at FreeBSD.org Thu Apr 2 10:53:31 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Apr 2 10:53:48 2009 Subject: svn commit: r190647 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm Message-ID: <200904021753.n32HrUnl071746@svn.freebsd.org> Author: rnoland Date: Thu Apr 2 17:53:30 2009 New Revision: 190647 URL: http://svn.freebsd.org/changeset/base/190647 Log: Merge 190123,190282 Fix up the flags to bus_dmamem again. The man page incorrectly showed the BUS_DMA_NOCACHE flags as being a valid flag for load instead of alloc. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/ati_pcigart.c stable/7/sys/dev/drm/drm_scatter.c Modified: stable/7/sys/dev/drm/ati_pcigart.c ============================================================================== --- stable/7/sys/dev/drm/ati_pcigart.c Thu Apr 2 17:16:39 2009 (r190646) +++ stable/7/sys/dev/drm/ati_pcigart.c Thu Apr 2 17:53:30 2009 (r190647) @@ -75,14 +75,14 @@ drm_ati_alloc_pcigart_table(struct drm_d NULL, NULL, /* filtfunc, filtfuncargs */ gart_info->table_size, 1, /* maxsize, nsegs */ gart_info->table_size, /* maxsegsize */ - BUS_DMA_ALLOCNOW, NULL, NULL, /* flags, lockfunc, lockfuncargs */ + 0, NULL, NULL, /* flags, lockfunc, lockfuncargs */ &dmah->tag); if (ret != 0) { free(dmah, DRM_MEM_DMA); return ENOMEM; } - flags = BUS_DMA_NOWAIT | BUS_DMA_ZERO; + flags = BUS_DMA_WAITOK | BUS_DMA_ZERO; if (gart_info->gart_reg_if == DRM_ATI_GART_IGP) flags |= BUS_DMA_NOCACHE; @@ -95,7 +95,8 @@ drm_ati_alloc_pcigart_table(struct drm_d DRM_LOCK(); ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, - gart_info->table_size, drm_ati_alloc_pcigart_table_cb, dmah, 0); + gart_info->table_size, drm_ati_alloc_pcigart_table_cb, dmah, + BUS_DMA_NOWAIT); if (ret != 0) { bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); Modified: stable/7/sys/dev/drm/drm_scatter.c ============================================================================== --- stable/7/sys/dev/drm/drm_scatter.c Thu Apr 2 17:16:39 2009 (r190646) +++ stable/7/sys/dev/drm/drm_scatter.c Thu Apr 2 17:53:30 2009 (r190647) @@ -92,7 +92,7 @@ drm_sg_alloc(struct drm_device *dev, str } ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, - BUS_DMA_WAITOK | BUS_DMA_ZERO, &dmah->map); + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_NOCACHE, &dmah->map); if (ret != 0) { bus_dma_tag_destroy(dmah->tag); free(dmah, DRM_MEM_DMA); @@ -102,8 +102,7 @@ drm_sg_alloc(struct drm_device *dev, str } ret = bus_dmamap_load(dmah->tag, dmah->map, dmah->vaddr, - request->size, drm_sg_alloc_cb, entry, - BUS_DMA_NOWAIT | BUS_DMA_NOCACHE); + request->size, drm_sg_alloc_cb, entry, BUS_DMA_NOWAIT); if (ret != 0) { bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); From rnoland at FreeBSD.org Thu Apr 2 10:57:05 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Apr 2 10:57:21 2009 Subject: svn commit: r190648 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm Message-ID: <200904021757.n32Hv4Wv071901@svn.freebsd.org> Author: rnoland Date: Thu Apr 2 17:57:04 2009 New Revision: 190648 URL: http://svn.freebsd.org/changeset/base/190648 Log: Merge 190124 Add a couple of radeon pci ids. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/drm_pciids.h Modified: stable/7/sys/dev/drm/drm_pciids.h ============================================================================== --- stable/7/sys/dev/drm/drm_pciids.h Thu Apr 2 17:53:30 2009 (r190647) +++ stable/7/sys/dev/drm/drm_pciids.h Thu Apr 2 17:57:04 2009 (r190648) @@ -320,6 +320,8 @@ {0x1002, 0x9612, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 3200 Graphics"}, \ {0x1002, 0x9613, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3100 Graphics"}, \ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ + {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ + {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ From rnoland at FreeBSD.org Thu Apr 2 10:58:22 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Apr 2 10:58:39 2009 Subject: svn commit: r190649 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm Message-ID: <200904021758.n32HwKJw071985@svn.freebsd.org> Author: rnoland Date: Thu Apr 2 17:58:20 2009 New Revision: 190649 URL: http://svn.freebsd.org/changeset/base/190649 Log: Merge 190399 The GART allocations are a propery of the gart, not of scatter-gather memory. Track them in the appropriate structure. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/ati_pcigart.c stable/7/sys/dev/drm/drmP.h stable/7/sys/dev/drm/drm_scatter.c Modified: stable/7/sys/dev/drm/ati_pcigart.c ============================================================================== --- stable/7/sys/dev/drm/ati_pcigart.c Thu Apr 2 17:57:04 2009 (r190648) +++ stable/7/sys/dev/drm/ati_pcigart.c Thu Apr 2 17:58:20 2009 (r190649) @@ -104,7 +104,7 @@ drm_ati_alloc_pcigart_table(struct drm_d return ENOMEM; } - dev->sg->dmah = dmah; + gart_info->dmah = dmah; return 0; } @@ -113,12 +113,12 @@ static void drm_ati_free_pcigart_table(struct drm_device *dev, struct drm_ati_pcigart_info *gart_info) { - struct drm_dma_handle *dmah = dev->sg->dmah; + struct drm_dma_handle *dmah = gart_info->dmah; bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); bus_dma_tag_destroy(dmah->tag); free(dmah, DRM_MEM_DMA); - dev->sg->dmah = NULL; + gart_info->dmah = NULL; } int @@ -134,7 +134,7 @@ drm_ati_pcigart_cleanup(struct drm_devic if (gart_info->bus_addr) { if (gart_info->gart_table_location == DRM_ATI_GART_MAIN) { gart_info->bus_addr = 0; - if (dev->sg->dmah) + if (gart_info->dmah) drm_ati_free_pcigart_table(dev, gart_info); } } @@ -169,8 +169,8 @@ drm_ati_pcigart_init(struct drm_device * goto done; } - address = (void *)dev->sg->dmah->vaddr; - bus_address = dev->sg->dmah->busaddr; + address = (void *)gart_info->dmah->vaddr; + bus_address = gart_info->dmah->busaddr; } else { address = gart_info->addr; bus_address = gart_info->bus_addr; Modified: stable/7/sys/dev/drm/drmP.h ============================================================================== --- stable/7/sys/dev/drm/drmP.h Thu Apr 2 17:57:04 2009 (r190648) +++ stable/7/sys/dev/drm/drmP.h Thu Apr 2 17:58:20 2009 (r190649) @@ -480,9 +480,7 @@ typedef struct drm_sg_mem { void *virtual; int pages; dma_addr_t *busaddr; - struct drm_dma_handle *sg_dmah; /* Handle for sg_pages */ struct drm_dma_handle *dmah; /* Handle to PCI memory */ - /* for ATI PCIGART table */ } drm_sg_mem_t; typedef TAILQ_HEAD(drm_map_list, drm_local_map) drm_map_list_t; @@ -543,6 +541,7 @@ struct drm_ati_pcigart_info { struct drm_dma_handle *table_handle; drm_local_map_t mapping; int table_size; + struct drm_dma_handle *dmah; /* handle for ATI PCIGART table */ }; #ifndef DMA_BIT_MASK Modified: stable/7/sys/dev/drm/drm_scatter.c ============================================================================== --- stable/7/sys/dev/drm/drm_scatter.c Thu Apr 2 17:57:04 2009 (r190648) +++ stable/7/sys/dev/drm/drm_scatter.c Thu Apr 2 17:58:20 2009 (r190649) @@ -112,7 +112,7 @@ drm_sg_alloc(struct drm_device *dev, str return ENOMEM; } - entry->sg_dmah = dmah; + entry->dmah = dmah; entry->handle = (unsigned long)dmah->vaddr; DRM_DEBUG("sg alloc handle = %08lx\n", entry->handle); @@ -160,7 +160,7 @@ drm_sg_alloc_ioctl(struct drm_device *de void drm_sg_cleanup(struct drm_sg_mem *entry) { - struct drm_dma_handle *dmah = entry->sg_dmah; + struct drm_dma_handle *dmah = entry->dmah; bus_dmamap_unload(dmah->tag, dmah->map); bus_dmamem_free(dmah->tag, dmah->vaddr, dmah->map); From rnoland at FreeBSD.org Thu Apr 2 11:20:48 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Apr 2 11:20:54 2009 Subject: svn commit: r190652 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm Message-ID: <200904021820.n32IKlSd072683@svn.freebsd.org> Author: rnoland Date: Thu Apr 2 18:20:46 2009 New Revision: 190652 URL: http://svn.freebsd.org/changeset/base/190652 Log: Merge 190563 Load the right microcode for RS780 Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/r600_cp.c Modified: stable/7/sys/dev/drm/r600_cp.c ============================================================================== --- stable/7/sys/dev/drm/r600_cp.c Thu Apr 2 18:11:21 2009 (r190651) +++ stable/7/sys/dev/drm/r600_cp.c Thu Apr 2 18:20:46 2009 (r190652) @@ -392,17 +392,17 @@ static void r600_cp_load_microcode(drm_r DRM_INFO("Loading RS780 CP Microcode\n"); for (i = 0; i < PM4_UCODE_SIZE; i++) { RADEON_WRITE(R600_CP_ME_RAM_DATA, - RV670_cp_microcode[i][0]); + RS780_cp_microcode[i][0]); RADEON_WRITE(R600_CP_ME_RAM_DATA, - RV670_cp_microcode[i][1]); + RS780_cp_microcode[i][1]); RADEON_WRITE(R600_CP_ME_RAM_DATA, - RV670_cp_microcode[i][2]); + RS780_cp_microcode[i][2]); } RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); DRM_INFO("Loading RS780 PFP Microcode\n"); for (i = 0; i < PFP_UCODE_SIZE; i++) - RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RV670_pfp_microcode[i]); + RADEON_WRITE(R600_CP_PFP_UCODE_DATA, RS780_pfp_microcode[i]); } RADEON_WRITE(R600_CP_PFP_UCODE_ADDR, 0); RADEON_WRITE(R600_CP_ME_RAM_WADDR, 0); From rnoland at FreeBSD.org Thu Apr 2 11:21:43 2009 From: rnoland at FreeBSD.org (Robert Noland) Date: Thu Apr 2 11:21:55 2009 Subject: svn commit: r190653 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/drm Message-ID: <200904021821.n32ILfIL072752@svn.freebsd.org> Author: rnoland Date: Thu Apr 2 18:21:41 2009 New Revision: 190653 URL: http://svn.freebsd.org/changeset/base/190653 Log: Merge 190565 We don't know what these pages are going to be used for, they should be un-cached. This got lost somewhere with all the bus_dma fixups. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/drm/drm_pci.c Modified: stable/7/sys/dev/drm/drm_pci.c ============================================================================== --- stable/7/sys/dev/drm/drm_pci.c Thu Apr 2 18:20:46 2009 (r190652) +++ stable/7/sys/dev/drm/drm_pci.c Thu Apr 2 18:21:41 2009 (r190653) @@ -91,7 +91,7 @@ drm_pci_alloc(struct drm_device *dev, si } ret = bus_dmamem_alloc(dmah->tag, &dmah->vaddr, - BUS_DMA_WAITOK | BUS_DMA_ZERO, &dmah->map); + BUS_DMA_WAITOK | BUS_DMA_ZERO | BUS_DMA_NOCACHE, &dmah->map); if (ret != 0) { bus_dma_tag_destroy(dmah->tag); free(dmah, DRM_MEM_DMA); From trhodes at FreeBSD.org Thu Apr 2 15:04:46 2009 From: trhodes at FreeBSD.org (Tom Rhodes) Date: Thu Apr 2 15:04:53 2009 Subject: svn commit: r190660 - stable/7/usr.sbin/arp Message-ID: <200904022204.n32M4jiL077584@svn.freebsd.org> Author: trhodes Date: Thu Apr 2 22:04:44 2009 New Revision: 190660 URL: http://svn.freebsd.org/changeset/base/190660 Log: nt a warning when blackhole and reject are used together. Update arp.8 manual page syntax. PR: 125896 Submitted by: Marc Olzheim Approved by: re (kib), sam Modified: stable/7/usr.sbin/arp/ (props changed) stable/7/usr.sbin/arp/arp.8 stable/7/usr.sbin/arp/arp.c Modified: stable/7/usr.sbin/arp/arp.8 ============================================================================== --- stable/7/usr.sbin/arp/arp.8 Thu Apr 2 21:58:34 2009 (r190659) +++ stable/7/usr.sbin/arp/arp.8 Thu Apr 2 22:04:44 2009 (r190660) @@ -28,7 +28,7 @@ .\" @(#)arp.8 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd March 18, 2008 +.Dd December 25, 2008 .Dt ARP 8 .Os .Sh NAME @@ -53,14 +53,12 @@ .Nm .Fl s Ar hostname ether_addr .Op Cm temp -.Op Cm reject -.Op Cm blackhole +.Op Cm blackhole No \&| Cm reject .Op Cm pub Op Cm only .Nm .Fl S Ar hostname ether_addr .Op Cm temp -.Op Cm reject -.Op Cm blackhole +.Op Cm blackhole No \&| Cm reject .Op Cm pub Op Cm only .Nm .Fl f Ar filename @@ -182,7 +180,8 @@ in the file should be of the form .Bd -ragged -offset indent -compact .Ar hostname ether_addr .Op Cm temp -.Op Cm pub +.Op Cm blackhole No \&| Cm reject +.Op Cm pub Op Cm only .Ed .Pp with argument meanings as given above. Modified: stable/7/usr.sbin/arp/arp.c ============================================================================== --- stable/7/usr.sbin/arp/arp.c Thu Apr 2 21:58:34 2009 (r190659) +++ stable/7/usr.sbin/arp/arp.c Thu Apr 2 22:04:44 2009 (r190660) @@ -330,8 +330,14 @@ set(int argc, char **argv) argc--; argv++; } } else if (strncmp(argv[0], "blackhole", 9) == 0) { + if (flags & RTF_REJECT) { + printf("Choose one of blackhole or reject, not both.\n"); + } flags |= RTF_BLACKHOLE; } else if (strncmp(argv[0], "reject", 6) == 0) { + if (flags & RTF_BLACKHOLE) { + printf("Choose one of blackhole or reject, not both.\n"); + } flags |= RTF_REJECT; } else if (strncmp(argv[0], "trail", 5) == 0) { /* XXX deprecated and undocumented feature */ @@ -630,8 +636,8 @@ usage(void) " arp [-n] [-i interface] -a", " arp -d hostname [pub]", " arp -d [-i interface] -a", - " arp -s hostname ether_addr [temp] [reject] [blackhole] [pub [only]]", - " arp -S hostname ether_addr [temp] [reject] [blackhole] [pub [only]]", + " arp -s hostname ether_addr [temp] [reject | blackhole] [pub [only]]", + " arp -S hostname ether_addr [temp] [reject | blackhole] [pub [only]]", " arp -f filename"); exit(1); } From yongari at FreeBSD.org Thu Apr 2 17:12:15 2009 From: yongari at FreeBSD.org (Pyun YongHyeon) Date: Thu Apr 2 17:12:27 2009 Subject: svn commit: r190663 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/re Message-ID: <200904030012.n330CEqP083995@svn.freebsd.org> Author: yongari Date: Fri Apr 3 00:12:14 2009 New Revision: 190663 URL: http://svn.freebsd.org/changeset/base/190663 Log: MFC r190587: It seems that RTL8168D and RTL8102EL requires additional settle time to complete RL_PHYAR register write. Accessing RL_PHYAR register right after the write causes errors for subsequent PHY register accesses. Tested by: george at luckytele dot com, Steve Wills < STEVE at stevenwills dot com > Approved by: re (Kostik Belousov) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/re/if_re.c Modified: stable/7/sys/dev/re/if_re.c ============================================================================== --- stable/7/sys/dev/re/if_re.c Fri Apr 3 00:10:19 2009 (r190662) +++ stable/7/sys/dev/re/if_re.c Fri Apr 3 00:12:14 2009 (r190663) @@ -420,6 +420,7 @@ re_gmii_readreg(device_t dev, int phy, i } CSR_WRITE_4(sc, RL_PHYAR, reg << 16); + DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); @@ -447,6 +448,7 @@ re_gmii_writereg(device_t dev, int phy, CSR_WRITE_4(sc, RL_PHYAR, (reg << 16) | (data & RL_PHYAR_PHYDATA) | RL_PHYAR_BUSY); + DELAY(1000); for (i = 0; i < RL_PHY_TIMEOUT; i++) { rval = CSR_READ_4(sc, RL_PHYAR); From imp at FreeBSD.org Thu Apr 2 20:04:27 2009 From: imp at FreeBSD.org (Warner Losh) Date: Thu Apr 2 20:04:43 2009 Subject: svn commit: r190665 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/ed Message-ID: <200904030304.n3334QT1096478@svn.freebsd.org> Author: imp Date: Fri Apr 3 03:04:26 2009 New Revision: 190665 URL: http://svn.freebsd.org/changeset/base/190665 Log: Merge 190488 from head: Fix shared memory packet movement. Approved by: re@ (kostik) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/ed/if_ed.c Modified: stable/7/sys/dev/ed/if_ed.c ============================================================================== --- stable/7/sys/dev/ed/if_ed.c Fri Apr 3 02:28:11 2009 (r190664) +++ stable/7/sys/dev/ed/if_ed.c Fri Apr 3 03:04:26 2009 (r190665) @@ -1307,7 +1307,7 @@ ed_shmem_readmem16(struct ed_softc *sc, uint16_t amount) { bus_space_read_region_2(sc->mem_bst, sc->mem_bsh, src, (uint16_t *)dst, - amount + 1 / 2); + (amount + 1) / 2); } /* From weongyo at FreeBSD.org Thu Apr 2 20:25:02 2009 From: weongyo at FreeBSD.org (Weongyo Jeong) Date: Thu Apr 2 20:25:19 2009 Subject: svn commit: r190666 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/malo Message-ID: <200904030325.n333P12f097991@svn.freebsd.org> Author: weongyo Date: Fri Apr 3 03:25:00 2009 New Revision: 190666 URL: http://svn.freebsd.org/changeset/base/190666 Log: MFC r190541: fix a bug of uses after free. Pointed by: dchagin MFC r190544: handles more exceptional cases when the driver failed to attach. MFC r190550: corrects a error message. MFC r190590: fix a bug that it passed a incorrect flag BUS_DMA_ALLOCNOW to create a device specific DMA tag. On amd64 it could exhaust all of bounce pages when bus_dma_tag_create(9) is called at malo_pci_attach() then as result in next turn it returns ENOMEM. This fix a attach fail on amd64. Pointed by: yongari Tested by: dchagin Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/malo/if_malo_pci.c stable/7/sys/dev/malo/if_malohal.c Modified: stable/7/sys/dev/malo/if_malo_pci.c ============================================================================== --- stable/7/sys/dev/malo/if_malo_pci.c Fri Apr 3 03:04:26 2009 (r190665) +++ stable/7/sys/dev/malo/if_malo_pci.c Fri Apr 3 03:25:00 2009 (r190666) @@ -245,7 +245,7 @@ malo_pci_attach(device_t dev) BUS_SPACE_MAXADDR, /* maxsize */ 0, /* nsegments */ BUS_SPACE_MAXADDR, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ &sc->malo_dmat)) { @@ -260,12 +260,13 @@ malo_pci_attach(device_t dev) error = malo_attach(pci_get_device(dev), sc); - if (error != 0) { - malo_pci_detach(dev); - return (error); - } + if (error != 0) + goto bad2; return (error); + +bad2: + bus_dma_tag_destroy(sc->malo_dmat); bad1: if (psc->malo_msi == 0) bus_teardown_intr(dev, psc->malo_res_irq[0], @@ -275,10 +276,11 @@ bad1: bus_teardown_intr(dev, psc->malo_res_irq[i], psc->malo_intrhand[i]); } - + bus_release_resources(dev, psc->malo_irq_spec, psc->malo_res_irq); bad: if (psc->malo_msi != 0) pci_release_msi(dev); + bus_release_resources(dev, psc->malo_mem_spec, psc->malo_res_mem); return (error); } Modified: stable/7/sys/dev/malo/if_malohal.c ============================================================================== --- stable/7/sys/dev/malo/if_malohal.c Fri Apr 3 03:04:26 2009 (r190665) +++ stable/7/sys/dev/malo/if_malohal.c Fri Apr 3 03:25:00 2009 (r190666) @@ -128,7 +128,7 @@ malo_hal_attach(device_t dev, uint16_t d NULL, /* lockarg */ &mh->mh_dmat); if (error != 0) { - device_printf(dev, "unable to allocate memory for cmd buffer, " + device_printf(dev, "unable to allocate memory for cmd tag, " "error %u\n", error); goto fail; } @@ -163,8 +163,6 @@ malo_hal_attach(device_t dev, uint16_t d return (mh); fail: - free(mh, M_DEVBUF); - if (mh->mh_dmamap != NULL) { bus_dmamap_unload(mh->mh_dmat, mh->mh_dmamap); if (mh->mh_cmdbuf != NULL) @@ -174,6 +172,7 @@ fail: } if (mh->mh_dmat) bus_dma_tag_destroy(mh->mh_dmat); + free(mh, M_DEVBUF); return (NULL); } From mav at FreeBSD.org Fri Apr 3 03:38:26 2009 From: mav at FreeBSD.org (Alexander Motin) Date: Fri Apr 3 03:38:32 2009 Subject: svn commit: r190669 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern Message-ID: <200904031038.n33AcOZp016515@svn.freebsd.org> Author: mav Date: Fri Apr 3 10:38:24 2009 New Revision: 190669 URL: http://svn.freebsd.org/changeset/base/190669 Log: MFC rev. 188464. Check for device_set_devclass() errors and skip driver probe/attach if any. Attach called without devclass set crashes the system. On attach/resume some ATA drivers sometimes trying to create duplicate adX device. It is surely their own problem, but it is not a reason to crash here. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/subr_bus.c Modified: stable/7/sys/kern/subr_bus.c ============================================================================== --- stable/7/sys/kern/subr_bus.c Fri Apr 3 10:15:00 2009 (r190668) +++ stable/7/sys/kern/subr_bus.c Fri Apr 3 10:38:24 2009 (r190669) @@ -1735,8 +1735,13 @@ device_probe_child(device_t dev, device_ dl = next_matching_driver(dc, child, dl)) { PDEBUG(("Trying %s", DRIVERNAME(dl->driver))); device_set_driver(child, dl->driver); - if (!hasclass) - device_set_devclass(child, dl->driver->name); + if (!hasclass) { + if (device_set_devclass(child, dl->driver->name)) { + PDEBUG(("Unable to set device class")); + device_set_driver(child, NULL); + continue; + } + } /* Fetch any flags for the device before probing. */ resource_int_value(dl->driver->name, child->unit, @@ -1814,8 +1819,11 @@ device_probe_child(device_t dev, device_ return (result); /* Set the winning driver, devclass, and flags. */ - if (!child->devclass) - device_set_devclass(child, best->driver->name); + if (!child->devclass) { + result = device_set_devclass(child, best->driver->name); + if (result != 0) + return (result); + } device_set_driver(child, best->driver); resource_int_value(best->driver->name, child->unit, "flags", &child->devflags); From lulf at FreeBSD.org Fri Apr 3 09:02:15 2009 From: lulf at FreeBSD.org (Ulf Lilleengen) Date: Fri Apr 3 09:02:33 2009 Subject: svn commit: r190671 - stable/7/contrib/csup Message-ID: <200904031602.n33G2DrQ026612@svn.freebsd.org> Author: lulf Date: Fri Apr 3 16:02:13 2009 New Revision: 190671 URL: http://svn.freebsd.org/changeset/base/190671 Log: MFC r190422: - Add proper error checking and printing to the CVSMode code when reading and writing from/to streams, as leaving them out stops csup from cleaning up on SIGINT and friends properly. Approved by: re (kib) Modified: stable/7/contrib/csup/ (props changed) stable/7/contrib/csup/rcsfile.c stable/7/contrib/csup/rcsfile.h stable/7/contrib/csup/rcsparse.c stable/7/contrib/csup/updater.c Modified: stable/7/contrib/csup/rcsfile.c ============================================================================== --- stable/7/contrib/csup/rcsfile.c Fri Apr 3 13:35:54 2009 (r190670) +++ stable/7/contrib/csup/rcsfile.c Fri Apr 3 16:02:13 2009 (r190671) @@ -140,7 +140,7 @@ static void rcsfile_insertsorteddelta( struct delta *); static struct stream *rcsfile_getdeltatext(struct rcsfile *, struct delta *, struct buf **); -static void rcsdelta_writestring(char *, size_t, struct stream *); +static int rcsdelta_writestring(char *, size_t, struct stream *); static void rcsdelta_insertbranch(struct delta *, struct branch *); /* Space formatting of RCS file. */ @@ -308,14 +308,19 @@ rcsfile_write(struct rcsfile *rf, struct /* First write head. */ d = LIST_FIRST(&rf->trunk->deltalist); - stream_printf(dest, "head%s%s;\n", head_space, d->revnum); + if (stream_printf(dest, "head%s%s;\n", head_space, d->revnum) < 0) + return (-1); /* Write branch, if we have. */ - if (rf->branch != NULL) - stream_printf(dest, "branch%s%s;\n", branch_space, rf->branch); + if (rf->branch != NULL) { + if (stream_printf(dest, "branch%s%s;\n", branch_space, + rf->branch) < 0) + return (-1); + } /* Write access. */ - stream_printf(dest, "access"); + if (stream_printf(dest, "access") < 0) + return (-1); #if 0 if (!STAILQ_EMPTY(&rf->accesslist)) { /* @@ -324,32 +329,44 @@ rcsfile_write(struct rcsfile *rf, struct */ } #endif - stream_printf(dest, ";\n"); + if (stream_printf(dest, ";\n") < 0) + return (-1); /* Write out taglist. */ - stream_printf(dest, "symbols"); + if (stream_printf(dest, "symbols") < 0) + return (-1); if (!STAILQ_EMPTY(&rf->taglist)) { STAILQ_FOREACH(t, &rf->taglist, tag_next) { - stream_printf(dest, "\n%s%s:%s", tag_space, t->tag, - t->revnum); + if (stream_printf(dest, "\n%s%s:%s", tag_space, t->tag, + t->revnum) < 0) + return (-1); } } - stream_printf(dest, ";\n"); /* Write out locks and strict. */ - stream_printf(dest, "locks;"); - if (rf->strictlock) - stream_printf(dest, " strict;"); - stream_printf(dest, "\n"); + if (stream_printf(dest, ";\nlocks;") < 0) + return (-1); + if (rf->strictlock) { + if (stream_printf(dest, " strict;") < 0) + return (-1); + } + if (stream_printf(dest, "\n") < 0) + return (-1); /* Write out the comment. */ - if (rf->comment != NULL) - stream_printf(dest, "comment%s%s;\n", comment_space, rf->comment); - if (rf->expand != EXPAND_DEFAULT) - stream_printf(dest, "expand%s@%s@;\n", expand_space, - keyword_encode_expand(rf->expand)); + if (rf->comment != NULL) { + if (stream_printf(dest, "comment%s%s;\n", comment_space, + rf->comment) < 0) + return (-1); + } + if (rf->expand != EXPAND_DEFAULT) { + if (stream_printf(dest, "expand%s@%s@;\n", expand_space, + keyword_encode_expand(rf->expand)) < 0) + return (-1); + } - stream_printf(dest, "\n\n"); + if (stream_printf(dest, "\n\n") < 0) + return (-1); /* * Write out deltas. We use a stack where we push the appropriate deltas @@ -364,14 +381,18 @@ rcsfile_write(struct rcsfile *rf, struct /* Do not write out placeholders just to be safe. */ if (d->placeholder) continue; - stream_printf(dest, "%s\n", d->revnum); - stream_printf(dest, "date%s%s;%sauthor %s;%sstate", + if (stream_printf(dest, "%s\n", d->revnum) < 0) + return (-1); + if (stream_printf(dest, "date%s%s;%sauthor %s;%sstate", date_space, d->revdate, auth_space, d->author, - state_space); - if (d->state != NULL) - stream_printf(dest, " %s", d->state); - stream_printf(dest, ";\n"); - stream_printf(dest, "branches"); + state_space) < 0) + return (-1); + if (d->state != NULL) { + if (stream_printf(dest, " %s", d->state) < 0) + return (-1); + } + if (stream_printf(dest, ";\nbranches") < 0) + return (-1); /* * Write out our branches. Add them to a reversed list for use * later when we write out the text. @@ -385,30 +406,36 @@ rcsfile_write(struct rcsfile *rf, struct /* Push branch heads on stack. */ STAILQ_FOREACH(d_tmp, &deltalist_inverted, delta_prev) { - if (d_tmp == NULL) - err(1, "empty branch!"); - stream_printf(dest, "\n%s%s", branches_space, - d_tmp->revnum); + if (d_tmp == NULL) { + lprintf(2, "Empty branch!\n"); + return (-1); + } + if (stream_printf(dest, "\n%s%s", branches_space, + d_tmp->revnum) < 0) + return (-1); } - stream_printf(dest, ";\n"); - stream_printf(dest, "next%s", next_space); + if (stream_printf(dest, ";\nnext%s", next_space) < 0) + return (-1); /* Push next delta on stack. */ d_next = LIST_NEXT(d, delta_next); if (d_next != NULL) { - stream_printf(dest, "%s", d_next->revnum); + if (stream_printf(dest, "%s", d_next->revnum) < 0) + return (-1); STAILQ_INSERT_HEAD(&deltastack, d_next, stack_next); } - stream_printf(dest, ";\n\n"); + if (stream_printf(dest, ";\n\n") < 0) + return (-1); } - stream_printf(dest, "\n"); /* Write out desc. */ - stream_printf(dest, "desc\n@@"); + if (stream_printf(dest, "\ndesc\n@@") < 0) + return (-1); d = LIST_FIRST(&rf->trunk->deltalist); /* Write out deltatexts. */ error = rcsfile_write_deltatext(rf, dest); - stream_printf(dest, "\n"); + if (stream_printf(dest, "\n") < 0) + return (-1); return (error); } @@ -438,21 +465,25 @@ rcsfile_write_deltatext(struct rcsfile * /* Do not write out placeholders just to be safe. */ if (d->placeholder) return (0); - stream_printf(dest, "\n\n\n%s\n", d->revnum); - stream_printf(dest, "log\n@"); + if (stream_printf(dest, "\n\n\n%s\n", d->revnum) < 0) + return (-1); + if (stream_printf(dest, "log\n@") < 0) + return (-1); in = stream_open_buf(d->log); line = stream_getln(in, &size); while (line != NULL) { - stream_write(dest, line, size); + if (stream_write(dest, line, size) == -1) + return (-1); line = stream_getln(in, &size); } stream_close(in); - stream_printf(dest, "@\n"); - stream_printf(dest, "text\n@"); + if (stream_printf(dest, "@\ntext\n@") < 0) + return (-1); error = rcsfile_puttext(rf, dest, d, d->prev); if (error) return (error); - stream_printf(dest, "@"); + if (stream_printf(dest, "@") < 0) + return (-1); LIST_INIT(&branchlist_datesorted); d_next = LIST_NEXT(d, delta_next); @@ -535,7 +566,10 @@ rcsfile_puttext(struct rcsfile *rf, stru in = stream_open_buf(d->text); line = stream_getln(in, &size); while (line != NULL) { - stream_write(dest, line, size); + if (stream_write(dest, line, size) == -1) { + error = -1; + goto cleanup; + } line = stream_getln(in, &size); } stream_close(in); @@ -549,7 +583,10 @@ rcsfile_puttext(struct rcsfile *rf, stru } line = stream_getln(orig, &size); while (line != NULL) { - stream_write(dest, line, size); + if (stream_write(dest, line, size) == -1) { + error = -1; + goto cleanup; + } line = stream_getln(orig, &size); } stream_close(orig); @@ -1261,6 +1298,7 @@ int rcsdelta_addlog(struct delta *d, char *log, int len) { struct stream *dest; + int nbytes; assert(d != NULL); /* Strip away '@' at beginning and end. */ @@ -1268,9 +1306,9 @@ rcsdelta_addlog(struct delta *d, char *l len--; log[len - 1] = '\0'; dest = stream_open_buf(d->log); - stream_write(dest, log, len - 1); + nbytes = stream_write(dest, log, len - 1); stream_close(dest); - return (0); + return ((nbytes == -1) ? -1 : 0); } /* Add deltatext to a delta. Assume the delta already exists. */ @@ -1278,6 +1316,7 @@ int rcsdelta_addtext(struct delta *d, char *text, int len) { struct stream *dest; + int nbytes; assert(d != NULL); /* Strip away '@' at beginning and end. */ @@ -1286,36 +1325,40 @@ rcsdelta_addtext(struct delta *d, char * text[len - 1] = '\0'; dest = stream_open_buf(d->text); - stream_write(dest, text, len - 1); + nbytes = stream_write(dest, text, len - 1); stream_close(dest); - return (0); + return ((nbytes == -1) ? -1 : 0); } /* Add a deltatext logline to a delta. */ -void +int rcsdelta_appendlog(struct delta *d, char *logline, size_t size) { struct stream *dest; + int error; assert(d != NULL); dest = stream_open_buf(d->log); - rcsdelta_writestring(logline, size, dest); + error = rcsdelta_writestring(logline, size, dest); stream_close(dest); + return (error); } /* Add a deltatext textline to a delta. */ -void +int rcsdelta_appendtext(struct delta *d, char *textline, size_t size) { struct stream *dest; + int error; assert(d != NULL); dest = stream_open_buf(d->text); - rcsdelta_writestring(textline, size, dest); + error = rcsdelta_writestring(textline, size, dest); stream_close(dest); + return (error); } -static void +static int rcsdelta_writestring(char *textline, size_t size, struct stream *dest) { char buf[3]; @@ -1332,8 +1375,10 @@ rcsdelta_writestring(char *textline, siz buf[2] = '\0'; count = 2; } - stream_write(dest, buf, count); + if (stream_write(dest, buf, count) == -1) + return (-1); } + return (0); } /* Set delta state. */ Modified: stable/7/contrib/csup/rcsfile.h ============================================================================== --- stable/7/contrib/csup/rcsfile.h Fri Apr 3 13:35:54 2009 (r190670) +++ stable/7/contrib/csup/rcsfile.h Fri Apr 3 16:02:13 2009 (r190671) @@ -65,8 +65,8 @@ void rcsfile_importdelta(struct rcsfil int rcsdelta_addlog(struct delta *, char *, int); int rcsdelta_addtext(struct delta *, char *, int); -void rcsdelta_appendlog(struct delta *, char *, size_t); -void rcsdelta_appendtext(struct delta *, char *, size_t); +int rcsdelta_appendlog(struct delta *, char *, size_t); +int rcsdelta_appendtext(struct delta *, char *, size_t); void rcsdelta_setstate(struct delta *, char *); void rcsdelta_truncatetext(struct delta *, off_t); void rcsdelta_truncatelog(struct delta *, off_t); Modified: stable/7/contrib/csup/rcsparse.c ============================================================================== --- stable/7/contrib/csup/rcsparse.c Fri Apr 3 13:35:54 2009 (r190670) +++ stable/7/contrib/csup/rcsparse.c Fri Apr 3 16:02:13 2009 (r190671) @@ -309,7 +309,7 @@ parse_deltatexts(struct rcsfile *rf, yys error = 0; /* In case we don't have deltatexts. */ if (token != NUM) - return (token); + return (-1); do { /* num */ assert(token == NUM); Modified: stable/7/contrib/csup/updater.c ============================================================================== --- stable/7/contrib/csup/updater.c Fri Apr 3 13:35:54 2009 (r190670) +++ stable/7/contrib/csup/updater.c Fri Apr 3 16:02:13 2009 (r190671) @@ -1385,8 +1385,11 @@ updater_addfile(struct updater *up, stru do { nread = stream_read(up->rd, buf, (BUFSIZE > remains ? remains : BUFSIZE)); + if (nread == -1) + return (UPDATER_ERR_PROTO); remains -= nread; - stream_write(to, buf, nread); + if (stream_write(to, buf, nread) == -1) + goto bad; } while (remains > 0); stream_close(to); line = stream_getln(up->rd, NULL); @@ -1411,9 +1414,11 @@ updater_addfile(struct updater *up, stru FA_MODTIME | FA_MASK); error = updater_updatefile(up, fup, md5, isfixup); fup->wantmd5 = NULL; /* So that it doesn't get freed. */ - if (error) - return (error); - return (0); + return (error); +bad: + xasprintf(&up->errmsg, "%s: Cannot write: %s", fup->temppath, + strerror(errno)); + return (UPDATER_ERR_MSG); } static int @@ -1469,7 +1474,9 @@ updater_checkout(struct updater *up, str if (nbytes == -1) goto bad; } - stream_write(to, line, size); + nbytes = stream_write(to, line, size); + if (nbytes == -1) + goto bad; line = stream_getln(up->rd, &size); first = 0; } @@ -1682,8 +1689,11 @@ updater_rcsedit(struct updater *up, stru error = rcsfile_write(rf, dest); stream_close(dest); rcsfile_free(rf); - if (error) - lprintf(-1, "Error writing %s\n", name); + if (error) { + xasprintf(&up->errmsg, "%s: Cannot write: %s", fup->temppath, + strerror(errno)); + return (UPDATER_ERR_MSG); + } finish: sr->sr_clientattr = fattr_frompath(path, FATTR_NOFOLLOW); @@ -1768,7 +1778,9 @@ updater_addelta(struct rcsfile *rf, stru size--; logline++; } - rcsdelta_appendlog(d, logline, size); + if (rcsdelta_appendlog(d, logline, size) + < 0) + return (-1); logline = stream_getln(rd, &size); } break; @@ -1799,7 +1811,9 @@ updater_addelta(struct rcsfile *rf, stru size--; textline++; } - rcsdelta_appendtext(d, textline, size); + if (rcsdelta_appendtext(d, textline, + size) < 0) + return (-1); textline = stream_getln(rd, &size); } break; @@ -1839,8 +1853,15 @@ updater_append_file(struct updater *up, stream_filter_start(to, STREAM_FILTER_MD5, md5); /* First write the existing content. */ - while ((nread = read(fd, buf, BUFSIZE)) > 0) - stream_write(to, buf, nread); + while ((nread = read(fd, buf, BUFSIZE)) > 0) { + if (stream_write(to, buf, nread) == -1) + goto bad; + } + if (nread == -1) { + xasprintf(&up->errmsg, "%s: Error reading: %s", + strerror(errno)); + return (UPDATER_ERR_MSG); + } close(fd); bytes = fattr_filesize(fa) - pos; @@ -1848,8 +1869,11 @@ updater_append_file(struct updater *up, do { nread = stream_read(up->rd, buf, (BUFSIZE > bytes) ? bytes : BUFSIZE); + if (nread == -1) + return (UPDATER_ERR_PROTO); bytes -= nread; - stream_write(to, buf, nread); + if (stream_write(to, buf, nread) == -1) + goto bad; } while (bytes > 0); stream_close(to); @@ -1875,9 +1899,11 @@ updater_append_file(struct updater *up, FA_MODTIME | FA_MASK); error = updater_updatefile(up, fup, md5, 0); fup->wantmd5 = NULL; /* So that it doesn't get freed. */ - if (error) - return (error); - return (0); + return (error); +bad: + xasprintf(&up->errmsg, "%s: Cannot write: %s", fup->temppath, + strerror(errno)); + return (UPDATER_ERR_MSG); } /* From ru at FreeBSD.org Sat Apr 4 17:52:01 2009 From: ru at FreeBSD.org (Ruslan Ermilov) Date: Sat Apr 4 17:52:18 2009 Subject: svn commit: r190707 - stable/7 Message-ID: <200904050051.n350pxtS088818@svn.freebsd.org> Author: ru Date: Sun Apr 5 00:51:59 2009 New Revision: 190707 URL: http://svn.freebsd.org/changeset/base/190707 Log: MFC: Don't put "install-info" to the list of install-tools if we're installing with -DWITHOUT_INFO. Approved by: re (kib) Modified: stable/7/Makefile.inc1 (contents, props changed) Modified: stable/7/Makefile.inc1 ============================================================================== --- stable/7/Makefile.inc1 Sun Apr 5 00:24:49 2009 (r190706) +++ stable/7/Makefile.inc1 Sun Apr 5 00:51:59 2009 (r190707) @@ -597,10 +597,14 @@ installcheck_UGID: # # Installs everything compiled by a 'buildworld'. # +.if ${MK_INFO} != "no" +_install-info= install-info +.endif + distributeworld installworld: installcheck mkdir -p ${INSTALLTMP} for prog in [ awk cap_mkdb cat chflags chmod chown \ - date echo egrep find grep install-info \ + date echo egrep find grep ${_install-info} \ ln lockf make mkdir mtree mv pwd_mkdb rm sed sh sysctl \ test true uname wc zic; do \ cp `which $$prog` ${INSTALLTMP}; \ From luigi at FreeBSD.org Mon Apr 6 04:16:18 2009 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Mon Apr 6 04:16:33 2009 Subject: svn commit: r190762 - stable/7/release/picobsd/build Message-ID: <200904061115.n36BFS1R069583@svn.freebsd.org> Author: luigi Date: Mon Apr 6 11:15:28 2009 New Revision: 190762 URL: http://svn.freebsd.org/changeset/base/190762 Log: MFC: bring in recent fixes to the picobsd script Approved by: re (blanket on picobsd) Modified: stable/7/release/picobsd/build/picobsd Modified: stable/7/release/picobsd/build/picobsd ============================================================================== --- stable/7/release/picobsd/build/picobsd Mon Apr 6 11:14:30 2009 (r190761) +++ stable/7/release/picobsd/build/picobsd Mon Apr 6 11:15:28 2009 (r190762) @@ -3,17 +3,17 @@ # $FreeBSD$ # This file requires sysutils/makefs to run # -# The new PicoBSD build script. Invoked as +# The PicoBSD build script. Invoked as # -# picobsd [options] floppy_type site_name +# picobsd [options] image_type [site_name] # -# Where floppy_type is a directory where the picobsd config info -# is held, and ${floppy_type}/floppy.tree.${site_name} contains +# Where image_type is a directory with the picobsd config info, +# and ${image_type}/floppy.tree.${site_name} contains # optional site-specific configuration. # # For Options, see the bottom of the file where the processing is # done. The picobsd(8) manpage might be of some help, but code and docs -# tend to lose sync over time... +# tend to lose sync over time. # # This script depends on the following files: # @@ -33,36 +33,42 @@ # floppy.tree/ local additions to ${PICO_TREE}/mfs_free # floppy.tree.${site}/ same as above, site specific. # mfs_tree/ local additions to the mfs_free -# buildtree.mk optional makefile to build an extension for floppy tree +# buildtree.mk optional Makefile to build an extension for floppy tree # (generated in buildtree/ ) # #--- The main entry point is at the end. # -# There are two set of initialization. The first one (set_defaults) -# is done on entry to the script, and is used to set default values -# for all variables which do not depend on floppy type and source tree. +# There are two initialization functions: # -# The second set is done after command line parsing, e.g. -# to resolve dependencies on the source tree. +# + set_defaults +# is run on entry to the script, and is used to set default values +# for all variables that do not depend on image type and source tree. # -# Naming: +# + set_build_parameters +# is run after command line parsing +# +# VARIABLE NAMES: # + variables that control operation (e.g. verbosity) and are generally # set from the command line have o_ ("option") as a name prefix # -# + variables which contain pathnames and values that should not change +# + variables that contain pathnames and values that should not change # have c_ ("constant") as a name prefix # # + variables exported to Makefiles and subshells are CAPITAL # # + variables local to the script are lowercase, possibly with -# an l_ ("local") prefix +# an l_ ("local") prefix. +# +# There are unfortunately exceptions: +# name, l_usrtree, l_objtree # SRC points to your FreeBSD source tree. # l_usrtree points to the /usr subdir for the source tree. # Normally /usr or ${SRC}/../usr # l_objtree points to the obj tree. Normally ${l_usrtree}/obj-pico +# c_label is either bsdlabel or disklabel # PICO_TREE is where standard picobsd stuff resides. # Normally ${SRC}/release/picobsd # You can set SRC with --src @@ -71,28 +77,27 @@ # MY_TREE (set later) is where this floppy type resides. # BUILDDIR is the build directory -# set some default values for variables. -# needs to be done as the first thing in the script. - # log something on stdout if verbose. o_verbose=0 # this needs to be here! -log() { +log() { # message local foo [ ${o_verbose} -gt 0 ] && printf "\n*** %s\n" "$*" [ ${o_verbose} -gt 1 ] && read -p "=== Press enter to continue" foo return 0 } -logverbose() { +# unconditionally log and wait for input +logverbose() { # message local foo printf "\n*** %s\n" "$*" read -p "=== Press enter to continue" foo return 0 } -set_defaults() { - # no way to use logging in this function, variable not set yet. +# set some default values for variables. +# needs to be done as the first thing in the script. +set_defaults() { # no arguments # EDITOR is the editor you use # fd_size floppy size in KB (default to 1440). You can use 1480, # 1720, 2880, etc. but beware that only 1440 and 1480 will boot @@ -101,15 +106,20 @@ set_defaults() { fd_size=${fd_size:-1440} o_use_loader="yes" # use /boot/loader - o_all_in_mfs="yes" # put all files in mfs so you can boot and run - # the image via diskless boot. - o_clean="" # do not clean + # You should not change it unless you are really short + # of space, and your kernel is small enough that the + # bootblocks manage to load it. + + o_all_in_mfs="yes" # put all files in mfs so you can boot + # and run the image via diskless boot. + o_clean="" # set if you want to clean prev.builds. o_interactive="" # default is interactive o_verbose=0 # verbose level, 0 is silent o_tarv="" # tar verbose flag, "" or "v" - o_init_src="" # non "" if we need to init libs and includes. + o_init_src="" # set to build libs and includes. o_makeopts=${MAKEOPTS:--s} # make options, be silent by default - o_no_devfs=yes # we do not want devfs + o_no_devfs= # default is use devfs. + # You should only set it when building 4.x images o_do_modules="" # do not build modules SRC="/usr/src" # default location for sources @@ -132,13 +142,13 @@ set_defaults() { c_img=picobsd.bin # filename used for the picobsd image generate_iso="NO" # don't generate the iso image - # select the right memory disk name + # select the right disklabel program case `uname -r` in - 7.*|6.*|5.*) - l_label="bsdlabel" + 4.*) + c_label="disklabel" ;; *) - l_label="disklabel" + c_label="bsdlabel" ;; esac @@ -150,8 +160,9 @@ set_defaults() { trap fail 15 } -# use the new build infrastructure -create_includes_and_libraries2() { +# use the new build infrastructure to create libraries +# and also to build a specific target +create_includes_and_libraries2() { # opt_dir opt_target local no log "create_includes_and_libraries2() for ${SRC}" if [ ${OSVERSION} -ge 600000 ] ; then @@ -163,7 +174,11 @@ create_includes_and_libraries2() { export MAKEOBJDIRPREFIX ( cd ${SRC}; # make -DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R -DPICOBSD buildworld - make _+_= $no toolchain _includes _libraries + if [ -d "$1" ] ; then + cd $1 ; make $2 # specific target, e.g. ld-elf.so + else + make _+_= $no toolchain _includes _libraries + fi ) } @@ -173,7 +188,7 @@ create_includes_and_libraries() { log "create_includes_and_libraries() for ${SRC}" # Optionally creates include directory and libraries. - mkdir -p ${l_usrtree}/include # the include directory... + mkdir -p ${l_usrtree}/include # the include directory... mkdir -p ${l_usrtree}/share/misc # a few things go here mkdir -p ${l_usrtree}/lib # libraries mkdir -p ${l_usrtree}/sbin # some binaries @@ -210,11 +225,12 @@ create_includes_and_libraries() { log "Libraries done" } -# set_type looks in user or system directories for the floppy type -# specified as first argument, and sets variables according to the config. -# file. Also sets MY_TREE and BUILDDIR and SITE +# set_type [the_site] looks in user or system directories +# for the directory named as the first argument, reads the configuration +# files and sets variables according to the config. +# Also sets MY_TREE and BUILDDIR and SITE -set_type() { +set_type() { # the_type the_site local a i log "set_type() : Type '$1' site '$2'" @@ -242,7 +258,7 @@ set_type() { clean_tree() { log "clean_tree()" - if [ "${name}" = "" ] ; then + if [ -z "${name}" ] ; then echo "---> Wrong floppy type" exit 3 fi @@ -271,7 +287,7 @@ build_iso_image() { # Main build procedure. build_image() { log "build_image() <${name}>" - [ "${name}" != "" ] || fail $? bad_type + [ -n "${name}" ] || fail $? bad_type clear set_msgs printf "${MSG}---> We'll use the sources living in ${SRC}\n\n" @@ -281,12 +297,8 @@ build_image() { # variables. # . ${PICO_TREE}/build/config - if [ -f ${MY_TREE}/config ] ; then - . ${MY_TREE}/config - fi - if [ -f ${o_additional_config} ] ; then - . ${o_additional_config} - fi + [ -f "${MY_TREE}/config" ] && . ${MY_TREE}/config + [ -f "${o_additional_config}" ] && . ${o_additional_config} # location of the object directory PICO_OBJ=${l_objtree}/picobsd/${THETYPE} @@ -312,34 +324,13 @@ build_image() { fill_floppy_image # copies everything into the floppy } -build_package() { - local z msg - - log "build_package()" - rm -rf build.status - echo "##############################################" >>build.status - echo "## `date` ">>build.status - echo "##############################################" >>build.status - for z in bridge dial router net isp ; do - set_type ${z} - echo "---------------------------------------------">>build.status - echo "Building TYPE=${z}, SIZE=${MFS_SIZE}" >>build.status - msg="(ok)" # error message - build_image || msg="** FAILED! **" - echo " ${msg}">>build.status - # where do i put things ? - # clean_tree - done - exit 0 -} - # Set build parameters interactively main_dialog() { local ans i l log "main_dialog()" - while [ true ] ; do + while true ; do set_msgs rm ${c_reply} dialog --menu "PicoBSD build menu -- (29 sep 2001)" 19 70 12 \ @@ -547,7 +538,7 @@ do_copyfiles() { # rootdir varname eval set "\${${2}}" srcs="" for dst in $* ; do - [ x"$srcs" = x ] && srcs=$dst && continue + [ -z "$srcs" ] && srcs=$dst && continue eval srcs="$srcs" # expand wildcard and vars case x"$dst" in */ ) mkdir -p ${root}/${dst} ;; @@ -558,6 +549,80 @@ do_copyfiles() { # rootdir varname done } +# do_links is a helper function to create links between programs +# in stand/ +# This is done reading the names and destination from variable +# links in a config file, in the format +# : dst names + +do_links() { # rootdir varname + local root=$1 + local l i dst + eval l="\${${2}}" + dst="" + log "Create links for ${l}" + (cd ${root}/stand + for i in $l ; do + if [ "$dst" = ":" -o "$i" = ":" ] ; then + dst=$i + elif [ -n "${dst}" ] ; then + ln -s ${dst} ${i} + fi + done + ) +} + +# find_progs is a helper function to locate the named programs +# or libraries in ${o_objdir} or ${_SHLIBDIRPREFIX}, +# and return the full pathnames. +# Sets ${u_progs} to the list of programs, and ${u_libs} +# to the list of shared libraries used. +# +# You can use it e.g. in a local configuration file by writing +# +# do_copyfiles_user() { +# local dst=$1 +# find_progs nvi sed less grep +# cp -p ${u_progs} ${dst}/bin +# cp -p ${u_libs} ${dst}/lib +# mkdir -p ${dst}/libexec +# find_progs ld-elf.so.1 +# cp -p ${u_progs} ${dst}/libexec +# } + +find_progs() { # programs + local i + u_progs="`find_progs_helper $*`" + local o=${o_objdir:-${_SHLIBDIRPREFIX}} + [ -z "${u_progs}" ] && return 1 # not found, error + i="`ldd ${u_progs} | grep -v '^/' | awk '{print $1}' | sort | uniq`" + u_libs="`find_progs_helper $i`" + return 0 +} + +find_progs_helper() { # programs + local progs="$*" + local i o places names + local subdirs="bin sbin usr.bin usr.sbin libexec lib \ + gnu/usr.bin gnu/lib \ + secure/usr.bin secure/usr.sbin secure/libexec secure/lib" + names="" # files to search + o="" + for i in $progs ; do + # plain programs come out verbatim + [ -f "$i" ] && echo $i && continue + names="${names} ${o} -name $i" + o="-o" + done + [ -z "${names}" ] && return 0 + places="" # places to search + o=${o_objdir:-${_SHLIBDIRPREFIX}/..} + for i in $subdirs ; do + [ -d "${o}/${i}" ] && places="${places} ${o}/${i}" + done + find ${places} -type f \( ${names} \) +} + # Populate the memory filesystem with binaries and non-variable # configuration files. # First do an mtree pass, then create directory links and device entries, @@ -647,7 +712,7 @@ populate_mfs_tree() { fi # 4.x compatibility - create device nodes - if [ "${o_no_devfs}" != "" ] ; then + if [ -n "${o_no_devfs}" ] ; then # create device entries using MAKEDEV (cd ${dst}/dev ln -s ${SRC}/etc/MAKEDEV ; chmod 555 MAKEDEV @@ -661,10 +726,21 @@ populate_mfs_tree() { (cd ${dst}; chown -R root . ) fi - if [ -n "${copy_files}" ] ; then - do_copyfiles ${dst} copy_files + # If we are building a shared 'crunch', take the libraries + # and the dynamic loader as well + find_progs ${dst}/stand/crunch + if [ -n "${u_libs}" ] ; then + mkdir -p ${dst}/lib && cp -p ${u_libs} ${dst}/lib + mkdir -p ${dst}/libexec + create_includes_and_libraries2 libexec/rtld-elf + find_progs ld-elf.so.1 && cp -p ${u_progs} ${dst}/libexec fi + [ -n "${copy_files}" ] && do_copyfiles ${dst} copy_files + do_copyfiles_user ${dst} || true + [ -n "${links}" ] && do_links ${dst} links + strip ${dst}/libexec/* ${dst}/lib/* ${dst}/stand/* 2> /dev/null || true + # The 'import_files' mechanism is deprecated, as it requires # root permissions to follow the symlinks, and also does # not let you rename the entries. @@ -829,22 +905,22 @@ fill_floppy_image() { (cd ${BUILDDIR} makefs -t ffs -o bsize=4096 -o fsize=512 \ -s ${blocks}k -f 50 ${c_img} ${dst} - # ${l_label} -f `pwd`/${c_img} - ${l_label} -w -f `pwd`/${c_img} auto # write in a label + + ${c_label} -w -f `pwd`/${c_img} auto # write in a label # copy partition c: into a: with some sed magic - ${l_label} -f `pwd`/${c_img} | sed -e '/ c:/{p;s/c:/a:/;}' | \ - ${l_label} -R -f `pwd`/${c_img} /dev/stdin - ${l_label} -f `pwd`/${c_img} + ${c_label} -f `pwd`/${c_img} | sed -e '/ c:/{p;s/c:/a:/;}' | \ + ${c_label} -R -f `pwd`/${c_img} /dev/stdin + ${c_label} -f `pwd`/${c_img} ls -l ${c_img} - ${l_label} -f `pwd`/${c_img} + ${c_label} -f `pwd`/${c_img} logverbose "after disklabel" ) echo "BUILDDIR ${BUILDDIR}" if [ "${generate_iso}" = "YES" ]; then echo "generate_iso ${generate_iso}" - #build_iso_image() + # build_iso_image # XXX not implemented yet exit 1 fi @@ -872,7 +948,6 @@ fill_floppy_image() { # needs to be done once). set_build_parameters() { - log "set_build_parameters() SRC is ${SRC}" if [ "${SRC}" = "/usr/src" ] ; then l_usrtree=${USR:-/usr} else @@ -899,6 +974,19 @@ set_build_parameters() { CONFIG=${l_usrtree}/sbin/config export CONFIG fi + + # if we have o_objdir, find where bin/ is + if [ ! -z "${o_objdir}" ] ; then + if [ -d ${o_objdir}/bin ] ; then + # fine + elif [ -d "${o_objdir}${SRC}/bin" ] ; then + o_objdir="${o_objdir}${SRC}" + log "Changing objdir to ${o_objdir}" + else + log "Cannot find objdir in ${o_objdir}, sorry" + o_objdir="" + fi + fi } #------------------------------------------------------------------- @@ -907,9 +995,10 @@ set_build_parameters() { set_defaults while [ true ]; do + log "Parsing $1" case $1 in --src) # set the source path instead of /usr/src - SRC=`(cd $2; pwd)` + SRC=`realpath $2` shift ;; --init) @@ -961,6 +1050,12 @@ while [ true ]; do shift ;; + --objdir) # Place with results of a previous buildworld + # useful if you want to copy shared binaries and libs + o_objdir=`realpath $2` + shift + ;; + *) break ;; @@ -968,12 +1063,10 @@ while [ true ]; do esac shift done + set_build_parameters # things that depend on ${SRC} set_type $1 $2 # type and site, respectively -# If $1="package", it creates a neat set of floppies -[ "$1" = "package" ] && build_package - [ "${o_interactive}" != "NO" ] && main_dialog if [ "${o_clean}" = "YES" ] ; then From luigi at FreeBSD.org Mon Apr 6 04:21:42 2009 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Mon Apr 6 04:22:05 2009 Subject: svn commit: r190763 - stable/7/release/picobsd/mfs_tree/etc Message-ID: <200904061121.n36BLE5I069779@svn.freebsd.org> Author: luigi Date: Mon Apr 6 11:21:14 2009 New Revision: 190763 URL: http://svn.freebsd.org/changeset/base/190763 Log: put the absolute path for /etc/rc1 Approved by: re (blanket on picobsd) Modified: stable/7/release/picobsd/mfs_tree/etc/rc Modified: stable/7/release/picobsd/mfs_tree/etc/rc ============================================================================== --- stable/7/release/picobsd/mfs_tree/etc/rc Mon Apr 6 11:15:28 2009 (r190762) +++ stable/7/release/picobsd/mfs_tree/etc/rc Mon Apr 6 11:21:14 2009 (r190763) @@ -23,5 +23,5 @@ for i in *; do [ -f $i.gz ] && rm $i done gzip -d *.gz -. rc1 +. /etc/rc1 exit 0 From luigi at FreeBSD.org Mon Apr 6 04:22:23 2009 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Mon Apr 6 04:22:38 2009 Subject: svn commit: r190764 - stable/7/release/picobsd/floppy.tree/etc Message-ID: <200904061121.n36BLw7k069824@svn.freebsd.org> Author: luigi Date: Mon Apr 6 11:21:58 2009 New Revision: 190764 URL: http://svn.freebsd.org/changeset/base/190764 Log: MFC: remove call to non-existing dev-mkdb Approved by: re (blanket on picobsd) Modified: stable/7/release/picobsd/floppy.tree/etc/rc1 Modified: stable/7/release/picobsd/floppy.tree/etc/rc1 ============================================================================== --- stable/7/release/picobsd/floppy.tree/etc/rc1 Mon Apr 6 11:21:14 2009 (r190763) +++ stable/7/release/picobsd/floppy.tree/etc/rc1 Mon Apr 6 11:21:58 2009 (r190764) @@ -45,7 +45,6 @@ mount -a -t nfs [ -n "$network_pass2_done" ] && network_pass3 pwd_mkdb -p ./master.passwd -dev_mkdb [ -f /etc/syslog.conf -a -f /stand/syslogd ] && \ { echo "Starting syslogd."; syslogd ${syslogd_flags} ; } From luigi at FreeBSD.org Mon Apr 6 04:23:08 2009 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Mon Apr 6 04:23:28 2009 Subject: svn commit: r190765 - stable/7/release/picobsd/bridge Message-ID: <200904061122.n36BMTB5069887@svn.freebsd.org> Author: luigi Date: Mon Apr 6 11:22:29 2009 New Revision: 190765 URL: http://svn.freebsd.org/changeset/base/190765 Log: diff reduction with the version in head Approved by: re (blanket on picobsd) Modified: stable/7/release/picobsd/bridge/PICOBSD Modified: stable/7/release/picobsd/bridge/PICOBSD ============================================================================== --- stable/7/release/picobsd/bridge/PICOBSD Mon Apr 6 11:21:58 2009 (r190764) +++ stable/7/release/picobsd/bridge/PICOBSD Mon Apr 6 11:22:29 2009 (r190765) @@ -3,8 +3,8 @@ # # Line starting with #PicoBSD contains PicoBSD build parameters #marker def_sz init MFS_inodes floppy_inodes -#PicoBSD 5000 init 8192 32768 -options MD_ROOT_SIZE=5000 # same as def_sz +#PicoBSD 8000 init 8192 32768 +options MD_ROOT_SIZE=8000 # same as def_sz hints "PICOBSD.hints" @@ -45,7 +45,7 @@ options DUMMYNET device if_bridge options HZ=1000 -device random # ssh needs /dev/random +device random # used by ssh device pci # Floppy drives @@ -65,7 +65,6 @@ device atkbd device vga # VGA screen # syscons is the default console driver, resembling an SCO console - device sc # Serial (COM) ports @@ -89,16 +88,12 @@ device sio # The following Ethernet NICs are all PCI devices. # device miibus -#device de # DEC/Intel DC21x4x (``Tulip'') -#device lnc device fxp # Intel EtherExpress PRO/100B (82557, 82558) device nfe # nVidia nForce MCP on-board Ethernet #device xl # 3Com device rl # RealTek 8129/8139 device re # RealTek 8139C+/8169/8169S/8110S device sis # National/SiS -#device vx # 3Com 3c590, 3c595 (``Vortex'') -#device wx # Intel Gigabit Ethernet Card (``Wiseman'') device dc # DEC/Intel 21143 and various workalikes device ed From luigi at FreeBSD.org Mon Apr 6 04:24:09 2009 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Mon Apr 6 04:24:36 2009 Subject: svn commit: r190766 - stable/7/release/picobsd/bridge Message-ID: <200904061123.n36BNKK1069939@svn.freebsd.org> Author: luigi Date: Mon Apr 6 11:23:20 2009 New Revision: 190766 URL: http://svn.freebsd.org/changeset/base/190766 Log: bump image size to 4MB and remove references to non-devfs configs Approved by: re (blanket on picobsd) Modified: stable/7/release/picobsd/bridge/config Modified: stable/7/release/picobsd/bridge/config ============================================================================== --- stable/7/release/picobsd/bridge/config Mon Apr 6 11:22:29 2009 (r190765) +++ stable/7/release/picobsd/bridge/config Mon Apr 6 11:23:20 2009 (r190766) @@ -3,5 +3,4 @@ # it should only contain variable definitions -- it is sourced # by the shell much like rc.conf* files -o_no_devfs="" # we have devfs. -fd_size="2880" +fd_size="4096" From luigi at FreeBSD.org Mon Apr 6 04:31:37 2009 From: luigi at FreeBSD.org (Luigi Rizzo) Date: Mon Apr 6 04:31:45 2009 Subject: svn commit: r190767 - stable/7/release/picobsd/bridge Message-ID: <200904061131.n36BVVan070125@svn.freebsd.org> Author: luigi Date: Mon Apr 6 11:31:31 2009 New Revision: 190767 URL: http://svn.freebsd.org/changeset/base/190767 Log: MFC: use shared libraries for the crunched binary, put together the basic binaries so it is easier to replace them with busybox. Approved by: re (blanket on picobsd) Modified: stable/7/release/picobsd/bridge/crunch.conf Modified: stable/7/release/picobsd/bridge/crunch.conf ============================================================================== --- stable/7/release/picobsd/bridge/crunch.conf Mon Apr 6 11:23:20 2009 (r190766) +++ stable/7/release/picobsd/bridge/crunch.conf Mon Apr 6 11:31:31 2009 (r190767) @@ -1,39 +1,55 @@ # # $FreeBSD$ # -# configuration file for "bridge" floppy. -# Depending on your needs, almost surely you will need to -# modify your configuration to add/remove/change programs used in -# the floppy image. Remember that some programs also require -# matching kernel options to enable device drivers etc. -# -# Next to most of the programs i have tried to indicate the approximate -# space consumed, but beware that these values change from release -# to release, and might depend on the presence of other programs which -# share the same libraries. +# Configuration file for "bridge" images.. # -# NOTE: the string "/usr/src" will be automatically replaced with the -# correct value set in 'build' script - you should change it there +# Depending on your needs, you will almost surely need to +# add/remove/change programs according to your needs. +# Remember that some programs require matching kernel options to +# enable device drivers etc. +# +# To figure out how much space is used by each program, do +# +# size build_dir-bridge/crunch/*lo +# +# Remember that programs require libraries, which add up to the +# total size. The final binary is build_dir-bridge/mfs.tree/stand/crunch +# and you can check which libraries it uses with +# +# ldd build_dir-bridge/mfs.tree/stand/crunch -# Default build options. Basically tell the Makefiles which understand -# that to use the most compact possible version of the code. +# crunchgen configuration to build the crunched binary, see "man crunchgen" +# We need to specify generic build options, the places where to look +# for sources, and the list of program and libraries we want to put +# in the crunched binary. # -buildopts -DNO_PAM -DRELEASE_CRUNCH -DPPP_NO_NETGRAPH -DTRACEROUTE_NO_IPSEC -DNO_INET6 +# NOTE: the string "/usr/src" below will be automatically replaced with +# the path set in the 'build' script. + +# Default build options. Basically tell the Makefiles +# that to use the most compact possible version of the code. + +buildopts -DNO_PAM -DRELEASE_CRUNCH -DPPP_NO_NETGRAPH +buildopts -DTRACEROUTE_NO_IPSEC -DNO_INET6 buildopts -DWITHOUT_IPX -# directories where to look for sources of various binaries. +# Directories where to look for sources of various binaries. # @__CWD__@ is a magic keyword in the picobsd's (Makefile.conf) -# which is replaced with the picobsd directory. +# which is replaced with the directory with the picobsd configuration +# corresponding to your image. This way you can have custom sources +# in that directory overriding system programs. + srcdirs @__CWD__@/src -# Some programs are especially written for PicoBSD and reside here -# Make this first in the list so we can override standard programs -# with the picobsd-specific ones. +# Some programs are especially written for PicoBSD and reside in +# release/picobsd/tinyware. +# Put this entry near the head of the list to override standard binaries. + srcdirs /usr/src/release/picobsd/tinyware -# -# standard locations -# +# Other standard locations for sources. +# If a program uses its own source directory, add + srcdirs /usr/src/bin srcdirs /usr/src/sbin/i386 srcdirs /usr/src/sbin @@ -41,51 +57,59 @@ srcdirs /usr/src/usr.bin srcdirs /usr/src/gnu/usr.bin srcdirs /usr/src/usr.sbin srcdirs /usr/src/libexec -# -# And there are others (mostly ports) which reside in their specific -# directories. For them, we use the "special" commands to tell -# crunchgen where to look for sources, objects, which Makefile -# variables contain the list of sources and objects, and so on. -# init is almost always necessary. +# For programs that reside in different places, the best option +# is to use the command "special XXX srcdir YYY" where XXX is the +# program name and YYY is the directory path. +# "special XXX ..." can be used to specify more options, see again +# the crunchgen manpage. + +#--- Basic configuraton +# init is always necessary (unless you have a replacement, oinit) progs init + # fsck is almost always necessary, unless you have everything on the # image and use 'tar' or something similar to read/write raw blocks # from the floppy. + progs fsck -# ifconfig is needed if you want to configure interfaces... + +# ifconfig is needed if you want to configure interfaces. progs ifconfig -# + # You will also need a shell and a bunch of utilities. # The standard shell is not that large, but you need many # external programs. In fact most of them do not take much space -# as they merely issue a system call, and print the result; the -# libraries are already needed anyways, so they end up using almost -# no additional memory. -# There are a few exceptions such as 'less', which in 4.x is -# rather large. +# as they merely issue a system call, and print the result. +# For a more compact version of shell and utilities, you could +# try busybox, however most system management commands in busybox +# will not work as they use linux-specific interfaces. + progs sh ln sh -sh + +# the small utilities, also available in busybox progs echo -progs pwd -progs mkdir rmdir +progs pwd mkdir rmdir progs chmod chown -progs mv ln -progs mount +ln chown chgrp +progs mv ln cp rm ls +progs cat tail tee +progs test +ln test [ +progs du +progs kill progs minigzip ln minigzip gzip -progs cp -progs rm -progs ls -progs kill +progs ee # editor (busybox has 'vi') + +# FreeBSD commands not working in busybox +progs mount progs df progs ps -progs ns +progs ns # this is the picobsd version ln ns netstat progs vm -progs cat -progs test -ln test [ progs hostname progs login progs getty @@ -94,72 +118,57 @@ progs w progs msg ln msg dmesg progs reboot -progs less -ln less more progs sysctl progs swapon progs pwd_mkdb progs umount -progs du -progs tail -progs tee progs passwd progs route -# progs mount_msdosfs -# progs comcontrol -# + # If you want to run natd, remember the alias library #progs natd -#libs -lalias # natd -# +#libs_so -lalias # natd + # ppp is rather large. Note that as of Jan.01, RELEASE_CRUNCH # makes ppp not use libalias, so you cannot have aliasing. #progs ppp -# You need an editor. ee is relatively small, though there are -# smaller ones. vi is much larger. -# The editor also usually need a curses library. -progs ee -libs -lncurses -# progs vi # ?? -# libs -lcurses # for vi - -#progs tcpdump -special tcpdump srcdir /usr/src/usr.sbin/tcpdump/tcpdump - progs arp -progs bsdlabel -progs fdisk -progs mdconfig +# these require libgeom +# progs bsdlabel fdisk mdconfig -progs kldload kldunload kldstat kldxref -#progs grep +progs kldload kldunload kldstat +progs kldxref progs date -#progs mount_nfs -ln mount_nfs nfs progs ping #progs routed progs ipfw progs traceroute progs mdmfs ln mdmfs mount_mfs +# Various filesystem support -- remember to enable the kernel parts +# progs mount_msdosfs +# progs mount_nfs # progs mount_cd9660 -# ln mount_cd9660 cd9660 -progs newfs +ln mount_nfs nfs +ln mount_cd9660 cd9660 +# progs newfs #ln newfs mount_mfs -ln chown chgrp # ln mount_msdosfs msdos # For a small ssh client/server use dropbear -libs -ll # used by sh -libs -lufs # used by mount -### ee uses ncurses instead of curses -libs -ledit -lutil -lmd -lcrypt -lmp -lm -lkvm -libs -lz -lpcap -lwrap -libs -ltermcap -lgnuregex # -lcurses -libs -lgeom -libs -lsbuf -lbsdxml +# Now the libraries +libs_so -lc # the C library +libs_so -ll # used by sh (really ?) +libs_so -lufs # used by mount +### ee uses ncurses but as a dependency +#libs_so -lncurses +libs_so -lm +libs_so -ledit -lutil +libs_so -lcrypt +libs_so -lkvm +libs_so -lz From brueffer at FreeBSD.org Mon Apr 6 05:01:07 2009 From: brueffer at FreeBSD.org (Christian Brueffer) Date: Mon Apr 6 05:01:20 2009 Subject: svn commit: r190768 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern Message-ID: <200904061200.n36C0p4e070737@svn.freebsd.org> Author: brueffer Date: Mon Apr 6 12:00:51 2009 New Revision: 190768 URL: http://svn.freebsd.org/changeset/base/190768 Log: MFC: rev. 190557 Fix memory leak in semunload(). Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/sysv_sem.c Modified: stable/7/sys/kern/sysv_sem.c ============================================================================== --- stable/7/sys/kern/sysv_sem.c Mon Apr 6 11:31:31 2009 (r190767) +++ stable/7/sys/kern/sysv_sem.c Mon Apr 6 12:00:51 2009 (r190768) @@ -285,6 +285,7 @@ semunload(void) free(semu, M_SEM); for (i = 0; i < seminfo.semmni; i++) mtx_destroy(&sema_mtx[i]); + free(sema_mtx, M_SEM); mtx_destroy(&sem_mtx); mtx_destroy(&sem_undo_mtx); return (0); From cperciva at FreeBSD.org Mon Apr 6 08:45:05 2009 From: cperciva at FreeBSD.org (Colin Percival) Date: Mon Apr 6 08:45:17 2009 Subject: svn commit: r190778 - in stable/7/usr.sbin/portsnap: . phttpget Message-ID: <200904061545.n36Fj3nB075911@svn.freebsd.org> Author: cperciva Date: Mon Apr 6 15:45:03 2009 New Revision: 190778 URL: http://svn.freebsd.org/changeset/base/190778 Log: MFC r190679: Set SO_NOSIGPIPE on sockets in order to avoid having phttpget die when a RST packet arrives. Approved by: re (kib) Modified: stable/7/usr.sbin/portsnap/ (props changed) stable/7/usr.sbin/portsnap/phttpget/phttpget.c Modified: stable/7/usr.sbin/portsnap/phttpget/phttpget.c ============================================================================== --- stable/7/usr.sbin/portsnap/phttpget/phttpget.c Mon Apr 6 15:29:44 2009 (r190777) +++ stable/7/usr.sbin/portsnap/phttpget/phttpget.c Mon Apr 6 15:45:03 2009 (r190778) @@ -317,6 +317,7 @@ main(int argc, char *argv[]) int chunked; /* != if transfer-encoding is chunked */ off_t clen; /* Chunk length */ int firstreq = 0; /* # of first request for this connection */ + int val; /* Value used for setsockopt call */ /* Check that the arguments are sensible */ if (argc < 2) @@ -370,6 +371,11 @@ main(int argc, char *argv[]) setsockopt(sd, SOL_SOCKET, SO_RCVTIMEO, (void *)&timo, (socklen_t)sizeof(timo)); + /* ... disable SIGPIPE generation ... */ + val = 1; + setsockopt(sd, SOL_SOCKET, SO_NOSIGPIPE, + (void *)&val, sizeof(int)); + /* ... and connect to the server. */ if(connect(sd, res->ai_addr, res->ai_addrlen)) { close(sd); From trasz at FreeBSD.org Mon Apr 6 10:33:37 2009 From: trasz at FreeBSD.org (Edward Tomasz Napierala) Date: Mon Apr 6 10:33:54 2009 Subject: svn commit: r190782 - in stable/7/sys: . contrib/pf dev/cxgb geom/journal Message-ID: <200904061733.n36HXZD8078312@svn.freebsd.org> Author: trasz Date: Mon Apr 6 17:33:35 2009 New Revision: 190782 URL: http://svn.freebsd.org/changeset/base/190782 Log: MFC r185693: Make it possible to use gjournal for the root filesystem. Previously, an unclean shutdown would make it impossible to mount rootfs at boot. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/geom/journal/g_journal.c stable/7/sys/geom/journal/g_journal.h Modified: stable/7/sys/geom/journal/g_journal.c ============================================================================== --- stable/7/sys/geom/journal/g_journal.c Mon Apr 6 17:08:48 2009 (r190781) +++ stable/7/sys/geom/journal/g_journal.c Mon Apr 6 17:33:35 2009 (r190782) @@ -2108,6 +2108,12 @@ g_journal_worker(void *arg) g_topology_unlock(); last_write = time_second; + if (sc->sc_rootmount != NULL) { + GJ_DEBUG(1, "root_mount_rel %p", sc->sc_rootmount); + root_mount_rel(sc->sc_rootmount); + sc->sc_rootmount = NULL; + } + for (;;) { /* Get first request from the queue. */ mtx_lock(&sc->sc_mtx); @@ -2304,6 +2310,9 @@ g_journal_create(struct g_class *mp, str sc->sc_inactive.jj_queue = NULL; sc->sc_active.jj_queue = NULL; + sc->sc_rootmount = root_mount_hold("GJOURNAL"); + GJ_DEBUG(1, "root_mount_hold %p", sc->sc_rootmount); + callout_init(&sc->sc_callout, CALLOUT_MPSAFE); if (md->md_type != GJ_TYPE_COMPLETE) { /* @@ -2434,6 +2443,13 @@ g_journal_destroy(struct g_journal_softc sc->sc_flags |= (GJF_DEVICE_DESTROY | GJF_DEVICE_CLEAN); g_topology_unlock(); + + if (sc->sc_rootmount != NULL) { + GJ_DEBUG(1, "root_mount_rel %p", sc->sc_rootmount); + root_mount_rel(sc->sc_rootmount); + sc->sc_rootmount = NULL; + } + callout_drain(&sc->sc_callout); mtx_lock(&sc->sc_mtx); wakeup(sc); Modified: stable/7/sys/geom/journal/g_journal.h ============================================================================== --- stable/7/sys/geom/journal/g_journal.h Mon Apr 6 17:08:48 2009 (r190781) +++ stable/7/sys/geom/journal/g_journal.h Mon Apr 6 17:33:35 2009 (r190782) @@ -163,6 +163,8 @@ struct g_journal_softc { struct callout sc_callout; struct proc *sc_worker; + + struct root_hold_token *sc_rootmount; }; #define sc_dprovider sc_dconsumer->provider #define sc_jprovider sc_jconsumer->provider From ru at FreeBSD.org Tue Apr 7 05:49:52 2009 From: ru at FreeBSD.org (Ruslan Ermilov) Date: Tue Apr 7 05:50:09 2009 Subject: svn commit: r190797 - stable/7/usr.sbin/jexec Message-ID: <200904071249.n37CnoC4008739@svn.freebsd.org> Author: ru Date: Tue Apr 7 12:49:50 2009 New Revision: 190797 URL: http://svn.freebsd.org/changeset/base/190797 Log: MFC: - Add missing include. - Style: size_t can't be negative. - Don't exit with a zero status code when no jails are configured on a system. - Style: simplify some code constructs. - If a single jail cannot be found, let the caller print a proper diagnostic message. Approved by: re (kib) Modified: stable/7/usr.sbin/jexec/ (props changed) stable/7/usr.sbin/jexec/jexec.c Modified: stable/7/usr.sbin/jexec/jexec.c ============================================================================== --- stable/7/usr.sbin/jexec/jexec.c Tue Apr 7 12:39:55 2009 (r190796) +++ stable/7/usr.sbin/jexec/jexec.c Tue Apr 7 12:49:50 2009 (r190797) @@ -29,8 +29,10 @@ #include #include +#include #include + #include #include #include @@ -117,8 +119,8 @@ lookup_jail(int jid, char *jailname) j = len; for (i = 0; i < 4; i++) { - if (len <= 0) - exit(0); + if (len == 0) + return (-1); p = q = malloc(len); if (p == NULL) err(1, "malloc()"); @@ -172,27 +174,21 @@ lookup_jail(int jid, char *jailname) /* NOTREACHED */ break; } - /* Possible match. */ - if (id > 0) { - /* Do we have a jail ID to match as well? */ - if (jid > 0) { - if (jid == id) { - xid = id; - count++; - } - } else { - xid = id; - count++; - } + /* Possible match; see if we have a jail ID to match as well. */ + if (id > 0 && (jid <= 0 || id == jid)) { + xid = id; + count++; } } free(p); - if (count != 1) + if (count == 1) + return (xid); + else if (count > 1) errx(1, "Could not uniquely identify the jail."); - - return (xid); + else + return (-1); } #define GET_USER_INFO do { \ From emax at FreeBSD.org Tue Apr 7 09:29:51 2009 From: emax at FreeBSD.org (Maksim Yevmenkin) Date: Tue Apr 7 09:29:57 2009 Subject: svn commit: r190808 - stable/7/etc/rc.d Message-ID: <200904071629.n37GTowo014360@svn.freebsd.org> Author: emax Date: Tue Apr 7 16:29:50 2009 New Revision: 190808 URL: http://svn.freebsd.org/changeset/base/190808 Log: MFC r190575 - Add ipfw_nat to the list of required modules if "firewall_nat_enable" is set and "natd_enable" is NOT set; - Accept and pass firewall type to the external firewall script. Submitted by: Yuri Kurenkov < y -dot- kurenkov -at- init -dot- ru > No response from: freebsd-rc Approved by: re (kib) Modified: stable/7/etc/rc.d/ (props changed) stable/7/etc/rc.d/ipfw Modified: stable/7/etc/rc.d/ipfw ============================================================================== --- stable/7/etc/rc.d/ipfw Tue Apr 7 16:15:59 2009 (r190807) +++ stable/7/etc/rc.d/ipfw Tue Apr 7 16:29:50 2009 (r190808) @@ -23,10 +23,20 @@ ipfw_prestart() if checkyesno dummynet_enable; then required_modules="$required_modules dummynet" fi + + if checkyesno firewall_nat_enable; then + if ! checkyesno natd_enable; then + required_modules="$required_modules ipfw_nat" + fi + fi } ipfw_start() { + local _firewall_type + + _firewall_type=$1 + # set the firewall rules script if none was specified [ -z "${firewall_script}" ] && firewall_script=/etc/rc.firewall @@ -34,7 +44,7 @@ ipfw_start() if [ -f /etc/rc.d/natd ] ; then /etc/rc.d/natd start fi - /bin/sh "${firewall_script}" + /bin/sh "${firewall_script}" "${_firewall_type}" echo 'Firewall rules loaded.' elif [ "`ipfw list 65535`" = "65535 deny ip from any to any" ]; then echo 'Warning: kernel has firewall functionality, but' \ @@ -65,4 +75,4 @@ ipfw_stop() } load_rc_config $name -run_rc_command "$1" +run_rc_command $* From danfe at FreeBSD.org Tue Apr 7 10:45:54 2009 From: danfe at FreeBSD.org (Alexey Dokuchaev) Date: Tue Apr 7 10:48:11 2009 Subject: svn commit: r190808 - stable/7/etc/rc.d In-Reply-To: <200904071629.n37GTowo014360@svn.freebsd.org> References: <200904071629.n37GTowo014360@svn.freebsd.org> Message-ID: <20090407174553.GA33627@FreeBSD.org> On Tue, Apr 07, 2009 at 04:29:50PM +0000, Maksim Yevmenkin wrote: > Author: emax > Date: Tue Apr 7 16:29:50 2009 > New Revision: 190808 > URL: http://svn.freebsd.org/changeset/base/190808 > > ipfw_start() > { > + local _firewall_type > + > + _firewall_type=$1 Why extra tab and not simply "local _firewall_type=$1"? > -run_rc_command "$1" > +run_rc_command $* I haven't looked at the implementation of run_rc_command but "$1" suggests it should be "$@" instead. ./danfe From ivoras at FreeBSD.org Tue Apr 7 12:18:03 2009 From: ivoras at FreeBSD.org (Ivan Voras) Date: Tue Apr 7 12:18:32 2009 Subject: svn commit: r190816 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom/label Message-ID: <200904071918.n37JI2rZ022488@svn.freebsd.org> Author: ivoras Date: Tue Apr 7 19:18:02 2009 New Revision: 190816 URL: http://svn.freebsd.org/changeset/base/190816 Log: Merge r190423: introduce a new UFS-based label called "ufsid" that can be used to reference UFS-carrying devices by the unique file system id. An example of this new label is: /dev/ufsid/48e69c8b5c8e1b43. The benefit of using GEOM labels in general is to avoid problems of device renaming when shifting drives or controllers. Reviewed by: pjd Approved by: re (kib) Approved by: gnn (mentor) (original) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/geom/label/g_label.c stable/7/sys/geom/label/g_label.h stable/7/sys/geom/label/g_label_ufs.c Modified: stable/7/sys/geom/label/g_label.c ============================================================================== --- stable/7/sys/geom/label/g_label.c Tue Apr 7 19:06:51 2009 (r190815) +++ stable/7/sys/geom/label/g_label.c Tue Apr 7 19:18:02 2009 (r190816) @@ -77,7 +77,8 @@ struct g_class g_label_class = { * 6. Add your file system to manual page sbin/geom/class/label/glabel.8. */ const struct g_label_desc *g_labels[] = { - &g_label_ufs, + &g_label_ufs_id, + &g_label_ufs_volume, &g_label_iso9660, &g_label_msdosfs, &g_label_ext2fs, Modified: stable/7/sys/geom/label/g_label.h ============================================================================== --- stable/7/sys/geom/label/g_label.h Tue Apr 7 19:06:51 2009 (r190815) +++ stable/7/sys/geom/label/g_label.h Tue Apr 7 19:18:02 2009 (r190816) @@ -64,7 +64,8 @@ struct g_label_desc { }; /* Supported labels. */ -extern const struct g_label_desc g_label_ufs; +extern const struct g_label_desc g_label_ufs_id; +extern const struct g_label_desc g_label_ufs_volume; extern const struct g_label_desc g_label_iso9660; extern const struct g_label_desc g_label_msdosfs; extern const struct g_label_desc g_label_ext2fs; Modified: stable/7/sys/geom/label/g_label_ufs.c ============================================================================== --- stable/7/sys/geom/label/g_label_ufs.c Tue Apr 7 19:06:51 2009 (r190815) +++ stable/7/sys/geom/label/g_label_ufs.c Tue Apr 7 19:18:02 2009 (r190816) @@ -39,12 +39,16 @@ __FBSDID("$FreeBSD$"); #include #include -#define G_LABEL_UFS_DIR "ufs" +#define G_LABEL_UFS_VOLUME_DIR "ufs" +#define G_LABEL_UFS_ID_DIR "ufsid" + +#define G_LABEL_UFS_VOLUME 0 +#define G_LABEL_UFS_ID 1 static const int superblocks[] = SBLOCKSEARCH; static void -g_label_ufs_taste(struct g_consumer *cp, char *label, size_t size) +g_label_ufs_taste_common(struct g_consumer *cp, char *label, size_t size, int what) { struct g_provider *pp; int sb, superblock; @@ -96,18 +100,50 @@ g_label_ufs_taste(struct g_consumer *cp, } G_LABEL_DEBUG(1, "%s file system detected on %s.", fs->fs_magic == FS_UFS1_MAGIC ? "UFS1" : "UFS2", pp->name); - /* Check for volume label */ - if (fs->fs_volname[0] == '\0') { - g_free(fs); - continue; + switch (what) { + case G_LABEL_UFS_VOLUME: + /* Check for volume label */ + if (fs->fs_volname[0] == '\0') { + g_free(fs); + continue; + } + strlcpy(label, fs->fs_volname, size); + break; + case G_LABEL_UFS_ID: + if (fs->fs_id[0] == 0 && fs->fs_id[1] == 0) { + g_free(fs); + continue; + } + snprintf(label, size, "%08x%08x", fs->fs_id[0], + fs->fs_id[1]); + break; } - strlcpy(label, fs->fs_volname, size); g_free(fs); break; } } -const struct g_label_desc g_label_ufs = { - .ld_taste = g_label_ufs_taste, - .ld_dir = G_LABEL_UFS_DIR +static void +g_label_ufs_volume_taste(struct g_consumer *cp, char *label, size_t size) +{ + + g_label_ufs_taste_common(cp, label, size, G_LABEL_UFS_VOLUME); +} + +static void +g_label_ufs_id_taste(struct g_consumer *cp, char *label, size_t size) +{ + + g_label_ufs_taste_common(cp, label, size, G_LABEL_UFS_ID); +} + + +const struct g_label_desc g_label_ufs_volume = { + .ld_taste = g_label_ufs_volume_taste, + .ld_dir = G_LABEL_UFS_VOLUME_DIR +}; + +const struct g_label_desc g_label_ufs_id = { + .ld_taste = g_label_ufs_id_taste, + .ld_dir = G_LABEL_UFS_ID_DIR }; From ivoras at FreeBSD.org Tue Apr 7 12:35:42 2009 From: ivoras at FreeBSD.org (Ivan Voras) Date: Tue Apr 7 12:35:48 2009 Subject: svn commit: r190819 - stable/7/sbin/geom/class/label Message-ID: <200904071935.n37JZf4Y023601@svn.freebsd.org> Author: ivoras Date: Tue Apr 7 19:35:41 2009 New Revision: 190819 URL: http://svn.freebsd.org/changeset/base/190819 Log: Merge r190424: man page accompanying r190816. Reviewed by: pjd Approved by: re (kib) Approved by: gnn (mentor) (original) Modified: stable/7/sbin/geom/class/label/ (props changed) stable/7/sbin/geom/class/label/glabel.8 Modified: stable/7/sbin/geom/class/label/glabel.8 ============================================================================== --- stable/7/sbin/geom/class/label/glabel.8 Tue Apr 7 19:35:20 2009 (r190818) +++ stable/7/sbin/geom/class/label/glabel.8 Tue Apr 7 19:35:41 2009 (r190819) @@ -91,12 +91,18 @@ Currently supported file systems are: .Pp .Bl -bullet -offset indent -compact .It -UFS1 (directory +UFS1 volume names (directory .Pa /dev/ufs/ ) . .It -UFS2 (directory +UFS2 volume names (directory .Pa /dev/ufs/ ) . .It +UFS1 file system IDs (directory +.Pa /dev/ufsid/ ) . +.It +UFS2 file system IDs (directory +.Pa /dev/ufsid/ ) . +.It MSDOSFS (FAT12, FAT16, FAT32) (directory .Pa /dev/msdosfs/ ) . .It From rwatson at FreeBSD.org Tue Apr 7 12:55:44 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Tue Apr 7 12:55:51 2009 Subject: svn commit: r190816 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom/label In-Reply-To: <200904071918.n37JI2rZ022488@svn.freebsd.org> References: <200904071918.n37JI2rZ022488@svn.freebsd.org> Message-ID: On Tue, 7 Apr 2009, Ivan Voras wrote: > Merge r190423: introduce a new UFS-based label called "ufsid" that can > be used to reference UFS-carrying devices by the unique file system id. > An example of this new label is: /dev/ufsid/48e69c8b5c8e1b43. > The benefit of using GEOM labels in general is to avoid problems of > device renaming when shifting drives or controllers. I get quite a lot of console spam in 8.x right now every boot: GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. Trying to mount root from ufs:/dev/ad0s1a GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. Is this omitted in the MFC version? Robert N M Watson Computer Laboratory University of Cambridge > > Reviewed by: pjd > Approved by: re (kib) > Approved by: gnn (mentor) (original) > > Modified: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/dev/ath/ath_hal/ (props changed) > stable/7/sys/dev/cxgb/ (props changed) > stable/7/sys/geom/label/g_label.c > stable/7/sys/geom/label/g_label.h > stable/7/sys/geom/label/g_label_ufs.c > > Modified: stable/7/sys/geom/label/g_label.c > ============================================================================== > --- stable/7/sys/geom/label/g_label.c Tue Apr 7 19:06:51 2009 (r190815) > +++ stable/7/sys/geom/label/g_label.c Tue Apr 7 19:18:02 2009 (r190816) > @@ -77,7 +77,8 @@ struct g_class g_label_class = { > * 6. Add your file system to manual page sbin/geom/class/label/glabel.8. > */ > const struct g_label_desc *g_labels[] = { > - &g_label_ufs, > + &g_label_ufs_id, > + &g_label_ufs_volume, > &g_label_iso9660, > &g_label_msdosfs, > &g_label_ext2fs, > > Modified: stable/7/sys/geom/label/g_label.h > ============================================================================== > --- stable/7/sys/geom/label/g_label.h Tue Apr 7 19:06:51 2009 (r190815) > +++ stable/7/sys/geom/label/g_label.h Tue Apr 7 19:18:02 2009 (r190816) > @@ -64,7 +64,8 @@ struct g_label_desc { > }; > > /* Supported labels. */ > -extern const struct g_label_desc g_label_ufs; > +extern const struct g_label_desc g_label_ufs_id; > +extern const struct g_label_desc g_label_ufs_volume; > extern const struct g_label_desc g_label_iso9660; > extern const struct g_label_desc g_label_msdosfs; > extern const struct g_label_desc g_label_ext2fs; > > Modified: stable/7/sys/geom/label/g_label_ufs.c > ============================================================================== > --- stable/7/sys/geom/label/g_label_ufs.c Tue Apr 7 19:06:51 2009 (r190815) > +++ stable/7/sys/geom/label/g_label_ufs.c Tue Apr 7 19:18:02 2009 (r190816) > @@ -39,12 +39,16 @@ __FBSDID("$FreeBSD$"); > #include > #include > > -#define G_LABEL_UFS_DIR "ufs" > +#define G_LABEL_UFS_VOLUME_DIR "ufs" > +#define G_LABEL_UFS_ID_DIR "ufsid" > + > +#define G_LABEL_UFS_VOLUME 0 > +#define G_LABEL_UFS_ID 1 > > static const int superblocks[] = SBLOCKSEARCH; > > static void > -g_label_ufs_taste(struct g_consumer *cp, char *label, size_t size) > +g_label_ufs_taste_common(struct g_consumer *cp, char *label, size_t size, int what) > { > struct g_provider *pp; > int sb, superblock; > @@ -96,18 +100,50 @@ g_label_ufs_taste(struct g_consumer *cp, > } > G_LABEL_DEBUG(1, "%s file system detected on %s.", > fs->fs_magic == FS_UFS1_MAGIC ? "UFS1" : "UFS2", pp->name); > - /* Check for volume label */ > - if (fs->fs_volname[0] == '\0') { > - g_free(fs); > - continue; > + switch (what) { > + case G_LABEL_UFS_VOLUME: > + /* Check for volume label */ > + if (fs->fs_volname[0] == '\0') { > + g_free(fs); > + continue; > + } > + strlcpy(label, fs->fs_volname, size); > + break; > + case G_LABEL_UFS_ID: > + if (fs->fs_id[0] == 0 && fs->fs_id[1] == 0) { > + g_free(fs); > + continue; > + } > + snprintf(label, size, "%08x%08x", fs->fs_id[0], > + fs->fs_id[1]); > + break; > } > - strlcpy(label, fs->fs_volname, size); > g_free(fs); > break; > } > } > > -const struct g_label_desc g_label_ufs = { > - .ld_taste = g_label_ufs_taste, > - .ld_dir = G_LABEL_UFS_DIR > +static void > +g_label_ufs_volume_taste(struct g_consumer *cp, char *label, size_t size) > +{ > + > + g_label_ufs_taste_common(cp, label, size, G_LABEL_UFS_VOLUME); > +} > + > +static void > +g_label_ufs_id_taste(struct g_consumer *cp, char *label, size_t size) > +{ > + > + g_label_ufs_taste_common(cp, label, size, G_LABEL_UFS_ID); > +} > + > + > +const struct g_label_desc g_label_ufs_volume = { > + .ld_taste = g_label_ufs_volume_taste, > + .ld_dir = G_LABEL_UFS_VOLUME_DIR > +}; > + > +const struct g_label_desc g_label_ufs_id = { > + .ld_taste = g_label_ufs_id_taste, > + .ld_dir = G_LABEL_UFS_ID_DIR > }; > From amdmi3 at amdmi3.ru Tue Apr 7 13:55:38 2009 From: amdmi3 at amdmi3.ru (Dmitry Marakasov) Date: Tue Apr 7 13:55:45 2009 Subject: svn commit: r190816 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom/label In-Reply-To: References: <200904071918.n37JI2rZ022488@svn.freebsd.org> Message-ID: <20090407202830.GA73625@hades.panopticon> * Robert Watson (rwatson@FreeBSD.org) wrote: > I get quite a lot of console spam in 8.x right now every boot: > > GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. > GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. > Trying to mount root from ufs:/dev/ad0s1a > GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. > GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. > GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. > GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. > GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. > GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. Yeah, and btw there are the same messages at least for msdosfs and iso9660. I guess it's time to silence all these altogether. -- Dmitry Marakasov . 55B5 0596 FF1E 8D84 5F56 9510 D35A 80DD F9D2 F77D amdmi3@amdmi3.ru ..: jabber: amdmi3@jabber.ru http://www.amdmi3.ru From ivoras at freebsd.org Tue Apr 7 15:30:11 2009 From: ivoras at freebsd.org (Ivan Voras) Date: Tue Apr 7 15:30:17 2009 Subject: svn commit: r190816 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom/label In-Reply-To: <20090407202830.GA73625@hades.panopticon> References: <200904071918.n37JI2rZ022488@svn.freebsd.org> <20090407202830.GA73625@hades.panopticon> Message-ID: <9bbcef730904071504i30538ec8n575ecebb75e03c57@mail.gmail.com> 2009/4/7 Dmitry Marakasov : > * Robert Watson (rwatson@FreeBSD.org) wrote: > >> I get quite a lot of console spam in 8.x right now every boot: >> >> GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. >> GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. >> Trying to mount root from ufs:/dev/ad0s1a >> GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. >> GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. >> GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. >> GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. >> GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. >> GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. It's not specific to new development but a standard issue with any labels ... > Yeah, and btw there are the same messages at least for msdosfs and > iso9660. I guess it's time to silence all these altogether. ... and I agree. While useful as a diagnostic, they may be a little too much now that UFS IDs are integrated. It is simple to set the default verbosity level for glabel lower than it is now. But it will be global - for all types of labels. Consensus? From brooks at FreeBSD.org Tue Apr 7 15:37:02 2009 From: brooks at FreeBSD.org (Brooks Davis) Date: Tue Apr 7 15:37:13 2009 Subject: svn commit: r190816 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb geom/label In-Reply-To: <9bbcef730904071504i30538ec8n575ecebb75e03c57@mail.gmail.com> References: <200904071918.n37JI2rZ022488@svn.freebsd.org> <20090407202830.GA73625@hades.panopticon> <9bbcef730904071504i30538ec8n575ecebb75e03c57@mail.gmail.com> Message-ID: <20090407221952.GA44590@lor.one-eyed-alien.net> On Wed, Apr 08, 2009 at 12:04:53AM +0200, Ivan Voras wrote: > 2009/4/7 Dmitry Marakasov : > > * Robert Watson (rwatson@FreeBSD.org) wrote: > > > >> I get quite a lot of console spam in 8.x right now every boot: > >> > >> GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. > >> GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. > >> Trying to mount root from ufs:/dev/ad0s1a > >> GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. > >> GEOM_LABEL: Label for provider ad0s1a is ufsid/472fc8054efc5e4a. > >> GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. > >> GEOM_LABEL: Label for provider ad0s1e is ufsid/472fc8053581dc9c. > >> GEOM_LABEL: Label ufsid/472fc8054efc5e4a removed. > >> GEOM_LABEL: Label ufsid/472fc8053581dc9c removed. > > It's not specific to new development but a standard issue with any labels ... > > > Yeah, and btw there are the same messages at least for msdosfs and > > iso9660. I guess it's time to silence all these altogether. > > ... and I agree. While useful as a diagnostic, they may be a little > too much now that UFS IDs are integrated. > > It is simple to set the default verbosity level for glabel lower than > it is now. But it will be global - for all types of labels. > > Consensus? IMO the whole thing should be reworked so the labels don't vanish when used, but until that happens, we should probably hide all the noise under boot verbose. -- Brooks -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 187 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20090407/9afe9128/attachment.pgp From delphij at FreeBSD.org Tue Apr 7 19:04:08 2009 From: delphij at FreeBSD.org (Xin LI) Date: Tue Apr 7 19:04:19 2009 Subject: svn commit: r190835 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/hptiop Message-ID: <200904080204.n38247cE039692@svn.freebsd.org> Author: delphij Date: Wed Apr 8 02:04:07 2009 New Revision: 190835 URL: http://svn.freebsd.org/changeset/base/190835 Log: MFC 190398 + 190405: Use __packed for ioctl structure to make High Point management tool work. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/hptiop/hptiop.h Modified: stable/7/sys/dev/hptiop/hptiop.h ============================================================================== --- stable/7/sys/dev/hptiop/hptiop.h Wed Apr 8 00:14:06 2009 (r190834) +++ stable/7/sys/dev/hptiop/hptiop.h Wed Apr 8 02:04:07 2009 (r190835) @@ -260,7 +260,7 @@ struct hpt_iop_ioctl_param { unsigned long lpOutBuffer; /* output data buffer */ u_int32_t nOutBufferSize; /* size of output data buffer */ unsigned long lpBytesReturned; /* count of HPT_U8s returned */ -}; +} __packed; #define HPT_IOCTL_FLAG_OPEN 1 #define HPT_CTL_CODE_BSD_TO_IOP(x) ((x)-0xff00) From mckay at FreeBSD.org Tue Apr 7 21:30:17 2009 From: mckay at FreeBSD.org (Stephen McKay) Date: Tue Apr 7 21:30:29 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern Message-ID: <200904080430.n384UGWw043589@svn.freebsd.org> Author: mckay Date: Wed Apr 8 04:30:16 2009 New Revision: 190837 URL: http://svn.freebsd.org/changeset/base/190837 Log: MFC r187460: Add a limit on namecache entries. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Wed Apr 8 03:53:20 2009 (r190836) +++ stable/7/sys/kern/vfs_cache.c Wed Apr 8 04:30:16 2009 (r190837) @@ -495,6 +495,12 @@ cache_enter(dvp, vp, cnp) if (!doingcache) return; + /* + * Avoid blowout in namecache entries. + */ + if (numcache >= desiredvnodes * 2) + return; + if (cnp->cn_nameptr[0] == '.') { if (cnp->cn_namelen == 1) { return; From rwatson at FreeBSD.org Wed Apr 8 07:02:53 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Apr 8 07:03:04 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: <200904080430.n384UGWw043589@svn.freebsd.org> References: <200904080430.n384UGWw043589@svn.freebsd.org> Message-ID: On Wed, 8 Apr 2009, Stephen McKay wrote: > Author: mckay > Date: Wed Apr 8 04:30:16 2009 > New Revision: 190837 > URL: http://svn.freebsd.org/changeset/base/190837 > > Log: > MFC r187460: Add a limit on namecache entries. Obviously, having a limit is a good idea, but I wonder if we should use some more mature scheme to limit entries. At the very least, using UMA zone limits may help memory being dedicated to cache entries without being able to actually use it (i.e., extra entries in the UMA cache above the desiredvnodes limit). Similarly, the cost of different cache entries is different -- long entries cost much, much more than short ones, because we use two bucket sizes. Perhaps this means that we should separately count long and short entries, and short ones should contribute less towards the limit than long ones? Finally, I think it would be a good idea to do a bit of real-world profiling on memory efficiency of the name cache: how much memory is wasted when assumptions about short/long are wrong, and could we retune lengths, limits, hash bucket counts, etc, to work better in practice? Robert N M Watson Computer Laboratory University of Cambridge > > Approved by: re (kib) > > Modified: > stable/7/sys/ (props changed) > stable/7/sys/contrib/pf/ (props changed) > stable/7/sys/dev/ath/ath_hal/ (props changed) > stable/7/sys/dev/cxgb/ (props changed) > stable/7/sys/kern/vfs_cache.c > > Modified: stable/7/sys/kern/vfs_cache.c > ============================================================================== > --- stable/7/sys/kern/vfs_cache.c Wed Apr 8 03:53:20 2009 (r190836) > +++ stable/7/sys/kern/vfs_cache.c Wed Apr 8 04:30:16 2009 (r190837) > @@ -495,6 +495,12 @@ cache_enter(dvp, vp, cnp) > if (!doingcache) > return; > > + /* > + * Avoid blowout in namecache entries. > + */ > + if (numcache >= desiredvnodes * 2) > + return; > + > if (cnp->cn_nameptr[0] == '.') { > if (cnp->cn_namelen == 1) { > return; > From rwatson at FreeBSD.org Wed Apr 8 07:41:13 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Apr 8 07:41:27 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> References: <200904080430.n384UGWw043589@svn.freebsd.org> <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> Message-ID: On Wed, 8 Apr 2009, Attilio Rao wrote: >> Finally, I think it would be a good idea to do a bit of real-world >> profiling on memory efficiency of the name cache: how much memory is wasted >> when assumptions about short/long are wrong, and could we retune lengths, >> limits, hash bucket counts, etc, to work better in practice? > > Am I wrong or you were working on adding DTrace tracing to it? Do you have > any interesting workload/numbers you can show? While the probes I've added could be used to do this very easily, that's not the thrust of the work I'm currently doing. A useful starting point for someone interested in this problem would be a dtrace script like the following: vfs:namecache:enter:done { @distribution = quantize(strlen((string)arg1)); } When run across a "du" of a portion of my local subversion tree, I get: value ------------- Distribution ------------- count 0 | 0 1 | 2 2 |@@ 296 4 |@@@@@@@@@@@ 1879 8 |@@@@@@@@@@@@@@@@ 2719 16 |@@@@@@@@@@@ 1974 32 | 69 64 | 2 128 | 0 The result is that for my, quite toy, workload, large bucket entries are rarely used, and small entries make ineffective use of the space we've allocated because they rarely fill the full 32+ bytes we make available to small entries. Other useful types of analysis might be: - How effective is our LRU in the cache? - What's the distribution of "times that entries spend in the cache" - Is there a relationship between length and reuse of cache entries? Doing these on real workloads is what's actually required, rather than on my running du on a directory tree. Robert N M Watson Computer Laboratory University of Cambridge From rwatson at FreeBSD.org Wed Apr 8 07:43:04 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Apr 8 07:43:20 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: References: <200904080430.n384UGWw043589@svn.freebsd.org> <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> Message-ID: On Wed, 8 Apr 2009, Robert Watson wrote: > While the probes I've added could be used to do this very easily, that's not > the thrust of the work I'm currently doing. A useful starting point for > someone interested in this problem would be a dtrace script like the > following: > > vfs:namecache:enter:done Also useful: the same script, but using "vfs:namecache:lookup:hit". Robert N M Watson Computer Laboratory University of Cambridge From attilio at freebsd.org Wed Apr 8 07:49:07 2009 From: attilio at freebsd.org (Attilio Rao) Date: Wed Apr 8 07:49:13 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: References: <200904080430.n384UGWw043589@svn.freebsd.org> Message-ID: <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> 2009/4/8, Robert Watson : > On Wed, 8 Apr 2009, Stephen McKay wrote: > > > > Author: mckay > > Date: Wed Apr 8 04:30:16 2009 > > New Revision: 190837 > > URL: http://svn.freebsd.org/changeset/base/190837 > > > > Log: > > MFC r187460: Add a limit on namecache entries. > > > > Obviously, having a limit is a good idea, but I wonder if we should use > some more mature scheme to limit entries. At the very least, using UMA zone > limits may help memory being dedicated to cache entries without being able > to actually use it (i.e., extra entries in the UMA cache above the > desiredvnodes limit). > > Similarly, the cost of different cache entries is different -- long entries > cost much, much more than short ones, because we use two bucket sizes. > Perhaps this means that we should separately count long and short entries, > and short ones should contribute less towards the limit than long ones? > > Finally, I think it would be a good idea to do a bit of real-world > profiling on memory efficiency of the name cache: how much memory is wasted > when assumptions about short/long are wrong, and could we retune lengths, > limits, hash bucket counts, etc, to work better in practice? Am I wrong or you were working on adding DTrace tracing to it? Do you have any interesting workload/numbers you can show? Thanks, Attilio -- Peace can only be achieved by understanding - A. Einstein From maxim at macomnet.ru Wed Apr 8 09:52:49 2009 From: maxim at macomnet.ru (Maxim Konovalov) Date: Wed Apr 8 09:52:56 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: References: <200904080430.n384UGWw043589@svn.freebsd.org> <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> Message-ID: <20090408205159.X1212@mp2.macomnet.net> On Wed, 8 Apr 2009, 15:43+0100, Robert Watson wrote: > > On Wed, 8 Apr 2009, Robert Watson wrote: > > > While the probes I've added could be used to do this very easily, > > that's not the thrust of the work I'm currently doing. A useful > > starting point for someone interested in this problem would be a > > dtrace script like the following: > > > > vfs:namecache:enter:done > > Also useful: the same script, but using "vfs:namecache:lookup:hit". > Perhaps we should start to put such scripts somewhere to src/tools. -- Maxim Konovalov From rwatson at FreeBSD.org Wed Apr 8 10:46:50 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Apr 8 10:47:14 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: <20090408205159.X1212@mp2.macomnet.net> References: <200904080430.n384UGWw043589@svn.freebsd.org> <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> <20090408205159.X1212@mp2.macomnet.net> Message-ID: On Wed, 8 Apr 2009, Maxim Konovalov wrote: >>> While the probes I've added could be used to do this very easily, that's >>> not the thrust of the work I'm currently doing. A useful starting point >>> for someone interested in this problem would be a dtrace script like the >>> following: >>> >>> vfs:namecache:enter:done >> >> Also useful: the same script, but using "vfs:namecache:lookup:hit". >> > Perhaps we should start to put such scripts somewhere to src/tools. This sort of script isn't really worth putting in a library, as it's composed only of the most basic language constructs and a single probe. I'd rather reserve a tools tree for things that reflect a significant investment in time to write, rather than things that can be written in thirty seconds given a rudimentary knowledge of the D scripting language. Otherwise we'll be buried in scripts that have little utility and unable to find scripts that are useful. Something we do need to do is begin to formally document the sets of probes we're adding, because these sorts of trivial scripts become a lot more obvious it you know the probes exist and what they do :-). I'm not sure what the conventions for said man pages should be - perhaps vfs_probes(4) or vfs_dtrace(4) or the like, broken into a parts that include a summary of the goal of the provider, a list of the specific probes, etc? Robert N M Watson Computer Laboratory University of Cambridge From rwatson at FreeBSD.org Wed Apr 8 12:22:34 2009 From: rwatson at FreeBSD.org (Robert Watson) Date: Wed Apr 8 12:22:47 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: References: <200904080430.n384UGWw043589@svn.freebsd.org> <3bbf2fe10904080724i381c36fdpb1699def955fdb6d@mail.gmail.com> <20090408205159.X1212@mp2.macomnet.net> Message-ID: On Wed, 8 Apr 2009, Robert Watson wrote: >>>> While the probes I've added could be used to do this very easily, that's >>>> not the thrust of the work I'm currently doing. A useful starting point >>>> for someone interested in this problem would be a dtrace script like the >>>> following: >>>> >>>> vfs:namecache:enter:done >>> >>> Also useful: the same script, but using "vfs:namecache:lookup:hit". >>> >> Perhaps we should start to put such scripts somewhere to src/tools. > > This sort of script isn't really worth putting in a library, as it's > composed only of the most basic language constructs and a single probe. > I'd rather reserve a tools tree for things that reflect a significant > investment in time to write, rather than things that can be written in > thirty seconds given a rudimentary knowledge of the D scripting language. > Otherwise we'll be buried in scripts that have little utility and unable to > find scripts that are useful. > > Something we do need to do is begin to formally document the sets of probes > we're adding, because these sorts of trivial scripts become a lot more > obvious it you know the probes exist and what they do :-). I'm not sure > what the conventions for said man pages should be - perhaps vfs_probes(4) or > vfs_dtrace(4) or the like, broken into a parts that include a summary of the > goal of the provider, a list of the specific probes, etc? Scott has suggested that these sorts of example scripts are particularly helpful when just getting started with DTrace, so perhaps the thing to do is this: I've collected a set of such scripts on our wiki here: http://wiki.freebsd.org/DTrace/Examples They illustrate some of the facilities of the D language, what you can do with some of the probes we have in the tree already, etc. It would be fairly straight forward to take this Wiki page and convert it into a new section of the FreeBSD Handbook's DTrace chapter, basically just adding a bit more annotation and explanation of the scripts. Most of the scripts on the Wiki page don't yet work in FreeBSD 7-STABLE, as they rely on probes I've added shortly before or since the code freeze for 7.2 began, FYI, but hopefully will start working in 7.x starting a bit after the code freeze is relaxed. Also notice that these DTrace scripts really only help you when analyzing the behavior of the FreeBSD kernel, as we don't yet have proper tracing support for userspace events (i.e., the "pid" provider). Finally, the best reference I've found for DTrace so far is really the Solaris Dynamic Tracing Guide, which includes an introduction to the language, review of the providers available on Solaris, and example scripts that use them. As with all programming languages, learning by doing is best, of course... Robert N M Watson Computer Laboratory University of Cambridge From mckay at FreeBSD.org Thu Apr 9 01:11:13 2009 From: mckay at FreeBSD.org (Stephen McKay) Date: Thu Apr 9 01:11:54 2009 Subject: svn commit: r190837 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern In-Reply-To: from Robert Watson at "Wed, 08 Apr 2009 15:02:52 +0100" References: <200904080430.n384UGWw043589@svn.freebsd.org> Message-ID: <200904090750.n397otde009794@dungeon.home> On Wednesday, 8th April 2009, Robert Watson wrote: >On Wed, 8 Apr 2009, Stephen McKay wrote: > >> MFC r187460: Add a limit on namecache entries. > >Obviously, having a limit is a good idea, but I wonder if we should use some >more mature scheme to limit entries. When I committed r187460 back in January, Bruce Evans immediately pointed out that a more complex version had appeared in RELENG_3 (1.38.2.3) and had never been merged forward. That version costs time and space for every cache entry, while my (admittedly trivial) fix costs minimal time and no extra space per entry. I make no great claims for this patch. The event that it guards against is rarely triggered in average systems (it looks like it has been possible to overflow the namecache since 1997) but some sort of limit is necessary to avoid a kernel panic. The 2x factor is arbitrary, but works in practice. Profiling the namecache sound like a good idea, but if you want to give it heartburn, try a directory tree full of files with 32000 links. I don't think it's worth putting lots of code in the main line to handle such an "attack", so I think it's simpler to just not cache when that happens. Cheers, Stephen. From bz at FreeBSD.org Fri Apr 10 05:32:45 2009 From: bz at FreeBSD.org (Bjoern A. Zeeb) Date: Fri Apr 10 05:32:51 2009 Subject: svn commit: r190892 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb netinet Message-ID: <200904101232.n3ACWiAx048559@svn.freebsd.org> Author: bz Date: Fri Apr 10 12:32:44 2009 New Revision: 190892 URL: http://svn.freebsd.org/changeset/base/190892 Log: MFC r190800: With the right comparison we get a proper wscale value and thus more adequate TCP performance with IPv6. Changes for IPv4, r166403 and r172795, both ignored the IPv6 counterpart and left it in the state of art of year 2000. The same logic in syncache already shares code between v4 and v6 so things do not need to be adapted there. Reported by: Steinar Haug (sthaug nethelp.no) Tested by: Steinar Haug (sthaug nethelp.no) Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/netinet/tcp_usrreq.c Modified: stable/7/sys/netinet/tcp_usrreq.c ============================================================================== --- stable/7/sys/netinet/tcp_usrreq.c Fri Apr 10 11:15:34 2009 (r190891) +++ stable/7/sys/netinet/tcp_usrreq.c Fri Apr 10 12:32:44 2009 (r190892) @@ -1153,7 +1153,7 @@ tcp6_connect(struct tcpcb *tp, struct so /* Compute window scaling to request. */ while (tp->request_r_scale < TCP_MAX_WINSHIFT && - (TCP_MAXWIN << tp->request_r_scale) < so->so_rcv.sb_hiwat) + (TCP_MAXWIN << tp->request_r_scale) < sb_max) tp->request_r_scale++; soisconnecting(so); From dchagin at FreeBSD.org Fri Apr 10 06:45:57 2009 From: dchagin at FreeBSD.org (Dmitry Chagin) Date: Fri Apr 10 06:46:04 2009 Subject: svn commit: r190893 - in stable/7/sys: . amd64/linux32 compat/linux contrib/pf dev/ath/ath_hal dev/cxgb i386/linux Message-ID: <200904101345.n3ADjuZ4050005@svn.freebsd.org> Author: dchagin Date: Fri Apr 10 13:45:56 2009 New Revision: 190893 URL: http://svn.freebsd.org/changeset/base/190893 Log: Merge from HEAD to stable/7: r186211: Remove obsolete AT_DEBUG stuff. It never should have been committed in the first place, let alone migrated to linux emulation. r189362: Add AT_PLATFORM, AT_HWCAP and AT_CLKTCK auxiliary vector entries which are used by glibc. This silents the message "2.4+ kernel w/o ELF notes?" from some programs at start, among them are top and pkill. Do the assignment of the vector entries in elf_linux_fixup() as it is done in glibc. Fix some minor style issues. Approved by: re (Ken Smith), kib(mentor) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/linux32/linux.h stable/7/sys/amd64/linux32/linux32_sysvec.c stable/7/sys/compat/linux/linux_misc.c stable/7/sys/compat/linux/linux_misc.h stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/linux/linux.h stable/7/sys/i386/linux/linux_sysvec.c Modified: stable/7/sys/amd64/linux32/linux.h ============================================================================== --- stable/7/sys/amd64/linux32/linux.h Fri Apr 10 12:32:44 2009 (r190892) +++ stable/7/sys/amd64/linux32/linux.h Fri Apr 10 13:45:56 2009 (r190893) @@ -106,6 +106,10 @@ typedef struct { #define LINUX_CTL_MAXNAME 10 +#define LINUX_AT_COUNT 16 /* Count of used aux entry types. + * Keep this synchronized with + * elf_linux_fixup() code. + */ struct l___sysctl_args { l_uintptr_t name; Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c ============================================================================== --- stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Apr 10 12:32:44 2009 (r190892) +++ stable/7/sys/amd64/linux32/linux32_sysvec.c Fri Apr 10 13:45:56 2009 (r190893) @@ -106,6 +106,8 @@ MALLOC_DEFINE(M_LINUX, "linux", "Linux m #define LINUX_SYS_linux_rt_sendsig 0 #define LINUX_SYS_linux_sendsig 0 +const char *linux_platform = "i686"; +static int linux_szplatform; extern char linux_sigcode[]; extern int linux_szsigcode; @@ -246,7 +248,12 @@ elf_linux_fixup(register_t **stack_base, { Elf32_Auxargs *args; Elf32_Addr *base; - Elf32_Addr *pos; + Elf32_Addr *pos, *uplatform; + struct linux32_ps_strings *arginfo; + + arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; + uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szsigcode - + linux_szplatform); KASSERT(curthread->td_proc == imgp->proc && (curthread->td_proc->p_flag & P_SA) == 0, @@ -255,10 +262,8 @@ elf_linux_fixup(register_t **stack_base, args = (Elf32_Auxargs *)imgp->auxargs; pos = base + (imgp->args->argc + imgp->args->envc + 2); - if (args->trace) - AUXARGS_ENTRY_32(pos, AT_DEBUG, 1); - if (args->execfd != -1) - AUXARGS_ENTRY_32(pos, AT_EXECFD, args->execfd); + AUXARGS_ENTRY_32(pos, LINUX_AT_HWCAP, cpu_feature); + AUXARGS_ENTRY_32(pos, LINUX_AT_CLKTCK, hz); AUXARGS_ENTRY_32(pos, AT_PHDR, args->phdr); AUXARGS_ENTRY_32(pos, AT_PHENT, args->phent); AUXARGS_ENTRY_32(pos, AT_PHNUM, args->phnum); @@ -266,10 +271,14 @@ elf_linux_fixup(register_t **stack_base, AUXARGS_ENTRY_32(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY_32(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY_32(pos, AT_BASE, args->base); + AUXARGS_ENTRY_32(pos, LINUX_AT_SECURE, 0); AUXARGS_ENTRY_32(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); AUXARGS_ENTRY_32(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY_32(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY_32(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY_32(pos, LINUX_AT_PLATFORM, PTROUT(uplatform)); + if (args->execfd != -1) + AUXARGS_ENTRY_32(pos, AT_EXECFD, args->execfd); AUXARGS_ENTRY_32(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); @@ -862,23 +871,27 @@ linux_copyout_strings(struct image_param char *stringp, *destp; u_int32_t *stack_base; struct linux32_ps_strings *arginfo; - int sigcodesz; /* * Calculate string base and vector table pointers. * Also deal with signal trampoline code for this exec type. */ arginfo = (struct linux32_ps_strings *)LINUX32_PS_STRINGS; - sigcodesz = *(imgp->proc->p_sysent->sv_szsigcode); - destp = (caddr_t)arginfo - sigcodesz - SPARE_USRSPACE - - roundup((ARG_MAX - imgp->args->stringspace), sizeof(char *)); + destp = (caddr_t)arginfo - linux_szsigcode - SPARE_USRSPACE - + linux_szplatform - roundup((ARG_MAX - imgp->args->stringspace), + sizeof(char *)); /* * install sigcode */ - if (sigcodesz) - copyout(imgp->proc->p_sysent->sv_sigcode, - ((caddr_t)arginfo - sigcodesz), sigcodesz); + copyout(imgp->proc->p_sysent->sv_sigcode, + ((caddr_t)arginfo - linux_szsigcode), linux_szsigcode); + + /* + * Install LINUX_PLATFORM + */ + copyout(linux_platform, ((caddr_t)arginfo - linux_szsigcode - + linux_szplatform), linux_szplatform); /* * If we have a valid auxargs ptr, prepare some room @@ -890,7 +903,7 @@ linux_copyout_strings(struct image_param * lower compatibility. */ imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : - (AT_COUNT * 2); + (LINUX_AT_COUNT * 2); /* * The '+ 2' is for the null pointers at the end of each of * the arg and env vector sets,and imgp->auxarg_size is room @@ -924,14 +937,14 @@ linux_copyout_strings(struct image_param /* * Fill in "ps_strings" struct for ps, w, etc. */ - suword32(&arginfo->ps_argvstr, (u_int32_t)(intptr_t)vectp); + suword32(&arginfo->ps_argvstr, (uint32_t)(intptr_t)vectp); suword32(&arginfo->ps_nargvstr, argc); /* * Fill in argument portion of vector table. */ for (; argc > 0; --argc) { - suword32(vectp++, (u_int32_t)(intptr_t)destp); + suword32(vectp++, (uint32_t)(intptr_t)destp); while (*stringp++ != 0) destp++; destp++; @@ -940,14 +953,14 @@ linux_copyout_strings(struct image_param /* a null vector table pointer separates the argp's from the envp's */ suword32(vectp++, 0); - suword32(&arginfo->ps_envstr, (u_int32_t)(intptr_t)vectp); + suword32(&arginfo->ps_envstr, (uint32_t)(intptr_t)vectp); suword32(&arginfo->ps_nenvstr, envc); /* * Fill in environment portion of vector table. */ for (; envc > 0; --envc) { - suword32(vectp++, (u_int32_t)(intptr_t)destp); + suword32(vectp++, (uint32_t)(intptr_t)destp); while (*stringp++ != 0) destp++; destp++; @@ -1105,6 +1118,8 @@ linux_elf_modevent(module_t mod, int typ linux_schedtail, NULL, 1000); linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec, NULL, 1000); + linux_szplatform = roundup(strlen(linux_platform) + 1, + sizeof(char *)); if (bootverbose) printf("Linux ELF exec handler installed\n"); } else Modified: stable/7/sys/compat/linux/linux_misc.c ============================================================================== --- stable/7/sys/compat/linux/linux_misc.c Fri Apr 10 12:32:44 2009 (r190892) +++ stable/7/sys/compat/linux/linux_misc.c Fri Apr 10 13:45:56 2009 (r190893) @@ -91,10 +91,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef __i386__ -#include -#endif - #define BSD_TO_LINUX_SIGNAL(sig) \ (((sig) <= LINUX_SIGTBLSZ) ? bsd_to_linux_signal[_SIG_IDX(sig)] : sig) @@ -733,34 +729,8 @@ linux_newuname(struct thread *td, struct *p = '\0'; break; } -#ifdef __i386__ - { - const char *class; - - switch (cpu_class) { - case CPUCLASS_686: - class = "i686"; - break; - case CPUCLASS_586: - class = "i586"; - break; - case CPUCLASS_486: - class = "i486"; - break; - default: - class = "i386"; - } - strlcpy(utsname.machine, class, LINUX_MAX_UTSNAME); - } -#elif defined(__amd64__) /* XXX: Linux can change 'personality'. */ -#ifdef COMPAT_LINUX32 - strlcpy(utsname.machine, "i686", LINUX_MAX_UTSNAME); -#else - strlcpy(utsname.machine, "x86_64", LINUX_MAX_UTSNAME); -#endif /* COMPAT_LINUX32 */ -#else /* something other than i386 or amd64 - assume we and Linux agree */ - strlcpy(utsname.machine, machine, LINUX_MAX_UTSNAME); -#endif /* __i386__ */ + strlcpy(utsname.machine, linux_platform, LINUX_MAX_UTSNAME); + strlcpy(utsname.domainname, domainname, LINUX_MAX_UTSNAME); return (copyout(&utsname, args->buf, sizeof(utsname))); Modified: stable/7/sys/compat/linux/linux_misc.h ============================================================================== --- stable/7/sys/compat/linux/linux_misc.h Fri Apr 10 12:32:44 2009 (r190892) +++ stable/7/sys/compat/linux/linux_misc.h Fri Apr 10 13:45:56 2009 (r190893) @@ -45,6 +45,21 @@ #define LINUX_MREMAP_MAYMOVE 1 #define LINUX_MREMAP_FIXED 2 +extern const char *linux_platform; + +/* + * Non-standard aux entry types used in Linux ELF binaries. + */ + +#define LINUX_AT_PLATFORM 15 /* String identifying CPU */ +#define LINUX_AT_HWCAP 16 /* CPU capabilities */ +#define LINUX_AT_CLKTCK 17 /* frequency at which times() increments */ +#define LINUX_AT_SECURE 23 /* secure mode boolean */ +#define LINUX_AT_BASE_PLATFORM 24 /* string identifying real platform, may + * differ from AT_PLATFORM. + */ +#define LINUX_AT_EXECFN 31 /* filename of program */ + /* Linux sets the i387 to extended precision. */ #if defined(__i386__) || defined(__amd64__) #define __LINUX_NPXCW__ 0x37f Modified: stable/7/sys/i386/linux/linux.h ============================================================================== --- stable/7/sys/i386/linux/linux.h Fri Apr 10 12:32:44 2009 (r190892) +++ stable/7/sys/i386/linux/linux.h Fri Apr 10 13:45:56 2009 (r190893) @@ -100,6 +100,10 @@ typedef struct { #define LINUX_CTL_MAXNAME 10 +#define LINUX_AT_COUNT 16 /* Count of used aux entry types. + * Keep this synchronized with + * elf_linux_fixup() code. + */ struct l___sysctl_args { l_int *name; Modified: stable/7/sys/i386/linux/linux_sysvec.c ============================================================================== --- stable/7/sys/i386/linux/linux_sysvec.c Fri Apr 10 12:32:44 2009 (r190892) +++ stable/7/sys/i386/linux/linux_sysvec.c Fri Apr 10 13:45:56 2009 (r190893) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -104,6 +105,10 @@ static void linux_prepsyscall(struct tra static void linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask); static void exec_linux_setregs(struct thread *td, u_long entry, u_long stack, u_long ps_strings); +static register_t *linux_copyout_strings(struct image_params *imgp); + +static int linux_szplatform; +const char *linux_platform; extern LIST_HEAD(futex_list, futex) futex_list; extern struct sx futex_sx; @@ -228,25 +233,31 @@ linux_fixup(register_t **stack_base, str **stack_base = (intptr_t)(void *)argv; (*stack_base)--; **stack_base = imgp->args->argc; - return 0; + return (0); } static int elf_linux_fixup(register_t **stack_base, struct image_params *imgp) { + struct proc *p; Elf32_Auxargs *args; + Elf32_Addr *uplatform; + struct ps_strings *arginfo; register_t *pos; KASSERT(curthread->td_proc == imgp->proc && (curthread->td_proc->p_flag & P_SA) == 0, ("unsafe elf_linux_fixup(), should be curproc")); + + p = imgp->proc; + arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; + uplatform = (Elf32_Addr *)((caddr_t)arginfo - linux_szsigcode - + linux_szplatform); args = (Elf32_Auxargs *)imgp->auxargs; pos = *stack_base + (imgp->args->argc + imgp->args->envc + 2); - if (args->trace) - AUXARGS_ENTRY(pos, AT_DEBUG, 1); - if (args->execfd != -1) - AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); + AUXARGS_ENTRY(pos, LINUX_AT_HWCAP, cpu_feature); + AUXARGS_ENTRY(pos, LINUX_AT_CLKTCK, hz); AUXARGS_ENTRY(pos, AT_PHDR, args->phdr); AUXARGS_ENTRY(pos, AT_PHENT, args->phent); AUXARGS_ENTRY(pos, AT_PHNUM, args->phnum); @@ -254,10 +265,14 @@ elf_linux_fixup(register_t **stack_base, AUXARGS_ENTRY(pos, AT_FLAGS, args->flags); AUXARGS_ENTRY(pos, AT_ENTRY, args->entry); AUXARGS_ENTRY(pos, AT_BASE, args->base); + AUXARGS_ENTRY(pos, LINUX_AT_SECURE, 0); AUXARGS_ENTRY(pos, AT_UID, imgp->proc->p_ucred->cr_ruid); AUXARGS_ENTRY(pos, AT_EUID, imgp->proc->p_ucred->cr_svuid); AUXARGS_ENTRY(pos, AT_GID, imgp->proc->p_ucred->cr_rgid); AUXARGS_ENTRY(pos, AT_EGID, imgp->proc->p_ucred->cr_svgid); + AUXARGS_ENTRY(pos, LINUX_AT_PLATFORM, PTROUT(uplatform)); + if (args->execfd != -1) + AUXARGS_ENTRY(pos, AT_EXECFD, args->execfd); AUXARGS_ENTRY(pos, AT_NULL, 0); free(imgp->auxargs, M_TEMP); @@ -265,7 +280,121 @@ elf_linux_fixup(register_t **stack_base, (*stack_base)--; **stack_base = (register_t)imgp->args->argc; - return 0; + return (0); +} + +/* + * Copied from kern/kern_exec.c + */ +static register_t * +linux_copyout_strings(struct image_params *imgp) +{ + int argc, envc; + char **vectp; + char *stringp, *destp; + register_t *stack_base; + struct ps_strings *arginfo; + struct proc *p; + + /* + * Calculate string base and vector table pointers. + * Also deal with signal trampoline code for this exec type. + */ + p = imgp->proc; + arginfo = (struct ps_strings *)p->p_sysent->sv_psstrings; + destp = (caddr_t)arginfo - linux_szsigcode - SPARE_USRSPACE - + linux_szplatform - roundup((ARG_MAX - imgp->args->stringspace), + sizeof(char *)); + + /* + * install sigcode + */ + copyout(p->p_sysent->sv_sigcode, ((caddr_t)arginfo - + linux_szsigcode), linux_szsigcode); + + /* + * install LINUX_PLATFORM + */ + copyout(linux_platform, ((caddr_t)arginfo - linux_szsigcode - + linux_szplatform), linux_szplatform); + + /* + * If we have a valid auxargs ptr, prepare some room + * on the stack. + */ + if (imgp->auxargs) { + /* + * 'AT_COUNT*2' is size for the ELF Auxargs data. This is for + * lower compatibility. + */ + imgp->auxarg_size = (imgp->auxarg_size) ? imgp->auxarg_size : + (LINUX_AT_COUNT * 2); + /* + * The '+ 2' is for the null pointers at the end of each of + * the arg and env vector sets,and imgp->auxarg_size is room + * for argument of Runtime loader. + */ + vectp = (char **)(destp - (imgp->args->argc + + imgp->args->envc + 2 + imgp->auxarg_size) * sizeof(char *)); + } else { + /* + * The '+ 2' is for the null pointers at the end of each of + * the arg and env vector sets + */ + vectp = (char **)(destp - (imgp->args->argc + imgp->args->envc + 2) * + sizeof(char *)); + } + + /* + * vectp also becomes our initial stack base + */ + stack_base = (register_t *)vectp; + + stringp = imgp->args->begin_argv; + argc = imgp->args->argc; + envc = imgp->args->envc; + + /* + * Copy out strings - arguments and environment. + */ + copyout(stringp, destp, ARG_MAX - imgp->args->stringspace); + + /* + * Fill in "ps_strings" struct for ps, w, etc. + */ + suword(&arginfo->ps_argvstr, (long)(intptr_t)vectp); + suword(&arginfo->ps_nargvstr, argc); + + /* + * Fill in argument portion of vector table. + */ + for (; argc > 0; --argc) { + suword(vectp++, (long)(intptr_t)destp); + while (*stringp++ != 0) + destp++; + destp++; + } + + /* a null vector table pointer separates the argp's from the envp's */ + suword(vectp++, 0); + + suword(&arginfo->ps_envstr, (long)(intptr_t)vectp); + suword(&arginfo->ps_nenvstr, envc); + + /* + * Fill in environment portion of vector table. + */ + for (; envc > 0; --envc) { + suword(vectp++, (long)(intptr_t)destp); + while (*stringp++ != 0) + destp++; + destp++; + } + + /* end of vector table is a null pointer */ + suword(vectp, 0); + + return (stack_base); } extern int _ucodesel, _udatasel; @@ -809,6 +938,25 @@ exec_linux_setregs(struct thread *td, u_ pcb->pcb_initial_npxcw = __LINUX_NPXCW__; } +static void +linux_get_machine(const char **dst) +{ + + switch (cpu_class) { + case CPUCLASS_686: + *dst = "i686"; + break; + case CPUCLASS_586: + *dst = "i586"; + break; + case CPUCLASS_486: + *dst = "i486"; + break; + default: + *dst = "i386"; + } +} + struct sysentvec linux_sysvec = { .sv_size = LINUX_SYS_MAXSYSCALL, .sv_table = linux_sysent, @@ -863,7 +1011,7 @@ struct sysentvec elf_linux_sysvec = { .sv_usrstack = USRSTACK, .sv_psstrings = PS_STRINGS, .sv_stackprot = VM_PROT_ALL, - .sv_copyout_strings = exec_copyout_strings, + .sv_copyout_strings = linux_copyout_strings, .sv_setregs = exec_linux_setregs, .sv_fixlimit = NULL, .sv_maxssiz = NULL @@ -940,6 +1088,9 @@ linux_elf_modevent(module_t mod, int typ NULL, 1000); linux_exec_tag = EVENTHANDLER_REGISTER(process_exec, linux_proc_exec, NULL, 1000); + linux_get_machine(&linux_platform); + linux_szplatform = roundup(strlen(linux_platform) + 1, + sizeof(char *)); if (bootverbose) printf("Linux ELF exec handler installed\n"); } else From delphij at FreeBSD.org Sat Apr 11 07:10:43 2009 From: delphij at FreeBSD.org (Xin LI) Date: Sat Apr 11 07:11:01 2009 Subject: svn commit: r190920 - in stable/7/usr.bin/locate: . locate Message-ID: <200904111410.n3BEAgrp088243@svn.freebsd.org> Author: delphij Date: Sat Apr 11 14:10:42 2009 New Revision: 190920 URL: http://svn.freebsd.org/changeset/base/190920 Log: MFC r190656: Fix a crash when corrupted data file is found. PR: bin/32686 Approved by: re (kib) Modified: stable/7/usr.bin/locate/ (props changed) stable/7/usr.bin/locate/locate/fastfind.c Modified: stable/7/usr.bin/locate/locate/fastfind.c ============================================================================== --- stable/7/usr.bin/locate/locate/fastfind.c Sat Apr 11 14:01:01 2009 (r190919) +++ stable/7/usr.bin/locate/locate/fastfind.c Sat Apr 11 14:10:42 2009 (r190920) @@ -216,6 +216,8 @@ fastfind count += c - OFFSET; } + if (count < 0 || count > MAXPATHLEN) + errx(1, "corrupted database: %s", database); /* overlay old path */ p = path + count; foundchar = p - 1; From delphij at FreeBSD.org Sat Apr 11 08:04:52 2009 From: delphij at FreeBSD.org (Xin LI) Date: Sat Apr 11 08:05:08 2009 Subject: svn commit: r190934 - stable/7/share/man/man4 Message-ID: <200904111504.n3BF4pTb089999@svn.freebsd.org> Author: delphij Date: Sat Apr 11 15:04:51 2009 New Revision: 190934 URL: http://svn.freebsd.org/changeset/base/190934 Log: MFC r190832: Mention support of 1000baseSX and 2500baseSX. Approved by: re (kensmith) Modified: stable/7/share/man/man4/ (props changed) stable/7/share/man/man4/bce.4 stable/7/share/man/man4/igb.4 (props changed) Modified: stable/7/share/man/man4/bce.4 ============================================================================== --- stable/7/share/man/man4/bce.4 Sat Apr 11 15:03:44 2009 (r190933) +++ stable/7/share/man/man4/bce.4 Sat Apr 11 15:04:51 2009 (r190934) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 15, 2009 +.Dd April 7, 2009 .Dt BCE 4 .Os .Sh NAME @@ -109,8 +109,18 @@ option can also be used to select either or .Cm half-duplex modes. -.It Cm 1000baseTX -Set 1000baseTX operation over twisted pair. +.It Cm 1000baseSX +Sets 1000Mbps operation. +Only +.Cm full-duplex +mode is supported at this speed. +.It Cm 1000baseT +Set 1000baseT operation over twisted pair. +Only +.Cm full-duplex +mode is supported. +.It Cm 2500BaseSX +Set 2500Mbps operation. Only .Cm full-duplex mode is supported. From delphij at FreeBSD.org Sat Apr 11 08:16:12 2009 From: delphij at FreeBSD.org (Xin LI) Date: Sat Apr 11 08:16:21 2009 Subject: svn commit: r190937 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/hptmv Message-ID: <200904111516.n3BFGBlK090429@svn.freebsd.org> Author: delphij Date: Sat Apr 11 15:16:11 2009 New Revision: 190937 URL: http://svn.freebsd.org/changeset/base/190937 Log: MFC r190809, 190810: Update driver to vendor 1.16 plus some local changes to maintain our old tweaks/behavor and to fix a bug with multiple cards. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/hptmv/access601.h stable/7/sys/dev/hptmv/amd64-elf.raid.o.uu stable/7/sys/dev/hptmv/array.h stable/7/sys/dev/hptmv/command.h stable/7/sys/dev/hptmv/entry.c stable/7/sys/dev/hptmv/global.h stable/7/sys/dev/hptmv/gui_lib.c stable/7/sys/dev/hptmv/hptintf.h stable/7/sys/dev/hptmv/hptproc.c stable/7/sys/dev/hptmv/i386-elf.raid.o.uu stable/7/sys/dev/hptmv/ioctl.c stable/7/sys/dev/hptmv/mvOs.h stable/7/sys/dev/hptmv/mvSata.h stable/7/sys/dev/hptmv/mvStorageDev.h stable/7/sys/dev/hptmv/osbsd.h stable/7/sys/dev/hptmv/raid5n.h stable/7/sys/dev/hptmv/readme.txt stable/7/sys/dev/hptmv/vdevice.h Modified: stable/7/sys/dev/hptmv/access601.h ============================================================================== --- stable/7/sys/dev/hptmv/access601.h Sat Apr 11 15:07:27 2009 (r190936) +++ stable/7/sys/dev/hptmv/access601.h Sat Apr 11 15:16:11 2009 (r190937) @@ -28,6 +28,8 @@ #ifndef _ACCESS601_H_ #define _ACCESS601_H_ +#ifndef FOR_DEMO + void HPTLIBAPI BeepOn(MV_BUS_ADDR_T BaseAddr); void HPTLIBAPI BeepOff(MV_BUS_ADDR_T BaseAddr); UCHAR HPTLIBAPI check_protect_circuit(MV_BUS_ADDR_T BaseAddr); @@ -40,4 +42,21 @@ void HPTLIBAPI set_fail_leds(MV_SATA_ADA #define set_fail_leds(pAdapter, mask) #endif +int HPTLIBAPI sx508x_ioctl(MV_SATA_ADAPTER *pSataAdapter, UCHAR *indata, ULONG inlen, + UCHAR *outdata, ULONG maxoutlen, ULONG *poutlen); + +MV_BOOLEAN HPTLIBAPI sx508x_flash_access(MV_SATA_ADAPTER *pSataAdapter, + MV_U32 offset, void *value, int size, int reading); +#else + +#define BeepOn(addr) +#define BeepOff(addr) +#define check_protect_circuit(addr) 1 +#define set_fail_led(pAdapter, channel, state) +#define set_fail_leds(pAdapter, mask) +#define sx508x_ioctl(pSataAdapter, indata, inlen, outdata, maxoutlen, poutlen) 0 +#define sx508x_flash_access(pSataAdapter, offset, value, size, reading) 0 + +#endif + #endif Modified: stable/7/sys/dev/hptmv/amd64-elf.raid.o.uu ============================================================================== --- stable/7/sys/dev/hptmv/amd64-elf.raid.o.uu Sat Apr 11 15:07:27 2009 (r190936) +++ stable/7/sys/dev/hptmv/amd64-elf.raid.o.uu Sat Apr 11 15:16:11 2009 (r190937) @@ -26,1881 +26,1909 @@ * $FreeBSD$ */ begin 644 hptmvraid.o -M?T5,1@(!`0D```````````$`/@`!`````````````````````````"#=```` -M`````````$```````$``#@`+`$B)7"302(EL)-A,B60DX$R);"3H3(ET)/!, -MB7PD^$B![$@"``!(B?M,BV\02(UOD$R-9"00N`(```"`?P$`=0N`?P(!&<"# -MX`+_P(A%`$C'10@`````@$T!!$B+0Q!(B440BU,8B5482`^V10!(BP3%```` -M`$B)16"`?0`#=2:-0O:)11B+&Z(````$B)W^@`````08$\)/,6 -M>%IT&D@/MD4`2(L$Q0````!(B45H@$T!!.FE!```OI````!,B>?H`````(3` -M==5!]D0D"0)T'<9#"`%!#[9$)`J(0PLZ0PES"P^V\$B)W^@`````O@`"``!, -MB>?H`````(3`=!=)C;PDD````+IP`0``O@````#H`````$$/MI0DDP```+X! -M````(=8/MD,$@^#\B=�()\`G(O@0````AUH/@\XG1@^$("?`)R+X0```` -M(=:#X,^)T8/A(`GP""`>!`(#X>Z_O__2`^V0!!(@SS&``^$JO[____".=%_UD&+1"08B40D -M#+H`````2&/"2&G`,`$``$J-G"BH1```2(-["`!U#HM#=$$[1"0$#X04`0`` -M_\*#^@]^TDF+G:!$``!(A=MT(4B+0Q!)B86@1```NC`!``"^`````$B)W^@` -M````3(EK$$&+1"0$B4-T#[93?H/*`8A3?F9!#[9$)!2#X`$!P(/B_0G"B%-^ -M00^W1"069HF#@````(M4)`R)DX0```!!#[9$)!"(`T$/MD0D$XA#<@^VR+@! -M````T^!FB4-\2,=#"`````!!BT0D#(E#&$$/MD0D$8A#<$@/M@-(BP3%```` -M`$B)0V!)C70D+$B-N\@```"Z$````.@`````28UT)#Q(C;O8````N@0```#H -M`````$F-M"2`````2(V['`$``+H0````Z`````!)C70D0$B-N]P```"Z0``` -M`.@`````BT0D##F#A````'8&B8.$````0?9$)`D!=`2`2P$!10^V?"0208!\ -M)`L!#X:V`0``1(GZ#[;"3(NTPX@```!!BT0D*(E$)`Q-A?8/A3D!``!-B[6@ -M1```387V="%)BT8028F%H$0``+HP`0``O@````!,B??H`````$V);A!!BT0D -M!$&)1G1!#[96?H/*`4&(5GYF00^V1"0D@^`!`<"#XOT)PD&(5GY!#[=$)"9F -M08F&@````(M4)`Q!B9:$````00^V1"0A08A&<$$/MD0D($&(!DF)7@A!BT0D -M'$&)1AA!#[9$)"-!B$9R#[;(N`$```#3X&9!B49\20^V!DB+!,4`````28E& -M8$@/M@-(BP3%`````$F)1FA%B'X#1(GZ#[;"3(FTPX@```#^0W%)C70D+$F- -MOL@```"Z$````.@`````28UT)#Q)C;[8````N@0```#H`````$F-M"2````` -M28V^'`$``+H0````Z`````!)C70D0$F-OMP```"Z0````.@`````0?9$)`D! -M=`5!@$X!`4D/MD0D(DF#O,:(`````'5S28FLQH@```!!#[9$)"*(10-!_D9Q -M3(EU"$D/M@9(BP3%`````$B)16B+1"0,03F&A````'8]08F&A````.LT1(GZ -M#[;"2(.\PX@`````=2-(B:S#B````$B)70C^0W%$B'T#2`^V`TB+!,4````` -M2(E%:$B+G"08`@``2(NL)"`"``!,BZ0D*`(``$R+K"0P`@``3(NT)#@"``!, -MB[PD0`(``$B!Q$@"``##9F9FD%532(/L"$B)\[T`````#[9&<(G"@_@`#X[( -M````9F:02&/%2(.\PX@`````=`O_Q3GJ?^SIK````+@!````B>G3X&8)@X`` -M``!(B=[H`````$B)PDB%P`^$B````,8``T"(:`-(B5@(@#L(#Y3`P>`##[9* -M`8/A]PG!B$H!2(L%`````$B)0F!(#[8#2(L$Q0````!(B4)H]D,!$'01BUT((!] -M``-V&DB)[DR)[^@`````]D5^!'0)@$M^!&9FD&:00?_$#[9#<$0YX'_$Z0\! -M``"`3@$$@'YQ`G4*@&9^_I#I^P```(!F?OU(@[Z(`````'4=2(N&D````,9` -M`P!(B8:(````2,>&D`````````!(BX.(````@#@#=0M(B=Y,B>_H`````(!+ -M?@3'@X0`````````Z:8```!F9I!F9I`/MD9Q.D9P=2"`3@$$#[9&?H/@_HA& -M?F:#OH``````=&^#R`*(1G[K9P^V1G'_P`^V5G`YT'599H.^@`````!T++D` -M````#[>&@````(G"J`%U"O_!B=#3^*@!=/9(8\%(@[S#B`````!U&^L&]D9^ -M`G43@$L!!(!+?@1(B=Y,B>_H`````,>#A``````````/MT-\]]@A@X0```!F -M9F:02(-["`!U&?9#?@1T$^@`````B4-T2(G?Z`````!F9I!(BUPD"$B+;"00 -M3(MD)!A,BVPD($B#Q"C#9F9FD&9FD$%455-)B?R]`````&9F9I!(8\5(:<`P -M`0``2HV<(*A$``"#>W0`="!(@WL(`'492(G>3(GGZ`````#V0P$$=`A(QT-H -M`````/_%@_T/?L%;74%P(`@`` -M28G]2(GU08G628GG2(GWZ`````"`?0`(=0M(B>Y,B>_H`````$&\`````(!] -M<``/AL<```!)8\1(@[S%B``````/A*@```!(B[3%B````(`^`W8100^VUDR) -M[^@`````Z8H```!)8\1(BYS%B````,9#`P!(QT,(`````,>#C`````````"` -M8P'^2,=#:`````!%A/9U#8!]``9U!TB#?0@`="JZ``(``+X`````3(G_Z``` -M``!(C7MP3(GYNC````"^`````.@`````ZQ,/ME4!@^(!#[9#`8/@_@G0B$,! -M2(G?Z`````!F9I!F9I!!_\1$.&5P#X9U$6:)4PAFQT,*``!,B0-(@\,0*=>)T$D!P"G1=1O_QD$/ -MMD5P.<:X``````]$\$$/MT5\B<'!X0F%_W6Y9H%]"@"`=`9(@\40ZY=FQT/Z -M`("X`0```$B!Q``"``!;74%<05U!7L-F9F:09F9FD&9F9I!,BT\(1(M&0`^V -M3P,/MWY,.$Y$=0L/MT9*00'`ZP]FD#A.1'8(00^W07Q!`<`X3D1U!&8#?D@X -M3D5U!68#?D:0@'Y0`'0..$Y$@Q$B4((PV9F9I!F9F:09F9FD&9FD%-)B?E)B?"+?@A$#[=6#$&[ -M`````$$/MDERB?[3[F9!QT!,``!!QD!0`4$/ME%PB?")T;H`````]_%!#[9) -MY`````$&`>%``=`M!QD!0`.L49F9FD$$/MT!, -M9D$#07QF08E`3)!F13E1?',)9D4K47SKNF:0N`$```#3X&9!"4!.08A(169% -MB5!&00^WPUO#9F:09I!54TB#[`A(B?U(BUXX2(L&#[9(`[C^____T\!F(4-. -M@'X9`70'#[9&&8A#&4B)[^@`````9H-[3@!U&8![&0!U!,9#&0%(BW,P2(G: -M2(GOZ`````!(@\0(6UW#9F:09I!(B5PDT$B);"383(ED).!,B6PDZ$R)="3P -M3(E\)/A(@^PX28G_2(GU3(LV0?9&`01U%<9&&0)(BW8P2(GJZ`````#IR@`` -M`$R)]^A1_O__9H-]3@!U&L9%&0)(BW4P2(GJ3(G_Z`````#IHP```&:00;T` -M````08!^<``/A)`````/MT5.1(GIT_BH`71R3(G_Z`````!(B<-)8\5-BZ3& -MB````$R)(TB):S@/ME48@^("#[9#&(/@_0G0B$,8#[95&(/B!(/@^PG0B$,8 -M#[9%#HA##DB)VDB)[DR)Y^@^_?__2,=#,`````!(QT,H`````$B)WDR)_T'_ -M5"1@9F:00?_%00^V1G!$.>@/CW#___](BUPD"$B+;"003(MD)!A,BVPD($R+ -M="0H3(M\)#!(@\0XPV9F9I!F9F:09F9FD$B#[`A(BTX(#[91`8!F`?N`80'[ -M_DEQ@$E^`4B#>6@`#Y7`]L($#Y7"#[;`A<)T!DB)SO]1:$B#Q`C#9F:09I!( -M@^P(3(M&.$F+<"!(A?9T#69!#[9`&(/@`3G(=2))@W@H`'003(G&0?]0*+H! -M````A>"Z`0```(G02(/$",-F9F:055-(B?L/M@>#Z`2#^`%W4+T`````@']P -M`'0W9F:09I!(8\5(@[S#B`````!T$4B+O,.(````Z,7___^%P'4'N`````#K -M)/_%#[9#<#GH9I!_SK@!````ZQ%F9F:09F:0#[9'`<#H`H/@`5M=PV9FD$B) -M7"382(EL).!,B60DZ$R);"3P3(ET)/A(@^PH28G^2(GU2(M>.$R+(TR++H!^ -M&0$/A-D```#V0Q@"#X1_````@'L:``^%Q0```$'V1"1^`@^%N0```,9#&@%! -M@'T#`4@9P(/@"$Z+K""(````387M=$),B>_H%?___X7`=#9(C7U`ND@```"^ -M`````.@`````00^V30.X`0```-/@9HE#3DR);0!(B>Y,B?=!_U5@Z<````!, -MBVT`ZU5F9I!FD/9#&`1T2DR)[^C"_O__AY,B?=!_U5@Z8$```"`>QD!=!T/MU-.00^V30.X`0```-/@.<)U"6:0 -M#[9%&8A#&4B)[DR)]^@`````00^V30.X_O___]/`9B%#3F:#>TX`=3R`>QD` -M=03&0QD!2(MS,$B)VDR)]^@`````9D'_3"0B9D&#?"0B`'4428M$)#!(A3(GGZ`````!F -M@WU.`'55@'T9`'4?QD49`4B+30"+D80````[4PAU#`^W0PP!T(F!A````$B+ -M=3!(B>I,B>?H`````$B+10!FQT`@``!(BU4`2(/"*$C'Q@````!,B>?H```` -M`$B+'"1(BVPD"$R+9"002(/$&,-F9F:09F:09F:02(E<).A(B6PD\$R)9"3X -M2(/L&$F)_$B)\TB+;CB`?AD!=`T/MD89B$49ZW1F9F:0@'X.('5*QD89`$B+ -M10!(BX"0````2(D&2(U^0+I(````O@````#H`````,9#&@#&0PXP#[9#&(/@ -M_8/(!(A#&$B+`TB)WDR)Y_]08.M=9I#&11D!2(M-`(N1A````#M6"'4-#[=& -M#`'0B8&$````D$B)WDR)Y^@`````2(MU,$B)ZDR)Y^@`````2(M%`&;'0"`` -M`$B+50!(@\(H2,?&`````$R)Y^@`````2(L<)$B+;"0(3(MD)!!(@\08PV:0 -M05154TF)]$B)U4B+1CB%R71&2(M0$$B)50`/MT8,P>`)9HE%"&;'10H`@$B+ -M!H!X`P`/A`T!``!(C8(```$`9H-]"`!T"4@/MT4(2(T$`DB)10#I[0````^W -M7@S!XPE(@W@@`'0L]D`8`70F2(M(($B+`4B)`DB+00A(B4((2(/"$$B-00I( -M@\$09H,X`'G@ZS2Z`````$B#>"@`#X2H````2(GJ2(G&_U`HN@````"%P`^$ -MD@```.L,9HE9"&;'00H`@.M&2(GI9F9FD&9FD+H```$`9H-Y"`!T!`^W40A) -MBP0D@'@#`'06.=IV%HG82`$!B=!F*=AFB4$(ZPYFD#G:<[9(@\$0*=-UQ$F+ -M!"2`>`,`#Y7`2#G-#Y7"#[;`A<)T(4B+`4B)10!(BT$(2(E%"$B#Q1!(C4$* -M2(/!$&:#.`!YW[H!````B=!;74%F!````D$B+!H!X -M`P!U-\9&&0!(BT4`2(N`D````$B)!DB-?D"Z2````+X`````Z`````#&0QH` -M2(L#2(G>3(GG_U!@ZWL/MU8,P>()B=9(BWT02`'^Z`````"%P'0'QD49#.LA -MD,9%&0%(BTT`BY&$````.U,(=0T/MT,,`=")@80```"02(G>3(GGZ`````!( -MBW4P2(GJ3(GGZ`````!(BT4`9L=`(```2(M5`$B#PBA(Q\8`````3(GGZ``` -M``!(BQPD2(ML)`A,BV0D$$B#Q!C#9I!(B5PDX$B);"3H3(ED)/!,B6PD^$B# -M["A)B?Q(B?-(BRY(QT4P`````/9%?@$/A54!```/MD8.@_@"#X3V````@_@" -M?Q"#^`$/A)8```!FD.DS`0``@_@##X4J`0``BT8(B44<#[=&#&:)12`/MU8, -MP>()2(M^$+X`````Z`````!FQT-.`P!!O0````!,B>?H`````$B)QL9`#C"+ -M0PB)1@@/MT,,9HE&#(!.&`1(B5XX2,=&,`````!(QT8H`````$ECQ4B+A,6( -M````2(D&3(GG_U!@0?_%08/]`7ZNZ;<```"+1@B)11P/MT8,9HE%(.@````` -M2(G&QD`.((M#"(E&"`^W0PQFB48,@$X8`DB)7CA(QT8P`````$C'1B@````` -M2(N%B````$B)!DR)Y_]08.MEBT8(B44<#[=&#&:)12#H`````$B)QL9`#B"+ -M0PB)1@@/MT,,9HE&#(!.&`)(B5XX2,=&,`````!(QT8H`````$B+A8@```!( -MB09,B>?_4&#K$\9#&09(BW,P2(G:3(GGZ`````!(C54H2,?&`````$R)Y^@` -M````2(M<)`A(BVPD$$R+9"083(ML)"!(@\0HPV9FD&9FD&9FD$B)7"302(EL -M)-A,B60DX$R);"3H3(ET)/!,B7PD^$B#[#A)B?])B?1(BR[V10$$=17&1AD" -M2(MV,$R)XN@`````Z=H!``#V1A@@="1(QT4P`````$B)=3AF@WTB``^%O0$` -M`.C(_?__Z;,!``!F9I!(@WTP`'4I9H-](`!F9F:0=#X/MT4@`T4<.T8(=C(/ -MMT8,`T8(.44<#_@4/EL`(1"0'ZR2`O8(`````#Y1$)`TJ+A.V(```` -M]D`!!'1M00^V5"08P.H"1#AT)`P@`=?6+0W2)0WCH```` -M`(E#=$B)W^@`````2(/$"%M=PY!(B5PDV$B);"3@3(ED).A,B6PD\$R)="3X -M2('L*`(``$F)U$R+-DB+;CA(BUT@0;T1````2(GB2(7;=`QF#[9%&(/@`3G( -M=2A(B=-(@WTH`'0.2(GN_U4HAP@`=`0/MU,(.=%V.T$/MD8#.D5$=11( -MBP-)B00D2(M#"$F)1"0(28/$$"G12(/#$+H```$`9H-["`!T!`^W4PA!_\TY -MT7?%00^V1@,Z141U'$B+`TF)!"1F08E,)`AF0<=$)`H`@+@!````ZUDYT7,W -MBI(P>($2(G>3(GGZ`````"X`0```$B+G"0` -M`@``2(NL)`@"``!,BZ0D$`(``$R+K"08`@``3(NT)"`"``!(@<0H`@``PY`/ -MMD<#.D9$=0\/MT9(9HE"#(M&0(E"",,/MT9&9HE"#,=""`````##9F9FD&9F -M9I!$BT8(1`^W3@Q!NP````"Y`````(!_<``/A((```!%#[?1B_H`````$B#Q`A;7<-F -M9I!FD$B)7"302(EL)-A,B60DX$R);"3H3(ET)/!,B7PD^$B#[#A)B?](B?5, -MBS9!]D8!!'45QD89`DB+=C!(B>KH`````.G*````3(GWZ*'^__]F@WU.`'4: -MQD49`DB+=3!(B>I,B?_H`````.FC````9I!!O0````!!@'YP``^$D`````^W -M14Y$B>G3^*@!='),B?_H`````$B)PTECQ4V+I,:(````3(DC2(EK.`^V51B# -MX@(/MD,8@^#]"="(0Q@/ME48@^($@^#["="(0Q@/MD4.B$,.2(G:2(GN3(GG -MZ-[]__](QT,P`````$C'0R@`````2(G>3(G_0?]4)&!F9I!!_\5!#[9&<$0Y -MZ`^/A(`<-!_\1$B>BZ`````/?U1#G@#X=W -M____0?_.08/^_P^%//___XM$)`1(@\0(6UU!7$%=05Y!7\-F9F:09F:055-( -MB?V)\[@`````.;2&/#2(M\Q0BZ`!```+X````` -MZ`````#_RX/[_W7B2(/$"%M=PV9FD&9FD&9FD(L/_\F#^?]T+DACP4B+1,<( -MN@````!(@S@`=`:X`````,/_PDB#P`B!^O\!``!VYO_)@_G_==*X`0```,-F -M9I!(@^P(NA````"^`````.@`````2(/$",-F9F:09F9FD$B#?A``=`Q(BU80 -M2(M&"$B)0@A(BU8(2(M&$$B)`DC'1@@`````N@````#HL/S___/#9F9FD&9F -M9I!F9I!F9I!(C4]82(M'6$B)1A!(A6^```` -M`.C[^___2(G#1(D@B6@$2(G&3(GOZ&?___](B=A(BQPD2(ML)`A,BV0D$$R+ -M;"082(/$(,-F9F:09F9FD&9F9I`/MD=)#[;02(T4DDB-5-=0_\"(1TE(B3K& -M0@D`QD(*`,9""P!(B=##9F9FD&9F9I!!5%5328G\2(GSO0`````/ME9&C4+] -MT?@!PH/Z`'XED$ACQ4B+M,.@"@``3(GGZ*W]____Q0^V4T:-0OW1^`'".>I_ -MW+H'````2(G>3(GGZ%S[__];74%-_Y$B)Z.DF -M`0``2(GN3(GOZ*'^__]!BX4X6```P>`#1#G@#X(T____O@<```!,B>_H$?K_ -M_TB)Q;@`````2(7M#X3J````ZPZX`````.G>````9F9FD$B);0!(B6T(BT0D -M!(E%0&9$B75$B%U&2,=%,`````!!O``````/MM.-0OW1^`'"@_H`#XZ?```` -M18GW9D'![P,/MM.-0OW1^$2--`)F9F:026/<00^W]TR)[^AQ^___2(F$W:`* -M``!(A2Z -M!P```$B)[DR)[^AO^?__N`````#K,DECQ$C!X`1(C1PH2(V[\`H``.A1_/__ -M2(V[<`L``.A%_/__0?_$13GF#X]Y____2(GH2(/$"%M=05Q!74%>05_#9F9F -MD&9FD$%455-(B?6)TXG.#[9-4@D`,```/MX2!0@P` -M`&:)1"00B=!FP>@##[?`B40D"$&)UD&#Y@=!#[?&B<;!Y@FX"````&9$*?!! -MB<9F1#MT)!"+7"001`]'\T$/M\:)Q<'E"4@/MD0D+TB+5"0@2(N,PJ`*``"+ -M5"0(B?!)B<1,`V31"$0[;"0,=21)@\<0QT0D#````0!F08-_"`!T"4$/MT\( -MB4PD#$&]`````)"+7"0,1"GK.>L/1]V#?"0T`'021(GN20,WB=I,B>?H```` -M`.L01(GO20,_B=I,B>;H`````$$!W2G==`>)V$D!Q.N29D0I="00=!3_1"0( -MO@````!!O@@```#I/O____Y$)"\/MEPD+TB+1"0@.)AA#```#X/-_O___T0D -M,$B+5"1`#[9">#M$)#`/CXO^__^Z`````$B+="1`2(M\)$C_5"0X2('$:`$` -M`%M=05Q!74%>05_#9F9FD&9F9I!F9I!54TB#[`A(B?V%TG0$QD89"T&[```` -M`(!^>``/A,$```!(C9W`5P``2(V]L%<``)!)8\-,BT3&4$G'@#`,```````` -M38G"N0````!!@'A&`'9(#[;!2,'@!$P!T$B-D/`*``!!N0````"#N/`*```` -M=1*#>@0`=0R#>@@`=0:#>@P`=`9!N0$```!%AXN``` -M``"%P'0=2(M#"$R)0PA)B1A)B4`(3(D`ZQNX`0```.OA9I!(BT<(3(E'"$F) -M.$F)0`A,B0!!_\,/MD9X1#G8#X].____2(GOZ`8X``!(@\0(6UW#9F9FD&9F -M9I!F9F:09F:02(E<)-!(B6PDV$R)9"3@3(EL).A,B70D\$R)?"3X2(/L2$F) -M_4B)\TB+KC`,``#_CSQ8``!(C4802(M("$B+5A!(B4H(2(D12(E&$$B)0`A( -MA>T/A(<"``#V11@@#X0=`0``3(ME``^W1D1!B<9$`W9`1`^W?D1(QX8P#``` -M`````$B-A[!7``!(BU`(2(EP"$B)!DB)5@A(B3*`OF(,```!=56`?0X"=49( -M#[9&1TB+O,:@"@``Z!3W__^%P'4PQH-B#```#$&`3"1^"D$/MT0D?/?8(T-` -M03F$)(0```!V#D&)A"2$````9F:09F:0@+MB#````70:#[:#8@P``(A%&4B) -M[DR)[^CB-@``Z6T#``!!#[=$)'R+50C_P@^OPD0Y\'8M00^WST2)\DR)YDR) -M[^BX^O__2(FH,`P``$B)15!(B<9,B>_H`A```.DM`P``00^W1"1\00.$)(0` -M``!$.?!U"$6)M"2$````2(GN3(GOZ'?_`B$5Y.D5X -M#X6.`@``]D48!`^$T@```$&^`````(!]>``/AK(```!(C8>P5P``2(E$)!!( -MC9?`5P``2(E4)`A$B?(/ML)(BUS%4$C'@S`,````````@+MB#````75-28G? -M0;P`````@'M&`'8@1(G@#[;X2,'G!$J-O#_P"@``Z`?V__]!_\1%.&=&=^!( -MBU0D$$B+0@A(B5H(2(D32(E#"$B)&.LF9F:09I`/MH-B#```B$492(M4)`A( -MBT((2(E:"$B)$TB)0PA(B1A!_\9$.'5X#X=F____2(GN3(GOZ(`!V+69FD&9FD$2)\@^VPDB+7,50@+MB#````70*#[:#8@P` -M`(A%&4'_QD0X=7AWV8!]&0!U%TC'P@````!(B>Y,B>_H`?K__^E<`0``N@`` -M``!(B>Y,B>_H+/S__^E'`0``9F9FD&9FD("^8@P```$/A8,```!)B?2]```` -M`(!^1@!V)&9FD&:0B>@/MOA(P><$2HV\)_`*``#H^O3____%03AL)$9WX4B# -MNS@,````="E(BX,X#```2(F#,`P``$C'@S@,````````2(G>3(GOZ`,.``#I -MS@```$F-A;!7``!(BU`(2(E8"$B)`TB)4PA(B1KK6F9FD$B-A\!7``!(BU`( -M2(EP"$B)!DB)5@A(B3)(@[XX#````'0T2(N&.`P```^VEF(,``"(4!E(BY8X -M#```2,?&`````.@`````2,>#.`P```````#IN0```$B+_H7?3__TC' -M0S``````2(M#.$B#>"@`=!5(C5`H2,?&`````$R)[^@`````ZR5)@[U(6``` -M`'0;28V52%@``$C'Q@````!,B>_H`````&9FD&:008.]0%@```!T5H"[8@P` -M``%U34B+>SA(@W]``'0PZ-TQ``"%P'4G2(M#.$B+4$A(BW!`3(GOZ`````!( -MBT,X2,=`0`````!!_XU`6```08.]0%@```!T"$R)[^@`````2(M<)!A(BVPD -M($R+9"0H3(ML)#!,BW0D.$R+?"1`2(/$2,-F9F:09F:09F:09F:02(/L"$B+ -M%H!Z2@!T$\9"2@!(Q\8`````Z`````!F9I!(@\0(PV9F9I!F9F:09F:005=! -M5D%505154TB#[`A)B=1!B<](BT8X2(L02`^V0!%,B[3"H`H``(M&""M"0,'@ -M"0^W;@S!Y0F)P8'A_P\``$&)Q4'![0R[`!```"G+.>L/1]U%A?]T#$ECU8G( -M20-$U@CK#TECQ8G/20-\Q@CH`````$F)!"1F08E<)`@YZW089D''1"0*``!) -M@\000?_%*=VY`````.NN9D''1"0*`("X`0```$B#Q`A;74%<05U!7D%?PV9F -M9I!F9F:09F:0#[9'$@)'$XA'$DB-5Q2^`0```.L/@'\2`'D&N`````##_D<2 -M#[9/$H/Y'W<3B?#3X(5'%`^5P`^VP.M49F9FD(/Y/W<2@^D@B?#3X(5"!`^5 -MP`^VP.LY@_E?=Q2#Z4")\-/@A4((#Y7`#[;`ZR)FD+@`````@_E_=Q:#Z6") -M\-/@A4(,#Y7`#[;`9F:09F:0APH!=7%(B=_HJ?[__X7`=!7&0PH` -M2(G>2(GOZ,8```#K8V9F9I"`>P@!=4H/MD,003A$)$>0=#XX0Q%U.0^V\$B) -M\$C!X`1*C;0@<`L``$B-2Q2+!@M#%(D&BT8$"T$$B48$BT8("T$(B48(BT8, -M"T$,B48,D,9#"0)(B=Y(B>_H0?W__TB+'"1(BVPD"$R+9"002(/$&,-F9F:0 -M9F9FD&9FD&9FD$B)7"3P3(ED)/A(@^P828G\2(GSQD83`,9&$@!(B??H[/W_ -M_TB)WDR)Y^@1````2(M<)`A,BV0D$$B#Q!C#9I!(B5PDX$B);"3H3(ED)/!, -MB6PD^$B#["A)B?U(B?-(BRY(BU4X2`^V1A!,BZ3"B````.@`````2(G&3(D@ -M@'L(`74-@$@8`L9`#B#K"V9FD(!(&`3&0`XP#[9#$@-%0(E&"&8/MD,39HE& -M#$C'1B@`````2(E>.$C'1C``````3(GO0?]4)&!(BUPD"$B+;"003(MD)!A, -MBVPD($B#Q"C#05154T&Y`````$&[`````$B)_4&\`0```.L808/[?W8/1(G( -MZ5X!``!F9F:09F:00?_#1(G:08/['W<21(G@1(G9T^"%!P^5P`^VP.M208/[ -M/W<3C4K@1(GCT^.%700/E<`/ML#K.4&#^U]W$XU*P$2)X-/@A44(#Y7`#[;` -MZR"X`````$&#^W]W%8U*H$2)X]/CA5T,#Y7`#[;`9F9FD(7`#X1S____0;@! -M````2(GZ0;H!````ZPIF9F:09F:00?_`0XT,`X/Y'W<41(G0T^"%`@^5P`^V -MP.M59F:09I"#^3]W$X/I($2)T-/@A4($#Y7`#[;`ZSB#^5]W$X/I0$2)T]/C -MA5H(#Y7`#[;`ZR"X`````(/Y?W<6@^E@1(G0T^"%0@P/E<`/ML!F9I!FD(7` -M=8Q$B=E%`<-!N@@```!$BQD`#X3C````2(-[$`!U"TB)$)#[9$ -ME")!B`)1`^V3)0@1(G(#[;0BY(BWPD".A^`@``2(N<)"@!``!(BZPD -M,`$``$R+I"0X`0``3(NL)$`!``!,B[0D2`$``$R+O"10`0``2('$6`$``,-F -M9I!F9I!(B5PDT$B);"383(ED).!,B6PDZ$R)="3P3(E\)/A(@>Q(`0``28G_ -M2(GU2(L>2(UT)!!(C7T0Z$3\__]!B<1(#[9%($R+M,.@"@``2`^V12%,BZS# -MH`H``+L`````1#GC?3U(8\,/MG2$$<'F"0^V5(02P>()2`^V1(00B?9(B?=) -M`WS&"$B)/"1)`W3%"$B)="0(Z`````#_PT0YXWS#N@````!(B>Y,B?_HD`$` -M`$B+G"08`0``2(NL)"`!``!,BZ0D*`$``$R+K"0P`0``3(NT)#@!``!,B[PD -M0`$``$B!Q$@!``##9F9FD&9F9I!!5T%6055!5%532('LB`$``$F)_TB)]4R+ -M)DB+7A!(C;0D@````$B)W^AB^___08G&2`^V0QA-BZS$H`H``+L`````@'T@ -M`'8C#[9-(&9FD`^VPT@/ME0H&$F+E-2@"@``2(E4Q$#_PSC9=^1!O`````!% -M.?0/C:T```!F9I!FD$ECQ`^VE(2!````08G20<'B"0^VE(2"````08G30<'C -M"0^VC(2`````NP````"`?2``=BA$#[;)18G0#[9U()`/ML-(BU3$0$J+?,H( -M28T4.$B)%,3_PT`XWG?D#[;11(G02(G'20-\U0A(.3PD=1!(BW0D"$2)VN@` -M````ZQV02(M4)`A(BS0D#[;!1(G720-\Q0A$B=GH`````$'_Q$4Y]`^,6/__ -M_[H`````2(GN3(G_Z!@```!(@<2(`0``6UU!7$%=05Y!7\-F9I!F9I!(B5PD -MZ$B);"3P3(ED)/A(@^P828G\2(GSB=7&1@D"@_H!&<"#X/6#P`R(1@KH3O;_ -M_X!["`-U+TB+0Q!(BW`02(7V=")(QT`0`````,9&"0*#_0$9P(/@]8/`#(A& -M"DR)Y^@9]O__2(L<)$B+;"0(3(MD)!!(@\08PV9FD&9FD`^V5@N%TG1&B=!( -M#[:$1[`)``!(C02`2(U$QU"`>`D"=`:X`````,.`>`H!=!+&1@D"#[9`"HA& -M"K@`````PY")T`^VE$>Q"0``A=)UNK@!````PV9F9I!F9F:09F9FD$%7059! -M54%455-(@^P(28G^2(GUQD9*`("^8PP````/A(L```!!O`````!(C5U0@'U) -M`'1.@'L)`74X@'L(`W4I2(M#$(!X&0!T'TB#>!``=!A(QT`0`````,9#"0(/ -MMH5B#```B$,*ZPG&14H!Z;PD`=7I(B=Y(B>_HO_[__X7`=%O& -M0PD!3(GW2(G>#[9#"(/X!G=(B<#_),4`````Z'KW___K.&9F9I!F9F:0Z-OY -M___K*>C$^___9F9FD.L>Z*G\___K%\9%2P'&1@D"QD8*`>AF]/__9F:09F:0 -M@'L)`G400?_'9F9FD&9FD(!["0)T"T&]`````.F/````@'L*`0^$A0```(!] -M2P"0#X0=____2(M%.$@/ME,02(N$T(@```#V0`$$=%]!O0````#&0PD!QD,* -M`$R)]TB)W@^V0PB#^`9W1HG`_R3%`````.C(]O__ZS9F9I!F9I#H*_G__^LI -MZ!3[__]F9F:0ZQ[H^?O__^L7QD5+`<9&"0+&1@H!Z+;S___K!,9#"@%!_\1( -M@\,H#[9%240YX`^/S/[__T6%_P^%H_[__T6%[704QH5B#````4B)[DR)]^C, -M[O__ZP3&14H!2(/$"%M=05Q!74%>05_#9F9FD&9FD$%7059!54%455-(@>QX -M`0``2(E\)$A(B?5(BUXX3(NF,`P``$&]`````$V%Y'4E#[=.1(M60`'12(G> -MZ!#G__](B44PN/____](@WTP``^$L2(``$B+1"1(_X`\6```2(U%$$B+5"1( -M2('"T%<``$B+2@A(B4((2(E5$$B)2`A(B0%F@[N``````'1$]D-^`74+BX.$ -M````.T5`=R=!O@`````/MX.`````B<*H`74.0?_&B=!$B?'3^*@!=/)$B'5( -MZS#&14@(ZRIF9I!F9I#V0WX"=!J+@X0````[14!W#P^V14>(14CK"F9FD&9F -MD,9%2`C&14D`QH6P"0```,9%2P#&A6(,````QH5C#````$C'A3@,```````` -M387D#X1@#P``0?9$)!@@#X2/!P``00^V1"0.@_@"#X1N!```@_@"?Q"#^`$/ -MA`4!``!FD.F>(0``@_@##X65(0``2(U<)&!(B=_H5>7__TF)VK\`````#[=U -M1+L`````0;D@````0;L!````@_\?=S\/ML-)C12"1(G)*?DY\0]'SH/Y('4( -MQP+_____ZPU$B=C3X/_(B?G3X`D"1(G(*?@Y\',5C70^X+\`````ZP.#[R#_ -MPX#[`W:R2(N]H`H``.A>Y/__0;\`````@'U&``^&`2$``$2)^P^VPTC!X`1( -MC1PH2(V[\`H``.BTY/__2(V[<`L``.BHY/__2(GOZ,#E___&0`@"1(AX$,9` -M$0!(BU0D8$B)4!1(BU0D:$B)4!Q!_\=$.'U&=ZOIIR```+@!````ZU5(B>^Y -M`````(!]1@"0=D$/ML%(P>`$2`'X2(V0\`H``+X`````@[CP"@```'42@WH$ -M`'4,@WH(`'4&@WH,`'0%O@$```"%]G6P_\$X3T9WO[@`````A%``P```````!(B>_H7.3__\9`"`*(6!"(6!%(BU0D -M8$B)4!1(BU0D:$B)4!Q)B<2`?48"#X<``0``2(V=\`L``$B)[^@DY/__QD`( -M!4B)6!#&0"``28G%28L,)/Z!L`D```^VL;`)``")]T@IR$B#Z%!(P?@#2+K- -MS,S,S,S,S$@/K\*(A'FP"0``00^V1"0+B(1YL0D``$&(="0+0;\`````@'U& -M``^&TQX``$B)TT0X?4AT!!$B'@12(M4)&!(B5`4 -M2(M4)&A(B5`<00^V52`/MLI&B'PI&/_"08A5($F+50#^@K`)```/MK*P"0`` -MB?%(*=!(@^A02,'X`T@/K\.(A$JP"0``00^V10N(A$JQ"0``08AU"T'_QT0X -M?48/AWO____I1AX``$&_`````(!]1@`/AC8>``!(C9WP"P``2;[-S,S,S,S, -MS$0X?4@/A+T```!(B>_H`./__\9`"`%$B'@01(AX$4B+5"1@2(E0%$B+5"1H -M2(E0'$B)1"1`2(GOZ-7B___&0`@#2(E8$$2(>!A)B<5(BQ#^@K`)```/MK*P -M"0``B?%(BT0D0$@IT$B#Z%!(P?@#20^OQHB$2K`)``!!#[9%"XB$2K$)``!! -MB'4+28L4)/Z"L`D```^VLK`)``")\4R)Z$@IT$B#Z%!(P?@#20^OQHB$2K`) -M``!!#[9$)`N(A$JQ"0``08AT)`M!_\=$.'U&#X^N`````"% -MP'073(FE.`P``$C'A3`,````````Z6,*``!(C5PD8$B)W^B1X/__28G:OP`` -M```/MW5$NP````!!N2````!!NP$```!F9F:0@_\?=S\/ML-)C12"1(G)*?DY -M\0]'SH/Y('4(QP+_____ZPU$B=C3X/_(B?G3X`D"1(G(*?@Y\',5C70^X+\` -M````ZP.#[R#_PX#[`W:R#[9%1XB%"`P``,:%"0P```!(BT0D8$B)A?`+``!( -MBT0D:$B)A?@+``!(QX4`#````````(!]1@(/A[@```!(C9WP"P``2(GOZ/7@ -M___&0`@%2(E8$,9`(`!)B<5!OP````"`?48`#X;I&P``2+O-S,S,S,S,S$B) -M[^C$X/__QD`(`42(>!!$B'@12(M4)&!(B5`42(M4)&A(B5`<00^V52`/MLI& -MB'PI&/_"08A5($F+50#^@K`)```/MK*P"0``B?%(*=!(@^A02,'X`T@/K\.( -MA$JP"0``00^V10N(A$JQ"0``08AU"T'_QT0X?49WA>E?&P``#[9=1TB)[^A` -MX/__QD`(`8A8$(A8$4B+5"1@2(E0%$B+5"1H2(E0'$B)1"0X0;\`````@'U& -M``^&(AL``$B-G?`+``!)O,W,S,S,S,S,1#A]1P^$O0```$B)[^CLW___QD`( -M`42(>!!$B'@12(M4)&!(B5`42(M4)&A(B5`<2(E$)$!(B>_HP=___\9`"`-( -MB5@01(AX&$F)Q4B+$/Z"L`D```^VLK`)``")\4B+1"1`2"G02(/H4$C!^`-) -M#Z_$B(1*L`D``$$/MD4+B(1*L0D``$&(=0M)BU4`_H*P"0``#[:RL`D``(GQ -M2(M$)#A(*=!(@^A02,'X`TD/K\2(A$JP"0``00^V10N(A$JQ"0``08AU"T'_ -MQT0X?48/ARS____I.!H``&9FD&:0387D#X2\!P``0?9$)!@"D`^$KP<``$0/ -MMKU@#```1#B]80P```^"50$``&9FD&:01#A]1P^$-@$``$2)^`^VV$B)V$C! -MX`1,C:0$\````$R)Y^BIW?__#[>4G4`,```/M[R=0@P``+L`````0;D@```` -M0;H!````@_H?=T0/ML-)C32$1(G)*=$Y^0]'SX/Y('4-QP;_____ZQ)F9I!F -MD$2)T-/@_\B)T=/@"09$B<@IT#GX<$2(T$+TB-D'`+``"+B'`+``#WT8E,)&"+0@3WT(E$)&2+ -M0@CWT(E$)&B+0@SWT(E$)&Q(C70\<$B-E#SP````(PJ)#HM"!"-$)&2)1@2+ -M0@@C1"1HB48(BT(,(T0D;(E&#$0X?4AU,;H`````@SX`=1*#?@0`=0R#?@@` -M=0:#?@P`=`6Z`0```(72N`$```!$#T7H9F:09I!!_\=$.+UA#```#X.P_O__ -M183M#X2:!0``2(U\)&#H;=S__T&_`````(!]1@!V69!$.'U(=$E$.'U'=$-$ -MB?@/MM!(P>($2`'J2(V*\`H``(M$)&`+@O`*``")1"1@BT0D9`M!!(E$)&2+ -M1"1H"T$(B40D:(M$)&P+00R)1"1L0?_'1#A]1G>H3`^V14A)P>`$2HUT!'"+ -M?"1@(SZ)?"10BTPD9"-.!(E,)%2+5"1H(U8(B50D6(M$)&PC1@R)1"1<]]>) -M?"1@]]&)3"1D]]*)5"1H]]")1"1L(SZ)?"1@(TX$B4PD9"-6"(E4)&@C1@R) -M1"1L2(GOZ+3<___&0`@`2(E$)"BX`````(-\)&``=16#?"1D`'4.@WPD:`!U -M!X-\)&P`=`6X`0```(7`#X2F`0``#[9%2(B%"`P``$B+1"1@2(F%\`L``$B+ -M1"1H2(F%^`L``,:%"0P```%(QX4`#````````$&_`````(!]1@`/A@,"``!, -MC:7P"P``1#A]2`^$/P$``$0XO6`,``!W#T0XO6$,``!R!D0X?4=U+4B)[^@( -MW/__QD`(`42(>!!$B'@12(M4)&!(B5`42(M4)&A(B5`<2(E$)$#K4D2)^@^V -MPDC!X`1(C5P$<(M$)&`)`XM$)&0)0P2+1"1H"4,(BT0D;`E##$B)[^BQV___ -MQD`(`42(>!!$B'@12(L32(E0%$B+4PA(B5`<2(E$)$!(B>_HB=O__\9`"`-, -MB6`01(AX&$F)Q4B+$/Z"L`D```^VLK`)``")\4B+1"1`2"G02(/H4$C!^`-( -MO\W,S,S,S,S,2`^OQXB$2K`)``!!#[9%"XB$2K$)``!!B'4+1#A]1W5$2(M, -M)"A(BQ'^@K`)```/MK*P"0``B?%,B>A(*=!(@^A02,'X`T@/K\>(A$JP"0`` -M2(M<)"@/MD,+B(1*L0D``$"(J_O__Z:$```!!OP````"` -M?48`#X:1````1#B]8`P``'=[1#B]80P``')R1#A]1W1L1#A]2'1F1(GZ#[;" -M2,'@!$B-1`1PN@````"#.`!U$H-X!`!U#(-X"`!U!H-X#`!T!;H!````A=)T -M,D2)^0^VP4C!X`1(C5P$<$B)[^A>VO__QD`(`42(>!!$B'@12(L32(E0%$B+ -M4PA(B5`<0?_'1#A]1@^';____[@`````@WPD4`!U%8-\)%0`=0Z#?"18`'4' -M@WPD7`!T!;@!````A<`/A!L5``!$#[9E2$2(I2@,``!(BT0D4$B)A1`,``!( -MBT0D6$B)A1@,``#&A2D,````2,>%(`P````````/MEU'2(GOZ,;9___&0`@! -MB%@01(A@$4B+5"102(E0%$B+5"182(E0'$B)1"0X2,=$)#``````0;\````` -M@'U&``^&GA0``$R-I1`,``!)OLW,S,S,S,S,1#A]2`^$80$``$0X?4`$2(U_HD-?__\9`"`%$B'@01(AX$4B+$TB)4!1(BU,( -M2(E0'&9FD&:00?_'1#B]80P```^#>/___^EN$@``@'U(!P^&TPD``$B-?"1@ -MZ"?6___&1"0G`$&_`````(!]1@`/AJ$```!FD$0X?4`$2`'H2(V0\`H``+D`````@[CP"@```'46@WH$`'40@WH(`'4*@WH,`&9F -M9I!T!;D!````AI(C8KP"@``BT0D8`N"\`H``(E$ -M)&"+1"1D"T$$B40D9(M$)&@+00B)1"1HBT0D;`M!#(E$)&S^1"0G0?_'1#A] -M1@^'8?___P^V5"0G#[9%1H/H`]'X.<(/CE0%```/MEU'B)T(#```2(M$)&!( -MB87P"P``2(M$)&A(B87X"P``QH4)#````4C'A0`,````````2(GOZ#_6___& -M0`@"B%@0B%@12(M4)&!(B5`42(M4)&A(B5`<28G$2(GOZ!C6___&0`@&2(E$ -M)"A)BQ0D_H*P"0``#[:RL`D``(GQ2(M$)"A(*=!(@^A02,'X`TF^S!!$B'@12(L3 -M2(E0%$B+4PA(B5`<28M5`/Z"L`D```^VLK`)``")\4@IT$B#Z%!(P?@#20^O -MQHB$2K`)``!!#[9%"XB$2K$)``!!B'4+1(GY#[;!2,'@!$B-A"CP"@``N@`` -M``"#.`!U$H-X!`!U#(-X"`!U!H-X#`!T!;H!````A=)FD'1Z1(GX#[;82(G8 -M2,'@!$B-G"CP"@``2(GOZ.'3___&0`@"1(AX$$2(>!%(BQ-(B5`42(M3"$B) -M4!Q)B<1(BQ#^@K`)```/MK*P"0``B?%(BT0D*$@IT$B#Z%!(P?@#20^OQHB$ -M2K`)``!!#[9$)`N(A$JQ"0``08AT)`M!_\=$.'U&#X8$2(T$+DB-B'`+``"+D'`+``#WTHE4)%"+003WT(E$)%2+00CW -MT(E$)%B+00SWT(E$)%Q(C5PT<"-4)&")$XM$)&0C1"14B4,$BT0D:"-$)%B) -M0PB+1"1L(T0D7(E##$B)[^C2TO__QD`(`TB+?"082(EX$$2(>!A)B<5(BT0D -M*$B+$/Z"L`D```^VLK`)``")\4R)Z$@IT$B#Z%!(P?@#20^OQHB$2K`)``!( -MBWPD*`^V1PN(A$JQ"0``0(AW"[@`````@SL`=1*#>P0`=0R#>P@`=0:#>PP` -M=`6X`0```(7`=&M$B?H/ML)(P>`$2(U_H/M+__\9`"`%$B'@01(AX -M$4B+$TB)4!1(BU,(2(E0'$F+50#^@K`)```/MK*P"0``B?%(*=!(@^A02,'X -M`TD/K\:(A$JP"0``00^V10N(A$JQ"0``08AU"T2)^0^VP4C!X`1(C80H\`H` -M`+H`````@S@`=1*#>`0`=0R#>`@`=0:#>`P`=`6Z`0```(72='I$B?@/MMA( -MB=A(P>`$2(V<*/`*``!(B>_HEM'__\9`"`)$B'@01(AX$4B+$TB)4!1(BU,( -M2(E0'$F)Q$B+$/Z"L`D```^VLK`)``")\4B+1"0H2"G02(/H4$C!^`-)#Z_& -MB(1*L`D``$$/MD0D"XB$2K$)``!!B'0D"T'_QT0X?48/A^#]___I.@P```^V -M74=(B>_H&]'__\9`"`&(6!"(6!%(BU0D8$B)4!1(BU0D:$B)4!Q(B40D.`^V -M74=(B>_H[M#__\9`"`*(6!"(6!%(BU0D8$B)4!1(BU0D:$B)4!Q)B<1(B>_H -MQ]#__\9`"`9(B40D*$F+#"3^@;`)```/MKFP"0``B?Y(BT0D*$@IR$B#Z%!( -MP?@#2+K-S,S,S,S,S$@/K\*(A'&P"0``00^V1"0+B(1QL0D``$&(?"0+0;\` -M````@'U&``^&=PL``&9F9I!$.'U'#X3&`@``1(GZ#[;"2,'@!$@!Z$B-D/`* -M``"Y`````(.X\`H```!U%H-Z!`!U$(-Z"`!U"H-Z#`!F9F:0=`6Y`0```(7) -M#X2!`@``_DPD)P^V3"0G`DU&08G.1(G[1`^VXTG!Y`1)`>Q)C;PD\`H``$B) -M?"002(GOZ-_/___&0`@!1(AX$$2((A$JP"0``00^V10N(A$JQ"0``08AU"TF+50#^ -M@K`)```/MK*P"0``B?%(BT0D0$@IT$B#Z%!(P?@#2`^OQXB$2K`)``!!#[9% -M"XB$2K$)``!!B'4+2(M$)"A(BQ#^@K`)```/MK*P"0``B?%,B>A(*=!(@^A0 -M2,'X`T@/K\>(A$JP"0``2(M<)"@/MD,+B(1*L0D``$"(!!$B'@128N4)/`*``!(B5`42(M,)!!(BU$(2(E0'$F)Q$B+ -M$/Z"L`D```^VLK`)``")\4B+1"0H2"G02(/H4$C!^`-(#Z_#B(1*L`D``$$/ -MMD0D"XB$2K$)``!!B'0D"Y!!_\=$.'U&#X`$2`'H2(V0\`H` -M`+D`````@[CP"@```'48@WH$`'42@WH(`'4,@WH,`'0+9F:09F:0N0$```"% -MR70\1(GX#[;82,'C!$@!ZTR-H_`*``!(B>_H^\S__\9`"`)$B'@01(AX$4B+ -MD_`*``!(B5`428M4)`A(B5`<0?_'1#A]1@^';O___^G`$2`'H2(V0\`H``+D`````@[CP"@```'44@WH$`'4.@WH(`'4( -M@WH,`&:0=`6Y`0```(7)#X3!````1(GY#[;!2,'@!$R-)"A)C9PD\`H``(M$ -M)&!!"X0D\`H``(E$)&"+1"1D"T,$B40D9(M$)&@+0PB)1"1HBT0D;`M##(E$ -M)&Q$.'U(='1(B>_H_,O__\9`"`)$B'@01(AX$4F+E"3P"@``2(E0%$B+4PA( -MB5`<28G$2(L(_H&P"0``#[:YL`D``(G^2(M$)"A(*#?"1L`'0%N`$```"%P)`/A`\"```/MD5'B(4(#```2(M$)&!( -MB87P"P``2(M$)&A(B87X"P``QH4)#````4C'A0`,````````0;\`````@'U& -M``^&RP$``$R-M?`+``!)O,W,S,S,S,S,9F:09I!$.'U(=5I(B>_H\LG__\9` -M"`-,B7`01(AX&$B+7"0H2(L3_H*P"0``#[:RL`D``(GQ2"G02(/H4$C!^`-) -M#Z_$B(1*L`D```^V0PN(A$JQ"0``0(AS"^E-`0``9F:09I!$.'U'#X0^`0`` -M1(GZ#[;"2,'@!$B-7`1P2`'H2(VX<`L``(NP<`L``/?6B3.+3P3WT8E+!(M7 -M"/?2B5,(BT<,]]")0PPC="1@B3,C3"1DB4L$(U0D:(E3""-$)&R)0PQ(B>_H -M.,G__\9`"`-,B7`01(AX&$F)Q4B+3"0H2(L1_H*P"0``#[:RL`D``(GQ2"G0 -M2(/H4$C!^`-)#Z_$B(1*L`D``$B+?"0H#[9'"XB$2K$)``!`B'<+N`````"# +M?T5,1@(!`0D```````````$`/@`!`````````````````````````"CA```` +M`````````$```````$``#@`+`$B![$@"``!(B9PD&`(``$B)K"0@`@``3(FD +M)"@"``!,B:PD,`(``$R)M"0X`@``3(F\)$`"``!(B?M,BV\02(UOB$R-9"00 +MN`(```"`?P$`=0N`?P(!&<"#X`+_P(A%`$C'10@`````@$T!!$B+0Q!(B440 +MBU,82(E5&$@/MD4`2(L$Q0````!(B45H@'T``W4N2(U"]DB)11B+&Z(````$B)W^@`````08$\)/,6>%IT(&9FD&9FD$@/MD4`2(L$Q0````!( +MB45P@$T!!.E:!0``OI````!,B>?H`````(3`==5!]D0D"0)T'<9#"`%!#[9$ +M)`J(0PLZ0PES"P^V\$B)W^@`````O@`"``!,B>?H`````(3`=!=)C;PDD``` +M`+IP`0``O@````#H`````$$/MI0DDP```+X!````(=8/MD,$@^#\B=�() +M\`G(O@0````AUH/@\XG1@^$("?`)R+X0````(=:#X,^)T8/A(`GP""`>!`( +M#X=7_O__2`^V0!!(@SS&``^$1_[____".=%_UD6+?"0808N$))@```!(P>`@ +M20G'N@````!(8\)(:`@2`G028E&&$$/MD0D(T&(1GH/MLBX`0```-/@ +M9D&)AI````!)#[8&2(L$Q0````!)B49H2`^V`TB+!,4`````28E&<`^V1"0/ +M08A&`T@/MD0D#TR)M,.@````_D-Y28UT)"Q)C;[@````NA````#H`````$F- +M="0\28V^\````+H$````Z`````!)C;0D@````$F-OC0!``"Z$````.@````` +M28UT)$!)C;[T````ND````#H`````$'V1"0)`70%08!.`0%)#[9$)"))@[S& +MH`````!U4R)=0A)#[8&2(L$Q0````!( +MB45P33F^F````'9!38F^F````.LX2`^V1"0/2(.\PZ``````=2=(B:S#H``` +M`$B)70C^0WD/MD0D#XA%`T@/M@-(BP3%`````$B)17!(BYPD&`(``$B+K"0@ +M`@``3(ND)"@"``!,BZPD,`(``$R+M"0X`@``3(N\)$`"``!(@<1(`@``PV9F +M9I!54TB#[`A(B?.]``````^V1GB)PH/X``^.TP```&9FD$ACQ4B#O,.@```` +M`'0+_\4YZG_LZ;<```"X`0```(GIT^!F"8.4````2(G>Z`````!(B<)(A<`/ +MA),```#&``-`B&@#2(E8"(`["`^4P,'@`P^V2@&#X?<)P8A*`4B+!0````!( +MB4)H2`^V`TB+!,4`````2(E"UT(8!] +M``-V&TB)[DR)[^@`````]H62````!'0'@(N2````!$'_Q`^V0WA$.>!_P^DO +M`0``@$X!!(!^>0)U$X"FD@```/[I&0$``&9F9I!F9I"`II(```#]2(.^H``` +M``!U'4B+AJ@```#&0`,`2(F&H````$C'AJ@`````````2(N#H````(`X`W4+ +M2(G>3(GOZ`````"`BY(````$2,>#F`````````#IM@```&9F9I`/MD9Y.D9X +M=2F`3@$$#[:&D@```(/@_HB&D@```&:#OI0`````='F#R`*(AI(```#K;@^V +M1GG_P`^V5G@YT'5@9H.^E`````!T++D`````#[>&E````(G"J`%U"O_!B=#3 +M^*@!=/9(8\%(@[S#H`````!U(>L)]H:2`````G46@$L!!("+D@````1(B=Y, +MB>_H`````$C'@Y@`````````2`^W@Y````!(]]A((8.8````2(-["`!U&?:# +MD@````1T$.@`````B4-\2(G?Z`````!(BUPD"$B+;"003(MD)!A,BVPD($B# +MQ"C#9F:09I!!5%5328G\O0````!F9F:02&/%2&G`2`$``$J-G"#(1```@WM\ +M`'0@2(-["`!U&4B)WDR)Y^@`````]D,!!'0(2,=#<`````#_Q8/]#W[!6UU! +M7,-F9F:09F9FD&9F9I!!5T%6055!5%532('L"`(``$F)_4B)]4&)UDF)YTB) +M]^@`````@'T`"'4+2(GN3(GOZ`````!!O`````"`?7@`#X;'````26/$2(.\ +MQ:``````#X2H````2(NTQ:````"`/@-V$4$/MM9,B>_H`````.F*````26/$ +M2(N$R)^;HP```` +MO@````#H`````.L3#[95`8/B`0^V0P&#X/X)T(A#`4B)W^@`````9F:09F:0 +M0?_$1#AE>`^'.?___[I(`0``O@````!(B>_H`````$F+A$) +M00^V=E!F9F:09F:03(M%`+\```$`9H-]"`!T!`^W?0@Y^8GZ#T;11#GF=1%F +MB5,(9L=#"@``3(D#2(/#$"G7B=!)`<`IT74>_\9!#[9%>#G&N``````/1/!! +M#[>%D````(G!P>$)A?]UMF:!?0H`@'0&2(/%$.N49L=#^@"`N`$```!(@<0` +M`@``6UU!7$%=05[#9F:09F:09F:03(M/"$R+1D@/MD\##[=^6#A.4'4+2`^W +M1E9)`<#K$9`X3E!V"TD/MX&0````20'`.$Y0=0MF`WY49F9FD&9FD#A.474+ +M9@-^4F9F9I!F9I"`?EP`=`XX3E!S)3A.46:0=Q3K'#A.4',(9D$#N9`````X +M3E%V"F9!`[F0````9I!FB7H03(E"",-F9F:09F:04TF)^4F)\$B+?@A$#[=6 +M$$&[`````$$/MDEZ2(G^2-/N9D''0%@``$'&0%P!20^V47A(B?!(B=&Z```` +M`$CW\4$/MDEZ2-/@28E`2$D/ME%X2(GP2(G1N@````!(]_%!B%!0B=%!#[>! +MD````/_((?AF08E`5D$/MY&0````9BG"9D0YTG(-9D6)4%1!N@````#K8F9! +MB5!49D$ITD&[`0```+H!````B=#3X&9!"4!:_\%!.$EX=2FY`````$&`>%P` +M=`M!QD!<`.L69F9FD$$/MT!89D$#@9````!F08E`6&9%.9&0````0$B+!@^V2`.X_O___]/`9B%#6H!^(0%T!P^V1B&( +M0R%(B>_H`````&:#>UH`=1F`>R$`=03&0R$!2(MS.$B)VDB)[^@`````2(/$ +M"%M=PV9FD&:02(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F) +M_TB)]4R+-D'V1@$$=17&1B$"2(MV.$B)ZN@`````ZY,B>?H#OW__TC'0S@`````2,=#,`````!(B=Y,B?]!_U0D:&9FD$'_Q4$/ +MMD9X1#GH#X]P____2(M<)`A(BVPD$$R+9"083(ML)"!,BW0D*$R+?"0P2(/$ +M.,-F9F:09F9FD&9F9I!(@^P(2(M."`^V40&`9@'[@&$!^_Y)>8")D@````%( +M@WEP``^5P/;"!`^5P@^VP(7"=`U(B<[_47!F9F:09F:02(/$",-F9F:09F9F +MD&9FD$B#[`A,BT9`28MP*$B%]G0-9D$/MD`@@^`!.#``=!!,B<9! +M_U`PN@$```"%P'4PN@````#K*69F9I!(BP9(B0)(BT8(2(E""$B#PA!(C48* +M2(/&$&:#.`!YX+H!````B=!(@\0(PV9F9I!54TB)^P^V!X/H!(/X`7=0O0`` +M``"`?W@`=#=F9I!FD$ACQ4B#O,.@`````'012(N\PZ````#HQ?___X7`=0>X +M`````.LD_\4/MD-X.>AFD'_.N`$```#K$69F9I!F9I`/MD"@`=#/V0"`!="U(BT@H2(L!2(D"2(M!"$B)0@A(@\(02(U! +M"DB#P1!F@S@`>>#K'F9F9I!F9I"^`````$B#>#``=!!(B<:0_U`PB<;K!;X! +M````B?!(@\0(PV9F9I!F9I!F9I!F9I!(@^P82(D<)$B);"0(3(ED)!!)B?Q( +MB?-(BVY`2(L&#[9(`[C^____T\!F(45:@'XA`70'#[9&(8A%(4B)WDR)Y^@` +M````9H-]6@!U6H!](0!U),9%(0%(BTT`2(N1F````$@[4PAU#T@/MT,02`'0 +M2(F!F````$B+=3A(B>I,B>?H`````$B+10!FQT`H``!(BU4`2(/",$C'Q@`` +M``!,B>?H`````$B+'"1(BVPD"$R+9"002(/$&,-F9I!F9I!(@^P82(D<)$B) +M;"0(3(ED)!!)B?Q(B?-(BVY`@'XA`70.#[9&(8A%(>MY9F:09I"`?A(@=4K& +M1B$`2(M%`$B+@*@```!(B09(C7Y(NE@```"^`````.@`````QD,B`,9#$C`/ +MMD,@@^#]@\@$B$,@2(L#2(G>3(GG_U!HZV%FD,9%(0%(BTT`2(N1F````$@[ +M5@AU#T@/MT802`'02(F!F````$B)WDR)Y^@`````2(MU.$B)ZDR)Y^@````` +M2(M%`&;'0"@``$B+50!(@\(P2,?&`````$R)Y^@`````2(L<)$B+;"0(3(MD +M)!!(@\08PV9F9I!F9F:09F:09F:005154TF)]$B)U4B+1D"%R71&2(M0&$B) +M50`/MT80P>`)9HE%"&;'10H`@$B+!H!X`P`/A`T!``!(C8(```$`9H-]"`!T +M"4@/MT4(2(T$`DB)10#I[0````^W7A#!XPE(@W@H`'0L]D`@`70F2(M(*$B+ +M`4B)`DB+00A(B4((2(/"$$B-00I(@\$09H,X`'G@ZS2Z`````$B#>#``#X2H +M````2(GJ2(G&_U`PN@````"%P`^$D@```.L,9HE9"&;'00H`@.M&2(GI9F9F +MD&9FD+H```$`9H-Y"`!T!`^W40A)BP0D@'@#`'06.=IV%HG82`$!B=!F*=AF +MB4$(ZPYFD#G:<[9(@\$0*=-UQ$F+!"2`>`,`#Y7`2#G-#Y7"#[;`A<)T(4B+ +M`4B)10!(BT$(2(E%"$B#Q1!(C4$*2(/!$&:#.`!YW[H!````B=!;74%3(GG_U!HZW\/MU80P>()B=9( +MBWT82`'^Z`````"%P'0'QD4A#.LED,9%(0%(BTT`2(N1F````$@[4PAU#T@/ +MMT,02`'02(F!F````$B)WDR)Y^@`````2(MU.$B)ZDR)Y^@`````2(M%`&;' +M0"@``$B+50!(@\(P2,?&`````$R)Y^@`````2(L<)$B+;"0(3(MD)!!(@\08 +MPV9F9I!F9F:09F:09F:02(/L*$B)7"0(2(EL)!!,B60D&$R);"0@28G\2(GS +M2(LN2,=%.`````#VA9(````!#X5J`0``#[9&$H/X`@^$`P$``(/X`G\.@_@! +M#X2?````Z4H!``"#^`-F9F:09F:0#X4Z`0``2(M&"$B)12`/MT809HE%*`^W +M5A#!X@E(BWX8O@````#H`````&;'0UH#`$&]`````$R)Y^@`````2(G&QD`2 +M,$B+0PA(B48(#[=#$&:)1A"`3B`$2(E>0$C'1C@`````2,=&,`````!)8\5( +MBX3%H````$B)!DR)Y_]0:$'_Q4&#_0%^K.G#````2(M&"$B)12`/MT809HE% +M*.@`````2(G&QD`2($B+0PA(B48(#[=#$&:)1A"`3B`"2(E>0$C'1C@````` +M2,=&,`````!(BX6@````2(D&3(GG_U!HZVU(BT8(2(E%(`^W1A!FB44HZ``` +M``!(B<;&0!(@2(M#"$B)1@@/MT,09HE&$(!.(`)(B5Y`2,=&.`````!(QT8P +M`````$B+A:````!(B09,B>?_4&CK%V9F9I#&0R$&2(MS.$B)VDR)Y^@````` +M2(U5,$C'Q@````!,B>?H`````$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,.0 +M2(/L.$B)7"0(2(EL)!!,B60D&$R);"0@3(ET)"A,B7PD,$F)_TF)]$B++O9% +M`01U%<9&(0)(BW8X3(GBZ`````#IV@$``/9&("!T)$C'13@`````2(EU0&:# +M?2H`#X6]`0``Z+C]___ILP$``&9FD$B#?3@`=2EF@WTH`&9F9I!T/D@/MT4H +M2`-%($@[1@AV+T@/MT802`-&"$@Y12!S($G'1"10`````$B-?3!,B>;H```` +M`.EF`0``9F:09F:09O]%*O:%D@````,/A9\```!!]D0D(`(/A),```!(BY6@ +M````2(NUJ````(`Z`W5D@#X#=5])BT0D"(G!*XJ8````08G`1"N&F````(NZ +MG````(NVG````(G(F3'1*=%$B<"903'002G01#G!?1.%]@^41"0'@_\%#Y?` +M($0D!^LTA?\/E40D!X/^!0^6P`A$)`?K(8"]E@`````/E$0D!P^V3"0'B(V6 +M````ZPAF9I#&1"0'`&9!QT0D6@``0;X`````1(GP1`^VZ$J#O.V@`````'1[ +M2HN$[:````#V0`$$=&U!#[94)"#`Z@)$.'0D!P^4P`G0J`%T5DR)_^@````` +M2(G#ND@```!,B>9(B3(G__U!H9F:00?_&08#^`0^&9O__ +M_V9FD$B+7"0(2(ML)!!,BV0D&$R+;"0@3(MT)"A,BWPD,$B#Q#C#9F9FD&9F +MD&9FD&9FD%532(/L"$B)]4B+7@@/ME8#@&8!^X"+D@````%(QX.8```````` +M`/Y+>8![>0!U!H!C`?OK'`^V@Y(```"H`G01@^#7B(.2````A=)U!(!C`?OV +M0P$$=1U(@WMP``^$+`$``$B)WO]3<&9F9I!F9I#I&@$``(72=21(BY.@```` +MQD(#`4B+@Z@```#&0`,`2(F#H````$B)DZ@```!(@WL(`'0.2(M#"/9``00/ +MA(,```!(BX.@````@#@#=7=(B=[H`````$B)PDB%P'1GQ@`#QD`#`4B)6`A( +MBP4`````2(E":$B+!0````!(B4)P]D,!$'0.@$H!$(N"D````$B)0AA(QT4( +M`````$B)DZ@````/MH.2````@^#^@\@*B(.2````_D-Y2(G6OP<```#H```` +M`$B#>P@`=`]F9F:02(M;"$B#>P@`=?6+@X@```")@XP```"+@X0```")@X@` +M``"+@X````")@X0```"+0WR)@X````#H`````(E#?,:#EP````%(B=_H```` +M`$B#Q`A;7<-F9F:09F:09F:02('L*`(``$B)G"0``@``2(FL)`@"``!,B:0D +M$`(``$R)K"08`@``3(FT)"`"``!)B=1,BS9(BVY`2(M=*$&]$0```$B)XDB% +MVW0,9@^V12"#X`$YR'4I2(G32(-],`!T#TB)[O]5,(7`=15F9I!FD+@````` +MZ>4```!F9I!F9I"`?5'_#X2^````#[=-5,'A";H```$`9H-["`!T!`^W4P@Y +MT78[00^V1@,Z15!U%$B+`TF)!"1(BT,(28E$)`A)@\00*=%(@\,0N@```0!F +M@WL(`'0$#[=3"$'_S3G1=\5!#[9&`SI%4'4<2(L#28D$)&9!B4PD"&9!QT0D +M"@"`N`$```#K63G1)R$@#`TF)!"2)T&8IR&9!B40D"&:!>PH`@'4/9D'' +M1"0*`("X`0```.LJ9D''1"0*``!)@\002(/#$$'_S42)ZDC!X@1(B=Y,B>?H +M`````+@!````2(N<)``"``!(BZPD"`(``$R+I"00`@``3(NL)!@"``!,B[0D +M(`(``$B!Q"@"``##D`^V1P,Z1E!U%P^W1E1FB4(02(M&2$B)0@C#9F:09F:0 +M#[=&4F:)0A!(QT((`````,-F9F:09F9FD&9F9I!F9I!,BT8(1`^W3A!!NP`` +M``"Y`````(!_>``/A(,```!%#[?1B_H`````$B#Q`A;7<-F9I!FD$B#[#A(B5PD"$B) +M;"003(ED)!A,B6PD($R)="0H3(E\)#!)B?](B?5,BS9!]D8!!'45QD8A`DB+ +M=CA(B>KH`````.G*````3(GWZ*'^__]F@WU:`'4:QD4A`DB+=3A(B>I,B?_H +M`````.FC````9I!!O0````!!@'YX``^$D`````^W15I$B>G3^*@!='),B?_H +M`````$B)PTECQ4V+I,:@````3(DC2(EK0`^V52"#X@(/MD,@@^#]"="(0R`/ +MME4@@^($@^#["="(0R`/MD42B$,22(G:2(GN3(GGZ,[]__](QT,X`````$C' +M0S``````2(G>3(G_0?]4)&AF9I!!_\5!#[9&>$0YZ`^/8"(D@````%(@WAP`'0&2(G&_U!P2(/$",-F9F:02&/. +M2(N4SX!9``!(A=)T"TB+`DB)A,^`60``2(G0PY!(8])(BX37@%D``$B)!DB) +MM->`60``PV9FD&9FD&9FD$%7059!54%455-(@^P(28G_O0"```"!_@!```!W +M:&:]`$"!_@`@``!W7&:]`""!_@`0``!W4&:]`!"!_@`(``!W1&:]``B!_@`$ +M``!W.&:]``2!_@`"``!W+&:]``*!_@`!``!W(&:]``&!_H````!W%&:]@`"# +M_D!W"X/^(1GM@^7@@\5`B=`/K\5$C;#_#P``0<'N#,=$)`0`````N`````"! +M_0`0```/A]L```!!_\Y!@_[_#X3*````0;T`$```3(G_Z`````!(BA(`<-!_\1$B>BZ`````/?U1#G@#X=W____0?_.08/^_P^%//__ +M_XM$)`1(@\0(6UU!7$%=05Y!7\-F9F:09F:055-(B?V)\[@`````.;?860`` +M2&/#2(M\Q0BZ`!```+X`````Z`````#_RX/[_W7B2(/$ +M"%M=PV9FD&9FD&9FD(L/_\F#^?]T+DACP4B+1,<(N@````!(@S@`=`:X```` +M`,/_PDB#P`B!^O\!``!VYO_)@_G_==*X`0```,-F9I!(@^P(NA````"^```` +M`.@`````2(/$",-F9F:09F9FD$B#?A@`=`Q(BU882(M&$$B)0A!(BU802(M& +M&$B)`DC'1A``````N@````#HL/S___/#9F9FD&9F9I!F9I!F9I!(C4]@2(M' +M8$B)1AA(A6^`````.C[^___2(G#3(D@2(EH +M"$B)QDR)[^AF____2(G82(L<)$B+;"0(3(MD)!!,BVPD&$B#Q"##9F9FD&9F +M9I!F9I`/MD=-#[;02(T4DDB-5-=0_\"(1TU(B3K&0@D`QD(*`,9""P!(B=## +M9F9FD&9F9I!!5%5328G\2(GSO0`````/ME9*C4+]T?@!PH/Z`'XED$ACQ4B+ +MM,.@"@``3(GGZ*W]____Q0^V4TJ-0OW1^`'".>I_W+H'````2(G>3(GGZ%S[ +M__];74%2Z!P```$B)[DR)[^AO^?__ +MN`````#K,DECQ$C!X`1(C1PH2(V[\`H``.A1_/__2(V[<`L``.A%_/__0?_$ +M13GF#X]Y____2(GH2(/$&%M=05Q!74%>05_#9F9FD&9FD$%455-(B?5(B=.) +MS@^V37J)T-/H)?\!``!(BU583(TDPDV+!"1-A$B)VNAH +M_?__28G`2(7`=%!(B6@X28L$)$F)0"A(A$&(<$H/MDUZ2(G82-/H2`^V57A(B=&Z`````$CW\4`HUO_.08AP +M2TR)P%M=05S#9F9FD&9F9I!!5T%6055!5%532('L:`$``$B)?"1(2(ET)$!( +MB50D.`^V5B")T-#H@_`!B<�&)3"0T2(-^*`!T!?;"`70<3(U\)%"Y`0`` +M`$R)^DB+="1`2(M\)$C_5C#K"4B+7"1`3(M[*,=$)`P```$`9D&#?P@`=`E! +M#[='"(E$)`Q!O0````#'1"0P`````$B+5"1`@+J```````^$=P$``$AC1"0P +M2(M,)$!(BT3!6$B)1"0@#[:88`P``(A<)"\XF&$,```/@C(!```/MD0D+TB+ +M5"0@.$)+#X0%`0``#[;`2(G1#[>4@D`,```/MX2!0@P``&:)1"00B=!FP>@# +M#[?`B40D"$&)UD&#Y@=!#[?&B<;!Y@FX"````&9$*?!!B<9F1#MT)!"+7"00 +M1`]'\T$/M\:)Q<'E"4@/MD0D+TB+5"0@2(N,PJ`*``"+5"0(B?!)B<1,`V31 +M"$0[;"0,=2-)@\<0QT0D#````0!F08-_"`!T"4$/MT\(B4PD#$&]`````(M< +M)`Q$*>LYZP]'W8-\)#0`=!)$B>Y)`S>)VDR)Y^@`````ZQ!$B>])`S^)VDR) +MYN@`````00'=*=UT!XG820'$ZY-F1"ET)!!T%/]$)`B^`````$&^"````.D_ +M_____D0D+P^V7"0O2(M$)"`XF&$,```/@\[^____1"0P2(M4)$`/MH*````` +M.T0D,`^/B?[__[H`````2(MT)$!(BWPD2/]4)#A(@<1H`0``6UU!7$%=05Y! +M7\-F9I!F9I!54TB#[`A(B?V%TG0$QD8A"T&[`````("^@``````/A,$```!( +MC9U@60``2(V]4%D``$ECPTR+1,982<>`,`P```````!-B<*Y`````$&`>$H` +M=D8/ML%(P>`$3`'02(V0\`H``$&Y`````(.X\`H```!U$H-Z!`!U#(-Z"`!U +M!H-Z#`!T!D&Y`0```$6%R9!U)?_!03A*2G>ZN`````"%P'0=2(M#"$R)0PA) +MB1A)B4`(3(D`ZQNX`0```.OA9I!(BT<(3(E'"$F).$F)0`A,B0!!_\,/MH:` +M````1#G8#X]-____2(GOZ%,X``!(@\0(6UW#9F9FD&9F9I!F9F:02(/L2$B) +M7"082(EL)"!,B60D*$R);"0P3(ET)#A,B7PD0$F)_4B)\TB+KC`,``#_C]Q9 +M``!(C4802(M("$B+5A!(B4H(2(D12(E&$$B)0`A(A>T/A*<"``#V12`@#X0M +M`0``3(ME`$@/MT9(28G&3`-V0$0/MWY(2,>&,`P```````!(C8=060``2(M0 +M"$B)<`A(B09(B58(2(DR@+YB#````758@'T2`G5)2`^V1DM(B[S&H`H``.@3 +M]___A$))````#WV$B82"-#0$DYA"28 +M````=@A)B80DF````("[8@P```%T&@^V@V(,``"(12%(B>Y,B>_H+C<``.F) +M`P``20^WA"20````2(M5"$C_PD@/K\),.?!V+4$/M\],B?),B>9,B>_HKOK_ +M_TB)J#`,``!(B4582(G&3(GOZ$@0``#I0P,``$D/MX0DD````$D#A"28```` +M3#GP=0A-B;0DF````$B)[DR)[^BZ-@``Z14#``!F9I!FD`^VA8$```#_P(B% +M@0```#J%@`````^%E0(``/9%(`0/A-P```!!O@````"`O8``````#X:Y```` +M2(V'4%D``$B)1"002(V78%D``$B)5"0(1(GR#[;"2(MY,B>_HM#4``.FO`0``0;X`````@+V``````'8J1(GR#[;"2(M< +MQ5B`NV(,```!=`H/MH-B#```B$4A0?_&1#BU@````'?6@'TA`'472,?"```` +M`$B)[DR)[^C>^?__Z5D!``"Z`````$B)[DR)[^@)_/__Z40!``!F9F:0@+YB +M#````0^%@P```$F)]+T`````@'Y*`'8D9F:09I")Z`^V^$C!YP1*C;PG\`H` +M`.C:]/___\5!.&PD2G?A2(.[.`P```!T*4B+@S@,``!(B8,P#```2,>#.`P` +M``````!(B=Y,B>_H,PX``.G.````28V%4%D``$B+4`A(B5@(2(D#2(E3"$B) +M&NM:9F:02(V'8%D``$B+4`A(B7`(2(D&2(E6"$B),DB#OC@,````=#1(BX8X +M#```#[:68@P``(A0(4B+EC@,``!(Q\8`````Z`````!(QX,X#````````.FY +M````2(MS,$R)[^@]]/__2,=#,`````!(BT,X2(-X,`!T%4B-4#!(Q\8````` +M3(GOZ`````#K)4F#O>A9````=!M)C97H60``2,?&`````$R)[^@`````9F:0 +M9I!!@[W@60```'16@+MB#````75-2(M[.$B#?T@`=##H#3(``(7`=2=(BT,X +M2(M04$B+<$A,B>_H`````$B+0SA(QT!(`````$'_C>!9``!!@[W@60```'0( +M3(GOZ`````!(BUPD&$B+;"0@3(MD)"A,BVPD,$R+="0X3(M\)$!(@\1(PV9F +M9I!F9I!F9I!F9I!(@^P(2(L6@'I.`'03QD).`$C'Q@````#H`````&9FD$B# +MQ`C#9F9FD&9F9I!F9I!!5T%6055!5%532(/L"$F)U$&)STB+1D!(BQ!(#[9` +M$4R+M,*@"@``BT8(*T)`P>`)#[=N$,'E"8G!@>'_#P``08G%0<'M#+L`$``` +M*05_#9F9FD&9F9I!F9I`/MD<2`D<3B$<22(U7%+X!```` +MZP^`?Q(`>0:X`````,/^1Q(/MD\2@_D?=Q.)\-/@A4<4#Y7`#[;`ZU1F9F:0 +M@_D_=Q*#Z2")\-/@A4($#Y7`#[;`ZSF#^5]W%(/I0(GPT^"%0@@/E<`/ML#K +M(F:0N`````"#^7]W%H/I8(GPT^"%0@P/E<`/ML!F9I!F9I"%P'2!QD<3`4R- +M1Q0/ME<2O@$```#K`_Y'$P^V1Q.-#`*#^1]W#XGPT^"%1Q0/E<`/ML#K3H/Y +M/W<6@^D@B?#3X$&%0`0/E<`/ML#K-F9FD(/Y7W<3@^E`B?#3X$&%0`@/E<`/ +MML#K&[@`````@_E_=Q&#Z6")\-/@085`#`^5P`^VP(7`=9"P`<-F9I!F9I!( +M@^P82(D<)$B);"0(3(ED)!!(B?U(BUY`3(LC#[9&(8A#"N@`````@'L*`75R +M2(G?Z*K^__^%P'06QD,*`$B)WDB)[^C'````ZV1F9I!FD(!["`%U2@^V0Q!! +M.$0D2Y!T/CA#$74Y#[;P2(GP2,'@!$J-M"!P"P``2(U+%(L&"T,4B0:+1@0+ +M002)1@2+1@@+00B)1@B+1@P+00R)1@R0QD,)`DB)WDB)[^A!_?__2(L<)$B+ +M;"0(3(MD)!!(@\08PV9F9I!F9F:09F:09F:02(/L&$B)7"0(3(ED)!!)B?Q( +MB?/&1A,`QD82`$B)]^CL_?__2(G>3(GGZ!$```!(BUPD"$R+9"002(/$&,-F +MD$B#["A(B5PD"$B);"003(ED)!A,B6PD($F)_4B)\TB++DB+53A(#[9&$$R+ +MI,*@````Z`````!(B<9,B2"`>P@!=0V`2"`"QD`2(.L+9F:0@$@@!,9`$C!( +M#[9#$D@#14!(B48(9@^V0Q-FB4802,=&,`````!(B5Y`2,=&.`````!,B>]! +M_U0D:$B+7"0(2(ML)!!,BV0D&$R+;"0@2(/$*,-F9F:09F:09F:09F:00515 +M4T&Y`````$&[`````$B)_4&\`0```.L808/[?W8/1(G(Z5X!``!F9F:09F:0 +M0?_#1(G:08/['W<21(G@1(G9T^"%!P^5P`^VP.M208/[/W<3C4K@1(GCT^.% +M700/E<`/ML#K.4&#^U]W$XU*P$2)X-/@A44(#Y7`#[;`ZR"X`````$&#^W]W +M%8U*H$2)X]/CA5T,#Y7`#[;`9F9FD(7`#X1S____0;@!````2(GZ0;H!```` +MZPIF9F:09F:00?_`0XT,`X/Y'W<41(G0T^"%`@^5P`^VP.M59F:09I"#^3]W +M$X/I($2)T-/@A4($#Y7`#[;`ZSB#^5]W$X/I0$2)T]/CA5H(#Y7`#[;`ZR"X +M`````(/Y?W<6@^E@1(G0T^"%0@P/E<`/ML!F9I!FD(7`=8Q$B=E%`<-!N@@` +M``!$BQD`#X3A````2(-[$`!U"4B)@`````_\-$.?-\A.E_````2(UT)"!(B=_H,OW__T&)QD@/ +MMD,83(NDQ:`*``!)#[9%&$R+O,6@"@``NP````!$.?-]2TACTP^V1)0AB<'! +MX0D/MD24(D&)P$'!X`E(#[9$E"")SDB)]TD#?,0(2(E\)!!)`W3'"$B)="08 +M1(G"Z`````#_PT0Y\WRY9F9FD+H`````3(GN2(M\)`CHC@(``$B+G"0H`0`` +M2(NL)#`!``!,BZ0D.`$``$R+K"1``0``3(NT)$@!``!,B[PD4`$``$B!Q%@! +M``##9F:09F:02('L2`$``$B)G"08`0``2(FL)"`!``!,B:0D*`$``$R)K"0P +M`0``3(FT)#@!``!,B;PD0`$``$F)_TB)]4B+'DB-="002(U]$.@B_/__08G$ +M2`^V12!,B[3#H`H``$@/MD4A3(NLPZ`*``"[`````$0YXWT]2&/##[9TA!'! +MY@D/ME2$$L'B"4@/MD2$$(GV2(GW20-\Q@A(B3PD20-TQ0A(B70D".@````` +M_\-$.>-\P[H`````2(GN3(G_Z(X!``!(BYPD&`$``$B+K"0@`0``3(ND)"@! +M``!,BZPD,`$``$R+M"0X`0``3(N\)$`!``!(@<1(`0``PV9FD&9FD$%7059! +M54%455-(@>R(`0``28G_2(GU3(LF2(M>$$B-M"2`````2(G?Z$+[__]!B<9( +M#[9#&$V+K,2@"@``NP````"`?2``=B,/MDT@9F:0#[;#2`^V5"@828N4U*`* +M``!(B53$0/_#.-EWY$&\`````$4Y]`^-K0```&9FD&:026/$#[:4A($```!! +MB=)!P>()#[:4A((```!!B=-!P>,)#[:,A(````"[`````(!](`!V*$0/MLE% +MB=`/MG4@D`^VPTB+5,1`2HM\R@A)C10X2(D4Q/_#0#C>=^0/MM%$B=!(B<=) +M`WS5"$@Y/"1U$$B+="0(1(G:Z`````#K'9!(BU0D"$B+-"0/ML%$B==)`WS% +M"$2)V>@`````0?_$13GT#XQ8____N@````!(B>Y,B?_H&````$B!Q(@!``!; +M74%<05U!7D%?PV9FD&9FD$B#[!A(B1PD2(EL)`A,B60D$$F)_$B)\XG5QD8) +M`H/Z`1G`@^#U@\`,B$8*Z!_V__^`>P@#=2](BT,02(MP$$B%]G0B2,=`$``` +M``#&1@D"@_T!&<"#X/6#P`R(1@I,B>?HZO7__TB+'"1(BVPD"$R+9"002(/$ +M&,-F9F:09F:0#[96"X72=$:)T$@/MH1'L`D``$B-!(!(C43'4(!X"0)T!K@` +M````PX!X"@%T$L9&"0(/MD`*B$8*N`````##D(G0#[:41[$)``"%TG6ZN`$` +M``##9F9FD&9F9I!F9F:005=!5D%505154TB#[`A)B?Y(B?7&1DX`@+YC#``` +M``^$BP```$&\`````$B-75"`?4T`=$Z`>PD!=3B`>P@#=2E(BT,0@'@9`'0? +M2(-X$`!T&$C'0!``````QD,)`@^VA6(,``"(0PKK"<9%3@'IMP$``$'_Q$B# +MPR@/MD5-1#G@?[)(B>Y,B??H$O#__^F7`0``#[9#"HB%8@P``,:%8PP```'I +M?/___V9F9I!F9I!!OP````!!O0$```!!O`````!(C5U0@'U-``^$-`$``(![ +M"0!U>DB)WDB)[^B__O__APD"=1!!_\=F9F:09F:0@'L)`G0+0;T` +M````Z8\```"`>PH!#X2%````@'U/`)`/A!W___](BT4X2`^V4Q!(BX30H``` +M`/9``01T7T&]`````,9#"0'&0PH`3(GW2(G>#[9#"(/X!G=&B<#_),4````` +MZ)CV___K-F9FD&9FD.@+^?__ZRGH!/O__V9F9I#K'NCY^___ZQ?&14\!QD8) +M`L9&"@'HAO/__^L$QD,*`4'_Q$B#PR@/MD5-1#G@#X_,_O__187_#X6C_O__ +M187M=!3&A6(,```!2(GN3(GWZ'SN___K!,9%3@%(@\0(6UU!7$%=05Y!7\-F +M9F:09F:005=!5D%505154TB!['@!``!(B7PD2$B)]4B+7CA,BZ8P#```0;T` +M````387D=2A(#[=.2$B+5D!(`=%(B=[HO>;__TB)13"X_____TB#?3``#X2N +M(@``2(M$)$C_@-Q9``!(C4402(M4)$A(@<)P60``2(M*"$B)0@A(B5402(E( +M"$B)`6:#NY0`````=$/V@Y(````!=0U(BU5`2#F3F````'# +ME````(G"J`%U#D'_QHG01(GQT_BH`73R1(AU3.LIQD5,".LC]H.2`````G06 +M2(M]0$@YNY@```!W"0^V14N(14SK!,9%3`C&14T`QH6P"0```,9%3P#&A6(, +M````QH5C#````$C'A3@,````````387D#X1?#P``0?9$)"`@#X2.!P``00^V +M1"02@_@"#X1M!```@_@"?P^#^`$/A`0!``"0Z9XA``"#^`,/A94A``!(C5PD +M8$B)W^@%Y?__28G:OP`````/MW5(NP````!!N2````!!NP$```"#_Q]W/P^V +MPTF-%()$B_H<.7__\9`"`)$B'@0QD`1`$B+5"1@2(E0%$B+5"1H2(E0'$'_QT0X +M?4IWJ^FG(```N`$```#K54B)[[D`````@'U*`)!V00^VP4C!X`1(`?A(C9#P +M"@``O@````"#N/`*````=1*#>@0`=0R#>@@`=0:#>@P`=`6^`0```(7V=;#_ +MP3A/2G>_N`````"%P'073(FE.`P``$C'A3`,````````Z<(-``!(C5PD8$B) +MW^B@X___28G:OP`````/MW5(NP````!!N2````!!NP$```"#_Q]W/P^VPTF- +M%()$B;`)``!!#[9$)`N( +MA'FQ"0``08AT)`M!OP````"`?4H`#X;3'@``2(G31#A]3'1R2(GOZ%_C___& +M0`@!1(AX$$2(>!%(BU0D8$B)4!1(BU0D:$B)4!Q!#[95(`^VRD:(?"D8_\)! +MB%4@28M5`/Z"L`D```^VLK`)``")\4@IT$B#Z%!(P?@#2`^OPXB$2K`)``!! +M#[9%"XB$2K$)``!!B'4+0?_'1#A]2@^'>____^E&'@``0;\`````@'U*``^& +M-AX``$B-G?`+``!)OLW,S,S,S,S,1#A]3`^$O0```$B)[^BPXO__QD`(`42( +M>!!$B'@12(M4)&!(B5`42(M4)&A(B5`<2(E$)$!(B>_HA>+__\9`"`-(B5@0 +M1(AX&$F)Q4B+$/Z"L`D```^VLK`)``")\4B+1"1`2"G02(/H4$C!^`-)#Z_& +MB(1*L`D``$$/MD4+B(1*L0D``$&(=0M)BQ0D_H*P"0``#[:RL`D``(GQ3(GH +M2"G02(/H4$C!^`-)#Z_&B(1*L`D``$$/MD0D"XB$2K$)``!!B'0D"T'_QT0X +M?4H/ARS____I3!T``+@!````ZUE(B>^Y`````(!]2@!V1F9F9I`/ML%(P>`$ +M2`'X2(V0\`H``+X`````@[CP"@```'43@WH$`'4-@WH(`'4'@WH,`)!T!;X! +M````A?9UK/_!.$]*=[ZX`````(7`=!=,B:4X#```2,>%,`P```````#I8PH` +M`$B-7"1@2(G?Z$'@__])B=J_``````^W=4B[`````$&Y(````$&[`0```&9F +M9I"#_Q]W/P^VPTF-%()$B_HI>#__\9`"`5(B5@0QD`@`$F)Q4&_`````(!] +M2@`/AND;``!(N\W,S,S,S,S,2(GOZ'3@___&0`@!1(AX$$2(>!%(BU0D8$B) +M4!1(BU0D:$B)4!Q!#[95(`^VRD:(?"D8_\)!B%4@28M5`/Z"L`D```^VLK`) +M``")\4@IT$B#Z%!(P?@#2`^OPXB$2K`)``!!#[9%"XB$2K$)``!!B'4+0?_' +M1#A]2G>%Z5\;```/MEU+2(GOZ/#?___&0`@!B%@0B%@12(M4)&!(B5`42(M4 +M)&A(B5`<2(E$)#A!OP````"`?4H`#X8B&P``2(V=\`L``$F\S!%(BU0D8$B)4!1(BU0D:$B) +M4!Q(B40D0$B)[^AQW___QD`(`TB)6!!$B'@828G%2(L0_H*P"0``#[:RL`D` +M`(GQ2(M$)$!(*=!(@^A02,'X`TD/K\2(A$JP"0``00^V10N(A$JQ"0``08AU +M"TF+50#^@K`)```/MK*P"0``B?%(BT0D.$@IT$B#Z%!(P?@#20^OQ(B$2K`) +M``!!#[9%"XB$2K$)``!!B'4+0?_'1#A]2@^'+/___^DX&@``9F:09I!-A>0/ +MA+P'``!!]D0D(`*0#X2O!P``1`^VO6`,``!$.+UA#```#X)5`0``9F:09I!$ +M.'U+#X0V`0``1(GX#[;82(G82,'@!$R-I`3P````3(GGZ%G=__\/MY2=0`P` +M``^WO)U"#```NP````!!N2````!!N@$```"#^A]W1`^VPTF--(1$BAF +M9I!FD$'_QT0XO6$,```/@[#^__]%A.T/A)H%``!(C7PD8.@=W/__0;\````` +M@'U*`'99D$0X?4QT240X?4MT0T2)^`^VT$C!X@1(`>I(C8KP"@``BT0D8`N" +M\`H``(E$)&"+1"1D"T$$B40D9(M$)&@+00B)1"1HBT0D;`M!#(E$)&Q!_\=$ +M.'U*=ZA,#[9%3$G!X`1*C70$<(M\)&`C/HE\)%"+3"1D(TX$B4PD5(M4)&@C +M5@B)5"18BT0D;"-&#(E$)%SWUXE\)&#WT8E,)&3WTHE4)&CWT(E$)&PC/HE\ +M)&`C3@2)3"1D(U8(B50D:"-&#(E$)&Q(B>_H9-S__\9`"`!(B40D*+@````` +M@WPD8`!U%8-\)&0`=0Z#?"1H`'4'@WPD;`!T!;@!````A<`/A*8!```/MD5, +MB(4(#```2(M$)&!(B87P"P``2(M$)&A(B87X"P``QH4)#````4C'A0`,```` +M````0;\`````@'U*``^&`P(``$R-I?`+``!$.'U,#X0_`0``1#B]8`P``'!%(BU0D8$B)4!1( +MBU0D:$B)4!Q(B40D0.M21(GZ#[;"2,'@!$B-7`1PBT0D8`D#BT0D9`E#!(M$ +M)&@)0PB+1"1L"4,,2(GOZ&';___&0`@!1(AX$$2(>!%(BQ-(B5`42(M3"$B) +M4!Q(B40D0$B)[^@YV___QD`(`TR)8!!$B'@828G%2(L0_H*P"0``#[:RL`D` +M`(GQ2(M$)$!(*=!(@^A02,'X`TB_S`$2(U$!'"Z`````(,X`'42@W@$`'4, +M@W@(`'4&@W@,`'0%N@$```"%TG0R1(GY#[;!2,'@!$B-7`1P2(GOZ`[:___& +M0`@!1(AX$$2(>!%(BQ-(B5`42(M3"$B)4!Q!_\=$.'U*#X=O____N`````"# +M?"10`'45@WPD5`!U#H-\)%@`=0>#?"1<`'0%N`$```"%P`^$&Q4``$0/MF5, +M1(BE*`P``$B+1"102(F%$`P``$B+1"182(F%&`P``,:%*0P```!(QX4@#``` +M``````^V74M(B>_H=MG__\9`"`&(6!!$B&`12(M4)%!(B5`42(M4)%A(B5`< +M2(E$)#A(QT0D,`````!!OP````"`?4H`#X:>%```3(VE$`P``$F^S_H"MG__\9`"`%$B'@0B%@1 +M2(M4)%!(B5`42(M4)%A(B5`<2(E$)$!(BQ#^@K`)```/MK*P"0``B?%(BT0D +M*$@IT$B#Z%!(P?@#2+_-S,S,S,S,S$@/K\>(A$JP"0``2(M<)$`/MD,+B(1* +ML0D``$"(_H3=C__\9` +M"`-,B6`0B%@828G%2(E$)#!(BQ#^@K`)```/MK*P"0``B?%(BT0D0$@IT$B# +MZ%!(P?@#20^OQHB$2K`)``!!#[9%"XB$2K$)``!!B'4+28M5`/Z"L`D```^V *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From delphij at FreeBSD.org Sat Apr 11 08:19:27 2009 From: delphij at FreeBSD.org (Xin LI) Date: Sat Apr 11 08:20:51 2009 Subject: svn commit: r190939 - in stable/7/lib/libc: . db db/btree db/hash db/mpool string Message-ID: <200904111519.n3BFJQtj090608@svn.freebsd.org> Author: delphij Date: Sat Apr 11 15:19:26 2009 New Revision: 190939 URL: http://svn.freebsd.org/changeset/base/190939 Log: MFC r190482: zero out memory before use and free. Approved by: re (kib) Security: Potential Information Leak Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/db/README stable/7/lib/libc/db/btree/bt_open.c stable/7/lib/libc/db/btree/bt_split.c stable/7/lib/libc/db/hash/hash_buf.c stable/7/lib/libc/db/mpool/mpool.c stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) Modified: stable/7/lib/libc/db/README ============================================================================== --- stable/7/lib/libc/db/README Sat Apr 11 15:19:09 2009 (r190938) +++ stable/7/lib/libc/db/README Sat Apr 11 15:19:26 2009 (r190939) @@ -1,4 +1,5 @@ # @(#)README 8.27 (Berkeley) 9/1/94 +# $FreeBSD$ This is version 1.85 of the Berkeley DB code. @@ -31,10 +32,3 @@ mpool The memory pool routines. recno The fixed/variable length record routines. test Test package. -============================================ -Debugging: - -If you're running a memory checker (e.g. Purify) on DB, make sure that -you recompile it with "-DPURIFY" in the CFLAGS, first. By default, -allocated pages are not initialized by the DB code, and they will show -up as reads of uninitialized memory in the buffer write routines. Modified: stable/7/lib/libc/db/btree/bt_open.c ============================================================================== --- stable/7/lib/libc/db/btree/bt_open.c Sat Apr 11 15:19:09 2009 (r190938) +++ stable/7/lib/libc/db/btree/bt_open.c Sat Apr 11 15:19:26 2009 (r190939) @@ -159,9 +159,8 @@ __bt_open(fname, flags, mode, openinfo, goto einval; /* Allocate and initialize DB and BTREE structures. */ - if ((t = (BTREE *)malloc(sizeof(BTREE))) == NULL) + if ((t = (BTREE *)calloc(1, sizeof(BTREE))) == NULL) goto err; - memset(t, 0, sizeof(BTREE)); t->bt_fd = -1; /* Don't close unopened fd on error. */ t->bt_lorder = b.lorder; t->bt_order = NOT; @@ -169,9 +168,8 @@ __bt_open(fname, flags, mode, openinfo, t->bt_pfx = b.prefix; t->bt_rfd = -1; - if ((t->bt_dbp = dbp = (DB *)malloc(sizeof(DB))) == NULL) + if ((t->bt_dbp = dbp = (DB *)calloc(1, sizeof(DB))) == NULL) goto err; - memset(t->bt_dbp, 0, sizeof(DB)); if (t->bt_lorder != machine_lorder) F_SET(t, B_NEEDSWAP); Modified: stable/7/lib/libc/db/btree/bt_split.c ============================================================================== --- stable/7/lib/libc/db/btree/bt_split.c Sat Apr 11 15:19:09 2009 (r190938) +++ stable/7/lib/libc/db/btree/bt_split.c Sat Apr 11 15:19:26 2009 (r190939) @@ -381,13 +381,10 @@ bt_page(t, h, lp, rp, skip, ilen) } /* Put the new left page for the split into place. */ - if ((l = (PAGE *)malloc(t->bt_psize)) == NULL) { + if ((l = (PAGE *)calloc(1, t->bt_psize)) == NULL) { mpool_put(t->bt_mp, r, 0); return (NULL); } -#ifdef PURIFY - memset(l, 0xff, t->bt_psize); -#endif l->pgno = h->pgno; l->nextpg = r->pgno; l->prevpg = h->prevpg; Modified: stable/7/lib/libc/db/hash/hash_buf.c ============================================================================== --- stable/7/lib/libc/db/hash/hash_buf.c Sat Apr 11 15:19:09 2009 (r190938) +++ stable/7/lib/libc/db/hash/hash_buf.c Sat Apr 11 15:19:26 2009 (r190939) @@ -57,6 +57,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #ifdef DEBUG #include @@ -174,18 +175,12 @@ newbuf(hashp, addr, prev_bp) */ if (hashp->nbufs || (bp->flags & BUF_PIN)) { /* Allocate a new one */ - if ((bp = (BUFHEAD *)malloc(sizeof(BUFHEAD))) == NULL) + if ((bp = (BUFHEAD *)calloc(1, sizeof(BUFHEAD))) == NULL) return (NULL); -#ifdef PURIFY - memset(bp, 0xff, sizeof(BUFHEAD)); -#endif - if ((bp->page = (char *)malloc(hashp->BSIZE)) == NULL) { + if ((bp->page = (char *)calloc(1, hashp->BSIZE)) == NULL) { free(bp); return (NULL); } -#ifdef PURIFY - memset(bp->page, 0xff, hashp->BSIZE); -#endif if (hashp->nbufs) hashp->nbufs--; } else { @@ -328,8 +323,10 @@ __buf_free(hashp, do_free, to_disk) } /* Check if we are freeing stuff */ if (do_free) { - if (bp->page) + if (bp->page) { + (void)memset(bp->page, 0, hashp->BSIZE); free(bp->page); + } BUF_REMOVE(bp); free(bp); bp = LRU; Modified: stable/7/lib/libc/db/mpool/mpool.c ============================================================================== --- stable/7/lib/libc/db/mpool/mpool.c Sat Apr 11 15:19:09 2009 (r190938) +++ stable/7/lib/libc/db/mpool/mpool.c Sat Apr 11 15:19:26 2009 (r190939) @@ -343,14 +343,11 @@ mpool_bkt(mp) return (bp); } -new: if ((bp = (BKT *)malloc(sizeof(BKT) + mp->pagesize)) == NULL) +new: if ((bp = (BKT *)calloc(1, sizeof(BKT) + mp->pagesize)) == NULL) return (NULL); #ifdef STATISTICS ++mp->pagealloc; #endif -#if defined(DEBUG) || defined(PURIFY) - memset(bp, 0xff, sizeof(BKT) + mp->pagesize); -#endif bp->page = (char *)bp + sizeof(BKT); ++mp->curcache; return (bp); From kan at FreeBSD.org Sun Apr 12 10:43:42 2009 From: kan at FreeBSD.org (Alexander Kabaev) Date: Sun Apr 12 11:01:50 2009 Subject: svn commit: r190970 - in stable/7/sys: kern nfsclient sys Message-ID: <200904121743.n3CHhfUV032779@svn.freebsd.org> Author: kan Date: Sun Apr 12 17:43:41 2009 New Revision: 190970 URL: http://svn.freebsd.org/changeset/base/190970 Log: Reimplement r189287 for -stable: Change vfs_busy to wait until an outcome of pending unmount operation is known and to retry or fail accordingly to that outcome. This fixes the problem with namespace traversing programs failing with random ENOENT errors if someone just happened to try to unmount that same filesystem at the same time. Prodded by: dhw, obrien Approved by: re(kib) Sponsored by: Juniper Networks, Inc. Modified: stable/7/sys/kern/vfs_mount.c stable/7/sys/kern/vfs_subr.c stable/7/sys/nfsclient/nfs_vfsops.c stable/7/sys/sys/mount.h Modified: stable/7/sys/kern/vfs_mount.c ============================================================================== --- stable/7/sys/kern/vfs_mount.c Sun Apr 12 16:53:56 2009 (r190969) +++ stable/7/sys/kern/vfs_mount.c Sun Apr 12 17:43:41 2009 (r190970) @@ -508,6 +508,11 @@ vfs_mount_destroy(struct mount *mp) int i; MNT_ILOCK(mp); + mp->mnt_kern_flag |= MNTK_REFEXPIRE; + if (mp->mnt_kern_flag & MNTK_MWAIT) { + mp->mnt_kern_flag &= ~MNTK_MWAIT; + wakeup(mp); + } for (i = 0; mp->mnt_ref && i < 3; i++) msleep(mp, MNT_MTX(mp), PVFS, "mntref", hz); /* Modified: stable/7/sys/kern/vfs_subr.c ============================================================================== --- stable/7/sys/kern/vfs_subr.c Sun Apr 12 16:53:56 2009 (r190969) +++ stable/7/sys/kern/vfs_subr.c Sun Apr 12 17:43:41 2009 (r190970) @@ -337,8 +337,8 @@ vfs_busy(struct mount *mp, int flags, st MNT_ILOCK(mp); MNT_REF(mp); - if (mp->mnt_kern_flag & MNTK_UNMOUNT) { - if (flags & LK_NOWAIT) { + while (mp->mnt_kern_flag & MNTK_UNMOUNT) { + if (flags & LK_NOWAIT || mp->mnt_kern_flag & MNTK_REFEXPIRE) { MNT_REL(mp); MNT_IUNLOCK(mp); return (ENOENT); @@ -353,11 +353,8 @@ vfs_busy(struct mount *mp, int flags, st * exclusive lock at the end of dounmount. */ msleep(mp, MNT_MTX(mp), PVFS, "vfs_busy", 0); - MNT_REL(mp); - MNT_IUNLOCK(mp); if (interlkp) mtx_lock(interlkp); - return (ENOENT); } if (interlkp) mtx_unlock(interlkp); Modified: stable/7/sys/nfsclient/nfs_vfsops.c ============================================================================== --- stable/7/sys/nfsclient/nfs_vfsops.c Sun Apr 12 16:53:56 2009 (r190969) +++ stable/7/sys/nfsclient/nfs_vfsops.c Sun Apr 12 17:43:41 2009 (r190970) @@ -256,7 +256,7 @@ nfs_statfs(struct mount *mp, struct stat #ifndef nolint sfp = NULL; #endif - error = vfs_busy(mp, LK_NOWAIT, NULL, td); + error = vfs_busy(mp, 0, NULL, td); if (error) return (error); error = nfs_nget(mp, (nfsfh_t *)nmp->nm_fh, nmp->nm_fhsize, &np, LK_EXCLUSIVE); Modified: stable/7/sys/sys/mount.h ============================================================================== --- stable/7/sys/sys/mount.h Sun Apr 12 16:53:56 2009 (r190969) +++ stable/7/sys/sys/mount.h Sun Apr 12 17:43:41 2009 (r190970) @@ -319,6 +319,7 @@ void __mnt_vnode_markerfree(str #define MNTK_ASYNC 0x00000002 /* filtered async flag */ #define MNTK_SOFTDEP 0x00000004 /* async disabled by softdep */ #define MNTK_NOINSMNTQ 0x00000008 /* insmntque is not allowed */ +#define MNTK_REFEXPIRE 0x00000020 /* refcount expiring is happening */ #define MNTK_UNMOUNT 0x01000000 /* unmount in progress */ #define MNTK_MWAIT 0x02000000 /* waiting for unmount to finish */ #define MNTK_SUSPEND 0x08000000 /* request write suspension */ From ume at FreeBSD.org Sun Apr 12 12:06:42 2009 From: ume at FreeBSD.org (Hajimu UMEMOTO) Date: Sun Apr 12 12:24:25 2009 Subject: svn commit: r190972 - in stable/7/lib/libc: . net string Message-ID: <200904121906.n3CJ6fmq035641@svn.freebsd.org> Author: ume Date: Sun Apr 12 19:06:41 2009 New Revision: 190972 URL: http://svn.freebsd.org/changeset/base/190972 Log: MFH r190382,190416,190525: - getaddrinfo(3) should accept numeric when ai_socktype is not specified in hint or hints is NULL. - Add support for SCTP to getaddrinfo(3). Now, getaddrinfo(3) returns two SOCK_STREAMs, IPPROTO_TCP and IPPROTO_SCTP. It confuses some programs. If getaddrinfo(3) returns IPPROTO_SCTP when SOCK_STREAM is specified by hints.ai_socktype, at least Apache doesn't work. So, I made getaddrinfo(3) to return IPPROTO_SCTP with SOCK_STREAM only when IPPROTO_SCTP is specified explicitly by hints.ai_protocol. - Query DNS only once per an address family. Approved by: re (kib) Modified: stable/7/lib/libc/ (props changed) stable/7/lib/libc/net/getaddrinfo.c stable/7/lib/libc/string/ffsll.c (props changed) stable/7/lib/libc/string/flsll.c (props changed) Modified: stable/7/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/7/lib/libc/net/getaddrinfo.c Sun Apr 12 19:04:27 2009 (r190971) +++ stable/7/lib/libc/net/getaddrinfo.c Sun Apr 12 19:06:41 2009 (r190972) @@ -102,7 +102,6 @@ __FBSDID("$FreeBSD$"); # define FAITH #endif -#define SUCCESS 0 #define ANY 0 #define YES 1 #define NO 0 @@ -165,19 +164,20 @@ struct explore { static const struct explore explore[] = { #if 0 - { PF_LOCAL, 0, ANY, ANY, NULL, 0x01 }, + { PF_LOCAL, ANY, ANY, NULL, 0x01 }, #endif #ifdef INET6 { PF_INET6, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 }, { PF_INET6, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 }, + { PF_INET6, SOCK_STREAM, IPPROTO_SCTP, "sctp", 0x03 }, + { PF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0x07 }, { PF_INET6, SOCK_RAW, ANY, NULL, 0x05 }, #endif { PF_INET, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 }, { PF_INET, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 }, + { PF_INET, SOCK_STREAM, IPPROTO_SCTP, "sctp", 0x03 }, + { PF_INET, SOCK_SEQPACKET, IPPROTO_SCTP, "sctp", 0x07 }, { PF_INET, SOCK_RAW, ANY, NULL, 0x05 }, - { PF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP, "udp", 0x07 }, - { PF_UNSPEC, SOCK_STREAM, IPPROTO_TCP, "tcp", 0x07 }, - { PF_UNSPEC, SOCK_RAW, ANY, NULL, 0x05 }, { -1, 0, 0, NULL, 0 }, }; @@ -227,6 +227,8 @@ typedef union { } querybuf; static int str2number(const char *, int *); +static int explore_copy(const struct addrinfo *, const struct addrinfo *, + struct addrinfo **); static int explore_null(const struct addrinfo *, const char *, struct addrinfo **); static int explore_numeric(const struct addrinfo *, const char *, @@ -237,6 +239,7 @@ static int get_canonname(const struct ad struct addrinfo *, const char *); static struct addrinfo *get_ai(const struct addrinfo *, const struct afd *, const char *); +static struct addrinfo *copy_ai(const struct addrinfo *); static int get_portmatch(const struct addrinfo *, const char *); static int get_port(struct addrinfo *, const char *, int); static const struct afd *find_afd(int); @@ -365,12 +368,23 @@ getaddrinfo(const char *hostname, const struct addrinfo sentinel; struct addrinfo *cur; int error = 0; - struct addrinfo ai; - struct addrinfo ai0; + struct addrinfo ai, ai0, *afai; struct addrinfo *pai; + const struct afd *afd; const struct explore *ex; + struct addrinfo *afailist[sizeof(afdl)/sizeof(afdl[0])]; + struct addrinfo *afai_unspec; + int found; int numeric = 0; + /* ensure we return NULL on errors */ + *res = NULL; + + memset(&ai, 0, sizeof(ai)); + + memset(afailist, 0, sizeof(afailist)); + afai_unspec = NULL; + memset(&sentinel, 0, sizeof(sentinel)); cur = &sentinel; pai = &ai; @@ -410,17 +424,22 @@ getaddrinfo(const char *hostname, const */ if (pai->ai_socktype != ANY && pai->ai_protocol != ANY) { for (ex = explore; ex->e_af >= 0; ex++) { - if (pai->ai_family != ex->e_af) + if (!MATCH_FAMILY(pai->ai_family, ex->e_af, + WILD_AF(ex))) continue; - if (ex->e_socktype == ANY) + if (!MATCH(pai->ai_socktype, ex->e_socktype, + WILD_SOCKTYPE(ex))) continue; - if (ex->e_protocol == ANY) + if (!MATCH(pai->ai_protocol, ex->e_protocol, + WILD_PROTOCOL(ex))) continue; - if (pai->ai_socktype == ex->e_socktype && - pai->ai_protocol != ex->e_protocol) { - ERR(EAI_BADHINTS); - } + + /* matched */ + break; } + + if (ex->e_af < 0) + ERR(EAI_BADHINTS); } } @@ -473,49 +492,48 @@ getaddrinfo(const char *hostname, const ai0 = *pai; - /* NULL hostname, or numeric hostname */ - for (ex = explore; ex->e_af >= 0; ex++) { + /* + * NULL hostname, or numeric hostname. + * If numeric representation of AF1 can be interpreted as FQDN + * representation of AF2, we need to think again about the code below. + */ + found = 0; + for (afd = afdl; afd->a_af; afd++) { *pai = ai0; - /* PF_UNSPEC entries are prepared for DNS queries only */ - if (ex->e_af == PF_UNSPEC) - continue; - - if (!MATCH_FAMILY(pai->ai_family, ex->e_af, WILD_AF(ex))) - continue; - if (!MATCH(pai->ai_socktype, ex->e_socktype, WILD_SOCKTYPE(ex))) - continue; - if (!MATCH(pai->ai_protocol, ex->e_protocol, WILD_PROTOCOL(ex))) + if (!MATCH_FAMILY(pai->ai_family, afd->a_af, 1)) continue; if (pai->ai_family == PF_UNSPEC) - pai->ai_family = ex->e_af; - if (pai->ai_socktype == ANY && ex->e_socktype != ANY) - pai->ai_socktype = ex->e_socktype; - if (pai->ai_protocol == ANY && ex->e_protocol != ANY) - pai->ai_protocol = ex->e_protocol; + pai->ai_family = afd->a_af; - if (hostname == NULL) - error = explore_null(pai, servname, &cur->ai_next); - else + if (hostname == NULL) { + error = explore_null(pai, servname, + &afailist[afd - afdl]); + + /* + * Errors from explore_null should be unexpected and + * be caught to avoid returning an incomplete result. + */ + if (error != 0) + goto bad; + } else { error = explore_numeric_scope(pai, hostname, servname, - &cur->ai_next); + &afailist[afd - afdl]); - if (error) - goto free; + /* + * explore_numeric_scope returns an error for address + * families that do not match that of hostname. + * Thus we should not catch the error at this moment. + */ + } - while (cur && cur->ai_next) - cur = cur->ai_next; + if (!error && afailist[afd - afdl]) + found++; } - - /* - * XXX - * If numreic representation of AF1 can be interpreted as FQDN - * representation of AF2, we need to think again about the code below. - */ - if (sentinel.ai_next) { + if (found) { numeric = 1; - goto good; + goto globcopy; } if (hostname == NULL) @@ -528,42 +546,55 @@ getaddrinfo(const char *hostname, const /* * hostname as alphabetical name. - * we would like to prefer AF_INET6 than AF_INET, so we'll make a - * outer loop by AFs. */ + *pai = ai0; + error = explore_fqdn(pai, hostname, servname, &afai_unspec); + +globcopy: for (ex = explore; ex->e_af >= 0; ex++) { *pai = ai0; - /* require exact match for family field */ - if (pai->ai_family != ex->e_af) + if (!MATCH_FAMILY(pai->ai_family, ex->e_af, WILD_AF(ex))) continue; - if (!MATCH(pai->ai_socktype, ex->e_socktype, - WILD_SOCKTYPE(ex))) { + WILD_SOCKTYPE(ex))) continue; - } if (!MATCH(pai->ai_protocol, ex->e_protocol, - WILD_PROTOCOL(ex))) { + WILD_PROTOCOL(ex))) continue; - } + if (pai->ai_family == PF_UNSPEC) + pai->ai_family = ex->e_af; if (pai->ai_socktype == ANY && ex->e_socktype != ANY) pai->ai_socktype = ex->e_socktype; if (pai->ai_protocol == ANY && ex->e_protocol != ANY) pai->ai_protocol = ex->e_protocol; - error = explore_fqdn(pai, hostname, servname, - &cur->ai_next); + /* + * if the servname does not match socktype/protocol, ignore it. + */ + if (get_portmatch(pai, servname) != 0) + continue; + + if (afai_unspec) + afai = afai_unspec; + else { + if ((afd = find_afd(pai->ai_family)) == NULL) + continue; + /* XXX assumes that afd points inside afdl[] */ + afai = afailist[afd - afdl]; + } + if (!afai) + continue; + + error = explore_copy(pai, afai, &cur->ai_next); + if (error != 0) + goto bad; while (cur && cur->ai_next) cur = cur->ai_next; } - /* XXX inhibit errors if we have the result */ - if (sentinel.ai_next) - error = 0; - -good: /* * ensure we return either: * - error == 0, non-NULL *res @@ -599,16 +630,22 @@ good: } } *res = sentinel.ai_next; - return SUCCESS; } else error = EAI_FAIL; } -free: + bad: - if (sentinel.ai_next) - freeaddrinfo(sentinel.ai_next); - *res = NULL; - return error; + if (afai_unspec) + freeaddrinfo(afai_unspec); + for (afd = afdl; afd->a_af; afd++) { + if (afailist[afd - afdl]) + freeaddrinfo(afailist[afd - afdl]); + } + if (!*res) + if (sentinel.ai_next) + freeaddrinfo(sentinel.ai_next); + + return (error); } static int @@ -1060,6 +1097,41 @@ gai_addr2scopetype(struct sockaddr *sa) } } +static int +explore_copy(const struct addrinfo *pai, const struct addrinfo *src0, + struct addrinfo **res) +{ + int error; + struct addrinfo sentinel, *cur; + const struct addrinfo *src; + + error = 0; + sentinel.ai_next = NULL; + cur = &sentinel; + + for (src = src0; src != NULL; src = src->ai_next) { + if (src->ai_family != pai->ai_family) + continue; + + cur->ai_next = copy_ai(src); + if (!cur->ai_next) { + error = EAI_MEMORY; + goto fail; + } + + cur->ai_next->ai_socktype = pai->ai_socktype; + cur->ai_next->ai_protocol = pai->ai_protocol; + cur = cur->ai_next; + } + + *res = sentinel.ai_next; + return 0; + +fail: + freeaddrinfo(sentinel.ai_next); + return error; +} + /* * hostname == NULL. * passive socket -> anyaddr (0.0.0.0 or ::) @@ -1088,12 +1160,6 @@ explore_null(const struct addrinfo *pai, } else _close(s); - /* - * if the servname does not match socktype/protocol, ignore it. - */ - if (get_portmatch(pai, servname) != 0) - return 0; - afd = find_afd(pai->ai_family); if (afd == NULL) return 0; @@ -1130,12 +1196,6 @@ explore_numeric(const struct addrinfo *p *res = NULL; ai = NULL; - /* - * if the servname does not match socktype/protocol, ignore it. - */ - if (get_portmatch(pai, servname) != 0) - return 0; - afd = find_afd(pai->ai_family); if (afd == NULL) return 0; @@ -1202,12 +1262,6 @@ explore_numeric_scope(const struct addri char *cp, *hostname2 = NULL, *scope, *addr; struct sockaddr_in6 *sin6; - /* - * if the servname does not match socktype/protocol, ignore it. - */ - if (get_portmatch(pai, servname) != 0) - return 0; - afd = find_afd(pai->ai_family); if (afd == NULL) return 0; @@ -1240,6 +1294,8 @@ explore_numeric_scope(const struct addri sin6 = (struct sockaddr_in6 *)(void *)cur->ai_addr; if (ip6_str2scopeid(scope, sin6, &scopeid) == -1) { free(hostname2); + freeaddrinfo(*res); + *res = NULL; return(EAI_NONAME); /* XXX: is return OK? */ } sin6->sin6_scope_id = scopeid; @@ -1248,6 +1304,10 @@ explore_numeric_scope(const struct addri free(hostname2); + if (error && *res) { + freeaddrinfo(*res); + *res = NULL; + } return error; #endif } @@ -1331,6 +1391,38 @@ get_ai(const struct addrinfo *pai, const return ai; } +/* XXX need to malloc() the same way we do from other functions! */ +static struct addrinfo * +copy_ai(const struct addrinfo *pai) +{ + struct addrinfo *ai; + size_t l; + + l = sizeof(*ai) + pai->ai_addrlen; + if ((ai = (struct addrinfo *)malloc(l)) == NULL) + return NULL; + memset(ai, 0, l); + memcpy(ai, pai, sizeof(*ai)); + ai->ai_addr = (struct sockaddr *)(void *)(ai + 1); + memcpy(ai->ai_addr, pai->ai_addr, pai->ai_addrlen); + + if (pai->ai_canonname) { + l = strlen(pai->ai_canonname) + 1; + if ((ai->ai_canonname = malloc(l)) == NULL) { + free(ai); + return NULL; + } + strlcpy(ai->ai_canonname, pai->ai_canonname, l); + } else { + /* just to make sure */ + ai->ai_canonname = NULL; + } + + ai->ai_next = NULL; + + return ai; +} + static int get_portmatch(const struct addrinfo *ai, const char *servname) { @@ -1365,10 +1457,21 @@ get_port(struct addrinfo *ai, const char return EAI_SERVICE; case SOCK_DGRAM: case SOCK_STREAM: + case SOCK_SEQPACKET: allownumeric = 1; break; case ANY: - allownumeric = 0; + switch (ai->ai_family) { + case AF_INET: +#ifdef AF_INET6 + case AF_INET6: +#endif + allownumeric = 1; + break; + default: + allownumeric = 0; + break; + } break; default: return EAI_SOCKTYPE; @@ -1384,13 +1487,17 @@ get_port(struct addrinfo *ai, const char } else { if (ai->ai_flags & AI_NUMERICSERV) return EAI_NONAME; - switch (ai->ai_socktype) { - case SOCK_DGRAM: + + switch (ai->ai_protocol) { + case IPPROTO_UDP: proto = "udp"; break; - case SOCK_STREAM: + case IPPROTO_TCP: proto = "tcp"; break; + case IPPROTO_SCTP: + proto = "sctp"; + break; default: proto = NULL; break; From kan at FreeBSD.org Sun Apr 12 12:41:18 2009 From: kan at FreeBSD.org (Alexander Kabaev) Date: Sun Apr 12 13:23:52 2009 Subject: svn commit: r190973 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb kern sys Message-ID: <200904121941.n3CJfGHV036939@svn.freebsd.org> Author: kan Date: Sun Apr 12 19:41:16 2009 New Revision: 190973 URL: http://svn.freebsd.org/changeset/base/190973 Log: MFC changes 190533 and 190945: Replace v_dd vnode pointer with v_cache_dd pointer to struct namecache in directory vnodes. Allow namecache dotdot entry to be created pointing from child vnode to parent vnode if no existing links in opposite direction exist. Use direct link from parent to child for dotdot lookups otherwise. This restores more efficient dotdot caching in NFS filesystems which was lost when vnodes stoppped being type stable. Majority of backporting work for this was done by jhb. Reviewed by: jhb, kib Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/kern/vfs_cache.c stable/7/sys/kern/vfs_subr.c stable/7/sys/sys/vnode.h Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Sun Apr 12 19:06:41 2009 (r190972) +++ stable/7/sys/kern/vfs_cache.c Sun Apr 12 19:41:16 2009 (r190973) @@ -182,7 +182,8 @@ static MALLOC_DEFINE(M_VFSCACHE, "vfscac /* * Flags in namecache.nc_flag */ -#define NCF_WHITE 1 +#define NCF_WHITE 0x01 +#define NCF_ISDOTDOT 0x02 #ifdef DIAGNOSTIC /* @@ -283,14 +284,20 @@ cache_zap(ncp) CTR2(KTR_VFS, "cache_zap(%p) vp %p", ncp, ncp->nc_vp); vp = NULL; LIST_REMOVE(ncp, nc_hash); - LIST_REMOVE(ncp, nc_src); - if (LIST_EMPTY(&ncp->nc_dvp->v_cache_src)) { - vp = ncp->nc_dvp; - numcachehv--; + if (ncp->nc_flag & NCF_ISDOTDOT) { + if (ncp == ncp->nc_dvp->v_cache_dd) + ncp->nc_dvp->v_cache_dd = NULL; + } else { + LIST_REMOVE(ncp, nc_src); + if (LIST_EMPTY(&ncp->nc_dvp->v_cache_src)) { + vp = ncp->nc_dvp; + numcachehv--; + } } if (ncp->nc_vp) { TAILQ_REMOVE(&ncp->nc_vp->v_cache_dst, ncp, nc_dst); - ncp->nc_vp->v_dd = NULL; + if (ncp == ncp->nc_vp->v_cache_dd) + ncp->nc_vp->v_cache_dd = NULL; } else { TAILQ_REMOVE(&ncneg, ncp, nc_dst); numneg--; @@ -348,12 +355,21 @@ retry: } if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { dotdothits++; - if (dvp->v_dd == NULL || - (cnp->cn_flags & MAKEENTRY) == 0) { + if (dvp->v_cache_dd == NULL) { CACHE_UNLOCK(); return (0); } - *vpp = dvp->v_dd; + if ((cnp->cn_flags & MAKEENTRY) == 0) { + if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) + cache_zap(dvp->v_cache_dd); + dvp->v_cache_dd = NULL; + CACHE_UNLOCK(); + return (0); + } + if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) + *vpp = dvp->v_cache_dd->nc_vp; + else + *vpp = dvp->v_cache_dd->nc_dvp; CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..", dvp, cnp->cn_nameptr, *vpp); goto success; @@ -484,6 +500,7 @@ cache_enter(dvp, vp, cnp) struct namecache *ncp, *n2; struct nchashhead *ncpp; u_int32_t hash; + int flag; int hold; int zap; int len; @@ -501,23 +518,33 @@ cache_enter(dvp, vp, cnp) if (numcache >= desiredvnodes * 2) return; + flag = 0; if (cnp->cn_nameptr[0] == '.') { - if (cnp->cn_namelen == 1) { + if (cnp->cn_namelen == 1) return; - } - /* - * For dotdot lookups only cache the v_dd pointer if the - * directory has a link back to its parent via v_cache_dst. - * Without this an unlinked directory would keep a soft - * reference to its parent which could not be NULLd at - * cache_purge() time. - */ if (cnp->cn_namelen == 2 && cnp->cn_nameptr[1] == '.') { CACHE_LOCK(); - if (!TAILQ_EMPTY(&dvp->v_cache_dst)) - dvp->v_dd = vp; + /* + * If dotdot entry already exists, just retarget it + * to new parent vnode, otherwise continue with new + * namecache entry allocation. + */ + if ((ncp = dvp->v_cache_dd) != NULL) { + if (ncp->nc_flag & NCF_ISDOTDOT) { + KASSERT(ncp->nc_dvp == dvp, + ("wrong isdotdot parent")); + TAILQ_REMOVE(&ncp->nc_vp->v_cache_dst, + ncp, nc_dst); + TAILQ_INSERT_HEAD(&vp->v_cache_dst, + ncp, nc_dst); + ncp->nc_vp = vp; + CACHE_UNLOCK(); + return; + } + } + dvp->v_cache_dd = NULL; CACHE_UNLOCK(); - return; + flag = NCF_ISDOTDOT; } } @@ -531,6 +558,7 @@ cache_enter(dvp, vp, cnp) ncp = cache_alloc(cnp->cn_namelen); ncp->nc_vp = vp; ncp->nc_dvp = dvp; + ncp->nc_flag = flag; len = ncp->nc_nlen = cnp->cn_namelen; hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); bcopy(cnp->cn_nameptr, ncp->nc_name, len); @@ -553,14 +581,35 @@ cache_enter(dvp, vp, cnp) } } + if (flag == NCF_ISDOTDOT) { + /* + * See if we are trying to add .. entry, but some other lookup + * has populated v_cache_dd pointer already. + */ + if (dvp->v_cache_dd != NULL) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + KASSERT(vp == NULL || vp->v_type == VDIR, + ("wrong vnode type %p", vp)); + dvp->v_cache_dd = ncp; + } + numcache++; if (!vp) { numneg++; - ncp->nc_flag = cnp->cn_flags & ISWHITEOUT ? NCF_WHITE : 0; + if (cnp->cn_flags & ISWHITEOUT) + ncp->nc_flag |= NCF_WHITE; } else if (vp->v_type == VDIR) { - vp->v_dd = dvp; + if (flag != NCF_ISDOTDOT) { + if ((n2 = vp->v_cache_dd) != NULL && + (n2->nc_flag & NCF_ISDOTDOT) != 0) + cache_zap(n2); + vp->v_cache_dd = ncp; + } } else { - vp->v_dd = NULL; + vp->v_cache_dd = NULL; } /* @@ -568,11 +617,14 @@ cache_enter(dvp, vp, cnp) * within the cache entries table. */ LIST_INSERT_HEAD(ncpp, ncp, nc_hash); - if (LIST_EMPTY(&dvp->v_cache_src)) { - hold = 1; - numcachehv++; + if (flag != NCF_ISDOTDOT) { + if (LIST_EMPTY(&dvp->v_cache_src)) { + hold = 1; + numcachehv++; + } + LIST_INSERT_HEAD(&dvp->v_cache_src, ncp, nc_src); } - LIST_INSERT_HEAD(&dvp->v_cache_src, ncp, nc_src); + /* * If the entry is "negative", we place it into the * "negative" cache queue, otherwise, we place it into the @@ -627,7 +679,12 @@ cache_purge(vp) cache_zap(LIST_FIRST(&vp->v_cache_src)); while (!TAILQ_EMPTY(&vp->v_cache_dst)) cache_zap(TAILQ_FIRST(&vp->v_cache_dst)); - vp->v_dd = NULL; + if (vp->v_cache_dd != NULL) { + KASSERT(vp->v_cache_dd->nc_flag & NCF_ISDOTDOT, + ("lost dotdot link")); + cache_zap(vp->v_cache_dd); + } + KASSERT(vp->v_cache_dd == NULL, ("incomplete purge")); CACHE_UNLOCK(); } @@ -877,18 +934,19 @@ vn_fullpath1(struct thread *td, struct v vp = vp->v_mount->mnt_vnodecovered; continue; } - if (vp->v_dd == NULL) { + if (vp->v_type != VDIR) { numfullpathfail1++; error = ENOTDIR; break; } - ncp = TAILQ_FIRST(&vp->v_cache_dst); + TAILQ_FOREACH(ncp, &vp->v_cache_dst, nc_dst) + if ((ncp->nc_flag & NCF_ISDOTDOT) == 0) + break; if (!ncp) { numfullpathfail2++; error = ENOENT; break; } - MPASS(ncp->nc_dvp == vp->v_dd); for (i = ncp->nc_nlen - 1; i >= 0 && bp != buf; i--) *--bp = ncp->nc_name[i]; if (bp == buf) { Modified: stable/7/sys/kern/vfs_subr.c ============================================================================== --- stable/7/sys/kern/vfs_subr.c Sun Apr 12 19:06:41 2009 (r190972) +++ stable/7/sys/kern/vfs_subr.c Sun Apr 12 19:41:16 2009 (r190973) @@ -800,6 +800,7 @@ vdestroy(struct vnode *vp) VNASSERT(bo->bo_dirty.bv_root == NULL, vp, ("dirtyblkroot not NULL")); VNASSERT(TAILQ_EMPTY(&vp->v_cache_dst), vp, ("vp has namecache dst")); VNASSERT(LIST_EMPTY(&vp->v_cache_src), vp, ("vp has namecache src")); + VNASSERT(vp->v_cache_dd == NULL, vp, ("vp has namecache for ..")); VI_UNLOCK(vp); #ifdef MAC mac_destroy_vnode(vp); Modified: stable/7/sys/sys/vnode.h ============================================================================== --- stable/7/sys/sys/vnode.h Sun Apr 12 19:06:41 2009 (r190972) +++ stable/7/sys/sys/vnode.h Sun Apr 12 19:41:16 2009 (r190973) @@ -138,7 +138,7 @@ struct vnode { */ LIST_HEAD(, namecache) v_cache_src; /* c Cache entries from us */ TAILQ_HEAD(, namecache) v_cache_dst; /* c Cache entries to us */ - struct vnode *v_dd; /* c .. vnode */ + struct namecache *v_cache_dd; /* c Cache entry for .. vnode */ /* * clustering stuff From kan at FreeBSD.org Sun Apr 12 12:50:47 2009 From: kan at FreeBSD.org (Alexander Kabaev) Date: Sun Apr 12 13:26:36 2009 Subject: svn commit: r190975 - in stable/7/sys: . contrib/pf dev/ath/ath_hal dev/cxgb dev/dcons Message-ID: <200904121950.n3CJok7e037356@svn.freebsd.org> Author: kan Date: Sun Apr 12 19:50:46 2009 New Revision: 190975 URL: http://svn.freebsd.org/changeset/base/190975 Log: MFC change 190756: Fix logic in MOD_LOAD handler to call dcons_attach after all successful dcons_drv_init invocations. Testing return value for 0 does not work for cases where dcons_drv_init was called already as part of low level onsole initialization. Approved by: re(kib) Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/dev/dcons/dcons_os.c Modified: stable/7/sys/dev/dcons/dcons_os.c ============================================================================== --- stable/7/sys/dev/dcons/dcons_os.c Sun Apr 12 19:42:25 2009 (r190974) +++ stable/7/sys/dev/dcons/dcons_os.c Sun Apr 12 19:50:46 2009 (r190975) @@ -683,8 +683,9 @@ dcons_modevent(module_t mode, int type, case MOD_LOAD: ret = dcons_drv_init(1); #if __FreeBSD_version >= 500000 - if (ret == 0) { + if (ret != -1) dcons_attach(); + if (ret == 0) { dcons_cnprobe(&dcons_consdev); dcons_cninit(&dcons_consdev); cnadd(&dcons_consdev); From sobomax at FreeBSD.org Sun Apr 12 16:06:25 2009 From: sobomax at FreeBSD.org (Maxim Sobolev) Date: Sun Apr 12 17:03:24 2009 Subject: svn commit: r190980 - in stable/7/sys: . amd64/amd64 contrib/pf dev/ath/ath_hal dev/cxgb i386/i386 Message-ID: <200904122306.n3CN6OrZ043986@svn.freebsd.org> Author: sobomax Date: Sun Apr 12 23:06:23 2009 New Revision: 190980 URL: http://svn.freebsd.org/changeset/base/190980 Log: MFC: Make machdep.hyperthreading_allowed working. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/amd64/amd64/mp_machdep.c stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/ath/ath_hal/ (props changed) stable/7/sys/dev/cxgb/ (props changed) stable/7/sys/i386/i386/mp_machdep.c Modified: stable/7/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/7/sys/amd64/amd64/mp_machdep.c Sun Apr 12 22:16:14 2009 (r190979) +++ stable/7/sys/amd64/amd64/mp_machdep.c Sun Apr 12 23:06:23 2009 (r190980) @@ -153,6 +153,7 @@ struct cpu_info { int cpu_present:1; int cpu_bsp:1; int cpu_disabled:1; + int cpu_hyperthread:1; } static cpu_info[MAX_APIC_ID + 1]; int cpu_apic_ids[MAXCPU]; @@ -355,11 +356,6 @@ cpu_mp_start(void) ("BSP's APIC ID doesn't match boot_cpu_id")); cpu_apic_ids[0] = boot_cpu_id; - assign_cpu_ids(); - - /* Start each Application Processor */ - start_all_aps(); - /* Setup the initial logical CPUs info. */ logical_cpus = logical_cpus_mask = 0; if (cpu_feature & CPUID_HTT) @@ -407,6 +403,11 @@ cpu_mp_start(void) hyperthreading_cpus = logical_cpus; } + assign_cpu_ids(); + + /* Start each Application Processor */ + start_all_aps(); + set_interrupt_apic_ids(); /* Last, setup the cpu topology now that we have probed CPUs */ @@ -421,18 +422,26 @@ void cpu_mp_announce(void) { int i, x; + const char *hyperthread; /* List CPUs */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); for (i = 1, x = 0; x <= MAX_APIC_ID; x++) { if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp) continue; + if (cpu_info[x].cpu_hyperthread) { + hyperthread = "/HT"; + } else { + hyperthread = ""; + } if (cpu_info[x].cpu_disabled) - printf(" cpu (AP): APIC ID: %2d (disabled)\n", x); + printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", + hyperthread, x); else { KASSERT(i < mp_ncpus, ("mp_ncpus and actual cpus are out of whack")); - printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); + printf(" cpu%d (AP%s): APIC ID: %2d\n", i++, + hyperthread, x); } } } @@ -638,11 +647,28 @@ assign_cpu_ids(void) { u_int i; + TUNABLE_INT_FETCH("machdep.hyperthreading_allowed", + &hyperthreading_allowed); + /* Check for explicitly disabled CPUs. */ for (i = 0; i <= MAX_APIC_ID; i++) { if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp) continue; + if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) { + cpu_info[i].cpu_hyperthread = 1; +#if defined(SCHED_ULE) + /* + * Don't use HT CPU if it has been disabled by a + * tunable. + */ + if (hyperthreading_allowed == 0) { + cpu_info[i].cpu_disabled = 1; + continue; + } +#endif + } + /* Don't use this CPU if it has been disabled by a tunable. */ if (resource_disabled("lapic", i)) { cpu_info[i].cpu_disabled = 1; @@ -1229,6 +1255,16 @@ sysctl_hyperthreading_allowed(SYSCTL_HAN if (error || !req->newptr) return (error); +#ifdef SCHED_ULE + /* + * SCHED_ULE doesn't allow enabling/disabling HT cores at + * run-time. + */ + if (allowed != hyperthreading_allowed) + return (ENOTSUP); + return (error); +#endif + if (allowed) hlt_cpus_mask &= ~hyperthreading_cpus_mask; else @@ -1273,8 +1309,6 @@ cpu_hlt_setup(void *dummy __unused) * of hlt_logical_cpus. */ if (hyperthreading_cpus_mask) { - TUNABLE_INT_FETCH("machdep.hyperthreading_allowed", - &hyperthreading_allowed); SYSCTL_ADD_PROC(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "hyperthreading_allowed", CTLTYPE_INT|CTLFLAG_RW, Modified: stable/7/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/7/sys/i386/i386/mp_machdep.c Sun Apr 12 22:16:14 2009 (r190979) +++ stable/7/sys/i386/i386/mp_machdep.c Sun Apr 12 23:06:23 2009 (r190980) @@ -209,6 +209,7 @@ struct cpu_info { int cpu_present:1; int cpu_bsp:1; int cpu_disabled:1; + int cpu_hyperthread:1; } static cpu_info[MAX_APIC_ID + 1]; int cpu_apic_ids[MAXCPU]; @@ -405,11 +406,6 @@ cpu_mp_start(void) ("BSP's APIC ID doesn't match boot_cpu_id")); cpu_apic_ids[0] = boot_cpu_id; - assign_cpu_ids(); - - /* Start each Application Processor */ - start_all_aps(); - /* Setup the initial logical CPUs info. */ logical_cpus = logical_cpus_mask = 0; if (cpu_feature & CPUID_HTT) @@ -457,6 +453,11 @@ cpu_mp_start(void) hyperthreading_cpus = logical_cpus; } + assign_cpu_ids(); + + /* Start each Application Processor */ + start_all_aps(); + set_interrupt_apic_ids(); /* Last, setup the cpu topology now that we have probed CPUs */ @@ -471,18 +472,26 @@ void cpu_mp_announce(void) { int i, x; + const char *hyperthread; /* List CPUs */ printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id); for (i = 1, x = 0; x <= MAX_APIC_ID; x++) { if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp) continue; + if (cpu_info[x].cpu_hyperthread) { + hyperthread = "/HT"; + } else { + hyperthread = ""; + } if (cpu_info[x].cpu_disabled) - printf(" cpu (AP): APIC ID: %2d (disabled)\n", x); + printf(" cpu (AP%s): APIC ID: %2d (disabled)\n", + hyperthread, x); else { KASSERT(i < mp_ncpus, ("mp_ncpus and actual cpus are out of whack")); - printf(" cpu%d (AP): APIC ID: %2d\n", i++, x); + printf(" cpu%d (AP%s): APIC ID: %2d\n", i++, + hyperthread, x); } } } @@ -691,11 +700,28 @@ assign_cpu_ids(void) { u_int i; + TUNABLE_INT_FETCH("machdep.hyperthreading_allowed", + &hyperthreading_allowed); + /* Check for explicitly disabled CPUs. */ for (i = 0; i <= MAX_APIC_ID; i++) { if (!cpu_info[i].cpu_present || cpu_info[i].cpu_bsp) continue; + if (hyperthreading_cpus > 1 && i % hyperthreading_cpus != 0) { + cpu_info[i].cpu_hyperthread = 1; +#if defined(SCHED_ULE) + /* + * Don't use HT CPU if it has been disabled by a + * tunable. + */ + if (hyperthreading_allowed == 0) { + cpu_info[i].cpu_disabled = 1; + continue; + } +#endif + } + /* Don't use this CPU if it has been disabled by a tunable. */ if (resource_disabled("lapic", i)) { cpu_info[i].cpu_disabled = 1; @@ -1410,6 +1436,16 @@ sysctl_hyperthreading_allowed(SYSCTL_HAN if (error || !req->newptr) return (error); +#ifdef SCHED_ULE + /* + * SCHED_ULE doesn't allow enabling/disabling HT cores at + * run-time. + */ + if (allowed != hyperthreading_allowed) + return (ENOTSUP); + return (error); +#endif + if (allowed) hlt_cpus_mask &= ~hyperthreading_cpus_mask; else @@ -1454,8 +1490,6 @@ cpu_hlt_setup(void *dummy __unused) * of hlt_logical_cpus. */ if (hyperthreading_cpus_mask) { - TUNABLE_INT_FETCH("machdep.hyperthreading_allowed", - &hyperthreading_allowed); SYSCTL_ADD_PROC(&logical_cpu_clist, SYSCTL_STATIC_CHILDREN(_machdep), OID_AUTO, "hyperthreading_allowed", CTLTYPE_INT|CTLFLAG_RW, From sobomax at FreeBSD.org Sun Apr 12 16:10:02 2009 From: sobomax at FreeBSD.org (Maxim Sobolev) Date: Sun Apr 12 17:04:11 2009 Subject: svn commit: r190981 - in stable/7/sys: . boot/i386/btx/btxldr contrib/pf dev/cxgb Message-ID: <200904122310.n3CNA1Ei044138@svn.freebsd.org> Author: sobomax Date: Sun Apr 12 23:10:01 2009 New Revision: 190981 URL: http://svn.freebsd.org/changeset/base/190981 Log: MFC: Respect RBX_MUTE flag from boot[012]. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/btx/btxldr/btxldr.S stable/7/sys/contrib/pf/ (props changed) stable/7/sys/dev/cxgb/ (props changed) Modified: stable/7/sys/boot/i386/btx/btxldr/btxldr.S ============================================================================== --- stable/7/sys/boot/i386/btx/btxldr/btxldr.S Sun Apr 12 23:06:23 2009 (r190980) +++ stable/7/sys/boot/i386/btx/btxldr/btxldr.S Sun Apr 12 23:10:01 2009 (r190981) @@ -15,6 +15,9 @@ * $FreeBSD$ */ +#define RBX_MUTE 0x10 /* -m */ +#define OPT_SET(opt) (1 << (opt)) + /* * Prototype BTX loader program, written in a couple of hours. The * real thing should probably be more flexible, and in C. @@ -64,6 +67,8 @@ * BTX program loader for ELF clients. */ start: cld # String ops inc + testl $OPT_SET(RBX_MUTE), 4(%esp) # Check first argument + setnz muted # for RBX_MUTE, set flag movl $m_logo,%esi # Identify call putstr # ourselves movzwl BDA_MEM,%eax # Get base memory @@ -288,7 +293,9 @@ putstr: lodsb # Load char /* * Output character AL to the console. */ -putchr: pusha # Save +putchr: testb $1,muted # Check muted + jnz putchr.5 # do a nop + pusha # Save xorl %ecx,%ecx # Zero for loops movb $SCR_MAT,%ah # Mode/attribute movl $BDA_POS,%ebx # BDA pointer @@ -325,7 +332,7 @@ putchr.3: cmpb $SCR_ROW,%dh # Beyond sc movb $SCR_ROW-1,%dh # Bottom line putchr.4: movw %dx,(%ebx) # Update position popa # Restore - ret # To caller +putchr.5: ret # To caller /* * Convert EAX, AX, or AL to hex, saving the result to [EDI]. */ @@ -390,6 +397,12 @@ m_segs: .asciz "text segment: offset=" .asciz " memsz=\0\n" m_done: .asciz "Loading complete\n" #endif + +/* + * Flags + */ +muted: .byte 0x0 + /* * Uninitialized data area. */ From edwin at FreeBSD.org Mon Apr 13 02:22:04 2009 From: edwin at FreeBSD.org (Edwin Groothuis) Date: Mon Apr 13 03:11:52 2009 Subject: svn commit: r190992 - stable/7/share/zoneinfo Message-ID: <200904130922.n3D9M3IM064425@svn.freebsd.org> Author: edwin Date: Mon Apr 13 09:22:03 2009 New Revision: 190992 URL: http://svn.freebsd.org/changeset/base/190992 Log: MFC of tzdata2009d: - Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 - Tunisia will not observe DST this year. - Syria will start DST on 2009-03-27 00:00 this year - the Province of San Luis will go to utc-04:00 Approved by: re (kib) Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/southamerica Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Mon Apr 13 09:17:40 2009 (r190991) +++ stable/7/share/zoneinfo/africa Mon Apr 13 09:22:03 2009 (r190992) @@ -1,4 +1,4 @@ -# @(#)africa 8.17 +# @(#)africa 8.18 #
 
 # This data is by no means authoritative; if you think you know better,
@@ -564,6 +564,40 @@ Zone	Indian/Mayotte	3:00:56 -	LMT	1911 J
 # 
 # http://www.timeanddate.com/news/time/morocco-ends-dst-early-2008.html
 # 
+
+# From Steffen Thorsen (2009-03-17):
+# Morocco will observe DST from 2009-06-01 00:00 to 2009-08-21 00:00 according
+# to many sources, such as
+# 
+# http://news.marweb.com/morocco/entertainment/morocco-daylight-saving.html
+# 
+# 
+# http://www.medi1sat.ma/fr/depeche.aspx?idp=2312
+# 
+# (French)
+#
+# Our summary:
+# 
+# http://www.timeanddate.com/news/time/morocco-starts-dst-2009.html
+# 
+
+# From Alexander Krivenyshev (2009-03-17):
+# Here is a link to official document from Royaume du Maroc Premier Ministre,
+# Ministere de la Modernisation des Secteurs Publics
+#
+# Under Article 1 of Royal Decree No. 455-67 of Act 23 safar 1387 (2 june 1967)
+# concerning the amendment of the legal time, the Ministry of Modernization of
+# Public Sectors announced that the official time in the Kingdom will be
+# advanced 60 minutes from Sunday 31 May 2009 at midnight.
+#
+# 
+# http://www.mmsp.gov.ma/francais/Actualites_fr/PDF_Actualites_Fr/HeureEte_FR.pdf
+# 
+#
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_morocco03.html
+# 
+
 # RULE	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 
 Rule	Morocco	1939	only	-	Sep	12	 0:00	1:00	S
@@ -583,6 +617,8 @@ Rule	Morocco	1978	only	-	Jun	 1	 0:00	1:
 Rule	Morocco	1978	only	-	Aug	 4	 0:00	0	-
 Rule	Morocco	2008	only	-	Jun	 1	 0:00	1:00	S
 Rule	Morocco	2008	only	-	Sep	 1	 0:00	0	-
+Rule	Morocco	2009	only	-	Jun	 1	 0:00	1:00	S
+Rule	Morocco	2009	only	-	Aug	 21	 0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Africa/Casablanca	-0:30:20 -	LMT	1913 Oct 26
 			 0:00	Morocco	WE%sT	1984 Mar 16
@@ -787,6 +823,43 @@ Zone	Africa/Lome	0:04:52 -	LMT	1893
 # Ending         : the last Sunday of October at 03:00 ...
 # http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=1188&Itemid=50
 
+# From Steffen Thorsen (2009-03-16):
+# According to several news sources, Tunisia will not observe DST this year.
+# (Arabic)
+# 
+# http://www.elbashayer.com/?page=viewn&nid=42546
+# 
+# 
+# http://www.babnet.net/kiwidetail-15295.asp
+# 
+#
+# We have also confirmed this with the US embassy in Tunisia.
+# We have a wrap-up about this on the following page:
+# 
+# http://www.timeanddate.com/news/time/tunisia-cancels-dst-2009.html
+# 
+
+# From Alexander Krivenyshev (2009-03-17):
+# Here is a link to Tunis Afrique Presse News Agency
+#
+# Standard time to be kept the whole year long (tap.info.tn):
+#
+# (in English)
+# 
+# http://www.tap.info.tn/en/index.php?option=com_content&task=view&id=26813&Itemid=157
+# 
+#
+# (in Arabic)
+# 
+# http://www.tap.info.tn/ar/index.php?option=com_content&task=view&id=61240&Itemid=1
+# 
+
+# From Arthur David Olson (2009--3-18):
+# The Tunis Afrique Presse News Agency notice contains this: "This measure is due to the fact
+# that the fasting month of ramadan coincides with the period concerned by summer time.
+# Therefore, the standard time will be kept unchanged the whole year long."
+# So foregoing DST seems to be an exception (albeit one that may be repeated in the  future).
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Tunisia	1939	only	-	Apr	15	23:00s	1:00	S
 Rule	Tunisia	1939	only	-	Nov	18	23:00s	0	-
@@ -811,8 +884,10 @@ Rule	Tunisia	1989	only	-	Mar	26	 0:00s	1
 Rule	Tunisia	1990	only	-	May	 1	 0:00s	1:00	S
 Rule	Tunisia	2005	only	-	May	 1	 0:00s	1:00	S
 Rule	Tunisia	2005	only	-	Sep	30	 1:00s	0	-
-Rule	Tunisia	2006	max	-	Mar	lastSun	 2:00s	1:00	S
-Rule	Tunisia	2006	max	-	Oct	lastSun	 2:00s	0	-
+Rule	Tunisia	2006	2008	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Tunisia	2006	2008	-	Oct	lastSun	 2:00s	0	-
+Rule	Tunisia	2010	max	-	Mar	lastSun	 2:00s	1:00	S
+Rule	Tunisia	2010	max	-	Oct	lastSun	 2:00s	0	-
 # Shanks & Pottenger give 0:09:20 for Paris Mean Time; go with Howse's
 # more precise 0:09:21.
 # Shanks & Pottenger say the 1911 switch was on Mar 9; go with Howse's Mar 11.

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Mon Apr 13 09:17:40 2009	(r190991)
+++ stable/7/share/zoneinfo/asia	Mon Apr 13 09:22:03 2009	(r190992)
@@ -1,4 +1,4 @@
-# @(#)asia	8.25
+# @(#)asia	8.26
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -1969,8 +1969,29 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # http://sana.sy/ara/2/2008/10/07/195459.htm
 # 
 
-Rule	Syria	2008	max	-	Apr	Fri>=1	0:00	1:00	S
+# From Steffen Thorsen (2009-03-19):
+# Syria will start DST on 2009-03-27 00:00 this year according to many sources,
+# two examples:
+#
+# 
+# http://www.sana.sy/eng/21/2009/03/17/217563.htm
+# 
+# (English, Syrian Arab News # Agency)
+# 
+# http://thawra.alwehda.gov.sy/_View_news2.asp?FileName=94459258720090318012209
+# 
+# (Arabic, gov-site)
+#
+# We have not found any sources saying anything about when DST ends this year.
+#
+# Our summary
+# 
+# http://www.timeanddate.com/news/time/syria-dst-starts-march-27-2009.html
+# 
+
+Rule	Syria	2008	only	-	Apr	Fri>=1	0:00	1:00	S
 Rule	Syria	2008	max	-	Nov	1	0:00	0	-
+Rule	Syria	2009	max	-	Mar	lastFri	0:00	1:00	S
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Mon Apr 13 09:17:40 2009	(r190991)
+++ stable/7/share/zoneinfo/southamerica	Mon Apr 13 09:22:03 2009	(r190992)
@@ -1,4 +1,4 @@
-# @(#)southamerica	8.33
+# @(#)southamerica	8.34
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -351,6 +351,50 @@ Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:0
 # keep America/Cordoba a single region rather than splitting it into the
 # other 5 subregions.
 
+# From Mariano Absatz (2009-03-13):
+# Yesterday (with our usual 2-day notice) the Province of San Luis
+# decided that next Sunday instead of "staying" @utc-03:00 they will go
+# to utc-04:00 until the second Saturday in October...
+#
+# The press release is at
+# 
+# http://www.sanluis.gov.ar/SL/Paginas/NoticiaDetalle.asp?TemaId=1&InfoPrensaId=3102
+# 
+# (I couldn't find the decree, but
+# 
+# www.sanluis.gov.ar
+# 
+# is the official page for the Province Government).
+#
+# There's also a note in only one of the major national papers (La Nación) at
+# 
+# http://www.lanacion.com.ar/nota.asp?nota_id=1107912
+# 
+# 
+# The press release says:
+#  (...) anunció que el próximo domingo a las 00:00 los puntanos deberán
+# atrasar una hora sus relojes.
+#
+# A partir de entonces, San Luis establecerá el huso horario propio de
+# la Provincia. De esta manera, durante el periodo del calendario anual
+# 2009, el cambio horario quedará comprendido entre las 00:00 del tercer
+# domingo de marzo y las 24:00 del segundo sábado de octubre.
+# Quick&dirty translation
+# (...) announced that next Sunday, at 00:00, Puntanos (the San Luis
+# inhabitants) will have to turn back one hour their clocks
+#
+# Since then, San Luis will establish its own Province timezone. Thus,
+# during 2009, this timezone change will run from 00:00 the third Sunday
+# in March until 24:00 of the second Saturday in October.
+
+# From Arthur David Olson (2009-03-16):
+# The unofficial claim at
+# 
+# http://www.timeanddate.com/news/time/san-luis-new-time-zone.html
+# 
+# is that "The province will most likely follow the next daylight saving schedule,
+# which is planned for the second Sunday in October."
+
 #
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 #
@@ -498,7 +542,8 @@ Zone America/Argentina/San_Luis -4:25:24
 			-3:00	-	ART	2004 May 31
 			-4:00	-	WART	2004 Jul 25
 			-3:00	Arg	AR%sT	2008 Jan 21
-			-3:00	-	ART
+			-3:00	-	ART	2009 Mar 15
+			-4:00	Arg	WAR%sT
 #
 # Santa Cruz (SC)
 Zone America/Argentina/Rio_Gallegos -4:36:52 - LMT 1894 Oct 31
From edwin at FreeBSD.org  Mon Apr 13 03:41:26 2009
From: edwin at FreeBSD.org (Edwin Groothuis)
Date: Mon Apr 13 04:28:48 2009
Subject: svn commit: r190995 - stable/7/share/zoneinfo
Message-ID: <200904131041.n3DAfPKG069629@svn.freebsd.org>

Author: edwin
Date: Mon Apr 13 10:41:25 2009
New Revision: 190995
URL: http://svn.freebsd.org/changeset/base/190995

Log:
  MFC of tzdata2009e
  
  - Jordan went into DST in the last Thursday in March instead of the
    last Friday in March.
  - Palestine has extended the DST time with one week before and one
    month after.
  
  Approved by:	re (kip)

Modified:
  stable/7/share/zoneinfo/   (props changed)
  stable/7/share/zoneinfo/asia

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Mon Apr 13 09:45:03 2009	(r190994)
+++ stable/7/share/zoneinfo/asia	Mon Apr 13 10:41:25 2009	(r190995)
@@ -1,4 +1,4 @@
-# @(#)asia	8.26
+# @(#)asia	8.29
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -1049,6 +1049,40 @@ Zone	Asia/Tokyo	9:18:59	-	LMT	1887 Dec 3
 # http://www.petranews.gov.jo/nepras/2006/Sep/05/4000.htm
 # "Jordan will switch to winter time on Friday, October 27".
 #
+
+# From Phil Pizzey (2009-04-02):
+# ...I think I may have spotted an error in the timezone data for
+# Jordan.
+# The current (2009d) asia file shows Jordan going to daylight
+# saving
+# time on the last Thursday in March.
+#
+# Rule  Jordan      2000  max	-  Mar   lastThu     0:00s 1:00  S
+#
+# However timeanddate.com, which I usually find reliable, shows Jordan
+# going to daylight saving time on the last Friday in March since 2002.
+# Please see
+# 
+# http://www.timeanddate.com/worldclock/timezone.html?n=11
+# 
+
+# From Steffen Thorsen (2009-04-02):
+# This single one might be good enough, (2009-03-24, Arabic):
+# 
+# http://petra.gov.jo/Artical.aspx?Lng=2&Section=8&Artical=95279
+# 
+#
+# Google's translation:
+#
+# > The Council of Ministers decided in 2002 to adopt the principle of timely
+# > submission of the summer at 60 minutes as of midnight on the last Thursday
+# > of the month of March of each year.
+#
+# So - this means the midnight between Thursday and Friday since 2002.
+
+# From Arthur David Olson (2009-04-06):
+# We still have Jordan switching to DST on Thursdays in 2000 and 2001.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule	Jordan	1973	only	-	Jun	6	0:00	1:00	S
 Rule	Jordan	1973	1975	-	Oct	1	0:00	0	-
@@ -1071,8 +1105,9 @@ Rule	Jordan	1993	1998	-	Apr	Fri>=1	0:00	
 Rule	Jordan	1994	only	-	Sep	Fri>=15	0:00	0	-
 Rule	Jordan	1995	1998	-	Sep	Fri>=15	0:00s	0	-
 Rule	Jordan	1999	only	-	Jul	 1	0:00s	1:00	S
-Rule	Jordan	1999	2002	-	Sep	lastThu	0:00s	0	-
-Rule	Jordan	2000	max	-	Mar	lastThu	0:00s	1:00	S
+Rule	Jordan	1999	2002	-	Sep	lastFri	0:00s	0	-
+Rule	Jordan	2000	2001	-	Mar	lastThu	0:00s	1:00	S
+Rule	Jordan	2002	max	-	Mar	lastFri	0:00s	1:00	S
 Rule	Jordan	2003	only	-	Oct	24	0:00s	0	-
 Rule	Jordan	2004	only	-	Oct	15	0:00s	0	-
 Rule	Jordan	2005	only	-	Sep	lastFri	0:00s	0	-
@@ -1695,6 +1730,22 @@ Zone	Asia/Karachi	4:28:12 -	LMT	1907
 # http://www.worldtimezone.com/dst_news/dst_news_gazastrip01.html
 # 
 
+# From Alexander Krivenyshev (2009-03-26):
+# According to the Palestine News Network (arabic.pnn.ps), Palestinian
+# government decided to start Daylight Time on Thursday night March
+# 26 and continue until the night of 27 September 2009.
+#
+# (in Arabic)
+# 
+# http://arabic.pnn.ps/index.php?option=com_content&task=view&id=50850
+# 
+#
+# or
+# (English translation)
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_westbank01.html
+# 
+
 # The rules for Egypt are stolen from the `africa' file.
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule EgyptAsia	1957	only	-	May	10	0:00	1:00	S
@@ -1708,10 +1759,12 @@ Rule Palestine	1999	2005	-	Apr	Fri>=15	0
 Rule Palestine	1999	2003	-	Oct	Fri>=15	0:00	0	-
 Rule Palestine	2004	only	-	Oct	 1	1:00	0	-
 Rule Palestine	2005	only	-	Oct	 4	2:00	0	-
-Rule Palestine	2006	max	-	Apr	 1	0:00	1:00	S
+Rule Palestine	2006	2008	-	Apr	 1	0:00	1:00	S
 Rule Palestine	2006	only	-	Sep	22	0:00	0	-
 Rule Palestine	2007	only	-	Sep	Thu>=8	2:00	0	-
-Rule Palestine	2008	max	-	Aug	lastThu	2:00	0	-
+Rule Palestine	2008	only	-	Aug	lastFri	2:00	0	-
+Rule Palestine	2009	max	-	Mar	lastFri	0:00	1:00	S
+Rule Palestine	2009	max	-	Sep	lastMon	2:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Gaza	2:17:52	-	LMT	1900 Oct
From rwatson at FreeBSD.org  Mon Apr 13 04:54:24 2009
From: rwatson at FreeBSD.org (Robert Watson)
Date: Mon Apr 13 05:50:23 2009
Subject: svn commit: r190997 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
Message-ID: <200904131154.n3DBsMI2071073@svn.freebsd.org>

Author: rwatson
Date: Mon Apr 13 11:54:22 2009
New Revision: 190997
URL: http://svn.freebsd.org/changeset/base/190997

Log:
  Merge r190996 from head to stable/7:
  
    When writing out updated pollfd records when returning from
    poll(), only copy out the revents field, not the whole pollfd
    structure.  Otherwise, if the events field is updated
    concurrently by another thread, that update may be lost.
  
    This issue apparently causes problems for the JDK on FreeBSD,
    which expects the Linux behavior of not updating all fields
    (somewhat oddly, Solaris does not implement the required
    behavior, but presumably our adaptation of the JDK is based
    on the Linux port?).
  
    MFC after:      2 weeks
    PR:             kern/130924
    Submitted by:   Kurt Miller 
    Discussed with: kib
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/sys_generic.c

Modified: stable/7/sys/kern/sys_generic.c
==============================================================================
--- stable/7/sys/kern/sys_generic.c	Mon Apr 13 10:41:41 2009	(r190996)
+++ stable/7/sys/kern/sys_generic.c	Mon Apr 13 11:54:22 2009	(r190997)
@@ -73,6 +73,7 @@ static MALLOC_DEFINE(M_IOCTLOPS, "ioctlo
 static MALLOC_DEFINE(M_SELECT, "select", "select() buffer");
 MALLOC_DEFINE(M_IOV, "iov", "large iov's");
 
+static int	pollout(struct pollfd *, struct pollfd *, u_int);
 static int	pollscan(struct thread *, struct pollfd *, u_int);
 static int	selscan(struct thread *, fd_mask **, fd_mask **, int);
 static int	dofileread(struct thread *, int, struct file *, struct uio *,
@@ -992,7 +993,7 @@ done_nosellock:
 	if (error == EWOULDBLOCK)
 		error = 0;
 	if (error == 0) {
-		error = copyout(bits, uap->fds, ni);
+		error = pollout(bits, uap->fds, nfds);
 		if (error)
 			goto out;
 	}
@@ -1004,6 +1005,26 @@ done2:
 }
 
 static int
+pollout(fds, ufds, nfd)
+	struct pollfd *fds;
+	struct pollfd *ufds;
+	u_int nfd;
+{
+	int error = 0;
+	u_int i = 0;
+
+	for (i = 0; i < nfd; i++) {
+		error = copyout(&fds->revents, &ufds->revents,
+		    sizeof(ufds->revents));
+		if (error)
+			return (error);
+		fds++;
+		ufds++;
+	}
+	return (0);
+}
+
+static int
 pollscan(td, fds, nfd)
 	struct thread *td;
 	struct pollfd *fds;
From rwatson at FreeBSD.org  Mon Apr 13 04:56:21 2009
From: rwatson at FreeBSD.org (Robert Watson)
Date: Mon Apr 13 05:51:07 2009
Subject: svn commit: r190997 - in stable/7/sys: . contrib/pf
 dev/ath/ath_hal dev/cxgb kern
In-Reply-To: <200904131154.n3DBsMI2071073@svn.freebsd.org>
References: <200904131154.n3DBsMI2071073@svn.freebsd.org>
Message-ID: 

On Mon, 13 Apr 2009, Robert Watson wrote:

> Author: rwatson
> Date: Mon Apr 13 11:54:22 2009
> New Revision: 190997
> URL: http://svn.freebsd.org/changeset/base/190997
>
> Log:
>  Merge r190996 from head to stable/7:

Due to a clerical error, this is not the right revision number.  The actual 
merged revision is r189708.

Robert N M Watson
Computer Laboratory
University of Cambridge

>
>    When writing out updated pollfd records when returning from
>    poll(), only copy out the revents field, not the whole pollfd
>    structure.  Otherwise, if the events field is updated
>    concurrently by another thread, that update may be lost.
>
>    This issue apparently causes problems for the JDK on FreeBSD,
>    which expects the Linux behavior of not updating all fields
>    (somewhat oddly, Solaris does not implement the required
>    behavior, but presumably our adaptation of the JDK is based
>    on the Linux port?).
>
>    MFC after:      2 weeks
>    PR:             kern/130924
>    Submitted by:   Kurt Miller 
>    Discussed with: kib
>
>  Approved by:	re (kib)
>
> Modified:
>  stable/7/sys/   (props changed)
>  stable/7/sys/contrib/pf/   (props changed)
>  stable/7/sys/dev/ath/ath_hal/   (props changed)
>  stable/7/sys/dev/cxgb/   (props changed)
>  stable/7/sys/kern/sys_generic.c
>
> Modified: stable/7/sys/kern/sys_generic.c
> ==============================================================================
> --- stable/7/sys/kern/sys_generic.c	Mon Apr 13 10:41:41 2009	(r190996)
> +++ stable/7/sys/kern/sys_generic.c	Mon Apr 13 11:54:22 2009	(r190997)
> @@ -73,6 +73,7 @@ static MALLOC_DEFINE(M_IOCTLOPS, "ioctlo
> static MALLOC_DEFINE(M_SELECT, "select", "select() buffer");
> MALLOC_DEFINE(M_IOV, "iov", "large iov's");
>
> +static int	pollout(struct pollfd *, struct pollfd *, u_int);
> static int	pollscan(struct thread *, struct pollfd *, u_int);
> static int	selscan(struct thread *, fd_mask **, fd_mask **, int);
> static int	dofileread(struct thread *, int, struct file *, struct uio *,
> @@ -992,7 +993,7 @@ done_nosellock:
> 	if (error == EWOULDBLOCK)
> 		error = 0;
> 	if (error == 0) {
> -		error = copyout(bits, uap->fds, ni);
> +		error = pollout(bits, uap->fds, nfds);
> 		if (error)
> 			goto out;
> 	}
> @@ -1004,6 +1005,26 @@ done2:
> }
>
> static int
> +pollout(fds, ufds, nfd)
> +	struct pollfd *fds;
> +	struct pollfd *ufds;
> +	u_int nfd;
> +{
> +	int error = 0;
> +	u_int i = 0;
> +
> +	for (i = 0; i < nfd; i++) {
> +		error = copyout(&fds->revents, &ufds->revents,
> +		    sizeof(ufds->revents));
> +		if (error)
> +			return (error);
> +		fds++;
> +		ufds++;
> +	}
> +	return (0);
> +}
> +
> +static int
> pollscan(td, fds, nfd)
> 	struct thread *td;
> 	struct pollfd *fds;
>
From nwhitehorn at FreeBSD.org  Mon Apr 13 07:15:38 2009
From: nwhitehorn at FreeBSD.org (Nathan Whitehorn)
Date: Mon Apr 13 07:58:59 2009
Subject: svn commit: r191001 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb powerpc/powerpc
Message-ID: <200904131415.n3DEFaxk074035@svn.freebsd.org>

Author: nwhitehorn
Date: Mon Apr 13 14:15:36 2009
New Revision: 191001
URL: http://svn.freebsd.org/changeset/base/191001

Log:
  MFC r190946:
  
  Fix recognition of kernel-mode traps that pass through the KDB trap handler
  but do not actually invoke KDB. This includes recoverable machine checks
  encountered in kernel mode.
  
  This patch causes machines with Grackle host-PCI bridges to be able to
  correctly enumerate them again.
  
  Reviewed by:	marcel
  Approved by:	re

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/powerpc/powerpc/trap_subr.S

Modified: stable/7/sys/powerpc/powerpc/trap_subr.S
==============================================================================
--- stable/7/sys/powerpc/powerpc/trap_subr.S	Mon Apr 13 13:51:53 2009	(r191000)
+++ stable/7/sys/powerpc/powerpc/trap_subr.S	Mon Apr 13 14:15:36 2009	(r191001)
@@ -539,7 +539,7 @@ dbtrap:
 	mflr	%r28
 	mfcr	%r29
 	lwz	%r31,(PC_DBSAVE+CPUSAVE_R31)(%r1)
-	mtlr	%r31
+	mtsprg3	%r31			/* SPRG3 was clobbered by FRAME_LEAVE */
 	mfsprg1	%r1
 	b	realtrap
 dbleave:
From davidxu at FreeBSD.org  Mon Apr 13 07:25:37 2009
From: davidxu at FreeBSD.org (David Xu)
Date: Mon Apr 13 08:23:21 2009
Subject: svn commit: r191002 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
Message-ID: <200904131425.n3DEPaBq074280@svn.freebsd.org>

Author: davidxu
Date: Mon Apr 13 14:25:36 2009
New Revision: 191002
URL: http://svn.freebsd.org/changeset/base/191002

Log:
  MFC r190987 from head to stable/7:
  
      Make UMTX_OP_WAIT_UINT actually wait for an unsigned integer on 64-bits
      machine.
  
  Approved by:    re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/kern_umtx.c

Modified: stable/7/sys/kern/kern_umtx.c
==============================================================================
--- stable/7/sys/kern/kern_umtx.c	Mon Apr 13 14:15:36 2009	(r191001)
+++ stable/7/sys/kern/kern_umtx.c	Mon Apr 13 14:25:36 2009	(r191002)
@@ -975,7 +975,7 @@ do_wait(struct thread *td, void *addr, u
 	if (compat32 == 0)
 		tmp = fuword(addr);
         else
-		tmp = fuword32(addr);
+		tmp = (unsigned int)fuword32(addr);
 	if (tmp != id) {
 		umtxq_lock(&uq->uq_key);
 		umtxq_remove(uq);
From bz at FreeBSD.org  Mon Apr 13 13:19:30 2009
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Mon Apr 13 13:45:21 2009
Subject: svn commit: r191014 - stable/7/usr.sbin/ppp
Message-ID: <200904132019.n3DKJS5G082383@svn.freebsd.org>

Author: bz
Date: Mon Apr 13 20:19:28 2009
New Revision: 191014
URL: http://svn.freebsd.org/changeset/base/191014

Log:
  MFC r186308 by qingli:
  
    The ppp application relies on the if_tun interface to properly
    install a ptp host route between the end points. The ppp module
    upates this router based on user configuration later on. The
    rt_Update() seems to always set the RTF_GATEWAY flag, which is
    broken.
  
  PR:		bin/130159
  Approved by:	re (kensmith)

Modified:
  stable/7/usr.sbin/ppp/   (props changed)
  stable/7/usr.sbin/ppp/route.c

Modified: stable/7/usr.sbin/ppp/route.c
==============================================================================
--- stable/7/usr.sbin/ppp/route.c	Mon Apr 13 19:54:33 2009	(r191013)
+++ stable/7/usr.sbin/ppp/route.c	Mon Apr 13 20:19:28 2009	(r191014)
@@ -902,8 +902,10 @@ rt_Update(struct bundle *bundle, const s
     p += memcpy_roundup(p, dst, dst->sa_len);
   }
 
-  rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
+  if (gw != NULL && (gw->sa_family != AF_LINK))
+    rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
   p += memcpy_roundup(p, gw, gw->sa_len);
+
   if (mask) {
     rtmes.m_rtm.rtm_addrs |= RTA_NETMASK;
     p += memcpy_roundup(p, mask, mask->sa_len);
From mlaier at FreeBSD.org  Mon Apr 13 15:17:04 2009
From: mlaier at FreeBSD.org (Max Laier)
Date: Mon Apr 13 15:46:30 2009
Subject: svn commit: r191025 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb net
Message-ID: <200904132217.n3DMH3no085161@svn.freebsd.org>

Author: mlaier
Date: Mon Apr 13 22:17:03 2009
New Revision: 191025
URL: http://svn.freebsd.org/changeset/base/191025

Log:
  MFH r190903 & r190895:
    Remove interfaces from interface groups on detach.
  
  Reported by:	various
  Submitted by:	Mikolaj Golub (r190895)
  PR:		kern/130977, kern/131310
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/net/if.c

Modified: stable/7/sys/net/if.c
==============================================================================
--- stable/7/sys/net/if.c	Mon Apr 13 21:04:53 2009	(r191024)
+++ stable/7/sys/net/if.c	Mon Apr 13 22:17:03 2009	(r191025)
@@ -128,6 +128,7 @@ static void	if_start_deferred(void *cont
 static void	do_link_state_change(void *, int);
 static int	if_getgroup(struct ifgroupreq *, struct ifnet *);
 static int	if_getgroupmembers(struct ifgroupreq *);
+static void	if_delgroups(struct ifnet *);
 #ifdef INET6
 /*
  * XXX: declare here to avoid to include many inet6 related files..
@@ -828,6 +829,7 @@ if_detach(struct ifnet *ifp)
 	rt_ifannouncemsg(ifp, IFAN_DEPARTURE);
 	EVENTHANDLER_INVOKE(ifnet_departure_event, ifp);
 	devctl_notify("IFNET", ifp->if_xname, "DETACH", NULL);
+	if_delgroups(ifp);
 
 	IF_AFDATA_LOCK(ifp);
 	for (dp = domains; dp; dp = dp->dom_next) {
@@ -963,6 +965,53 @@ if_delgroup(struct ifnet *ifp, const cha
 }
 
 /*
+ * Remove an interface from all groups
+ */
+static void
+if_delgroups(struct ifnet *ifp)
+{
+	struct ifg_list		*ifgl;
+	struct ifg_member	*ifgm;
+	char groupname[IFNAMSIZ];
+
+	IFNET_WLOCK();
+	while (!TAILQ_EMPTY(&ifp->if_groups)) {
+		ifgl = TAILQ_FIRST(&ifp->if_groups);
+
+		strlcpy(groupname, ifgl->ifgl_group->ifg_group, IFNAMSIZ);
+
+		IF_ADDR_LOCK(ifp);
+		TAILQ_REMOVE(&ifp->if_groups, ifgl, ifgl_next);
+		IF_ADDR_UNLOCK(ifp);
+
+		TAILQ_FOREACH(ifgm, &ifgl->ifgl_group->ifg_members, ifgm_next)
+			if (ifgm->ifgm_ifp == ifp)
+				break;
+
+		if (ifgm != NULL) {
+			TAILQ_REMOVE(&ifgl->ifgl_group->ifg_members, ifgm,
+			    ifgm_next);
+			free(ifgm, M_TEMP);
+		}
+
+		if (--ifgl->ifgl_group->ifg_refcnt == 0) {
+			TAILQ_REMOVE(&ifg_head, ifgl->ifgl_group, ifg_next);
+			EVENTHANDLER_INVOKE(group_detach_event,
+			    ifgl->ifgl_group);
+			free(ifgl->ifgl_group, M_TEMP);
+		}
+		IFNET_WUNLOCK();
+
+		free(ifgl, M_TEMP);
+
+		EVENTHANDLER_INVOKE(group_change_event, groupname);
+
+		IFNET_WLOCK();
+	}
+	IFNET_WUNLOCK();
+}
+
+/*
  * Stores all groups from an interface in memory pointed
  * to by data
  */
From jfv at FreeBSD.org  Mon Apr 13 17:23:14 2009
From: jfv at FreeBSD.org (Jack F Vogel)
Date: Mon Apr 13 17:41:50 2009
Subject: svn commit: r191030 - stable/7/sys/dev/ixgbe
Message-ID: <200904140023.n3E0NDiT088341@svn.freebsd.org>

Author: jfv
Date: Tue Apr 14 00:23:13 2009
New Revision: 191030
URL: http://svn.freebsd.org/changeset/base/191030

Log:
  MFC ixgbe version 1.7.4 for FreeBSD 7.2, this is earlier
  than planned but coordinated with and approved by RE.
  
  Most important reason for this was so that FreeBSD 7.2
  will have native support for the 82599 controller which
  is part of the Nehalem launch.
  
  The driver now does pluggable optics, multispeed fiber,
  and header split. I am adding this to the GENERIC kernel
  only in the amd64 architecture since its where I expect
  most use and others were untested.
  
  Enjoy!
  
  Approved by: re

Added:
  stable/7/sys/dev/ixgbe/ixgbe_82599.c   (contents, props changed)
Modified:
  stable/7/sys/dev/ixgbe/LICENSE
  stable/7/sys/dev/ixgbe/ixgbe.c
  stable/7/sys/dev/ixgbe/ixgbe.h
  stable/7/sys/dev/ixgbe/ixgbe_82598.c
  stable/7/sys/dev/ixgbe/ixgbe_api.c
  stable/7/sys/dev/ixgbe/ixgbe_api.h
  stable/7/sys/dev/ixgbe/ixgbe_common.c
  stable/7/sys/dev/ixgbe/ixgbe_common.h
  stable/7/sys/dev/ixgbe/ixgbe_osdep.h
  stable/7/sys/dev/ixgbe/ixgbe_phy.c
  stable/7/sys/dev/ixgbe/ixgbe_phy.h
  stable/7/sys/dev/ixgbe/ixgbe_type.h

Modified: stable/7/sys/dev/ixgbe/LICENSE
==============================================================================
--- stable/7/sys/dev/ixgbe/LICENSE	Mon Apr 13 23:50:44 2009	(r191029)
+++ stable/7/sys/dev/ixgbe/LICENSE	Tue Apr 14 00:23:13 2009	(r191030)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2008, Intel Corporation 
+  Copyright (c) 2001-2009, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 

Modified: stable/7/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- stable/7/sys/dev/ixgbe/ixgbe.c	Mon Apr 13 23:50:44 2009	(r191029)
+++ stable/7/sys/dev/ixgbe/ixgbe.c	Tue Apr 14 00:23:13 2009	(r191030)
@@ -1,6 +1,6 @@
 /******************************************************************************
 
-  Copyright (c) 2001-2008, Intel Corporation 
+  Copyright (c) 2001-2009, Intel Corporation 
   All rights reserved.
   
   Redistribution and use in source and binary forms, with or without 
@@ -46,7 +46,7 @@ int             ixgbe_display_debug_stat
 /*********************************************************************
  *  Driver version
  *********************************************************************/
-char ixgbe_driver_version[] = "1.6.2";
+char ixgbe_driver_version[] = "1.7.4";
 
 /*********************************************************************
  *  PCI Device ID Table
@@ -71,6 +71,8 @@ static ixgbe_vendor_info_t ixgbe_vendor_
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM, 0, 0, 0},
 	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM, 0, 0, 0},
+	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4, 0, 0, 0},
+	{IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP, 0, 0, 0},
 	/* required last entry */
 	{0, 0, 0, 0, 0}
 };
@@ -104,7 +106,9 @@ static int      ixgbe_allocate_pci_resou
 static int      ixgbe_allocate_msix(struct adapter *);
 static int      ixgbe_allocate_legacy(struct adapter *);
 static int	ixgbe_allocate_queues(struct adapter *);
+#if __FreeBSD_version >= 602105
 static int	ixgbe_setup_msix(struct adapter *);
+#endif
 static void	ixgbe_free_pci_resources(struct adapter *);
 static void     ixgbe_local_timer(void *);
 static int      ixgbe_hardware_init(struct adapter *);
@@ -124,6 +128,7 @@ static void     ixgbe_initialize_receive
 static void     ixgbe_free_receive_structures(struct adapter *);
 static void     ixgbe_free_receive_buffers(struct rx_ring *);
 
+static void	ixgbe_init_moderation(struct adapter *);
 static void     ixgbe_enable_intr(struct adapter *);
 static void     ixgbe_disable_intr(struct adapter *);
 static void     ixgbe_update_stats_counters(struct adapter *);
@@ -146,7 +151,7 @@ static int	ixgbe_dma_malloc(struct adapt
 static void     ixgbe_dma_free(struct adapter *, struct ixgbe_dma_alloc *);
 static void	ixgbe_add_rx_process_limit(struct adapter *, const char *,
 		    const char *, int *, int);
-static boolean_t ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *);
+static int	ixgbe_tx_ctx_setup(struct tx_ring *, struct mbuf *);
 static boolean_t ixgbe_tso_setup(struct tx_ring *, struct mbuf *, u32 *);
 static void	ixgbe_set_ivar(struct adapter *, u16, u8, s8);
 static void	ixgbe_configure_ivars(struct adapter *);
@@ -157,6 +162,12 @@ static void	ixgbe_register_vlan(void *, 
 static void	ixgbe_unregister_vlan(void *, struct ifnet *, u16);
 #endif
 
+#ifdef IXGBE_TIMESYNC
+/* Precision Time sync support */
+static int ixgbe_tsync_init(struct adapter *);
+static void ixgbe_tsync_disable(struct adapter *);
+#endif
+
 static void	ixgbe_update_aim(struct rx_ring *);
 
 /* Support for pluggable optic modules */
@@ -165,14 +176,19 @@ static bool	ixgbe_sfp_probe(struct adapt
 /* Legacy (single vector interrupt handler */
 static void	ixgbe_legacy_irq(void *);
 
+#if __FreeBSD_version >= 602105
 /* The MSI/X Interrupt handlers */
 static void	ixgbe_msix_tx(void *);
 static void	ixgbe_msix_rx(void *);
 static void	ixgbe_msix_link(void *);
+#endif
 
-/* Legacy interrupts use deferred handlers */
-static void	ixgbe_handle_tx(void *context, int pending);
-static void	ixgbe_handle_rx(void *context, int pending);
+/* Deferred interrupt tasklets */
+static void	ixgbe_handle_tx(void *, int);
+static void	ixgbe_handle_rx(void *, int);
+static void	ixgbe_handle_link(void *, int);
+static void	ixgbe_handle_msf(void *, int);
+static void	ixgbe_handle_mod(void *, int);
 
 
 /*********************************************************************
@@ -213,8 +229,8 @@ static int ixgbe_enable_aim = TRUE;
 TUNABLE_INT("hw.ixgbe.enable_aim", &ixgbe_enable_aim);
 static int ixgbe_low_latency = IXGBE_LOW_LATENCY;
 TUNABLE_INT("hw.ixgbe.low_latency", &ixgbe_low_latency);
-static int ixgbe_ave_latency = IXGBE_LOW_LATENCY;
-TUNABLE_INT("hw.ixgbe.ave_latency", &ixgbe_low_latency);
+static int ixgbe_ave_latency = IXGBE_AVE_LATENCY;
+TUNABLE_INT("hw.ixgbe.ave_latency", &ixgbe_ave_latency);
 static int ixgbe_bulk_latency = IXGBE_BULK_LATENCY;
 TUNABLE_INT("hw.ixgbe.bulk_latency", &ixgbe_bulk_latency);
 
@@ -222,8 +238,8 @@ TUNABLE_INT("hw.ixgbe.bulk_latency", &ix
 static int ixgbe_rx_process_limit = 100;
 TUNABLE_INT("hw.ixgbe.rx_process_limit", &ixgbe_rx_process_limit);
 
-/* Flow control setting, default to full */
-static int ixgbe_flow_control = ixgbe_fc_none;
+/* Flow control setting, default to off */
+static int ixgbe_flow_control = ixgbe_fc_full;
 TUNABLE_INT("hw.ixgbe.flow_control", &ixgbe_flow_control);
 
 /*
@@ -239,11 +255,16 @@ TUNABLE_INT("hw.ixgbe.enable_lro", &ixgb
  * MSIX should be the default for best performance,
  * but this allows it to be forced off for testing.
  */
+#if __FreeBSD_version >= 602105
 static int ixgbe_enable_msix = 1;
+#else
+static int ixgbe_enable_msix = 0;
+#endif
 TUNABLE_INT("hw.ixgbe.enable_msix", &ixgbe_enable_msix);
 
 /*
  * Enable RX Header Split
+ *   WARNING: disable this if bridging or forwarding!!
  */
 static int ixgbe_rx_hdr_split = 1;
 TUNABLE_INT("hw.ixgbe.rx_hdr_split", &ixgbe_rx_hdr_split);
@@ -268,6 +289,13 @@ TUNABLE_INT("hw.ixgbe.rxd", &ixgbe_rxd);
 /* Total number of Interfaces - need for config sanity check */
 static int ixgbe_total_ports;
 
+/*
+** The number of scatter-gather segments
+** differs for 82598 and 82599, default to
+** the former.
+*/
+static int ixgbe_num_segs = IXGBE_82598_SCATTER;
+
 /*********************************************************************
  *  Device identification routine
  *
@@ -312,6 +340,7 @@ ixgbe_probe(device_t dev)
 				ixgbe_strings[ent->index],
 				ixgbe_driver_version);
 			device_set_desc_copy(dev, adapter_name);
+			++ixgbe_total_ports;
 			return (0);
 		}
 		ent++;
@@ -333,6 +362,7 @@ static int
 ixgbe_attach(device_t dev)
 {
 	struct adapter *adapter;
+	struct ixgbe_hw *hw;
 	int             error = 0;
 	u16		pci_device_id;
 	u32		ctrl_ext;
@@ -342,37 +372,34 @@ ixgbe_attach(device_t dev)
 	/* Allocate, clear, and link in our adapter structure */
 	adapter = device_get_softc(dev);
 	adapter->dev = adapter->osdep.dev = dev;
+	hw = &adapter->hw;
 
 	/* Core Lock Init*/
 	IXGBE_CORE_LOCK_INIT(adapter, device_get_nameunit(dev));
 
-	/* Keep track of number of ports and optics */
+	/* Keep track of optics */
 	pci_device_id = pci_get_device(dev);
 	switch (pci_device_id) {
 		case IXGBE_DEV_ID_82598_CX4_DUAL_PORT :
+		case IXGBE_DEV_ID_82598EB_CX4 :
 			adapter->optics = IFM_10G_CX4;
-			ixgbe_total_ports += 2;
 			break;
 		case IXGBE_DEV_ID_82598AF_DUAL_PORT :
-			adapter->optics = IFM_10G_SR;
-			ixgbe_total_ports += 2;
-			break;
+		case IXGBE_DEV_ID_82598_DA_DUAL_PORT :
 		case IXGBE_DEV_ID_82598AF_SINGLE_PORT :
+		case IXGBE_DEV_ID_82598AT :
 			adapter->optics = IFM_10G_SR;
-			ixgbe_total_ports += 1;
 			break;
 		case IXGBE_DEV_ID_82598EB_XF_LR :
 			adapter->optics = IFM_10G_LR;
-			ixgbe_total_ports += 1;
 			break;
-		case IXGBE_DEV_ID_82598EB_CX4 :
-			adapter->optics = IFM_10G_CX4;
-			ixgbe_total_ports += 1;
+		case IXGBE_DEV_ID_82599_SFP :
+			adapter->optics = IFM_10G_SR;
+			ixgbe_num_segs = IXGBE_82599_SCATTER;
 			break;
-		case IXGBE_DEV_ID_82598AT :
-			ixgbe_total_ports += 1;
-		case IXGBE_DEV_ID_82598_DA_DUAL_PORT :
-			ixgbe_total_ports += 2;
+		case IXGBE_DEV_ID_82599_KX4 :
+			adapter->optics = IFM_10G_CX4;
+			ixgbe_num_segs = IXGBE_82599_SCATTER;
 		default:
 			break;
 	}
@@ -474,7 +501,7 @@ ixgbe_attach(device_t dev)
 	}
 
 	/* Initialize the shared code */
-	error = ixgbe_init_shared_code(&adapter->hw);
+	error = ixgbe_init_shared_code(hw);
 	if (error == IXGBE_ERR_SFP_NOT_PRESENT) {
 		/*
 		** No optics in this port, set up
@@ -525,11 +552,11 @@ ixgbe_attach(device_t dev)
 	adapter->vlan_detach = EVENTHANDLER_REGISTER(vlan_unconfig,
 	    ixgbe_unregister_vlan, 0, EVENTHANDLER_PRI_FIRST);
 #endif
-                
+
 	/* let hardware know driver is loaded */
-	ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
+	ctrl_ext = IXGBE_READ_REG(hw, IXGBE_CTRL_EXT);
 	ctrl_ext |= IXGBE_CTRL_EXT_DRV_LOAD;
-	IXGBE_WRITE_REG(&adapter->hw, IXGBE_CTRL_EXT, ctrl_ext);
+	IXGBE_WRITE_REG(hw, IXGBE_CTRL_EXT, ctrl_ext);
 
 	INIT_DEBUGOUT("ixgbe_attach: end");
 	return (0);
@@ -590,6 +617,14 @@ ixgbe_detach(device_t dev)
 		}
 	}
 
+	/* Drain the Link queue */
+	if (adapter->tq) {
+		taskqueue_drain(adapter->tq, &adapter->link_task);
+		taskqueue_drain(adapter->tq, &adapter->mod_task);
+		taskqueue_drain(adapter->tq, &adapter->msf_task);
+		taskqueue_free(adapter->tq);
+	}
+
 	/* let hardware know driver is unloading */
 	ctrl_ext = IXGBE_READ_REG(&adapter->hw, IXGBE_CTRL_EXT);
 	ctrl_ext &= ~IXGBE_CTRL_EXT_DRV_LOAD;
@@ -662,6 +697,19 @@ ixgbe_start_locked(struct tx_ring *txr, 
 		IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
 		if (m_head == NULL)
 			break;
+		/*
+		 * Force a cleanup if number of TX descriptors
+		 * available is below the threshold. If it fails
+		 * to get above, then abort transmit.
+		 */
+		if (txr->tx_avail <= IXGBE_TX_CLEANUP_THRESHOLD) {
+			ixgbe_txeof(txr);
+			/* Make sure things have improved */
+			if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) {
+				txr->no_tx_desc_avail++;
+				break;
+			}
+		}
 
 		if (ixgbe_xmit(txr, &m_head)) {
 			if (m_head == NULL)
@@ -701,7 +749,8 @@ ixgbe_start(struct ifnet *ifp)
 	txr = &adapter->tx_rings[queue];
 
 	if (ifp->if_drv_flags & IFF_DRV_RUNNING) {
-		IXGBE_TX_LOCK(txr);
+		if (IXGBE_TX_TRYLOCK(txr) == 0)
+			return;
 		ixgbe_start_locked(txr, ifp);
 		IXGBE_TX_UNLOCK(txr);
 	}
@@ -803,6 +852,67 @@ ixgbe_ioctl(struct ifnet * ifp, u_long c
 #endif
 		break;
 	}
+#ifdef IXGBE_TIMESYNC
+	/*
+	** IOCTL support for Precision Time (IEEE 1588) Support
+	*/
+	case IXGBE_TIMESYNC_READTS:
+	    {
+		u32 rx_ctl, tx_ctl;
+		struct ixgbe_tsync_read *tdata;
+
+		tdata = (struct ixgbe_tsync_read *) ifr->ifr_data;
+
+		if (tdata->read_current_time) {
+                        getnanotime(&tdata->system_time);
+                        tdata->network_time = IXGBE_READ_REG(&adapter->hw,
+                            IXGBE_SYSTIML);
+                        tdata->network_time |=
+                            (u64)IXGBE_READ_REG(&adapter->hw,
+                            IXGBE_SYSTIMH ) << 32;
+		}
+  
+		rx_ctl = IXGBE_READ_REG(&adapter->hw, IXGBE_TSYNCRXCTL);
+		tx_ctl = IXGBE_READ_REG(&adapter->hw, IXGBE_TSYNCTXCTL);
+ 
+		if (rx_ctl & 0x1) {
+			u32 tmp;
+			unsigned char *tmp_cp;
+
+			tdata->rx_valid = 1;
+			tdata->rx_stamp = IXGBE_READ_REG(&adapter->hw,
+			    IXGBE_RXSTMPL);
+			tdata->rx_stamp |= (u64)IXGBE_READ_REG(&adapter->hw,
+                            IXGBE_RXSTMPH) << 32;
+
+			tmp = IXGBE_READ_REG(&adapter->hw, IXGBE_RXSATRL);
+			tmp_cp = (unsigned char *) &tmp;
+			tdata->srcid[0] = tmp_cp[0];
+			tdata->srcid[1] = tmp_cp[1];
+			tdata->srcid[2] = tmp_cp[2];
+			tdata->srcid[3] = tmp_cp[3];
+			tmp = IXGBE_READ_REG(&adapter->hw, IXGBE_RXSATRH);
+			tmp_cp = (unsigned char *) &tmp;
+			tdata->srcid[4] = tmp_cp[0];
+			tdata->srcid[5] = tmp_cp[1];
+			tdata->seqid = tmp >> 16;
+			tdata->seqid = htons(tdata->seqid);
+		} else
+                        tdata->rx_valid = 0;
+
+		if (tx_ctl & 0x1) {
+			tdata->tx_valid = 1;
+			tdata->tx_stamp = IXGBE_READ_REG(&adapter->hw,
+			    IXGBE_TXSTMPL);
+			tdata->tx_stamp |= (u64) IXGBE_READ_REG(&adapter->hw,
+			    IXGBE_TXSTMPH) << 32;
+		} else
+			tdata->tx_valid = 0;
+
+		return (0);
+	    }
+#endif  /* IXGBE_TIMESYNC */
+
 	default:
 		IOCTL_DEBUGOUT1("ioctl: UNKNOWN (0x%X)\n", (int)command);
 		error = ether_ioctl(ifp, command, data);
@@ -905,13 +1015,12 @@ ixgbe_watchdog(struct adapter *adapter)
 static void
 ixgbe_init_locked(struct adapter *adapter)
 {
-	struct rx_ring *rxr = adapter->rx_rings;
-	struct tx_ring *txr = adapter->tx_rings;
 	struct ifnet   *ifp = adapter->ifp;
 	device_t 	dev = adapter->dev;
 	struct ixgbe_hw *hw;
 	u32		k, txdctl, mhadd, gpie;
 	u32		rxdctl, rxctrl;
+	int		err;
 
 	INIT_DEBUGOUT("ixgbe_init: begin");
 
@@ -951,13 +1060,6 @@ ixgbe_init_locked(struct adapter *adapte
 
 	ixgbe_initialize_transmit_units(adapter);
 
-	/* TX irq moderation rate is fixed */
-	for (int i = 0; i < adapter->num_tx_queues; i++, txr++) {
-		IXGBE_WRITE_REG(&adapter->hw,
-		    IXGBE_EITR(txr->msix), ixgbe_ave_latency);
-		txr->watchdog_timer = FALSE;
-	}
-
 	/* Setup Multicast table */
 	ixgbe_set_multi(adapter);
 
@@ -980,23 +1082,21 @@ ixgbe_init_locked(struct adapter *adapte
 	/* Configure RX settings */
 	ixgbe_initialize_receive_units(adapter);
 
-	/* RX moderation will be adapted over time, set default */
-	for (int i = 0; i < adapter->num_rx_queues; i++, rxr++) {
-		IXGBE_WRITE_REG(&adapter->hw,
-		    IXGBE_EITR(rxr->msix), ixgbe_low_latency);
-	}
-
-	/* Set Link moderation */
-	IXGBE_WRITE_REG(&adapter->hw,
-	    IXGBE_EITR(adapter->linkvec), IXGBE_LINK_ITR);
+	/* Configure Interrupt Moderation */
+	ixgbe_init_moderation(adapter);
 
 	gpie = IXGBE_READ_REG(&adapter->hw, IXGBE_GPIE);
 
+	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
+		gpie |= IXGBE_SDP1_GPIEN;
+		gpie |= IXGBE_SDP2_GPIEN;
+	}
+
 	/* Enable Fan Failure Interrupt */
-	if (adapter->hw.phy.media_type == ixgbe_media_type_copper)
+	if (hw->device_id == IXGBE_DEV_ID_82598AT)
 		gpie |= IXGBE_SDP1_GPIEN;
 
-	if (adapter->msix) {
+	if (adapter->msix > 2) {
 		/* Enable Enhanced MSIX mode */
 		gpie |= IXGBE_GPIE_MSIX_MODE;
 		gpie |= IXGBE_GPIE_EIAME | IXGBE_GPIE_PBA_SUPPORT |
@@ -1058,9 +1158,40 @@ ixgbe_init_locked(struct adapter *adapte
 	/* Set up MSI/X routing */
 	if (ixgbe_enable_msix)
 		ixgbe_configure_ivars(adapter);
+	else {	/* Simple settings for Legacy/MSI */
+                ixgbe_set_ivar(adapter, 0, 0, 0);
+                ixgbe_set_ivar(adapter, 0, 0, 1);
+	}
 
 	ixgbe_enable_intr(adapter);
 
+	/*
+	** Check on any SFP devices that
+	** need to be kick-started
+	*/
+	err = hw->phy.ops.identify(hw);
+	if (err == IXGBE_ERR_SFP_NOT_SUPPORTED) {
+                device_printf(dev,
+		    "Unsupported SFP+ module type was detected.\n");
+		ixgbe_detach(dev);
+		return;
+        }
+	if (ixgbe_is_sfp(hw)) { 
+		if (hw->phy.multispeed_fiber) {
+			hw->mac.ops.setup_sfp(hw);
+			taskqueue_enqueue(adapter->tq, &adapter->msf_task);
+		} else
+			taskqueue_enqueue(adapter->tq, &adapter->mod_task);
+	} else
+		taskqueue_enqueue(adapter->tq, &adapter->link_task);
+
+
+#ifdef IXGBE_TIMESYNC
+	/* Initialize IEEE 1588 support */
+	if (adapter->hw.mac.type == ixgbe_mac_82599EB)
+		ixgbe_tsync_init(adapter);
+#endif
+
 	/* Now inform the stack we're ready */
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
 	ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
@@ -1081,7 +1212,7 @@ ixgbe_init(void *arg)
 
 
 /*
-** MSIX Interrupt Handlers
+** MSIX Interrupt Tasklets
 */
 
 static void
@@ -1136,7 +1267,8 @@ ixgbe_legacy_irq(void *arg)
 	struct ixgbe_hw	*hw = &adapter->hw;
 	struct 		tx_ring *txr = adapter->tx_rings;
 	struct		rx_ring *rxr = adapter->rx_rings;
-	u32       	reg_eicr;
+	bool		more;
+	u32       	reg_eicr, loop = MAX_LOOP;
 
 
 	reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
@@ -1148,7 +1280,15 @@ ixgbe_legacy_irq(void *arg)
 
 	if (ixgbe_rxeof(rxr, adapter->rx_process_limit))
 		taskqueue_enqueue(rxr->tq, &rxr->rx_task);
-	if (ixgbe_txeof(txr))
+
+	IXGBE_TX_LOCK(txr);
+	++txr->tx_irq;
+	do {
+		more = ixgbe_txeof(txr);
+	} while (loop-- && more);
+	IXGBE_TX_UNLOCK(txr);
+
+	if (more)
 		taskqueue_enqueue(txr->tq, &txr->tx_task);
 
 	/* Check for fan failure */
@@ -1160,20 +1300,27 @@ ixgbe_legacy_irq(void *arg)
 	}
 
 	/* Link status change */
-	if (reg_eicr & IXGBE_EICR_LSC)
+	if (reg_eicr & IXGBE_EICR_LSC) {
+		ixgbe_check_link(&adapter->hw,
+		    &adapter->link_speed, &adapter->link_up, 0);
         	ixgbe_update_link_status(adapter);
+	}
+
+	/* Update interrupt rate */
+	if (ixgbe_enable_aim == TRUE)
+		ixgbe_update_aim(rxr);
 
 	ixgbe_enable_intr(adapter);
 	return;
 }
 
 
+#if __FreeBSD_version >= 602105
 /*********************************************************************
  *
  *  MSI TX Interrupt Service routine
  *
  **********************************************************************/
-
 void
 ixgbe_msix_tx(void *arg)
 {
@@ -1181,6 +1328,8 @@ ixgbe_msix_tx(void *arg)
 	struct adapter  *adapter = txr->adapter;
 	bool		more;
 
+	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, txr->eims);
+
 	IXGBE_TX_LOCK(txr);
 	++txr->tx_irq;
 	more = ixgbe_txeof(txr);
@@ -1198,7 +1347,6 @@ ixgbe_msix_tx(void *arg)
  *  MSIX RX Interrupt Service routine
  *
  **********************************************************************/
-
 static void
 ixgbe_msix_rx(void *arg)
 {
@@ -1206,18 +1354,72 @@ ixgbe_msix_rx(void *arg)
 	struct adapter  *adapter = rxr->adapter;
 	bool		more;
 
+       	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, rxr->eims);
+
 	++rxr->rx_irq;
-	more = ixgbe_rxeof(rxr, -1);
+	more = ixgbe_rxeof(rxr, adapter->rx_process_limit);
+
+	/* Update interrupt rate */
+	if (ixgbe_enable_aim == TRUE)
+		ixgbe_update_aim(rxr);
+
 	if (more)
 		taskqueue_enqueue(rxr->tq, &rxr->rx_task);
 	else
         	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, rxr->eims);
-	/* Update interrupt rate */
-	if (ixgbe_enable_aim == TRUE)
-		ixgbe_update_aim(rxr);
 	return;
 }
 
+
+static void
+ixgbe_msix_link(void *arg)
+{
+	struct adapter	*adapter = arg;
+	struct ixgbe_hw *hw = &adapter->hw;
+	u32		reg_eicr;
+
+	++adapter->link_irq;
+
+	/* First get the cause */
+	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMC, IXGBE_EIMS_OTHER);
+	reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICS);
+	/* Clear with write */
+	IXGBE_WRITE_REG(hw, IXGBE_EICR, reg_eicr);
+
+	/* Link status change */
+	if (reg_eicr & IXGBE_EICR_LSC)
+		taskqueue_enqueue(adapter->tq, &adapter->link_task);
+
+	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
+		if (reg_eicr & IXGBE_EICR_ECC) {
+                	device_printf(adapter->dev, "\nCRITICAL: ECC ERROR!! "
+			    "Please Reboot!!\n");
+			IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_ECC);
+		}
+		if (reg_eicr & IXGBE_EICR_GPI_SDP1) {
+                	/* Clear the interrupt */
+                	IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
+			taskqueue_enqueue(adapter->tq, &adapter->msf_task);
+        	} else if (reg_eicr & IXGBE_EICR_GPI_SDP2) {
+                	/* Clear the interrupt */
+                	IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP2);
+			taskqueue_enqueue(adapter->tq, &adapter->mod_task);
+		}
+        } 
+
+	/* Check for fan failure */
+	if ((hw->device_id == IXGBE_DEV_ID_82598AT) &&
+	    (reg_eicr & IXGBE_EICR_GPI_SDP1)) {
+                device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! "
+		    "REPLACE IMMEDIATELY!!\n");
+		IXGBE_WRITE_REG(hw, IXGBE_EICR, IXGBE_EICR_GPI_SDP1);
+	}
+
+	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
+	return;
+}
+#endif /* FreeBSD_version >= 602105 */
+
 /*
 ** Routine to do adjust the RX EITR value based on traffic,
 ** its a simple three state model, but seems to help.
@@ -1267,33 +1469,36 @@ ixgbe_update_aim(struct rx_ring *rxr)
 	return;
 }
 
-
 static void
-ixgbe_msix_link(void *arg)
+ixgbe_init_moderation(struct adapter *adapter)
 {
-	struct adapter	*adapter = arg;
-	struct ixgbe_hw *hw = &adapter->hw;
-	u32		reg_eicr;
-
-	++adapter->link_irq;
+	struct rx_ring *rxr = adapter->rx_rings;
+	struct tx_ring *txr = adapter->tx_rings;
 
-	reg_eicr = IXGBE_READ_REG(hw, IXGBE_EICR);
+	/* Single interrupt - MSI or Legacy? */
+	if (adapter->msix < 2) {
+		IXGBE_WRITE_REG(&adapter->hw, IXGBE_EITR(0), 100);
+		return;
+	}
 
-	if (reg_eicr & IXGBE_EICR_LSC)
-        	ixgbe_update_link_status(adapter);
+	/* TX irq moderation rate is fixed */
+	for (int i = 0; i < adapter->num_tx_queues; i++, txr++) {
+		IXGBE_WRITE_REG(&adapter->hw,
+		    IXGBE_EITR(txr->msix), ixgbe_ave_latency);
+		txr->watchdog_timer = FALSE;
+	}
 
-	/* Check for fan failure */
-	if ((hw->phy.media_type == ixgbe_media_type_copper) &&
-	    (reg_eicr & IXGBE_EICR_GPI_SDP1)) {
-                device_printf(adapter->dev, "\nCRITICAL: FAN FAILURE!! "
-		    "REPLACE IMMEDIATELY!!\n");
-		IXGBE_WRITE_REG(hw, IXGBE_EIMS, IXGBE_EICR_GPI_SDP1);
+	/* RX moderation will be adapted over time, set default */
+	for (int i = 0; i < adapter->num_rx_queues; i++, rxr++) {
+		IXGBE_WRITE_REG(&adapter->hw,
+		    IXGBE_EITR(rxr->msix), ixgbe_low_latency);
 	}
 
-	IXGBE_WRITE_REG(&adapter->hw, IXGBE_EIMS, IXGBE_EIMS_OTHER);
-	return;
-}
+	/* Set Link moderation */
+	IXGBE_WRITE_REG(&adapter->hw,
+	    IXGBE_EITR(adapter->linkvec), IXGBE_LINK_ITR);
 
+}
 
 /*********************************************************************
  *
@@ -1382,12 +1587,12 @@ static int
 ixgbe_xmit(struct tx_ring *txr, struct mbuf **m_headp)
 {
 	struct adapter  *adapter = txr->adapter;
-	u32		olinfo_status = 0, cmd_type_len = 0;
+	u32		olinfo_status = 0, cmd_type_len;
 	u32		paylen = 0;
 	int             i, j, error, nsegs;
-	int		first, last = 0;
+	int		first, last = 0, offload = 0;
 	struct mbuf	*m_head;
-	bus_dma_segment_t segs[IXGBE_MAX_SCATTER];
+	bus_dma_segment_t segs[ixgbe_num_segs];
 	bus_dmamap_t	map;
 	struct ixgbe_tx_buf *txbuf, *txbuf_mapped;
 	union ixgbe_adv_tx_desc *txd = NULL;
@@ -1395,26 +1600,12 @@ ixgbe_xmit(struct tx_ring *txr, struct m
 	m_head = *m_headp;
 
 	/* Basic descriptor defines */
-        cmd_type_len |= IXGBE_ADVTXD_DTYP_DATA;
-        cmd_type_len |= IXGBE_ADVTXD_DCMD_IFCS | IXGBE_ADVTXD_DCMD_DEXT;
+        cmd_type_len = (IXGBE_ADVTXD_DTYP_DATA |
+	    IXGBE_ADVTXD_DCMD_IFCS | IXGBE_ADVTXD_DCMD_DEXT);
 
 	if (m_head->m_flags & M_VLANTAG)
         	cmd_type_len |= IXGBE_ADVTXD_DCMD_VLE;
 
-	/*
-	 * Force a cleanup if number of TX descriptors
-	 * available is below the threshold. If it fails
-	 * to get above, then abort transmit.
-	 */
-	if (txr->tx_avail <= IXGBE_TX_CLEANUP_THRESHOLD) {
-		ixgbe_txeof(txr);
-		/* Make sure things have improved */
-		if (txr->tx_avail <= IXGBE_TX_OP_THRESHOLD) {
-			txr->no_tx_desc_avail++;
-			return (ENOBUFS);
-		}
-	}
-
         /*
          * Important to capture the first descriptor
          * used because it will contain the index of
@@ -1475,19 +1666,27 @@ ixgbe_xmit(struct tx_ring *txr, struct m
 	m_head = *m_headp;
 
 	/*
-	** Set the appropriate offload context
+	** Set up the appropriate offload context
 	** this becomes the first descriptor of 
 	** a packet.
 	*/
-	if (ixgbe_tso_setup(txr, m_head, &paylen)) {
-		cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE;
-		olinfo_status |= IXGBE_TXD_POPTS_IXSM << 8;
-		olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8;
-		olinfo_status |= paylen << IXGBE_ADVTXD_PAYLEN_SHIFT;
-		++adapter->tso_tx;
-	} else if (ixgbe_tx_ctx_setup(txr, m_head))
+	if (m_head->m_pkthdr.csum_flags & CSUM_TSO) {
+		if (ixgbe_tso_setup(txr, m_head, &paylen)) {
+			cmd_type_len |= IXGBE_ADVTXD_DCMD_TSE;
+			olinfo_status |= IXGBE_TXD_POPTS_IXSM << 8;
 			olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8;
-
+			olinfo_status |= paylen << IXGBE_ADVTXD_PAYLEN_SHIFT;
+			++adapter->tso_tx;
+		} else
+			return (ENXIO);
+	} else /* Offloads other than TSO */
+		offload = ixgbe_tx_ctx_setup(txr, m_head);
+	if (offload == TRUE)
+		olinfo_status |= IXGBE_TXD_POPTS_TXSM << 8;
+#ifdef IXGBE_TIMESYNC
+	if (offload == IXGBE_TIMESTAMP)
+		cmd_type_len |= IXGBE_ADVTXD_TSTAMP;
+#endif
         /* Record payload length */
 	if (paylen == 0)
         	olinfo_status |= m_head->m_pkthdr.len <<
@@ -1513,6 +1712,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m
 			i = 0;
 
 		txbuf->m_head = NULL;
+		txbuf->eop_index = -1;
 	}
 
 	txd->read.cmd_type_len |=
@@ -1526,6 +1726,7 @@ ixgbe_xmit(struct tx_ring *txr, struct m
 
         /* Set the index of the descriptor that will be marked done */
         txbuf = &txr->tx_buffers[first];
+	txbuf->eop_index = last;
 
         bus_dmamap_sync(txr->txdma.dma_tag, txr->txdma.dma_map,
             BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
@@ -1685,17 +1886,20 @@ out:
 	callout_reset(&adapter->timer, hz, ixgbe_local_timer, adapter);
 }
 
+/*
+** Note: this routine updates the OS on the link state
+**	the real check of the hardware only happens with
+**	a link interrupt.
+*/
 static void
 ixgbe_update_link_status(struct adapter *adapter)
 {
-	boolean_t link_up = FALSE;
 	struct ifnet	*ifp = adapter->ifp;
 	struct tx_ring *txr = adapter->tx_rings;
 	device_t dev = adapter->dev;
 
-	ixgbe_check_link(&adapter->hw, &adapter->link_speed, &link_up, 0);
 
-	if (link_up){ 
+	if (adapter->link_up){ 
 		if (adapter->link_active == FALSE) {
 			if (bootverbose)
 				device_printf(dev,"Link is up %d Gbps %s \n",
@@ -1720,7 +1924,6 @@ ixgbe_update_link_status(struct adapter 
 }
 
 
-
 /*********************************************************************
  *
  *  This routine disables all traffic on the adapter by issuing a
@@ -1743,6 +1946,11 @@ ixgbe_stop(void *arg)
 	/* Tell the stack that the interface is no longer active */
 	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
 
+#ifdef IXGBE_TIMESYNC
+	/* Disable IEEE 1588 support */
+	if (adapter->hw.mac.type == ixgbe_mac_82599EB)
+		ixgbe_tsync_disable(adapter);
+#endif
 	ixgbe_reset_hw(&adapter->hw);
 	adapter->hw.adapter_stopped = FALSE;
 	ixgbe_stop_adapter(&adapter->hw);
@@ -1817,8 +2025,13 @@ ixgbe_allocate_legacy(struct adapter *ad
             device_get_nameunit(adapter->dev));
 	taskqueue_start_threads(&rxr->tq, 1, PI_NET, "%s rxq",
             device_get_nameunit(adapter->dev));
+
 	if ((error = bus_setup_intr(dev, adapter->res[0],
+#if __FreeBSD_version >= 700000
             INTR_TYPE_NET | INTR_MPSAFE, NULL, ixgbe_legacy_irq,
+#else
+            INTR_TYPE_NET | INTR_MPSAFE, ixgbe_legacy_irq,
+#endif
             adapter, &adapter->tag[0])) != 0) {
 		device_printf(dev, "Failed to register fast interrupt "
 		    "handler: %d\n", error);
@@ -1833,6 +2046,7 @@ ixgbe_allocate_legacy(struct adapter *ad
 }
 
 
+#if __FreeBSD_version >= 602105
 /*********************************************************************
  *
  *  Setup MSIX Interrupt resources and handlers 
@@ -1859,7 +2073,10 @@ ixgbe_allocate_msix(struct adapter *adap
 		}
 		/* Set the handler function */
 		error = bus_setup_intr(dev, adapter->res[vector],
-		    INTR_TYPE_NET | INTR_MPSAFE, NULL,
+		    INTR_TYPE_NET | INTR_MPSAFE,
+#if __FreeBSD_version > 700000
+		    NULL,
+#endif
 		    ixgbe_msix_tx, txr, &adapter->tag[vector]);
 		if (error) {
 			adapter->res[vector] = NULL;
@@ -1867,7 +2084,7 @@ ixgbe_allocate_msix(struct adapter *adap
 			return (error);
 		}
 		txr->msix = vector;
-		txr->eims = IXGBE_IVAR_TX_QUEUE(vector);
+		txr->eims = 1 << vector;
 		TASK_INIT(&txr->tx_task, 0, ixgbe_handle_tx, txr);
 		txr->tq = taskqueue_create_fast("ixgbe_txq", M_NOWAIT,
 		    taskqueue_thread_enqueue, &txr->tq);
@@ -1888,15 +2105,18 @@ ixgbe_allocate_msix(struct adapter *adap
 		}
 		/* Set the handler function */
 		error = bus_setup_intr(dev, adapter->res[vector],
-		    INTR_TYPE_NET | INTR_MPSAFE, NULL, ixgbe_msix_rx,
-		    rxr, &adapter->tag[vector]);
+		    INTR_TYPE_NET | INTR_MPSAFE,
+#if __FreeBSD_version > 700000
+		    NULL,
+#endif
+		    ixgbe_msix_rx, rxr, &adapter->tag[vector]);
 		if (error) {
 			adapter->res[vector] = NULL;
 			device_printf(dev, "Failed to register RX handler");
 			return (error);
 		}
 		rxr->msix = vector;
-		rxr->eims = IXGBE_IVAR_RX_QUEUE(vector);
+		rxr->eims = 1 << vector;
 		/* used in local timer */
 		adapter->rx_mask |= rxr->eims;
 		TASK_INIT(&rxr->rx_task, 0, ixgbe_handle_rx, rxr);
@@ -1916,19 +2136,37 @@ ixgbe_allocate_msix(struct adapter *adap
 	}
 	/* Set the link handler function */
 	error = bus_setup_intr(dev, adapter->res[vector],
-	    INTR_TYPE_NET | INTR_MPSAFE, NULL, ixgbe_msix_link,
-	    adapter, &adapter->tag[vector]);
+	    INTR_TYPE_NET | INTR_MPSAFE,
+#if __FreeBSD_version > 700000
+		    NULL,
+#endif
+	    ixgbe_msix_link, adapter, &adapter->tag[vector]);
 	if (error) {
 		adapter->res[vector] = NULL;
 		device_printf(dev, "Failed to register LINK handler");
 		return (error);
 	}
 	adapter->linkvec = vector;
+	/* Tasklets for Link, SFP and Multispeed Fiber */
+	TASK_INIT(&adapter->link_task, 0, ixgbe_handle_link, adapter);
+	TASK_INIT(&adapter->mod_task, 0, ixgbe_handle_mod, adapter);
+	TASK_INIT(&adapter->msf_task, 0, ixgbe_handle_msf, adapter);
+	adapter->tq = taskqueue_create_fast("ixgbe_link", M_NOWAIT,
+	    taskqueue_thread_enqueue, &adapter->tq);
+	taskqueue_start_threads(&adapter->tq, 1, PI_NET, "%s linkq",
+	    device_get_nameunit(adapter->dev));
 
 	return (0);
 }
+#else  /* Freebsd 6.1/2 */
+static int
+ixgbe_allocate_msix(struct adapter *adapter)
+{
+	return (1);
+}
+#endif
 
-
+#if __FreeBSD_version >= 602105
 /*
  * Setup Either MSI/X or MSI
  */
@@ -1996,6 +2234,7 @@ msi:
                	device_printf(adapter->dev,"Using MSI interrupt\n");
 	return (msgs);
 }
+#endif /* FreeBSD_version >= 602105 */
 
 static int
 ixgbe_allocate_pci_resources(struct adapter *adapter)
@@ -2031,9 +2270,10 @@ ixgbe_allocate_pci_resources(struct adap
 	adapter->num_tx_queues = 1;
 	adapter->num_rx_queues = 1;
 
+#if __FreeBSD_version >= 602105
 	/* Now setup MSI or MSI/X */
 	adapter->msix = ixgbe_setup_msix(adapter);
-
+#endif
 	adapter->hw.back = &adapter->osdep;
 	return (0);
 }
@@ -2051,7 +2291,10 @@ ixgbe_free_pci_resources(struct adapter 
 	if (adapter->msix == 0)
 		adapter->msix = 1;
 
-	rid = PCIR_BAR(MSIX_82598_BAR);
+	if (adapter->hw.mac.type == ixgbe_mac_82598EB)
+		rid = PCIR_BAR(MSIX_82598_BAR);
+	else
+		rid = PCIR_BAR(MSIX_82599_BAR);
 
 	/*
 	 * First release all the interrupt resources:
@@ -2071,12 +2314,14 @@ ixgbe_free_pci_resources(struct adapter 
 		}
 	}
 
+#if __FreeBSD_version >= 602105
 	if (adapter->msix)
 		pci_release_msi(dev);
 
 	if (adapter->msix_mem != NULL)
 		bus_release_resource(dev, SYS_RES_MEMORY,
 		    rid, adapter->msix_mem);
+#endif
 
 	if (adapter->pci_mem != NULL)
 		bus_release_resource(dev, SYS_RES_MEMORY,
@@ -2215,7 +2460,7 @@ ixgbe_dma_malloc(struct adapter *adapter
 	int             r;
 
 	r = bus_dma_tag_create(NULL,	/* parent */
-			       PAGE_SIZE, 0,	/* alignment, bounds */
+			       1, 0,	/* alignment, bounds */
 			       BUS_SPACE_MAXADDR,	/* lowaddr */
 			       BUS_SPACE_MAXADDR,	/* highaddr */
 			       NULL, NULL,	/* filter, filterarg */
@@ -2415,12 +2660,12 @@ ixgbe_allocate_transmit_buffers(struct t
 	 * Setup DMA descriptor areas.
 	 */
 	if ((error = bus_dma_tag_create(NULL,		/* parent */
-			       PAGE_SIZE, 0,		/* alignment, bounds */
+			       1, 0,		/* alignment, bounds */
 			       BUS_SPACE_MAXADDR,	/* lowaddr */
 			       BUS_SPACE_MAXADDR,	/* highaddr */
 			       NULL, NULL,		/* filter, filterarg */
 			       IXGBE_TSO_SIZE,		/* maxsize */
-			       IXGBE_MAX_SCATTER,	/* nsegments */
+			       ixgbe_num_segs,		/* nsegments */
 			       PAGE_SIZE,		/* maxsegsize */
 			       0,			/* flags */
 			       NULL,			/* lockfunc */
@@ -2484,6 +2729,8 @@ ixgbe_setup_transmit_ring(struct tx_ring
 			m_freem(txbuf->m_head);
 			txbuf->m_head = NULL;
 		}
+		/* Clear the EOP index */
+		txbuf->eop_index = -1;

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
From jfv at FreeBSD.org  Mon Apr 13 17:25:04 2009
From: jfv at FreeBSD.org (Jack F Vogel)
Date: Mon Apr 13 17:55:12 2009
Subject: svn commit: r191031 - stable/7/sys/conf
Message-ID: <200904140024.n3E0OxY4088425@svn.freebsd.org>

Author: jfv
Date: Tue Apr 14 00:24:59 2009
New Revision: 191031
URL: http://svn.freebsd.org/changeset/base/191031

Log:
  Add extra file for the ixgbe driver checkin
  
  Approved by: re

Modified:
  stable/7/sys/conf/files

Modified: stable/7/sys/conf/files
==============================================================================
--- stable/7/sys/conf/files	Tue Apr 14 00:23:13 2009	(r191030)
+++ stable/7/sys/conf/files	Tue Apr 14 00:24:59 2009	(r191031)
@@ -911,6 +911,8 @@ dev/ixgbe/ixgbe_common.c	optional ixgbe 
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/ixgbe/ixgbe_82598.c		optional ixgbe \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
+dev/ixgbe/ixgbe_82598.c		optional ixgbe \
+	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/jme/if_jme.c		optional jme pci
 dev/joy/joy.c			optional joy
 dev/joy/joy_isa.c		optional joy isa
From jfv at FreeBSD.org  Mon Apr 13 17:27:06 2009
From: jfv at FreeBSD.org (Jack F Vogel)
Date: Mon Apr 13 18:08:34 2009
Subject: svn commit: r191032 - stable/7/sys/modules/ixgbe
Message-ID: <200904140027.n3E0R5qX088511@svn.freebsd.org>

Author: jfv
Date: Tue Apr 14 00:27:05 2009
New Revision: 191032
URL: http://svn.freebsd.org/changeset/base/191032

Log:
  Update Makefile with new file for ixgbe driver
  
  Approved by: re

Modified:
  stable/7/sys/modules/ixgbe/Makefile

Modified: stable/7/sys/modules/ixgbe/Makefile
==============================================================================
--- stable/7/sys/modules/ixgbe/Makefile	Tue Apr 14 00:24:59 2009	(r191031)
+++ stable/7/sys/modules/ixgbe/Makefile	Tue Apr 14 00:27:05 2009	(r191032)
@@ -4,7 +4,9 @@ KMOD    = ixgbe
 SRCS    = device_if.h bus_if.h pci_if.h opt_bdg.h
 SRCS    += ixgbe.c 
 # Shared source
-SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c ixgbe_82598.c
+SRCS    += ixgbe_common.c ixgbe_api.c ixgbe_phy.c
+SRCS    += ixgbe_82598.c ixgbe_82599.c
+
 CFLAGS+= -I${.CURDIR}/../../dev/ixgbe
 
 clean:
From jfv at FreeBSD.org  Mon Apr 13 17:35:57 2009
From: jfv at FreeBSD.org (Jack F Vogel)
Date: Mon Apr 13 18:10:02 2009
Subject: svn commit: r191034 - stable/7/sys/amd64/conf
Message-ID: <200904140035.n3E0ZuVf088775@svn.freebsd.org>

Author: jfv
Date: Tue Apr 14 00:35:56 2009
New Revision: 191034
URL: http://svn.freebsd.org/changeset/base/191034

Log:
  Add ixgbe and remove ixgb driver support from GENERIC
  in the amd64 architecture.
  
  Approved by: re

Modified:
  stable/7/sys/amd64/conf/GENERIC

Modified: stable/7/sys/amd64/conf/GENERIC
==============================================================================
--- stable/7/sys/amd64/conf/GENERIC	Tue Apr 14 00:27:59 2009	(r191033)
+++ stable/7/sys/amd64/conf/GENERIC	Tue Apr 14 00:35:56 2009	(r191034)
@@ -184,7 +184,7 @@ device		ppi		# Parallel port interface d
 device		de		# DEC/Intel DC21x4x (``Tulip'')
 device		em		# Intel PRO/1000 Gigabit Ethernet Family
 device		igb		# Intel PRO/1000 PCIE Server Gigabit Family
-device		ixgb		# Intel PRO/10GbE Ethernet Card
+device		ixgbe		# Intel PRO/10GbE PCIE Ethernet Family
 device		le		# AMD Am7900 LANCE and Am79C9xx PCnet
 device		txp		# 3Com 3cR990 (``Typhoon'')
 device		vx		# 3Com 3c590, 3c595 (``Vortex'')
From jfv at FreeBSD.org  Mon Apr 13 17:38:04 2009
From: jfv at FreeBSD.org (Jack F Vogel)
Date: Mon Apr 13 18:10:11 2009
Subject: svn commit: r191035 - stable/7/sys/conf
Message-ID: <200904140038.n3E0c3fC088847@svn.freebsd.org>

Author: jfv
Date: Tue Apr 14 00:38:02 2009
New Revision: 191035
URL: http://svn.freebsd.org/changeset/base/191035

Log:
  OK, been a long weekend and fingers are getting tired,
  missed changing the file name :*(
  
  Approved by: re

Modified:
  stable/7/sys/conf/files

Modified: stable/7/sys/conf/files
==============================================================================
--- stable/7/sys/conf/files	Tue Apr 14 00:35:56 2009	(r191034)
+++ stable/7/sys/conf/files	Tue Apr 14 00:38:02 2009	(r191035)
@@ -911,7 +911,7 @@ dev/ixgbe/ixgbe_common.c	optional ixgbe 
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/ixgbe/ixgbe_82598.c		optional ixgbe \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
-dev/ixgbe/ixgbe_82598.c		optional ixgbe \
+dev/ixgbe/ixgbe_82599.c		optional ixgbe \
 	compile-with "${NORMAL_C} -I$S/dev/ixgbe"
 dev/jme/if_jme.c		optional jme pci
 dev/joy/joy.c			optional joy
From jfv at FreeBSD.org  Tue Apr 14 09:48:51 2009
From: jfv at FreeBSD.org (Jack F Vogel)
Date: Tue Apr 14 10:10:36 2009
Subject: svn commit: r191064 - stable/7/sys/dev/e1000
Message-ID: <200904141648.n3EGmoUW013872@svn.freebsd.org>

Author: jfv
Date: Tue Apr 14 16:48:49 2009
New Revision: 191064
URL: http://svn.freebsd.org/changeset/base/191064

Log:
  Change default on RX queues to 1, this has been found
  as a more stable config.
  
  Approved by: re

Modified:
  stable/7/sys/dev/e1000/if_igb.c

Modified: stable/7/sys/dev/e1000/if_igb.c
==============================================================================
--- stable/7/sys/dev/e1000/if_igb.c	Tue Apr 14 16:45:17 2009	(r191063)
+++ stable/7/sys/dev/e1000/if_igb.c	Tue Apr 14 16:48:49 2009	(r191064)
@@ -291,7 +291,7 @@ TUNABLE_INT("hw.igb.bulk_latency", &igb_
 ** 0, it will then be based on number of cpus.
 */
 static int igb_tx_queues = 1;
-static int igb_rx_queues = 4;
+static int igb_rx_queues = 1;
 TUNABLE_INT("hw.igb.tx_queues", &igb_tx_queues);
 TUNABLE_INT("hw.igb.rx_queues", &igb_rx_queues);
 
From gnn at FreeBSD.org  Tue Apr 14 11:52:41 2009
From: gnn at FreeBSD.org (George V. Neville-Neil)
Date: Tue Apr 14 12:19:09 2009
Subject: svn commit: r191070 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb
Message-ID: <200904141852.n3EIqdeu016587@svn.freebsd.org>

Author: gnn
Date: Tue Apr 14 18:52:39 2009
New Revision: 191070
URL: http://svn.freebsd.org/changeset/base/191070

Log:
  MFC of a Chelsio bug fix.
  
  Fix a bug in the recent update to the Chelsio driver.
  The tick routine was not being restarted in the init_locked routine
  which could resulted in loss of carrier when updating the MTU.
  
  Approved by:	re (kensmith)
  Obtained from:	Chelsio Inc.

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/cxgb/cxgb_main.c

Modified: stable/7/sys/dev/cxgb/cxgb_main.c
==============================================================================
--- stable/7/sys/dev/cxgb/cxgb_main.c	Tue Apr 14 18:32:37 2009	(r191069)
+++ stable/7/sys/dev/cxgb/cxgb_main.c	Tue Apr 14 18:52:39 2009	(r191070)
@@ -1880,6 +1880,7 @@ cxgb_init_locked(struct port_info *p)
 	device_printf(sc->dev, "enabling interrupts on port=%d\n", p->port_id);
 	t3_port_intr_enable(sc, p->port_id);
 
+ 	callout_reset(&sc->cxgb_tick_ch, CXGB_TICKS(sc), cxgb_tick, sc);
 	t3_sge_reset_adapter(sc);
 
 	ifp->if_drv_flags |= IFF_DRV_RUNNING;
From scottl at FreeBSD.org  Tue Apr 14 13:10:56 2009
From: scottl at FreeBSD.org (Scott Long)
Date: Tue Apr 14 13:25:42 2009
Subject: svn commit: r191075 - stable/7/sys/dev/amr
Message-ID: <200904142010.n3EKAr9R018540@svn.freebsd.org>

Author: scottl
Date: Tue Apr 14 20:10:53 2009
New Revision: 191075
URL: http://svn.freebsd.org/changeset/base/191075

Log:
  Don't register the CAM passthrough interface until interrupts are running.
  This fixes some problems at boot for some that are happening in fairly
  rare cases.  It's just a hack, though, which is why it's only going into
  stable/7 for now.  Note that this hack has a side effect of possibly not
  scanning the AMR buses for /dev/passN devices at boot.  These devices are
  not required for access to the RAID arrays, and only a few tools use them.
  If this affects you, let me know.
  
  Approved by:	re

Modified:
  stable/7/sys/dev/amr/amr.c

Modified: stable/7/sys/dev/amr/amr.c
==============================================================================
--- stable/7/sys/dev/amr/amr.c	Tue Apr 14 19:51:14 2009	(r191074)
+++ stable/7/sys/dev/amr/amr.c	Tue Apr 14 20:10:53 2009	(r191075)
@@ -259,15 +259,6 @@ amr_attach(struct amr_softc *sc)
      */
     amr_init_sysctl(sc);
 
-#if AMR_ENABLE_CAM != 0
-    /*
-     * Attach our 'real' SCSI channels to CAM.
-     */
-    if (amr_cam_attach(sc))
-	return(ENXIO);
-    debug(2, "CAM attach done");
-#endif
-
     /*
      * Create the control device.
      */
@@ -357,6 +348,15 @@ amr_startup(void *arg)
      */
 /*    sc->amr_timeout = timeout(amr_periodic, sc, hz);*/
 
+#if AMR_ENABLE_CAM != 0
+    /*
+     * Attach our 'real' SCSI channels to CAM.
+     */
+    if (amr_cam_attach(sc))
+	device_printf(sc->amr_dev, "CAM passthrough attachment failed\n");
+    debug(2, "CAM attach done");
+#endif
+
     return;
 }
 
From kensmith at FreeBSD.org  Tue Apr 14 20:41:17 2009
From: kensmith at FreeBSD.org (Ken Smith)
Date: Tue Apr 14 21:19:50 2009
Subject: svn commit: r191089 - stable/7/gnu/usr.bin/groff/tmac
Message-ID: <200904150341.n3F3fGid030439@svn.freebsd.org>

Author: kensmith
Date: Wed Apr 15 03:41:16 2009
New Revision: 191089
URL: http://svn.freebsd.org/changeset/base/191089

Log:
  Make 7.2 the default OS version for manual pages.
  
  Approved by:	re (implicit)

Modified:
  stable/7/gnu/usr.bin/groff/tmac/mdoc.local

Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local
==============================================================================
--- stable/7/gnu/usr.bin/groff/tmac/mdoc.local	Wed Apr 15 03:17:07 2009	(r191088)
+++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local	Wed Apr 15 03:41:16 2009	(r191089)
@@ -64,12 +64,13 @@
 .ds doc-volume-as-arm      arm
 .
 .\" Default .Os value
-.ds doc-default-operating-system FreeBSD\~7.1
+.ds doc-default-operating-system FreeBSD\~7.2
 .
 .\" FreeBSD releases not found in doc-common
 .ds doc-operating-system-FreeBSD-6.3    6.3
 .ds doc-operating-system-FreeBSD-6.4    6.4
 .ds doc-operating-system-FreeBSD-7.1    7.1
+.ds doc-operating-system-FreeBSD-7.1    7.2
 .ds doc-operating-system-FreeBSD-8.0    8.0
 .
 .ec
From kensmith at FreeBSD.org  Tue Apr 14 20:43:01 2009
From: kensmith at FreeBSD.org (Ken Smith)
Date: Tue Apr 14 21:20:41 2009
Subject: svn commit: r191090 - stable/7/release
Message-ID: <200904150342.n3F3gxXP030501@svn.freebsd.org>

Author: kensmith
Date: Wed Apr 15 03:42:59 2009
New Revision: 191090
URL: http://svn.freebsd.org/changeset/base/191090

Log:
  Bump version number 7.1 to 7.2.
  
  Approved by:	re (implicit)

Modified:
  stable/7/release/Makefile

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Wed Apr 15 03:41:16 2009	(r191089)
+++ stable/7/release/Makefile	Wed Apr 15 03:42:59 2009	(r191090)
@@ -18,11 +18,11 @@
 # Set these, release builder!
 #
 # Fixed version:
-#BUILDNAME=7.1-STABLE
+#BUILDNAME=7.2-STABLE
 #
 # Automatic SNAP versioning:
 DATE != date +%Y%m%d
-BASE = 7.1
+BASE = 7.2
 BUILDNAME?=${BASE}-${DATE}-SNAP
 #
 #CHROOTDIR=/junk/release
From kensmith at FreeBSD.org  Tue Apr 14 20:45:33 2009
From: kensmith at FreeBSD.org (Ken Smith)
Date: Tue Apr 14 21:21:25 2009
Subject: svn commit: r191091 - stable/7/sys/sys
Message-ID: <200904150345.n3F3jWkH030605@svn.freebsd.org>

Author: kensmith
Date: Wed Apr 15 03:45:32 2009
New Revision: 191091
URL: http://svn.freebsd.org/changeset/base/191091

Log:
  Bump __FreeBSD_version now that the svn cp for release/7.2 is done.
  
  Approved by:	re (implicit)

Modified:
  stable/7/sys/sys/param.h

Modified: stable/7/sys/sys/param.h
==============================================================================
--- stable/7/sys/sys/param.h	Wed Apr 15 03:42:59 2009	(r191090)
+++ stable/7/sys/sys/param.h	Wed Apr 15 03:45:32 2009	(r191091)
@@ -57,7 +57,7 @@
  *		is created, otherwise 1.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 701106	/* Master, propagated to newvers */
+#define __FreeBSD_version 702100	/* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include 
From kensmith at FreeBSD.org  Tue Apr 14 20:48:35 2009
From: kensmith at FreeBSD.org (Ken Smith)
Date: Tue Apr 14 21:22:21 2009
Subject: svn commit: r191092 - stable/7/usr.sbin/pkg_install/add
Message-ID: <200904150348.n3F3mYtQ030705@svn.freebsd.org>

Author: kensmith
Date: Wed Apr 15 03:48:34 2009
New Revision: 191092
URL: http://svn.freebsd.org/changeset/base/191092

Log:
  Add package directory for 7.2-REL (and 6.4-REL while here).
  
  Approved by:	re (implicit)

Modified:
  stable/7/usr.sbin/pkg_install/add/main.c

Modified: stable/7/usr.sbin/pkg_install/add/main.c
==============================================================================
--- stable/7/usr.sbin/pkg_install/add/main.c	Wed Apr 15 03:45:32 2009	(r191091)
+++ stable/7/usr.sbin/pkg_install/add/main.c	Wed Apr 15 03:48:34 2009	(r191092)
@@ -78,8 +78,10 @@ struct {
 	{ 601000, 601099, "/packages-6.1-release" },
 	{ 602000, 602099, "/packages-6.2-release" },
 	{ 603000, 603099, "/packages-6.3-release" },
+	{ 604000, 604099, "/packages-6.4-release" },
 	{ 700000, 700099, "/packages-7.0-release" },
 	{ 701000, 701099, "/packages-7.1-release" },
+	{ 702000, 702099, "/packages-7.2-release" },
 	{ 300000, 399000, "/packages-3-stable" },
 	{ 400000, 499000, "/packages-4-stable" },
 	{ 502100, 502128, "/packages-5-current" },
From kensmith at FreeBSD.org  Tue Apr 14 21:18:07 2009
From: kensmith at FreeBSD.org (Ken Smith)
Date: Tue Apr 14 21:30:56 2009
Subject: svn commit: r191093 - stable/7/gnu/usr.bin/groff/tmac
Message-ID: <200904150418.n3F4I67u031477@svn.freebsd.org>

Author: kensmith
Date: Wed Apr 15 04:18:05 2009
New Revision: 191093
URL: http://svn.freebsd.org/changeset/base/191093

Log:
  Oops, missed one of the 2's that needed to be changed when copying the
  line from above...
  
  Submitted by:	lstewart
  Approved by:	re (implicit)

Modified:
  stable/7/gnu/usr.bin/groff/tmac/mdoc.local

Modified: stable/7/gnu/usr.bin/groff/tmac/mdoc.local
==============================================================================
--- stable/7/gnu/usr.bin/groff/tmac/mdoc.local	Wed Apr 15 03:48:34 2009	(r191092)
+++ stable/7/gnu/usr.bin/groff/tmac/mdoc.local	Wed Apr 15 04:18:05 2009	(r191093)
@@ -70,7 +70,7 @@
 .ds doc-operating-system-FreeBSD-6.3    6.3
 .ds doc-operating-system-FreeBSD-6.4    6.4
 .ds doc-operating-system-FreeBSD-7.1    7.1
-.ds doc-operating-system-FreeBSD-7.1    7.2
+.ds doc-operating-system-FreeBSD-7.2    7.2
 .ds doc-operating-system-FreeBSD-8.0    8.0
 .
 .ec
From kan at FreeBSD.org  Wed Apr 15 09:05:27 2009
From: kan at FreeBSD.org (Alexander Kabaev)
Date: Wed Apr 15 09:24:58 2009
Subject: svn commit: r191106 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
Message-ID: <200904151605.n3FG5Per047364@svn.freebsd.org>

Author: kan
Date: Wed Apr 15 16:05:25 2009
New Revision: 191106
URL: http://svn.freebsd.org/changeset/base/191106

Log:
  MFC r191081-191082:
  
  Properly handle negative cache enries found through dotdot lookups.
  
  Submitted by:	tor
  Approved by:	re(kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/vfs_cache.c

Modified: stable/7/sys/kern/vfs_cache.c
==============================================================================
--- stable/7/sys/kern/vfs_cache.c	Wed Apr 15 15:02:37 2009	(r191105)
+++ stable/7/sys/kern/vfs_cache.c	Wed Apr 15 16:05:25 2009	(r191106)
@@ -370,6 +370,11 @@ retry:
 				*vpp = dvp->v_cache_dd->nc_vp;
 			else
 				*vpp = dvp->v_cache_dd->nc_dvp;
+			/* Return failure if negative entry was found. */
+			if (*vpp == NULL) {
+				ncp = dvp->v_cache_dd;
+				goto negative_success;
+			}
 			CTR3(KTR_VFS, "cache_lookup(%p, %s) found %p via ..",
 			    dvp, cnp->cn_nameptr, *vpp);
 			goto success;
@@ -416,6 +421,7 @@ retry:
 		goto success;
 	}
 
+negative_success:
 	/* We found a negative match, and want to create it, so purge */
 	if (cnp->cn_nameiop == CREATE) {
 		numnegzaps++;
From alc at FreeBSD.org  Fri Apr 17 08:35:17 2009
From: alc at FreeBSD.org (Alan Cox)
Date: Fri Apr 17 09:07:05 2009
Subject: svn commit: r191204 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb vm
Message-ID: <200904171535.n3HFZGoH026439@svn.freebsd.org>

Author: alc
Date: Fri Apr 17 15:35:16 2009
New Revision: 191204
URL: http://svn.freebsd.org/changeset/base/191204

Log:
  MFC r175055
    Defer setting either PG_CACHED or PG_FREE until after the free page
    queues lock is acquired.  Otherwise, the state of a reservation's
    pages' flags and its population count can be inconsistent.  That could
    result in a page being freed twice.
  
  (This change should have been included in the MFC of the superpages
  support.)
  
  Thanks to:	pho for an illuminating crash
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/vm/vm_page.c

Modified: stable/7/sys/vm/vm_page.c
==============================================================================
--- stable/7/sys/vm/vm_page.c	Fri Apr 17 14:58:02 2009	(r191203)
+++ stable/7/sys/vm/vm_page.c	Fri Apr 17 15:35:16 2009	(r191204)
@@ -1402,8 +1402,8 @@ vm_page_free_toq(vm_page_t m)
 		m->flags &= ~PG_ZERO;
 		vm_page_enqueue(PQ_HOLD, m);
 	} else {
-		m->flags |= PG_FREE;
 		mtx_lock(&vm_page_queue_free_mtx);
+		m->flags |= PG_FREE;
 		cnt.v_free_count++;
 #if VM_NRESERVLEVEL > 0
 		if (!vm_reserv_free_page(m))
@@ -1654,9 +1654,9 @@ vm_page_cache(vm_page_t m)
 	 * Insert the page into the object's collection of cached pages
 	 * and the physical memory allocator's cache/free page queues.
 	 */
-	vm_page_flag_set(m, PG_CACHED);
 	vm_page_flag_clear(m, PG_ZERO);
 	mtx_lock(&vm_page_queue_free_mtx);
+	m->flags |= PG_CACHED;
 	cnt.v_cache_count++;
 	root = object->cache;
 	if (root == NULL) {
From jhb at freebsd.org  Fri Apr 17 08:57:10 2009
From: jhb at freebsd.org (John Baldwin)
Date: Fri Apr 17 09:26:50 2009
Subject: svn commit: r191204 - in stable/7/sys: . contrib/pf
	dev/ath/ath_hal dev/cxgb vm
In-Reply-To: <200904171535.n3HFZGoH026439@svn.freebsd.org>
References: <200904171535.n3HFZGoH026439@svn.freebsd.org>
Message-ID: <200904171144.51791.jhb@freebsd.org>

On Friday 17 April 2009 11:35:16 am Alan Cox wrote:
> Author: alc
> Date: Fri Apr 17 15:35:16 2009
> New Revision: 191204
> URL: http://svn.freebsd.org/changeset/base/191204
> 
> Log:
>   MFC r175055
>     Defer setting either PG_CACHED or PG_FREE until after the free page
>     queues lock is acquired.  Otherwise, the state of a reservation's
>     pages' flags and its population count can be inconsistent.  That could
>     result in a page being freed twice.
>   
>   (This change should have been included in the MFC of the superpages
>   support.)
>   
>   Thanks to:	pho for an illuminating crash

Thanks.

Pointy hat to:	jhb

-- 
John Baldwin
From dchagin at FreeBSD.org  Fri Apr 17 09:42:59 2009
From: dchagin at FreeBSD.org (Dmitry Chagin)
Date: Fri Apr 17 10:20:51 2009
Subject: svn commit: r191210 - in stable/7/sys: . amd64/amd64 amd64/linux32
	arm/arm compat/ia32 contrib/pf dev/ath/ath_hal dev/cxgb
	i386/i386 i386/linux ia64/ia64 kern powerpc/powerpc
	sparc64/sparc64 sys
Message-ID: <200904171642.n3HGgvu8028279@svn.freebsd.org>

Author: dchagin
Date: Fri Apr 17 16:42:57 2009
New Revision: 191210
URL: http://svn.freebsd.org/changeset/base/191210

Log:
  Merge r190708 from HEAD to stable/7:
  Fix KBI breakage by r190520 which affects older linux.ko binaries:
  
  1) Move the new field (brand_note) to the end of the Brandinfo structure.
  2) Add a new flag BI_BRAND_NOTE that indicates that the brand_note pointer
     is valid.
  3) Use the brand_note field if the flag BI_BRAND_NOTE is set and as old
     modules won't have the flag set, so the new field brand_note would be
     ignored.
  
  Suggested by:   jhb
  Reviewed by:	jhb
  Approved by:	re (Ken Smith), kib (mentor)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/amd64/amd64/elf_machdep.c
  stable/7/sys/amd64/linux32/linux32_sysvec.c
  stable/7/sys/arm/arm/elf_machdep.c
  stable/7/sys/compat/ia32/ia32_sysvec.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/i386/i386/elf_machdep.c
  stable/7/sys/i386/linux/linux_sysvec.c
  stable/7/sys/ia64/ia64/elf_machdep.c
  stable/7/sys/kern/imgact_elf.c
  stable/7/sys/powerpc/powerpc/elf_machdep.c
  stable/7/sys/sparc64/sparc64/elf_machdep.c
  stable/7/sys/sys/imgact_elf.h

Modified: stable/7/sys/amd64/amd64/elf_machdep.c
==============================================================================
--- stable/7/sys/amd64/amd64/elf_machdep.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/amd64/amd64/elf_machdep.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -84,7 +84,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.sysvec		= &elf64_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf64_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -100,7 +100,7 @@ static Elf64_Brandinfo freebsd_brand_oin
 	.sysvec		= &elf64_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf64_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_sysvec.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/amd64/linux32/linux32_sysvec.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -1066,7 +1066,7 @@ static Elf32_Brandinfo linux_brand = {
 	.sysvec		= &elf_linux_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &linux32_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 static Elf32_Brandinfo linux_glibc2brand = {
@@ -1078,7 +1078,7 @@ static Elf32_Brandinfo linux_glibc2brand
 	.sysvec		= &elf_linux_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &linux32_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 Elf32_Brandinfo *linux_brandlist[] = {

Modified: stable/7/sys/arm/arm/elf_machdep.c
==============================================================================
--- stable/7/sys/arm/arm/elf_machdep.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/arm/arm/elf_machdep.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -84,7 +84,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.sysvec		= &elf32_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -100,7 +100,7 @@ static Elf32_Brandinfo freebsd_brand_oin
 	.sysvec		= &elf32_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: stable/7/sys/compat/ia32/ia32_sysvec.c
==============================================================================
--- stable/7/sys/compat/ia32/ia32_sysvec.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/compat/ia32/ia32_sysvec.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -148,7 +148,7 @@ static Elf32_Brandinfo ia32_brand_info =
 	.sysvec		= &ia32_freebsd_sysvec,
 	.interp_newpath	= "/libexec/ld-elf32.so.1",
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(ia32, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -164,7 +164,7 @@ static Elf32_Brandinfo ia32_brand_oinfo 
 	.sysvec		= &ia32_freebsd_sysvec,
 	.interp_newpath	= "/libexec/ld-elf32.so.1",
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(oia32, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: stable/7/sys/i386/i386/elf_machdep.c
==============================================================================
--- stable/7/sys/i386/i386/elf_machdep.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/i386/i386/elf_machdep.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -84,7 +84,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.sysvec		= &elf32_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -100,7 +100,7 @@ static Elf32_Brandinfo freebsd_brand_oin
 	.sysvec		= &elf32_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: stable/7/sys/i386/linux/linux_sysvec.c
==============================================================================
--- stable/7/sys/i386/linux/linux_sysvec.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/i386/linux/linux_sysvec.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -1036,7 +1036,7 @@ static Elf32_Brandinfo linux_brand = {
 	.sysvec		= &elf_linux_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &linux_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 static Elf32_Brandinfo linux_glibc2brand = {
@@ -1048,7 +1048,7 @@ static Elf32_Brandinfo linux_glibc2brand
 	.sysvec		= &elf_linux_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &linux_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 Elf32_Brandinfo *linux_brandlist[] = {

Modified: stable/7/sys/ia64/ia64/elf_machdep.c
==============================================================================
--- stable/7/sys/ia64/ia64/elf_machdep.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/ia64/ia64/elf_machdep.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -92,7 +92,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.sysvec		= &elf64_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf64_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
     (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_info);
@@ -106,7 +106,7 @@ static Elf64_Brandinfo freebsd_brand_oin
 	.sysvec		= &elf64_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf64_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,
     (sysinit_cfunc_t)elf64_insert_brand_entry, &freebsd_brand_oinfo);

Modified: stable/7/sys/kern/imgact_elf.c
==============================================================================
--- stable/7/sys/kern/imgact_elf.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/kern/imgact_elf.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -192,7 +192,7 @@ __elfN(get_brandinfo)(struct image_param
 	for (i = 0; i < MAX_BRANDS; i++) {
 		bi = elf_brand_list[i];
 		if (bi != NULL && hdr->e_machine == bi->machine &&
-		    bi->brand_note != NULL) {
+		    (bi->flags & BI_BRAND_NOTE) != 0) {
 			ret = __elfN(check_note)(imgp, bi->brand_note, osrel);
 			if (ret)
 				return (bi);

Modified: stable/7/sys/powerpc/powerpc/elf_machdep.c
==============================================================================
--- stable/7/sys/powerpc/powerpc/elf_machdep.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/powerpc/powerpc/elf_machdep.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -87,7 +87,7 @@ static Elf32_Brandinfo freebsd_brand_inf
 	.sysvec		= &elf32_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(elf32, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -103,7 +103,7 @@ static Elf32_Brandinfo freebsd_brand_oin
 	.sysvec		= &elf32_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf32_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(oelf32, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: stable/7/sys/sparc64/sparc64/elf_machdep.c
==============================================================================
--- stable/7/sys/sparc64/sparc64/elf_machdep.c	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/sparc64/sparc64/elf_machdep.c	Fri Apr 17 16:42:57 2009	(r191210)
@@ -99,7 +99,7 @@ static Elf64_Brandinfo freebsd_brand_inf
 	.sysvec		= &elf64_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf64_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(elf64, SI_SUB_EXEC, SI_ORDER_ANY,
@@ -115,7 +115,7 @@ static Elf64_Brandinfo freebsd_brand_oin
 	.sysvec		= &elf64_freebsd_sysvec,
 	.interp_newpath	= NULL,
 	.brand_note	= &elf64_freebsd_brandnote,
-	.flags		= BI_CAN_EXEC_DYN
+	.flags		= BI_CAN_EXEC_DYN | BI_BRAND_NOTE
 };
 
 SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_ANY,

Modified: stable/7/sys/sys/imgact_elf.h
==============================================================================
--- stable/7/sys/sys/imgact_elf.h	Fri Apr 17 16:42:03 2009	(r191209)
+++ stable/7/sys/sys/imgact_elf.h	Fri Apr 17 16:42:57 2009	(r191210)
@@ -70,9 +70,10 @@ typedef struct {
 	const char *interp_path;
 	struct sysentvec *sysvec;
 	const char *interp_newpath;
-	Elf_Brandnote *brand_note;
 	int flags;
+	Elf_Brandnote *brand_note;
 #define	BI_CAN_EXEC_DYN	0x0001
+#define	BI_BRAND_NOTE	0x0002
 } __ElfN(Brandinfo);
 
 __ElfType(Auxargs);
From alc at cs.rice.edu  Fri Apr 17 09:50:42 2009
From: alc at cs.rice.edu (Alan Cox)
Date: Fri Apr 17 10:23:23 2009
Subject: svn commit: r191204 - in stable/7/sys: . contrib/pf
 dev/ath/ath_hal dev/cxgb vm
In-Reply-To: <200904171144.51791.jhb@freebsd.org>
References: <200904171535.n3HFZGoH026439@svn.freebsd.org>
	<200904171144.51791.jhb@freebsd.org>
Message-ID: <49E8AF2F.1090708@cs.rice.edu>

John Baldwin wrote:
> On Friday 17 April 2009 11:35:16 am Alan Cox wrote:
>   
>> Author: alc
>> Date: Fri Apr 17 15:35:16 2009
>> New Revision: 191204
>> URL: http://svn.freebsd.org/changeset/base/191204
>>
>> Log:
>>   MFC r175055
>>     Defer setting either PG_CACHED or PG_FREE until after the free page
>>     queues lock is acquired.  Otherwise, the state of a reservation's
>>     pages' flags and its population count can be inconsistent.  That could
>>     result in a page being freed twice.
>>   
>>   (This change should have been included in the MFC of the superpages
>>   support.)
>>   
>>   Thanks to:	pho for an illuminating crash
>>     
>
> Thanks.
>
> Pointy hat to:	jhb
>
>   

I think that your bravery to even attempt the MFC absolves you of 
several pointy hats.  I was too chicken.  :-)

Alan

From jhb at FreeBSD.org  Fri Apr 17 10:07:13 2009
From: jhb at FreeBSD.org (John Baldwin)
Date: Fri Apr 17 10:33:28 2009
Subject: svn commit: r191214 - in stable/7/sys: . boot/i386/libi386
	contrib/pf dev/ath/ath_hal dev/cxgb
Message-ID: <200904171707.n3HH7CrT029014@svn.freebsd.org>

Author: jhb
Date: Fri Apr 17 17:07:12 2009
New Revision: 191214
URL: http://svn.freebsd.org/changeset/base/191214

Log:
  MFC: Use a disk address instead of an int to hold the starting offset of an
  open partition.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/boot/i386/libi386/biosdisk.c
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/boot/i386/libi386/biosdisk.c
==============================================================================
--- stable/7/sys/boot/i386/libi386/biosdisk.c	Fri Apr 17 17:05:31 2009	(r191213)
+++ stable/7/sys/boot/i386/libi386/biosdisk.c	Fri Apr 17 17:07:12 2009	(r191214)
@@ -83,7 +83,7 @@ struct open_disk {
     int			od_cyl;			/* BIOS geometry */
     int			od_hds;
     int			od_sec;
-    int			od_boff;		/* block offset from beginning of BIOS disk */
+    daddr_t			od_boff;		/* block offset from beginning of BIOS disk */
     int			od_flags;
 #define BD_MODEINT13		0x0000
 #define BD_MODEEDD1		0x0001
From kensmith at cse.Buffalo.EDU  Fri Apr 17 10:12:23 2009
From: kensmith at cse.Buffalo.EDU (Ken Smith)
Date: Fri Apr 17 10:39:41 2009
Subject: svn commit: r191204 - in stable/7/sys: . contrib/pf
 dev/ath/ath_hal dev/cxgb vm
In-Reply-To: <49E8AF2F.1090708@cs.rice.edu>
References: <200904171535.n3HFZGoH026439@svn.freebsd.org>
	<200904171144.51791.jhb@freebsd.org>  <49E8AF2F.1090708@cs.rice.edu>
Message-ID: <1239986876.94812.7.camel@bauer.cse.buffalo.edu>

On Fri, 2009-04-17 at 11:32 -0500, Alan Cox wrote:
> John Baldwin wrote:
> > 
> > Pointy hat to:	jhb
> > 
> 
> I think that your bravery to even attempt the MFC absolves you of 
> several pointy hats.  I was too chicken.  :-)
> 
> Alan
> 

Yikes!  No!!!!!  His bravery *DEFINITELY* absolves him of one pointy
hat.  But only one!  [ We're too close to 7.2-REL for more...  ;-) ]

-- 
                                                Ken Smith
- From there to here, from here to      |       kensmith@cse.buffalo.edu
  there, funny things are everywhere.   |
                      - Theodore Geisel |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20090417/2ea155cb/attachment.pgp
From kan at FreeBSD.org  Fri Apr 17 14:10:55 2009
From: kan at FreeBSD.org (Alexander Kabaev)
Date: Fri Apr 17 14:48:16 2009
Subject: svn commit: r191223 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb kern
Message-ID: <200904172110.n3HLArvL034615@svn.freebsd.org>

Author: kan
Date: Fri Apr 17 21:10:53 2009
New Revision: 191223
URL: http://svn.freebsd.org/changeset/base/191223

Log:
  MFC r191218 and related backout r191220.
  
  More fallout from negative dotdot caching. Negative entries should
  be removed from and reinserted to proper ncneg list.
  
  Reported by:	pho
  Submitted by:	kib
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/kern/vfs_cache.c

Modified: stable/7/sys/kern/vfs_cache.c
==============================================================================
--- stable/7/sys/kern/vfs_cache.c	Fri Apr 17 19:07:44 2009	(r191222)
+++ stable/7/sys/kern/vfs_cache.c	Fri Apr 17 21:10:53 2009	(r191223)
@@ -535,18 +535,23 @@ cache_enter(dvp, vp, cnp)
 			 * to new parent vnode, otherwise continue with new
 			 * namecache entry allocation.
 			 */
-			if ((ncp = dvp->v_cache_dd) != NULL) {
-				if (ncp->nc_flag & NCF_ISDOTDOT) {
-					KASSERT(ncp->nc_dvp == dvp,
-					    ("wrong isdotdot parent"));
+			if ((ncp = dvp->v_cache_dd) != NULL &&
+			    ncp->nc_flag & NCF_ISDOTDOT) {
+				KASSERT(ncp->nc_dvp == dvp,
+				    ("wrong isdotdot parent"));
+				if (ncp->nc_vp != NULL)
 					TAILQ_REMOVE(&ncp->nc_vp->v_cache_dst,
 					    ncp, nc_dst);
+				else
+					TAILQ_REMOVE(&ncneg, ncp, nc_dst);
+				if (vp != NULL)
 					TAILQ_INSERT_HEAD(&vp->v_cache_dst,
 					    ncp, nc_dst);
-					ncp->nc_vp = vp;
-					CACHE_UNLOCK();
-					return;
-				}
+				else
+					TAILQ_INSERT_TAIL(&ncneg, ncp, nc_dst);
+				ncp->nc_vp = vp;
+				CACHE_UNLOCK();
+				return;
 			}
 			dvp->v_cache_dd = NULL;
 			CACHE_UNLOCK();
From marius at FreeBSD.org  Fri Apr 17 15:04:23 2009
From: marius at FreeBSD.org (Marius Strobl)
Date: Fri Apr 17 15:30:30 2009
Subject: svn commit: r191225 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/fb
Message-ID: <200904172204.n3HM4JW9035923@svn.freebsd.org>

Author: marius
Date: Fri Apr 17 22:04:19 2009
New Revision: 191225
URL: http://svn.freebsd.org/changeset/base/191225

Log:
  MFC: r191072
  
  Fix whitespace.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/fb/machfb.c

Modified: stable/7/sys/dev/fb/machfb.c
==============================================================================
--- stable/7/sys/dev/fb/machfb.c	Fri Apr 17 21:18:17 2009	(r191224)
+++ stable/7/sys/dev/fb/machfb.c	Fri Apr 17 22:04:19 2009	(r191225)
@@ -53,12 +53,12 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
- 
+
 #include 
 __FBSDID("$FreeBSD$");
 
 /*
- * Driver for ATI Mach64 graphics chips. Some code is derived from the
+ * Driver for ATI Mach64 graphics chips.  Some code is derived from the
  * ATI Rage Pro and Derivatives Programmer's Guide.
  */
 
@@ -100,7 +100,7 @@ __FBSDID("$FreeBSD$");
 struct machfb_softc {
 	video_adapter_t		sc_va;		/* must be first */
 
-	phandle_t		sc_node;	
+	phandle_t		sc_node;
 	uint16_t		sc_chip_id;
 	uint8_t			sc_chip_rev;
 
@@ -572,7 +572,7 @@ machfb_init(int unit, video_adapter_t *a
 
 	vid_init_struct(adp, MACHFB_DRIVER_NAME, -1, unit);
 
- 	if (OF_getprop(sc->sc_node, "height", &sc->sc_height,
+	if (OF_getprop(sc->sc_node, "height", &sc->sc_height,
 	    sizeof(sc->sc_height)) == -1)
 		return (ENXIO);
 	if (OF_getprop(sc->sc_node, "width", &sc->sc_width,
@@ -630,12 +630,12 @@ machfb_init(int unit, video_adapter_t *a
 
 	machfb_init_engine(sc);
 #if 0
-	mach64_adjust_frame(0, 0);
+	machfb_adjust_frame(0, 0);
 #endif
 	machfb_set_mode(adp, 0);
 
 	/*
-	 * Install our 16-color color map. This is done only once and with
+	 * Install our 16-color color map.  This is done only once and with
 	 * an offset of 16 on sparc64 as there the OBP driver expects white
 	 * to be at index 0 and black at 255 (some versions also use 1 - 8
 	 * for color text support or the full palette for the boot banner
@@ -880,13 +880,13 @@ machfb_mmap(video_adapter_t *adp, vm_off
 
 	if (adp->va_mem_base != 0 && offset >= adp->va_mem_base &&
 	    offset < adp->va_mem_base + adp->va_mem_size) {
-	    	*paddr = sc->sc_vmemh + offset - adp->va_mem_base;
+		*paddr = sc->sc_vmemh + offset - adp->va_mem_base;
 		return (0);
 	}
 
 	if (offset >= adp->va_registers &&
 	    offset < adp->va_registers + adp->va_registers_size) {
-	    	*paddr = sc->sc_memh + offset - adp->va_registers;
+		*paddr = sc->sc_memh + offset - adp->va_registers;
 		return (0);
 	}
 
@@ -1083,7 +1083,7 @@ machfb_puts(video_adapter_t *adp, vm_off
 	for (i = 0; i < len; i++) {
 		/*
 		 * Accelerate continuous blanks by drawing a respective
-		 * rectangle instead. Drawing a rectangle of any size
+		 * rectangle instead.  Drawing a rectangle of any size
 		 * takes about the same number of operations as drawing
 		 * a single character.
 		 */
@@ -1091,7 +1091,7 @@ machfb_puts(video_adapter_t *adp, vm_off
 		a = (s[i] & 0xff00) >> 8;
 		if (c == 0x00 || c == 0x20 || c == 0xdb || c == 0xff) {
 			color2 = (a >> (c == 0xdb ? 0 : 4) & 0xf);
-	    		x2 = (((off + i) % adp->va_info.vi_width) *
+			x2 = (((off + i) % adp->va_info.vi_width) *
 			    adp->va_info.vi_cwidth) + sc->sc_xmargin;
 			y2 = (((off + i) / adp->va_info.vi_width) *
 			    adp->va_info.vi_cheight) + sc->sc_ymargin;
@@ -1135,7 +1135,7 @@ machfb_putm(video_adapter_t *adp, int x,
 
 	if ((!(sc->sc_flags & MACHFB_CUREN)) &&
 	    (error = machfb_cursor_install(sc)) < 0)
-	    	return (error);
+		return (error);
 	else {
 		/*
 		 * The hardware cursor always must be disabled when
@@ -1174,7 +1174,7 @@ machfb_pci_probe(device_t dev)
 			return (BUS_PROBE_DEFAULT);
 		}
 	}
-	
+
 	return (ENXIO);
 }
 
@@ -1192,8 +1192,8 @@ machfb_pci_attach(device_t dev)
 	node = ofw_bus_get_node(dev);
 	if ((sc = (struct machfb_softc *)vid_get_adapter(vid_find_adapter(
 	    MACHFB_DRIVER_NAME, 0))) != NULL && sc->sc_node == node) {
-	    	device_printf(dev, "console\n");
-	    	device_set_softc(dev, sc);
+		device_printf(dev, "console\n");
+		device_set_softc(dev, sc);
 	} else {
 		sc = device_get_softc(dev);
 		bzero(sc, sizeof(struct machfb_softc));
@@ -1203,7 +1203,7 @@ machfb_pci_attach(device_t dev)
 		sc->sc_chip_rev = pci_get_revid(dev);
 	}
 	adp = &sc->sc_va;
-		
+
 	/*
 	 * Regardless whether we are the console and already allocated
 	 * resources in machfb_configure() or not we have to allocate
@@ -1214,7 +1214,7 @@ machfb_pci_attach(device_t dev)
 	pci_write_config(dev, PCIR_COMMAND,
 	    pci_read_config(dev, PCIR_COMMAND, 2) | PCIM_CMD_PORTEN |
 	    PCIM_CMD_MEMEN, 2);
-	
+
 	sc->sc_memrid = PCIR_BAR(0);
 	if ((sc->sc_memres = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
 	    &sc->sc_memrid, RF_ACTIVE)) == NULL) {
@@ -1228,18 +1228,18 @@ machfb_pci_attach(device_t dev)
 	sc->sc_regt = sc->sc_memt;
 	bus_space_subregion(sc->sc_regt, sc->sc_memh, MACH64_REG_OFF,
 	    MACH64_REG_SIZE, &sc->sc_regh);
-    	adp->va_buffer = (vm_offset_t)rman_get_virtual(sc->sc_memres);
+	adp->va_buffer = (vm_offset_t)rman_get_virtual(sc->sc_memres);
 	adp->va_buffer_size = rman_get_size(sc->sc_memres);
 
 	/*
 	 * Depending on the firmware version the VGA I/O and/or memory
-	 * resources of the Mach64 chips come up disabled. We generally
+	 * resources of the Mach64 chips come up disabled.  We generally
 	 * enable them above (pci(4) actually already did this unless
 	 * pci_enable_io_modes is not set) but this doesn't necessarily
-	 * mean that we get valid ones. Invalid resources seem to have
-	 * in common that they start at address 0. We don't allocate
+	 * mean that we get valid ones.  Invalid resources seem to have
+	 * in common that they start at address 0.  We don't allocate
 	 * them in this case in order to avoid warnings in apb(4) and
-	 * crashes when using these invalid resources. Xorg is aware
+	 * crashes when using these invalid resources.  Xorg is aware
 	 * of this and doesn't use the VGA resources in this case (but
 	 * demands them if they are valid).
 	 */
@@ -1288,9 +1288,9 @@ machfb_pci_attach(device_t dev)
 		/*
 		 * During device configuration we don't necessarily probe
 		 * the adapter which is the console first so we can't use
-		 * the device unit number for the video adapter unit. The
+		 * the device unit number for the video adapter unit.  The
 		 * worst case would be that we use the video adapter unit
-		 * 0 twice. As it doesn't really matter which unit number
+		 * 0 twice.  As it doesn't really matter which unit number
 		 * the corresponding video adapter has just use the next
 		 * unused one.
 		 */
@@ -1299,7 +1299,7 @@ machfb_pci_attach(device_t dev)
 				break;
 		if ((error = sw->init(i, adp, 0)) != 0) {
 			device_printf(dev, "cannot initialize adapter\n");
-		    	goto fail_vmemres;
+			goto fail_vmemres;
 		}
 	}
 
@@ -1333,7 +1333,7 @@ machfb_pci_attach(device_t dev)
 	/*
 	 * Allocate one page for the mouse pointer image at the end of
 	 * the little endian aperture, right before the memory mapped
-	 * registers that might also reside there. Must be done after
+	 * registers that might also reside there.  Must be done after
 	 * sc_memsize was set and possibly adjusted to account for the
 	 * memory mapped registers.
 	 */
@@ -1346,7 +1346,7 @@ machfb_pci_attach(device_t dev)
 	/*
 	 * Register a handler that performs some cosmetic surgery like
 	 * turning off the mouse pointer on halt in preparation for
-	 * handing the screen over to the OFW. Register another handler
+	 * handing the screen over to the OFW.  Register another handler
 	 * that turns off the CRTC when resetting, otherwise the OFW
 	 * boot command issued by cpu_reset() just doesn't work.
 	 */
@@ -1358,12 +1358,12 @@ machfb_pci_attach(device_t dev)
 	return (0);
 
  fail_vmemres:
- 	if (sc->sc_vmemres != NULL)
-	 	bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_vmemrid,
+	if (sc->sc_vmemres != NULL)
+		bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_vmemrid,
 		    sc->sc_vmemres);
  fail_viores:
- 	if (sc->sc_viores != NULL)
-	 	bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_viorid,
+	if (sc->sc_viores != NULL)
+		bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_viorid,
 		    sc->sc_viores);
  fail_memres:
 	bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_memrid, sc->sc_memres);
@@ -1556,7 +1556,7 @@ machfb_adjust_frame(struct machfb_softc 
 	offset = ((x + y * sc->sc_width) * (sc->sc_depth >> 3)) >> 3;
 
 	regw(sc, CRTC_OFF_PITCH, (regr(sc, CRTC_OFF_PITCH) & 0xfff00000) |
-	     offset);
+	    offset);
 }
 #endif
 
From marius at FreeBSD.org  Fri Apr 17 16:22:02 2009
From: marius at FreeBSD.org (Marius Strobl)
Date: Fri Apr 17 16:29:41 2009
Subject: svn commit: r191230 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/fb
Message-ID: <200904172322.n3HNM1GJ038341@svn.freebsd.org>

Author: marius
Date: Fri Apr 17 23:22:01 2009
New Revision: 191230
URL: http://svn.freebsd.org/changeset/base/191230

Log:
  MFC: r191076
  
  - Remove the second license as I'm also fine with the first one.
  - Remove redundant softc members for RIDs.
  - Change some softc members to be unsigned where more appropriate.
  - Add some missing const.
  - Remove support for mmap(2)'ing VGA I/O as it was broken [1] and
    not required by X.Org anyway.
  - Fix some confusion between bus, physical and virtual addresses
    which mostly consisted in using members of struct video_adapter
    inappropriately but wasn't fatal except for the regular framebuffer
    mmap(2)'ing.
  - Remove redundant bzero(9)'ing of the softc.
  - Don't map the framebuffer twice in case the firmware has already
    mapped it as besides wasting resources this isn't possible with
    all MMUs. This is a bit tricky as a) just because the firmware
    provides a property with a virtual address doesn't mean it's
    actually mapped (but typically is when the framebuffer is the
    console) and b) the firmware doesn't necessarily map it with
    the same byteorder as we do. This makes machfb(4) work on machines
    with cheetah-class MMUs (including X.Org).
  
  Reported by:	Michael Plass [1]
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/fb/machfb.c

Modified: stable/7/sys/dev/fb/machfb.c
==============================================================================
--- stable/7/sys/dev/fb/machfb.c	Fri Apr 17 23:11:18 2009	(r191229)
+++ stable/7/sys/dev/fb/machfb.c	Fri Apr 17 23:22:01 2009	(r191230)
@@ -1,5 +1,6 @@
 /*-
  * Copyright (c) 2002 Bang Jun-Young
+ * Copyright (c) 2005 Marius Strobl 
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,33 +27,6 @@
  *
  *	from: NetBSD: machfb.c,v 1.23 2005/03/07 21:45:24 martin Exp
  */
-/*-
- * Copyright (c) 2005 Marius Strobl 
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification, immediately at the beginning of the file.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
 
 #include 
 __FBSDID("$FreeBSD$");
@@ -66,18 +40,23 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -104,58 +83,53 @@ struct machfb_softc {
 	uint16_t		sc_chip_id;
 	uint8_t			sc_chip_rev;
 
-	int			sc_memrid;
-	int			sc_viorid;
-	int			sc_vmemrid;
 	struct resource		*sc_memres;
-	struct resource		*sc_viores;
 	struct resource		*sc_vmemres;
 	bus_space_tag_t		sc_memt;
 	bus_space_tag_t		sc_regt;
-	bus_space_tag_t		sc_viot;
-	bus_space_tag_t		sc_vmemt;
 	bus_space_handle_t	sc_memh;
 	bus_space_handle_t	sc_regh;
-	bus_space_handle_t	sc_vioh;
-	bus_space_handle_t	sc_vmemh;
+	u_long			sc_mem;
+	u_long			sc_vmem;
 
-	int			sc_height;
-	int			sc_width;
-	int			sc_depth;
-	int			sc_xmargin;
-	int			sc_ymargin;
+	u_int			sc_height;
+	u_int			sc_width;
+	u_int			sc_depth;
+	u_int			sc_xmargin;
+	u_int			sc_ymargin;
 
 	size_t			sc_memsize;
-	int			sc_memtype;
-	int			sc_mem_freq;
-	int			sc_ramdac_freq;
-	int			sc_ref_freq;
-
-	int			sc_ref_div;
-	int			sc_mclk_post_div;
-	int			sc_mclk_fb_div;
+	u_int			sc_memtype;
+	u_int			sc_mem_freq;
+	u_int			sc_ramdac_freq;
+	u_int			sc_ref_freq;
+
+	u_int			sc_ref_div;
+	u_int			sc_mclk_post_div;
+	u_int			sc_mclk_fb_div;
 
 	const u_char		*sc_font;
-	int			sc_cbwidth;
+	u_int			sc_cbwidth;
 	vm_offset_t		sc_curoff;
 
 	int			sc_bg_cache;
 	int			sc_fg_cache;
-	int			sc_draw_cache;
+	u_int			sc_draw_cache;
 #define	MACHFB_DRAW_CHAR	(1 << 0)
 #define	MACHFB_DRAW_FILLRECT	(1 << 1)
 
-	int			sc_flags;
+	u_int			sc_flags;
 #define	MACHFB_CONSOLE		(1 << 0)
 #define	MACHFB_CUREN		(1 << 1)
 #define	MACHFB_DSP		(1 << 2)
+#define	MACHFB_SWAP		(1 << 3)
 };
 
 static const struct {
 	uint16_t	chip_id;
 	const char	*name;
 	uint32_t	ramdac_freq;
-} machfb_info[] = {
+} const machfb_info[] = {
 	{ ATI_MACH64_CT, "ATI Mach64 CT", 135000 },
 	{ ATI_RAGE_PRO_AGP, "ATI 3D Rage Pro (AGP)", 230000 },
 	{ ATI_RAGE_PRO_AGP1X, "ATI 3D Rage Pro (AGP 1x)", 230000 },
@@ -193,7 +167,7 @@ static const struct machfb_cmap {
 	uint8_t red;
 	uint8_t green;
 	uint8_t blue;
-} machfb_default_cmap[16] = {
+} const machfb_default_cmap[16] = {
 	{0x00, 0x00, 0x00},	/* black */
 	{0x00, 0x00, 0xff},	/* blue */
 	{0x00, 0xff, 0x00},	/* green */
@@ -214,7 +188,7 @@ static const struct machfb_cmap {
 
 #define	MACHFB_CMAP_OFF		16
 
-static const u_char machfb_mouse_pointer_bits[64][8] = {
+static const u_char const machfb_mouse_pointer_bits[64][8] = {
 	{ 0x00, 0x00, },	/* ............ */
 	{ 0x80, 0x00, },	/* *........... */
 	{ 0xc0, 0x00, },	/* **.......... */
@@ -243,12 +217,12 @@ static const u_char machfb_mouse_pointer
  * Lookup table to perform a bit-swap of the mouse pointer bits,
  * map set bits to CUR_CLR0 and unset bits to transparent.
  */
-static const u_char machfb_mouse_pointer_lut[] = {
+static const u_char const machfb_mouse_pointer_lut[] = {
 	0xaa, 0x2a, 0x8a, 0x0a, 0xa2, 0x22, 0x82, 0x02,
 	0xa8, 0x28, 0x88, 0x08, 0xa0, 0x20, 0x80, 0x00
 };
 
-static const char *machfb_memtype_names[] = {
+static const char *const machfb_memtype_names[] = {
 	"(N/A)", "DRAM", "EDO DRAM", "EDO DRAM", "SDRAM", "SGRAM", "WRAM",
 	"(unknown type)"
 };
@@ -351,8 +325,6 @@ static video_switch_t machfbvidsw = {
 	.clear			= machfb_clear,
 	.fill_rect		= machfb_fill_rect,
 	.bitblt			= machfb_bitblt,
-	NULL,
-	NULL,
 	.diag			= machfb_diag,
 	.save_cursor_palette	= machfb_save_cursor_palette,
 	.load_cursor_palette	= machfb_load_cursor_palette,
@@ -698,7 +670,7 @@ machfb_set_mode(video_adapter_t *adp, in
 
 	sc->sc_bg_cache = -1;
 	sc->sc_fg_cache = -1;
-	sc->sc_draw_cache = -1;
+	sc->sc_draw_cache = 0;
 
 	return (0);
 }
@@ -869,30 +841,28 @@ machfb_mmap(video_adapter_t *adp, vm_off
     int prot)
 {
 	struct machfb_softc *sc;
+	video_info_t *vi;
 
 	sc = (struct machfb_softc *)adp;
+	vi = &adp->va_info;
 
-	if (adp->va_io_base != 0 && offset >= adp->va_io_base &&
-	    offset < adp->va_io_base + adp->va_io_size) {
-		*paddr = sc->sc_vioh + offset - adp->va_io_size;
-		return (0);
-	}
-
-	if (adp->va_mem_base != 0 && offset >= adp->va_mem_base &&
-	    offset < adp->va_mem_base + adp->va_mem_size) {
-		*paddr = sc->sc_vmemh + offset - adp->va_mem_base;
+	/* BAR 2 - VGA memory */
+	if (sc->sc_vmem != 0 && offset >= sc->sc_vmem &&
+	    offset < sc->sc_vmem + vi->vi_registers_size) {
+		*paddr = vi->vi_registers + offset - sc->sc_vmem;
 		return (0);
 	}
 
-	if (offset >= adp->va_registers &&
-	    offset < adp->va_registers + adp->va_registers_size) {
-		*paddr = sc->sc_memh + offset - adp->va_registers;
+	/* BAR 0 - framebuffer */
+	if (offset >= sc->sc_mem &&
+	    offset < sc->sc_mem + vi->vi_buffer_size) {
+		*paddr = vi->vi_buffer + offset - sc->sc_mem;
 		return (0);
 	}
 
 	/* 'regular' framebuffer mmap()ing */
 	if (offset < adp->va_window_size) {
-		*paddr = adp->va_window + offset;
+		*paddr = vi->vi_window + offset;
 		return (0);
 	}
 
@@ -1184,10 +1154,11 @@ machfb_pci_attach(device_t dev)
 	struct machfb_softc *sc;
 	video_adapter_t *adp;
 	video_switch_t *sw;
+	video_info_t *vi;
 	phandle_t node;
-	uint32_t *p32, saved_value;
+	int error, i, rid;
+	uint32_t *p32, u32;
 	uint8_t *p;
-	int error, i;
 
 	node = ofw_bus_get_node(dev);
 	if ((sc = (struct machfb_softc *)vid_get_adapter(vid_find_adapter(
@@ -1196,18 +1167,19 @@ machfb_pci_attach(device_t dev)
 		device_set_softc(dev, sc);
 	} else {
 		sc = device_get_softc(dev);
-		bzero(sc, sizeof(struct machfb_softc));
 
 		sc->sc_node = node;
 		sc->sc_chip_id = pci_get_device(dev);
 		sc->sc_chip_rev = pci_get_revid(dev);
 	}
 	adp = &sc->sc_va;
+	vi = &adp->va_info;
 
 	/*
-	 * Regardless whether we are the console and already allocated
-	 * resources in machfb_configure() or not we have to allocate
-	 * them here (again) in order for rman_get_virtual() to work.
+	 * Allocate resources regardless of whether we are the console
+	 * and already obtained the bus tag and handle for the framebuffer
+	 * in machfb_configure() or not so the resources are marked as
+	 * taken in the respective RMAN.
 	 */
 
 	/* Enable memory and IO access. */
@@ -1215,21 +1187,44 @@ machfb_pci_attach(device_t dev)
 	    pci_read_config(dev, PCIR_COMMAND, 2) | PCIM_CMD_PORTEN |
 	    PCIM_CMD_MEMEN, 2);
 
-	sc->sc_memrid = PCIR_BAR(0);
+	/*
+	 * NB: we need to take care that the framebuffer isn't mapped
+	 * in twice as besides wasting resources this isn't possible with
+	 * all MMUs.
+	 */
+	rid = PCIR_BAR(0);
 	if ((sc->sc_memres = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
-	    &sc->sc_memrid, RF_ACTIVE)) == NULL) {
+	    &rid, 0)) == NULL) {
 		device_printf(dev, "cannot allocate memory resources\n");
 		return (ENXIO);
 	}
+	if (OF_getprop(sc->sc_node, "address", &u32, sizeof(u32)) > 0 &&
+		vtophys(u32) == rman_get_bushandle(sc->sc_memres))
+		adp->va_mem_base = u32;
+	else {
+		bus_release_resource(dev, SYS_RES_MEMORY,
+		    rman_get_rid(sc->sc_memres), sc->sc_memres);
+		rid = PCIR_BAR(0);
+		if ((sc->sc_memres = bus_alloc_resource_any(dev,
+		    SYS_RES_MEMORY, &rid, RF_ACTIVE)) == NULL) {
+			device_printf(dev,
+			    "cannot allocate memory resources\n");
+			return (ENXIO);
+		}
+		adp->va_mem_base =
+		    (vm_offset_t)rman_get_virtual(sc->sc_memres);
+	}
 	sc->sc_memt = rman_get_bustag(sc->sc_memres);
 	sc->sc_memh = rman_get_bushandle(sc->sc_memres);
-	adp->va_registers = rman_get_start(sc->sc_memres);
-	adp->va_registers_size = rman_get_size(sc->sc_memres);
 	sc->sc_regt = sc->sc_memt;
 	bus_space_subregion(sc->sc_regt, sc->sc_memh, MACH64_REG_OFF,
 	    MACH64_REG_SIZE, &sc->sc_regh);
-	adp->va_buffer = (vm_offset_t)rman_get_virtual(sc->sc_memres);
-	adp->va_buffer_size = rman_get_size(sc->sc_memres);
+	adp->va_mem_size = rman_get_size(sc->sc_memres);
+	adp->va_buffer = adp->va_mem_base;
+	adp->va_buffer_size = adp->va_mem_size;
+	sc->sc_mem = rman_get_start(sc->sc_memres);
+	vi->vi_buffer = sc->sc_memh;
+	vi->vi_buffer_size = adp->va_buffer_size;
 
 	/*
 	 * Depending on the firmware version the VGA I/O and/or memory
@@ -1239,46 +1234,27 @@ machfb_pci_attach(device_t dev)
 	 * mean that we get valid ones.  Invalid resources seem to have
 	 * in common that they start at address 0.  We don't allocate
 	 * them in this case in order to avoid warnings in apb(4) and
-	 * crashes when using these invalid resources.  Xorg is aware
+	 * crashes when using these invalid resources.  X.Org is aware
 	 * of this and doesn't use the VGA resources in this case (but
 	 * demands them if they are valid).
 	 */
-	sc->sc_viorid = PCIR_BAR(1);
-	if (bus_get_resource_start(dev, SYS_RES_IOPORT, sc->sc_viorid) != 0) {
-		if ((sc->sc_viores = bus_alloc_resource_any(dev,
-		    SYS_RES_IOPORT, &sc->sc_viorid, RF_ACTIVE)) == NULL) {
-			device_printf(dev,
-			    "cannot allocate VGA I/O resources\n");
-			error = ENXIO;
-			goto fail_memres;
-		}
-		sc->sc_viot = rman_get_bustag(sc->sc_viores);
-		sc->sc_vioh = rman_get_bushandle(sc->sc_viores);
-		adp->va_io_base = rman_get_start(sc->sc_viores);
-		adp->va_io_size = rman_get_size(sc->sc_viores);
-	}
-
-	sc->sc_vmemrid = PCIR_BAR(2);
-	if (bus_get_resource_start(dev, SYS_RES_MEMORY, sc->sc_vmemrid) != 0) {
+	rid = PCIR_BAR(2);
+	if (bus_get_resource_start(dev, SYS_RES_MEMORY, rid) != 0) {
 		if ((sc->sc_vmemres = bus_alloc_resource_any(dev,
-		    SYS_RES_MEMORY, &sc->sc_vmemrid, RF_ACTIVE)) == NULL) {
+		    SYS_RES_MEMORY, &rid, RF_ACTIVE)) == NULL) {
 			device_printf(dev,
 			    "cannot allocate VGA memory resources\n");
 			error = ENXIO;
-			goto fail_viores;
+			goto fail_memres;
 		}
-		sc->sc_vmemt = rman_get_bustag(sc->sc_vmemres);
-		sc->sc_vmemh = rman_get_bushandle(sc->sc_vmemres);
-		adp->va_mem_base = rman_get_start(sc->sc_vmemres);
-		adp->va_mem_size = rman_get_size(sc->sc_vmemres);
+		adp->va_registers =
+		    (vm_offset_t)rman_get_virtual(sc->sc_vmemres);
+		adp->va_registers_size = rman_get_size(sc->sc_vmemres);
+		sc->sc_vmem = rman_get_start(sc->sc_vmemres);
+		vi->vi_registers = rman_get_bushandle(sc->sc_vmemres);
+		vi->vi_registers_size = adp->va_registers_size;
 	}
 
-	device_printf(dev,
-	    "%d MB aperture at 0x%08x, %d KB registers at 0x%08x\n",
-	    (u_int)(adp->va_buffer_size / (1024 * 1024)),
-	    (u_int)adp->va_buffer, MACH64_REG_SIZE / 1024,
-	    (u_int)sc->sc_regh);
-
 	if (!(sc->sc_flags & MACHFB_CONSOLE)) {
 		if ((sw = vid_get_switch(MACHFB_DRIVER_NAME)) == NULL) {
 			device_printf(dev, "cannot get video switch\n");
@@ -1303,33 +1279,46 @@ machfb_pci_attach(device_t dev)
 		}
 	}
 
-	device_printf(dev,
-	    "%ld KB %s %d.%d MHz, maximum RAMDAC clock %d MHz, %sDSP\n",
-	    (u_long)sc->sc_memsize, machfb_memtype_names[sc->sc_memtype],
-	    sc->sc_mem_freq / 1000, sc->sc_mem_freq % 1000,
-	    sc->sc_ramdac_freq / 1000,
-	    (sc->sc_flags & MACHFB_DSP) ? "" : "no ");
-	device_printf(dev, "resolution %dx%d at %d bpp\n",
-	    sc->sc_width, sc->sc_height, sc->sc_depth);
-
 	/*
 	 * Test whether the aperture is byte swapped or not, set
-	 * va_window and va_window_size as appropriate.
+	 * va_window and va_window_size as appropriate.  Note that
+	 * the aperture could be mapped either big or little endian
+	 * on independently of the endianess of the host so this
+	 * has to be a runtime test.
 	 */
 	p32 = (uint32_t *)adp->va_buffer;
-	saved_value = *p32;
+	u32 = *p32;
 	p = (uint8_t *)adp->va_buffer;
 	*p32 = 0x12345678;
 	if (!(p[0] == 0x12 && p[1] == 0x34 && p[2] == 0x56 && p[3] == 0x78)) {
 		adp->va_window = adp->va_buffer + 0x800000;
 		adp->va_window_size = adp->va_buffer_size - 0x800000;
+		vi->vi_window = vi->vi_buffer + 0x800000;
+		vi->vi_window_size = vi->vi_buffer_size - 0x800000;
+		sc->sc_flags |= MACHFB_SWAP;
 	} else {
 		adp->va_window = adp->va_buffer;
 		adp->va_window_size = adp->va_buffer_size;
+		vi->vi_window = vi->vi_buffer;
+		vi->vi_window_size = vi->vi_buffer_size;
 	}
-	*p32 = saved_value;
+	*p32 = u32;
 	adp->va_window_gran = adp->va_window_size;
 
+	device_printf(dev,
+	    "%d MB aperture at %p %sswapped\n",
+	    (u_int)(adp->va_window_size / (1024 * 1024)),
+	    (void *)adp->va_window, (sc->sc_flags & MACHFB_SWAP) ?
+	    "" : "not ");
+	device_printf(dev,
+	    "%ld KB %s %d.%d MHz, maximum RAMDAC clock %d MHz, %sDSP\n",
+	    (u_long)sc->sc_memsize, machfb_memtype_names[sc->sc_memtype],
+	    sc->sc_mem_freq / 1000, sc->sc_mem_freq % 1000,
+	    sc->sc_ramdac_freq / 1000,
+	    (sc->sc_flags & MACHFB_DSP) ? "" : "no ");
+	device_printf(dev, "resolution %dx%d at %d bpp\n",
+	    sc->sc_width, sc->sc_height, sc->sc_depth);
+
 	/*
 	 * Allocate one page for the mouse pointer image at the end of
 	 * the little endian aperture, right before the memory mapped
@@ -1359,14 +1348,11 @@ machfb_pci_attach(device_t dev)
 
  fail_vmemres:
 	if (sc->sc_vmemres != NULL)
-		bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_vmemrid,
-		    sc->sc_vmemres);
- fail_viores:
-	if (sc->sc_viores != NULL)
-		bus_release_resource(dev, SYS_RES_IOPORT, sc->sc_viorid,
-		    sc->sc_viores);
+		bus_release_resource(dev, SYS_RES_MEMORY,
+		    rman_get_rid(sc->sc_vmemres), sc->sc_vmemres);
  fail_memres:
-	bus_release_resource(dev, SYS_RES_MEMORY, sc->sc_memrid, sc->sc_memres);
+	bus_release_resource(dev, SYS_RES_MEMORY,
+	    rman_get_rid(sc->sc_memres), sc->sc_memres);
 
 	return (error);
 }
@@ -1396,7 +1382,7 @@ machfb_cursor_enable(struct machfb_softc
 static int
 machfb_cursor_install(struct machfb_softc *sc)
 {
-	uint16_t *p;
+	uint16_t *p, v;
 	uint8_t fg;
 	int i, j;
 
@@ -1410,12 +1396,18 @@ machfb_cursor_install(struct machfb_soft
 	    machfb_default_cmap[fg].green << 16 |
 	    machfb_default_cmap[fg].blue << 8);
 	p = (uint16_t *)(sc->sc_va.va_buffer + sc->sc_curoff);
-	for (i = 0; i < 64; i++)
-		for (j = 0; j < 8; j++)
-			*(p++) = machfb_mouse_pointer_lut[
-			    machfb_mouse_pointer_bits[i][j] >> 4] |
+	for (i = 0; i < 64; i++) {
+		for (j = 0; j < 8; j++) {
+			v = machfb_mouse_pointer_lut[
+			    machfb_mouse_pointer_bits[i][j] >> 4] << 8 |
 			    machfb_mouse_pointer_lut[
-			    machfb_mouse_pointer_bits[i][j] & 0x0f] << 8;
+			    machfb_mouse_pointer_bits[i][j] & 0x0f];
+			if (sc->sc_flags & MACHFB_SWAP)
+				*(p++) = bswap16(v);
+			else
+				*(p++) = v;
+		}
+	}
 
 	return (0);
 }
@@ -1424,7 +1416,7 @@ static int
 machfb_get_memsize(struct machfb_softc *sc)
 {
 	int tmp, memsize;
-	int mem_tab[] = {
+	const int const mem_tab[] = {
 		512, 1024, 2048, 4096, 6144, 8192, 12288, 16384
 	};
 
From edwin at FreeBSD.org  Sat Apr 18 04:50:21 2009
From: edwin at FreeBSD.org (Edwin Groothuis)
Date: Sat Apr 18 05:35:24 2009
Subject: svn commit: r191244 - stable/7/share/zoneinfo
Message-ID: <200904181150.n3IBoBeY075247@svn.freebsd.org>

Author: edwin
Date: Sat Apr 18 11:50:11 2009
New Revision: 191244
URL: http://svn.freebsd.org/changeset/base/191244

Log:
  MFC of tzdata2009f
  
  Correct DST information for Pakistan for 2009.
  
  Approved by:	re (kip)

Modified:
  stable/7/share/zoneinfo/   (props changed)
  stable/7/share/zoneinfo/asia

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Sat Apr 18 07:39:11 2009	(r191243)
+++ stable/7/share/zoneinfo/asia	Sat Apr 18 11:50:11 2009	(r191244)
@@ -1,4 +1,4 @@
-# @(#)asia	8.29
+# @(#)asia	8.30
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -1589,11 +1589,46 @@ Zone	Asia/Muscat	3:54:20 -	LMT	1920
 # http://dailymailnews.com/200808/28/news/dmbrn03.html
 # 
 
+# From Alexander Krivenyshev (2009-04-08):
+# Based on previous media reports that "... proposed plan to
+# advance clocks by one hour from May 1 will cause disturbance
+# to the working schedules rather than bringing discipline in
+# official working."
+# 
+# http://www.thenews.com.pk/daily_detail.asp?id=171280
+# 
+#
+# recent news that instead of May 2009 - Pakistan plan to
+# introduce DST from April 15, 2009
+#
+# FYI: Associated Press Of Pakistan
+# April 08, 2009
+# Cabinet okays proposal to advance clocks by one hour from April 15
+# 
+# http://www.app.com.pk/en_/index.php?option=com_content&task=view&id=73043&Itemid=1
+# 
+#
+# or
+#
+# 
+# http://www.worldtimezone.com/dst_news/dst_news_pakistan05.html
+# 
+#
+# ....
+# The Federal Cabinet on Wednesday approved the proposal to
+# advance clocks in the country by one hour from April 15 to
+# conserve energy"
+
+# From Arthur David Olson (2009-04-10):
+# Assume for now that Pakistan will end DST in 2009 as it did in 2008.
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Pakistan	2002	only	-	Apr	Sun>=2	0:01	1:00	S
 Rule Pakistan	2002	only	-	Oct	Sun>=2	0:01	0	-
 Rule Pakistan	2008	only	-	Jun	1	0:00	1:00	S
 Rule Pakistan	2008	only	-	Nov	1	0:00	0	-
+Rule Pakistan	2009	only	-	Apr	15	0:00	1:00	S
+Rule Pakistan	2009	only	-	Nov	1	0:00	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Karachi	4:28:12 -	LMT	1907
 			5:30	-	IST	1942 Sep
From emax at FreeBSD.org  Mon Apr 20 16:55:49 2009
From: emax at FreeBSD.org (Maksim Yevmenkin)
Date: Mon Apr 20 16:56:17 2009
Subject: svn commit: r191325 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/atkbdc dev/cxgb
Message-ID: <200904201655.n3KGtmFW052412@svn.freebsd.org>

Author: emax
Date: Mon Apr 20 16:55:48 2009
New Revision: 191325
URL: http://svn.freebsd.org/changeset/base/191325

Log:
  MFC r191164
  
  Prevent atkbd(4) interrupt handler from calling keyboard callback function
  when polled mode is enabled. This should help with duplicated/missing
  characters problem at mountroot, geli, etc. prompts on multi CPU systems
  while kbdmux(4) is enabled.
  
  Tested by:	Tobias Grosser 
  Tested by:	Fabian Keil 
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/atkbdc/atkbd.c
  stable/7/sys/dev/cxgb/   (props changed)

Modified: stable/7/sys/dev/atkbdc/atkbd.c
==============================================================================
--- stable/7/sys/dev/atkbdc/atkbd.c	Mon Apr 20 16:16:43 2009	(r191324)
+++ stable/7/sys/dev/atkbdc/atkbd.c	Mon Apr 20 16:55:48 2009	(r191325)
@@ -476,7 +476,7 @@ atkbd_term(keyboard_t *kbd)
 static int
 atkbd_intr(keyboard_t *kbd, void *arg)
 {
-	atkbd_state_t *state;
+	atkbd_state_t *state = (atkbd_state_t *)kbd->kb_data;
 	int delay[2];
 	int c;
 
@@ -485,7 +485,6 @@ atkbd_intr(keyboard_t *kbd, void *arg)
 		 * The keyboard was not detected before;
 		 * it must have been reconnected!
 		 */
-		state = (atkbd_state_t *)kbd->kb_data;
 		init_keyboard(state->kbdc, &kbd->kb_type,
 			      kbd->kb_config);
 		KBD_FOUND_DEVICE(kbd);
@@ -496,6 +495,9 @@ atkbd_intr(keyboard_t *kbd, void *arg)
 		atkbd_ioctl(kbd, KDSETREPEAT, (caddr_t)delay);
 	}
 
+	if (state->ks_polling)
+		return 0;
+
 	if (KBD_IS_ACTIVE(kbd) && KBD_IS_BUSY(kbd)) {
 		/* let the callback function to process the input */
 		(*kbd->kb_callback.kc_func)(kbd, KBDIO_KEYINPUT,
From emax at FreeBSD.org  Mon Apr 20 16:57:44 2009
From: emax at FreeBSD.org (Maksim Yevmenkin)
Date: Mon Apr 20 16:58:00 2009
Subject: svn commit: r191326 - stable/7/usr.sbin/bluetooth/btpand
Message-ID: <200904201657.n3KGvhgv052506@svn.freebsd.org>

Author: emax
Date: Mon Apr 20 16:57:43 2009
New Revision: 191326
URL: http://svn.freebsd.org/changeset/base/191326

Log:
  MFC r191232
  
  Fix bug in event timeout handling
  
  Submitted by:	mav
  Approved by:	re (kib)

Modified:
  stable/7/usr.sbin/bluetooth/btpand/   (props changed)
  stable/7/usr.sbin/bluetooth/btpand/event.c

Modified: stable/7/usr.sbin/bluetooth/btpand/event.c
==============================================================================
--- stable/7/usr.sbin/bluetooth/btpand/event.c	Mon Apr 20 16:55:48 2009	(r191325)
+++ stable/7/usr.sbin/bluetooth/btpand/event.c	Mon Apr 20 16:57:43 2009	(r191326)
@@ -110,12 +110,12 @@ __event_dispatch(void)
 		event_del(ev);
 
 		if (ev->flags & EV_HAS_TIMEOUT) {
-			t = now;
-
-			if (tv_cmp(&t, &ev->expire) <= 0)
+			if (tv_cmp(&now, &ev->expire) >= 0)
 				t.tv_sec = t.tv_usec = 0;
-			else
-				tv_sub(&t, &ev->expire);
+			else {
+				t = ev->expire;
+				tv_sub(&t, &now);
+			}
 
 			if (tv_cmp(&t, &timeout) < 0)
 				timeout = t;
From blackend at FreeBSD.org  Tue Apr 21 09:53:13 2009
From: blackend at FreeBSD.org (Marc Fonvieille)
Date: Tue Apr 21 09:53:30 2009
Subject: svn commit: r191349 - stable/7/usr.sbin/sysinstall
Message-ID: <200904210953.n3L9rClk078467@svn.freebsd.org>

Author: blackend (doc committer)
Date: Tue Apr 21 09:53:11 2009
New Revision: 191349
URL: http://svn.freebsd.org/changeset/base/191349

Log:
  MFC: r191265
  Add docs category.
  
  Approved by:  re (kensmith)

Modified:
  stable/7/usr.sbin/sysinstall/index.c

Modified: stable/7/usr.sbin/sysinstall/index.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/index.c	Tue Apr 21 09:43:51 2009	(r191348)
+++ stable/7/usr.sbin/sysinstall/index.c	Tue Apr 21 09:53:11 2009	(r191349)
@@ -93,6 +93,7 @@ static char *descrs[] = {
     "deskutils", "Various Desktop utilities.",
     "devel", "Software development utilities and libraries.",
     "dns", "Domain Name Service tools.",
+    "docs", "Meta-ports for FreeBSD documentation.",
     "editors", "Editors.",
     "elisp", "Things related to Emacs Lisp.",
     "emulators", "Utilities for emulating other operating systems.",
From cperciva at FreeBSD.org  Tue Apr 21 10:49:41 2009
From: cperciva at FreeBSD.org (Colin Percival)
Date: Tue Apr 21 10:49:58 2009
Subject: svn commit: r191351 - in stable/7/contrib/ntp: . ntpq
Message-ID: <200904211049.n3LAneMq080296@svn.freebsd.org>

Author: cperciva
Date: Tue Apr 21 10:49:40 2009
New Revision: 191351
URL: http://svn.freebsd.org/changeset/base/191351

Log:
  MFH r191302: Fix a buffer overflow.
  
  For reasons of stack alignment, it does not appear that this is exploitable
  on any systems FreeBSD runs on, so this will not be getting a security
  advisory.
  
  Approved by:	re (kib)

Modified:
  stable/7/contrib/ntp/   (props changed)
  stable/7/contrib/ntp/ntpq/ntpq.c

Modified: stable/7/contrib/ntp/ntpq/ntpq.c
==============================================================================
--- stable/7/contrib/ntp/ntpq/ntpq.c	Tue Apr 21 09:55:17 2009	(r191350)
+++ stable/7/contrib/ntp/ntpq/ntpq.c	Tue Apr 21 10:49:40 2009	(r191351)
@@ -3185,9 +3185,9 @@ cookedprint(
 				if (!decodeuint(value, &uval))
 				    output_raw = '?';
 				else {
-					char b[10];
+					char b[12];
 
-					(void) sprintf(b, "%03lo", uval);
+					(void) snprintf(b, sizeof(b), "%03lo", uval);
 					output(fp, name, b);
 				}
 				break;
From bz at FreeBSD.org  Wed Apr 22 08:22:17 2009
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Wed Apr 22 08:22:28 2009
Subject: svn commit: r191372 - stable/7/usr.sbin/ppp
Message-ID: <200904220822.n3M8MGh7048146@svn.freebsd.org>

Author: bz
Date: Wed Apr 22 08:22:16 2009
New Revision: 191372
URL: http://svn.freebsd.org/changeset/base/191372

Log:
  MFC r191305:
  
   Back out r186308 (r191014 in stable/7):
  
   In case of AF_LINK, which the kernel still returns for an RTAX_GATEWAY
   as an empty sockaddr_dl in the classic tun case:
   copying the address into the message payload, but not the RTA_GATEWAY
   flag results in rt_xaddrs() in the kernel tripping over that and parsing
   the next attribute set with a flag, i.e. RTA_NETMASK, with the gateway
   address, resulting in bogus route entry.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/usr.sbin/ppp/   (props changed)
  stable/7/usr.sbin/ppp/route.c

Modified: stable/7/usr.sbin/ppp/route.c
==============================================================================
--- stable/7/usr.sbin/ppp/route.c	Wed Apr 22 06:33:26 2009	(r191371)
+++ stable/7/usr.sbin/ppp/route.c	Wed Apr 22 08:22:16 2009	(r191372)
@@ -902,10 +902,8 @@ rt_Update(struct bundle *bundle, const s
     p += memcpy_roundup(p, dst, dst->sa_len);
   }
 
-  if (gw != NULL && (gw->sa_family != AF_LINK))
-    rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
+  rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
   p += memcpy_roundup(p, gw, gw->sa_len);
-
   if (mask) {
     rtmes.m_rtm.rtm_addrs |= RTA_NETMASK;
     p += memcpy_roundup(p, mask, mask->sa_len);
From roberto at FreeBSD.org  Wed Apr 22 13:17:48 2009
From: roberto at FreeBSD.org (Ollivier Robert)
Date: Wed Apr 22 13:18:03 2009
Subject: svn commit: r191377 - stable/7/usr.sbin/sysinstall
Message-ID: <200904221317.n3MDHlU9056506@svn.freebsd.org>

Author: roberto
Date: Wed Apr 22 13:17:47 2009
New Revision: 191377
URL: http://svn.freebsd.org/changeset/base/191377

Log:
  MFH of changeset r191200:
  
  Add an entry for the French macbook keyboard layout.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/usr.sbin/sysinstall/   (props changed)
  stable/7/usr.sbin/sysinstall/menus.c

Modified: stable/7/usr.sbin/sysinstall/menus.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/menus.c	Wed Apr 22 13:13:34 2009	(r191376)
+++ stable/7/usr.sbin/sysinstall/menus.c	Wed Apr 22 13:17:47 2009	(r191377)
@@ -1880,6 +1880,7 @@ DMenu MenuSysconsKeymap = {
       { " Finnish ISO",  "Finnish ISO keymap",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=finnish.iso" },
       { " French ISO (accent)", "French ISO keymap (accent keys)",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso.acc" },
       { " French ISO",	"French ISO keymap",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.iso" },
+      { " French ISO/Macbook",	"French ISO keymap on macbook",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=fr.macbook.acc" },
       { "German CP850",	"German Code Page 850 keymap",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.cp850"	},
       { " German ISO",	"German ISO keymap",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=german.iso" },
       { " Greek 101",	"Greek ISO keymap (101 keys)",	dmenuVarCheck, dmenuSetKmapVariable, NULL, "keymap=gr.us101.acc" },
From cperciva at FreeBSD.org  Wed Apr 22 14:07:15 2009
From: cperciva at FreeBSD.org (Colin Percival)
Date: Wed Apr 22 14:07:27 2009
Subject: svn commit: r191381 - head/crypto/openssl/crypto/asn1 releng/6.3
	releng/6.3/crypto/openssl/crypto/asn1
	releng/6.3/lib/libc/db/btree releng/6.3/lib/libc/db/hash
	releng/6.3/lib/libc/db/mpool releng/6...
Message-ID: <200904221407.n3ME7EjC058272@svn.freebsd.org>

Author: cperciva
Date: Wed Apr 22 14:07:14 2009
New Revision: 191381
URL: http://svn.freebsd.org/changeset/base/191381

Log:
  Don't leak information via uninitialized space in db(3) records. [09:07]
  
  Sanity-check string lengths in order to stop OpenSSL crashing
  when printing corrupt BMPString or UniversalString objects. [09:08]
  
  Security:	FreeBSD-SA-09:07.libc
  Security:	FreeBSD-SA-09:08.openssl
  Security:	CVE-2009-0590
  Approved by:	re (kensmith)
  Approved by:	so (cperciva)

Modified:
  stable/7/crypto/openssl/crypto/asn1/asn1.h
  stable/7/crypto/openssl/crypto/asn1/asn1_err.c
  stable/7/crypto/openssl/crypto/asn1/tasn_dec.c

Changes in other areas also in this revision:
Modified:
  head/crypto/openssl/crypto/asn1/asn1.h
  head/crypto/openssl/crypto/asn1/asn1_err.c
  head/crypto/openssl/crypto/asn1/tasn_dec.c
  releng/6.3/UPDATING
  releng/6.3/crypto/openssl/crypto/asn1/asn1.h
  releng/6.3/crypto/openssl/crypto/asn1/asn1_err.c
  releng/6.3/crypto/openssl/crypto/asn1/tasn_dec.c
  releng/6.3/lib/libc/db/btree/bt_split.c
  releng/6.3/lib/libc/db/hash/hash_buf.c
  releng/6.3/lib/libc/db/mpool/mpool.c
  releng/6.3/sys/conf/newvers.sh
  releng/6.4/UPDATING
  releng/6.4/crypto/openssl/crypto/asn1/asn1.h
  releng/6.4/crypto/openssl/crypto/asn1/asn1_err.c
  releng/6.4/crypto/openssl/crypto/asn1/tasn_dec.c
  releng/6.4/lib/libc/db/btree/bt_split.c
  releng/6.4/lib/libc/db/hash/hash_buf.c
  releng/6.4/lib/libc/db/mpool/mpool.c
  releng/6.4/sys/conf/newvers.sh
  releng/7.0/UPDATING
  releng/7.0/crypto/openssl/crypto/asn1/asn1.h
  releng/7.0/crypto/openssl/crypto/asn1/asn1_err.c
  releng/7.0/crypto/openssl/crypto/asn1/tasn_dec.c
  releng/7.0/lib/libc/db/btree/bt_split.c
  releng/7.0/lib/libc/db/hash/hash_buf.c
  releng/7.0/lib/libc/db/mpool/mpool.c
  releng/7.0/sys/conf/newvers.sh
  releng/7.1/UPDATING
  releng/7.1/crypto/openssl/crypto/asn1/asn1.h
  releng/7.1/crypto/openssl/crypto/asn1/asn1_err.c
  releng/7.1/crypto/openssl/crypto/asn1/tasn_dec.c
  releng/7.1/lib/libc/db/btree/bt_split.c
  releng/7.1/lib/libc/db/hash/hash_buf.c
  releng/7.1/lib/libc/db/mpool/mpool.c
  releng/7.1/sys/conf/newvers.sh
  releng/7.2/UPDATING
  releng/7.2/crypto/openssl/crypto/asn1/asn1.h
  releng/7.2/crypto/openssl/crypto/asn1/asn1_err.c
  releng/7.2/crypto/openssl/crypto/asn1/tasn_dec.c
  stable/6/crypto/openssl/crypto/asn1/asn1.h
  stable/6/crypto/openssl/crypto/asn1/asn1_err.c
  stable/6/crypto/openssl/crypto/asn1/tasn_dec.c

Modified: stable/7/crypto/openssl/crypto/asn1/asn1.h
==============================================================================
--- stable/7/crypto/openssl/crypto/asn1/asn1.h	Wed Apr 22 13:31:52 2009	(r191380)
+++ stable/7/crypto/openssl/crypto/asn1/asn1.h	Wed Apr 22 14:07:14 2009	(r191381)
@@ -1134,6 +1134,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_BAD_OBJECT_HEADER			 102
 #define ASN1_R_BAD_PASSWORD_READ			 103
 #define ASN1_R_BAD_TAG					 104
+#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH		 210
 #define ASN1_R_BN_LIB					 105
 #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH			 106
 #define ASN1_R_BUFFER_TOO_SMALL				 107
@@ -1213,6 +1214,7 @@ void ERR_load_ASN1_strings(void);
 #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY			 157
 #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY		 158
 #define ASN1_R_UNEXPECTED_EOC				 159
+#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH		 211
 #define ASN1_R_UNKNOWN_FORMAT				 160
 #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM		 161
 #define ASN1_R_UNKNOWN_OBJECT_TYPE			 162

Modified: stable/7/crypto/openssl/crypto/asn1/asn1_err.c
==============================================================================
--- stable/7/crypto/openssl/crypto/asn1/asn1_err.c	Wed Apr 22 13:31:52 2009	(r191380)
+++ stable/7/crypto/openssl/crypto/asn1/asn1_err.c	Wed Apr 22 14:07:14 2009	(r191381)
@@ -188,6 +188,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
 {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER)    ,"bad object header"},
 {ERR_REASON(ASN1_R_BAD_PASSWORD_READ)    ,"bad password read"},
 {ERR_REASON(ASN1_R_BAD_TAG)              ,"bad tag"},
+{ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),"bmpstring is wrong length"},
 {ERR_REASON(ASN1_R_BN_LIB)               ,"bn lib"},
 {ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
 {ERR_REASON(ASN1_R_BUFFER_TOO_SMALL)     ,"buffer too small"},
@@ -267,6 +268,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
 {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
 {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
 {ERR_REASON(ASN1_R_UNEXPECTED_EOC)       ,"unexpected eoc"},
+{ERR_REASON(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH),"universalstring is wrong length"},
 {ERR_REASON(ASN1_R_UNKNOWN_FORMAT)       ,"unknown format"},
 {ERR_REASON(ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM),"unknown message digest algorithm"},
 {ERR_REASON(ASN1_R_UNKNOWN_OBJECT_TYPE)  ,"unknown object type"},

Modified: stable/7/crypto/openssl/crypto/asn1/tasn_dec.c
==============================================================================
--- stable/7/crypto/openssl/crypto/asn1/tasn_dec.c	Wed Apr 22 13:31:52 2009	(r191380)
+++ stable/7/crypto/openssl/crypto/asn1/tasn_dec.c	Wed Apr 22 14:07:14 2009	(r191381)
@@ -1012,6 +1012,18 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const
 		case V_ASN1_SET:
 		case V_ASN1_SEQUENCE:
 		default:
+		if (utype == V_ASN1_BMPSTRING && (len & 1))
+			{
+			ASN1err(ASN1_F_ASN1_EX_C2I,
+					ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
+			goto err;
+			}
+		if (utype == V_ASN1_UNIVERSALSTRING && (len & 3))
+			{
+			ASN1err(ASN1_F_ASN1_EX_C2I,
+					ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
+			goto err;
+			}
 		/* All based on ASN1_STRING and handled the same */
 		if (!*pval)
 			{
From rnoland at FreeBSD.org  Wed Apr 22 20:58:25 2009
From: rnoland at FreeBSD.org (Robert Noland)
Date: Wed Apr 22 20:58:31 2009
Subject: svn commit: r191404 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
	dev/cxgb dev/drm
Message-ID: <200904222058.n3MKwNBE067459@svn.freebsd.org>

Author: rnoland
Date: Wed Apr 22 20:58:23 2009
New Revision: 191404
URL: http://svn.freebsd.org/changeset/base/191404

Log:
  Merge 191274.
  
  Don't try to setup interrupts for drivers that don't support them.
  
  This causes sis and probably a couple of other driver to panic and fail.
  
  Tested by:	cpghost 
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/   (props changed)
  stable/7/sys/dev/ath/ath_hal/   (props changed)
  stable/7/sys/dev/cxgb/   (props changed)
  stable/7/sys/dev/drm/drm_drv.c

Modified: stable/7/sys/dev/drm/drm_drv.c
==============================================================================
--- stable/7/sys/dev/drm/drm_drv.c	Wed Apr 22 20:49:54 2009	(r191403)
+++ stable/7/sys/dev/drm/drm_drv.c	Wed Apr 22 20:58:23 2009	(r191404)
@@ -134,7 +134,7 @@ static struct cdevsw drm_cdevsw = {
 	.d_flags =	D_TRACKCLOSE
 };
 
-int drm_msi = 1;	/* Enable by default. */
+static int drm_msi = 1;	/* Enable by default. */
 TUNABLE_INT("hw.drm.msi", &drm_msi);
 
 static struct drm_msi_blacklist_entry drm_msi_blacklist[] = {
@@ -228,28 +228,31 @@ int drm_attach(device_t kdev, drm_pci_id
 	dev->pci_vendor = pci_get_vendor(dev->device);
 	dev->pci_device = pci_get_device(dev->device);
 
-	if (drm_msi &&
-	    !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) {
-		msicount = pci_msi_count(dev->device);
-		DRM_DEBUG("MSI count = %d\n", msicount);
-		if (msicount > 1)
-			msicount = 1;
+	if (drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) {
+		if (drm_msi &&
+		    !drm_msi_is_blacklisted(dev->pci_vendor, dev->pci_device)) {
+			msicount = pci_msi_count(dev->device);
+			DRM_DEBUG("MSI count = %d\n", msicount);
+			if (msicount > 1)
+				msicount = 1;
+
+			if (pci_alloc_msi(dev->device, &msicount) == 0) {
+				DRM_INFO("MSI enabled %d message(s)\n",
+				    msicount);
+				dev->msi_enabled = 1;
+				dev->irqrid = 1;
+			}
+		}
 
-		if (pci_alloc_msi(dev->device, &msicount) == 0) {
-			DRM_INFO("MSI enabled %d message(s)\n", msicount);
-			dev->msi_enabled = 1;
-			dev->irqrid = 1;
+		dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ,
+		    &dev->irqrid, RF_SHAREABLE);
+		if (!dev->irqr) {
+			return ENOENT;
 		}
-	}
 
-	dev->irqr = bus_alloc_resource_any(dev->device, SYS_RES_IRQ,
-	    &dev->irqrid, RF_SHAREABLE);
-	if (!dev->irqr) {
-		return ENOENT;
+		dev->irq = (int) rman_get_start(dev->irqr);
 	}
 
-	dev->irq = (int) rman_get_start(dev->irqr);
-
 	mtx_init(&dev->dev_lock, "drmdev", NULL, MTX_DEF);
 	mtx_init(&dev->irq_lock, "drmirq", NULL, MTX_DEF);
 	mtx_init(&dev->vbl_lock, "drmvbl", NULL, MTX_DEF);
From brueffer at FreeBSD.org  Thu Apr 23 07:56:11 2009
From: brueffer at FreeBSD.org (Christian Brueffer)
Date: Thu Apr 23 07:56:29 2009
Subject: svn commit: r191412 - stable/7/share/man/man4
Message-ID: <200904230756.n3N7uAeG080091@svn.freebsd.org>

Author: brueffer
Date: Thu Apr 23 07:56:10 2009
New Revision: 191412
URL: http://svn.freebsd.org/changeset/base/191412

Log:
  MFC r190822
  
  Move an "end list" macro to the right place.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man4/igb.4   (props changed)
  stable/7/share/man/man4/wpi.4

Modified: stable/7/share/man/man4/wpi.4
==============================================================================
--- stable/7/share/man/man4/wpi.4	Thu Apr 23 02:30:44 2009	(r191411)
+++ stable/7/share/man/man4/wpi.4	Thu Apr 23 07:56:10 2009	(r191412)
@@ -126,6 +126,7 @@ unload/reload the driver to continue.
 .It "wpi%d: Radio transmitter is switched off"
 The hardware switch controlling the radio is currently turned off. 
 Data transmission is not possible in this state.
+.El
 .Sh BUGS
 Not all the error messages are documented here.
 .Pp
@@ -133,7 +134,6 @@ Automatic recovery of firmware failures 
 detection of toggling the radio switch on.
 .Pp
 Background scanning is not currently supported.
-.El
 .Sh SEE ALSO
 .Xr altq 4 ,
 .Xr ipw 4 ,
From kensmith at FreeBSD.org  Thu Apr 23 12:04:34 2009
From: kensmith at FreeBSD.org (Ken Smith)
Date: Thu Apr 23 12:04:52 2009
Subject: svn commit: r191419 - stable/7/release/scripts
Message-ID: <200904231204.n3NC4Xn9086558@svn.freebsd.org>

Author: kensmith
Date: Thu Apr 23 12:04:33 2009
New Revision: 191419
URL: http://svn.freebsd.org/changeset/base/191419

Log:
  Adjust for the 7.2-RELEASE package set.
  
  Approved by:	re (kib)

Modified:
  stable/7/release/scripts/package-split.py

Modified: stable/7/release/scripts/package-split.py
==============================================================================
--- stable/7/release/scripts/package-split.py	Thu Apr 23 11:51:53 2009	(r191418)
+++ stable/7/release/scripts/package-split.py	Thu Apr 23 12:04:33 2009	(r191419)
@@ -33,7 +33,7 @@ def disc1_packages():
 		 'x11-servers/xorg-nestserver',
 		 'x11-servers/xorg-vfbserver',
                  'devel/imake'])
-    if arch == 'i386':
+    if arch == 'amd64' or arch == 'i386':
         pkgs.append('emulators/linux_base-fc4')
     return pkgs
 
@@ -47,17 +47,17 @@ def disc2_packages():
 		'x11/kde-lite']
     else:
 	pkgs = ['x11/gnome2',
-		'x11/kdebase3',
-		'x11/kdelibs3',
-		'games/kdegames3',
-		'graphics/kdegraphics3',
-		'misc/kdeutils3',
-		'multimedia/kdemultimedia3',
-		'net/kdenetwork3']
+		'x11/kdebase4',
+		'x11/kdelibs4',
+		'games/kdegames4',
+		'graphics/kdegraphics4',
+		'misc/kdeutils4',
+		'multimedia/kdemultimedia4',
+		'net/kdenetwork4']
     return pkgs
 
 def disc3_packages():
-    pkgs = ['x11/kde3',
+    pkgs = ['x11/kde4',
 	    'x11-wm/afterstep',
             'x11-wm/windowmaker',
             'x11-wm/fvwm2',
From brueffer at FreeBSD.org  Thu Apr 23 16:56:28 2009
From: brueffer at FreeBSD.org (Christian Brueffer)
Date: Thu Apr 23 16:56:45 2009
Subject: svn commit: r191425 - in stable/7: lib/libc lib/libc/string
	lib/libc/sys sbin/savecore share/man/man4
	share/man/man4/man4.i386 share/man/man4/man4.powerpc
	usr.sbin/cpucontrol usr.sbin/crashinfo usr...
Message-ID: <200904231656.n3NGuQlw093618@svn.freebsd.org>

Author: brueffer
Date: Thu Apr 23 16:56:26 2009
New Revision: 191425
URL: http://svn.freebsd.org/changeset/base/191425

Log:
  MFC r191414
  
  Correct the information about when the respective functionality first
  appeared in FreeBSD.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/lib/libc/   (props changed)
  stable/7/lib/libc/string/ffsll.c   (props changed)
  stable/7/lib/libc/string/flsll.c   (props changed)
  stable/7/lib/libc/string/memchr.3
  stable/7/lib/libc/sys/setfib.2
  stable/7/sbin/savecore/   (props changed)
  stable/7/sbin/savecore/savecore.8
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man4/cpuctl.4
  stable/7/share/man/man4/igb.4   (props changed)
  stable/7/share/man/man4/man4.i386/glxsb.4
  stable/7/share/man/man4/man4.powerpc/bm.4
  stable/7/share/man/man4/u3g.4
  stable/7/usr.sbin/cpucontrol/   (props changed)
  stable/7/usr.sbin/cpucontrol/cpucontrol.8
  stable/7/usr.sbin/crashinfo/   (props changed)
  stable/7/usr.sbin/crashinfo/crashinfo.8
  stable/7/usr.sbin/setfib/   (props changed)
  stable/7/usr.sbin/setfib/setfib.1

Modified: stable/7/lib/libc/string/memchr.3
==============================================================================
--- stable/7/lib/libc/string/memchr.3	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/lib/libc/string/memchr.3	Thu Apr 23 16:56:26 2009	(r191425)
@@ -99,6 +99,6 @@ The
 .Fn memrchr
 function first appeared in GNU libc 2.1.91, this implementation
 first appeared in
-.Fx 8.0 ,
+.Fx 6.4 ,
 coming from
 .Ox 4.3 .

Modified: stable/7/lib/libc/sys/setfib.2
==============================================================================
--- stable/7/lib/libc/sys/setfib.2	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/lib/libc/sys/setfib.2	Thu Apr 23 16:56:26 2009	(r191425)
@@ -76,4 +76,4 @@ have been added to many other UNIX style
 The
 .Fn setfib
 function appeared in
-.Fx 8.0 .
+.Fx 7.1 .

Modified: stable/7/sbin/savecore/savecore.8
==============================================================================
--- stable/7/sbin/savecore/savecore.8	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/sbin/savecore/savecore.8	Thu Apr 23 16:56:26 2009	(r191425)
@@ -154,6 +154,6 @@ utility appeared in
 .Bx 4.1 .
 .Pp
 Support for kernel textdumps appeared in
-.Fx 8.0 .
+.Fx 7.1 .
 .Sh BUGS
 The minfree code does not consider the effect of compression or sparse files.

Modified: stable/7/share/man/man4/cpuctl.4
==============================================================================
--- stable/7/share/man/man4/cpuctl.4	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/share/man/man4/cpuctl.4	Thu Apr 23 16:56:26 2009	(r191425)
@@ -142,7 +142,7 @@ The firmware image address points outsid
 The
 .Nm
 driver first appeared in
-.Fx 8.0 .
+.Fx 7.2 .
 .Sh BUGS
 Yes, probably, report if any.
 .Sh AUTHORS

Modified: stable/7/share/man/man4/man4.i386/glxsb.4
==============================================================================
--- stable/7/share/man/man4/man4.i386/glxsb.4	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/share/man/man4/man4.i386/glxsb.4	Thu Apr 23 16:56:26 2009	(r191425)
@@ -82,7 +82,7 @@ device driver first appeared in
 The
 .Nm
 device driver was imported into
-.Fx 8.0 .
+.Fx 7.1 .
 .Sh AUTHORS
 .An -nosplit
 The

Modified: stable/7/share/man/man4/man4.powerpc/bm.4
==============================================================================
--- stable/7/share/man/man4/man4.powerpc/bm.4	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/share/man/man4/man4.powerpc/bm.4	Thu Apr 23 16:56:26 2009	(r191425)
@@ -76,7 +76,7 @@ Apple BMAC+ Onboard Ethernet
 The
 .Nm
 device driver appeared in
-.Fx 8.0 .
+.Fx 7.1 .
 .Sh AUTHORS
 .An -nosplit
 The

Modified: stable/7/share/man/man4/u3g.4
==============================================================================
--- stable/7/share/man/man4/u3g.4	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/share/man/man4/u3g.4	Thu Apr 23 16:56:26 2009	(r191425)
@@ -109,7 +109,7 @@ and replug the device.
 The
 .Nm
 driver appeared in
-.Fx 8.0 ,
+.Fx 7.2 ,
 is based on the
 .Xr uark 4
 driver, and written by

Modified: stable/7/usr.sbin/cpucontrol/cpucontrol.8
==============================================================================
--- stable/7/usr.sbin/cpucontrol/cpucontrol.8	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/usr.sbin/cpucontrol/cpucontrol.8	Thu Apr 23 16:56:26 2009	(r191425)
@@ -113,7 +113,7 @@ use the following command:
 The
 .Nm
 utility first appeared in
-.Fx 8.0 .
+.Fx 7.2 .
 .Sh BUGS
 Yes, probably, report if any.
 .Sh AUTHORS

Modified: stable/7/usr.sbin/crashinfo/crashinfo.8
==============================================================================
--- stable/7/usr.sbin/crashinfo/crashinfo.8	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/usr.sbin/crashinfo/crashinfo.8	Thu Apr 23 16:56:26 2009	(r191425)
@@ -106,4 +106,4 @@ Specify an explicit kernel file.
 The
 .Nm
 utility appeared in
-.Fx 8.0 .
+.Fx 6.4 .

Modified: stable/7/usr.sbin/setfib/setfib.1
==============================================================================
--- stable/7/usr.sbin/setfib/setfib.1	Thu Apr 23 15:56:01 2009	(r191424)
+++ stable/7/usr.sbin/setfib/setfib.1	Thu Apr 23 16:56:26 2009	(r191425)
@@ -94,4 +94,4 @@ have an equivalent function.
 The
 .Nm
 utility appeared in
-.Fx 8.0 .
+.Fx 7.1 .
From rwatson at FreeBSD.org  Thu Apr 23 17:47:16 2009
From: rwatson at FreeBSD.org (Robert Watson)
Date: Thu Apr 23 17:47:27 2009
Subject: svn commit: r191434 - stable/7/sys/net
Message-ID: <200904231747.n3NHlFpt095226@svn.freebsd.org>

Author: rwatson
Date: Thu Apr 23 17:47:15 2009
New Revision: 191434
URL: http://svn.freebsd.org/changeset/base/191434

Log:
  In sysctl_ifdata(), query the ifnet pointer using the index only
  once, rather than querying it, validating it, and then re-querying
  it without validating it.  This may avoid a NULL pointer
  dereference and resulting kernel page fault if an interface is
  being deleted while bsnmp or other tools are querying data on the
  interface.
  
  The full fix, to properly refcount the interface for the duration
  of the sysctl, is in 8.x, but is considered too high-risk for
  7.2, so instead will appear in 7.3 (if all goes well).
  
  Reproted by:	mdtancsa
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/net/if_mib.c

Modified: stable/7/sys/net/if_mib.c
==============================================================================
--- stable/7/sys/net/if_mib.c	Thu Apr 23 17:41:54 2009	(r191433)
+++ stable/7/sys/net/if_mib.c	Thu Apr 23 17:47:15 2009	(r191434)
@@ -82,11 +82,9 @@ sysctl_ifdata(SYSCTL_HANDLER_ARGS) /* XX
 		return EINVAL;
 
 	if (name[0] <= 0 || name[0] > if_index ||
-	    ifnet_byindex(name[0]) == NULL)
+	    (ifp = ifnet_byindex(name[0])) == NULL)
 		return ENOENT;
 
-	ifp = ifnet_byindex(name[0]);
-
 	switch(name[1]) {
 	default:
 		return ENOENT;
From pgollucci at p6m7g8.com  Fri Apr 24 22:28:26 2009
From: pgollucci at p6m7g8.com (Philip M. Gollucci)
Date: Fri Apr 24 22:28:32 2009
Subject: svn commit: r191381 - head/crypto/openssl/crypto/asn1 releng/6.3
 releng/6.3/crypto/openssl/crypto/asn1	releng/6.3/lib/libc/db/btree
 releng/6.3/lib/libc/db/hash releng/6.3/lib/libc/db/mpool releng/6...
In-Reply-To: <200904221407.n3ME7EjC058272@svn.freebsd.org>
References: <200904221407.n3ME7EjC058272@svn.freebsd.org>
Message-ID: <49F23AAB.6030701@p6m7g8.com>

I feel like it would better use svn to commit to head, stable/7, releng/7, 
stable/6, etc... seperately.

I tried to diff -rPREV or grab a patch and it didn't help much cause it had 
all the different versions in it.

Thoughts, RTFM ?


Colin Percival wrote:
> Author: cperciva
> Date: Wed Apr 22 14:07:14 2009
> New Revision: 191381
> URL: http://svn.freebsd.org/changeset/base/191381
> 
> Log:
>   Don't leak information via uninitialized space in db(3) records. [09:07]
>   
>   Sanity-check string lengths in order to stop OpenSSL crashing
>   when printing corrupt BMPString or UniversalString objects. [09:08]
>   
>   Security:	FreeBSD-SA-09:07.libc
>   Security:	FreeBSD-SA-09:08.openssl
>   Security:	CVE-2009-0590
>   Approved by:	re (kensmith)
>   Approved by:	so (cperciva)
> 
> Modified:
>   stable/7/crypto/openssl/crypto/asn1/asn1.h
>   stable/7/crypto/openssl/crypto/asn1/asn1_err.c
>   stable/7/crypto/openssl/crypto/asn1/tasn_dec.c
> 
> Changes in other areas also in this revision:
> Modified:
>   head/crypto/openssl/crypto/asn1/asn1.h
>   head/crypto/openssl/crypto/asn1/asn1_err.c
>   head/crypto/openssl/crypto/asn1/tasn_dec.c
>   releng/6.3/UPDATING
>   releng/6.3/crypto/openssl/crypto/asn1/asn1.h
>   releng/6.3/crypto/openssl/crypto/asn1/asn1_err.c
>   releng/6.3/crypto/openssl/crypto/asn1/tasn_dec.c
>   releng/6.3/lib/libc/db/btree/bt_split.c
>   releng/6.3/lib/libc/db/hash/hash_buf.c
>   releng/6.3/lib/libc/db/mpool/mpool.c
>   releng/6.3/sys/conf/newvers.sh
>   releng/6.4/UPDATING
>   releng/6.4/crypto/openssl/crypto/asn1/asn1.h
>   releng/6.4/crypto/openssl/crypto/asn1/asn1_err.c
>   releng/6.4/crypto/openssl/crypto/asn1/tasn_dec.c
>   releng/6.4/lib/libc/db/btree/bt_split.c
>   releng/6.4/lib/libc/db/hash/hash_buf.c
>   releng/6.4/lib/libc/db/mpool/mpool.c
>   releng/6.4/sys/conf/newvers.sh
>   releng/7.0/UPDATING
>   releng/7.0/crypto/openssl/crypto/asn1/asn1.h
>   releng/7.0/crypto/openssl/crypto/asn1/asn1_err.c
>   releng/7.0/crypto/openssl/crypto/asn1/tasn_dec.c
>   releng/7.0/lib/libc/db/btree/bt_split.c
>   releng/7.0/lib/libc/db/hash/hash_buf.c
>   releng/7.0/lib/libc/db/mpool/mpool.c
>   releng/7.0/sys/conf/newvers.sh
>   releng/7.1/UPDATING
>   releng/7.1/crypto/openssl/crypto/asn1/asn1.h
>   releng/7.1/crypto/openssl/crypto/asn1/asn1_err.c
>   releng/7.1/crypto/openssl/crypto/asn1/tasn_dec.c
>   releng/7.1/lib/libc/db/btree/bt_split.c
>   releng/7.1/lib/libc/db/hash/hash_buf.c
>   releng/7.1/lib/libc/db/mpool/mpool.c
>   releng/7.1/sys/conf/newvers.sh
>   releng/7.2/UPDATING
>   releng/7.2/crypto/openssl/crypto/asn1/asn1.h
>   releng/7.2/crypto/openssl/crypto/asn1/asn1_err.c
>   releng/7.2/crypto/openssl/crypto/asn1/tasn_dec.c
>   stable/6/crypto/openssl/crypto/asn1/asn1.h
>   stable/6/crypto/openssl/crypto/asn1/asn1_err.c
>   stable/6/crypto/openssl/crypto/asn1/tasn_dec.c
> 
> Modified: stable/7/crypto/openssl/crypto/asn1/asn1.h
> ==============================================================================
> --- stable/7/crypto/openssl/crypto/asn1/asn1.h	Wed Apr 22 13:31:52 2009	(r191380)
> +++ stable/7/crypto/openssl/crypto/asn1/asn1.h	Wed Apr 22 14:07:14 2009	(r191381)
> @@ -1134,6 +1134,7 @@ void ERR_load_ASN1_strings(void);
>  #define ASN1_R_BAD_OBJECT_HEADER			 102
>  #define ASN1_R_BAD_PASSWORD_READ			 103
>  #define ASN1_R_BAD_TAG					 104
> +#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH		 210
>  #define ASN1_R_BN_LIB					 105
>  #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH			 106
>  #define ASN1_R_BUFFER_TOO_SMALL				 107
> @@ -1213,6 +1214,7 @@ void ERR_load_ASN1_strings(void);
>  #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY			 157
>  #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY		 158
>  #define ASN1_R_UNEXPECTED_EOC				 159
> +#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH		 211
>  #define ASN1_R_UNKNOWN_FORMAT				 160
>  #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM		 161
>  #define ASN1_R_UNKNOWN_OBJECT_TYPE			 162
> 
> Modified: stable/7/crypto/openssl/crypto/asn1/asn1_err.c
> ==============================================================================
> --- stable/7/crypto/openssl/crypto/asn1/asn1_err.c	Wed Apr 22 13:31:52 2009	(r191380)
> +++ stable/7/crypto/openssl/crypto/asn1/asn1_err.c	Wed Apr 22 14:07:14 2009	(r191381)
> @@ -188,6 +188,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
>  {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER)    ,"bad object header"},
>  {ERR_REASON(ASN1_R_BAD_PASSWORD_READ)    ,"bad password read"},
>  {ERR_REASON(ASN1_R_BAD_TAG)              ,"bad tag"},
> +{ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),"bmpstring is wrong length"},
>  {ERR_REASON(ASN1_R_BN_LIB)               ,"bn lib"},
>  {ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
>  {ERR_REASON(ASN1_R_BUFFER_TOO_SMALL)     ,"buffer too small"},
> @@ -267,6 +268,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
>  {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa key"},
>  {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to decode rsa private key"},
>  {ERR_REASON(ASN1_R_UNEXPECTED_EOC)       ,"unexpected eoc"},
> +{ERR_REASON(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH),"universalstring is wrong length"},
>  {ERR_REASON(ASN1_R_UNKNOWN_FORMAT)       ,"unknown format"},
>  {ERR_REASON(ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM),"unknown message digest algorithm"},
>  {ERR_REASON(ASN1_R_UNKNOWN_OBJECT_TYPE)  ,"unknown object type"},
> 
> Modified: stable/7/crypto/openssl/crypto/asn1/tasn_dec.c
> ==============================================================================
> --- stable/7/crypto/openssl/crypto/asn1/tasn_dec.c	Wed Apr 22 13:31:52 2009	(r191380)
> +++ stable/7/crypto/openssl/crypto/asn1/tasn_dec.c	Wed Apr 22 14:07:14 2009	(r191381)
> @@ -1012,6 +1012,18 @@ int asn1_ex_c2i(ASN1_VALUE **pval, const
>  		case V_ASN1_SET:
>  		case V_ASN1_SEQUENCE:
>  		default:
> +		if (utype == V_ASN1_BMPSTRING && (len & 1))
> +			{
> +			ASN1err(ASN1_F_ASN1_EX_C2I,
> +					ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
> +			goto err;
> +			}
> +		if (utype == V_ASN1_UNIVERSALSTRING && (len & 3))
> +			{
> +			ASN1err(ASN1_F_ASN1_EX_C2I,
> +					ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
> +			goto err;
> +			}
>  		/* All based on ASN1_STRING and handled the same */
>  		if (!*pval)
>  			{
> _______________________________________________
> svn-src-all@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/svn-src-all
> To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"


-- 
------------------------------------------------------------------------
1024D/DB9B8C1C B90B FBC3 A3A1 C71A 8E70  3F8C 75B8 8FFB DB9B 8C1C
Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354
Consultant          - P6M7G8 Inc.                http://p6m7g8.net
Senior Sys Admin    - RideCharge, Inc.           http://ridecharge.com
Contractor          - PositiveEnergyUSA          http://positiveenergyusa.com
ASF Member          - Apache Software Foundation http://apache.org
FreeBSD Committer   - FreeBSD Foundation         http://freebsd.org

Work like you don't need the money,
love like you'll never get hurt,
and dance like nobody's watching.
From max at love2party.net  Sat Apr 25 03:37:24 2009
From: max at love2party.net (Max Laier)
Date: Sat Apr 25 03:37:35 2009
Subject: svn commit: r191381 - head/crypto/openssl/crypto/asn1
	releng/6.3 releng/6.3/crypto/openssl/crypto/asn1
	releng/6.3/lib/libc/db/btree releng/6.3/lib/libc/db/hash
	releng/6.3/lib/libc/db/mpool releng/6...
In-Reply-To: <49F23AAB.6030701@p6m7g8.com>
References: <200904221407.n3ME7EjC058272@svn.freebsd.org>
	<49F23AAB.6030701@p6m7g8.com>
Message-ID: <200904250524.46502.max@love2party.net>

On Saturday 25 April 2009 00:18:19 Philip M. Gollucci wrote:
> I feel like it would better use svn to commit to head, stable/7, releng/7,
> stable/6, etc... seperately.
>
> I tried to diff -rPREV or grab a patch and it didn't help much cause it had
> all the different versions in it.
>
> Thoughts, RTFM ?

svn diff -c 191381 svn://svn.freebsd.org/base/{head,stable/{6,7}}

works like a charm.

> Colin Percival wrote:
> > Author: cperciva
> > Date: Wed Apr 22 14:07:14 2009
> > New Revision: 191381
> > URL: http://svn.freebsd.org/changeset/base/191381
> >
> > Log:
> >   Don't leak information via uninitialized space in db(3) records.
> > [09:07]
> >
> >   Sanity-check string lengths in order to stop OpenSSL crashing
> >   when printing corrupt BMPString or UniversalString objects. [09:08]
> >
> >   Security:	FreeBSD-SA-09:07.libc
> >   Security:	FreeBSD-SA-09:08.openssl
> >   Security:	CVE-2009-0590
> >   Approved by:	re (kensmith)
> >   Approved by:	so (cperciva)
> >
> > Modified:
> >   stable/7/crypto/openssl/crypto/asn1/asn1.h
> >   stable/7/crypto/openssl/crypto/asn1/asn1_err.c
> >   stable/7/crypto/openssl/crypto/asn1/tasn_dec.c
> >
> > Changes in other areas also in this revision:
> > Modified:
> >   head/crypto/openssl/crypto/asn1/asn1.h
> >   head/crypto/openssl/crypto/asn1/asn1_err.c
> >   head/crypto/openssl/crypto/asn1/tasn_dec.c
> >   releng/6.3/UPDATING
> >   releng/6.3/crypto/openssl/crypto/asn1/asn1.h
> >   releng/6.3/crypto/openssl/crypto/asn1/asn1_err.c
> >   releng/6.3/crypto/openssl/crypto/asn1/tasn_dec.c
> >   releng/6.3/lib/libc/db/btree/bt_split.c
> >   releng/6.3/lib/libc/db/hash/hash_buf.c
> >   releng/6.3/lib/libc/db/mpool/mpool.c
> >   releng/6.3/sys/conf/newvers.sh
> >   releng/6.4/UPDATING
> >   releng/6.4/crypto/openssl/crypto/asn1/asn1.h
> >   releng/6.4/crypto/openssl/crypto/asn1/asn1_err.c
> >   releng/6.4/crypto/openssl/crypto/asn1/tasn_dec.c
> >   releng/6.4/lib/libc/db/btree/bt_split.c
> >   releng/6.4/lib/libc/db/hash/hash_buf.c
> >   releng/6.4/lib/libc/db/mpool/mpool.c
> >   releng/6.4/sys/conf/newvers.sh
> >   releng/7.0/UPDATING
> >   releng/7.0/crypto/openssl/crypto/asn1/asn1.h
> >   releng/7.0/crypto/openssl/crypto/asn1/asn1_err.c
> >   releng/7.0/crypto/openssl/crypto/asn1/tasn_dec.c
> >   releng/7.0/lib/libc/db/btree/bt_split.c
> >   releng/7.0/lib/libc/db/hash/hash_buf.c
> >   releng/7.0/lib/libc/db/mpool/mpool.c
> >   releng/7.0/sys/conf/newvers.sh
> >   releng/7.1/UPDATING
> >   releng/7.1/crypto/openssl/crypto/asn1/asn1.h
> >   releng/7.1/crypto/openssl/crypto/asn1/asn1_err.c
> >   releng/7.1/crypto/openssl/crypto/asn1/tasn_dec.c
> >   releng/7.1/lib/libc/db/btree/bt_split.c
> >   releng/7.1/lib/libc/db/hash/hash_buf.c
> >   releng/7.1/lib/libc/db/mpool/mpool.c
> >   releng/7.1/sys/conf/newvers.sh
> >   releng/7.2/UPDATING
> >   releng/7.2/crypto/openssl/crypto/asn1/asn1.h
> >   releng/7.2/crypto/openssl/crypto/asn1/asn1_err.c
> >   releng/7.2/crypto/openssl/crypto/asn1/tasn_dec.c
> >   stable/6/crypto/openssl/crypto/asn1/asn1.h
> >   stable/6/crypto/openssl/crypto/asn1/asn1_err.c
> >   stable/6/crypto/openssl/crypto/asn1/tasn_dec.c
> >
> > Modified: stable/7/crypto/openssl/crypto/asn1/asn1.h
> > =========================================================================
> >===== --- stable/7/crypto/openssl/crypto/asn1/asn1.h	Wed Apr 22 13:31:52
> > 2009	(r191380) +++ stable/7/crypto/openssl/crypto/asn1/asn1.h	Wed Apr 22
> > 14:07:14 2009	(r191381) @@ -1134,6 +1134,7 @@ void
> > ERR_load_ASN1_strings(void);
> >  #define ASN1_R_BAD_OBJECT_HEADER			 102
> >  #define ASN1_R_BAD_PASSWORD_READ			 103
> >  #define ASN1_R_BAD_TAG					 104
> > +#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH		 210
> >  #define ASN1_R_BN_LIB					 105
> >  #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH			 106
> >  #define ASN1_R_BUFFER_TOO_SMALL				 107
> > @@ -1213,6 +1214,7 @@ void ERR_load_ASN1_strings(void);
> >  #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY			 157
> >  #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY		 158
> >  #define ASN1_R_UNEXPECTED_EOC				 159
> > +#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH		 211
> >  #define ASN1_R_UNKNOWN_FORMAT				 160
> >  #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM		 161
> >  #define ASN1_R_UNKNOWN_OBJECT_TYPE			 162
> >
> > Modified: stable/7/crypto/openssl/crypto/asn1/asn1_err.c
> > =========================================================================
> >===== --- stable/7/crypto/openssl/crypto/asn1/asn1_err.c	Wed Apr 22
> > 13:31:52 2009	(r191380) +++
> > stable/7/crypto/openssl/crypto/asn1/asn1_err.c	Wed Apr 22 14:07:14
> > 2009	(r191381) @@ -188,6 +188,7 @@ static ERR_STRING_DATA
> > ASN1_str_reasons[
> >  {ERR_REASON(ASN1_R_BAD_OBJECT_HEADER)    ,"bad object header"},
> >  {ERR_REASON(ASN1_R_BAD_PASSWORD_READ)    ,"bad password read"},
> >  {ERR_REASON(ASN1_R_BAD_TAG)              ,"bad tag"},
> > +{ERR_REASON(ASN1_R_BMPSTRING_IS_WRONG_LENGTH),"bmpstring is wrong
> > length"}, {ERR_REASON(ASN1_R_BN_LIB)               ,"bn lib"},
> >  {ERR_REASON(ASN1_R_BOOLEAN_IS_WRONG_LENGTH),"boolean is wrong length"},
> >  {ERR_REASON(ASN1_R_BUFFER_TOO_SMALL)     ,"buffer too small"},
> > @@ -267,6 +268,7 @@ static ERR_STRING_DATA ASN1_str_reasons[
> >  {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_KEY),"unable to decode rsa
> > key"}, {ERR_REASON(ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY),"unable to
> > decode rsa private key"}, {ERR_REASON(ASN1_R_UNEXPECTED_EOC)      
> > ,"unexpected eoc"},
> > +{ERR_REASON(ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH),"universalstring is
> > wrong length"}, {ERR_REASON(ASN1_R_UNKNOWN_FORMAT)       ,"unknown
> > format"},
> >  {ERR_REASON(ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM),"unknown message
> > digest algorithm"}, {ERR_REASON(ASN1_R_UNKNOWN_OBJECT_TYPE)  ,"unknown
> > object type"},
> >
> > Modified: stable/7/crypto/openssl/crypto/asn1/tasn_dec.c
> > =========================================================================
> >===== --- stable/7/crypto/openssl/crypto/asn1/tasn_dec.c	Wed Apr 22
> > 13:31:52 2009	(r191380) +++
> > stable/7/crypto/openssl/crypto/asn1/tasn_dec.c	Wed Apr 22 14:07:14
> > 2009	(r191381) @@ -1012,6 +1012,18 @@ int asn1_ex_c2i(ASN1_VALUE **pval,
> > const
> >  		case V_ASN1_SET:
> >  		case V_ASN1_SEQUENCE:
> >  		default:
> > +		if (utype == V_ASN1_BMPSTRING && (len & 1))
> > +			{
> > +			ASN1err(ASN1_F_ASN1_EX_C2I,
> > +					ASN1_R_BMPSTRING_IS_WRONG_LENGTH);
> > +			goto err;
> > +			}
> > +		if (utype == V_ASN1_UNIVERSALSTRING && (len & 3))
> > +			{
> > +			ASN1err(ASN1_F_ASN1_EX_C2I,
> > +					ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH);
> > +			goto err;
> > +			}
> >  		/* All based on ASN1_STRING and handled the same */
> >  		if (!*pval)
> >  			{
> > _______________________________________________
> > svn-src-all@freebsd.org mailing list
> > http://lists.freebsd.org/mailman/listinfo/svn-src-all
> > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"

-- 
/"\  Best regards,                      | mlaier@freebsd.org
\ /  Max Laier                          | ICQ #67774661
 X   http://pf4freebsd.love2party.net/  | mlaier@EFnet
/ \  ASCII Ribbon Campaign              | Against HTML Mail and News
From simon at FreeBSD.org  Sat Apr 25 15:52:05 2009
From: simon at FreeBSD.org (Simon L. Nielsen)
Date: Sat Apr 25 15:52:17 2009
Subject: svn commit: r191381 - head/crypto/openssl/crypto/asn1
	releng/6.3  releng/6.3/crypto/openssl/crypto/asn1
	releng/6.3/lib/libc/db/btree releng/6.3/lib/libc/db/hash
	releng/6.3/lib/libc/db/mpool releng/6...
In-Reply-To: <200904250524.46502.max@love2party.net>
References: <200904221407.n3ME7EjC058272@svn.freebsd.org>
	<49F23AAB.6030701@p6m7g8.com>
	<200904250524.46502.max@love2party.net>
Message-ID: <20090425155202.GA1374@arthur.nitro.dk>

On 2009.04.25 05:24:45 +0200, Max Laier wrote:
> On Saturday 25 April 2009 00:18:19 Philip M. Gollucci wrote:
> > I feel like it would better use svn to commit to head, stable/7, releng/7,
> > stable/6, etc... seperately.
> >
> > I tried to diff -rPREV or grab a patch and it didn't help much cause it had
> > all the different versions in it.
> >
> > Thoughts, RTFM ?
> 
> svn diff -c 191381 svn://svn.freebsd.org/base/{head,stable/{6,7}}
> 
> works like a charm.

Also, the base patches for releases are linked as files from the
advisories.

Doing one big commit does save some time and reduce risk for user
errors when releasing an advisory, so there would have to be a good
argument not to do it.

-- 
Simon L. Nielsen
From marius at FreeBSD.org  Sat Apr 25 23:08:12 2009
From: marius at FreeBSD.org (Marius Strobl)
Date: Sat Apr 25 23:08:19 2009
Subject: svn commit: r191501 - stable/7/release/doc/en_US.ISO8859-1/hardware
Message-ID: <200904252308.n3PN8BvR065864@svn.freebsd.org>

Author: marius
Date: Sat Apr 25 23:08:11 2009
New Revision: 191501
URL: http://svn.freebsd.org/changeset/base/191501

Log:
  MFC: r191491, r191492
  
  Sync the sparc64 hardware notes with reality, mainly regarding support
  of sun4u-machines based on USIII and beyond in 7.2-RELEASE.
  
  Approved by:	re (blackend)

Modified:
  stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml	Sat Apr 25 23:02:57 2009	(r191500)
+++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml	Sat Apr 25 23:08:11 2009	(r191501)
@@ -325,9 +325,13 @@
 
   SMP is supported on all systems with more than 1 processor.
 
-  In general, &os;/&arch.sparc64; systems must use serial consoles.
-    While it is possible to boot or install a system using the
-    OpenFirmware console, the console device is not usable.
+  When using the GENERIC kernel,
+    &os;/&arch.sparc64; systems not equipped with a framebuffer
+    supported by the &man.creator.4; (&sun; Creator, &sun; Creator3D
+    and &sun; Elite3D) or &man.machfb.4; (&sun; PGX and &sun; PGX64
+    as well as the ATI Mach64 chips found onboard in for example
+    &sun.blade; 100, &sun.blade; 150, &sun.ultra; 5 and &sun.ultra; 10)
+    driver must use the serial console.
 
   If you have a system that is not listed here, it may not have
     been tested with &os; &release.current;.  We encourage you to
@@ -343,6 +347,9 @@
         
           &sun.blade; 150
         
+ 	
+	  &sun.enterprise; 100
+	
         
           &sun.enterprise; 220R
         
@@ -385,6 +392,12 @@
         
           &netra; X1
         
+ 	
+	  &sparcengine; Ultra AX1105
+	
+	
+	  &sparcengine; Ultra AXe
+	
         
           &sparcengine; Ultra AXi
         
@@ -415,10 +428,16 @@
         
           &sun.ultra; 80
         
+        
+          &sun.ultra; 450
+        
       
 
-    The following systems are partially supported by &os;.  In particular
-      the onboard SCSI controller in sbus systems is not supported.
+  The following systems are partially supported by &os;.  In
+    particular the fibre channel controllers in SBus-based systems are not
+    supported.  However, it is possible to use these with a SCSI controller
+    supported by the &man.esp.4 driver (&sun; ESP SCSI, &sun; FAS Fast-SCSI
+    and &sun; FAS366 Fast-Wide SCSI controllers).
 
       
         
@@ -429,16 +448,48 @@
         
       
 
-    The following systems are not supported by &os;.  This may be due
-      to lack of processor support (&ultrasparc; III), due to a quirk in the
-      system design that makes &os; unstable, or due to lack of support for
-      sufficient onboard devices to make &os; generally useful.
+  Starting with 7.2-RELEASE, &arch.sparc64; systems based on
+    &ultrasparc; III and beyond are also supported by &os, which includes
+    the following known working systems:
 
       
-        
-          All systems containing &ultrasparc; III processor(s).
-        
+	
+	  &sun.blade; 1000
+	
+	
+	  &sun.blade; 1500
+	
+	
+	  &sun.blade; 2000
+	
+	
+	  &sun.fire; 280R
+	
+	
+	  &sun.fire; V210
+	
+	
+	  &sun.fire; V440 (except for the on-board NICs)
+	
+	
+	  &sun.fire; V880
+	
+	
+	  &netra; 20/&netra; T4
+	
       
+
+  The following &ultrasparc; IIIi systems are not tested but
+    believed to be also supported by &os:
+
+      
+	
+	  &sun.fire; V125
+	
+	
+	  &sun.fire; V240
+ 	
+       
 
 
 
@@ -1432,8 +1483,6 @@
     [&arch.pc98;] Power Management Controller of NEC PC-98 Note (pmc
     driver)
 
-    [&arch.sparc64;] OpenFirmware console (ofwcons driver)
-
   
 
 
From blackend at FreeBSD.org  Sun Apr 26 07:58:01 2009
From: blackend at FreeBSD.org (Marc Fonvieille)
Date: Sun Apr 26 07:58:07 2009
Subject: svn commit: r191512 - stable/7/release/doc/en_US.ISO8859-1/hardware
Message-ID: <200904260758.n3Q7w0L3076396@svn.freebsd.org>

Author: blackend (doc committer)
Date: Sun Apr 26 07:58:00 2009
New Revision: 191512
URL: http://svn.freebsd.org/changeset/base/191512

Log:
  MFC:
  r191509:
  Unbreak the build of relnotes.
  
  r191511:
  Bump copyright year;
  Add missing colon and fix broken entity.
  
  Approved by:	re (implicit)

Modified:
  stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml

Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml	Sun Apr 26 07:16:01 2009	(r191511)
+++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml	Sun Apr 26 07:58:00 2009	(r191512)
@@ -30,6 +30,7 @@
     2006
     2007
     2008
+    2009
     The &os; Documentation Project
   
 
@@ -338,7 +339,7 @@
     try it and send a note to the &a.sparc; with your results,
     including which devices work and which do not.
 
-    The following systems are fully supported by &os;.
+    The following systems are fully supported by &os;:
 
       
         
@@ -449,7 +450,7 @@
       
 
   Starting with 7.2-RELEASE, &arch.sparc64; systems based on
-    &ultrasparc; III and beyond are also supported by &os, which includes
+    &ultrasparc; III and beyond are also supported by &os;, which includes
     the following known working systems:
 
       
@@ -480,7 +481,7 @@
       
 
   The following &ultrasparc; IIIi systems are not tested but
-    believed to be also supported by &os:
+    believed to be also supported by &os;:
 
       
 	
From delphij at FreeBSD.org  Mon Apr 27 19:15:15 2009
From: delphij at FreeBSD.org (Xin LI)
Date: Mon Apr 27 19:15:39 2009
Subject: svn commit: r191587 - stable/7/sbin/fsck_ffs
Message-ID: <200904271915.n3RJFElj024099@svn.freebsd.org>

Author: delphij
Date: Mon Apr 27 19:15:14 2009
New Revision: 191587
URL: http://svn.freebsd.org/changeset/base/191587

Log:
  Add -C back.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sbin/fsck_ffs/fsck.h
  stable/7/sbin/fsck_ffs/fsck_ffs.8
  stable/7/sbin/fsck_ffs/main.c
  stable/7/sbin/fsck_ffs/setup.c

Modified: stable/7/sbin/fsck_ffs/fsck.h
==============================================================================
--- stable/7/sbin/fsck_ffs/fsck.h	Mon Apr 27 19:14:43 2009	(r191586)
+++ stable/7/sbin/fsck_ffs/fsck.h	Mon Apr 27 19:15:14 2009	(r191587)
@@ -271,6 +271,7 @@ int	bkgrdflag;		/* use a snapshot to run
 int	bflag;			/* location of alternate super block */
 int	debug;			/* output debugging info */
 char	damagedflag;		/* run in damaged mode */
+char	ckclean;		/* only do work if not cleanly unmounted */
 int	cvtlevel;		/* convert to newer file system format */
 int	bkgrdcheck;		/* determine if background check is possible */
 int	bkgrdsumadj;		/* whether the kernel have ability to adjust superblock summary */

Modified: stable/7/sbin/fsck_ffs/fsck_ffs.8
==============================================================================
--- stable/7/sbin/fsck_ffs/fsck_ffs.8	Mon Apr 27 19:14:43 2009	(r191586)
+++ stable/7/sbin/fsck_ffs/fsck_ffs.8	Mon Apr 27 19:15:14 2009	(r191587)
@@ -29,7 +29,7 @@
 .\"	@(#)fsck.8	8.4 (Berkeley) 5/9/95
 .\" $FreeBSD$
 .\"
-.Dd January 20, 2009
+.Dd January 25, 2009
 .Dt FSCK_FFS 8
 .Os
 .Sh NAME
@@ -46,9 +46,9 @@
 .Ar ...
 .Sh DESCRIPTION
 The specified disk partitions and/or file systems are checked.
-In "preen" mode the clean flag of each file system's superblock is examined
-and only those file systems that
-are not marked clean are checked.
+In "preen" or "check clean" mode the clean flag of each file system's
+superblock is examined and only those file systems that are not marked clean
+are checked.
 File systems are marked clean when they are unmounted,
 when they have been mounted read-only, or when
 .Nm
@@ -175,6 +175,14 @@ Use the block specified immediately afte
 the super block for the file system.
 An alternate super block is usually located at block 32 for UFS1,
 and block 160 for UFS2.
+.It Fl C
+Check if file system was dismouted cleanly.
+If so, skip file system checks (like "preen").
+However, if the file system was not cleanly dismounted, do full checks,
+is if
+.Nm
+was invoked without
+.Fl C .
 .It Fl c
 Convert the file system to the specified level.
 Note that the level of a file system can only be raised.

Modified: stable/7/sbin/fsck_ffs/main.c
==============================================================================
--- stable/7/sbin/fsck_ffs/main.c	Mon Apr 27 19:14:43 2009	(r191586)
+++ stable/7/sbin/fsck_ffs/main.c	Mon Apr 27 19:15:14 2009	(r191587)
@@ -82,7 +82,7 @@ main(int argc, char *argv[])
 	sync();
 	skipclean = 1;
 	damagedflag = 0;
-	while ((ch = getopt(argc, argv, "b:Bc:dDfFm:npy")) != -1) {
+	while ((ch = getopt(argc, argv, "b:Bc:CdDfFm:npy")) != -1) {
 		switch (ch) {
 		case 'b':
 			skipclean = 0;
@@ -132,6 +132,10 @@ main(int argc, char *argv[])
 
 		case 'p':
 			preen++;
+			/*FALLTHROUGH*/
+
+		case 'C':
+			ckclean++;
 			break;
 
 		case 'y':
@@ -151,7 +155,7 @@ main(int argc, char *argv[])
 
 	if (signal(SIGINT, SIG_IGN) != SIG_IGN)
 		(void)signal(SIGINT, catch);
-	if (preen)
+	if (ckclean)
 		(void)signal(SIGQUIT, catchquit);
 	signal(SIGINFO, infohandler);
 	if (bkgrdflag) {
@@ -216,7 +220,7 @@ checkfilesys(char *filesys)
 	errmsg[0] = '\0';
 
 	cdevname = filesys;
-	if (debug && preen)
+	if (debug && ckclean)
 		pwarn("starting\n");
 	/*
 	 * Make best effort to get the disk name. Check first to see
@@ -251,7 +255,7 @@ checkfilesys(char *filesys)
 			exit(7);	/* Filesystem clean, report it now */
 		exit(0);
 	}
-	if (preen && skipclean) {
+	if (ckclean && skipclean) {
 		/*
 		 * If file system is gjournaled, check it here.
 		 */
@@ -302,7 +306,7 @@ checkfilesys(char *filesys)
 					    "CANNOT RUN IN BACKGROUND\n");
 				}
 				if ((sblock.fs_flags & FS_UNCLEAN) == 0 &&
-				    skipclean && preen) {
+				    skipclean && ckclean) {
 					/*
 					 * file system is clean;
 					 * skip snapshot and report it clean

Modified: stable/7/sbin/fsck_ffs/setup.c
==============================================================================
--- stable/7/sbin/fsck_ffs/setup.c	Mon Apr 27 19:14:43 2009	(r191586)
+++ stable/7/sbin/fsck_ffs/setup.c	Mon Apr 27 19:15:14 2009	(r191587)
@@ -65,7 +65,7 @@ static struct disklabel *getdisklabel(ch
 /*
  * Read in a superblock finding an alternate if necessary.
  * Return 1 if successful, 0 if unsuccessful, -1 if file system
- * is already clean (preen mode only).
+ * is already clean (ckclean and preen mode only).
  */
 int
 setup(char *dev)
@@ -201,7 +201,7 @@ setup(char *dev)
 		pwarn("USING ALTERNATE SUPERBLOCK AT %d\n", bflag);
 		bflag = 0;
 	}
-	if (skipclean && preen && sblock.fs_clean) {
+	if (skipclean && ckclean && sblock.fs_clean) {
 		pwarn("FILE SYSTEM CLEAN; SKIPPING CHECKS\n");
 		return (-1);
 	}
From brueffer at FreeBSD.org  Mon Apr 27 20:18:02 2009
From: brueffer at FreeBSD.org (Christian Brueffer)
Date: Mon Apr 27 20:18:21 2009
Subject: svn commit: r191596 - in stable/7: usr.bin/cpuset usr.sbin/jail
Message-ID: <200904272018.n3RKI14X025813@svn.freebsd.org>

Author: brueffer
Date: Mon Apr 27 20:18:01 2009
New Revision: 191596
URL: http://svn.freebsd.org/changeset/base/191596

Log:
  Document an issue of jail(8) in conjunction with cpuset(1).
  
  Problem reported by:	Miroslav Lachman <000.fbsd@quip.cz>
  Reviewed by:	bz
  Approved by:	re (kib)

Modified:
  stable/7/usr.bin/cpuset/cpuset.1
  stable/7/usr.sbin/jail/jail.8

Modified: stable/7/usr.bin/cpuset/cpuset.1
==============================================================================
--- stable/7/usr.bin/cpuset/cpuset.1	Mon Apr 27 20:13:13 2009	(r191595)
+++ stable/7/usr.bin/cpuset/cpuset.1	Mon Apr 27 20:18:01 2009	(r191596)
@@ -177,3 +177,9 @@ command first appeared in
 .Fx 7.1 .
 .Sh AUTHORS
 .An Jeffrey Roberson Aq jeff@FreeBSD.org
+.Sh BUGS
+At the moment it is possible for a superuser inside a
+.Xr jail 8
+to modify the root
+.Xr cpuset 2
+of that jail.

Modified: stable/7/usr.sbin/jail/jail.8
==============================================================================
--- stable/7/usr.sbin/jail/jail.8	Mon Apr 27 20:13:13 2009	(r191595)
+++ stable/7/usr.sbin/jail/jail.8	Mon Apr 27 20:18:01 2009	(r191596)
@@ -699,3 +699,9 @@ Currently, the simplest answer is to min
 offered on the host, possibly limiting it to services offered from
 .Xr inetd 8
 which is easily configurable.
+.Pp
+At the moment it is possible for a superuser inside a
+.Nm
+to modify the root
+.Xr cpuset 2
+of that jail.
From itetcu at FreeBSD.org  Mon Apr 27 21:05:27 2009
From: itetcu at FreeBSD.org (Ion-Mihai Tetcu)
Date: Mon Apr 27 21:05:38 2009
Subject: svn commit: r191587 - stable/7/sbin/fsck_ffs
In-Reply-To: <200904271915.n3RJFElj024099@svn.freebsd.org>
References: <200904271915.n3RJFElj024099@svn.freebsd.org>
Message-ID: <20090427234819.3e5b0291@it.buh.tecnik93.com>

On Mon, 27 Apr 2009 19:15:14 +0000 (UTC)
Xin LI  wrote:

> +.It Fl C
> +Check if file system was dismouted cleanly.
> +If so, skip file system checks (like "preen").
> +However, if the file system was not cleanly dismounted, do full
> checks, +is if
> +.Nm
> +was invoked without
> +.Fl C .

Should that s/is if/as if/ ?

-- 
IOnut - Un^d^dregistered ;) FreeBSD "user"
  "Intellectual Property" is   nowhere near as valuable   as "Intellect"
FreeBSD committer -> itetcu@FreeBSD.org, PGP Key ID 057E9F8B493A297B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20090427/3c2e8ffb/signature.pgp