From owner-svn-src-stable-9@FreeBSD.ORG Tue Apr 21 11:29:15 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EF1A62B; Tue, 21 Apr 2015 11:29:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ADAD195F; Tue, 21 Apr 2015 11:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LBTFZH045332; Tue, 21 Apr 2015 11:29:15 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LBT8MU045227; Tue, 21 Apr 2015 11:29:08 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504211129.t3LBT8MU045227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 21 Apr 2015 11:29:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281827 - in stable/9/sys/dev: aac aacraid advansys aha ahb amr buslogic bwi bwn ciss ct dpt ida if_ndis iir mlx mly trm twe X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 11:29:15 -0000 Author: mav Date: Tue Apr 21 11:29:07 2015 New Revision: 281827 URL: https://svnweb.freebsd.org/changeset/base/281827 Log: MFC r280347: Remove MAXBSIZE use from drivers where it has nothing to do. In some cases limits are just not needed, in others -- DFLTPHYS is the right constant to use instead. Modified: stable/9/sys/dev/aac/aac.c stable/9/sys/dev/aacraid/aacraid.c stable/9/sys/dev/advansys/adwcam.c stable/9/sys/dev/aha/aha.c stable/9/sys/dev/ahb/ahb.c stable/9/sys/dev/amr/amr_pci.c stable/9/sys/dev/buslogic/bt.c stable/9/sys/dev/bwi/if_bwi.c stable/9/sys/dev/bwn/if_bwn.c stable/9/sys/dev/ciss/ciss.c stable/9/sys/dev/ct/ct_isa.c stable/9/sys/dev/dpt/dpt_scsi.c stable/9/sys/dev/ida/ida.c stable/9/sys/dev/ida/ida_eisa.c stable/9/sys/dev/ida/ida_pci.c stable/9/sys/dev/if_ndis/if_ndis_pci.c stable/9/sys/dev/iir/iir.c stable/9/sys/dev/iir/iir_pci.c stable/9/sys/dev/mlx/mlx.c stable/9/sys/dev/mlx/mlx_pci.c stable/9/sys/dev/mly/mly.c stable/9/sys/dev/trm/trm.c stable/9/sys/dev/twe/twe.c stable/9/sys/dev/twe/twe_freebsd.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/aac/aac.c ============================================================================== --- stable/9/sys/dev/aac/aac.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/aac/aac.c Tue Apr 21 11:29:07 2015 (r281827) @@ -507,9 +507,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: stable/9/sys/dev/aacraid/aacraid.c ============================================================================== --- stable/9/sys/dev/aacraid/aacraid.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/aacraid/aacraid.c Tue Apr 21 11:29:07 2015 (r281827) @@ -597,9 +597,9 @@ aac_alloc(struct aac_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + sc->aac_max_sectors << 9, /* maxsize */ sc->aac_sg_tablesize, /* nsegments */ - MAXBSIZE, /* maxsegsize */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->aac_io_lock, /* lockfuncarg */ Modified: stable/9/sys/dev/advansys/adwcam.c ============================================================================== --- stable/9/sys/dev/advansys/adwcam.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/advansys/adwcam.c Tue Apr 21 11:29:07 2015 (r281827) @@ -965,7 +965,7 @@ adw_init(struct adw_softc *adw) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ ADW_SGSIZE, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/aha/aha.c ============================================================================== --- stable/9/sys/dev/aha/aha.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/aha/aha.c Tue Apr 21 11:29:07 2015 (r281827) @@ -460,7 +460,7 @@ aha_init(struct aha_softc* aha) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_24BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/ahb/ahb.c ============================================================================== --- stable/9/sys/dev/ahb/ahb.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ahb/ahb.c Tue Apr 21 11:29:07 2015 (r281827) @@ -298,7 +298,7 @@ ahbattach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ AHB_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/amr/amr_pci.c ============================================================================== --- stable/9/sys/dev/amr/amr_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/amr/amr_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -261,7 +261,8 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -278,8 +279,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ @@ -293,8 +295,9 @@ amr_pci_attach(device_t dev) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, AMR_NSEG, /* maxsize, nsegments */ - MAXBSIZE, /* maxsegsize */ + DFLTPHYS, /* maxsize */ + AMR_NSEG, /* nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ &sc->amr_list_lock, /* lockarg */ Modified: stable/9/sys/dev/buslogic/bt.c ============================================================================== --- stable/9/sys/dev/buslogic/bt.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/buslogic/bt.c Tue Apr 21 11:29:07 2015 (r281827) @@ -728,7 +728,7 @@ bt_init(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ BT_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/bwi/if_bwi.c ============================================================================== --- stable/9/sys/dev/bwi/if_bwi.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/bwi/if_bwi.c Tue Apr 21 11:29:07 2015 (r281827) @@ -1914,7 +1914,7 @@ bwi_dma_alloc(struct bwi_softc *sc) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ Modified: stable/9/sys/dev/bwn/if_bwn.c ============================================================================== --- stable/9/sys/dev/bwn/if_bwn.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/bwn/if_bwn.c Tue Apr 21 11:29:07 2015 (r281827) @@ -10381,7 +10381,7 @@ bwn_dma_attach(struct bwn_mac *mac) lowaddr, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, /* maxsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ciss/ciss.c Tue Apr 21 11:29:07 2015 (r281827) @@ -833,7 +833,7 @@ setup: BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ - CISS_MAX_SG_ELEMENTS, /* nsegments */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ @@ -851,7 +851,8 @@ setup: BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, CISS_MAX_SG_ELEMENTS, /* maxsize, nsegments */ + (CISS_MAX_SG_ELEMENTS - 1) * PAGE_SIZE, /* maxsize */ + CISS_MAX_SG_ELEMENTS, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, &sc->ciss_mtx, /* lockfunc, lockarg */ Modified: stable/9/sys/dev/ct/ct_isa.c ============================================================================== --- stable/9/sys/dev/ct/ct_isa.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ct/ct_isa.c Tue Apr 21 11:29:07 2015 (r281827) @@ -240,7 +240,7 @@ ct_isa_attach(device_t dev) /* setup DMA map */ if (bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_24BIT, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, 1, + NULL, NULL, DFLTPHYS, 1, BUS_SPACE_MAXSIZE_32BIT, BUS_DMA_ALLOCNOW, NULL, NULL, &ct->sc_dmat) != 0) { @@ -256,7 +256,7 @@ ct_isa_attach(device_t dev) return ENXIO; } - bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, MAXBSIZE, + bus_dmamap_load(ct->sc_dmat, ct->sc_dmamapt, vaddr, DFLTPHYS, ct_dmamap, &addr, BUS_DMA_NOWAIT); /* setup machdep softc */ @@ -264,7 +264,7 @@ ct_isa_attach(device_t dev) bs->sc_io_control = 0; bs->sc_bounce_phys = (u_int8_t *)addr; bs->sc_bounce_addr = vaddr; - bs->sc_bounce_size = MAXBSIZE; + bs->sc_bounce_size = DFLTPHYS; bs->sc_minphys = (1 << 24); bs->sc_dmasync_before = ct_isa_dmasync_before; bs->sc_dmasync_after = ct_isa_dmasync_after; Modified: stable/9/sys/dev/dpt/dpt_scsi.c ============================================================================== --- stable/9/sys/dev/dpt/dpt_scsi.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/dpt/dpt_scsi.c Tue Apr 21 11:29:07 2015 (r281827) @@ -1390,7 +1390,7 @@ dpt_init(struct dpt_softc *dpt) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ dpt->sgsize, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/ida/ida.c ============================================================================== --- stable/9/sys/dev/ida/ida.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ida/ida.c Tue Apr 21 11:29:07 2015 (r281827) @@ -234,7 +234,7 @@ ida_init(struct ida_softc *ida) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, + /* maxsize */ DFLTPHYS, /* nsegments */ IDA_NSEG, /* maxsegsz */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ 0, Modified: stable/9/sys/dev/ida/ida_eisa.c ============================================================================== --- stable/9/sys/dev/ida/ida_eisa.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ida/ida_eisa.c Tue Apr 21 11:29:07 2015 (r281827) @@ -300,8 +300,8 @@ ida_eisa_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: stable/9/sys/dev/ida/ida_pci.c ============================================================================== --- stable/9/sys/dev/ida/ida_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/ida/ida_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -263,8 +263,8 @@ ida_pci_attach(device_t dev) /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, /* filterarg */ NULL, - /* maxsize */ MAXBSIZE, - /* nsegments */ IDA_NSEG, + /* maxsize */ BUS_SPACE_MAXSIZE_32BIT, + /* nsegments */ BUS_SPACE_UNRESTRICTED, /* maxsegsize */ BUS_SPACE_MAXSIZE_32BIT, /* flags */ BUS_DMA_ALLOCNOW, /* lockfunc */ NULL, Modified: stable/9/sys/dev/if_ndis/if_ndis_pci.c ============================================================================== --- stable/9/sys/dev/if_ndis/if_ndis_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/if_ndis/if_ndis_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -295,7 +295,8 @@ ndis_attach_pci(dev) BUS_SPACE_MAXADDR_32BIT,/* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, NDIS_NSEG_NEW,/* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + NDIS_NSEG_NEW, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT,/* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, NULL, /* lockfunc, lockarg */ Modified: stable/9/sys/dev/iir/iir.c ============================================================================== --- stable/9/sys/dev/iir/iir.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/iir/iir.c Tue Apr 21 11:29:07 2015 (r281827) @@ -204,7 +204,8 @@ iir_init(struct gdt_softc *gdt) /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, - /*maxsize*/MAXBSIZE, /*nsegments*/GDT_MAXSG, + /*maxsize*/DFLTPHYS, + /*nsegments*/GDT_MAXSG, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/BUS_DMA_ALLOCNOW, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, Modified: stable/9/sys/dev/iir/iir_pci.c ============================================================================== --- stable/9/sys/dev/iir/iir_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/iir/iir_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -323,7 +323,7 @@ iir_pci_attach(device_t dev) /*highaddr*/BUS_SPACE_MAXADDR, /*filter*/NULL, /*filterarg*/NULL, /*maxsize*/BUS_SPACE_MAXSIZE_32BIT, - /*nsegments*/GDT_MAXSG, + /*nsegments*/BUS_SPACE_UNRESTRICTED, /*maxsegsz*/BUS_SPACE_MAXSIZE_32BIT, /*flags*/0, /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, &gdt->sc_parent_dmat) != 0) { Modified: stable/9/sys/dev/mlx/mlx.c ============================================================================== --- stable/9/sys/dev/mlx/mlx.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/mlx/mlx.c Tue Apr 21 11:29:07 2015 (r281827) @@ -378,7 +378,8 @@ mlx_attach(struct mlx_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + MLX_MAXPHYS, /* maxsize */ + MLX_NSEG, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: stable/9/sys/dev/mlx/mlx_pci.c ============================================================================== --- stable/9/sys/dev/mlx/mlx_pci.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/mlx/mlx_pci.c Tue Apr 21 11:29:07 2015 (r281827) @@ -184,7 +184,8 @@ mlx_pci_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLX_NSEG, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ Modified: stable/9/sys/dev/mly/mly.c ============================================================================== --- stable/9/sys/dev/mly/mly.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/mly/mly.c Tue Apr 21 11:29:07 2015 (r281827) @@ -383,7 +383,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ NULL, /* lockfunc */ @@ -401,7 +402,8 @@ mly_pci_attach(struct mly_softc *sc) BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, MLY_MAX_SGENTRIES, /* maxsize, nsegments */ + DFLTPHYS, /* maxsize */ + MLY_MAX_SGENTRIES, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ busdma_lock_mutex, /* lockfunc */ Modified: stable/9/sys/dev/trm/trm.c ============================================================================== --- stable/9/sys/dev/trm/trm.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/trm/trm.c Tue Apr 21 11:29:07 2015 (r281827) @@ -3386,7 +3386,7 @@ trm_init(u_int16_t unit, device_t dev) /*highaddr*/ BUS_SPACE_MAXADDR, /*filter*/ NULL, /*filterarg*/ NULL, - /*maxsize*/ MAXBSIZE, + /*maxsize*/ TRM_MAXPHYS, /*nsegments*/ TRM_NSEG, /*maxsegsz*/ TRM_MAXTRANSFER_SIZE, /*flags*/ BUS_DMA_ALLOCNOW, Modified: stable/9/sys/dev/twe/twe.c ============================================================================== --- stable/9/sys/dev/twe/twe.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/twe/twe.c Tue Apr 21 11:29:07 2015 (r281827) @@ -985,7 +985,7 @@ twe_immediate_request(struct twe_request if (usetmp && (tr->tr_data != NULL)) { tr->tr_flags |= TWE_CMD_IMMEDIATE; - if (tr->tr_length > MAXBSIZE) + if (tr->tr_length > DFLTPHYS) return (EINVAL); bcopy(tr->tr_data, sc->twe_immediate, tr->tr_length); } Modified: stable/9/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/9/sys/dev/twe/twe_freebsd.c Tue Apr 21 11:27:50 2015 (r281826) +++ stable/9/sys/dev/twe/twe_freebsd.c Tue Apr 21 11:29:07 2015 (r281827) @@ -233,7 +233,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH, /* maxsize, nsegments */ + BUS_SPACE_MAXSIZE_32BIT, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ @@ -301,7 +302,8 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, TWE_MAX_SGL_LENGTH,/* maxsize, nsegments */ + (TWE_MAX_SGL_LENGTH - 1) * PAGE_SIZE,/* maxsize */ + TWE_MAX_SGL_LENGTH, /* nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ BUS_DMA_ALLOCNOW, /* flags */ busdma_lock_mutex, /* lockfunc */ @@ -320,7 +322,7 @@ twe_attach(device_t dev) BUS_SPACE_MAXADDR_32BIT, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - MAXBSIZE, 1, /* maxsize, nsegments */ + DFLTPHYS, 1, /* maxsize, nsegments */ BUS_SPACE_MAXSIZE_32BIT, /* maxsegsize */ 0, /* flags */ NULL, /* lockfunc */ From owner-svn-src-stable-9@FreeBSD.ORG Tue Apr 21 14:48:19 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 19415849; Tue, 21 Apr 2015 14:48:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06FE9111A; Tue, 21 Apr 2015 14:48:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LEmIPI001104; Tue, 21 Apr 2015 14:48:18 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LEmIlq001103; Tue, 21 Apr 2015 14:48:18 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201504211448.t3LEmIlq001103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 21 Apr 2015 14:48:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281831 - stable/9/share/man/man3 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 14:48:19 -0000 Author: brooks Date: Tue Apr 21 14:48:18 2015 New Revision: 281831 URL: https://svnweb.freebsd.org/changeset/base/281831 Log: MFC r281605,281768: r281605: Fix a minor function definition inconsistancy. r281768: Bump doc date missed in r281605. Modified: stable/9/share/man/man3/queue.3 Directory Properties: stable/9/share/man/man3/ (props changed) Modified: stable/9/share/man/man3/queue.3 ============================================================================== --- stable/9/share/man/man3/queue.3 Tue Apr 21 14:22:45 2015 (r281830) +++ stable/9/share/man/man3/queue.3 Tue Apr 21 14:48:18 2015 (r281831) @@ -32,7 +32,7 @@ .\" @(#)queue.3 8.2 (Berkeley) 1/24/94 .\" $FreeBSD$ .\" -.Dd June 17, 2013 +.Dd April 16, 2015 .Dt QUEUE 3 .Os .Sh NAME @@ -151,7 +151,7 @@ lists and tail queues .Fn STAILQ_INSERT_AFTER "STAILQ_HEAD *head" "TYPE *listelm" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_HEAD "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_INSERT_TAIL "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" -.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE" "STAILQ_ENTRY NAME" +.Fn STAILQ_LAST "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_NEXT "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_AFTER "STAILQ_HEAD *head" "TYPE *elm" "STAILQ_ENTRY NAME" .Fn STAILQ_REMOVE_HEAD "STAILQ_HEAD *head" "STAILQ_ENTRY NAME" From owner-svn-src-stable-9@FreeBSD.ORG Tue Apr 21 16:54:23 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 20277F56; Tue, 21 Apr 2015 16:54:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D95D10ED; Tue, 21 Apr 2015 16:54:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3LGsMJr001931; Tue, 21 Apr 2015 16:54:22 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3LGsM3A001930; Tue, 21 Apr 2015 16:54:22 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201504211654.t3LGsM3A001930@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 21 Apr 2015 16:54:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281835 - in stable: 10/release/doc/share/xml 8/release/doc/share/xml 9/release/doc/share/xml X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Apr 2015 16:54:23 -0000 Author: gjb Date: Tue Apr 21 16:54:21 2015 New Revision: 281835 URL: https://svnweb.freebsd.org/changeset/base/281835 Log: Document SA-15:07, SA-15:08, SA-15:09. Sponsored by: The FreeBSD Foundation Modified: stable/9/release/doc/share/xml/security.xml Changes in other areas also in this revision: Modified: stable/10/release/doc/share/xml/security.xml stable/8/release/doc/share/xml/security.xml Modified: stable/9/release/doc/share/xml/security.xml ============================================================================== --- stable/9/release/doc/share/xml/security.xml Tue Apr 21 15:47:00 2015 (r281834) +++ stable/9/release/doc/share/xml/security.xml Tue Apr 21 16:54:21 2015 (r281835) @@ -133,6 +133,21 @@ 19 March 2015 Multiple vulnerabilities + + + FreeBSD-SA-15:07.ntp + 7 April 2015 + Multiple vulnerabilities + + + + FreeBSD-SA-15:09.ipv6 + 7 April 2015 + Router advertisement Denial of + Service + From owner-svn-src-stable-9@FreeBSD.ORG Wed Apr 22 00:40:44 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B8BF461; Wed, 22 Apr 2015 00:40:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58A8A1263; Wed, 22 Apr 2015 00:40:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3M0ei3C078436; Wed, 22 Apr 2015 00:40:44 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3M0eg6u078421; Wed, 22 Apr 2015 00:40:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504220040.t3M0eg6u078421@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Wed, 22 Apr 2015 00:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281842 - in stable/9/sys: conf fs/ext2fs modules/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 00:40:44 -0000 Author: pfg Date: Wed Apr 22 00:40:41 2015 New Revision: 281842 URL: https://svnweb.freebsd.org/changeset/base/281842 Log: MFC r281670, r281703: Drop experimental ext2fs dir_index support. The htree directory index is a highly desirable feature for research purposes and was meant to improve performance in our ext2/3 driver. Unfortunately our implementation has two problems: - It never really delivered any performance improvement. - It appears to corrupt the filesystem in undetermined circumstances. Strictly speaking dir_index is not required for read/write support in ext2/3 and our limited ext4 support still works fine without it. Regain stability in the ext2 driver by removing it. We may need it back (fixed) if we want to support encrypted ext4 support but thanks to the wonders of version control we can always revert this change and bring it back. PR: 191895 PR: 198731 PR: 199309 Deleted: stable/9/sys/fs/ext2fs/ext2_hash.c stable/9/sys/fs/ext2fs/ext2_htree.c Modified: stable/9/sys/conf/files stable/9/sys/fs/ext2fs/ext2_dir.h stable/9/sys/fs/ext2fs/ext2_extern.h stable/9/sys/fs/ext2fs/ext2_lookup.c stable/9/sys/fs/ext2fs/ext2_vfsops.c stable/9/sys/fs/ext2fs/ext2fs.h stable/9/sys/modules/ext2fs/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/modules/ (props changed) Modified: stable/9/sys/conf/files ============================================================================== --- stable/9/sys/conf/files Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/conf/files Wed Apr 22 00:40:41 2015 (r281842) @@ -2428,8 +2428,6 @@ fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs -fs/ext2fs/ext2_hash.c optional ext2fs -fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs Modified: stable/9/sys/fs/ext2fs/ext2_dir.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_dir.h Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_dir.h Wed Apr 22 00:40:41 2015 (r281842) @@ -40,21 +40,6 @@ struct ext2fs_direct { uint16_t e2d_namlen; /* length of string in e2d_name */ char e2d_name[EXT2FS_MAXNAMLEN];/* name with length<=EXT2FS_MAXNAMLEN */ }; - -enum slotstatus { - NONE, - COMPACT, - FOUND -}; - -struct ext2fs_searchslot { - enum slotstatus slotstatus; - doff_t slotoffset; /* offset of area with free space */ - int slotsize; /* size of area at slotoffset */ - int slotfreespace; /* amount of space free in slot */ - int slotneeded; /* sizeof the entry we are seeking */ -}; - /* * The new version of the directory entry. Since EXT2 structures are * stored in intel byte order, and the name_len field could never be Modified: stable/9/sys/fs/ext2fs/ext2_extern.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_extern.h Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_extern.h Wed Apr 22 00:40:41 2015 (r281842) @@ -40,15 +40,12 @@ #define _FS_EXT2FS_EXT2_EXTERN_H_ struct ext2fs_dinode; -struct ext2fs_direct_2; -struct ext2fs_searchslot; struct indir; struct inode; struct mount; struct vfsconf; struct vnode; -int ext2_add_entry(struct vnode *, struct ext2fs_direct_2 *); int ext2_alloc(struct inode *, daddr_t, e4fs_daddr_t, int, struct ucred *, e4fs_daddr_t *); int ext2_balloc(struct inode *, @@ -86,18 +83,6 @@ int ext2_dirempty(struct inode *, ino_t, int ext2_checkpath(struct inode *, struct inode *, struct ucred *); int cg_has_sb(int i); int ext2_inactive(struct vop_inactive_args *); -int ext2_htree_add_entry(struct vnode *, struct ext2fs_direct_2 *, - struct componentname *); -int ext2_htree_create_index(struct vnode *, struct componentname *, - struct ext2fs_direct_2 *); -int ext2_htree_has_idx(struct inode *); -int ext2_htree_hash(const char *, int, uint32_t *, int, uint32_t *, - uint32_t *); -int ext2_htree_lookup(struct inode *, const char *, int, struct buf **, - int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); -int ext2_search_dirblock(struct inode *, void *, int *, const char *, int, - int *, doff_t *, doff_t *, doff_t *, struct ext2fs_searchslot *); - /* Flags to low-level allocation routines. * The low 16-bits are reserved for IO_ flags from vnode.h. Modified: stable/9/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_lookup.c Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_lookup.c Wed Apr 22 00:40:41 2015 (r281842) @@ -113,19 +113,9 @@ static u_char dt_to_ext2_ft[] = { static int ext2_dirbadentry(struct vnode *dp, struct ext2fs_direct_2 *de, int entryoffsetinblock); -static int ext2_is_dot_entry(struct componentname *cnp); static int ext2_lookup_ino(struct vnode *vdp, struct vnode **vpp, struct componentname *cnp, ino_t *dd_ino); -static int -ext2_is_dot_entry(struct componentname *cnp) -{ - if (cnp->cn_namelen <= 2 && cnp->cn_nameptr[0] == '.' && - (cnp->cn_nameptr[1] == '.' || cnp->cn_nameptr[1] == '0')) - return (1); - return (0); -} - /* * Vnode op for reading directories. */ @@ -306,9 +296,13 @@ ext2_lookup_ino(struct vnode *vdp, struc struct buf *bp; /* a buffer of directory entries */ struct ext2fs_direct_2 *ep; /* the current directory entry */ int entryoffsetinblock; /* offset of ep in bp's buffer */ - struct ext2fs_searchslot ss; + enum {NONE, COMPACT, FOUND} slotstatus; + doff_t slotoffset; /* offset of area with free space */ doff_t i_diroff; /* cached i_diroff value */ doff_t i_offset; /* cached i_offset value */ + int slotsize; /* size of area at slotoffset */ + int slotfreespace; /* amount of space free in slot */ + int slotneeded; /* size of the entry we're seeking */ int numdirpasses; /* strategy for directory search */ doff_t endsearch; /* offset to end directory search */ doff_t prevoff; /* prev entry dp->i_offset */ @@ -316,13 +310,12 @@ ext2_lookup_ino(struct vnode *vdp, struc struct vnode *tdp; /* returned by VFS_VGET */ doff_t enduseful; /* pointer past last used dir slot */ u_long bmask; /* block offset mask */ - int error; + int namlen, error; struct ucred *cred = cnp->cn_cred; int flags = cnp->cn_flags; int nameiop = cnp->cn_nameiop; ino_t ino, ino1; int ltype; - int entry_found = 0; int DIRBLKSIZ = VTOI(vdp)->i_e2fs->e2fs_bsize; @@ -333,57 +326,31 @@ ext2_lookup_ino(struct vnode *vdp, struc bmask = VFSTOEXT2(vdp->v_mount)->um_mountp->mnt_stat.f_iosize - 1; restart: bp = NULL; - ss.slotoffset = -1; + slotoffset = -1; /* * We now have a segment name to search for, and a directory to search. - * + */ + + /* * Suppress search for slots unless creating * file and at end of pathname, in which case * we watch for a place to put the new file in * case it doesn't already exist. */ i_diroff = dp->i_diroff; - ss.slotstatus = FOUND; - ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; + slotstatus = FOUND; + slotfreespace = slotsize = slotneeded = 0; if ((nameiop == CREATE || nameiop == RENAME) && (flags & ISLASTCN)) { - ss.slotstatus = NONE; - ss.slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); + slotstatus = NONE; + slotneeded = EXT2_DIR_REC_LEN(cnp->cn_namelen); /* was - ss.slotneeded = (sizeof(struct direct) - MAXNAMLEN + + slotneeded = (sizeof(struct direct) - MAXNAMLEN + cnp->cn_namelen + 3) &~ 3; */ } /* - * Try to lookup dir entry using htree directory index. - * - * If we got an error or we want to find '.' or '..' entry, - * we will fall back to linear search. - */ - if (!ext2_is_dot_entry(cnp) && ext2_htree_has_idx(dp)) { - numdirpasses = 1; - entryoffsetinblock = 0; - switch (ext2_htree_lookup(dp, cnp->cn_nameptr, cnp->cn_namelen, - &bp, &entryoffsetinblock, &i_offset, &prevoff, - &enduseful, &ss)) { - case 0: - ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + - (i_offset & bmask)); - goto foundentry; - case ENOENT: - i_offset = roundup2(dp->i_size, DIRBLKSIZ); - goto notfound; - default: - /* - * Something failed; just fallback to do a linear - * search. - */ - break; - } - } - - /* * If there is cached information on a previous search of * this directory, pick up where we last left off. * We cache only lookups as these are the most common @@ -417,38 +384,96 @@ searchloop: /* * If necessary, get the next directory block. */ - if (bp != NULL) - brelse(bp); - error = ext2_blkatoff(vdp, (off_t)i_offset, NULL, &bp); - if (error != 0) - return (error); - entryoffsetinblock = 0; + if ((i_offset & bmask) == 0) { + if (bp != NULL) + brelse(bp); + if ((error = + ext2_blkatoff(vdp, (off_t)i_offset, NULL, + &bp)) != 0) + return (error); + entryoffsetinblock = 0; + } /* * If still looking for a slot, and at a DIRBLKSIZE * boundary, have to start looking for free space again. */ - if (ss.slotstatus == NONE && + if (slotstatus == NONE && (entryoffsetinblock & (DIRBLKSIZ - 1)) == 0) { - ss.slotoffset = -1; - ss.slotfreespace = 0; + slotoffset = -1; + slotfreespace = 0; } - error = ext2_search_dirblock(dp, bp->b_data, &entry_found, - cnp->cn_nameptr, cnp->cn_namelen, - &entryoffsetinblock, &i_offset, &prevoff, - &enduseful, &ss); - if (error != 0) { - brelse(bp); - return (error); + /* + * Get pointer to next entry. + * Full validation checks are slow, so we only check + * enough to insure forward progress through the + * directory. Complete checks can be run by setting + * "vfs.e2fs.dirchk" to be true. + */ + ep = (struct ext2fs_direct_2 *) + ((char *)bp->b_data + entryoffsetinblock); + if (ep->e2d_reclen == 0 || + (dirchk && ext2_dirbadentry(vdp, ep, entryoffsetinblock))) { + int i; + ext2_dirbad(dp, i_offset, "mangled entry"); + i = DIRBLKSIZ - (entryoffsetinblock & (DIRBLKSIZ - 1)); + i_offset += i; + entryoffsetinblock += i; + continue; } - if (entry_found) { - ep = (struct ext2fs_direct_2 *)((char *)bp->b_data + - (entryoffsetinblock & bmask)); -foundentry: - ino = ep->e2d_ino; - goto found; + + /* + * If an appropriate sized slot has not yet been found, + * check to see if one is available. Also accumulate space + * in the current block so that we can determine if + * compaction is viable. + */ + if (slotstatus != FOUND) { + int size = ep->e2d_reclen; + + if (ep->e2d_ino != 0) + size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); + if (size > 0) { + if (size >= slotneeded) { + slotstatus = FOUND; + slotoffset = i_offset; + slotsize = ep->e2d_reclen; + } else if (slotstatus == NONE) { + slotfreespace += size; + if (slotoffset == -1) + slotoffset = i_offset; + if (slotfreespace >= slotneeded) { + slotstatus = COMPACT; + slotsize = i_offset + + ep->e2d_reclen - slotoffset; + } + } + } } + + /* + * Check for a name match. + */ + if (ep->e2d_ino) { + namlen = ep->e2d_namlen; + if (namlen == cnp->cn_namelen && + !bcmp(cnp->cn_nameptr, ep->e2d_name, + (unsigned)namlen)) { + /* + * Save directory entry's inode number and + * reclen in ndp->ni_ufs area, and release + * directory buffer. + */ + ino = ep->e2d_ino; + goto found; + } + } + prevoff = i_offset; + i_offset += ep->e2d_reclen; + entryoffsetinblock += ep->e2d_reclen; + if (ep->e2d_ino) + enduseful = i_offset; } -notfound: +/* notfound: */ /* * If we started in the middle of the directory and failed * to find our target, we must check the beginning as well. @@ -483,15 +508,15 @@ notfound: * can be put in the range from dp->i_offset to * dp->i_offset + dp->i_count. */ - if (ss.slotstatus == NONE) { + if (slotstatus == NONE) { dp->i_offset = roundup2(dp->i_size, DIRBLKSIZ); dp->i_count = 0; enduseful = dp->i_offset; } else { - dp->i_offset = ss.slotoffset; - dp->i_count = ss.slotsize; - if (enduseful < ss.slotoffset + ss.slotsize) - enduseful = ss.slotoffset + ss.slotsize; + dp->i_offset = slotoffset; + dp->i_count = slotsize; + if (enduseful < slotoffset + slotsize) + enduseful = slotoffset + slotsize; } dp->i_endoff = roundup2(enduseful, DIRBLKSIZ); /* @@ -697,102 +722,6 @@ found: return (0); } -int -ext2_search_dirblock(struct inode *ip, void *data, int *foundp, - const char *name, int namelen, int *entryoffsetinblockp, - doff_t *offp, doff_t *prevoffp, doff_t *endusefulp, - struct ext2fs_searchslot *ssp) -{ - struct vnode *vdp; - struct ext2fs_direct_2 *ep, *top; - uint32_t bsize = ip->i_e2fs->e2fs_bsize; - int offset = *entryoffsetinblockp; - int namlen; - - vdp = ITOV(ip); - - ep = (struct ext2fs_direct_2 *)((char *)data + offset); - top = (struct ext2fs_direct_2 *)((char *)data + - bsize - EXT2_DIR_REC_LEN(0)); - - while (ep < top) { - /* - * Full validation checks are slow, so we only check - * enough to insure forward progress through the - * directory. Complete checks can be run by setting - * "vfs.e2fs.dirchk" to be true. - */ - if (ep->e2d_reclen == 0 || - (dirchk && ext2_dirbadentry(vdp, ep, offset))) { - int i; - ext2_dirbad(ip, *offp, "mangled entry"); - i = bsize - (offset & (bsize - 1)); - *offp += i; - offset += i; - continue; - } - - /* - * If an appropriate sized slot has not yet been found, - * check to see if one is available. Also accumulate space - * in the current block so that we can determine if - * compaction is viable. - */ - if (ssp->slotstatus != FOUND) { - int size = ep->e2d_reclen; - - if (ep->e2d_ino != 0) - size -= EXT2_DIR_REC_LEN(ep->e2d_namlen); - if (size > 0) { - if (size >= ssp->slotneeded) { - ssp->slotstatus = FOUND; - ssp->slotoffset = *offp; - ssp->slotsize = ep->e2d_reclen; - } else if (ssp->slotstatus == NONE) { - ssp->slotfreespace += size; - if (ssp->slotoffset == -1) - ssp->slotoffset = *offp; - if (ssp->slotfreespace >= ssp->slotneeded) { - ssp->slotstatus = COMPACT; - ssp->slotsize = *offp + - ep->e2d_reclen - - ssp->slotoffset; - } - } - } - } - - /* - * Check for a name match. - */ - if (ep->e2d_ino) { - namlen = ep->e2d_namlen; - if (namlen == namelen && - !bcmp(name, ep->e2d_name, (unsigned)namlen)) { - /* - * Save directory entry's inode number and - * reclen in ndp->ni_ufs area, and release - * directory buffer. - */ - *foundp = 1; - return (0); - } - } - *prevoffp = *offp; - *offp += ep->e2d_reclen; - offset += ep->e2d_reclen; - *entryoffsetinblockp = offset; - if (ep->e2d_ino) - *endusefulp = *offp; - /* - * Get pointer to the next entry. - */ - ep = (struct ext2fs_direct_2 *)((char *)data + offset); - } - - return (0); -} - void ext2_dirbad(struct inode *ip, doff_t offset, char *how) { @@ -860,12 +789,16 @@ ext2_dirbadentry(struct vnode *dp, struc int ext2_direnter(struct inode *ip, struct vnode *dvp, struct componentname *cnp) { + struct ext2fs_direct_2 *ep, *nep; struct inode *dp; + struct buf *bp; struct ext2fs_direct_2 newdir; struct iovec aiov; struct uio auio; - int error, newentrysize; - int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; + u_int dsize; + int error, loc, newentrysize, spacefree; + char *dirbuf; + int DIRBLKSIZ = ip->i_e2fs->e2fs_bsize; #ifdef INVARIANTS @@ -882,28 +815,6 @@ ext2_direnter(struct inode *ip, struct v newdir.e2d_type = EXT2_FT_UNKNOWN; bcopy(cnp->cn_nameptr, newdir.e2d_name, (unsigned)cnp->cn_namelen + 1); newentrysize = EXT2_DIR_REC_LEN(newdir.e2d_namlen); - - if (ext2_htree_has_idx(dp)) { - error = ext2_htree_add_entry(dvp, &newdir, cnp); - if (error) { - dp->i_flag &= ~IN_E4INDEX; - dp->i_flag |= IN_CHANGE | IN_UPDATE; - } - return (error); - } - - if (EXT2_HAS_COMPAT_FEATURE(ip->i_e2fs, EXT2F_COMPAT_DIRHASHINDEX) && - !ext2_htree_has_idx(dp)) { - if ((dp->i_size / DIRBLKSIZ) == 1 && - dp->i_offset == DIRBLKSIZ) { - /* - * Making indexed directory when one block is not - * enough to save all entries. - */ - return ext2_htree_create_index(dvp, cnp, &newdir); - } - } - if (dp->i_count == 0) { /* * If dp->i_count is 0, then namei could find no @@ -935,29 +846,6 @@ ext2_direnter(struct inode *ip, struct v return (error); } - error = ext2_add_entry(dvp, &newdir); - if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) - error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, - cnp->cn_cred, cnp->cn_thread); - return (error); -} - -/* - * Insert an entry into the directory block. - * Compact the contents. - */ -int -ext2_add_entry(struct vnode *dvp, struct ext2fs_direct_2 *entry) -{ - struct ext2fs_direct_2 *ep, *nep; - struct inode *dp; - struct buf *bp; - u_int dsize; - int error, loc, newentrysize, spacefree; - char *dirbuf; - - dp = VTOI(dvp); - /* * If dp->i_count is non-zero, then namei found space * for the new entry in the range dp->i_offset to @@ -989,7 +877,6 @@ ext2_add_entry(struct vnode *dvp, struct * dp->i_offset + dp->i_count would yield the * space. */ - newentrysize = EXT2_DIR_REC_LEN(entry->e2d_namlen); ep = (struct ext2fs_direct_2 *)dirbuf; dsize = EXT2_DIR_REC_LEN(ep->e2d_namlen); spacefree = ep->e2d_reclen - dsize; @@ -1015,15 +902,15 @@ ext2_add_entry(struct vnode *dvp, struct if (ep->e2d_ino == 0) { if (spacefree + dsize < newentrysize) panic("ext2_direnter: compact1"); - entry->e2d_reclen = spacefree + dsize; + newdir.e2d_reclen = spacefree + dsize; } else { if (spacefree < newentrysize) panic("ext2_direnter: compact2"); - entry->e2d_reclen = spacefree; + newdir.e2d_reclen = spacefree; ep->e2d_reclen = dsize; ep = (struct ext2fs_direct_2 *)((char *)ep + dsize); } - bcopy((caddr_t)entry, (caddr_t)ep, (u_int)newentrysize); + bcopy((caddr_t)&newdir, (caddr_t)ep, (u_int)newentrysize); if (DOINGASYNC(dvp)) { bdwrite(bp); error = 0; @@ -1031,6 +918,9 @@ ext2_add_entry(struct vnode *dvp, struct error = bwrite(bp); } dp->i_flag |= IN_CHANGE | IN_UPDATE; + if (!error && dp->i_endoff && dp->i_endoff < dp->i_size) + error = ext2_truncate(dvp, (off_t)dp->i_endoff, IO_SYNC, + cnp->cn_cred, cnp->cn_thread); return (error); } Modified: stable/9/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2_vfsops.c Wed Apr 22 00:40:41 2015 (r281842) @@ -399,22 +399,8 @@ compute_sb_data(struct vnode *devvp, str if (es->e2fs_rev == E2FS_REV0 || !EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_LARGEFILE)) fs->e2fs_maxfilesize = 0x7fffffff; - else { - fs->e2fs_maxfilesize = 0xffffffffffff; - if (EXT2_HAS_RO_COMPAT_FEATURE(fs, EXT2F_ROCOMPAT_HUGE_FILE)) - fs->e2fs_maxfilesize = 0x7fffffffffffffff; - } - if (es->e4fs_flags & E2FS_UNSIGNED_HASH) { - fs->e2fs_uhash = 3; - } else if ((es->e4fs_flags & E2FS_SIGNED_HASH) == 0) { -#ifdef __CHAR_UNSIGNED__ - es->e4fs_flags |= E2FS_UNSIGNED_HASH; - fs->e2fs_uhash = 3; -#else - es->e4fs_flags |= E2FS_SIGNED_HASH; -#endif - } - + else + fs->e2fs_maxfilesize = 0x7fffffffffffffff; return (0); } Modified: stable/9/sys/fs/ext2fs/ext2fs.h ============================================================================== --- stable/9/sys/fs/ext2fs/ext2fs.h Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/fs/ext2fs/ext2fs.h Wed Apr 22 00:40:41 2015 (r281842) @@ -147,7 +147,6 @@ struct m_ext2fs { int32_t e2fs_contigsumsize; /* size of cluster summary array */ int32_t *e2fs_maxcluster; /* max cluster in each cyl group */ struct csum *e2fs_clustersum; /* cluster summary in each cyl group */ - int32_t e2fs_uhash; /* 3 if hash should be signed, 0 if not */ }; /* cluster summary information */ @@ -212,7 +211,6 @@ struct csum { * - EXT2F_INCOMPAT_FLEX_BG * - EXT2F_INCOMPAT_META_BG */ -#define EXT2F_COMPAT_SUPP EXT2F_COMPAT_DIRHASHINDEX #define EXT2F_ROCOMPAT_SUPP (EXT2F_ROCOMPAT_SPARSESUPER | \ EXT2F_ROCOMPAT_LARGEFILE | \ EXT2F_ROCOMPAT_EXTRA_ISIZE) @@ -242,12 +240,6 @@ struct csum { #define E2FS_ISCLEAN 0x0001 /* Unmounted cleanly */ #define E2FS_ERRORS 0x0002 /* Errors detected */ -/* - * Filesystem miscellaneous flags - */ -#define E2FS_SIGNED_HASH 0x0001 -#define E2FS_UNSIGNED_HASH 0x0002 - /* ext2 file system block group descriptor */ struct ext2_gd { Modified: stable/9/sys/modules/ext2fs/Makefile ============================================================================== --- stable/9/sys/modules/ext2fs/Makefile Wed Apr 22 00:38:11 2015 (r281841) +++ stable/9/sys/modules/ext2fs/Makefile Wed Apr 22 00:40:41 2015 (r281842) @@ -3,8 +3,8 @@ .PATH: ${.CURDIR}/../../fs/ext2fs KMOD= ext2fs SRCS= opt_ddb.h opt_directio.h opt_quota.h opt_suiddir.h vnode_if.h \ - ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c ext2_hash.c \ - ext2_htree.c ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ + ext2_alloc.c ext2_balloc.c ext2_bmap.c ext2_extents.c \ + ext2_inode.c ext2_inode_cnv.c ext2_lookup.c ext2_subr.c \ ext2_vfsops.c ext2_vnops.c .include From owner-svn-src-stable-9@FreeBSD.ORG Wed Apr 22 19:59:09 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB8675F8; Wed, 22 Apr 2015 19:59:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A96DC1E10; Wed, 22 Apr 2015 19:59:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MJx9ra080063; Wed, 22 Apr 2015 19:59:09 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MJx9l8080061; Wed, 22 Apr 2015 19:59:09 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504221959.t3MJx9l8080061@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 22 Apr 2015 19:59:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281867 - in stable/9/sys: dev/usb/wlan netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 19:59:10 -0000 Author: ae Date: Wed Apr 22 19:59:08 2015 New Revision: 281867 URL: https://svnweb.freebsd.org/changeset/base/281867 Log: MFC r281309: Fix the check for maximum mbuf's size needed to send ND6 NA and NS. It is acceptable that the size can be equal to MCLBYTES. In the later KAME's code this check has been moved under DIAGNOSTIC ifdef, because the size of NA and NS is much smaller than MCLBYTES. So, it is safe to replace the check with KASSERT. PR: 199304 Modified: stable/9/sys/netinet6/nd6_nbr.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/netinet6/nd6_nbr.c ============================================================================== --- stable/9/sys/netinet6/nd6_nbr.c Wed Apr 22 19:41:29 2015 (r281866) +++ stable/9/sys/netinet6/nd6_nbr.c Wed Apr 22 19:59:08 2015 (r281867) @@ -398,13 +398,9 @@ nd6_ns_output(struct ifnet *ifp, const s /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_ns); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_ns_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); MGETHDR(m, M_DONTWAIT, MT_DATA); if (m && max_linkhdr + maxlen >= MHLEN) { @@ -969,13 +965,9 @@ nd6_na_output_fib(struct ifnet *ifp, con /* estimate the size of message */ maxlen = sizeof(*ip6) + sizeof(*nd_na); maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7; - if (max_linkhdr + maxlen >= MCLBYTES) { -#ifdef DIAGNOSTIC - printf("nd6_na_output: max_linkhdr + maxlen >= MCLBYTES " - "(%d + %d > %d)\n", max_linkhdr, maxlen, MCLBYTES); -#endif - return; - } + KASSERT(max_linkhdr + maxlen <= MCLBYTES, ( + "%s: max_linkhdr + maxlen > MCLBYTES (%d + %d > %d)", + __func__, max_linkhdr, maxlen, MCLBYTES)); MGETHDR(m, M_DONTWAIT, MT_DATA); if (m && max_linkhdr + maxlen >= MHLEN) { From owner-svn-src-stable-9@FreeBSD.ORG Wed Apr 22 20:48:57 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 54F5C2BB; Wed, 22 Apr 2015 20:48:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 28EE9131F; Wed, 22 Apr 2015 20:48:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3MKmvrh017194; Wed, 22 Apr 2015 20:48:57 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3MKmuYq017190; Wed, 22 Apr 2015 20:48:56 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504222048.t3MKmuYq017190@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Wed, 22 Apr 2015 20:48:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281869 - in stable/9/sys: dev/usb/wlan netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2015 20:48:57 -0000 Author: ae Date: Wed Apr 22 20:48:56 2015 New Revision: 281869 URL: https://svnweb.freebsd.org/changeset/base/281869 Log: MFC r274988 (with modification): Skip L2 addresses lookups for tunneling interfaces. PR: 197286 Modified: stable/9/sys/netinet6/in6.c stable/9/sys/netinet6/nd6.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/amd64/include/xen/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/forth/ (props changed) stable/9/sys/boot/i386/efi/ (props changed) stable/9/sys/boot/i386/gptboot/ (props changed) stable/9/sys/boot/ia64/efi/ (props changed) stable/9/sys/boot/ia64/ski/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) stable/9/sys/boot/powerpc/ofw/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) stable/9/sys/conf/ (props changed) stable/9/sys/contrib/dev/acpica/ (props changed) stable/9/sys/contrib/dev/run/ (props changed) stable/9/sys/contrib/octeon-sdk/ (props changed) stable/9/sys/contrib/pf/ (props changed) stable/9/sys/contrib/x86emu/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/e1000/ (props changed) stable/9/sys/dev/isp/ (props changed) stable/9/sys/dev/ixgbe/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/dev/usb/wlan/if_run.c (props changed) stable/9/sys/dev/usb/wlan/if_runreg.h (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/modules/ (props changed) stable/9/sys/modules/ixgbe/ (props changed) stable/9/sys/modules/svr4/ (props changed) stable/9/sys/net/ (props changed) stable/9/sys/netpfil/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/netinet6/in6.c ============================================================================== --- stable/9/sys/netinet6/in6.c Wed Apr 22 20:42:17 2015 (r281868) +++ stable/9/sys/netinet6/in6.c Wed Apr 22 20:48:56 2015 (r281869) @@ -154,6 +154,8 @@ in6_ifaddloop(struct ifaddr *ifa) ia = ifa2ia6(ifa); ifp = ifa->ifa_ifp; + if (nd6_need_cache(ifp) == 0) + return; IF_AFDATA_LOCK(ifp); ifa->ifa_rtrequest = nd6_rtrequest; ln = lla_lookup(LLTABLE6(ifp), (LLE_CREATE | LLE_IFADDR | Modified: stable/9/sys/netinet6/nd6.c ============================================================================== --- stable/9/sys/netinet6/nd6.c Wed Apr 22 20:42:17 2015 (r281868) +++ stable/9/sys/netinet6/nd6.c Wed Apr 22 20:48:56 2015 (r281869) @@ -2175,9 +2175,6 @@ nd6_need_cache(struct ifnet *ifp) case IFT_CARP: #endif case IFT_INFINIBAND: - case IFT_GIF: /* XXX need more cases? */ - case IFT_PPP: - case IFT_TUNNEL: case IFT_BRIDGE: case IFT_PROPVIRTUAL: return (1); From owner-svn-src-stable-9@FreeBSD.ORG Thu Apr 23 15:20:58 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 70C59FF; Thu, 23 Apr 2015 15:20:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DF871B89; Thu, 23 Apr 2015 15:20:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFKwXY024780; Thu, 23 Apr 2015 15:20:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFKwui024779; Thu, 23 Apr 2015 15:20:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231520.t3NFKwui024779@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:20:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281894 - stable/9/crypto/openssh X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:20:58 -0000 Author: bdrewery Date: Thu Apr 23 15:20:57 2015 New Revision: 281894 URL: https://svnweb.freebsd.org/changeset/base/281894 Log: MFC r280999: Use proper CHAN_TCP_PACKET_DEFAULT for agent forwarding when HPN disabled. Modified: stable/9/crypto/openssh/clientloop.c Directory Properties: stable/9/crypto/openssh/ (props changed) Modified: stable/9/crypto/openssh/clientloop.c ============================================================================== --- stable/9/crypto/openssh/clientloop.c Thu Apr 23 15:19:56 2015 (r281893) +++ stable/9/crypto/openssh/clientloop.c Thu Apr 23 15:20:57 2015 (r281894) @@ -1923,7 +1923,7 @@ client_request_agent(const char *request if (options.hpn_disabled) c = channel_new("authentication agent connection", SSH_CHANNEL_OPEN, sock, sock, -1, - CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_WINDOW_DEFAULT, 0, + CHAN_X11_WINDOW_DEFAULT, CHAN_TCP_PACKET_DEFAULT, 0, "authentication agent connection", 1); else c = channel_new("authentication agent connection", From owner-svn-src-stable-9@FreeBSD.ORG Thu Apr 23 15:25:23 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFBEE674; Thu, 23 Apr 2015 15:25:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCDE01C8E; Thu, 23 Apr 2015 15:25:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NFPNrP027245; Thu, 23 Apr 2015 15:25:23 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NFPNLt027244; Thu, 23 Apr 2015 15:25:23 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201504231525.t3NFPNLt027244@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 23 Apr 2015 15:25:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281897 - stable/9/usr.bin/lockf X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 15:25:23 -0000 Author: bdrewery Date: Thu Apr 23 15:25:22 2015 New Revision: 281897 URL: https://svnweb.freebsd.org/changeset/base/281897 Log: MFC r281582: Remove extra flags from r250462. Modified: stable/9/usr.bin/lockf/lockf.c Directory Properties: stable/9/usr.bin/lockf/ (props changed) Modified: stable/9/usr.bin/lockf/lockf.c ============================================================================== --- stable/9/usr.bin/lockf/lockf.c Thu Apr 23 15:24:33 2015 (r281896) +++ stable/9/usr.bin/lockf/lockf.c Thu Apr 23 15:25:22 2015 (r281897) @@ -169,7 +169,7 @@ acquire_lock(const char *name, int flags { int fd; - if ((fd = open(name, flags|O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { + if ((fd = open(name, O_RDONLY|O_EXLOCK|flags, 0666)) == -1) { if (errno == EAGAIN || errno == EINTR) return (-1); err(EX_CANTCREAT, "cannot open %s", name); From owner-svn-src-stable-9@FreeBSD.ORG Thu Apr 23 22:06:03 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3347A2F4; Thu, 23 Apr 2015 22:06:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15D131A1C; Thu, 23 Apr 2015 22:06:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NM62ZU028928; Thu, 23 Apr 2015 22:06:02 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NM62lL028925; Thu, 23 Apr 2015 22:06:02 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201504232206.t3NM62lL028925@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 23 Apr 2015 22:06:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281908 - in stable: 10/contrib/llvm/lib/MC/MCParser 10/contrib/llvm/patches 9/contrib/llvm/lib/MC/MCParser 9/contrib/llvm/patches X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:06:03 -0000 Author: dim Date: Thu Apr 23 22:06:02 2015 New Revision: 281908 URL: https://svnweb.freebsd.org/changeset/base/281908 Log: MFC r281775: Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): MC: Allow multiple comma-separated expressions on the .uleb128 directive. For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? Reported by: sbruno PR: 199554 MFC r281777: Add llvm patch corresponding to r281775. Added: stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff - copied unchanged from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) Changes in other areas also in this revision: Added: stable/10/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff - copied unchanged from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff Modified: stable/10/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp ============================================================================== --- stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Thu Apr 23 21:39:32 2015 (r281907) +++ stable/9/contrib/llvm/lib/MC/MCParser/AsmParser.cpp Thu Apr 23 22:06:02 2015 (r281908) @@ -3370,21 +3370,27 @@ bool AsmParser::parseDirectiveSpace(Stri } /// parseDirectiveLEB128 -/// ::= (.sleb128 | .uleb128) expression +/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] bool AsmParser::parseDirectiveLEB128(bool Signed) { checkForValidSection(); const MCExpr *Value; - if (parseExpression(Value)) - return true; + for (;;) { + if (parseExpression(Value)) + return true; - if (getLexer().isNot(AsmToken::EndOfStatement)) - return TokError("unexpected token in directive"); + if (Signed) + getStreamer().EmitSLEB128Value(Value); + else + getStreamer().EmitULEB128Value(Value); - if (Signed) - getStreamer().EmitSLEB128Value(Value); - else - getStreamer().EmitULEB128Value(Value); + if (getLexer().is(AsmToken::EndOfStatement)) + break; + + if (getLexer().isNot(AsmToken::Comma)) + return TokError("unexpected token in directive"); + Lex(); + } return false; } Copied: stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff (from r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/llvm/patches/patch-r281775-llvm-r229911-uleb128-commas.diff Thu Apr 23 22:06:02 2015 (r281908, copy of r281777, head/contrib/llvm/patches/patch-13-llvm-r229911-uleb128-commas.diff) @@ -0,0 +1,77 @@ +Pull in r229911 from upstream llvm trunk (by Benjamin Kramer): + + MC: Allow multiple comma-separated expressions on the .uleb128 directive. + + For compatiblity with GNU as. Binutils documents this as + '.uleb128 expressions'. Subtle, isn't it? + +Introduced here: http://svnweb.freebsd.org/changeset/base/281775 + +Index: lib/MC/MCParser/AsmParser.cpp +=================================================================== +--- lib/MC/MCParser/AsmParser.cpp ++++ lib/MC/MCParser/AsmParser.cpp +@@ -3636,22 +3636,28 @@ bool AsmParser::parseDirectiveSpace(StringRef IDVa + } + + /// parseDirectiveLEB128 +-/// ::= (.sleb128 | .uleb128) expression ++/// ::= (.sleb128 | .uleb128) [ expression (, expression)* ] + bool AsmParser::parseDirectiveLEB128(bool Signed) { + checkForValidSection(); + const MCExpr *Value; + +- if (parseExpression(Value)) +- return true; ++ for (;;) { ++ if (parseExpression(Value)) ++ return true; + +- if (getLexer().isNot(AsmToken::EndOfStatement)) +- return TokError("unexpected token in directive"); ++ if (Signed) ++ getStreamer().EmitSLEB128Value(Value); ++ else ++ getStreamer().EmitULEB128Value(Value); + +- if (Signed) +- getStreamer().EmitSLEB128Value(Value); +- else +- getStreamer().EmitULEB128Value(Value); ++ if (getLexer().is(AsmToken::EndOfStatement)) ++ break; + ++ if (getLexer().isNot(AsmToken::Comma)) ++ return TokError("unexpected token in directive"); ++ Lex(); ++ } ++ + return false; + } + +Index: test/MC/ELF/uleb.s +=================================================================== +--- test/MC/ELF/uleb.s ++++ test/MC/ELF/uleb.s +@@ -11,16 +11,17 @@ foo: + .uleb128 128 + .uleb128 16383 + .uleb128 16384 ++ .uleb128 23, 42 + + // ELF_32: Name: .text + // ELF_32: SectionData ( +-// ELF_32: 0000: 00017F80 01FF7F80 8001 ++// ELF_32: 0000: 00017F80 01FF7F80 8001172A + // ELF_32: ) + // ELF_64: Name: .text + // ELF_64: SectionData ( +-// ELF_64: 0000: 00017F80 01FF7F80 8001 ++// ELF_64: 0000: 00017F80 01FF7F80 8001172A + // ELF_64: ) + // MACHO_32: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_32: ('_section_data', '00017f80 01ff7f80 8001172a') + // MACHO_64: ('section_name', '__text\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00') +-// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001') ++// MACHO_64: ('_section_data', '00017f80 01ff7f80 8001172a') From owner-svn-src-stable-9@FreeBSD.ORG Thu Apr 23 22:39:33 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8BBE9D6F; Thu, 23 Apr 2015 22:39:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 79B0F1D62; Thu, 23 Apr 2015 22:39:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3NMdXEo044166; Thu, 23 Apr 2015 22:39:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3NMdXvF044165; Thu, 23 Apr 2015 22:39:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201504232239.t3NMdXvF044165@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 23 Apr 2015 22:39:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281910 - in stable: 10/sys/dev/acpica 9/sys/dev/acpica X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2015 22:39:33 -0000 Author: jhb Date: Thu Apr 23 22:39:32 2015 New Revision: 281910 URL: https://svnweb.freebsd.org/changeset/base/281910 Log: MFC 281159: Move the message complaining about failed system resource allocations under bootverbose. Every example I've seen to date has been due to an ACPI system resource device reserving a range that overlaps with system memory (which ram0 attempts to reserve) or a local or I/O APIC (which apic0 attempts to reserve). These are always harmless but look scary to users. Modified: stable/9/sys/dev/acpica/acpi.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/dev/acpica/acpi.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Thu Apr 23 22:20:43 2015 (r281909) +++ stable/9/sys/dev/acpica/acpi.c Thu Apr 23 22:39:32 2015 (r281910) @@ -1112,7 +1112,7 @@ acpi_sysres_alloc(device_t dev) if (res != NULL) { rman_manage_region(rm, rman_get_start(res), rman_get_end(res)); rle->res = res; - } else + } else if (bootverbose) device_printf(dev, "reservation of %lx, %lx (%d) failed\n", rle->start, rle->count, rle->type); } From owner-svn-src-stable-9@FreeBSD.ORG Fri Apr 24 02:15:15 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 63E38C13; Fri, 24 Apr 2015 02:15:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 513251191; Fri, 24 Apr 2015 02:15:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O2FFIH052510; Fri, 24 Apr 2015 02:15:15 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O2FFCB052509; Fri, 24 Apr 2015 02:15:15 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201504240215.t3O2FFCB052509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 24 Apr 2015 02:15:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281913 - stable/9/sys/fs/nfsclient X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 02:15:15 -0000 Author: pfg Date: Fri Apr 24 02:15:14 2015 New Revision: 281913 URL: https://svnweb.freebsd.org/changeset/base/281913 Log: MFC r281756: nfsrpc_createv4: fix double free. Reported by: Oliver Pinter, clang static checker Obtained from: HardenedBSD (63cac77c42c0c3fc67da62f97d5ab651d52ae707) Reviewed by: rmacklem Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clrpcops.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 24 02:14:01 2015 (r281912) +++ stable/9/sys/fs/nfsclient/nfs_clrpcops.c Fri Apr 24 02:15:14 2015 (r281913) @@ -2027,8 +2027,10 @@ nfsrpc_createv4(vnode_t dvp, char *name, (void) nfs_catnap(PZERO, ret, "nfs_crt2"); } while (ret == NFSERR_DELAY); if (ret) { - if (dp != NULL) + if (dp != NULL) { FREE((caddr_t)dp, M_NFSCLDELEG); + dp = NULL; + } if (ret == NFSERR_STALECLIENTID || ret == NFSERR_STALEDONTRECOVER) error = ret; From owner-svn-src-stable-9@FreeBSD.ORG Fri Apr 24 02:43:03 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 660EA15E; Fri, 24 Apr 2015 02:43:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53248146E; Fri, 24 Apr 2015 02:43:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3O2h3JG067078; Fri, 24 Apr 2015 02:43:03 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3O2h3BY067077; Fri, 24 Apr 2015 02:43:03 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201504240243.t3O2h3BY067077@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 24 Apr 2015 02:43:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281914 - stable/9/sys/netinet6 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 02:43:03 -0000 Author: ae Date: Fri Apr 24 02:43:02 2015 New Revision: 281914 URL: https://svnweb.freebsd.org/changeset/base/281914 Log: MFC r281380: Fix the IPV6_MULTICAST_IF sockopt handling. RFC 3493 says when the interface index is specified as zero, the system should select the interface to use for outgoing multicast packets. Even the comment for the in6p_set_multicast_if() function says about index of zero. But in fact for zero index the function just returns EADDRNOTAVAIL. I.e. if you first set some interface and then will try reset it with zero ifindex, you will get EADDRNOTAVAIL. Reset im6o_multicast_ifp to NULL when interface index specified as zero. Also return EINVAL in case when ifnet_byindex() returns NULL. This will be the same behaviour as when ifindex is bigger than V_if_index. And return EADDRNOTAVAIL only when interface is not multicast capable. Modified: stable/9/sys/netinet6/in6_mcast.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netinet6/in6_mcast.c ============================================================================== --- stable/9/sys/netinet6/in6_mcast.c Fri Apr 24 02:15:14 2015 (r281913) +++ stable/9/sys/netinet6/in6_mcast.c Fri Apr 24 02:43:02 2015 (r281914) @@ -2353,11 +2353,15 @@ in6p_set_multicast_if(struct inpcb *inp, return (error); if (ifindex < 0 || V_if_index < ifindex) return (EINVAL); - - ifp = ifnet_byindex(ifindex); - if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0) - return (EADDRNOTAVAIL); - + if (ifindex == 0) + ifp = NULL; + else { + ifp = ifnet_byindex(ifindex); + if (ifp == NULL) + return (EINVAL); + if ((ifp->if_flags & IFF_MULTICAST) == 0) + return (EADDRNOTAVAIL); + } imo = in6p_findmoptions(inp); imo->im6o_multicast_ifp = ifp; INP_WUNLOCK(inp); From owner-svn-src-stable-9@FreeBSD.ORG Fri Apr 24 15:34:20 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D987EC24; Fri, 24 Apr 2015 15:34:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7B901ADE; Fri, 24 Apr 2015 15:34:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFYKnu052028; Fri, 24 Apr 2015 15:34:20 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFYKne052026; Fri, 24 Apr 2015 15:34:20 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241534.t3OFYKne052026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:34:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281934 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:34:21 -0000 Author: emaste Date: Fri Apr 24 15:34:20 2015 New Revision: 281934 URL: https://svnweb.freebsd.org/changeset/base/281934 Log: MFC r281537: Increase vt font limits to allow use of GNU Unifont PR: 199438 Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/dev/vt/vt_font.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_font.c ============================================================================== --- stable/9/sys/dev/vt/vt_font.c Fri Apr 24 15:32:12 2015 (r281933) +++ stable/9/sys/dev/vt/vt_font.c Fri Apr 24 15:34:20 2015 (r281934) @@ -41,8 +41,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_VTFONT, "vtfont", "vt font"); /* Some limits to prevent abnormal fonts from being loaded. */ -#define VTFONT_MAXMAPPINGS 8192 -#define VTFONT_MAXGLYPHSIZE 1048576 +#define VTFONT_MAXMAPPINGS 65536 +#define VTFONT_MAXGLYPHSIZE 2097152 #define VTFONT_MAXDIMENSION 128 static uint16_t From owner-svn-src-stable-9@FreeBSD.ORG Fri Apr 24 15:36:58 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E0D9CE6F; Fri, 24 Apr 2015 15:36:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFBDA1B01; Fri, 24 Apr 2015 15:36:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OFawHx052606; Fri, 24 Apr 2015 15:36:58 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OFawMn052605; Fri, 24 Apr 2015 15:36:58 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241536.t3OFawMn052605@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 15:36:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281935 - stable/9/contrib/binutils/bfd X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 15:36:59 -0000 Author: emaste Date: Fri Apr 24 15:36:58 2015 New Revision: 281935 URL: https://svnweb.freebsd.org/changeset/base/281935 Log: MFC r279301: GNU nm: Avoid NULL dereference bfd_dwarf2_find_line() calls find_line() with NULL functionname_ptr, which resulted in a crash on certain ELF objects. This change was implemented independently from upstream binutils, but I have checked that the crash does not happen there. Sponsored by: The FreeBSD Foundation Modified: stable/9/contrib/binutils/bfd/dwarf2.c Directory Properties: stable/9/contrib/binutils/ (props changed) Modified: stable/9/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/9/contrib/binutils/bfd/dwarf2.c Fri Apr 24 15:34:20 2015 (r281934) +++ stable/9/contrib/binutils/bfd/dwarf2.c Fri Apr 24 15:36:58 2015 (r281935) @@ -2382,7 +2382,8 @@ find_line (bfd *abfd, else addr += section->vma; *filename_ptr = NULL; - *functionname_ptr = NULL; + if (!do_line) + *functionname_ptr = NULL; *linenumber_ptr = 0; if (! *pinfo) From owner-svn-src-stable-9@FreeBSD.ORG Fri Apr 24 16:12:31 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78D00FE8; Fri, 24 Apr 2015 16:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 671CF1006; Fri, 24 Apr 2015 16:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OGCVYE072649; Fri, 24 Apr 2015 16:12:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OGCVj0072648; Fri, 24 Apr 2015 16:12:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241612.t3OGCVj0072648@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 16:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281939 - stable/9/sys/sys X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 16:12:31 -0000 Author: emaste Date: Fri Apr 24 16:12:30 2015 New Revision: 281939 URL: https://svnweb.freebsd.org/changeset/base/281939 Log: MFC r277464: Add missing R_X86_64_ constants to elf_common.h PR: 196918 Sponsored by: The FreeBSD Foundation Modified: stable/9/sys/sys/elf_common.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/sys/ (props changed) Modified: stable/9/sys/sys/elf_common.h ============================================================================== --- stable/9/sys/sys/elf_common.h Fri Apr 24 16:11:22 2015 (r281938) +++ stable/9/sys/sys/elf_common.h Fri Apr 24 16:12:30 2015 (r281939) @@ -979,6 +979,19 @@ typedef struct { #define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ #define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ #define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +#define R_X86_64_PC64 24 /* PC-relative 64 bit signed sym value. */ +#define R_X86_64_GOTOFF64 25 +#define R_X86_64_GOTPC32 26 +#define R_X86_64_GOT64 27 +#define R_X86_64_GOTPCREL64 28 +#define R_X86_64_GOTPC64 29 +#define R_X86_64_GOTPLT64 30 +#define R_X86_64_PLTOFF64 31 +#define R_X86_64_SIZE32 32 +#define R_X86_64_SIZE64 33 +#define R_X86_64_GOTPC32_TLSDESC 34 +#define R_X86_64_TLSDESC_CALL 35 +#define R_X86_64_TLSDESC 36 #define R_X86_64_IRELATIVE 37 From owner-svn-src-stable-9@FreeBSD.ORG Fri Apr 24 19:26:01 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BFE015A2; Fri, 24 Apr 2015 19:26:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ADCEF1756; Fri, 24 Apr 2015 19:26:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3OJQ13R068027; Fri, 24 Apr 2015 19:26:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3OJQ1hv068026; Fri, 24 Apr 2015 19:26:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201504241926.t3OJQ1hv068026@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 24 Apr 2015 19:26:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281947 - stable/9/sys/dev/vt X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2015 19:26:01 -0000 Author: emaste Date: Fri Apr 24 19:26:01 2015 New Revision: 281947 URL: https://svnweb.freebsd.org/changeset/base/281947 Log: MFC r273973: vt(4): Fix keyboard allocation when kbdmux(4) isn't used The problem was that only the kbdmux keyboard index was saved in vd->vd_keyboard. This index is -1 when kbdmux isn't used. In this case, the keyboard was correctly allocated, but the returned index was discarded. PR: 196512 Modified: stable/9/sys/dev/vt/vt_core.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/vt/vt_core.c ============================================================================== --- stable/9/sys/dev/vt/vt_core.c Fri Apr 24 19:15:38 2015 (r281946) +++ stable/9/sys/dev/vt/vt_core.c Fri Apr 24 19:26:01 2015 (r281947) @@ -559,7 +559,6 @@ vt_allocate_keyboard(struct vt_device *v idx0 = kbd_allocate("kbdmux", -1, (void *)&vd->vd_keyboard, vt_kbdevent, vd); /* XXX: kb_token lost */ - vd->vd_keyboard = idx0; if (idx0 != -1) { DPRINTF(20, "%s: kbdmux allocated, idx = %d\n", __func__, idx0); k0 = kbd_get_keyboard(idx0); @@ -583,6 +582,7 @@ vt_allocate_keyboard(struct vt_device *v idx0 = kbd_allocate("*", -1, (void *)&vd->vd_keyboard, vt_kbdevent, vd); } + vd->vd_keyboard = idx0; DPRINTF(20, "%s: vd_keyboard = %d\n", __func__, vd->vd_keyboard); return (idx0); From owner-svn-src-stable-9@FreeBSD.ORG Sat Apr 25 05:05:24 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F3C37D3; Sat, 25 Apr 2015 05:05:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C7F2119A; Sat, 25 Apr 2015 05:05:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P55OhB063939; Sat, 25 Apr 2015 05:05:24 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P55Oww063936; Sat, 25 Apr 2015 05:05:24 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250505.t3P55Oww063936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 05:05:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281971 - stable/9/tools/regression/aio/aiotest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 05:05:24 -0000 Author: ngie Date: Sat Apr 25 05:05:23 2015 New Revision: 281971 URL: https://svnweb.freebsd.org/changeset/base/281971 Log: MFstable/10 r281969: MFC r280893: Cleanup and do minor refactoring before converting testcases to ATF - Convert errx(-1, ..) to errx(1, ..) - Move the aio(4) checks to a single function (aio_available); use modfind(2) instead of depending on SIGSYS (doesn't work when aio(4) support is missing, not documented in the aio syscall manpages). - Use aio_available liberally in the testcase functions - Use mkstemp(3) + unlink(2) instead of mktemp(3) - Fix some -Wunused warnings - Bump WARNS to 6 Submitted by: mjohnston [*] Sponsored by: EMC / Isilon Storage Division Modified: stable/9/tools/regression/aio/aiotest/Makefile stable/9/tools/regression/aio/aiotest/aiotest.c Directory Properties: stable/9/ (props changed) stable/9/tools/ (props changed) stable/9/tools/regression/ (props changed) stable/9/tools/regression/aio/aiotest/ (props changed) Modified: stable/9/tools/regression/aio/aiotest/Makefile ============================================================================== --- stable/9/tools/regression/aio/aiotest/Makefile Sat Apr 25 04:58:08 2015 (r281970) +++ stable/9/tools/regression/aio/aiotest/Makefile Sat Apr 25 05:05:23 2015 (r281971) @@ -6,4 +6,6 @@ NO_MAN= DPADD= ${LIBUTIL} LDADD= -lutil +WARNS?= 6 + .include Modified: stable/9/tools/regression/aio/aiotest/aiotest.c ============================================================================== --- stable/9/tools/regression/aio/aiotest/aiotest.c Sat Apr 25 04:58:08 2015 (r281970) +++ stable/9/tools/regression/aio/aiotest/aiotest.c Sat Apr 25 05:05:23 2015 (r281971) @@ -38,7 +38,8 @@ * basic operations work on some basic object types. */ -#include +#include +#include #include #include #include @@ -79,25 +80,15 @@ struct aio_context { }; static int aio_timedout; -static int aio_notpresent; - -/* - * Attempt to provide a cleaner failure mode in the event AIO support is not - * present by catching and reporting SIGSYS. - */ -static void -aio_sigsys(int sig) -{ - - aio_notpresent = 1; -} static void -aio_sigsys_setup(void) +aio_available(void) { - if (signal(SIGSYS, aio_sigsys) == SIG_ERR) - errx(-1, "FAIL: signal(SIGSYS): %s", strerror(errno)); + if (modfind("aio") == -1) + errx(0, + "aio support not available in the kernel; skipping " + "testcases"); } /* @@ -105,7 +96,7 @@ aio_sigsys_setup(void) * signal(3) and alarm(3) APIs to set this up. */ static void -aio_timeout_signal(int sig) +aio_timeout_signal(int sig __unused) { aio_timedout = 1; @@ -117,7 +108,7 @@ aio_timeout_start(const char *string1, c aio_timedout = 0; if (signal(SIGALRM, aio_timeout_signal) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", + errx(1, "FAIL: %s: %s: aio_timeout_set: signal(SIGALRM): %s", string1, string2, strerror(errno)); alarm(seconds); } @@ -127,7 +118,7 @@ aio_timeout_stop(const char *string1, co { if (signal(SIGALRM, NULL) == SIG_ERR) - errx(-1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", + errx(1, "FAIL: %s: %s: aio_timeout_stop: signal(NULL): %s", string1, string2, strerror(errno)); alarm(0); } @@ -179,7 +170,7 @@ aio_context_init(struct aio_context *ac, { if (buflen > BUFFER_MAX) - errx(-1, "FAIL: %s: aio_context_init: buffer too large", + errx(1, "FAIL: %s: aio_context_init: buffer too large", test); bzero(ac, sizeof(*ac)); ac->ac_test = test; @@ -190,7 +181,7 @@ aio_context_init(struct aio_context *ac, ac->ac_seed = random(); aio_fill_buffer(ac->ac_buffer, buflen, ac->ac_seed); if (aio_test_buffer(ac->ac_buffer, buflen, ac->ac_seed) == 0) - errx(-1, "%s: aio_context_init: aio_test_buffer: internal " + errx(1, "%s: aio_context_init: aio_test_buffer: internal " "error", test); ac->ac_seconds = seconds; ac->ac_cleanup = cleanup; @@ -223,7 +214,8 @@ aio_write_test(struct aio_context *ac) { struct aiocb aio, *aiop; ssize_t len; - int error; + + aio_available(); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -235,33 +227,29 @@ aio_write_test(struct aio_context *ac) if (aio_write(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_write: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_write: %s", + errx(1, "FAIL: %s: aio_write_test: aio_write: %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: " + errx(1, "FAIL: %s: aio_write_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -269,7 +257,7 @@ aio_write_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_write_test: aio_waitcomplete: short " "write (%jd)", ac->ac_test, (intmax_t)len); } } @@ -284,6 +272,8 @@ aio_read_test(struct aio_context *ac) struct aiocb aio, *aiop; ssize_t len; + aio_available(); + bzero(ac->ac_buffer, ac->ac_buflen); bzero(&aio, sizeof(aio)); aio.aio_buf = ac->ac_buffer; @@ -295,33 +285,29 @@ aio_read_test(struct aio_context *ac) if (aio_read(&aio) < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_read: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, + errx(1, "FAIL: %s: aio_read_test: aio_read %s", ac->ac_test, strerror(errno)); } len = aio_waitcomplete(&aiop, NULL); if (len < 0) { if (errno == EINTR) { - if (aio_notpresent) - errno = EOPNOTSUPP; if (aio_timedout) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: " + errx(1, "FAIL: %s: aio_read_test: " "aio_waitcomplete: timed out", ac->ac_test); } } aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: %s", ac->ac_test, strerror(errno)); } @@ -329,13 +315,13 @@ aio_read_test(struct aio_context *ac) if (len != ac->ac_buflen) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " + errx(1, "FAIL: %s: aio_read_test: aio_waitcomplete: short " "read (%jd)", ac->ac_test, (intmax_t)len); } if (aio_test_buffer(ac->ac_buffer, ac->ac_buflen, ac->ac_seed) == 0) { aio_cleanup(ac); - errx(-1, "FAIL: %s: aio_read_test: buffer mismatch", + errx(1, "FAIL: %s: aio_read_test: buffer mismatch", ac->ac_test); } } @@ -375,10 +361,12 @@ aio_file_test(void) struct aio_context ac; int fd; + aio_available(); + strcpy(pathname, PATH_TEMPLATE); fd = mkstemp(pathname); if (fd == -1) - errx(-1, "FAIL: aio_file_test: mkstemp: %s", + errx(1, "FAIL: aio_file_test: mkstemp: %s", strerror(errno)); arg.afa_fd = fd; @@ -423,15 +411,20 @@ aio_fifo_test(void) char pathname[PATH_MAX]; struct aio_context ac; + aio_available(); + /* - * In theory, mktemp() can return a name that is then collided with. + * In theory, mkstemp() can return a name that is then collided with. * Because this is a regression test, we treat that as a test failure * rather than retrying. */ strcpy(pathname, PATH_TEMPLATE); - mktemp(pathname); + if (mkstemp(pathname) == -1) + err(1, "FAIL: aio_fifo_test: mkstemp failed"); + if (unlink(pathname) == -1) + err(1, "FAIL: aio_fifo_test: unlink failed"); if (mkfifo(pathname, 0600) == -1) - errx(-1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); + errx(1, "FAIL: aio_fifo_test: mkfifo: %s", strerror(errno)); arg.afa_pathname = pathname; arg.afa_read_fd = -1; arg.afa_write_fd = -1; @@ -441,7 +434,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: read_fd open: %s", + errx(1, "FAIL: aio_fifo_test: read_fd open: %s", strerror(errno)); } arg.afa_read_fd = read_fd; @@ -451,7 +444,7 @@ aio_fifo_test(void) error = errno; aio_fifo_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_fifo_test: write_fd open: %s", + errx(1, "FAIL: aio_fifo_test: write_fd open: %s", strerror(errno)); } arg.afa_write_fd = write_fd; @@ -489,8 +482,10 @@ aio_unix_socketpair_test(void) struct aio_context ac; int sockets[2]; + aio_available(); + if (socketpair(PF_UNIX, SOCK_STREAM, 0, sockets) < 0) - errx(-1, "FAIL: aio_socketpair_test: socketpair: %s", + errx(1, "FAIL: aio_socketpair_test: socketpair: %s", strerror(errno)); arg.asa_sockets[0] = sockets[0]; @@ -532,8 +527,10 @@ aio_pty_test(void) struct termios ts; int error; + aio_available(); + if (openpty(&read_fd, &write_fd, NULL, NULL, NULL) < 0) - errx(-1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); + errx(1, "FAIL: aio_pty_test: openpty: %s", strerror(errno)); arg.apa_read_fd = read_fd; arg.apa_write_fd = write_fd; @@ -542,7 +539,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcgetattr: %s", + errx(1, "FAIL: aio_pty_test: tcgetattr: %s", strerror(errno)); } cfmakeraw(&ts); @@ -550,7 +547,7 @@ aio_pty_test(void) error = errno; aio_pty_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_pty_test: tcsetattr: %s", + errx(1, "FAIL: aio_pty_test: tcsetattr: %s", strerror(errno)); } @@ -581,8 +578,10 @@ aio_pipe_test(void) struct aio_context ac; int pipes[2]; + aio_available(); + if (pipe(pipes) < 0) - errx(-1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); + errx(1, "FAIL: aio_pipe_test: pipe: %s", strerror(errno)); aio_context_init(&ac, "aio_file_test", pipes[0], pipes[1], PIPE_LEN, PIPE_TIMEOUT, aio_pipe_cleanup, pipes); @@ -633,15 +632,23 @@ aio_md_cleanup(void *arg) static void aio_md_test(void) { - int error, fd, i, mdctl_fd, unit; + int error, fd, mdctl_fd, unit; char pathname[PATH_MAX]; struct aio_md_arg arg; struct aio_context ac; struct md_ioctl mdio; + aio_available(); + + if (geteuid() != 0) { + fprintf(stderr, "WARNING: aio_md_test: skipped as euid " + "!= 0\n"); + return; + } + mdctl_fd = open("/dev/" MDCTL_NAME, O_RDWR, 0); if (mdctl_fd < 0) - errx(-1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, + errx(1, "FAIL: aio_md_test: open(/dev/%s): %s", MDCTL_NAME, strerror(errno)); bzero(&mdio, sizeof(mdio)); @@ -658,7 +665,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: MDIOCATTACH: %s", + errx(1, "FAIL: aio_md_test: MDIOCATTACH: %s", strerror(errno)); } @@ -669,7 +676,7 @@ aio_md_test(void) error = errno; aio_md_cleanup(&arg); errno = error; - errx(-1, "FAIL: aio_md_test: open(%s): %s", pathname, + errx(1, "FAIL: aio_md_test: open(%s): %s", pathname, strerror(errno)); } arg.ama_fd = fd; @@ -685,18 +692,15 @@ aio_md_test(void) } int -main(int argc, char *argv[]) +main(void) { - aio_sigsys_setup(); aio_file_test(); aio_fifo_test(); aio_unix_socketpair_test(); aio_pty_test(); aio_pipe_test(); - if (geteuid() == 0) - aio_md_test(); - else - fprintf(stderr, "WARNING: aio_md_test: skipped as euid " - "!= 0\n"); + aio_md_test(); + + return (0); } From owner-svn-src-stable-9@FreeBSD.ORG Sat Apr 25 05:08:31 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E594932; Sat, 25 Apr 2015 05:08:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D2EE11B1; Sat, 25 Apr 2015 05:08:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P58V6H064463; Sat, 25 Apr 2015 05:08:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P58VI6064462; Sat, 25 Apr 2015 05:08:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201504250508.t3P58VI6064462@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 25 Apr 2015 05:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281972 - stable/9/share/man/man4 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 05:08:31 -0000 Author: ngie Date: Sat Apr 25 05:08:30 2015 New Revision: 281972 URL: https://svnweb.freebsd.org/changeset/base/281972 Log: MFstable/10 r281968: MFC r280475: The number of commands added when ddb(4) is enabled is 3, not 2 Sponsored by: EMC / Isilon Storage Division Modified: stable/9/share/man/man4/witness.4 Directory Properties: stable/9/ (props changed) stable/9/share/ (props changed) stable/9/share/man/ (props changed) stable/9/share/man/man4/ (props changed) Modified: stable/9/share/man/man4/witness.4 ============================================================================== --- stable/9/share/man/man4/witness.4 Sat Apr 25 05:05:23 2015 (r281971) +++ stable/9/share/man/man4/witness.4 Sat Apr 25 05:08:30 2015 (r281972) @@ -106,7 +106,7 @@ can be set via .Pp The .Nm -code also provides two extra +code also provides three extra .Xr ddb 4 commands if both .Nm From owner-svn-src-stable-9@FreeBSD.ORG Sat Apr 25 06:50:16 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A39E2CAB; Sat, 25 Apr 2015 06:50:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 914C21ACD; Sat, 25 Apr 2015 06:50:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P6oGur015570; Sat, 25 Apr 2015 06:50:16 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P6oGbP015569; Sat, 25 Apr 2015 06:50:16 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201504250650.t3P6oGbP015569@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 25 Apr 2015 06:50:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281977 - stable/9/sys/dev/virtio/block X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 06:50:16 -0000 Author: mav Date: Sat Apr 25 06:50:15 2015 New Revision: 281977 URL: https://svnweb.freebsd.org/changeset/base/281977 Log: MFC r281698: Do not report stripe size if it is equal to sector size. Modified: stable/9/sys/dev/virtio/block/virtio_blk.c Directory Properties: stable/9/ (props changed) stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/virtio/block/virtio_blk.c ============================================================================== --- stable/9/sys/dev/virtio/block/virtio_blk.c Sat Apr 25 06:49:18 2015 (r281976) +++ stable/9/sys/dev/virtio/block/virtio_blk.c Sat Apr 25 06:50:15 2015 (r281977) @@ -728,7 +728,8 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp->d_fwheads = blkcfg->geometry.heads; } - if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY)) { + if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY) && + blkcfg->topology.physical_block_exp > 0) { dp->d_stripesize = dp->d_sectorsize * (1 << blkcfg->topology.physical_block_exp); dp->d_stripeoffset = (dp->d_stripesize - From owner-svn-src-stable-9@FreeBSD.ORG Sat Apr 25 08:09:16 2015 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45C9635C; Sat, 25 Apr 2015 08:09:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33E961233; Sat, 25 Apr 2015 08:09:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t3P89Gnk055673; Sat, 25 Apr 2015 08:09:16 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t3P89Gxt055672; Sat, 25 Apr 2015 08:09:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201504250809.t3P89Gxt055672@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 25 Apr 2015 08:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r281980 - stable/9/sys/kern X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Apr 2015 08:09:16 -0000 Author: kib Date: Sat Apr 25 08:09:15 2015 New Revision: 281980 URL: https://svnweb.freebsd.org/changeset/base/281980 Log: MFC r281696: Initialize td_sel in the thread_init(). PR: 199518 Modified: stable/9/sys/kern/kern_thread.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/kern_thread.c ============================================================================== --- stable/9/sys/kern/kern_thread.c Sat Apr 25 08:06:21 2015 (r281979) +++ stable/9/sys/kern/kern_thread.c Sat Apr 25 08:09:15 2015 (r281980) @@ -212,6 +212,7 @@ thread_init(void *mem, int size, int fla td->td_sched = (struct td_sched *)&td[1]; umtx_thread_init(td); td->td_kstack = 0; + td->td_sel = NULL; return (0); }