From owner-p4-projects@FreeBSD.ORG Sun Nov 12 00:19:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8A55216A4CA; Sun, 12 Nov 2006 00:19:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56DE416A4C8 for ; Sun, 12 Nov 2006 00:19:27 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CA02E43DA7 for ; Sun, 12 Nov 2006 00:18:39 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC0IFlO097772 for ; Sun, 12 Nov 2006 00:18:15 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC0IFSA097769 for perforce@freebsd.org; Sun, 12 Nov 2006 00:18:15 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 00:18:15 GMT Message-Id: <200611120018.kAC0IFSA097769@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109763 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 00:19:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=109763 Change 109763 by sam@sam_ebb on 2006/11/12 00:17:27 Revamp descriptor/buffer handling to try and improve performance and to get second port closer to working: o split per-packet h/w state from s/w state so the s/w state is in cached memory o add array of backpointers to the softc structs for npe_txdone to locate state given an NPE ID o assign separate rx qid's for each NPE; this allows us to avoid switching between softc's on each packet but means we lose interleaving of rx packets; may want to revisit this o correct macro that extracs the NPE ID from the qmgr entry as returned by the NPE o change txdone processing to empty the h/w q and link done buffers together for each device; then post them back to the tx_free list at the very end o eliminate sc_portid; this is no longer important; the NPE ID is the used so we can just reference the value from the npeconfig structure when needed Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#20 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npereg.h#6 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#20 (text+ko) ==== @@ -68,14 +68,23 @@ #include "miibus_if.h" +struct npebuf { + struct npebuf *ix_next; /* chain to next buffer */ + void *ix_m; /* backpointer to mbuf */ + bus_dmamap_t ix_map; /* bus dma map for associated data */ + struct npehwbuf *ix_hw; /* associated h/w block */ + uint32_t ix_neaddr; /* phys address of ix_hw */ +}; + struct npedma { const char* name; int nbuf; /* # npebuf's allocated */ bus_dma_tag_t mtag; /* bus dma tag for mbuf data */ - struct npebuf *buf; /* NPE buffers */ + struct npehwbuf *hwbuf; /* NPE h/w buffers */ bus_dma_tag_t buf_tag; /* tag+map for NPE buffers */ bus_dmamap_t buf_map; bus_addr_t buf_phys; /* phys addr of buffers */ + struct npebuf *buf; /* s/w buffers (1-1 w/ h/w) */ }; struct npe_softc { @@ -88,7 +97,6 @@ device_t sc_mii; /* child miibus */ bus_space_handle_t sc_miih; /* MII register window */ struct ixpnpe_softc *sc_npe; /* NPE support */ - int sc_portid; /* NPE port identification */ int sc_debug; /* DPRINTF* control */ int sc_tickinterval; struct callout tick_ch; /* Tick callout */ @@ -112,6 +120,7 @@ */ static const struct { const char *desc; /* device description */ + int npeid; /* NPE assignment */ int portid; /* NPE Ethernet port */ uint32_t imageid; /* NPE firmware image id */ uint32_t regbase; @@ -122,8 +131,9 @@ uint8_t rx_freeqid; uint8_t tx_qid; uint8_t tx_doneqid; -} npeconfig[] = { +} npeconfig[NPE_PORTS_MAX] = { { .desc = "IXP NPE-B", + .npeid = NPE_B, .portid = 0, .imageid = IXP425_NPE_B_IMAGEID, .regbase = IXP425_MAC_A_HWBASE, @@ -136,18 +146,20 @@ .tx_doneqid = 31 }, { .desc = "IXP NPE-C", + .npeid = NPE_C, .portid = 1, .imageid = IXP425_NPE_C_IMAGEID, .regbase = IXP425_MAC_B_HWBASE, .regsize = IXP425_MAC_B_SIZE, .miibase = IXP425_MAC_A_HWBASE, .miisize = IXP425_MAC_A_SIZE, - .rx_qid = 4, + .rx_qid = 12, .rx_freeqid = 28, .tx_qid = 25, .tx_doneqid = 31 }, }; +static struct npe_softc *npes[NPE_MAX]; /* NB: indexed by npeid */ static __inline uint32_t RD4(struct npe_softc *sc, bus_size_t off) @@ -198,9 +210,8 @@ static int npe_setloopback(struct npe_softc *, int ena); #endif -/* NB: all tx+rx traffic goes through one queue */ +/* NB: all tx done processing goes through one queue */ static int tx_doneqid = -1; -static int rx_qid = -1; SYSCTL_NODE(_hw, OID_AUTO, npe, CTLFLAG_RD, 0, "IXP425 NPE driver parameters"); @@ -231,17 +242,15 @@ static int npe_probe(device_t dev) { -#define N(a) (sizeof(a)/sizeof(a[0])) int unit = device_get_unit(dev); - if (unit >= N(npeconfig)) { + if (unit >= NPE_PORTS_MAX) { device_printf(dev, "unit %d not supported\n", unit); return EINVAL; } /* XXX check feature register to see if enabled */ device_set_desc(dev, npeconfig[unit].desc); return 0; -#undef N } static int @@ -398,6 +407,7 @@ npe_dma_setup(struct npe_softc *sc, struct npedma *dma, const char *name, int nbuf, int maxseg) { + int portid = npeconfig[device_get_unit(sc->sc_dev)].portid; int error, i; memset(dma, 0, sizeof(dma)); @@ -406,8 +416,9 @@ dma->nbuf = nbuf; /* DMA tag for mapped mbufs */ - error = bus_dma_tag_create(NULL, 1, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, MCLBYTES, maxseg, MCLBYTES, 0, + error = bus_dma_tag_create(NULL, 1, 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + MCLBYTES, maxseg, MCLBYTES, 0, busdma_lock_mutex, &sc->sc_mtx, &dma->mtag); if (error != 0) { device_printf(sc->sc_dev, "unable to create %s mbuf dma tag, " @@ -416,11 +427,11 @@ } /* DMA tag and map for the NPE buffers */ - error = bus_dma_tag_create(NULL, sizeof(struct npebuf), 0, + error = bus_dma_tag_create(NULL, sizeof(uint32_t), 0, BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, - nbuf * sizeof(struct npebuf), 1, - nbuf * sizeof(struct npebuf), 0, busdma_lock_mutex, - &sc->sc_mtx, &dma->buf_tag); + nbuf * sizeof(struct npehwbuf), 1, + nbuf * sizeof(struct npehwbuf), 0, + busdma_lock_mutex, &sc->sc_mtx, &dma->buf_tag); if (error != 0) { device_printf(sc->sc_dev, "unable to create %s npebuf dma tag, error %u\n", @@ -428,29 +439,37 @@ return error; } /* XXX COHERENT for now */ - if (bus_dmamem_alloc(dma->buf_tag, (void **)&dma->buf, + if (bus_dmamem_alloc(dma->buf_tag, (void **)&dma->hwbuf, BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &dma->buf_map) != 0) { device_printf(sc->sc_dev, - "unable to allocate memory for %s npebuf's, error %u\n", + "unable to allocate memory for %s h/w buffers, error %u\n", dma->name, error); return error; } + /* XXX M_TEMP */ + dma->buf = malloc(nbuf * sizeof(struct npebuf), M_TEMP, M_NOWAIT | M_ZERO); + if (dma->buf == NULL) { + device_printf(sc->sc_dev, + "unable to allocate memory for %s s/w buffers\n", + dma->name); + return error; + } if (bus_dmamap_load(dma->buf_tag, dma->buf_map, - dma->buf, nbuf * sizeof(struct npebuf), npe_getaddr, sc, 0) != 0) { + dma->hwbuf, nbuf*sizeof(struct npehwbuf), npe_getaddr, sc, 0) != 0) { device_printf(sc->sc_dev, - "unable to load memory for %s npebuf's, error %u\n", + "unable to map memory for %s h/w buffers, error %u\n", dma->name, error); return error; } dma->buf_phys = sc->buf_phys; for (i = 0; i < dma->nbuf; i++) { struct npebuf *npe = &dma->buf[i]; + struct npehwbuf *hw = &dma->hwbuf[i]; /* calculate offset to shared area */ - npe->ix_neaddr = dma->buf_phys - + (i * sizeof(struct npebuf)) - + offsetof(struct npebuf, ix_ne); + npe->ix_neaddr = dma->buf_phys + + ((uintptr_t)hw - (uintptr_t)dma->hwbuf); KASSERT((npe->ix_neaddr & 0x1f) == 0, ("ixpbuf misaligned, PA 0x%x", npe->ix_neaddr)); error = bus_dmamap_create(dma->mtag, BUS_DMA_NOWAIT, @@ -462,7 +481,8 @@ return error; } /* add port id once */ - npe->ix_neaddr |= sc->sc_portid << 3; + npe->ix_neaddr |= portid << 3; + npe->ix_hw = hw; } bus_dmamap_sync(dma->buf_tag, dma->buf_map, BUS_DMASYNC_PREWRITE); return 0; @@ -473,15 +493,17 @@ { int i; - if (dma->buf != NULL) { + if (dma->hwbuf != NULL) { for (i = 0; i < dma->nbuf; i++) { struct npebuf *npe = &dma->buf[i]; bus_dmamap_destroy(dma->mtag, npe->ix_map); } bus_dmamap_unload(dma->buf_tag, dma->buf_map); - bus_dmamem_free(dma->buf_tag, dma->buf, dma->buf_map); + bus_dmamem_free(dma->buf_tag, dma->hwbuf, dma->buf_map); bus_dmamap_destroy(dma->buf_tag, dma->buf_map); } + if (dma->buf != NULL) + free(dma->buf, M_TEMP); if (dma->buf_tag) bus_dma_tag_destroy(dma->buf_tag); if (dma->mtag) @@ -496,12 +518,12 @@ int unit = device_get_unit(dev); int error, i; + /* load NPE firmware and start it running */ error = ixpnpe_init(sc->sc_npe, "npe_fw", npeconfig[unit].imageid); if (error != 0) return error; - sc->sc_portid = npeconfig[unit].portid; if (bus_space_map(sc->sc_iot, npeconfig[unit].regbase, npeconfig[unit].regsize, 0, &sc->sc_ioh)) { device_printf(dev, "Cannot map registers 0x%x:0x%x\n", @@ -532,9 +554,9 @@ return error; /* setup statistics block */ - error = bus_dma_tag_create(NULL, 4, 0, BUS_SPACE_MAXADDR_32BIT, - BUS_SPACE_MAXADDR, NULL, NULL, sizeof(struct npestats), 1, - sizeof(struct npestats), 0, + error = bus_dma_tag_create(NULL, sizeof(uint32_t), 0, + BUS_SPACE_MAXADDR_32BIT, BUS_SPACE_MAXADDR, NULL, NULL, + sizeof(struct npestats), 1, sizeof(struct npestats), 0, busdma_lock_mutex, &sc->sc_mtx, &sc->sc_stats_tag); if (error != 0) { device_printf(sc->sc_dev, "unable to create stats tag, " @@ -576,12 +598,9 @@ * changed at the time the q is configured. */ sc->rx_qid = npeconfig[unit].rx_qid; + ixpqmgr_qconfig(sc->rx_qid, npe_rxbuf, 0, 1, + IX_QMGR_Q_SOURCE_ID_NOT_E, npe_rxdone, sc); sc->rx_freeqid = npeconfig[unit].rx_freeqid; - if (rx_qid == -1) { - ixpqmgr_qconfig(sc->rx_qid, npe_rxbuf, 0, 1, - IX_QMGR_Q_SOURCE_ID_NOT_E, npe_rxdone, sc); - rx_qid = sc->rx_qid; - } ixpqmgr_qconfig(sc->rx_freeqid, npe_rxbuf, 0, npe_rxbuf/2, 0, NULL, sc); /* tell the NPE to direct all traffic to rx_qid */ #if 0 @@ -601,6 +620,10 @@ tx_doneqid = sc->tx_doneqid; } + KASSERT(npes[npeconfig[unit].npeid] == NULL, + ("npe %u already setup", npeconfig[unit].npeid)); + npes[npeconfig[unit].npeid] = sc; + return 0; } @@ -608,7 +631,10 @@ npe_deactivate(device_t dev) { struct npe_softc *sc = device_get_softc(dev); + int unit = device_get_unit(dev); + npes[npeconfig[unit].npeid] = NULL; + /* XXX disable q's */ if (sc->sc_npe != NULL) ixpnpe_stop(sc->sc_npe); @@ -756,43 +782,73 @@ eaddr[5] = RD4(sc, NPE_MAC_UNI_ADDR_6) & 0xff; } +struct txdone { + struct npebuf *head; + struct npebuf **tail; + int count; +}; + +static __inline void +npe_txdone_finish(struct npe_softc *sc, const struct txdone *td) +{ + struct ifnet *ifp = sc->sc_ifp; + + NPE_LOCK(sc); + *td->tail = sc->tx_free; + sc->tx_free = td->head; + /* + * We're no longer busy, so clear the busy flag and call the + * start routine to xmit more packets. + */ + ifp->if_opackets += td->count; + ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; + ifp->if_timer = 0; + npestart_locked(ifp); + NPE_UNLOCK(sc); +} + /* * Q manager callback on tx done queue. Reap mbufs * and return tx buffers to the free list. Finally - * restart output. - * XXX multiple NPE's + * restart output. Note the microcode has only one + * txdone q wired into it so we must use the port id + * returned with each npebuf to decide where to send + * buffers. */ static void npe_txdone(int qid, void *arg) { -/* NB: the / handles the offset to ix_ne */ -#define P2V(a) &dma->buf[((a) - dma->buf_phys) / sizeof(struct npebuf)] - struct npe_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; - struct npedma *dma = &sc->txdma; +#define P2V(a, dma) \ + &(dma)->buf[((a) - (dma)->buf_phys) / sizeof(struct npehwbuf)] + struct npe_softc *sc0 = arg; + struct npe_softc *sc; + struct npebuf *npe; + struct txdone *td, q[NPE_MAX]; uint32_t entry; - NPE_LOCK(sc); + /* XXX no NPE-A support */ + q[NPE_B].tail = &q[NPE_B].head; q[NPE_B].count = 0; + q[NPE_C].tail = &q[NPE_C].head; q[NPE_C].count = 0; /* XXX max # at a time? */ while (ixpqmgr_qread(qid, &entry) == 0) { - struct npebuf *npe = P2V(NPE_QM_Q_ADDR(entry)); + DPRINTF(sc0, "%s: entry 0x%x NPE %u port %u\n", + __func__, entry, NPE_QM_Q_NPE(entry), NPE_QM_Q_PORT(entry)); - DPRINTF(sc, "%s: entry 0x%x ne_addr 0x%x\n", - __func__, entry, npe->ix_neaddr); + sc = npes[NPE_QM_Q_NPE(entry)]; + npe = P2V(NPE_QM_Q_ADDR(entry), &sc->txdma); m_freem(npe->ix_m); npe->ix_m = NULL; - npe->ix_next = sc->tx_free; - sc->tx_free = npe; - ifp->if_opackets++; + + td = &q[NPE_QM_Q_NPE(entry)]; + *td->tail = npe; + td->tail = &npe->ix_next; + td->count++; } - /* - * We're no longer busy, so clear the busy flag and call the - * start routine to xmit more packets. - */ - ifp->if_drv_flags &= ~IFF_DRV_OACTIVE; - ifp->if_timer = 0; - npestart_locked(ifp); - NPE_UNLOCK(sc); + + if (q[NPE_B].count) + npe_txdone_finish(npes[NPE_B], &q[NPE_B]); + if (q[NPE_C].count) + npe_txdone_finish(npes[NPE_C], &q[NPE_C]); #undef P2V } @@ -801,6 +857,7 @@ { bus_dma_segment_t segs[1]; struct npedma *dma = &sc->rxdma; + struct npehwbuf *hw; int error, nseg; if (m == NULL) { @@ -819,11 +876,12 @@ m_freem(m); return error; } - npe->ix_ne[0].data = htobe32(segs[0].ds_addr); + hw = npe->ix_hw; + hw->ix_ne[0].data = htobe32(segs[0].ds_addr); /* NB: NPE requires length be a multiple of 64 */ /* NB: buffer length is shifted in word */ - npe->ix_ne[0].len = htobe32(segs[0].ds_len << 16); - npe->ix_ne[0].next = 0; + hw->ix_ne[0].len = htobe32(segs[0].ds_len << 16); + hw->ix_ne[0].next = 0; npe->ix_m = m; /* Flush the memory in the mbuf */ bus_dmamap_sync(dma->mtag, npe->ix_map, BUS_DMASYNC_PREREAD); @@ -831,26 +889,25 @@ } /* - * Q manager callback on rx. Claim entries from the - * hardware queue and pass the frames up the stack. - * Pass the rx buffers to the free list. + * RX q processing for a specific NPE. Claim entries + * from the hardware queue and pass the frames up the + * stack. Pass the rx buffers to the free list. */ static void npe_rxdone(int qid, void *arg) { -#define P2V(a) &dma->buf[((a) - dma->buf_phys) / sizeof(struct npebuf)] +#define P2V(a, dma) \ + &(dma)->buf[((a) - (dma)->buf_phys) / sizeof(struct npehwbuf)] struct npe_softc *sc = arg; - struct ifnet *ifp = sc->sc_ifp; struct npedma *dma = &sc->rxdma; uint32_t entry; - bus_dmamap_sync(dma->buf_tag, dma->buf_map, BUS_DMASYNC_POSTREAD); while (ixpqmgr_qread(qid, &entry) == 0) { - struct npebuf *npe = P2V(NPE_QM_Q_ADDR(entry)); + struct npebuf *npe = P2V(NPE_QM_Q_ADDR(entry), dma); struct mbuf *m; DPRINTF(sc, "%s: entry 0x%x neaddr 0x%x ne_len 0x%x\n", - __func__, entry, npe->ix_neaddr, npe->ix_ne[0].len); + __func__, entry, npe->ix_neaddr, npe->ix_hw->ix_ne[0].len); /* * Allocate a new mbuf to replenish the rx buffer. * If doing so fails we drop the rx'd frame so we @@ -862,13 +919,16 @@ m = m_getcl(M_DONTWAIT, MT_DATA, M_PKTHDR); if (m != NULL) { struct mbuf *mrx = npe->ix_m; + struct npehwbuf *hw = npe->ix_hw; + struct ifnet *ifp = sc->sc_ifp; /* Flush mbuf memory for rx'd data */ bus_dmamap_sync(dma->mtag, npe->ix_map, BUS_DMASYNC_POSTREAD); + /* XXX flush hw buffer; works now 'cuz coherent */ /* set m_len etc. per rx frame size */ - mrx->m_len = be32toh(npe->ix_ne[0].len) & 0xffff; + mrx->m_len = be32toh(hw->ix_ne[0].len) & 0xffff; mrx->m_pkthdr.len = mrx->m_len; mrx->m_pkthdr.rcvif = ifp; mrx->m_flags |= M_HASFCS; @@ -1100,6 +1160,7 @@ { struct npe_softc *sc = ifp->if_softc; struct npebuf *npe; + struct npehwbuf *hw; struct mbuf *m, *n; struct npedma *dma = &sc->txdma; bus_dma_segment_t segs[NPE_MAXSEG]; @@ -1149,22 +1210,23 @@ BPF_MTAP(ifp, m); npe->ix_m = m; + hw = npe->ix_hw; len = m->m_pkthdr.len; - next = npe->ix_neaddr + sizeof(npe->ix_ne[0]); + next = npe->ix_neaddr + sizeof(hw->ix_ne[0]); for (i = 0; i < nseg; i++) { - npe->ix_ne[i].data = htobe32(segs[i].ds_addr); - npe->ix_ne[i].len = htobe32((segs[i].ds_len<<16) | len); - npe->ix_ne[i].next = htobe32(next); + hw->ix_ne[i].data = htobe32(segs[i].ds_addr); + hw->ix_ne[i].len = htobe32((segs[i].ds_len<<16) | len); + hw->ix_ne[i].next = htobe32(next); len = 0; /* zero for segments > 1 */ - next += sizeof(npe->ix_ne[0]); + next += sizeof(hw->ix_ne[0]); } - npe->ix_ne[i-1].next = 0; /* zero last in chain */ + hw->ix_ne[i-1].next = 0; /* zero last in chain */ /* XXX flush descriptor instead of using uncached memory */ DPRINTF(sc, "%s: qwrite(%u, 0x%x) ne_data %x ne_len 0x%x\n", __func__, sc->tx_qid, npe->ix_neaddr, - npe->ix_ne[0].data, npe->ix_ne[0].len); + hw->ix_ne[0].data, hw->ix_ne[0].len); /* stick it on the tx q */ /* XXX add vlan priority */ ixpqmgr_qwrite(sc->tx_qid, npe->ix_neaddr); @@ -1320,9 +1382,10 @@ static int npe_setrxqosentry(struct npe_softc *sc, int classix, int trafclass, int qid) { + int portid = npeconfig[device_get_unit(sc->sc_dev)].portid; uint32_t msg[2]; - msg[0] = (NPE_SETRXQOSENTRY << 24) | (sc->sc_portid << 16) | classix; + msg[0] = (NPE_SETRXQOSENTRY << 24) | (portid << 16) | classix; msg[1] = (trafclass << 24) | (1 << 23) | (qid << 16) | (qid << 4); return ixpnpe_sendandrecvmsg(sc->sc_npe, msg, msg); } ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npereg.h#6 (text+ko) ==== @@ -73,12 +73,7 @@ */ #define NPE_MAXSEG 3 /* empirically selected */ -struct npebuf { - struct npebuf *ix_next; /* chain to next buffer */ - void *ix_m; /* backpointer to mbuf */ - uint32_t ix_neaddr; /* phys address of ix_ne */ - bus_dmamap_t ix_map; /* bus dma map for associated data */ - uint32_t ix_reserved[4]; +struct npehwbuf { struct { /* NPE shared area, cacheline aligned */ uint32_t next; /* phys addr of next segment */ uint32_t len; /* buffer/segment length (bytes) */ @@ -87,7 +82,13 @@ } ix_ne[NPE_MAXSEG]; }; -#define NPE_PORTS_MAX 3 +/* NPE ID's */ +#define NPE_A 0 +#define NPE_B 1 +#define NPE_C 2 +#define NPE_MAX (NPE_C+1) + +#define NPE_PORTS_MAX 2 /* logical ports */ #define NPE_FRAME_SIZE_DEFAULT 1536 #define NPE_FRAME_SIZE_MAX (65536-64) #define NPE_FRAME_SIZE_MIN 64 @@ -98,7 +99,7 @@ * These define the layout of 32-bit Q entries passed * between the host cpu and the NPE's. */ -#define NPE_QM_Q_NPE(e) (((e)>>0)&0x1) /* NPE ID */ +#define NPE_QM_Q_NPE(e) (((e)>>0)&0x3) /* NPE ID */ #define NPE_QM_Q_PORT(e) (((e)>>3)&0x1) /* Port ID */ #define NPE_QM_Q_PRIO(e) (((e)>>0)&0x3) /* 802.1d priority */ #define NPE_QM_Q_ADDR(e) ((e)&0xfffffffe0) /* phys address */ From owner-p4-projects@FreeBSD.ORG Sun Nov 12 03:26:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B3B9516A417; Sun, 12 Nov 2006 03:26:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7362716A415 for ; Sun, 12 Nov 2006 03:26:18 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 49C3743D53 for ; Sun, 12 Nov 2006 03:26:18 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC3QImo039728 for ; Sun, 12 Nov 2006 03:26:18 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC3QIZN039725 for perforce@freebsd.org; Sun, 12 Nov 2006 03:26:18 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 03:26:18 GMT Message-Id: <200611120326.kAC3QIZN039725@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109768 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 03:26:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=109768 Change 109768 by sam@sam_ebb on 2006/11/12 03:25:33 device polling; not quite right due to shared tx done q; also stopped right now by 100hz clock Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#21 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#21 (text+ko) ==== @@ -25,6 +25,10 @@ #include __FBSDID("$FreeBSD$"); +#ifdef HAVE_KERNEL_OPTION_HEADERS +#include "opt_device_polling.h" +#endif + #include #include #include @@ -299,13 +303,16 @@ ifp->if_ioctl = npeioctl; ifp->if_watchdog = npewatchdog; ifp->if_init = npeinit; - IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + IFQ_SET_MAXLEN(&ifp->if_snd, sc->txdma.nbuf - 1); ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; IFQ_SET_READY(&ifp->if_snd); ifp->if_timer = 0; ifp->if_linkmib = &sc->mibdata; ifp->if_linkmiblen = sizeof(sc->mibdata); sc->mibdata.dot3Compliance = DOT3COMPLIANCE_STATS; +#ifdef DEVICE_POLLING + ifp->if_capabilities |= IFCAP_POLLING; +#endif SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, 0, "control debugging printfs"); @@ -327,6 +334,10 @@ struct npe_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->sc_ifp; +#ifdef DEVICE_POLLING + if (ifp->if_capenable & IFCAP_POLLING) + ether_poll_deregister(ifp); +#endif npestop(sc); if (ifp != NULL) { ether_ifdetach(ifp); @@ -949,6 +960,19 @@ #undef P2V } +#ifdef DEVICE_POLLING +static void +npe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) +{ + struct npe_softc *sc = ifp->if_softc; + + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + npe_rxdone(sc->rx_qid, sc); + npe_txdone(sc->tx_doneqid, sc); /* XXX polls both NPE's */ + } +} +#endif /* DEVICE_POLLING */ + static void npe_startxmit(struct npe_softc *sc) { @@ -1340,6 +1364,9 @@ struct mii_data *mii; struct ifreq *ifr = (struct ifreq *)data; int error = 0; +#ifdef DEVICE_POLLING + int mask; +#endif switch (cmd) { case SIOCSIFFLAGS: @@ -1369,6 +1396,36 @@ mii = device_get_softc(sc->sc_mii); error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, cmd); break; + +#ifdef DEVICE_POLLING + case SIOCSIFCAP: + mask = ifp->if_capenable ^ ifr->ifr_reqcap; + if (mask & IFCAP_POLLING) { + if (ifr->ifr_reqcap & IFCAP_POLLING) { + error = ether_poll_register(npe_poll, ifp); + if (error) + return error; + NPE_LOCK(sc); + /* disable callbacks XXX txdone is shared */ + ixpqmgr_notify_disable(sc->rx_qid); + ixpqmgr_notify_disable(sc->tx_doneqid); + ifp->if_capenable |= IFCAP_POLLING; + NPE_UNLOCK(sc); + } else { + error = ether_poll_deregister(ifp); + /* NB: always enable qmgr callbacks */ + NPE_LOCK(sc); + /* enable qmgr callbacks */ + ixpqmgr_notify_enable(sc->rx_qid, + IX_QMGR_Q_SOURCE_ID_NOT_E); + ixpqmgr_notify_enable(sc->tx_doneqid, + IX_QMGR_Q_SOURCE_ID_NOT_E); + ifp->if_capenable &= ~IFCAP_POLLING; + NPE_UNLOCK(sc); + } + } + break; +#endif default: error = ether_ioctl(ifp, cmd, data); break; From owner-p4-projects@FreeBSD.ORG Sun Nov 12 06:17:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6102816A412; Sun, 12 Nov 2006 06:17:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1501516A407 for ; Sun, 12 Nov 2006 06:17:00 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E66BC43D53 for ; Sun, 12 Nov 2006 06:16:59 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC6GxJH098558 for ; Sun, 12 Nov 2006 06:16:59 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC6GxCT098548 for perforce@freebsd.org; Sun, 12 Nov 2006 06:16:59 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 06:16:59 GMT Message-Id: <200611120616.kAC6GxCT098548@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109772 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 06:17:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=109772 Change 109772 by imp@imp_lighthouse on 2006/11/12 06:16:26 Nits. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#12 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#12 (text+ko) ==== @@ -1,19 +1,19 @@ # $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.1 2006/04/19 17:16:48 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 ${.CURDIR}/../bootspi P=boot2 FILES=${P} SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c +.if ${BOOT_FLAVOR} == "TSC" +SRCS+=ee.c +.endif NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include -.if ${BOOT_FLAVOR} == "TSC" -SRCS+=ee.c -.endif .if ${BOOT_FLAVOR} == "KB920X" CFLAGS+=-DBOOT_IIC .endif From owner-p4-projects@FreeBSD.ORG Sun Nov 12 06:17:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BDE9316A563; Sun, 12 Nov 2006 06:17:01 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C14916A55A for ; Sun, 12 Nov 2006 06:17:00 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 467EF43D53 for ; Sun, 12 Nov 2006 06:17:00 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC6H0ln098566 for ; Sun, 12 Nov 2006 06:17:00 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC6Gxu1098562 for perforce@freebsd.org; Sun, 12 Nov 2006 06:16:59 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 06:16:59 GMT Message-Id: <200611120616.kAC6Gxu1098562@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109773 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 06:17:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=109773 Change 109773 by imp@imp_lighthouse on 2006/11/12 06:16:40 Compile. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/tsc_board.c#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/tsc_board.c#4 (text+ko) ==== @@ -6,6 +6,7 @@ #include "emac.h" #include "lib.h" #include "ee.h" +#include "board.h" extern unsigned char mac[]; @@ -30,7 +31,7 @@ AT91C_BASE_PIOC, AT91C_PIO_PC12 }; -void +static void fpga_load(void) { int len, off, i, offset; @@ -118,3 +119,5 @@ EEInit(); MacFromEE(); } + +#include "../bootspi/ee.c" From owner-p4-projects@FreeBSD.ORG Sun Nov 12 06:18:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF26016A47C; Sun, 12 Nov 2006 06:18:02 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8F8C16A407 for ; Sun, 12 Nov 2006 06:18:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3456643D5A for ; Sun, 12 Nov 2006 06:18:02 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC6I2kZ098643 for ; Sun, 12 Nov 2006 06:18:02 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC6I1Gi098640 for perforce@freebsd.org; Sun, 12 Nov 2006 06:18:01 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 06:18:01 GMT Message-Id: <200611120618.kAC6I1Gi098640@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109774 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 06:18:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=109774 Change 109774 by imp@imp_lighthouse on 2006/11/12 06:17:30 This really should be gone. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#13 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#13 (text+ko) ==== @@ -5,9 +5,6 @@ P=boot2 FILES=${P} SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c -.if ${BOOT_FLAVOR} == "TSC" -SRCS+=ee.c -.endif NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} From owner-p4-projects@FreeBSD.ORG Sun Nov 12 06:48:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DD8A116A416; Sun, 12 Nov 2006 06:48:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 799C716A403 for ; Sun, 12 Nov 2006 06:48:46 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBF6B43D72 for ; Sun, 12 Nov 2006 06:48:42 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC6mgcE004048 for ; Sun, 12 Nov 2006 06:48:42 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC6mgUp004045 for perforce@freebsd.org; Sun, 12 Nov 2006 06:48:42 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 06:48:42 GMT Message-Id: <200611120648.kAC6mgUp004045@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109776 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 06:48:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=109776 Change 109776 by sam@sam_ebb on 2006/11/12 06:48:01 Mostly working; channel attachs, interrupts work, and we fetch params but no drive yet: o add a private reset method that's a copy of ata_generic_reset but interprets reset complete w/o an error as being ok o remap registers per the linux driver o add missing bus space methods for the stream versions of read-multiple and write-multiple o mark channels 16-bit only and no slave (probably doesn't matter w/ private reset method but there'll never be slaves) o remove debug printfs we don't need any more Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#7 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#7 (text+ko) ==== @@ -122,7 +122,9 @@ sc->sc_expbus_tag.bs_r_2 = ata_bs_r_2, /* read multiple */ sc->sc_expbus_tag.bs_rm_1 = ata_bs_rm_1, + sc->sc_expbus_tag.bs_rm_1_s = ata_bs_rm_1, sc->sc_expbus_tag.bs_rm_2 = ata_bs_rm_2, + sc->sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2, /* write (single) */ sc->sc_expbus_tag.bs_w_1_s = ata_bs_w_1, sc->sc_expbus_tag.bs_w_2_s = ata_bs_w_2, @@ -130,7 +132,9 @@ sc->sc_expbus_tag.bs_w_2 = ata_bs_w_2, /* write multiple */ sc->sc_expbus_tag.bs_wm_1 = ata_bs_wm_1, + sc->sc_expbus_tag.bs_wm_1_s = ata_bs_wm_1, sc->sc_expbus_tag.bs_wm_2 = ata_bs_wm_2, + sc->sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2, rman_set_bustag(&sc->sc_ata, &sc->sc_expbus_tag); rman_set_bushandle(&sc->sc_ata, sc->sc_ioh); @@ -274,13 +278,7 @@ { struct ata_avila_softc *sc = t; -#if 0 return bus_space_read_1(sc->sc_iot, h, o); -#else -uint8_t v = bus_space_read_1(sc->sc_iot, h, o); -printf("%s(%lx, %ld) => 0x%x\n", __func__, h, o, v); -return v; -#endif } void @@ -288,7 +286,6 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %ld, 0x%x)\n", __func__, h, o, v); bus_space_write_1(sc->sc_iot, h, o, v); } @@ -298,7 +295,6 @@ struct ata_avila_softc *sc = t; uint16_t v; -printf("%s(%lx, %lu)\n", __func__, h, o); enable_16(sc); v = bus_space_read_2(sc->sc_iot, h, o); disable_16(sc); @@ -310,7 +306,6 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %lu, 0x%x)\n", __func__, h, o, v); enable_16(sc); bus_space_write_2(sc->sc_iot, h, o, v); disable_16(sc); @@ -322,7 +317,6 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %lu, %p, %lu)\n", __func__, h, o, d, c); bus_space_read_multi_1(sc->sc_iot, h, o, d, c); } @@ -332,7 +326,6 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %lu, %p, %lu)\n", __func__, h, o, d, c); bus_space_write_multi_1(sc->sc_iot, h, o, d, c); } @@ -342,7 +335,6 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %lu, %p, %lu)\n", __func__, h, o, d, c); enable_16(sc); bus_space_read_multi_2(sc->sc_iot, h, o, d, c); disable_16(sc); @@ -354,7 +346,6 @@ { struct ata_avila_softc *sc = t; -printf("%s(%lx, %lu, %p, %lu)\n", __func__, h, o, d, c); enable_16(sc); bus_space_write_multi_2(sc->sc_iot, h, o, d, c); disable_16(sc); @@ -398,6 +389,7 @@ struct ata_channel *ch = device_get_softc(dev); ch->unit = 0; + ch->flags |= ATA_USE_16BIT | ATA_NO_SLAVE; device_set_desc_copy(dev, "ATA channel 0"); return ata_probe(dev); @@ -410,27 +402,116 @@ struct ata_channel *ch = device_get_softc(dev); int i; - /* registers up to ATA_STATUS map directly */ - for (i = ATA_DATA; i <= ATA_STATUS; i++) { + for (i = 0; i < ATA_MAX_RES; i++) ch->r_io[i].res = &sc->sc_ata; - ch->r_io[i].offset = i; - } - /* the control register is special */ - ch->r_io[ATA_CONTROL].res = &sc->sc_ata; + + ch->r_io[ATA_DATA].offset = ATA_DATA; + ch->r_io[ATA_FEATURE].offset = ATA_FEATURE; + ch->r_io[ATA_COUNT].offset = ATA_COUNT; + ch->r_io[ATA_SECTOR].offset = ATA_SECTOR; + ch->r_io[ATA_CYL_LSB].offset = ATA_CYL_LSB; + ch->r_io[ATA_CYL_MSB].offset = ATA_CYL_MSB; + ch->r_io[ATA_DRIVE].offset = ATA_DRIVE; + ch->r_io[ATA_COMMAND].offset = ATA_COMMAND; + ch->r_io[ATA_ERROR].offset = ATA_FEATURE; + /* NB: should be used only for ATAPI devices */ + ch->r_io[ATA_IREASON].offset = ATA_COUNT; + ch->r_io[ATA_STATUS].offset = ATA_COMMAND; + /* alias this; required by ata_generic_status */ + ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_STATUS].offset; + + /* NB: the control register is special */ ch->r_io[ATA_CONTROL].offset = AVILA_IDE_CTRL; + /* NB: by convention this points at the base of registers */ - ch->r_io[ATA_IDX_ADDR].res = &sc->sc_ata; ch->r_io[ATA_IDX_ADDR].offset = 0; - /* NB: should be used only for ATAPI devices */ - ch->r_io[ATA_IREASON] = ch->r_io[ATA_COUNT]; - /* alias this; required by ata_generic_status */ - ch->r_io[ATA_ALTSTAT] = ch->r_io[ATA_CONTROL]; - ata_generic_hw(dev); return ata_attach(dev); } +/* XXX override ata_generic_reset to handle non-standard status */ +static void +avila_channel_reset(device_t dev) +{ + struct ata_channel *ch = device_get_softc(dev); + u_int8_t ostat0 = 0, stat0 = 0; + u_int8_t err = 0, lsb = 0, msb = 0; + int mask = 0, timeout; + + /* do we have any signs of ATA/ATAPI HW being present ? */ + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_MASTER); + DELAY(10); + ostat0 = ATA_IDX_INB(ch, ATA_STATUS); + if ((ostat0 & 0xf8) != 0xf8 && ostat0 != 0xa5) { + stat0 = ATA_S_BUSY; + mask |= 0x01; + } + + if (bootverbose) + device_printf(dev, "%s: reset tp1 mask=%02x ostat0=%02x\n", + __func__, mask, ostat0); + + /* if nothing showed up there is no need to get any further */ + /* XXX SOS is that too strong?, we just might loose devices here */ + ch->devices = 0; + if (!mask) + return; + + /* reset (both) devices on this channel */ + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_D_LBA | ATA_MASTER); + DELAY(10); + ATA_IDX_OUTB(ch, ATA_CONTROL, ATA_A_IDS | ATA_A_RESET); + ata_udelay(10000); + ATA_IDX_OUTB(ch, ATA_CONTROL, ATA_A_IDS); + ata_udelay(100000); + ATA_IDX_INB(ch, ATA_ERROR); + + /* wait for BUSY to go inactive */ + for (timeout = 0; timeout < 310; timeout++) { + if ((mask & 0x01) && (stat0 & ATA_S_BUSY)) { + ATA_IDX_OUTB(ch, ATA_DRIVE, ATA_D_IBM | ATA_MASTER); + DELAY(10); + err = ATA_IDX_INB(ch, ATA_ERROR); + lsb = ATA_IDX_INB(ch, ATA_CYL_LSB); + msb = ATA_IDX_INB(ch, ATA_CYL_MSB); + stat0 = ATA_IDX_INB(ch, ATA_STATUS); + if (bootverbose) + device_printf(dev, + "%s: stat0=0x%02x err=0x%02x lsb=0x%02x " + "msb=0x%02x\n", __func__, + stat0, err, lsb, msb); + if (stat0 == err && lsb == err && msb == err && + timeout > (stat0 & ATA_S_BUSY ? 100 : 10)) + mask &= ~0x01; + if (!(stat0 & ATA_S_BUSY)) { + if ((err & 0x7f) == ATA_E_ILI || err == 0) { + if (lsb == ATAPI_MAGIC_LSB && + msb == ATAPI_MAGIC_MSB) { + ch->devices |= ATA_ATAPI_MASTER; + } else if (stat0 & ATA_S_READY) { + ch->devices |= ATA_ATA_MASTER; + } + } else if ((stat0 & 0x0f) && + err == lsb && err == msb) { + stat0 |= ATA_S_BUSY; + } + } + } + if (mask == 0x00) /* nothing to wait for */ + break; + /* wait for master */ + if (!(stat0 & ATA_S_BUSY) || (stat0 == 0xff && timeout > 10)) + break; + ata_udelay(100000); + } + + if (bootverbose) + device_printf(dev, "%s: reset tp2 stat0=%02x devices=0x%b\n", + __func__, stat0, ch->devices, + "\20\4ATAPI_SLAVE\3ATAPI_MASTER\2ATA_SLAVE\1ATA_MASTER"); +} + static device_method_t avila_channel_methods[] = { /* device interface */ DEVMETHOD(device_probe, avila_channel_probe), @@ -440,6 +521,8 @@ DEVMETHOD(device_suspend, ata_suspend), DEVMETHOD(device_resume, ata_resume), + DEVMETHOD(ata_reset, avila_channel_reset), + { 0, 0 } }; From owner-p4-projects@FreeBSD.ORG Sun Nov 12 07:09:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9AD7F16A416; Sun, 12 Nov 2006 07:09:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5D8F616A403; Sun, 12 Nov 2006 07:09:27 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1F3543D53; Sun, 12 Nov 2006 07:09:26 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.13.4/8.13.4) with ESMTP id kAC76I2p066225; Sun, 12 Nov 2006 00:06:18 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 12 Nov 2006 00:06:53 -0700 (MST) Message-Id: <20061112.000653.-1303463784.imp@bsdimp.com> To: andre@freebsd.org From: "M. Warner Losh" In-Reply-To: <200611101935.kAAJZmWW099731@repoman.freebsd.org> References: <200611101935.kAAJZmWW099731@repoman.freebsd.org> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sun, 12 Nov 2006 00:06:19 -0700 (MST) Cc: perforce@freebsd.org Subject: Re: PERFORCE change 109699 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 07:09:27 -0000 In message: <200611101935.kAAJZmWW099731@repoman.freebsd.org> Andre Oppermann writes: : http://perforce.freebsd.org/chv.cgi?CH=109699 : : Change 109699 by andre@andre_flirtbox on 2006/11/10 19:35:44 : : Increase EEPROMSIZE to 16384 as the boot2 loader is slighly larger than : 8192 bytes. : Get the printing of EEPROMSIZE right. This change is wrong. The largest loader you can have is 12kb, not 16kb. Warner : Affected files ... : : .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#9 edit : : Differences ... : : ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#9 (text) ==== : : @@ -28,7 +28,7 @@ : #include "lib.h" : #include "at91rm9200_lowlevel.h" : : -#define EEPROMSIZE 8192 /* Bytes to be written to EEPROM */ : +#define EEPROMSIZE 16384 /* Bytes to be written to EEPROM */ : : int : main(void) : @@ -36,12 +36,12 @@ : char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ : : printf("\r\nSend data to be written into EEPROM at addr 0 " : - "(EEPROMSIZE bytes)\r\n"); : + "(0x%x bytes)\r\n", EEPROMSIZE); : : while (xmodem_rx(addr) == -1) : continue; : InitEEPROM(); : - printf("\r\nWriting EEPROM from 0x%x to addr 0, EEPROMSIZE bytes\r\n", addr); : + printf("\r\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\r\n", addr, EEPROMSIZE); : WriteEEPROM(0, addr, EEPROMSIZE); : printf("\r\nWrite complete. Press reset\r\n"); : return (1); : From owner-p4-projects@FreeBSD.ORG Sun Nov 12 07:10:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0B54216A412; Sun, 12 Nov 2006 07:10:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7D8416A47E for ; Sun, 12 Nov 2006 07:10:23 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0A24843D62 for ; Sun, 12 Nov 2006 07:10:11 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC7AA5v008474 for ; Sun, 12 Nov 2006 07:10:10 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC7AAs1008471 for perforce@freebsd.org; Sun, 12 Nov 2006 07:10:10 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 07:10:10 GMT Message-Id: <200611120710.kAC7AAs1008471@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109777 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 07:10:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=109777 Change 109777 by imp@imp_lighthouse on 2006/11/12 07:09:36 12k is the largest eeprom image we support.... Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#10 (text) ==== @@ -28,7 +28,7 @@ #include "lib.h" #include "at91rm9200_lowlevel.h" -#define EEPROMSIZE 16384 /* Bytes to be written to EEPROM */ +#define EEPROMSIZE 12*1024 /* Bytes to be written to EEPROM */ int main(void) From owner-p4-projects@FreeBSD.ORG Sun Nov 12 07:15:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EF99716A412; Sun, 12 Nov 2006 07:15:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C9BA16A407 for ; Sun, 12 Nov 2006 07:15:18 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 72A7743D97 for ; Sun, 12 Nov 2006 07:15:18 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC7FIfC009908 for ; Sun, 12 Nov 2006 07:15:18 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC7FIb3009905 for perforce@freebsd.org; Sun, 12 Nov 2006 07:15:18 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 07:15:18 GMT Message-Id: <200611120715.kAC7FIb3009905@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109778 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 07:15:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=109778 Change 109778 by imp@imp_lighthouse on 2006/11/12 07:14:19 On second thought, the eeprom size is really irrelevant, and we shouldn't dictate it. Instead, use the return value from xmodem_rx to calculate the number of bytes to burn. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#11 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#11 (text) ==== @@ -28,21 +28,19 @@ #include "lib.h" #include "at91rm9200_lowlevel.h" -#define EEPROMSIZE 12*1024 /* Bytes to be written to EEPROM */ - int main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + int len; - printf("\r\nSend data to be written into EEPROM at addr 0 " - "(0x%x bytes)\r\n", EEPROMSIZE); - - while (xmodem_rx(addr) == -1) + printf("\nSend data to be written into EEPROM\n"); + while ((len = xmodem_rx(addr)) == -1) continue; InitEEPROM(); - printf("\r\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\r\n", addr, EEPROMSIZE); - WriteEEPROM(0, addr, EEPROMSIZE); - printf("\r\nWrite complete. Press reset\r\n"); + printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, + len); + WriteEEPROM(0, addr, len); + printf("\nWrite complete. Press reset\n"); return (1); } From owner-p4-projects@FreeBSD.ORG Sun Nov 12 07:35:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 333FE16A412; Sun, 12 Nov 2006 07:35:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B434316A403 for ; Sun, 12 Nov 2006 07:35:45 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 721B643D4C for ; Sun, 12 Nov 2006 07:35:45 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC7Zjox013144 for ; Sun, 12 Nov 2006 07:35:45 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC7ZjB8013141 for perforce@freebsd.org; Sun, 12 Nov 2006 07:35:45 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 07:35:45 GMT Message-Id: <200611120735.kAC7ZjB8013141@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109781 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 07:35:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=109781 Change 109781 by imp@imp_lighthouse on 2006/11/12 07:34:55 don't need/want ee.h Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#27 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/boot2.c#27 (text+ko) ==== @@ -29,7 +29,6 @@ #include "emac.h" #include "lib.h" #include "sd-card.h" -#include "ee.h" #include "board.h" #define RBX_ASKNAME 0x0 /* -a */ From owner-p4-projects@FreeBSD.ORG Sun Nov 12 07:49:03 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 362FA16A417; Sun, 12 Nov 2006 07:49:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ED65716A407 for ; Sun, 12 Nov 2006 07:49:02 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8801043D66 for ; Sun, 12 Nov 2006 07:49:02 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAC7n2If014868 for ; Sun, 12 Nov 2006 07:49:02 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAC7n2wv014865 for perforce@freebsd.org; Sun, 12 Nov 2006 07:49:02 GMT (envelope-from imp@freebsd.org) Date: Sun, 12 Nov 2006 07:49:02 GMT Message-Id: <200611120749.kAC7n2wv014865@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109782 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 07:49:03 -0000 http://perforce.freebsd.org/chv.cgi?CH=109782 Change 109782 by imp@imp_lighthouse on 2006/11/12 07:48:17 Merge the last copy of arm_init.s into arm_init.S. Also, don't compile in the command tables for boot2, since that will save us 104 bytes. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#10 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0/arm_init.s#2 delete .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#9 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#8 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#19 edit .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#17 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/arm_init.S#3 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0/Makefile#10 (text) ==== @@ -1,11 +1,14 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.4 2006/08/18 20:26:54 imp Exp $ +.PATH: ${.CURDIR}/../libat91 + P=boot0 FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/Makefile#9 (text) ==== @@ -1,12 +1,14 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.2 2006/08/16 23:14:52 imp Exp $ -.PATH: ${.CURDIR}/../boot0 +.PATH: ${.CURDIR}/../libat91 P=boot0iic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include + +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/Makefile#8 (text) ==== @@ -1,13 +1,14 @@ # $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.2 2006/08/16 23:18:07 imp Exp $ -.PATH: ${.CURDIR}/../boot0 +.PATH: ${.CURDIR}/../libat91 P=boot0spi FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#19 (text+ko) ==== @@ -11,4 +11,4 @@ .include -CFLAGS += -DBOOT_IIC +CFLAGS += -DBOOT_IIC -DBOOT_COMMANDS ==== //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#17 (text+ko) ==== @@ -14,3 +14,4 @@ .if ${MK_FPGA} == "yes" CFLAGS += -DTSC_FPGA .endif +CFLAGS += -DBOOT_COMMANDS ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/arm_init.S#3 (text+ko) ==== @@ -31,7 +31,6 @@ .equ ARM_MODE_ABORT, 0x17 .equ ARM_MODE_UNDEF, 0x1B .equ ARM_MODE_SYS, 0x1F - .equ I_BIT, 0x80 .equ F_BIT, 0x40 .equ T_BIT, 0x20 @@ -41,7 +40,6 @@ * * Start near top of internal RAM. */ - .equ END_INT_SRAM, 0x4000 .equ SVC_STACK_START, (END_INT_SRAM - 0x4) .equ SVC_STACK_USE, 0x21800000 @@ -70,7 +68,6 @@ fiqvec: B fiqvec @; FIQ - InitReset: /* Set stack and init for SVC */ @@ -83,24 +80,22 @@ /* Perform system initialization */ .extern _init - bl _init - +#ifndef BOOT_BOOT0 ldr r1, = SVC_STACK_USE mov sp, r1 @ ; Move the stack to SDRAM +#endif /* Start execution at main */ - .extern main _main: __main: bl main - /* main should not return. If it does, spin forever */ - infiniteLoop: b infiniteLoop +#ifdef BOOT_COMMANDS /* the following section is used to store boot commands in */ /* non-volatile memory. */ @@ -127,3 +122,4 @@ #endif .word 0 #endif +#endif From owner-p4-projects@FreeBSD.ORG Sun Nov 12 12:16:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A811A16A412; Sun, 12 Nov 2006 12:16:41 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EFB716A403 for ; Sun, 12 Nov 2006 12:16:41 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D46EF43D5C for ; Sun, 12 Nov 2006 12:16:40 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACCGe7B071941 for ; Sun, 12 Nov 2006 12:16:40 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACCGeKt071938 for perforce@freebsd.org; Sun, 12 Nov 2006 12:16:40 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 12 Nov 2006 12:16:40 GMT Message-Id: <200611121216.kACCGeKt071938@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 109788 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 12:16:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=109788 Change 109788 by rdivacky@rdivacky_witten on 2006/11/12 12:16:38 Implement linux_chroot as a wrapper to chroot. We need this to get errno translation. All syscalls that are directly mapped to FreeBSD syscalls suffer from this. Notice: this is untested (not even compilation) because -current is broken ATM :( Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#12 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#12 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#11 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#11 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#32 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#12 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#11 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#11 edit .. //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#10 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#12 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.26 2006/11/11 21:49:07 ru Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.22 2006/10/28 10:59:59 netchild Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -192,6 +192,9 @@ struct linux_olduname_args { register_t dummy; }; +struct linux_chroot_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; +}; struct linux_ustat_args { char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; char ubuf_l_[PADL_(struct l_ustat *)]; struct l_ustat * ubuf; char ubuf_r_[PADR_(struct l_ustat *)]; @@ -984,6 +987,7 @@ int linux_ioctl(struct thread *, struct linux_ioctl_args *); int linux_fcntl(struct thread *, struct linux_fcntl_args *); int linux_olduname(struct thread *, struct linux_olduname_args *); +int linux_chroot(struct thread *, struct linux_chroot_args *); int linux_ustat(struct thread *, struct linux_ustat_args *); int linux_getppid(struct thread *, struct linux_getppid_args *); int linux_sigaction(struct thread *, struct linux_sigaction_args *); @@ -1235,6 +1239,7 @@ #define LINUX_SYS_AUE_linux_ioctl AUE_IOCTL #define LINUX_SYS_AUE_linux_fcntl AUE_FCNTL #define LINUX_SYS_AUE_linux_olduname AUE_NULL +#define LINUX_SYS_AUE_linux_chroot AUE_CHROOT #define LINUX_SYS_AUE_linux_ustat AUE_NULL #define LINUX_SYS_AUE_linux_getppid AUE_GETPPID #define LINUX_SYS_AUE_linux_sigaction AUE_NULL ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#12 (text+ko) ==== @@ -2,8 +2,8 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.26 2006/11/11 21:49:07 ru Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.22 2006/10/28 10:59:59 netchild Exp */ #define LINUX_SYS_exit 1 @@ -57,7 +57,7 @@ #define LINUX_SYS_setpgid 57 #define LINUX_SYS_linux_olduname 59 #define LINUX_SYS_umask 60 -#define LINUX_SYS_chroot 61 +#define LINUX_SYS_linux_chroot 61 #define LINUX_SYS_linux_ustat 62 #define LINUX_SYS_dup2 63 #define LINUX_SYS_linux_getppid 64 ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#11 (text+ko) ==== @@ -2,8 +2,8 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.26 2006/11/11 21:49:07 ru Exp $ - * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.22 2006/10/28 10:59:59 netchild Exp */ #include @@ -81,7 +81,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 58 = ulimit */ { 0, (sy_call_t *)linux_olduname, AUE_NULL, NULL, 0, 0 }, /* 59 = linux_olduname */ { AS(umask_args), (sy_call_t *)umask, AUE_UMASK, NULL, 0, 0 }, /* 60 = umask */ - { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT, NULL, 0, 0 }, /* 61 = chroot */ + { AS(linux_chroot_args), (sy_call_t *)linux_chroot, AUE_CHROOT, NULL, 0, 0 }, /* 61 = linux_chroot */ { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL, NULL, 0, 0 }, /* 62 = linux_ustat */ { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2, NULL, 0, 0 }, /* 63 = dup2 */ { 0, (sy_call_t *)linux_getppid, AUE_GETPPID, NULL, 0, 0 }, /* 64 = linux_getppid */ ==== //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#11 (text+ko) ==== @@ -117,7 +117,7 @@ 58 AUE_NULL UNIMPL ulimit 59 AUE_NULL STD { int linux_olduname(void); } 60 AUE_UMASK NOPROTO { int umask(int newmask); } -61 AUE_CHROOT NOPROTO { int chroot(char *path); } +61 AUE_CHROOT STD { int linux_chroot(char *path); } 62 AUE_NULL STD { int linux_ustat(l_dev_t dev, \ struct l_ustat *ubuf); } 63 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#32 (text+ko) ==== @@ -1672,3 +1672,9 @@ return (error); } + +int +linux_chroot(struct thread *td, struct linux_chroot_args *args) +{ + return (chroot(td, args)); +} ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#12 (text+ko) ==== @@ -2,8 +2,8 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/i386/linux/linux_proto.h,v 1.87 2006/11/11 16:26:56 trhodes Exp $ - * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.83 2006/10/29 14:02:39 netchild Exp + * $FreeBSD$ + * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.82 2006/10/28 10:59:59 netchild Exp */ #ifndef _LINUX_SYSPROTO_H_ @@ -196,6 +196,9 @@ struct linux_olduname_args { register_t dummy; }; +struct linux_chroot_args { + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; +}; struct linux_ustat_args { char dev_l_[PADL_(l_dev_t)]; l_dev_t dev; char dev_r_[PADR_(l_dev_t)]; char ubuf_l_[PADL_(struct l_ustat *)]; struct l_ustat * ubuf; char ubuf_r_[PADR_(struct l_ustat *)]; @@ -1002,6 +1005,7 @@ int linux_ioctl(struct thread *, struct linux_ioctl_args *); int linux_fcntl(struct thread *, struct linux_fcntl_args *); int linux_olduname(struct thread *, struct linux_olduname_args *); +int linux_chroot(struct thread *, struct linux_chroot_args *); int linux_ustat(struct thread *, struct linux_ustat_args *); int linux_getppid(struct thread *, struct linux_getppid_args *); int linux_sigaction(struct thread *, struct linux_sigaction_args *); @@ -1254,6 +1258,7 @@ #define LINUX_SYS_AUE_linux_ioctl AUE_IOCTL #define LINUX_SYS_AUE_linux_fcntl AUE_FCNTL #define LINUX_SYS_AUE_linux_olduname AUE_NULL +#define LINUX_SYS_AUE_linux_chroot AUE_CHROOT #define LINUX_SYS_AUE_linux_ustat AUE_NULL #define LINUX_SYS_AUE_linux_getppid AUE_GETPPID #define LINUX_SYS_AUE_linux_sigaction AUE_NULL ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#11 (text+ko) ==== @@ -58,7 +58,7 @@ #define LINUX_SYS_setpgid 57 #define LINUX_SYS_linux_olduname 59 #define LINUX_SYS_umask 60 -#define LINUX_SYS_chroot 61 +#define LINUX_SYS_linux_chroot 61 #define LINUX_SYS_linux_ustat 62 #define LINUX_SYS_dup2 63 #define LINUX_SYS_linux_getppid 64 ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#11 (text+ko) ==== @@ -80,7 +80,7 @@ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 58 = ulimit */ { 0, (sy_call_t *)linux_olduname, AUE_NULL, NULL, 0, 0 }, /* 59 = linux_olduname */ { AS(umask_args), (sy_call_t *)umask, AUE_UMASK, NULL, 0, 0 }, /* 60 = umask */ - { AS(chroot_args), (sy_call_t *)chroot, AUE_CHROOT, NULL, 0, 0 }, /* 61 = chroot */ + { AS(linux_chroot_args), (sy_call_t *)linux_chroot, AUE_CHROOT, NULL, 0, 0 }, /* 61 = linux_chroot */ { AS(linux_ustat_args), (sy_call_t *)linux_ustat, AUE_NULL, NULL, 0, 0 }, /* 62 = linux_ustat */ { AS(dup2_args), (sy_call_t *)dup2, AUE_DUP2, NULL, 0, 0 }, /* 63 = dup2 */ { 0, (sy_call_t *)linux_getppid, AUE_GETPPID, NULL, 0, 0 }, /* 64 = linux_getppid */ ==== //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#10 (text+ko) ==== @@ -117,7 +117,7 @@ 58 AUE_NULL UNIMPL ulimit 59 AUE_NULL STD { int linux_olduname(void); } 60 AUE_UMASK NOPROTO { int umask(int newmask); } -61 AUE_CHROOT NOPROTO { int chroot(char *path); } +61 AUE_CHROOT STD { int linux_chroot(char *path); } 62 AUE_NULL STD { int linux_ustat(l_dev_t dev, \ struct l_ustat *ubuf); } 63 AUE_DUP2 NOPROTO { int dup2(u_int from, u_int to); } From owner-p4-projects@FreeBSD.ORG Sun Nov 12 12:27:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 964A416A415; Sun, 12 Nov 2006 12:27:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 712C416A407 for ; Sun, 12 Nov 2006 12:27:20 +0000 (UTC) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (eva.fit.vutbr.cz [147.229.176.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3C5743D70 for ; Sun, 12 Nov 2006 12:27:18 +0000 (GMT) (envelope-from xdivac02@stud.fit.vutbr.cz) Received: from eva.fit.vutbr.cz (localhost [127.0.0.1]) by eva.fit.vutbr.cz (envelope-from xdivac02@eva.fit.vutbr.cz) (8.13.8/8.13.7) with ESMTP id kACCRGMZ023456 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 12 Nov 2006 13:27:16 +0100 (CET) Received: (from xdivac02@localhost) by eva.fit.vutbr.cz (8.13.8/8.13.3/Submit) id kACCRGtj023455 for perforce@freebsd.org; Sun, 12 Nov 2006 13:27:16 +0100 (CET) Date: Sun, 12 Nov 2006 13:27:16 +0100 From: Divacky Roman To: Perforce Change Reviews Message-ID: <20061112122716.GA23253@stud.fit.vutbr.cz> References: <200611121216.kACCGeKt071938@repoman.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200611121216.kACCGeKt071938@repoman.freebsd.org> User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 147.229.176.14 Cc: Subject: Re: PERFORCE change 109788 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 12:27:20 -0000 On Sun, Nov 12, 2006 at 12:16:40PM +0000, Roman Divacky wrote: > http://perforce.freebsd.org/chv.cgi?CH=109788 > > Change 109788 by rdivacky@rdivacky_witten on 2006/11/12 12:16:38 > > Implement linux_chroot as a wrapper to chroot. We need this to get > errno translation. All syscalls that are directly mapped to FreeBSD > syscalls suffer from this. I am wrong.. the mapping of errnos happens based on sysvec vector. From owner-p4-projects@FreeBSD.ORG Sun Nov 12 12:47:22 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A859A16A415; Sun, 12 Nov 2006 12:47:22 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4E0A116A40F for ; Sun, 12 Nov 2006 12:47:22 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBFF643D5E for ; Sun, 12 Nov 2006 12:47:21 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACClLFf084797 for ; Sun, 12 Nov 2006 12:47:21 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACClLSW084793 for perforce@freebsd.org; Sun, 12 Nov 2006 12:47:21 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 12 Nov 2006 12:47:21 GMT Message-Id: <200611121247.kACClLSW084793@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 109793 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 12:47:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=109793 Change 109793 by rdivacky@rdivacky_witten on 2006/11/12 12:46:38 Add stubs for upcoming sendfile implementation. Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_dummy.c#5 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#13 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#13 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#12 edit .. //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#12 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_socket.c#9 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_dummy.c#5 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#13 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#12 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#12 edit .. //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#11 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_dummy.c#5 (text+ko) ==== @@ -56,7 +56,6 @@ DUMMY(rt_sigqueueinfo); DUMMY(capget); DUMMY(capset); -DUMMY(sendfile); DUMMY(truncate64); DUMMY(setfsuid); DUMMY(setfsgid); ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_proto.h#13 (text+ko) ==== @@ -594,7 +594,10 @@ char uoss_l_[PADL_(l_stack_t *)]; l_stack_t * uoss; char uoss_r_[PADR_(l_stack_t *)]; }; struct linux_sendfile_args { - register_t dummy; + char out_l_[PADL_(int)]; int out; char out_r_[PADR_(int)]; + char in_l_[PADL_(int)]; int in; char in_r_[PADR_(int)]; + char offset_l_[PADL_(l_long *)]; l_long * offset; char offset_r_[PADR_(l_long *)]; + char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; }; struct linux_vfork_args { register_t dummy; ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_syscall.h#13 (text+ko) ==== ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_sysent.c#12 (text+ko) ==== @@ -207,7 +207,7 @@ { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0 }, /* 184 = linux_capget */ { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0 }, /* 185 = linux_capset */ { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0 }, /* 186 = linux_sigaltstack */ - { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0 }, /* 187 = linux_sendfile */ + { AS(linux_sendfile_args), (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0 }, /* 187 = linux_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 188 = getpmsg */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 189 = putpmsg */ { 0, (sy_call_t *)linux_vfork, AUE_VFORK, NULL, 0, 0 }, /* 190 = linux_vfork */ ==== //depot/projects/linuxolator/src/sys/amd64/linux32/syscalls.master#12 (text+ko) ==== @@ -330,7 +330,8 @@ 185 AUE_CAPSET STD { int linux_capset(void); } 186 AUE_NULL STD { int linux_sigaltstack(l_stack_t *uss, \ l_stack_t *uoss); } -187 AUE_SENDFILE STD { int linux_sendfile(void); } +187 AUE_SENDFILE STD { int linux_sendfile(int out, int in, l_long *offset, \ + l_size_t count); } 188 AUE_GETPMSG UNIMPL getpmsg 189 AUE_PUTPMSG UNIMPL putpmsg 190 AUE_VFORK STD { int linux_vfork(void); } ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_socket.c#9 (text+ko) ==== @@ -1298,3 +1298,9 @@ uprintf("LINUX: 'socket' typ=%d not implemented\n", args->what); return (ENOSYS); } + +int +linux_sendfile(struct thread *td, struct linux_sendfile_args *args) +{ + return (ENOSYS); +} ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_dummy.c#5 (text+ko) ==== @@ -59,7 +59,6 @@ DUMMY(rt_sigqueueinfo); DUMMY(capget); DUMMY(capset); -DUMMY(sendfile); /* different semantics */ DUMMY(truncate64); DUMMY(setfsuid); DUMMY(setfsgid); ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_proto.h#13 (text+ko) ==== @@ -589,7 +589,10 @@ char uoss_l_[PADL_(l_stack_t *)]; l_stack_t * uoss; char uoss_r_[PADR_(l_stack_t *)]; }; struct linux_sendfile_args { - register_t dummy; + char out_l_[PADL_(int)]; int out; char out_r_[PADR_(int)]; + char in_l_[PADL_(int)]; int in; char in_r_[PADR_(int)]; + char offset_l_[PADL_(l_long *)]; l_long * offset; char offset_r_[PADR_(l_long *)]; + char count_l_[PADL_(l_size_t)]; l_size_t count; char count_r_[PADR_(l_size_t)]; }; struct linux_vfork_args { register_t dummy; ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_syscall.h#12 (text+ko) ==== ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_sysent.c#12 (text+ko) ==== @@ -206,7 +206,7 @@ { 0, (sy_call_t *)linux_capget, AUE_CAPGET, NULL, 0, 0 }, /* 184 = linux_capget */ { 0, (sy_call_t *)linux_capset, AUE_CAPSET, NULL, 0, 0 }, /* 185 = linux_capset */ { AS(linux_sigaltstack_args), (sy_call_t *)linux_sigaltstack, AUE_NULL, NULL, 0, 0 }, /* 186 = linux_sigaltstack */ - { 0, (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0 }, /* 187 = linux_sendfile */ + { AS(linux_sendfile_args), (sy_call_t *)linux_sendfile, AUE_SENDFILE, NULL, 0, 0 }, /* 187 = linux_sendfile */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 188 = getpmsg */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 }, /* 189 = putpmsg */ { 0, (sy_call_t *)linux_vfork, AUE_VFORK, NULL, 0, 0 }, /* 190 = linux_vfork */ ==== //depot/projects/linuxolator/src/sys/i386/linux/syscalls.master#11 (text+ko) ==== @@ -333,7 +333,8 @@ 185 AUE_CAPSET STD { int linux_capset(void); } 186 AUE_NULL STD { int linux_sigaltstack(l_stack_t *uss, \ l_stack_t *uoss); } -187 AUE_SENDFILE STD { int linux_sendfile(void); } +187 AUE_SENDFILE STD { int linux_sendfile(int out, int in, l_long *offset, \ + l_size_t count); } 188 AUE_GETPMSG UNIMPL getpmsg 189 AUE_PUTPMSG UNIMPL putpmsg 190 AUE_VFORK STD { int linux_vfork(void); } From owner-p4-projects@FreeBSD.ORG Sun Nov 12 14:49:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6ACDE16A47C; Sun, 12 Nov 2006 14:49:58 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 451DA16A40F for ; Sun, 12 Nov 2006 14:49:58 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C71FF43D7B for ; Sun, 12 Nov 2006 14:49:57 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACEnvjZ007165 for ; Sun, 12 Nov 2006 14:49:57 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACEnvnp007162 for perforce@freebsd.org; Sun, 12 Nov 2006 14:49:57 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 12 Nov 2006 14:49:57 GMT Message-Id: <200611121449.kACEnvnp007162@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 109800 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 14:49:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=109800 Change 109800 by rdivacky@rdivacky_witten on 2006/11/12 14:49:41 Semi-working sendfile implementation. There are rough edges though. 1) linux permits SOCK_DGRAM sockets to be used too 2) we always return as if full load was sent more work to come Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_socket.c#10 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_socket.c#10 (text+ko) ==== @@ -1302,5 +1302,30 @@ int linux_sendfile(struct thread *td, struct linux_sendfile_args *args) { - return (ENOSYS); + struct sendfile_args sa; + off_t off; + int error; + + if ((error = copyin(args->offset, &off, sizeof(off)))) + return (error); +#ifdef DEBUG + if (ldebug(sendfile)) + printf(ARGS(sendfile, "%d, %d, %d, %d"), args->in, args->out, (int) off, + args->count); +#endif + + sa.fd = args->in; + sa.s = args->out; + sa.offset = off; + sa.nbytes = args->count; + sa.hdtr = NULL; + sa.sbytes = NULL; + sa.flags = 0; + + error = sendfile(td, &sa); + if (error) + return (error); + + td->td_retval[0] = args->count; + return (0); } From owner-p4-projects@FreeBSD.ORG Sun Nov 12 16:48:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D109616A417; Sun, 12 Nov 2006 16:48:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8636416A412 for ; Sun, 12 Nov 2006 16:48:27 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29D2143D49 for ; Sun, 12 Nov 2006 16:48:27 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACGmRId037107 for ; Sun, 12 Nov 2006 16:48:27 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACGmRKf037104 for perforce@freebsd.org; Sun, 12 Nov 2006 16:48:27 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 16:48:27 GMT Message-Id: <200611121648.kACGmRKf037104@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109803 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 16:48:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=109803 Change 109803 by sam@sam_ebb on 2006/11/12 16:47:56 update comments Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npereg.h#7 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npereg.h#7 (text+ko) ==== @@ -61,15 +61,15 @@ #define ARM_XSCALE_IF_NPEREG_H /* - * NPE/NPE tx/rx descriptor format. This data structure has an - * area used by the driver followed by an area shared with ucode - * running in the NPE. The latter must be cacheline-aligned; - * hence the unused space in the s/w area. We allocate NPE_MAXSEG - * "descriptors" per buffer; this allows us to do minimal s/g. - * The number of descriptors can be expanded but doing so uses - * memory so should be done with care. + * NPE/NPE tx/rx descriptor format. This is just the area + * shared with ucode running in the NPE; the driver-specific + * state is defined in the driver. The shared area must be + * cacheline-aligned. We allocate NPE_MAXSEG "descriptors" + * per buffer; this allows us to do minimal s/g. The number + * of descriptors can be expanded but doing so uses memory + * so should be done with care. * - * These buffers are setup in uncached memory. + * The driver sets up buffers in uncached memory. */ #define NPE_MAXSEG 3 /* empirically selected */ From owner-p4-projects@FreeBSD.ORG Sun Nov 12 17:26:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 23BAF16A4A7; Sun, 12 Nov 2006 17:26:18 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D96EC16A416 for ; Sun, 12 Nov 2006 17:26:16 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09D6F43D6E for ; Sun, 12 Nov 2006 17:26:16 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACHQFE9044767 for ; Sun, 12 Nov 2006 17:26:15 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACHQFlh044764 for perforce@freebsd.org; Sun, 12 Nov 2006 17:26:15 GMT (envelope-from rdivacky@FreeBSD.org) Date: Sun, 12 Nov 2006 17:26:15 GMT Message-Id: <200611121726.kACHQFlh044764@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 109805 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 17:26:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=109805 Change 109805 by rdivacky@rdivacky_witten on 2006/11/12 17:26:03 whitespace fix Affected files ... .. //depot/projects/linuxolator/src/sys/sys/unistd.h#4 edit Differences ... ==== //depot/projects/linuxolator/src/sys/sys/unistd.h#4 (text+ko) ==== @@ -169,7 +169,7 @@ #define RFCFDG (1<<12) /* close all fds, zero fd table */ #define RFTHREAD (1<<13) /* enable kernel thread support */ #define RFSIGSHARE (1<<14) /* share signal handlers */ -#define RFLINUXTHPN (1<<16) /* do linux clone exit parent notification */ +#define RFLINUXTHPN (1<<16) /* do linux clone exit parent notification */ #define RFSTOPPED (1<<17) /* leave child in a stopped state */ #define RFHIGHPID (1<<18) /* use a pid higher then 10 (idleproc) */ #define RFPPWAIT (1<<31) /* parent sleeps until child exits (vfork) */ From owner-p4-projects@FreeBSD.ORG Sun Nov 12 17:31:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C463C16A517; Sun, 12 Nov 2006 17:31:23 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80F5216A515 for ; Sun, 12 Nov 2006 17:31:23 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2CFEE43D5C for ; Sun, 12 Nov 2006 17:31:23 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACHVNe3045427 for ; Sun, 12 Nov 2006 17:31:23 GMT (envelope-from gabor@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACHVMpX045424 for perforce@freebsd.org; Sun, 12 Nov 2006 17:31:22 GMT (envelope-from gabor@FreeBSD.org) Date: Sun, 12 Nov 2006 17:31:22 GMT Message-Id: <200611121731.kACHVMpX045424@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to gabor@FreeBSD.org using -f From: Gabor Kovesdan To: Perforce Change Reviews Cc: Subject: PERFORCE change 109806 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 17:31:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=109806 Change 109806 by gabor@gabor_pluto on 2006/11/12 17:31:13 IFC Affected files ... .. //depot/projects/soc2006/gabor_ports/GIDs#4 integrate .. //depot/projects/soc2006/gabor_ports/LEGAL#7 integrate .. //depot/projects/soc2006/gabor_ports/MOVED#14 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.apache.mk#6 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.gnome.mk#8 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.gnustep.mk#4 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.lua.mk#3 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.php.mk#5 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.sdl.mk#4 integrate .. //depot/projects/soc2006/gabor_ports/Mk/bsd.sites.mk#11 integrate .. //depot/projects/soc2006/gabor_ports/Tools/scripts/rmport#5 integrate .. //depot/projects/soc2006/gabor_ports/UIDs#4 integrate .. //depot/projects/soc2006/gabor_ports/UPDATING#16 integrate Differences ... ==== //depot/projects/soc2006/gabor_ports/GIDs#4 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: ports/GIDs,v 1.11 2006/08/28 20:15:56 pav Exp $ +$FreeBSD: ports/GIDs,v 1.16 2006/11/11 16:36:23 ahze Exp $ # Please keep this file sorted by GID! bind:*:53: rdfdb:*:55: @@ -59,6 +59,7 @@ moinmoin:*:192: sympa:*:200: dspam:*:202: +bs:*:220: _tor:*:256: _dns-proxy-tor:*:257: _trans-proxy-tor:*:258: @@ -67,6 +68,7 @@ smxc:*:262: smxm:*:263: smx:*:264: +haclient:*:275: mrtg:*:279: dkfilter:*:325: ldap:*:389: @@ -81,6 +83,9 @@ messagebus:*:556: realtime:*:557: avahi:*:558: +tacacs:*:559: +distcc:*:561: +_xsi:*:600: bnetd:*:700: bopm:*:717: openxpki:*:777: ==== //depot/projects/soc2006/gabor_ports/LEGAL#7 (text+ko) ==== @@ -1,5 +1,5 @@ # Creator: Jordan Hubbard -# $FreeBSD: ports/LEGAL,v 1.507 2006/10/10 06:01:49 ale Exp $ +# $FreeBSD: ports/LEGAL,v 1.509 2006/11/09 08:55:13 vd Exp $ ********************************************************************** *** NOTE TO COMMITTERS *** @@ -378,8 +378,6 @@ libots-*.alpha.rpm lang/compaq-cc Distribution not allowed libSDLx11.so.tar.gz multimedia/mtv No redistribution LimeWireOther.zip net-p2p/limewire No redistribution allowed -linunace* archivers/linux-unace Distribution is permitted within the - original package only Linux-ACU-Driver-v* sysutils/linux-acu Redistribution not allowed rpm/i386/fedora/4/gtk2-* x11-toolkits/linux-gtk2 LGPL binary, no source linuxq3ademo-* games/linux-quake3-demo Restrictive license by Loki Software @@ -410,7 +408,6 @@ mindfocus-* games/mindfocus Contains commercial character data mindterm-* security/mindterm-binary Do not sell for profit -mingw/Opengl95.exe devel/mingw-opengl-headers Not sure if we can redistribute it freely miracl* math/miracl Free for non-profit use but a commercial license is required for all other usages ==== //depot/projects/soc2006/gabor_ports/MOVED#14 (text+ko) ==== @@ -1,7 +1,7 @@ # # MOVED - a list of (recently) moved or removed ports # -# $FreeBSD: ports/MOVED,v 1.1168 2006/10/21 03:02:07 kris Exp $ +# $FreeBSD: ports/MOVED,v 1.1183 2006/11/12 06:43:14 rafan Exp $ # # Each entry consists of a single line containing the following four # fields in the order named, separated with the pipe (`|') character: @@ -2490,3 +2490,52 @@ emulators/linux_base-suse-9.1||2006-10-20|Port expired and was removed emulators/linux_base-suse-9.2||2006-10-20|Port expired and was removed emulators/linux_base-suse-9.3||2006-10-20|Port expired and was removed +archivers/linux-unace||2006-10-31|Has expired: security issues +audio/gdesklets-cornerxmms||2006-10-31|Has expired: dead project and not fetchable any more +deskutils/gdesklets-sensor-displayconstraints||2006-10-31|Has expired: dead project and not fetchable any more +devel/sdl_ldbad||2006-10-31|Has expired: incorrect pkg-plist and doesn't required anymore +lang/pdss||2006-10-31|Has expired: fails to compile on recent FreeBSD versions +multimedia/slideshow||2006-10-31|Has expired: dead project and doesn't work with recent sdl +dns/queryperf|dns/dnsperf|2006-11-01|Project was improved and renamed +x11-toolkits/etox||2006-11-01|Has expired: doesn't work with recent e17 and obsoleted +x11-themes/e17-theme-blokkie||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-blue_default||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-carbon||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-detour||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-gant||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-japan2007||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-milky||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-neptun||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-simply_white||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-winter||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-mclaren||2006-11-01|Has expired: doesn't work with recent e17 +x11-themes/e17-theme-grey||2006-11-01|Has expired: doesn't work with recent e17 +devel/ac-archive|devel/autoconf-archive|2006-11-01|Replace broken ac-archive with working autoconf-archive +www/firefox-devel|www/firefox|2006-11-01|Firefox 2.0 is now stable +graphics/php4-imlib2|graphics/pecl-imlib2|2006-11-01|Follow PECL ports naming conversion +graphics/php5-imlib2|graphics/pecl-imlib2|2006-11-01|Follow PECL ports naming conversion +chinese/xcin25|chinese/xcin|2006-11-05|Reflect its real portname +mail/nail|mail/heirloom-mailx|2006-11-05|Project name changed +databases/php5-filepro||2006-11-06|Removed in 5.2 branch +databases/php5-pdo||2006-11-08|Removed +deskutils/offix-trash||2006-11-09|Has expired: development ceased in 1996 +devel/mingw||2006-11-09|Has expired: use mingw32-* ports instead +devel/mingw-binutils||2006-11-09|Has expired: use mingw32-* ports instead +devel/mingw-bin-msvcrt||2006-11-09|Has expired: use mingw32-* ports instead +devel/mingw-gcc||2006-11-09|Has expired: use mingw32-* ports instead +devel/mingw-opengl-headers||2006-11-09|Has expired: use mingw32-* ports instead +editors/offix-editor||2006-11-09|Has expired: developement ceased in 1996 +print/offix-printer||2006-11-09|Has expired: development ceased in 1996 +sysutils/wmmon||2006-11-09|Has expired: no longer available from mastersite +sysutils/xsysinfo||2006-11-09|Has expired: no longer available from mastersite +textproc/xmlada||2006-11-09|Has expired: no longer available from mastersite; 2.0 is available +www/p5-CGI-Application-ValidateRM||2006-11-09|Has expired: no longer available from mastersites +x11/offix-clipboard||2006-11-09|Has expired: development ceased in 1996 +x11/offix-execute||2006-11-09|Has expired: development ceased in 1996 +x11-fm/offix-files||2006-11-09|Has expired: development ceased in 1996 +x11-wm/icepref||2006-11-09|Has expired: is for IceWM version 1.04 (6 years old) +databases/p5-Catalyst-Model-CDBI-Plain|www/p5-Catalyst-Model-CDBI-Plain|2006-11-09|Moved to correct category +net-p2p/linux-overnet-core||2006-11-10|No longer downloadable +editors/openoffice.org-2.0|editors/openoffice.org-2|2006-11-12|Better version number handling +editors/openoffice.org-2.0-devel|editors/openoffice.org-2-devel|2006-11-12|Better version number handling +devel/ply|devel/py-ply|2006-11-12|Rename to consistency with other Python ports ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.apache.mk#6 (text+ko) ==== @@ -1,7 +1,7 @@ #-*- mode: makefile; tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD: ports/Mk/bsd.apache.mk,v 1.12 2006/06/20 04:58:12 linimon Exp $ +# $FreeBSD: ports/Mk/bsd.apache.mk,v 1.13 2006/11/07 09:11:53 clement Exp $ # # bsd.apache.mk - Apache related macros. # Author: Clement Laforet @@ -179,7 +179,7 @@ .endif . if defined(WITH_SUEXEC_UMASK) -CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${WITH_SUEXEC_UMASK} +CONFIGURE_ARGS+= --${SUEXEC_CONFARGS}-umask=${SUEXEC_UMASK} . endif .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.gnome.mk#8 (text+ko) ==== @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD: ports/Mk/bsd.gnome.mk,v 1.135 2006/10/15 03:42:39 marcus Exp $ +# $FreeBSD: ports/Mk/bsd.gnome.mk,v 1.136 2006/10/31 09:11:23 jylefort Exp $ # $NetBSD: $ # $MCom: ports/Mk/bsd.gnome.mk,v 1.401 2006/08/05 05:25:55 marcus Exp $ # @@ -728,6 +728,12 @@ . endif .endif +.if defined(USE_GNOME_SUBR) +GNOME_SUBR= ${LOCALBASE}/etc/gnome.subr +RUN_DEPENDS+= ${GNOME_SUBR}:${PORTSDIR}/sysutils/gnome_subr +SUB_LIST+= GNOME_SUBR=${GNOME_SUBR} +.endif + .if ${MAINTAINER}=="gnome@FreeBSD.org" CONFIGURE_FAIL_MESSAGE= "Please run the gnomelogalyzer, available from \"http://www.freebsd.org/gnome/gnomelogalyzer.sh\", which will diagnose the problem and suggest a solution. If - and only if - the gnomelogalyzer cannot solve the problem, report the build failure to the FreeBSD GNOME team at ${MAINTAINER}, and attach (a) \"${CONFIGURE_WRKSRC}/${CONFIGURE_LOG}\", (b) the output of the failed make command, and (c) the gnomelogalyzer output. Also, it might be a good idea to provide an overview of all packages installed on your system (i.e. an \`ls ${PKG_DBDIR}\`). Put your attachment up on any website, copy-and-paste into http://freebsd-gnome.pastebin.com, or use send-pr(1) with the attachment. Try to avoid sending any attachments to the mailing list (${MAINTAINER}), because attachments sent to FreeBSD mailing lists are usually discarded by the mailing list software." .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.gnustep.mk#4 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: ports/Mk/bsd.gnustep.mk,v 1.31 2006/10/05 17:27:31 dinoex Exp $ +# $FreeBSD: ports/Mk/bsd.gnustep.mk,v 1.32 2006/10/31 05:27:21 dinoex Exp $ # # This file contains some variable definitions that are supposed to # make your life easier when dealing with ports related to the GNUstep. @@ -63,16 +63,24 @@ # USE_GNUSTEP_INSTALL=yes # call install target with GNUstep.sh sourced in the current shell # +# USE_GNUSTEP_MAKE_DIRS= App Tools +# call build and install target in each of the given dirs. +# # USE_GNUSTEP_MAKE=yes # require GNUstep.sh for build and install # -# USE_GNUSTEP_SYSTEM_LIBS= Renaissance:x11-toolkits/renaissance +# USE_GNUSTEP_SYSTEM_LIBS+= Renaissance:x11-toolkits/renaissance # depends on a shared lib in System directrory # -# USE_GNUSTEP_LOCAL_LIBS= pantomime:mail/pantomime +# USE_GNUSTEP_LOCAL_LIBS+= pantomime:mail/pantomime # depends on a shared lib in Local directrory # - +# USE_GNUSTEP_SYSTEM_APPS+= ProjectCenter:devel/projectcenter.app +# depends on Application installed in System directrory at runtime +# +# USE_GNUSTEP_LOCAL_APPS+= Ink:misc/gnustep-examples +# depends on Application installed in Local directrory at runtime +# # --------------------------------------------------------------------------- .if !defined(_POSTMKINCLUDED) @@ -250,7 +258,7 @@ .endif # --------------------------------------------------------------------------- -# source system liibs +# source system libs # .if defined(USE_GNUSTEP_SYSTEM_LIBS) .for _GNUSTEP_DEP in ${USE_GNUSTEP_SYSTEM_LIBS} @@ -260,9 +268,8 @@ .endif # --------------------------------------------------------------------------- -# source local liibs +# source local libs # -:C/[.][0-9]*$//1 .if defined(USE_GNUSTEP_LOCAL_LIBS) .for _GNUSTEP_DEP in ${USE_GNUSTEP_LOCAL_LIBS} BUILD_DEPENDS+= ${LOCALLIBDIR}/lib${_GNUSTEP_DEP:C/:.*//}.so:${PORTSDIR}/${_GNUSTEP_DEP:C/.*://} @@ -271,6 +278,24 @@ .endif # --------------------------------------------------------------------------- +# source system apps +# +.if defined(USE_GNUSTEP_SYSTEM_APPS) +.for _GNUSTEP_DEP in ${USE_GNUSTEP_SYSTEM_APPS} +RUN_DEPENDS+= ${SYSTEMDIR}/Applications/${_GNUSTEP_DEP:C/:.*//}.app/${_GNUSTEP_DEP:C/:.*//}:${PORTSDIR}/${_GNUSTEP_DEP:C/.*://} +.endfor +.endif + +# --------------------------------------------------------------------------- +# source local apps +# +.if defined(USE_GNUSTEP_LOCAL_APPS) +.for _GNUSTEP_DEP in ${USE_GNUSTEP_LOCAL_APPS} +RUN_DEPENDS+= ${GNUSTEP_PREFIX}/Local/Applications/${_GNUSTEP_DEP:C/:.*//}.app/${_GNUSTEP_DEP:C/:.*//}:${PORTSDIR}/${_GNUSTEP_DEP:C/.*://} +.endfor +.endif + +# --------------------------------------------------------------------------- # source GNUstep.sh # .if defined(USE_GNUSTEP_CONFIGURE) @@ -298,8 +323,15 @@ # .if defined(USE_GNUSTEP_BUILD) do-build: +.if defined(USE_GNUSTEP_MAKE_DIRS) +.for i in ${USE_GNUSTEP_MAKE_DIRS} + @(cd ${WRKSRC}/${i}; . ${SYSMAKEDIR}/GNUstep.sh; \ + ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET}) +.endfor +.else @(cd ${WRKSRC}; . ${SYSMAKEDIR}/GNUstep.sh; \ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET}) +.endif .endif @@ -308,8 +340,15 @@ # .if defined(USE_GNUSTEP_INSTALL) do-install: +.if defined(USE_GNUSTEP_MAKE_DIRS) +.for i in ${USE_GNUSTEP_MAKE_DIRS} + @(cd ${WRKSRC}/${i}; . ${SYSMAKEDIR}/GNUstep.sh; \ + ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) +.endfor +.else @(cd ${WRKSRC}; . ${SYSMAKEDIR}/GNUstep.sh; \ ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET}) +.endif .if defined(PARALLEL_PACKAGE_BUILD) || defined(BATCH) || defined(CLEAN_ROOT) rm -rf /root/GNUstep .endif ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.lua.mk#3 (text+ko) ==== @@ -1,7 +1,7 @@ #-*- mode: makefile; tab-width: 4; -*- # ex:ts=4 # -# $FreeBSD: ports/Mk/bsd.lua.mk,v 1.2 2006/10/05 18:17:25 alepulver Exp $ +# $FreeBSD: ports/Mk/bsd.lua.mk,v 1.4 2006/11/12 14:23:12 alepulver Exp $ # # bsd.lua.mk - Support for Lua based ports. # @@ -75,11 +75,14 @@ # LUA_SUBDIR - The directory under bin/share/lib where Lua is installed. # LUA_INCDIR - The directory where Lua and tolua header files are installed. # LUA_LIBDIR - The directory where Lua and tolua libraries are installed. -# LUA_MODLIBDIR - The directory where Lua modules (.lua) are installed. +# LUA_MODLIBDIR - The directory where Lua module libraries (.so) are installed. # LUA_MODSHAREDIR -# - The directory where Lua module libraries (.so) are installed. +# - The directory where Lua modules (.lua) are installed. # LUA_PKGNAMEPREFIX # - The package name prefix used by Lua modules. +# LUA_CMD - The path to the Lua interpreter. +# LUAC_CMD - The path to the Lua compiler. +# TOLUA_CMD - The path to the tolua program. # # Examples: # - A port that needs Lua 4.0 and tolua (also 4.0) libraries (lua for building @@ -313,7 +316,7 @@ # # Version. -LUA_VER= ${_LUA_VER} +LUA_VER?= ${_LUA_VER} LUA_VER_SH?= ${LUA_VER:C/[[:digit:]]\.([[:digit:]])/\1/} LUA_VER_STR?= ${LUA_VER:S/.//g} @@ -329,6 +332,11 @@ # Package name. LUA_PKGNAMEPREFIX?= lua${LUA_VER_STR}- +# Programs. +LUA_CMD?= ${LUA_PREFIX}/bin/lua-${LUA_VER} +LUAC_CMD?= ${LUA_PREFIX}/bin/luac-${LUA_VER} +TOLUA_CMD?= ${LUA_PREFIX}/bin/tolua-${LUA_VER} + .endif # !_LUA_Version_Done && (_POSTMKINCLUDED || \ # (LUA_PREMK && BEFOREPORTMK && (USE_LUA || USE_LUA_NOT))) ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.php.mk#5 (text+ko) ==== @@ -7,7 +7,7 @@ # Please send all suggested changes to the maintainer instead of committing # them to CVS yourself. # -# $FreeBSD: ports/Mk/bsd.php.mk,v 1.33 2006/09/11 21:10:07 ale Exp $ +# $FreeBSD: ports/Mk/bsd.php.mk,v 1.34 2006/11/06 17:43:10 ale Exp $ # # Adding 'USE_PHP=yes' to a port includes this Makefile after bsd.ports.pre.mk. # If the port requires a predefined set of PHP extensions, they can be @@ -43,7 +43,7 @@ .if ${PHP_VER} == 4 PHP_EXT_DIR= 20020429 .else -PHP_EXT_DIR= 20050922 +PHP_EXT_DIR= 20060613 .endif HTTPD?= ${LOCALBASE}/sbin/httpd @@ -228,7 +228,7 @@ .if ${USE_PHP:L} != "yes" # non-version specific components _USE_PHP_ALL= bcmath bz2 calendar ctype curl dba dbase \ - exif fileinfo filepro fribidi ftp gd gettext gmp \ + exif fileinfo fribidi ftp gd gettext gmp \ hash iconv imap interbase ldap mbstring mcrypt \ mhash ming mssql mysql ncurses odbc \ openssl panda pcntl pcre pdf pgsql posix \ @@ -236,7 +236,7 @@ sockets sybase_ct sysvmsg sysvsem sysvshm \ tokenizer wddx xml xmlrpc yaz zip zlib # version specific components -_USE_PHP_VER4= ${_USE_PHP_ALL} crack dbx dio domxml mcal mcve \ +_USE_PHP_VER4= ${_USE_PHP_ALL} crack dbx dio domxml filepro mcal mcve \ mnogosearch oracle overload pfpro xslt yp _USE_PHP_VER5= ${_USE_PHP_ALL} dom mysqli pdo simplexml soap sqlite \ tidy xmlreader xmlwriter xsl ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.sdl.mk#4 (text+ko) ==== @@ -29,7 +29,7 @@ # # -# $FreeBSD: ports/Mk/bsd.sdl.mk,v 1.11 2006/09/20 11:20:32 stas Exp $ +# $FreeBSD: ports/Mk/bsd.sdl.mk,v 1.12 2006/10/31 21:37:05 edwin Exp $ # SDL_Include_MAINTAINER= edwin@FreeBSD.org @@ -37,7 +37,7 @@ # # These are the current supported SDL modules # -_USE_SDL_ALL= gfx gui image mixer mm net sdl sound ttf +_USE_SDL_ALL= gfx gui image mixer mm net pango sdl sound ttf # # Variables used to determine what is needed: @@ -74,6 +74,11 @@ _SUBDIR_net= net _REQUIRES_net= sdl +_VERSION_pango= 2 +_SUBDIR_pango= x11-toolkits +_LIB_pango= SDL_Pango +_REQUIRES_pango=sdl + _VERSION_sdl= 11 _SUBDIR_sdl= devel _LIB_sdl= SDL ==== //depot/projects/soc2006/gabor_ports/Mk/bsd.sites.mk#11 (text+ko) ==== @@ -20,7 +20,7 @@ # # Note: all entries should terminate with a slash. # -# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.400 2006/10/07 17:47:05 dinoex Exp $ +# $FreeBSD: ports/Mk/bsd.sites.mk,v 1.401 2006/11/05 12:27:42 sat Exp $ # # Where to put distfiles that don't have any other master site @@ -964,7 +964,7 @@ .endif .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE) -.for mirror in heanet nchc kent easynews ufpr jaist umn +.for mirror in heanet nchc kent easynews ufpr umn MASTER_SITE_SOURCEFORGE+= \ http://${mirror}.dl.sourceforge.net/sourceforge/%SUBDIR%/ .endfor @@ -973,7 +973,7 @@ # official sf.net mirrors that don't mirror all projects, check # http://prdownloads.sourceforge.net/%SUBDIR%/ .if !defined(IGNORE_MASTER_SITE_SOURCEFORGE_EXTENDED) -.for mirror in easynews switch puzzle ovh peterhost citkit keihanna +.for mirror in easynews switch puzzle belnet osdn ovh keihanna MASTER_SITE_SOURCEFORGE_EXTENDED+= \ http://${mirror}.dl.sourceforge.net/sourceforge/%SUBDIR%/ .endfor ==== //depot/projects/soc2006/gabor_ports/Tools/scripts/rmport#5 (text+ko) ==== @@ -30,7 +30,7 @@ # Originally written by Vasil Dimov # Others: # -# $FreeBSD: ports/Tools/scripts/rmport,v 1.9 2006/10/05 10:40:29 vd Exp $ +# $FreeBSD: ports/Tools/scripts/rmport,v 1.11 2006/11/02 09:20:10 vd Exp $ # # MAINTAINER= vd@FreeBSD.org # @@ -92,7 +92,11 @@ find ${PORTSDIR} -mindepth 3 -maxdepth 3 -name "Makefile*" \ |xargs grep -H ${EXPVAR} \ |sed -E "s|${PORTSDIR}/?([^/]+/[^/]+)/Makefile:${EXPVAR}=[[:space:]]*([0-9-]{10})$|\2 \1|g" \ - |perl -ne "if ((substr(\$_, 0, 10) cmp '${TODAY}') <= 0) { print(\$_); }" + |perl -ne "if ((substr(\$_, 0, 10) cmp '${TODAY}') <= 0) { print(\$_); }" \ + |while read expdate catport ; do \ + echo -n "${expdate} ${catport}: " ; \ + make -C ${PORTSDIR}/${catport} -V DEPRECATED ; \ + done } # create temporary checkout directory @@ -100,6 +104,13 @@ { log "creating temporary directory" d=`mktemp -d -t rmport` + mkdir ${d}/CVS + cat > ${d}/CVS/Repository < when ready' answer + read -p 'deal with the above issues and hit when ready' dummy done } @@ -186,7 +198,7 @@ msg="${catport}: checking if ${checkstr} is in ports/LEGAL" log "${msg}" while grep -i ${checkstr} ports/LEGAL ; do - read -p "${checkstr} is in ports/LEGAL, remove it and hit when ready" answer + read -p "${checkstr} is in ports/LEGAL, remove it and hit when ready" dummy log "${msg}" done done @@ -213,7 +225,11 @@ DEPRECATED="`make -C ${PORTSDIR}/${catport} -V DEPRECATED`" DEPRECATED=${DEPRECATED:+: ${DEPRECATED}} - REASON="Has expired${DEPRECATED}" + if [ -n "`make -C ${PORTSDIR}/${catport} -V EXPIRATION_DATE`" ] ; then + REASON="Has expired${DEPRECATED}" + else + REASON="Removed${DEPRECATED}" + fi log "${catport}: adding entry to ports/MOVED" @@ -244,6 +260,27 @@ ${PCVS} rm `find ports/${catport} -type f -not -path "*/CVS/*" -delete -print` } +append_Template() +{ + catport=${1} + + msg=${catport} + + EXPIRATION_DATE=`make -C ${PORTSDIR}/${catport} -V EXPIRATION_DATE` + if [ -n "${EXPIRATION_DATE}" ] ; then + msg="${EXPIRATION_DATE} ${msg}" + fi + + DEPRECATED="`make -C ${PORTSDIR}/${catport} -V DEPRECATED`" + if [ -n "${DEPRECATED}" ] ; then + msg="${msg}: ${DEPRECATED}" + fi + + log "${catport}: adding entry to commit message template" + + echo "${msg}" >> ./CVS/Template +} + # diff diff() { @@ -251,23 +288,34 @@ diffout=${codir}/diff - ${PCVS} diff -u CVSROOT/modules ports/MOVED ports/LEGAL \ - ports > ${diffout} 2>&1 || : + ${PCVS} diff -u CVSROOT/modules ports > ${diffout} 2>&1 || : - read -p "hit to view cvs diff output" answer + read -p "hit to view cvs diff output" dummy - # give this to the outside world so it can be removed when we are done + # give this to the outside world so it can be showed to the committer + # and removed when we are done echo ${diffout} } +ask() +{ + question=${1} + + answer=x + while [ "${answer}" != "y" -a "${answer}" != "n" ] ; do + read -p "${question} [yn] " answer + done + + echo ${answer} +} + # ask for confirmation and commit commit() { - read -p "do you want to commit? [yn] " answer + answer=`ask "do you want to commit?"` - if [ "${answer}" = "y" -o "${answer}" = "Y" ] ; then - ${PCVS} ci CVSROOT/modules ports/MOVED ports/LEGAL \ - ports + if [ "${answer}" = "y" ] ; then + ${PCVS} ci CVSROOT/modules ports fi } @@ -280,6 +328,9 @@ rm ${diffout} + rm CVS/Entries.Log CVS/Repository CVS/Template + rmdir CVS + # release cvs directories ${PCVS} rel -d CVSROOT ports @@ -290,12 +341,19 @@ usage() { echo "Usage:" >&2 + echo "" >&2 echo "find expired ports:" >&2 echo "${0} -F" >&2 + echo "" >&2 echo "remove port(s):" >&2 echo "${0} category1/port1 [ category2/port2 ... ]" >&2 + echo "" >&2 + echo "remove all expired ports (as returned by -F):" >&2 + echo "${0} -a" >&2 + echo "" >&2 echo "just check dependencies:" >&2 echo "${0} -d category/port" >&2 + exit 64 } @@ -322,6 +380,14 @@ exit fi +if [ ${1} = "-a" ] ; then + if [ ${#} -ne 1 ] ; then + usage + fi + ${0} `find_expired |cut -f 2 -d ' ' |cut -f 1 -d :` + exit +fi + codir=`mkcodir` cd ${codir} @@ -334,7 +400,7 @@ port=`basename ${catport}` # remove any trailing slashes catport="${cat}/${port}" - pkgname=`pkgname ${cat}/${port}` + pkgname=`pkgname ${catport}` check_dep ${catport} 1 "${*}" @@ -351,12 +417,22 @@ edit_Makefile ${cat} ${port} rm_port ${catport} + + append_Template ${catport} done -diffout=`diff` +# give a chance to the committer to edit files by hand and recreate/review +# the diff afterwards +answer=y +while [ "${answer}" = "y" ] ; do + diffout=`diff` + + # EDITOR instead of PAGER because vim has nice syntax highlighting ;-) + ${EDITOR} ${diffout} -# EDITOR instead of PAGER because vim has nice syntax highlighting ;-) -${EDITOR} ${diffout} + echo "you can now edit files under ${codir}/ by hand" + answer=`ask "do you want to recreate the diff?"` +done commit ==== //depot/projects/soc2006/gabor_ports/UIDs#4 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: ports/UIDs,v 1.13 2006/09/04 11:59:22 ru Exp $ +$FreeBSD: ports/UIDs,v 1.20 2006/11/11 16:36:23 ahze Exp $ # Please keep this file sorted by UID! bind:*:53:53:Bind Sandbox:/:/sbin/nologin majordom:*:54:54:Majordomo Pseudo User:/usr/local/majordomo:/nonexistent @@ -65,12 +65,12 @@ sfs:*:171:171:Self-Certifying File System:/nonexistent:/sbin/nologin agk:*:172:172:AquaGateKeeper:/nonexistent:/nonexistent polipo:*:173:173:polipo web cache:/nonexistent:/sbin/nologin -bogomilter:*:174:174:milter-bogom:/nonexistent:/sbin/nologin moinmoin:*:192:192:MoinMoin User:/nonexistent:/sbin/nologin sympa:*:200:200:Sympa Owner:/nonexistent:/sbin/nologin privoxy:*:201:201:Privoxy proxy user:/nonexistent:/sbin/nologin dspam:*:202:202:Dspam:/nonexistent:/sbin/nologin shoutcast:*:210:210:Shoutcast sandbox:/nonexistent:/bin/sh +bs:*:220:220:Big Sister:/usr/local/bigsister:/bin/sh _tor:*:256:256:Tor anonymising router:/var/db/tor:/bin/sh _dns-proxy-tor:*:257:257:dns-proxy-tor user:/nonexistent:/sbin/nologin _trans-proxy-tor:*:258:258:dns-proxy-tor user:/nonexistent:/sbin/nologin @@ -79,6 +79,7 @@ smxc:*:262:262:Sendmail X SMTPC:/nonexistent:/sbin/nologin smxm:*:263:263:Sendmail X misc:/nonexistent:/sbin/nologin smx:*:264:264:Sendmail X other:/nonexistent:/sbin/nologin +hacluster:*:275:275:Heartbeat cluster user:/nonexistent:/sbin/nologin mrtg:*:279:279:MRTG daemon:/nonexistent:/sbin/nologin dkfilter:*:325:325:DK Filter Owner:/nonexistent:/sbin/nologin ldap:*:389:389:OpenLDAP Server:/nonexistent:/sbin/nologin @@ -92,6 +93,9 @@ ircdru:*:555:555:Russian hybrid IRC server:/nonexistent:/bin/sh messagebus:*:556:556:D-BUS Daemon User:/nonexistent:/sbin/nologin avahi:*:558:558:Avahi Daemon User:/nonexistent:/sbin/nologin +tacacs:*:559:559:TACACS+ Daemon User:/nonexistent:/sbin/nologin +distcc:*:561:561:Distcc user:/nonexistent:/sbin/nologin +_xsi:*:600:600:XMLSysInfo User:/nonexistent:/sbin/nologin bnetd:*:700:700:Bnetd user:/nonexistent:/sbin/nologin bopm:*:717:717:Blitzed Open Proxy Monitor:/nonexistent:/bin/sh openxpki:*:777:777:OpenXPKI Owner:/nonexistent:/usr/sbin/nologin ==== //depot/projects/soc2006/gabor_ports/UPDATING#16 (text+ko) ==== @@ -6,6 +6,120 @@ time you update your ports collection, before attempting any port upgrades. +20061109 + AFFECTS: users of milter-bogom, dk-milter, dkim-milter + AUTHOR: ache@freebsd.org + + All 3 milters change their default user to "mailnull". + +20061108 + AFFECTS: Users of databases/postgresql*-server + AUTHOR: Palle Girgensohn + + With the latest patch release of the PostgreSQL ports, the rc script + is renamed `postgresql'. + +20061106 + AFFECTS: Users of net/freeradius + AUTHOR: David Wood + + FreeBSD used to patch FreeRADIUS's rlm_mschap.c to strip all domain names + when calculating the hash of an MS-CHAP challenge (a requirement specified + in RFC 2759 paragraph 4 and amplified in paragraph 8.2). FreeRADIUS now + offers its own solution to discard a domain name before hashing in the + MS-CHAP code, which can be enabled via a configuration option. As there is + no longer any need for the FreeBSD patch, it has been removed, leaving the + MS-CHAP code behaving as supplied by the FreeRADIUS team. + + If the previous behaviour of the MS-CHAP code is required, add: + + with_ntdomain_hack = yes + + to the mschap { } section of your FreeRADIUS configuration. There should be + a commented out line that can be modified around line 696 of + ${PREFIX}/etc/raddb/radiusd.conf if your configuration is based on the + sample FreeRADIUS configuration. + + This option is not set by default in the sample FreeRADIUS configuration. + Only those who have clients sending a domain name as part of the user name + when using MS-CHAP will be affected by this change; they will need to set + this option to allow FreeRADIUS to authenticate their clients successfully. + This may only affect those with older Windows clients, but I cannot be sure. + + Some sources suggest setting this configuration option anyway to prevent + FreeRADIUS from breaching RFC 2759 inadvertently, leading to authentication + failure. It is left to the user whether to set this configuration option + anyway, or only to set it in the event of authentication failures stemming + from MS-CHAP. + + Debug output from radiusd that reads "rlm_mschap: NT Domain delimeter found, + should we have enabled with_ntdomain_hack?" suggests that this configuration + option should be enabled. + + New maintainer alerted to this issue by private mail from Thomas Vogt + . + +20061106 + AFFECTS: users of syutils/munin-* + AUTHOR: miwi@FreeBSD.org + + - The default install location has changed from + ${PREFIX}/www/data/munin to ${PREFIX}/www/munin. + +20061106 + AFFECTS: users of chinese/tatter-tools + AUTHOR: chinsan.tw@gmail.com + + - The default install location has changed from + ${PREFIX}/www/data/tatter to ${PREFIX}/www/tatter. + +20061102 + AFFECTS: users of mail/fetchmail + AUTHOR: barner@FreeBSD.org + + - Along with the update to fetchmail 6.3.5, support for the POP2 + protocol has been removed from the port's default configuration. + If needed, POP2 can be enabled with the port's option interface. + + - New feature: GSSAPI support. + +20061101: + AFFECTS: Users of mail/dovecot + AUTHOR: shaun@FreeBSD.org + + Dovecot now requires the mail root to be set explicitly in the the + default_mail_env variable, where it could previously be omitted. + Using the old-style syntax may result in dovecot being unable to find + mailboxes. Installations using the example/default configuration + settings should not be affected. + + This is noted in the release announcement: + + http://dovecot.org/list/dovecot-news/2006-October/000016.html + +20061031: + AFFECTS: Users of math/rkward + AUTHOR: thierry@FreeBSD.org + + The way some information such as descriptive labels is stored in the + R workspace was changed in RKWard 0.4.0. + While the data itself can still be loaded, labels will not be + available from workspaces created with an earlier version of RKWard. + To convert the old labels to the new format, run + rk.convert.pre040 () + in the RKWard R console after loading the workspace in question. + +20061031: + AFFECTS: Users of news/inn-current or news/inn-stable + AUTHOR: shaun@FreeBSD.org + + The stable and current ports of inn have been updated. They suffered + from the same problem previously documented and fixed in news/inn. + When upgrading either of the two mentioned ports, users are advised + to move inn's database directory (/usr/local/news/db) out of the way + prior to _deinstallation_ in order to save its contents from being + erased. + 20061014: AFFECTS: All GTK+2 and GNOME users AUTHOR: gnome@FreeBSD.org @@ -4286,4 +4400,4 @@ 2) Update all p5-* modules. portupgrade -f p5-\* -$FreeBSD: ports/UPDATING,v 1.415 2006/10/20 02:18:17 mezz Exp $ +$FreeBSD: ports/UPDATING,v 1.424 2006/11/09 13:37:21 ache Exp $ From owner-p4-projects@FreeBSD.ORG Sun Nov 12 17:40:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4DE7E16A47C; Sun, 12 Nov 2006 17:40:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E1CA616A412 for ; Sun, 12 Nov 2006 17:40:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DB0D543D7E for ; Sun, 12 Nov 2006 17:40:34 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACHeYoN047071 for ; Sun, 12 Nov 2006 17:40:34 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACHeYMn047064 for perforce@freebsd.org; Sun, 12 Nov 2006 17:40:34 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 17:40:34 GMT Message-Id: <200611121740.kACHeYMn047064@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109807 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 17:40:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=109807 Change 109807 by sam@sam_ebb on 2006/11/12 17:39:51 add comments Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#22 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#22 (text+ko) ==== @@ -25,6 +25,22 @@ #include __FBSDID("$FreeBSD$"); +/* + * Intel XScale NPE Ethernet driver. + * + * This driver handles the two ports present on the IXP425. + * Packet processing is done by the Network Processing Engines + * (NPE's) that work together with a MAC and PHY. The MAC + * is also mapped to the XScale cpu; the PHY is accessed via + * the MAC. NPE-XScale communication happens through h/w + * queues managed by the Q Manager block. + * + * The code here replaces the ethAcc, ethMii, and ethDB classes + * in the Intel Access Library (IAL) and the OS-specific driver. + * + * XXX add vlan support + * XXX NPE-C port doesn't work yet + */ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" #endif @@ -120,7 +136,15 @@ }; /* - * Per-unit static configuration for IXP425. + * Per-unit static configuration for IXP425. The tx and + * rx free Q id's are fixed by the NPE microcode. The + * rx Q id's are programmed to be separate to simplify + * multi-port processing. It may be better to handle + * all traffic through one Q (as done by the Intel drivers). + * + * Note that the PHY's are accessible only from MAC A + * on the IXP425. This and other platform-specific + * assumptions probably need to be handled through hints. */ static const struct { const char *desc; /* device description */ @@ -756,6 +780,15 @@ NPE_ASSERT_LOCKED(sc); + /* + * NB: to avoid sleeping with the softc lock held we + * split the NPE msg processing into two parts. The + * request for statistics is sent w/o waiting for a + * reply and then on the next tick we retrieve the + * results. This works because npe_tick is the only + * code that talks via the mailbox's (except at setup). + * This likely can be handled better. + */ if (ixpnpe_recvmsg(sc->sc_npe, msg) == 0 && msg[0] == ACK) { bus_dmamap_sync(sc->sc_stats_tag, sc->sc_stats_map, BUS_DMASYNC_POSTREAD); @@ -822,9 +855,9 @@ * Q manager callback on tx done queue. Reap mbufs * and return tx buffers to the free list. Finally * restart output. Note the microcode has only one - * txdone q wired into it so we must use the port id - * returned with each npebuf to decide where to send - * buffers. + * txdone q wired into it so we must use the NPE ID + * returned with each npehwbuf to decide where to + * send buffers. */ static void npe_txdone(int qid, void *arg) @@ -1021,7 +1054,7 @@ struct ifnet *ifp = sc->sc_ifp; NPE_ASSERT_LOCKED(sc); -if (ifp->if_drv_flags & IFF_DRV_RUNNING) return; +if (ifp->if_drv_flags & IFF_DRV_RUNNING) return;/*XXX*/ /* * Reset MAC core. @@ -1177,7 +1210,7 @@ } /* - * dequeu packets and transmit + * Dequeue packets and place on the h/w transmit queue. */ static void npestart_locked(struct ifnet *ifp) From owner-p4-projects@FreeBSD.ORG Sun Nov 12 17:58:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 738E416A417; Sun, 12 Nov 2006 17:58:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 495FE16A416 for ; Sun, 12 Nov 2006 17:58:24 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B2FF643D66 for ; Sun, 12 Nov 2006 17:57:57 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACHvvVq053507 for ; Sun, 12 Nov 2006 17:57:57 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACHvu5Z053503 for perforce@freebsd.org; Sun, 12 Nov 2006 17:57:56 GMT (envelope-from marcel@freebsd.org) Date: Sun, 12 Nov 2006 17:57:56 GMT Message-Id: <200611121757.kACHvu5Z053503@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 109808 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 17:58:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=109808 Change 109808 by marcel@marcel_cluster on 2006/11/12 17:57:50 IFC @109804 Affected files ... .. //depot/projects/ia64/sys/amd64/linux32/linux32_proto.h#12 integrate .. //depot/projects/ia64/sys/amd64/linux32/linux32_syscall.h#12 integrate .. //depot/projects/ia64/sys/amd64/linux32/linux32_sysent.c#12 integrate .. //depot/projects/ia64/sys/arm/arm/pmap.c#22 integrate .. //depot/projects/ia64/sys/arm/at91/kb920x_machdep.c#6 integrate .. //depot/projects/ia64/sys/arm/include/pmap.h#17 integrate .. //depot/projects/ia64/sys/arm/sa11x0/assabet_machdep.c#13 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_proto.h#23 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_syscall.h#23 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_syscalls.c#23 integrate .. //depot/projects/ia64/sys/compat/freebsd32/freebsd32_sysent.c#23 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_proto.h#10 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_syscall.h#9 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_syscallnames.c#9 integrate .. //depot/projects/ia64/sys/compat/svr4/svr4_sysent.c#9 integrate .. //depot/projects/ia64/sys/conf/NOTES#111 integrate .. //depot/projects/ia64/sys/dev/usb/usb_quirks.c#15 integrate .. //depot/projects/ia64/sys/dev/usb/usbdevs#78 integrate .. //depot/projects/ia64/sys/kern/init_main.c#59 integrate .. //depot/projects/ia64/sys/kern/init_sysent.c#57 integrate .. //depot/projects/ia64/sys/kern/kern_idle.c#20 integrate .. //depot/projects/ia64/sys/kern/kern_lock.c#34 integrate .. //depot/projects/ia64/sys/kern/posix4_mib.c#2 integrate .. //depot/projects/ia64/sys/kern/subr_lock.c#3 integrate .. //depot/projects/ia64/sys/kern/syscalls.c#58 integrate .. //depot/projects/ia64/sys/kern/systrace_args.c#4 integrate .. //depot/projects/ia64/sys/netinet/sctp_constants.h#3 integrate .. //depot/projects/ia64/sys/netinet/sctp_input.c#3 integrate .. //depot/projects/ia64/sys/netinet/sctp_output.c#3 integrate .. //depot/projects/ia64/sys/netinet/sctputil.c#3 integrate .. //depot/projects/ia64/sys/netinet/sctputil.h#3 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/pmap_dispatch.c#6 integrate .. //depot/projects/ia64/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/ia64/sys/sys/lock_profile.h#2 integrate .. //depot/projects/ia64/sys/sys/syscall.h#57 integrate .. //depot/projects/ia64/sys/sys/syscall.mk#57 integrate .. //depot/projects/ia64/sys/sys/sysproto.h#61 integrate Differences ... ==== //depot/projects/ia64/sys/amd64/linux32/linux32_proto.h#12 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include ==== //depot/projects/ia64/sys/amd64/linux32/linux32_syscall.h#12 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ ==== //depot/projects/ia64/sys/amd64/linux32/linux32_sysent.c#12 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ ==== //depot/projects/ia64/sys/arm/arm/pmap.c#22 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.71 2006/11/08 06:31:28 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.72 2006/11/11 20:57:51 alc Exp $"); #include #include #include @@ -218,7 +218,6 @@ static MALLOC_DEFINE(M_VMPMAP, "pmap", "PMAP L1"); -vm_offset_t avail_end; /* PA of last available physical page */ vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t pmap_curmaxkvaddr; ==== //depot/projects/ia64/sys/arm/at91/kb920x_machdep.c#6 (text) ==== @@ -48,7 +48,7 @@ #include "opt_at91.h" #include -__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.18 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.19 2006/11/11 20:57:52 alc Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -129,7 +129,6 @@ vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; vm_offset_t physical_pages; -vm_offset_t clean_sva, clean_eva; struct pv_addr systempage; struct pv_addr msgbufpv; @@ -496,7 +495,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = KERNPHYSADDR + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); ==== //depot/projects/ia64/sys/arm/include/pmap.h#17 (text+ko) ==== @@ -44,7 +44,7 @@ * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 * - * $FreeBSD: src/sys/arm/include/pmap.h,v 1.21 2006/11/07 22:36:56 cognet Exp $ + * $FreeBSD: src/sys/arm/include/pmap.h,v 1.22 2006/11/11 20:57:52 alc Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -213,9 +213,6 @@ return (ptep); } -extern vm_offset_t avail_end; -extern vm_offset_t clean_eva; -extern vm_offset_t clean_sva; extern vm_offset_t phys_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; ==== //depot/projects/ia64/sys/arm/sa11x0/assabet_machdep.c#13 (text+ko) ==== @@ -47,7 +47,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.19 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.20 2006/11/11 20:57:52 alc Exp $"); #include "opt_md.h" @@ -146,7 +146,6 @@ vm_paddr_t physical_end; vm_paddr_t physical_freestart; vm_offset_t physical_pages; -vm_offset_t clean_sva, clean_eva; struct pv_addr systempage; struct pv_addr irqstack; @@ -455,7 +454,6 @@ init_param1(); init_param2(physmem); kdb_init(); - avail_end = 0xc0000000 + memsize - 1; return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } ==== //depot/projects/ia64/sys/compat/freebsd32/freebsd32_proto.h#23 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.74 2006/11/03 21:23:33 ru Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_proto.h,v 1.75 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.87 2006/11/03 21:21:28 ru Exp */ @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include ==== //depot/projects/ia64/sys/compat/freebsd32/freebsd32_syscall.h#23 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.72 2006/11/03 21:23:33 ru Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscall.h,v 1.73 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.87 2006/11/03 21:21:28 ru Exp */ ==== //depot/projects/ia64/sys/compat/freebsd32/freebsd32_syscalls.c#23 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.63 2006/11/03 21:23:33 ru Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_syscalls.c,v 1.64 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.87 2006/11/03 21:21:28 ru Exp */ ==== //depot/projects/ia64/sys/compat/freebsd32/freebsd32_sysent.c#23 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.73 2006/11/03 21:23:33 ru Exp $ + * $FreeBSD: src/sys/compat/freebsd32/freebsd32_sysent.c,v 1.74 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/freebsd32/syscalls.master,v 1.87 2006/11/03 21:21:28 ru Exp */ ==== //depot/projects/ia64/sys/compat/svr4/svr4_proto.h#10 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_proto.h,v 1.27 2006/08/15 17:36:59 jhb Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_proto.h,v 1.28 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp */ @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include ==== //depot/projects/ia64/sys/compat/svr4/svr4_syscall.h#9 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_syscall.h,v 1.25 2006/08/15 17:36:59 jhb Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_syscall.h,v 1.26 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp */ ==== //depot/projects/ia64/sys/compat/svr4/svr4_syscallnames.c#9 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_syscallnames.c,v 1.25 2006/08/15 17:36:59 jhb Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_syscallnames.c,v 1.26 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp */ ==== //depot/projects/ia64/sys/compat/svr4/svr4_sysent.c#9 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/compat/svr4/svr4_sysent.c,v 1.26 2006/08/15 17:36:59 jhb Exp $ + * $FreeBSD: src/sys/compat/svr4/svr4_sysent.c,v 1.27 2006/11/11 21:49:08 ru Exp $ * created from FreeBSD: src/sys/compat/svr4/syscalls.master,v 1.28 2006/07/28 19:05:27 jhb Exp */ ==== //depot/projects/ia64/sys/conf/NOTES#111 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1398 2006/11/11 05:35:39 kmacy Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1399 2006/11/11 23:37:52 ru Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -195,7 +195,7 @@ # MUTEX_NOINLINE forces mutex operations to call functions to perform each # operation rather than inlining the simple cases. This can be used to # shrink the size of the kernel text segment. Note that this behavior is -# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, MUTEX_PROFILING, +# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, LOCK_PROFILING, # and WITNESS options. options MUTEX_NOINLINE @@ -207,7 +207,7 @@ # RWLOCK_NOINLINE forces rwlock operations to call functions to perform each # operation rather than inlining the simple cases. This can be used to # shrink the size of the kernel text segment. Note that this behavior is -# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, MUTEX_PROFILING, +# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, LOCK_PROFILING, # and WITNESS options. options RWLOCK_NOINLINE @@ -241,8 +241,7 @@ options WITNESS_KDB options WITNESS_SKIPSPIN -# LOCK_PROFILING - Profiling locks. See -# MUTEX_PROFILING(9) for details. +# LOCK_PROFILING - Profiling locks. See LOCK_PROFILING(9) for details. options LOCK_PROFILING # Set the number of buffers and the hash size. The hash size MUST be larger # than the number of buffers. Hash size should be prime. ==== //depot/projects/ia64/sys/dev/usb/usb_quirks.c#15 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.54 2006/10/07 19:42:45 flz Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/usb/usb_quirks.c,v 1.55 2006/11/11 23:53:25 flz Exp $"); #include #include @@ -88,6 +88,7 @@ { USB_VENDOR_HP, USB_PRODUCT_HP_810C, ANY, { UQ_BROKEN_BIDIR }}, { USB_VENDOR_HP, USB_PRODUCT_HP_830C, ANY, { UQ_BROKEN_BIDIR }}, { USB_VENDOR_HP, USB_PRODUCT_HP_1220C, ANY, { UQ_BROKEN_BIDIR }}, + { USB_VENDOR_XEROX, USB_PRODUCT_XEROX_WCM15, ANY, { UQ_BROKEN_BIDIR }}, /* YAMAHA router's ucdDevice is the version of farmware and often changes. */ { USB_VENDOR_YAMAHA, USB_PRODUCT_YAMAHA_RTA54I, ANY, { UQ_ASSUME_CM_OVER_DATA }}, ==== //depot/projects/ia64/sys/dev/usb/usbdevs#78 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.276 2006/10/31 02:27:24 kevlo Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.277 2006/11/11 23:53:25 flz Exp $ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ /*- @@ -417,6 +417,7 @@ vendor ALATION 0x0910 Alation vendor CONCORDCAMERA 0x0919 Concord Camera vendor GOHUBS 0x0921 GoHubs +vendor XEROX 0x0924 Xerox vendor BIOMETRIC 0x0929 American Biometric vendor TOSHIBA 0x0930 Toshiba vendor PLEXTOR 0x093b Plextor @@ -1690,6 +1691,9 @@ /* Windbond Electronics */ product WINBOND UH104 0x5518 4-port USB Hub +/* Xerox products */ +product XEROX WCM15 0xffef WorkCenter M15 + /* Xirlink products */ product XIRLINK PCCAM 0x8080 IBM PC Camera ==== //depot/projects/ia64/sys/kern/init_main.c#59 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.269 2006/10/26 21:42:19 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/init_main.c,v 1.270 2006/11/12 11:48:37 davidxu Exp $"); #include "opt_ddb.h" #include "opt_init_path.h" @@ -447,6 +447,7 @@ #else td->td_pri_class = PRI_TIMESHARE; td->td_user_pri = PUSER; + td->td_base_user_pri = PUSER; #endif td->td_priority = PVM; td->td_base_pri = PUSER; ==== //depot/projects/ia64/sys/kern/init_sysent.c#57 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/init_sysent.c,v 1.227 2006/11/03 18:57:49 rrs Exp $ + * $FreeBSD: src/sys/kern/init_sysent.c,v 1.228 2006/11/11 22:01:25 ru Exp $ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.231 2006/11/03 15:23:14 rrs Exp */ ==== //depot/projects/ia64/sys/kern/kern_idle.c#20 (text+ko) ==== @@ -24,7 +24,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_idle.c,v 1.44 2006/10/26 21:42:19 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_idle.c,v 1.45 2006/11/12 03:18:22 davidxu Exp $"); #include #include @@ -122,12 +122,7 @@ #ifdef SMP idle_cpus_mask &= ~mycpu; #endif -#ifdef KSE mi_switch(SW_VOL, NULL); -#else - if ((td = choosethread()) != curthread) - mi_switch(SW_VOL, td); -#endif #ifdef SMP idle_cpus_mask |= mycpu; #endif ==== //depot/projects/ia64/sys/kern/kern_lock.c#34 (text+ko) ==== @@ -41,7 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_lock.c,v 1.101 2006/11/11 03:18:06 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_lock.c,v 1.102 2006/11/12 03:30:01 kmacy Exp $"); #include "opt_ddb.h" #include "opt_global.h" @@ -166,6 +166,8 @@ thr = td; lock_profile_waitstart(&waitstart); + + lkp->lk_object.lo_type = "lockmgr"; if ((flags & LK_INTERNAL) == 0) mtx_lock(lkp->lk_interlock); CTR6(KTR_LOCK, ==== //depot/projects/ia64/sys/kern/posix4_mib.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/posix4_mib.c,v 1.11 2006/11/11 16:19:11 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/posix4_mib.c,v 1.12 2006/11/12 03:34:03 trhodes Exp $"); #include #include @@ -39,6 +39,7 @@ #include #include #include +#include #include static int facility[CTL_P1003_1B_MAXID - 1]; ==== //depot/projects/ia64/sys/kern/subr_lock.c#3 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_lock.c,v 1.8 2006/11/11 07:38:48 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_lock.c,v 1.9 2006/11/12 03:30:01 kmacy Exp $"); #include "opt_ddb.h" #include "opt_mprof.h" @@ -128,16 +128,14 @@ retry_sbufops: sb = sbuf_new(NULL, NULL, LPROF_SBUF_SIZE * multiplier, SBUF_FIXEDLEN); sbuf_printf(sb, "\n%6s %12s %12s %11s %5s %5s %12s %12s %s\n", - "max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cn\ -t_lock", "name"); + "max", "total", "wait_total", "count", "avg", "wait_avg", "cnt_hold", "cnt_lock", "name"); for (i = 0; i < LPROF_HASH_SIZE; ++i) { if (lprof_buf[i].name == NULL) continue; for (p = lprof_buf[i].file; p != NULL && strncmp(p, "../", 3) == 0; p += 3) /* nothing */ ; - sbuf_printf(sb, "%6ju %12ju %12ju %11ju %5ju %5ju %12ju %12ju %s:%d (\ -%s)\n", + sbuf_printf(sb, "%6ju %12ju %12ju %11ju %5ju %5ju %12ju %12ju %s:%d (%s:%s)\n", lprof_buf[i].cnt_max / 1000, lprof_buf[i].cnt_tot / 1000, lprof_buf[i].cnt_wait / 1000, @@ -148,7 +146,9 @@ lprof_buf[i].cnt_wait / (lprof_buf[i].cnt_cur * 1000), lprof_buf[i].cnt_contest_holding, lprof_buf[i].cnt_contest_locking, - p, lprof_buf[i].line, lprof_buf[i].name); + p, lprof_buf[i].line, + lprof_buf[i].type, + lprof_buf[i].name); if (sbuf_overflowed(sb)) { sbuf_delete(sb); multiplier++; @@ -210,7 +210,7 @@ /* Initialize the lock object. */ lock->lo_name = name; - lock->lo_type = type != NULL ? type : name; + lock->lo_type = type != NULL ? type : class->lc_name; lock->lo_flags |= flags | LO_INITIALIZED; LOCK_LOG_INIT(lock, 0); WITNESS_INIT(lock); @@ -303,14 +303,15 @@ ++lock_prof_rejected; return; } - mpp->file = p; - mpp->line = l->lpo_lineno; - mpp->name = lo->lo_name; - mpp->namehash = l->lpo_namehash; - if (collision) - ++lock_prof_collisions; + mpp->file = p; + mpp->line = l->lpo_lineno; + mpp->name = lo->lo_name; + mpp->type = lo->lo_type; + mpp->namehash = l->lpo_namehash; + if (collision) + ++lock_prof_collisions; /* We might have raced someone else but who cares, they'll try again next time */ - ++lock_prof_records; + ++lock_prof_records; } LPROF_LOCK(hash); mpp->cnt_wait += waittime; @@ -364,12 +365,14 @@ ++lock_prof_rejected; return; } - mpp->file = p; - mpp->line = l->lpo_lineno; - mpp->name = lo->lo_name; - mpp->namehash = l->lpo_namehash; - if (collision) - ++lock_prof_collisions; + mpp->file = p; + mpp->line = l->lpo_lineno; + mpp->namehash = l->lpo_namehash; + mpp->type = lo->lo_type; + mpp->name = lo->lo_name; + + if (collision) + ++lock_prof_collisions; /* * We might have raced someone else but who cares, ==== //depot/projects/ia64/sys/kern/syscalls.c#58 (text+ko) ==== @@ -2,7 +2,7 @@ * System call names. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/syscalls.c,v 1.211 2006/11/03 18:57:49 rrs Exp $ + * $FreeBSD: src/sys/kern/syscalls.c,v 1.212 2006/11/11 22:01:25 ru Exp $ * created from FreeBSD: src/sys/kern/syscalls.master,v 1.231 2006/11/03 15:23:14 rrs Exp */ ==== //depot/projects/ia64/sys/kern/systrace_args.c#4 (text+ko) ==== @@ -2,7 +2,7 @@ * System call argument to DTrace register array converstion. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/kern/systrace_args.c,v 1.11 2006/11/03 18:57:49 rrs Exp $ + * $FreeBSD: src/sys/kern/systrace_args.c,v 1.12 2006/11/11 22:01:25 ru Exp $ * This file is part of the DTrace syscall provider. */ ==== //depot/projects/ia64/sys/netinet/sctp_constants.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_constants.h,v 1.17 2005/03/06 16:04:17 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_constants.h,v 1.2 2006/11/11 15:59:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_constants.h,v 1.3 2006/11/11 22:44:12 rrs Exp $"); #ifndef __sctp_constants_h__ #define __sctp_constants_h__ @@ -307,6 +307,7 @@ #define SCTP_OUTPUT_FROM_EARLY_FR_TMR 11 #define SCTP_OUTPUT_FROM_STRRST_REQ 12 #define SCTP_OUTPUT_FROM_USR_RCVD 13 +#define SCTP_OUTPUT_FROM_COOKIE_ACK 14 /* SCTP chunk types are moved sctp.h for application (NAT, FW) use */ /* align to 32-bit sizes */ ==== //depot/projects/ia64/sys/netinet/sctp_input.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_input.c,v 1.27 2005/03/06 16:04:17 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.7 2006/11/11 15:59:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_input.c,v 1.8 2006/11/11 22:44:12 rrs Exp $"); #include "opt_ipsec.h" #include "opt_compat.h" @@ -701,7 +701,7 @@ if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !TAILQ_EMPTY(&asoc->out_wheel)) { - sctp_report_all_outbound(stcb); + sctp_report_all_outbound(stcb, 0); } /* stop the timer */ sctp_timer_stop(SCTP_TIMER_TYPE_SHUTDOWN, stcb->sctp_ep, stcb, net); @@ -1092,6 +1092,7 @@ int chk_length; int init_offset, initack_offset; int retval; + int spec_flag = 0; /* I know that the TCB is non-NULL from the caller */ asoc = &stcb->asoc; @@ -1271,18 +1272,31 @@ sctp_timer_start(SCTP_TIMER_TYPE_AUTOCLOSE, inp, stcb, NULL); } - /* - * FIX? Should we go out, in this case (if the seq numbers - * changed on the peer) and set any data to RETRANSMIT? - */ asoc->my_rwnd = ntohl(initack_cp->init.a_rwnd); - asoc->pre_open_streams = - ntohs(initack_cp->init.num_outbound_streams); + asoc->pre_open_streams = ntohs(initack_cp->init.num_outbound_streams); + + /* Note last_cwr_tsn? where is this used? */ asoc->last_cwr_tsn = asoc->init_seq_number - 1; - asoc->asconf_seq_in = asoc->last_acked_seq = asoc->init_seq_number - 1; - asoc->str_reset_seq_in = asoc->init_seq_number; - asoc->advanced_peer_ack_point = asoc->last_acked_seq; + if (ntohl(init_cp->init.initiate_tag) != asoc->peer_vtag) { + /* + * Ok the peer probably discarded our data (if we + * echoed a cookie+data). So anything on the + * sent_queue should be marked for retransmit, we + * may not get something to kick us so it COULD + * still take a timeout to move these.. but it can't + * hurt to mark them. + */ + struct sctp_tmit_chunk *chk; + + TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { + if (chk->sent < SCTP_DATAGRAM_RESEND) { + chk->sent = SCTP_DATAGRAM_RESEND; + stcb->asoc.sent_queue_retran_cnt++; + spec_flag++; + } + } + } /* process the INIT info (peer's info) */ retval = sctp_process_init(init_cp, stcb, net); if (retval < 0) { @@ -1316,6 +1330,16 @@ } sctp_stop_all_cookie_timers(stcb); sctp_send_cookie_ack(stcb); + if (spec_flag) { + /* + * only if we have retrans set do we do this. What + * this call does is get only the COOKIE-ACK out and + * then when we return the normal call to + * sctp_chunk_output will get the retrans out behind + * this. + */ + sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_COOKIE_ACK); + } return (stcb); } if ((ntohl(initack_cp->init.initiate_tag) != asoc->my_vtag && @@ -1336,7 +1360,8 @@ /* send up all the data */ - sctp_report_all_outbound(stcb); + SCTP_TCB_SEND_LOCK(stcb); + sctp_report_all_outbound(stcb, 1); /* process the INIT-ACK info (my info) */ asoc->my_vtag = ntohl(initack_cp->init.initiate_tag); @@ -1376,6 +1401,7 @@ memset(asoc->mapping_array, 0, asoc->mapping_array_size); /* process the INIT info (peer's info) */ + SCTP_TCB_SEND_UNLOCK(stcb); retval = sctp_process_init(init_cp, stcb, net); if (retval < 0) { return (NULL); @@ -2356,7 +2382,7 @@ if (!TAILQ_EMPTY(&asoc->send_queue) || !TAILQ_EMPTY(&asoc->sent_queue) || !TAILQ_EMPTY(&asoc->out_wheel)) { - sctp_report_all_outbound(stcb); + sctp_report_all_outbound(stcb, 0); } } /* stop the timer */ ==== //depot/projects/ia64/sys/netinet/sctp_output.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctp_output.c,v 1.46 2005/03/06 16:04:17 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctp_output.c,v 1.5 2006/11/11 15:59:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctp_output.c,v 1.6 2006/11/11 22:44:12 rrs Exp $"); #include "opt_ipsec.h" #include "opt_compat.h" @@ -7164,7 +7164,6 @@ un_sent = (stcb->asoc.total_output_queue_size - stcb->asoc.total_flight); - if ((un_sent <= 0) && (TAILQ_EMPTY(&asoc->control_send_queue)) && (asoc->sent_queue_retran_cnt == 0)) { @@ -7184,7 +7183,17 @@ * Ok, it is retransmission time only, we send out only ONE * packet with a single call off to the retran code. */ - if (from_where != SCTP_OUTPUT_FROM_HB_TMR) { + if (from_where == SCTP_OUTPUT_FROM_COOKIE_ACK) { + /* + * Special hook for handling cookiess discarded by + * peer that carried data. Send cookie-ack only and + * then the next call with get the retran's. + */ + (void)sctp_med_chunk_output(inp, stcb, asoc, &num_out, &reason_code, 1, + &cwnd_full, from_where, + &now, &now_filled, frag_point); + return (0); + } else if (from_where != SCTP_OUTPUT_FROM_HB_TMR) { /* if its not from a HB then do it */ ret = sctp_chunk_retransmission(inp, stcb, asoc, &num_out, &now, &now_filled); } else { ==== //depot/projects/ia64/sys/netinet/sctputil.c#3 (text+ko) ==== @@ -31,7 +31,7 @@ /* $KAME: sctputil.c,v 1.37 2005/03/07 23:26:09 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctputil.c,v 1.6 2006/11/11 15:59:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctputil.c,v 1.7 2006/11/11 22:44:12 rrs Exp $"); #include "opt_ipsec.h" @@ -3242,12 +3242,13 @@ } void -sctp_report_all_outbound(struct sctp_tcb *stcb) +sctp_report_all_outbound(struct sctp_tcb *stcb, int holds_lock) { struct sctp_association *asoc; struct sctp_stream_out *outs; struct sctp_tmit_chunk *chk; struct sctp_stream_queue_pending *sp; + int i; asoc = &stcb->asoc; @@ -3257,9 +3258,12 @@ return; } /* now through all the gunk freeing chunks */ - - TAILQ_FOREACH(outs, &asoc->out_wheel, next_spoke) { - /* now clean up any chunks here */ + if (holds_lock == 0) + SCTP_TCB_SEND_LOCK(stcb); + for (i = 0; i < stcb->asoc.streamoutcnt; i++) { + /* For each stream */ + outs = &stcb->asoc.strmout[i]; + /* clean up any sends there */ stcb->asoc.locked_on_sending = NULL; sp = TAILQ_FIRST(&outs->outqueue); while (sp) { @@ -3338,6 +3342,8 @@ chk = TAILQ_FIRST(&asoc->sent_queue); } } + if (holds_lock == 0) + SCTP_TCB_SEND_UNLOCK(stcb); } void @@ -3350,7 +3356,7 @@ return; } /* Tell them we lost the asoc */ - sctp_report_all_outbound(stcb); + sctp_report_all_outbound(stcb, 1); if ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_IN_TCPPOOL) || ((stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_TCPTYPE) && (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_CONNECTED))) { ==== //depot/projects/ia64/sys/netinet/sctputil.h#3 (text+ko) ==== @@ -32,7 +32,7 @@ /* $KAME: sctputil.h,v 1.15 2005/03/06 16:04:19 itojun Exp $ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/sctputil.h,v 1.3 2006/11/11 15:59:01 rrs Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/sctputil.h,v 1.4 2006/11/11 22:44:12 rrs Exp $"); #ifndef __sctputil_h__ #define __sctputil_h__ @@ -131,7 +131,7 @@ void sctp_stop_timers_for_shutdown(struct sctp_tcb *); -void sctp_report_all_outbound(struct sctp_tcb *); +void sctp_report_all_outbound(struct sctp_tcb *, int); int sctp_expand_mapping_array(struct sctp_association *); ==== //depot/projects/ia64/sys/powerpc/powerpc/pmap_dispatch.c#6 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/pmap_dispatch.c,v 1.7 2006/08/01 19:06:05 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/powerpc/powerpc/pmap_dispatch.c,v 1.8 2006/11/11 20:57:52 alc Exp $"); /* * Dispatch MI pmap calls to the appropriate MMU implementation @@ -68,8 +68,6 @@ struct msgbuf *msgbufp; vm_offset_t msgbuf_phys; -vm_offset_t avail_start; -vm_offset_t avail_end; vm_offset_t kernel_vm_end; vm_offset_t phys_avail[PHYS_AVAIL_SZ]; vm_offset_t virtual_avail; ==== //depot/projects/ia64/sys/sun4v/sun4v/pmap.c#4 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/sun4v/sun4v/pmap.c,v 1.4 2006/11/03 07:27:55 kmacy Exp $"); +__FBSDID("$FreeBSD: src/sys/sun4v/sun4v/pmap.c,v 1.5 2006/11/12 01:21:15 kmacy Exp $"); #include "opt_kstack_pages.h" #include "opt_msgbuf.h" @@ -140,7 +140,7 @@ static int permanent_mappings = 0; static uint64_t nucleus_memory; -static uint64_t nucleus_mappings[2]; +static uint64_t nucleus_mappings[4]; /* * Kernel pmap. */ @@ -438,8 +438,6 @@ int i, sz, j; uint64_t tsb_8k_size, tsb_4m_size, error, physmem_tunable; - - if ((vmem = OF_finddevice("/virtual-memory")) == -1) panic("pmap_bootstrap: finddevice /virtual-memory"); if ((sz = OF_getproplen(vmem, "translations")) == -1) @@ -454,13 +452,14 @@ nucleus_memory_start = 0; CTR0(KTR_PMAP, "pmap_bootstrap: translations"); qsort(translations, sz, sizeof (*translations), om_cmp); + for (i = 0; i < sz; i++) { KDPRINTF("om_size=%ld om_start=%lx om_tte=%lx\n", translations[i].om_size, translations[i].om_start, translations[i].om_tte); if (translations[i].om_size == PAGE_SIZE_4M && - (translations[i].om_start == KERNBASE || - translations[i].om_start == KERNBASE + PAGE_SIZE_4M)) { + (translations[i].om_start >= KERNBASE && + translations[i].om_start <= KERNBASE + 3*PAGE_SIZE_4M)) { KDPRINTF("mapping permanent translation\n"); pa = TTE_GET_PA(translations[i].om_tte); error = hv_mmu_map_perm_addr((char *)translations[i].om_start, @@ -515,14 +514,14 @@ * Is kernel memory at the beginning of range? */ if (nucleus_memory_start == mra[i].mr_start) { - mra[i].mr_start += 2*PAGE_SIZE_4M; - mra[i].mr_size -= 2*PAGE_SIZE_4M; + mra[i].mr_start += nucleus_memory; + mra[i].mr_size -= nucleus_memory; } /* * Is kernel memory at the end of range? */ - if (nucleus_memory_start == (start + size - 2*PAGE_SIZE_4M)) - mra[i].mr_size -= 2*PAGE_SIZE_4M; + if (nucleus_memory_start == (start + size - nucleus_memory)) + mra[i].mr_size -= nucleus_memory; /* * Is kernel memory in the middle somewhere? @@ -536,15 +535,15 @@ break; } phys_avail[j+1] = nucleus_memory_start; - size = size - firstsize - 2*PAGE_SIZE_4M; - mra[i].mr_start = nucleus_memory_start + 2*PAGE_SIZE_4M; + size = size - firstsize - nucleus_memory; + mra[i].mr_start = nucleus_memory_start + nucleus_memory; mra[i].mr_size = size; - physsz += firstsize + 2*PAGE_SIZE_4M; + physsz += firstsize + nucleus_memory; j += 2; } if (mra[i].mr_size < PAGE_SIZE_4M) continue; - if ((mra[i].mr_start & PAGE_MASK_4M) && (mra[i].mr_size < 2*PAGE_SIZE_4M)) + if ((mra[i].mr_start & PAGE_MASK_4M) && (mra[i].mr_size < nucleus_memory)) continue; if (mra[i].mr_start & PAGE_MASK_4M) { uint64_t newstart, roundup; @@ -742,7 +741,7 @@ pa = phys_avail[i]; } while (pa != 0); - for (i = 0; i < 2; i++) { + for (i = 0; i < permanent_mappings; i++) { pa = nucleus_mappings[i]; tsb_assert_invalid(&kernel_td[TSB4M_INDEX], TLB_PHYS_TO_DIRECT(pa)); tsb_set_tte_real(&kernel_td[TSB4M_INDEX], TLB_PHYS_TO_DIRECT(pa), ==== //depot/projects/ia64/sys/sys/lock_profile.h#2 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/lock_profile.h,v 1.4 2006/11/11 07:52:38 kmacy Exp $ + * $FreeBSD: src/sys/sys/lock_profile.h,v 1.5 2006/11/12 05:16:28 kmacy Exp $ */ @@ -47,6 +47,7 @@ struct lock_prof { const char *name; + const char *type; const char *file; u_int namehash; int line; ==== //depot/projects/ia64/sys/sys/syscall.h#57 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Nov 12 18:51:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C4C8C16A417; Sun, 12 Nov 2006 18:51:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8AF2816A40F for ; Sun, 12 Nov 2006 18:51:15 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFB0443D92 for ; Sun, 12 Nov 2006 18:51:03 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACIp3fu063527 for ; Sun, 12 Nov 2006 18:51:03 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACIp35X063524 for perforce@freebsd.org; Sun, 12 Nov 2006 18:51:03 GMT (envelope-from mjacob@freebsd.org) Date: Sun, 12 Nov 2006 18:51:03 GMT Message-Id: <200611121851.kACIp35X063524@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 18:51:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=109809 Change 109809 by mjacob@newisp on 2006/11/12 18:50:33 Add a ZOMBIE state. Affected files ... .. //depot/projects/newisp/dev/isp/isp_library.c#17 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp_library.c#17 (text) ==== @@ -251,7 +251,7 @@ "CHGD", "NEW ", "PVLD", - "????", + "ZOMB", "VLD " }; const char *roles[4] = { From owner-p4-projects@FreeBSD.ORG Sun Nov 12 18:52:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD60616A47B; Sun, 12 Nov 2006 18:52:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 63A2916A40F for ; Sun, 12 Nov 2006 18:52:11 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 27D7343D5F for ; Sun, 12 Nov 2006 18:52:06 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACIq6HJ064155 for ; Sun, 12 Nov 2006 18:52:06 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACIq6p2064151 for perforce@freebsd.org; Sun, 12 Nov 2006 18:52:06 GMT (envelope-from mjacob@freebsd.org) Date: Sun, 12 Nov 2006 18:52:06 GMT Message-Id: <200611121852.kACIq6p2064151@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109811 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 18:52:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=109811 Change 109811 by mjacob@newisp on 2006/11/12 18:51:22 Add a ZOMBIE state for portdb entries. Affected files ... .. //depot/projects/newisp/dev/isp/ispvar.h#14 edit Differences ... ==== //depot/projects/newisp/dev/isp/ispvar.h#14 (text+ko) ==== @@ -342,6 +342,7 @@ #define FC_PORTDB_STATE_CHANGED 3 #define FC_PORTDB_STATE_NEW 4 #define FC_PORTDB_STATE_PENDING_VALID 5 +#define FC_PORTDB_STATE_ZOMBIE 6 #define FC_PORTDB_STATE_VALID 7 /* From owner-p4-projects@FreeBSD.ORG Sun Nov 12 18:57:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DAE3F16A47B; Sun, 12 Nov 2006 18:57:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C01316A416 for ; Sun, 12 Nov 2006 18:57:17 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9ECFA43D6D for ; Sun, 12 Nov 2006 18:57:13 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACIvDvI064913 for ; Sun, 12 Nov 2006 18:57:13 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACIvDpx064910 for perforce@freebsd.org; Sun, 12 Nov 2006 18:57:13 GMT (envelope-from mjacob@freebsd.org) Date: Sun, 12 Nov 2006 18:57:13 GMT Message-Id: <200611121857.kACIvDpx064910@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109812 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 18:57:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=109812 Change 109812 by mjacob@newisp on 2006/11/12 18:56:32 Macroize isp_mark_portdb so we can print out debugging aboutg where we invalidate the portdb. Add more SANCFG printouts. Add a ZOMBIE state to portdb entries- this is exempt from being marked by isp_mark_portdb. When we arrive in isp_pdb_sync and announce to the outer layers that a device is 'gone', it has the option of setting the portdb entry as being 'ZOMBIE' and setting a timer that will be used to clear the entry entirely or handle it arriving again before the timeout. For FreeBSD, implement both a loop down and a gone device timer. Add a isp_mstohz function. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#29 edit .. //depot/projects/newisp/dev/isp/isp_freebsd.c#23 edit .. //depot/projects/newisp/dev/isp/isp_freebsd.h#16 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#29 (text+ko) ==== @@ -60,6 +60,9 @@ */ #define MBOX_DELAY_COUNT 1000000 / 100 +#define ISP_MARK_PORTDB(a, b) \ + isp_prt(isp, ISP_LOGSANCFG, "line %d: markportdb", __LINE__); \ + isp_mark_portdb(a, b) /* * Local static data @@ -116,7 +119,7 @@ static int isp_getpdb(ispsoftc_t *, uint16_t, isp_pdb_t *, int); static uint64_t isp_get_portname(ispsoftc_t *, int, int); static int isp_fclink_test(ispsoftc_t *, int); -static const char *isp2100_fw_statename(int); +static const char *ispfc_fw_statename(int); static int isp_pdb_sync(ispsoftc_t *); static int isp_scan_loop(ispsoftc_t *); static int isp_gid_ft_sns(ispsoftc_t *); @@ -1172,7 +1175,7 @@ /* * Do this *before* initializing the firmware. */ - isp_mark_portdb(isp, 0); + ISP_MARK_PORTDB(isp, 0); FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_NIL; @@ -2053,7 +2056,6 @@ int i; for (i = 0; i < MAX_FC_TARG; i++) { - fcp->isp_ini_map[i] = 0; if (onprobation == 0) { MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); } else { @@ -2065,6 +2067,8 @@ fcp->portdb[i].state = FC_PORTDB_STATE_PROBATIONAL; break; + case FC_PORTDB_STATE_ZOMBIE: + break; case FC_PORTDB_STATE_NIL: default: MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); @@ -2415,8 +2419,8 @@ fcp = isp->isp_param; - isp_prt(isp, ISP_LOGDEBUG0, "FC Link Test Entry"); - isp_mark_portdb(isp, 1); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Link Test Entry"); + ISP_MARK_PORTDB(isp, 1); /* * Wait up to N microseconds for F/W to go to a ready state. @@ -2431,9 +2435,10 @@ GET_NANOTIME(&hra); isp_fw_state(isp); if (lwfs != fcp->isp_fwstate) { - isp_prt(isp, ISP_LOGINFO, "Firmware State <%s->%s>", - isp2100_fw_statename((int)lwfs), - isp2100_fw_statename((int)fcp->isp_fwstate)); + isp_prt(isp, ISP_LOGCONFIG|ISP_LOGSANCFG, + "Firmware State <%s->%s>", + ispfc_fw_statename((int)lwfs), + ispfc_fw_statename((int)fcp->isp_fwstate)); lwfs = fcp->isp_fwstate; } if (fcp->isp_fwstate == FW_READY) { @@ -2485,7 +2490,7 @@ * If we haven't gone to 'ready' state, return. */ if (fcp->isp_fwstate != FW_READY) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG, "isp_fclink_test: not at FW_READY state"); return (-1); } @@ -2597,19 +2602,19 @@ /* * Announce ourselves, too. */ - isp_prt(isp, ISP_LOGCONFIG, topology, fcp->isp_portid, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGCONFIG, topology, fcp->isp_portid, fcp->isp_loopid, toponames[fcp->isp_topo]); - isp_prt(isp, ISP_LOGCONFIG, ourwwn, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGCONFIG, ourwwn, (uint32_t) (ISP_NODEWWN(isp) >> 32), (uint32_t) ISP_NODEWWN(isp), (uint32_t) (ISP_PORTWWN(isp) >> 32), (uint32_t) ISP_PORTWWN(isp)); - isp_prt(isp, ISP_LOGDEBUG0, "FC Link Test Complete"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Link Test Complete"); return (0); } static const char * -isp2100_fw_statename(int state) +ispfc_fw_statename(int state) { switch(state) { case FW_CONFIG_WAIT: return "Config Wait"; @@ -2688,6 +2693,8 @@ } } + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Synchronizing PDBs"); + fcp->isp_loopstate = LOOP_SYNCING_PDB; for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { @@ -2712,8 +2719,8 @@ /* * It's up to the outer layers to clear isp_ini_map. */ + lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, lp); - lp->state = FC_PORTDB_STATE_NIL; if (lp->autologin == 0) { if (IS_24XX(isp)) { int action = @@ -2733,38 +2740,35 @@ } lp->new_roles = 0; lp->new_portid = 0; + /* + * Note that we might come out of this with our state + * set to FC_PORTDB_STATE_ZOMBIE. + */ break; case FC_PORTDB_STATE_NEW: /* - * If *we* have a new target dole and *it* has a target - * role, assign a new target id to it. + * It's up to the outer layers to assign a virtual + * target id in isp_ini_map (if any). */ lp->portid = lp->new_portid; lp->roles = lp->new_roles; - /* - * It's up to the outer layers to assign a virtual - * target id in isp_ini_map (if any). - */ + lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_ARRIVED, lp); - lp->state = FC_PORTDB_STATE_VALID; lp->new_roles = 0; lp->new_portid = 0; + lp->reserved = 0; + lp->new_reserved = 0; break; case FC_PORTDB_STATE_CHANGED: - /* - * For now, just have a policy of accepting 'changed' - * devices. - */ - lp->portid = lp->new_portid; - lp->roles = lp->new_roles; - if (lp->ini_map_idx) { - int t = lp->ini_map_idx - 1; - fcp->isp_ini_map[t] = dbidx + 1; - } +/* + * XXXX FIX THIS + */ + lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_CHANGED, lp); - lp->state = FC_PORTDB_STATE_VALID; lp->new_roles = 0; lp->new_portid = 0; + lp->reserved = 0; + lp->new_reserved = 0; break; case FC_PORTDB_STATE_PENDING_VALID: lp->portid = lp->new_portid; @@ -2773,15 +2777,20 @@ int t = lp->ini_map_idx - 1; fcp->isp_ini_map[t] = dbidx + 1; } + lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_STAYED, lp); - lp->state = FC_PORTDB_STATE_VALID; if (dbidx != FL_ID) { lp->new_roles = 0; lp->new_portid = 0; } + lp->reserved = 0; + lp->new_reserved = 0; + break; + case FC_PORTDB_STATE_ZOMBIE: break; default: - isp_prt(isp, ISP_LOGERR, "eh? state %d for idx %d", + isp_prt(isp, ISP_LOGWARN, + "isp_scan_loop: state %d for idx %d", lp->state, dbidx); isp_dump_portdb(isp); } @@ -2807,7 +2816,7 @@ fcparam *fcp = isp->isp_param; int i; isp_pdb_t pdb; - uint16_t dbidx, lim = 0; + uint16_t handle, lim = 0; if (fcp->isp_fwstate < FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) { @@ -2844,17 +2853,18 @@ } fcp->isp_loopstate = LOOP_SCANNING_LOOP; - isp_prt(isp, ISP_LOGDEBUG0, "scanning loop 0..%d", lim-1); + + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC scan loop 0..%d", lim-1); /* * Run through the list and get the port database info for each one. */ - for (dbidx = 0; dbidx < lim; dbidx++) { + for (handle = 0; handle < lim; handle++) { /* * But don't even try for ourselves... */ - if (dbidx == fcp->isp_loopid) { + if (handle == fcp->isp_loopid) { continue; } @@ -2863,7 +2873,7 @@ * known to hang. This trick gets around that problem. */ if (IS_2100(isp) || IS_2200(isp)) { - uint64_t node_wwn = isp_get_portname(isp, dbidx, 1); + uint64_t node_wwn = isp_get_portname(isp, handle, 1); if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { return (-1); } @@ -2875,29 +2885,29 @@ /* * Get the port database entity for this index. */ - if (isp_getpdb(isp, dbidx, &pdb, 1) != 0) { + if (isp_getpdb(isp, handle, &pdb, 1) != 0) { if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } continue; } if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } /* * On *very* old 2100 firmware we would end up sometimes * with the firmware returning the port database entry - * for something else. We used to restart locally, but - * now we punt. + * for something else. We used to restart this, but + * now we just punt. */ - if (IS_2100(isp) && pdb.handle != dbidx) { + if (IS_2100(isp) && pdb.handle != handle) { isp_prt(isp, ISP_LOGWARN, "giving up on synchronizing the port database"); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } @@ -2916,8 +2926,7 @@ * which shift on a loop. */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - isp_prt(isp, ISP_LOGWARN, - "bad pdb entry at loop %d", dbidx); + isp_prt(isp, ISP_LOGWARN, "bad pdb @ loop %d", handle); isp_dump_portdb(isp); continue; } @@ -2940,22 +2949,27 @@ /* * Okay- we've found a non-nil entry that matches. - * Check to make sure it's probational. + * Check to make sure it's probational or a zombie. */ - if (lp->state != FC_PORTDB_STATE_PROBATIONAL) { + if (lp->state != FC_PORTDB_STATE_PROBATIONAL && + lp->state != FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGERR, - "portdb entry %d not probational (0x%x)", + "[%d] not probational/zombie (0x%x)", i, lp->state); isp_dump_portdb(isp); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } + /* + * Mark the device as something the f/w logs into + * automatically. + */ lp->autologin = 1; + /* - * Check to make sure it's really the same - * device and update the initiator map before - * we mark it as pending valid. + * Check to make see if really still the same + * device. If it is, we mark it pending valid. */ if (lp->portid == tmp.portid && lp->handle == tmp.handle && @@ -2963,12 +2977,15 @@ lp->new_portid = tmp.portid; lp->new_roles = tmp.roles; lp->state = FC_PORTDB_STATE_PENDING_VALID; + isp_prt(isp, ISP_LOGSANCFG, + "Loop Port 0x%06x@0x%x Pending Valid", + tmp.portid, tmp.handle); break; } /* - * We can wipe out the old handle value here because - * it's no longer valid. + * We can wipe out the old handle value + * here because it's no longer valid. */ lp->handle = tmp.handle; @@ -2976,6 +2993,9 @@ * Claim that this has changed and let somebody else * decide what to do. */ + isp_prt(isp, ISP_LOGSANCFG, + "Loop Port 0x%06x@0x%x changed", + tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; lp->new_roles = tmp.roles; @@ -2999,23 +3019,23 @@ } } if (i == MAX_FC_TARG) { - isp_prt(isp, ISP_LOGERR, - "could not find slot for new entry"); + isp_prt(isp, ISP_LOGERR, "out of portdb entries"); continue; } lp = &fcp->portdb[i]; + MEMZERO(lp, sizeof (fcportdb_t)); lp->autologin = 1; lp->state = FC_PORTDB_STATE_NEW; - lp->portid = 0; - lp->roles = 0; lp->new_portid = tmp.portid; lp->new_roles = tmp.roles; lp->handle = tmp.handle; lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; + isp_prt(isp, ISP_LOGSANCFG, + "Loop Port 0x%06x@0x%x is New Entry", + tmp.portid, tmp.handle); } - fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } @@ -3196,7 +3216,7 @@ int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; - isp_prt(isp, ISP_LOGDEBUG0, "FC Scan Fabric"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Scan Fabric"); if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_LSCAN_DONE) { return (-1); @@ -3206,7 +3226,8 @@ } if (fcp->isp_topo != TOPO_FL_PORT && fcp->isp_topo != TOPO_F_PORT) { fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOGDEBUG0, "FC Scan Fabric Done (no fabric)"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "FC Scan Fabric Done (no fabric)"); return (0); } @@ -3241,7 +3262,7 @@ int level; if (rs1->snscb_cthdr.ct_reason == 9 && rs1->snscb_cthdr.ct_explanation == 7) { - level = ISP_LOGDEBUG0; + level = ISP_LOGSANCFG|ISP_LOGDEBUG0; } else { level = ISP_LOGWARN; } @@ -3286,8 +3307,8 @@ "fabric too big for scratch area: increase ISP2100_SCRLEN"); } portlim = portidx + 1; - isp_prt(isp, ISP_LOGDEBUG0, "got %d ports back from name server", - portlim); + isp_prt(isp, ISP_LOGSANCFG, + "got %d ports back from name server", portlim); for (portidx = 0; portidx < portlim; portidx++) { int npidx; @@ -3311,7 +3332,7 @@ rs1->snscb_ports[npidx].portid[0] = 0; rs1->snscb_ports[npidx].portid[1] = 0; rs1->snscb_ports[npidx].portid[2] = 0; - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "removing duplicate PortID 0x%x entry from list", portid); } @@ -3344,7 +3365,7 @@ ((rs1->snscb_ports[portidx].portid[2])); if (portid == 0) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG, "skipping null PortID at idx %d", portidx); continue; } @@ -3353,15 +3374,18 @@ * Skip ourselves... */ if (portid == fcp->isp_portid) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG, "skip ourselves @ PortID 0x%06x", portid); continue; } - isp_prt(isp, ISP_LOGDEBUG0, "Fabric Port 0x%06x", portid); + isp_prt(isp, ISP_LOGSANCFG, + "Checking Fabric Port 0x%06x", portid); /* * We now search our Port Database for any - * probational entries with this PortID. + * probational entries with this PortID. We don't + * look for zombies here- only probational + * entries (we've already logged out of zombies). */ for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; @@ -3402,12 +3426,15 @@ r = isp_getpdb(isp, lp->handle, &pdb, 0); if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { FC_SCRATCH_RELEASE(isp); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } if (r != 0) { lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Fabric Port 0x%06x considered dead", + portid); continue; } @@ -3424,8 +3451,8 @@ pdb.portid != portid || wwpn != lp->port_wwn || wwnn != lp->node_wwn) { - isp_prt(isp, ISP_LOGDEBUG0, fconf, dbidx, - pdb.handle, pdb.portid, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + fconf, dbidx, pdb.handle, pdb.portid, (uint32_t) (wwnn >> 32), (uint32_t) wwnn, (uint32_t) (wwpn >> 32), (uint32_t) wwpn, lp->handle, portid, @@ -3448,7 +3475,7 @@ if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { FC_SCRATCH_RELEASE(isp); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } continue; @@ -3486,8 +3513,13 @@ lp->new_roles = nr; if (pdb.portid != lp->portid || nr != lp->roles || handle_changed) { + isp_prt(isp, ISP_LOGSANCFG, + "Fabric Port 0x%06x changed", portid); lp->state = FC_PORTDB_STATE_CHANGED; } else { + isp_prt(isp, ISP_LOGSANCFG, + "Fabric Port 0x%06x Now Pending Valid", + portid); lp->state = FC_PORTDB_STATE_PENDING_VALID; } continue; @@ -3495,49 +3527,54 @@ /* * Ah- a new entry. Search the database again for all non-NIL - * entries to make sure we never ever make a database entry - * with the same port id. + * entries to make sure we never ever make a new database entry + * with the same port id. While we're at it, mark where the + * last free entry was. */ - for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - if (dbidx >= FL_ID && dbidx <= SNS_ID) { + + dbidx = MAX_FC_TARG; + for (lp = fcp->portdb; lp < &fcp->portdb[MAX_FC_TARG]; lp++) { + if (lp >= &fcp->portdb[FL_ID] && + lp <= &fcp->portdb[SNS_ID]) { + continue; + } + if (lp->state == FC_PORTDB_STATE_NIL) { + if (dbidx == MAX_FC_TARG) { + dbidx = lp - fcp->portdb; + } continue; } - if (fcp->portdb[dbidx].state == FC_PORTDB_STATE_NIL) { + if (lp->state == FC_PORTDB_STATE_ZOMBIE) { continue; } - if (fcp->portdb[dbidx].portid == portid) { + if (lp->portid == portid) { break; } } - if (dbidx != MAX_FC_TARG) { + if (lp < &fcp->portdb[MAX_FC_TARG]) { isp_prt(isp, ISP_LOGWARN, "PortID 0x%06x already at %d handle %d state %d", - portid, dbidx, fcp->portdb[dbidx].handle, - fcp->portdb[dbidx].state); + portid, dbidx, lp->handle, lp->state); continue; } /* - * Find an empty database entry for it. + * We should have the index of the first free entry seen. */ - for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - if (dbidx >= FL_ID && dbidx <= SNS_ID) { - continue; - } - if (fcp->portdb[dbidx].state == FC_PORTDB_STATE_NIL) { - break; - } - } - if (dbidx == MAX_FC_TARG) { isp_prt(isp, ISP_LOGERR, - "port database too small to login fabric device" - "- increase MAX_FC_TARG"); + "port database too small to login PortID 0x%06x" + "- increase MAX_FC_TARG", portid); continue; } /* + * Otherwise, point to our new home. + */ + lp = &fcp->portdb[dbidx]; + + /* * Try to see if we are logged into this device, * and maybe log into it. * @@ -3547,7 +3584,7 @@ if (isp_login_device(isp, portid, &pdb, &oldhandle)) { if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { FC_SCRATCH_RELEASE(isp); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } continue; @@ -3563,13 +3600,11 @@ * that we do not make more than one entry that has the same * WWNN/WWPN duple */ - lp = &fcp->portdb[dbidx]; - for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { - if (fcp->portdb[dbidx].state == FC_PORTDB_STATE_NIL) { + if (dbidx >= FL_ID && dbidx <= SNS_ID) { continue; } - if (dbidx >= FL_ID && dbidx <= SNS_ID) { + if (fcp->portdb[dbidx].state == FC_PORTDB_STATE_NIL) { continue; } if (fcp->portdb[dbidx].node_wwn == wwnn && @@ -3578,33 +3613,61 @@ } } - if (dbidx != MAX_FC_TARG) { + if (dbidx == MAX_FC_TARG) { + MEMZERO(lp, sizeof (fcportdb_t)); + lp->handle = handle; + lp->node_wwn = wwnn; + lp->port_wwn = wwpn; + lp->new_portid = portid; + lp->new_roles = nr; + lp->state = FC_PORTDB_STATE_NEW; + isp_prt(isp, ISP_LOGSANCFG, + "Fabric Port 0x%06x is New Entry", portid); + continue; + } + + if (fcp->portdb[dbidx].state != FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGWARN, "PortID 0x%x 0x%08x%08x/0x%08x%08x %ld already at " - "idx %d", portid, + "idx %d, state 0x%x", portid, (uint32_t) (wwnn >> 32), (uint32_t) wwnn, (uint32_t) (wwpn >> 32), (uint32_t) wwpn, - (long) (lp - fcp->portdb), dbidx); + (long) (lp - fcp->portdb), dbidx, + fcp->portdb[dbidx].state); continue; } + /* + * We found a zombie entry that matches us. + * Revive it. We know that WWN and WWPN + * are the same. For fabric devices, we + * don't care that handle is different + * as we assign that. If role or portid + * are different, it maybe a changed device. + */ + lp = &fcp->portdb[dbidx]; lp->handle = handle; - lp->ini_map_idx = 0; - lp->node_wwn = wwnn; - lp->port_wwn = wwpn; lp->new_portid = portid; lp->new_roles = nr; - lp->state = FC_PORTDB_STATE_NEW; + if (lp->portid != portid || lp->roles != nr) { + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Zombie Fabric Port 0x%06x Now Changed", portid); + lp->state = FC_PORTDB_STATE_CHANGED; + } else { + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Zombie Fabric Port 0x%06x Now Pending Valid", + portid); + lp->state = FC_PORTDB_STATE_PENDING_VALID; + } } - FC_SCRATCH_RELEASE(isp); if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOGDEBUG0, "FC Scan Fabric Done"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Scan Fabric Done"); return (0); } @@ -3674,7 +3737,7 @@ } if (i == lim) { - isp_prt(isp, ISP_LOGINFO, "PLOGI 0x%06x failed", portid); + isp_prt(isp, ISP_LOGWARN, "PLOGI 0x%06x failed", portid); return (-1); } @@ -3832,14 +3895,16 @@ FC_SCRATCH_RELEASE(isp); if (ct->ct_cmd_resp == LS_RJT) { - isp_prt(isp, ISP_LOGWARN, "Register FC4 Type rejected"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Register FC4 Type rejected"); return (-1); } else if (ct->ct_cmd_resp == LS_ACC) { - isp_prt(isp, ISP_LOGDEBUG0, "Register FC4 Type accepted"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Register FC4 Type accepted"); return(0); } else { isp_prt(isp, ISP_LOGWARN, - "Register FC4 Type: %x", ct->ct_cmd_resp); + "Register FC4 Type: 0x%x", ct->ct_cmd_resp); return (-1); } } @@ -3934,9 +3999,12 @@ if (IS_FC(isp)) { fcparam *fcp = isp->isp_param; + /* + * Try again later. + */ if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate != LOOP_READY) { - return (CMD_RQLATER); + return (CMD_EAGAIN); } if (XS_TGT(xs) >= MAX_FC_TARG) { @@ -3951,6 +4019,13 @@ XS_SETERR(xs, HBA_SELTIMEOUT); return (CMD_COMPLETE); } + if (fcp->portdb[hdlidx].state == FC_PORTDB_STATE_ZOMBIE) { + return (CMD_RQLATER); + } + if (fcp->portdb[hdlidx].state != FC_PORTDB_STATE_VALID) { + XS_SETERR(xs, HBA_SELTIMEOUT); + return (CMD_COMPLETE); + } target = fcp->portdb[hdlidx].handle; } @@ -5111,7 +5186,7 @@ FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_LIP_RCVD; isp->isp_sendmarker = 1; - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp_async(isp, ISPASYNC_LIP, NULL); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, bus, mbox)) { @@ -5147,7 +5222,7 @@ isp->isp_sendmarker = 1; FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_LIP_RCVD; - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp_async(isp, ISPASYNC_LOOP_UP, NULL); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, bus, mbox)) { @@ -5160,7 +5235,7 @@ isp->isp_sendmarker = 1; FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_NIL; - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp_async(isp, ISPASYNC_LOOP_DOWN, NULL); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, bus, mbox)) { @@ -5173,7 +5248,7 @@ isp->isp_sendmarker = 1; FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_NIL; - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp_async(isp, ISPASYNC_LOOP_RESET, NULL); #ifdef ISP_TARGET_MODE if (isp_target_async(isp, bus, mbox)) { @@ -5185,7 +5260,7 @@ case ASYNC_PDB_CHANGED: isp->isp_sendmarker = 1; FCPARAM(isp)->isp_loopstate = LOOP_PDB_RCVD; - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp_async(isp, ISPASYNC_CHANGE_NOTIFY, ISPASYNC_CHANGE_PDB); break; @@ -5195,12 +5270,12 @@ } else { FCPARAM(isp)->isp_loopstate = LOOP_PDB_RCVD; } - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp_async(isp, ISPASYNC_CHANGE_NOTIFY, ISPASYNC_CHANGE_SNS); break; case ASYNC_PTPMODE: - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); isp->isp_sendmarker = 1; FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_LIP_RCVD; @@ -5215,7 +5290,7 @@ case ASYNC_CONNMODE: mbox = ISP_READ(isp, OUTMAILBOX1); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); switch (mbox) { case ISP_CONN_LOOP: isp_prt(isp, ISP_LOGINFO, @@ -5707,14 +5782,6 @@ mbs.logval = MBLOGALL; isp_mboxcmd_qnw(isp, &mbs, 1); } - - /* - * Probably overkill. - */ - isp->isp_sendmarker = 1; - FCPARAM(isp)->isp_loopstate = LOOP_PDB_RCVD; - isp_mark_portdb(isp, 1); - isp_async(isp, ISPASYNC_CHANGE_NOTIFY, ISPASYNC_CHANGE_OTHER); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_SELTIMEOUT); } @@ -5865,14 +5932,6 @@ mbs.logval = MBLOGALL; isp_mboxcmd_qnw(isp, &mbs, 1); } - - /* - * Probably overkill. - */ - isp->isp_sendmarker = 1; - FCPARAM(isp)->isp_loopstate = LOOP_PDB_RCVD; - isp_mark_portdb(isp, 1); - isp_async(isp, ISPASYNC_CHANGE_NOTIFY, ISPASYNC_CHANGE_OTHER); if (XS_NOERR(xs)) { XS_SETERR(xs, HBA_SELTIMEOUT); } @@ -7104,7 +7163,7 @@ uint32_t tmp; if (IS_FC(isp)) { - isp_mark_portdb(isp, 0); + ISP_MARK_PORTDB(isp, 0); } isp_reset(isp); if (isp->isp_state != ISP_RESETSTATE) { ==== //depot/projects/newisp/dev/isp/isp_freebsd.c#23 (text+ko) ==== @@ -41,6 +41,7 @@ #if __FreeBSD_version >= 500000 #include #endif +#include MODULE_VERSION(isp, 1); @@ -50,10 +51,12 @@ int isp_loop_down_limit = 300; /* default loop down limit */ int isp_change_is_bad = 0; /* "changed" devices are bad */ int isp_quickboot_time = 5; /* don't wait more than N secs for loop up */ -int isp_lost_device_time = 60; /* grace time before reporting device lost */ +int isp_gone_device_time = 60; /* grace time before reporting device lost */ static const char *roles[4] = { "(none)", "Target", "Initiator", "Target/Initiator" }; +static const char prom3[] = + "PortID 0x%06x Departed from Target %u because of %s"; static d_ioctl_t ispioctl; static void isp_intr_enable(void *); @@ -657,16 +660,20 @@ "wwpn", CTLFLAG_RD, isp->isp_osinfo.sysctl_info.fc.wwpn, 0, "World Wide Port Name"); - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "loop_down_time", + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "loop_down_time", CTLFLAG_RD, &isp->isp_osinfo.loop_down_time, 0, "How long Loop has been down"); - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "loop_down_limit", + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "loop_down_limit", CTLFLAG_RW, &isp->isp_osinfo.loop_down_limit, 0, "How long to wait for loop to come back up"); - printf("loop_down %d loop_down_limit %d\n", - isp->isp_osinfo.loop_down_time, isp->isp_osinfo.loop_down_limit); + SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "gone_device_time", + CTLFLAG_RW, &isp->isp_osinfo.gone_device_time, 0, + "How long to wait for a device to reappear"); } #endif @@ -2070,7 +2077,9 @@ if (XS_CMD_DONE_P(xs)) { isp_prt(isp, ISP_LOGDEBUG2, "watchdog cleanup for handle 0x%x", handle); + ISPLOCK_2_CAMLOCK(isp); xpt_done((union ccb *) xs); + CAMLOCK_2_ISPLOCK(isp); } else if (XS_CMD_GRACE_P(xs)) { /* * Make sure the command is *really* dead before we @@ -2090,7 +2099,9 @@ "watchdog timeout for handle 0x%x", handle); XS_SETERR(xs, CAM_CMD_TIMEOUT); XS_CMD_C_WDOG(xs); + ISPLOCK_2_CAMLOCK(isp); isp_done(xs); + CAMLOCK_2_ISPLOCK(isp); } else { XS_CMD_C_WDOG(xs); xs->ccb_h.timeout_ch = timeout(isp_watchdog, xs, hz); @@ -2098,20 +2109,103 @@ isp->isp_sendmarker |= 1 << XS_CHANNEL(xs); } } else { - isp_prt(isp, ISP_LOGDEBUG2, "watchdog with no command"); + isp_prt(isp, ISP_LOGWARN, "watchdog with no command"); + } + ISP_UNLOCK(isp); +} + +#if __FreeBSD_version >= 500000 +#define isp_make_here(isp, tgt) isp_announce(isp, tgt, AC_FOUND_DEVICE) +#define isp_make_gone(isp, tgt) isp_announce(isp, tgt, AC_LOST_DEVICE) + +/* + * Support function for Announcement + */ +static void +isp_announce(ispsoftc_t *isp, int tgt, int action) +{ + struct cam_path *tmppath; + ISPLOCK_2_CAMLOCK(isp); + if (xpt_create_path(&tmppath, NULL, cam_sim_path(isp->isp_sim), tgt, + CAM_LUN_WILDCARD) == CAM_REQ_CMP) { + xpt_async(action, tmppath, NULL); + xpt_free_path(tmppath); + } + CAMLOCK_2_ISPLOCK(isp); +} +#else +#define isp_make_here(isp, tgt) do { ; } while (0) +#define isp_make_gone(isp, tgt) do { ; } while (0) +#endif + + +/* + * Gone Device Timer Function- when we have decided that a device has gone + * away, we wait a specific period of time prior to telling the OS it has + * gone away. + * + * This timer function fires once a second and then scans the port database + * for devices that are marked dead but still have a virtual target assigned. + * We decrement a counter for that port database entry, and when it hits zero, + * we tell the OS the device has gone away. + */ +static void +isp_gdt(void *arg) +{ + ispsoftc_t *isp = arg; + fcportdb_t *lp; + int dbidx, tgt, more_to_do = 0; + + isp_prt(isp, ISP_LOGDEBUG0, "GDT timer expired"); + ISP_LOCK(isp); + for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { + lp = &FCPARAM(isp)->portdb[dbidx]; + + if (lp->state != FC_PORTDB_STATE_ZOMBIE) { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Sun Nov 12 19:32:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 539B116A4D2; Sun, 12 Nov 2006 19:32:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 268E416A494 for ; Sun, 12 Nov 2006 19:32:39 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CE91143DA6 for ; Sun, 12 Nov 2006 19:31:04 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACJUuAf072028 for ; Sun, 12 Nov 2006 19:30:56 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACJUuUb072025 for perforce@freebsd.org; Sun, 12 Nov 2006 19:30:56 GMT (envelope-from mjacob@freebsd.org) Date: Sun, 12 Nov 2006 19:30:56 GMT Message-Id: <200611121930.kACJUuUb072025@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109816 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 19:32:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=109816 Change 109816 by mjacob@newisp on 2006/11/12 19:30:44 Fix a factory defect in isp_mstohz. Affected files ... .. //depot/projects/newisp/dev/isp/isp_freebsd.c#24 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp_freebsd.c#24 (text+ko) ==== @@ -3441,7 +3441,10 @@ int isp_mstohz(int ms) { - ms = ((ms + 999) / 1000); + struct timeval t; + t.tv_sec = ms / 1000; + t.tv_usec = (ms % 1000) * 1000; + ms = tvtohz(&t); if (ms < 0) { ms = 0x7fffffff; } From owner-p4-projects@FreeBSD.ORG Sun Nov 12 19:32:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7371816A49E; Sun, 12 Nov 2006 19:32:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5188216A412 for ; Sun, 12 Nov 2006 19:32:46 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1072943DCF for ; Sun, 12 Nov 2006 19:31:04 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACJUu6B072022 for ; Sun, 12 Nov 2006 19:30:56 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACJUul5072019 for perforce@freebsd.org; Sun, 12 Nov 2006 19:30:56 GMT (envelope-from mjacob@freebsd.org) Date: Sun, 12 Nov 2006 19:30:56 GMT Message-Id: <200611121930.kACJUul5072019@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109815 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 19:32:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=109815 Change 109815 by mjacob@newisp on 2006/11/12 19:30:22 Be more generous timewise for PLOGI. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#30 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#30 (text+ko) ==== @@ -2123,6 +2123,7 @@ mbs.param[6] = DMA_WD3(FCPARAM(isp)->isp_scdma); mbs.param[7] = DMA_WD2(FCPARAM(isp)->isp_scdma); mbs.logval = MBLOGALL; + mbs.timeout = 250000; MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -2232,6 +2233,7 @@ mbs.param[3] = portid; mbs.logval = MBLOGNONE; + mbs.timeout = 250000; isp_mboxcmd(isp, &mbs); switch (mbs.param[0]) { From owner-p4-projects@FreeBSD.ORG Sun Nov 12 23:49:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9579D16A412; Sun, 12 Nov 2006 23:49:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E8B816A407 for ; Sun, 12 Nov 2006 23:49:32 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EA1D743D82 for ; Sun, 12 Nov 2006 23:49:26 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACNnQ1S031626 for ; Sun, 12 Nov 2006 23:49:26 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACNnQFR031617 for perforce@freebsd.org; Sun, 12 Nov 2006 23:49:26 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 23:49:26 GMT Message-Id: <200611122349.kACNnQFR031617@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109822 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 23:49:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=109822 Change 109822 by sam@sam_ebb on 2006/11/12 23:49:00 mark struct ether_header packed so gcc doesn't assume the struct is 32-bit aligned; this fixes if_bridge Affected files ... .. //depot/projects/arm/src/sys/net/ethernet.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/net/ethernet.h#2 (text+ko) ==== @@ -61,7 +61,7 @@ u_char ether_dhost[ETHER_ADDR_LEN]; u_char ether_shost[ETHER_ADDR_LEN]; u_short ether_type; -}; +} __packed; /* * Structure of a 48-bit Ethernet address. From owner-p4-projects@FreeBSD.ORG Sun Nov 12 23:51:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4266216A47E; Sun, 12 Nov 2006 23:51:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F019416A407 for ; Sun, 12 Nov 2006 23:51:34 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A99743D82 for ; Sun, 12 Nov 2006 23:51:29 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACNpTbp032327 for ; Sun, 12 Nov 2006 23:51:29 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACNpT2Y032322 for perforce@freebsd.org; Sun, 12 Nov 2006 23:51:29 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 23:51:29 GMT Message-Id: <200611122351.kACNpT2Y032322@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109823 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 23:51:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=109823 Change 109823 by sam@sam_ebb on 2006/11/12 23:51:11 disable IDENTIFY byte swapping until we can resolve how best to handle this on big-endian machines where bus_space ops return data in host byte order Affected files ... .. //depot/projects/arm/src/sys/dev/ata/ata-all.c#13 edit Differences ... ==== //depot/projects/arm/src/sys/dev/ata/ata-all.c#13 (text+ko) ==== @@ -601,6 +601,8 @@ isprint(atadev->param.model[1]))) { struct ata_params *atacap = &atadev->param; char buffer[64]; +#if 0 +/* XXX not right on xscale; ditch for now */ #if BYTE_ORDER == BIG_ENDIAN int16_t *ptr; @@ -609,6 +611,7 @@ *ptr = bswap16(*ptr); } #endif +#endif if (!(!strncmp(atacap->model, "FX", 2) || !strncmp(atacap->model, "NEC", 3) || !strncmp(atacap->model, "Pioneer", 7) || From owner-p4-projects@FreeBSD.ORG Sun Nov 12 23:55:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1F71B16A4EB; Sun, 12 Nov 2006 23:55:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF9CF16A4E9 for ; Sun, 12 Nov 2006 23:55:35 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA5E743D58 for ; Sun, 12 Nov 2006 23:55:35 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kACNtZGV033348 for ; Sun, 12 Nov 2006 23:55:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kACNtZFN033345 for perforce@freebsd.org; Sun, 12 Nov 2006 23:55:35 GMT (envelope-from sam@freebsd.org) Date: Sun, 12 Nov 2006 23:55:35 GMT Message-Id: <200611122355.kACNtZFN033345@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109824 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2006 23:55:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=109824 Change 109824 by sam@sam_ebb on 2006/11/12 23:54:47 o enable ata support; it now works o enable DEVICE_POLLING; it's useful with npe Affected files ... .. //depot/projects/arm/src/sys/arm/conf/AVILA#6 edit Differences ... ==== //depot/projects/arm/src/sys/arm/conf/AVILA#6 (text+ko) ==== @@ -31,8 +31,9 @@ makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions CONF_CFLAGS=-mcpu=xscale +#options HZ=1000 options HZ=100 -#options DEVICE_POLLING +options DEVICE_POLLING options INVARIANTS #Enable calls of extra sanity checking options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS @@ -85,9 +86,8 @@ device ixpiic device ata +device ata_avila # Gateworks CF/IDE support device atadisk # ATA disk drives -options ATA_STATIC_ID # Static device numbering -#device ata_avila # Gateworks CF/IDE support device npe # Network Processing Engine device npe_fw # NPE firmware From owner-p4-projects@FreeBSD.ORG Mon Nov 13 00:06:50 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9ED9316A415; Mon, 13 Nov 2006 00:06:50 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7933116A40F for ; Mon, 13 Nov 2006 00:06:50 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2F68A43D4C for ; Mon, 13 Nov 2006 00:06:50 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAD06oSx036533 for ; Mon, 13 Nov 2006 00:06:50 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAD06nGY036530 for perforce@freebsd.org; Mon, 13 Nov 2006 00:06:49 GMT (envelope-from sam@freebsd.org) Date: Mon, 13 Nov 2006 00:06:49 GMT Message-Id: <200611130006.kAD06nGY036530@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109825 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 00:06:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=109825 Change 109825 by sam@sam_ebb on 2006/11/13 00:06:04 don't need debug hack any more Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#8 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#8 (text+ko) ==== @@ -160,7 +160,6 @@ INTR_TYPE_BIO | INTR_MPSAFE | INTR_ENTROPY, ata_avila_intr, sc, &sc->sc_ih); -bootverbose=1; /* attach channel on this controller */ device_add_child(dev, "ata", devclass_find_free_unit(ata_devclass, 0)); bus_generic_attach(dev); From owner-p4-projects@FreeBSD.ORG Mon Nov 13 06:24:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BEDB116A417; Mon, 13 Nov 2006 06:24:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 92C7216A415 for ; Mon, 13 Nov 2006 06:24:24 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 60A0343D5A for ; Mon, 13 Nov 2006 06:24:24 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAD6OOUF008116 for ; Mon, 13 Nov 2006 06:24:24 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAD6ONwn008109 for perforce@freebsd.org; Mon, 13 Nov 2006 06:24:23 GMT (envelope-from sam@freebsd.org) Date: Mon, 13 Nov 2006 06:24:23 GMT Message-Id: <200611130624.kAD6ONwn008109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109841 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 06:24:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=109841 Change 109841 by sam@sam_ebb on 2006/11/13 06:24:17 ixp425 watchdog timer; the specs don't say what the units are for the timer register so this is almost certainly writing the wrong value (but otherwise it seems to DTRT) Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/files.ixp425#7 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#18 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_wdog.c#1 add Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/files.ixp425#7 (text+ko) ==== @@ -5,6 +5,7 @@ arm/xscale/ixp425/ixp425_mem.c standard arm/xscale/ixp425/ixp425_space.c standard arm/xscale/ixp425/ixp425_timer.c standard +arm/xscale/ixp425/ixp425_wdog.c optional ixpwdog arm/xscale/ixp425/ixp425_iic.c optional ixpiic arm/xscale/ixp425/ixp425_pci.c optional pci arm/xscale/ixp425/ixp425_pci_asm.S optional pci ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425.c#18 (text+ko) ==== @@ -225,6 +225,7 @@ device_add_child(dev, "pcib", 0); device_add_child(dev, "ixpclk", 0); + device_add_child(dev, "ixpwdog", 0); device_add_child(dev, "ixpiic", 0); device_add_child(dev, "uart", 0); /* XXX these are optional, what if they are not configured? */ From owner-p4-projects@FreeBSD.ORG Mon Nov 13 13:40:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C533B16A416; Mon, 13 Nov 2006 13:40:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8103116A412 for ; Mon, 13 Nov 2006 13:40:39 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9FE2A43D5D for ; Mon, 13 Nov 2006 13:40:38 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADDecUd099381 for ; Mon, 13 Nov 2006 13:40:38 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADDecfr099378 for perforce@freebsd.org; Mon, 13 Nov 2006 13:40:38 GMT (envelope-from bushman@freebsd.org) Date: Mon, 13 Nov 2006 13:40:38 GMT Message-Id: <200611131340.kADDecfr099378@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 109847 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 13:40:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=109847 Change 109847 by bushman@bushman_nss_ldap_cached on 2006/11/13 13:39:38 ifndef that allows to build test ports easily Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#19 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/nss_ldap.c#19 (text+ko) ==== @@ -55,7 +55,9 @@ #include "ldap_group.h" #include "ldap_serv.h" +#ifndef NSS_LDAP_CONF_PATH #define NSS_LDAP_CONF_PATH "/etc/nss_ldap.conf" +#endif /* * Defining NSDB_SERVICES and NSDB_SERVICES_COMPAT to be syntaxically From owner-p4-projects@FreeBSD.ORG Mon Nov 13 13:56:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E214B16A417; Mon, 13 Nov 2006 13:56:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B946A16A415 for ; Mon, 13 Nov 2006 13:56:07 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8371143D8A for ; Mon, 13 Nov 2006 13:55:58 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADDtwwH002439 for ; Mon, 13 Nov 2006 13:55:58 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADDtwrU002436 for perforce@freebsd.org; Mon, 13 Nov 2006 13:55:58 GMT (envelope-from bushman@freebsd.org) Date: Mon, 13 Nov 2006 13:55:58 GMT Message-Id: <200611131355.kADDtwrU002436@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 109848 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 13:56:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=109848 Change 109848 by bushman@bushman_nss_ldap_cached on 2006/11/13 13:55:28 small bug fixed Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/hashtable.h#2 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/nss_ldap/hashtable.h#2 (text+ko) ==== @@ -188,6 +188,8 @@ data, sizeof(type)); \ qsort(the_entry->field.values, the_entry->field.size, \ sizeof(type), CMP); \ + \ + return (0); \ } \ \ type *name##_ENTRY_FIND(struct entry_ *the_entry, type *key) \ @@ -200,6 +202,7 @@ type *name##_ENTRY_FIND_SPECIAL(struct entry_ *the_entry, type *key, \ int (*compar) (const void *, const void *)) \ { \ + \ return ((type *)bsearch(key, the_entry->field.values, \ the_entry->field.size, sizeof(type), compar)); \ } \ From owner-p4-projects@FreeBSD.ORG Mon Nov 13 15:01:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A57A416A560; Mon, 13 Nov 2006 15:01:45 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 75E7816A554 for ; Mon, 13 Nov 2006 15:01:45 +0000 (UTC) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F03643E92 for ; Mon, 13 Nov 2006 14:49:21 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADEn6Uv011700 for ; Mon, 13 Nov 2006 14:49:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADEn6au011697 for perforce@freebsd.org; Mon, 13 Nov 2006 14:49:06 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Mon, 13 Nov 2006 14:49:06 GMT Message-Id: <200611131449.kADEn6au011697@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Cc: Subject: PERFORCE change 109851 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 15:01:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=109851 Change 109851 by rwatson@rwatson_fledge on 2006/11/13 14:48:29 Add SecurityFocus.com interview. Affected files ... .. //depot/projects/trustedbsd/www/news.page#8 edit Differences ... ==== //depot/projects/trustedbsd/www/news.page#8 (text+ko) ==== @@ -36,7 +36,7 @@ - $P4: //depot/projects/trustedbsd/www/news.page#7 $ + $P4: //depot/projects/trustedbsd/www/news.page#8 $ @@ -49,6 +49,14 @@
+
November 10, 2006 SecurityFocus.com interview on the + TrustedBSD Audit implementation
+ +

Robert Watson was + interviewed by SecurityFocus.com on the topic of the TrustedBSD + Audit implementation included in upcoming FreeBSD 6.2 + release.

+
August 16, 2006 FreeBSD 6 merge beginning; FreeBSD 6.2 to ship with experimental Audit support
From owner-p4-projects@FreeBSD.ORG Mon Nov 13 15:13:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 902DC16A417; Mon, 13 Nov 2006 15:13:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2EC2A16A407 for ; Mon, 13 Nov 2006 15:13:28 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6524143E50 for ; Mon, 13 Nov 2006 14:54:47 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADEsEBv013102 for ; Mon, 13 Nov 2006 14:54:14 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADEsEBJ013099 for perforce@freebsd.org; Mon, 13 Nov 2006 14:54:14 GMT (envelope-from bushman@freebsd.org) Date: Mon, 13 Nov 2006 14:54:14 GMT Message-Id: <200611131454.kADEsEBJ013099@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 109852 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 15:13:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=109852 Change 109852 by bushman@bushman_nss_ldap_cached on 2006/11/13 14:53:56 + hashtable.h updated + configuration_entry->flags field added (1 int insted of 3) Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/hashtable.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_rs_query.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_ws_query.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/parser.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#6 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#8 (text) ==== @@ -308,7 +308,7 @@ entries_size = configuration_get_entries_size(config); for (i = 0; i < entries_size; ++i) { entry = configuration_get_entry(config, i); - if (entry->precache & PRECACHING_ENABLED) { + if (entry->flags & CONFIG_ENTRY_PRECACHING_ENABLED_FLAG) { mp_agent = (struct multipart_agent *)find_agent( s_agent_table, entry->name, MULTIPART_AGENT); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.c#5 (text) ==== @@ -593,7 +593,8 @@ HASHTABLE_INIT(&(new_common_entry->items), struct cache_ht_item_data_, data, - new_common_entry->common_params.cache_entries_size); + new_common_entry->common_params.cache_entries_size, + HASHTABLE_INITIAL_ENTRIES_CAPACITY); if (!HASHTABLE_OK(&(new_common_entry->items))) { free(new_common_entry->common_params.entry_name); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#5 (text) ==== @@ -70,8 +70,8 @@ TRACE_IN(check_configuration_entry); retval = 0; - if ((entry->precache & PRECACHING_ENABLED) && - (entry->perform_actual_lookups == 0)) { + if ((entry->flags & CONFIG_ENTRY_PRECACHING_ENABLED_FLAG) && + !(entry->flags & CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG)) { LOG_ERR_2("check_configuration_entry", "precaching for '%s' can't be done without " "perform_actual_lookups turned on", entry->name); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#5 (text) ==== @@ -57,8 +57,11 @@ #define DEFAULT_MULITPART_SESSIONS_SIZE (1024) #define DEFAULT_MULITPART_LIFETIME (3600) -#define PRECACHING_ENABLED (1) -#define PRECACHING_NO_AUTO_FLUSH (1 << 1) +#define CONFIG_ENTRY_DISABLED_FLAG (1) +#define CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG (1 << 1) +#define CONFIG_ENTRY_PRECACHING_ENABLED_FLAG (1 << 2) +#define CONFIG_ENTRY_PRECACHING_NO_AUTO_FLUSH_FLAG (1 << 3) + extern const char *c_default_entries[6]; @@ -93,9 +96,7 @@ pthread_mutex_t negative_cache_lock; pthread_mutex_t mp_cache_lock; - int perform_actual_lookups; - int precache; - int enabled; + int flags; }; /* ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/hashtable.h#5 (text) ==== @@ -38,7 +38,7 @@ /* * This file contains queue.h-like macro definitions for hash tables. * Hash table is organized as an array of the specified size of the user - * defined (with HASTABLE_ENTRY_HEAD) structures. Each hash table + * defined (with HASHTABLE_ENTRY_HEAD) structures. Each hash table * entry (user defined structure) stores its elements in the sorted array. * You can place elements into the hash table, retrieve elements with * specified key, traverse through all elements, and delete them. @@ -72,7 +72,7 @@ * Unlike most of queue.h data types, hash tables can not be initialized * statically - so there is no HASHTABLE_HEAD_INITIALIZED macro. */ -#define HASHTABLE_INIT(table, type, field, _entries_size) \ +#define HASHTABLE_INIT(table, type, field, _entries_size, in_ent_cap) \ do { \ hashtable_index_t var; \ (table)->entries = malloc(sizeof(*(table)->entries) * \ @@ -83,14 +83,13 @@ (table)->entries_size = (_entries_size); \ for (var = 0; var < HASHTABLE_ENTRIES_COUNT(table); ++var) {\ (table)->entries[var].field.capacity = \ - HASHTABLE_INITIAL_ENTRIES_CAPACITY; \ + in_ent_cap; \ (table)->entries[var].field.size = 0; \ (table)->entries[var].field.values = malloc( \ sizeof(type) * \ - HASHTABLE_INITIAL_ENTRIES_CAPACITY); \ + in_ent_cap); \ if ((table)->entries[var].field.values == NULL) {\ HASHTABLE_DESTROY(table, field); \ - (table)->entries = NULL; \ break; \ } \ } \ @@ -105,9 +104,10 @@ #define HASHTABLE_DESTROY(table, field) \ do { \ hashtable_index_t var; \ - for (var = 0; var < HASHTABLE_ENTRIES_COUNT(table); ++var) {\ + for (var = 0; var < HASHTABLE_ENTRIES_COUNT(table); ++var)\ free((table)->entries[var].field.values); \ - } \ + free((table)->entries); \ + (table)->entries = NULL; \ } while (0) #define HASHTABLE_GET_ENTRY(table, hash) (&((table)->entries[hash])) @@ -138,25 +138,32 @@ ((entry)->field.capacity) #define HASHTABLE_ENTRY_CAPACITY_INCREASE(entry, field, type) \ - (entry)->field.capacity *= 2; \ - (entry)->field.values = (type *)realloc((entry)->field.values, \ - (entry)->field.capacity * sizeof(type)); + do { \ + (entry)->field.capacity *= 2; \ + (entry)->field.values = (type *)realloc((entry)->field.values,\ + (entry)->field.capacity * sizeof(type)); \ + } while (0) \ #define HASHTABLE_ENTRY_CAPACITY_DECREASE(entry, field, type) \ - (entry)->field.capacity /= 2; \ - (entry)->field.values = (type *)realloc((entry)->field.values, \ - (entry)->field.capacity * sizeof(type)); + do { \ + (entry)->field.capacity /= 2; \ + (entry)->field.values = (type *)realloc((entry)->field.values,\ + (entry)->field.capacity * sizeof(type)); \ + } while (0) + +#define HASHTABLE_ENTRY_CAPACITY_OP_OK(entry, field) \ + ((entry)->field.values != NULL) /* * Generates prototypes for the hash table functions */ #define HASHTABLE_PROTOTYPE(name, entry_, type) \ hashtable_index_t name##_CALCULATE_HASH(struct name *, type *); \ -void name##_ENTRY_STORE(struct entry_*, type *); \ +int name##_ENTRY_STORE(struct entry_*, type *); \ type *name##_ENTRY_FIND(struct entry_*, type *); \ type *name##_ENTRY_FIND_SPECIAL(struct entry_ *, type *, \ int (*) (const void *, const void *)); \ -void name##_ENTRY_REMOVE(struct entry_*, type *); +int name##_ENTRY_REMOVE(struct entry_*, type *); /* * Generates implementations of the hash table functions @@ -168,17 +175,21 @@ return HASH(data, table->entries_size); \ } \ \ -void name##_ENTRY_STORE(struct entry_ *the_entry, type *data) \ +int name##_ENTRY_STORE(struct entry_ *the_entry, type *data) \ { \ \ - if (the_entry->field.size == the_entry->field.capacity) \ + if (the_entry->field.size == the_entry->field.capacity) { \ HASHTABLE_ENTRY_CAPACITY_INCREASE(the_entry, field, type);\ + if (!HASHTABLE_ENTRY_CAPACITY_OP_OK(the_entry, field)) \ + return (-1); \ + } \ \ memcpy(&(the_entry->field.values[the_entry->field.size++]), \ - data, \ - sizeof(type)); \ + data, sizeof(type)); \ qsort(the_entry->field.values, the_entry->field.size, \ sizeof(type), CMP); \ + \ + return (0); \ } \ \ type *name##_ENTRY_FIND(struct entry_ *the_entry, type *key) \ @@ -191,16 +202,18 @@ type *name##_ENTRY_FIND_SPECIAL(struct entry_ *the_entry, type *key, \ int (*compar) (const void *, const void *)) \ { \ + \ return ((type *)bsearch(key, the_entry->field.values, \ the_entry->field.size, sizeof(type), compar)); \ } \ \ -void name##_ENTRY_REMOVE(struct entry_ *the_entry, type *del_elm) \ +int name##_ENTRY_REMOVE(struct entry_ *the_entry, type *del_elm) \ { \ \ memmove(del_elm, del_elm + 1, \ (&the_entry->field.values[--the_entry->field.size] - del_elm) *\ sizeof(type)); \ + return (0); \ } /* ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_rs_query.c#6 (text) ==== @@ -189,7 +189,7 @@ goto fin; } - if (qstate->config_entry->enabled == 0) { + if (qstate->config_entry->flags & CONFIG_ENTRY_DISABLED_FLAG) { c_mp_rs_response->error_code = EACCES; LOG_ERR_2("read_session_request", @@ -198,7 +198,8 @@ goto fin; } - if (qstate->config_entry->perform_actual_lookups != 0) + if (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG) dec_cache_entry_name = strdup( qstate->config_entry->mp_cache_params.entry_name); else { @@ -223,7 +224,8 @@ configuration_unlock(s_configuration); if ((c_entry == INVALID_CACHE) && - (qstate->config_entry->perform_actual_lookups != 0)) + (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG)) c_entry = register_new_mp_cache_entry(qstate, dec_cache_entry_name); @@ -236,7 +238,8 @@ CELT_MULTIPART); if ((rs == INVALID_CACHE_MP_READ_SESSION) && - (qstate->config_entry->perform_actual_lookups != 0)) { + (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG)) { lookup_agent = find_agent(s_agent_table, c_mp_rs_request->entry, MULTIPART_AGENT); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_ws_query.c#5 (text) ==== @@ -188,7 +188,7 @@ goto fin; } - if (qstate->config_entry->enabled == 0) { + if (qstate->config_entry->flags & CONFIG_ENTRY_DISABLED_FLAG) { c_mp_ws_response->error_code = EACCES; LOG_ERR_2("write_session_request", @@ -197,7 +197,8 @@ goto fin; } - if (qstate->config_entry->perform_actual_lookups != 0) { + if (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG) { c_mp_ws_response->error_code = EOPNOTSUPP; LOG_ERR_2("write_session_request", ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/parser.c#5 (text) ==== @@ -43,6 +43,7 @@ static enum cache_policy_t get_policy(const char *); static int get_yesno(const char *); static int check_cachename(const char *); +static void set_check_files(struct configuration *, const char *, int); static void set_keep_hot_count(struct configuration *, const char *, int); static void set_negative_policy(struct configuration *, const char *, enum cache_policy_t); @@ -125,12 +126,28 @@ TRACE_IN(enable_cache); entry = find_create_entry(config, entry_name); - if (entry != NULL) - entry->enabled = flag; + if (entry != NULL) { + if (flag != 0) + entry->flags &= ~CONFIG_ENTRY_DISABLED_FLAG; + else + entry->flags |= CONFIG_ENTRY_DISABLED_FLAG; + } TRACE_OUT(enable_cache); } static void +set_check_files(struct configuration *config, const char *entry_name, int flag) +{ + struct configuration_entry *entry; + + TRACE_IN(set_check_files); + entry = find_create_entry(config, entry_name); +// if (entry != NULL) +// entry->check_files = flag; + TRACE_OUT(set_check_files); +} + +static void set_positive_time_to_live(struct configuration *config, const char *entry_name, int ttl) { @@ -172,9 +189,9 @@ } if (flag != 0) - entry->precache |= PRECACHING_ENABLED; + entry->flags |= CONFIG_ENTRY_PRECACHING_ENABLED_FLAG; else - entry->precache &= ~PRECACHING_ENABLED; + entry->flags &= ~CONFIG_ENTRY_PRECACHING_ENABLED_FLAG; TRACE_OUT(set_precaching); } @@ -195,9 +212,9 @@ return; } if (flag != 0) - entry->precache |= PRECACHING_NO_AUTO_FLUSH; + entry->flags |= CONFIG_ENTRY_PRECACHING_NO_AUTO_FLUSH_FLAG; else - entry->precache &= ~PRECACHING_NO_AUTO_FLUSH; + entry->flags &= ~CONFIG_ENTRY_PRECACHING_NO_AUTO_FLUSH_FLAG; TRACE_OUT(set_precaching); } @@ -210,7 +227,7 @@ struct timeval lifetime; TRACE_IN(set_negative_time_to_live); - assert(nttl > 0); + assert(nttl >= 0); assert(entry_name != NULL); memset(&lifetime, 0, sizeof(struct timeval)); lifetime.tv_sec = nttl; @@ -294,8 +311,14 @@ assert(entry_name != NULL); entry = find_create_entry(config, entry_name); - if (entry != NULL) - entry->perform_actual_lookups = flag; + if (entry != NULL) { + if (flag != 0) + entry->flags |= + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG; + else + entry->flags &= + ~CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG; + } TRACE_OUT(set_perform_actual_lookups); } @@ -324,9 +347,9 @@ get_yesno(const char *str) { - if (strcmp(str, "yes") == 0) + if (strcasecmp(str, "yes") == 0) return (1); - else if (strcmp(str, "no") == 0) + else if (strcasecmp(str, "no") == 0) return (0); else return (-1); @@ -357,11 +380,11 @@ get_policy(const char *str) { - if (strcmp(str, "fifo") == 0) + if (strcasecmp(str, "fifo") == 0) return (CPT_FIFO); - else if (strcmp(str, "lru") == 0) + else if (strcasecmp(str, "lru") == 0) return (CPT_LRU); - else if (strcmp(str, "lfu") == 0) + else if (strcasecmp(str, "lfu") == 0) return (CPT_LFU); return (-1); @@ -421,9 +444,18 @@ case '#': case '\0': continue; + case 'c': + if ((field_count == 3) && + (strcasecmp(fields[0], "check-files") == 0) && + (check_cachename(fields[1]) == 0) && + ((value = get_yesno(fields[2])) != -1)) { + set_check_files(config, fields[1], value); + continue; + } + break; case 'e': if ((field_count == 3) && - (strcmp(fields[0], "enable-cache") == 0) && + (strcasecmp(fields[0], "enable-cache") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_yesno(fields[2])) != -1)) { enable_cache(config, fields[1], value); @@ -432,40 +464,40 @@ break; case 'd': if ((field_count == 2) && - (strcmp(fields[0], "debug-level") == 0) && + (strcasecmp(fields[0], "debug-level") == 0) && ((value = get_number(fields[1], 0, 10)) != -1)) { continue; } break; case 'p': if ((field_count == 3) && - (strcmp(fields[0], "positive-time-to-live") == 0) && + (strcasecmp(fields[0], "positive-time-to-live") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 0, -1)) != -1)) { set_positive_time_to_live(config, fields[1], value); continue; } else if ((field_count == 3) && - (strcmp(fields[0], "positive-policy") == 0) && + (strcasecmp(fields[0], "positive-policy") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_policy(fields[2])) != -1)) { set_positive_policy(config, fields[1], value); continue; } else if ((field_count == 3) && - (strcmp(fields[0], "perform-actual-lookups") == 0) && + (strcasecmp(fields[0], "perform-actual-lookups") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_yesno(fields[2])) != -1)) { set_perform_actual_lookups(config, fields[1], value); continue; } else if ((field_count == 3) && - (strcmp(fields[0], "precache") == 0) && + (strcasecmp(fields[0], "precache") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_yesno(fields[2])) != -1)) { set_precache(config, fields[1], value); continue; } else if ((field_count == 3) && - (strcmp(fields[0], "precache-no-auto-flush") == 0) && + (strcasecmp(fields[0], "precache-no-auto-flush") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_yesno(fields[2])) != -1)) { set_precache_no_auto_flush(config, fields[1], @@ -475,14 +507,14 @@ break; case 'n': if ((field_count == 3) && - (strcmp(fields[0], "negative-time-to-live") == 0) && + (strcasecmp(fields[0], "negative-time-to-live") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 0, -1)) != -1)) { set_negative_time_to_live(config, fields[1], value); continue; } else if ((field_count == 3) && - (strcmp(fields[0], "negative-policy") == 0) && + (strcasecmp(fields[0], "negative-policy") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_policy(fields[2])) != -1)) { set_negative_policy(config, @@ -492,7 +524,7 @@ break; case 's': if ((field_count == 3) && - (strcmp(fields[0], "suggested-size") == 0) && + (strcasecmp(fields[0], "suggested-size") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 1, -1)) != -1)) { set_suggested_size(config, fields[1], value); @@ -501,7 +533,7 @@ break; case 't': if ((field_count == 2) && - (strcmp(fields[0], "threads") == 0) && + (strcasecmp(fields[0], "threads") == 0) && ((value = get_number(fields[1], 1, -1)) != -1)) { set_threads_num(config, value); continue; @@ -509,7 +541,7 @@ break; case 'k': if ((field_count == 3) && - (strcmp(fields[0], "keep-hot-count") == 0) && + (strcasecmp(fields[0], "keep-hot-count") == 0) && (check_cachename(fields[1]) == 0) && ((value = get_number(fields[2], 0, -1)) != -1)) { set_keep_hot_count(config, ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#6 (text) ==== @@ -427,7 +427,7 @@ goto fin; } - if (qstate->config_entry->enabled == 0) { + if (qstate->config_entry->flags & CONFIG_ENTRY_DISABLED_FLAG) { write_response->error_code = EACCES; LOG_ERR_2("write_request", @@ -436,7 +436,8 @@ goto fin; } - if (qstate->config_entry->perform_actual_lookups != 0) { + if (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG) { write_response->error_code = EOPNOTSUPP; LOG_ERR_2("write_request", @@ -501,7 +502,7 @@ goto fin; } - if (qstate->config_entry->enabled == 0) { + if (qstate->config_entry->flags & CONFIG_ENTRY_DISABLED_FLAG) { write_response->error_code = EACCES; LOG_ERR_2("negative_write_request", @@ -510,7 +511,8 @@ goto fin; } - if (qstate->config_entry->perform_actual_lookups != 0) { + if (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG) { write_response->error_code = EOPNOTSUPP; LOG_ERR_2("negative_write_request", @@ -700,7 +702,7 @@ goto fin; } - if (qstate->config_entry->enabled == 0) { + if (qstate->config_entry->flags & CONFIG_ENTRY_DISABLED_FLAG) { read_response->error_code = EACCES; LOG_ERR_2("read_request", @@ -713,7 +715,8 @@ * if we perform lookups by ourselves, then we don't need to separate * cache entries by euid and egid */ - if (qstate->config_entry->perform_actual_lookups != 0) + if (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG) memset(read_request->cache_key, 0, qstate->eid_str_length); else { #ifdef NS_CACHED_EID_CHECKING @@ -770,7 +773,8 @@ configuration_unlock_entry(qstate->config_entry, CELT_NEGATIVE); if ((read_response->error_code == -1) && - (qstate->config_entry->perform_actual_lookups != 0)) { + (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG)) { free(read_response->data); read_response->data = NULL; read_response->data_size = 0; @@ -1014,7 +1018,8 @@ config_entry = configuration_get_entry( s_configuration, i); - if (config_entry->perform_actual_lookups == 0) + if (!(config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG)) clear_config_entry_part(config_entry, qstate->eid_str, qstate->eid_str_length); } @@ -1031,7 +1036,8 @@ goto fin; } - if (qstate->config_entry->perform_actual_lookups != 0) { + if (qstate->config_entry->flags & + CONFIG_ENTRY_PERFORM_ACTUAL_LOOKUPS_FLAG) { LOG_ERR_2("transform_request", "can't transform the cache entry %s" ", because it ised for actual lookups", From owner-p4-projects@FreeBSD.ORG Mon Nov 13 16:41:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CE28E16A525; Mon, 13 Nov 2006 16:41:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 87C8D16A4E5 for ; Mon, 13 Nov 2006 16:41:54 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2979043D45 for ; Mon, 13 Nov 2006 16:40:34 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADGeTGG031673 for ; Mon, 13 Nov 2006 16:40:29 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADGeSBc031670 for perforce@freebsd.org; Mon, 13 Nov 2006 16:40:28 GMT (envelope-from marcel@freebsd.org) Date: Mon, 13 Nov 2006 16:40:28 GMT Message-Id: <200611131640.kADGeSBc031670@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 109858 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 16:41:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=109858 Change 109858 by marcel@marcel_nfs on 2006/11/13 16:40:24 IFC @109857 Affected files ... .. //depot/projects/ia64/MAINTAINERS#56 integrate .. //depot/projects/ia64/Makefile.inc1#113 integrate .. //depot/projects/ia64/UPDATING#91 integrate .. //depot/projects/ia64/etc/mtree/BSD.local.dist#31 integrate .. //depot/projects/ia64/etc/rc.d/ipfilter#19 integrate .. //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#31 integrate .. //depot/projects/ia64/include/Makefile#56 integrate .. //depot/projects/ia64/include/ar.h#2 integrate .. //depot/projects/ia64/lib/Makefile#59 integrate .. //depot/projects/ia64/lib/libarchive/archive_read_data_into_fd.c#10 integrate .. //depot/projects/ia64/lib/libarchive/archive_read_open_fd.c#7 integrate .. //depot/projects/ia64/lib/libarchive/archive_read_open_file.c#9 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_open_fd.c#5 integrate .. //depot/projects/ia64/lib/libarchive/archive_write_open_file.c#9 integrate .. //depot/projects/ia64/lib/libelf/Makefile#1 branch .. //depot/projects/ia64/lib/libelf/Version.map#1 branch .. //depot/projects/ia64/lib/libelf/_libelf.h#1 branch .. //depot/projects/ia64/lib/libelf/elf.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_begin.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_begin.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_cntl.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_cntl.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_data.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_end.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_end.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_errmsg.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_errmsg.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_errno.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_fill.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_fill.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_flag.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_flagdata.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getarhdr.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getarhdr.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_getarsym.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getarsym.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_getbase.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getbase.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_getdata.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getident.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getident.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_getscn.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getshnum.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_getshstrndx.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_hash.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_hash.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_kind.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_kind.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_memory.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_memory.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_next.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_next.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_rand.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_rand.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_rawfile.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_rawfile.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_scn.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_shnum.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_shstrndx.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_strptr.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_strptr.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_types.m4#1 branch .. //depot/projects/ia64/lib/libelf/elf_update.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_update.c#1 branch .. //depot/projects/ia64/lib/libelf/elf_version.3#1 branch .. //depot/projects/ia64/lib/libelf/elf_version.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf.h#1 branch .. //depot/projects/ia64/lib/libelf/gelf_cap.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_checksum.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_checksum.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_dyn.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_ehdr.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_fsize.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_fsize.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getcap.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getclass.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getclass.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getdyn.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getehdr.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getmove.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getphdr.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getrel.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getrela.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getshdr.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getsym.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getsyminfo.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_getsymshndx.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_move.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_newehdr.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_newphdr.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_phdr.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_rel.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_rela.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_shdr.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_sym.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_syminfo.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_symshndx.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_update_ehdr.3#1 branch .. //depot/projects/ia64/lib/libelf/gelf_xlate.c#1 branch .. //depot/projects/ia64/lib/libelf/gelf_xlatetof.3#1 branch .. //depot/projects/ia64/lib/libelf/libelf.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf.h#1 branch .. //depot/projects/ia64/lib/libelf/libelf_align.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_allocate.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_ar.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_checksum.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_convert.m4#1 branch .. //depot/projects/ia64/lib/libelf/libelf_data.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_ehdr.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_fsize.m4#1 branch .. //depot/projects/ia64/lib/libelf/libelf_msize.m4#1 branch .. //depot/projects/ia64/lib/libelf/libelf_phdr.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_shdr.c#1 branch .. //depot/projects/ia64/lib/libelf/libelf_xlate.c#1 branch .. //depot/projects/ia64/lib/libthr/thread/thr_mutex.c#28 integrate .. //depot/projects/ia64/release/Makefile#100 integrate .. //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#166 integrate .. //depot/projects/ia64/share/doc/IPv6/IMPLEMENTATION#7 integrate .. //depot/projects/ia64/share/man/man4/sem.4#3 integrate .. //depot/projects/ia64/share/man/man4/snd_spicds.4#2 integrate .. //depot/projects/ia64/share/man/man7/release.7#41 integrate .. //depot/projects/ia64/share/man/man9/LOCK_PROFILING.9#1 branch .. //depot/projects/ia64/share/man/man9/MUTEX_PROFILING.9#6 delete .. //depot/projects/ia64/share/man/man9/Makefile#63 integrate .. //depot/projects/ia64/share/man/man9/mutex.9#20 integrate .. //depot/projects/ia64/sys/amd64/amd64/pmap.c#57 integrate .. //depot/projects/ia64/sys/amd64/include/pmap.h#22 integrate .. //depot/projects/ia64/sys/arm/arm/pmap.c#23 integrate .. //depot/projects/ia64/sys/arm/include/pmap.h#18 integrate .. //depot/projects/ia64/sys/coda/coda_vnops.c#23 integrate .. //depot/projects/ia64/sys/coda/coda_vnops.h#10 integrate .. //depot/projects/ia64/sys/conf/files.sun4v#4 integrate .. //depot/projects/ia64/sys/fs/nullfs/null_vnops.c#23 integrate .. //depot/projects/ia64/sys/i386/i386/pmap.c#97 integrate .. //depot/projects/ia64/sys/i386/include/pmap.h#30 integrate .. //depot/projects/ia64/sys/ia64/ia64/pmap.c#99 integrate .. //depot/projects/ia64/sys/ia64/include/pmap.h#23 integrate .. //depot/projects/ia64/sys/kern/kern_lock.c#35 integrate .. //depot/projects/ia64/sys/kern/kern_mutex.c#47 integrate .. //depot/projects/ia64/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/ia64/sys/kern/kern_sx.c#14 integrate .. //depot/projects/ia64/sys/kern/subr_lock.c#4 integrate .. //depot/projects/ia64/sys/kern/uipc_syscalls.c#67 integrate .. //depot/projects/ia64/sys/kern/vfs_default.c#44 integrate .. //depot/projects/ia64/sys/kern/vfs_subr.c#95 integrate .. //depot/projects/ia64/sys/kern/vfs_vnops.c#58 integrate .. //depot/projects/ia64/sys/kern/vnode_if.src#26 integrate .. //depot/projects/ia64/sys/powerpc/powerpc/mmu_oea.c#5 integrate .. //depot/projects/ia64/sys/sparc64/sparc64/pmap.c#65 integrate .. //depot/projects/ia64/sys/sun4v/include/pmap.h#2 integrate .. //depot/projects/ia64/sys/sun4v/sun4v/pmap.c#5 integrate .. //depot/projects/ia64/sys/sun4v/sun4v/rtc.c#2 integrate .. //depot/projects/ia64/sys/sun4v/sun4v/trap.c#4 integrate .. //depot/projects/ia64/sys/sys/_lock.h#7 integrate .. //depot/projects/ia64/sys/sys/lock.h#16 integrate .. //depot/projects/ia64/sys/sys/lock_profile.h#3 integrate .. //depot/projects/ia64/sys/sys/proc.h#106 integrate .. //depot/projects/ia64/sys/sys/vnode.h#58 integrate .. //depot/projects/ia64/sys/ufs/ffs/ffs_vnops.c#52 integrate .. //depot/projects/ia64/sys/vm/vm_fault.c#59 integrate .. //depot/projects/ia64/sys/vm/vm_kern.c#40 integrate .. //depot/projects/ia64/tools/regression/file/dup/Makefile#1 branch .. //depot/projects/ia64/tools/regression/file/dup/dup.c#1 branch .. //depot/projects/ia64/tools/regression/file/dup/dup.t#1 branch .. //depot/projects/ia64/usr.bin/sockstat/sockstat.1#6 integrate .. //depot/projects/ia64/usr.bin/sockstat/sockstat.c#9 integrate .. //depot/projects/ia64/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#10 integrate .. //depot/projects/ia64/usr.sbin/ipfwpcap/ipfwpcap.8#3 integrate .. //depot/projects/ia64/usr.sbin/pccard/dumpcis/dumpcis.8#2 integrate .. //depot/projects/ia64/usr.sbin/pppd/Makefile#9 integrate .. //depot/projects/ia64/usr.sbin/pppd/eui64.c#1 branch .. //depot/projects/ia64/usr.sbin/pppd/eui64.h#1 branch .. //depot/projects/ia64/usr.sbin/pppd/ipv6cp.c#1 branch .. //depot/projects/ia64/usr.sbin/pppd/ipv6cp.h#1 branch .. //depot/projects/ia64/usr.sbin/pppd/main.c#4 integrate .. //depot/projects/ia64/usr.sbin/pppd/options.c#3 integrate .. //depot/projects/ia64/usr.sbin/pppd/pathnames.h#2 integrate .. //depot/projects/ia64/usr.sbin/pppd/pppd.8#7 integrate .. //depot/projects/ia64/usr.sbin/pppd/pppd.h#2 integrate .. //depot/projects/ia64/usr.sbin/pppd/sys-bsd.c#5 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/install.c#39 integrate .. //depot/projects/ia64/usr.sbin/sysinstall/installUpgrade.c#13 integrate Differences ... ==== //depot/projects/ia64/MAINTAINERS#56 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.141 2006/09/11 19:39:46 simon Exp $ +$FreeBSD: src/MAINTAINERS,v 1.142 2006/11/11 22:24:10 kris Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements @@ -126,6 +126,7 @@ usr.bin/bluetooth emax Pre-commit review preferred. usr.sbin/bluetooth emax Pre-commit review preferred. gnu/usr.bin/send-pr bugmaster Pre-commit review requested. +BSD.{local,x11*}.dist portmgr Pre-commit review requested, since these files interface with ports. Following are the entries from the Makefiles, and a few other sources. Please remove stale entries from both their origin, and this file. ==== //depot/projects/ia64/Makefile.inc1#113 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.563 2006/10/16 22:18:13 jb Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.564 2006/11/13 05:52:11 ru Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -30,18 +30,17 @@ # entries works correctly. Do it first since it is less likely to # grow dependencies on include and lib than vice versa. # -# We must do lib and libexec before bin, because if installworld +# We must do lib/ and libexec/ before bin/, because if installworld # installs a new /bin/sh, the 'make' command will *immediately* # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # -# We must do etc last for install/distribute to work. -# -SUBDIR= share/info include lib libexec bin +SUBDIR= share/info lib libexec +SUBDIR+=bin .if ${MK_GAMES} != "no" SUBDIR+=games .endif -SUBDIR+=gnu +SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" SUBDIR+=kerberos5 .endif @@ -55,7 +54,11 @@ .if !defined(NO_SHARE) SUBDIR+=share .endif -SUBDIR+=sys usr.bin usr.sbin etc +SUBDIR+=sys usr.bin usr.sbin +# +# We must do etc/ last for install/distribute to work. +# +SUBDIR+=etc # These are last, since it is nice to at least get the base system # rebuilt before you do them. ==== //depot/projects/ia64/UPDATING#91 (text+ko) ==== @@ -20,6 +20,12 @@ in userland, and various verbose features in the kernel. Many developers choose to disable these features on build machines to maximize performance. +20061110: + The MUTEX_PROFILING option has been renamed to LOCK_PROFILING. + The lockmgr object layout has been changed as a result of having + a lock_object embedded in it. As a consequence all file system + kernel modules must be re-compiled. The mutex profiling man page + has not yet been updated to reflect this change. 20061026: KSE in the kernel has now been made optional and turned on by @@ -639,4 +645,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.462 2006/10/26 22:05:24 jb Exp $ +$FreeBSD: src/UPDATING,v 1.463 2006/11/11 03:18:06 kmacy Exp $ ==== //depot/projects/ia64/etc/mtree/BSD.local.dist#31 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.122 2006/11/10 22:57:39 des Exp $ +# $FreeBSD: src/etc/mtree/BSD.local.dist,v 1.125 2006/11/12 12:02:34 ache Exp $ # # Please see the file src/etc/mtree/README before making changes to this file. # @@ -725,14 +725,6 @@ .. lt_LT.UTF-8 .. - mn_MN.UTF-8 - .. - nb_NO.ISO8859-1 - .. - nb_NO.ISO8859-15 - .. - nb_NO.UTF-8 - .. nl_BE.ISO8859-1 .. nl_BE.ISO8859-15 @@ -745,12 +737,6 @@ .. nl_NL.UTF-8 .. - nn_NO.ISO8859-1 - .. - nn_NO.ISO8859-15 - .. - nn_NO.UTF-8 - .. no_NO.ISO8859-1 .. no_NO.ISO8859-15 @@ -840,8 +826,6 @@ .. xml .. - xsl - .. .. www .. ==== //depot/projects/ia64/etc/rc.d/ipfilter#19 (text+ko) ==== @@ -1,7 +1,7 @@ #!/bin/sh # # $NetBSD: ipfilter,v 1.10 2001/02/28 17:03:50 lukem Exp $ -# $FreeBSD: src/etc/rc.d/ipfilter,v 1.24 2005/07/07 05:59:44 jkim Exp $ +# $FreeBSD: src/etc/rc.d/ipfilter,v 1.25 2006/11/11 10:48:34 ceri Exp $ # # PROVIDE: ipfilter @@ -93,11 +93,17 @@ if [ -r "${ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -I \ -f "${ipfilter_rules}" ${ipfilter_flags} + if [ $? -ne 0 ]; then + err 1 'Load of rules into alternate set failed; aborting reload' + fi fi ${ipfilter_program:-/sbin/ipf} -I -6 -Fa if [ -r "${ipv6_ipfilter_rules}" ]; then ${ipfilter_program:-/sbin/ipf} -I -6 \ -f "${ipv6_ipfilter_rules}" ${ipfilter_flags} + if [ $? -ne 0 ]; then + err 1 'Load of IPv6 rules into alternate set failed; aborting reload' + fi fi ${ipfilter_program:-/sbin/ipf} -s ==== //depot/projects/ia64/gnu/usr.bin/groff/tmac/mdoc.local#31 (text+ko) ==== @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.54 2006/08/08 19:47:10 ru Exp $ +.\" $FreeBSD: src/gnu/usr.bin/groff/tmac/mdoc.local,v 1.55 2006/11/11 17:16:35 jkoshy Exp $ .\" .\" %beginstrip% . @@ -43,6 +43,7 @@ .ds doc-str-Lb-libdevstat Device Statistics Library (libdevstat, \-ldevstat) .ds doc-str-Lb-libdisk Interface to Slice and Partition Labels Library (libdisk, \-ldisk) .ds doc-str-Lb-libedit Line Editor and History Library (libedit, \-ledit) +.ds doc-str-Lb-libelf ELF Parsing Library (libelf, \-lelf) .ds doc-str-Lb-libfetch File Transfer Library (libfetch, \-lfetch) .ds doc-str-Lb-libgeom Userland API Library for kernel GEOM subsystem (libgeom, \-lgeom) .ds doc-str-Lb-libipx IPX Address Conversion Support Library (libipx, \-lipx) ==== //depot/projects/ia64/include/Makefile#56 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.2 (Berkeley) 1/4/94 -# $FreeBSD: src/include/Makefile,v 1.265 2006/10/31 22:22:29 pjd Exp $ +# $FreeBSD: src/include/Makefile,v 1.266 2006/11/11 16:26:54 trhodes Exp $ # # Doing a "make install" builds /usr/include. @@ -36,7 +36,7 @@ LDIRS= bsm cam geom net net80211 netatalk netatm netgraph netinet netinet6 \ netipsec ${_netipx} netkey netnatm ${_netncp} netsmb \ nfs nfsclient nfsserver \ - pccard posix4 sys vm + pccard sys vm LSUBDIRS= cam/scsi \ dev/acpica dev/an dev/bktr dev/firewire dev/hwpmc \ @@ -111,7 +111,7 @@ INCSLINKS+= machine/$i ${INCLUDEDIR}/$i .endfor .for i in ${PHDRS} -INCSLINKS+= posix4/$i ${INCLUDEDIR}/$i +INCSLINKS+= sys/$i ${INCLUDEDIR}/$i .endfor .if ${MACHINE} != ${MACHINE_ARCH} ==== //depot/projects/ia64/include/ar.h#2 (text+ko) ==== @@ -39,11 +39,15 @@ * SUCH DAMAGE. * * @(#)ar.h 8.2 (Berkeley) 1/21/94 + * + * $FreeBSD: src/include/ar.h,v 1.2 2006/11/13 04:28:29 jkoshy Exp $ */ #ifndef _AR_H_ #define _AR_H_ +#include + /* Pre-4BSD archives had these magic numbers in them. */ #define OARMAG1 0177555 #define OARMAG2 0177545 @@ -62,6 +66,6 @@ char ar_size[10]; /* size in bytes */ #define ARFMAG "`\n" char ar_fmag[2]; /* consistency check */ -}; +} __packed; #endif /* !_AR_H_ */ ==== //depot/projects/ia64/lib/Makefile#59 (text+ko) ==== @@ -1,5 +1,5 @@ # @(#)Makefile 8.1 (Berkeley) 6/4/93 -# $FreeBSD: src/lib/Makefile,v 1.218 2006/09/30 11:32:46 ru Exp $ +# $FreeBSD: src/lib/Makefile,v 1.219 2006/11/11 17:16:32 jkoshy Exp $ .include @@ -24,7 +24,7 @@ # # Otherwise, the SUBDIR list should be in alphabetical order. -SUBDIR= ${_csu} libbsm libcom_err libcrypt libkvm msun libmd libncurses \ +SUBDIR= ${_csu} libbsm libcom_err libcrypt libelf libkvm msun libmd libncurses \ libnetgraph libradius librpcsvc libsbuf libtacplus libutil \ ${_libypclnt} libalias libarchive ${_libatm} \ libbegemot ${_libbluetooth} libbsnmp libbz2 libc \ ==== //depot/projects/ia64/lib/libarchive/archive_read_data_into_fd.c#10 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_data_into_fd.c,v 1.11 2006/11/10 06:39:46 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_data_into_fd.c,v 1.12 2006/11/12 23:45:40 kientzle Exp $"); #ifdef HAVE_SYS_TYPES_H #include @@ -63,6 +63,7 @@ while ((r = archive_read_data_block(a, &buff, &size, &offset)) == ARCHIVE_OK) { + const char *p = buff; if (offset > output_offset) { lseek(fd, offset - output_offset, SEEK_CUR); output_offset = offset; @@ -71,13 +72,14 @@ bytes_to_write = size; if (bytes_to_write > MAX_WRITE) bytes_to_write = MAX_WRITE; - bytes_written = write(fd, buff, bytes_to_write); + bytes_written = write(fd, p, bytes_to_write); if (bytes_written < 0) { archive_set_error(a, errno, "Write error"); return (-1); } output_offset += bytes_written; total_written += bytes_written; + p += bytes_written; size -= bytes_written; if (a->extract_progress != NULL) (*a->extract_progress)(a->extract_progress_user_data); ==== //depot/projects/ia64/lib/libarchive/archive_read_open_fd.c#7 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_fd.c,v 1.7 2006/11/10 06:39:46 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_fd.c,v 1.9 2006/11/13 00:29:57 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -44,7 +44,6 @@ #endif #include "archive.h" -#include "archive_private.h" struct read_fd_data { int fd; @@ -89,8 +88,8 @@ return (ARCHIVE_FATAL); } - a->skip_file_dev = st.st_dev; - a->skip_file_ino = st.st_ino; + if (S_ISREG(st.st_mode)) + archive_read_extract_set_skip_file(a, st.st_dev, st.st_ino); return (ARCHIVE_OK); } ==== //depot/projects/ia64/lib/libarchive/archive_read_open_file.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_file.c,v 1.12 2006/11/10 06:39:46 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_read_open_file.c,v 1.14 2006/11/13 00:29:57 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -47,7 +47,6 @@ #endif #include "archive.h" -#include "archive_private.h" struct read_file_data { int fd; @@ -110,9 +109,10 @@ return (ARCHIVE_FATAL); } if (fstat(mine->fd, &st) == 0) { - /* Set dev/ino of archive file so extract won't overwrite. */ - a->skip_file_dev = st.st_dev; - a->skip_file_ino = st.st_ino; + /* If we're reading a file from disk, ensure that we don't + overwrite it with an extracted file. */ + if (S_ISREG(st.st_mode)) + archive_read_extract_set_skip_file(a, st.st_dev, st.st_ino); /* Remember mode so close can decide whether to flush. */ mine->st_mode = st.st_mode; } else { ==== //depot/projects/ia64/lib/libarchive/archive_write_open_fd.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_fd.c,v 1.5 2006/11/10 06:39:46 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_fd.c,v 1.7 2006/11/13 00:29:57 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -44,7 +44,6 @@ #endif #include "archive.h" -#include "archive_private.h" struct write_fd_data { off_t offset; @@ -74,44 +73,35 @@ file_open(struct archive *a, void *client_data) { struct write_fd_data *mine; - struct stat st, *pst; + struct stat st; - pst = NULL; mine = (struct write_fd_data *)client_data; + if (fstat(mine->fd, &st) != 0) { + archive_set_error(a, errno, "Couldn't stat fd %d", mine->fd); + return (ARCHIVE_FATAL); + } + /* + * If this is a regular file, don't add it to itself. + */ + if (S_ISREG(st.st_mode)) + archive_write_set_skip_file(a, st.st_dev, st.st_ino); + + /* * If client hasn't explicitly set the last block handling, - * then set it here: If the output is a block or character - * device, pad the last block, otherwise leave it unpadded. + * then set it here. */ - if (mine->fd >= 0 && a->bytes_in_last_block < 0) { - /* Last block will be fully padded. */ - if (fstat(mine->fd, &st) == 0) { - pst = &st; - if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode) || - S_ISFIFO(st.st_mode)) - archive_write_set_bytes_in_last_block(a, 0); - else - archive_write_set_bytes_in_last_block(a, 1); - } - } - - if (mine->fd == 1) { - if (a->bytes_in_last_block < 0) /* Still default? */ + if (archive_write_get_bytes_in_last_block(a) < 0) { + /* If the output is a block or character device, fifo, + * or stdout, pad the last block, otherwise leave it + * unpadded. */ + if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode) || + S_ISFIFO(st.st_mode) || (mine->fd == 1)) /* Last block will be fully padded. */ archive_write_set_bytes_in_last_block(a, 0); - } - - if (mine->fd < 0) { - archive_set_error(a, errno, "Failed to open"); - return (ARCHIVE_FATAL); - } - - if (pst == NULL && fstat(mine->fd, &st) == 0) - pst = &st; - if (pst == NULL) { - archive_set_error(a, errno, "Couldn't stat fd %d", mine->fd); - return (ARCHIVE_FATAL); + else + archive_write_set_bytes_in_last_block(a, 1); } return (ARCHIVE_OK); ==== //depot/projects/ia64/lib/libarchive/archive_write_open_file.c#9 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include "archive_platform.h" -__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_file.c,v 1.12 2006/11/10 06:39:46 kientzle Exp $"); +__FBSDID("$FreeBSD: src/lib/libarchive/archive_write_open_file.c,v 1.14 2006/11/13 00:29:57 kientzle Exp $"); #ifdef HAVE_SYS_STAT_H #include @@ -47,7 +47,6 @@ #endif #include "archive.h" -#include "archive_private.h" struct write_file_data { int fd; @@ -88,64 +87,51 @@ { int flags; struct write_file_data *mine; - struct stat st, *pst; + struct stat st; - pst = NULL; mine = (struct write_file_data *)client_data; flags = O_WRONLY | O_CREAT | O_TRUNC; + /* + * Open the file. + */ if (mine->filename[0] != '\0') { mine->fd = open(mine->filename, flags, 0666); - + if (mine->fd < 0) { + archive_set_error(a, errno, "Failed to open '%s'", + mine->filename); + return (ARCHIVE_FATAL); + } + } else { /* - * If client hasn't explicitly set the last block - * handling, then set it here: If the output is a - * block or character device, pad the last block, - * otherwise leave it unpadded. + * NULL filename is stdout. */ - if (mine->fd >= 0 && a->bytes_in_last_block < 0) { - if (fstat(mine->fd, &st) == 0) { - pst = &st; - if (S_ISCHR(st.st_mode) || - S_ISBLK(st.st_mode) || - S_ISFIFO(st.st_mode)) - /* Pad last block. */ - archive_write_set_bytes_in_last_block(a, 0); - else - /* Don't pad last block. */ - archive_write_set_bytes_in_last_block(a, 1); - } - } - } else { mine->fd = 1; - if (a->bytes_in_last_block < 0) /* Still default? */ - /* Last block will be fully padded. */ + /* By default, pad archive when writing to stdout. */ + if (archive_write_get_bytes_in_last_block(a) < 0) archive_write_set_bytes_in_last_block(a, 0); } - if (mine->fd < 0) { - archive_set_error(a, errno, "Failed to open '%s'", - mine->filename); - return (ARCHIVE_FATAL); + /* + * Set up default last block handling. + */ + if (archive_write_get_bytes_in_last_block(a) < 0) { + if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode) || + S_ISFIFO(st.st_mode)) + /* Pad last block when writing to device or FIFO. */ + archive_write_set_bytes_in_last_block(a, 0); + else + /* Don't pad last block otherwise. */ + archive_write_set_bytes_in_last_block(a, 1); } - if (pst == NULL && fstat(mine->fd, &st) == 0) - pst = &st; - if (pst == NULL) { - archive_set_error(a, errno, "Couldn't stat '%s'", - mine->filename); - return (ARCHIVE_FATAL); - } - /* * If the output file is a regular file, don't add it to * itself. If it's a device file, it's okay to add the device * entry to the output archive. */ - if (S_ISREG(pst->st_mode)) { - a->skip_file_dev = pst->st_dev; - a->skip_file_ino = pst->st_ino; - } + if (S_ISREG(st.st_mode)) + archive_write_set_skip_file(a, st.st_dev, st.st_ino); return (ARCHIVE_OK); } ==== //depot/projects/ia64/lib/libthr/thread/thr_mutex.c#28 (text+ko) ==== @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.47 2006/09/08 09:29:14 davidxu Exp $ + * $FreeBSD: src/lib/libthr/thread/thr_mutex.c,v 1.48 2006/11/11 13:33:47 davidxu Exp $ */ #include "namespace.h" @@ -174,6 +174,18 @@ return (ret); } +static void +set_inherited_priority(struct pthread *curthread, struct pthread_mutex *m) +{ + struct pthread_mutex *m2; + + m2 = TAILQ_LAST(&curthread->pp_mutexq, mutex_queue); + if (m2 != NULL) + m->m_lock.m_ceilings[1] = m2->m_lock.m_ceilings[0]; + else + m->m_lock.m_ceilings[1] = -1; +} + int _pthread_mutex_init(pthread_mutex_t *mutex, const pthread_mutexattr_t *mutex_attr) @@ -213,7 +225,7 @@ _pthread_mutex_destroy(pthread_mutex_t *mutex) { struct pthread *curthread = _get_curthread(); - pthread_mutex_t m, m2; + pthread_mutex_t m; uint32_t id; int ret = 0; @@ -230,20 +242,14 @@ if (ret) return (ret); m = *mutex; - m2 = TAILQ_LAST(&curthread->pp_mutexq, mutex_queue); /* * Check mutex other fields to see if this mutex is * in use. Mostly for prority mutex types, or there * are condition variables referencing it. */ if (m->m_owner != NULL || m->m_refcount != 0) { - if (m->m_lock.m_flags & UMUTEX_PRIO_PROTECT) { - if (m2 != NULL) - m->m_lock.m_ceilings[1] = - m2->m_lock.m_ceilings[0]; - else - m->m_lock.m_ceilings[1] = -1; - } + if (m->m_lock.m_flags & UMUTEX_PRIO_PROTECT) + set_inherited_priority(curthread, m); _thr_umutex_unlock(&m->m_lock, id); ret = EBUSY; } else { @@ -253,13 +259,8 @@ */ *mutex = NULL; - if (m->m_lock.m_flags & UMUTEX_PRIO_PROTECT) { - if (m2 != NULL) - m->m_lock.m_ceilings[1] = - m2->m_lock.m_ceilings[0]; - else - m->m_lock.m_ceilings[1] = -1; - } + if (m->m_lock.m_flags & UMUTEX_PRIO_PROTECT) + set_inherited_priority(curthread, m); _thr_umutex_unlock(&m->m_lock, id); MUTEX_ASSERT_NOT_OWNED(m); @@ -582,7 +583,7 @@ mutex_unlock_common(pthread_mutex_t *mutex) { struct pthread *curthread = _get_curthread(); - struct pthread_mutex *m, *m2; + struct pthread_mutex *m; uint32_t id; if (__predict_false((m = *mutex) == NULL)) @@ -607,12 +608,7 @@ TAILQ_REMOVE(&curthread->mutexq, m, m_qe); else { TAILQ_REMOVE(&curthread->pp_mutexq, m, m_qe); - m2 = TAILQ_LAST(&curthread->pp_mutexq, mutex_queue); - if (m2 != NULL) - m->m_lock.m_ceilings[1] = - m2->m_lock.m_ceilings[0]; - else - m->m_lock.m_ceilings[1] = -1; + set_inherited_priority(curthread, m); } MUTEX_INIT_LINK(m); _thr_umutex_unlock(&m->m_lock, id); @@ -624,7 +620,7 @@ _mutex_cv_unlock(pthread_mutex_t *mutex, int *count) { struct pthread *curthread = _get_curthread(); - struct pthread_mutex *m, *m2; + struct pthread_mutex *m; if (__predict_false((m = *mutex) == NULL)) return (EINVAL); @@ -648,12 +644,7 @@ TAILQ_REMOVE(&curthread->mutexq, m, m_qe); else { TAILQ_REMOVE(&curthread->pp_mutexq, m, m_qe); - - m2 = TAILQ_LAST(&curthread->pp_mutexq, mutex_queue); - if (m2 != NULL) - m->m_lock.m_ceilings[1] = m2->m_lock.m_ceilings[0]; - else - m->m_lock.m_ceilings[1] = -1; + set_inherited_priority(curthread, m); } MUTEX_INIT_LINK(m); _thr_umutex_unlock(&m->m_lock, TID(curthread)); ==== //depot/projects/ia64/release/Makefile#100 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/release/Makefile,v 1.916 2006/10/24 21:00:49 ru Exp $ +# $FreeBSD: src/release/Makefile,v 1.917 2006/11/11 23:18:28 ru Exp $ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ # [RELEASETAG=tag] @@ -420,7 +420,7 @@ .endif .endif .if make(rerelease) -.if !defined(RELEASENOUPDATE) +.if !defined(RELEASENOUPDATE) && !defined(EXTSRCDIR) .if !defined(RELEASETAG) cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d -A ==== //depot/projects/ia64/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#166 (text+ko) ==== @@ -3,7 +3,7 @@ The &os; Project - $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.983 2006/11/08 17:22:55 bmah Exp $ + $FreeBSD: src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml,v 1.987 2006/11/13 01:44:20 bmah Exp $ 2000 @@ -301,6 +301,11 @@ &man.pmcstat.8; can now log over a network socket to a remote host. + Support for Kernel Scheduled Entities (KSE) is now a kernel + option (previously it was a mandatory feature in the kernel). + It is enabled in the GENERIC kernel (thus there is no change in + functionality) for all platforms except sun4v. + The &man.random.4; entropy device driver is now MPSAFE. &merged; @@ -513,6 +518,14 @@ The smbios(4) driver support for amd64 has been added. + &os; now has preliminary support for the Sun Microsystems + UltraSPARC-T1 archicture. &os;/sun4v has been demonstrated + to run on the Sun Fire T1000 and Sun Fire T2000 servers. + More information can be found on the + sun4v + Project + page. + The tnt4882(4) driver, which supports the National Instruments PCI-GPIB card, has been added. @@ -776,6 +789,9 @@ Packets are Ethernet frames with an EtherIP header prepended. &merged; + The &man.if.bridge.4; driver now supports RSTP, the Rapid + Spanning Tree Protocol (802.1w). + A hard-coded limit on the number of IPv4 multicast group memberships (formerly 20) has been removed. @@ -830,6 +846,9 @@ The &man.natm.4;, Native Mode ATM protocol layer is now MPSAFE. + The &man.ng.ether.4; Netgraph node no longer overwrites + the MAC address of outgoing frames by default. &merged; + The &man.ng.iface.4; Netgraph node now supports &man.altq.4;. &merged; @@ -888,10 +907,17 @@ userland implementation of The Generalized TTL Security Mechanism (GTSM) found in RFC 3682. + The kernel &man.ppp.4; driver now supports IPv6. + Stealth forwarding now supports IPv6 as well as IPv4. This behavior can be controlled by using a new sysctl variable net.inet6.ip6.stealth. + Support has been added for the Stream Control Transmission + Protocol (SCTP). SCTP implements a reliable, message-oriented + transport protocol, and is defined in RFC 3268. It is enabled + in &os; with the SCTP kernel option. + The IPV6_V6ONLY socket option now works for UDP. @@ -903,6 +929,21 @@ net.inet.tcp.inflight.rttthresh specifies the threshold in milliseconds below which this feature will disengage. It defaults to 10ms. &merged; + + The &os; network stack now has support for TCP + Segmentation Offload (TSO). TSO reduces the overhead of + sending bulk TCP data by allowing a network interface to + convert a large data transfer into multiple TCP segments to be + sent on the network. This functionality can be enabled or + disabled on a per-interface basis with + the tso and -tso flags + to &man.ifconfig.8;. Network interfaces and drivers + supporting TSO currently include &man.em.4; and + &man.mxge.4;. + + Support for &man.kqueue.2; operations has been added to + the &man.tun.4; driver. &merged; + @@ -1151,7 +1192,11 @@ The &man.fsdb.8; utility now supports changing the birth time of files on UFS2 file systems using the new - the btime command. + btime command. &merged; + + The &man.fsdb.8; program now supports + a findblk command, which finds the inode(s) + owning a specific disk block. &merged; The &man.find.1; program now supports and other related primaries, which can be used to create expressions @@ -1404,6 +1449,10 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Nov 13 18:25:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BB40316A47B; Mon, 13 Nov 2006 18:25:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 962E316A416 for ; Mon, 13 Nov 2006 18:25:13 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D44F43F82 for ; Mon, 13 Nov 2006 18:18:53 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADIIWOl059318 for ; Mon, 13 Nov 2006 18:18:32 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADIIW17059315 for perforce@freebsd.org; Mon, 13 Nov 2006 18:18:32 GMT (envelope-from sam@freebsd.org) Date: Mon, 13 Nov 2006 18:18:32 GMT Message-Id: <200611131818.kADIIW17059315@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109864 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 18:25:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=109864 Change 109864 by sam@sam_ebb on 2006/11/13 18:18:09 Grr, fix it; write key to the correct register. Turns out my guess on units conversion for the timer register was close enough--it's a 66.66MHz clock. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_wdog.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_wdog.c#2 (text+ko) ==== @@ -68,22 +68,21 @@ { struct ixpwdog_softc *sc = arg; u_int u = cmd & WD_INTERVAL; - uint32_t ena; - WR4(sc, IXP425_OST_WDOG, OST_WDOG_KEY_MAJICK); - ena = RD4(sc, IXP425_OST_WDOG_ENAB); - if (cmd && u <= 35) { - /* XXX what are the units? */ + WR4(sc, IXP425_OST_WDOG_KEY, OST_WDOG_KEY_MAJICK); + if (cmd && 4 <= u && u <= 35) { + WR4(sc, IXP425_OST_WDOG_ENAB, 0); + /* approximate 66.66MHz cycles */ WR4(sc, IXP425_OST_WDOG, 2<<(u - 4)); /* NB: reset on timer expiration */ WR4(sc, IXP425_OST_WDOG_ENAB, - ena | OST_WDOG_ENAB_CNT_ENA | OST_WDOG_ENAB_RST_ENA); + OST_WDOG_ENAB_CNT_ENA | OST_WDOG_ENAB_RST_ENA); *error = 0; } else { /* disable watchdog */ - WR4(sc, IXP425_OST_WDOG_ENAB, ena &~ OST_WDOG_ENAB_CNT_ENA); + WR4(sc, IXP425_OST_WDOG_ENAB, 0); } - WR4(sc, IXP425_OST_WDOG, 0); + WR4(sc, IXP425_OST_WDOG_KEY, 0); } static int From owner-p4-projects@FreeBSD.ORG Mon Nov 13 18:25:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BCFA316A4EC; Mon, 13 Nov 2006 18:25:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B72916A4E9 for ; Mon, 13 Nov 2006 18:25:26 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9A91F44020 for ; Mon, 13 Nov 2006 18:18:53 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADIIX92059324 for ; Mon, 13 Nov 2006 18:18:33 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADIIXCR059321 for perforce@freebsd.org; Mon, 13 Nov 2006 18:18:33 GMT (envelope-from sam@freebsd.org) Date: Mon, 13 Nov 2006 18:18:33 GMT Message-Id: <200611131818.kADIIXCR059321@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109865 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 18:25:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=109865 Change 109865 by sam@sam_ebb on 2006/11/13 18:18:31 add watchdog timer Affected files ... .. //depot/projects/arm/src/sys/arm/conf/AVILA#7 edit Differences ... ==== //depot/projects/arm/src/sys/arm/conf/AVILA#7 (text+ko) ==== @@ -84,6 +84,7 @@ device iic device ixpiic +device ixpwdog # watchdog timer device ata device ata_avila # Gateworks CF/IDE support From owner-p4-projects@FreeBSD.ORG Mon Nov 13 18:58:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C767E16A407; Mon, 13 Nov 2006 18:58:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4749E16A4F5 for ; Mon, 13 Nov 2006 18:58:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3418143E0A for ; Mon, 13 Nov 2006 18:56:45 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADIuMDV065707 for ; Mon, 13 Nov 2006 18:56:22 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADIuL2f065704 for perforce@freebsd.org; Mon, 13 Nov 2006 18:56:21 GMT (envelope-from sam@freebsd.org) Date: Mon, 13 Nov 2006 18:56:21 GMT Message-Id: <200611131856.kADIuL2f065704@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 109868 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 18:58:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=109868 Change 109868 by sam@sam_ebb on 2006/11/13 18:55:35 Workaround ata driver: create bus_space stream read/write multi ops that byte swap and undo change to the driver. When the driver is fixed we can undo this damage. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#9 edit .. //depot/projects/arm/src/sys/dev/ata/ata-all.c#14 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#9 (text+ko) ==== @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -83,6 +84,10 @@ static void ata_avila_intr(void *); bs_protos(ata); +static void ata_bs_rm_2_s(void *, bus_space_handle_t, bus_size_t, + u_int16_t *, bus_size_t); +static void ata_bs_wm_2_s(void *, bus_space_handle_t, bus_size_t, + const u_int16_t *, bus_size_t); static int ata_avila_probe(device_t dev) @@ -116,25 +121,17 @@ */ sc->sc_expbus_tag.bs_cookie = sc; /* NB: backpointer */ /* read single */ - sc->sc_expbus_tag.bs_r_1_s = ata_bs_r_1, - sc->sc_expbus_tag.bs_r_2_s = ata_bs_r_2, sc->sc_expbus_tag.bs_r_1 = ata_bs_r_1, sc->sc_expbus_tag.bs_r_2 = ata_bs_r_2, /* read multiple */ - sc->sc_expbus_tag.bs_rm_1 = ata_bs_rm_1, - sc->sc_expbus_tag.bs_rm_1_s = ata_bs_rm_1, sc->sc_expbus_tag.bs_rm_2 = ata_bs_rm_2, - sc->sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2, + sc->sc_expbus_tag.bs_rm_2_s = ata_bs_rm_2_s, /* write (single) */ - sc->sc_expbus_tag.bs_w_1_s = ata_bs_w_1, - sc->sc_expbus_tag.bs_w_2_s = ata_bs_w_2, sc->sc_expbus_tag.bs_w_1 = ata_bs_w_1, sc->sc_expbus_tag.bs_w_2 = ata_bs_w_2, /* write multiple */ - sc->sc_expbus_tag.bs_wm_1 = ata_bs_wm_1, - sc->sc_expbus_tag.bs_wm_1_s = ata_bs_wm_1, sc->sc_expbus_tag.bs_wm_2 = ata_bs_wm_2, - sc->sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2, + sc->sc_expbus_tag.bs_wm_2_s = ata_bs_wm_2_s, rman_set_bustag(&sc->sc_ata, &sc->sc_expbus_tag); rman_set_bushandle(&sc->sc_ata, sc->sc_ioh); @@ -311,42 +308,63 @@ } void -ata_bs_rm_1(void *t, bus_space_handle_t h, bus_size_t o, - u_int8_t *d, bus_size_t c) +ata_bs_rm_2(void *t, bus_space_handle_t h, bus_size_t o, + u_int16_t *d, bus_size_t c) { struct ata_avila_softc *sc = t; - bus_space_read_multi_1(sc->sc_iot, h, o, d, c); + enable_16(sc); + bus_space_read_multi_2(sc->sc_iot, h, o, d, c); + disable_16(sc); } void -ata_bs_wm_1(void *t, bus_space_handle_t h, bus_size_t o, - const u_int8_t *d, bus_size_t c) +ata_bs_wm_2(void *t, bus_space_handle_t h, bus_size_t o, + const u_int16_t *d, bus_size_t c) { struct ata_avila_softc *sc = t; - bus_space_write_multi_1(sc->sc_iot, h, o, d, c); + enable_16(sc); + bus_space_write_multi_2(sc->sc_iot, h, o, d, c); + disable_16(sc); } +/* XXX workaround ata driver by (incorrectly) byte swapping stream cases */ + void -ata_bs_rm_2(void *t, bus_space_handle_t h, bus_size_t o, +ata_bs_rm_2_s(void *t, bus_space_handle_t h, bus_size_t o, u_int16_t *d, bus_size_t c) { struct ata_avila_softc *sc = t; + uint16_t v; + bus_size_t i; enable_16(sc); - bus_space_read_multi_2(sc->sc_iot, h, o, d, c); +#if 1 + for (i = 0; i < c; i++) { + v = bus_space_read_2(sc->sc_iot, h, o); + d[i] = bswap16(v); + } +#else + bus_space_read_multi_stream_2(sc->sc_iot, h, o, d, c); +#endif disable_16(sc); } void -ata_bs_wm_2(void *t, bus_space_handle_t h, bus_size_t o, +ata_bs_wm_2_s(void *t, bus_space_handle_t h, bus_size_t o, const u_int16_t *d, bus_size_t c) { struct ata_avila_softc *sc = t; + bus_size_t i; enable_16(sc); - bus_space_write_multi_2(sc->sc_iot, h, o, d, c); +#if 1 + for (i = 0; i < c; i++) + bus_space_write_2(sc->sc_iot, h, o, bswap16(d[i])); +#else + bus_space_write_multi_stream_2(sc->sc_iot, h, o, d, c); +#endif disable_16(sc); } ==== //depot/projects/arm/src/sys/dev/ata/ata-all.c#14 (text+ko) ==== @@ -601,8 +601,6 @@ isprint(atadev->param.model[1]))) { struct ata_params *atacap = &atadev->param; char buffer[64]; -#if 0 -/* XXX not right on xscale; ditch for now */ #if BYTE_ORDER == BIG_ENDIAN int16_t *ptr; @@ -611,7 +609,6 @@ *ptr = bswap16(*ptr); } #endif -#endif if (!(!strncmp(atacap->model, "FX", 2) || !strncmp(atacap->model, "NEC", 3) || !strncmp(atacap->model, "Pioneer", 7) || From owner-p4-projects@FreeBSD.ORG Mon Nov 13 19:44:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4A35516A416; Mon, 13 Nov 2006 19:44:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 06FAE16A40F for ; Mon, 13 Nov 2006 19:44:51 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 540A943DA8 for ; Mon, 13 Nov 2006 19:44:24 +0000 (GMT) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADJiN1R074415 for ; Mon, 13 Nov 2006 19:44:23 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADJiNhJ074412 for perforce@freebsd.org; Mon, 13 Nov 2006 19:44:23 GMT (envelope-from jkim@freebsd.org) Date: Mon, 13 Nov 2006 19:44:23 GMT Message-Id: <200611131944.kADJiNhJ074412@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 109872 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 19:44:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=109872 Change 109872 by jkim@jkim_hammer on 2006/11/13 19:43:36 Fix $FreeBSD$ tag. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_aio.c#10 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_aio.c#10 (text+ko) ==== @@ -23,8 +23,7 @@ * SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_aio.c,v 1.1 2006/10/15 14:22:13 -netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_aio.c,v 1.1 2006/10/15 14:22:13 netchild Exp $"); #include "opt_compat.h" From owner-p4-projects@FreeBSD.ORG Mon Nov 13 20:55:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B971116A534; Mon, 13 Nov 2006 20:55:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7906316A527 for ; Mon, 13 Nov 2006 20:55:23 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6F9C43DA0 for ; Mon, 13 Nov 2006 20:53:54 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADKrsmi094833 for ; Mon, 13 Nov 2006 20:53:54 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADKrsfI094830 for perforce@freebsd.org; Mon, 13 Nov 2006 20:53:54 GMT (envelope-from imp@freebsd.org) Date: Mon, 13 Nov 2006 20:53:54 GMT Message-Id: <200611132053.kADKrsfI094830@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 109881 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 20:55:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=109881 Change 109881 by imp@imp_lighthouse on 2006/11/13 20:53:40 No, BOOT_FLAVOR should be lower case. It breaks our builds if is upper case, and we do all the right case conversion. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#27 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#12 edit .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#14 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#27 (text+ko) ==== @@ -5,8 +5,8 @@ __at91_boot_Makefile.inc__: -# TSC, KB920X are the supported flavors -BOOT_FLAVOR=KB920X +# tsc, kb920x are the supported flavors +BOOT_FLAVOR=kb920x CFLAGS=-Os -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#12 (text) ==== @@ -41,6 +41,6 @@ printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, len); WriteEEPROM(0, addr, len); - printf("\nWrite complete. Press reset\n"); + printf("\nWrote %d bytes. Press reset\n", len); return (1); } ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/Makefile#14 (text+ko) ==== @@ -11,7 +11,7 @@ .include -.if ${BOOT_FLAVOR} == "KB920X" +.if ${BOOT_FLAVOR} == "kb920x" CFLAGS+=-DBOOT_IIC .endif CFLAGS+= \ From owner-p4-projects@FreeBSD.ORG Mon Nov 13 21:39:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C5C1516A4EA; Mon, 13 Nov 2006 21:39:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85B0916A4D0 for ; Mon, 13 Nov 2006 21:39:06 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6D4D43EDD for ; Mon, 13 Nov 2006 21:31:10 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADLUgnU002800 for ; Mon, 13 Nov 2006 21:30:42 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADLUfCn002796 for perforce@freebsd.org; Mon, 13 Nov 2006 21:30:41 GMT (envelope-from mjacob@freebsd.org) Date: Mon, 13 Nov 2006 21:30:41 GMT Message-Id: <200611132130.kADLUfCn002796@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109886 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 21:39:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=109886 Change 109886 by mjacob@newisp on 2006/11/13 21:30:21 Clean up some error messages. Affected files ... .. //depot/projects/newisp/dev/isp/isp_freebsd.c#26 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp_freebsd.c#26 (text+ko) ==== @@ -2203,7 +2203,8 @@ if (more_to_do) { isp->isp_osinfo.gdt = timeout(isp_gdt, isp, hz); } else { - isp_prt(isp, ISP_LOGALL, "stopping GDT timer"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "stopping Gone Device Timer"); isp->isp_osinfo.gdt_running = 0; } ISP_UNLOCK(isp); @@ -3065,7 +3066,8 @@ isp->isp_osinfo.ldt = timeout(isp_ldt, isp, isp->isp_osinfo.loop_down_limit * hz); isp->isp_osinfo.ldt_running = 1; - isp_prt(isp, ISP_LOGDEBUG0, "starting LDT timer"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "starting Loop Down Timer"); } isp_prt(isp, ISP_LOGINFO, msg); break; @@ -3205,7 +3207,8 @@ lp->new_reserved = isp->isp_osinfo.gone_device_time; lp->state = FC_PORTDB_STATE_ZOMBIE; if (isp->isp_osinfo.gdt_running == 0) { - isp_prt(isp, ISP_LOGALL, "starting GDT timer"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "starting Gone Device Timer"); isp->isp_osinfo.gdt = timeout(isp_gdt, isp, hz); isp->isp_osinfo.gdt_running = 1; } From owner-p4-projects@FreeBSD.ORG Mon Nov 13 21:44:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 371BD16A4F8; Mon, 13 Nov 2006 21:44:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B75E716A4AB for ; Mon, 13 Nov 2006 21:44:36 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30C8B43F35 for ; Mon, 13 Nov 2006 21:40:10 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADLHP7V099478 for ; Mon, 13 Nov 2006 21:17:25 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADLHPER099475 for perforce@freebsd.org; Mon, 13 Nov 2006 21:17:25 GMT (envelope-from mjacob@freebsd.org) Date: Mon, 13 Nov 2006 21:17:25 GMT Message-Id: <200611132117.kADLHPER099475@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109885 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 21:44:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=109885 Change 109885 by mjacob@newisp on 2006/11/13 21:17:03 Clean up interrupt handler to look a bit closer at FC errors to try and trap the 24XX problems I've been seeing after SAN reconnection. So, we now look at FCP Response Codes (finally). We also adjust the sense pointer appropriately for the 24XX because the Sense data is shifted down if RV is set. Redo the command watchdog routine. We've seen some cases where (inexplicably) we're getting a watchdog call on a command who has definitely been completed (and the CCB been freed). Because the watchdog argument is the CCB, and from that we derive the SIM's softc and *then* search the SIM's outstanding command list to see if the command is still outstanding. The problem is that we then can dereference freed memory. So, the watchdog routine now just searches all SIMs. This doesn't really eliminate the actual problem (watchdog call for a command that's done), but at least keeps us from panicing. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#31 edit .. //depot/projects/newisp/dev/isp/isp_freebsd.c#25 edit .. //depot/projects/newisp/dev/isp/isp_freebsd.h#17 edit .. //depot/projects/newisp/dev/isp/isp_stds.h#7 edit .. //depot/projects/newisp/dev/isp/ispvar.h#15 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#31 (text+ko) ==== @@ -4650,6 +4650,8 @@ isphdr_t *hp; int buddaboom, etype, scsi_status, completion_status; int req_status_flags, req_state_flags; + uint8_t *snsp, *resp; + uint32_t rlen, slen; long resid; uint16_t oop; @@ -4814,13 +4816,37 @@ XS_SETERR(xs, HBA_BOTCH); } + resp = NULL; + rlen = 0; + snsp = NULL; + slen = 0; + if (IS_24XX(isp) && (scsi_status & RQCS_RV) != 0) { + resp = ((isp24xx_statusreq_t *)sp)->req_rsp_sense; + rlen = ((isp24xx_statusreq_t *)sp)->req_response_len; + } else if (IS_FC(isp) && (scsi_status & RQCS_RV) != 0) { + resp = sp->req_response; + rlen = sp->req_response_len; + } if (IS_FC(isp) && (scsi_status & RQCS_SV) != 0) { /* * Fibre Channel F/W doesn't say we got status * if there's Sense Data instead. I guess they * think it goes w/o saying. */ - req_state_flags |= RQSF_GOT_STATUS; + req_state_flags |= RQSF_GOT_STATUS|RQSF_GOT_SENSE; + if (IS_24XX(isp)) { + snsp = + ((isp24xx_statusreq_t *)sp)->req_rsp_sense; + snsp += rlen; + slen = + ((isp24xx_statusreq_t *)sp)->req_sense_len; + } else { + snsp = sp->req_sense_data; + slen = sp->req_sense_len; + } + } else if (IS_SCSI(isp) && (req_state_flags & RQSF_GOT_SENSE)) { + snsp = sp->req_sense_data; + slen = sp->req_sense_len; } if (req_state_flags & RQSF_GOT_STATUS) { *XS_STSP(xs) = scsi_status & 0xff; @@ -4828,8 +4854,13 @@ switch (etype) { case RQSTYPE_RESPONSE: - /* XXX won't work for 24xx */ XS_SET_STATE_STAT(isp, xs, sp); + if (resp) { + isp_prt(isp, ISP_LOGWARN, + "FCP RESPONSE: 0x%x", + resp[FCP_RSPNS_CODE_OFFSET]); + XS_SETERR(xs, HBA_BOTCH); + } if (IS_24XX(isp)) { isp_parse_status_24xx(isp, (isp24xx_statusreq_t *)sp, xs, &resid); @@ -4842,11 +4873,6 @@ } if (IS_SCSI(isp)) { XS_RESID(xs) = resid; - if ((req_state_flags & RQSF_GOT_STATUS) && - (*XS_STSP(xs) == SCSI_CHECK) && - (req_state_flags & RQSF_GOT_SENSE)) { - XS_SAVE_SENSE(xs, sp); - } /* * A new synchronous rate was negotiated for * this target. Mark state such that we'll go @@ -4868,13 +4894,9 @@ } else { XS_RESID(xs) = 0; } - if ((req_state_flags & RQSF_GOT_STATUS) && - (*XS_STSP(xs) == SCSI_CHECK) && - (scsi_status & RQCS_SV)) { - XS_SAVE_SENSE(xs, sp); - /* solely for the benefit of debug */ - req_state_flags |= RQSF_GOT_SENSE; - } + } + if (snsp && slen) { + XS_SAVE_SENSE(xs, snsp, slen); } isp_prt(isp, ISP_LOGDEBUG2, "asked for %ld got raw resid %ld settled for %ld", ==== //depot/projects/newisp/dev/isp/isp_freebsd.c#25 (text+ko) ==== @@ -2038,11 +2038,11 @@ } -static void -isp_watchdog(void *arg) +static int isp_watchdog_work(ispsoftc_t *, XS_T *); + +static int +isp_watchdog_work(ispsoftc_t *isp, XS_T *xs) { - XS_T *xs = arg; - ispsoftc_t *isp = XS_ISP(xs); uint32_t handle; /* @@ -2060,14 +2060,14 @@ isp_prt(isp, ISP_LOGDEBUG1, "watchdog found done cmd (handle 0x%x)", handle); ISP_UNLOCK(isp); - return; + return (1);; } if (XS_CMD_WDOG_P(xs)) { isp_prt(isp, ISP_LOGDEBUG2, "recursive watchdog (handle 0x%x)", handle); ISP_UNLOCK(isp); - return; + return (1); } XS_CMD_S_WDOG(xs); @@ -2085,7 +2085,7 @@ * Make sure the command is *really* dead before we * release the handle (and DMA resources) for reuse. */ - (void) isp_control(isp, ISPCTL_ABORT_CMD, arg); + (void) isp_control(isp, ISPCTL_ABORT_CMD, xs); /* * After this point, the comamnd is really dead. @@ -2108,12 +2108,29 @@ XS_CMD_S_GRACE(xs); isp->isp_sendmarker |= 1 << XS_CHANNEL(xs); } - } else { - isp_prt(isp, ISP_LOGWARN, "watchdog with no command"); + ISP_UNLOCK(isp); + return (1); } ISP_UNLOCK(isp); + return (0); } +static void +isp_watchdog(void *arg) +{ + ispsoftc_t *isp; + XS_T *xs = arg; + for (isp = isplist; isp != NULL; isp = isp->isp_osinfo.next) { + if (isp_watchdog_work(isp, xs)) { + break; + } + } + if (isp == NULL) { + printf("isp_watchdog: nobody had %p active\n", arg); + } +} + + #if __FreeBSD_version >= 500000 #define isp_make_here(isp, tgt) isp_announce(isp, tgt, AC_FOUND_DEVICE) #define isp_make_gone(isp, tgt) isp_announce(isp, tgt, AC_LOST_DEVICE) ==== //depot/projects/newisp/dev/isp/isp_freebsd.h#17 (text+ko) ==== @@ -336,10 +336,9 @@ #define XS_INITERR(ccb) \ XS_SETERR(ccb, CAM_REQ_INPROG), (ccb)->ccb_h.spriv_field0 = 0 -#define XS_SAVE_SENSE(xs, sp) \ - (xs)->ccb_h.status |= CAM_AUTOSNS_VALID, \ - memcpy(&(xs)->sense_data, sp->req_sense_data, \ - imin(XS_SNSLEN(xs), sp->req_sense_len)) +#define XS_SAVE_SENSE(xs, sense_ptr, sense_len) \ + (xs)->ccb_h.status |= CAM_AUTOSNS_VALID; \ + memcpy(&(xs)->sense_data, sense_ptr, imin(XS_SNSLEN(xs), sense_len)) #define XS_SET_STATE_STAT(a, b, c) ==== //depot/projects/newisp/dev/isp/isp_stds.h#7 (text+ko) ==== @@ -129,7 +129,7 @@ /* * RFT_ID Requet CT_IU * - * Source: INCITS xxx-200x Generic Services- 5 Rev 8.5 Section 5.2.5.30 + * Source: NCITS xxx-200x Generic Services- 5 Rev 8.5 Section 5.2.5.30 */ typedef struct { ct_hdr_t rftid_hdr; @@ -138,6 +138,19 @@ uint32_t rftid_fc4types[8]; } rft_id_t; +/* + * FCP Response Code Definitions + * Source: NCITS T10, Project 1144D, Revision 07a (aka FCP2r07a) + */ +#define FCP_RSPNS_CODE_OFFSET 3 + +#define FCP_RSPNS_TMF_DONE 0 +#define FCP_RSPNS_DLBRSTX 1 +#define FCP_RSPNS_BADCMND 2 +#define FCP_RSPNS_EROFS 3 +#define FCP_RSPNS_TMF_REJECT 4 +#define FCP_RSPNS_TMF_FAILED 5 + /* unconverted miscellany */ /* ==== //depot/projects/newisp/dev/isp/ispvar.h#15 (text+ko) ==== @@ -967,7 +967,7 @@ * XS_NOERR(xs) there is no error currently set * XS_INITERR(xs) initialize error state * - * XS_SAVE_SENSE(xs, sp) save sense data + * XS_SAVE_SENSE(xs, sp, len) save sense data * * XS_SET_STATE_STAT(isp, sp, xs) platform dependent interpreter of * response queue entry status bits From owner-p4-projects@FreeBSD.ORG Mon Nov 13 21:46:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5CFF816A4C8; Mon, 13 Nov 2006 21:46:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1DD5116A494 for ; Mon, 13 Nov 2006 21:46:39 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0E9CB43E3A for ; Mon, 13 Nov 2006 21:43:59 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADLhxWB005951 for ; Mon, 13 Nov 2006 21:43:59 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADLhxW1005948 for perforce@freebsd.org; Mon, 13 Nov 2006 21:43:59 GMT (envelope-from mjacob@freebsd.org) Date: Mon, 13 Nov 2006 21:43:59 GMT Message-Id: <200611132143.kADLhxW1005948@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109888 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 21:46:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=109888 Change 109888 by mjacob@newisp on 2006/11/13 21:43:53 Demote isp_tarminate_cmd to being a platform provided function. Affected files ... .. //depot/projects/newisp/dev/isp/isp_target.c#11 edit .. //depot/projects/newisp/dev/isp/isp_target.h#12 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp_target.c#11 (text+ko) ==== @@ -724,35 +724,6 @@ } /* - * Terminate a command - */ -int -isp_terminate_cmd(ispsoftc_t *isp, void *arg) -{ - tmd_cmd_t *tmd = arg; - ct7_entry_t local, *cto = &local;; - - if (!IS_24XX(isp)) { - return (-1); - } - isp_prt(isp, ISP_LOGINFO, - "isp_terminate_cmd: [0x%0x] is being terminated", - tmd->cd_tagval); - MEMZERO(&local, sizeof (local)); - cto->ct_header.rqs_entry_type = RQSTYPE_CTIO7; - cto->ct_header.rqs_entry_count = 1; - cto->ct_nphdl = tmd->cd_nphdl; - cto->ct_rxid = tmd->cd_tagval; - cto->ct_iid_lo = tmd->cd_portid; - cto->ct_iid_hi = tmd->cd_portid >> 16; - cto->ct_oxid = tmd->cd_oxid; - cto->ct_flags = CT7_TERMINATE; - cto->ct_syshandle = 0; - return (isp_target_put_entry(isp, &local)); -} - - -/* * These are either broadcast events or specifically CTIO fast completion */ int ==== //depot/projects/newisp/dev/isp/isp_target.h#12 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Mon Nov 13 21:48:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA6DA16A4A0; Mon, 13 Nov 2006 21:48:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 773E516A403 for ; Mon, 13 Nov 2006 21:48:37 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AAD5943E66 for ; Mon, 13 Nov 2006 21:46:02 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADLk2DK006306 for ; Mon, 13 Nov 2006 21:46:02 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADLk26x006303 for perforce@freebsd.org; Mon, 13 Nov 2006 21:46:02 GMT (envelope-from mjacob@freebsd.org) Date: Mon, 13 Nov 2006 21:46:02 GMT Message-Id: <200611132146.kADLk26x006303@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109889 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 21:48:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=109889 Change 109889 by mjacob@newisp on 2006/11/13 21:46:01 Demote isp_terminate_cmd to being a platform function. Affected files ... .. //depot/projects/newisp/dev/isp/isp_target.h#13 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp_target.h#13 (text+ko) ==== @@ -936,11 +936,6 @@ #define ECMD_SVALID 0x100 /* - * General routine to terminate an active command - */ -int isp_terminate_cmd(ispsoftc_t *, void *); - -/* * Handle an asynchronous event * * Return nonzero if the interrupt that generated this event has been dismissed. From owner-p4-projects@FreeBSD.ORG Mon Nov 13 21:52:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E8E7416A412; Mon, 13 Nov 2006 21:52:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 728AA16A4EF; Mon, 13 Nov 2006 21:52:40 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id D966443DAE; Mon, 13 Nov 2006 21:52:04 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kADLpadr016132; Mon, 13 Nov 2006 16:52:01 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jung-uk Kim Date: Mon, 13 Nov 2006 16:06:21 -0500 User-Agent: KMail/1.9.1 References: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> In-Reply-To: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611131606.21477.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Mon, 13 Nov 2006 16:52:01 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2191/Mon Nov 13 13:37:53 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 109706 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 21:52:41 -0000 On Friday 10 November 2006 18:00, Jung-uk Kim wrote: > http://perforce.freebsd.org/chv.cgi?CH=109706 > > Change 109706 by jkim@jkim_hammer on 2006/11/10 22:59:53 > > Add (ugly) 32-bit msgsnd/msgrcv support for amd64. > msgp points to msghdr and msghdr contains msg_type, which is long. > When we copyin/copyout, we copy the correct msg_type and advance msgp > by msg_type size. > > This fixes LTP test cases msgget01, msgrcv01, msgrcv02, msgrcv04, and > msgsnd03. > > Note: There is only one test case blocked in msgwait state after this > change, which seems to be arch-independent issue. > > Affected files ... > > .. //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#3 edit > .. //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#5 edit Why not add kern_msgfoo() functions and do the copyout/copyin in other places instead? > Differences ... > > ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#3 (text+ko) ==== > > @@ -83,6 +83,10 @@ > l_ulong swap_successes; > }; > > +/* XXX This should not be here. */ > +int do_msgsnd(struct thread *, struct msgsnd_args *, size_t); > +int do_msgrcv(struct thread *, struct msgrcv_args *, size_t); > + > static void > bsd_to_linux_shminfo( struct shminfo *bpp, struct l_shminfo *lpp) > { > @@ -586,7 +590,8 @@ > bsd_args.msgp = PTRIN(args->msgp); > bsd_args.msgsz = args->msgsz; > bsd_args.msgflg = args->msgflg; > - return msgsnd(td, &bsd_args); > + > + return (do_msgsnd(td, &bsd_args, sizeof(l_long))); > } > > int > @@ -605,7 +610,8 @@ > bsd_args.msgsz = args->msgsz; > bsd_args.msgtyp = args->msgtyp; > bsd_args.msgflg = args->msgflg; > - return msgrcv(td, &bsd_args); > + > + return (do_msgrcv(td, &bsd_args, sizeof(l_long))); > } > > int > > ==== //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#5 (text+ko) ==== > > @@ -662,6 +662,11 @@ > return (error); > } > > +union msgtyp { > + long mtype; > + int32_t mtype32; > +}; > + > #ifndef _SYS_SYSPROTO_H_ > struct msgsnd_args { > int msqid; > @@ -671,14 +676,16 @@ > }; > #endif > > -/* > - * MPSAFE > - */ > +/* XXX This should not be here. */ > +int do_msgsnd(struct thread *, struct msgsnd_args *, size_t); > + > int > -msgsnd(td, uap) > +do_msgsnd(td, uap, mtsz) > struct thread *td; > register struct msgsnd_args *uap; > + size_t mtsz; > { > + union msgtyp msgt; > int msqid = uap->msqid; > const void *user_msgp = uap->msgp; > size_t msgsz = uap->msgsz; > @@ -693,6 +700,9 @@ > if (!jail_sysvipc_allowed && jailed(td->td_ucred)) > return (ENOSYS); > > + if (mtsz != sizeof(msgt.mtype) && mtsz != sizeof(msgt.mtype32)) > + return (EINVAL); > + > mtx_lock(&msq_mtx); > msqid = IPCID_TO_IX(msqid); > > @@ -875,8 +885,7 @@ > */ > > mtx_unlock(&msq_mtx); > - if ((error = copyin(user_msgp, &msghdr->msg_type, > - sizeof(msghdr->msg_type))) != 0) { > + if ((error = copyin(user_msgp, &msgt, mtsz)) != 0) { > mtx_lock(&msq_mtx); > DPRINTF(("error %d copying the message type\n", error)); > msg_freehdr(msghdr); > @@ -884,8 +893,9 @@ > wakeup(msqkptr); > goto done2; > } > + msghdr->msg_type = (mtsz == sizeof(long)) ? msgt.mtype : msgt.mtype32; > mtx_lock(&msq_mtx); > - user_msgp = (const char *)user_msgp + sizeof(msghdr->msg_type); > + user_msgp = (const char *)user_msgp + mtsz; > > /* > * Validate the message type > @@ -995,6 +1005,17 @@ > return (error); > } > > +/* > + * MPSAFE > + */ > +int > +msgsnd(td, uap) > + struct thread *td; > + register struct msgsnd_args *uap; > +{ > + return (do_msgsnd(td, uap, sizeof(long))); > +} > + > #ifndef _SYS_SYSPROTO_H_ > struct msgrcv_args { > int msqid; > @@ -1005,14 +1026,16 @@ > }; > #endif > > -/* > - * MPSAFE > - */ > +/* XXX This should not be here. */ > +int do_msgrcv(struct thread *, struct msgrcv_args *, size_t); > + > int > -msgrcv(td, uap) > +do_msgrcv(td, uap, mtsz) > struct thread *td; > register struct msgrcv_args *uap; > + size_t mtsz; > { > + union msgtyp msgt; > int msqid = uap->msqid; > void *user_msgp = uap->msgp; > size_t msgsz = uap->msgsz; > @@ -1030,6 +1053,9 @@ > if (!jail_sysvipc_allowed && jailed(td->td_ucred)) > return (ENOSYS); > > + if (mtsz != sizeof(msgt.mtype) && mtsz != sizeof(msgt.mtype32)) > + return (EINVAL); > + > msqid = IPCID_TO_IX(msqid); > > if (msqid < 0 || msqid >= msginfo.msgmni) { > @@ -1226,8 +1252,11 @@ > */ > > mtx_unlock(&msq_mtx); > - error = copyout(&(msghdr->msg_type), user_msgp, > - sizeof(msghdr->msg_type)); > + if (mtsz == sizeof(long)) > + msgt.mtype = msghdr->msg_type; > + else > + msgt.mtype32 = msghdr->msg_type; > + error = copyout(&msgt, user_msgp, mtsz); > mtx_lock(&msq_mtx); > if (error != 0) { > DPRINTF(("error (%d) copying out message type\n", error)); > @@ -1235,7 +1264,7 @@ > wakeup(msqkptr); > goto done2; > } > - user_msgp = (char *)user_msgp + sizeof(msghdr->msg_type); > + user_msgp = (char *)user_msgp + mtsz; > > /* > * Return the segments to the user > @@ -1280,6 +1309,17 @@ > return (error); > } > > +/* > + * MPSAFE > + */ > +int > +msgrcv(td, uap) > + struct thread *td; > + register struct msgrcv_args *uap; > +{ > + return (do_msgrcv(td, uap, sizeof(long))); > +} > + > static int > sysctl_msqids(SYSCTL_HANDLER_ARGS) > { > -- John Baldwin From owner-p4-projects@FreeBSD.ORG Mon Nov 13 22:09:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EE26B16A4C2; Mon, 13 Nov 2006 22:09:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AD63D16A415 for ; Mon, 13 Nov 2006 22:09:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 677FB43DAA for ; Mon, 13 Nov 2006 22:08:45 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADM8Xtq013047 for ; Mon, 13 Nov 2006 22:08:33 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADM8V96013043 for perforce@freebsd.org; Mon, 13 Nov 2006 22:08:31 GMT (envelope-from jhb@freebsd.org) Date: Mon, 13 Nov 2006 22:08:31 GMT Message-Id: <200611132208.kADM8V96013043@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 109891 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 22:09:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=109891 Change 109891 by jhb@jhb_mutex on 2006/11/13 22:08:01 IFC @109890. Affected files ... .. //depot/projects/smpng/sys/Makefile#14 integrate .. //depot/projects/smpng/sys/amd64/amd64/db_disasm.c#5 integrate .. //depot/projects/smpng/sys/amd64/amd64/pmap.c#69 integrate .. //depot/projects/smpng/sys/amd64/include/pmap.h#25 integrate .. //depot/projects/smpng/sys/amd64/linux32/linux32_proto.h#18 integrate .. //depot/projects/smpng/sys/amd64/linux32/linux32_syscall.h#18 integrate .. //depot/projects/smpng/sys/amd64/linux32/linux32_sysent.c#18 integrate .. //depot/projects/smpng/sys/arm/arm/pmap.c#36 integrate .. //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#12 integrate .. //depot/projects/smpng/sys/arm/include/pmap.h#20 integrate .. //depot/projects/smpng/sys/arm/sa11x0/assabet_machdep.c#13 integrate .. //depot/projects/smpng/sys/boot/arm/at91/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/Makefile.inc#4 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot0iic/main.c#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot2/Makefile#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot2/board.h#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/boot2/boot2.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot2/kb920x_board.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/Makefile#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootspi/Makefile#4 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/Makefile#5 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/emac.c#5 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/emac.h#5 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/emac_init.c#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/mci_device.h#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/memcmp.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/memcpy.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/memset.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/sd-card.c#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/strcmp.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/strcpy.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/strcvt.c#2 integrate .. //depot/projects/smpng/sys/boot/arm/at91/libat91/strlen.c#2 integrate .. //depot/projects/smpng/sys/boot/pc98/btx/btx/btx.S#6 integrate .. //depot/projects/smpng/sys/boot/pc98/libpc98/biossmap.c#1 branch .. //depot/projects/smpng/sys/coda/coda_vnops.c#27 integrate .. //depot/projects/smpng/sys/coda/coda_vnops.h#11 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_proto.h#36 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscall.h#36 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_syscalls.c#36 integrate .. //depot/projects/smpng/sys/compat/freebsd32/freebsd32_sysent.c#36 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#74 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_proto.h#19 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_syscall.h#18 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_syscallnames.c#18 integrate .. //depot/projects/smpng/sys/compat/svr4/svr4_sysent.c#18 integrate .. //depot/projects/smpng/sys/conf/NOTES#130 integrate .. //depot/projects/smpng/sys/conf/files#190 integrate .. //depot/projects/smpng/sys/conf/files.arm#10 integrate .. //depot/projects/smpng/sys/conf/files.sun4v#2 integrate .. //depot/projects/smpng/sys/conf/options#129 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pci_link.c#36 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib_acpi.c#22 integrate .. //depot/projects/smpng/sys/dev/acpica/acpi_pcib_pci.c#12 integrate .. //depot/projects/smpng/sys/dev/aha/ahareg.h#7 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#76 integrate .. //depot/projects/smpng/sys/dev/em/if_em.h#37 integrate .. //depot/projects/smpng/sys/dev/pci/pci.c#76 integrate .. //depot/projects/smpng/sys/dev/pci/pci_if.m#7 integrate .. //depot/projects/smpng/sys/dev/pci/pci_pci.c#30 integrate .. //depot/projects/smpng/sys/dev/pci/pci_private.h#18 integrate .. //depot/projects/smpng/sys/dev/pci/pcib_if.m#5 integrate .. //depot/projects/smpng/sys/dev/pci/pcib_private.h#8 integrate .. //depot/projects/smpng/sys/dev/pci/pcireg.h#16 integrate .. //depot/projects/smpng/sys/dev/pci/pcivar.h#21 integrate .. //depot/projects/smpng/sys/dev/usb/usb_quirks.c#21 integrate .. //depot/projects/smpng/sys/dev/usb/usbdevs#96 integrate .. //depot/projects/smpng/sys/fs/nullfs/null_vnops.c#28 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#109 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_proto.h#18 integrate .. //depot/projects/smpng/sys/i386/ibcs2/ibcs2_xenix.h#13 integrate .. //depot/projects/smpng/sys/i386/include/pmap.h#32 integrate .. //depot/projects/smpng/sys/i386/linux/linux_proto.h#37 integrate .. //depot/projects/smpng/sys/i386/pci/pci_pir.c#11 integrate .. //depot/projects/smpng/sys/ia64/ia64/pmap.c#82 integrate .. //depot/projects/smpng/sys/ia64/include/pmap.h#25 integrate .. //depot/projects/smpng/sys/kern/Make.tags.inc#5 integrate .. //depot/projects/smpng/sys/kern/init_main.c#63 integrate .. //depot/projects/smpng/sys/kern/init_sysent.c#79 integrate .. //depot/projects/smpng/sys/kern/kern_idle.c#27 integrate .. //depot/projects/smpng/sys/kern/kern_lock.c#57 integrate .. //depot/projects/smpng/sys/kern/kern_mutex.c#137 integrate .. //depot/projects/smpng/sys/kern/kern_rwlock.c#9 integrate .. //depot/projects/smpng/sys/kern/kern_sig.c#128 integrate .. //depot/projects/smpng/sys/kern/kern_sx.c#39 integrate .. //depot/projects/smpng/sys/kern/kern_thr.c#39 integrate .. //depot/projects/smpng/sys/kern/kern_time.c#48 integrate .. //depot/projects/smpng/sys/kern/ksched.c#1 branch .. //depot/projects/smpng/sys/kern/makesyscalls.sh#23 integrate .. //depot/projects/smpng/sys/kern/p1003_1b.c#1 branch .. //depot/projects/smpng/sys/kern/posix4_mib.c#1 branch .. //depot/projects/smpng/sys/kern/sched_4bsd.c#62 integrate .. //depot/projects/smpng/sys/kern/subr_lock.c#4 integrate .. //depot/projects/smpng/sys/kern/subr_witness.c#156 integrate .. //depot/projects/smpng/sys/kern/syscalls.c#79 integrate .. //depot/projects/smpng/sys/kern/systrace_args.c#6 integrate .. //depot/projects/smpng/sys/kern/uipc_mqueue.c#10 integrate .. //depot/projects/smpng/sys/kern/uipc_sem.c#22 integrate .. //depot/projects/smpng/sys/kern/uipc_syscalls.c#96 integrate .. //depot/projects/smpng/sys/kern/vfs_aio.c#76 integrate .. //depot/projects/smpng/sys/kern/vfs_default.c#48 integrate .. //depot/projects/smpng/sys/kern/vfs_subr.c#136 integrate .. //depot/projects/smpng/sys/kern/vfs_vnops.c#77 integrate .. //depot/projects/smpng/sys/kern/vnode_if.src#29 integrate .. //depot/projects/smpng/sys/modules/Makefile#129 integrate .. //depot/projects/smpng/sys/modules/acpi/Makefile#30 integrate .. //depot/projects/smpng/sys/modules/if_ppp/Makefile#9 integrate .. //depot/projects/smpng/sys/net/bridgestp.c#15 integrate .. //depot/projects/smpng/sys/net/bridgestp.h#5 integrate .. //depot/projects/smpng/sys/net/if_bridge.c#40 integrate .. //depot/projects/smpng/sys/net/if_bridgevar.h#14 integrate .. //depot/projects/smpng/sys/net/if_ppp.c#44 integrate .. //depot/projects/smpng/sys/net/if_pppvar.h#11 integrate .. //depot/projects/smpng/sys/netinet/ip_fw2.c#80 integrate .. //depot/projects/smpng/sys/netinet/sctp_constants.h#2 integrate .. //depot/projects/smpng/sys/netinet/sctp_indata.c#2 integrate .. //depot/projects/smpng/sys/netinet/sctp_input.c#2 integrate .. //depot/projects/smpng/sys/netinet/sctp_output.c#2 integrate .. //depot/projects/smpng/sys/netinet/sctp_uio.h#2 integrate .. //depot/projects/smpng/sys/netinet/sctp_usrreq.c#2 integrate .. //depot/projects/smpng/sys/netinet/sctputil.c#2 integrate .. //depot/projects/smpng/sys/netinet/sctputil.h#2 integrate .. //depot/projects/smpng/sys/pc98/pc98/machdep.c#18 integrate .. //depot/projects/smpng/sys/posix4/_semaphore.h#6 delete .. //depot/projects/smpng/sys/posix4/ksched.c#21 delete .. //depot/projects/smpng/sys/posix4/ksem.h#2 delete .. //depot/projects/smpng/sys/posix4/p1003_1b.c#16 delete .. //depot/projects/smpng/sys/posix4/posix4.h#8 delete .. //depot/projects/smpng/sys/posix4/posix4_mib.c#7 delete .. //depot/projects/smpng/sys/posix4/sched.h#4 delete .. //depot/projects/smpng/sys/posix4/semaphore.h#7 delete .. //depot/projects/smpng/sys/powerpc/powerpc/mmu_oea.c#8 integrate .. //depot/projects/smpng/sys/powerpc/powerpc/pmap_dispatch.c#7 integrate .. //depot/projects/smpng/sys/security/mac/mac_posix_sem.c#4 integrate .. //depot/projects/smpng/sys/security/mac_biba/mac_biba.c#42 integrate .. //depot/projects/smpng/sys/security/mac_mls/mac_mls.c#37 integrate .. //depot/projects/smpng/sys/security/mac_stub/mac_stub.c#18 integrate .. //depot/projects/smpng/sys/security/mac_test/mac_test.c#34 integrate .. //depot/projects/smpng/sys/sparc64/sparc64/pmap.c#69 integrate .. //depot/projects/smpng/sys/sun4v/conf/GENERIC#2 integrate .. //depot/projects/smpng/sys/sun4v/include/cpufunc.h#2 integrate .. //depot/projects/smpng/sys/sun4v/include/pmap.h#2 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/hcall.S#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/interrupt.S#2 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/intr_machdep.c#2 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/rtc.c#2 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/support.S#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/trap.c#4 integrate .. //depot/projects/smpng/sys/sys/_lock.h#14 integrate .. //depot/projects/smpng/sys/sys/_mutex.h#16 integrate .. //depot/projects/smpng/sys/sys/_semaphore.h#1 branch .. //depot/projects/smpng/sys/sys/ksem.h#1 branch .. //depot/projects/smpng/sys/sys/lock.h#40 integrate .. //depot/projects/smpng/sys/sys/lock_profile.h#1 branch .. //depot/projects/smpng/sys/sys/lockmgr.h#19 integrate .. //depot/projects/smpng/sys/sys/mutex.h#66 integrate .. //depot/projects/smpng/sys/sys/param.h#106 integrate .. //depot/projects/smpng/sys/sys/posix4.h#1 branch .. //depot/projects/smpng/sys/sys/proc.h#173 integrate .. //depot/projects/smpng/sys/sys/sched.h#24 integrate .. //depot/projects/smpng/sys/sys/semaphore.h#1 branch .. //depot/projects/smpng/sys/sys/syscall.h#78 integrate .. //depot/projects/smpng/sys/sys/syscall.mk#78 integrate .. //depot/projects/smpng/sys/sys/sysproto.h#82 integrate .. //depot/projects/smpng/sys/sys/thr.h#11 integrate .. //depot/projects/smpng/sys/sys/umtx.h#18 integrate .. //depot/projects/smpng/sys/sys/vnode.h#75 integrate .. //depot/projects/smpng/sys/ufs/ffs/ffs_vnops.c#48 integrate .. //depot/projects/smpng/sys/vm/vm_fault.c#63 integrate .. //depot/projects/smpng/sys/vm/vm_kern.c#34 integrate Differences ... ==== //depot/projects/smpng/sys/Makefile#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $ +# $FreeBSD: src/sys/Makefile,v 1.39 2006/11/11 16:26:55 trhodes Exp $ .include @@ -11,7 +11,7 @@ CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ isofs kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipx netkey netnatm netncp \ - netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \ + netsmb nfs nfsclient nfs4client rpc pccard pci sys \ ufs vm ${ARCHDIR} ARCHDIR ?= ${MACHINE} ==== //depot/projects/smpng/sys/amd64/amd64/db_disasm.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.30 2005/03/30 22:57:41 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.31 2006/11/13 21:14:54 jhb Exp $"); /* * Instruction disassembler. @@ -84,6 +84,7 @@ #define Ib 21 /* byte immediate, unsigned */ #define Ibs 22 /* byte immediate, signed */ #define Iw 23 /* word immediate, unsigned */ +#define Ilq 24 /* long/quad immediate, unsigned */ #define O 25 /* direct address */ #define Db 26 /* byte displacement from EIP */ #define Dl 27 /* long displacement from EIP */ @@ -351,7 +352,6 @@ 0, 0, 0, - 0, db_inst_0f8x, db_inst_0f9x, db_inst_0fax, @@ -752,14 +752,14 @@ /*b6*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 }, /*b7*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 }, -/*b8*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*b9*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*ba*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bb*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bc*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bd*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*be*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bf*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, +/*b8*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*b9*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*ba*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bb*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bc*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bd*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*be*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bf*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, /*c0*/ { "", TRUE, BYTE, op2(Ib, E), db_Grp2 }, /*c1*/ { "", TRUE, LONG, op2(Ib, E), db_Grp2 }, @@ -854,17 +854,6 @@ int ss; }; -static const char * const db_index_reg_16[8] = { - "%bx,%si", - "%bx,%di", - "%bp,%si", - "%bp,%di", - "%si", - "%di", - "%bp", - "%bx" -}; - static const char * const db_reg[2][4][16] = { {{"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh", @@ -927,7 +916,7 @@ int regmodrm; struct i_addr * addrp; /* out */ { - int mod, rm, sib, index, disp; + int mod, rm, sib, index, disp, size, have_sib; mod = f_mod(rex, regmodrm); rm = f_rm(rex, regmodrm); @@ -940,68 +929,49 @@ addrp->is_reg = FALSE; addrp->index = 0; - if (short_addr) { - addrp->index = 0; - addrp->ss = 0; - switch (mod) { - case 0: - if (rm == 6) { - get_value_inc(disp, loc, 2, FALSE); - addrp->disp = disp; - addrp->base = 0; - } - else { - addrp->disp = 0; - addrp->base = db_index_reg_16[rm]; - } - break; - case 1: - get_value_inc(disp, loc, 1, TRUE); - disp &= 0xFFFF; - addrp->disp = disp; - addrp->base = db_index_reg_16[rm]; - break; - case 2: - get_value_inc(disp, loc, 2, FALSE); - addrp->disp = disp; - addrp->base = db_index_reg_16[rm]; - break; - } - } - else { - if (mod != 3 && rm == 4) { - get_value_inc(sib, loc, 1, FALSE); - rm = sib_base(rex, sib); - index = sib_index(rex, sib); - if (index != 4) - addrp->index = db_reg[1][QUAD][index]; - addrp->ss = sib_ss(rex, sib); - } + if (short_addr) + size = LONG; + else + size = QUAD; + + if ((rm & 0x7) == 4) { + get_value_inc(sib, loc, 1, FALSE); + rm = sib_base(rex, sib); + index = sib_index(rex, sib); + if (index != 4) + addrp->index = db_reg[1][size][index]; + addrp->ss = sib_ss(rex, sib); + have_sib = 1; + } else + have_sib = 0; - switch (mod) { - case 0: - if (rm == 5) { - get_value_inc(addrp->disp, loc, 4, FALSE); + switch (mod) { + case 0: + if (rm == 5) { + get_value_inc(addrp->disp, loc, 4, FALSE); + if (have_sib) addrp->base = 0; - } - else { - addrp->disp = 0; - addrp->base = db_reg[1][QUAD][rm]; - } - break; + else if (short_addr) + addrp->base = "%eip"; + else + addrp->base = "%rip"; + } else { + addrp->disp = 0; + addrp->base = db_reg[1][size][rm]; + } + break; - case 1: - get_value_inc(disp, loc, 1, TRUE); - addrp->disp = disp; - addrp->base = db_reg[1][QUAD][rm]; - break; + case 1: + get_value_inc(disp, loc, 1, TRUE); + addrp->disp = disp; + addrp->base = db_reg[1][size][rm]; + break; - case 2: - get_value_inc(disp, loc, 4, FALSE); - addrp->disp = disp; - addrp->base = db_reg[1][QUAD][rm]; - break; - } + case 2: + get_value_inc(disp, loc, 4, FALSE); + addrp->disp = disp; + addrp->base = db_reg[1][size][rm]; + break; } return (loc); } @@ -1022,7 +992,8 @@ db_printf("%s:", seg); } - db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); + if (addrp->disp != 0 || (addrp->base == 0 && addrp->index == 0)) + db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); if (addrp->base != 0 || addrp->index != 0) { db_printf("("); if (addrp->base) @@ -1154,6 +1125,7 @@ int prefix; int imm; int imm2; + long imm64; int len; struct i_addr address; @@ -1426,6 +1398,12 @@ db_printf("$%#r", imm); break; + case Ilq: + len = db_lengths[rex & REX_W ? QUAD : LONG]; + get_value_inc(imm64, loc, len, FALSE); + db_printf("$%#lr", imm64); + break; + case O: len = (short_addr ? 2 : 4); get_value_inc(displ, loc, len, FALSE); ==== //depot/projects/smpng/sys/amd64/amd64/pmap.c#69 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.572 2006/10/22 04:18:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.573 2006/11/12 21:48:32 alc Exp $"); /* * Manages physical address maps. @@ -2357,8 +2357,10 @@ * Now validate mapping with desired protection/wiring. */ newpte = (pt_entry_t)(pa | PG_V); - if ((prot & VM_PROT_WRITE) != 0) + if ((prot & VM_PROT_WRITE) != 0) { newpte |= PG_RW; + vm_page_flag_set(m, PG_WRITEABLE); + } if ((prot & VM_PROT_EXECUTE) == 0) newpte |= pg_nx; if (wired) ==== //depot/projects/smpng/sys/amd64/include/pmap.h#25 (text+ko) ==== @@ -39,7 +39,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.134 2006/08/11 19:22:56 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.136 2006/11/13 20:33:54 ru Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -101,9 +101,10 @@ ((unsigned long)(l2) << PDRSHIFT) | \ ((unsigned long)(l1) << PAGE_SHIFT)) -/* Initial number of kernel page tables */ +/* Initial number of kernel page tables. */ #ifndef NKPT -#define NKPT 240 /* Enough for 16GB (2MB page tables) */ +/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */ +#define NKPT 240 #endif #define NKPML4E 1 /* number of kernel PML4 slots */ @@ -262,7 +263,7 @@ /* * For each vm_page_t, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. + * mappings of that page. An entry is a pv_entry_t, the list is pv_list. */ typedef struct pv_entry { vm_offset_t pv_va; /* virtual address for mapping */ ==== //depot/projects/smpng/sys/amd64/linux32/linux32_proto.h#18 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include ==== //depot/projects/smpng/sys/amd64/linux32/linux32_syscall.h#18 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ ==== //depot/projects/smpng/sys/amd64/linux32/linux32_sysent.c#18 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ ==== //depot/projects/smpng/sys/arm/arm/pmap.c#36 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.71 2006/11/08 06:31:28 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.73 2006/11/12 21:48:32 alc Exp $"); #include #include #include @@ -218,7 +218,6 @@ static MALLOC_DEFINE(M_VMPMAP, "pmap", "PMAP L1"); -vm_offset_t avail_end; /* PA of last available physical page */ vm_offset_t virtual_avail; /* VA of first avail page (after kernel bss) */ vm_offset_t virtual_end; /* VA of last avail page (end of kernel AS) */ vm_offset_t pmap_curmaxkvaddr; @@ -3397,8 +3396,11 @@ npte |= L2_TYPE_INV; } - if (prot & VM_PROT_WRITE) + if (prot & VM_PROT_WRITE) { npte |= L2_S_PROT_W; + if (m != NULL) + vm_page_flag_set(m, PG_WRITEABLE); + } npte |= pte_l2_s_cache_mode; if (m && m == opg) { /* ==== //depot/projects/smpng/sys/arm/at91/kb920x_machdep.c#12 (text) ==== @@ -48,7 +48,7 @@ #include "opt_at91.h" #include -__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.18 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/at91/kb920x_machdep.c,v 1.19 2006/11/11 20:57:52 alc Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -129,7 +129,6 @@ vm_paddr_t phys_avail[10]; vm_paddr_t dump_avail[4]; vm_offset_t physical_pages; -vm_offset_t clean_sva, clean_eva; struct pv_addr systempage; struct pv_addr msgbufpv; @@ -496,7 +495,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = KERNPHYSADDR + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); ==== //depot/projects/smpng/sys/arm/include/pmap.h#20 (text+ko) ==== @@ -44,7 +44,7 @@ * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 * - * $FreeBSD: src/sys/arm/include/pmap.h,v 1.21 2006/11/07 22:36:56 cognet Exp $ + * $FreeBSD: src/sys/arm/include/pmap.h,v 1.23 2006/11/13 06:26:56 ru Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -170,7 +170,7 @@ /* * For each vm_page_t, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. + * mappings of that page. An entry is a pv_entry_t, the list is pv_list. */ typedef struct pv_entry { pmap_t pv_pmap; /* pmap where mapping lies */ @@ -213,9 +213,6 @@ return (ptep); } -extern vm_offset_t avail_end; -extern vm_offset_t clean_eva; -extern vm_offset_t clean_sva; extern vm_offset_t phys_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; ==== //depot/projects/smpng/sys/arm/sa11x0/assabet_machdep.c#13 (text+ko) ==== @@ -47,7 +47,7 @@ #include -__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.19 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/sa11x0/assabet_machdep.c,v 1.20 2006/11/11 20:57:52 alc Exp $"); #include "opt_md.h" @@ -146,7 +146,6 @@ vm_paddr_t physical_end; vm_paddr_t physical_freestart; vm_offset_t physical_pages; -vm_offset_t clean_sva, clean_eva; struct pv_addr systempage; struct pv_addr irqstack; @@ -455,7 +454,6 @@ init_param1(); init_param2(physmem); kdb_init(); - avail_end = 0xc0000000 + memsize - 1; return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } ==== //depot/projects/smpng/sys/boot/arm/at91/Makefile#2 (text) ==== @@ -1,5 +1,5 @@ -# $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.2 2006/04/21 06:43:32 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/Makefile,v 1.3 2006/11/09 20:45:21 imp Exp $ -SUBDIR= libat91 boot0 boot0iic boot0spi bootiic bootspi +SUBDIR= libat91 boot0 boot0iic boot0spi boot2 bootiic bootspi .include ==== //depot/projects/smpng/sys/boot/arm/at91/Makefile.inc#4 (text) ==== @@ -1,11 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.4 2006/10/21 22:51:20 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/Makefile.inc,v 1.5 2006/11/09 19:58:14 imp Exp $ .if !target(__at91_boot_Makefile.inc__) .PATH: ${.CURDIR}/../../../../libkern ${.CURDIR}/../../../../libkern/arm __at91_boot_Makefile.inc__: -CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ +# tsc, kb920x are the supported flavors +BOOT_FLAVOR=kb920x + +CFLAGS=-Os -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ -I${.CURDIR}/../../../.. \ -I${.CURDIR}/../../../../arm \ @@ -13,13 +16,12 @@ -Wall -Waggregate-return \ -Wnested-externs \ -Wpointer-arith -Wshadow -Wwrite-strings \ - -Werror -# -Wmissing-prototypes -# -Wmissing-declarations + -Werror \ + -Wmissing-prototypes \ + -Wmissing-declarations # -Wstrict-prototypes -#CFLAGS+=-DBOOT_TSC -CFLAGS+=-DBOOT_KB9202 +CFLAGS+=-DBOOT_${BOOT_FLAVOR:U} LIBAT91=${.OBJDIR}/../libat91/libat91.a ==== //depot/projects/smpng/sys/boot/arm/at91/boot0iic/main.c#3 (text) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.2 2006/08/16 23:14:52 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.3 2006/11/09 19:55:25 imp Exp $ */ #include "at91rm9200.h" @@ -36,8 +36,8 @@ while (xmodem_rx(addr) == -1) continue; InitEEPROM(); - printf("Writing EEPROM from 0x%x to addr 0\r\n", addr); + printf("Writing EEPROM from 0x%x to addr 0\n", addr); WriteEEPROM(0, addr, 8192); - printf("Write complete. Press reset\r\n"); + printf("Write complete. Press reset\n"); return (1); } ==== //depot/projects/smpng/sys/boot/arm/at91/boot2/Makefile#2 (text+ko) ==== @@ -1,16 +1,22 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.1 2006/10/20 09:12:05 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.2 2006/11/09 20:07:26 imp Exp $ -.PATH: ${.CURDIR}/../bootspi +.PATH: ${.CURDIR}/../libat91 P=boot2 FILES=${P} -SRCS=arm_init.S boot2.c kb920x_board.c ee.c +SRCS=arm_init.S boot2.c ${BOOT_FLAVOR}_board.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +.if ${BOOT_FLAVOR} == "tsc" +SRCS+=ee.c +.endif +.if ${BOOT_FLAVOR} == "kb920x" +CFLAGS+=-DBOOT_IIC +.endif CFLAGS+= \ -I${.CURDIR}/../bootspi \ -I${.CURDIR}/../../../common \ ==== //depot/projects/smpng/sys/boot/arm/at91/boot2/boot2.c#2 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.1 2006/10/20 09:12:05 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.2 2006/11/09 20:07:26 imp Exp $"); #include #include @@ -30,6 +30,7 @@ #include "lib.h" #include "sd-card.h" #include "ee.h" +#include "board.h" #define RBX_ASKNAME 0x0 /* -a */ #define RBX_SINGLE 0x1 /* -s */ @@ -66,7 +67,7 @@ #define PATH_CONFIG "/boot.config" //#define PATH_KERNEL "/boot/kernel/kernel" -#define PATH_KERNEL "/kernel.gz.tramp" +#define PATH_KERNEL "/boot/kernel/kernel.gz.tramp" #define NOPT 5 @@ -141,9 +142,6 @@ } } -// Each board has to provide one of these. -void board_init(void); - int main(void) { ==== //depot/projects/smpng/sys/boot/arm/at91/boot2/kb920x_board.c#2 (text+ko) ==== @@ -1,11 +1,36 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + #include -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/kb920x_board.c,v 1.1 2006/10/20 09:12:05 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/kb920x_board.c,v 1.3 2006/11/09 20:08:46 imp Exp $"); #include #include "emac.h" #include "lib.h" -#include "ee.h" +#include "board.h" extern unsigned char mac[]; @@ -14,10 +39,10 @@ { uint32_t sig; sig = 0; - EERead(12 * 1024, (uint8_t *)&sig, sizeof(sig)); + ReadEEPROM(12 * 1024, (uint8_t *)&sig, sizeof(sig)); if (sig != 0xaa55aa55) return; - EERead(12 * 1024 + 4, mac, 6); + ReadEEPROM(12 * 1024 + 4, mac, 6); printf("MAC %x:%x:%x:%x:%x:%x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); } @@ -30,6 +55,6 @@ void board_init(void) { - EEInit(); + InitEEPROM(); MacFromEE(); } ==== //depot/projects/smpng/sys/boot/arm/at91/bootiic/Makefile#3 (text) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.3 2006/08/10 19:55:52 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.4 2006/11/09 20:23:51 imp Exp $ + +.PATH: ${.CURDIR}/../libat91 P=bootiic FILES=${P} @@ -8,3 +10,5 @@ OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include + +CFLAGS += -DBOOT_IIC ==== //depot/projects/smpng/sys/boot/arm/at91/bootspi/Makefile#4 (text) ==== @@ -1,4 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.4 2006/10/21 22:51:21 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.5 2006/11/09 20:45:22 imp Exp $ + +.PATH: ${.CURDIR}/../libat91 P=bootspi FILES=${P} ==== //depot/projects/smpng/sys/boot/arm/at91/libat91/Makefile#5 (text) ==== @@ -1,12 +1,12 @@ -# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.6 2006/10/20 16:57:30 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/libat91/Makefile,v 1.7 2006/11/09 20:32:36 imp Exp $ .include "${.CURDIR}/../Makefile.inc" LIB= at91 INTERNALLIB= -SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c getc.c \ +SRCS=at91rm9200_lowlevel.c delay.c eeprom.c emac.c emac_init.c fpga.c getc.c \ putchar.c printf.c reset.c spi_flash.c xmodem.c \ - sd-card.c mci_device.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ + sd-card.c strcvt.c strlen.c strcmp.c memcpy.c strcpy.c \ memset.c memcmp.c SRCS+=ashldi3.c divsi3.S NO_MAN= ==== //depot/projects/smpng/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 (text) ==== @@ -24,7 +24,7 @@ * This software is derived from software provide by Kwikbyte who specifically * disclaimed copyright on the code. * - * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.3 2006/10/20 09:12:05 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c,v 1.4 2006/11/09 20:32:36 imp Exp $ */ #include "at91rm9200.h" @@ -53,7 +53,6 @@ register unsigned value; volatile sdram_size_t *p = (sdram_size_t *)SDRAM_BASE; -#if 0 #ifdef BOOT_TSC // For the TSC board, we turn ON the one LED we have while // early in boot. @@ -61,6 +60,15 @@ AT91C_BASE_PIOC->PIO_OER = AT91C_PIO_PC10; AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC10; #endif + +#ifdef BOOT_KB920X + AT91C_BASE_PIOC->PIO_PER = AT91C_PIO_PC18 | AT91C_PIO_PC19 | + AT91C_PIO_PC20; + AT91C_BASE_PIOC->PIO_OER = AT91C_PIO_PC18 | AT91C_PIO_PC19 | + AT91C_PIO_PC20; + AT91C_BASE_PIOC->PIO_SODR = AT91C_PIO_PC18 | AT91C_PIO_PC19 | + AT91C_PIO_PC20; + AT91C_BASE_PIOC->PIO_CODR = AT91C_PIO_PC18; #endif // configure clocks @@ -100,7 +108,7 @@ while (!(AT91C_BASE_PMC->PMC_SR & AT91C_PMC_MCKRDY)) continue; -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X // setup flash access (allow ample margin) // 9 wait states, 1 setup, 1 hold, 1 float for 8-bit device ((AT91PS_SMC2)AT91C_BASE_SMC2)->SMC2_CSR[0] = ==== //depot/projects/smpng/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 (text) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h,v 1.2 2006/08/10 17:59:22 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h,v 1.3 2006/11/09 20:32:36 imp Exp $ */ #ifndef _AT91RM9200_LOWLEVEL_H_ @@ -31,7 +31,7 @@ #define SDRAM_BASE 0x20000000 -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X /* The following divisor sets PLLA frequency: e.g. 10/5 * 90 = 180MHz */ #define OSC_MAIN_FREQ_DIV 5 /* for 10MHz osc */ #define SDRAM_WIDTH AT91C_SDRC_DBW_16_BITS ==== //depot/projects/smpng/sys/boot/arm/at91/libat91/emac.c#5 (text) ==== @@ -19,7 +19,7 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.c,v 1.4 2006/10/20 09:12:05 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.c,v 1.5 2006/11/09 20:32:36 imp Exp $ ******************************************************************************/ #include "at91rm9200.h" @@ -384,7 +384,7 @@ unsigned sec; int i; #endif -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X stat2 = AT91F_MII_ReadPhy(pEmac, MII_STS2_REG); if (!(stat2 & MII_STS2_LINK)) return ; ==== //depot/projects/smpng/sys/boot/arm/at91/libat91/emac.h#5 (text) ==== @@ -17,7 +17,7 @@ * only. * END_BLOCK * - * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.h,v 1.4 2006/10/20 09:12:05 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/libat91/emac.h,v 1.5 2006/11/09 20:32:36 imp Exp $ *****************************************************************************/ @@ -114,7 +114,7 @@ /* MII registers definition */ #define MII_STS_REG 0x01 #define MII_STS_LINK_STAT 0x04 -#ifdef BOOT_KB9202 +#ifdef BOOT_KB920X #define MII_STS2_REG 0x11 #define MII_STS2_LINK 0x400 #define MII_STS2_100TX 0x4000 ==== //depot/projects/smpng/sys/boot/arm/at91/libat91/emac_init.c#3 (text+ko) ==== >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Mon Nov 13 22:12:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8971D16A416; Mon, 13 Nov 2006 22:12:42 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 62D6916A412 for ; Mon, 13 Nov 2006 22:12:42 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D51043D5F for ; Mon, 13 Nov 2006 22:12:42 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kADMCd92014766 for ; Mon, 13 Nov 2006 22:12:39 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kADMCdql014759 for perforce@freebsd.org; Mon, 13 Nov 2006 22:12:39 GMT (envelope-from rdivacky@FreeBSD.org) Date: Mon, 13 Nov 2006 22:12:39 GMT Message-Id: <200611132212.kADMCdql014759@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 109892 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 22:12:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=109892 Change 109892 by rdivacky@rdivacky_witten on 2006/11/13 22:11:59 Remove obsolete comment. Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#15 edit .. //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#12 edit Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux32_machdep.c#15 (text+ko) ==== @@ -605,9 +605,6 @@ } if (args->flags & CLONE_THREAD) { - /* XXX: linux mangles pgrp and pptr somehow - * I think it might be this but I am not sure. - */ #ifdef notyet PROC_LOCK(p2); p2->p_pgrp = td->td_proc->p_pgrp; ==== //depot/projects/linuxolator/src/sys/i386/linux/linux_machdep.c#12 (text+ko) ==== @@ -432,9 +432,6 @@ } if (args->flags & CLONE_THREAD) { - /* XXX: linux mangles pgrp and pptr somehow - * I think it might be this but I am not sure. - */ #ifdef notyet PROC_LOCK(p2); p2->p_pgrp = td->td_proc->p_pgrp; From owner-p4-projects@FreeBSD.ORG Mon Nov 13 23:13:12 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A319516A4E8; Mon, 13 Nov 2006 23:13:11 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7A42B16A4CA; Mon, 13 Nov 2006 23:13:11 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from anuket.mj.niksun.com (gwnew.niksun.com [65.115.46.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9E9C43DC6; Mon, 13 Nov 2006 23:12:50 +0000 (GMT) (envelope-from jkim@FreeBSD.org) Received: from niksun.com (anuket [10.70.0.5]) by anuket.mj.niksun.com (8.13.1/8.13.1) with ESMTP id kADNCaPw077341; Mon, 13 Nov 2006 18:12:36 -0500 (EST) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: John Baldwin Date: Mon, 13 Nov 2006 18:12:13 -0500 User-Agent: KMail/1.6.2 References: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> <200611131606.21477.jhb@freebsd.org> In-Reply-To: <200611131606.21477.jhb@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200611131812.15858.jkim@FreeBSD.org> X-Virus-Scanned: ClamAV 0.88.6/2191/Mon Nov 13 13:37:53 2006 on anuket.mj.niksun.com X-Virus-Status: Clean Cc: Perforce Change Reviews Subject: Re: PERFORCE change 109706 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Nov 2006 23:13:12 -0000 On Monday 13 November 2006 04:06 pm, John Baldwin wrote: > On Friday 10 November 2006 18:00, Jung-uk Kim wrote: > > http://perforce.freebsd.org/chv.cgi?CH=109706 > > > > Change 109706 by jkim@jkim_hammer on 2006/11/10 22:59:53 > > > > Add (ugly) 32-bit msgsnd/msgrcv support for amd64. > > msgp points to msghdr and msghdr contains msg_type, which is > > long. When we copyin/copyout, we copy the correct msg_type and > > advance msgp by msg_type size. > > > > This fixes LTP test cases msgget01, msgrcv01, msgrcv02, > > msgrcv04, and msgsnd03. > > > > Note: There is only one test case blocked in msgwait state after > > this change, which seems to be arch-independent issue. > > > > Affected files ... > > > > .. > > //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#3 > > edit .. //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#5 > > edit > > Why not add kern_msgfoo() functions and do the copyout/copyin in > other places instead? Unfortunately there are two different types of copyin/copyout's in each msgsnd/msgrcv, i.e., message type and actual message. Only the first one (i.e., message type) is affected. It is quite hard to separate them because of that reason. I thought about using one copyin/copyout instead of two. I thought about passing function pointer to a copy function. I even thought about making msgsnd32/msgrcv32 syscalls. But these are overkill for this, I think. As I noted in the commit log, I don't like this but I think this is the simplest fix without breaking existing APIs. JK From owner-p4-projects@FreeBSD.ORG Tue Nov 14 00:15:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9828A16A492; Tue, 14 Nov 2006 00:15:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B65016A47B for ; Tue, 14 Nov 2006 00:15:44 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A7D443D8E for ; Tue, 14 Nov 2006 00:15:42 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE0Fgm5063666 for ; Tue, 14 Nov 2006 00:15:42 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE0FWIR063660 for perforce@freebsd.org; Tue, 14 Nov 2006 00:15:32 GMT (envelope-from mjacob@freebsd.org) Date: Tue, 14 Nov 2006 00:15:32 GMT Message-Id: <200611140015.kAE0FWIR063660@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109899 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 00:15:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=109899 Change 109899 by mjacob@newisp on 2006/11/14 00:15:10 IFC Affected files ... .. //depot/projects/newisp/Makefile#2 integrate .. //depot/projects/newisp/amd64/amd64/db_disasm.c#2 integrate .. //depot/projects/newisp/amd64/amd64/local_apic.c#7 integrate .. //depot/projects/newisp/amd64/amd64/machdep.c#6 integrate .. //depot/projects/newisp/amd64/amd64/mptable_pci.c#2 integrate .. //depot/projects/newisp/amd64/amd64/msi.c#1 branch .. //depot/projects/newisp/amd64/amd64/nexus.c#3 integrate .. //depot/projects/newisp/amd64/amd64/pmap.c#3 integrate .. //depot/projects/newisp/amd64/include/apicvar.h#3 integrate .. //depot/projects/newisp/amd64/include/intr_machdep.h#3 integrate .. //depot/projects/newisp/amd64/include/pmap.h#2 integrate .. //depot/projects/newisp/amd64/linux32/linux.h#4 integrate .. //depot/projects/newisp/amd64/linux32/linux32_proto.h#5 integrate .. //depot/projects/newisp/amd64/linux32/linux32_syscall.h#5 integrate .. //depot/projects/newisp/amd64/linux32/linux32_sysent.c#5 integrate .. //depot/projects/newisp/amd64/pci/pci_bus.c#2 integrate .. //depot/projects/newisp/arm/arm/cpufunc.c#3 integrate .. //depot/projects/newisp/arm/arm/identcpu.c#2 integrate .. //depot/projects/newisp/arm/arm/intr.c#2 integrate .. //depot/projects/newisp/arm/arm/pmap.c#3 integrate .. //depot/projects/newisp/arm/arm/vm_machdep.c#3 integrate .. //depot/projects/newisp/arm/at91/kb920x_machdep.c#5 integrate .. //depot/projects/newisp/arm/include/armreg.h#2 integrate .. //depot/projects/newisp/arm/include/cpuconf.h#2 integrate .. //depot/projects/newisp/arm/include/cpufunc.h#2 integrate .. //depot/projects/newisp/arm/include/pmap.h#2 integrate .. //depot/projects/newisp/arm/sa11x0/assabet_machdep.c#3 integrate .. //depot/projects/newisp/boot/arm/at91/Makefile#2 integrate .. //depot/projects/newisp/boot/arm/at91/Makefile.inc#3 integrate .. //depot/projects/newisp/boot/arm/at91/boot0iic/main.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/boot2/Makefile#2 integrate .. //depot/projects/newisp/boot/arm/at91/boot2/board.h#1 branch .. //depot/projects/newisp/boot/arm/at91/boot2/boot2.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/boot2/kb920x_board.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/bootiic/Makefile#2 integrate .. //depot/projects/newisp/boot/arm/at91/bootspi/Makefile#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/Makefile#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/at91rm9200_lowlevel.h#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/emac.c#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/emac.h#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/emac_init.c#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/mci_device.h#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/memcmp.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/memcpy.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/memset.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/sd-card.c#3 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/strcmp.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/strcpy.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/strcvt.c#2 integrate .. //depot/projects/newisp/boot/arm/at91/libat91/strlen.c#2 integrate .. //depot/projects/newisp/boot/pc98/btx/btx/btx.S#2 integrate .. //depot/projects/newisp/boot/pc98/libpc98/biossmap.c#1 branch .. //depot/projects/newisp/coda/coda_vnops.c#2 integrate .. //depot/projects/newisp/coda/coda_vnops.h#2 integrate .. //depot/projects/newisp/compat/freebsd32/freebsd32_proto.h#12 integrate .. //depot/projects/newisp/compat/freebsd32/freebsd32_syscall.h#12 integrate .. //depot/projects/newisp/compat/freebsd32/freebsd32_syscalls.c#12 integrate .. //depot/projects/newisp/compat/freebsd32/freebsd32_sysent.c#12 integrate .. //depot/projects/newisp/compat/linux/linux_misc.c#7 integrate .. //depot/projects/newisp/compat/svr4/svr4_proto.h#2 integrate .. //depot/projects/newisp/compat/svr4/svr4_syscall.h#2 integrate .. //depot/projects/newisp/compat/svr4/svr4_syscallnames.c#2 integrate .. //depot/projects/newisp/compat/svr4/svr4_sysent.c#2 integrate .. //depot/projects/newisp/conf/NOTES#13 integrate .. //depot/projects/newisp/conf/files#12 integrate .. //depot/projects/newisp/conf/files.amd64#6 integrate .. //depot/projects/newisp/conf/files.arm#2 integrate .. //depot/projects/newisp/conf/files.i386#5 integrate .. //depot/projects/newisp/conf/files.sun4v#2 integrate .. //depot/projects/newisp/conf/options#7 integrate .. //depot/projects/newisp/dev/acpica/acpi_pci_link.c#2 integrate .. //depot/projects/newisp/dev/acpica/acpi_pcib_acpi.c#2 integrate .. //depot/projects/newisp/dev/acpica/acpi_pcib_pci.c#2 integrate .. //depot/projects/newisp/dev/aha/ahareg.h#2 integrate .. //depot/projects/newisp/dev/em/if_em.c#12 integrate .. //depot/projects/newisp/dev/em/if_em.h#6 integrate .. //depot/projects/newisp/dev/iwi/if_iwi.c#4 integrate .. //depot/projects/newisp/dev/pci/pci.c#7 integrate .. //depot/projects/newisp/dev/pci/pci_if.m#3 integrate .. //depot/projects/newisp/dev/pci/pci_pci.c#4 integrate .. //depot/projects/newisp/dev/pci/pci_private.h#3 integrate .. //depot/projects/newisp/dev/pci/pcib_if.m#2 integrate .. //depot/projects/newisp/dev/pci/pcib_private.h#2 integrate .. //depot/projects/newisp/dev/pci/pcireg.h#2 integrate .. //depot/projects/newisp/dev/pci/pcivar.h#4 integrate .. //depot/projects/newisp/dev/usb/usb_quirks.c#4 integrate .. //depot/projects/newisp/dev/usb/usbdevs#4 integrate .. //depot/projects/newisp/fs/nullfs/null_vnops.c#2 integrate .. //depot/projects/newisp/i386/i386/identcpu.c#2 integrate .. //depot/projects/newisp/i386/i386/local_apic.c#7 integrate .. //depot/projects/newisp/i386/i386/machdep.c#5 integrate .. //depot/projects/newisp/i386/i386/mptable_pci.c#2 integrate .. //depot/projects/newisp/i386/i386/msi.c#1 branch .. //depot/projects/newisp/i386/i386/nexus.c#3 integrate .. //depot/projects/newisp/i386/i386/pmap.c#3 integrate .. //depot/projects/newisp/i386/ibcs2/ibcs2_proto.h#2 integrate .. //depot/projects/newisp/i386/ibcs2/ibcs2_xenix.h#2 integrate .. //depot/projects/newisp/i386/include/apicvar.h#3 integrate .. //depot/projects/newisp/i386/include/intr_machdep.h#3 integrate .. //depot/projects/newisp/i386/include/pmap.h#2 integrate .. //depot/projects/newisp/i386/linux/linux_proto.h#6 integrate .. //depot/projects/newisp/i386/pci/pci_bus.c#2 integrate .. //depot/projects/newisp/i386/pci/pci_pir.c#2 integrate .. //depot/projects/newisp/ia64/ia64/pmap.c#3 integrate .. //depot/projects/newisp/ia64/include/pmap.h#2 integrate .. //depot/projects/newisp/kern/Make.tags.inc#2 integrate .. //depot/projects/newisp/kern/init_main.c#5 integrate .. //depot/projects/newisp/kern/init_sysent.c#9 integrate .. //depot/projects/newisp/kern/kern_idle.c#3 integrate .. //depot/projects/newisp/kern/kern_lock.c#3 integrate .. //depot/projects/newisp/kern/kern_mutex.c#2 integrate .. //depot/projects/newisp/kern/kern_rwlock.c#2 integrate .. //depot/projects/newisp/kern/kern_sig.c#6 integrate .. //depot/projects/newisp/kern/kern_sx.c#2 integrate .. //depot/projects/newisp/kern/kern_thr.c#5 integrate .. //depot/projects/newisp/kern/kern_time.c#5 integrate .. //depot/projects/newisp/kern/ksched.c#1 branch .. //depot/projects/newisp/kern/makesyscalls.sh#2 integrate .. //depot/projects/newisp/kern/p1003_1b.c#1 branch .. //depot/projects/newisp/kern/posix4_mib.c#1 branch .. //depot/projects/newisp/kern/sched_4bsd.c#3 integrate .. //depot/projects/newisp/kern/sched_ule.c#3 integrate .. //depot/projects/newisp/kern/subr_lock.c#2 integrate .. //depot/projects/newisp/kern/subr_witness.c#4 integrate .. //depot/projects/newisp/kern/syscalls.c#9 integrate .. //depot/projects/newisp/kern/systrace_args.c#9 integrate .. //depot/projects/newisp/kern/uipc_mqueue.c#4 integrate .. //depot/projects/newisp/kern/uipc_sem.c#4 integrate .. //depot/projects/newisp/kern/uipc_syscalls.c#5 integrate .. //depot/projects/newisp/kern/vfs_aio.c#5 integrate .. //depot/projects/newisp/kern/vfs_default.c#3 integrate .. //depot/projects/newisp/kern/vfs_subr.c#8 integrate .. //depot/projects/newisp/kern/vfs_vnops.c#4 integrate .. //depot/projects/newisp/kern/vnode_if.src#2 integrate .. //depot/projects/newisp/modules/Makefile#4 integrate .. //depot/projects/newisp/modules/acpi/Makefile#3 integrate .. //depot/projects/newisp/modules/if_ppp/Makefile#2 integrate .. //depot/projects/newisp/net/bridgestp.c#5 integrate .. //depot/projects/newisp/net/bridgestp.h#3 integrate .. //depot/projects/newisp/net/if_bridge.c#7 integrate .. //depot/projects/newisp/net/if_bridgevar.h#3 integrate .. //depot/projects/newisp/net/if_ppp.c#5 integrate .. //depot/projects/newisp/net/if_pppvar.h#2 integrate .. //depot/projects/newisp/netinet/ip_fw2.c#7 integrate .. //depot/projects/newisp/netinet/libalias/alias_smedia.c#3 integrate .. //depot/projects/newisp/netinet/sctp_asconf.c#2 integrate .. //depot/projects/newisp/netinet/sctp_constants.h#2 integrate .. //depot/projects/newisp/netinet/sctp_indata.c#2 integrate .. //depot/projects/newisp/netinet/sctp_input.c#2 integrate .. //depot/projects/newisp/netinet/sctp_output.c#2 integrate .. //depot/projects/newisp/netinet/sctp_pcb.c#2 integrate .. //depot/projects/newisp/netinet/sctp_structs.h#2 integrate .. //depot/projects/newisp/netinet/sctp_uio.h#2 integrate .. //depot/projects/newisp/netinet/sctp_usrreq.c#2 integrate .. //depot/projects/newisp/netinet/sctputil.c#2 integrate .. //depot/projects/newisp/netinet/sctputil.h#2 integrate .. //depot/projects/newisp/netinet6/sctp6_usrreq.c#2 integrate .. //depot/projects/newisp/pc98/pc98/machdep.c#4 integrate .. //depot/projects/newisp/pci/if_pcn.c#2 integrate .. //depot/projects/newisp/pci/if_pcnreg.h#2 integrate .. //depot/projects/newisp/posix4/_semaphore.h#2 delete .. //depot/projects/newisp/posix4/ksched.c#3 delete .. //depot/projects/newisp/posix4/ksem.h#2 delete .. //depot/projects/newisp/posix4/p1003_1b.c#3 delete .. //depot/projects/newisp/posix4/posix4.h#2 delete .. //depot/projects/newisp/posix4/posix4_mib.c#2 delete .. //depot/projects/newisp/posix4/sched.h#2 delete .. //depot/projects/newisp/posix4/semaphore.h#2 delete .. //depot/projects/newisp/powerpc/powerpc/mmu_oea.c#2 integrate .. //depot/projects/newisp/powerpc/powerpc/pmap_dispatch.c#2 integrate .. //depot/projects/newisp/security/mac/mac_posix_sem.c#4 integrate .. //depot/projects/newisp/security/mac_biba/mac_biba.c#3 integrate .. //depot/projects/newisp/security/mac_mls/mac_mls.c#4 integrate .. //depot/projects/newisp/security/mac_stub/mac_stub.c#3 integrate .. //depot/projects/newisp/security/mac_test/mac_test.c#2 integrate .. //depot/projects/newisp/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/newisp/sun4v/conf/GENERIC#2 integrate .. //depot/projects/newisp/sun4v/include/cpufunc.h#2 integrate .. //depot/projects/newisp/sun4v/include/pmap.h#2 integrate .. //depot/projects/newisp/sun4v/sun4v/hcall.S#3 integrate .. //depot/projects/newisp/sun4v/sun4v/interrupt.S#2 integrate .. //depot/projects/newisp/sun4v/sun4v/intr_machdep.c#2 integrate .. //depot/projects/newisp/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/newisp/sun4v/sun4v/rtc.c#2 integrate .. //depot/projects/newisp/sun4v/sun4v/support.S#3 integrate .. //depot/projects/newisp/sun4v/sun4v/trap.c#4 integrate .. //depot/projects/newisp/sys/_lock.h#2 integrate .. //depot/projects/newisp/sys/_mutex.h#2 integrate .. //depot/projects/newisp/sys/_semaphore.h#1 branch .. //depot/projects/newisp/sys/ksem.h#1 branch .. //depot/projects/newisp/sys/lock.h#2 integrate .. //depot/projects/newisp/sys/lock_profile.h#1 branch .. //depot/projects/newisp/sys/lockmgr.h#3 integrate .. //depot/projects/newisp/sys/mutex.h#2 integrate .. //depot/projects/newisp/sys/param.h#8 integrate .. //depot/projects/newisp/sys/posix4.h#1 branch .. //depot/projects/newisp/sys/proc.h#4 integrate .. //depot/projects/newisp/sys/sched.h#3 integrate .. //depot/projects/newisp/sys/sem.h#3 integrate .. //depot/projects/newisp/sys/semaphore.h#1 branch .. //depot/projects/newisp/sys/syscall.h#9 integrate .. //depot/projects/newisp/sys/syscall.mk#9 integrate .. //depot/projects/newisp/sys/sysproto.h#9 integrate .. //depot/projects/newisp/sys/thr.h#3 integrate .. //depot/projects/newisp/sys/umtx.h#5 integrate .. //depot/projects/newisp/sys/vnode.h#3 integrate .. //depot/projects/newisp/ufs/ffs/ffs_vnops.c#4 integrate .. //depot/projects/newisp/vm/vm_contig.c#5 integrate .. //depot/projects/newisp/vm/vm_fault.c#4 integrate .. //depot/projects/newisp/vm/vm_kern.c#3 integrate .. //depot/projects/newisp/vm/vm_page.c#6 integrate Differences ... ==== //depot/projects/newisp/Makefile#2 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $ +# $FreeBSD: src/sys/Makefile,v 1.39 2006/11/11 16:26:55 trhodes Exp $ .include @@ -11,7 +11,7 @@ CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ isofs kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipx netkey netnatm netncp \ - netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \ + netsmb nfs nfsclient nfs4client rpc pccard pci sys \ ufs vm ${ARCHDIR} ARCHDIR ?= ${MACHINE} ==== //depot/projects/newisp/amd64/amd64/db_disasm.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.30 2005/03/30 22:57:41 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.31 2006/11/13 21:14:54 jhb Exp $"); /* * Instruction disassembler. @@ -84,6 +84,7 @@ #define Ib 21 /* byte immediate, unsigned */ #define Ibs 22 /* byte immediate, signed */ #define Iw 23 /* word immediate, unsigned */ +#define Ilq 24 /* long/quad immediate, unsigned */ #define O 25 /* direct address */ #define Db 26 /* byte displacement from EIP */ #define Dl 27 /* long displacement from EIP */ @@ -351,7 +352,6 @@ 0, 0, 0, - 0, db_inst_0f8x, db_inst_0f9x, db_inst_0fax, @@ -752,14 +752,14 @@ /*b6*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 }, /*b7*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 }, -/*b8*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*b9*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*ba*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bb*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bc*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bd*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*be*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bf*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, +/*b8*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*b9*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*ba*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bb*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bc*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bd*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*be*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bf*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, /*c0*/ { "", TRUE, BYTE, op2(Ib, E), db_Grp2 }, /*c1*/ { "", TRUE, LONG, op2(Ib, E), db_Grp2 }, @@ -854,17 +854,6 @@ int ss; }; -static const char * const db_index_reg_16[8] = { - "%bx,%si", - "%bx,%di", - "%bp,%si", - "%bp,%di", - "%si", - "%di", - "%bp", - "%bx" -}; - static const char * const db_reg[2][4][16] = { {{"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh", @@ -927,7 +916,7 @@ int regmodrm; struct i_addr * addrp; /* out */ { - int mod, rm, sib, index, disp; + int mod, rm, sib, index, disp, size, have_sib; mod = f_mod(rex, regmodrm); rm = f_rm(rex, regmodrm); @@ -940,68 +929,49 @@ addrp->is_reg = FALSE; addrp->index = 0; - if (short_addr) { - addrp->index = 0; - addrp->ss = 0; - switch (mod) { - case 0: - if (rm == 6) { - get_value_inc(disp, loc, 2, FALSE); - addrp->disp = disp; - addrp->base = 0; - } - else { - addrp->disp = 0; - addrp->base = db_index_reg_16[rm]; - } - break; - case 1: - get_value_inc(disp, loc, 1, TRUE); - disp &= 0xFFFF; - addrp->disp = disp; - addrp->base = db_index_reg_16[rm]; - break; - case 2: - get_value_inc(disp, loc, 2, FALSE); - addrp->disp = disp; - addrp->base = db_index_reg_16[rm]; - break; - } - } - else { - if (mod != 3 && rm == 4) { - get_value_inc(sib, loc, 1, FALSE); - rm = sib_base(rex, sib); - index = sib_index(rex, sib); - if (index != 4) - addrp->index = db_reg[1][QUAD][index]; - addrp->ss = sib_ss(rex, sib); - } + if (short_addr) + size = LONG; + else + size = QUAD; + + if ((rm & 0x7) == 4) { + get_value_inc(sib, loc, 1, FALSE); + rm = sib_base(rex, sib); + index = sib_index(rex, sib); + if (index != 4) + addrp->index = db_reg[1][size][index]; + addrp->ss = sib_ss(rex, sib); + have_sib = 1; + } else + have_sib = 0; - switch (mod) { - case 0: - if (rm == 5) { - get_value_inc(addrp->disp, loc, 4, FALSE); + switch (mod) { + case 0: + if (rm == 5) { + get_value_inc(addrp->disp, loc, 4, FALSE); + if (have_sib) addrp->base = 0; - } - else { - addrp->disp = 0; - addrp->base = db_reg[1][QUAD][rm]; - } - break; + else if (short_addr) + addrp->base = "%eip"; + else + addrp->base = "%rip"; + } else { + addrp->disp = 0; + addrp->base = db_reg[1][size][rm]; + } + break; - case 1: - get_value_inc(disp, loc, 1, TRUE); - addrp->disp = disp; - addrp->base = db_reg[1][QUAD][rm]; - break; + case 1: + get_value_inc(disp, loc, 1, TRUE); + addrp->disp = disp; + addrp->base = db_reg[1][size][rm]; + break; - case 2: - get_value_inc(disp, loc, 4, FALSE); - addrp->disp = disp; - addrp->base = db_reg[1][QUAD][rm]; - break; - } + case 2: + get_value_inc(disp, loc, 4, FALSE); + addrp->disp = disp; + addrp->base = db_reg[1][size][rm]; + break; } return (loc); } @@ -1022,7 +992,8 @@ db_printf("%s:", seg); } - db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); + if (addrp->disp != 0 || (addrp->base == 0 && addrp->index == 0)) + db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); if (addrp->base != 0 || addrp->index != 0) { db_printf("("); if (addrp->base) @@ -1154,6 +1125,7 @@ int prefix; int imm; int imm2; + long imm64; int len; struct i_addr address; @@ -1426,6 +1398,12 @@ db_printf("$%#r", imm); break; + case Ilq: + len = db_lengths[rex & REX_W ? QUAD : LONG]; + get_value_inc(imm64, loc, len, FALSE); + db_printf("$%#lr", imm64); + break; + case O: len = (short_addr ? 2 : 4); get_value_inc(displ, loc, len, FALSE); ==== //depot/projects/newisp/amd64/amd64/local_apic.c#7 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.32 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.33 2006/11/13 22:23:32 jhb Exp $"); #include "opt_hwpmc_hooks.h" @@ -744,6 +744,65 @@ panic("Couldn't find an APIC vector for IRQ %u", irq); } +/* + * Request 'count' free contiguous IDT vectors to be used by 'count' + * IRQs. 'count' must be a power of two and the vectors will be + * aligned on a boundary of 'align'. If the request cannot be + * satisfied, 0 is returned. + */ +u_int +apic_alloc_vectors(u_int *irqs, u_int count, u_int align) +{ + u_int first, run, vector; + + KASSERT(powerof2(count), ("bad count")); + KASSERT(powerof2(align), ("bad align")); + KASSERT(align >= count, ("align < count")); +#ifdef INVARIANTS + for (run = 0; run < count; run++) + KASSERT(irqs[run] < NUM_IO_INTS, ("Invalid IRQ %u at index %u", + irqs[run], run)); +#endif + + /* + * Search for 'count' free vectors. As with apic_alloc_vector(), + * this just uses a simple first fit algorithm. + */ + run = 0; + first = 0; + mtx_lock_spin(&icu_lock); + for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { + + /* Vector is in use, end run. */ + if (ioint_irqs[vector] != 0) { + run = 0; + first = 0; + continue; + } + + /* Start a new run if run == 0 and vector is aligned. */ + if (run == 0) { + if ((vector & (align - 1)) != 0) + continue; + first = vector; + } + run++; + + /* Keep looping if the run isn't long enough yet. */ + if (run < count) + continue; + + /* Found a run, assign IRQs and return the first vector. */ + for (vector = 0; vector < count; vector++) + ioint_irqs[first + vector] = irqs[vector]; + mtx_unlock_spin(&icu_lock); + return (first + APIC_IO_INTS); + } + mtx_unlock_spin(&icu_lock); + printf("APIC: Couldn't find APIC vectors for %u IRQs\n", count); + return (0); +} + void apic_enable_vector(u_int vector) { @@ -1002,6 +1061,9 @@ intr_register_pic(&lapic_pic); if (bootverbose) lapic_dump("BSP"); + + /* Enable the MSI "pic". */ + msi_init(); } SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_SECOND, apic_setup_io, NULL) ==== //depot/projects/newisp/amd64/amd64/machdep.c#6 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.657 2006/10/26 21:42:16 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -196,7 +196,7 @@ #ifdef PERFMON perfmon_init(); #endif - printf("usable memory = %ju (%ju MB)\n", ptoa((uintmax_t)physmem), + printf("usable memory = %ju (%ju MB)\n", ptoa((uintmax_t)physmem), ptoa((uintmax_t)physmem) / 1048576); realmem = Maxmem; /* @@ -220,7 +220,7 @@ vm_ksubmap_init(&kmi); - printf("avail memory = %ju (%ju MB)\n", + printf("avail memory = %ju (%ju MB)\n", ptoa((uintmax_t)cnt.v_free_count), ptoa((uintmax_t)cnt.v_free_count) / 1048576); @@ -747,8 +747,6 @@ ip->gd_hioffset = ((uintptr_t)func)>>16 ; } -#define IDTVEC(name) __CONCAT(X,name) - extern inthand_t IDTVEC(div), IDTVEC(dbg), IDTVEC(nmi), IDTVEC(bpt), IDTVEC(ofl), IDTVEC(bnd), IDTVEC(ill), IDTVEC(dna), IDTVEC(fpusegm), @@ -877,7 +875,7 @@ if (smap->base < physmap[i + 1]) { if (boothowto & RB_VERBOSE) printf( - "Overlapping or non-montonic memory region, ignoring second region\n"); + "Overlapping or non-monotonic memory region, ignoring second region\n"); continue; } } ==== //depot/projects/newisp/amd64/amd64/mptable_pci.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.4 2006/01/06 19:22:18 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.5 2006/11/13 22:23:32 jhb Exp $"); #include #include @@ -96,6 +96,10 @@ DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } }; @@ -148,6 +152,10 @@ DEVMETHOD(pcib_read_config, pcib_read_config), DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} }; ==== //depot/projects/newisp/amd64/amd64/nexus.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.69 2006/09/11 19:31:51 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.70 2006/11/13 22:23:32 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -61,6 +61,8 @@ #include +#include "pcib_if.h" + #ifdef DEV_ISA #include #include @@ -100,6 +102,10 @@ static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); static void nexus_delete_resource(device_t, device_t, int, int); +static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); +static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); +static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq); +static int nexus_release_msix(device_t pcib, device_t dev, int irq); static device_method_t nexus_methods[] = { /* Device interface */ @@ -125,6 +131,12 @@ DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), + DEVMETHOD(pcib_release_msi, nexus_release_msi), + DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), + DEVMETHOD(pcib_release_msix, nexus_release_msix), + { 0, 0 } }; @@ -504,6 +516,47 @@ resource_list_delete(rl, type, rid); } +static int +nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +{ + int error, new; + + error = msix_alloc(dev, index, irq, &new); + if (new) + rman_manage_region(&irq_rman, *irq, *irq); + return (error); +} + +static int +nexus_release_msix(device_t pcib, device_t dev, int irq) +{ + + return (msix_release(irq)); +} + +static int +nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) +{ + int error, i, newirq, newcount; + + /* First alloc the messages. */ + error = msi_alloc(dev, count, maxcount, irqs, &newirq, &newcount); + + /* Always add any new IRQs to the rman, even on failure. */ + for (i = 0; i < newcount; i++) + rman_manage_region(&irq_rman, irqs[newirq + i], + irqs[newirq + i]); + + return (error); +} + +static int +nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ + + return (msi_release(irqs, count)); +} + #ifdef DEV_ISA /* * Placeholder which claims PnP 'devices' which describe system ==== //depot/projects/newisp/amd64/amd64/pmap.c#3 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.572 2006/10/22 04:18:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.573 2006/11/12 21:48:32 alc Exp $"); /* * Manages physical address maps. @@ -2357,8 +2357,10 @@ * Now validate mapping with desired protection/wiring. */ newpte = (pt_entry_t)(pa | PG_V); - if ((prot & VM_PROT_WRITE) != 0) + if ((prot & VM_PROT_WRITE) != 0) { newpte |= PG_RW; + vm_page_flag_set(m, PG_WRITEABLE); + } if ((prot & VM_PROT_EXECUTE) == 0) newpte |= pg_nx; if (wired) ==== //depot/projects/newisp/amd64/include/apicvar.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.19 2006/10/10 23:23:11 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.20 2006/11/13 22:23:33 jhb Exp $ */ #ifndef _MACHINE_APICVAR_H_ @@ -175,6 +175,7 @@ IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); u_int apic_alloc_vector(u_int irq); +u_int apic_alloc_vectors(u_int *irqs, u_int count, u_int align); void apic_enable_vector(u_int vector); void apic_free_vector(u_int vector, u_int irq); u_int apic_idt_to_irq(u_int vector); ==== //depot/projects/newisp/amd64/include/intr_machdep.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.11 2006/10/10 23:23:11 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.12 2006/11/13 22:23:33 jhb Exp $ */ #ifndef __MACHINE_INTR_MACHDEP_H__ @@ -43,11 +43,18 @@ * 191 and still be safe since only interrupt sources in actual use will * allocate IDT vectors. * - * For now we stick with 255 as ISA IRQs and PCI intline IRQs only allow - * for IRQs in the range 0 - 254. When MSI support is added this number - * will likely increase. + * The first 255 IRQs (0 - 254) are reserved for ISA IRQs and PCI intline IRQs. + * IRQ values beyond 256 are used by MSI. We leave 255 unused to avoid + * confusion since 255 is used in PCI to indicate an invalid IRQ. + */ +#define NUM_MSI_INTS 128 +#define FIRST_MSI_INT 256 +#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS) + +/* + * Default base address for MSI messages on x86 platforms. */ -#define NUM_IO_INTS 255 +#define MSI_INTEL_ADDR_BASE 0xfee00000 /* * - 1 ??? dummy counter. @@ -140,6 +147,12 @@ void intr_resume(void); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); +void msi_init(void); +int msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, + int *newcount); +int msi_release(int *irqs, int count); +int msix_alloc(device_t dev, int index, int *irq, int *new); +int msix_release(int irq); #endif /* !LOCORE */ #endif /* _KERNEL */ ==== //depot/projects/newisp/amd64/include/pmap.h#2 (text+ko) ==== @@ -39,7 +39,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.134 2006/08/11 19:22:56 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.136 2006/11/13 20:33:54 ru Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -101,9 +101,10 @@ ((unsigned long)(l2) << PDRSHIFT) | \ ((unsigned long)(l1) << PAGE_SHIFT)) -/* Initial number of kernel page tables */ +/* Initial number of kernel page tables. */ #ifndef NKPT -#define NKPT 240 /* Enough for 16GB (2MB page tables) */ +/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */ +#define NKPT 240 #endif #define NKPML4E 1 /* number of kernel PML4 slots */ @@ -262,7 +263,7 @@ /* * For each vm_page_t, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. + * mappings of that page. An entry is a pv_entry_t, the list is pv_list. */ typedef struct pv_entry { vm_offset_t pv_va; /* virtual address for mapping */ ==== //depot/projects/newisp/amd64/linux32/linux.h#4 (text+ko) ==== @@ -27,14 +27,12 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.8 2006/10/29 14:02:38 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux.h,v 1.9 2006/11/07 18:53:49 jhb Exp $ */ #ifndef _AMD64_LINUX_LINUX_H_ #define _AMD64_LINUX_LINUX_H_ -#include /* for sigval union */ - #include /* @@ -379,6 +377,11 @@ #define LINUX_SI_MAX_SIZE 128 #define LINUX_SI_PAD_SIZE ((LINUX_SI_MAX_SIZE/sizeof(l_int)) - 3) +union l_sigval { + l_int sival_int; + l_uintptr_t sival_ptr; +}; + typedef struct l_siginfo { l_int lsi_signo; l_int lsi_errno; @@ -399,7 +402,7 @@ struct { l_pid_t _pid; /* sender's pid */ l_uid16_t _uid; /* sender's uid */ - union sigval _sigval; + union l_sigval _sigval; } __packed _rt; struct { ==== //depot/projects/newisp/amd64/linux32/linux32_proto.h#5 (text+ko) ==== @@ -2,7 +2,7 @@ * System call prototypes. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_proto.h,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include ==== //depot/projects/newisp/amd64/linux32/linux32_syscall.h#5 (text+ko) ==== @@ -2,7 +2,7 @@ * System call numbers. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_syscall.h,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ ==== //depot/projects/newisp/amd64/linux32/linux32_sysent.c#5 (text+ko) ==== @@ -2,7 +2,7 @@ * System call switch table. * * DO NOT EDIT-- this file is automatically generated. - * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.25 2006/10/29 14:12:44 netchild Exp $ + * $FreeBSD: src/sys/amd64/linux32/linux32_sysent.c,v 1.26 2006/11/11 21:49:07 ru Exp $ * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.23 2006/10/29 14:02:38 netchild Exp */ ==== //depot/projects/newisp/amd64/pci/pci_bus.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.117 2006/03/13 23:58:40 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.118 2006/11/13 22:23:33 jhb Exp $"); #include "opt_cpu.h" @@ -322,6 +322,10 @@ DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, legacy_pcib_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } }; ==== //depot/projects/newisp/arm/arm/cpufunc.c#3 (text+ko) ==== @@ -45,7 +45,7 @@ * Created : 30/01/97 */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.12 2006/10/21 04:25:00 kevlo Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/cpufunc.c,v 1.13 2006/11/07 22:36:56 cognet Exp $"); #include #include @@ -73,13 +73,17 @@ #include #endif +#if defined(CPU_XSCALE_81342) +#include +#endif + #ifdef CPU_XSCALE_IXP425 #include #include #endif #if defined(CPU_XSCALE_80200) || defined(CPU_XSCALE_80321) || \ - defined(CPU_XSCALE_80219) + defined(CPU_XSCALE_80219) || defined(CPU_XSCALE_81342) #include #endif @@ -570,6 +574,62 @@ /* CPU_XSCALE_80200 || CPU_XSCALE_80321 || CPU_XSCALE_PXA2X0 || CPU_XSCALE_IXP425 CPU_XSCALE_80219 */ +#ifdef CPU_XSCALE_81342 +struct cpu_functions xscalec3_cpufuncs = { + /* CPU functions */ + + cpufunc_id, /* id */ + xscale_cpwait, /* cpwait */ + + /* MMU functions */ + + xscale_control, /* control */ + cpufunc_domains, /* domain */ + xscalec3_setttb, /* setttb */ + cpufunc_faultstatus, /* faultstatus */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 14 02:08:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4111E16A47E; Tue, 14 Nov 2006 02:08:16 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B495816A403 for ; Tue, 14 Nov 2006 02:08:15 +0000 (UTC) (envelope-from adamartin@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4424D43EAB for ; Tue, 14 Nov 2006 02:00:29 +0000 (GMT) (envelope-from adamartin@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE20Ffe089907 for ; Tue, 14 Nov 2006 02:00:15 GMT (envelope-from adamartin@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE20FLc089899 for perforce@freebsd.org; Tue, 14 Nov 2006 02:00:15 GMT (envelope-from adamartin@FreeBSD.org) Date: Tue, 14 Nov 2006 02:00:15 GMT Message-Id: <200611140200.kAE20FLc089899@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to adamartin@FreeBSD.org using -f From: Adam Martin To: Perforce Change Reviews Cc: Subject: PERFORCE change 109900 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 02:08:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=109900 Change 109900 by adamartin@adamartin_hobbes on 2006/11/14 01:59:39 Adding autofs_subr.[ch] for using circular queue mechanisms. Importing updated versions of macro headers, and adding more autofs_ctl device support. Affected files ... .. //depot/projects/soc2006/adamartin_autofs/autofs/Makefile#4 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/README#3 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs.c#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs.h#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.c#4 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.h#3 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.c#4 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.h#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_pfsops.c#4 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_subr.c#1 add .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_subr.h#1 add .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_vfsops.c#5 delete .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_vnops.c#4 delete .. //depot/projects/soc2006/adamartin_autofs/autofs/cleanup.h#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/protocol.c#4 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/protocol.h#4 edit .. //depot/projects/soc2006/adamartin_autofs/pseudofs/pseudofs.h#2 edit .. //depot/projects/soc2006/adamartin_autofs/pseudofs/pseudofs_vnops.c#3 edit Differences ... ==== //depot/projects/soc2006/adamartin_autofs/autofs/Makefile#4 (text+ko) ==== ==== //depot/projects/soc2006/adamartin_autofs/autofs/README#3 (text+ko) ==== ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs.c#5 (text+ko) ==== @@ -50,13 +50,10 @@ #include "autofs.h" #include "autofs_ctl.h" - - +#include "debug.h" -/** There's no more block devices, so all are cdevs, as c represents char -in cdev **/ @@ -65,19 +62,20 @@ autofs_handle_loader( struct module *mod, int action, void *args ) { int err= 0; - switch (action) { + switch( action ) + { case MOD_LOAD: - KPRINTF("Now loading AutoFS module: \n"); - autofs_ctl_dev = make_dev(&autofs_ctl_devops, - 00, - UID_ROOT, - GID_WHEEL, - 0600, - AUTOFS_CTL_DEV_NAME); - DEBUG KPRINTF("."); + EPRINTF( "Now loading AutoFS module: \n" ); + autofs_ctl_dev = make_dev( &autofs_ctl_devops, + 00, + UID_ROOT, + GID_WHEEL, + 0600, + AUTOFS_CTL_DEV_NAME ); + DEBUG EPRINTF( "." ); autofs_ctl_init(); - DEBUG KPRINTF("."); - KPRINTF("AutoFS module successfully loaded.\n"); + DEBUG EPRINTF( "." ); + EPRINTF( "AutoFS module successfully loaded.\n" ); break; case MOD_QUIESCE: @@ -86,22 +84,23 @@ * Find out what we should do for QUIESCE option? * */ - KPRINTF("AutoFS quiesced.\n"); + EPRINTF( "AutoFS quiesced.\n" ); return 0; + break; case MOD_UNLOAD: - destroy_dev(autofs_ctl_dev); - //free(autofs_ctl_state, M_AUTOFS_CTL_NODES); - KPRINTF("AutoFS unloaded.\n"); + destroy_dev( autofs_ctl_dev ); + //free( autofs_ctl_state, M_AUTOFS_CTL_NODES ); + EPRINTF( "AutoFS unloaded.\n" ); break; default: err= EINVAL; - KPRINTF("Error -- action %d not supported!\n", - action); - KPRINTF("MOD_LOAD= %d, MOD_UNLOAD= %d\n", - MOD_LOAD, MOD_UNLOAD); + EPRINTF( "Error -- action %d not supported!\n", + action ); + EPRINTF( "MOD_LOAD= %d, MOD_UNLOAD= %d\n", + MOD_LOAD, MOD_UNLOAD ); break; } @@ -110,30 +109,36 @@ -int vn_iscdev(struct vnode *vp, int *errp); +int vn_iscdev( struct vnode *vp, int *errp ); int -vn_iscdev(struct vnode *vp, int *errp) +vn_iscdev( struct vnode *vp, int *errp ) { - int error = 0; + $cleanup_init_size( 8 ); + int error= 0; - dev_lock(); + dev_lock(); + $cleanup( dev_unlock(); ); + - if (vp->v_type != VCHR) + if( vp->v_type != VCHR ) error = ENODEV; #ifdef USE_EXTENDED_DEV_CHECK - else if (vp->v_rdev == NULL) - error = ENXIO; - else if (vp->v_rdev->si_devsw == NULL) - error = ENXIO; + else if( vp->v_rdev == NULL ) + { + error= ENXIO; + } + else if( vp->v_rdev->si_devsw == NULL ) + { + error= ENXIO; + } #endif - dev_unlock(); - + $do_cleanup; if (errp != NULL) - *errp = error; - return (error == 0); + *errp= error; + $return ( error == 0 ); } DEV_MODULE( AutoFS, autofs_handle_loader, NULL ); ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs.h#5 (text+ko) ==== @@ -30,7 +30,13 @@ #ifndef __AUTOFS_MAIN_HEADER__ #define __AUTOFS_MAIN_HEADER__ +#define USE_SETJMP_CLEANUP +#define NO_USE_SETJMP_INCLUDE +#define NO_CLEANUP_WARNING +#define FREEBSD_SYS +#include "cleanup.h" + #define AUTOFS_VERSION ( 1 ) //#define MIN( a, b ) ( ( a ) < ( b ) ? ( a ) : ( b ) ) @@ -41,34 +47,6 @@ //#define NO_CLEANUP_WARNING -#define KPRINTF( a, ... ) \ - do {\ - printf( a, ## __VA_ARGS__ );\ - uprintf( a, ## __VA_ARGS__ );\ - } while( 0 ) - - - -#ifndef DEBUG_LEVEL -#define DEBUG_LEVEL 8 -#endif /** DEBUG_LEVEL **/ - -#define DEBUG_L( level ) if( DEBUG_LEVEL >= level ) - -#define DEBUG DEBUG5 - -#define DEBUG1 DEBUG_L( 1 ) -#define DEBUG2 DEBUG_L( 2 ) -#define DEBUG3 DEBUG_L( 3 ) -#define DEBUG4 DEBUG_L( 4 ) -#define DEBUG5 DEBUG_L( 5 ) -#define DEBUG6 DEBUG_L( 6 ) -#define DEBUG7 DEBUG_L( 7 ) -#define DEBUG8 DEBUG_L( 8 ) - - - - #define MNT_TARGET ( "fspath" ) #define MNT_DEVICE ( "from" ) @@ -76,8 +54,9 @@ #define entity( member, value )\ - .member = value + .member= value +#define KPRINTF EPRINTF #endif /*** __AUTOFS_MAIN_HEADER__ ***/ ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.c#4 (text+ko) ==== @@ -50,7 +50,7 @@ static d_ioctl_t autofs_ctl_ioctl; -struct cdevsw autofs_ctl_devops = { +static struct cdevsw autofs_ctl_devops = { .d_version= D_VERSION, .d_open= NULL, .d_close= NULL, @@ -63,8 +63,48 @@ int autofs_ctl_init() { - DEBUG KPRINTF("Initializing " + DEBUG KPRINTF( "Initializing " ) +} + +MALLOC_DECLARE( M_AUTOFS_DEV ); +MALLOC_DEFINE( M_AUTOFS_DEV, "autofs_dev", "autofs device structure" ); + +MALLOC_DECLARE( M_AUTOFS_DEV_BUFFERS ); +MALLOC_DEFINE( M_AUTOFS_DEV_BUFFERS, "autofs_dev_buffers", "autofs device io buffers" ); + +int create_autofs_node( int num ) +{ + int error; + struct cdevsw *autofs_cdevsw; + struct cdev *autofs_cdev; + struct autofs_dev_data *autofs_dev_data; + + autofs_cdevsw= malloc( sizeof( struct cdevsw ), M_AUTOFS_DEV, M_WAITOK ); + autofs_dev_data= malloc( sizeof( struct autofs_dev_data ), M_AUTOFS_DEV_BUFFERS, + M_WAITOK ); + + autofs_dev_data.input= malloc( IOV_BUF_COUNT * sizeof( struct iovec * ), M_AUTOFS_DEV_BUFFERS, M_WAITOK ); + autofs_dev_data.output= malloc( IOV_BUF_COUNT * sizeof( struct iovec * ), M_AUTOFS_DEV_BUFFERS, M_WAITOK ); + + autofs_cdevsw->d_open= autofs_dev_open; + autofs_cdevsw->d_close= autofs_dev_close; + autofs_cdevsw->d_read= autofs_dev_read; + autofs_cdevsw->d_write= autofs_dev_write; + autofs_cdevsw->d_poll= autofs_dev_poll; + autofs_cdevsw->d_version= D_VERSION; + autofs_cdevsw->d_name= "autofs_dev"; + + autofs_cdev= make_dev( autofs_cdevsw, num, UID_ROOT, GID_WHEEL, 0600, "autofs%d", num ); + if( autofs_cdev == NULL ) + { + panic( "Bad autofs_cdev\n" ); + } + autofs_cdev->si_priv= (struct cdev_priv *) autofs_dev_data; + + return 0; +} + /* * We only handle the IOCTLS for create and destroy autofs_dev instances. @@ -78,8 +118,8 @@ static int -autofs_ctl_ioctl(struct cdev *i_dev, u_long cmd, caddr_t arg_c, int mode, - struct thread *td) +autofs_ctl_ioctl( struct cdev *i_dev, u_long cmd, caddr_t arg_c, int mode, + struct thread *td ) { $cleanup_init_size( 8 ); int error= 0; @@ -89,17 +129,17 @@ arg= NULL; $return EOPNOTSUPP; - #if 0 + #if 1 switch( cmd ) { case AFSIOCREATDEV: - mtx_lock(&autofs_ctl_state.lock); + /* mtx_lock(&autofs_ctl_state.lock); $cleanup( mtx_unlock(&autofs_ctl_state.lock); ) - + */ arg= autofs_ctl_state.next_assignable_node++; - error= create_autofs_node(arg); + error= create_autofs_node( arg ); $do_cleanup; @@ -115,4 +155,5 @@ error= EIO; #endif + return error; } ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.h#3 (text+ko) ==== @@ -74,7 +74,10 @@ - +struct autofs_dev_data { + struct uio input; + struct uio output +}; /** Are we allowed to reuse group "a"? **/ ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.c#4 (text+ko) ==== @@ -28,6 +28,7 @@ */ #include "autofs.h" +#include "protocol.h" #include #include @@ -46,19 +47,19 @@ struct uio *in_buffer, *out_buffer; -#define IOV_BUF_COUNT ( 16 ) - int write_buffer( struct uio *buf, void *data, int len ) { $cleanup_init_size( 8 ); int error; - error = 0; + error= 0; if( buf->uio_iovcnt < IOV_BUF_COUNT ) { buf->uio_iov[ buf->uio_iovcnt ].iov_base= data; buf->uio_iov[ buf->uio_iovcnt ].iov_len= len; buf->uio_iovcnt++; + + parse_messages(); } else { @@ -68,3 +69,10 @@ $return error; } + + +int autofs_dev_open( struct cdev *dev, int oflags, int devtype, struct thread *td ) +{ + int error; + int i; +} ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.h#2 (text+ko) ==== @@ -1,6 +1,16 @@ #include #include + +#define IOV_BUF_COUNT ( 16 ) + extern struct uio *in_buffer, *out_buffer; int write_buffer( struct uio *buf, void *data, int len ); + + +int autofs_dev_open( struct cdev *dev, int oflags, int devtype, struct thread *td ); +int autofs_dev_close( struct cdev *dev, int oflags, int devtype, struct thread *td ); +int autofs_dev_read( struct cdev *dev, struct uio *uio, int ioflag ); +int autofs_dev_write( struct cdev *dev, struct uio *uio, int ioflag ); +int autofs_dev_poll( struct cdev *dev, int events, struct thread *td ); ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_pfsops.c#4 (text+ko) ==== @@ -56,6 +56,7 @@ #include #include "protocol.h" +#include "debug.h" MALLOC_DEFINE(M_AUTOFS_MOUNTBUF, "AutoFS mntbuf", "AutoFS mountpoint data, to simulate filesystem contents."); ==== //depot/projects/soc2006/adamartin_autofs/autofs/cleanup.h#5 (text+ko) ==== @@ -1,7 +1,10 @@ -/*- +/* * Copyright (c) 2006 ADAM David Alan Martin * LSD Kernel Project, All Rights Reserved. * + * Copyright (c) 2006 ADAM David Alan Martin + * FreeBSD Project, All Rights Reserved. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -20,7 +23,7 @@ * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE PROJECT ``AS IS'' AND + * THIS SOFTWARE IS PROVIDED BY THE PROJECT, AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE @@ -37,6 +40,21 @@ #ifndef __CLEANUP_H__ #define __CLEANUP_H__ +#ifdef LSD + +#include + +__LSDHEADERID( cleanup, "$Id: cleanup.i 252 2006-10-31 23:54:52Z adam $" ); +#else +static const char *__lsdid_cleanup_header__ __attribute__(( unused ))= "$Id: cleanup.i 252 2006-10-31 23:54:52Z adam $"; +#ifdef FREEBSD +#include + +/* __FBSDID( "$FreeBSD$" ); */ +#endif + +#endif /* LSD */ + @@ -78,11 +96,11 @@ #define __VOLATILE_IMPLEMENTATION__ /** No volatile for nested functions **/ -#define LN __LINE__ +#define __CLN_LN__ __LINE__ #define ___cleanup_action_( a ) ___cleanup_action___ ## a -#define REGISTER_ACTION( actions ) _REGISTER_ACTION( LN, actions ) +#define REGISTER_ACTION( actions ) _REGISTER_ACTION( __CLN_LN__, actions ) #define _REGISTER_ACTION( name, actions ) \ static void ___cleanup_action_( name ) ( void )\ @@ -115,8 +133,16 @@ /** The setjmp/longjmp implementation of the cleanup library. This one is really nasty-ugly **/ -#ifndef NO_USE_SETJMP_INCLUDE -#include + +#ifdef FREEBSD_SYS +# include + +#else + +# ifndef NO_USE_SETJMP_INCLUDE +# include +# endif + #endif #ifndef NO_CLEANUP_WARNING @@ -126,8 +152,13 @@ #define __VOLATILE_IMPLEMENTATION__ volatile /** Yes we're volatile for this one **/ +#ifdef FREEBSD +#ifdef KERNEL typedef struct _jmp_buf *__cleanup_ptr; -//#define __cleanup_ptr struct _jmp_buf * +#endif +#else +typedef jmp_buf __cleanup_ptr; +#endif #define ___CLEANUP_STACK_EXTRAS___ \ __cleanup_ptr ___CLEANUP_STACK_DISPATCHER= NULL;\ @@ -168,16 +199,22 @@ #define CLEANUP_STACK\ ___CLEANUP_STACK_EXTRAS___\ + __VOLATILE_IMPLEMENTATION__ ___generic___ ___CLEANUP_LOCALS___ \ + [ __CLEANUP_STACK_MAX__ ];\ __VOLATILE_IMPLEMENTATION__ __cleanup_ptr ___CLEANUP_STACK \ [ __CLEANUP_STACK_MAX__ ];\ - __VOLATILE_IMPLEMENTATION__ int __CLEANUP_STACK_POINTER__= 0 - + __VOLATILE_IMPLEMENTATION__ int __CLEANUP_STACK_POINTER__= 0;\ + ___CLEANUP_LOCALS___[ 0 ]= 0 #define CLEANUP_STACK_SIZE( size )\ ___CLEANUP_STACK_EXTRAS___\ + __VOLATILE_IMPLEMENTATION__ ___generic___ ___CLEANUP_LOCALS___ \ + [ size ];\ __VOLATILE_IMPLEMENTATION__ __cleanup_ptr ___CLEANUP_STACK \ [ size ];\ - __VOLATILE_IMPLEMENTATION__ int __CLEANUP_STACK_POINTER__= 0 + __VOLATILE_IMPLEMENTATION__ int __CLEANUP_STACK_POINTER__= 0;\ + ___CLEANUP_LOCALS___[ 0 ]= 0 + /** Use REGISTER_CLEANUP_LOCAL *** XXX BEFORE XXX *** you register an action to use that local with. It's just a void *. You must re-cast it to what is @@ -190,6 +227,15 @@ #define GET_LOCAL()\ ( ___CLEANUP_LOCALS___[ __CLEANUP_STACK_POINTER___ ] ) +#define POP_CLEANUP\ + do\ + {\ + if( __CLEANUP_STACK_POINTER___ )\ + {\ + ( __CLEANUP_STACK_POINTER___-- );\ + }\ + } while( 0 ); + /*** OOPC names: ***/ @@ -207,6 +253,8 @@ #define $reset_cleanup RESET_CLEANUP +#define $pop_cleanup POP_CLEANUP + #endif /*** __CLEANUP_H__ ***/ ==== //depot/projects/soc2006/adamartin_autofs/autofs/protocol.c#4 (text+ko) ==== ==== //depot/projects/soc2006/adamartin_autofs/autofs/protocol.h#4 (text+ko) ==== @@ -224,4 +224,6 @@ int send_mount_request(struct message_header *req); +int parse_user_message(); + #endif /*** AUTOFS_PROTOCOL_HEADER ***/ ==== //depot/projects/soc2006/adamartin_autofs/pseudofs/pseudofs.h#2 (text+ko) ==== @@ -43,6 +43,7 @@ struct uio; struct vfsconf; struct vnode; +struct componentname; /* * Limits and constants @@ -137,7 +138,7 @@ */ #define PFS_LOOKUP_ARGS \ struct thread *td, struct proc *p, struct pfs_node *pn, \ - unsigned long cmd, void *data + struct componentname *cnp #define PFS_LOOKUP_PROTO(name) \ int name(PFS_LOOKUP_ARGS); typedef int (*pfs_lookup_t)(PFS_LOOKUP_ARGS); ==== //depot/projects/soc2006/adamartin_autofs/pseudofs/pseudofs_vnops.c#3 (text+ko) ==== From owner-p4-projects@FreeBSD.ORG Tue Nov 14 03:17:27 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6EBD316A47E; Tue, 14 Nov 2006 03:17:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 112BB16A407 for ; Tue, 14 Nov 2006 03:17:27 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D0C6D43D58 for ; Tue, 14 Nov 2006 03:17:26 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE3HQLg003558 for ; Tue, 14 Nov 2006 03:17:26 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE3HQ5O003550 for perforce@freebsd.org; Tue, 14 Nov 2006 03:17:26 GMT (envelope-from marcel@freebsd.org) Date: Tue, 14 Nov 2006 03:17:26 GMT Message-Id: <200611140317.kAE3HQ5O003550@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 109902 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 03:17:27 -0000 http://perforce.freebsd.org/chv.cgi?CH=109902 Change 109902 by marcel@marcel_cluster on 2006/11/14 03:16:25 More formally define Loader Virtual Memory (LVM). Affected files ... .. //depot/projects/ia64/sys/boot/ia64/common/copy.c#4 edit .. //depot/projects/ia64/sys/ia64/include/bootinfo.h#12 edit .. //depot/projects/ia64/sys/ia64/include/vmparam.h#16 edit Differences ... ==== //depot/projects/ia64/sys/boot/ia64/common/copy.c#4 (text+ko) ==== @@ -32,8 +32,6 @@ #include "libia64.h" -#define LDR_LOG2_PGSZ 20 - uint64_t *ia64_pgtbl; uint32_t ia64_pgtblsz; @@ -52,26 +50,27 @@ printf("\n%s: va=%lx, *len=%lx: pa=", __func__, va, *len); /* We can not copy more than a page at a time. */ - if (*len > (1UL << LDR_LOG2_PGSZ)) - *len = 1UL << LDR_LOG2_PGSZ; + if (*len > IA64_LVM_PAGE_SIZE) + *len = IA64_LVM_PAGE_SIZE; - if (va < IA64_KERNELBASE) { + if (va < IA64_LVM_BASE) { printf("\n%s: %lx: invalid loader virtual address\n", __func__, va); *len = 0; return (NULL); } - va -= IA64_KERNELBASE; - idx = va >> LDR_LOG2_PGSZ; + va -= IA64_LVM_BASE; + idx = va >> IA64_LVM_PAGE_SHIFT; if (idx >= (ia64_pgtblsz >> 3)) { + /* XXX We can extend the loader page table. */ printf("\n%s: %lx: loader virtual address out of bounds\n", __func__, va); *len = 0; return (NULL); } - ofs = va & ((1U << LDR_LOG2_PGSZ) - 1); + ofs = va & IA64_LVM_PAGE_MASK; pa = ia64_pgtbl[idx]; if (pa == 0) { pa = ldr_alloc(va - ofs); ==== //depot/projects/ia64/sys/ia64/include/bootinfo.h#12 (text+ko) ==== @@ -1,42 +1,37 @@ +/* $FreeBSD: src/sys/ia64/include/bootinfo.h,v 1.8 2005/01/06 22:18:23 imp Exp $ */ /*- - * Copyright (c) 2004,2005 Marcel Moolenaar + * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. * All rights reserved. * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: + * Author: Chris G. Demetriou + * + * Permission to use, copy, modify and distribute this software and + * its documentation is hereby granted, provided that both the copyright + * notice and this permission notice appear in all copies of the + * software, derivative works or modified versions, and any portions + * thereof, and that both notices appear in supporting documentation. + * + * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" + * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND + * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. + * + * Carnegie Mellon requests users of this software to return to * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. + * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU + * School of Computer Science + * Carnegie Mellon University + * Pittsburgh PA 15213-3890 * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR - * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. - * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, - * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT - * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * $FreeBSD$ + * any improvements or extensions that they make and grant Carnegie the + * rights to redistribute these changes. */ -#ifndef _MACHINE_BOOTINFO_H_ -#define _MACHINE_BOOTINFO_H_ - -#ifndef BOOTINFO_TAGVAL_PAIRS - struct bootinfo { uint64_t bi_magic; /* BOOTINFO_MAGIC */ #define BOOTINFO_MAGIC 0xdeadbeeffeedface uint64_t bi_version; /* version 1 */ uint64_t bi_spare[5]; /* was: name of kernel */ - uint64_t bi_pgtbl; /* PA of loader page table */ + uint64_t bi_pgtbl; /* Loader page table PA.*/ uint64_t bi_hcdp; /* DIG64 HCDP table */ uint64_t bi_fpswa; /* FPSWA interface */ uint64_t bi_boothowto; /* value for boothowto */ @@ -45,7 +40,7 @@ uint64_t bi_memmap_size; /* size of EFI memory map */ uint64_t bi_memdesc_size; /* sizeof EFI memory desc */ uint32_t bi_memdesc_version; /* EFI memory desc version */ - uint32_t bi_pgtblsz; /* size of loader page table */ + uint32_t bi_pgtblsz; /* Loader page table size. */ uint64_t bi_symtab; /* start of kernel sym table */ uint64_t bi_esymtab; /* end of kernel sym table */ uint64_t bi_kernend; /* end of kernel space */ @@ -54,45 +49,3 @@ }; extern struct bootinfo bootinfo; - -#else - -/* - * (tag,val) array based hand-off. - */ - -struct bi_tagval { - uint64_t tag; - uint64_t val; -}; - -/* Non-optional tags. */ -#define BI_TAG_BI_MAGIC 0x62695f6d61676963ul /* bi_magic */ -#define BI_VAL_BI_MAGIC 0x3d46726565425344ul -#define BI_TAG_BI_REDIR 0x62695f7265646972ul /* bi_redir */ - -/* Tags for MI (meta) data. */ -#define BI_TAG_BOOTHOW 0x626f6f74686f7700ul /* boothow */ -#define BI_TAG_ENVIRON 0x656e7669726f6e00ul /* environ */ -#define BI_TAG_KERNEND 0x1 -#define BI_TAG_PRELOAD 0x7072656c6f616400ul /* preload */ -#define BI_TAG_SSYMTAB 0x7373796d74616200ul /* ssymtab */ -#define BI_TAG_ESYMTAB 0x6573796d74616200ul /* esymtab */ - -/* Tags for MD (meta) data. */ -#define BI_TAG_FPSWA 0x2 -#define BI_TAG_HCDP 0x3 -#define BI_TAG_MM_ADDR 0x6d6d5f6164647200ul /* mm_addr */ -#define BI_TAG_MM_SIZE 0x6d6d5f73697a6500ul /* mm_size */ -#define BI_TAG_MMD_SIZE 0x6d6d645f73697a65ul /* mmd_size */ -#define BI_TAG_MMD_VERS 0x6d6d645f76657273ul /* mmd_vers */ -#define BI_TAG_SYSTABLE 0x4 - -#define BI_TAG_PGTBL 0x10 -#define BI_TAG_PGTBLSZ 0x11 - -uint64_t ia64_bi_lookup(uint64_t); - -#endif - -#endif /* _MACHINE_BOOTINFO_H_ */ ==== //depot/projects/ia64/sys/ia64/include/vmparam.h#16 (text+ko) ==== @@ -133,7 +133,16 @@ #define IA64_ID_PAGE_MASK (IA64_ID_PAGE_SIZE-1) #define IA64_BACKINGSTORE IA64_RR_BASE(4) -#define IA64_KERNELBASE 0xbffc000000000000 + +/* + * Parameters for loader virtual memory (LVM). The kernel, its modules and + * metadata are loaded in the LVM by the loader. The kernel is given the PA + * and size of the page table that provides the mapping of the LVM. + */ +#define IA64_LVM_BASE 0xbffc000000000000 +#define IA64_LVM_PAGE_SHIFT 20 /* 1MB */ +#define IA64_LVM_PAGE_SIZE (1U< X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 047B016A417; Tue, 14 Nov 2006 04:33:20 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9126716A407 for ; Tue, 14 Nov 2006 04:33:19 +0000 (UTC) (envelope-from adamartin@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5996D43D66 for ; Tue, 14 Nov 2006 04:33:19 +0000 (GMT) (envelope-from adamartin@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE4XJDr013868 for ; Tue, 14 Nov 2006 04:33:19 GMT (envelope-from adamartin@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE4XIX5013865 for perforce@freebsd.org; Tue, 14 Nov 2006 04:33:18 GMT (envelope-from adamartin@FreeBSD.org) Date: Tue, 14 Nov 2006 04:33:18 GMT Message-Id: <200611140433.kAE4XIX5013865@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to adamartin@FreeBSD.org using -f From: Adam Martin To: Perforce Change Reviews Cc: Subject: PERFORCE change 109903 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 04:33:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=109903 Change 109903 by adamartin@adamartin_hobbes on 2006/11/14 04:32:27 Autofs filesystem (on top of pseudofs) now can access the device it is mounted from, and will pick up the message buffers for user-kernel IO. Lookup operation converted to use mbufs for queue control, not UIOVEC. Affected files ... .. //depot/projects/soc2006/adamartin_autofs/autofs/Makefile#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs.c#6 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs.h#6 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.c#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.h#4 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.c#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.h#3 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_pfsops.c#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_subr.c#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/autofs_subr.h#2 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/cleanup.h#6 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/debug.h#1 add .. //depot/projects/soc2006/adamartin_autofs/autofs/protocol.c#5 edit .. //depot/projects/soc2006/adamartin_autofs/autofs/protocol.h#5 edit .. //depot/projects/soc2006/adamartin_autofs/pseudofs/pseudofs.h#3 edit Differences ... ==== //depot/projects/soc2006/adamartin_autofs/autofs/Makefile#5 (text+ko) ==== @@ -28,9 +28,9 @@ AUTOFS_DEV_SOURCE=autofs_ctl.c autofs_dev.c AUTOFS_FS_SOURCE=autofs_pfsops.c vnode_if.h -AUTOFS_CORE_SOURCE=autofs.c protocol.c +AUTOFS_CORE_SOURCE=autofs.c protocol.c autofs_subr.c SRCS=$(AUTOFS_CORE_SOURCE) $(AUTOFS_FS_SOURCE) $(AUTOFS_DEV_SOURCE) -HEADERS=autofs.h cleanup.h protocol.h +HEADERS=autofs.h cleanup.h protocol.h autofs_subr.h autofs_ctl.h autofs_dev.h debug.h KMOD=autofs autofs.c: $(HEADERS) ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs.c#6 (text+ko) ==== @@ -40,8 +40,8 @@ #include #include -#include -#include "cleanup.h" +//#include +//#include "cleanup.h" #include #include ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs.h#6 (text+ko) ==== @@ -30,10 +30,14 @@ #ifndef __AUTOFS_MAIN_HEADER__ #define __AUTOFS_MAIN_HEADER__ +#define FREEBSD_SYS +#if 0 #define USE_SETJMP_CLEANUP #define NO_USE_SETJMP_INCLUDE #define NO_CLEANUP_WARNING -#define FREEBSD_SYS +#include +#endif + #include "cleanup.h" ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.c#5 (text+ko) ==== @@ -40,17 +40,21 @@ #include #include +//#include +//#include "cleanup.h"> #include "autofs.h" #include "autofs_ctl.h" -#include "cleanup.h" +#include "autofs_dev.h" +#include "autofs_subr.h" +#include "debug.h" struct cdev *autofs_ctl_dev; struct autofs_ctl_state autofs_ctl_state; static d_ioctl_t autofs_ctl_ioctl; -static struct cdevsw autofs_ctl_devops = { +struct cdevsw autofs_ctl_devops = { .d_version= D_VERSION, .d_open= NULL, .d_close= NULL, @@ -63,7 +67,9 @@ int autofs_ctl_init() { - DEBUG KPRINTF( "Initializing " ) + DEBUG KPRINTF( "Initializing " ); + + return 0; } MALLOC_DECLARE( M_AUTOFS_DEV ); @@ -77,14 +83,16 @@ int error; struct cdevsw *autofs_cdevsw; struct cdev *autofs_cdev; - struct autofs_dev_data *autofs_dev_data; + struct autofs_dev_bufs *autofs_dev_data; + + error= 0; autofs_cdevsw= malloc( sizeof( struct cdevsw ), M_AUTOFS_DEV, M_WAITOK ); - autofs_dev_data= malloc( sizeof( struct autofs_dev_data ), M_AUTOFS_DEV_BUFFERS, + autofs_dev_data= malloc( sizeof( struct autofs_dev_bufs ), M_AUTOFS_DEV_BUFFERS, M_WAITOK ); - autofs_dev_data.input= malloc( IOV_BUF_COUNT * sizeof( struct iovec * ), M_AUTOFS_DEV_BUFFERS, M_WAITOK ); - autofs_dev_data.output= malloc( IOV_BUF_COUNT * sizeof( struct iovec * ), M_AUTOFS_DEV_BUFFERS, M_WAITOK ); + autofs_dev_data->input= autofs_queue_init(); + autofs_dev_data->output= autofs_queue_init(); autofs_cdevsw->d_open= autofs_dev_open; autofs_cdevsw->d_close= autofs_dev_close; @@ -101,7 +109,7 @@ } autofs_cdev->si_priv= (struct cdev_priv *) autofs_dev_data; - return 0; + return error; } @@ -123,14 +131,17 @@ { $cleanup_init_size( 8 ); int error= 0; - int *arg= (int *) arg_c; + int *argp= (int *) arg_c; + int arg; + + argp= NULL; error= EOPNOTSUPP; - arg= NULL; - $return EOPNOTSUPP; + //$return EOPNOTSUPP; #if 1 - switch( cmd ) { + switch( cmd ) + { case AFSIOCREATDEV: /* mtx_lock(&autofs_ctl_state.lock); @@ -153,6 +164,7 @@ * a bad IOCTL code... */ error= EIO; + } #endif return error; ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_ctl.h#4 (text+ko) ==== @@ -31,6 +31,7 @@ #define __AUTOFS_CTL_H__ #include "autofs.h" +#include "autofs_subr.h" #include #include #include /* uprintf */ @@ -66,6 +67,7 @@ extern struct autofs_ctl_state autofs_ctl_state; extern int autofs_ctl_init( void ); +int create_autofs_node( int num ); #define MAX_NODE_COUNT ( 32 ) @@ -74,9 +76,9 @@ -struct autofs_dev_data { - struct uio input; - struct uio output +struct autofs_dev_bufs { + queue *input; + queue *output; }; @@ -85,4 +87,10 @@ #define AFSIOCREATDEV _IOR('a', 1, _int_p) /* 1 - create autofs node */ +#define AUTOFS_GET_BUFFERS( p_info )\ + ( (struct autofs_dev_bufs *) ( AUTOFS_GET_DEV( ( p_info ) )->si_priv ) ) + +#define AUTOFS_GET_DEV( p_info )\ + ( (struct cdev *) ( ( p_info )->pi_priv ) ) + #endif /** __AUTOFS_CTL_H__ **/ ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.c#5 (text+ko) ==== @@ -48,24 +48,15 @@ struct uio *in_buffer, *out_buffer; int -write_buffer( struct uio *buf, void *data, int len ) +write_buffer( queue *q, void *data, int len ) { $cleanup_init_size( 8 ); int error; error= 0; - if( buf->uio_iovcnt < IOV_BUF_COUNT ) - { - buf->uio_iov[ buf->uio_iovcnt ].iov_base= data; - buf->uio_iov[ buf->uio_iovcnt ].iov_len= len; - buf->uio_iovcnt++; - parse_messages(); - } - else - { - error= ENOMEM; - } + autofs_queue_write( q, data, len ); + //parse_user_message(); $return error; } @@ -75,4 +66,8 @@ { int error; int i; + error= 0; + i= minor( dev ); + + return error; } ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_dev.h#3 (text+ko) ==== @@ -4,9 +4,9 @@ #define IOV_BUF_COUNT ( 16 ) -extern struct uio *in_buffer, *out_buffer; +//extern struct uio *in_buffer, *out_buffer; -int write_buffer( struct uio *buf, void *data, int len ); +int write_buffer( queue *q, void *data, int len ); int autofs_dev_open( struct cdev *dev, int oflags, int devtype, struct thread *td ); ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_pfsops.c#5 (text+ko) ==== @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -57,6 +58,7 @@ #include "protocol.h" #include "debug.h" +#include "autofs_ctl.h" MALLOC_DEFINE(M_AUTOFS_MOUNTBUF, "AutoFS mntbuf", "AutoFS mountpoint data, to simulate filesystem contents."); @@ -83,12 +85,15 @@ struct componentname c= *cnp; struct message_header msg; struct mount_request mr; + struct pfs_info *pi; + - KPRINTF( "autofs lookup called\n" ); - - DEBUG KPRINTF( "cn_nameptr= %s, cn_pnbuf= %s\n", c.cn_nameptr, + pi= pn->pn_info; + + DEBUG1 KPRINTF( "autofs lookup called\n" ); + DEBUG7 KPRINTF( "cn_nameptr= %s, cn_pnbuf= %s\n", c.cn_nameptr, c.cn_pnbuf ); - DEBUG KPRINTF( "cn_namelen= %ld, cn_consume= %ld\n", c.cn_namelen, + DEBUG7 KPRINTF( "cn_namelen= %ld, cn_consume= %ld\n", c.cn_namelen, c.cn_consume ); /* Prepare a mount message */ @@ -103,10 +108,10 @@ /* Take a lock and if it's not taken yet fire off the request. */ - if( take_autofs_lock( instance, node ) ) - { - send_mount_request( &msg ); - } + //if( take_autofs_lock( instance, node ) ) + //{ + send_mount_request( &msg, AUTOFS_GET_BUFFERS( pi )->output ); + //} return 1; } @@ -114,6 +119,41 @@ static int autofs_init(struct pfs_info *pi, struct vfsconf *vfc) { + struct vnode *devvp; + struct cdev *dev; + struct nameidata nd, *ndp= &nd; + struct thread *td; + int error; + + td= curthread; + + + /** Get the fake device vnode from name **/ + + NDINIT( ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_SYSSPACE, pi->pi_name, td ); + if( ( error= namei( ndp ) ) != 0 ) + { + return error; + } + NDFREE( ndp, NDF_ONLY_PNBUF ); + devvp= ndp->ni_vp; + + /** Verify that the vnode is a device **/ + if( devvp->v_type != VCHR ) + { + panic( "Can't mount from non-char device for Autofs!\n" ); + } + + /* Get out the cdev object, and store in the private field for the + pfs_info object (I think we need to release the vnode too!)*/ + + dev= devvp->v_rdev; + pi->pi_priv= (void *) dev; + VOP_UNLOCK( devvp, LK_RELEASE, td ); + + + /** Make some fake files... **/ + foo= pfs_create_dir( pi->pi_root, "foo", autofs_attr, autofs_vis, 0 ); foo->pn_lookup= autofs_lookup; return 0; ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_subr.c#2 (text+ko) ==== ==== //depot/projects/soc2006/adamartin_autofs/autofs/autofs_subr.h#2 (text+ko) ==== @@ -1,4 +1,9 @@ +#ifndef _AUTOFS_SUBR_H_ +#define _AUTOFS_SUBR_H_ +#include +#include +#include typedef struct mbuf queue; @@ -8,8 +13,9 @@ int autofs_queue_write( queue *q, void *buf, int len ); -int autofs_queue_read( queue *q, void *q, int len ); /* Removes from head */ +int autofs_queue_read( queue *q, void *buf, int len ); /* Removes from head */ +#endif /*** _AUTOFS_SUBR_H_ ***/ ==== //depot/projects/soc2006/adamartin_autofs/autofs/cleanup.h#6 (text+ko) ==== @@ -86,11 +86,12 @@ #define __CLEANUP_STACK_MAX__ ( 64 ) +typedef void *___generic___; + #if defined( __GNUC__ ) && !defined( USE_SETJMP_CLEANUP ) typedef void (*__cleanup_ptr)( void ); -typedef void *___generic___; #define __VOLATILE_IMPLEMENTATION__ /** No volatile for nested functions **/ ==== //depot/projects/soc2006/adamartin_autofs/autofs/protocol.c#5 (text+ko) ==== @@ -32,13 +32,15 @@ #include "protocol.h" #include "autofs.h" +#include "autofs_ctl.h" +#include "autofs_subr.h" #include "autofs_dev.h" int -send_mount_request(struct message_header *req) +send_mount_request( struct message_header *req, queue *out_buffer ) { struct mount_request *mb= (struct mount_request *) req->message_data; @@ -47,7 +49,7 @@ write_buffer( out_buffer, (void *) mb, sizeof( struct mount_request ) ); write_buffer( out_buffer, (void *) mb->mountpoint, - MIN( strlen( mb->mountpoint ), mb->mountpoint_len ) ); + mb->mountpoint_len ); return 0; ==== //depot/projects/soc2006/adamartin_autofs/autofs/protocol.h#5 (text+ko) ==== @@ -222,8 +222,10 @@ }; -int send_mount_request(struct message_header *req); +#include "autofs_subr.h" + +int send_mount_request( struct message_header *req, queue *q ); -int parse_user_message(); +int parse_user_message( void ); #endif /*** AUTOFS_PROTOCOL_HEADER ***/ ==== //depot/projects/soc2006/adamartin_autofs/pseudofs/pseudofs.h#3 (text+ko) ==== @@ -176,6 +176,7 @@ /* currently, the mutex is only used to protect the bitmap */ struct mtx pi_mutex; struct unrhdr *pi_unrhdr; + void *pi_priv; }; /* From owner-p4-projects@FreeBSD.ORG Tue Nov 14 05:57:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EC8AA16A415; Tue, 14 Nov 2006 05:57:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BEE0616A403 for ; Tue, 14 Nov 2006 05:57:25 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D0E143D46 for ; Tue, 14 Nov 2006 05:57:25 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE5vPI1034030 for ; Tue, 14 Nov 2006 05:57:25 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE5vPQk034027 for perforce@freebsd.org; Tue, 14 Nov 2006 05:57:25 GMT (envelope-from marcel@freebsd.org) Date: Tue, 14 Nov 2006 05:57:25 GMT Message-Id: <200611140557.kAE5vPQk034027@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 109905 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 05:57:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=109905 Change 109905 by marcel@marcel_cluster on 2006/11/14 05:57:01 Add the beginnings of a i386/amd64 EFI loader. Affected files ... .. //depot/projects/ia64/sys/boot/i386/efi/Makefile#1 add .. //depot/projects/ia64/sys/boot/i386/efi/conf.c#1 add .. //depot/projects/ia64/sys/boot/i386/efi/exec.c#1 add .. //depot/projects/ia64/sys/boot/i386/efi/help.i386#1 add .. //depot/projects/ia64/sys/boot/i386/efi/ldscript.ia32#1 add .. //depot/projects/ia64/sys/boot/i386/efi/loader.rc#1 add .. //depot/projects/ia64/sys/boot/i386/efi/main.c#1 add .. //depot/projects/ia64/sys/boot/i386/efi/version#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Tue Nov 14 08:33:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1EDCD16A47C; Tue, 14 Nov 2006 08:33:01 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B052816A47B for ; Tue, 14 Nov 2006 08:33:00 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90CB543D5C for ; Tue, 14 Nov 2006 08:32:56 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE8Wus2065081 for ; Tue, 14 Nov 2006 08:32:56 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE8WuW9065078 for perforce@freebsd.org; Tue, 14 Nov 2006 08:32:56 GMT (envelope-from mjacob@freebsd.org) Date: Tue, 14 Nov 2006 08:32:56 GMT Message-Id: <200611140832.kAE8WuW9065078@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109908 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 08:33:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=109908 Change 109908 by mjacob@newisp on 2006/11/14 08:32:04 Turn down loop or f/w ready errors into CMD_RQLATER returns- not CMD_EAGAIN. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#32 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#32 (text+ko) ==== @@ -4006,7 +4006,7 @@ */ if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate != LOOP_READY) { - return (CMD_EAGAIN); + return (CMD_RQLATER); } if (XS_TGT(xs) >= MAX_FC_TARG) { @@ -4857,7 +4857,8 @@ XS_SET_STATE_STAT(isp, xs, sp); if (resp) { isp_prt(isp, ISP_LOGWARN, - "FCP RESPONSE: 0x%x", + "%d.%d FCP RESPONSE: 0x%x", + XS_TGT(xs), XS_LUN(xs), resp[FCP_RSPNS_CODE_OFFSET]); XS_SETERR(xs, HBA_BOTCH); } From owner-p4-projects@FreeBSD.ORG Tue Nov 14 08:33:59 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5397216A417; Tue, 14 Nov 2006 08:33:59 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E4BC116A403 for ; Tue, 14 Nov 2006 08:33:58 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE34043D45 for ; Tue, 14 Nov 2006 08:33:58 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAE8XwlX065346 for ; Tue, 14 Nov 2006 08:33:58 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAE8Xw0v065342 for perforce@freebsd.org; Tue, 14 Nov 2006 08:33:58 GMT (envelope-from mjacob@freebsd.org) Date: Tue, 14 Nov 2006 08:33:58 GMT Message-Id: <200611140833.kAE8Xw0v065342@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 109909 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 08:33:59 -0000 http://perforce.freebsd.org/chv.cgi?CH=109909 Change 109909 by mjacob@newisp on 2006/11/14 08:33:00 More cleanup on initial startup conditions that have loop down. Clean up sleeping in isp_kthread. Add more ISP_LOGSANCFG lines. Affected files ... .. //depot/projects/newisp/dev/isp/isp_freebsd.c#27 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp_freebsd.c#27 (text+ko) ==== @@ -50,14 +50,15 @@ int isp_fabric_hysteresis = 5; int isp_loop_down_limit = 300; /* default loop down limit */ int isp_change_is_bad = 0; /* "changed" devices are bad */ -int isp_quickboot_time = 5; /* don't wait more than N secs for loop up */ -int isp_gone_device_time = 60; /* grace time before reporting device lost */ +int isp_quickboot_time = 15; /* don't wait more than N secs for loop up */ +int isp_gone_device_time = 30; /* grace time before reporting device lost */ static const char *roles[4] = { "(none)", "Target", "Initiator", "Target/Initiator" }; static const char prom3[] = "PortID 0x%06x Departed from Target %u because of %s"; +static void isp_freeze_loopdown(ispsoftc_t *, char *); static d_ioctl_t ispioctl; static void isp_intr_enable(void *); static void isp_cam_async(void *, uint32_t, struct cam_path *, void *); @@ -180,7 +181,6 @@ if (IS_FC(isp)) { ISPLOCK_2_CAMLOCK(isp); #if __FreeBSD_version >= 500000 - /* XXX: LOCK VIOLATION */ cv_init(&isp->isp_osinfo.kthread_cv, "isp_kthread_cv"); if (kthread_create(isp_kthread, isp, &isp->isp_osinfo.kproc, RFHIGHPID, 0, "%s: fc_thrd", @@ -198,6 +198,17 @@ return; } CAMLOCK_2_ISPLOCK(isp); + /* + * We start by being "loop down" if we have an initiator role + */ + if (isp->isp_role & ISP_ROLE_INITIATOR) { + isp_freeze_loopdown(isp, "isp_attach"); + isp->isp_osinfo.ldt = + timeout(isp_ldt, isp, isp_quickboot_time * hz); + isp->isp_osinfo.ldt_running = 1; + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Starting Initial Loop Down Timer"); + } } @@ -268,7 +279,7 @@ isp_sysctl_update(isp); } -static __inline void +static void isp_freeze_loopdown(ispsoftc_t *isp, char *msg) { if (isp->isp_osinfo.simqfrozen == 0) { @@ -661,11 +672,6 @@ "World Wide Port Name"); SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, - "loop_down_time", - CTLFLAG_RD, &isp->isp_osinfo.loop_down_time, 0, - "How long Loop has been down"); - - SYSCTL_ADD_UINT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "loop_down_limit", CTLFLAG_RW, &isp->isp_osinfo.loop_down_limit, 0, "How long to wait for loop to come back up"); @@ -2226,7 +2232,7 @@ fcportdb_t *lp; int dbidx, tgt; - isp_prt(isp, ISP_LOGDEBUG0, "LDT timer expired"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Loop Down Timer expired"); ISP_LOCK(isp); /* @@ -2265,13 +2271,29 @@ "Loop Down Timeout"); isp_make_gone(isp, tgt); } + + /* + * The loop down timer has expired. Wake up the kthread + * to notice that fact (or make it false). + */ + isp->isp_osinfo.loop_down_time = isp->isp_osinfo.loop_down_limit+1; +#if __FreeBSD_version < 500000 + wakeup(&isp->isp_osinfo.kproc); +#else +#ifdef ISP_SMPLOCK + cv_signal(&isp->isp_osinfo.kthread_cv); +#else + wakeup(&isp->isp_osinfo.kthread_cv); +#endif +#endif + ISP_UNLOCK(isp); } static void isp_kthread(void *arg) { ispsoftc_t *isp = arg; - int slp; + int slp = 0; #if __FreeBSD_version < 500000 int s; @@ -2288,21 +2310,25 @@ * gotten good fibre channel state. */ for (;;) { - int wasfrozen, lb; + int wasfrozen, lb, lim; - isp_prt(isp, ISP_LOGDEBUG0, "kthread: checking FC state"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "isp_kthread: checking FC state"); isp->isp_osinfo.mbox_sleep_ok = 1; lb = isp_fc_runstate(isp, 250000); isp->isp_osinfo.mbox_sleep_ok = 0; if (lb) { - unsigned int inc = 1; + /* + * Increment loop down time by the last sleep interval + */ + isp->isp_osinfo.loop_down_time += slp; if (lb < 0) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "kthread: FC loop not up (down count %d)", isp->isp_osinfo.loop_down_time); } else { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "kthread: FC got to %d (down count %d)", lb, isp->isp_osinfo.loop_down_time); } @@ -2310,33 +2336,33 @@ /* * If we've never seen loop up and we've waited longer - * than quickboot time, give up and go to sleep until - * loop comes up. Otherwise, increment the loop down - * time and figure out how long to sleep to the next - * check. + * than quickboot time, or we've seen loop up but we've + * waited longer than loop_down_limit, give up and go + * to sleep until loop comes up. */ - if (FCPARAM(isp)->loop_seen_once == 0 && - isp->isp_osinfo.loop_down_time >= - isp_quickboot_time) { - isp->isp_osinfo.loop_down_time = 0xffff; + if (FCPARAM(isp)->loop_seen_once == 0) { + lim = isp_quickboot_time; + } else { + lim = isp->isp_osinfo.loop_down_limit; + } + if (isp->isp_osinfo.loop_down_time >= lim) { + isp_freeze_loopdown(isp, "loop limit hit"); slp = 0; - } else if (isp->isp_osinfo.loop_down_time > 30) { - inc = 30; - slp = 30 * hz; - } else if (isp->isp_osinfo.loop_down_time > 1) { - slp = hz; + } else if (isp->isp_osinfo.loop_down_time < 10) { + slp = 1; + } else if (isp->isp_osinfo.loop_down_time < 30) { + slp = 5; + } else if (isp->isp_osinfo.loop_down_time < 60) { + slp = 10; + } else if (isp->isp_osinfo.loop_down_time < 120) { + slp = 20; } else { - slp = 1; + slp = 30; } - inc += isp->isp_osinfo.loop_down_time; - if (inc < 0xffff) { - isp->isp_osinfo.loop_down_time = inc; - } else { - isp->isp_osinfo.loop_down_time = 0xfffe; - } } else { - isp_prt(isp, ISP_LOGDEBUG0, "kthread: FC state OK"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "isp_kthread: FC state OK"); isp->isp_osinfo.loop_down_time = 0; slp = 0; } @@ -2350,18 +2376,24 @@ wasfrozen = isp->isp_osinfo.simqfrozen & SIMQFRZ_LOOPDOWN; isp->isp_osinfo.simqfrozen &= ~SIMQFRZ_LOOPDOWN; if (wasfrozen && isp->isp_osinfo.simqfrozen == 0) { - isp_prt(isp, ISP_LOGDEBUG0, "kthread: releasing simq"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "isp_kthread: releasing simq"); ISPLOCK_2_CAMLOCK(isp); xpt_release_simq(isp->isp_sim, 1); CAMLOCK_2_ISPLOCK(isp); } + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "isp_kthread: sleep time %d", slp); #if __FreeBSD_version < 500000 - tsleep(&isp->isp_osinfo.kproc, PRIBIO, "ispf", slp); + tsleep(&isp->isp_osinfo.kproc, PRIBIO, "ispf", + slp * hz); #else #ifdef ISP_SMPLOCK - cv_timed_wait(&isp->isp_osinfo.kthread_cv, &isp->isp_lock, slp); + cv_timed_wait(&isp->isp_osinfo.kthread_cv, &isp->isp_lock, + slp * hz); #else - (void) tsleep(&isp->isp_osinfo.kthread_cv, PRIBIO, "ispf", slp); + (void) tsleep(&isp->isp_osinfo.kthread_cv, PRIBIO, "ispf", + slp * hz); #endif #endif /* @@ -2372,6 +2404,9 @@ * to settle. */ if (slp == 0 && isp->isp_osinfo.hysteresis) { + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "isp_kthread: sleep hysteresis tick time %d", + isp->isp_osinfo.hysteresis * hz); (void) tsleep(&isp_fabric_hysteresis, PRIBIO, "ispT", (isp->isp_osinfo.hysteresis * hz)); } @@ -2381,7 +2416,7 @@ static void isp_action(struct cam_sim *sim, union ccb *ccb) { - int bus, tgt, error; + int bus, tgt, error, lim; ispsoftc_t *isp; struct ccb_trans_settings *cts; @@ -2456,11 +2491,37 @@ } break; case CMD_RQLATER: - ISPLOCK_2_CAMLOCK(isp); /* * This can only happen for Fibre Channel */ KASSERT((IS_FC(isp)), ("CMD_RQLATER for FC only")); + + /* + * Handle initial and subsequent loop down cases + */ + if (FCPARAM(isp)->loop_seen_once == 0) { + lim = isp_quickboot_time; + } else { + lim = isp->isp_osinfo.loop_down_limit; + } + if (isp->isp_osinfo.loop_down_time >= lim) { + isp_prt(isp, ISP_LOGDEBUG0, + "%d.%d downtime (%d) > lim (%d)", + XS_TGT(ccb), XS_LUN(ccb), + isp->isp_osinfo.loop_down_time, lim); + ccb->ccb_h.status = + CAM_SEL_TIMEOUT|CAM_DEV_QFRZN; + xpt_freeze_devq(ccb->ccb_h.path, 1); + ISPLOCK_2_CAMLOCK(isp); + xpt_done(ccb); + break; + } + isp_prt(isp, ISP_LOGDEBUG0, + "%d.%d retry later", XS_TGT(ccb), XS_LUN(ccb)); + /* + * Otherwise, retry in a while. + */ + ISPLOCK_2_CAMLOCK(isp); cam_freeze_devq(ccb->ccb_h.path); cam_release_devq(ccb->ccb_h.path, RELSIM_RELEASE_AFTER_TIMEOUT, 0, 1000, 0); @@ -3244,6 +3305,8 @@ * If the loop down timer is running, cancel it. */ if (isp->isp_osinfo.ldt_running) { + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Stopping Loop Down Timer"); isp->isp_osinfo.ldt_running = 0; untimeout(isp_ldt, isp, isp->isp_osinfo.ldt); callout_handle_init(&isp->isp_osinfo.ldt); From owner-p4-projects@FreeBSD.ORG Tue Nov 14 15:46:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D6E6E16A57F; Tue, 14 Nov 2006 15:46:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 726FB16A407 for ; Tue, 14 Nov 2006 15:46:18 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FB2443DBC for ; Tue, 14 Nov 2006 15:46:06 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEFk6wg066695 for ; Tue, 14 Nov 2006 15:46:06 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEFk5cF066684 for perforce@freebsd.org; Tue, 14 Nov 2006 15:46:05 GMT (envelope-from bushman@freebsd.org) Date: Tue, 14 Nov 2006 15:46:05 GMT Message-Id: <200611141546.kAEFk5cF066684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 109931 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 15:46:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=109931 Change 109931 by bushman@bushman_nss_ldap_cached on 2006/11/14 15:45:42 + cached and libc's caching part modified to properly handle nsswitch requests with very large responses. Now client side (i.e. libc) must confirm if it can or cannot receive the cached's answer. If it cannot, cached will not send the data to the socket. While processing multipart requests, cached won't also move to the next result if the client doesn't confirm that it can handle current result. + some bug fixing in use_alternate_io part of the cached.c - now we can properly send/receive buffers of any size. Fixes are quite dirty - hard-coded integer constants (0, 1, and 2) should be replaced with macro definitions. + some minor fixes Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/include/nscache.h#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/include/nscachedcli.h#2 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscache.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscachedcli.c#3 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#9 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachedcli.c#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.h#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/debug.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/log.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_rs_query.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/protocol.c#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/protocol.h#4 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#7 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/include/nscache.h#2 (text) ==== @@ -43,6 +43,9 @@ typedef void (*nss_set_mp_rs_func_t)(cached_mp_read_session); typedef cached_mp_read_session (*nss_get_mp_rs_func_t)(void); +typedef void (*nss_set_mp_buffer_func_t)(char *, size_t); +typedef char *(*nss_get_mp_buffer_func_t)(size_t *); + typedef struct _nss_cache_info { char *entry_name; void *mdata; @@ -64,6 +67,9 @@ nss_set_mp_rs_func_t set_mp_rs_func; /* sets current read session */ nss_get_mp_rs_func_t get_mp_rs_func; /* gets current read session */ + + nss_set_mp_buffer_func_t set_mp_buffer_func; + nss_get_mp_buffer_func_t get_mp_buffer_func; } nss_cache_info; /* @@ -75,6 +81,8 @@ struct name##_mp_state { \ cached_mp_write_session mp_write_session; \ cached_mp_read_session mp_read_session; \ + char *mp_buffer; \ + size_t mp_bufsize; \ }; \ \ static void \ @@ -87,6 +95,8 @@ \ if (mp_state->mp_read_session != INVALID_CACHED_MP_READ_SESSION)\ __close_cached_mp_read_session(mp_state->mp_read_session);\ + \ + free(mp_state->mp_buffer); \ } \ NSS_TLS_HANDLING(name##_mp); \ \ @@ -140,18 +150,48 @@ return (INVALID_CACHED_MP_READ_SESSION); \ \ return (mp_state->mp_read_session); \ +} \ + \ +static void \ +name##_set_mp_buffer(char *buf, size_t bufsize) \ +{ \ + struct name##_mp_state *mp_state; \ + int res; \ + \ + res = name##_mp_getstate(&mp_state); \ + if (res != 0) \ + return; \ + \ + mp_state->mp_buffer = buf; \ + mp_state->mp_bufsize = bufsize; \ +} \ + \ +static char * \ +name##_get_mp_buffer(size_t *bufsize) \ +{ \ + struct name##_mp_state *mp_state; \ + int res; \ + \ + res = name##_mp_getstate(&mp_state); \ + if (res != 0) \ + return (NULL); \ + \ + *bufsize = mp_state->mp_bufsize; \ + return (mp_state->mp_buffer); \ } + /* * These macros should be used to initialize _nss_cache_info structure. For * multipart queries in setXXXent and getXXXent functions mf and uf * (marshal function and unmarshal function) should be both NULL. */ #define NS_COMMON_CACHE_INFO_INITIALIZER(name, mdata, if, mf, uf) \ - {#name, mdata, if, mf, uf, NULL, NULL, NULL, NULL} + {#name, mdata, if, mf, uf, NULL, NULL, NULL, NULL, NULL, NULL} #define NS_MP_CACHE_INFO_INITIALIZER(name, mdata, mf, uf) \ {#name, mdata, NULL, mf, uf, name##_set_mp_ws, name##_get_mp_ws,\ - name##_set_mp_rs, name##_get_mp_rs } + name##_set_mp_rs, name##_get_mp_rs, name##_set_mp_buffer,\ + name##_get_mp_buffer } /* * Analog of other XXX_CB macros. Has the pointer to _nss_cache_info ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/include/nscachedcli.h#2 (text) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscache.c#5 (text) ==== @@ -122,9 +122,13 @@ cache_data->key, cache_data->key_size, buffer, &buffer_size); __close_cached_connection(connection); - if (res == -2 && buffer_size < NSS_CACHE_BUFFER_SIZE_LIMIT) { - free(buffer); - buffer = (char *)malloc(buffer_size); + if (res == -2) { + if (buffer_size > NSS_CACHE_BUFFER_SIZE_LIMIT) { + free(buffer); + buffer = NULL; + } else + buffer = (char *)reallocf(buffer, buffer_size); + if (buffer == NULL) return (NS_UNAVAIL); } @@ -293,6 +297,12 @@ if (cache_info->get_mp_ws_func() != INVALID_CACHED_MP_WRITE_SESSION) return (NS_UNAVAIL); + + buffer = cache_info->get_mp_buffer_func(&buffer_size); + if (buffer != NULL) { + res = 0; + goto unmarsh; + } rs = cache_info->get_mp_rs_func(); if (rs == INVALID_CACHED_MP_READ_SESSION) { @@ -318,16 +328,22 @@ do { res = __cached_mp_read(rs, buffer, &buffer_size); - if (res == -2 && buffer_size < NSS_CACHE_BUFFER_SIZE_LIMIT) { - free(buffer); - buffer = (char *)malloc(buffer_size); - if (buffer == NULL) { + if (res == -2) { + if (buffer_size > NSS_CACHE_BUFFER_SIZE_LIMIT) { + free(buffer); res = -1; - break; + } else { + buffer = (char *)reallocf(buffer, buffer_size); + if (buffer == NULL) { + res = -1; + break; + } } } } while (res == -2); +unmarsh: + cache_info->set_mp_buffer_func(NULL, 0); if (res == 0) { va_copy(ap_new, ap); res = cache_info->unmarshal_func(buffer, buffer_size, retval, @@ -335,7 +351,11 @@ va_end(ap_new); if (res != NS_SUCCESS) { - free(buffer); + if (res == NS_RETURN) + cache_info->set_mp_buffer_func(buffer, + buffer_size); + else + free(buffer); return (res); } else res = 0; ==== //depot/projects/soc2006/nss_ldap_cached/src/lib/libc/net/nscachedcli.c#3 (text) ==== @@ -43,7 +43,7 @@ #include "un-namespace.h" #include "nscachedcli.h" -#define NS_DEFAULT_CACHED_IO_TIMEOUT 4 +#define NS_DEFAULT_CACHED_IO_TIMEOUT 60 static int safe_write(struct cached_connection_ *, const void *, size_t); static int safe_read(struct cached_connection_ *, void *, size_t); @@ -126,7 +126,7 @@ result += s_result; if (eventlist.flags & EV_EOF) - return (result < data_size ? -1 : 0); + return (result < data_size ? -1 : 0); } else return (-1); } while (result < data_size); @@ -360,13 +360,22 @@ result = safe_read(connection, &result_size, sizeof(size_t)); if (result != 0) goto fin; - - if (result_size > *data_size) { - *data_size = result_size; - error_code = -2; - goto fin; - } - + + if (result_size > *data_size) { + error_code = -1; + result = safe_write(connection, &error_code, sizeof(int)); + if (result == 0) { + *data_size = result_size; + error_code = -2; + } + goto fin; + } + + rec_error_code = 0; + result = safe_write(connection, &rec_error_code, sizeof(int)); + if (result != 0) + goto fin; + result = safe_read(connection, data, result_size); if (result != 0) goto fin; @@ -563,10 +572,19 @@ goto fin; if (result_size > *data_size) { - *data_size = result_size; - error_code = -2; + error_code = -1; + result = safe_write(rs, &error_code, sizeof(int)); + if (result == 0) { + *data_size = result_size; + error_code = -2; + } goto fin; } + + rec_error_code = 0; + result = safe_write(rs, &rec_error_code, sizeof(int)); + if (result != 0) + goto fin; result = safe_read(rs, data, result_size); if (result != 0) ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.c#7 (text) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#9 (text) ==== @@ -428,7 +428,7 @@ (qstate->kevent_watermark <= event_data->data)) || ((qstate->use_alternate_io != 0) && (qstate->io_buffer_watermark <= event_data->data))) { - if (qstate->use_alternate_io != 0) { + if (qstate->use_alternate_io == 1) { switch (qstate->io_buffer_filter) { case EVFILT_READ: io_res = query_socket_read(qstate, @@ -453,10 +453,10 @@ } } - if (qstate->use_alternate_io == 0) { - do { + if ((qstate->use_alternate_io == 0) || (qstate->use_alternate_io == 2)) { + do res = qstate->process_func(qstate); - } while ((qstate->kevent_watermark == 0) && + while ((qstate->kevent_watermark == 0) && (qstate->process_func != NULL) && (res == 0)); @@ -464,7 +464,7 @@ qstate->process_func = NULL; } - if ((qstate->use_alternate_io != 0) && + if ((qstate->use_alternate_io == 1) && (qstate->io_buffer_filter == EVFILT_WRITE)) { io_res = query_socket_write(qstate, qstate->io_buffer_p, qstate->io_buffer_watermark); @@ -481,7 +481,7 @@ } if (((qstate->process_func == NULL) && - (qstate->use_alternate_io == 0)) || + ((qstate->use_alternate_io == 0) || (qstate->use_alternate_io == 2))) || (eof_res != 0) || (res != 0)) { destroy_query_state(qstate); close(event_data->ident); @@ -499,7 +499,7 @@ query_timeout.tv_sec = qstate->timeout.tv_sec - query_timeout.tv_sec; - if ((qstate->use_alternate_io != 0) && (qstate->io_buffer_p == + if ((qstate->use_alternate_io == 1) && (qstate->io_buffer_p == qstate->io_buffer + qstate->io_buffer_size)) qstate->use_alternate_io = 0; @@ -534,6 +534,8 @@ if (qstate->kevent_filter == EVFILT_READ) qstate->use_alternate_io = 1; + else + qstate->use_alternate_io = 2; qstate->io_buffer_watermark = MAX_SOCKET_IO_SIZE; EV_SET(&eventlist[1], event_data->ident, ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachedcli.c#5 (text) ==== @@ -44,21 +44,27 @@ #include "cachedcli.h" #include "protocol.h" -#define DEFAULT_CACHED_IO_TIMEOUT 4 +#define DEFAULT_CACHED_IO_TIMEOUT 60 static int safe_write(struct cached_connection_ *, const void *, size_t); static int safe_read(struct cached_connection_ *, void *, size_t); static int send_credentials(struct cached_connection_ *, int); +/* + * safe_write writes data to the specified connection and tries to do it in + * the very safe manner. We ensure, that we can write to the socket with + * kevent. If the data_size can't be sent in one piece, then it would be + * splitted. + */ static int safe_write(struct cached_connection_ *connection, const void *data, - size_t data_size) + size_t data_size) { struct kevent eventlist; - int nevents; + int nevents; size_t result; ssize_t s_result; - struct timespec timeout; + struct timespec timeout; if (data_size == 0) return (0); @@ -68,11 +74,11 @@ result = 0; do { nevents = kevent(connection->write_queue, NULL, 0, &eventlist, - 1, &timeout); + 1, &timeout); if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) { s_result = write(connection->sockfd, data + result, - eventlist.data < data_size - result ? - eventlist.data : data_size - result); + eventlist.data < data_size - result ? + eventlist.data : data_size - result); if (s_result == -1) return (-1); else @@ -87,6 +93,12 @@ return (0); } +/* + * safe_read reads data from connection and tries to do it in the very safe + * and stable way. It uses kevent to ensure, that the data are availabe for + * reading. If the amount of data to be read is too large, then they would + * be splitted. + */ static int safe_read(struct cached_connection_ *connection, void *data, size_t data_size) { @@ -103,19 +115,19 @@ timeout.tv_nsec = 0; result = 0; do { - nevents = kevent(connection->read_queue, NULL, 0, &eventlist, 1, - &timeout); - if ((nevents == 1) && (eventlist.filter == EVFILT_READ)) { + nevents = kevent(connection->read_queue, NULL, 0, &eventlist, + 1, &timeout); + if (nevents == 1 && eventlist.filter == EVFILT_READ) { s_result = read(connection->sockfd, data + result, - eventlist.data <= data_size - result ? eventlist.data : - data_size - result); + eventlist.data <= data_size - result ? + eventlist.data : data_size - result); if (s_result == -1) return (-1); else result += s_result; if (eventlist.flags & EV_EOF) - return (result < data_size ? -1 : 0); + return (result < data_size ? -1 : 0); } else return (-1); } while (result < data_size); @@ -123,6 +135,10 @@ return (0); } +/* + * Sends the credentials information to the connection along with the + * communication element type. + */ static int send_credentials(struct cached_connection_ *connection, int type) { @@ -131,79 +147,77 @@ ssize_t result; int res; - struct msghdr cred_hdr; - struct iovec iov; + struct msghdr cred_hdr; + struct iovec iov; struct { - struct cmsghdr hdr; - struct cmsgcred creds; + struct cmsghdr hdr; + char cred[CMSG_SPACE(sizeof(struct cmsgcred))]; } cmsg; - TRACE_IN(send_credentials); memset(&cmsg, 0, sizeof(cmsg)); - cmsg.hdr.cmsg_len = sizeof(cmsg); + cmsg.hdr.cmsg_len = CMSG_LEN(sizeof(struct cmsgcred)); cmsg.hdr.cmsg_level = SOL_SOCKET; cmsg.hdr.cmsg_type = SCM_CREDS; memset(&cred_hdr, 0, sizeof(struct msghdr)); cred_hdr.msg_iov = &iov; cred_hdr.msg_iovlen = 1; - cred_hdr.msg_control = &cmsg; - cred_hdr.msg_controllen = sizeof(cmsg); + cred_hdr.msg_control = (caddr_t)&cmsg; + cred_hdr.msg_controllen = CMSG_SPACE(sizeof(struct cmsgcred)); iov.iov_base = &type; iov.iov_len = sizeof(int); EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD, - NOTE_LOWAT, sizeof(int), NULL); + NOTE_LOWAT, sizeof(int), NULL); res = kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); - nevents = kevent(connection->write_queue, NULL, 0, &eventlist, 1, NULL); - if ((nevents == 1) && (eventlist.filter == EVFILT_WRITE)) { - result = (sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ? -1 - : 0; + nevents = kevent(connection->write_queue, NULL, 0, &eventlist, 1, + NULL); + if (nevents == 1 && eventlist.filter == EVFILT_WRITE) { + result = (sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ? + -1 : 0; EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD, - 0, 0, NULL); + 0, 0, NULL); kevent(connection->write_queue, &eventlist, 1, NULL, 0, NULL); - TRACE_OUT(send_credentials); return (result); - } else { - TRACE_OUT(send_credentials); + } else return (-1); - } } +/* + * Opens the connection with the specified params. Initializes all kqueues. + */ struct cached_connection_ * open_cached_connection__(struct cached_connection_params const *params) { struct cached_connection_ *retval; struct kevent eventlist; - struct sockaddr_un client_address; + struct sockaddr_un client_address; int client_address_len, client_socket; int res; - TRACE_IN(open_cached_connection); assert(params != NULL); client_socket = socket(PF_LOCAL, SOCK_STREAM, 0); client_address.sun_family = PF_LOCAL; strncpy(client_address.sun_path, params->socket_path, - sizeof(client_address.sun_path)); + sizeof(client_address.sun_path)); client_address_len = sizeof(client_address.sun_family) + - strlen(client_address.sun_path) + 1; + strlen(client_address.sun_path) + 1; res = connect(client_socket, (struct sockaddr *)&client_address, - client_address_len); + client_address_len); if (res == -1) { close(client_socket); - TRACE_OUT(open_cached_connection); return (NULL); } fcntl(client_socket, F_SETFL, O_NONBLOCK); retval = malloc(sizeof(struct cached_connection_)); if (retval == NULL) { - TRACE_OUT(open_cached_connection); + close(client_socket); return (NULL); } memset(retval, 0, sizeof(struct cached_connection_)); @@ -212,45 +226,38 @@ retval->write_queue = kqueue(); if (retval->write_queue == -1) { - close(retval->sockfd); - free(retval); - TRACE_OUT(open_cached_connection); + close(client_socket); + free(retval); return (NULL); } - EV_SET(&eventlist, retval->sockfd, EVFILT_WRITE, EV_ADD, - 0, 0, NULL); + EV_SET(&eventlist, retval->sockfd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); res = kevent(retval->write_queue, &eventlist, 1, NULL, 0, NULL); retval->read_queue = kqueue(); - if (retval->read_queue != -1) { + if (retval->read_queue == -1) { + close(client_socket); close(retval->write_queue); - close(retval->sockfd); - free(retval); - TRACE_OUT(open_cached_connection); + free(retval); return (NULL); } - EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD, - 0, 0, NULL); + EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD, 0, 0, NULL); res = kevent(retval->read_queue, &eventlist, 1, NULL, 0, NULL); - TRACE_OUT(open_cached_connection); return (retval); } void close_cached_connection__(struct cached_connection_ *connection) { - - TRACE_IN(close_cached_connection); + assert(connection != NULL); close(connection->sockfd); close(connection->read_queue); close(connection->write_queue); free(connection); - TRACE_OUT(close_cached_connection); } int ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.c#6 (text) ==== @@ -322,6 +322,12 @@ } else { mp_entry = (struct cache_mp_entry_ *)entry; + /* + * NOTE: currently multipart entries are cleared only if + * there are no opened read sessions. It leads to possible + * failues of cache clearing requests. Possibly, some simple + * reference counting should be used to avoid this + */ if (mp_entry->rs_size == 0) { if (mp_entry->completed_write_session != NULL) { destroy_cache_mp_write_session( @@ -1168,6 +1174,9 @@ * Returns 0 on success, -1 on error (when there are no more data), and -2 if * the data_size is too small. In the last case, data_size would be filled * the proper value. + * + * NOTE: cache_mp_read() doesn't move read pointer to the next element of the + * session - this is done by cache_mp_read_next() */ int cache_mp_read(struct cache_mp_read_session_ *rs, char *data, size_t *data_size) @@ -1194,12 +1203,22 @@ *data_size = rs->current_item->value_size; memcpy(data, rs->current_item->value, rs->current_item->value_size); - rs->current_item = TAILQ_NEXT(rs->current_item, entries); TRACE_OUT(cache_mp_read); return (0); } +void +cache_mp_read_next(struct cache_mp_read_session_ *rs) +{ + + TRACE_IN(cache_mp_read_next); + assert(rs != NULL); + assert(rs->current_item != NULL); + rs->current_item = TAILQ_NEXT(rs->current_item, entries); + TRACE_OUT(cache_mp_read_next); +} + /* * Closes the read session. If there are no more read sessions and there is * a pending write session, it will be committed and old ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cachelib.h#4 (text) ==== @@ -271,6 +271,7 @@ extern cache_mp_read_session open_cache_mp_read_session(cache_entry); extern int cache_mp_read(cache_mp_read_session, char *, size_t *); +extern void cache_mp_read_next(cache_mp_read_session); extern void close_cache_mp_read_session(cache_mp_read_session); /* transformation routines */ ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#6 (text) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#6 (text) ==== @@ -39,8 +39,8 @@ #define DEFAULT_QUERY_TIMEOUT 8 #define DEFAULT_THREADS_NUM 8 -#define DEFAULT_COMMON_ENTRY_TIMEOUT 10 -#define DEFAULT_MP_ENTRY_TIMEOUT 60 +#define DEFAULT_COMMON_ENTRY_TIMEOUT 60 +#define DEFAULT_MP_ENTRY_TIMEOUT 120 #define DEFAULT_CACHE_HT_SIZE 257 #define INITIAL_ENTRIES_CAPACITY 8 ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/debug.h#6 (text) ==== @@ -32,7 +32,7 @@ #define TRACE_WANTED 32 /* #ifndef NDEBUG */ -#if 0 +#if 1 #define TRACE_IN(x) __trace_in(#x, __FILE__, __LINE__) #define TRACE_POINT() __trace_point(__FILE__, __LINE__) #define TRACE_MSG(x) __trace_msg(x, __FILE__, __LINE__) ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/log.h#5 (text) ==== @@ -31,7 +31,7 @@ #define LOG_MSG_1(sender, msg, ...) __log_msg(1, sender, msg, ##__VA_ARGS__) #define LOG_MSG_2(sender, msg, ...) __log_msg(2, sender, msg, ##__VA_ARGS__) -#define LOG_MSG_3(sender, msg, ...) __log_msg(3, sedner, msg, ##__VA_ARGS__) +#define LOG_MSG_3(sender, msg, ...) __log_msg(3, sender, msg, ##__VA_ARGS__) #define LOG_ERR_1(sender, err, ...) __log_err(1, sender, err, ##__VA_ARGS__) #define LOG_ERR_2(sender, err, ...) __log_err(2, sender, err, ##__VA_ARGS__) ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_rs_query.c#7 (text) ==== @@ -56,6 +56,8 @@ static int on_mp_read_session_response_write1(struct query_state *); static int on_mp_read_session_read_request_process(struct query_state *); static int on_mp_read_session_read_response_write1(struct query_state *); +static int on_mp_read_session_read_response_confirm_read1( + struct query_state *); static int on_mp_read_session_read_response_write2(struct query_state *); /* @@ -426,6 +428,16 @@ struct cache_mp_read_session_read_response *read_response; TRACE_IN(on_mp_read_session_response_process); + if (get_comm_element_type(&qstate->response) == + CET_MP_READ_SESSION_READ_RESPONSE) { + qstate->kevent_watermark = sizeof(size_t) + sizeof(int); + qstate->process_func = + on_mp_read_session_read_response_write1; + qstate->kevent_filter = EVFILT_WRITE; + TRACE_OUT(on_mp_read_session_response_process); + return (0); + } + init_comm_element(&qstate->response, CET_MP_READ_SESSION_READ_RESPONSE); read_response = get_cache_mp_read_session_read_response( &qstate->response); @@ -482,8 +494,10 @@ return (-1); } - qstate->kevent_watermark = read_response->data_size; - qstate->process_func = on_mp_read_session_read_response_write2; + qstate->kevent_watermark = sizeof(int); + qstate->process_func = + on_mp_read_session_read_response_confirm_read1; + qstate->kevent_filter = EVFILT_READ; } else { if (result != qstate->kevent_watermark) { LOG_ERR_3("on_mp_read_session_read_response_write1", @@ -501,6 +515,51 @@ } static int +on_mp_read_session_read_response_confirm_read1(struct query_state *qstate) +{ + struct cache_mp_read_session_read_response *read_response; + ssize_t result; + int confirmation; + + TRACE_IN(on_mp_read_session_read_response_confirm_read1); + result = qstate->read_func(qstate, &confirmation, sizeof(int)); + + if (result != sizeof(int)) { + LOG_ERR_3("on_mp_read_session_read_response_confirm_read1", + "read failed"); + TRACE_OUT(on_mp_read_session_read_response_confirm_read1); + return (-1); + } + + if (confirmation == 0) { + configuration_lock_entry(qstate->config_entry, CELT_MULTIPART); + cache_mp_read_next( + (cache_mp_read_session)qstate->mdata); + configuration_unlock_entry(qstate->config_entry, + CELT_MULTIPART); + + read_response = get_cache_mp_read_session_read_response( + &qstate->response); + + qstate->kevent_watermark = read_response->data_size; + qstate->process_func = on_mp_read_session_read_response_write2; + qstate->kevent_filter = EVFILT_WRITE; + } else { + finalize_comm_element(&qstate->request); + finalize_comm_element(&qstate->response); + + qstate->kevent_watermark = sizeof(int); + qstate->process_func = on_mp_read_session_mapper; + + LOG_MSG_3("on_mp_read_session_read_response_confirm_read1", + "other side can't read requested data"); + } + + TRACE_OUT(on_mp_read_session_read_response_confirm_read1); + return (0); +} + +static int on_mp_read_session_read_response_write2(struct query_state *qstate) { struct cache_mp_read_session_read_response *read_response; ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/protocol.c#4 (text) ==== @@ -100,6 +100,14 @@ TRACE_OUT(init_comm_element); } +enum comm_element_t +get_comm_element_type(struct comm_element *element) +{ + + assert(element != NULL); + return (element->type); +} + void finalize_comm_element(struct comm_element *element) { ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/protocol.h#4 (text) ==== @@ -174,6 +174,7 @@ }; extern void init_comm_element(struct comm_element *, enum comm_element_t type); +extern enum comm_element_t get_comm_element_type(struct comm_element *); extern void finalize_comm_element(struct comm_element *); /* ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#7 (text) ==== @@ -61,6 +61,7 @@ static int on_read_request_read2(struct query_state *); static int on_read_request_process(struct query_state *); static int on_read_response_write1(struct query_state *); +static int on_read_response_confirm_read1(struct query_state *); static int on_read_response_write2(struct query_state *); static int on_rw_mapper(struct query_state *); @@ -867,8 +868,9 @@ return (-1); } - qstate->kevent_watermark = read_response->data_size; - qstate->process_func = on_read_response_write2; + qstate->kevent_watermark = sizeof(int); + qstate->process_func = on_read_response_confirm_read1; + qstate->kevent_filter = EVFILT_READ; } else { if (result != qstate->kevent_watermark) { TRACE_OUT(on_read_response_write1); @@ -884,6 +886,44 @@ } static int +on_read_response_confirm_read1(struct query_state *qstate) +{ + struct cache_read_response *read_response; + ssize_t result; + int confirmation; + + TRACE_IN(on_read_response_confirm_read1); + result = qstate->read_func(qstate, &confirmation, sizeof(int)); + + if (result != sizeof(int)) { + LOG_ERR_3("on_read_response_confirm_read1", + "read failed"); + TRACE_OUT(on_read_response_confirm_read1); + return (-1); + } + + if (confirmation == 0) { + read_response = get_cache_read_response(&qstate->response); + + qstate->kevent_watermark = read_response->data_size; + qstate->process_func = on_read_response_write2; + qstate->kevent_filter = EVFILT_WRITE; + } else { + finalize_comm_element(&qstate->request); + finalize_comm_element(&qstate->response); + + qstate->kevent_watermark = sizeof(int); + qstate->process_func = on_rw_mapper; + + LOG_MSG_3("on_mp_read_session_read_response_confirm_read1", + "other side can't read requested data"); + } + + TRACE_OUT(on_read_response_confirm_read2); + return (0); +} + +static int on_read_response_write2(struct query_state *qstate) { struct cache_read_response *read_response; From owner-p4-projects@FreeBSD.ORG Tue Nov 14 16:14:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A391E16A4A0; Tue, 14 Nov 2006 16:14:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7910A16A494 for ; Tue, 14 Nov 2006 16:14:51 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6487244129 for ; Tue, 14 Nov 2006 16:04:47 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEG4Twu072037 for ; Tue, 14 Nov 2006 16:04:29 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEG4SAF072031 for perforce@freebsd.org; Tue, 14 Nov 2006 16:04:28 GMT (envelope-from bushman@freebsd.org) Date: Tue, 14 Nov 2006 16:04:28 GMT Message-Id: <200611141604.kAEG4SAF072031@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 109932 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 16:14:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=109932 Change 109932 by bushman@bushman_nss_ldap_cached on 2006/11/14 16:04:16 Using #defines instead of hard coded constants for use_alternate_io-stuff (large buffers processing). Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#10 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.h#4 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#10 (text) ==== @@ -424,18 +424,20 @@ * The code below implements buffer splitting/mergind for send/receive * operations. It also does the actual socket IO operations. */ - if (((qstate->use_alternate_io == 0) && + if (((qstate->use_alternate_io == DONT_USE_ALTERNATE_IO) && (qstate->kevent_watermark <= event_data->data)) || - ((qstate->use_alternate_io != 0) && + ((qstate->use_alternate_io != DONT_USE_ALTERNATE_IO) && (qstate->io_buffer_watermark <= event_data->data))) { - if (qstate->use_alternate_io == 1) { + if (qstate->use_alternate_io == + USE_ALTERNATE_IO_WITH_SOCK_RW) { switch (qstate->io_buffer_filter) { case EVFILT_READ: io_res = query_socket_read(qstate, qstate->io_buffer_p, qstate->io_buffer_watermark); if (io_res < 0) { - qstate->use_alternate_io = 0; + qstate->use_alternate_io = + DONT_USE_ALTERNATE_IO; qstate->process_func = NULL; } else { qstate->io_buffer_p += io_res; @@ -444,7 +446,8 @@ qstate->io_buffer_size) { qstate->io_buffer_p = qstate->io_buffer; - qstate->use_alternate_io = 0; + qstate->use_alternate_io = + DONT_USE_ALTERNATE_IO; } } break; @@ -453,7 +456,9 @@ } } - if ((qstate->use_alternate_io == 0) || (qstate->use_alternate_io == 2)) { + if ((qstate->use_alternate_io == DONT_USE_ALTERNATE_IO) || + (qstate->use_alternate_io == + USE_ALTERNATE_IO_WITHOUT_SOCK_RW)) { do res = qstate->process_func(qstate); while ((qstate->kevent_watermark == 0) && @@ -464,12 +469,14 @@ qstate->process_func = NULL; } - if ((qstate->use_alternate_io == 1) && - (qstate->io_buffer_filter == EVFILT_WRITE)) { + if ((qstate->use_alternate_io == + USE_ALTERNATE_IO_WITH_SOCK_RW) && + (qstate->io_buffer_filter == EVFILT_WRITE)) { io_res = query_socket_write(qstate, qstate->io_buffer_p, qstate->io_buffer_watermark); if (io_res < 0) { - qstate->use_alternate_io = 0; + qstate->use_alternate_io = + DONT_USE_ALTERNATE_IO; qstate->process_func = NULL; } else qstate->io_buffer_p += io_res; @@ -477,11 +484,12 @@ } else { /* assuming that socket was closed */ qstate->process_func = NULL; - qstate->use_alternate_io = 0; + qstate->use_alternate_io = DONT_USE_ALTERNATE_IO; } if (((qstate->process_func == NULL) && - ((qstate->use_alternate_io == 0) || (qstate->use_alternate_io == 2))) || + ((qstate->use_alternate_io == DONT_USE_ALTERNATE_IO) || + (qstate->use_alternate_io == USE_ALTERNATE_IO_WITHOUT_SOCK_RW))) || (eof_res != 0) || (res != 0)) { destroy_query_state(qstate); close(event_data->ident); @@ -499,11 +507,12 @@ query_timeout.tv_sec = qstate->timeout.tv_sec - query_timeout.tv_sec; - if ((qstate->use_alternate_io == 1) && (qstate->io_buffer_p == - qstate->io_buffer + qstate->io_buffer_size)) - qstate->use_alternate_io = 0; + if ((qstate->use_alternate_io == USE_ALTERNATE_IO_WITH_SOCK_RW) + && (qstate->io_buffer_p == + qstate->io_buffer + qstate->io_buffer_size)) + qstate->use_alternate_io = DONT_USE_ALTERNATE_IO; - if (qstate->use_alternate_io == 0) { + if (qstate->use_alternate_io == DONT_USE_ALTERNATE_IO) { /* * If we must send/receive the large block of data, * we should prepare the query_state's io_XXX fields. @@ -533,9 +542,11 @@ qstate->read_func = query_io_buffer_read; if (qstate->kevent_filter == EVFILT_READ) - qstate->use_alternate_io = 1; + qstate->use_alternate_io = + USE_ALTERNATE_IO_WITH_SOCK_RW; else - qstate->use_alternate_io = 2; + qstate->use_alternate_io = + USE_ALTERNATE_IO_WITHOUT_SOCK_RW; qstate->io_buffer_watermark = MAX_SOCKET_IO_SIZE; EV_SET(&eventlist[1], event_data->ident, ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#8 (text) ==== @@ -1226,7 +1226,7 @@ qstate->io_buffer_p += result; if (qstate->io_buffer_p == qstate->io_buffer + qstate->io_buffer_size) { - qstate->use_alternate_io = 1; + qstate->use_alternate_io = USE_ALTERNATE_IO_WITH_SOCK_RW; qstate->io_buffer_p = qstate->io_buffer; qstate->write_func = query_socket_write; ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.h#4 (text) ==== @@ -36,6 +36,10 @@ #include "config.h" #include "protocol.h" +#define DONT_USE_ALTERNATE_IO (0) +#define USE_ALTERNATE_IO_WITH_SOCK_RW (1) +#define USE_ALTERNATE_IO_WITHOUT_SOCK_RW (1 << 1) + struct query_state; struct configuration; struct configuration_entry; From owner-p4-projects@FreeBSD.ORG Tue Nov 14 16:20:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC25C16A412; Tue, 14 Nov 2006 16:20:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9135616A492 for ; Tue, 14 Nov 2006 16:20:31 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F20FC43F42 for ; Tue, 14 Nov 2006 16:10:38 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEGAcRe072580 for ; Tue, 14 Nov 2006 16:10:38 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEGAcWW072575 for perforce@freebsd.org; Tue, 14 Nov 2006 16:10:38 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 16:10:38 GMT Message-Id: <200611141610.kAEGAcWW072575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109934 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 16:20:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=109934 Change 109934 by millert@millert_g5tower on 2006/11/14 16:10:13 Add a pathlen parameter to the filesystem audit info. This lets us use the component path name in a more useful manner. At the same time, be mindful of whether the path refers to a directory or a file in the directory and adjust the length accordingly. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/avc.c#8 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/avc.h#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#31 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/avc.c#8 (text+ko) ==== @@ -708,6 +708,7 @@ if (a->u.fs.vp && tsk) { char *pbuf = NULL; char *path = a->u.fs.path; + int pathlen = a->u.fs.pathlen; struct vnode *vp = a->u.fs.vp; struct vnode_attr va; struct vfs_context vfs_ctx = @@ -719,22 +720,26 @@ "mountpoint=%s,", va.va_fileid, vp->v_mount->mnt_vfsstat.f_mntonname); if (path == NULL) { - int len = MAXPATHLEN; + pathlen = MAXPATHLEN; pbuf = sebsd_malloc(MAXPATHLEN, M_SEBSD, M_NOWAIT); if (pbuf != NULL && - !vn_getpath(vp, pbuf, &len)) + !vn_getpath(vp, pbuf, &pathlen)) { path = pbuf; + pathlen--; /* for NUL */ + } } - if (path != NULL) + if (path != NULL) { audit_log_format(ab, - " path=%s,", path); + " path=%.*s,", pathlen, + path); + } if (pbuf != NULL) sebsd_free(pbuf, M_SEBSD); - break; + } else { + audit_log_format(ab, + " fs/inode info not available"); } - audit_log_format(ab, - " fs/inode info not available"); } break; case AVC_AUDIT_DATA_NET: ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/avc.h#6 (text+ko) ==== @@ -50,6 +50,7 @@ struct { struct vnode *vp; char *path; + int pathlen; } fs; struct { char *netif; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#31 (text+ko) ==== @@ -440,7 +440,8 @@ } static int -vnode_has_perm(struct ucred *cred, struct vnode *vp, char *path, u_int32_t perm) +vnode_has_perm(struct ucred *cred, struct vnode *vp, struct componentname *cnp, + u_int32_t perm) { struct task_security_struct *task; struct vnode_security_struct *file; @@ -451,7 +452,12 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; - ad.u.fs.path = path; + if (cnp != NULL) { + ad.u.fs.path = cnp->cn_pnbuf; + ad.u.fs.pathlen = cnp->cn_nameptr - cnp->cn_pnbuf - 1; + if ((perm & DIR__SEARCH) == 0) + ad.u.fs.pathlen += 1 + cnp->cn_namelen; + } /* Update security class if not set or vnode was recycled. */ if (file->sclass == 0 || vp->v_type == VBAD) @@ -1997,6 +2003,7 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = dvp; ad.u.fs.path = cnp->cn_pnbuf; + ad.u.fs.pathlen = cnp->cn_nameptr - cnp->cn_pnbuf - 1; rc = avc_has_perm(task->sid, dir->sid, SECCLASS_DIR, DIR__ADD_NAME | DIR__SEARCH, &ad); @@ -2007,6 +2014,7 @@ if (rc) return (rc); + ad.u.fs.pathlen += 1 + cnp->cn_namelen; rc = avc_has_perm(task->sid, newsid, tclass, FILE__CREATE, &ad); if (rc) return (rc); @@ -2026,11 +2034,9 @@ #endif rc = avc_has_perm(newsid, sbsec->sid, SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, &ad); - if (rc) - return (rc); } - return (0); + return (rc); } static int @@ -2054,6 +2060,7 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; ad.u.fs.path = cnp->cn_pnbuf; + ad.u.fs.pathlen = cnp->cn_nameptr - cnp->cn_pnbuf - 1; rc = avc_has_perm(task->sid, dir->sid, SECCLASS_DIR, DIR__SEARCH | DIR__REMOVE_NAME, &ad); @@ -2065,6 +2072,7 @@ else av = FILE__UNLINK; + ad.u.fs.pathlen += 1 + cnp->cn_namelen; rc = avc_has_perm(task->sid, file->sid, file->sclass, av, &ad); return (rc); @@ -2212,16 +2220,18 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; ad.u.fs.path = cnp->cn_pnbuf; + ad.u.fs.pathlen = cnp->cn_nameptr - cnp->cn_pnbuf - 1; rc = avc_has_perm(task->sid, dir->sid, SECCLASS_DIR, DIR__SEARCH | DIR__ADD_NAME, &ad); if (rc) return (rc); + ad.u.fs.pathlen += 1 + cnp->cn_namelen; rc = avc_has_perm(task->sid, file->sid, file->sclass, FILE__LINK, &ad); - return (0); + return (rc); } static int @@ -2232,7 +2242,7 @@ return (ENOTDIR); /* TBD: DIR__READ as well? */ - return (vnode_has_perm(cred, dvp, cnp->cn_pnbuf, DIR__SEARCH)); + return (vnode_has_perm(cred, dvp, cnp, DIR__SEARCH)); } static int @@ -2348,6 +2358,7 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; ad.u.fs.path = cnp->cn_pnbuf; + ad.u.fs.pathlen = cnp->cn_nameptr - cnp->cn_pnbuf - 1; rc = avc_has_perm(task->sid, old_dir->sid, SECCLASS_DIR, DIR__REMOVE_NAME | DIR__SEARCH, &ad); @@ -2359,8 +2370,9 @@ return (0); /* TBD: debugging */ } - rc = avc_has_perm(task->sid, old_file->sid, - old_file->sclass, FILE__RENAME, &ad); + ad.u.fs.pathlen += 1 + cnp->cn_namelen; + rc = avc_has_perm(task->sid, old_file->sid, old_file->sclass, + FILE__RENAME, &ad); if (rc) return (rc); @@ -2407,28 +2419,25 @@ AVC_AUDIT_DATA_INIT(&ad, FS); ad.u.fs.vp = vp; ad.u.fs.path = cnp->cn_pnbuf; + ad.u.fs.pathlen = cnp->cn_nameptr - cnp->cn_pnbuf - 1; - rc = avc_has_perm(task->sid, new_dir->sid, SECCLASS_DIR, av, NULL); - if (rc) - return (rc); - - if (vp) { + rc = avc_has_perm(task->sid, new_dir->sid, SECCLASS_DIR, av, &ad); + if (rc == 0 && vp != NULL) { if (new_file->sclass == 0) { printf("%s: ERROR, sid=%d, sclass=0, v_type=%d\n", __func__, new_file->sid, vp->v_type); return (0); /* TBD: debugging */ } + ad.u.fs.pathlen += 1 + cnp->cn_namelen; if (vp->v_type == VDIR) rc = avc_has_perm(task->sid, new_file->sid, new_file->sclass, DIR__RMDIR, NULL); else rc = avc_has_perm(task->sid, new_file->sid, new_file->sclass, FILE__UNLINK, NULL); - if (rc) - return (rc); } - return (0); + return (rc); } static int From owner-p4-projects@FreeBSD.ORG Tue Nov 14 16:21:04 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C335E16A62F; Tue, 14 Nov 2006 16:21:03 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B36316A622 for ; Tue, 14 Nov 2006 16:21:03 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7923243DC1 for ; Tue, 14 Nov 2006 16:11:53 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEGBeMe073257 for ; Tue, 14 Nov 2006 16:11:40 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEGBeoF073253 for perforce@freebsd.org; Tue, 14 Nov 2006 16:11:40 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 16:11:40 GMT Message-Id: <200611141611.kAEGBeoF073253@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109935 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 16:21:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=109935 Change 109935 by millert@millert_g5tower on 2006/11/14 16:11:20 In vfs_mountroot() failure of VFS_ROOT() and vnode_label() should result in filesystem being unmounted. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_subr.c#7 (text+ko) ==== @@ -951,16 +951,24 @@ error = VFS_ROOT(mp, &vp, &context); if (error) { - printf("%s() VFS_ROOT returned %d\n", + printf("%s() VFS_ROOT() returned %d\n", __func__, error); - return (error); + dounmount(mp, MNT_FORCE, context.vc_proc); + goto fail; } /* VFS_ROOT provides reference so flags = 0 */ error = vnode_label(mp, NULL, vp, NULL, 0, &context); + if (error) { + printf("%s() vnode_label() returned %d\n", + __func__, error); + dounmount(mp, MNT_FORCE, context.vc_proc); + goto fail; + } #endif - return (error); + return (0); } +fail: vfs_rootmountfailed(mp); if (error != EINVAL) From owner-p4-projects@FreeBSD.ORG Tue Nov 14 16:58:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 566E616A47E; Tue, 14 Nov 2006 16:58:46 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1788F16A416 for ; Tue, 14 Nov 2006 16:58:46 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3F40B43D5E for ; Tue, 14 Nov 2006 16:58:44 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEGwikA088720 for ; Tue, 14 Nov 2006 16:58:44 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEGwiD6088717 for perforce@freebsd.org; Tue, 14 Nov 2006 16:58:44 GMT (envelope-from rdivacky@FreeBSD.org) Date: Tue, 14 Nov 2006 16:58:44 GMT Message-Id: <200611141658.kAEGwiD6088717@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 109942 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 16:58:46 -0000 http://perforce.freebsd.org/chv.cgi?CH=109942 Change 109942 by rdivacky@rdivacky_witten on 2006/11/14 16:58:37 __WCLONE is valid option to waitpid too. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#33 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#33 (text+ko) ==== @@ -803,7 +803,7 @@ * this is necessary because the test in kern_wait doesnt * work because we mess with the options here */ - if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED)) + if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED|__WCLONE)) return (EINVAL); options = (args->options & (WNOHANG | WUNTRACED)); From owner-p4-projects@FreeBSD.ORG Tue Nov 14 17:19:11 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C002416A412; Tue, 14 Nov 2006 17:19:11 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AC0E16A403 for ; Tue, 14 Nov 2006 17:19:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 46AFD43D53 for ; Tue, 14 Nov 2006 17:19:11 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEHJBm6093112 for ; Tue, 14 Nov 2006 17:19:11 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEHJAxh093109 for perforce@freebsd.org; Tue, 14 Nov 2006 17:19:10 GMT (envelope-from jhb@freebsd.org) Date: Tue, 14 Nov 2006 17:19:10 GMT Message-Id: <200611141719.kAEHJAxh093109@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 109943 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 17:19:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=109943 Change 109943 by jhb@jhb_mutex on 2006/11/14 17:18:19 IFC @109941. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/local_apic.c#25 integrate .. //depot/projects/smpng/sys/amd64/amd64/mptable_pci.c#5 integrate .. //depot/projects/smpng/sys/amd64/amd64/msi.c#1 branch .. //depot/projects/smpng/sys/amd64/amd64/nexus.c#20 integrate .. //depot/projects/smpng/sys/amd64/include/apicvar.h#14 integrate .. //depot/projects/smpng/sys/amd64/include/intr_machdep.h#10 integrate .. //depot/projects/smpng/sys/amd64/pci/pci_bus.c#17 integrate .. //depot/projects/smpng/sys/conf/files.amd64#49 integrate .. //depot/projects/smpng/sys/conf/files.i386#104 integrate .. //depot/projects/smpng/sys/conf/files.pc98#86 integrate .. //depot/projects/smpng/sys/dev/isp/isp.c#46 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.c#48 integrate .. //depot/projects/smpng/sys/dev/isp/isp_freebsd.h#34 integrate .. //depot/projects/smpng/sys/dev/isp/isp_library.c#6 integrate .. //depot/projects/smpng/sys/dev/isp/isp_library.h#3 integrate .. //depot/projects/smpng/sys/dev/isp/isp_pci.c#42 integrate .. //depot/projects/smpng/sys/dev/isp/isp_stds.h#2 integrate .. //depot/projects/smpng/sys/dev/isp/ispvar.h#33 integrate .. //depot/projects/smpng/sys/dev/mfi/mfi.c#12 integrate .. //depot/projects/smpng/sys/dev/mfi/mfi_ioctl.h#3 integrate .. //depot/projects/smpng/sys/dev/mfi/mfi_linux.c#2 integrate .. //depot/projects/smpng/sys/i386/i386/local_apic.c#46 integrate .. //depot/projects/smpng/sys/i386/i386/mptable_pci.c#5 integrate .. //depot/projects/smpng/sys/i386/i386/msi.c#1 branch .. //depot/projects/smpng/sys/i386/i386/nexus.c#21 integrate .. //depot/projects/smpng/sys/i386/include/apicvar.h#23 integrate .. //depot/projects/smpng/sys/i386/include/intr_machdep.h#12 integrate .. //depot/projects/smpng/sys/i386/pci/pci_bus.c#30 integrate .. //depot/projects/smpng/sys/kern/sched_4bsd.c#63 integrate .. //depot/projects/smpng/sys/sys/elf_common.h#9 integrate .. //depot/projects/smpng/sys/sys/lock_profile.h#2 integrate .. //depot/projects/smpng/sys/sys/mbuf.h#66 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/local_apic.c#25 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.32 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.33 2006/11/13 22:23:32 jhb Exp $"); #include "opt_hwpmc_hooks.h" @@ -744,6 +744,65 @@ panic("Couldn't find an APIC vector for IRQ %u", irq); } +/* + * Request 'count' free contiguous IDT vectors to be used by 'count' + * IRQs. 'count' must be a power of two and the vectors will be + * aligned on a boundary of 'align'. If the request cannot be + * satisfied, 0 is returned. + */ +u_int +apic_alloc_vectors(u_int *irqs, u_int count, u_int align) +{ + u_int first, run, vector; + + KASSERT(powerof2(count), ("bad count")); + KASSERT(powerof2(align), ("bad align")); + KASSERT(align >= count, ("align < count")); +#ifdef INVARIANTS + for (run = 0; run < count; run++) + KASSERT(irqs[run] < NUM_IO_INTS, ("Invalid IRQ %u at index %u", + irqs[run], run)); +#endif + + /* + * Search for 'count' free vectors. As with apic_alloc_vector(), + * this just uses a simple first fit algorithm. + */ + run = 0; + first = 0; + mtx_lock_spin(&icu_lock); + for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { + + /* Vector is in use, end run. */ + if (ioint_irqs[vector] != 0) { + run = 0; + first = 0; + continue; + } + + /* Start a new run if run == 0 and vector is aligned. */ + if (run == 0) { + if ((vector & (align - 1)) != 0) + continue; + first = vector; + } + run++; + + /* Keep looping if the run isn't long enough yet. */ + if (run < count) + continue; + + /* Found a run, assign IRQs and return the first vector. */ + for (vector = 0; vector < count; vector++) + ioint_irqs[first + vector] = irqs[vector]; + mtx_unlock_spin(&icu_lock); + return (first + APIC_IO_INTS); + } + mtx_unlock_spin(&icu_lock); + printf("APIC: Couldn't find APIC vectors for %u IRQs\n", count); + return (0); +} + void apic_enable_vector(u_int vector) { @@ -1002,6 +1061,9 @@ intr_register_pic(&lapic_pic); if (bootverbose) lapic_dump("BSP"); + + /* Enable the MSI "pic". */ + msi_init(); } SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_SECOND, apic_setup_io, NULL) ==== //depot/projects/smpng/sys/amd64/amd64/mptable_pci.c#5 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.4 2006/01/06 19:22:18 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.5 2006/11/13 22:23:32 jhb Exp $"); #include #include @@ -96,6 +96,10 @@ DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } }; @@ -148,6 +152,10 @@ DEVMETHOD(pcib_read_config, pcib_read_config), DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} }; ==== //depot/projects/smpng/sys/amd64/amd64/nexus.c#20 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.69 2006/09/11 19:31:51 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.70 2006/11/13 22:23:32 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -61,6 +61,8 @@ #include +#include "pcib_if.h" + #ifdef DEV_ISA #include #include @@ -100,6 +102,10 @@ static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); static void nexus_delete_resource(device_t, device_t, int, int); +static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); +static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); +static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq); +static int nexus_release_msix(device_t pcib, device_t dev, int irq); static device_method_t nexus_methods[] = { /* Device interface */ @@ -125,6 +131,12 @@ DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), + DEVMETHOD(pcib_release_msi, nexus_release_msi), + DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), + DEVMETHOD(pcib_release_msix, nexus_release_msix), + { 0, 0 } }; @@ -504,6 +516,47 @@ resource_list_delete(rl, type, rid); } +static int +nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +{ + int error, new; + + error = msix_alloc(dev, index, irq, &new); + if (new) + rman_manage_region(&irq_rman, *irq, *irq); + return (error); +} + +static int +nexus_release_msix(device_t pcib, device_t dev, int irq) +{ + + return (msix_release(irq)); +} + +static int +nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) +{ + int error, i, newirq, newcount; + + /* First alloc the messages. */ + error = msi_alloc(dev, count, maxcount, irqs, &newirq, &newcount); + + /* Always add any new IRQs to the rman, even on failure. */ + for (i = 0; i < newcount; i++) + rman_manage_region(&irq_rman, irqs[newirq + i], + irqs[newirq + i]); + + return (error); +} + +static int +nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ + + return (msi_release(irqs, count)); +} + #ifdef DEV_ISA /* * Placeholder which claims PnP 'devices' which describe system ==== //depot/projects/smpng/sys/amd64/include/apicvar.h#14 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.19 2006/10/10 23:23:11 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.20 2006/11/13 22:23:33 jhb Exp $ */ #ifndef _MACHINE_APICVAR_H_ @@ -175,6 +175,7 @@ IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); u_int apic_alloc_vector(u_int irq); +u_int apic_alloc_vectors(u_int *irqs, u_int count, u_int align); void apic_enable_vector(u_int vector); void apic_free_vector(u_int vector, u_int irq); u_int apic_idt_to_irq(u_int vector); ==== //depot/projects/smpng/sys/amd64/include/intr_machdep.h#10 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.11 2006/10/10 23:23:11 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.12 2006/11/13 22:23:33 jhb Exp $ */ #ifndef __MACHINE_INTR_MACHDEP_H__ @@ -43,11 +43,18 @@ * 191 and still be safe since only interrupt sources in actual use will * allocate IDT vectors. * - * For now we stick with 255 as ISA IRQs and PCI intline IRQs only allow - * for IRQs in the range 0 - 254. When MSI support is added this number - * will likely increase. + * The first 255 IRQs (0 - 254) are reserved for ISA IRQs and PCI intline IRQs. + * IRQ values beyond 256 are used by MSI. We leave 255 unused to avoid + * confusion since 255 is used in PCI to indicate an invalid IRQ. + */ +#define NUM_MSI_INTS 128 +#define FIRST_MSI_INT 256 +#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS) + +/* + * Default base address for MSI messages on x86 platforms. */ -#define NUM_IO_INTS 255 +#define MSI_INTEL_ADDR_BASE 0xfee00000 /* * - 1 ??? dummy counter. @@ -140,6 +147,12 @@ void intr_resume(void); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); +void msi_init(void); +int msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, + int *newcount); +int msi_release(int *irqs, int count); +int msix_alloc(device_t dev, int index, int *irq, int *new); +int msix_release(int irq); #endif /* !LOCORE */ #endif /* _KERNEL */ ==== //depot/projects/smpng/sys/amd64/pci/pci_bus.c#17 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.117 2006/03/13 23:58:40 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.118 2006/11/13 22:23:33 jhb Exp $"); #include "opt_cpu.h" @@ -322,6 +322,10 @@ DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, legacy_pcib_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } }; ==== //depot/projects/smpng/sys/conf/files.amd64#49 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.98 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.99 2006/11/13 22:23:33 jhb Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -114,6 +114,7 @@ amd64/amd64/mpboot.S optional smp amd64/amd64/mptable.c optional mptable amd64/amd64/mptable_pci.c optional mptable pci +amd64/amd64/msi.c optional pci amd64/amd64/nexus.c standard amd64/amd64/pmap.c standard amd64/amd64/prof_machdep.c optional profiling-routine ==== //depot/projects/smpng/sys/conf/files.i386#104 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.570 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.571 2006/11/13 22:23:33 jhb Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -294,6 +294,7 @@ i386/i386/mpboot.s optional smp i386/i386/mptable.c optional apic i386/i386/mptable_pci.c optional apic pci +i386/i386/msi.c optional apic pci i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard ==== //depot/projects/smpng/sys/conf/files.pc98#86 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801/PC-9821 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.349 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.350 2006/11/14 14:28:09 ru Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -176,6 +176,7 @@ i386/i386/mpboot.s optional smp i386/i386/mptable.c optional apic i386/i386/mptable_pci.c optional apic pci +i386/i386/msi.c optional apic pci i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard ==== //depot/projects/smpng/sys/dev/isp/isp.c#46 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.128 2006/11/02 03:21:30 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.129 2006/11/14 08:45:47 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ @@ -60,6 +60,9 @@ */ #define MBOX_DELAY_COUNT 1000000 / 100 +#define ISP_MARK_PORTDB(a, b) \ + isp_prt(isp, ISP_LOGSANCFG, "line %d: markportdb", __LINE__); \ + isp_mark_portdb(a, b) /* * Local static data @@ -109,7 +112,6 @@ static void isp_scsi_channel_init(ispsoftc_t *, int); static void isp_fibre_init(ispsoftc_t *); static void isp_fibre_init_2400(ispsoftc_t *); -static void isp_dump_portdb(ispsoftc_t *); static void isp_mark_portdb(ispsoftc_t *, int); static void isp_plogx_24xx(ispsoftc_t *, uint16_t, uint32_t, int *); static int isp_port_login(ispsoftc_t *, uint16_t, uint32_t); @@ -117,7 +119,7 @@ static int isp_getpdb(ispsoftc_t *, uint16_t, isp_pdb_t *, int); static uint64_t isp_get_portname(ispsoftc_t *, int, int); static int isp_fclink_test(ispsoftc_t *, int); -static const char *isp2100_fw_statename(int); +static const char *ispfc_fw_statename(int); static int isp_pdb_sync(ispsoftc_t *); static int isp_scan_loop(ispsoftc_t *); static int isp_gid_ft_sns(ispsoftc_t *); @@ -1173,7 +1175,7 @@ /* * Do this *before* initializing the firmware. */ - isp_mark_portdb(isp, 0); + ISP_MARK_PORTDB(isp, 0); FCPARAM(isp)->isp_fwstate = FW_CONFIG_WAIT; FCPARAM(isp)->isp_loopstate = LOOP_NIL; @@ -2047,53 +2049,6 @@ isp->isp_state = ISP_INITSTATE; } -/* - * Fibre Channel Support- get the port database for the id. - */ -static void -isp_dump_portdb(ispsoftc_t *isp) -{ - fcparam *fcp = (fcparam *) isp->isp_param; - int i; - - for (i = 0; i < MAX_FC_TARG; i++) { - char mb[4]; - const char *dbs[8] = { - "NIL ", - "PROB", - "DEAD", - "CHGD", - "NEW ", - "PVLD", - "????", - "VLD " - }; - const char *roles[4] = { - " UNK", " TGT", " INI", "TINI" - }; - fcportdb_t *lp = &fcp->portdb[i]; - - if (lp->state == FC_PORTDB_STATE_NIL) { - continue; - } - if (lp->ini_map_idx) { - SNPRINTF(mb, sizeof (mb), "%3d", - ((int) lp->ini_map_idx) - 1); - } else { - SNPRINTF(mb, sizeof (mb), "---"); - } - isp_prt(isp, ISP_LOGALL, "%d: %s al%d tgt %s %s 0x%06x =>%s" - " 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, - dbs[lp->state], lp->autologin, mb, - roles[lp->roles], lp->portid, - roles[lp->new_roles], lp->new_portid, - (uint32_t) (lp->node_wwn >> 32), - (uint32_t) (lp->node_wwn), - (uint32_t) (lp->port_wwn >> 32), - (uint32_t) (lp->port_wwn)); - } -} - static void isp_mark_portdb(ispsoftc_t *isp, int onprobation) { @@ -2101,7 +2056,6 @@ int i; for (i = 0; i < MAX_FC_TARG; i++) { - fcp->isp_ini_map[i] = 0; if (onprobation == 0) { MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); } else { @@ -2113,6 +2067,8 @@ fcp->portdb[i].state = FC_PORTDB_STATE_PROBATIONAL; break; + case FC_PORTDB_STATE_ZOMBIE: + break; case FC_PORTDB_STATE_NIL: default: MEMZERO(&fcp->portdb[i], sizeof (fcportdb_t)); @@ -2167,6 +2123,7 @@ mbs.param[6] = DMA_WD3(FCPARAM(isp)->isp_scdma); mbs.param[7] = DMA_WD2(FCPARAM(isp)->isp_scdma); mbs.logval = MBLOGALL; + mbs.timeout = 250000; MEMORYBARRIER(isp, SYNC_SFORDEV, 0, QENTRY_LEN); isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { @@ -2276,6 +2233,7 @@ mbs.param[3] = portid; mbs.logval = MBLOGNONE; + mbs.timeout = 250000; isp_mboxcmd(isp, &mbs); switch (mbs.param[0]) { @@ -2463,8 +2421,8 @@ fcp = isp->isp_param; - isp_prt(isp, ISP_LOGDEBUG0, "FC Link Test Entry"); - isp_mark_portdb(isp, 1); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Link Test Entry"); + ISP_MARK_PORTDB(isp, 1); /* * Wait up to N microseconds for F/W to go to a ready state. @@ -2479,9 +2437,10 @@ GET_NANOTIME(&hra); isp_fw_state(isp); if (lwfs != fcp->isp_fwstate) { - isp_prt(isp, ISP_LOGINFO, "Firmware State <%s->%s>", - isp2100_fw_statename((int)lwfs), - isp2100_fw_statename((int)fcp->isp_fwstate)); + isp_prt(isp, ISP_LOGCONFIG|ISP_LOGSANCFG, + "Firmware State <%s->%s>", + ispfc_fw_statename((int)lwfs), + ispfc_fw_statename((int)fcp->isp_fwstate)); lwfs = fcp->isp_fwstate; } if (fcp->isp_fwstate == FW_READY) { @@ -2533,7 +2492,7 @@ * If we haven't gone to 'ready' state, return. */ if (fcp->isp_fwstate != FW_READY) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG, "isp_fclink_test: not at FW_READY state"); return (-1); } @@ -2645,19 +2604,19 @@ /* * Announce ourselves, too. */ - isp_prt(isp, ISP_LOGCONFIG, topology, fcp->isp_portid, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGCONFIG, topology, fcp->isp_portid, fcp->isp_loopid, toponames[fcp->isp_topo]); - isp_prt(isp, ISP_LOGCONFIG, ourwwn, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGCONFIG, ourwwn, (uint32_t) (ISP_NODEWWN(isp) >> 32), (uint32_t) ISP_NODEWWN(isp), (uint32_t) (ISP_PORTWWN(isp) >> 32), (uint32_t) ISP_PORTWWN(isp)); - isp_prt(isp, ISP_LOGDEBUG0, "FC Link Test Complete"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Link Test Complete"); return (0); } static const char * -isp2100_fw_statename(int state) +ispfc_fw_statename(int state) { switch(state) { case FW_CONFIG_WAIT: return "Config Wait"; @@ -2736,6 +2695,8 @@ } } + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Synchronizing PDBs"); + fcp->isp_loopstate = LOOP_SYNCING_PDB; for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { @@ -2757,12 +2718,11 @@ switch (lp->state) { case FC_PORTDB_STATE_PROBATIONAL: case FC_PORTDB_STATE_DEAD: + /* + * It's up to the outer layers to clear isp_ini_map. + */ + lp->state = FC_PORTDB_STATE_NIL; isp_async(isp, ISPASYNC_DEV_GONE, lp); - if (lp->ini_map_idx) { - fcp->isp_ini_map[lp->ini_map_idx-1] = 0; - lp->ini_map_idx = 0; - } - lp->state = FC_PORTDB_STATE_NIL; if (lp->autologin == 0) { if (IS_24XX(isp)) { int action = @@ -2782,68 +2742,57 @@ } lp->new_roles = 0; lp->new_portid = 0; + /* + * Note that we might come out of this with our state + * set to FC_PORTDB_STATE_ZOMBIE. + */ break; case FC_PORTDB_STATE_NEW: /* - * If *we* have a new target dole and *it* has a target - * role, assign a new target id to it. + * It's up to the outer layers to assign a virtual + * target id in isp_ini_map (if any). */ lp->portid = lp->new_portid; lp->roles = lp->new_roles; lp->state = FC_PORTDB_STATE_VALID; - if ((isp->isp_role & ISP_ROLE_INITIATOR) && - (lp->roles & (SVC3_TGT_ROLE >> SVC3_ROLE_SHIFT))) { - int i, t = dbidx; - for (i = 0; i < MAX_FC_TARG; i++) { - if (i < FL_ID || i > SNS_ID) { - if (fcp->isp_ini_map[t] == 0) { - break; - } - } - if (++t == MAX_FC_TARG) { - t = 0; - } - } - if (i < MAX_FC_TARG) { - fcp->isp_ini_map[t] = dbidx + 1; - lp->ini_map_idx = t + 1; - } else { - isp_prt(isp, ISP_LOGWARN, - "out of target ids"); - } - } isp_async(isp, ISPASYNC_DEV_ARRIVED, lp); lp->new_roles = 0; lp->new_portid = 0; + lp->reserved = 0; + lp->new_reserved = 0; break; case FC_PORTDB_STATE_CHANGED: - lp->portid = lp->new_portid; - lp->roles = lp->new_roles; +/* + * XXXX FIX THIS + */ lp->state = FC_PORTDB_STATE_VALID; - if (lp->ini_map_idx) { - int t = lp->ini_map_idx - 1; - fcp->isp_ini_map[t] = dbidx + 1; - } isp_async(isp, ISPASYNC_DEV_CHANGED, lp); lp->new_roles = 0; lp->new_portid = 0; + lp->reserved = 0; + lp->new_reserved = 0; break; case FC_PORTDB_STATE_PENDING_VALID: lp->portid = lp->new_portid; lp->roles = lp->new_roles; - lp->state = FC_PORTDB_STATE_VALID; if (lp->ini_map_idx) { int t = lp->ini_map_idx - 1; fcp->isp_ini_map[t] = dbidx + 1; } + lp->state = FC_PORTDB_STATE_VALID; isp_async(isp, ISPASYNC_DEV_STAYED, lp); if (dbidx != FL_ID) { lp->new_roles = 0; lp->new_portid = 0; } + lp->reserved = 0; + lp->new_reserved = 0; + break; + case FC_PORTDB_STATE_ZOMBIE: break; default: - isp_prt(isp, ISP_LOGERR, "eh? state %d for idx %d", + isp_prt(isp, ISP_LOGWARN, + "isp_scan_loop: state %d for idx %d", lp->state, dbidx); isp_dump_portdb(isp); } @@ -2869,7 +2818,7 @@ fcparam *fcp = isp->isp_param; int i; isp_pdb_t pdb; - uint16_t dbidx, lim = 0; + uint16_t handle, lim = 0; if (fcp->isp_fwstate < FW_READY || fcp->isp_loopstate < LOOP_PDB_RCVD) { @@ -2906,17 +2855,18 @@ } fcp->isp_loopstate = LOOP_SCANNING_LOOP; - isp_prt(isp, ISP_LOGDEBUG0, "scanning loop 0..%d", lim-1); + + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC scan loop 0..%d", lim-1); /* * Run through the list and get the port database info for each one. */ - for (dbidx = 0; dbidx < lim; dbidx++) { + for (handle = 0; handle < lim; handle++) { /* * But don't even try for ourselves... */ - if (dbidx == fcp->isp_loopid) { + if (handle == fcp->isp_loopid) { continue; } @@ -2925,7 +2875,7 @@ * known to hang. This trick gets around that problem. */ if (IS_2100(isp) || IS_2200(isp)) { - uint64_t node_wwn = isp_get_portname(isp, dbidx, 1); + uint64_t node_wwn = isp_get_portname(isp, handle, 1); if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { return (-1); } @@ -2937,29 +2887,29 @@ /* * Get the port database entity for this index. */ - if (isp_getpdb(isp, dbidx, &pdb, 1) != 0) { + if (isp_getpdb(isp, handle, &pdb, 1) != 0) { if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } continue; } if (fcp->isp_loopstate < LOOP_SCANNING_LOOP) { - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } /* * On *very* old 2100 firmware we would end up sometimes * with the firmware returning the port database entry - * for something else. We used to restart locally, but - * now we punt. + * for something else. We used to restart this, but + * now we just punt. */ - if (IS_2100(isp) && pdb.handle != dbidx) { + if (IS_2100(isp) && pdb.handle != handle) { isp_prt(isp, ISP_LOGWARN, "giving up on synchronizing the port database"); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } @@ -2978,8 +2928,7 @@ * which shift on a loop. */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - isp_prt(isp, ISP_LOGWARN, - "bad pdb entry at loop %d", dbidx); + isp_prt(isp, ISP_LOGWARN, "bad pdb @ loop %d", handle); isp_dump_portdb(isp); continue; } @@ -3002,22 +2951,27 @@ /* * Okay- we've found a non-nil entry that matches. - * Check to make sure it's probational. + * Check to make sure it's probational or a zombie. */ - if (lp->state != FC_PORTDB_STATE_PROBATIONAL) { + if (lp->state != FC_PORTDB_STATE_PROBATIONAL && + lp->state != FC_PORTDB_STATE_ZOMBIE) { isp_prt(isp, ISP_LOGERR, - "portdb entry %d not probational (0x%x)", + "[%d] not probational/zombie (0x%x)", i, lp->state); isp_dump_portdb(isp); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } + /* + * Mark the device as something the f/w logs into + * automatically. + */ lp->autologin = 1; + /* - * Check to make sure it's really the same - * device and update the initiator map before - * we mark it as pending valid. + * Check to make see if really still the same + * device. If it is, we mark it pending valid. */ if (lp->portid == tmp.portid && lp->handle == tmp.handle && @@ -3025,12 +2979,15 @@ lp->new_portid = tmp.portid; lp->new_roles = tmp.roles; lp->state = FC_PORTDB_STATE_PENDING_VALID; + isp_prt(isp, ISP_LOGSANCFG, + "Loop Port 0x%06x@0x%x Pending Valid", + tmp.portid, tmp.handle); break; } /* - * We can wipe out the old handle value here because - * it's no longer valid. + * We can wipe out the old handle value + * here because it's no longer valid. */ lp->handle = tmp.handle; @@ -3038,6 +2995,9 @@ * Claim that this has changed and let somebody else * decide what to do. */ + isp_prt(isp, ISP_LOGSANCFG, + "Loop Port 0x%06x@0x%x changed", + tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; lp->new_roles = tmp.roles; @@ -3061,23 +3021,23 @@ } } if (i == MAX_FC_TARG) { - isp_prt(isp, ISP_LOGERR, - "could not find slot for new entry"); + isp_prt(isp, ISP_LOGERR, "out of portdb entries"); continue; } lp = &fcp->portdb[i]; + MEMZERO(lp, sizeof (fcportdb_t)); lp->autologin = 1; lp->state = FC_PORTDB_STATE_NEW; - lp->portid = 0; - lp->roles = 0; lp->new_portid = tmp.portid; lp->new_roles = tmp.roles; lp->handle = tmp.handle; lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; + isp_prt(isp, ISP_LOGSANCFG, + "Loop Port 0x%06x@0x%x is New Entry", + tmp.portid, tmp.handle); } - fcp->isp_loopstate = LOOP_LSCAN_DONE; return (0); } @@ -3258,7 +3218,7 @@ int portidx, portlim, r; sns_gid_ft_rsp_t *rs0, *rs1; - isp_prt(isp, ISP_LOGDEBUG0, "FC Scan Fabric"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "FC Scan Fabric"); if (fcp->isp_fwstate != FW_READY || fcp->isp_loopstate < LOOP_LSCAN_DONE) { return (-1); @@ -3268,7 +3228,8 @@ } if (fcp->isp_topo != TOPO_FL_PORT && fcp->isp_topo != TOPO_F_PORT) { fcp->isp_loopstate = LOOP_FSCAN_DONE; - isp_prt(isp, ISP_LOGDEBUG0, "FC Scan Fabric Done (no fabric)"); + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "FC Scan Fabric Done (no fabric)"); return (0); } @@ -3303,7 +3264,7 @@ int level; if (rs1->snscb_cthdr.ct_reason == 9 && rs1->snscb_cthdr.ct_explanation == 7) { - level = ISP_LOGDEBUG0; + level = ISP_LOGSANCFG|ISP_LOGDEBUG0; } else { level = ISP_LOGWARN; } @@ -3348,8 +3309,8 @@ "fabric too big for scratch area: increase ISP2100_SCRLEN"); } portlim = portidx + 1; - isp_prt(isp, ISP_LOGDEBUG0, "got %d ports back from name server", - portlim); + isp_prt(isp, ISP_LOGSANCFG, + "got %d ports back from name server", portlim); for (portidx = 0; portidx < portlim; portidx++) { int npidx; @@ -3373,7 +3334,7 @@ rs1->snscb_ports[npidx].portid[0] = 0; rs1->snscb_ports[npidx].portid[1] = 0; rs1->snscb_ports[npidx].portid[2] = 0; - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "removing duplicate PortID 0x%x entry from list", portid); } @@ -3406,7 +3367,7 @@ ((rs1->snscb_ports[portidx].portid[2])); if (portid == 0) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG, "skipping null PortID at idx %d", portidx); continue; } @@ -3415,15 +3376,18 @@ * Skip ourselves... */ if (portid == fcp->isp_portid) { - isp_prt(isp, ISP_LOGDEBUG0, + isp_prt(isp, ISP_LOGSANCFG, "skip ourselves @ PortID 0x%06x", portid); continue; } - isp_prt(isp, ISP_LOGDEBUG0, "Fabric Port 0x%06x", portid); + isp_prt(isp, ISP_LOGSANCFG, + "Checking Fabric Port 0x%06x", portid); /* * We now search our Port Database for any - * probational entries with this PortID. + * probational entries with this PortID. We don't + * look for zombies here- only probational + * entries (we've already logged out of zombies). */ for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) { lp = &fcp->portdb[dbidx]; @@ -3464,12 +3428,15 @@ r = isp_getpdb(isp, lp->handle, &pdb, 0); if (fcp->isp_loopstate != LOOP_SCANNING_FABRIC) { FC_SCRATCH_RELEASE(isp); - isp_mark_portdb(isp, 1); + ISP_MARK_PORTDB(isp, 1); return (-1); } if (r != 0) { lp->new_portid = portid; lp->state = FC_PORTDB_STATE_DEAD; + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + "Fabric Port 0x%06x considered dead", + portid); continue; } @@ -3486,8 +3453,8 @@ pdb.portid != portid || wwpn != lp->port_wwn || wwnn != lp->node_wwn) { - isp_prt(isp, ISP_LOGDEBUG0, fconf, dbidx, - pdb.handle, pdb.portid, + isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, + fconf, dbidx, pdb.handle, pdb.portid, (uint32_t) (wwnn >> 32), (uint32_t) wwnn, (uint32_t) (wwpn >> 32), (uint32_t) wwpn, lp->handle, portid, >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:25:56 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E30E516A492; Tue, 14 Nov 2006 18:25:55 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A28D816A412 for ; Tue, 14 Nov 2006 18:25:55 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0366043D76 for ; Tue, 14 Nov 2006 18:25:39 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIPc8B006124 for ; Tue, 14 Nov 2006 18:25:38 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIPc5n006115 for perforce@freebsd.org; Tue, 14 Nov 2006 18:25:38 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:25:38 GMT Message-Id: <200611141825.kAEIPc5n006115@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109948 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:25:56 -0000 http://perforce.freebsd.org/chv.cgi?CH=109948 Change 109948 by millert@millert_g5tower on 2006/11/14 18:25:35 Add vfs_truncate entrypoint. Remove mac_enforce_XXX toggles. Remove lock assertions from FreeBSD that were #defined away. Add MPC_LOADTIME_FLAG_NOTLATE to policy load flags where appropriate. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#12 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_base.c#20 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#11 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_internal.h#9 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_pipe.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#19 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_posix_sem.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_posix_shm.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_process.c#10 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_socket.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_system.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_sysv_msg.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_sysv_sem.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_sysv_shm.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#14 edit .. //depot/projects/trustedbsd/sedarwin8/policies/color/mac_color.c#9 edit .. //depot/projects/trustedbsd/sedarwin8/policies/console/mac_console.c#8 edit .. //depot/projects/trustedbsd/sedarwin8/policies/count/mac_count.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/device_access/mac_device_access.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#17 edit .. //depot/projects/trustedbsd/sedarwin8/policies/multilabel/multilabel.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/none/mac_none.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/readonly/mac_readonly.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#32 edit .. //depot/projects/trustedbsd/sedarwin8/policies/stacktrace/module/mac_stacktrace.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/stub/mac_stub.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#15 edit .. //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#6 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#12 (text+ko) ==== @@ -3596,7 +3596,7 @@ VATTR_SET(&va, va_data_size, uap->length); #ifdef MAC - error = mac_vnode_check_write(vfs_context_ucred(&context), NOCRED, vp); + error = mac_vnode_check_truncate(vfs_context_ucred(&context), NOCRED, vp); if (error) goto out; #endif @@ -3663,7 +3663,7 @@ AUDIT_ARG(vnpath, vp, ARG_VNODE1); #ifdef MAC - error = mac_vnode_check_write(vfs_context_ucred(&context), + error = mac_vnode_check_truncate(vfs_context_ucred(&context), fp->f_fglob->fg_cred, vp); if (error) { (void)vnode_put(vp); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_base.c#20 (text+ko) ==== @@ -116,36 +116,10 @@ static int mac_labelmbufs = 0; #endif -int mac_enforce_fs = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_fs, CTLFLAG_RW, - &mac_enforce_fs, 0, "Enforce MAC policy on file system objects"); -TUNABLE_INT("security.mac.enforce_fs", &mac_enforce_fs); - -int mac_enforce_process = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_process, CTLFLAG_RW, - &mac_enforce_process, 0, "Enforce MAC policy on inter-process operations"); -TUNABLE_INT("security.mac.enforce_process", &mac_enforce_process); - -int mac_enforce_socket = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_socket, CTLFLAG_RW, - &mac_enforce_socket, 1, "Enforce MAC policy on sockets"); -TUNABLE_INT("security.mac.enforce_socket", &mac_enforce_socket); - extern int mac_label_mbufs; SYSCTL_INT(_security_mac, OID_AUTO, label_mbufs, CTLFLAG_RW, &mac_label_mbufs, 1, "Label all MBUFs"); -TUNABLE_INT("security.mac.label_mbufs", &mac_label_mbufs); -int mac_enforce_system = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_system, CTLFLAG_RW, - &mac_enforce_system, 0, "Enforce MAC policy on system operations"); -TUNABLE_INT("security.mac.enforce_system", &mac_enforce_system); - -int mac_enforce_vm = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_vm, CTLFLAG_RW, - &mac_enforce_vm, 0, "Enforce MAC policy on vm operations"); -TUNABLE_INT("security.mac.enforce_vm", &mac_enforce_vm); - int mac_mmap_revocation = 1; SYSCTL_INT(_security_mac, OID_AUTO, mmap_revocation, CTLFLAG_RW, &mac_mmap_revocation, 0, "Revoke mmap access to files on subject " @@ -328,8 +302,6 @@ static __inline void mac_policy_grab_exclusive(void) { - WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, - "mac_policy_grab_exclusive() at %s:%d", __FILE__, __LINE__); mutex_lock(mac_policy_mtx); while (mac_policy_busy != 0) cv_wait(&mac_policy_cv, mac_policy_mtx); @@ -471,12 +443,7 @@ sysctl_register_oid(&sysctl__security); sysctl_register_oid(&sysctl__security_mac); sysctl_register_oid(&sysctl__security_mac_max_slots); - sysctl_register_oid(&sysctl__security_mac_enforce_fs); - sysctl_register_oid(&sysctl__security_mac_enforce_process); - sysctl_register_oid(&sysctl__security_mac_enforce_system); - sysctl_register_oid(&sysctl__security_mac_enforce_socket); sysctl_register_oid(&sysctl__security_mac_label_mbufs); - sysctl_register_oid(&sysctl__security_mac_enforce_vm); sysctl_register_oid(&sysctl__security_mac_mmap_revocation); sysctl_register_oid(&sysctl__security_mac_mmap_revocation_via_cow); printf("MAC Framework successfully initialized\n"); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#11 (text+ko) ==== @@ -441,6 +441,8 @@ struct timespec atime, struct timespec mtime); int mac_vnode_check_stat(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); +int mac_vnode_check_truncate(struct ucred *active_cred, + struct ucred *file_cred, struct vnode *vp); int mac_vnode_check_write(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_internal.h#9 (text+ko) ==== @@ -382,15 +382,8 @@ } while (0) /* Darwin */ - -#define TUNABLE_INT(x, y) -#define WITNESS_WARN(x, y, z, ...) #define mtx_assert(x, y) #define MA_OWNED -#define PROC_LOCK_ASSERT(x, y) -#define M_ASSERTPKTHDR(x) - -#define ASSERT_VOP_LOCKED(vp,msg) struct __mac_get_pid_args; struct __mac_get_proc_args; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_pipe.c#7 (text+ko) ==== @@ -44,14 +44,6 @@ #include -static int mac_enforce_pipe = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_pipe, CTLFLAG_RW, - &mac_enforce_pipe, 0, "Enforce MAC policy on pipe operations"); -TUNABLE_INT("security.mac.enforce_pipe", &mac_enforce_pipe); - -/* Define this to PIPE_LOCK_ASSERT(x, y) if mutex assertions are desired. */ -#define MAC_PIPE_LOCK_ASSERT(x, y) - struct label * mac_pipe_label_alloc(void) { @@ -126,11 +118,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_kqfilter, cred, kn, cpipe, cpipe->pipe_label); return (error); } @@ -140,11 +127,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_ioctl, cred, cpipe, cpipe->pipe_label, cmd, data); return (error); @@ -155,11 +137,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_read, cred, cpipe, cpipe->pipe_label); return (error); @@ -171,11 +148,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_label_update, cred, cpipe, cpipe->pipe_label, newlabel); return (error); @@ -186,11 +158,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_select, cred, cpipe, cpipe->pipe_label, which); return (error); @@ -201,11 +168,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_stat, cred, cpipe, cpipe->pipe_label); return (error); @@ -216,11 +178,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - - if (!mac_enforce_pipe) - return (0); - MAC_CHECK(pipe_check_write, cred, cpipe, cpipe->pipe_label); return (error); @@ -232,8 +189,6 @@ { int error; - MAC_PIPE_LOCK_ASSERT(cpipe, LCK_MTX_ASSERT_OWNED); - error = mac_pipe_check_label_update(cred, cpipe, label); if (error) return (error); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#19 (text+ko) ==== @@ -2968,6 +2968,31 @@ ); /** + @brief Access control check for truncate/ftruncate + @param active_cred Subject credential + @param file_cred Credential associated with the struct fileproc + @param vp Object vnode + @param label Policy label for vp + + Determine whether the subject identified by the credential can + perform a truncate operation on the passed vnode. The active_cred hold + the credentials of the subject performing the operation, and + file_cred holds the credentials of the subject that originally + opened the file. + + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. Suggested failure: EACCES for label mismatch or + EPERM for lack of privilege. +*/ +typedef int mpo_vnode_check_truncate_t( + struct ucred *active_cred, + struct ucred *file_cred, /* NULLOK */ + struct vnode *vp, + struct label *label +); + + +/** @brief Access control check for POSIX semaphore unlink @param cred Subject credential @param ps Pointer to semaphore information structure @@ -5607,6 +5632,7 @@ mpo_vnode_check_setowner_t *mpo_vnode_check_setowner; mpo_vnode_check_setutimes_t *mpo_vnode_check_setutimes; mpo_vnode_check_stat_t *mpo_vnode_check_stat; + mpo_vnode_check_truncate_t *mpo_vnode_check_truncate; mpo_vnode_check_write_t *mpo_vnode_check_write; mpo_pipe_check_kqfilter_t *mpo_pipe_check_kqfilter; mpo_pipe_check_ioctl_t *mpo_pipe_check_ioctl; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_posix_sem.c#5 (text+ko) ==== @@ -41,11 +41,6 @@ #include #include -static int mac_enforce_posix_sem = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_posix_sem, CTLFLAG_RW, - &mac_enforce_posix_sem, 0, "Enforce MAC policy on Posix Semaphores"); -TUNABLE_INT("security.mac.enforce_posix_sem", &mac_enforce_posix_sem); - static struct label * mac_posixsem_label_alloc(void) { @@ -92,9 +87,6 @@ { int error; - if (!mac_enforce_posix_sem) - return (0); - MAC_CHECK(posixsem_check_create, cred, name); return (error); @@ -105,9 +97,6 @@ { int error; - if (!mac_enforce_posix_sem) - return (0); - MAC_CHECK(posixsem_check_open, cred, psem, psem->psem_label); @@ -119,9 +108,6 @@ { int error; - if (!mac_enforce_posix_sem) - return (0); - MAC_CHECK(posixsem_check_post, cred, psem, psem->psem_label); return (error); @@ -133,9 +119,6 @@ { int error; - if (!mac_enforce_posix_sem) - return (0); - MAC_CHECK(posixsem_check_unlink, cred, psem, psem->psem_label, name); return (error); @@ -146,9 +129,6 @@ { int error; - if (!mac_enforce_posix_sem) - return (0); - MAC_CHECK(posixsem_check_wait, cred, psem, psem->psem_label); return (error); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_posix_shm.c#5 (text+ko) ==== @@ -41,11 +41,6 @@ #include #include -static int mac_enforce_pshm = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_posix_shm, CTLFLAG_RW, - &mac_enforce_pshm, 0, "Enforce MAC policy on Posix Shared memory"); -TUNABLE_INT("security.mac.enforce_posix_shm", &mac_enforce_posix_shm); - static struct label * mac_posixshm_label_alloc(void) { @@ -92,9 +87,6 @@ { int error = 0; - if (!mac_enforce_pshm) - return 0; - MAC_CHECK(posixshm_check_create, cred, name); return error; @@ -105,9 +97,6 @@ { int error; - if (!mac_enforce_pshm) - return (0); - MAC_CHECK(posixshm_check_open, cred, shm, shm->pshm_label); return (error); @@ -119,9 +108,6 @@ { int error; - if (!mac_enforce_pshm) - return (0); - MAC_CHECK(posixshm_check_mmap, cred, shm, shm->pshm_label, prot, flags); @@ -133,9 +119,6 @@ { int error; - if (!mac_enforce_pshm) - return (0); - MAC_CHECK(posixshm_check_stat, cred, shm, shm->pshm_label); return (error); @@ -147,9 +130,6 @@ { int error; - if (!mac_enforce_pshm) - return (0); - MAC_CHECK(posixshm_check_truncate, cred, shm, shm->pshm_label, size); return (error); @@ -161,9 +141,6 @@ { int error; - if (!mac_enforce_pshm) - return (0); - MAC_CHECK(posixshm_check_unlink, cred, shm, shm->pshm_label, name); return (error); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_process.c#10 (text+ko) ==== @@ -249,9 +249,6 @@ { int error; - if (!mac_enforce_process) - return (0); - MAC_CHECK(cred_check_visible, u1, u2); return (error); @@ -262,11 +259,6 @@ { int error; - PROC_LOCK_ASSERT(proc, MA_OWNED); - - if (!mac_enforce_process) - return (0); - MAC_CHECK(proc_check_debug, cred, proc); return (error); @@ -277,11 +269,6 @@ { int error; - PROC_LOCK_ASSERT(proc, MA_OWNED); - - if (!mac_enforce_process) - return (0); - MAC_CHECK(proc_check_sched, cred, proc); return (error); @@ -292,11 +279,6 @@ { int error; - PROC_LOCK_ASSERT(proc, MA_OWNED); - - if (!mac_enforce_process) - return (0); - MAC_CHECK(proc_check_signal, cred, proc, signum); return (error); @@ -307,11 +289,6 @@ { int error; - PROC_LOCK_ASSERT(proc, MA_OWNED); - - if (!mac_enforce_process) - return (0); - MAC_CHECK(proc_check_wait, cred, proc); return (error); @@ -328,9 +305,6 @@ { int error; - if (!mac_enforce_process) - return (0); - MAC_CHECK(proc_check_setlcid, p0, p, pid, lcid); return (error); } @@ -340,9 +314,6 @@ { int error; - if (!mac_enforce_process) - return (0); - MAC_CHECK(proc_check_getlcid, p0, p, pid); return (error); } ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_socket.c#7 (text+ko) ==== @@ -62,9 +62,6 @@ #include -extern int mac_enforce_socket; - - struct label * mac_socket_label_alloc(int flag) { @@ -205,7 +202,6 @@ { struct xsocket oldxso, newxso; - SOCK_LOCK_ASSERT(oldsocket); sotoxsocket(oldsocket, &oldxso); sotoxsocket(newsocket, &newxso); MAC_PERFORM(socket_label_associate_accept, &oldxso, oldsocket->so_label, @@ -218,7 +214,6 @@ struct label *label; struct xsocket xso; - SOCK_LOCK_ASSERT(socket); sotoxsocket(socket, &xso); label = mac_mbuf_to_label(mbuf); @@ -252,11 +247,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(so); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_accept, cred, &xso, socket->so_label); @@ -270,11 +260,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_bind, ucred, &xso, socket->so_label, sockaddr); @@ -288,11 +273,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_connect, cred, &xso, socket->so_label, sockaddr); @@ -305,9 +285,6 @@ { int error; - if (!mac_enforce_socket) - return (0); - MAC_CHECK(socket_check_create, cred, domain, type, protocol); return (error); @@ -320,11 +297,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - label = mac_mbuf_to_label(mbuf); /* Policy must deal with NULL label (unlabeled mbufs) */ @@ -341,11 +313,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_kqfilter, cred, kn, &xso, socket->so_label); return (error); @@ -357,11 +324,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_listen, cred, &xso, socket->so_label); @@ -374,11 +336,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_receive, cred, &xso, socket->so_label); @@ -392,8 +349,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_label_update, cred, &xso, socket->so_label, newlabel); @@ -407,11 +362,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_select, cred, &xso, socket->so_label, which); @@ -424,11 +374,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_send, cred, &xso, socket->so_label); @@ -441,11 +386,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_stat, cred, &xso, socket->so_label); @@ -463,11 +403,6 @@ struct xsocket xso; int error; - SOCK_LOCK_ASSERT(socket); - - if (!mac_enforce_socket) - return (0); - sotoxsocket(socket, &xso); MAC_CHECK(socket_check_visible, cred, &xso, socket->so_label); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_system.c#3 (text+ko) ==== @@ -46,13 +46,6 @@ { int error; - if (vp != NULL) { - ASSERT_VOP_LOCKED(vp, "mac_system_check_acct"); - } - - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_acct, cred, vp, vp != NULL ? vp->v_label : NULL); @@ -64,9 +57,6 @@ { int error; - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_nfsd, cred); return (error); @@ -77,9 +67,6 @@ { int error; - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_reboot, cred, howto); return (error); @@ -90,9 +77,6 @@ { int error; - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_settime, cred); return (error); @@ -103,11 +87,6 @@ { int error; - ASSERT_VOP_LOCKED(vp, "mac_system_check_swapon"); - - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_swapon, cred, vp, vp->v_label); return (error); } @@ -117,11 +96,6 @@ { int error; - ASSERT_VOP_LOCKED(vp, "mac_system_check_swapoff"); - - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_swapoff, cred, vp, vp->v_label); return (error); } @@ -136,9 +110,6 @@ * XXXMAC: We're very much like to assert the SYSCTL_LOCK here, * but since it's not exported from kern_sysctl.c, we can't. */ - if (!mac_enforce_system) - return (0); - MAC_CHECK(system_check_sysctl, cred, name, namelen, old, oldlenp, inkernel, new, newlen); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_sysv_msg.c#6 (text+ko) ==== @@ -16,12 +16,6 @@ #include -static int mac_enforce_sysv_msg = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_sysv_msg, CTLFLAG_RW, - &mac_enforce_sysv_msg, 0, - "Enforce MAC policy on System V IPC Message Queues"); -TUNABLE_INT("security.mac.enforce_sysv_msg", &mac_enforce_sysv_msg); - static struct label * mac_sysv_msgmsg_label_alloc(void) { @@ -92,9 +86,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_enqueue, cred, msgptr, msgptr->label, msqptr, msqptr->label); @@ -106,9 +97,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_msgrcv, cred, msgptr, msgptr->label); return(error); @@ -119,9 +107,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_msgrmid, cred, msgptr, msgptr->label); return(error); @@ -132,9 +117,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_msqget, cred, msqptr, msqptr->label); return(error); @@ -145,9 +127,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_msqsnd, cred, msqptr, msqptr->label); return(error); @@ -158,9 +137,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_msqrcv, cred, msqptr, msqptr->label); return(error); @@ -172,9 +148,6 @@ { int error; - if (!mac_enforce_sysv_msg) - return (0); - MAC_CHECK(sysvmsq_check_msqctl, cred, msqptr, msqptr->label, cmd); return(error); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_sysv_sem.c#5 (text+ko) ==== @@ -47,11 +47,6 @@ #include -static int mac_enforce_sysv_sem = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_sysv_sem, CTLFLAG_RW, - &mac_enforce_sysv_sem, 0, "Enforce MAC policy on System V IPC Semaphores"); -TUNABLE_INT("security.mac.enforce_sysv_sem", &mac_enforce_sysv_sem); - static struct label * mac_sysv_sem_label_alloc(void) { @@ -105,9 +100,6 @@ { int error; - if (!mac_enforce_sysv_sem) - return (0); - MAC_CHECK(sysvsem_check_semctl, cred, semakptr, semakptr->label, cmd); return(error); @@ -118,9 +110,6 @@ { int error; - if (!mac_enforce_sysv_sem) - return (0); - MAC_CHECK(sysvsem_check_semget, cred, semakptr, semakptr->label); return(error); @@ -132,9 +121,6 @@ { int error; - if (!mac_enforce_sysv_sem) - return (0); - MAC_CHECK(sysvsem_check_semop, cred, semakptr, semakptr->label, accesstype); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_sysv_shm.c#5 (text+ko) ==== @@ -49,12 +49,6 @@ #include -static int mac_enforce_sysv_shm = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_sysv, CTLFLAG_RW, - &mac_enforce_sysv_shm, 0, - "Enforce MAC policy on System V IPC shared memory"); -TUNABLE_INT("security.mac.enforce_sysv", &mac_enforce_sysv_shm); - static struct label * mac_sysv_shm_label_alloc(void) { @@ -108,9 +102,6 @@ { int error; - if (!mac_enforce_sysv_shm) - return (0); - MAC_CHECK(sysvshm_check_shmat, cred, shmsegptr, shmsegptr->label, shmflg); @@ -123,9 +114,6 @@ { int error; - if (!mac_enforce_sysv_shm) - return (0); - MAC_CHECK(sysvshm_check_shmctl, cred, shmsegptr, shmsegptr->label, cmd); @@ -137,9 +125,6 @@ { int error; - if (!mac_enforce_sysv_shm) - return (0); - MAC_CHECK(sysvshm_check_shmdt, cred, shmsegptr, shmsegptr->label); return(error); @@ -151,9 +136,6 @@ { int error; - if (!mac_enforce_sysv_shm) - return (0); - MAC_CHECK(sysvshm_check_shmget, cred, shmsegptr, shmsegptr->label, shmflg); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#14 (text+ko) ==== @@ -260,8 +260,6 @@ { int error; - ASSERT_VOP_LOCKED(vp, "mac_vnode_label_associate_extattr"); - MAC_CHECK(vnode_label_associate_extattr, mp, mp->mnt_mntlabel, vp, vp->v_label); @@ -282,9 +280,6 @@ { int error; - ASSERT_VOP_LOCKED(dvp, __func__); - ASSERT_VOP_LOCKED(vp, __func__); - MAC_CHECK(vnode_notify_create, cred, mp, mp->mnt_mntlabel, dvp, dvp->v_label, vp, vp->v_label, cnp); @@ -321,7 +316,6 @@ { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:27:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DBA7F16A415; Tue, 14 Nov 2006 18:27:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B453B16A40F for ; Tue, 14 Nov 2006 18:27:42 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6BC8543D4C for ; Tue, 14 Nov 2006 18:27:42 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIRgnV006371 for ; Tue, 14 Nov 2006 18:27:42 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIRgXJ006368 for perforce@freebsd.org; Tue, 14 Nov 2006 18:27:42 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:27:42 GMT Message-Id: <200611141827.kAEIRgXJ006368@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109950 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:27:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=109950 Change 109950 by millert@millert_g5tower on 2006/11/14 18:27:13 Remove mac_enforce toggle Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#4 (text+ko) ==== @@ -44,15 +44,9 @@ #include #include #include -#include #include -static int mac_enforce_file = 1; -SYSCTL_INT(_security_mac, OID_AUTO, enforce_file, CTLFLAG_RW, - &mac_enforce_file, 0, "Enforce MAC policy on file descriptors"); -TUNABLE_INT("security.mac.enforce_file", &mac_enforce_file); - static struct label * mac_file_label_alloc(void) { @@ -98,8 +92,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_create, cred); return (error); } @@ -109,8 +101,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_dup, cred, fg, fg->fg_label, newfd); return (error); } @@ -130,8 +120,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_ioctl, cred, fg, fg->fg_label, cmd, data); return (error); } @@ -141,8 +129,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_inherit, cred, fg, fg->fg_label); return (error); } @@ -152,8 +138,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_receive, cred, fg, fg->fg_label); return (error); } @@ -164,8 +148,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_get_flags, cred, fg, fg->fg_label, flags); return (error); } @@ -176,8 +158,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_get_ofileflags, cred, fg, fg->fg_label, flags); return (error); } @@ -188,8 +168,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_change_flags, cred, fg, fg->fg_label, oldflags, newflags); return (error); @@ -201,8 +179,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_change_ofileflags, cred, fg, fg->fg_label, oldflags, newflags); return (error); @@ -213,8 +189,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_get_offset, cred, fg, fg->fg_label); return (error); } @@ -224,8 +198,6 @@ { int error; - if (!mac_enforce_file) - return (0); MAC_CHECK(file_check_change_offset, cred, fg, fg->fg_label); return (error); } From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:27:47 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CF91916A560; Tue, 14 Nov 2006 18:27:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id ACB8216A407 for ; Tue, 14 Nov 2006 18:27:46 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 184F343D64 for ; Tue, 14 Nov 2006 18:27:42 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIRfHH006365 for ; Tue, 14 Nov 2006 18:27:41 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIRflV006362 for perforce@freebsd.org; Tue, 14 Nov 2006 18:27:41 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:27:41 GMT Message-Id: <200611141827.kAEIRflV006362@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109949 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:27:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=109949 Change 109949 by millert@millert_g5tower on 2006/11/14 18:26:45 Add sebsd_vnode_check_truncate(), currently the same as sebsd_vnode_check_write(). This is consistent with the checks in SELinux. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#33 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#33 (text+ko) ==== @@ -2875,6 +2875,14 @@ } static int +sebsd_vnode_check_truncate(struct ucred *cred, struct ucred *file_cred, + struct vnode *vp, struct label *label) +{ + + return (vnode_has_perm(cred, vp, NULL, FILE__WRITE)); +} + +static int sebsd_vnode_check_write(struct ucred *cred, struct ucred *file_cred, struct vnode *vp, struct label *label) { From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:38:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E147016A4F4; Tue, 14 Nov 2006 18:38:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B8F9B16A492 for ; Tue, 14 Nov 2006 18:38:31 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 85ED143DB1 for ; Tue, 14 Nov 2006 18:37:55 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIbtPl008581 for ; Tue, 14 Nov 2006 18:37:55 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIbtWc008577 for perforce@freebsd.org; Tue, 14 Nov 2006 18:37:55 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:37:55 GMT Message-Id: <200611141837.kAEIbtWc008577@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109951 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:38:32 -0000 http://perforce.freebsd.org/chv.cgi?CH=109951 Change 109951 by millert@millert_g5tower on 2006/11/14 18:37:10 Sorted list of policy names for sorting plus vim macro. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-policynames.vim#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:39:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 22C2316A51F; Tue, 14 Nov 2006 18:39:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D7AC716A500 for ; Tue, 14 Nov 2006 18:39:22 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1F8543DB9 for ; Tue, 14 Nov 2006 18:39:03 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIcvIS008677 for ; Tue, 14 Nov 2006 18:38:57 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIcveY008673 for perforce@freebsd.org; Tue, 14 Nov 2006 18:38:57 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:38:57 GMT Message-Id: <200611141838.kAEIcveY008673@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109953 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:39:23 -0000 http://perforce.freebsd.org/chv.cgi?CH=109953 Change 109953 by millert@millert_g5tower on 2006/11/14 18:38:53 Move mmap checks from vnode to file. Add file_has_perm to sebsd.c that checks both the fd label and the underlying vnode label, similar to what SELinux does. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_mman.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#12 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#20 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#15 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-policynames.vim#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/color/mac_color.c#10 edit .. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#18 edit .. //depot/projects/trustedbsd/sedarwin8/policies/readonly/mac_readonly.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#34 edit .. //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_mman.c#4 (text+ko) ==== @@ -373,8 +373,8 @@ handle = (void *)vp; #ifdef MAC - error = mac_vnode_check_mmap(vfs_context_ucred(&context), - vp, prot, flags, &maxprot); + error = mac_file_check_mmap(vfs_context_ucred(&context), + fp->f_fglob, prot, flags, &maxprot); if (error) { (void)vnode_put(vp); goto bad; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#5 (text+ko) ==== @@ -221,3 +221,39 @@ MAC_CHECK(file_check_set, cred, fg, buf, buflen); return (error); } + +/* + * On some platforms, VM_PROT_READ implies VM_PROT_EXECUTE. If that is true, + * both prot and maxprot will have VM_PROT_EXECUTE set after file_check_mmap + * if VM_PROT_READ is set. + * + * The type of maxprot in file_check_mmap must be equivalent to vm_prot_t * + * (defined in ). mac_policy.h does not include any header + * files, so cannot use the typedef itself. + */ +int +mac_file_check_mmap(struct ucred *cred, struct fileglob *fg, int prot, + int flags, int *maxprot) +{ + int error; + int maxp; + + maxp = *maxprot; + MAC_CHECK(file_check_mmap, cred, fg, fg->fg_label, prot, flags, &maxp); + if ((maxp | *maxprot) != *maxprot) + panic("file_check_mmap increased max protections"); + *maxprot = maxp; + return (error); +} + +void +mac_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, + int *prot) +{ + int result = *prot; + + MAC_PERFORM(file_check_mmap_downgrade, cred, fg, fg->fg_label, + &result); + + *prot = result; +} ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#12 (text+ko) ==== @@ -310,6 +310,10 @@ struct fileglob *fg, char oldflags, char newflags); int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg); int mac_file_check_change_offset(struct ucred *cred, struct fileglob *fg); +int mac_file_check_mmap(struct ucred *cred, struct fileglob *fg, + int prot, int flags, int *maxprot); +void mac_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, + int *prot); int mac_file_check_set(struct ucred *cred, struct fileglob *fg, char *buf, int buflen); int mac_sysvsem_check_semget(struct ucred *cred, @@ -407,10 +411,6 @@ int mac_vnode_check_listextattr(struct ucred *cred, struct vnode *vp); int mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, struct componentname *cnp); -int mac_vnode_check_mmap(struct ucred *cred, struct vnode *vp, - int prot, int flags, int *maxprot); -void mac_vnode_check_mmap_downgrade(struct ucred *cred, struct vnode *vp, - int *prot); int mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, int prot); int mac_vnode_check_open(struct ucred *cred, struct vnode *vp, ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#20 (text+ko) ==== @@ -3901,6 +3901,51 @@ ); /** + @brief Access control check for mapping a file + @param cred Subject credential + @param fg fileglob representing file to map + @param label Policy label associated with vp + @param prot mmap protections; see mmap(2) + @param flags Type of mapped object; see mmap(2) + @param maxprot Maximum rights + + Determine whether the subject identified by the credential should be + allowed to map the file represented by fg with the protections specified + in prot. The maxprot field holds the maximum permissions on the new + mapping, a combination of VM_PROT_READ, VM_PROT_WRITE, and VM_PROT_EXECUTE. + To avoid overriding prior access control checks, a policy should only + remove flags from maxprot. + + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. Suggested failure: EACCES for label mismatch or + EPERM for lack of privilege. +*/ +typedef int mpo_file_check_mmap_t( + struct ucred *cred, + struct fileglob *fg, + struct label *label, + int prot, + int flags, + int *maxprot +); + +/** + @brief Downgrade the mmap protections + @param cred Subject credential + @param fg file to map + @param label Policy label associated with vp + @param prot mmap protections to be downgraded + + Downgrade the mmap protections based on the subject and object labels. +*/ +typedef void mpo_file_check_mmap_downgrade_t( + struct ucred *cred, + struct fileglob *fg, + struct label *label, + int *prot +); + +/** @brief Access control for changing the offset of a file descriptor @param cred Subject credential @param fg Fileglob structure @@ -4634,51 +4679,6 @@ ); /** - @brief Access control check for mapping the vnode - @param cred Subject credential - @param vp vnode to map - @param label Policy label associated with vp - @param prot mmap protections; see mmap(2) - @param flags Type of mapped object; see mmap(2) - @param maxprot Maximum rights - - Determine whether the subject identified by the credential should be - allowed to map the vnode vp with the protections specified in prot. - The maxprot field holds the maximum permissions on the new mapping, - a combination of VM_PROT_READ, VM_PROT_WRITE, and VM_PROT_EXECUTE. - To avoid overriding prior access control checks, a policy should only - remove flags from maxprot. - - @return Return 0 if access is granted, otherwise an appropriate value for - errno should be returned. Suggested failure: EACCES for label mismatch or - EPERM for lack of privilege. -*/ -typedef int mpo_vnode_check_mmap_t( - struct ucred *cred, - struct vnode *vp, - struct label *label, - int prot, - int flags, - int *maxprot -); - -/** - @brief Downgrade the mmap protections - @param cred Subject credential - @param vp vnode to map - @param label Policy label associated with vp - @param prot mmap protections to be downgraded - - Downgrade the mmap protections based on the subject and object labels. -*/ -typedef void mpo_vnode_check_mmap_downgrade_t( - struct ucred *cred, - struct vnode *vp, - struct label *label, - int *prot -); - -/** @brief Access control check for setting memory protections @param cred Subject credential @param vp Mapped vnode @@ -5529,10 +5529,12 @@ mpo_file_check_get_flags_t *mpo_file_check_get_flags; mpo_file_check_get_offset_t *mpo_file_check_get_offset; mpo_file_check_get_ofileflags_t *mpo_file_check_get_ofileflags; + mpo_file_check_get_t *mpo_file_check_get; mpo_file_check_inherit_t *mpo_file_check_inherit; mpo_file_check_ioctl_t *mpo_file_check_ioctl; + mpo_file_check_mmap_downgrade_t *mpo_file_check_mmap_downgrade; + mpo_file_check_mmap_t *mpo_file_check_mmap; mpo_file_check_receive_t *mpo_file_check_receive; - mpo_file_check_get_t *mpo_file_check_get; mpo_file_check_set_t *mpo_file_check_set; mpo_port_check_method_t *mpo_port_check_method; mpo_posixsem_check_create_t *mpo_posixsem_check_create; @@ -5613,8 +5615,6 @@ mpo_vnode_check_link_t *mpo_vnode_check_link; mpo_vnode_check_listextattr_t *mpo_vnode_check_listextattr; mpo_vnode_check_lookup_t *mpo_vnode_check_lookup; - mpo_vnode_check_mmap_t *mpo_vnode_check_mmap; - mpo_vnode_check_mmap_downgrade_t *mpo_vnode_check_mmap_downgrade; mpo_vnode_check_mprotect_t *mpo_vnode_check_mprotect; mpo_vnode_check_open_t *mpo_vnode_check_open; mpo_vnode_check_read_t *mpo_vnode_check_read; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#15 (text+ko) ==== @@ -513,42 +513,6 @@ return (error); } -/* - * On some platforms, VM_PROT_READ implies VM_PROT_EXECUTE. If that is true, - * both prot and maxprot will have VM_PROT_EXECUTE set after vnode_check_mmap - * if VM_PROT_READ is set. - * - * The type of maxprot in vnode_check_mmap must be equivalent to vm_prot_t * - * (defined in ). mac_policy.h does not include any header files, - * so cannot use the typedef itself. - */ - -int -mac_vnode_check_mmap(struct ucred *cred, struct vnode *vp, int prot, int flags, - int *maxprot) -{ - int error; - int maxp; - - maxp = *maxprot; - MAC_CHECK(vnode_check_mmap, cred, vp, vp->v_label, prot, flags, &maxp); - if ((maxp | *maxprot) != *maxprot) - panic("vnode_check_mmap increased max protections"); - *maxprot = maxp; - return (error); -} - -void -mac_vnode_check_mmap_downgrade(struct ucred *cred, struct vnode *vp, int *prot) -{ - int result = *prot; - - MAC_PERFORM(vnode_check_mmap_downgrade, cred, vp, vp->v_label, - &result); - - *prot = result; -} - int mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, int prot) { ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-policynames.vim#2 (text+ko) ==== @@ -25,6 +25,8 @@ typedef mpo_devfs_label_update_t( typedef mpo_file_check_fcntl_t( typedef mpo_file_check_get_t( +typedef mpo_file_check_mmap_downgrade_t( +typedef mpo_file_check_mmap_t( typedef mpo_file_check_set_t( typedef mpo_iokit_check_device_t( typedef mpo_lctx_check_label_update_t( @@ -210,8 +212,6 @@ typedef mpo_vnode_check_link_t( typedef mpo_vnode_check_listextattr_t( typedef mpo_vnode_check_lookup_t( -typedef mpo_vnode_check_mmap_downgrade_t( -typedef mpo_vnode_check_mmap_t( typedef mpo_vnode_check_mprotect_t( typedef mpo_vnode_check_open_t( typedef mpo_vnode_check_read_t( ==== //depot/projects/trustedbsd/sedarwin8/policies/color/mac_color.c#10 (text+ko) ==== @@ -502,7 +502,7 @@ } static int -color_vnode_check_mmap(struct ucred *cred, struct vnode *vp, +color_file_check_mmap(struct ucred *cred, struct fileglob *fg, struct label *label, int prot, int flags, int *maxprot) { @@ -510,7 +510,7 @@ } static void -color_vnode_check_mmap_downgrade(struct ucred *cred, struct vnode *vp, +color_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, struct label *label, int *prot) { @@ -701,6 +701,9 @@ .mpo_cred_check_label_update = color_cred_check_label_update, + .mpo_file_check_mmap = color_file_check_mmap, + .mpo_file_check_mmap_downgrade = color_file_check_mmap_downgrade, + .mpo_lctx_notify_create = color_lctx_notify_create, .mpo_lctx_notify_join = color_lctx_notify_join, .mpo_lctx_notify_leave = color_lctx_notify_leave, @@ -721,8 +724,6 @@ .mpo_vnode_check_link = color_vnode_check_link, .mpo_vnode_check_listextattr = color_vnode_check_listextattr, .mpo_vnode_check_lookup = color_vnode_check_lookup, - .mpo_vnode_check_mmap = color_vnode_check_mmap, - .mpo_vnode_check_mmap_downgrade = color_vnode_check_mmap_downgrade, .mpo_vnode_check_mprotect = color_vnode_check_mprotect, .mpo_vnode_check_open = color_vnode_check_open, .mpo_vnode_check_read = color_vnode_check_read, ==== //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#18 (text+ko) ==== @@ -3444,7 +3444,7 @@ } static int -mac_mls_vnode_check_mmap(struct ucred *cred, struct vnode *vp, +mac_mls_file_check_mmap(struct ucred *cred, struct fileglob *fg, struct label *label, int prot, int flags, int *maxprot) { struct mac_mls *subj, *obj; @@ -3487,13 +3487,13 @@ * combination of what each policy thinks it should be. */ static void -mac_mls_vnode_check_mmap_downgrade(struct ucred *cred, struct vnode *vp, +mac_mls_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, struct label *vlabel, int *prot) { if (!mac_mls_enabled) return; -#warning Implement mac_mls_vnode_check_mmap_downgrade() +#warning Implement mac_mls_file_check_mmap_downgrade() return; } @@ -4088,8 +4088,8 @@ .mpo_vnode_check_link = mac_mls_vnode_check_link, .mpo_vnode_check_listextattr = mac_mls_vnode_check_listextattr, .mpo_vnode_check_lookup = mac_mls_vnode_check_lookup, - .mpo_vnode_check_mmap = mac_mls_vnode_check_mmap, - .mpo_vnode_check_mmap_downgrade = mac_mls_vnode_check_mmap_downgrade, + .mpo_file_check_mmap = mac_mls_file_check_mmap, + .mpo_file_check_mmap_downgrade = mac_mls_file_check_mmap_downgrade, .mpo_vnode_check_mprotect = mac_mls_vnode_check_mprotect, .mpo_vnode_check_open = mac_mls_vnode_check_open, .mpo_vnode_check_read = mac_mls_vnode_check_read, ==== //depot/projects/trustedbsd/sedarwin8/policies/readonly/mac_readonly.c#7 (text+ko) ==== @@ -1,6 +1,8 @@ #include #include #include +#include +#include #include #include #include @@ -420,11 +422,14 @@ } static int -readonly_vnode_check_mmap(struct ucred *cred, struct vnode *vp, +readonly_file_check_mmap(struct ucred *cred, struct fileglob *fg, struct label *label, int prot, int flags, int *maxprot) { - return (ro_checkdiraccess(vp, label, (prot & PROT_WRITE) ? FWRITE : FREAD)); + if (fg->fg_type != DTYPE_VNODE) + return (0); + return (ro_checkdiraccess((struct vnode *)fg->fg_data, label, + (prot & PROT_WRITE) ? FWRITE : FREAD)); } static int @@ -502,6 +507,7 @@ .mpo_policy_destroy = readonly_policy_destroy, .mpo_policy_init = readonly_policy_init, .mpo_policy_initbsd = readonly_policy_initbsd, + .mpo_file_check_mmap = readonly_file_check_mmap, .mpo_vnode_label_init = readonly_label_init, .mpo_vnode_label_destroy = readonly_label_destroy, .mpo_vnode_label_recycle = readonly_label_recycle, @@ -520,7 +526,6 @@ .mpo_vnode_check_deleteextattr = readonly_vnode_check_deleteextattr, .mpo_vnode_check_exchangedata = readonly_vnode_check_exchangedata, .mpo_vnode_check_link = readonly_vnode_check_link, - .mpo_vnode_check_mmap = readonly_vnode_check_mmap, .mpo_vnode_check_open = readonly_vnode_check_open, .mpo_vnode_check_label_update = readonly_vnode_check_label_update, .mpo_vnode_check_rename_from = readonly_vnode_check_rename_from, ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#34 (text+ko) ==== @@ -467,6 +467,34 @@ } static int +file_has_perm(struct ucred *cred, struct fileglob *fg, struct label *fglabel, + u_int32_t perm) +{ + struct task_security_struct *tsec; + struct file_security_struct *fsec; + int rc = 0; + + tsec = SLOT(cred->cr_label); + fsec = SLOT(fglabel); + + /* Simple use check if file opened by other sid. */ + if (tsec->sid != fsec->sid) { + rc = avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, FD__USE, + NULL); + if (rc != 0) + return (rc); + } + + /* Check underlying vnode if there is one. */ + if (fg->fg_type == DTYPE_VNODE && fg->fg_data != NULL) { + rc = vnode_has_perm(cred, (struct vnode *)fg->fg_data, + NULL, perm); + } + + return (rc); +} + +static int pipe_has_perm(struct ucred *cred, struct pipe *pipe, u_int32_t perm) { struct task_security_struct *task; @@ -2891,8 +2919,8 @@ } static int -sebsd_vnode_check_mmap(struct ucred *cred, struct vnode *vp, - struct label *label, int prot, int flags, int *maxprot) +sebsd_file_check_mmap(struct ucred *cred, struct fileglob *fg, + struct label *fglabel, int prot, int flags, int *maxprot) { u_int32_t av; @@ -2900,18 +2928,15 @@ * TBD: Incomplete? * Write access only matters if the mapping is shared. */ - if (vp) { - av = FILE__READ; + av = FILE__READ; - if ((prot & PROT_WRITE) && (flags & MAP_SHARED)) - av |= FILE__WRITE; + if ((prot & PROT_WRITE) && (flags & MAP_SHARED)) + av |= FILE__WRITE; - if (prot & PROT_EXEC) - av |= FILE__EXECUTE; + if (prot & PROT_EXEC) + av |= FILE__EXECUTE; - return (vnode_has_perm(cred, vp, NULL, av)); - } - return (0); + return (file_has_perm(cred, fg, fglabel, av)); } static int @@ -3653,7 +3678,6 @@ // .mpo_vnode_check_kqfilter = sebsd_vnode_check_kqfilter, .mpo_vnode_check_link = sebsd_vnode_check_link, .mpo_vnode_check_lookup = sebsd_vnode_check_lookup, - .mpo_vnode_check_mmap = sebsd_vnode_check_mmap, .mpo_vnode_check_mprotect = sebsd_vnode_check_mprotect, .mpo_vnode_check_open = sebsd_vnode_check_open, .mpo_vnode_check_read = sebsd_vnode_check_read, @@ -3701,6 +3725,7 @@ .mpo_file_check_inherit = sebsd_file_check_receive, .mpo_file_check_receive = sebsd_file_check_receive, .mpo_file_check_dup = sebsd_file_check_dup, + .mpo_file_check_mmap = sebsd_file_check_mmap, /* Mount Points */ .mpo_mount_label_init = sebsd_mount_label_init, ==== //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#7 (text+ko) ==== @@ -4,6 +4,7 @@ #include #include +#include #include #include @@ -315,16 +316,20 @@ } static int -vanity_vnode_check_mmap(struct ucred *cred, struct vnode *vp, struct label *label, int prot, int flags, int *maxprot) +vanity_file_check_mmap(struct ucred *cred, struct fileglob *fg, + struct label *label, int prot, int flags, int *maxprot) { - VANITY(vp); + if (fg->fg_type == DTYPE_VNODE) + VANITY((struct vnode *)fg->fg_data); return (0); } static void -vanity_vnode_check_mmap_downgrade(struct ucred *cred, struct vnode *vp, struct label *label, int *prot) +vanity_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, + struct label *label, int *prot) { - VANITY(vp); + if (fg->fg_type == DTYPE_VNODE) + VANITY((struct vnode *)fg->fg_data); } static int @@ -473,6 +478,8 @@ static struct mac_policy_ops mac_vanity_ops = { .mpo_policy_initbsd = vanity_policy_initbsd, + .mpo_file_check_mmap = vanity_file_check_mmap, + .mpo_file_check_mmap_downgrade = vanity_file_check_mmap_downgrade, .mpo_vnode_label_update_extattr = vanity_vnode_label_update_extattr, .mpo_vnode_label_associate_devfs= vanity_vnode_label_associate_devfs, .mpo_vnode_label_associate_extattr= vanity_vnode_label_associate_extattr, @@ -501,8 +508,6 @@ .mpo_vnode_check_link = vanity_vnode_check_link, .mpo_vnode_check_listextattr = vanity_vnode_check_listextattr, .mpo_vnode_check_lookup = vanity_vnode_check_lookup, - .mpo_vnode_check_mmap = vanity_vnode_check_mmap, - .mpo_vnode_check_mmap_downgrade = vanity_vnode_check_mmap_downgrade, .mpo_vnode_check_mprotect = vanity_vnode_check_mprotect, .mpo_vnode_check_open = vanity_vnode_check_open, .mpo_vnode_check_read = vanity_vnode_check_read, From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:48:14 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0DD4116A415; Tue, 14 Nov 2006 18:48:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE4B316A407 for ; Tue, 14 Nov 2006 18:48:13 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2548143D6E for ; Tue, 14 Nov 2006 18:48:11 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEImBjc010940 for ; Tue, 14 Nov 2006 18:48:11 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEImAE1010922 for perforce@freebsd.org; Tue, 14 Nov 2006 18:48:10 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:48:10 GMT Message-Id: <200611141848.kAEImAE1010922@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109955 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:48:14 -0000 http://perforce.freebsd.org/chv.cgi?CH=109955 Change 109955 by millert@millert_g5tower on 2006/11/14 18:47:59 Add an mprotect check. Doesn't really do anything at the moment since there is no label to check. Could be useful for preventing a process from making its stack executable but apparently only mac-on-intel has no-exec stack. As a result, this will likely get changed significantly in the future or simply removed. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_mman.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#13 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#21 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_process.c#11 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#16 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-policynames.vim#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/color/mac_color.c#11 edit .. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#19 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#35 edit .. //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#8 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_mman.c#5 (text+ko) ==== @@ -634,13 +634,16 @@ } int -mprotect(__unused struct proc *p, struct mprotect_args *uap, __unused register_t *retval) +mprotect(struct proc *p, struct mprotect_args *uap, __unused register_t *retval) { register vm_prot_t prot; mach_vm_offset_t user_addr; mach_vm_size_t user_size; kern_return_t result; vm_map_t user_map; +#ifdef MAC + int error; +#endif AUDIT_ARG(addr, uap->addr); AUDIT_ARG(len, uap->len); @@ -667,13 +670,19 @@ #ifdef MAC /* - * There is no MAC check for mprotect for 2 reasons: + * The MAC check for mprotect is of limited use for 2 reasons: * Without mmap revocation, the caller could have asked for the max * protections initially instead of a reduced set, so a mprotect * check would offer no new security. - * It is nontrivial to extract the vnode from the pager object(s) + * It is not possible to extract the vnode from the pager object(s) * of the target memory range. + * However, the MAC check may be used to prevent a process from, + * e.g., making the stack executable. */ + error = mac_proc_check_mprotect(proc_ucred(p), p, (void *)user_addr, + (size_t)user_size, prot); + if (error) + return (error); #endif result = mach_vm_protect(user_map, user_addr, user_size, FALSE, prot); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#13 (text+ko) ==== @@ -411,8 +411,8 @@ int mac_vnode_check_listextattr(struct ucred *cred, struct vnode *vp); int mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, struct componentname *cnp); -int mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, - int prot); +int mac_proc_check_mprotect(struct ucred *cred, struct proc *proc, + void *addr, size_t size, int prot); int mac_vnode_check_open(struct ucred *cred, struct vnode *vp, int acc_mode); int mac_vnode_check_read(struct ucred *active_cred, ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#21 (text+ko) ==== @@ -3596,6 +3596,29 @@ ); /** + @brief Access control check for setting memory protections + @param cred Subject credential + @param proc User process requesting the change + @param addr Start address of the memory range + @param size Length address of the memory range + @param prot Memory protections, see mmap(2) + + Determine whether the subject identified by the credential should + be allowed to set the specified memory protections on memory mapped + in the process proc. + + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. +*/ +typedef int mpo_proc_check_mprotect_t( + struct ucred *cred, + struct proc *proc, + void *addr, + size_t size, + int prot +); + +/** @brief Access control check for setting the Login Context @param p0 Calling process @param p Effected process @@ -4679,27 +4702,6 @@ ); /** - @brief Access control check for setting memory protections - @param cred Subject credential - @param vp Mapped vnode - @param label Policy label associated with vp - @param prot Memory protections, see mmap(2) - - Determine whether the subject identified by the credential should - be allowed to set the specified memory protections on memory mapped - from the vnode vp. - - @return Return 0 if access is granted, otherwise an appropriate value for - errno should be returned. -*/ -typedef int mpo_vnode_check_mprotect_t( - struct ucred *cred, - struct vnode *vp, - struct label *label, - int prot -); - -/** @brief Access control check for open @param cred Subject credential @param vp Object vnode @@ -5573,6 +5575,7 @@ mpo_proc_check_getaudit_t *mpo_proc_check_getaudit; mpo_proc_check_getauid_t *mpo_proc_check_getauid; mpo_proc_check_getlcid_t *mpo_proc_check_getlcid; + mpo_proc_check_mprotect_t *mpo_proc_check_mprotect; mpo_proc_check_sched_t *mpo_proc_check_sched; mpo_proc_check_setaudit_t *mpo_proc_check_setaudit; mpo_proc_check_setauid_t *mpo_proc_check_setauid; @@ -5615,7 +5618,6 @@ mpo_vnode_check_link_t *mpo_vnode_check_link; mpo_vnode_check_listextattr_t *mpo_vnode_check_listextattr; mpo_vnode_check_lookup_t *mpo_vnode_check_lookup; - mpo_vnode_check_mprotect_t *mpo_vnode_check_mprotect; mpo_vnode_check_open_t *mpo_vnode_check_open; mpo_vnode_check_read_t *mpo_vnode_check_read; mpo_vnode_check_readdir_t *mpo_vnode_check_readdir; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_process.c#11 (text+ko) ==== @@ -392,3 +392,14 @@ return (error); } #endif /* LCTX */ + +int +mac_proc_check_mprotect(struct ucred *cred, struct proc *proc, + void *addr, size_t size, int prot) +{ + int error; + + MAC_CHECK(proc_check_mprotect, cred, proc, addr, size, prot); + return (error); +} + ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#16 (text+ko) ==== @@ -514,15 +514,6 @@ } int -mac_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, int prot) -{ - int error; - - MAC_CHECK(vnode_check_mprotect, cred, vp, vp->v_label, prot); - return (error); -} - -int mac_vnode_check_open(struct ucred *cred, struct vnode *vp, int acc_mode) { int error; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-policynames.vim#3 (text+ko) ==== @@ -117,6 +117,7 @@ typedef mpo_proc_check_getaudit_t( typedef mpo_proc_check_getauid_t( typedef mpo_proc_check_getlcid_t( +typedef mpo_proc_check_mprotect_t( typedef mpo_proc_check_sched_t( typedef mpo_proc_check_setaudit_t( typedef mpo_proc_check_setauid_t( @@ -212,7 +213,6 @@ typedef mpo_vnode_check_link_t( typedef mpo_vnode_check_listextattr_t( typedef mpo_vnode_check_lookup_t( -typedef mpo_vnode_check_mprotect_t( typedef mpo_vnode_check_open_t( typedef mpo_vnode_check_read_t( typedef mpo_vnode_check_readdir_t( ==== //depot/projects/trustedbsd/sedarwin8/policies/color/mac_color.c#11 (text+ko) ==== @@ -518,11 +518,11 @@ } static int -color_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, - struct label *label, int prot) +color_proc_check_mprotect(struct ucred *cred, struct proc *proc, + void *addr, size_t size, int prot) { - return (co_maybe_promote_process(cred, label)); + // Nothing yet } static int @@ -709,6 +709,7 @@ .mpo_lctx_notify_leave = color_lctx_notify_leave, .mpo_lctx_label_update = color_lctx_label_update, .mpo_proc_check_signal = color_proc_check_signal, + .mpo_proc_check_mprotect = color_proc_check_mprotect, .mpo_vnode_check_access = color_vnode_check_access, .mpo_vnode_check_chdir = color_vnode_check_chdir, @@ -724,7 +725,6 @@ .mpo_vnode_check_link = color_vnode_check_link, .mpo_vnode_check_listextattr = color_vnode_check_listextattr, .mpo_vnode_check_lookup = color_vnode_check_lookup, - .mpo_vnode_check_mprotect = color_vnode_check_mprotect, .mpo_vnode_check_open = color_vnode_check_open, .mpo_vnode_check_read = color_vnode_check_read, .mpo_vnode_check_readdir = color_vnode_check_readdir, ==== //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#19 (text+ko) ==== @@ -3498,24 +3498,14 @@ } static int -mac_mls_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, - struct label *vlabel, int prot) +mac_mls_proc_check_mprotect(struct ucred *cred, struct proc *proc, + void *addr, size_t size, int prot) { - struct mac_mls *subj, *obj; - int r, w; if (!mac_mls_enabled) return (0); - subj = SLOT(cred->cr_label); - obj = SLOT(vlabel); - r = mac_mls_dominate_effective(subj, obj); - w = mac_mls_dominate_effective(obj, subj); - - if (!r && ((prot & VM_PROT_READ) || (prot & VM_PROT_EXECUTE))) - return (EACCES); - if (!w && (prot & VM_PROT_WRITE)) - return (EACCES); +#warning Implement mac_mls_proc_check_mprotect() return (0); } @@ -4090,7 +4080,7 @@ .mpo_vnode_check_lookup = mac_mls_vnode_check_lookup, .mpo_file_check_mmap = mac_mls_file_check_mmap, .mpo_file_check_mmap_downgrade = mac_mls_file_check_mmap_downgrade, - .mpo_vnode_check_mprotect = mac_mls_vnode_check_mprotect, + .mpo_proc_check_mprotect = mac_mls_proc_check_mprotect, .mpo_vnode_check_open = mac_mls_vnode_check_open, .mpo_vnode_check_read = mac_mls_vnode_check_read, .mpo_vnode_check_readdir = mac_mls_vnode_check_readdir, ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#35 (text+ko) ==== @@ -2940,9 +2940,11 @@ } static int -sebsd_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, - struct label *label, int prot) +sebsd_proc_check_mprotect(struct ucred *cred, struct proc *proc, + void *addr, size_t size, int prot) { + /* XXX - check that stack is not being made executable */ +#ifdef notyet u_int32_t av; /* @@ -2959,6 +2961,7 @@ return (vnode_has_perm(cred, vp, NULL, av)); } +#endif return (0); } @@ -3634,6 +3637,7 @@ .mpo_port_check_hold_receive = sebsd_port_check_hold_recv, .mpo_proc_check_debug = sebsd_proc_check_debug, .mpo_proc_check_getaudit = sebsd_proc_check_getaudit, + .mpo_proc_check_mprotect = sebsd_proc_check_mprotect, .mpo_proc_check_sched = sebsd_proc_check_sched, .mpo_proc_check_setaudit = sebsd_proc_check_setaudit, .mpo_proc_check_setlcid = sebsd_proc_check_setlcid, @@ -3678,7 +3682,6 @@ // .mpo_vnode_check_kqfilter = sebsd_vnode_check_kqfilter, .mpo_vnode_check_link = sebsd_vnode_check_link, .mpo_vnode_check_lookup = sebsd_vnode_check_lookup, - .mpo_vnode_check_mprotect = sebsd_vnode_check_mprotect, .mpo_vnode_check_open = sebsd_vnode_check_open, .mpo_vnode_check_read = sebsd_vnode_check_read, .mpo_vnode_check_readdir = sebsd_vnode_check_readdir, ==== //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#8 (text+ko) ==== @@ -333,13 +333,6 @@ } static int -vanity_vnode_check_mprotect(struct ucred *cred, struct vnode *vp, struct label *label, int prot) -{ - VANITY(vp); - return (0); -} - -static int vanity_vnode_check_open(struct ucred *cred, struct vnode *vp, struct label *label, int acc_mode) { VANITY(vp); @@ -508,7 +501,6 @@ .mpo_vnode_check_link = vanity_vnode_check_link, .mpo_vnode_check_listextattr = vanity_vnode_check_listextattr, .mpo_vnode_check_lookup = vanity_vnode_check_lookup, - .mpo_vnode_check_mprotect = vanity_vnode_check_mprotect, .mpo_vnode_check_open = vanity_vnode_check_open, .mpo_vnode_check_read = vanity_vnode_check_read, .mpo_vnode_check_readdir = vanity_vnode_check_readdir, From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:49:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6E61916A415; Tue, 14 Nov 2006 18:49:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4CF2E16A403 for ; Tue, 14 Nov 2006 18:49:13 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EE8D843D69 for ; Tue, 14 Nov 2006 18:49:12 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEInClK011118 for ; Tue, 14 Nov 2006 18:49:12 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEInCT0011115 for perforce@freebsd.org; Tue, 14 Nov 2006 18:49:12 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:49:12 GMT Message-Id: <200611141849.kAEInCT0011115@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109956 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:49:13 -0000 http://perforce.freebsd.org/chv.cgi?CH=109956 Change 109956 by millert@millert_g5tower on 2006/11/14 18:48:37 Validate MLS label on externalize. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#20 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#20 (text+ko) ==== @@ -785,6 +785,9 @@ mac_mls = SLOT(label); + if (mac_mls_valid(mac_mls)) + return (ENOENT); + return (mac_mls_to_string(sb, mac_mls)); } From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:50:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 035E916A417; Tue, 14 Nov 2006 18:50:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC74116A412 for ; Tue, 14 Nov 2006 18:50:15 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0FB3D43D49 for ; Tue, 14 Nov 2006 18:50:15 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIoFGU011283 for ; Tue, 14 Nov 2006 18:50:15 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIoEgf011279 for perforce@freebsd.org; Tue, 14 Nov 2006 18:50:14 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:50:14 GMT Message-Id: <200611141850.kAEIoEgf011279@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109957 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:50:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=109957 Change 109957 by millert@millert_g5tower on 2006/11/14 18:49:39 - Add accessor function to get p{sem,shm}info from p{sem,shm}node. - Move filesystem specific labeling out of devfs/fdesc. - Provide protoypes in devfsdefs.h to quiet warnings. - Export fdesc.h to kernel build. - Add mac_vnode_label_associate(). - Change mac_vnode_label_associate_file() to return int. - Shuffle and update includes for mac_vfs.c - Default to MULTILABEL for fdesc. - Handle labeling of non FD vnodes in mac_vnode_label_associate_file() - Remove vnode locking from mac_vnode_label_associate_file(). - Add comments about possible locking needs in mac_vnode_label_associate_file(). - Get Posix SEM/SHM info struct from fileglob data via accessor. - Don't mark vnodes as 'LABELED' if vnode is not cachable. This will cause label association each time the vnode is requested. - Don't try default xattr implementation on EPERM from VNOP. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/posix_sem.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/posix_shm.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfsdefs.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc_vnops.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_sem.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_shm.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#14 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#22 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#17 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs_subr.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#36 edit .. //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#16 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/posix_sem.c#4 (text+ko) ==== @@ -1083,3 +1083,11 @@ { return (ENOTSUP); } + +struct pseminfo * +psemnodeinfo (struct psemnode *node) +{ + if (node == NULL) + return (NULL); + return (node->pinfo); +} ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/posix_shm.c#4 (text+ko) ==== @@ -1084,3 +1084,11 @@ { return(ENOTSUP); } + +struct pshminfo * +pshmnodeinfo (struct pshmnode *node) +{ + if (node == NULL) + return (NULL); + return (node->pinfo); +} ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#6 (text+ko) ==== @@ -1076,22 +1076,6 @@ } } -#ifdef MAC - vnode_lock(vn_p); - if ((vn_p->v_lflag & VL_LABELED) == 0) { - vn_p->v_lflag |= VL_LABEL; - mac_vnode_label_associate_devfs(dnp->dn_dvm->mount, dnp, vn_p); - - vn_p->v_lflag |= VL_LABELED; - vn_p->v_lflag &= ~VL_LABEL; - if (vn_p->v_lflag & VL_LABELWAIT) { - vn_p->v_lflag &= ~VL_LABELWAIT; - wakeup(vn_p->v_label); - } - } - vnode_unlock(vn_p); -#endif - dnp->dn_lflags &= ~DN_CREATE; if (dnp->dn_lflags & DN_CREATEWAIT) { dnp->dn_lflags &= ~DN_CREATEWAIT; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfsdefs.h#3 (text+ko) ==== @@ -196,6 +196,14 @@ #define DEVFS_UNLOCK() lck_mtx_unlock(&devfs_mutex) +static __inline__ void DEVFS_INCR_ENTRIES(void); +static __inline__ void DEVFS_DECR_ENTRIES(void); +static __inline__ void DEVFS_INCR_NODES(void); +static __inline__ void DEVFS_DECR_NODES(void); +static __inline__ void DEVFS_INCR_MOUNTS(void); +static __inline__ void DEVFS_DECR_MOUNTS(void); +static __inline__ void DEVFS_INCR_STRINGSPACE(int); +static __inline__ void DEVFS_DECR_STRINGSPACE(int); static __inline__ void DEVFS_INCR_ENTRIES() ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/Makefile#2 (text+ko) ==== @@ -19,10 +19,10 @@ EXPINC_SUBDIRS_I386 = \ -DATAFILES = +DATAFILES = \ + fdesc.h -PRIVATE_DATAFILES = \ - fdesc.h +PRIVATE_DATAFILES = INSTALL_MI_LIST = ${DATAFILES} ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc_vnops.c#5 (text+ko) ==== @@ -328,10 +328,6 @@ if (error) goto bad; VTOFDESC(fvp)->fd_fd = fd; -#ifdef MAC - mac_vnode_label_associate_file(proc_ucred(p), - p->p_fd->fd_ofiles[fd]->f_fglob, fvp); -#endif *vpp = fvp; return (0); } ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_sem.h#2 (text+ko) ==== @@ -62,6 +62,8 @@ struct label * psem_label; }; +struct pseminfo * psemnodeinfo (struct psemnode *); + #define PSEMINFO_NULL (struct pseminfo *)0 #define PSEM_NONE 1 ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_shm.h#2 (text+ko) ==== @@ -65,6 +65,9 @@ #endif /* DIAGNOSTIC */ struct label * pshm_label; }; + +struct pshminfo * pshmnodeinfo (struct pshmnode *node); + #define PSHMINFO_NULL (struct pshminfo *)0 #define PSHM_NONE 1 ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#14 (text+ko) ==== @@ -144,11 +144,12 @@ * Labeling event operations: file system objects, and things that * look a lot like file system objects. */ +int mac_vnode_label_associate(struct mount *mp, struct vnode *vp, vfs_context_t ctx); void mac_vnode_label_associate_devfs(struct mount *mp, struct devnode *de, struct vnode *vp); int mac_vnode_label_associate_extattr(struct mount *mp, struct vnode *vp); void mac_vnode_label_associate_singlelabel(struct mount *mp, struct vnode *vp); -void mac_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, +int mac_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, struct vnode *vp); void mac_devfs_label_associate_device(dev_t dev, struct devnode *de, const char *fullpath); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#22 (text+ko) ==== @@ -1444,6 +1444,22 @@ ); /** + @brief Associate a user credential with a vnode + @param cred User credential + @param vp Vnode to label + @param vlabel Label associated with vp + + Associate label information for the vnode, vp, with a + user credential. + The label should be stored in the supplied vlabel parameter. +*/ +typedef void mpo_vnode_label_associate_cred_t( + struct ucred *cred, + struct vnode *vp, + struct label *vlabel +); + +/** @brief Associate a file label with a vnode @param cred User credential @param fg Fileglob structure @@ -5426,6 +5442,7 @@ mpo_vnode_label_associate_posixsem_t *mpo_vnode_label_associate_posixsem; mpo_vnode_label_associate_posixshm_t *mpo_vnode_label_associate_posixshm; mpo_vnode_label_associate_pipe_t *mpo_vnode_label_associate_pipe; + mpo_vnode_label_associate_cred_t *mpo_vnode_label_associate_cred; mpo_vnode_label_associate_file_t *mpo_vnode_label_associate_file; mpo_devfs_label_associate_device_t *mpo_devfs_label_associate_device; mpo_devfs_label_associate_directory_t *mpo_devfs_label_associate_directory; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#17 (text+ko) ==== @@ -36,19 +36,22 @@ */ #include -#include -#include -#include +#include +#include +#include #include + +#include #include -#include #include -#include -#include -#include #include #include #include +#include +#include + +#include +#include #include @@ -246,13 +249,49 @@ vp->v_label); } +int +mac_vnode_label_associate(struct mount *mp, struct vnode *vp, vfs_context_t ctx) +{ + struct devnode *dnp; + struct fdescnode *fnp; + struct fileglob *fg; + struct proc *p; + int error; + int fd; + + error = 0; + + /* XXX: should not inspect v_tag in kernel! */ + switch (vp->v_tag) { + case VT_DEVFS: + dnp = VTODN(vp); + mac_vnode_label_associate_devfs(mp, dnp, vp); + break; + case VT_FDESC: + fnp = VTOFDESC(vp); + p = vfs_context_proc(ctx); + fd = fnp->fd_fd; + fg = fd != -1 ? p->p_fd->fd_ofiles[fd]->f_fglob : NULL; + error = mac_vnode_label_associate_file(vfs_context_ucred(ctx), + fg, vp); + break; + default: + error = mac_vnode_label_associate_extattr(mp, vp); + break; + } + + return (error); +} + void mac_vnode_label_associate_devfs(struct mount *mp, struct devnode *de, struct vnode *vp) { - MAC_PERFORM(vnode_label_associate_devfs, mp, mp ? mp->mnt_mntlabel : NULL, de, - de->dn_label, vp, vp->v_label); + MAC_PERFORM(vnode_label_associate_devfs, + mp, mp ? mp->mnt_mntlabel : NULL, + de, de->dn_label, + vp, vp->v_label); } int @@ -739,6 +778,10 @@ if (strcmp(mp->mnt_vfsstat.f_fstypename, "fdesc") == 0) mp->mnt_flag |= MNT_MULTILABEL; + /* MULTILABEL on FDESC. */ + if (strcmp(mp->mnt_vfsstat.f_fstypename, "fdesc") == 0) + mp->mnt_flag |= MNT_MULTILABEL; + /* MULTILABEL on all NFS filesystems. */ if (strcmp(mp->mnt_vfsstat.f_fstypename, "nfs") == 0) mp->mnt_flag |= MNT_MULTILABEL; @@ -895,7 +938,7 @@ return (0); } -void +int mac_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, struct vnode *vp) { @@ -904,50 +947,61 @@ struct xsocket xso; struct socket *so; struct pipe *cpipe; + struct vnode *fvp; + int error; + /* + * If no backing file, use the cred label. + */ + if (fg == NULL) { + MAC_PERFORM(vnode_label_associate_cred, cred, + vp, vp->v_label); + return (0); + } + switch (fg->fg_type) { case DTYPE_VNODE: - vnode_lock(vp); - MAC_PERFORM(vnode_label_copy, - ((struct vnode *)fg->fg_data)->v_label, vp->v_label); - vnode_unlock(vp); + fvp = (struct vnode *)fg->fg_data; + if ((error = vnode_getwithref(fvp))) + return (error); + MAC_PERFORM(vnode_label_copy, fvp->v_label, vp->v_label); + (void)vnode_put(fvp); break; case DTYPE_SOCKET: so = (struct socket *)fg->fg_data; sotoxsocket(so, &xso); - vnode_lock(vp); MAC_PERFORM(vnode_label_associate_socket, cred, &xso, so->so_label, vp, vp->v_label); - vnode_unlock(vp); break; case DTYPE_PSXSHM: - pshm = (struct pshminfo *)fg->fg_data; - vnode_lock(vp); + /* XXX: should hold the PSHM_SUBSYS lock. */ + pshm = pshmnodeinfo((struct pshmnode *)fg->fg_data); + if (pshm == NULL) + return (EINVAL); MAC_PERFORM(vnode_label_associate_posixshm, cred, pshm, pshm->pshm_label, vp, vp->v_label); - vnode_unlock(vp); break; case DTYPE_PSXSEM: - psem = (struct pseminfo *)fg->fg_data; - vnode_lock(vp); + /* XXX: should hold the PSEM_SUBSYS lock. */ + psem = psemnodeinfo((struct psemnode *)fg->fg_data); + if (psem == NULL) + return (EINVAL); MAC_PERFORM(vnode_label_associate_posixsem, cred, psem, psem->psem_label, vp, vp->v_label); vnode_unlock(vp); break; case DTYPE_PIPE: + /* XXX: should PIPE_LOCK */ cpipe = (struct pipe *)fg->fg_data; - vnode_lock(vp); MAC_PERFORM(vnode_label_associate_pipe, cred, cpipe, cpipe->pipe_label, vp, vp->v_label); - vnode_unlock(vp); break; case DTYPE_KQUEUE: case DTYPE_FSEVENTS: default: - vnode_lock(vp); MAC_PERFORM(vnode_label_associate_file, cred, fg, fg->fg_label, vp, vp->v_label); - vnode_unlock(vp); break; } + return (0); } ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs_subr.c#7 (text+ko) ==== @@ -1,7 +1,6 @@ #include #include #include -#include #include #include #include @@ -46,10 +45,10 @@ error = mac_vnode_notify_create(vfs_context_ucred(ctx), mp, dvp, vp, cnp); else - error = mac_vnode_label_associate_extattr(mp, vp); + error = mac_vnode_label_associate(mp, vp, ctx); vnode_lock(vp); - if (error == 0) + if ((error == 0) && (vp->v_flag & VNCACHEABLE)) vp->v_lflag |= VL_LABELED; vp->v_lflag &= ~VL_LABEL; if (vp->v_lflag & VL_LABELWAIT) { @@ -88,19 +87,22 @@ int vnode_label1(struct vnode *vp) { + struct vfs_context ctx; int error; error = 0; + ctx.vc_proc = current_proc(); + ctx.vc_ucred = kauth_cred_get(); if ((vp->v_lflag & (VL_LABEL|VL_LABELED)) == 0) { vp->v_lflag |= VL_LABEL; /* Could sleep on disk I/O, drop lock. */ vnode_unlock(vp); - error = mac_vnode_label_associate_extattr(vnode_mount(vp), vp); + error = mac_vnode_label_associate(vnode_mount(vp), vp, &ctx); vnode_lock(vp); - if (error == 0) + if ((error == 0) && (vp->v_flag & VNCACHEABLE)) vp->v_lflag |= VL_LABELED; vp->v_lflag &= ~VL_LABEL; if (vp->v_lflag & VL_LABELWAIT) { @@ -183,7 +185,7 @@ uio_addiov(auio, CAST_USER_ADDR_T(buf), len); error = VNOP_GETXATTR(vp, name, auio, attrlen, 0, &context); - if (error == ENOTSUP || error == EPERM) + if (error == ENOTSUP) error = default_getxattr(vp, name, auio, attrlen, 0, &context); *attrlen = len - uio_resid(auio); @@ -200,7 +202,7 @@ context.vc_ucred = kauth_cred_get(); error = VNOP_REMOVEXATTR(vp, name, 0, &context); - if (error == ENOTSUP || error == EPERM) + if (error == ENOTSUP) error = default_removexattr(vp, name, 0, &context); return (error); ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#36 (text+ko) ==== @@ -753,6 +753,20 @@ } static void +sebsd_vnode_label_associate_cred(struct ucred *cred, struct vnode *vp, + struct label *vlabel) +{ + struct task_security_struct *tsec; + struct vnode_security_struct *vsec; + + tsec = SLOT(cred->cr_label); + vsec = SLOT(vlabel); + + vsec->sid = vsec->task_sid = tsec->sid; + vsec->sclass = SECCLASS_FILE; /* XXX */ +} + +static void sebsd_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, struct label *fglabel, struct vnode *vp, struct label *vlabel) { @@ -766,7 +780,7 @@ vsec->sid = fsec->sid; vsec->task_sid = tsec->sid; - vsec->sclass = SECCLASS_FILE; + vsec->sclass = SECCLASS_FILE; /* XXX */ } static void @@ -3611,6 +3625,7 @@ .mpo_vnode_label_associate_posixsem = sebsd_vnode_label_associate_posixsem, .mpo_vnode_label_associate_posixshm = sebsd_vnode_label_associate_posixshm, .mpo_vnode_label_associate_pipe = sebsd_vnode_label_associate_pipe, + .mpo_vnode_label_associate_cred = sebsd_vnode_label_associate_cred, .mpo_vnode_label_associate_file = sebsd_vnode_label_associate_file, .mpo_devfs_label_update = sebsd_devfs_update, ==== //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#16 (text+ko) ==== @@ -1183,6 +1183,17 @@ } static void +mac_test_vnode_label_associate_cred(struct ucred *cred, struct vnode *vp, + struct label *vlabel) +{ + CHECKNULL(cred); + CHECKNULL(vp); + + INIT_LABEL(vlabel, VNODETYPE); + USE_LABEL(cred->cr_label, CREDTYPE); +} + +static void mac_test_devfs_label_associate_device(dev_t dev, struct devnode *de, struct label *label, const char *fullpath) { @@ -1911,6 +1922,7 @@ mac_test_vnode_label_associate_posixshm, .mpo_vnode_label_associate_pipe = mac_test_vnode_label_associate_pipe, .mpo_vnode_label_associate_file = mac_test_vnode_label_associate_file, + .mpo_vnode_label_associate_cred = mac_test_vnode_label_associate_cred, .mpo_devfs_label_associate_device= mac_test_devfs_label_associate_device, .mpo_devfs_label_associate_directory= From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:50:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5302916A541; Tue, 14 Nov 2006 18:50:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D9AD316A415 for ; Tue, 14 Nov 2006 18:50:15 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 65ABA43D4C for ; Tue, 14 Nov 2006 18:50:15 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIoF0Y011290 for ; Tue, 14 Nov 2006 18:50:15 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIoFMb011286 for perforce@freebsd.org; Tue, 14 Nov 2006 18:50:15 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:50:15 GMT Message-Id: <200611141850.kAEIoFMb011286@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109958 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:50:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=109958 Change 109958 by millert@millert_g5tower on 2006/11/14 18:50:05 Forward decl for struct ps[eh]mnode. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_sem.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_shm.h#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_sem.h#3 (text+ko) ==== @@ -62,6 +62,7 @@ struct label * psem_label; }; +struct psemnode; struct pseminfo * psemnodeinfo (struct psemnode *); #define PSEMINFO_NULL (struct pseminfo *)0 ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/sys/posix_shm.h#3 (text+ko) ==== @@ -66,6 +66,7 @@ struct label * pshm_label; }; +struct pshmnode; struct pshminfo * pshmnodeinfo (struct pshmnode *node); #define PSHMINFO_NULL (struct pshminfo *)0 From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:51:17 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A98BB16A40F; Tue, 14 Nov 2006 18:51:17 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FE8916A403 for ; Tue, 14 Nov 2006 18:51:17 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3141643D49 for ; Tue, 14 Nov 2006 18:51:17 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIpHnK011988 for ; Tue, 14 Nov 2006 18:51:17 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIpGld011982 for perforce@freebsd.org; Tue, 14 Nov 2006 18:51:16 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:51:16 GMT Message-Id: <200611141851.kAEIpGld011982@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109959 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:51:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=109959 Change 109959 by millert@millert_g5tower on 2006/11/14 18:50:32 Remove obsolete comment; there is no more mach_init. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_process.c#12 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_process.c#12 (text+ko) ==== @@ -165,11 +165,6 @@ /* * Initialize MAC label for the first userland process, from which other * userland processes and threads are spawned. - * - * On Darwin, proc0 forks and the child process becomes init, though - * indirectly. The kernel starts /sbin/mach_init, which subsequently - * forks and the *parent* execs /sbin/init. This leaves proc1 as - * /sbin/init and proc2 as /sbin/mach_init. */ void mac_cred_label_associate_user(struct ucred *cred) From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:51:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4639B16A565; Tue, 14 Nov 2006 18:51:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2410216A562 for ; Tue, 14 Nov 2006 18:51:18 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A3E6143D49 for ; Tue, 14 Nov 2006 18:51:17 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIpH2e012001 for ; Tue, 14 Nov 2006 18:51:17 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIpHL4011995 for perforce@freebsd.org; Tue, 14 Nov 2006 18:51:17 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:51:17 GMT Message-Id: <200611141851.kAEIpHL4011995@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109960 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:51:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=109960 Change 109960 by millert@millert_g5tower on 2006/11/14 18:51:12 Rename mac_vnode_label_associate_file() to mac_vnode_label_associate_fdesc() and pass in a richer set of args. With this we no longer need a vnode_label_associate_cred entry point. The policy itself can decide whether to fall back to the cred or mount label in the abscence of a file label. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#15 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#23 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#18 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#15 (text+ko) ==== @@ -56,6 +56,7 @@ struct bpf_d; struct componentname; struct devnode; +struct fdescnode; struct fileglob; struct ifnet; struct lctx; @@ -149,8 +150,8 @@ struct vnode *vp); int mac_vnode_label_associate_extattr(struct mount *mp, struct vnode *vp); void mac_vnode_label_associate_singlelabel(struct mount *mp, struct vnode *vp); -int mac_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, - struct vnode *vp); +int mac_vnode_label_associate_fdesc(struct mount *mp, struct fdescnode *fnp, + struct vnode *vp, vfs_context_t ctx); void mac_devfs_label_associate_device(dev_t dev, struct devnode *de, const char *fullpath); void mac_devfs_label_associate_directory(char *dirname, int dirnamelen, ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#23 (text+ko) ==== @@ -1462,6 +1462,8 @@ /** @brief Associate a file label with a vnode @param cred User credential + @param mp Fdesc mount point + @param mntlabel Fdesc mount point label @param fg Fileglob structure @param label Policy label for fg @param vp Vnode to label @@ -1473,6 +1475,8 @@ */ typedef void mpo_vnode_label_associate_file_t( struct ucred *cred, + struct mount *mp, + struct label *mntlabel, struct fileglob *fg, struct label *label, struct vnode *vp, ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#18 (text+ko) ==== @@ -256,8 +256,7 @@ struct fdescnode *fnp; struct fileglob *fg; struct proc *p; - int error; - int fd; + int error, fd; error = 0; @@ -269,11 +268,7 @@ break; case VT_FDESC: fnp = VTOFDESC(vp); - p = vfs_context_proc(ctx); - fd = fnp->fd_fd; - fg = fd != -1 ? p->p_fd->fd_ofiles[fd]->f_fglob : NULL; - error = mac_vnode_label_associate_file(vfs_context_ucred(ctx), - fg, vp); + error = mac_vnode_label_associate_fdesc(mp, fnp, vp, ctx); break; default: error = mac_vnode_label_associate_extattr(mp, vp); @@ -778,10 +773,6 @@ if (strcmp(mp->mnt_vfsstat.f_fstypename, "fdesc") == 0) mp->mnt_flag |= MNT_MULTILABEL; - /* MULTILABEL on FDESC. */ - if (strcmp(mp->mnt_vfsstat.f_fstypename, "fdesc") == 0) - mp->mnt_flag |= MNT_MULTILABEL; - /* MULTILABEL on all NFS filesystems. */ if (strcmp(mp->mnt_vfsstat.f_fstypename, "nfs") == 0) mp->mnt_flag |= MNT_MULTILABEL; @@ -939,9 +930,10 @@ } int -mac_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, - struct vnode *vp) +mac_vnode_label_associate_fdesc(struct mount *mp, struct fdescnode *fnp, + struct vnode *vp, vfs_context_t ctx) { + struct fileglob *fg; struct pseminfo *psem; struct pshminfo *pshm; struct xsocket xso; @@ -951,14 +943,15 @@ int error; /* - * If no backing file, use the cred label. + * If no backing file, let the policy choose which label to use. */ - if (fg == NULL) { - MAC_PERFORM(vnode_label_associate_cred, cred, - vp, vp->v_label); + if (fnp->fd_fd == -1) { + MAC_PERFORM(vnode_label_associate_file, vfs_context_ucred(ctx), + mp, mp->mnt_mntlabel, NULL, NULL, vp, vp->v_label); return (0); } + fg = (*fdfile(vfs_context_proc(ctx), fnp->fd_fd))->f_fglob; switch (fg->fg_type) { case DTYPE_VNODE: fvp = (struct vnode *)fg->fg_data; @@ -970,37 +963,40 @@ case DTYPE_SOCKET: so = (struct socket *)fg->fg_data; sotoxsocket(so, &xso); - MAC_PERFORM(vnode_label_associate_socket, cred, &xso, - so->so_label, vp, vp->v_label); + MAC_PERFORM(vnode_label_associate_socket, + vfs_context_ucred(ctx), &xso, so->so_label, + vp, vp->v_label); break; case DTYPE_PSXSHM: /* XXX: should hold the PSHM_SUBSYS lock. */ pshm = pshmnodeinfo((struct pshmnode *)fg->fg_data); if (pshm == NULL) return (EINVAL); - MAC_PERFORM(vnode_label_associate_posixshm, cred, pshm, - pshm->pshm_label, vp, vp->v_label); + MAC_PERFORM(vnode_label_associate_posixshm, + vfs_context_ucred(ctx), pshm, pshm->pshm_label, + vp, vp->v_label); break; case DTYPE_PSXSEM: /* XXX: should hold the PSEM_SUBSYS lock. */ psem = psemnodeinfo((struct psemnode *)fg->fg_data); if (psem == NULL) return (EINVAL); - MAC_PERFORM(vnode_label_associate_posixsem, cred, psem, - psem->psem_label, vp, vp->v_label); + MAC_PERFORM(vnode_label_associate_posixsem, + vfs_context_ucred(ctx), psem, psem->psem_label, + vp, vp->v_label); vnode_unlock(vp); break; case DTYPE_PIPE: /* XXX: should PIPE_LOCK */ cpipe = (struct pipe *)fg->fg_data; - MAC_PERFORM(vnode_label_associate_pipe, cred, cpipe, - cpipe->pipe_label, vp, vp->v_label); + MAC_PERFORM(vnode_label_associate_pipe, vfs_context_ucred(ctx), + cpipe, cpipe->pipe_label, vp, vp->v_label); break; case DTYPE_KQUEUE: case DTYPE_FSEVENTS: default: - MAC_PERFORM(vnode_label_associate_file, cred, fg, fg->fg_label, - vp, vp->v_label); + MAC_PERFORM(vnode_label_associate_file, vfs_context_ucred(ctx), + mp, mp->mnt_mntlabel, fg, fg->fg_label, vp, vp->v_label); break; } return (0); From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:52:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1C73516A5B1; Tue, 14 Nov 2006 18:52:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AF2BB16A5AD for ; Tue, 14 Nov 2006 18:52:20 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5B0243D5E for ; Tue, 14 Nov 2006 18:52:19 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIqJ1s012358 for ; Tue, 14 Nov 2006 18:52:19 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIqJmP012355 for perforce@freebsd.org; Tue, 14 Nov 2006 18:52:19 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:52:19 GMT Message-Id: <200611141852.kAEIqJmP012355@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109961 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:52:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=109961 Change 109961 by millert@millert_g5tower on 2006/11/14 18:51:31 g/c mpo_vnode_label_associate_cred Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#24 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#24 (text+ko) ==== @@ -1444,22 +1444,6 @@ ); /** - @brief Associate a user credential with a vnode - @param cred User credential - @param vp Vnode to label - @param vlabel Label associated with vp - - Associate label information for the vnode, vp, with a - user credential. - The label should be stored in the supplied vlabel parameter. -*/ -typedef void mpo_vnode_label_associate_cred_t( - struct ucred *cred, - struct vnode *vp, - struct label *vlabel -); - -/** @brief Associate a file label with a vnode @param cred User credential @param mp Fdesc mount point @@ -5446,7 +5430,6 @@ mpo_vnode_label_associate_posixsem_t *mpo_vnode_label_associate_posixsem; mpo_vnode_label_associate_posixshm_t *mpo_vnode_label_associate_posixshm; mpo_vnode_label_associate_pipe_t *mpo_vnode_label_associate_pipe; - mpo_vnode_label_associate_cred_t *mpo_vnode_label_associate_cred; mpo_vnode_label_associate_file_t *mpo_vnode_label_associate_file; mpo_devfs_label_associate_device_t *mpo_devfs_label_associate_device; mpo_devfs_label_associate_directory_t *mpo_devfs_label_associate_directory; From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:53:22 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0372616A4D8; Tue, 14 Nov 2006 18:53:22 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B88CB16A412 for ; Tue, 14 Nov 2006 18:53:21 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8943443D46 for ; Tue, 14 Nov 2006 18:53:21 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIrLNJ012750 for ; Tue, 14 Nov 2006 18:53:21 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIrLEc012745 for perforce@freebsd.org; Tue, 14 Nov 2006 18:53:21 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:53:21 GMT Message-Id: <200611141853.kAEIrLEc012745@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109962 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:53:22 -0000 http://perforce.freebsd.org/chv.cgi?CH=109962 Change 109962 by millert@millert_g5tower on 2006/11/14 18:52:51 Adapt vnode_label_associate_file(), remove vnode_label_associate_cred() Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#37 edit .. //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#17 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#37 (text+ko) ==== @@ -753,34 +753,33 @@ } static void -sebsd_vnode_label_associate_cred(struct ucred *cred, struct vnode *vp, - struct label *vlabel) -{ - struct task_security_struct *tsec; - struct vnode_security_struct *vsec; - - tsec = SLOT(cred->cr_label); - vsec = SLOT(vlabel); - - vsec->sid = vsec->task_sid = tsec->sid; - vsec->sclass = SECCLASS_FILE; /* XXX */ -} - -static void -sebsd_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, +sebsd_vnode_label_associate_file(struct ucred *cred, struct mount *mp, + struct label *mntlabel, struct fileglob *fg, struct label *fglabel, struct vnode *vp, struct label *vlabel) { struct task_security_struct *tsec; struct file_security_struct *fsec; struct vnode_security_struct *vsec; + struct mount_security_struct *sbsec; tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); vsec = SLOT(vlabel); + vsec->task_sid = tsec->sid; + vsec->sclass = vnode_type_to_security_class(vp->v_type); - vsec->sid = fsec->sid; - vsec->task_sid = tsec->sid; - vsec->sclass = SECCLASS_FILE; /* XXX */ + /* + * Use file label if it exists, otherwise fall back + * on mount or cred labels. + */ + if (fglabel) { + fsec = SLOT(fglabel); + vsec->sid = fsec->sid; + } else if (mntlabel) { + sbsec = SLOT(mntlabel); + vsec->sid = sbsec->sid; + } else { + vsec->sid = tsec->sid; + } } static void @@ -3625,7 +3624,6 @@ .mpo_vnode_label_associate_posixsem = sebsd_vnode_label_associate_posixsem, .mpo_vnode_label_associate_posixshm = sebsd_vnode_label_associate_posixshm, .mpo_vnode_label_associate_pipe = sebsd_vnode_label_associate_pipe, - .mpo_vnode_label_associate_cred = sebsd_vnode_label_associate_cred, .mpo_vnode_label_associate_file = sebsd_vnode_label_associate_file, .mpo_devfs_label_update = sebsd_devfs_update, ==== //depot/projects/trustedbsd/sedarwin8/policies/test/mac_test.c#17 (text+ko) ==== @@ -1171,26 +1171,21 @@ } static void -mac_test_vnode_label_associate_file(struct ucred *cred, struct fileglob *fg, - struct label *fglabel, struct vnode *vp, struct label *vlabel) +mac_test_vnode_label_associate_file(struct ucred *cred, struct mount *mp, + struct label *mntlabel, struct fileglob *fg, struct label *fglabel, + struct vnode *vp, struct label *vlabel) { CHECKNULL(cred); - CHECKNULL(fg); CHECKNULL(vp); INIT_LABEL(vlabel, VNODETYPE); - USE_LABEL(fglabel, FILETYPE); -} -static void -mac_test_vnode_label_associate_cred(struct ucred *cred, struct vnode *vp, - struct label *vlabel) -{ - CHECKNULL(cred); - CHECKNULL(vp); - - INIT_LABEL(vlabel, VNODETYPE); - USE_LABEL(cred->cr_label, CREDTYPE); + if (fglabel) { + CHECKNULL(fg); + USE_LABEL(fglabel, FILETYPE); + } else { + USE_LABEL(cred->cr_label, CREDTYPE); + } } static void @@ -1922,7 +1917,6 @@ mac_test_vnode_label_associate_posixshm, .mpo_vnode_label_associate_pipe = mac_test_vnode_label_associate_pipe, .mpo_vnode_label_associate_file = mac_test_vnode_label_associate_file, - .mpo_vnode_label_associate_cred = mac_test_vnode_label_associate_cred, .mpo_devfs_label_associate_device= mac_test_devfs_label_associate_device, .mpo_devfs_label_associate_directory= From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:54:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD2FF16A514; Tue, 14 Nov 2006 18:54:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8692016A500 for ; Tue, 14 Nov 2006 18:54:25 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BEC4643D45 for ; Tue, 14 Nov 2006 18:54:23 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIsNjN013007 for ; Tue, 14 Nov 2006 18:54:23 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIsNCA013004 for perforce@freebsd.org; Tue, 14 Nov 2006 18:54:23 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:54:23 GMT Message-Id: <200611141854.kAEIsNCA013004@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109963 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:54:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=109963 Change 109963 by millert@millert_g5tower on 2006/11/14 18:53:27 Add mac_task_get_label() to return a label's task; you must already be holding a reference to the task for this to be safe. An alternate approach would be for mac_task_get_label() to take a reference to the label handle itself, but this would require the caller to drop the handle which is not possible due to struct task * being opaque. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/kern/task.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_mach_internal.h#9 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/osfmk/kern/task.c#7 (text+ko) ==== @@ -1760,4 +1760,10 @@ lh_check_unlock(oldlabel); tasklabel_unlock(task); } + +struct label * +mac_task_get_label(struct task *task) +{ + return (&task->maclabel); +} #endif ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_mach_internal.h#9 (text+ko) ==== @@ -46,6 +46,7 @@ void mac_task_label_associate_kernel(struct task *, struct label *, struct label *); void mac_task_label_modify( struct task *pt, void *arg, void (*f)(struct label *l, void *arg)); +struct label *mac_task_get_label(struct task *task); /* ports */ void mac_port_label_init(struct label *l); From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:54:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E097A16A51A; Tue, 14 Nov 2006 18:54:27 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E61816A500 for ; Tue, 14 Nov 2006 18:54:27 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31D1343D62 for ; Tue, 14 Nov 2006 18:54:24 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIsNMt013014 for ; Tue, 14 Nov 2006 18:54:23 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIsNQW013010 for perforce@freebsd.org; Tue, 14 Nov 2006 18:54:23 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:54:23 GMT Message-Id: <200611141854.kAEIsNQW013010@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109964 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:54:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=109964 Change 109964 by millert@millert_g5tower on 2006/11/14 18:53:49 Add mac_task_check_get_port() to mediate task_for_pid(). We pass in both the task and the task label to the entrypoint, though since the task is opaque it is not good for much other than getting the associated BSD process. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#16 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#25 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_task.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#38 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#16 (text+ko) ==== @@ -79,6 +79,7 @@ struct m_tag; struct vop_setlabel_args; struct pipe; +struct task; /* * Framework initialization. @@ -388,6 +389,7 @@ int mac_system_check_sysctl(struct ucred *cred, int *name, u_int namelen, void *oldctl, size_t *oldlenp, int inkernel, void *newctl, size_t newlen); +int mac_task_check_get_port(struct ucred *cred, struct task *task); int mac_vnode_check_access(struct ucred *cred, struct vnode *vp, int acc_mode); int mac_vnode_check_chdir(struct ucred *cred, struct vnode *dvp); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#25 (text+ko) ==== @@ -2150,6 +2150,26 @@ ); /** + @brief Access control check for getting a task's port + @param cred Subject credential + @param task Object task + @param tasklabel Object task's label + + Determine whether the subject identified by the credential can get + the passed task's control port. + This call is used by the task_for_pid(2) API. + + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. Suggested failure: EACCES for label mismatch, + EPERM for lack of privilege, or ESRCH to hide visibility of the target. +*/ +typedef int mpo_task_check_get_port_t( + struct ucred *cred, + struct task *task, + struct label *tasklabel +); + +/** @brief Update credential at exec time @param old Existing subject credential @param new New subject credential to be labeled @@ -5608,6 +5628,7 @@ mpo_system_check_swapon_t *mpo_system_check_swapon; mpo_system_check_swapoff_t *mpo_system_check_swapoff; mpo_system_check_sysctl_t *mpo_system_check_sysctl; + mpo_task_check_get_port_t *mpo_task_check_get_port; mpo_vnode_check_access_t *mpo_vnode_check_access; mpo_vnode_check_chdir_t *mpo_vnode_check_chdir; mpo_vnode_check_chroot_t *mpo_vnode_check_chroot; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_task.c#6 (text+ko) ==== @@ -107,3 +107,13 @@ return (error); } + +int +mac_task_check_get_port(struct ucred *cred, struct task *task) +{ + int error; + + MAC_CHECK(task_check_get_port, cred, task, mac_task_get_label(task)); + + return (error); +} ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#38 (text+ko) ==== @@ -1672,6 +1672,20 @@ } static int +sebsd_task_check_get_port(struct ucred *cred, struct task *task, + struct label *tasklabel) +{ + struct task_security_struct *subj, *obj; + + subj = SLOT(cred->cr_label); + obj = SLOT(tasklabel); + + /* XXX - need new perm, not PROCESS__PTRACE */ + return (avc_has_perm(subj->sid, obj->sid, + SECCLASS_PROCESS, PROCESS__PTRACE, NULL)); +} + +static int sebsd_proc_check_debug(struct ucred *cred, struct proc *proc) { @@ -3649,6 +3663,7 @@ .mpo_port_check_hold_send_once = sebsd_port_check_hold_send_once, .mpo_port_check_hold_receive = sebsd_port_check_hold_recv, .mpo_proc_check_debug = sebsd_proc_check_debug, + .mpo_task_check_get_port = sebsd_task_check_get_port, .mpo_proc_check_getaudit = sebsd_proc_check_getaudit, .mpo_proc_check_mprotect = sebsd_proc_check_mprotect, .mpo_proc_check_sched = sebsd_proc_check_sched, From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:54:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3D30A16A5DF; Tue, 14 Nov 2006 18:54:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C805D16A515 for ; Tue, 14 Nov 2006 18:54:27 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6DC1043D64 for ; Tue, 14 Nov 2006 18:54:24 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIsO6M013022 for ; Tue, 14 Nov 2006 18:54:24 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIsOn4013018 for perforce@freebsd.org; Tue, 14 Nov 2006 18:54:24 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:54:24 GMT Message-Id: <200611141854.kAEIsOn4013018@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109965 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:54:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=109965 Change 109965 by millert@millert_g5tower on 2006/11/14 18:54:08 Replace call to mac_proc_check_debug() in task_for_pid() with mac_task_check_get_port(). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vm/vm_unix.c#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vm/vm_unix.c#5 (text+ko) ==== @@ -407,13 +407,16 @@ ) && (p->p_stat != SZOMB) ) { + if (p->task != TASK_NULL) { + task_reference(p->task); #ifdef MAC - error = mac_proc_check_debug(kauth_cred_get(), p); - if (error) - goto noperm; + error = mac_task_check_get_port(kauth_cred_get(), + p->task); + if (error) { + task_deallocate(p->task); + goto noperm; + } #endif - if (p->task != TASK_NULL) { - task_reference(p->task); sright = (void *)convert_task_to_port(p->task); tret = ipc_port_copyout_send( sright, From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:56:29 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E649916A417; Tue, 14 Nov 2006 18:56:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BFA2D16A40F for ; Tue, 14 Nov 2006 18:56:28 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A43F243D60 for ; Tue, 14 Nov 2006 18:56:27 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIuRMX013692 for ; Tue, 14 Nov 2006 18:56:27 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIuRQw013687 for perforce@freebsd.org; Tue, 14 Nov 2006 18:56:27 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:56:27 GMT Message-Id: <200611141856.kAEIuRQw013687@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109966 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:56:29 -0000 http://perforce.freebsd.org/chv.cgi?CH=109966 Change 109966 by millert@millert_g5tower on 2006/11/14 18:55:44 setfiles lives in /sbin now Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/src/rc#4 edit .. //depot/projects/trustedbsd/sedarwin8/sefos-install.txt#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/launchd/src/rc#4 (text+ko) ==== @@ -134,7 +134,7 @@ fi # Set labels on /var/run -/sbin/setfiles /etc/sedarwin/refpolicy/contexts/files/file_contexts /var/run +/sbin/setfiles /etc/sedarwin/refpolicy/contexts/files/file_contexts /private/var/run # Clear utmp (who is logged on). touch /var/run/utmp /var/run/utmpx ==== //depot/projects/trustedbsd/sedarwin8/sefos-install.txt#4 (text+ko) ==== @@ -227,7 +227,7 @@ Now set the label on various binaries so they can transition during system startup: - # /usr/bin/setfiles /etc/sedarwin/refpolicy/contexts/files/file_contexts / + # /sbin/setfiles /etc/sedarwin/refpolicy/contexts/files/file_contexts / Skipping this step will result in the login window failing to start, login attempts failing, or the entire system not working if enforcing From owner-p4-projects@FreeBSD.ORG Tue Nov 14 18:56:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E783B16A56C; Tue, 14 Nov 2006 18:56:29 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B014016A403 for ; Tue, 14 Nov 2006 18:56:29 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 364A843D62 for ; Tue, 14 Nov 2006 18:56:28 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEIuSaM013698 for ; Tue, 14 Nov 2006 18:56:28 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEIuRg9013695 for perforce@freebsd.org; Tue, 14 Nov 2006 18:56:27 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 18:56:27 GMT Message-Id: <200611141856.kAEIuRg9013695@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109967 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 18:56:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=109967 Change 109967 by millert@millert_g5tower on 2006/11/14 18:56:21 Add task_for_pid access vector and use it instead of ptrace in sebsd_task_check_get_port(). Modify darwin policy accordingly. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/flask/access_vectors#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.te#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.te#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/loginwindow.te#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/av_perm_to_string.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/av_permissions.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#39 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/flask/access_vectors#3 (text+ko) ==== @@ -253,6 +253,7 @@ execstack execheap setkeycreate + taskforpid } ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.te#4 (text+ko) ==== @@ -57,7 +57,7 @@ allow WindowServer_t init_t:shm { read write }; # Allow WindowServer to trace loginwindow (not sure why...) -allow WindowServer_t loginwindow_t:process ptrace; +allow WindowServer_t loginwindow_t:process taskforpid; # Talk to configd configd_allow_ipc(WindowServer_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.te#5 (text+ko) ==== @@ -108,9 +108,8 @@ # Misc allow configd_t device_t:chr_file { ioctl read write }; -# configd apparently needs to ptrace things? This may be a call to task_for_pid() -allow configd_t init_t:process ptrace; -allow configd_t loginwindow_t:process ptrace; +allow configd_t init_t:process taskforpid; +allow configd_t loginwindow_t:process taskforpid; # Allow configd to load kexts allow configd_t modules_object_t:dir { read search }; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/loginwindow.te#3 (text+ko) ==== @@ -30,7 +30,7 @@ allow loginwindow_t lib_t:file execute_no_trans; allow loginwindow_t self:fd use; allow loginwindow_t self:mach_task set_special_port; -allow loginwindow_t self:process { ptrace signal }; +allow loginwindow_t self:process { taskforpid signal }; # XXX allow loginwindow_t self:shm { create read setattr write }; allow loginwindow_t self:socket { connect write }; allow loginwindow_t self:udp_socket create; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/av_perm_to_string.h#3 (text+ko) ==== @@ -73,6 +73,7 @@ S_(SECCLASS_PROCESS, PROCESS__EXECSTACK, "execstack") S_(SECCLASS_PROCESS, PROCESS__EXECHEAP, "execheap") S_(SECCLASS_PROCESS, PROCESS__SETKEYCREATE, "setkeycreate") + S_(SECCLASS_PROCESS, PROCESS__TASKFORPID, "taskforpid") S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue") S_(SECCLASS_MSG, MSG__SEND, "send") S_(SECCLASS_MSG, MSG__RECEIVE, "receive") ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/av_permissions.h#3 (text+ko) ==== @@ -16,7 +16,6 @@ #define COMMON_FILE__SWAPON 0x00004000UL #define COMMON_FILE__QUOTAON 0x00008000UL #define COMMON_FILE__MOUNTON 0x00010000UL - #define COMMON_SOCKET__IOCTL 0x00000001UL #define COMMON_SOCKET__READ 0x00000002UL #define COMMON_SOCKET__WRITE 0x00000004UL @@ -39,7 +38,6 @@ #define COMMON_SOCKET__RECV_MSG 0x00080000UL #define COMMON_SOCKET__SEND_MSG 0x00100000UL #define COMMON_SOCKET__NAME_BIND 0x00200000UL - #define COMMON_IPC__CREATE 0x00000001UL #define COMMON_IPC__DESTROY 0x00000002UL #define COMMON_IPC__GETATTR 0x00000004UL @@ -49,7 +47,6 @@ #define COMMON_IPC__ASSOCIATE 0x00000040UL #define COMMON_IPC__UNIX_READ 0x00000080UL #define COMMON_IPC__UNIX_WRITE 0x00000100UL - #define FILESYSTEM__MOUNT 0x00000001UL #define FILESYSTEM__REMOUNT 0x00000002UL #define FILESYSTEM__UNMOUNT 0x00000004UL @@ -60,7 +57,6 @@ #define FILESYSTEM__ASSOCIATE 0x00000080UL #define FILESYSTEM__QUOTAMOD 0x00000100UL #define FILESYSTEM__QUOTAGET 0x00000200UL - #define DIR__IOCTL 0x00000001UL #define DIR__READ 0x00000002UL #define DIR__WRITE 0x00000004UL @@ -78,13 +74,11 @@ #define DIR__SWAPON 0x00004000UL #define DIR__QUOTAON 0x00008000UL #define DIR__MOUNTON 0x00010000UL - #define DIR__ADD_NAME 0x00020000UL #define DIR__REMOVE_NAME 0x00040000UL #define DIR__REPARENT 0x00080000UL #define DIR__SEARCH 0x00100000UL #define DIR__RMDIR 0x00200000UL - #define FILE__IOCTL 0x00000001UL #define FILE__READ 0x00000002UL #define FILE__WRITE 0x00000004UL @@ -102,11 +96,9 @@ #define FILE__SWAPON 0x00004000UL #define FILE__QUOTAON 0x00008000UL #define FILE__MOUNTON 0x00010000UL - #define FILE__EXECUTE_NO_TRANS 0x00020000UL #define FILE__ENTRYPOINT 0x00040000UL #define FILE__EXECMOD 0x00080000UL - #define LNK_FILE__IOCTL 0x00000001UL #define LNK_FILE__READ 0x00000002UL #define LNK_FILE__WRITE 0x00000004UL @@ -124,7 +116,6 @@ #define LNK_FILE__SWAPON 0x00004000UL #define LNK_FILE__QUOTAON 0x00008000UL #define LNK_FILE__MOUNTON 0x00010000UL - #define CHR_FILE__IOCTL 0x00000001UL #define CHR_FILE__READ 0x00000002UL #define CHR_FILE__WRITE 0x00000004UL @@ -142,11 +133,9 @@ #define CHR_FILE__SWAPON 0x00004000UL #define CHR_FILE__QUOTAON 0x00008000UL #define CHR_FILE__MOUNTON 0x00010000UL - #define CHR_FILE__EXECUTE_NO_TRANS 0x00020000UL #define CHR_FILE__ENTRYPOINT 0x00040000UL #define CHR_FILE__EXECMOD 0x00080000UL - #define BLK_FILE__IOCTL 0x00000001UL #define BLK_FILE__READ 0x00000002UL #define BLK_FILE__WRITE 0x00000004UL @@ -164,7 +153,6 @@ #define BLK_FILE__SWAPON 0x00004000UL #define BLK_FILE__QUOTAON 0x00008000UL #define BLK_FILE__MOUNTON 0x00010000UL - #define SOCK_FILE__IOCTL 0x00000001UL #define SOCK_FILE__READ 0x00000002UL #define SOCK_FILE__WRITE 0x00000004UL @@ -182,7 +170,6 @@ #define SOCK_FILE__SWAPON 0x00004000UL #define SOCK_FILE__QUOTAON 0x00008000UL #define SOCK_FILE__MOUNTON 0x00010000UL - #define FIFO_FILE__IOCTL 0x00000001UL #define FIFO_FILE__READ 0x00000002UL #define FIFO_FILE__WRITE 0x00000004UL @@ -200,9 +187,7 @@ #define FIFO_FILE__SWAPON 0x00004000UL #define FIFO_FILE__QUOTAON 0x00008000UL #define FIFO_FILE__MOUNTON 0x00010000UL - #define FD__USE 0x00000001UL - #define SOCKET__IOCTL 0x00000001UL #define SOCKET__READ 0x00000002UL #define SOCKET__WRITE 0x00000004UL @@ -225,7 +210,6 @@ #define SOCKET__RECV_MSG 0x00080000UL #define SOCKET__SEND_MSG 0x00100000UL #define SOCKET__NAME_BIND 0x00200000UL - #define TCP_SOCKET__IOCTL 0x00000001UL #define TCP_SOCKET__READ 0x00000002UL #define TCP_SOCKET__WRITE 0x00000004UL @@ -248,13 +232,11 @@ #define TCP_SOCKET__RECV_MSG 0x00080000UL #define TCP_SOCKET__SEND_MSG 0x00100000UL #define TCP_SOCKET__NAME_BIND 0x00200000UL - #define TCP_SOCKET__CONNECTTO 0x00400000UL #define TCP_SOCKET__NEWCONN 0x00800000UL #define TCP_SOCKET__ACCEPTFROM 0x01000000UL #define TCP_SOCKET__NODE_BIND 0x02000000UL #define TCP_SOCKET__NAME_CONNECT 0x04000000UL - #define UDP_SOCKET__IOCTL 0x00000001UL #define UDP_SOCKET__READ 0x00000002UL #define UDP_SOCKET__WRITE 0x00000004UL @@ -277,9 +259,7 @@ #define UDP_SOCKET__RECV_MSG 0x00080000UL #define UDP_SOCKET__SEND_MSG 0x00100000UL #define UDP_SOCKET__NAME_BIND 0x00200000UL - #define UDP_SOCKET__NODE_BIND 0x00400000UL - #define RAWIP_SOCKET__IOCTL 0x00000001UL #define RAWIP_SOCKET__READ 0x00000002UL #define RAWIP_SOCKET__WRITE 0x00000004UL @@ -302,9 +282,7 @@ #define RAWIP_SOCKET__RECV_MSG 0x00080000UL #define RAWIP_SOCKET__SEND_MSG 0x00100000UL #define RAWIP_SOCKET__NAME_BIND 0x00200000UL - #define RAWIP_SOCKET__NODE_BIND 0x00400000UL - #define NODE__TCP_RECV 0x00000001UL #define NODE__TCP_SEND 0x00000002UL #define NODE__UDP_RECV 0x00000004UL @@ -312,14 +290,12 @@ #define NODE__RAWIP_RECV 0x00000010UL #define NODE__RAWIP_SEND 0x00000020UL #define NODE__ENFORCE_DEST 0x00000040UL - #define NETIF__TCP_RECV 0x00000001UL #define NETIF__TCP_SEND 0x00000002UL #define NETIF__UDP_RECV 0x00000004UL #define NETIF__UDP_SEND 0x00000008UL #define NETIF__RAWIP_RECV 0x00000010UL #define NETIF__RAWIP_SEND 0x00000020UL - #define NETLINK_SOCKET__IOCTL 0x00000001UL #define NETLINK_SOCKET__READ 0x00000002UL #define NETLINK_SOCKET__WRITE 0x00000004UL @@ -342,7 +318,6 @@ #define NETLINK_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_SOCKET__NAME_BIND 0x00200000UL - #define PACKET_SOCKET__IOCTL 0x00000001UL #define PACKET_SOCKET__READ 0x00000002UL #define PACKET_SOCKET__WRITE 0x00000004UL @@ -365,7 +340,6 @@ #define PACKET_SOCKET__RECV_MSG 0x00080000UL #define PACKET_SOCKET__SEND_MSG 0x00100000UL #define PACKET_SOCKET__NAME_BIND 0x00200000UL - #define KEY_SOCKET__IOCTL 0x00000001UL #define KEY_SOCKET__READ 0x00000002UL #define KEY_SOCKET__WRITE 0x00000004UL @@ -388,7 +362,6 @@ #define KEY_SOCKET__RECV_MSG 0x00080000UL #define KEY_SOCKET__SEND_MSG 0x00100000UL #define KEY_SOCKET__NAME_BIND 0x00200000UL - #define UNIX_STREAM_SOCKET__IOCTL 0x00000001UL #define UNIX_STREAM_SOCKET__READ 0x00000002UL #define UNIX_STREAM_SOCKET__WRITE 0x00000004UL @@ -411,11 +384,9 @@ #define UNIX_STREAM_SOCKET__RECV_MSG 0x00080000UL #define UNIX_STREAM_SOCKET__SEND_MSG 0x00100000UL #define UNIX_STREAM_SOCKET__NAME_BIND 0x00200000UL - #define UNIX_STREAM_SOCKET__CONNECTTO 0x00400000UL #define UNIX_STREAM_SOCKET__NEWCONN 0x00800000UL #define UNIX_STREAM_SOCKET__ACCEPTFROM 0x01000000UL - #define UNIX_DGRAM_SOCKET__IOCTL 0x00000001UL #define UNIX_DGRAM_SOCKET__READ 0x00000002UL #define UNIX_DGRAM_SOCKET__WRITE 0x00000004UL @@ -438,7 +409,6 @@ #define UNIX_DGRAM_SOCKET__RECV_MSG 0x00080000UL #define UNIX_DGRAM_SOCKET__SEND_MSG 0x00100000UL #define UNIX_DGRAM_SOCKET__NAME_BIND 0x00200000UL - #define PROCESS__FORK 0x00000001UL #define PROCESS__TRANSITION 0x00000002UL #define PROCESS__SIGCHLD 0x00000004UL @@ -468,7 +438,7 @@ #define PROCESS__EXECSTACK 0x04000000UL #define PROCESS__EXECHEAP 0x08000000UL #define PROCESS__SETKEYCREATE 0x10000000UL - +#define PROCESS__TASKFORPID 0x20000000UL #define IPC__CREATE 0x00000001UL #define IPC__DESTROY 0x00000002UL #define IPC__GETATTR 0x00000004UL @@ -478,7 +448,6 @@ #define IPC__ASSOCIATE 0x00000040UL #define IPC__UNIX_READ 0x00000080UL #define IPC__UNIX_WRITE 0x00000100UL - #define SEM__CREATE 0x00000001UL #define SEM__DESTROY 0x00000002UL #define SEM__GETATTR 0x00000004UL @@ -488,7 +457,6 @@ #define SEM__ASSOCIATE 0x00000040UL #define SEM__UNIX_READ 0x00000080UL #define SEM__UNIX_WRITE 0x00000100UL - #define MSGQ__CREATE 0x00000001UL #define MSGQ__DESTROY 0x00000002UL #define MSGQ__GETATTR 0x00000004UL @@ -498,12 +466,9 @@ #define MSGQ__ASSOCIATE 0x00000040UL #define MSGQ__UNIX_READ 0x00000080UL #define MSGQ__UNIX_WRITE 0x00000100UL - #define MSGQ__ENQUEUE 0x00000200UL - #define MSG__SEND 0x00000001UL #define MSG__RECEIVE 0x00000002UL - #define SHM__CREATE 0x00000001UL #define SHM__DESTROY 0x00000002UL #define SHM__GETATTR 0x00000004UL @@ -513,9 +478,7 @@ #define SHM__ASSOCIATE 0x00000040UL #define SHM__UNIX_READ 0x00000080UL #define SHM__UNIX_WRITE 0x00000100UL - #define SHM__LOCK 0x00000200UL - #define SECURITY__COMPUTE_AV 0x00000001UL #define SECURITY__COMPUTE_CREATE 0x00000002UL #define SECURITY__COMPUTE_MEMBER 0x00000004UL @@ -527,12 +490,10 @@ #define SECURITY__SETBOOL 0x00000100UL #define SECURITY__SETSECPARAM 0x00000200UL #define SECURITY__SETCHECKREQPROT 0x00000400UL - #define SYSTEM__IPC_INFO 0x00000001UL #define SYSTEM__SYSLOG_READ 0x00000002UL #define SYSTEM__SYSLOG_MOD 0x00000004UL #define SYSTEM__SYSLOG_CONSOLE 0x00000008UL - #define CAPABILITY__CHOWN 0x00000001UL #define CAPABILITY__DAC_OVERRIDE 0x00000002UL #define CAPABILITY__DAC_READ_SEARCH 0x00000004UL @@ -564,24 +525,20 @@ #define CAPABILITY__LEASE 0x10000000UL #define CAPABILITY__AUDIT_WRITE 0x20000000UL #define CAPABILITY__AUDIT_CONTROL 0x40000000UL - #define PASSWD__PASSWD 0x00000001UL #define PASSWD__CHFN 0x00000002UL #define PASSWD__CHSH 0x00000004UL #define PASSWD__ROOTOK 0x00000008UL #define PASSWD__CRONTAB 0x00000010UL - #define DRAWABLE__CREATE 0x00000001UL #define DRAWABLE__DESTROY 0x00000002UL #define DRAWABLE__DRAW 0x00000004UL #define DRAWABLE__COPY 0x00000008UL #define DRAWABLE__GETATTR 0x00000010UL - #define GC__CREATE 0x00000001UL #define GC__FREE 0x00000002UL #define GC__GETATTR 0x00000004UL #define GC__SETATTR 0x00000008UL - #define WINDOW__ADDCHILD 0x00000001UL #define WINDOW__CREATE 0x00000002UL #define WINDOW__DESTROY 0x00000004UL @@ -608,12 +565,10 @@ #define WINDOW__WINDOWCHANGEREQUEST 0x00800000UL #define WINDOW__SERVERCHANGEEVENT 0x01000000UL #define WINDOW__EXTENSIONEVENT 0x02000000UL - #define FONT__LOAD 0x00000001UL #define FONT__FREE 0x00000002UL #define FONT__GETATTR 0x00000004UL #define FONT__USE 0x00000008UL - #define COLORMAP__CREATE 0x00000001UL #define COLORMAP__FREE 0x00000002UL #define COLORMAP__INSTALL 0x00000004UL @@ -623,20 +578,16 @@ #define COLORMAP__STORE 0x00000040UL #define COLORMAP__GETATTR 0x00000080UL #define COLORMAP__SETATTR 0x00000100UL - #define PROPERTY__CREATE 0x00000001UL #define PROPERTY__FREE 0x00000002UL #define PROPERTY__READ 0x00000004UL #define PROPERTY__WRITE 0x00000008UL - #define CURSOR__CREATE 0x00000001UL #define CURSOR__CREATEGLYPH 0x00000002UL #define CURSOR__FREE 0x00000004UL #define CURSOR__ASSIGN 0x00000008UL #define CURSOR__SETATTR 0x00000010UL - #define XCLIENT__KILL 0x00000001UL - #define XINPUT__LOOKUP 0x00000001UL #define XINPUT__GETATTR 0x00000002UL #define XINPUT__SETATTR 0x00000004UL @@ -648,7 +599,6 @@ #define XINPUT__BELL 0x00000100UL #define XINPUT__MOUSEMOTION 0x00000200UL #define XINPUT__RELABELINPUT 0x00000400UL - #define XSERVER__SCREENSAVER 0x00000001UL #define XSERVER__GETHOSTLIST 0x00000002UL #define XSERVER__SETHOSTLIST 0x00000004UL @@ -657,17 +607,14 @@ #define XSERVER__GETATTR 0x00000020UL #define XSERVER__GRAB 0x00000040UL #define XSERVER__UNGRAB 0x00000080UL - #define XEXTENSION__QUERY 0x00000001UL #define XEXTENSION__USE 0x00000002UL - #define PAX__PAGEEXEC 0x00000001UL #define PAX__EMUTRAMP 0x00000002UL #define PAX__MPROTECT 0x00000004UL #define PAX__RANDMMAP 0x00000008UL #define PAX__RANDEXEC 0x00000010UL #define PAX__SEGMEXEC 0x00000020UL - #define NETLINK_ROUTE_SOCKET__IOCTL 0x00000001UL #define NETLINK_ROUTE_SOCKET__READ 0x00000002UL #define NETLINK_ROUTE_SOCKET__WRITE 0x00000004UL @@ -690,10 +637,8 @@ #define NETLINK_ROUTE_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_ROUTE_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_ROUTE_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_ROUTE_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_ROUTE_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_FIREWALL_SOCKET__IOCTL 0x00000001UL #define NETLINK_FIREWALL_SOCKET__READ 0x00000002UL #define NETLINK_FIREWALL_SOCKET__WRITE 0x00000004UL @@ -716,10 +661,8 @@ #define NETLINK_FIREWALL_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_FIREWALL_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_FIREWALL_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_FIREWALL_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_FIREWALL_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_TCPDIAG_SOCKET__IOCTL 0x00000001UL #define NETLINK_TCPDIAG_SOCKET__READ 0x00000002UL #define NETLINK_TCPDIAG_SOCKET__WRITE 0x00000004UL @@ -742,10 +685,8 @@ #define NETLINK_TCPDIAG_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_TCPDIAG_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_TCPDIAG_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_TCPDIAG_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_NFLOG_SOCKET__IOCTL 0x00000001UL #define NETLINK_NFLOG_SOCKET__READ 0x00000002UL #define NETLINK_NFLOG_SOCKET__WRITE 0x00000004UL @@ -768,7 +709,6 @@ #define NETLINK_NFLOG_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_NFLOG_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_NFLOG_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_XFRM_SOCKET__IOCTL 0x00000001UL #define NETLINK_XFRM_SOCKET__READ 0x00000002UL #define NETLINK_XFRM_SOCKET__WRITE 0x00000004UL @@ -791,10 +731,8 @@ #define NETLINK_XFRM_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_XFRM_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_XFRM_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_XFRM_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_XFRM_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_SELINUX_SOCKET__IOCTL 0x00000001UL #define NETLINK_SELINUX_SOCKET__READ 0x00000002UL #define NETLINK_SELINUX_SOCKET__WRITE 0x00000004UL @@ -817,7 +755,6 @@ #define NETLINK_SELINUX_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_SELINUX_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_SELINUX_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_AUDIT_SOCKET__IOCTL 0x00000001UL #define NETLINK_AUDIT_SOCKET__READ 0x00000002UL #define NETLINK_AUDIT_SOCKET__WRITE 0x00000004UL @@ -840,12 +777,10 @@ #define NETLINK_AUDIT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_AUDIT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_AUDIT_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_AUDIT_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_AUDIT_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_AUDIT_SOCKET__NLMSG_RELAY 0x01000000UL #define NETLINK_AUDIT_SOCKET__NLMSG_READPRIV 0x02000000UL - #define NETLINK_IP6FW_SOCKET__IOCTL 0x00000001UL #define NETLINK_IP6FW_SOCKET__READ 0x00000002UL #define NETLINK_IP6FW_SOCKET__WRITE 0x00000004UL @@ -868,10 +803,8 @@ #define NETLINK_IP6FW_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_IP6FW_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_IP6FW_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_IP6FW_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_IP6FW_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_DNRT_SOCKET__IOCTL 0x00000001UL #define NETLINK_DNRT_SOCKET__READ 0x00000002UL #define NETLINK_DNRT_SOCKET__WRITE 0x00000004UL @@ -894,10 +827,8 @@ #define NETLINK_DNRT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_DNRT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_DNRT_SOCKET__NAME_BIND 0x00200000UL - #define DBUS__ACQUIRE_SVC 0x00000001UL #define DBUS__SEND_MSG 0x00000002UL - #define NSCD__GETPWD 0x00000001UL #define NSCD__GETGRP 0x00000002UL #define NSCD__GETHOST 0x00000004UL @@ -906,12 +837,10 @@ #define NSCD__SHMEMPWD 0x00000020UL #define NSCD__SHMEMGRP 0x00000040UL #define NSCD__SHMEMHOST 0x00000080UL - #define ASSOCIATION__SENDTO 0x00000001UL #define ASSOCIATION__RECVFROM 0x00000002UL #define ASSOCIATION__SETCONTEXT 0x00000004UL #define ASSOCIATION__POLMATCH 0x00000008UL - #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL #define NETLINK_KOBJECT_UEVENT_SOCKET__WRITE 0x00000004UL @@ -934,7 +863,6 @@ #define NETLINK_KOBJECT_UEVENT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND 0x00200000UL - #define APPLETALK_SOCKET__IOCTL 0x00000001UL #define APPLETALK_SOCKET__READ 0x00000002UL #define APPLETALK_SOCKET__WRITE 0x00000004UL @@ -957,11 +885,9 @@ #define APPLETALK_SOCKET__RECV_MSG 0x00080000UL #define APPLETALK_SOCKET__SEND_MSG 0x00100000UL #define APPLETALK_SOCKET__NAME_BIND 0x00200000UL - #define PACKET__SEND 0x00000001UL #define PACKET__RECV 0x00000002UL #define PACKET__RELABELTO 0x00000004UL - #define KEY__VIEW 0x00000001UL #define KEY__READ 0x00000002UL #define KEY__WRITE 0x00000004UL @@ -969,7 +895,6 @@ #define KEY__LINK 0x00000010UL #define KEY__SETATTR 0x00000020UL #define KEY__CREATE 0x00000040UL - #define MACH_PORT__RELABELFROM 0x00000001UL #define MACH_PORT__RELABELTO 0x00000002UL #define MACH_PORT__SEND 0x00000004UL @@ -983,7 +908,5 @@ #define MACH_PORT__HOLD_SEND 0x00000400UL #define MACH_PORT__HOLD_SEND_ONCE 0x00000800UL #define MACH_PORT__HOLD_RECV 0x00001000UL - #define MACH_TASK__TERMINATE 0x00000001UL #define MACH_TASK__SET_SPECIAL_PORT 0x00000002UL - ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#39 (text+ko) ==== @@ -1680,9 +1680,8 @@ subj = SLOT(cred->cr_label); obj = SLOT(tasklabel); - /* XXX - need new perm, not PROCESS__PTRACE */ return (avc_has_perm(subj->sid, obj->sid, - SECCLASS_PROCESS, PROCESS__PTRACE, NULL)); + SECCLASS_PROCESS, PROCESS__TASKFORPID, NULL)); } static int From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:01:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A940016A47B; Tue, 14 Nov 2006 19:01:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5ED3B16A40F for ; Tue, 14 Nov 2006 19:01:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1FD743D49 for ; Tue, 14 Nov 2006 19:01:35 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEJ1ZTU014759 for ; Tue, 14 Nov 2006 19:01:35 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEJ1ZfC014756 for perforce@freebsd.org; Tue, 14 Nov 2006 19:01:35 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 19:01:35 GMT Message-Id: <200611141901.kAEJ1ZfC014756@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109969 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:01:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=109969 Change 109969 by millert@millert_g5tower on 2006/11/14 19:01:22 Install audit2allow Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/programs/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/programs/audit2allow/Makefile#1 add Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/programs/Makefile#2 (text+ko) ==== @@ -1,5 +1,5 @@ SUBDIR= avcstat checkpolicy genhomedircon load_policy newrole setfiles \ setsebool semodule semodule_expand semodule_link semodule_package \ - relabel_gui restorecon + relabel_gui restorecon audit2allow include ../../mk/subdir.mk From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:02:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3EA1316A416; Tue, 14 Nov 2006 19:02:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0478E16A40F for ; Tue, 14 Nov 2006 19:02:38 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C97CC43D4C for ; Tue, 14 Nov 2006 19:02:37 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEJ2bGw015078 for ; Tue, 14 Nov 2006 19:02:37 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEJ2bgF015075 for perforce@freebsd.org; Tue, 14 Nov 2006 19:02:37 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 19:02:37 GMT Message-Id: <200611141902.kAEJ2bgF015075@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109970 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:02:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=109970 Change 109970 by millert@millert_g5tower on 2006/11/14 19:01:44 #ifdef out unused bits Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/avc.c#9 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/avc/avc.c#9 (text+ko) ==== @@ -48,6 +48,7 @@ #include #include +#ifndef __APPLE__ static const struct av_perm_to_string { u16 tclass; @@ -83,6 +84,7 @@ #include #undef S_ }; +#endif /* __APPLE__ */ #define AVC_CACHE_SLOTS 512 #define AVC_CACHE_MAXNODES 558 From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:02:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4156116A562; Tue, 14 Nov 2006 19:02:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 885EA16A532 for ; Tue, 14 Nov 2006 19:02:38 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 25E3B43D4C for ; Tue, 14 Nov 2006 19:02:38 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEJ2cIT015096 for ; Tue, 14 Nov 2006 19:02:38 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEJ2brU015091 for perforce@freebsd.org; Tue, 14 Nov 2006 19:02:37 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 19:02:37 GMT Message-Id: <200611141902.kAEJ2brU015091@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109971 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:02:39 -0000 http://perforce.freebsd.org/chv.cgi?CH=109971 Change 109971 by millert@millert_g5tower on 2006/11/14 19:02:14 Sync generated versions of flask headers with policy. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/include/selinux/av_permissions.h#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/include/selinux/flask.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/av_inherit.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/av_perm_to_string.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/class_to_string.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/common_perm_to_string.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsepol/include/sepol/policydb/flask.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libsepol/src/av_permissions.h#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/include/selinux/av_permissions.h#4 (text+ko) ==== @@ -16,7 +16,6 @@ #define COMMON_FILE__SWAPON 0x00004000UL #define COMMON_FILE__QUOTAON 0x00008000UL #define COMMON_FILE__MOUNTON 0x00010000UL - #define COMMON_SOCKET__IOCTL 0x00000001UL #define COMMON_SOCKET__READ 0x00000002UL #define COMMON_SOCKET__WRITE 0x00000004UL @@ -39,7 +38,6 @@ #define COMMON_SOCKET__RECV_MSG 0x00080000UL #define COMMON_SOCKET__SEND_MSG 0x00100000UL #define COMMON_SOCKET__NAME_BIND 0x00200000UL - #define COMMON_IPC__CREATE 0x00000001UL #define COMMON_IPC__DESTROY 0x00000002UL #define COMMON_IPC__GETATTR 0x00000004UL @@ -49,7 +47,6 @@ #define COMMON_IPC__ASSOCIATE 0x00000040UL #define COMMON_IPC__UNIX_READ 0x00000080UL #define COMMON_IPC__UNIX_WRITE 0x00000100UL - #define FILESYSTEM__MOUNT 0x00000001UL #define FILESYSTEM__REMOUNT 0x00000002UL #define FILESYSTEM__UNMOUNT 0x00000004UL @@ -60,7 +57,6 @@ #define FILESYSTEM__ASSOCIATE 0x00000080UL #define FILESYSTEM__QUOTAMOD 0x00000100UL #define FILESYSTEM__QUOTAGET 0x00000200UL - #define DIR__IOCTL 0x00000001UL #define DIR__READ 0x00000002UL #define DIR__WRITE 0x00000004UL @@ -78,13 +74,11 @@ #define DIR__SWAPON 0x00004000UL #define DIR__QUOTAON 0x00008000UL #define DIR__MOUNTON 0x00010000UL - #define DIR__ADD_NAME 0x00020000UL #define DIR__REMOVE_NAME 0x00040000UL #define DIR__REPARENT 0x00080000UL #define DIR__SEARCH 0x00100000UL #define DIR__RMDIR 0x00200000UL - #define FILE__IOCTL 0x00000001UL #define FILE__READ 0x00000002UL #define FILE__WRITE 0x00000004UL @@ -102,11 +96,9 @@ #define FILE__SWAPON 0x00004000UL #define FILE__QUOTAON 0x00008000UL #define FILE__MOUNTON 0x00010000UL - #define FILE__EXECUTE_NO_TRANS 0x00020000UL #define FILE__ENTRYPOINT 0x00040000UL #define FILE__EXECMOD 0x00080000UL - #define LNK_FILE__IOCTL 0x00000001UL #define LNK_FILE__READ 0x00000002UL #define LNK_FILE__WRITE 0x00000004UL @@ -124,7 +116,6 @@ #define LNK_FILE__SWAPON 0x00004000UL #define LNK_FILE__QUOTAON 0x00008000UL #define LNK_FILE__MOUNTON 0x00010000UL - #define CHR_FILE__IOCTL 0x00000001UL #define CHR_FILE__READ 0x00000002UL #define CHR_FILE__WRITE 0x00000004UL @@ -142,11 +133,9 @@ #define CHR_FILE__SWAPON 0x00004000UL #define CHR_FILE__QUOTAON 0x00008000UL #define CHR_FILE__MOUNTON 0x00010000UL - #define CHR_FILE__EXECUTE_NO_TRANS 0x00020000UL #define CHR_FILE__ENTRYPOINT 0x00040000UL #define CHR_FILE__EXECMOD 0x00080000UL - #define BLK_FILE__IOCTL 0x00000001UL #define BLK_FILE__READ 0x00000002UL #define BLK_FILE__WRITE 0x00000004UL @@ -164,7 +153,6 @@ #define BLK_FILE__SWAPON 0x00004000UL #define BLK_FILE__QUOTAON 0x00008000UL #define BLK_FILE__MOUNTON 0x00010000UL - #define SOCK_FILE__IOCTL 0x00000001UL #define SOCK_FILE__READ 0x00000002UL #define SOCK_FILE__WRITE 0x00000004UL @@ -182,7 +170,6 @@ #define SOCK_FILE__SWAPON 0x00004000UL #define SOCK_FILE__QUOTAON 0x00008000UL #define SOCK_FILE__MOUNTON 0x00010000UL - #define FIFO_FILE__IOCTL 0x00000001UL #define FIFO_FILE__READ 0x00000002UL #define FIFO_FILE__WRITE 0x00000004UL @@ -200,9 +187,7 @@ #define FIFO_FILE__SWAPON 0x00004000UL #define FIFO_FILE__QUOTAON 0x00008000UL #define FIFO_FILE__MOUNTON 0x00010000UL - #define FD__USE 0x00000001UL - #define SOCKET__IOCTL 0x00000001UL #define SOCKET__READ 0x00000002UL #define SOCKET__WRITE 0x00000004UL @@ -225,7 +210,6 @@ #define SOCKET__RECV_MSG 0x00080000UL #define SOCKET__SEND_MSG 0x00100000UL #define SOCKET__NAME_BIND 0x00200000UL - #define TCP_SOCKET__IOCTL 0x00000001UL #define TCP_SOCKET__READ 0x00000002UL #define TCP_SOCKET__WRITE 0x00000004UL @@ -248,13 +232,11 @@ #define TCP_SOCKET__RECV_MSG 0x00080000UL #define TCP_SOCKET__SEND_MSG 0x00100000UL #define TCP_SOCKET__NAME_BIND 0x00200000UL - #define TCP_SOCKET__CONNECTTO 0x00400000UL #define TCP_SOCKET__NEWCONN 0x00800000UL #define TCP_SOCKET__ACCEPTFROM 0x01000000UL #define TCP_SOCKET__NODE_BIND 0x02000000UL #define TCP_SOCKET__NAME_CONNECT 0x04000000UL - #define UDP_SOCKET__IOCTL 0x00000001UL #define UDP_SOCKET__READ 0x00000002UL #define UDP_SOCKET__WRITE 0x00000004UL @@ -277,9 +259,7 @@ #define UDP_SOCKET__RECV_MSG 0x00080000UL #define UDP_SOCKET__SEND_MSG 0x00100000UL #define UDP_SOCKET__NAME_BIND 0x00200000UL - #define UDP_SOCKET__NODE_BIND 0x00400000UL - #define RAWIP_SOCKET__IOCTL 0x00000001UL #define RAWIP_SOCKET__READ 0x00000002UL #define RAWIP_SOCKET__WRITE 0x00000004UL @@ -302,9 +282,7 @@ #define RAWIP_SOCKET__RECV_MSG 0x00080000UL #define RAWIP_SOCKET__SEND_MSG 0x00100000UL #define RAWIP_SOCKET__NAME_BIND 0x00200000UL - #define RAWIP_SOCKET__NODE_BIND 0x00400000UL - #define NODE__TCP_RECV 0x00000001UL #define NODE__TCP_SEND 0x00000002UL #define NODE__UDP_RECV 0x00000004UL @@ -312,14 +290,12 @@ #define NODE__RAWIP_RECV 0x00000010UL #define NODE__RAWIP_SEND 0x00000020UL #define NODE__ENFORCE_DEST 0x00000040UL - #define NETIF__TCP_RECV 0x00000001UL #define NETIF__TCP_SEND 0x00000002UL #define NETIF__UDP_RECV 0x00000004UL #define NETIF__UDP_SEND 0x00000008UL #define NETIF__RAWIP_RECV 0x00000010UL #define NETIF__RAWIP_SEND 0x00000020UL - #define NETLINK_SOCKET__IOCTL 0x00000001UL #define NETLINK_SOCKET__READ 0x00000002UL #define NETLINK_SOCKET__WRITE 0x00000004UL @@ -342,7 +318,6 @@ #define NETLINK_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_SOCKET__NAME_BIND 0x00200000UL - #define PACKET_SOCKET__IOCTL 0x00000001UL #define PACKET_SOCKET__READ 0x00000002UL #define PACKET_SOCKET__WRITE 0x00000004UL @@ -365,7 +340,6 @@ #define PACKET_SOCKET__RECV_MSG 0x00080000UL #define PACKET_SOCKET__SEND_MSG 0x00100000UL #define PACKET_SOCKET__NAME_BIND 0x00200000UL - #define KEY_SOCKET__IOCTL 0x00000001UL #define KEY_SOCKET__READ 0x00000002UL #define KEY_SOCKET__WRITE 0x00000004UL @@ -388,7 +362,6 @@ #define KEY_SOCKET__RECV_MSG 0x00080000UL #define KEY_SOCKET__SEND_MSG 0x00100000UL #define KEY_SOCKET__NAME_BIND 0x00200000UL - #define UNIX_STREAM_SOCKET__IOCTL 0x00000001UL #define UNIX_STREAM_SOCKET__READ 0x00000002UL #define UNIX_STREAM_SOCKET__WRITE 0x00000004UL @@ -411,11 +384,9 @@ #define UNIX_STREAM_SOCKET__RECV_MSG 0x00080000UL #define UNIX_STREAM_SOCKET__SEND_MSG 0x00100000UL #define UNIX_STREAM_SOCKET__NAME_BIND 0x00200000UL - #define UNIX_STREAM_SOCKET__CONNECTTO 0x00400000UL #define UNIX_STREAM_SOCKET__NEWCONN 0x00800000UL #define UNIX_STREAM_SOCKET__ACCEPTFROM 0x01000000UL - #define UNIX_DGRAM_SOCKET__IOCTL 0x00000001UL #define UNIX_DGRAM_SOCKET__READ 0x00000002UL #define UNIX_DGRAM_SOCKET__WRITE 0x00000004UL @@ -438,7 +409,6 @@ #define UNIX_DGRAM_SOCKET__RECV_MSG 0x00080000UL #define UNIX_DGRAM_SOCKET__SEND_MSG 0x00100000UL #define UNIX_DGRAM_SOCKET__NAME_BIND 0x00200000UL - #define PROCESS__FORK 0x00000001UL #define PROCESS__TRANSITION 0x00000002UL #define PROCESS__SIGCHLD 0x00000004UL @@ -468,8 +438,7 @@ #define PROCESS__EXECSTACK 0x04000000UL #define PROCESS__EXECHEAP 0x08000000UL #define PROCESS__SETKEYCREATE 0x10000000UL -#define PROCESS__SETSOCKCREATE 0x20000000UL - +#define PROCESS__TASKFORPID 0x20000000UL #define IPC__CREATE 0x00000001UL #define IPC__DESTROY 0x00000002UL #define IPC__GETATTR 0x00000004UL @@ -479,7 +448,6 @@ #define IPC__ASSOCIATE 0x00000040UL #define IPC__UNIX_READ 0x00000080UL #define IPC__UNIX_WRITE 0x00000100UL - #define SEM__CREATE 0x00000001UL #define SEM__DESTROY 0x00000002UL #define SEM__GETATTR 0x00000004UL @@ -489,7 +457,6 @@ #define SEM__ASSOCIATE 0x00000040UL #define SEM__UNIX_READ 0x00000080UL #define SEM__UNIX_WRITE 0x00000100UL - #define MSGQ__CREATE 0x00000001UL #define MSGQ__DESTROY 0x00000002UL #define MSGQ__GETATTR 0x00000004UL @@ -499,12 +466,9 @@ #define MSGQ__ASSOCIATE 0x00000040UL #define MSGQ__UNIX_READ 0x00000080UL #define MSGQ__UNIX_WRITE 0x00000100UL - #define MSGQ__ENQUEUE 0x00000200UL - #define MSG__SEND 0x00000001UL #define MSG__RECEIVE 0x00000002UL - #define SHM__CREATE 0x00000001UL #define SHM__DESTROY 0x00000002UL #define SHM__GETATTR 0x00000004UL @@ -514,9 +478,7 @@ #define SHM__ASSOCIATE 0x00000040UL #define SHM__UNIX_READ 0x00000080UL #define SHM__UNIX_WRITE 0x00000100UL - #define SHM__LOCK 0x00000200UL - #define SECURITY__COMPUTE_AV 0x00000001UL #define SECURITY__COMPUTE_CREATE 0x00000002UL #define SECURITY__COMPUTE_MEMBER 0x00000004UL @@ -528,12 +490,10 @@ #define SECURITY__SETBOOL 0x00000100UL #define SECURITY__SETSECPARAM 0x00000200UL #define SECURITY__SETCHECKREQPROT 0x00000400UL - #define SYSTEM__IPC_INFO 0x00000001UL #define SYSTEM__SYSLOG_READ 0x00000002UL #define SYSTEM__SYSLOG_MOD 0x00000004UL #define SYSTEM__SYSLOG_CONSOLE 0x00000008UL - #define CAPABILITY__CHOWN 0x00000001UL #define CAPABILITY__DAC_OVERRIDE 0x00000002UL #define CAPABILITY__DAC_READ_SEARCH 0x00000004UL @@ -565,24 +525,20 @@ #define CAPABILITY__LEASE 0x10000000UL #define CAPABILITY__AUDIT_WRITE 0x20000000UL #define CAPABILITY__AUDIT_CONTROL 0x40000000UL - #define PASSWD__PASSWD 0x00000001UL #define PASSWD__CHFN 0x00000002UL #define PASSWD__CHSH 0x00000004UL #define PASSWD__ROOTOK 0x00000008UL #define PASSWD__CRONTAB 0x00000010UL - #define DRAWABLE__CREATE 0x00000001UL #define DRAWABLE__DESTROY 0x00000002UL #define DRAWABLE__DRAW 0x00000004UL #define DRAWABLE__COPY 0x00000008UL #define DRAWABLE__GETATTR 0x00000010UL - #define GC__CREATE 0x00000001UL #define GC__FREE 0x00000002UL #define GC__GETATTR 0x00000004UL #define GC__SETATTR 0x00000008UL - #define WINDOW__ADDCHILD 0x00000001UL #define WINDOW__CREATE 0x00000002UL #define WINDOW__DESTROY 0x00000004UL @@ -609,12 +565,10 @@ #define WINDOW__WINDOWCHANGEREQUEST 0x00800000UL #define WINDOW__SERVERCHANGEEVENT 0x01000000UL #define WINDOW__EXTENSIONEVENT 0x02000000UL - #define FONT__LOAD 0x00000001UL #define FONT__FREE 0x00000002UL #define FONT__GETATTR 0x00000004UL #define FONT__USE 0x00000008UL - #define COLORMAP__CREATE 0x00000001UL #define COLORMAP__FREE 0x00000002UL #define COLORMAP__INSTALL 0x00000004UL @@ -624,20 +578,16 @@ #define COLORMAP__STORE 0x00000040UL #define COLORMAP__GETATTR 0x00000080UL #define COLORMAP__SETATTR 0x00000100UL - #define PROPERTY__CREATE 0x00000001UL #define PROPERTY__FREE 0x00000002UL #define PROPERTY__READ 0x00000004UL #define PROPERTY__WRITE 0x00000008UL - #define CURSOR__CREATE 0x00000001UL #define CURSOR__CREATEGLYPH 0x00000002UL #define CURSOR__FREE 0x00000004UL #define CURSOR__ASSIGN 0x00000008UL #define CURSOR__SETATTR 0x00000010UL - #define XCLIENT__KILL 0x00000001UL - #define XINPUT__LOOKUP 0x00000001UL #define XINPUT__GETATTR 0x00000002UL #define XINPUT__SETATTR 0x00000004UL @@ -649,7 +599,6 @@ #define XINPUT__BELL 0x00000100UL #define XINPUT__MOUSEMOTION 0x00000200UL #define XINPUT__RELABELINPUT 0x00000400UL - #define XSERVER__SCREENSAVER 0x00000001UL #define XSERVER__GETHOSTLIST 0x00000002UL #define XSERVER__SETHOSTLIST 0x00000004UL @@ -658,17 +607,14 @@ #define XSERVER__GETATTR 0x00000020UL #define XSERVER__GRAB 0x00000040UL #define XSERVER__UNGRAB 0x00000080UL - #define XEXTENSION__QUERY 0x00000001UL #define XEXTENSION__USE 0x00000002UL - #define PAX__PAGEEXEC 0x00000001UL #define PAX__EMUTRAMP 0x00000002UL #define PAX__MPROTECT 0x00000004UL #define PAX__RANDMMAP 0x00000008UL #define PAX__RANDEXEC 0x00000010UL #define PAX__SEGMEXEC 0x00000020UL - #define NETLINK_ROUTE_SOCKET__IOCTL 0x00000001UL #define NETLINK_ROUTE_SOCKET__READ 0x00000002UL #define NETLINK_ROUTE_SOCKET__WRITE 0x00000004UL @@ -691,10 +637,8 @@ #define NETLINK_ROUTE_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_ROUTE_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_ROUTE_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_ROUTE_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_ROUTE_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_FIREWALL_SOCKET__IOCTL 0x00000001UL #define NETLINK_FIREWALL_SOCKET__READ 0x00000002UL #define NETLINK_FIREWALL_SOCKET__WRITE 0x00000004UL @@ -717,10 +661,8 @@ #define NETLINK_FIREWALL_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_FIREWALL_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_FIREWALL_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_FIREWALL_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_FIREWALL_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_TCPDIAG_SOCKET__IOCTL 0x00000001UL #define NETLINK_TCPDIAG_SOCKET__READ 0x00000002UL #define NETLINK_TCPDIAG_SOCKET__WRITE 0x00000004UL @@ -743,10 +685,8 @@ #define NETLINK_TCPDIAG_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_TCPDIAG_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_TCPDIAG_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_TCPDIAG_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_NFLOG_SOCKET__IOCTL 0x00000001UL #define NETLINK_NFLOG_SOCKET__READ 0x00000002UL #define NETLINK_NFLOG_SOCKET__WRITE 0x00000004UL @@ -769,7 +709,6 @@ #define NETLINK_NFLOG_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_NFLOG_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_NFLOG_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_XFRM_SOCKET__IOCTL 0x00000001UL #define NETLINK_XFRM_SOCKET__READ 0x00000002UL #define NETLINK_XFRM_SOCKET__WRITE 0x00000004UL @@ -792,10 +731,8 @@ #define NETLINK_XFRM_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_XFRM_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_XFRM_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_XFRM_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_XFRM_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_SELINUX_SOCKET__IOCTL 0x00000001UL #define NETLINK_SELINUX_SOCKET__READ 0x00000002UL #define NETLINK_SELINUX_SOCKET__WRITE 0x00000004UL @@ -818,7 +755,6 @@ #define NETLINK_SELINUX_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_SELINUX_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_SELINUX_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_AUDIT_SOCKET__IOCTL 0x00000001UL #define NETLINK_AUDIT_SOCKET__READ 0x00000002UL #define NETLINK_AUDIT_SOCKET__WRITE 0x00000004UL @@ -841,12 +777,10 @@ #define NETLINK_AUDIT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_AUDIT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_AUDIT_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_AUDIT_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_AUDIT_SOCKET__NLMSG_WRITE 0x00800000UL #define NETLINK_AUDIT_SOCKET__NLMSG_RELAY 0x01000000UL #define NETLINK_AUDIT_SOCKET__NLMSG_READPRIV 0x02000000UL - #define NETLINK_IP6FW_SOCKET__IOCTL 0x00000001UL #define NETLINK_IP6FW_SOCKET__READ 0x00000002UL #define NETLINK_IP6FW_SOCKET__WRITE 0x00000004UL @@ -869,10 +803,8 @@ #define NETLINK_IP6FW_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_IP6FW_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_IP6FW_SOCKET__NAME_BIND 0x00200000UL - #define NETLINK_IP6FW_SOCKET__NLMSG_READ 0x00400000UL #define NETLINK_IP6FW_SOCKET__NLMSG_WRITE 0x00800000UL - #define NETLINK_DNRT_SOCKET__IOCTL 0x00000001UL #define NETLINK_DNRT_SOCKET__READ 0x00000002UL #define NETLINK_DNRT_SOCKET__WRITE 0x00000004UL @@ -895,10 +827,8 @@ #define NETLINK_DNRT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_DNRT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_DNRT_SOCKET__NAME_BIND 0x00200000UL - #define DBUS__ACQUIRE_SVC 0x00000001UL #define DBUS__SEND_MSG 0x00000002UL - #define NSCD__GETPWD 0x00000001UL #define NSCD__GETGRP 0x00000002UL #define NSCD__GETHOST 0x00000004UL @@ -907,12 +837,10 @@ #define NSCD__SHMEMPWD 0x00000020UL #define NSCD__SHMEMGRP 0x00000040UL #define NSCD__SHMEMHOST 0x00000080UL - #define ASSOCIATION__SENDTO 0x00000001UL #define ASSOCIATION__RECVFROM 0x00000002UL #define ASSOCIATION__SETCONTEXT 0x00000004UL #define ASSOCIATION__POLMATCH 0x00000008UL - #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL #define NETLINK_KOBJECT_UEVENT_SOCKET__WRITE 0x00000004UL @@ -935,7 +863,6 @@ #define NETLINK_KOBJECT_UEVENT_SOCKET__RECV_MSG 0x00080000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__SEND_MSG 0x00100000UL #define NETLINK_KOBJECT_UEVENT_SOCKET__NAME_BIND 0x00200000UL - #define APPLETALK_SOCKET__IOCTL 0x00000001UL #define APPLETALK_SOCKET__READ 0x00000002UL #define APPLETALK_SOCKET__WRITE 0x00000004UL @@ -958,11 +885,9 @@ #define APPLETALK_SOCKET__RECV_MSG 0x00080000UL #define APPLETALK_SOCKET__SEND_MSG 0x00100000UL #define APPLETALK_SOCKET__NAME_BIND 0x00200000UL - #define PACKET__SEND 0x00000001UL #define PACKET__RECV 0x00000002UL #define PACKET__RELABELTO 0x00000004UL - #define KEY__VIEW 0x00000001UL #define KEY__READ 0x00000002UL #define KEY__WRITE 0x00000004UL @@ -970,3 +895,18 @@ #define KEY__LINK 0x00000010UL #define KEY__SETATTR 0x00000020UL #define KEY__CREATE 0x00000040UL +#define MACH_PORT__RELABELFROM 0x00000001UL +#define MACH_PORT__RELABELTO 0x00000002UL +#define MACH_PORT__SEND 0x00000004UL +#define MACH_PORT__RECV 0x00000008UL +#define MACH_PORT__MAKE_SEND 0x00000010UL +#define MACH_PORT__MAKE_SEND_ONCE 0x00000020UL +#define MACH_PORT__COPY_SEND 0x00000040UL +#define MACH_PORT__MOVE_SEND 0x00000080UL +#define MACH_PORT__MOVE_SEND_ONCE 0x00000100UL +#define MACH_PORT__MOVE_RECV 0x00000200UL +#define MACH_PORT__HOLD_SEND 0x00000400UL +#define MACH_PORT__HOLD_SEND_ONCE 0x00000800UL +#define MACH_PORT__HOLD_RECV 0x00001000UL +#define MACH_TASK__TERMINATE 0x00000001UL +#define MACH_TASK__SET_SPECIAL_PORT 0x00000002UL ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/include/selinux/flask.h#3 (text+ko) ==== @@ -63,6 +63,8 @@ #define SECCLASS_APPLETALK_SOCKET 56 #define SECCLASS_PACKET 57 #define SECCLASS_KEY 58 +#define SECCLASS_MACH_PORT 59 +#define SECCLASS_MACH_TASK 60 /* * Security identifier indices for initial entities @@ -94,7 +96,8 @@ #define SECINITSID_POLICY 25 #define SECINITSID_SCMP_PACKET 26 #define SECINITSID_DEVNULL 27 +#define SECINITSID_DEVFS 28 -#define SECINITSID_NUM 27 +#define SECINITSID_NUM 28 #endif ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/av_inherit.h#3 (text+ko) ==== @@ -1,32 +1,32 @@ /* This file is automatically generated. Do not edit. */ -S_(SECCLASS_DIR, file, 0x00020000UL) - S_(SECCLASS_FILE, file, 0x00020000UL) - S_(SECCLASS_LNK_FILE, file, 0x00020000UL) - S_(SECCLASS_CHR_FILE, file, 0x00020000UL) - S_(SECCLASS_BLK_FILE, file, 0x00020000UL) - S_(SECCLASS_SOCK_FILE, file, 0x00020000UL) - S_(SECCLASS_FIFO_FILE, file, 0x00020000UL) - S_(SECCLASS_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_TCP_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_UDP_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_RAWIP_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_PACKET_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_KEY_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_UNIX_STREAM_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_UNIX_DGRAM_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_IPC, ipc, 0x00000200UL) - S_(SECCLASS_SEM, ipc, 0x00000200UL) - S_(SECCLASS_MSGQ, ipc, 0x00000200UL) - S_(SECCLASS_SHM, ipc, 0x00000200UL) - S_(SECCLASS_NETLINK_ROUTE_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_FIREWALL_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_NFLOG_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_XFRM_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_SELINUX_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_AUDIT_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_IP6FW_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_DNRT_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET, socket, 0x00400000UL) - S_(SECCLASS_APPLETALK_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_DIR, file, 0x00020000UL) + S_(SECCLASS_FILE, file, 0x00020000UL) + S_(SECCLASS_LNK_FILE, file, 0x00020000UL) + S_(SECCLASS_CHR_FILE, file, 0x00020000UL) + S_(SECCLASS_BLK_FILE, file, 0x00020000UL) + S_(SECCLASS_SOCK_FILE, file, 0x00020000UL) + S_(SECCLASS_FIFO_FILE, file, 0x00020000UL) + S_(SECCLASS_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_TCP_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_UDP_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_RAWIP_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_PACKET_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_KEY_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_UNIX_STREAM_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_UNIX_DGRAM_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_IPC, ipc, 0x00000200UL) + S_(SECCLASS_SEM, ipc, 0x00000200UL) + S_(SECCLASS_MSGQ, ipc, 0x00000200UL) + S_(SECCLASS_SHM, ipc, 0x00000200UL) + S_(SECCLASS_NETLINK_ROUTE_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_FIREWALL_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_NFLOG_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_XFRM_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_SELINUX_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_AUDIT_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_IP6FW_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_DNRT_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_NETLINK_KOBJECT_UEVENT_SOCKET, socket, 0x00400000UL) + S_(SECCLASS_APPLETALK_SOCKET, socket, 0x00400000UL) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/av_perm_to_string.h#3 (text+ko) ==== @@ -1,265 +1,269 @@ /* This file is automatically generated. Do not edit. */ -S_(SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, "mount") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__REMOUNT, "remount") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__UNMOUNT, "unmount") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__GETATTR, "getattr") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, "relabelfrom") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELTO, "relabelto") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__TRANSITION, "transition") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, "associate") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAMOD, "quotamod") - S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAGET, "quotaget") - S_(SECCLASS_DIR, DIR__ADD_NAME, "add_name") - S_(SECCLASS_DIR, DIR__REMOVE_NAME, "remove_name") - S_(SECCLASS_DIR, DIR__REPARENT, "reparent") - S_(SECCLASS_DIR, DIR__SEARCH, "search") - S_(SECCLASS_DIR, DIR__RMDIR, "rmdir") - S_(SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, "execute_no_trans") - S_(SECCLASS_FILE, FILE__ENTRYPOINT, "entrypoint") - S_(SECCLASS_FILE, FILE__EXECMOD, "execmod") - S_(SECCLASS_CHR_FILE, CHR_FILE__EXECUTE_NO_TRANS, "execute_no_trans") - S_(SECCLASS_CHR_FILE, CHR_FILE__ENTRYPOINT, "entrypoint") - S_(SECCLASS_CHR_FILE, CHR_FILE__EXECMOD, "execmod") - S_(SECCLASS_FD, FD__USE, "use") - S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto") - S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn") - S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom") - S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind") - S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NAME_CONNECT, "name_connect") - S_(SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind") - S_(SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind") - S_(SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv") - S_(SECCLASS_NODE, NODE__TCP_SEND, "tcp_send") - S_(SECCLASS_NODE, NODE__UDP_RECV, "udp_recv") - S_(SECCLASS_NODE, NODE__UDP_SEND, "udp_send") - S_(SECCLASS_NODE, NODE__RAWIP_RECV, "rawip_recv") - S_(SECCLASS_NODE, NODE__RAWIP_SEND, "rawip_send") - S_(SECCLASS_NODE, NODE__ENFORCE_DEST, "enforce_dest") - S_(SECCLASS_NETIF, NETIF__TCP_RECV, "tcp_recv") - S_(SECCLASS_NETIF, NETIF__TCP_SEND, "tcp_send") - S_(SECCLASS_NETIF, NETIF__UDP_RECV, "udp_recv") - S_(SECCLASS_NETIF, NETIF__UDP_SEND, "udp_send") - S_(SECCLASS_NETIF, NETIF__RAWIP_RECV, "rawip_recv") - S_(SECCLASS_NETIF, NETIF__RAWIP_SEND, "rawip_send") - S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto") - S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn") - S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom") - S_(SECCLASS_PROCESS, PROCESS__FORK, "fork") - S_(SECCLASS_PROCESS, PROCESS__TRANSITION, "transition") - S_(SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld") - S_(SECCLASS_PROCESS, PROCESS__SIGKILL, "sigkill") - S_(SECCLASS_PROCESS, PROCESS__SIGSTOP, "sigstop") - S_(SECCLASS_PROCESS, PROCESS__SIGNULL, "signull") - S_(SECCLASS_PROCESS, PROCESS__SIGNAL, "signal") - S_(SECCLASS_PROCESS, PROCESS__PTRACE, "ptrace") - S_(SECCLASS_PROCESS, PROCESS__GETSCHED, "getsched") - S_(SECCLASS_PROCESS, PROCESS__SETSCHED, "setsched") - S_(SECCLASS_PROCESS, PROCESS__GETSESSION, "getsession") - S_(SECCLASS_PROCESS, PROCESS__GETPGID, "getpgid") - S_(SECCLASS_PROCESS, PROCESS__SETPGID, "setpgid") - S_(SECCLASS_PROCESS, PROCESS__GETCAP, "getcap") - S_(SECCLASS_PROCESS, PROCESS__SETCAP, "setcap") - S_(SECCLASS_PROCESS, PROCESS__SHARE, "share") - S_(SECCLASS_PROCESS, PROCESS__GETATTR, "getattr") - S_(SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec") - S_(SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate") - S_(SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure") - S_(SECCLASS_PROCESS, PROCESS__SIGINH, "siginh") - S_(SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit") - S_(SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh") - S_(SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition") - S_(SECCLASS_PROCESS, PROCESS__SETCURRENT, "setcurrent") - S_(SECCLASS_PROCESS, PROCESS__EXECMEM, "execmem") - S_(SECCLASS_PROCESS, PROCESS__EXECSTACK, "execstack") - S_(SECCLASS_PROCESS, PROCESS__EXECHEAP, "execheap") - S_(SECCLASS_PROCESS, PROCESS__SETKEYCREATE, "setkeycreate") - S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue") - S_(SECCLASS_MSG, MSG__SEND, "send") - S_(SECCLASS_MSG, MSG__RECEIVE, "receive") - S_(SECCLASS_SHM, SHM__LOCK, "lock") - S_(SECCLASS_SECURITY, SECURITY__COMPUTE_AV, "compute_av") - S_(SECCLASS_SECURITY, SECURITY__COMPUTE_CREATE, "compute_create") - S_(SECCLASS_SECURITY, SECURITY__COMPUTE_MEMBER, "compute_member") - S_(SECCLASS_SECURITY, SECURITY__CHECK_CONTEXT, "check_context") - S_(SECCLASS_SECURITY, SECURITY__LOAD_POLICY, "load_policy") - S_(SECCLASS_SECURITY, SECURITY__COMPUTE_RELABEL, "compute_relabel") - S_(SECCLASS_SECURITY, SECURITY__COMPUTE_USER, "compute_user") - S_(SECCLASS_SECURITY, SECURITY__SETENFORCE, "setenforce") - S_(SECCLASS_SECURITY, SECURITY__SETBOOL, "setbool") - S_(SECCLASS_SECURITY, SECURITY__SETSECPARAM, "setsecparam") - S_(SECCLASS_SECURITY, SECURITY__SETCHECKREQPROT, "setcheckreqprot") - S_(SECCLASS_SYSTEM, SYSTEM__IPC_INFO, "ipc_info") - S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_READ, "syslog_read") - S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_MOD, "syslog_mod") - S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_CONSOLE, "syslog_console") - S_(SECCLASS_CAPABILITY, CAPABILITY__CHOWN, "chown") - S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_OVERRIDE, "dac_override") - S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_READ_SEARCH, "dac_read_search") - S_(SECCLASS_CAPABILITY, CAPABILITY__FOWNER, "fowner") - S_(SECCLASS_CAPABILITY, CAPABILITY__FSETID, "fsetid") - S_(SECCLASS_CAPABILITY, CAPABILITY__KILL, "kill") - S_(SECCLASS_CAPABILITY, CAPABILITY__SETGID, "setgid") - S_(SECCLASS_CAPABILITY, CAPABILITY__SETUID, "setuid") - S_(SECCLASS_CAPABILITY, CAPABILITY__SETPCAP, "setpcap") - S_(SECCLASS_CAPABILITY, CAPABILITY__LINUX_IMMUTABLE, "linux_immutable") - S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BIND_SERVICE, "net_bind_service") - S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BROADCAST, "net_broadcast") - S_(SECCLASS_CAPABILITY, CAPABILITY__NET_ADMIN, "net_admin") - S_(SECCLASS_CAPABILITY, CAPABILITY__NET_RAW, "net_raw") - S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_LOCK, "ipc_lock") - S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_OWNER, "ipc_owner") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_MODULE, "sys_module") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RAWIO, "sys_rawio") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_CHROOT, "sys_chroot") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PTRACE, "sys_ptrace") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PACCT, "sys_pacct") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_ADMIN, "sys_admin") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_BOOT, "sys_boot") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_NICE, "sys_nice") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RESOURCE, "sys_resource") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TIME, "sys_time") - S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TTY_CONFIG, "sys_tty_config") - S_(SECCLASS_CAPABILITY, CAPABILITY__MKNOD, "mknod") - S_(SECCLASS_CAPABILITY, CAPABILITY__LEASE, "lease") - S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_WRITE, "audit_write") - S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_CONTROL, "audit_control") - S_(SECCLASS_PASSWD, PASSWD__PASSWD, "passwd") - S_(SECCLASS_PASSWD, PASSWD__CHFN, "chfn") - S_(SECCLASS_PASSWD, PASSWD__CHSH, "chsh") - S_(SECCLASS_PASSWD, PASSWD__ROOTOK, "rootok") - S_(SECCLASS_PASSWD, PASSWD__CRONTAB, "crontab") - S_(SECCLASS_DRAWABLE, DRAWABLE__CREATE, "create") - S_(SECCLASS_DRAWABLE, DRAWABLE__DESTROY, "destroy") - S_(SECCLASS_DRAWABLE, DRAWABLE__DRAW, "draw") - S_(SECCLASS_DRAWABLE, DRAWABLE__COPY, "copy") - S_(SECCLASS_DRAWABLE, DRAWABLE__GETATTR, "getattr") - S_(SECCLASS_GC, GC__CREATE, "create") - S_(SECCLASS_GC, GC__FREE, "free") - S_(SECCLASS_GC, GC__GETATTR, "getattr") - S_(SECCLASS_GC, GC__SETATTR, "setattr") - S_(SECCLASS_WINDOW, WINDOW__ADDCHILD, "addchild") - S_(SECCLASS_WINDOW, WINDOW__CREATE, "create") - S_(SECCLASS_WINDOW, WINDOW__DESTROY, "destroy") - S_(SECCLASS_WINDOW, WINDOW__MAP, "map") - S_(SECCLASS_WINDOW, WINDOW__UNMAP, "unmap") - S_(SECCLASS_WINDOW, WINDOW__CHSTACK, "chstack") - S_(SECCLASS_WINDOW, WINDOW__CHPROPLIST, "chproplist") - S_(SECCLASS_WINDOW, WINDOW__CHPROP, "chprop") - S_(SECCLASS_WINDOW, WINDOW__LISTPROP, "listprop") - S_(SECCLASS_WINDOW, WINDOW__GETATTR, "getattr") - S_(SECCLASS_WINDOW, WINDOW__SETATTR, "setattr") - S_(SECCLASS_WINDOW, WINDOW__SETFOCUS, "setfocus") - S_(SECCLASS_WINDOW, WINDOW__MOVE, "move") - S_(SECCLASS_WINDOW, WINDOW__CHSELECTION, "chselection") - S_(SECCLASS_WINDOW, WINDOW__CHPARENT, "chparent") - S_(SECCLASS_WINDOW, WINDOW__CTRLLIFE, "ctrllife") - S_(SECCLASS_WINDOW, WINDOW__ENUMERATE, "enumerate") - S_(SECCLASS_WINDOW, WINDOW__TRANSPARENT, "transparent") - S_(SECCLASS_WINDOW, WINDOW__MOUSEMOTION, "mousemotion") - S_(SECCLASS_WINDOW, WINDOW__CLIENTCOMEVENT, "clientcomevent") - S_(SECCLASS_WINDOW, WINDOW__INPUTEVENT, "inputevent") - S_(SECCLASS_WINDOW, WINDOW__DRAWEVENT, "drawevent") - S_(SECCLASS_WINDOW, WINDOW__WINDOWCHANGEEVENT, "windowchangeevent") - S_(SECCLASS_WINDOW, WINDOW__WINDOWCHANGEREQUEST, "windowchangerequest") - S_(SECCLASS_WINDOW, WINDOW__SERVERCHANGEEVENT, "serverchangeevent") - S_(SECCLASS_WINDOW, WINDOW__EXTENSIONEVENT, "extensionevent") - S_(SECCLASS_FONT, FONT__LOAD, "load") - S_(SECCLASS_FONT, FONT__FREE, "free") - S_(SECCLASS_FONT, FONT__GETATTR, "getattr") - S_(SECCLASS_FONT, FONT__USE, "use") - S_(SECCLASS_COLORMAP, COLORMAP__CREATE, "create") - S_(SECCLASS_COLORMAP, COLORMAP__FREE, "free") - S_(SECCLASS_COLORMAP, COLORMAP__INSTALL, "install") - S_(SECCLASS_COLORMAP, COLORMAP__UNINSTALL, "uninstall") - S_(SECCLASS_COLORMAP, COLORMAP__LIST, "list") - S_(SECCLASS_COLORMAP, COLORMAP__READ, "read") - S_(SECCLASS_COLORMAP, COLORMAP__STORE, "store") - S_(SECCLASS_COLORMAP, COLORMAP__GETATTR, "getattr") - S_(SECCLASS_COLORMAP, COLORMAP__SETATTR, "setattr") - S_(SECCLASS_PROPERTY, PROPERTY__CREATE, "create") - S_(SECCLASS_PROPERTY, PROPERTY__FREE, "free") - S_(SECCLASS_PROPERTY, PROPERTY__READ, "read") - S_(SECCLASS_PROPERTY, PROPERTY__WRITE, "write") - S_(SECCLASS_CURSOR, CURSOR__CREATE, "create") - S_(SECCLASS_CURSOR, CURSOR__CREATEGLYPH, "createglyph") - S_(SECCLASS_CURSOR, CURSOR__FREE, "free") - S_(SECCLASS_CURSOR, CURSOR__ASSIGN, "assign") - S_(SECCLASS_CURSOR, CURSOR__SETATTR, "setattr") - S_(SECCLASS_XCLIENT, XCLIENT__KILL, "kill") - S_(SECCLASS_XINPUT, XINPUT__LOOKUP, "lookup") - S_(SECCLASS_XINPUT, XINPUT__GETATTR, "getattr") - S_(SECCLASS_XINPUT, XINPUT__SETATTR, "setattr") - S_(SECCLASS_XINPUT, XINPUT__SETFOCUS, "setfocus") - S_(SECCLASS_XINPUT, XINPUT__WARPPOINTER, "warppointer") - S_(SECCLASS_XINPUT, XINPUT__ACTIVEGRAB, "activegrab") - S_(SECCLASS_XINPUT, XINPUT__PASSIVEGRAB, "passivegrab") - S_(SECCLASS_XINPUT, XINPUT__UNGRAB, "ungrab") - S_(SECCLASS_XINPUT, XINPUT__BELL, "bell") - S_(SECCLASS_XINPUT, XINPUT__MOUSEMOTION, "mousemotion") - S_(SECCLASS_XINPUT, XINPUT__RELABELINPUT, "relabelinput") - S_(SECCLASS_XSERVER, XSERVER__SCREENSAVER, "screensaver") - S_(SECCLASS_XSERVER, XSERVER__GETHOSTLIST, "gethostlist") - S_(SECCLASS_XSERVER, XSERVER__SETHOSTLIST, "sethostlist") - S_(SECCLASS_XSERVER, XSERVER__GETFONTPATH, "getfontpath") - S_(SECCLASS_XSERVER, XSERVER__SETFONTPATH, "setfontpath") - S_(SECCLASS_XSERVER, XSERVER__GETATTR, "getattr") - S_(SECCLASS_XSERVER, XSERVER__GRAB, "grab") - S_(SECCLASS_XSERVER, XSERVER__UNGRAB, "ungrab") - S_(SECCLASS_XEXTENSION, XEXTENSION__QUERY, "query") - S_(SECCLASS_XEXTENSION, XEXTENSION__USE, "use") - S_(SECCLASS_PAX, PAX__PAGEEXEC, "pageexec") - S_(SECCLASS_PAX, PAX__EMUTRAMP, "emutramp") - S_(SECCLASS_PAX, PAX__MPROTECT, "mprotect") - S_(SECCLASS_PAX, PAX__RANDMMAP, "randmmap") - S_(SECCLASS_PAX, PAX__RANDEXEC, "randexec") - S_(SECCLASS_PAX, PAX__SEGMEXEC, "segmexec") - S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_READ, - "nlmsg_read") - S_(SECCLASS_NETLINK_ROUTE_SOCKET, NETLINK_ROUTE_SOCKET__NLMSG_WRITE, - "nlmsg_write") - S_(SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_READ, - "nlmsg_read") - S_(SECCLASS_NETLINK_FIREWALL_SOCKET, NETLINK_FIREWALL_SOCKET__NLMSG_WRITE, - "nlmsg_write") - S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_READ, - "nlmsg_read") - S_(SECCLASS_NETLINK_TCPDIAG_SOCKET, NETLINK_TCPDIAG_SOCKET__NLMSG_WRITE, - "nlmsg_write") - S_(SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_READ, "nlmsg_read") - S_(SECCLASS_NETLINK_XFRM_SOCKET, NETLINK_XFRM_SOCKET__NLMSG_WRITE, - "nlmsg_write") - S_(SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_READ, - "nlmsg_read") - S_(SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_WRITE, - "nlmsg_write") - S_(SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_RELAY, - "nlmsg_relay") - S_(SECCLASS_NETLINK_AUDIT_SOCKET, NETLINK_AUDIT_SOCKET__NLMSG_READPRIV, - "nlmsg_readpriv") - S_(SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_READ, - "nlmsg_read") - S_(SECCLASS_NETLINK_IP6FW_SOCKET, NETLINK_IP6FW_SOCKET__NLMSG_WRITE, - "nlmsg_write") - S_(SECCLASS_DBUS, DBUS__ACQUIRE_SVC, "acquire_svc") - S_(SECCLASS_DBUS, DBUS__SEND_MSG, "send_msg") - S_(SECCLASS_NSCD, NSCD__GETPWD, "getpwd") - S_(SECCLASS_NSCD, NSCD__GETGRP, "getgrp") - S_(SECCLASS_NSCD, NSCD__GETHOST, "gethost") - S_(SECCLASS_NSCD, NSCD__GETSTAT, "getstat") - S_(SECCLASS_NSCD, NSCD__ADMIN, "admin") - S_(SECCLASS_NSCD, NSCD__SHMEMPWD, "shmempwd") - S_(SECCLASS_NSCD, NSCD__SHMEMGRP, "shmemgrp") - S_(SECCLASS_NSCD, NSCD__SHMEMHOST, "shmemhost") - S_(SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, "sendto") - S_(SECCLASS_ASSOCIATION, ASSOCIATION__RECVFROM, "recvfrom") - S_(SECCLASS_ASSOCIATION, ASSOCIATION__SETCONTEXT, "setcontext") - S_(SECCLASS_PACKET, PACKET__SEND, "send") - S_(SECCLASS_PACKET, PACKET__RECV, "recv") - S_(SECCLASS_PACKET, PACKET__RELABELTO, "relabelto") - S_(SECCLASS_KEY, KEY__VIEW, "view") - S_(SECCLASS_KEY, KEY__READ, "read") - S_(SECCLASS_KEY, KEY__WRITE, "write") - S_(SECCLASS_KEY, KEY__SEARCH, "search") - S_(SECCLASS_KEY, KEY__LINK, "link") - S_(SECCLASS_KEY, KEY__SETATTR, "setattr") - S_(SECCLASS_KEY, KEY__CREATE, "create") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__MOUNT, "mount") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__REMOUNT, "remount") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__UNMOUNT, "unmount") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__GETATTR, "getattr") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELFROM, "relabelfrom") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__RELABELTO, "relabelto") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__TRANSITION, "transition") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__ASSOCIATE, "associate") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAMOD, "quotamod") + S_(SECCLASS_FILESYSTEM, FILESYSTEM__QUOTAGET, "quotaget") + S_(SECCLASS_DIR, DIR__ADD_NAME, "add_name") + S_(SECCLASS_DIR, DIR__REMOVE_NAME, "remove_name") + S_(SECCLASS_DIR, DIR__REPARENT, "reparent") + S_(SECCLASS_DIR, DIR__SEARCH, "search") + S_(SECCLASS_DIR, DIR__RMDIR, "rmdir") + S_(SECCLASS_FILE, FILE__EXECUTE_NO_TRANS, "execute_no_trans") + S_(SECCLASS_FILE, FILE__ENTRYPOINT, "entrypoint") + S_(SECCLASS_FILE, FILE__EXECMOD, "execmod") + S_(SECCLASS_CHR_FILE, CHR_FILE__EXECUTE_NO_TRANS, "execute_no_trans") + S_(SECCLASS_CHR_FILE, CHR_FILE__ENTRYPOINT, "entrypoint") + S_(SECCLASS_CHR_FILE, CHR_FILE__EXECMOD, "execmod") + S_(SECCLASS_FD, FD__USE, "use") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__CONNECTTO, "connectto") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NEWCONN, "newconn") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__ACCEPTFROM, "acceptfrom") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_TCP_SOCKET, TCP_SOCKET__NAME_CONNECT, "name_connect") + S_(SECCLASS_UDP_SOCKET, UDP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_RAWIP_SOCKET, RAWIP_SOCKET__NODE_BIND, "node_bind") + S_(SECCLASS_NODE, NODE__TCP_RECV, "tcp_recv") + S_(SECCLASS_NODE, NODE__TCP_SEND, "tcp_send") + S_(SECCLASS_NODE, NODE__UDP_RECV, "udp_recv") + S_(SECCLASS_NODE, NODE__UDP_SEND, "udp_send") + S_(SECCLASS_NODE, NODE__RAWIP_RECV, "rawip_recv") + S_(SECCLASS_NODE, NODE__RAWIP_SEND, "rawip_send") + S_(SECCLASS_NODE, NODE__ENFORCE_DEST, "enforce_dest") + S_(SECCLASS_NETIF, NETIF__TCP_RECV, "tcp_recv") + S_(SECCLASS_NETIF, NETIF__TCP_SEND, "tcp_send") + S_(SECCLASS_NETIF, NETIF__UDP_RECV, "udp_recv") + S_(SECCLASS_NETIF, NETIF__UDP_SEND, "udp_send") + S_(SECCLASS_NETIF, NETIF__RAWIP_RECV, "rawip_recv") + S_(SECCLASS_NETIF, NETIF__RAWIP_SEND, "rawip_send") + S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__CONNECTTO, "connectto") + S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__NEWCONN, "newconn") + S_(SECCLASS_UNIX_STREAM_SOCKET, UNIX_STREAM_SOCKET__ACCEPTFROM, "acceptfrom") + S_(SECCLASS_PROCESS, PROCESS__FORK, "fork") + S_(SECCLASS_PROCESS, PROCESS__TRANSITION, "transition") + S_(SECCLASS_PROCESS, PROCESS__SIGCHLD, "sigchld") + S_(SECCLASS_PROCESS, PROCESS__SIGKILL, "sigkill") + S_(SECCLASS_PROCESS, PROCESS__SIGSTOP, "sigstop") + S_(SECCLASS_PROCESS, PROCESS__SIGNULL, "signull") + S_(SECCLASS_PROCESS, PROCESS__SIGNAL, "signal") + S_(SECCLASS_PROCESS, PROCESS__PTRACE, "ptrace") + S_(SECCLASS_PROCESS, PROCESS__GETSCHED, "getsched") + S_(SECCLASS_PROCESS, PROCESS__SETSCHED, "setsched") + S_(SECCLASS_PROCESS, PROCESS__GETSESSION, "getsession") + S_(SECCLASS_PROCESS, PROCESS__GETPGID, "getpgid") + S_(SECCLASS_PROCESS, PROCESS__SETPGID, "setpgid") + S_(SECCLASS_PROCESS, PROCESS__GETCAP, "getcap") + S_(SECCLASS_PROCESS, PROCESS__SETCAP, "setcap") + S_(SECCLASS_PROCESS, PROCESS__SHARE, "share") + S_(SECCLASS_PROCESS, PROCESS__GETATTR, "getattr") + S_(SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec") + S_(SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate") + S_(SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure") + S_(SECCLASS_PROCESS, PROCESS__SIGINH, "siginh") + S_(SECCLASS_PROCESS, PROCESS__SETRLIMIT, "setrlimit") + S_(SECCLASS_PROCESS, PROCESS__RLIMITINH, "rlimitinh") + S_(SECCLASS_PROCESS, PROCESS__DYNTRANSITION, "dyntransition") + S_(SECCLASS_PROCESS, PROCESS__SETCURRENT, "setcurrent") + S_(SECCLASS_PROCESS, PROCESS__EXECMEM, "execmem") + S_(SECCLASS_PROCESS, PROCESS__EXECSTACK, "execstack") + S_(SECCLASS_PROCESS, PROCESS__EXECHEAP, "execheap") + S_(SECCLASS_PROCESS, PROCESS__SETKEYCREATE, "setkeycreate") + S_(SECCLASS_PROCESS, PROCESS__TASKFORPID, "taskforpid") + S_(SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue") + S_(SECCLASS_MSG, MSG__SEND, "send") + S_(SECCLASS_MSG, MSG__RECEIVE, "receive") + S_(SECCLASS_SHM, SHM__LOCK, "lock") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_AV, "compute_av") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_CREATE, "compute_create") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_MEMBER, "compute_member") + S_(SECCLASS_SECURITY, SECURITY__CHECK_CONTEXT, "check_context") + S_(SECCLASS_SECURITY, SECURITY__LOAD_POLICY, "load_policy") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_RELABEL, "compute_relabel") + S_(SECCLASS_SECURITY, SECURITY__COMPUTE_USER, "compute_user") + S_(SECCLASS_SECURITY, SECURITY__SETENFORCE, "setenforce") + S_(SECCLASS_SECURITY, SECURITY__SETBOOL, "setbool") + S_(SECCLASS_SECURITY, SECURITY__SETSECPARAM, "setsecparam") + S_(SECCLASS_SECURITY, SECURITY__SETCHECKREQPROT, "setcheckreqprot") + S_(SECCLASS_SYSTEM, SYSTEM__IPC_INFO, "ipc_info") + S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_READ, "syslog_read") + S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_MOD, "syslog_mod") + S_(SECCLASS_SYSTEM, SYSTEM__SYSLOG_CONSOLE, "syslog_console") + S_(SECCLASS_CAPABILITY, CAPABILITY__CHOWN, "chown") + S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_OVERRIDE, "dac_override") + S_(SECCLASS_CAPABILITY, CAPABILITY__DAC_READ_SEARCH, "dac_read_search") + S_(SECCLASS_CAPABILITY, CAPABILITY__FOWNER, "fowner") + S_(SECCLASS_CAPABILITY, CAPABILITY__FSETID, "fsetid") + S_(SECCLASS_CAPABILITY, CAPABILITY__KILL, "kill") + S_(SECCLASS_CAPABILITY, CAPABILITY__SETGID, "setgid") + S_(SECCLASS_CAPABILITY, CAPABILITY__SETUID, "setuid") + S_(SECCLASS_CAPABILITY, CAPABILITY__SETPCAP, "setpcap") + S_(SECCLASS_CAPABILITY, CAPABILITY__LINUX_IMMUTABLE, "linux_immutable") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BIND_SERVICE, "net_bind_service") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_BROADCAST, "net_broadcast") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_ADMIN, "net_admin") + S_(SECCLASS_CAPABILITY, CAPABILITY__NET_RAW, "net_raw") + S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_LOCK, "ipc_lock") + S_(SECCLASS_CAPABILITY, CAPABILITY__IPC_OWNER, "ipc_owner") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_MODULE, "sys_module") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RAWIO, "sys_rawio") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_CHROOT, "sys_chroot") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PTRACE, "sys_ptrace") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_PACCT, "sys_pacct") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_ADMIN, "sys_admin") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_BOOT, "sys_boot") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_NICE, "sys_nice") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_RESOURCE, "sys_resource") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TIME, "sys_time") + S_(SECCLASS_CAPABILITY, CAPABILITY__SYS_TTY_CONFIG, "sys_tty_config") + S_(SECCLASS_CAPABILITY, CAPABILITY__MKNOD, "mknod") + S_(SECCLASS_CAPABILITY, CAPABILITY__LEASE, "lease") + S_(SECCLASS_CAPABILITY, CAPABILITY__AUDIT_WRITE, "audit_write") >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:07:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 47A2D16A416; Tue, 14 Nov 2006 19:07:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2172016A40F for ; Tue, 14 Nov 2006 19:07:08 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B8FC43D5C for ; Tue, 14 Nov 2006 19:07:06 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEJ7640017191 for ; Tue, 14 Nov 2006 19:07:06 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEJ76Bk017188 for perforce@freebsd.org; Tue, 14 Nov 2006 19:07:06 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 19:07:06 GMT Message-Id: <200611141907.kAEJ76Bk017188@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109973 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:07:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=109973 Change 109973 by millert@millert_g5tower on 2006/11/14 19:06:22 Tools for testing race conditions. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-copyfile/README#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-copyfile/race-copyfile.sh#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-create/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-create/README#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-create/race-create.c#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-setlabel/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-setlabel/README#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-setlabel/race-setlabel.c#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-update/README#1 add .. //depot/projects/trustedbsd/sedarwin8/release/tools/racetest/race-update/race-update.sh#1 add Differences ... From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:13:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2244816A47B; Tue, 14 Nov 2006 19:13:19 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF5C316A416 for ; Tue, 14 Nov 2006 19:13:18 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 748C843D73 for ; Tue, 14 Nov 2006 19:13:15 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEJDFiK018455 for ; Tue, 14 Nov 2006 19:13:15 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEJDF8C018452 for perforce@freebsd.org; Tue, 14 Nov 2006 19:13:15 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 19:13:15 GMT Message-Id: <200611141913.kAEJDF8C018452@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109975 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:13:19 -0000 http://perforce.freebsd.org/chv.cgi?CH=109975 Change 109975 by millert@millert_g5tower on 2006/11/14 19:12:41 Project file for newer xcode Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcode/project.pbxproj#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcodeproj/project.pbxproj#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/Makefile#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcode/project.pbxproj#2 (text+ko) ==== @@ -347,7 +347,7 @@ GCC_GENERATE_DEBUGGING_SYMBOLS = NO; INFOPLIST_FILE = Info.plist; INSTALL_PATH = /System/Library/LoginPlugins; - OTHER_CFLAGS = "-I../../$(XNU)/BUILD/obj/EXPORT_HDRS/bsd -I../../$(XNU)/BUILD/obj/EXPORT_HDRS/security"; + OTHER_CFLAGS = "-I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/security"; PRODUCT_NAME = MAC; WRAPPER_EXTENSION = loginPlugin; }; @@ -661,8 +661,8 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; INFOPLIST_FILE = plugins/MLS/Info.plist; - OTHER_CFLAGS = "-I../../$(XNU)/BUILD/obj/EXPORT_HDRS/bsd -I../../$(XNU)/BUILD/obj/EXPORT_HDRS/security"; - OTHER_LDFLAGS = "-framework Foundation -framework AppKit -L../../libmac -lmac"; + OTHER_CFLAGS = "-I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/security"; + OTHER_LDFLAGS = "-framework Foundation -framework AppKit -L$(DARWIN_ROOT)/libmac -lmac"; OTHER_REZFLAGS = ""; PRODUCT_NAME = MLS; SECTORDER_FLAGS = ""; ==== //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/Makefile#2 (text+ko) ==== @@ -5,11 +5,20 @@ include ../../../Makeconfig all: - @xcodebuild XNU=$(XNU) -alltargets -buildstyle Deployment + @xcodebuild \ + SOURCE_ROOT=$(SOURCE_ROOT) \ + EXPORT_HDRS=$(EXPORT_HDRS) \ + DARWIN_ROOT=$(DARWIN_ROOT) \ + -alltargets -configuration Deployment install: - @xcodebuild XNU=$(XNU) DSTROOT="$(EXPORT_ROOT)" \ - -target MAC -buildstyle Deployment install + @xcodebuild \ + SOURCE_ROOT=$(SOURCE_ROOT) \ + EXPORT_HDRS=$(EXPORT_HDRS) \ + DARWIN_ROOT=$(DARWIN_ROOT) \ + DSTROOT="$(EXPORT_ROOT)" \ + -target MAC \ + -configuration Deployment install @chmod -R u+w $(EXPORT_ROOT)/System/Library/LoginPlugins/MAC.loginPlugin @install -m 444 MAClogin.conf.sample $(EXPORT_ROOT)/private/etc/ @install -m 555 maclogin.sh $(EXPORT_ROOT)/usr/bin/maclogin From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:13:20 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B0A3316A568; Tue, 14 Nov 2006 19:13:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 74F5916A415 for ; Tue, 14 Nov 2006 19:13:20 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3519643D6E for ; Tue, 14 Nov 2006 19:13:15 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEJDFE3018449 for ; Tue, 14 Nov 2006 19:13:15 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEJDEJd018445 for perforce@freebsd.org; Tue, 14 Nov 2006 19:13:14 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 19:13:14 GMT Message-Id: <200611141913.kAEJDEJd018445@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109974 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:13:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=109974 Change 109974 by millert@millert_g5tower on 2006/11/14 19:12:13 Sort mac_policy.h and mac_framework.h. Add mac_mount_check_fsctl() and mac_vnode_check_ioctl(). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#13 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_vnops.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#17 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#26 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#19 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-framework.vim#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/sorted-policynames.vim#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#21 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#13 (text+ko) ==== @@ -5329,6 +5329,15 @@ NDINIT(&nd, LOOKUP, nameiflags, UIO_USERSPACE, uap->path, &context); if ((error = namei(&nd))) goto FSCtl_Exit; +#ifdef MAC + error = mac_mount_check_fsctl(context.vc_ucred, vnode_mount(nd.ni_vp), cmd, data); + if (error) { + vnode_put(nd.ni_vp); + nameidone(&nd); + goto FSCtl_Exit; + } +#endif + /* Invoke the filesystem-specific code */ error = VNOP_IOCTL(nd.ni_vp, IOCBASECMD(cmd), data, uap->options, &context); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_vnops.c#6 (text+ko) ==== @@ -848,6 +848,12 @@ context.vc_proc = p; context.vc_ucred = p->p_ucred; /* XXX kauth_cred_get() ??? */ +#ifdef MAC + error = mac_vnode_check_ioctl(context.vc_ucred, vp, com, data); + if (error) + goto out; +#endif + switch (vp->v_type) { case VREG: ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#17 (text+ko) ==== @@ -36,6 +36,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/sys/mac.h,v 1.40 2003/04/18 19:57:37 rwatson Exp $ + * */ /* * Kernel interface for Mandatory Access Control -- how kernel services @@ -81,293 +82,177 @@ struct pipe; struct task; -/* - * Framework initialization. - */ -void mac_policy_initbsd(void); +/*@ macros */ +#define VNODE_LABEL_CREATE 1 +#define VNODE_LABEL_NEEDREF 2 +#define mac_task_label_update_cred(cred, task) \ + mac_task_label_update_internal(((cred)->cr_label), task) -/* - * Label operations. - */ -void mac_cred_label_init(struct ucred *); -void mac_devfs_label_init(struct devnode *); -void mac_file_label_init(struct fileglob *fg); -int mac_mbuf_label_init(struct mbuf *, int); -int mac_mbuf_tag_init(struct m_tag *, int); -void mac_mount_label_init(struct mount *); -void mac_pipe_label_init(struct pipe *cpipe); -void mac_posixsem_label_init(struct pseminfo *); -void mac_posixshm_label_init(struct pshminfo *); -void mac_proc_label_init(struct proc *); -int mac_socket_label_init(struct socket *, int waitok); -void mac_sysvmsg_label_init(struct msg *); -void mac_sysvmsq_label_init(struct msqid_kernel *msqptr); -void mac_sysvsem_label_init(struct semid_kernel*); -void mac_sysvshm_label_init(struct shmid_kernel*); -void mac_vnode_label_init(struct vnode *vp); -void mac_vnode_label_copy(struct label *, struct label *label); -void mac_devfs_label_copy(struct label *, struct label *label); -void mac_mbuf_tag_copy(struct m_tag *, struct m_tag *); -void mac_mbuf_label_copy(struct mbuf *m_from, struct mbuf *m_to); -void mac_socket_label_copy(struct label *from, struct label *to); -void mac_file_label_associate(struct ucred *cred, struct fileglob *fg); -void mac_cred_label_destroy(struct ucred *); -void mac_devfs_label_destroy(struct devnode *); -void mac_file_label_destroy(struct fileglob *fg); -void mac_mbuf_label_destroy(struct mbuf *); -void mac_mbuf_tag_destroy(struct m_tag *); -void mac_mount_label_destroy(struct mount *); -void mac_pipe_label_destroy(struct pipe *cpipe); -void mac_posixsem_label_destroy(struct pseminfo *); -void mac_posixshm_label_destroy(struct pshminfo *); -void mac_proc_label_destroy(struct proc *); -void mac_socket_label_destroy(struct socket *); -void mac_sysvsem_label_destroy(struct semid_kernel *); -void mac_sysvshm_label_destroy(struct shmid_kernel *); -void mac_vnode_label_destroy(struct vnode *); -int mac_mount_label_internalize(struct label *, char *string); -int mac_mount_label_externalize(struct label *label, char *elements, - char *outbuf, size_t outbuflen); -int mac_mount_label_get(struct mount *mp, user_addr_t mac_p); - +/*@ === */ +int mac_audit_check_postselect(struct ucred *cred, unsigned short syscode, + void *args, int error, int retval, int mac_forced); +int mac_audit_check_preselect(struct ucred *cred, unsigned short syscode, + void *args); +int mac_cred_check_label_update(struct ucred *cred, + struct label *newlabel); +int mac_cred_check_label_update_execve(struct ucred *old, + struct vnode *vp, struct label *scriptvnodelabel, + struct label *execlabel, struct proc *proc); +int mac_cred_check_visible(struct ucred *u1, struct ucred *u2); struct label *mac_cred_label_alloc(void); -void mac_cred_label_free(struct label *label); -int mac_cred_label_externalize_audit(struct proc *p, struct mac *mac); -struct label *mac_vnode_label_alloc(void); -void mac_vnode_label_free(struct label *label); -int mac_vnode_label_externalize_audit(struct vnode *vp, struct mac *mac); -struct label *mac_lctx_label_alloc(void); -void mac_lctx_label_free(struct label *label); - -#define mac_task_label_update_cred(cred, task) \ - mac_task_label_update_internal(((cred)->cr_label), task) - -/* - * Labeling event operations: file system objects, and things that - * look a lot like file system objects. - */ -int mac_vnode_label_associate(struct mount *mp, struct vnode *vp, vfs_context_t ctx); -void mac_vnode_label_associate_devfs(struct mount *mp, struct devnode *de, - struct vnode *vp); -int mac_vnode_label_associate_extattr(struct mount *mp, struct vnode *vp); -void mac_vnode_label_associate_singlelabel(struct mount *mp, struct vnode *vp); -int mac_vnode_label_associate_fdesc(struct mount *mp, struct fdescnode *fnp, - struct vnode *vp, vfs_context_t ctx); +void mac_cred_label_associate(struct ucred *cred_parent, + struct ucred *cred_child); +void mac_cred_label_associate_kernel(struct ucred *cred); +void mac_cred_label_associate_user(struct ucred *cred); +void mac_cred_label_destroy(struct ucred *cred); +int mac_cred_label_externalize_audit(struct proc *p, struct mac *mac); +void mac_cred_label_free(struct label *label); +void mac_cred_label_init(struct ucred *cred); +void mac_cred_label_update(struct ucred *cred, struct label *newlabel); +void mac_cred_label_update_execve(struct ucred *old, struct ucred *newcred, + struct vnode *vp, struct label *scriptvnodelabel, + struct label *execlabel); void mac_devfs_label_associate_device(dev_t dev, struct devnode *de, const char *fullpath); void mac_devfs_label_associate_directory(char *dirname, int dirnamelen, struct devnode *de, const char *fullpath); -int mac_vnode_notify_create(struct ucred *cred, struct mount *mp, - struct vnode *dvp, struct vnode *vp, struct componentname *cnp); -void mac_mount_label_associate(struct ucred *cred, struct mount *mp); -void mac_vnode_label_update(struct ucred *cred, struct vnode *vp, - struct label *newlabel); -void mac_vnode_label_update_extattr(struct mount *mp, struct vnode *vp, - const char *name); +void mac_devfs_label_copy(struct label *, struct label *label); +void mac_devfs_label_destroy(struct devnode *de); +void mac_devfs_label_init(struct devnode *de); void mac_devfs_label_update(struct mount *mp, struct devnode *de, struct vnode *vp); - -#define VNODE_LABEL_CREATE 1 -#define VNODE_LABEL_NEEDREF 2 -int vnode_label(struct mount *mp, struct vnode *dvp, struct vnode *vp, - struct componentname *cnp, int flags, vfs_context_t ctx); -int vnode_label1(struct vnode *vp); -void vnode_relabel(struct vnode *vp); - -/* - * Labeling event operations: Posix IPC primitives - */ -void mac_posixsem_label_associate(struct ucred *cred, struct pseminfo *psem, - const char *name); -void mac_posixshm_label_associate(struct ucred *cred, struct pshminfo *pshm, - const char *name); - -/* - * Labeling event operations: sockets and network IPC - * - * Note: all functions involving sockets (and other network objects yet to be - * implemented) hold (and rely on) the NETWORK_FUNNEL as opposed to the - * KERNEL_FUNNEL. When reading/writing kernel network objects, be sure to - * hold the NETWORK_FUNNEL. When reading/writing other types of kernel - * objects (vnode for example), be sure to hold the KERNEL_FUNNEL. - * - * XXX: Note that cred can be NULL in mac_socket_label_associate() in Darwin. - */ -void mac_socket_label_associate(struct ucred *cred, struct socket *so); -void mac_socket_label_associate_accept(struct socket *oldsocket, - struct socket *newsocket); -void mac_mbuf_label_associate_bpfdesc(struct bpf_d *bpf_d, struct mbuf *m); -void mac_mbuf_label_associate_ifnet(struct ifnet *ifp, struct mbuf *m); -void mac_mbuf_label_associate_socket(struct socket *so, struct mbuf *m); -void mac_socketpeer_label_associate_socket(struct socket *peersocket, - struct socket *socket_to_modify); - -/* - * Labeling event operations: System V IPC primitives - */ -void mac_sysvmsg_label_associate(struct ucred *cred, - struct msqid_kernel *msqptr, struct msg *msgptr); -void mac_sysvmsq_label_associate(struct ucred *cred, - struct msqid_kernel *msqptr); -void mac_sysvsem_label_associate(struct ucred *cred, - struct semid_kernel *semakptr); -void mac_sysvshm_label_associate(struct ucred *cred, - struct shmid_kernel *shmsegptr); - -/* - * Labeling event operations: processes. - */ -void mac_cred_label_update(struct ucred *cred, struct label *newlabel); -void mac_cred_label_associate(struct ucred *cred_parent, struct ucred *cred_child); int mac_execve_enter(user_addr_t mac_p, struct label *execlabel); -#if 0 -void mac_execve_exit(struct image_params *imgp); -#endif -void mac_cred_label_update_execve(struct ucred *old, struct ucred *newcred, - struct vnode *vp, struct label *scriptvnodelabel, - struct label *execlabel); -int mac_cred_check_label_update_execve(struct ucred *old, struct vnode *vp, - struct label *scriptvnodelabel, struct label *execlabel, - struct proc *p); -void mac_cred_label_associate_kernel(struct ucred *cred); -void mac_cred_label_associate_user(struct ucred *cred); -#if 0 -void mac_thread_userret(struct uthread *td); -#endif - -void mac_lctx_label_update(struct lctx *l, struct label *newlabel); - -/* - * Labeling operations for pipes. - */ -struct label *mac_pipe_label_alloc(void); -void mac_pipe_label_free(struct label *label); -void mac_pipe_label_copy(struct label *src, struct label *dest); -void mac_pipe_label_associate(struct ucred *cred, struct pipe *cpipe); -int mac_pipe_label_update(struct ucred *cred, struct pipe *cpipe, - struct label *label); - -/* - * Label cleanup operation: This is the inverse complement for the mac_create - * and associate type of hooks. This hook lets the policy module(s) perform - * a cleanup/flushing operation on the label associated with the objects, - * without freeing up the space allocated. This hook is useful in cases - * where it is desirable to remove any labeling reference when recycling any - * object to a pool. This hook does not replace the mac_destroy hooks. - */ -void mac_sysvmsg_label_recycle(struct msg *msgptr); -void mac_sysvmsq_label_recycle(struct msqid_kernel *msqptr); -void mac_sysvsem_label_recycle(struct semid_kernel *semakptr); -void mac_sysvshm_label_recycle(struct shmid_kernel *shmsegptr); -void mac_vnode_label_recycle(struct vnode *vp); - -/* - * Access control checks. - */ -int mac_cred_check_label_update(struct ucred *cred, struct label *newlabel); -int mac_cred_check_visible(struct ucred *u1, struct ucred *u2); -int mac_lctx_check_label_update(struct lctx *l, struct label *newlabel); -int mac_posixsem_check_create(struct ucred *cred, const char *name); -int mac_posixsem_check_open(struct ucred *cred, struct pseminfo *ps); -int mac_posixsem_check_post(struct ucred *cred, struct pseminfo *ps); -int mac_posixsem_check_unlink(struct ucred *cred, struct pseminfo *ps, - const char *name); -int mac_posixsem_check_wait(struct ucred *cred, struct pseminfo *ps); -int mac_posixshm_check_create(struct ucred *cred, const char *name); -int mac_posixshm_check_open(struct ucred *cred, struct pshminfo *ps); -int mac_posixshm_check_mmap(struct ucred *cred, struct pshminfo *ps, - int prot, int flags); -int mac_posixshm_check_stat(struct ucred *cred, struct pshminfo *ps); -int mac_posixshm_check_truncate(struct ucred *cred, struct pshminfo *ps, - size_t s); -int mac_posixshm_check_unlink(struct ucred *cred, struct pshminfo *ps, - const char *name); -int mac_sysvmsq_check_enqueue(struct ucred *cred, struct msg *msgptr, - struct msqid_kernel *msqptr); -int mac_sysvmsq_check_msgrcv(struct ucred *cred, struct msg *msgptr); -int mac_sysvmsq_check_msgrmid(struct ucred *cred, struct msg *msgptr); -int mac_sysvmsq_check_msqctl(struct ucred *cred, struct msqid_kernel *msqptr, - int cmd); -int mac_sysvmsq_check_msqget(struct ucred *cred, struct msqid_kernel *msqptr); -int mac_sysvmsq_check_msqsnd(struct ucred *cred, struct msqid_kernel *msqptr); -int mac_sysvmsq_check_msqrcv(struct ucred *cred, struct msqid_kernel *msqptr); -int mac_sysvsem_check_semctl(struct ucred *cred, - struct semid_kernel *semakptr, int cmd); +int mac_file_check_change_flags(struct ucred *cred, struct fileglob *fg, + u_int oldflags, u_int newflags); +int mac_file_check_change_offset(struct ucred *cred, struct fileglob *fg); +int mac_file_check_change_ofileflags(struct ucred *cred, + struct fileglob *fg, char oldflags, char newflags); +int mac_file_check_create(struct ucred *cred); +int mac_file_check_dup(struct ucred *cred, struct fileglob *fg, int newfd); int mac_file_check_fcntl(struct ucred *cred, struct fileglob *fg, int cmd, long arg); int mac_file_check_get(struct ucred *cred, struct fileglob *fg, char *elements, int len); -int mac_file_check_create(struct ucred *cred); -int mac_file_check_dup(struct ucred *cred, struct fileglob *fg, int newfd); -int mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, - u_long com, void *data); -int mac_file_check_inherit(struct ucred *cred, struct fileglob *fg); -int mac_file_check_receive(struct ucred *cred, struct fileglob *fg); int mac_file_check_get_flags(struct ucred *cred, struct fileglob *fg, u_int flags); +int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg); int mac_file_check_get_ofileflags(struct ucred *cred, struct fileglob *fg, char flags); -int mac_file_check_change_flags(struct ucred *cred, struct fileglob *fg, - u_int oldflags, u_int newflags); -int mac_file_check_change_ofileflags(struct ucred *cred, - struct fileglob *fg, char oldflags, char newflags); -int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg); -int mac_file_check_change_offset(struct ucred *cred, struct fileglob *fg); +int mac_file_check_inherit(struct ucred *cred, struct fileglob *fg); +int mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, + u_long com, void *data); int mac_file_check_mmap(struct ucred *cred, struct fileglob *fg, int prot, int flags, int *maxprot); void mac_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, int *prot); +int mac_file_check_receive(struct ucred *cred, struct fileglob *fg); int mac_file_check_set(struct ucred *cred, struct fileglob *fg, char *buf, int buflen); -int mac_sysvsem_check_semget(struct ucred *cred, - struct semid_kernel *semakptr); -int mac_sysvsem_check_semop(struct ucred *cred,struct semid_kernel *semakptr, - size_t accesstype); -int mac_sysvshm_check_shmat(struct ucred *cred, - struct shmid_kernel *shmsegptr, int shmflg); -int mac_sysvshm_check_shmctl(struct ucred *cred, - struct shmid_kernel *shmsegptr, int cmd); -int mac_sysvshm_check_shmdt(struct ucred *cred, - struct shmid_kernel *shmsegptr); -int mac_sysvshm_check_shmget(struct ucred *cred, - struct shmid_kernel *shmsegptr, int shmflg); +void mac_file_label_associate(struct ucred *cred, struct fileglob *fg); +void mac_file_label_destroy(struct fileglob *fg); +void mac_file_label_init(struct fileglob *fg); +int mac_lctx_check_label_update(struct lctx *l, struct label *newlabel); +struct label *mac_lctx_label_alloc(void); +void mac_lctx_label_free(struct label *label); +void mac_lctx_label_update(struct lctx *l, struct label *newlabel); +void mac_lctx_notify_create(struct proc *proc, struct lctx *l); +void mac_lctx_notify_join(struct proc *proc, struct lctx *l); +void mac_lctx_notify_leave(struct proc *proc, struct lctx *l); +void mac_mbuf_label_associate_bpfdesc(struct bpf_d *bpf_d, struct mbuf *m); +void mac_mbuf_label_associate_ifnet(struct ifnet *ifp, struct mbuf *m); +void mac_mbuf_label_associate_socket(struct socket *so, struct mbuf *m); +void mac_mbuf_label_copy(struct mbuf *m_from, struct mbuf *m_to); +void mac_mbuf_label_destroy(struct mbuf *m); +int mac_mbuf_label_init(struct mbuf *m, int flag); +void mac_mbuf_tag_copy(struct m_tag *m, struct m_tag *mtag); +void mac_mbuf_tag_destroy(struct m_tag *mtag); +int mac_mbuf_tag_init(struct m_tag *, int how); +int mac_mount_check_fsctl(struct ucred *cred, struct mount *mp, + int com, caddr_t data); +int mac_mount_check_getattr(struct ucred *cred, struct mount *mp, + struct vfs_attr *vfa); +int mac_mount_check_label_update(struct ucred *cred, struct mount *mp); int mac_mount_check_mount(struct ucred *cred, struct vnode *vp, const char *vfc_name); int mac_mount_check_remount(struct ucred *cred, struct mount *mp); -int mac_mount_check_umount(struct ucred *cred, struct mount *mp); -int mac_mount_check_getattr(struct ucred *cred, struct mount *mp, - struct vfs_attr *vfa); int mac_mount_check_setattr(struct ucred *cred, struct mount *mp, struct vfs_attr *vfa); int mac_mount_check_stat(struct ucred *cred, struct mount *mp); -int mac_mount_check_label_update(struct ucred *cred, struct mount *mp); +int mac_mount_check_umount(struct ucred *cred, struct mount *mp); +void mac_mount_label_associate(struct ucred *cred, struct mount *mp); +void mac_mount_label_destroy(struct mount *mp); +int mac_mount_label_externalize(struct label *label, char *elements, + char *outbuf, size_t outbuflen); +int mac_mount_label_get(struct mount *mp, user_addr_t mac_p); +void mac_mount_label_init(struct mount *); +int mac_mount_label_internalize(struct label *, char *string); +int mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe, + unsigned long cmd, void *data); int mac_pipe_check_kqfilter(struct ucred *cred, struct knote *kn, struct pipe *cpipe); -int mac_pipe_check_ioctl(struct ucred *cred, struct pipe *cpipe, - unsigned long cmd, void *data); int mac_pipe_check_read(struct ucred *cred, struct pipe *cpipe); int mac_pipe_check_select(struct ucred *cred, struct pipe *cpipe, int which); int mac_pipe_check_stat(struct ucred *cred, struct pipe *cpipe); int mac_pipe_check_write(struct ucred *cred, struct pipe *cpipe); +struct label *mac_pipe_label_alloc(void); +void mac_pipe_label_associate(struct ucred *cred, struct pipe *cpipe); +void mac_pipe_label_copy(struct label *src, struct label *dest); +void mac_pipe_label_destroy(struct pipe *cpipe); +void mac_pipe_label_free(struct label *label); +void mac_pipe_label_init(struct pipe *cpipe); +int mac_pipe_label_update(struct ucred *cred, struct pipe *cpipe, + struct label *label); +void mac_policy_initbsd(void); +int mac_posixsem_check_create(struct ucred *cred, const char *name); +int mac_posixsem_check_open(struct ucred *cred, struct pseminfo *psem); +int mac_posixsem_check_post(struct ucred *cred, struct pseminfo *psem); +int mac_posixsem_check_unlink(struct ucred *cred, struct pseminfo *psem, + const char *name); +int mac_posixsem_check_wait(struct ucred *cred, struct pseminfo *psem); +void mac_posixsem_label_associate(struct ucred *cred, + struct pseminfo *psem, const char *name); +void mac_posixsem_label_destroy(struct pseminfo *psem); +void mac_posixsem_label_init(struct pseminfo *psem); +int mac_posixshm_check_create(struct ucred *cred, const char *name); +int mac_posixshm_check_mmap(struct ucred *cred, struct pshminfo *pshm, + int prot, int flags); +int mac_posixshm_check_open(struct ucred *cred, struct pshminfo *pshm); +int mac_posixshm_check_stat(struct ucred *cred, struct pshminfo *pshm); +int mac_posixshm_check_truncate(struct ucred *cred, struct pshminfo *pshm, + size_t s); +int mac_posixshm_check_unlink(struct ucred *cred, struct pshminfo *pshm, + const char *name); +void mac_posixshm_label_associate(struct ucred *cred, + struct pshminfo *pshm, const char *name); +void mac_posixshm_label_destroy(struct pshminfo *pshm); +void mac_posixshm_label_init(struct pshminfo *pshm); int mac_proc_check_debug(struct ucred *cred, struct proc *proc); int mac_proc_check_getaudit(struct ucred *cred); int mac_proc_check_getauid(struct ucred *cred); +int mac_proc_check_getlcid(struct proc *proc1, struct proc *proc2, + pid_t pid); +int mac_proc_check_mprotect(struct ucred *cred, struct proc *proc, + void *addr, size_t size, int prot); int mac_proc_check_sched(struct ucred *cred, struct proc *proc); int mac_proc_check_setaudit(struct ucred *cred, struct auditinfo *ai); int mac_proc_check_setauid(struct ucred *cred, uid_t auid); +int mac_proc_check_setlcid(struct proc *proc1, struct proc *proc2, + pid_t pid1, pid_t pid2); int mac_proc_check_signal(struct ucred *cred, struct proc *proc, int signum); int mac_proc_check_wait(struct ucred *cred, struct proc *proc); -int mac_proc_check_setlcid(struct proc *, struct proc *, pid_t, pid_t); -int mac_proc_check_getlcid(struct proc *, struct proc *, pid_t); +void mac_proc_label_destroy(struct proc *proc); +void mac_proc_label_init(struct proc *proc); +int mac_setsockopt_label(struct ucred *cred, struct socket *so, + struct mac *extmac); int mac_socket_check_accept(struct ucred *cred, struct socket *so); int mac_socket_check_bind(struct ucred *cred, struct socket *so, struct sockaddr *addr); int mac_socket_check_connect(struct ucred *cred, struct socket *so, struct sockaddr *addr); -int mac_socket_check_create(struct ucred *cred, int domain, int type, - int protocol); +int mac_socket_check_create(struct ucred *cred, int domain, + int type, int protocol); int mac_socket_check_deliver(struct socket *so, struct mbuf *m); int mac_socket_check_kqfilter(struct ucred *cred, struct knote *kn, struct socket *so); @@ -377,6 +262,19 @@ int which); int mac_socket_check_send(struct ucred *cred, struct socket *so); int mac_socket_check_stat(struct ucred *cred, struct socket *so); +void mac_socket_label_associate(struct ucred *cred, struct socket *so); +void mac_socket_label_associate_accept(struct socket *oldsocket, + struct socket *newsocket); +void mac_socket_label_copy(struct label *from, struct label *to); +void mac_socket_label_destroy(struct socket *); +int mac_socket_label_get(struct ucred *cred, struct socket *so, + struct mac *extmac); +int mac_socket_label_init(struct socket *, int waitok); +void mac_socketpeer_label_associate_mbuf(struct mbuf *m, struct socket *so); +void mac_socketpeer_label_associate_socket(struct socket *peersocket, + struct socket *socket_to_modify); +int mac_socketpeer_label_get(struct ucred *cred, struct socket *so, + struct mac *extmac); int mac_system_check_acct(struct ucred *cred, struct vnode *vp); int mac_system_check_audit(struct ucred *cred, void *record, int length); int mac_system_check_auditctl(struct ucred *cred, struct vnode *vp); @@ -384,11 +282,55 @@ int mac_system_check_nfsd(struct ucred *cred); int mac_system_check_reboot(struct ucred *cred, int howto); int mac_system_check_settime(struct ucred *cred); +int mac_system_check_swapoff(struct ucred *cred, struct vnode *vp); int mac_system_check_swapon(struct ucred *cred, struct vnode *vp); -int mac_system_check_swapoff(struct ucred *cred, struct vnode *vp); int mac_system_check_sysctl(struct ucred *cred, int *name, u_int namelen, void *oldctl, size_t *oldlenp, int inkernel, void *newctl, size_t newlen); +void mac_sysvmsg_label_associate(struct ucred *cred, + struct msqid_kernel *msqptr, struct msg *msgptr); +void mac_sysvmsg_label_init(struct msg *msgptr); +void mac_sysvmsg_label_recycle(struct msg *msgptr); +int mac_sysvmsq_check_enqueue(struct ucred *cred, struct msg *msgptr, + struct msqid_kernel *msqptr); +int mac_sysvmsq_check_msgrcv(struct ucred *cred, struct msg *msgptr); +int mac_sysvmsq_check_msgrmid(struct ucred *cred, struct msg *msgptr); +int mac_sysvmsq_check_msqctl(struct ucred *cred, + struct msqid_kernel *msqptr, int cmd); +int mac_sysvmsq_check_msqget(struct ucred *cred, + struct msqid_kernel *msqptr); +int mac_sysvmsq_check_msqrcv(struct ucred *cred, + struct msqid_kernel *msqptr); +int mac_sysvmsq_check_msqsnd(struct ucred *cred, + struct msqid_kernel *msqptr); +void mac_sysvmsq_label_associate(struct ucred *cred, + struct msqid_kernel *msqptr); +void mac_sysvmsq_label_init(struct msqid_kernel *msqptr); +void mac_sysvmsq_label_recycle(struct msqid_kernel *msqptr); +int mac_sysvsem_check_semctl(struct ucred *cred, + struct semid_kernel *semakptr, int cmd); +int mac_sysvsem_check_semget(struct ucred *cred, + struct semid_kernel *semakptr); +int mac_sysvsem_check_semop(struct ucred *cred, + struct semid_kernel *semakptr, size_t accesstype); +void mac_sysvsem_label_associate(struct ucred *cred, + struct semid_kernel *semakptr); +void mac_sysvsem_label_destroy(struct semid_kernel *semakptr); +void mac_sysvsem_label_init(struct semid_kernel *semakptr); +void mac_sysvsem_label_recycle(struct semid_kernel *semakptr); +int mac_sysvshm_check_shmat(struct ucred *cred, + struct shmid_kernel *shmsegptr, int shmflg); +int mac_sysvshm_check_shmctl(struct ucred *cred, + struct shmid_kernel *shmsegptr, int cmd); +int mac_sysvshm_check_shmdt(struct ucred *cred, + struct shmid_kernel *shmsegptr); +int mac_sysvshm_check_shmget(struct ucred *cred, + struct shmid_kernel *shmsegptr, int shmflg); +void mac_sysvshm_label_associate(struct ucred *cred, + struct shmid_kernel *shmsegptr); +void mac_sysvshm_label_destroy(struct shmid_kernel *shmsegptr); +void mac_sysvshm_label_init(struct shmid_kernel* shmsegptr); +void mac_sysvshm_label_recycle(struct shmid_kernel *shmsegptr); int mac_task_check_get_port(struct ucred *cred, struct task *task); int mac_vnode_check_access(struct ucred *cred, struct vnode *vp, int acc_mode); @@ -396,43 +338,42 @@ int mac_vnode_check_chroot(struct ucred *cred, struct vnode *dvp); int mac_vnode_check_create(struct ucred *cred, struct vnode *dvp, struct componentname *cnp, struct vnode_attr *vap); -int mac_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, - struct vnode *vp, struct componentname *cnp); int mac_vnode_check_deleteextattr(struct ucred *cred, struct vnode *vp, const char *name); int mac_vnode_check_exchangedata(struct ucred *cred, struct vnode *v1, - struct vnode *v2); + struct vnode *v2); int mac_vnode_check_exec(struct ucred *cred, struct vnode *vp, struct label *execlabel); int mac_vnode_check_getattrlist(struct ucred *cred, struct vnode *vp, - struct attrlist *alist); + struct attrlist *alist); int mac_vnode_check_getextattr(struct ucred *cred, struct vnode *vp, const char *name, struct uio *uio); +int mac_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, int com, + caddr_t data); int mac_vnode_check_kqfilter(struct ucred *active_cred, struct ucred *file_cred, struct knote *kn, struct vnode *vp); +int mac_vnode_check_label_update(struct ucred *cred, struct vnode *vp, + struct label *newlabel); int mac_vnode_check_link(struct ucred *cred, struct vnode *dvp, struct vnode *vp, struct componentname *cnp); int mac_vnode_check_listextattr(struct ucred *cred, struct vnode *vp); int mac_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, struct componentname *cnp); -int mac_proc_check_mprotect(struct ucred *cred, struct proc *proc, - void *addr, size_t size, int prot); int mac_vnode_check_open(struct ucred *cred, struct vnode *vp, int acc_mode); int mac_vnode_check_read(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); int mac_vnode_check_readdir(struct ucred *cred, struct vnode *vp); int mac_vnode_check_readlink(struct ucred *cred, struct vnode *vp); -int mac_vnode_check_label_update(struct ucred *cred, struct vnode *vp, - struct label *newlabel); int mac_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, struct vnode *vp, struct componentname *cnp); int mac_vnode_check_rename_to(struct ucred *cred, struct vnode *dvp, struct vnode *vp, int samedir, struct componentname *cnp); int mac_vnode_check_revoke(struct ucred *cred, struct vnode *vp); -int mac_vnode_check_select(struct ucred *cred, struct vnode *vp, int which); +int mac_vnode_check_select(struct ucred *cred, struct vnode *vp, + int which); int mac_vnode_check_setattrlist(struct ucred *cred, struct vnode *vp, - struct attrlist *alist); + struct attrlist *alist); int mac_vnode_check_setextattr(struct ucred *cred, struct vnode *vp, const char *name, struct uio *uio); int mac_vnode_check_setflags(struct ucred *cred, struct vnode *vp, @@ -447,46 +388,36 @@ struct ucred *file_cred, struct vnode *vp); int mac_vnode_check_truncate(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); +int mac_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, + struct vnode *vp, struct componentname *cnp); int mac_vnode_check_write(struct ucred *active_cred, struct ucred *file_cred, struct vnode *vp); - -int mac_socket_label_get(struct ucred *cred, struct socket *so, - struct mac *extmac); -int mac_setsockopt_label(struct ucred *cred, struct socket *so, - struct mac *extmac); -int mac_socketpeer_label_get(struct ucred *cred, struct socket *so, - struct mac *extmac); -#if 0 -void mac_cred_mmapped_drop_perms(struct thread *td, struct ucred *cred); -#endif - -/* - * mac_audit_{pre,post}select() allow MAC policies to control whether a given - * event will be audited. For 10.3.3, these functions take precedence over - * the existing pre/post-selection selection in Darwin. That aspect of the - * sematics of these functions will probably change for version 10.3.4 as - * that version has a more complete implementation of the audit subsystem. - */ -int mac_audit_check_preselect(struct ucred *cred, unsigned short syscode, - void *args); -int mac_audit_check_postselect(struct ucred *cred, unsigned short syscode, - void *args, int error, int retval, int mac_forced); - -void mac_lctx_notify_create(struct proc *, struct lctx *); -void mac_lctx_notify_join(struct proc *, struct lctx *); -void mac_lctx_notify_leave(struct proc *, struct lctx *); - -/* - * The semantics of this function are slightly different than the standard - * copy operation. On the first call for a given socket, the peer label has - * been newly allocated. On successive calls, the peer label is in use and - * would be clobbered by a normal copy operation. It was decided to implement - * it this way because its performance has a significant impact on network - * performance. A destroy-init-copy sequence is too inefficient here. - * Some policies may be able to replace data inline, which is more efficient. - * It is up to the policies to determine the most efficient action to take. - */ -void mac_socketpeer_label_associate_mbuf(struct mbuf *m, struct socket *so); +struct label *mac_vnode_label_alloc(void); +int mac_vnode_label_associate(struct mount *mp, struct vnode *vp, + vfs_context_t ctx); +void mac_vnode_label_associate_devfs(struct mount *mp, struct devnode *de, + struct vnode *vp); +int mac_vnode_label_associate_fdesc(struct mount *mp, struct fdescnode *fnp, + struct vnode *vp, vfs_context_t ctx); +int mac_vnode_label_associate_extattr(struct mount *mp, struct vnode *vp); +void mac_vnode_label_associate_singlelabel(struct mount *mp, + struct vnode *vp); +void mac_vnode_label_copy(struct label *l1, struct label *l2); +void mac_vnode_label_destroy(struct vnode *vp); +int mac_vnode_label_externalize_audit(struct vnode *vp, struct mac *mac); +void mac_vnode_label_free(struct label *label); +void mac_vnode_label_init(struct vnode *vp); +void mac_vnode_label_recycle(struct vnode *vp); +void mac_vnode_label_update(struct ucred *cred, struct vnode *vp, + struct label *newlabel); +void mac_vnode_label_update_extattr(struct mount *mp, struct vnode *vp, + const char *name); +int mac_vnode_notify_create(struct ucred *cred, struct mount *mp, + struct vnode *dvp, struct vnode *vp, struct componentname *cnp); +int vnode_label(struct mount *mp, struct vnode *dvp, struct vnode *vp, + struct componentname *cnp, int flags, vfs_context_t ctx); +int vnode_label1(struct vnode *vp); +void vnode_relabel(struct vnode *vp); #endif /* MAC */ ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#26 (text+ko) ==== @@ -55,8 +55,8 @@ #include +struct attrlist; struct auditinfo; -struct attrlist; struct bpf_d; struct devnode; struct fileglob; @@ -96,11 +96,93 @@ */ /** - @name Entry Points for the Base Policy Module Only + @name Entry Points for Label Management + + These are the entry points corresponding to the life cycle events for + kernel objects, such as initialization, creation, and destruction. + + Most policies (that use labels) will initialize labels by allocating + space for policy-specific data. In most cases, it is permitted to + sleep during label initialization operations; it will be noted when + it is not permitted. + + Initialization usually will not require doing more than allocating a + generic label for the given object. What follows initialization is + creation, where a label is made specific to the object it is associated + with. Destruction occurs when the label is no longer needed, such as + when the corresponding object is destroyed. All necessary cleanup should + be performed in label destroy operations. + + Where possible, the label entry points have identical parameters. If + the policy module does not require structure-specific label + information, the same function may be registered in the policy + operation vector. Many policies will implement two such generic + allocation calls: one to handle sleepable requests, and one to handle + potentially non-sleepable requests. +*/ + + +/** + @brief Audit event postselection + @param cred Subject credential + @param syscode Syscall number + @param args Syscall arguments + @param error Syscall errno + @param retval Syscall return value + + This is the MAC Framework audit postselect, which is called before + exiting a syscall to determine if an audit event should be committed. + A return value of MAC_AUDIT_NO forces the audit record to be suppressed. + Any other return value results in the audit record being committed. + + @warning The suppression behavior will probably go away in Apple's + future version of the audit implementation. + + @return Return MAC_AUDIT_NO to force suppression of the audit record. + Any other value results in the audit record being committed. + */ +typedef int mpo_audit_check_postselect_t( + struct ucred *cred, + unsigned short syscode, + void *args, + int error, + int retval +); +/** + @brief Audit event preselection + @param cred Subject credential + @param syscode Syscall number + @param args Syscall arguments + + This is the MAC Framework audit preselect, which is called before a + syscall is entered to determine if an audit event should be created. + If the MAC policy forces the syscall to be audited, MAC_AUDIT_YES should be + returned. A return value of MAC_AUDIT_NO causes the audit record to + be suppressed. Returning MAC_POLICY_DEFAULT indicates that the policy wants + to defer to the system's existing preselection mechanism. + + When policies return different preferences, the Framework decides what action + to take based on the following policy. If any policy returns MAC_AUDIT_YES, + then create an audit record, else if any policy returns MAC_AUDIT_NO, then + suppress the creations of an audit record, else defer to the system's + existing preselection mechanism. + + @warning The audit implementation in Apple's current version is + incomplete, so the MAC policies have priority over the system's existing + mechanisms. This will probably change in the future version where + the audit implementation is more complete. -/*@{*/ + @return Return MAC_AUDIT_YES to force auditing of the syscall, + MAC_AUDIT_NO to force no auditing of the syscall, MAC_AUDIT_DEFAULT + to allow auditing mechanisms to determine if the syscall is audited. +*/ +typedef int mpo_audit_check_preselect_t( + struct ucred *cred, + unsigned short syscode, + void *args +); /** @brief Base Policy approve MAC module load event @param mpc MAC policy configuration @@ -116,7 +198,6 @@ typedef int mpo_base_check_module_load_t( struct mac_policy_conf *mpc ); - /** @brief Base Policy approve MAC module unload event @param mpc MAC policy configuration @@ -132,7 +213,6 @@ typedef int mpo_base_check_module_unload_t( struct mac_policy_conf *mpc ); - /** @brief Base Policy finalize event @@ -145,896 +225,746 @@ */ typedef void mpo_base_notify_finalize_t(void); +/** + @brief Indicate desire to change the process label at exec time + @param old Existing subject credential + @param vp File being executed + @param vnodelabel Label corresponding to vp + @param scriptvnodelabel Script vnode label + @param execlabel Userspace provided execution label + @param proc Object process + @see mac_execve + @see mpo_cred_label_update_execve_t + @see mpo_vnode_check_exec_t -/*@}*/ + Indicate whether this policy intends to update the label of a newly + created credential from the existing subject credential (old). This + call occurs when a process executes the passed vnode. If a policy + returns success from this entry point, the mpo_cred_label_update_execve + entry point will later be called with the same parameters. Access + has already been checked via the mpo_vnode_check_exec entry point, + this entry point is necessary to preserve kernel locking constraints + during program execution. -/** - @name Entry Points for Module Operations -*/ + The supplied vnode and vnodelabel correspond with the file actually + being executed; in the case that the file is interpreted (for + example, a script), the label of the original exec-time vnode has + been preserved in scriptvnodelabel. -/*@{*/ + The final label, execlabel, corresponds to a label supplied by a + user space application through the use of the mac_execve system call. -/** - @brief Policy unload event - @param mpc MAC policy configuration + The vnode lock is held during this operation. No changes should be + made to the old credential structure. - This is the MAC Framework policy unload event. This entry point will - only be called if the module's policy configuration allows unload (if - the MPC_LOADTIME_FLAG_UNLOADOK is set). Most security policies won't - want to be unloaded; they should set their flags to prevent this - entry point from being called. + @warning Even if a policy returns 0, it should behave correctly in + the presence of an invocation of mpo_cred_label_update_execve, as that + call may happen as a result of another policy requesting a transition. - @warning During this call, the mac policy list mutex is held, so - sleep operations cannot be performed, and calls out to other kernel - subsystems must be made with caution. - - @see MPC_LOADTIME_FLAG_UNLOADOK + @return Non-zero if a transition is required, 0 otherwise. */ -typedef void mpo_policy_destroy_t( - struct mac_policy_conf *mpc +typedef int mpo_cred_check_label_update_execve_t( + struct ucred *old, + struct vnode *vp, + struct label *vnodelabel, + struct label *scriptvnodelabel, + struct label *execlabel, + struct proc *proc ); - /** - @brief Policy initialization event - @param mpc MAC policy configuration - @see mac_policy_register - @see mpo_policy_initbsd_t + @brief Access control check for relabelling processes + @param cred Subject credential + @param newlabel New label to apply to the user credential + @see mpo_cred_label_update_t + @see mac_set_proc - This is the MAC Framework policy initialization event. This entry - point is called during mac_policy_register, when the policy module - is first registered with the MAC Framework. This is often done very - early in the boot process, after the kernel Mach subsystem has been - initialized, but prior to the BSD subsystem being initialized. - Since the kernel BSD services are not yet available, it is possible - that some initialization must occur later, possibly in the - mpo_policy_initbsd_t policy entry point, such as registering BSD system - controls (sysctls). Policy modules loaded at boot time will be - registered and initialized before labeled Mach objects are created. + Determine whether the subject identified by the credential can relabel + itself to the supplied new label (newlabel). This access control check + is called when the mac_set_proc system call is invoked. A user space + application will supply a new value, the value will be internalized + and provided in newlabel. - @warning During this call, the mac policy list mutex is held, so - sleep operations cannot be performed, and calls out to other kernel - subsystems must be made with caution. + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. */ -typedef void mpo_policy_init_t( - struct mac_policy_conf *mpc +typedef int mpo_cred_check_label_update_t( + struct ucred *cred, + struct label *newlabel ); - /** - @brief Policy BSD initialization event - @param mpc MAC policy configuration - @see mpo_policy_init_t + @brief Access control check for visibility of other subjects + @param u1 Subject credential + @param u2 Object credential - This entry point is called after the kernel BSD subsystem has been - initialized. By this point, the module should already be loaded, - registered, and initialized. Since policy modules are initialized - before kernel BSD services are available, this second initialization - phase is necessary. At this point, BSD services (memory management, - synchronization primitives, vfs, etc.) are available, but the first - process has not yet been created. Mach-related objects and tasks - will already be fully initialized and may be in use--policies requiring - ubiquitous labeling may also want to implement mpo_policy_init_t. + Determine whether the subject identified by the credential u1 can + "see" other subjects with the passed subject credential u2. This call + may be made in a number of situations, including inter-process status + sysctls used by ps, and in procfs lookups. - @warning During this call, the mac policy list mutex is held, so - sleep operations cannot be performed, and calls out to other kernel - subsystems must be made with caution. + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. Suggested failure: EACCES for label mismatch, + EPERM for lack of privilege, or ESRCH to hide visibility. */ -typedef void mpo_policy_initbsd_t( - struct mac_policy_conf *mpc +typedef int mpo_cred_check_visible_t( + struct ucred *u1, + struct ucred *u2 ); - /** - @brief Policy extension service - @param p Calling process - @param call Policy-specific syscall number - @param arg Pointer to syscall arguments + @brief Create the first process + @param cred Subject credential to be labeled - This entry point provides a policy-multiplexed system call so that - policies may provide additional services to user processes without - registering specific system calls. The policy name provided during - registration is used to demux calls from userland, and the arguments - will be forwarded to this entry point. When implementing new - services, security modules should be sure to invoke appropriate - access control checks from the MAC framework as needed. For - example, if a policy implements an augmented signal functionality, - it should call the necessary signal access control checks to invoke - the MAC framework and other registered policies. - - @warning Since the format and contents of the policy-specific - arguments are unknown to the MAC Framework, modules must perform the - required copyin() of the syscall data on their own. No policy - mediation is performed, so policies must perform any necessary - access control checks themselves. If multiple policies are loaded, - they will currently be unable to mediate calls to other policies. - - @return In the event of an error, an appropriate value for errno - should be returned, otherwise return 0 upon success. + Create the subject credential of process 0, the parent of all BSD + kernel processes. Policies should update the label in the + previously initialized credential structure. */ -typedef int mpo_policy_syscall_t( - struct proc *p, - int call, - user_addr_t arg +typedef void mpo_cred_label_associate_kernel_t( + struct ucred *cred ); - -/*@}*/ - /** - @name Entry Points for Label Management + @brief Create a credential label >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 14 19:46:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4215E16A47B; Tue, 14 Nov 2006 19:46:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DADA016A403; Tue, 14 Nov 2006 19:46:15 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (66-23-211-162.clients.speedfactory.net [66.23.211.162]) by mx1.FreeBSD.org (Postfix) with ESMTP id 80B6A43D76; Tue, 14 Nov 2006 19:46:07 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [127.0.0.1]) (authenticated bits=0) by server.baldwin.cx (8.13.6/8.13.6) with ESMTP id kAEJjqQN024703; Tue, 14 Nov 2006 14:46:00 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: Jung-uk Kim Date: Tue, 14 Nov 2006 12:41:31 -0500 User-Agent: KMail/1.9.1 References: <200611102300.kAAN0Cn1045678@repoman.freebsd.org> <200611131606.21477.jhb@freebsd.org> <200611131812.15858.jkim@FreeBSD.org> In-Reply-To: <200611131812.15858.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200611141241.33587.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [127.0.0.1]); Tue, 14 Nov 2006 14:46:01 -0500 (EST) X-Virus-Scanned: ClamAV 0.88.3/2194/Tue Nov 14 12:26:01 2006 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=4.2 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: Perforce Change Reviews Subject: Re: PERFORCE change 109706 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 19:46:16 -0000 On Monday 13 November 2006 18:12, Jung-uk Kim wrote: > On Monday 13 November 2006 04:06 pm, John Baldwin wrote: > > On Friday 10 November 2006 18:00, Jung-uk Kim wrote: > > > http://perforce.freebsd.org/chv.cgi?CH=109706 > > > > > > Change 109706 by jkim@jkim_hammer on 2006/11/10 22:59:53 > > > > > > Add (ugly) 32-bit msgsnd/msgrcv support for amd64. > > > msgp points to msghdr and msghdr contains msg_type, which is > > > long. When we copyin/copyout, we copy the correct msg_type and > > > advance msgp by msg_type size. > > > > > > This fixes LTP test cases msgget01, msgrcv01, msgrcv02, > > > msgrcv04, and msgsnd03. > > > > > > Note: There is only one test case blocked in msgwait state after > > > this change, which seems to be arch-independent issue. > > > > > > Affected files ... > > > > > > .. > > > //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#3 > > > edit .. //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#5 > > > edit > > > > Why not add kern_msgfoo() functions and do the copyout/copyin in > > other places instead? > > Unfortunately there are two different types of copyin/copyout's in > each msgsnd/msgrcv, i.e., message type and actual message. Only the > first one (i.e., message type) is affected. It is quite hard to > separate them because of that reason. I thought about using one > copyin/copyout instead of two. I thought about passing function > pointer to a copy function. I even thought about making > msgsnd32/msgrcv32 syscalls. But these are overkill for this, I > think. As I noted in the commit log, I don't like this but I think > this is the simplest fix without breaking existing APIs. Use uio_seg's for each item. Then the wrappers only have to explicitly copy in the one that is different from normal and use UIO_SYSSPACE for that one. -- John Baldwin From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:31:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B051C16A4EC; Tue, 14 Nov 2006 20:31:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5766516A4EA for ; Tue, 14 Nov 2006 20:31:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9391B43F05 for ; Tue, 14 Nov 2006 20:28:24 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKSNCi040706 for ; Tue, 14 Nov 2006 20:28:23 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKRlru040152 for perforce@freebsd.org; Tue, 14 Nov 2006 20:27:47 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:27:47 GMT Message-Id: <200611142027.kAEKRlru040152@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109978 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:31:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=109978 Change 109978 by millert@millert_g5tower on 2006/11/14 20:27:30 Integrate the vendor changes for Mac OS X 10.4.8 Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/RelNotes/CompilerTools.html#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/RelNotes/Private_CompilerTools.html#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/app.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/as.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/as.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/atof-ieee.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/expr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/expr.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/fixes.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/fixes.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/frags.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/frags.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/hppa.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/i386-opcode.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/i386.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/i386.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/i860.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/input-scrub.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/layout.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/m68k.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/m88k.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/md.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/messages.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/messages.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/ppc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/read.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/read.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/relax.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/sections.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/sections.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/sparc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/struc-symbol.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/symbols.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/symbols.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/write_object.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/as/write_object.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/gprof/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/gprof/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach-o/i386/swap.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach-o/loader.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach-o/redo_prebinding.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach-o/reloc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach-o/swap.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach-o/x86_64/reloc.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/mach/machine.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/include/stuff/bytesex.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/debugcompunit.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/debugcompunit.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/debugline.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/debugline.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/dwarf2.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/generic_reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/hppa_reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/i860_reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/layout.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/layout.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/ld.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/ld.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/m88k_reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/objects.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/objects.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/pass1.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/pass1.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/pass2.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/ppc_reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/sections.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/sections.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/sparc_reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/specs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/symbols.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/symbols.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/uuid.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/ld/uuid.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libdyld/debug.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libdyld/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libmacho/arch.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libmacho/i386_swap.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libmacho/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libmacho/ppc_swap.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libmacho/swap.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/arch.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/best_arch.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/bytesex.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/ofile.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/reloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/libstuff/swap_headers.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/arch.3#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/as.1#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/ld.1#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/libtool.1#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/lipo.1#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/man/strip.1#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/checksyms.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/libtool.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/lipo.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/nm.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/pagestuff.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/redo_prebinding.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/seg_hack.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/misc/strip.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/otool/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/otool/i386_disasm.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/otool/main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/otool/notes#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/otool/ofile_print.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/cctools/otool/ofile_print.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/clri.tproj/clri.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/clri.tproj/ufs_byte_order.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/clri.tproj/ufs_byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dev_mkdb.tproj/dev_mkdb.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/dkcksum.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/dkopen.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/dkopen.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/dksecsize.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/dump.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/dumprmt.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/fsck.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/getmntopts.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/mntopts.h#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/pathnames.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/preen.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/disklib/vfslist.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dump.tproj/itime.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dump.tproj/main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dump.tproj/optr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dump.tproj/tape.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dump.tproj/traverse.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dump.tproj/unctime.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dumpfs.tproj/dumpfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dumpfs.tproj/ufs_byte_order.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/dumpfs.tproj/ufs_byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/edquota.tproj/edquota.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/edquota.tproj/pathnames.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/auto.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/auto.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/cmd.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/cmd.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/disk.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/disk.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/fdisk.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/getrawpartition.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/mbr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/mbr.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/misc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/misc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/opendev.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/part.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/part.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/user.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/user.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fdisk.tproj/util.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/dir.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/ffs_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/ffs_tables.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/fsck.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/inode.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/pass1.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/pass1b.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/pass2.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/pass3.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/pass4.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/pass5.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/preen.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/setup.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/ufs_byte_order.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/ufs_byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck.tproj/utilities.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/cache.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/cache.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTree.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTree.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreeAllocate.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreeMiscOps.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreeNodeOps.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreePrivate.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreeScanner.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreeScanner.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BTreeTreeOps.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/BlockCache.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/CaseFolding.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/CatalogCheck.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/CheckHFS.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/DecompDataEnums.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/HardLinkCheck.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SAllocate.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SBTree.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SCatalog.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SControl.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SDevice.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SExtents.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SKeyCompare.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SRebuildCatalogBTree.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SRepair.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SRuntime.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SStubs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SUtils.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SVerify1.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/SVerify2.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/Scavenger.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/VolumeBitmapCheck.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/hfs_endian.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/dfalib/hfs_endian.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/fsck_debug.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/fsck_debug.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/fsck_hfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/fsck_hfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/strings.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_hfs.tproj/utilities.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/boot.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/check.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/dir.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/dosfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/ext.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/fat.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/fsutil.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/fsutil.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/fsck_msdos.tproj/main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount.tproj/mount.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount.tproj/mount_ufs.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount.tproj/pathnames.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_cd9660.tproj/mount_cd9660.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_devfs.tproj/mount_devfs.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_fdesc.tproj/mount_fdesc.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_hfs.tproj/hfs_endian.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_hfs.tproj/mount_hfs.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_nfs.tproj/mount_nfs.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mount_synthfs.tproj/mount_synthfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mountd.tproj/mountd.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/mountd.tproj/pathnames.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs.tproj/mkfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs.tproj/newfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs.tproj/ufs_byte_order.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs.tproj/ufs_byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_hfs.tproj/hfs_endian.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_hfs.tproj/hfs_endian.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_hfs.tproj/makehfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_hfs.tproj/newfs_hfs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_hfs.tproj/newfs_hfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_hfs.tproj/readme.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/newfs_msdos.tproj/newfs_msdos.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quot.tproj/quot.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quota.tproj/quota.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotacheck.tproj/hfs_quotacheck.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotacheck.tproj/quotacheck.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotacheck.tproj/quotacheck.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotacheck.tproj/ufs_byte_order.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotacheck.tproj/ufs_byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotacheck.tproj/ufs_quotacheck.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/quotaon.tproj/quotaon.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/repquota.tproj/repquota.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/dirs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/extern.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/interactive.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/pathnames.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/restore.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/restore.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/symtab.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/tape.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/restore.tproj/utilities.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/showmount.tproj/showmount.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/tunefs.tproj/tunefs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/umount.tproj/umount.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/vndevice.tproj/vndevice.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/diskdev_cmds/vsdbutil.tproj/vsdbutil_main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/file_cmds/cp/utils.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/file_cmds/mv/mv.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/kext_tools/kext_tools.xcodeproj/project.pbxproj#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/kext_tools/kextcache.8#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/kext_tools/kextcache_main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/kext_tools/kextd_main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/kext_tools/kextload_main.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/kext_tools/prelink.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/Makefile#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/AUTHORS#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/COPYING#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/ChangeLog#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/INSTALL#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/Makefile.am#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/Makefile.in#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/NEWS#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/README#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/TODO#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/aclocal.m4#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/compile#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/configure#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/configure.ac#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/depcomp#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/doc/HOWTO.html#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/doc/Makefile.am#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/doc/Makefile.in#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/doc/StartupItem-NOTES.rtf#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/doc/com.apple.launchdebugd.xml#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/doc/sampled.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/install-sh#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/missing#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/mkinstalldirs#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/ConsoleMessage.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/ConsoleMessage.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/IPC.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/IPC.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/Makefile.am#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/Makefile.in#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItemContext.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItemContext.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/Apache#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/Apache.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/AppServices#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/AppServices.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/AppleShare#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/AppleShare.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/AuthServer#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/AuthServer.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/Disks#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/Disks.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/IPServices#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/IPServices.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/NFS#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/NFS.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/NIS#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/NIS.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/NetworkTime#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/StartupItems/NetworkTime.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/SystemStarter.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/SystemStarter.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/SystemStarter.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/SystemStarterIPC.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/bootstrap.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/bootstrap.defs#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/bootstrap_internal.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/config.h.in#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/hostconfig#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/init.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/init.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launch.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launch_priv.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchctl.1#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchctl.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchd.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchd.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchd.conf.5#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchd.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchd.plist.5#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchd_debugd.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchdebugd.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchproxy.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/launchproxy.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/liblaunch.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/lists.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/lists.h#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/rc#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/rc.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/rc.common#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/rc.netboot#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/rc.shutdown#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/register_mach_bootstrap_servers.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/rpc_services.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/service#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/service.8#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/wait4path.1#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/src/wait4path.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/StartCalendarInterval.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/StartInterval.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/badexec.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/badexit.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/missed-EVFILT_WRITE.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/missing_req_keys.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/secsock.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/launchd/launchd/testing/signaldeath.plist#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/mount_msdos.tproj/mount_msdos.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdos_util.tproj/dosutil.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/denode.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/direntry.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_conv.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_denode.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_fat.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_lookup.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.kextproj/msdosfs.kmodproj/msdosfs_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/msdosfs.pbproj/project.pbxproj#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/pbxbuild.data/msdos.fs.build/Info.plist#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/pbxbuild.data/msdosfs.build/Info.plist#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/msdosfs/pbxbuild.data/msdosfs.build/Jamfile.jam#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/pam_modules/pam_afpmount/GNUmakefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/pam_modules/pam_afpmount/Makefile#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/pam_modules/pam_afpmount/pam_afpmount.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/system_cmds/passwd.tproj/file_passwd.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/system_cmds/zic.tproj/Makefile.postamble#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/system_cmds/zic.tproj/datfiles/tzdata2006a.tar.gz#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/ar.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/asm_help.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/cpu.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/desc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/fpu.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/frame.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/io.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/reg_help.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/sel.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/table.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/i386/tss.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/asm_help.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/basic_regs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/cframe.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/fp_regs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/macro_help.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/pseudo_inst.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/architecture/ppc/reg_help.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/i386/_limits.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/i386/limits.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/mach-o/fat.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/mach-o/kld.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/mach-o/loader.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/mach-o/nlist.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/mach-o/reloc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/machine/limits.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/ppc/_limits.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/ppc/limits.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/EXTERNAL_HEADERS/stdarg.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/bsm/audit.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/bsm/audit_kernel.h#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/bsm/audit_kevents.h#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/bsm/audit_klib.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/bsm/audit_record.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/conf/Makefile.i386#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/conf/Makefile.template#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/conf/files#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/conf/param.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/busvar.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/conf.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/cons.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/cons.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/kern_machdep.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/km.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/lock_stubs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/mem.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/memmove.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/pci_device.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/pio.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/sel.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/sel_inline.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/stubs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/sysctl.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/table_inline.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/i386/unix_signal.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/kmreg_com.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ldd.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/memdev.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/chud/chud_bsd_callback.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/chud/chud_process.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/conf.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/cons.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/cons.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/ffs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/ffs.s#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/kern_machdep.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/km.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/machdep.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/mem.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/memmove.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/munge.s#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/nvram.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/ppc_init.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/stubs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/sysctl.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/systemcalls.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/unix_signal.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/ppc/xsumas.s#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/include/WindowsTypesForMac.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/include/yarrow.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/include/yarrowUtils.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/port/smf.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/assertverify.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/comp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/comp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/entropysources.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/macOnly.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/prng.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/prng.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/prngpriv.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/sha1mod.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/sha1mod.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/smf.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/userdefines.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/YarrowCoreLib/src/yarrowUtils.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/randomdev.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/random/randomdev.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/unix_startup.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/vn/shadow.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/vn/shadow.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/dev/vn/vn.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/MacOSStubs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_attrlist.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_attrlist.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_btreeio.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_catalog.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_catalog.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_chash.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_cnode.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_cnode.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_dbg.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_encodinghint.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_encodings.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_encodings.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_endian.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_endian.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_format.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_fsctl.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_hotfiles.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_hotfiles.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_link.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_lookup.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_macos_defs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_mount.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_notification.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_quota.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_quota.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_readwrite.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_search.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_vfsutils.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfs_xattr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTree.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTreeAllocate.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTreeMiscOps.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTreeNodeOps.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTreeNodeReserve.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTreeScanner.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/BTree/BTreeTreeOps.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Catalog/CatalogUtilities.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Catalog/FileIDsServices.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Misc/BTreeWrapper.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Misc/FileExtentMapping.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Misc/VolumeAllocation.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Unicode/UCStringCompareData.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/Unicode/UnicodeWrappers.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/headers/BTreeScanner.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/headers/BTreesInternal.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/headers/BTreesPrivate.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/headers/CatalogPrivate.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/headers/FileMgrInternal.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/hfscommon/headers/HFSUnicodeWrappers.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/rangelist.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/hfs/rangelist.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/_types.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/disklabel.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/endian.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/exec.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/param.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/profile.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/psl.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/ptrace.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/reboot.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/reg.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/setjmp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/signal.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/types.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/ucontext.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/i386/vmparam.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_bmap.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_lookup.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_mount.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_node.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_node.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_rrip.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_rrip.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_util.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/cd9660_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/iso.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/isofs/cd9660/iso_rrip.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/ast.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/bsd_init.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/bsd_stubs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/init_sysent.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_acct.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_aio.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_audit.c#8 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_authorization.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_bsm_audit.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_bsm_klib.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_bsm_token.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_clock.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_control.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_core.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_credential.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_event.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_exec.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_exit.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_fork.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_ktrace.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_lock.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_malloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_mib.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_mman.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_newsysctl.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_panicinfo.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_pcsamples.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_physio.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_proc.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_prot.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_resource.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_shutdown.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_sig.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_symfile.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_synch.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_sysctl.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_time.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_xxx.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kpi_mbuf.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kpi_socket.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kpi_socketfilter.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/mach_fat.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/mach_header.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/mach_header.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/mach_loader.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/mach_loader.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/mach_process.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/makesyscalls.sh#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/netboot.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/posix_sem.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/posix_shm.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/preload.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/qsort.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/spl.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/subr_log.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/subr_prf.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/subr_prof.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/subr_xxx.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_domain.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_generic.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_pipe.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_socket.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/syscalls.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sysctl_init.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sysv_ipc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sysv_msg.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sysv_sem.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sysv_shm.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty_compat.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty_conf.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty_pty.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty_tb.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/tty_tty.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/ubc_subr.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_domain.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_mbuf.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_mbuf2.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_proto.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_socket.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_socket2.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_syscalls.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/uipc_usrreq.c#8 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/bcd.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/bcmp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/inet_ntop.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/libkern.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/locc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/random.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/rindex.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/scanc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/skpc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/libkern/strtol.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/_limits.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/_types.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/byte_order.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/cons.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/disklabel.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/endian.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/exec.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/param.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/profile.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/psl.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/ptrace.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/reboot.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/reg.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/setjmp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/signal.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/spl.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/types.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/ucontext.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/machine/vmparam.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/man/man2/fsctl.2#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/man/man2/getxattr.2#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/man/man2/listxattr.2#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/man/man2/poll.2#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/man/man2/removexattr.2#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/man/man2/setxattr.2#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/deadfs/dead_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_proto.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_tree.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_vfsops.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfs_vnops.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/devfsdefs.h#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/devfs/reproto.sh#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc_vfsops.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc_vnops.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fifofs/fifo.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fifofs/fifo_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/nullfs/null.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/nullfs/null_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/nullfs/null_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/nullfs/null_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/specfs/spec_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/specfs/specdev.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/synthfs/synthfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/synthfs/synthfs_util.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/synthfs/synthfs_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/synthfs/synthfs_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/union/union.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/union/union_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/union/union_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/union/union_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/volfs/volfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/volfs/volfs_vfsops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/volfs/volfs_vnops.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bpf.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bpf.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bpf_compat.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bpf_filter.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bpfdesc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bridge.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bridge.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/bsd_comp.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/devtimer.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/devtimer.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/dlil.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/dlil.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/dlil_pvt.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ether_at_pr_module.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ether_if_module.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ether_inet6_pr_module.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ether_inet_pr_module.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/etherdefs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ethernet.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/firewire.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ieee8023ad.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_arp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_atm.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_bond.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_bond_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_disc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_dl.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_dummy.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_ether.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_ethersubr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_faith.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_fddisubr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_gif.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_gif.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_llc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_loop.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_media.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_media.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_mib.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_mib.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_ppp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_pppvar.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_types.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_vlan.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/if_vlan_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/init.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/init.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kext_net.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kext_net.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kpi_interface.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kpi_interface.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kpi_interfacefilter.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kpi_interfacefilter.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kpi_protocol.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/kpi_protocol.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/lacp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/multicast_list.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/multicast_list.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ndrv.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ndrv.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ndrv_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/net_osdep.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/net_osdep.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/pfkeyv2.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ppp_comp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ppp_deflate.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/ppp_defs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/radix.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/radix.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/raw_cb.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/raw_cb.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/raw_usrreq.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/route.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/route.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/rtsock.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/rtsock_mip.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/slip.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/net/zlib.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_CLDeny.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_CLListen.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Close.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Control.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Init.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_InitGlobals.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_NewCID.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Open.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Options.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Packet.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Read.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_RxAttn.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_RxData.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Status.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Timer.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_TimerElem.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_Write.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_attention.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_internal.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_misc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_reset.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/adsp_stream.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/appletalk.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/asp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/asp_proto.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_aarp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_config.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_ddp_brt.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_pat.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_pcb.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_pcb.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_proto.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_snmp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/at_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/atp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/atp_alloc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/atp_misc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/atp_open.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/atp_read.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/atp_write.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_aurpd.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_cfg.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_gdata.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_misc.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_open.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_rd.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_ri.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_rx.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_tickle.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_tx.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/aurp_zi.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_aarp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_aep.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_brt.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_lap.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_nbp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_proto.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_r_rtmp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_r_zip.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_rtmp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_rtmptable.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_sip.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ddp_usrreq.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/debug.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/drv_dep.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/ep.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/lap.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/nbp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/pap.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/routing_tables.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/rtmp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/sys_dep.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/sys_glue.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/sysglue.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netat/zip.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/bootp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/dhcp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/dhcp_options.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/icmp6.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/icmp_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/if_atm.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/if_atm.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/if_ether.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/if_fddi.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/if_tun.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/igmp.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/igmp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/igmp_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_arp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_arp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_bootp.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_cksum.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_gif.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_gif.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_pcb.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_pcb.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_proto.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_rmx.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_systm.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/in_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip6.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_compat.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_divert.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_dummynet.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_dummynet.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_ecn.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_ecn.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_encap.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_encap.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_flow.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_flow.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_fw.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_icmp.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_icmp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_input.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_mroute.c#4 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_mroute.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_output.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/ip_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/kpi_ipfilter.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/kpi_ipfilter.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/kpi_ipfilter_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/raw_ip.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_debug.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_debug.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_fsm.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_input.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_output.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_sack.c#1 add .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_seq.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_subr.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_timer.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_timer.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_usrreq.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcp_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/tcpip.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/udp.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/udp_usrreq.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet/udp_var.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet6/in6_pcb.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet6/ip6_fw.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/netinet6/ip6_fw.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/krpc.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/krpc_subr.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_bio.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_boot.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_lock.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_lock.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_node.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_serv.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_socket.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_srvcache.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_subs.c#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_syscalls.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_vfsops.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfs_vnops.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsdiskless.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsm_subs.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsmount.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsnode.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsproto.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsrtt.h#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/nfs/nfsrvcache.h#2 edit >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:42:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B593916A412; Tue, 14 Nov 2006 20:42:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B10816A4A7 for ; Tue, 14 Nov 2006 20:42:07 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B8F3E43F79 for ; Tue, 14 Nov 2006 20:35:32 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKZWPV047033 for ; Tue, 14 Nov 2006 20:35:32 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKZWJI047028 for perforce@freebsd.org; Tue, 14 Nov 2006 20:35:32 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:35:32 GMT Message-Id: <200611142035.kAEKZWJI047028@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109979 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:42:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=109979 Change 109979 by millert@millert_g5tower on 2006/11/14 20:35:05 Update Makefile seatbelts for the new version of Mac OS X (10.4.8) Affected files ... .. //depot/projects/trustedbsd/sedarwin8/Makefile#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/Makefile#4 (text+ko) ==== @@ -2,8 +2,8 @@ ifneq "$(word 6, $(shell gcc_select))" "3.3" $(error Build requires GCC version 3.3. Use 'gcc_select 3.3' to change.) endif -ifneq "$(shell uname -r)" "8.7.0" -$(error Build requires Mac OS X 10.4.7/Darwin 8.7) +ifneq "$(shell uname -r)" "8.8.0" +$(error Build requires Mac OS X 10.4.8/Darwin 8.8) endif include Makeconfig From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:42:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9DA116A6D7; Tue, 14 Nov 2006 20:42:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7E00116A6D4 for ; Tue, 14 Nov 2006 20:42:23 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6962B43FAB for ; Tue, 14 Nov 2006 20:36:35 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKaZHk047300 for ; Tue, 14 Nov 2006 20:36:35 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKaYGK047297 for perforce@freebsd.org; Tue, 14 Nov 2006 20:36:34 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:36:34 GMT Message-Id: <200611142036.kAEKaYGK047297@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109982 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:42:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=109982 Change 109982 by millert@millert_g5tower on 2006/11/14 20:36:33 Add file_to_av() for converting fg_flags to an av perm. Make av perm optional in file_has_perm() so it can be used more. Use file_has_perm() in more places. In sebsd_file_check_change_flags use FILE__WRITE for the av if we are adding O_APPEND to the file flags. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#42 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#42 (text+ko) ==== @@ -409,6 +409,23 @@ } static __inline u_int32_t +file_to_av(struct fileglob *fg) +{ + u_int32_t av = 0; + + if (fg->fg_flag & FREAD) + av |= FILE__READ; + if (fg->fg_flag & FWRITE) { + if (fg->fg_flag & O_APPEND) + av |= FILE__APPEND; + else + av |= FILE__WRITE; + } + + return (av); +} + +static __inline u_int32_t file_mask_to_av(enum vtype vt, int mask) { u_int32_t av = 0; @@ -485,8 +502,8 @@ return (rc); } - /* Check underlying vnode if there is one. */ - if (fg->fg_type == DTYPE_VNODE && fg->fg_data != NULL) { + /* Check underlying vnode if there is one and we were passed a perm. */ + if (perm && fg->fg_type == DTYPE_VNODE && fg->fg_data != NULL) { rc = vnode_has_perm(cred, (struct vnode *)fg->fg_data, NULL, perm); } @@ -3090,135 +3107,86 @@ sebsd_file_check_ioctl(struct ucred *cred, struct fileglob *fg, struct label *fglabel, u_long com, void *data) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, 0)); } static int sebsd_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, struct label *label, int com, caddr_t data) { - struct task_security_struct *tsec; - struct vnode_security_struct *vsec; - tsec = SLOT(cred->cr_label); - vsec = SLOT(label); - return (vnode_has_perm(cred, vp, NULL, FILE__IOCTL)); } -/* - * Simplify all other fd permissions to just "use" for now. The ones we - * implement in SEBSD roughly correlate to the SELinux FD__USE permissions, - * and not the fine-grained FLASK permissions. - */ static int sebsd_file_check_receive(struct ucred *cred, struct fileglob *fg, struct label *fglabel) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, file_to_av(fg))); } static int sebsd_file_check_dup(struct ucred *cred, struct fileglob *fg, struct label *fglabel, int newfd) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, file_to_av(fg))); } static int sebsd_file_check_get_flags(struct ucred *cred, struct fileglob *fg, struct label *fglabel, u_int flags) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, 0)); } static int sebsd_file_check_get_ofileflags(struct ucred *cred, struct fileglob *fg, struct label *fglabel, char flags) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, 0)); } static int sebsd_file_check_change_flags(struct ucred *cred, struct fileglob *fg, struct label *fglabel, u_int oldflags, u_int newflags) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; + u_int32_t av = 0; + + if ((newflags & O_APPEND) && !(oldflags & O_APPEND)) + av = FILE__WRITE; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, av)); } static int sebsd_file_check_change_ofileflags(struct ucred *cred, struct fileglob *fg, struct label *fglabel, char oldflags, char newflags) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + /* XXX - should set av to something */ + return (file_has_perm(cred, fg, fglabel, 0)); } static int sebsd_file_check_get_offset(struct ucred *cred, struct fileglob *fg, struct label *fglabel) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + return (file_has_perm(cred, fg, fglabel, 0)); } static int sebsd_file_check_change_offset(struct ucred *cred, struct fileglob *fg, struct label *fglabel) { - struct task_security_struct *tsec; - struct file_security_struct *fsec; - tsec = SLOT(cred->cr_label); - fsec = SLOT(fglabel); - return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL)); + /* XXX - should set av to something */ + return (file_has_perm(cred, fg, fglabel, 0)); } static int From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:42:24 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9637216A756; Tue, 14 Nov 2006 20:42:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 734C116A753 for ; Tue, 14 Nov 2006 20:42:24 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A195E43FA8 for ; Tue, 14 Nov 2006 20:36:34 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKaYaN047286 for ; Tue, 14 Nov 2006 20:36:34 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKaYPb047283 for perforce@freebsd.org; Tue, 14 Nov 2006 20:36:34 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:36:34 GMT Message-Id: <200611142036.kAEKaYPb047283@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109980 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:42:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=109980 Change 109980 by millert@millert_g5tower on 2006/11/14 20:35:34 Split sebsd_file_check_ioctl into sebsd_file_check_ioctl() and sebsd_vnode_check_ioctl(). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#40 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#40 (text+ko) ==== @@ -3085,26 +3085,33 @@ } #endif +/* + * The file ioctl check are split into fd and vnode components. + */ static int sebsd_file_check_ioctl(struct ucred *cred, struct fileglob *fg, struct label *fglabel, u_long com, void *data) { struct task_security_struct *tsec; struct file_security_struct *fsec; - int error; tsec = SLOT(cred->cr_label); fsec = SLOT(fglabel); - error = avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, - FD__USE, NULL); - if (error) - return (error); - if (fg->fg_type != DTYPE_VNODE) - return (0); + return (avc_has_perm(tsec->sid, fsec->sid, SECCLASS_FD, FD__USE, NULL)); +} + +static int +sebsd_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, + struct label *label, int com, caddr_t data) +{ + struct task_security_struct *tsec; + struct vnode_security_struct *vsec; + + tsec = SLOT(cred->cr_label); + vsec = SLOT(label); - return (vnode_has_perm(cred, (struct vnode *)fg->fg_data, - NULL, FILE__IOCTL)); + return (vnode_has_perm(cred, vp, NULL, FILE__IOCTL)); } /* @@ -3709,6 +3716,7 @@ // .mpo_vnode_check_kqfilter = sebsd_vnode_check_kqfilter, .mpo_vnode_check_link = sebsd_vnode_check_link, .mpo_vnode_check_lookup = sebsd_vnode_check_lookup, + .mpo_vnode_check_ioctl = sebsd_vnode_check_ioctl, .mpo_vnode_check_open = sebsd_vnode_check_open, .mpo_vnode_check_read = sebsd_vnode_check_read, .mpo_vnode_check_readdir = sebsd_vnode_check_readdir, From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:42:32 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B461616A4A7; Tue, 14 Nov 2006 20:42:32 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78E7416A492 for ; Tue, 14 Nov 2006 20:42:32 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0076043FAA for ; Tue, 14 Nov 2006 20:36:34 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKaY0i047294 for ; Tue, 14 Nov 2006 20:36:34 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKaY5F047289 for perforce@freebsd.org; Tue, 14 Nov 2006 20:36:34 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:36:34 GMT Message-Id: <200611142036.kAEKaY5F047289@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109981 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:42:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=109981 Change 109981 by millert@millert_g5tower on 2006/11/14 20:35:54 Sort sebsd_ops Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#41 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#41 (text+ko) ==== @@ -2523,7 +2523,6 @@ } #endif -#ifdef FILE__SETATTR static int sebsd_vnode_check_setattrlist(struct ucred *cred, struct vnode *vp, struct label *vlabel, struct attrlist *alist) @@ -2531,7 +2530,6 @@ return (vnode_has_perm(cred, vp, NULL, FILE__SETATTR)); } -#endif static int sebsd_vnode_check_setextattr(struct ucred *cred, struct vnode *vp, @@ -3558,118 +3556,111 @@ } static struct mac_policy_ops sebsd_ops = { - /* Init Labels */ - .mpo_policy_init = sebsd_policy_init, - .mpo_policy_initbsd = sebsd_policy_initbsd, - .mpo_cred_label_init = sebsd_cred_label_init, - .mpo_task_label_init = sebsd_cred_label_init, - .mpo_port_label_init = sebsd_cred_label_init, - .mpo_vnode_label_init = sebsd_vnode_label_init, - .mpo_pipe_label_init = sebsd_vnode_label_init, - .mpo_socket_label_init = sebsd_init_network_label_waitcheck, - .mpo_socketpeer_label_init = sebsd_init_network_label_waitcheck, - .mpo_devfs_label_init = sebsd_vnode_label_init, - .mpo_mbuf_label_init = sebsd_init_network_label_waitcheck, - .mpo_vnode_label_recycle = sebsd_vnode_label_recycle, - - /* Destroy Labels */ - .mpo_policy_destroy = sebsd_policy_destroy, + .mpo_cred_check_label_update =sebsd_cred_check_label_update, + .mpo_cred_check_label_update_execve = sebsd_cred_check_label_update_execve, + .mpo_cred_label_associate = sebsd_cred_create, + .mpo_cred_label_associate_kernel = sebsd_create_kernel_proc, + .mpo_cred_label_associate_user = sebsd_create_kernel_proc, .mpo_cred_label_destroy = sebsd_cred_label_destroy, - .mpo_task_label_destroy = sebsd_cred_label_destroy, - .mpo_port_label_destroy = sebsd_cred_label_destroy, - .mpo_vnode_label_destroy = sebsd_vnode_label_destroy, - .mpo_pipe_label_destroy = sebsd_vnode_label_destroy, - .mpo_socket_label_destroy = sebsd_destroy_network_label, - .mpo_socketpeer_label_destroy = sebsd_destroy_network_label, - .mpo_devfs_label_destroy = sebsd_vnode_label_destroy, - .mpo_mbuf_label_destroy = sebsd_destroy_network_label, - - /* Copy labels */ - .mpo_task_label_update = sebsd_task_label_update, - .mpo_port_label_copy = sebsd_task_label_copy, - .mpo_task_label_copy = sebsd_task_label_copy, - .mpo_vnode_label_copy = sebsd_vnode_label_copy, - .mpo_pipe_label_copy = sebsd_vnode_label_copy, - .mpo_socket_label_copy = copy_network_label, - .mpo_devfs_label_copy = sebsd_vnode_label_copy, - .mpo_mbuf_label_copy = copy_network_label, - .mpo_port_label_update_cred = sebsd_port_label_update_cred, - - /* In/Out */ - .mpo_cred_label_internalize = sebsd_cred_label_internalize, .mpo_cred_label_externalize = sebsd_cred_label_externalize, .mpo_cred_label_externalize_audit = sebsd_cred_label_externalize, - - .mpo_vnode_label_internalize = sebsd_vnode_label_internalize, - .mpo_vnode_label_externalize = sebsd_vnode_label_externalize, - .mpo_vnode_label_externalize_audit = sebsd_vnode_label_externalize, - - .mpo_pipe_label_internalize = sebsd_vnode_label_internalize, - .mpo_pipe_label_externalize = sebsd_vnode_label_externalize, - - .mpo_socket_label_internalize = sebsd_network_label_internalize, - .mpo_socket_label_externalize = sebsd_network_label_externalize, - .mpo_socketpeer_label_externalize = sebsd_network_label_externalize, - - .mpo_task_label_internalize = sebsd_cred_label_internalize, - .mpo_task_label_externalize = sebsd_cred_label_externalize, - + .mpo_cred_label_init = sebsd_cred_label_init, + .mpo_cred_label_internalize = sebsd_cred_label_internalize, .mpo_cred_label_update = sebsd_cred_label_update, - .mpo_vnode_label_update = sebsd_vnode_label_update, - .mpo_pipe_label_update = sebsd_pipe_label_update, - .mpo_socket_label_update = sebsd_socket_label_update, - - /* Create Labels */ - .mpo_cred_label_associate = sebsd_cred_create, - .mpo_task_label_associate = sebsd_task_create, - .mpo_task_label_associate_kernel = sebsd_task_create_kernel, + .mpo_cred_label_update_execve = sebsd_cred_label_update_execve, .mpo_devfs_label_associate_device = sebsd_devfs_label_associate_device, .mpo_devfs_label_associate_directory = sebsd_devfs_label_associate_directory, - // .mpo_devfs_create_symlink = sebsd_devfs_create_symlink, - .mpo_cred_label_associate_kernel = sebsd_create_kernel_proc, - .mpo_cred_label_associate_user = sebsd_create_kernel_proc, - .mpo_vnode_notify_create = sebsd_vnode_notify_create, - .mpo_vnode_label_update_extattr = sebsd_vnode_label_update_extattr, - .mpo_port_label_associate = sebsd_port_create, - .mpo_port_label_associate_kernel = sebsd_port_label_associate_kernel, + .mpo_devfs_label_copy = sebsd_vnode_label_copy, + .mpo_devfs_label_destroy = sebsd_vnode_label_destroy, + .mpo_devfs_label_init = sebsd_vnode_label_init, + .mpo_devfs_label_update = sebsd_devfs_update, + .mpo_file_check_change_flags = sebsd_file_check_change_flags, + .mpo_file_check_change_offset = sebsd_file_check_change_offset, + .mpo_file_check_change_ofileflags = sebsd_file_check_change_ofileflags, + .mpo_file_check_dup = sebsd_file_check_dup, + .mpo_file_check_get_flags = sebsd_file_check_get_flags, + .mpo_file_check_get_offset = sebsd_file_check_get_offset, + .mpo_file_check_get_ofileflags = sebsd_file_check_get_ofileflags, + .mpo_file_check_inherit = sebsd_file_check_receive, + .mpo_file_check_ioctl = sebsd_file_check_ioctl, + .mpo_file_check_mmap = sebsd_file_check_mmap, + .mpo_file_check_receive = sebsd_file_check_receive, + .mpo_file_label_associate = sebsd_file_label_associate, + .mpo_file_label_destroy = sebsd_label_destroy, + .mpo_file_label_init = sebsd_file_label_init, + .mpo_mbuf_label_associate_socket = sebsd_mbuf_label_associate_socket, + .mpo_mbuf_label_copy = copy_network_label, + .mpo_mbuf_label_destroy = sebsd_destroy_network_label, + .mpo_mbuf_label_init = sebsd_init_network_label_waitcheck, + .mpo_mount_check_getattr = sebsd_mount_check_getattr, + .mpo_mount_check_label_update = sebsd_mount_check_label_update, + .mpo_mount_check_mount = sebsd_mount_check_mount, + .mpo_mount_check_remount = sebsd_mount_check_remount, +#ifdef FILESYSTEM__SETATTR + .mpo_mount_check_setattr = sebsd_mount_check_setattr, +#endif + .mpo_mount_check_stat = sebsd_mount_check_stat, + .mpo_mount_check_umount = sebsd_mount_check_umount, + .mpo_mount_label_associate = sebsd_mount_label_associate, + .mpo_mount_label_destroy = sebsd_label_destroy, + .mpo_mount_label_externalize = sebsd_mount_label_externalize, + .mpo_mount_label_init = sebsd_mount_label_init, + .mpo_mount_label_internalize = sebsd_mount_label_internalize, + .mpo_pipe_check_ioctl = sebsd_pipe_check_ioctl, + .mpo_pipe_check_label_update = sebsd_pipe_check_label_update, + .mpo_pipe_check_read = sebsd_pipe_check_read, + .mpo_pipe_check_stat = sebsd_pipe_check_stat, + .mpo_pipe_check_write = sebsd_pipe_check_write, .mpo_pipe_label_associate = sebsd_pipe_label_associate, - .mpo_socket_label_associate = sebsd_socket_label_associate, - .mpo_socket_label_associate_accept = sebsd_socket_label_associate_accept, - .mpo_mbuf_label_associate_socket = sebsd_mbuf_label_associate_socket, - - .mpo_vnode_label_associate_singlelabel = sebsd_vnode_label_associate_singlelabel, - .mpo_vnode_label_associate_extattr = sebsd_vnode_label_associate_extattr, - .mpo_vnode_label_associate_devfs = sebsd_vnode_label_associate_devfs, - .mpo_vnode_label_associate_socket = sebsd_vnode_label_associate_socket, - .mpo_vnode_label_associate_posixsem = sebsd_vnode_label_associate_posixsem, - .mpo_vnode_label_associate_posixshm = sebsd_vnode_label_associate_posixshm, - .mpo_vnode_label_associate_pipe = sebsd_vnode_label_associate_pipe, - .mpo_vnode_label_associate_file = sebsd_vnode_label_associate_file, - .mpo_devfs_label_update = sebsd_devfs_update, - - .mpo_port_label_compute = sebsd_request_label, - - /* Transition */ - .mpo_cred_check_label_update_execve = sebsd_cred_check_label_update_execve, - .mpo_cred_label_update_execve = sebsd_cred_label_update_execve, - - /* Check Labels */ - .mpo_port_check_service = sebsd_port_check_service, - .mpo_cred_check_label_update = sebsd_cred_check_label_update, + .mpo_pipe_label_copy = sebsd_vnode_label_copy, + .mpo_pipe_label_destroy = sebsd_vnode_label_destroy, + .mpo_pipe_label_externalize = sebsd_vnode_label_externalize, + .mpo_pipe_label_init = sebsd_vnode_label_init, + .mpo_pipe_label_internalize = sebsd_vnode_label_internalize, + .mpo_pipe_label_update = sebsd_pipe_label_update, + .mpo_policy_destroy = sebsd_policy_destroy, + .mpo_policy_init = sebsd_policy_init, + .mpo_policy_initbsd = sebsd_policy_initbsd, + .mpo_policy_syscall = sebsd_syscall, + .mpo_port_check_copy_send = sebsd_port_check_copy_send, + .mpo_port_check_hold_receive = sebsd_port_check_hold_recv, + .mpo_port_check_hold_send = sebsd_port_check_hold_send, + .mpo_port_check_hold_send_once = sebsd_port_check_hold_send_once, .mpo_port_check_label_update = sebsd_port_check_label_update, - .mpo_port_check_send = sebsd_port_check_send, - .mpo_port_check_receive = sebsd_port_check_receive, .mpo_port_check_make_send = sebsd_port_check_make_send, .mpo_port_check_make_send_once = sebsd_port_check_make_send_once, - .mpo_port_check_copy_send = sebsd_port_check_copy_send, + .mpo_port_check_method = sebsd_port_check_method, + .mpo_port_check_move_receive = sebsd_port_check_move_recv, .mpo_port_check_move_send = sebsd_port_check_move_send, .mpo_port_check_move_send_once = sebsd_port_check_move_send_once, - .mpo_port_check_move_receive = sebsd_port_check_move_recv, - .mpo_port_check_hold_send = sebsd_port_check_hold_send, - .mpo_port_check_hold_send_once = sebsd_port_check_hold_send_once, - .mpo_port_check_hold_receive = sebsd_port_check_hold_recv, + .mpo_port_check_receive = sebsd_port_check_receive, + .mpo_port_check_send = sebsd_port_check_send, + .mpo_port_check_service = sebsd_port_check_service, + .mpo_port_label_associate = sebsd_port_create, + .mpo_port_label_associate_kernel = sebsd_port_label_associate_kernel, + .mpo_port_label_compute = sebsd_request_label, + .mpo_port_label_copy = sebsd_task_label_copy, + .mpo_port_label_destroy = sebsd_cred_label_destroy, + .mpo_port_label_init = sebsd_cred_label_init, + .mpo_port_label_update_cred = sebsd_port_label_update_cred, + .mpo_posixsem_check_create = sebsd_posixsem_check_create, + .mpo_posixsem_check_open = sebsd_posixsem_check_open, + .mpo_posixsem_check_post = sebsd_posixsem_check_post, + .mpo_posixsem_check_unlink = sebsd_posixsem_check_unlink, + .mpo_posixsem_check_wait = sebsd_posixsem_check_wait, + .mpo_posixsem_label_associate = sebsd_posixsem_label_associate, + .mpo_posixsem_label_destroy = sebsd_destroy_ipc_label, + .mpo_posixsem_label_init = sebsd_init_ipc_label, + .mpo_posixshm_check_create = sebsd_posixshm_check_create, + .mpo_posixshm_check_mmap = sebsd_posixshm_check_mmap, + .mpo_posixshm_check_open = sebsd_posixshm_check_open, + .mpo_posixshm_check_stat = sebsd_posixshm_check_stat, + .mpo_posixshm_check_truncate = sebsd_posixshm_check_truncate, + .mpo_posixshm_check_unlink = sebsd_posixshm_check_unlink, + .mpo_posixshm_label_associate = sebsd_posixshm_label_associate, + .mpo_posixshm_label_destroy = sebsd_destroy_ipc_label, + .mpo_posixshm_label_init = sebsd_init_ipc_label, .mpo_proc_check_debug = sebsd_proc_check_debug, - .mpo_task_check_get_port = sebsd_task_check_get_port, .mpo_proc_check_getaudit = sebsd_proc_check_getaudit, .mpo_proc_check_mprotect = sebsd_proc_check_mprotect, .mpo_proc_check_sched = sebsd_proc_check_sched, @@ -3681,55 +3672,90 @@ .mpo_socket_check_bind = sebsd_socket_check_bind, .mpo_socket_check_connect = sebsd_socket_check_connect, .mpo_socket_check_create = sebsd_socket_check_create, -// .mpo_socket_check_deliver = sebsd_socket_check_deliver, -// .mpo_socket_check_kqfilter = sebsd_socket_check_kqfilter, + .mpo_socket_check_label_update = sebsd_socket_check_label_update, .mpo_socket_check_listen = sebsd_socket_check_listen, .mpo_socket_check_receive = sebsd_socket_check_receive, - .mpo_socket_check_label_update = sebsd_socket_check_label_update, -// .mpo_socket_check_select = sebsd_socket_check_select, .mpo_socket_check_send = sebsd_socket_check_send, .mpo_socket_check_stat = sebsd_socket_check_stat, + .mpo_socket_label_associate = sebsd_socket_label_associate, + .mpo_socket_label_associate_accept = sebsd_socket_label_associate_accept, + .mpo_socket_label_copy = copy_network_label, + .mpo_socket_label_destroy = sebsd_destroy_network_label, + .mpo_socket_label_externalize = sebsd_network_label_externalize, + .mpo_socket_label_init = sebsd_init_network_label_waitcheck, + .mpo_socket_label_internalize = sebsd_network_label_internalize, + .mpo_socket_label_update = sebsd_socket_label_update, + .mpo_socketpeer_label_associate_mbuf = sebsd_socketpeer_label_associate_mbuf, + .mpo_socketpeer_label_associate_socket = sebsd_socketpeer_label_associate_socket, + .mpo_socketpeer_label_destroy = sebsd_destroy_network_label, + .mpo_socketpeer_label_externalize = sebsd_network_label_externalize, + .mpo_socketpeer_label_init = sebsd_init_network_label_waitcheck, .mpo_system_check_acct = sebsd_system_check_acct, .mpo_system_check_audit = sebsd_system_check_audit, .mpo_system_check_auditctl = sebsd_system_check_auditctl, .mpo_system_check_auditon = sebsd_system_check_auditon, .mpo_system_check_nfsd = sebsd_system_check_nfsd, - .mpo_system_check_swapon = sebsd_system_check_swapon, - .mpo_system_check_swapoff = sebsd_system_check_swapon, .mpo_system_check_reboot = sebsd_system_check_reboot, .mpo_system_check_settime = sebsd_system_check_settime, - + .mpo_system_check_swapoff = sebsd_system_check_swapon, + .mpo_system_check_swapon = sebsd_system_check_swapon, + .mpo_sysvmsg_label_associate = sebsd_sysvmsg_label_associate, + .mpo_sysvmsg_label_destroy = sebsd_destroy_ipc_label, + .mpo_sysvmsg_label_init = sebsd_init_ipc_label, + .mpo_sysvmsg_label_recycle = sebsd_cleanup_sysv_label, + .mpo_sysvmsq_check_enqueue = sebsd_sysvmsq_check_enqueue, + .mpo_sysvmsq_check_msgrcv = sebsd_sysvmsq_check_msgrcv, + .mpo_sysvmsq_check_msqctl = sebsd_sysvmsq_check_msqctl, + .mpo_sysvmsq_check_msqget = sebsd_sysvmsq_check_msqget, + .mpo_sysvmsq_check_msqrcv = sebsd_sysvmsq_check_msqrcv, + .mpo_sysvmsq_check_msqsnd = sebsd_sysvmsq_check_msqsnd, + .mpo_sysvmsq_label_associate = sebsd_sysvmsq_label_associate, + .mpo_sysvmsq_label_destroy = sebsd_destroy_ipc_label, + .mpo_sysvmsq_label_init = sebsd_init_ipc_label, + .mpo_sysvmsq_label_recycle = sebsd_cleanup_sysv_label, + .mpo_sysvsem_check_semctl = sebsd_sysvsem_check_semctl, + .mpo_sysvsem_check_semget = sebsd_sysvsem_check_semget, + .mpo_sysvsem_check_semop = sebsd_sysvsem_check_semop, + .mpo_sysvsem_label_associate = sebsd_sysvsem_label_associate, + .mpo_sysvsem_label_destroy = sebsd_destroy_ipc_label, + .mpo_sysvsem_label_init = sebsd_init_ipc_label, + .mpo_sysvsem_label_recycle = sebsd_cleanup_sysv_label, + .mpo_sysvshm_check_shmat = sebsd_sysvshm_check_shmat, + .mpo_sysvshm_check_shmctl = sebsd_sysvshm_check_shmctl, + .mpo_sysvshm_check_shmget = sebsd_sysvshm_check_shmget, + .mpo_sysvshm_label_associate = sebsd_sysvshm_label_associate, + .mpo_sysvshm_label_destroy = sebsd_destroy_ipc_label, + .mpo_sysvshm_label_init = sebsd_init_ipc_label, + .mpo_sysvshm_label_recycle = sebsd_cleanup_sysv_label, + .mpo_task_check_get_port = sebsd_task_check_get_port, + .mpo_task_label_associate = sebsd_task_create, + .mpo_task_label_associate_kernel = sebsd_task_create_kernel, + .mpo_task_label_copy = sebsd_task_label_copy, + .mpo_task_label_destroy = sebsd_cred_label_destroy, + .mpo_task_label_externalize = sebsd_cred_label_externalize, + .mpo_task_label_init = sebsd_cred_label_init, + .mpo_task_label_internalize = sebsd_cred_label_internalize, + .mpo_task_label_update = sebsd_task_label_update, .mpo_vnode_check_access = sebsd_vnode_check_access, .mpo_vnode_check_chdir = sebsd_vnode_check_chdir, .mpo_vnode_check_chroot = sebsd_vnode_check_chroot, .mpo_vnode_check_create = sebsd_vnode_check_create, - .mpo_vnode_check_unlink = sebsd_vnode_check_unlink, .mpo_vnode_check_exchangedata = sebsd_vnode_check_exchangedata, .mpo_vnode_check_exec = sebsd_vnode_check_exec, - -#ifdef EXTATTR + .mpo_vnode_check_getattrlist = sebsd_vnode_check_getattrlist, .mpo_vnode_check_getextattr = sebsd_vnode_check_getextattr, - .mpo_vnode_check_listextattr = NOT_IMPLEMENTED, - .mpo_vnode_check_deleteextattr = NOT_IMPLEMENTED, -#endif - .mpo_vnode_check_getattrlist = sebsd_vnode_check_getattrlist, -// .mpo_vnode_check_kqfilter = sebsd_vnode_check_kqfilter, + .mpo_vnode_check_ioctl = sebsd_vnode_check_ioctl, + .mpo_vnode_check_label_update = sebsd_vnode_check_label_update, .mpo_vnode_check_link = sebsd_vnode_check_link, .mpo_vnode_check_lookup = sebsd_vnode_check_lookup, - .mpo_vnode_check_ioctl = sebsd_vnode_check_ioctl, .mpo_vnode_check_open = sebsd_vnode_check_open, .mpo_vnode_check_read = sebsd_vnode_check_read, .mpo_vnode_check_readdir = sebsd_vnode_check_readdir, .mpo_vnode_check_readlink = sebsd_vnode_check_readlink, - .mpo_vnode_check_label_update = sebsd_vnode_check_label_update, .mpo_vnode_check_rename_from = sebsd_vnode_check_rename_from, .mpo_vnode_check_rename_to = sebsd_vnode_check_rename_to, .mpo_vnode_check_revoke = sebsd_vnode_check_revoke, -// .mpo_vnode_check_select = sebsd_vnode_check_select, -#ifdef FILE__SETATTR .mpo_vnode_check_setattrlist = sebsd_vnode_check_setattrlist, -#endif - .mpo_vnode_check_getextattr = sebsd_vnode_check_getextattr, .mpo_vnode_check_setextattr = sebsd_vnode_check_setextattr, .mpo_vnode_check_setflags = sebsd_vnode_check_setflags, .mpo_vnode_check_setmode = sebsd_vnode_check_setmode, @@ -3737,110 +3763,27 @@ .mpo_vnode_check_setutimes = sebsd_vnode_check_setutimes, .mpo_vnode_check_stat = sebsd_vnode_check_stat, .mpo_vnode_check_truncate = sebsd_vnode_check_truncate, + .mpo_vnode_check_unlink = sebsd_vnode_check_unlink, .mpo_vnode_check_write = sebsd_vnode_check_write, - .mpo_pipe_check_ioctl = sebsd_pipe_check_ioctl, -// .mpo_pipe_check_kqfilter = sebsd_pipe_check_kqfilter, - .mpo_pipe_check_read = sebsd_pipe_check_read, - .mpo_pipe_check_label_update = sebsd_pipe_check_label_update, -// .mpo_pipe_check_select = sebsd_pipe_check_select, - .mpo_pipe_check_stat = sebsd_pipe_check_stat, - .mpo_pipe_check_write = sebsd_pipe_check_write, - - /* File Descriptors */ - .mpo_file_label_init = sebsd_file_label_init, - .mpo_file_label_associate = sebsd_file_label_associate, - .mpo_file_label_destroy = sebsd_label_destroy, -#ifdef FD__CREATE - .mpo_file_check_create = sebsd_file_check_create, -#endif - .mpo_file_check_ioctl = sebsd_file_check_ioctl, - .mpo_file_check_get_flags = sebsd_file_check_get_flags, - .mpo_file_check_get_ofileflags = sebsd_file_check_get_ofileflags, - .mpo_file_check_change_flags = sebsd_file_check_change_flags, - .mpo_file_check_change_ofileflags = sebsd_file_check_change_ofileflags, - .mpo_file_check_get_offset = sebsd_file_check_get_offset, - .mpo_file_check_change_offset = sebsd_file_check_change_offset, - .mpo_file_check_inherit = sebsd_file_check_receive, - .mpo_file_check_receive = sebsd_file_check_receive, - .mpo_file_check_dup = sebsd_file_check_dup, - .mpo_file_check_mmap = sebsd_file_check_mmap, - - /* Mount Points */ - .mpo_mount_label_init = sebsd_mount_label_init, - .mpo_mount_label_associate = sebsd_mount_label_associate, - .mpo_mount_label_internalize = sebsd_mount_label_internalize, - .mpo_mount_label_externalize = sebsd_mount_label_externalize, - .mpo_mount_label_destroy = sebsd_label_destroy, - .mpo_mount_check_label_update = sebsd_mount_check_label_update, - .mpo_mount_check_mount = sebsd_mount_check_mount, - .mpo_mount_check_umount = sebsd_mount_check_umount, - .mpo_mount_check_remount = sebsd_mount_check_remount, - .mpo_mount_check_stat = sebsd_mount_check_stat, - .mpo_mount_check_getattr = sebsd_mount_check_getattr, -// .mpo_mount_check_setattr = sebsd_mount_check_setattr, - + .mpo_vnode_label_associate_devfs = sebsd_vnode_label_associate_devfs, + .mpo_vnode_label_associate_extattr = sebsd_vnode_label_associate_extattr, + .mpo_vnode_label_associate_file = sebsd_vnode_label_associate_file, + .mpo_vnode_label_associate_pipe = sebsd_vnode_label_associate_pipe, + .mpo_vnode_label_associate_posixsem = sebsd_vnode_label_associate_posixsem, + .mpo_vnode_label_associate_posixshm = sebsd_vnode_label_associate_posixshm, + .mpo_vnode_label_associate_singlelabel = sebsd_vnode_label_associate_singlelabel, + .mpo_vnode_label_associate_socket = sebsd_vnode_label_associate_socket, + .mpo_vnode_label_copy = sebsd_vnode_label_copy, + .mpo_vnode_label_destroy = sebsd_vnode_label_destroy, + .mpo_vnode_label_externalize = sebsd_vnode_label_externalize, + .mpo_vnode_label_externalize_audit = sebsd_vnode_label_externalize, + .mpo_vnode_label_init = sebsd_vnode_label_init, + .mpo_vnode_label_internalize = sebsd_vnode_label_internalize, + .mpo_vnode_label_recycle = sebsd_vnode_label_recycle, .mpo_vnode_label_store = sebsd_vnode_label_store, - - /* System V IPC Entry Points */ - .mpo_sysvmsg_label_init = sebsd_init_ipc_label, - .mpo_sysvmsq_label_init = sebsd_init_ipc_label, - .mpo_sysvsem_label_init = sebsd_init_ipc_label, - .mpo_sysvshm_label_init = sebsd_init_ipc_label, - - .mpo_sysvmsg_label_associate = sebsd_sysvmsg_label_associate, - .mpo_sysvmsq_label_associate = sebsd_sysvmsq_label_associate, - .mpo_sysvsem_label_associate = sebsd_sysvsem_label_associate, - .mpo_sysvshm_label_associate = sebsd_sysvshm_label_associate, - .mpo_sysvmsg_label_recycle = sebsd_cleanup_sysv_label, - .mpo_sysvmsq_label_recycle = sebsd_cleanup_sysv_label, - .mpo_sysvsem_label_recycle = sebsd_cleanup_sysv_label, - .mpo_sysvshm_label_recycle = sebsd_cleanup_sysv_label, - .mpo_sysvmsg_label_destroy = sebsd_destroy_ipc_label, - .mpo_sysvmsq_label_destroy = sebsd_destroy_ipc_label, - .mpo_sysvsem_label_destroy = sebsd_destroy_ipc_label, - .mpo_sysvshm_label_destroy = sebsd_destroy_ipc_label, - - .mpo_sysvmsq_check_enqueue = sebsd_sysvmsq_check_enqueue, - .mpo_sysvmsq_check_msgrcv = sebsd_sysvmsq_check_msgrcv, -// .mpo_sysvmsq_check_msgrmid = sebsd_sysvmsq_check_msgrmid, - .mpo_sysvmsq_check_msqget = sebsd_sysvmsq_check_msqget, - .mpo_sysvmsq_check_msqsnd = sebsd_sysvmsq_check_msqsnd, - .mpo_sysvmsq_check_msqrcv = sebsd_sysvmsq_check_msqrcv, - .mpo_sysvmsq_check_msqctl = sebsd_sysvmsq_check_msqctl, - .mpo_sysvsem_check_semctl = sebsd_sysvsem_check_semctl, - .mpo_sysvsem_check_semget = sebsd_sysvsem_check_semget, - .mpo_sysvsem_check_semop = sebsd_sysvsem_check_semop, - .mpo_sysvshm_check_shmat = sebsd_sysvshm_check_shmat, - .mpo_sysvshm_check_shmctl = sebsd_sysvshm_check_shmctl, - .mpo_sysvshm_check_shmget = sebsd_sysvshm_check_shmget, - - .mpo_port_check_method = sebsd_port_check_method, - - /* POSIX IPC Entry Points */ - .mpo_posixsem_label_init = sebsd_init_ipc_label, - .mpo_posixsem_label_associate = sebsd_posixsem_label_associate, - .mpo_posixsem_label_destroy = sebsd_destroy_ipc_label, - .mpo_posixsem_check_create = sebsd_posixsem_check_create, - .mpo_posixsem_check_open = sebsd_posixsem_check_open, - .mpo_posixsem_check_post = sebsd_posixsem_check_post, - .mpo_posixsem_check_unlink = sebsd_posixsem_check_unlink, - .mpo_posixsem_check_wait = sebsd_posixsem_check_wait, - - .mpo_posixshm_label_init = sebsd_init_ipc_label, - .mpo_posixshm_label_associate = sebsd_posixshm_label_associate, - .mpo_posixshm_label_destroy = sebsd_destroy_ipc_label, - .mpo_posixshm_check_create = sebsd_posixshm_check_create, - .mpo_posixshm_check_open = sebsd_posixshm_check_open, - .mpo_posixshm_check_mmap = sebsd_posixshm_check_mmap, - .mpo_posixshm_check_stat = sebsd_posixshm_check_stat, - .mpo_posixshm_check_truncate = sebsd_posixshm_check_truncate, - .mpo_posixshm_check_unlink = sebsd_posixshm_check_unlink, - - /* Misc */ - .mpo_socketpeer_label_associate_mbuf = sebsd_socketpeer_label_associate_mbuf, - .mpo_socketpeer_label_associate_socket = sebsd_socketpeer_label_associate_socket, - - .mpo_policy_syscall = sebsd_syscall + .mpo_vnode_label_update = sebsd_vnode_label_update, + .mpo_vnode_label_update_extattr = sebsd_vnode_label_update_extattr, + .mpo_vnode_notify_create = sebsd_vnode_notify_create }; static const char *labelnamespaces[SEBSD_MAC_LABEL_NAME_COUNT] = From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:44:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 89B6116A4D2; Tue, 14 Nov 2006 20:44:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 21E0D16A4C8 for ; Tue, 14 Nov 2006 20:44:15 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 865B943FED for ; Tue, 14 Nov 2006 20:37:41 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKbbO9047539 for ; Tue, 14 Nov 2006 20:37:37 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKbaLf047536 for perforce@freebsd.org; Tue, 14 Nov 2006 20:37:36 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:37:36 GMT Message-Id: <200611142037.kAEKbaLf047536@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109983 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:44:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=109983 Change 109983 by millert@millert_g5tower on 2006/11/14 20:36:59 Update to 10.4.8 Affected files ... .. //depot/projects/trustedbsd/sedarwin8/sefos-install.txt#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/sefos-install.txt#5 (text+ko) ==== @@ -1,6 +1,5 @@ -MAC Framework for Darwin 8.6 (Mac OS 10.4.6) -Installation Document ---------------------------------- +SEDarwin 8.8 (Mac OS 10.4.8) Installation Document +-------------------------------------------------- This document describes how to install and configure the SEFOS software, including the TrustedBSD MAC Framework on Darwin. @@ -8,9 +7,9 @@ Manual build and install procedures ----------------------------------- -Step 1: Mac OS X Tiger 10.4.6 +Step 1: Mac OS X Tiger 10.4.8 - Install Mac OS X 10.4.6 using the directions found in system-setup.txt. + Install Mac OS X 10.4.8 using the directions found in system-setup.txt. Enabling sshd (under "Remote Login" in "Sharing" control panel) will help in recovering systems that boot, but can't login graphically. @@ -92,7 +91,7 @@ In addition to the Makefile configuration changes, you will also have - to change the default compiler. Tiger 10.4.6 ships with gcc 4.0 as + to change the default compiler. Tiger 10.4.8 ships with gcc 4.0 as the default compiler. However, Darwin will _NOT_ build with this version. You must select the gcc 3.3 compiler in order to build. To do this, first install the older compiler package and once done, run this @@ -128,7 +127,7 @@ created in the root of the source tree. This tarfile can be used to install on the current machine, or any other - appropriately updated 10.4.6 system. The following steps presume that + appropriately updated 10.4.8 system. The following steps presume that you have copied the tar file to the target machine. From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:44:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 7699D16A4EC; Tue, 14 Nov 2006 20:44:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5522616A492 for ; Tue, 14 Nov 2006 20:44:26 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4278343F3F for ; Tue, 14 Nov 2006 20:38:39 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKcc9t047760 for ; Tue, 14 Nov 2006 20:38:38 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKccmd047757 for perforce@freebsd.org; Tue, 14 Nov 2006 20:38:38 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:38:38 GMT Message-Id: <200611142038.kAEKccmd047757@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109984 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:44:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=109984 Change 109984 by millert@millert_g5tower on 2006/11/14 20:37:41 Fix merge error; remove stray vnode_unlock() call. g/c unused vars Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#20 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_vfs.c#20 (text+ko) ==== @@ -254,9 +254,7 @@ { struct devnode *dnp; struct fdescnode *fnp; - struct fileglob *fg; - struct proc *p; - int error, fd; + int error; error = 0; @@ -1005,7 +1003,6 @@ MAC_PERFORM(vnode_label_associate_posixsem, vfs_context_ucred(ctx), psem, psem->psem_label, vp, vp->v_label); - vnode_unlock(vp); break; case DTYPE_PIPE: /* XXX: should PIPE_LOCK */ From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:44:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id EDC3016A4AB; Tue, 14 Nov 2006 20:44:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CAE1F16A4E6 for ; Tue, 14 Nov 2006 20:44:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C12BD43F38 for ; Tue, 14 Nov 2006 20:38:39 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKcdWv047774 for ; Tue, 14 Nov 2006 20:38:39 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKcd23047771 for perforce@freebsd.org; Tue, 14 Nov 2006 20:38:39 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:38:39 GMT Message-Id: <200611142038.kAEKcd23047771@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109986 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:44:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=109986 Change 109986 by millert@millert_g5tower on 2006/11/14 20:38:31 Darwinize genhomedircon and enable it in policy builds Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/Rules.monolithic#8 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/support/genhomedircon#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/Rules.monolithic#8 (text+ko) ==== @@ -212,8 +212,7 @@ @mkdir -p $(contextpath)/files $(verbose) $(INSTALL) -m 644 $(fc) $(fcpath) $(verbose) $(INSTALL) -m 644 $(homedir_template) $(homedirpath) - # XXX - Disable genhomedircon for now - #$(verbose) $(genhomedircon) -d $(topdir) -t $(NAME) $(USEPWD) + $(verbose) $(genhomedircon) -d $(topdir) -t $(NAME) $(USEPWD) ifeq "$(DISTRO)" "rhel4" # Setfiles in RHEL4 does not look at file_contexts.homedirs. $(verbose) cat $@.homedirs >> $@ ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/support/genhomedircon#2 (text+ko) ==== @@ -42,30 +42,11 @@ import commands, sys, os, pwd, string, getopt, re -EXCLUDE_LOGINS=["/sbin/nologin", "/bin/false"] +EXCLUDE_LOGINS=["/sbin/nologin", "/usr/bin/false"] +# Mac OS X uses a starting uid of 501 but use 500 for consistency def getStartingUID(): - starting_uid = sys.maxint - rc=commands.getstatusoutput("grep -h '^UID_MIN' /etc/login.defs") - if rc[0] == 0: - uid_min = re.sub("^UID_MIN[^0-9]*", "", rc[1]) - #stip any comment from the end of the line - uid_min = uid_min.split("#")[0] - uid_min = uid_min.strip() - if int(uid_min) < starting_uid: - starting_uid = int(uid_min) - rc=commands.getstatusoutput("grep -h '^LU_UIDNUMBER' /etc/libuser.conf") - if rc[0] == 0: - lu_uidnumber = re.sub("^LU_UIDNUMBER[^0-9]*", "", rc[1]) - #stip any comment from the end of the line - lu_uidnumber = re.sub("[ \t].*", "", lu_uidnumber) - lu_uidnumber = lu_uidnumber.split("#")[0] - lu_uidnumber = lu_uidnumber.strip() - if int(lu_uidnumber) < starting_uid: - starting_uid = int(lu_uidnumber) - if starting_uid == sys.maxint: - starting_uid = 500 - return starting_uid + return 500 ############################################################################# # @@ -126,35 +107,11 @@ if os.path.isdir(filecontextdir) == 0: sys.stderr.write("New usage is the following\n") usage() - #We are going to define home directory used by libuser and show-utils as a home directory root - prefixes = {} - rc=commands.getstatusoutput("grep -h '^HOME' /etc/default/useradd") - if rc[0] == 0: - homedir = rc[1].split("=")[1] - homedir = homedir.split("#")[0] - homedir = homedir.strip() - if not prefixes.has_key(homedir): - prefixes[homedir] = "" - else: - #rc[0] == 256 means the file was there, we read it, but the grep didn't match - if rc[0] != 256: - sys.stderr.write("%s\n" % rc[1]) - sys.stderr.write("You do not have access to /etc/default/useradd HOME=\n") - sys.stderr.flush() + # For Mac OS X, most homedirs live in /Users + prefixes["/home"] = "" - - rc=commands.getstatusoutput("grep -h '^LU_HOMEDIRECTORY' /etc/libuser.conf") - if rc[0] == 0: - homedir = rc[1].split("=")[1] - homedir = homedir.split("#")[0] - homedir = homedir.strip() - homedir = re.sub(r"[^/a-zA-Z0-9].*$", "", homedir) - if not prefixes.has_key(homedir): - prefixes[homedir] = "" - - #the idea is that we need to find all of the home_root_t directories we do this by just accepting - #any default home directory defined by either /etc/libuser.conf or /etc/default/useradd - #we then get the potential home directory roots from /etc/passwd or nis or whereever and look at + #the idea is that we need to find all of the home_root_t directories + #we get the potential home directory roots from netinfo or ldap and look at #the defined homedir for all users with UID > STARTING_UID. This list of possible root homedirs #is then checked to see if it has an explicite context defined in the file_contexts. Explicit #is any regex that would match it which does not end with .*$ or .+$ since those are general @@ -191,19 +148,11 @@ prefixes[potential] = "" - if prefixes.__eq__({}): - sys.stderr.write("LU_HOMEDIRECTORY not set in /etc/libuser.conf\n") - sys.stderr.write("HOME= not set in /etc/default/useradd\n") - sys.stderr.write("And no users with a reasonable homedir found in passwd/nis/ldap/etc...\n") - sys.stderr.write("Assuming /home is the root of home directories\n") - sys.stderr.flush() - prefixes["/home"] = "" - # There may be a more elegant sed script to expand a macro to multiple lines, but this works sed_root = "h; s|^HOME_ROOT|%s|" % (string.join(prefixes.keys(), "|; p; g; s|^HOME_ROOT|"),) sed_dir = "h; s|^HOME_DIR|%s/[^/]+|; s|ROLE_|user_|" % (string.join(prefixes.keys(), "/[^/]+|; s|ROLE_|user_|; p; g; s|^HOME_DIR|"),) - # Fill in HOME_ROOT, HOME_DIR, and ROLE for users not explicitly defined in /etc/security/selinux/src/policy/users + # Fill in HOME_ROOT, HOME_DIR, and ROLE for users not explicitly defined in /etc/sedarwin/refpolicy/src/policy/users rc=commands.getstatusoutput("sed -e \"/^HOME_ROOT/{%s}\" -e \"/^HOME_DIR/{%s}\" %s" % (sed_root, sed_dir, filecontext)) if rc[0] == 0: print rc[1] @@ -223,36 +172,10 @@ # ############################################################################# +# Homedirs live in /Users on Mac OS X by default def getDefaultHomeDir(): ret = [] - rc=commands.getstatusoutput("grep -h '^HOME' /etc/default/useradd") - if rc[0] == 0: - homedir = rc[1].split("=")[1] - homedir = homedir.split("#")[0] - homedir = homedir.strip() - if not homedir in ret: - ret.append(homedir) - else: - #rc[0] == 256 means the file was there, we read it, but the grep didn't match - if rc[0] != 256: - sys.stderr.write("%s\n" % rc[1]) - sys.stderr.write("You do not have access to /etc/default/useradd HOME=\n") - sys.stderr.flush() - rc=commands.getstatusoutput("grep -h '^LU_HOMEDIRECTORY' /etc/libuser.conf") - if rc[0] == 0: - homedir = rc[1].split("=")[1] - homedir = homedir.split("#")[0] - homedir = homedir.strip() - if not homedir in ret: - ret.append(homedir) - else: - #rc[0] == 256 means the file was there, we read it, but the grep didn't match - if rc[0] != 256: - sys.stderr.write("%s\n" % rc[1]) - sys.stderr.write("You do not have access to /etc/libuser.conf LU_HOMEDIRECTORY=\n") - sys.stderr.flush() - if ret == []: - ret.append("/home") + ret.append("/Users") return ret def getSELinuxType(directory): @@ -279,7 +202,7 @@ sys.exit(1) class selinuxConfig: - def __init__(self, selinuxdir="/etc/selinux", type="targeted", usepwd=1): + def __init__(self, selinuxdir="/etc/sedarwin", type="refpolicy", usepwd=1): self.type=type self.selinuxdir=selinuxdir +"/" self.contextdir="/contexts" @@ -444,7 +367,7 @@ # try: usepwd=1 - directory="/etc/selinux" + directory="/etc/sedarwin" type=None gopts, cmds = getopt.getopt(sys.argv[1:], 'nd:t:', ['help', 'type=', From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:44:31 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 31E7D16A5CB; Tue, 14 Nov 2006 20:44:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E9F2316A4EF for ; Tue, 14 Nov 2006 20:44:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C1BE843F3C for ; Tue, 14 Nov 2006 20:38:39 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKcd3A047768 for ; Tue, 14 Nov 2006 20:38:39 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKcdH0047763 for perforce@freebsd.org; Tue, 14 Nov 2006 20:38:39 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:38:39 GMT Message-Id: <200611142038.kAEKcdH0047763@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109985 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:44:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=109985 Change 109985 by millert@millert_g5tower on 2006/11/14 20:37:57 Make 'fd_fd' an int. Fix formatting. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc.h#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/miscfs/fdesc/fdesc.h#3 (text+ko) ==== @@ -94,12 +94,12 @@ } fdntype; struct fdescnode { - LIST_ENTRY(fdescnode) fd_hash; /* Hash list */ - struct vnode *fd_vnode; /* Back ptr to vnode */ + LIST_ENTRY(fdescnode) fd_hash; /* Hash list */ + struct vnode * fd_vnode; /* Back ptr to vnode */ fdntype fd_type; /* Type of this node */ - unsigned fd_fd; /* Fd to be dup'ed */ + int fd_fd; /* Fd to be dup'ed */ char *fd_link; /* Link to fd/n */ - int fd_ix; /* filesystem index */ + int fd_ix; /* filesystem index */ }; #define VFSTOFDESC(mp) ((struct fdescmount *)((mp)->mnt_data)) From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:46:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3065916A4F6; Tue, 14 Nov 2006 20:46:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D6F2F16A4EF for ; Tue, 14 Nov 2006 20:46:29 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EA9B43E48 for ; Tue, 14 Nov 2006 20:39:55 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKdfcV047950 for ; Tue, 14 Nov 2006 20:39:41 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKdfJs047947 for perforce@freebsd.org; Tue, 14 Nov 2006 20:39:41 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:39:41 GMT Message-Id: <200611142039.kAEKdfJs047947@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109988 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:46:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=109988 Change 109988 by millert@millert_g5tower on 2006/11/14 20:39:34 Fix logic reversal. mac_[gs]et_file should follow symlinks, mac_[gs]et_link should not. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_base.c#21 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_base.c#21 (text+ko) ==== @@ -1644,7 +1644,7 @@ register_t *ret __unused) { - return (mac_get_filelink(p, uap->mac_p, uap->path_p, 0)); + return (mac_get_filelink(p, uap->mac_p, uap->path_p, 1)); } int @@ -1652,7 +1652,7 @@ register_t *ret __unused) { - return (mac_get_filelink(p, uap->mac_p, uap->path_p, 1)); + return (mac_get_filelink(p, uap->mac_p, uap->path_p, 0)); } int @@ -1810,7 +1810,7 @@ register_t *ret __unused) { - return (mac_set_filelink(p, uap->mac_p, uap->path_p, 0)); + return (mac_set_filelink(p, uap->mac_p, uap->path_p, 1)); } int @@ -1818,7 +1818,7 @@ register_t *ret __unused) { - return (mac_set_filelink(p, uap->mac_p, uap->path_p, 1)); + return (mac_set_filelink(p, uap->mac_p, uap->path_p, 0)); } /* From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:46:30 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8B2C116A57D; Tue, 14 Nov 2006 20:46:30 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5B64E16A543 for ; Tue, 14 Nov 2006 20:46:30 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBB2544060 for ; Tue, 14 Nov 2006 20:39:55 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKdfGH047944 for ; Tue, 14 Nov 2006 20:39:41 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKdfYA047941 for perforce@freebsd.org; Tue, 14 Nov 2006 20:39:41 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:39:41 GMT Message-Id: <200611142039.kAEKdfYA047941@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109987 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:46:31 -0000 http://perforce.freebsd.org/chv.cgi?CH=109987 Change 109987 by millert@millert_g5tower on 2006/11/14 20:39:16 Skip mount points entirely. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/policycoreutils/restorecon/restorecon.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/policycoreutils/setfiles/setfiles.c#5 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/policycoreutils/restorecon/restorecon.c#5 (text+ko) ==== @@ -307,11 +307,14 @@ } while ((ftsent = fts_read(fts)) != NULL) { switch (ftsent->fts_info) { + case FTS_D: /* dir in pre-order */ + if (fts->fts_dev != ftsent->fts_dev) + break; + /* FALLTHROUGH */ + case FTS_F: /* file */ + case FTS_SL: /* symlink */ + case FTS_W: /* whiteout */ case FTS_DEFAULT: - case FTS_D: - case FTS_F: - case FTS_SL: - case FTS_W: apply_spec(ftsent->fts_path, ftsent->fts_statp); break; case FTS_DNR: @@ -330,6 +333,12 @@ progname, ftsent->fts_path, strerror(ftsent->fts_errno)); break; + case FTS_DP: /* skip post-order dir */ + case FTS_DC: /* skip dir cycle */ + case FTS_DOT: /* skip . and .. */ + case FTS_SLNONE: /* skip dead symlinks */ + default: + break; } } } else { ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/policycoreutils/setfiles/setfiles.c#5 (text+ko) ==== @@ -671,11 +671,14 @@ /* Walk the file tree, calling apply_spec on each file. */ while ((ftsent = fts_read(fts)) != NULL) { switch (ftsent->fts_info) { - case FTS_DEFAULT: case FTS_D: /* dir in pre-order */ + if (fts->fts_dev != ftsent->fts_dev) + break; + /* FALLTHROUGH */ case FTS_F: /* file */ case FTS_SL: /* symlink */ case FTS_W: /* whiteout */ + case FTS_DEFAULT: apply_spec(ftsent->fts_path, ftsent->fts_statp); break; From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:47:02 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8595116A532; Tue, 14 Nov 2006 20:47:02 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4A5A416A517 for ; Tue, 14 Nov 2006 20:47:02 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1EA1943E31 for ; Tue, 14 Nov 2006 20:40:51 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKeitU048163 for ; Tue, 14 Nov 2006 20:40:44 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKehNB048160 for perforce@freebsd.org; Tue, 14 Nov 2006 20:40:43 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:40:43 GMT Message-Id: <200611142040.kAEKehNB048160@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109989 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:47:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=109989 Change 109989 by millert@millert_g5tower on 2006/11/14 20:40:04 Update libmac docs from FreeBSD with a few minor fixes. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac.3#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_get.3#3 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_prepare.3#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_set.3#2 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_text.3#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac.3#3 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/mac.3,v 1.13 2003/05/22 13:02:27 ru Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/mac.3,v 1.15 2005/07/31 03:30:44 keramida Exp $ .\" .Dd April 19, 2003 .Dt MAC 3 @@ -177,7 +177,7 @@ .Fx POSIX.1e implementation page for more information. -However, the resemblence of these APIs to the POSIX APIs is only loose, +However, the resemblance of these APIs to the POSIX APIs is only loose, as the POSIX APIs were unable to express many notions required for flexible and extensible access control. .Sh HISTORY ==== //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_get.3#3 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" Copyright (c) 2001 Networks Associates Technology, Inc. +.\" Copyright (c) 2001, 2004 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -28,19 +28,21 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/mac_get.3,v 1.5 2003/01/15 03:03:05 chris Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/mac_get.3,v 1.10 2004/06/30 20:09:09 ru Exp $ .\" .Dd December 21, 2001 .Dt MAC_GET 3 .Os .Sh NAME .Nm mac_get_file , +.Nm mac_get_link , .Nm mac_get_fd , .Nm mac_get_lctx , .Nm mac_get_lcid , +.Nm mac_get_peer , .Nm mac_get_pid , .Nm mac_get_proc -.Nd get the label of a file, socket, socket peer or process +.Nd get the label of a file, socket, login context, mount point, socket peer or process .Sh LIBRARY The MAC Framework Library (libmac, -lmac) .Sh SYNOPSIS @@ -48,6 +50,8 @@ .Ft int .Fn mac_get_file "const char *path" "mac_t label" .Ft int +.Fn mac_get_link "const char *path" "mac_t label" +.Ft int .Fn mac_get_fd "int fd" "mac_t label" .Ft int .Fn mac_get_lcid "pid_t lcid" "mac_t label" @@ -56,60 +60,63 @@ .Ft int .Fn mac_get_mount "const char *path" "mac_t label" .Ft int +.Fn mac_get_peer "int fd" "mac_t label" +.Ft int .Fn mac_get_pid "pid_t pid" "mac_t label" .Ft int .Fn mac_get_proc "mac_t label" .Sh DESCRIPTION The .Fn mac_get_file -and +function returns the label associated with a file specified by +.Fa path . +The +.Fn mac_get_link +function is the same as +.Fn mac_get_file , +except that it does not follow symlinks. +.Pp +The .Fn mac_get_fd -functions fill in -.Fa label -(which must first be allocated by -.Xr mac_prepare 3 ) -with the MAC label associated with the file referenced by -.Fa path -or the file descriptor specified by -.Fa fd , -respectively. -Note that this function will fail on socket descriptors. -For information on -getting MAC labels on socket descriptors see -.Xr getsockopt 2 . +function returns the label associated with an object referenced by +the specified file descriptor. +Note that in the case of a file system socket, the label returned will +be the socket label, which may be different from the label of the +on-disk node acting as a rendezvous for the socket. .Pp The +.Fn mac_get_lctx +and +.Fn mac_get_lcid +functions return the label associated with the Login Context of +the requesting process or the specified Login Context, respectively. +.Pp .Fn mac_get_mount -function fills in -.Fa label -(which must first be allocated by -.Xr mac_prepare 3 ) -with the MAC label associated with the mount point referenced by +function returns the label associated with the mount point described by .Fa path . .Pp The -.Fn mac_get_lctx -and -.Fn mac_get_lcid -functions fill in -.Fa label -(which must first be allocated by -.Xr mac_prepare 3 ) -with the MAC label associated -with the Login Context of the requesting process -or the specified Login Context, respectively. +.Fn mac_get_peer +system call returns the label associated with the remote endpoint of +a socket. The exact semantics of this call will depend on the protocol +domain, communications type, and endpoint. Typically this label will +be cached when a connection-oriented protocol instance is first set up, +and is undefined for datagram protocols. .Pp The +.Fn mac_get_pid +and .Fn mac_get_proc -and -.Fn mac_get_pid -functions fill in -.Fa label -(which must first be allocated by -.Xr mac_prepare 3 ) -with the MAC label associated -with the requesting process -or the specified process, respectively. +functions return the process label associated with an arbitrary +process ID, or the current process. +.Pp +Label storage for use with these functions must first be allocated and +prepared using the +.Xr mac_prepare 3 +functions. +When an application is done using a label, the memory may be returned +using +.Xr mac_free 3 . .Sh ERRORS .Bl -tag -width Er .It Bq Er EACCES ==== //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_prepare.3#2 (text+ko) ==== @@ -1,4 +1,4 @@ -.\" Copyright (c) 2002 Networks Associates Technology, Inc. +.\" Copyright (c) 2002, 2003 Networks Associates Technology, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -30,18 +30,20 @@ .\" .\" $FreeBSD: src/lib/libc/posix1e/mac_prepare.3,v 1.3 2003/04/20 04:43:56 rwatson Exp $ .\" -.Dd December 12, 2002 +.Dd August 22, 2003 .Os .Dt MAC_PREPARE 3 .Sh NAME -.Nm mac_prepare , mac_prepare_file_label , +.Nm mac_prepare , mac_prepare_type , mac_prepare_file_label , .Nm mac_prepare_ifnet_label , mac_prepare_process_label .Nd allocate appropriate storage for .Vt mac_t .Sh SYNOPSIS .In security/mac.h .Ft int -.Fn mac_prepare "mac_t *mac" "char *elements" +.Fn mac_prepare "mac_t *mac" "const char *elements" +.Ft int +.Fn mac_prepare_type "mac_t *mac" "const char *name" .Ft int .Fn mac_prepare_file_label "mac_t *mac" .Ft int @@ -55,21 +57,46 @@ .Fa *mac for use by .Xr mac_get 3 . +When the resulting label is passed into the +.Xr mac_get 3 +functions, the kernel will attempt to fill in the label elements specified +when the label was prepared. +Elements are specified in a nul-terminated string, using commas to +delimit fields. +Element names may be prefixed with the +.Dv ? +character to indicate that a failure by the kernel to retrieve that +element should not be considered fatal. .Pp The .Fn mac_prepare function accepts a list of policy names as a parameter, and allocates the storage to fit those label elements accordingly. +The remaining functions in the family make use of system defaults defined +in +.Xr mac.conf 5 +instead of an explicit +.Va elements +argument, deriving the default from the specified object type. .Pp +.Fn mac_prepare_type +allocates the storage to fit an object label of the type specified by +the +.Va name +argument. The .Fn mac_prepare_file_label , .Fn mac_prepare_ifnet_label , and .Fn mac_prepare_process_label -functions allocate the storage to fit file, network interface, -and process labels, respectively. -The default label elements employed by these APIs is configured in -.Xr mac.conf 5 . +functions are equivalent to invocations of +.Fn mac_prepare_type +with arguments of +.Qq file , +.Qq ifnet , +and +.Qq process +respectively. .Sh RETURN VALUES .Rv -std .Sh SEE ALSO ==== //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_set.3#2 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/mac_set.3,v 1.8 2003/01/15 03:02:30 chris Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/mac_set.3,v 1.10 2003/11/16 20:21:21 rwatson Exp $ .\" .Dd January 14, 2003 .Dt MAC_SET 3 @@ -61,26 +61,27 @@ functions associate a MAC label specified by .Fa label -to the file referenced to by -.Fa path_p , +with the file referenced by +.Fa path , or to the file descriptor .Fa fd , respectively. -Note that this function will fail on socket descriptors. -For information on -setting MAC labels on socket descriptors see -.Xr setsockopt 2 . The .Fn mac_set_link function is the same as .Fn mac_set_file , except that it does not follow symlinks. +Note that when a file descriptor references a socket, label operations +on the file descriptor act on the socket, not on the file that may +have been used as a rendezvous when binding the socket. +.Pp The .Fn mac_set_lctx function associates the MAC label specified by .Fa label with the login context the current process is a member of, if any. +.Pp The .Fn mac_set_proc function associates the MAC label @@ -108,7 +109,9 @@ The .Fa label argument -is not a valid MAC label. +is not a valid MAC label, or the object referenced by +.Fa fd +is not appropriate for label operations. .It Bq Er EOPNOTSUPP Setting MAC labels is not supported by the file referenced by @@ -122,7 +125,7 @@ .It Bq Er ENAMETOOLONG .\" XXX POSIX_NO_TRUNC? The length of the pathname in -.Fa path_p +.Fa path exceeds .Dv PATH_MAX , or a component of the pathname @@ -130,12 +133,12 @@ .Dv NAME_MAX . .It Bq Er ENOENT The file referenced by -.Fa path_p +.Fa path does not exist. .It Bq Er ENOTDIR A component of the pathname referenced by -.Fa path_p +.Fa path is not a directory. .El .Sh SEE ALSO ==== //depot/projects/trustedbsd/sedarwin8/darwin/libmac/mac_text.3#2 (text+ko) ==== @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: src/lib/libc/posix1e/mac_text.3,v 1.8 2003/01/15 03:01:45 chris Exp $ +.\" $FreeBSD: src/lib/libc/posix1e/mac_text.3,v 1.11 2004/06/30 20:09:09 ru Exp $ .\" .Dd December 21, 2001 .Dt MAC_TEXT 3 @@ -54,7 +54,7 @@ and places it in .Fa *mac , which must later be freed with -.Xr mac_free 3 . +.Xr free 3 . .Pp The .Fn mac_to_text @@ -72,6 +72,19 @@ POSIX.1e does not define a format for text representations of MAC labels. +.Pp +POSIX.1e requires that text strings allocated using +.Fn mac_to_text +be freed using +.Xr mac_free 3 ; +in the +.Fx +implementation, they must be freed using +.Xr free 3 , +as +.Xr mac_free 3 +is used only to free memory used for type +.Vt mac_t . .Sh ERRORS .Bl -tag -width Er .It Bq Er ENOMEM @@ -79,8 +92,8 @@ to allocate internal storage. .El .Sh SEE ALSO +.Xr free 3 , .Xr mac 3 , -.Xr mac_free 3 , .Xr mac_get 3 , .Xr mac_is_present_np 3 , .Xr mac_prepare 3 , From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:47:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6113E16A6A6; Tue, 14 Nov 2006 20:47:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E14316A51A for ; Tue, 14 Nov 2006 20:47:05 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D1FF4408B for ; Tue, 14 Nov 2006 20:40:51 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKeicV048169 for ; Tue, 14 Nov 2006 20:40:44 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKei7Y048166 for perforce@freebsd.org; Tue, 14 Nov 2006 20:40:44 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:40:44 GMT Message-Id: <200611142040.kAEKei7Y048166@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109990 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:47:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=109990 Change 109990 by millert@millert_g5tower on 2006/11/14 20:40:34 Update from FreeBSD Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/mac_cmds/getfmac/getfmac.c#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/mac_cmds/getfmac/getfmac.c#2 (text+ko) ==== @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/usr.sbin/getfmac/getfmac.c,v 1.1 2002/10/23 03:15:23 rwatson Exp $ + * $FreeBSD: src/usr.sbin/getfmac/getfmac.c,v 1.3 2005/01/27 14:44:38 delphij Exp $ */ #include #include @@ -46,22 +46,21 @@ #define MAXELEMENTS 32 -void +static void usage(void) { fprintf(stderr, "getfmac [-h] [-l list,of,labels] [file1] [file2 ...]\n"); - exit (EX_USAGE); } int main(int argc, char *argv[]) { - char ch, *labellist, *string; + char *labellist, *string; mac_t label; - int hflag; + int ch, hflag; int error, i; labellist = NULL; @@ -94,9 +93,9 @@ } if (hflag) - error = mac_get_link (argv[i], label); + error = mac_get_link(argv[i], label); else - error = mac_get_file (argv[i], label); + error = mac_get_file(argv[i], label); if (error) { perror(argv[i]); mac_free(label); @@ -104,9 +103,9 @@ } error = mac_to_text(label, &string); - if (error != 0) { + if (error != 0) perror("mac_to_text"); - } else { + else { printf("%s: %s\n", argv[i], string); free(string); } From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:47:39 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A4BC416A516; Tue, 14 Nov 2006 20:47:39 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5BC9016A4D1 for ; Tue, 14 Nov 2006 20:47:39 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A804D43F72 for ; Tue, 14 Nov 2006 20:41:46 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKfkwG049255 for ; Tue, 14 Nov 2006 20:41:46 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKfkYQ049252 for perforce@freebsd.org; Tue, 14 Nov 2006 20:41:46 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:41:46 GMT Message-Id: <200611142041.kAEKfkYQ049252@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109991 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:47:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=109991 Change 109991 by millert@millert_g5tower on 2006/11/14 20:40:50 Less bad manual page. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/mac_cmds/getfmac/getfmac.8#2 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/mac_cmds/getfmac/getfmac.8#2 (text+ko) ==== @@ -1,4 +1,5 @@ .\" Copyright (c) 2002 Networks Associates Technology, Inc. +.\" Copyright (c) 2006 SPARTA, Inc. .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -42,16 +43,30 @@ .Sh SYNOPSIS .Nm .Op Fl h -.Op Fl l Ar list,of,labels +.Op Fl l Ar namespace(s) .Op Ar .Sh DESCRIPTION The .Nm utility prints the text representation of the MAC label associated with the specified files. +.Pp +The following options are available: +.Bl -tag -width indent +.It Fl h +Print label information for any symbolic links encountered, rather +than the link's target. +.It Fl l Ar namespace(s) +Print label information for the comma-separated list of label namespaces. +By default, label information is printed for the namespaces listed in +.Xr mac.conf 5 , +or the namespaces of all loaded policy modules if that file does +not exist. +.El .Sh SEE ALSO .Xr mac 3 , .Xr mac_get_file 3 , .Xr mac 4 , +.Xr mac.conf 5 , .Xr setfmac 8 , .Xr mac 9 From owner-p4-projects@FreeBSD.ORG Tue Nov 14 20:58:16 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B85FC16A416; Tue, 14 Nov 2006 20:58:16 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8379F16A415 for ; Tue, 14 Nov 2006 20:58:16 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B47A543D73 for ; Tue, 14 Nov 2006 20:58:09 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAEKw9lt069975 for ; Tue, 14 Nov 2006 20:58:09 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAEKw8S2069972 for perforce@freebsd.org; Tue, 14 Nov 2006 20:58:08 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 20:58:08 GMT Message-Id: <200611142058.kAEKw8S2069972@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109993 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 20:58:17 -0000 http://perforce.freebsd.org/chv.cgi?CH=109993 Change 109993 by millert@millert_macbook on 2006/11/14 20:57:07 Update policy. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules.conf#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/ATconfig.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/ATconfig.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/ATconfig.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/Apple80211Monitor.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/Apple80211Monitor.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/Apple80211Monitor.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/BatteryUpdater.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/BatteryUpdater.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/BatteryUpdater.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/Bluetooth.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/Bluetooth.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/Bluetooth.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/DynamicPowerStep.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/DynamicPowerStep.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/DynamicPowerStep.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/IP6Configuration.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/IP6Configuration.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/IP6Configuration.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PPPController.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PPPController.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PPPController.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PowerManagement.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PowerManagement.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PowerManagement.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PrinterNotifications.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PrinterNotifications.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/SystemConfiguration/PrinterNotifications.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/DirectoryService.fc#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/DirectoryService.te#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/KernelEventAgent.te#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.fc#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.if#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.te#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.fc#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.if#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.te#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/coreaudiod.te#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/diskarbitrationd.te#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/frameworks.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/frameworks.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/frameworks.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/kextd.te#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/files.fc#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/filesystem.te#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.fc#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.if#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.te#1 add .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/fstools.fc#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/fstools.if#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/init.te#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/libraries.fc#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/modutils.fc#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules.conf#5 (text+ko) ==== @@ -1611,6 +1611,8 @@ # # Darwin System Configuration Daemon # +darwin = module +frameworks = module mach = module configd = module DirectoryService = module @@ -1631,3 +1633,11 @@ lookupd = module +ATconfig = module +Apple80211Monitor = module +BatteryUpdater = module +Bluetooth = module +DynamicPowerStep = module +IP6Configuration = module +PPPController = module +PowerManagement = module ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/DirectoryService.fc#3 (text+ko) ==== @@ -4,9 +4,17 @@ # MCS categories: /usr/sbin/DirectoryService -- gen_context(system_u:object_r:DirectoryService_exec_t,s0) +/Library/Logs/DirectoryService -d gen_context(system_u:object_r:DirectoryService_var_log_t,s0) /Library/Logs/DirectoryService/.* gen_context(system_u:object_r:DirectoryService_var_log_t,s0) +/Library/Preferences/DirectoryService -d gen_context(system_u:object_r:DirectoryService_resource_t,s0) /Library/Preferences/DirectoryService/.* -- gen_context(system_u:object_r:DirectoryService_resource_t,s0) -/System/Library/Frameworks/DirectoryService.framework/.* -- gen_context(system_u:object_r:DirectoryService_resource_t,s0) +/System/Library/Frameworks/DirectoryService.framework -d gen_context(system_u:object_r:DirectoryService_resource_t,s0) +/System/Library/Frameworks/DirectoryService.framework/.* gen_context(system_u:object_r:DirectoryService_resource_t,s0) +/System/Library/PrivateFrameworks/DirectoryServiceCore.framework.* gen_context(system_u:object_r:DirectoryService_resource_t,s0) + +/private/var/run/.DSRunningSP1 -- gen_context(system_u:object_r:DirectoryService_var_run_t,s0) +#/System +/System -d gen_context(system_u:object_r:darwin_system_t,s0) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/DirectoryService.te#5 (text+ko) ==== @@ -17,6 +17,9 @@ # Other DirectoryService component files type DirectoryService_resource_t; +type DirectoryService_var_run_t; +files_pid_file(DirectoryService_var_run_t) + ######################################## # @@ -33,6 +36,12 @@ allow DirectoryService_t self:fifo_file { read write }; allow DirectoryService_t self:unix_stream_socket create_stream_socket_perms; +# pid file +allow DirectoryService_t DirectoryService_var_run_t:file manage_file_perms; +allow DirectoryService_t DirectoryService_var_run_t:sock_file manage_file_perms; +allow DirectoryService_t DirectoryService_var_run_t:dir rw_dir_perms; +files_pid_filetrans(DirectoryService_t,DirectoryService_var_run_t, { file sock_file }) + # log files allow DirectoryService_t DirectoryService_var_log_t:file create_file_perms; allow DirectoryService_t DirectoryService_var_log_t:sock_file create_file_perms; @@ -41,6 +50,7 @@ # support files allow DirectoryService_t DirectoryService_resource_t:file { execute getattr read setattr write }; +allow DirectoryService_t DirectoryService_resource_t:dir { getattr read search }; # file descriptors and sockets allow DirectoryService_t self:fd use; @@ -60,6 +70,8 @@ allow DirectoryService_t self:process signal; allow DirectoryService_t self:socket create; allow DirectoryService_t bin_t:dir search; +allow DirectoryService_t nfs_t:dir { getattr read }; + # Allow Mach IPC with self @@ -67,6 +79,7 @@ # Allow communication with bootstrap server init_allow_bootstrap(DirectoryService_t) +init_allow_shm(DirectoryService_t) # Allow communication with notification server notifyd_allow_ipc(DirectoryService_t) @@ -91,3 +104,28 @@ # Allow shared memory usage w/ notifyd notifyd_allow_shm(DirectoryService_t) + +# Allow reading of prefs files +darwin_allow_global_pref_read(DirectoryService_t) +darwin_allow_host_pref_read(DirectoryService_t) + +# Allow reading of /System +darwin_allow_system_read(DirectoryService_t) + +# Allow shadow file stuff +auth_getattr_shadow(DirectoryService_t) +auth_rw_shadow(DirectoryService_t) +auth_manage_shadow(DirectoryService_t) + +# Framework access +frameworks_read(DirectoryService_t) +frameworks_execute(DirectoryService_t) + +# Read /private +darwin_allow_private_read(DirectoryService_t) + +# Read /private/var +files_read_var_files(DirectoryService_t) + +# Use CoreServices +darwin_allow_CoreServices_read(DirectoryService_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/KernelEventAgent.te#3 (text+ko) ==== @@ -30,3 +30,6 @@ # Talk to notifyd notifyd_allow_ipc(KernelEventAgent_t) + +# Talk to launchd +init_allow_ipc(KernelEventAgent_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.fc#2 (text+ko) ==== @@ -4,3 +4,5 @@ # MCS categories: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer -- gen_context(system_u:object_r:WindowServer_exec_t,s0) + +/System/Library/Displays/Overrides -- gen_context(system_u:object_r:WindowServer_resource_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.if#4 (text+ko) ==== @@ -85,3 +85,19 @@ allow $1 WindowServer_t:shm { create destroy getattr setattr read write associate unix_read unix_write lock }; ') + +######################################## +## +## Allow reading of WindowServer resources +## +## +## +## Type to be used as a domain.o## +## +# +interface(`WindowServer_allow_resource_read',` + + allow $1 WindowServer_resource_t:file {read getattr}; + allow $1 WindowServer_resource_t:dir {search}; + +') ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.te#5 (text+ko) ==== @@ -7,6 +7,7 @@ type WindowServer_t; type WindowServer_exec_t; +type WindowServer_resource_t; domain_type(WindowServer_t) init_domain(WindowServer_t, WindowServer_exec_t) @@ -63,9 +64,21 @@ configd_allow_ipc(WindowServer_t) configd_allow_shm(WindowServer_t) +# Allow WindowServer to load kexts *shudder* +allow WindowServer_t modules_object_t:dir { getattr read search }; +allow WindowServer_t modules_object_t:file { execute getattr read }; + +# task_for_pid() for securityd +allow WindowServer_t securityd_t:process taskforpid; + +# Find the proper interface for this later +allow WindowServer_t var_log_t:dir search; +allow WindowServer_t var_log_t:file { getattr setattr write }; + # Misc allow WindowServer_t nfs_t:filesystem getattr; allow WindowServer_t nfs_t:lnk_file read; +allow WindowServer_t nfs_t:dir search; allow WindowServer_t mnt_t:dir search; allow WindowServer_t self:mach_task set_special_port; allow WindowServer_t self:process { setsched signal }; @@ -74,6 +87,30 @@ allow WindowServer_t mnt_t:dir getattr; allow WindowServer_t sbin_t:dir search; +# Read prefs, etc +darwin_allow_global_pref_read(WindowServer_t) +darwin_allow_host_pref_read(WindowServer_t) +darwin_allow_system_read(WindowServer_t) +# Allow execution of framework bits +frameworks_execute(WindowServer_t) +frameworks_read(WindowServer_t) + +# Read our resources +WindowServer_allow_resource_read(WindowServer_t) + +# Read /private/var +files_read_var_files(WindowServer_t) + +# Talk to CoreServices +darwin_allow_CoreServices_read(WindowServer_t) +# Read /private +darwin_allow_private_read(WindowServer_t) + +# Allow set_special_port to loginwindow +allow WindowServer_t loginwindow_t:mach_task set_special_port; + +# Read modules +allow WindowServer_t modules_dep_t:dir search; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.fc#3 (text+ko) ==== @@ -5,3 +5,4 @@ /usr/sbin/configd -- gen_context(system_u:object_r:configd_exec_t,s0) /private/var/run/configd.pid gen_context(system_u:object_r:configd_var_run_t,s0) +/System/Library/SystemConfiguration.* gen_context(system_u:object_r:configd_resource_t,s0) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.if#5 (text+ko) ==== @@ -90,3 +90,36 @@ allow $1 configd_t:shm { create destroy getattr setattr read write associate unix_read unix_write lock }; ') + +######################################## +## +## Allow reading of configd resource files +## +## +## +## Type to be used as a domain. +## +## +# +interface(`configd_allow_resource_read',` + + allow configd_t configd_resource_t:file read_file_perms; + allow configd_t configd_resource_t:dir r_dir_perms; + +') + +######################################## +## +## Allow reading of configd resource files +## +## +## +## Type to be used as a domain. +## +## +# +interface(`configd_allow_resource_execute',` + + allow configd_t configd_resource_t:file { execute execute_no_trans}; + +') ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.te#6 (text+ko) ==== @@ -9,12 +9,15 @@ type configd_exec_t; domain_type(configd_t) init_domain(configd_t, configd_exec_t) -# Allow Mach IP w/ init_t (launchd) +# Allow Mach IPC w/ init_t (launchd) init_allow_ipc(configd_t) # pid files type configd_var_run_t; files_pid_file(configd_var_run_t) + +# Resource files +type configd_resource_t; ######################################## # @@ -79,6 +82,10 @@ allow configd_t sbin_t:dir { getattr read search }; allow configd_t sbin_t:file { execute_no_trans getattr read }; +# Execute configd helpers +configd_allow_resource_read(configd_t) +configd_allow_resource_execute(configd_t) + # Allow configd to start ntpdate ntp_domtrans_ntpdate(configd_t) @@ -135,3 +142,29 @@ # Talk to WindowServer WindowServer_allow_ipc(configd_t) +WindowServer_allow_shm(configd_t) + +# Read prefs, etc +darwin_allow_global_pref_read(configd_t) +darwin_allow_host_pref_read(configd_t) +darwin_allow_system_read(configd_t) + +# Use Frameworks +frameworks_read(configd_t) +frameworks_execute(configd_t) + +# Read CoreServices libs, etc +darwin_allow_CoreServices_read(configd_t) + +# Read /private/var +files_read_var_files(configd_t) + +# Read /private +darwin_allow_private_read(configd_t) + +# list modules +allow configd_t modules_dep_t:dir search; + +# I'm certain there's a "proper" way to do this... +allow configd_t port_t:tcp_socket name_connect; + ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/coreaudiod.te#5 (text+ko) ==== @@ -30,9 +30,14 @@ allow coreaudiod_t mnt_t:dir getattr; allow coreaudiod_t nfs_t:lnk_file read; allow coreaudiod_t sbin_t:dir { getattr read search }; +allow coreaudiod_t mnt_t:dir search; +allow coreaudiod_t random_device_t:chr_file read; + # Talking to itself mach_allow_message(coreaudiod_t, coreaudiod_t) +allow coreaudiod_t self:fd use; +allow coreaudiod_t self:udp_socket create; # Talk to the bootstrap server init_allow_bootstrap(coreaudiod_t) @@ -43,4 +48,18 @@ # Talk to securityd securityd_allow_ipc(securityd_t) +# Talk to kernel +kernel_allow_ipc(coreaudiod_t) + +# Talk to lookupd +lookupd_allow_ipc(coreaudiod_t) +# Allow reading of prefs +darwin_allow_global_pref_read(coreaudiod_t) +darwin_allow_host_pref_read(coreaudiod_t) + +# Allow reading of CoreServices files +darwin_allow_CoreServices_read(coreaudiod_t) + +# Allow reading of /private +darwin_allow_private_read(coreaudiod_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/diskarbitrationd.te#5 (text+ko) ==== @@ -87,3 +87,15 @@ # Allow Mach IPC with diskarbitrationd WindowServer_allow_ipc(diskarbitrationd_t) + +# Read prefs, etc +darwin_allow_global_pref_read(diskarbitrationd_t) +darwin_allow_host_pref_read(diskarbitrationd_t) +darwin_allow_system_read(diskarbitrationd_t) + +# Allow access to frameworks +frameworks_read(diskarbitrationd_t) + + +# Read /private/var +files_read_var_files(diskarbitrationd_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/kextd.te#3 (text+ko) ==== @@ -32,12 +32,15 @@ allow kextd_t nfs_t:filesystem getattr; allow kextd_t nfs_t:lnk_file read; allow kextd_t mnt_t:dir { getattr read search }; +allow kextd_t sbin_t:dir { getattr read search }; +allow kextd_t sbin_t:file { getattr read }; # Talk to self mach_allow_message(kextd_t, kextd_t) allow kextd_t self:mach_task set_special_port; allow kextd_t self:process signal; +allow kextd_t self:udp_socket create; # Talk to launchd init_allow_ipc(kextd_t) @@ -63,3 +66,17 @@ # Talk to update update_allow_ipc(kextd_t) +# Read prefs, etc +darwin_allow_global_pref_read(kextd_t) +darwin_allow_host_pref_read(kextd_t) +darwin_allow_system_read(kextd_t) + +# Use Frameworks +frameworks_read(kextd_t) + +# Use tmp files +files_tmp_file(kextd_t) + + +# Read /private/var +files_read_var_files(kextd_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/files.fc#4 (text+ko) ==== @@ -13,11 +13,11 @@ # # /etc # -/etc -d gen_context(system_u:object_r:etc_t,s0) -/etc/.* gen_context(system_u:object_r:etc_t,s0) -/etc/localtime -l gen_context(system_u:object_r:etc_t,s0) -/etc/motd -- gen_context(system_u:object_r:etc_runtime_t,s0) -/etc/nologin.* -- gen_context(system_u:object_r:etc_runtime_t,s0) +/private/etc -d gen_context(system_u:object_r:etc_t,s0) +/private/etc/.* gen_context(system_u:object_r:etc_t,s0) +/private/etc/localtime -l gen_context(system_u:object_r:etc_t,s0) +/private/etc/motd -- gen_context(system_u:object_r:etc_runtime_t,s0) +/private/etc/nologin.* -- gen_context(system_u:object_r:etc_runtime_t,s0) # # HOME_ROOT @@ -44,13 +44,13 @@ /Volumes/[^/]*/.* <> # -# /tmp +# /private/tmp # -/tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) -/tmp/.* <> +/private/tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) +/private/tmp/.* <> -/tmp/lost\+found -d gen_context(system_u:object_r:lost_found_t,mls_systemhigh) -/tmp/lost\+found/.* <> +/private/tmp/lost\+found -d gen_context(system_u:object_r:lost_found_t,mls_systemhigh) +/private/tmp/lost\+found/.* <> # # /usr @@ -73,25 +73,25 @@ /usr/share(/.*)?/lib(64)?(/.*)? gen_context(system_u:object_r:usr_t,s0) # -# /var +# /private/var # -/var -d gen_context(system_u:object_r:var_t,s0) -/var/.* gen_context(system_u:object_r:var_t,s0) +/private/var -d gen_context(system_u:object_r:var_t,s0) +/private/var/.* gen_context(system_u:object_r:var_t,s0) -/var/db/.*\.db -- gen_context(system_u:object_r:etc_t,s0) +/private/var/db/.*\.db -- gen_context(system_u:object_r:etc_t,s0) -/var/lost\+found -d gen_context(system_u:object_r:lost_found_t,mls_systemhigh) -/var/lost\+found/.* <> +/private/var/lost\+found -d gen_context(system_u:object_r:lost_found_t,mls_systemhigh) +/private/var/lost\+found/.* <> -/var/run -d gen_context(system_u:object_r:var_run_t,s0-mls_systemhigh) -/var/run/.* gen_context(system_u:object_r:var_run_t,s0) -/var/run/.*\.*pid <> +/private/var/run -d gen_context(system_u:object_r:var_run_t,s0-mls_systemhigh) +/private/var/run/.* gen_context(system_u:object_r:var_run_t,s0) +/private/var/run/.*\.*pid <> -/var/spool(/.*)? gen_context(system_u:object_r:var_spool_t,s0) -/var/spool/postfix/etc(/.*)? gen_context(system_u:object_r:etc_t,s0) +/private/var/spool(/.*)? gen_context(system_u:object_r:var_spool_t,s0) +/private/var/spool/postfix/etc(/.*)? gen_context(system_u:object_r:etc_t,s0) -/var/tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) -/var/tmp/.* <> -/var/tmp/lost\+found -d gen_context(system_u:object_r:lost_found_t,mls_systemhigh) -/var/tmp/lost\+found/.* <> -/var/tmp/vi\.recover -d gen_context(system_u:object_r:tmp_t,s0) +/private/var/tmp -d gen_context(system_u:object_r:tmp_t,s0-mls_systemhigh) +/private/var/tmp/.* <> +/private/var/tmp/lost\+found -d gen_context(system_u:object_r:lost_found_t,mls_systemhigh) +/private/var/tmp/lost\+found/.* <> +/private/var/tmp/vi\.recover -d gen_context(system_u:object_r:tmp_t,s0) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/filesystem.te#4 (text+ko) ==== @@ -27,6 +27,8 @@ fs_use_xattr jffs2 gen_context(system_u:object_r:fs_t,s0); fs_use_xattr jfs gen_context(system_u:object_r:fs_t,s0); fs_use_xattr xfs gen_context(system_u:object_r:fs_t,s0); +fs_use_xattr hfs gen_context(system_u:object_r:fs_t,s0); +fs_use_xattr hfsplus gen_context(system_u:object_r:fs_t,s0); # Use the allocating task SID to label inodes in the following filesystem # types, and label the filesystem itself with the specified context. @@ -153,13 +155,13 @@ genfscon vfat / gen_context(system_u:object_r:dosfs_t,s0) # -# iso9660_t is the type for CD filesystems +# cd9660_t is the type for CD filesystems # and their files. # -type iso9660_t; -fs_noxattr_type(iso9660_t) -genfscon iso9660 / gen_context(system_u:object_r:iso9660_t,s0) -genfscon udf / gen_context(system_u:object_r:iso9660_t,s0) +type cd9660_t; +fs_noxattr_type(cd9660_t) +genfscon cd9660 / gen_context(system_u:object_r:cd9660_t,s0) +genfscon udf / gen_context(system_u:object_r:cd9660_t,s0) # # removable_t is the default type of all removable media @@ -179,8 +181,6 @@ genfscon nfs / gen_context(system_u:object_r:nfs_t,s0) genfscon nfs4 / gen_context(system_u:object_r:nfs_t,s0) genfscon afs / gen_context(system_u:object_r:nfs_t,s0) -genfscon hfs / gen_context(system_u:object_r:nfs_t,s0) -genfscon hfsplus / gen_context(system_u:object_r:nfs_t,s0) genfscon reiserfs / gen_context(system_u:object_r:nfs_t,s0) genfscon gfs / gen_context(system_u:object_r:nfs_t,s0) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/fstools.fc#3 (text+ko) ==== @@ -1,3 +1,6 @@ /sbin/dump -- gen_context(system_u:object_r:fsadm_exec_t,s0) /usr/sbin/fdisk -- gen_context(system_u:object_r:fsadm_exec_t,s0) /sbin/fsck.* -- gen_context(system_u:object_r:fsadm_exec_t,s0) + +/System/Library/Filesystems.* gen_context(system_u:object_r:fsadm_t,s0) +/System/Library/Filesystems/.*/MacOS/.* gen_context(system_u:object_r:fsadm_exec_t,s0) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/fstools.if#4 (text+ko) ==== @@ -129,3 +129,24 @@ allow $1 swapfile_t:file getattr; ') + +######################################## +## +## Read fsadm files +## +## +## +## The type of the process performing this action. +## +## +# +interface(`fstools_read_files',` + gen_require(` + type swapfile_t; + ') + + allow $1 fsadm_t:dir r_dir_perms; + allow $1 fsadm_t:file read_file_perms; + allow $1 fsadm_t:lnk_file { read }; + +') ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/init.te#4 (text+ko) ==== @@ -648,3 +648,11 @@ # Talk to notifyd notifyd_allow_ipc(init_t) + +# Read prefs, etc +darwin_allow_global_pref_read(init_t) +darwin_allow_host_pref_read(init_t) +darwin_allow_system_read(init_t) + +# Use Frameworks +frameworks_read(init_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/libraries.fc#3 (text+ko) ==== @@ -1,9 +1,12 @@ # # /System # +/System/Library gen_context(system_u:object_r:lib_t,s0) /System/Library/Components/.*/Contents/MacOS/.* -- gen_context(system_u:object_r:lib_t,s0) /System/Library/CoreServices/.*/Contents/MacOS/.* -- gen_context(system_u:object_r:lib_t,s0) /System/Library/CoreServices/.*\.dylib -- gen_context(system_u:object_r:lib_t,s0) +#/System/Library/Frameworks gen_context(system_u:object_r:lib_t,s0) +#/System/Library/Frameworks/.* gen_context(system_u:object_r:lib_t,s0) # ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/modutils.fc#3 (text+ko) ==== @@ -5,4 +5,6 @@ /lib/modules/[^/]+/modules\..+ -- gen_context(system_u:object_r:modules_dep_t,s0) /sbin/kextload -- gen_context(system_u:object_r:insmod_exec_t,s0) -/sbin/kextunload -- gen_context(system_u:object_r:insmod_exec_t,s0) +/sbin/kextunload -- gen_context(system_u:object_r:insmod_exec_t,s0) + +/System/Library/Extensions.* gen_context(system_u:object_r:modules_dep_t,s0) From owner-p4-projects@FreeBSD.ORG Tue Nov 14 21:36:58 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5286516A417; Tue, 14 Nov 2006 21:36:58 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1404F16A415 for ; Tue, 14 Nov 2006 21:36:58 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C62CE43D68 for ; Tue, 14 Nov 2006 21:36:57 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAELav3d077693 for ; Tue, 14 Nov 2006 21:36:57 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAELavmr077690 for perforce@freebsd.org; Tue, 14 Nov 2006 21:36:57 GMT (envelope-from millert@freebsd.org) Date: Tue, 14 Nov 2006 21:36:57 GMT Message-Id: <200611142136.kAELavmr077690@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 109995 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 21:36:58 -0000 http://perforce.freebsd.org/chv.cgi?CH=109995 Change 109995 by millert@millert_g5tower on 2006/11/14 21:36:21 Use $(EXPORT_HDRS), $(DARWIN_ROOT) and $(SOURCE_ROOT) for SEDarwin plugin. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcode/project.pbxproj#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/osx_cmds/MAC.loginPlugin/MAC.loginPlugin.xcode/project.pbxproj#3 (text+ko) ==== @@ -81,8 +81,8 @@ GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_PREFIX_HEADER = "$(SYSTEM_LIBRARY_DIR)/Frameworks/AppKit.framework/Headers/AppKit.h"; INFOPLIST_FILE = plugins/SEDarwin/Info.plist; - OTHER_CFLAGS = "-I../../$(XNU)/BUILD/obj/EXPORT_HDRS/bsd -I../../$(XNU)/BUILD/obj/EXPORT_HDRS/security -I../../../policies/sedarwin/libselinux/include"; - OTHER_LDFLAGS = "-framework Foundation -framework AppKit -L../../../policies/sedarwin/libselinux/src -lselinux -L../../../policies/sedarwin/libsepol/src -lsepol -L../../../policies/sedarwin/libsecompat -lsecompat -L../../libmac -lmac"; + OTHER_CFLAGS = "-I$(EXPORT_HDRS)/bsd -I$(EXPORT_HDRS)/security -I$(SOURCE_ROOT)/policies/sedarwin/libselinux/include"; + OTHER_LDFLAGS = "-framework Foundation -framework AppKit -L$(SOURCE_ROOT)/policies/sedarwin/libselinux/src -lselinux -L$(SOURCE_ROOT)/policies/sedarwin/libsepol/src -lsepol -L$(SOURCE_ROOT)/policies/sedarwin/libsecompat -lsecompat -L$(DARWIN_ROOT)/libmac -lmac"; OTHER_REZFLAGS = ""; PRODUCT_NAME = SEDarwin; SECTORDER_FLAGS = ""; From owner-p4-projects@FreeBSD.ORG Tue Nov 14 23:14:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 40F2016A415; Tue, 14 Nov 2006 23:14:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EF8D916A412 for ; Tue, 14 Nov 2006 23:14:17 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 73F3243D60 for ; Tue, 14 Nov 2006 23:14:17 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAENEHPV096753 for ; Tue, 14 Nov 2006 23:14:17 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAENDwvZ096714 for perforce@freebsd.org; Tue, 14 Nov 2006 23:13:58 GMT (envelope-from marcel@freebsd.org) Date: Tue, 14 Nov 2006 23:13:58 GMT Message-Id: <200611142313.kAENDwvZ096714@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 109997 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 23:14:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=109997 Change 109997 by marcel@marcel_nfs on 2006/11/14 23:13:11 IFC @109994 Affected files ... .. //depot/projects/uart/Makefile#9 integrate .. //depot/projects/uart/amd64/amd64/busdma_machdep.c#16 integrate .. //depot/projects/uart/amd64/amd64/db_disasm.c#5 integrate .. //depot/projects/uart/amd64/amd64/db_trace.c#12 integrate .. //depot/projects/uart/amd64/amd64/genassym.c#8 integrate .. //depot/projects/uart/amd64/amd64/intr_machdep.c#10 integrate .. //depot/projects/uart/amd64/amd64/io.c#2 integrate .. //depot/projects/uart/amd64/amd64/io_apic.c#9 integrate .. //depot/projects/uart/amd64/amd64/local_apic.c#12 integrate .. //depot/projects/uart/amd64/amd64/machdep.c#23 integrate .. //depot/projects/uart/amd64/amd64/mp_machdep.c#18 integrate .. //depot/projects/uart/amd64/amd64/mptable_pci.c#4 integrate .. //depot/projects/uart/amd64/amd64/msi.c#1 branch .. //depot/projects/uart/amd64/amd64/nexus.c#9 integrate .. //depot/projects/uart/amd64/amd64/pmap.c#43 integrate .. //depot/projects/uart/amd64/amd64/prof_machdep.c#5 integrate .. //depot/projects/uart/amd64/amd64/support.S#8 integrate .. //depot/projects/uart/amd64/amd64/trap.c#15 integrate .. //depot/projects/uart/amd64/conf/DEFAULTS#5 integrate .. //depot/projects/uart/amd64/conf/GENERIC#25 integrate .. //depot/projects/uart/amd64/conf/GENERIC.hints#3 integrate .. //depot/projects/uart/amd64/conf/NOTES#13 integrate .. //depot/projects/uart/amd64/include/apicvar.h#10 integrate .. //depot/projects/uart/amd64/include/asmacros.h#5 integrate .. //depot/projects/uart/amd64/include/intr_machdep.h#5 integrate .. //depot/projects/uart/amd64/include/pmap.h#13 integrate .. //depot/projects/uart/amd64/include/profile.h#5 integrate .. //depot/projects/uart/amd64/isa/atpic.c#5 integrate .. //depot/projects/uart/amd64/linux32/linux.h#4 integrate .. //depot/projects/uart/amd64/linux32/linux32_dummy.c#5 integrate .. //depot/projects/uart/amd64/linux32/linux32_machdep.c#8 integrate .. //depot/projects/uart/amd64/linux32/linux32_proto.h#11 integrate .. //depot/projects/uart/amd64/linux32/linux32_syscall.h#11 integrate .. //depot/projects/uart/amd64/linux32/linux32_sysent.c#11 integrate .. //depot/projects/uart/amd64/linux32/linux32_sysvec.c#12 integrate .. //depot/projects/uart/amd64/linux32/syscalls.master#11 integrate .. //depot/projects/uart/amd64/pci/pci_bus.c#12 integrate .. //depot/projects/uart/arm/arm/cpufunc.c#8 integrate .. //depot/projects/uart/arm/arm/elf_trampoline.c#8 integrate .. //depot/projects/uart/arm/arm/fusu.S#7 integrate .. //depot/projects/uart/arm/arm/genassym.c#6 integrate .. //depot/projects/uart/arm/arm/identcpu.c#8 integrate .. //depot/projects/uart/arm/arm/intr.c#9 integrate .. //depot/projects/uart/arm/arm/nexus.c#6 integrate .. //depot/projects/uart/arm/arm/nexus_io.c#3 integrate .. //depot/projects/uart/arm/arm/pmap.c#20 integrate .. //depot/projects/uart/arm/arm/trap.c#14 integrate .. //depot/projects/uart/arm/arm/undefined.c#12 integrate .. //depot/projects/uart/arm/arm/vm_machdep.c#14 integrate .. //depot/projects/uart/arm/at91/at91_mci.c#1 branch .. //depot/projects/uart/arm/at91/at91_mcireg.h#1 branch .. //depot/projects/uart/arm/at91/at91_spi.c#3 integrate .. //depot/projects/uart/arm/at91/at91_ssc.c#3 integrate .. //depot/projects/uart/arm/at91/at91_sscreg.h#2 integrate .. //depot/projects/uart/arm/at91/at91_twi.c#5 integrate .. //depot/projects/uart/arm/at91/if_ate.c#8 integrate .. //depot/projects/uart/arm/at91/kb920x_machdep.c#7 integrate .. //depot/projects/uart/arm/at91/std.at91#3 integrate .. //depot/projects/uart/arm/at91/std.kb920x#4 integrate .. //depot/projects/uart/arm/conf/EP80219#2 integrate .. //depot/projects/uart/arm/conf/IQ31244#11 integrate .. //depot/projects/uart/arm/conf/KB920X#6 integrate .. //depot/projects/uart/arm/conf/SIMICS#8 integrate .. //depot/projects/uart/arm/conf/SKYEYE#5 integrate .. //depot/projects/uart/arm/include/armreg.h#5 integrate .. //depot/projects/uart/arm/include/atomic.h#10 integrate .. //depot/projects/uart/arm/include/cpuconf.h#8 integrate .. //depot/projects/uart/arm/include/cpufunc.h#8 integrate .. //depot/projects/uart/arm/include/pmap.h#14 integrate .. //depot/projects/uart/arm/sa11x0/assabet_machdep.c#11 integrate .. //depot/projects/uart/arm/sa11x0/sa11x0.c#4 integrate .. //depot/projects/uart/arm/sa11x0/sa11x0_io.c#6 integrate .. //depot/projects/uart/arm/sa11x0/sa11x0_irqhandler.c#5 integrate .. //depot/projects/uart/arm/sa11x0/sa11x0_ost.c#4 integrate .. //depot/projects/uart/arm/xscale/i80321/ep80219_machdep.c#2 integrate .. //depot/projects/uart/arm/xscale/i80321/iq31244_machdep.c#15 integrate .. //depot/projects/uart/boot/Makefile#10 integrate .. //depot/projects/uart/boot/arm/Makefile#2 integrate .. //depot/projects/uart/boot/arm/at91/Makefile#3 integrate .. //depot/projects/uart/boot/arm/at91/Makefile.inc#4 integrate .. //depot/projects/uart/boot/arm/at91/boot0iic/main.c#3 integrate .. //depot/projects/uart/boot/arm/at91/boot0spi/main.c#3 integrate .. //depot/projects/uart/boot/arm/at91/boot2/Makefile#1 branch .. //depot/projects/uart/boot/arm/at91/boot2/board.h#1 branch .. //depot/projects/uart/boot/arm/at91/boot2/boot2.c#1 branch .. //depot/projects/uart/boot/arm/at91/boot2/kb920x_board.c#1 branch .. //depot/projects/uart/boot/arm/at91/bootiic/Makefile#4 integrate .. //depot/projects/uart/boot/arm/at91/bootiic/env_vars.c#2 integrate .. //depot/projects/uart/boot/arm/at91/bootiic/loader_prompt.c#2 integrate .. //depot/projects/uart/boot/arm/at91/bootspi/Makefile#3 integrate .. //depot/projects/uart/boot/arm/at91/bootspi/arm_init.S#2 integrate .. //depot/projects/uart/boot/arm/at91/bootspi/ee.c#1 branch .. //depot/projects/uart/boot/arm/at91/bootspi/ee.h#1 branch .. //depot/projects/uart/boot/arm/at91/bootspi/env_vars.c#2 integrate .. //depot/projects/uart/boot/arm/at91/bootspi/loader_prompt.c#2 integrate .. //depot/projects/uart/boot/arm/at91/bootspi/main.c#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/Makefile#4 integrate .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200.h#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200_lowlevel.c#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/at91rm9200_lowlevel.h#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/emac.c#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/emac.h#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/emac_init.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/lib.h#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/lib_AT91RM9200.h#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/mci_device.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/mci_device.h#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/memcmp.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/memcpy.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/memset.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/p_string.c#3 integrate .. //depot/projects/uart/boot/arm/at91/libat91/printf.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/putchar.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/sd-card.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/spi_flash.c#2 integrate .. //depot/projects/uart/boot/arm/at91/libat91/strcmp.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/strcpy.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/strcvt.c#1 branch .. //depot/projects/uart/boot/arm/at91/libat91/strlen.c#1 branch .. //depot/projects/uart/boot/common/Makefile.inc#4 integrate .. //depot/projects/uart/boot/common/bootstrap.h#4 integrate .. //depot/projects/uart/boot/common/devopen.c#3 integrate .. //depot/projects/uart/boot/common/help.common#7 integrate .. //depot/projects/uart/boot/common/load_elf.c#6 integrate .. //depot/projects/uart/boot/common/loader.8#11 integrate .. //depot/projects/uart/boot/efi/include/efi.h#2 integrate .. //depot/projects/uart/boot/efi/include/efi_nii.h#2 integrate .. //depot/projects/uart/boot/efi/include/efiapi.h#3 integrate .. //depot/projects/uart/boot/efi/include/eficon.h#2 integrate .. //depot/projects/uart/boot/efi/include/efidebug.h#2 integrate .. //depot/projects/uart/boot/efi/include/efidef.h#2 integrate .. //depot/projects/uart/boot/efi/include/efidevp.h#2 integrate .. //depot/projects/uart/boot/efi/include/efierr.h#2 integrate .. //depot/projects/uart/boot/efi/include/efifs.h#2 integrate .. //depot/projects/uart/boot/efi/include/efilib.h#3 integrate .. //depot/projects/uart/boot/efi/include/efinet.h#2 integrate .. //depot/projects/uart/boot/efi/include/efipart.h#2 integrate .. //depot/projects/uart/boot/efi/include/efiprot.h#2 integrate .. //depot/projects/uart/boot/efi/include/efipxebc.h#2 integrate .. //depot/projects/uart/boot/efi/include/efiser.h#2 integrate .. //depot/projects/uart/boot/efi/include/efistdarg.h#2 integrate .. //depot/projects/uart/boot/efi/include/i386/efibind.h#3 integrate .. //depot/projects/uart/boot/efi/include/i386/pe.h#2 integrate .. //depot/projects/uart/boot/efi/include/ia64/efibind.h#3 integrate .. //depot/projects/uart/boot/efi/include/ia64/pe.h#2 integrate .. //depot/projects/uart/boot/efi/libefi/Makefile#5 integrate .. //depot/projects/uart/boot/efi/libefi/bootinfo.c#6 delete .. //depot/projects/uart/boot/efi/libefi/copy.c#3 delete .. //depot/projects/uart/boot/efi/libefi/devicename.c#3 delete .. //depot/projects/uart/boot/efi/libefi/efiboot.h#4 delete .. //depot/projects/uart/boot/efi/libefi/efifpswa.c#3 delete .. //depot/projects/uart/boot/efi/libefi/efifs.c#3 integrate .. //depot/projects/uart/boot/efi/libefi/efinet.c#3 integrate .. //depot/projects/uart/boot/efi/libefi/elf_freebsd.c#3 delete .. //depot/projects/uart/boot/efi/libefi/errno.c#1 branch .. //depot/projects/uart/boot/efi/libefi/handles.c#1 branch .. //depot/projects/uart/boot/efi/libefi/libefi.c#2 integrate .. //depot/projects/uart/boot/efi/libefi/module.c#2 delete .. //depot/projects/uart/boot/efi/libefi/time.c#3 integrate .. //depot/projects/uart/boot/forth/support.4th#2 integrate .. //depot/projects/uart/boot/i386/boot2/boot2.c#7 integrate .. //depot/projects/uart/boot/i386/libi386/bioscd.c#5 integrate .. //depot/projects/uart/boot/i386/libi386/biosdisk.c#6 integrate .. //depot/projects/uart/boot/i386/libi386/bootinfo32.c#3 integrate .. //depot/projects/uart/boot/i386/libi386/devicename.c#4 integrate .. //depot/projects/uart/boot/i386/libi386/elf32_freebsd.c#4 integrate .. //depot/projects/uart/boot/i386/libi386/elf64_freebsd.c#5 integrate .. //depot/projects/uart/boot/i386/libi386/libi386.h#10 integrate .. //depot/projects/uart/boot/i386/loader/Makefile#7 integrate .. //depot/projects/uart/boot/i386/loader/main.c#9 integrate .. //depot/projects/uart/boot/ia64/Makefile#4 integrate .. //depot/projects/uart/boot/ia64/common/Makefile#1 branch .. //depot/projects/uart/boot/ia64/common/autoload.c#1 branch .. //depot/projects/uart/boot/ia64/common/bootinfo.c#1 branch .. //depot/projects/uart/boot/ia64/common/copy.c#1 branch .. //depot/projects/uart/boot/ia64/common/devicename.c#1 branch .. //depot/projects/uart/boot/ia64/common/exec.c#1 branch .. //depot/projects/uart/boot/ia64/common/libia64.h#1 branch .. //depot/projects/uart/boot/ia64/efi/Makefile#4 integrate .. //depot/projects/uart/boot/ia64/efi/conf.c#3 integrate .. //depot/projects/uart/boot/ia64/efi/efimd.c#2 integrate .. //depot/projects/uart/boot/ia64/efi/main.c#2 integrate .. //depot/projects/uart/boot/ia64/efi/version#2 integrate .. //depot/projects/uart/boot/ia64/ski/Makefile#4 integrate .. //depot/projects/uart/boot/ia64/ski/acpi_stub.c#3 integrate .. //depot/projects/uart/boot/ia64/ski/bootinfo.c#5 delete .. //depot/projects/uart/boot/ia64/ski/copy.c#2 delete .. //depot/projects/uart/boot/ia64/ski/devicename.c#2 delete .. //depot/projects/uart/boot/ia64/ski/efi_stub.c#3 integrate .. //depot/projects/uart/boot/ia64/ski/elf_freebsd.c#3 delete .. //depot/projects/uart/boot/ia64/ski/libski.h#2 integrate .. //depot/projects/uart/boot/ia64/ski/main.c#2 integrate .. //depot/projects/uart/boot/ia64/ski/skifs.c#2 integrate .. //depot/projects/uart/boot/ia64/ski/skimd.c#1 branch .. //depot/projects/uart/boot/ia64/ski/version#2 integrate .. //depot/projects/uart/boot/ofw/common/main.c#3 integrate .. //depot/projects/uart/boot/ofw/libofw/Makefile#3 integrate .. //depot/projects/uart/boot/ofw/libofw/libofw.h#5 integrate .. //depot/projects/uart/boot/ofw/libofw/openfirm.c#5 integrate .. //depot/projects/uart/boot/ofw/libofw/openfirm_mmu.c#1 branch .. //depot/projects/uart/boot/pc98/boot2/boot.c#5 integrate .. //depot/projects/uart/boot/pc98/btx/btx/btx.S#4 integrate .. //depot/projects/uart/boot/pc98/libpc98/bioscd.c#2 integrate .. //depot/projects/uart/boot/pc98/libpc98/biosdisk.c#6 integrate .. //depot/projects/uart/boot/pc98/libpc98/biossmap.c#1 branch .. //depot/projects/uart/boot/pc98/loader/Makefile#7 integrate .. //depot/projects/uart/boot/pc98/loader/main.c#8 integrate .. //depot/projects/uart/boot/sparc64/loader/hcall.S#1 branch .. //depot/projects/uart/boot/sparc64/loader/main.c#5 integrate .. //depot/projects/uart/cam/cam_ccb.h#8 integrate .. //depot/projects/uart/cam/cam_xpt.c#15 integrate .. //depot/projects/uart/cam/scsi/scsi_all.h#5 integrate .. //depot/projects/uart/cam/scsi/scsi_da.c#21 integrate .. //depot/projects/uart/cam/scsi/scsi_low.c#5 integrate .. //depot/projects/uart/coda/coda_vnops.c#12 integrate .. //depot/projects/uart/coda/coda_vnops.h#5 integrate .. //depot/projects/uart/compat/freebsd32/freebsd32_proto.h#18 integrate .. //depot/projects/uart/compat/freebsd32/freebsd32_syscall.h#18 integrate .. //depot/projects/uart/compat/freebsd32/freebsd32_syscalls.c#18 integrate .. //depot/projects/uart/compat/freebsd32/freebsd32_sysent.c#18 integrate .. //depot/projects/uart/compat/freebsd32/syscalls.master#17 integrate .. //depot/projects/uart/compat/linprocfs/linprocfs.c#21 integrate .. //depot/projects/uart/compat/linux/linux_emul.c#2 integrate .. //depot/projects/uart/compat/linux/linux_emul.h#2 integrate .. //depot/projects/uart/compat/linux/linux_file.c#10 integrate .. //depot/projects/uart/compat/linux/linux_getcwd.c#9 integrate .. //depot/projects/uart/compat/linux/linux_ipc.c#9 integrate .. //depot/projects/uart/compat/linux/linux_misc.c#19 integrate .. //depot/projects/uart/compat/linux/linux_misc.h#1 branch .. //depot/projects/uart/compat/linux/linux_signal.c#9 integrate .. //depot/projects/uart/compat/linux/linux_signal.h#2 integrate .. //depot/projects/uart/compat/linux/linux_stats.c#13 integrate .. //depot/projects/uart/compat/linux/linux_uid16.c#5 integrate .. //depot/projects/uart/compat/svr4/svr4_fcntl.c#6 integrate .. //depot/projects/uart/compat/svr4/svr4_misc.c#12 integrate .. //depot/projects/uart/compat/svr4/svr4_proto.h#8 integrate .. //depot/projects/uart/compat/svr4/svr4_syscall.h#8 integrate .. //depot/projects/uart/compat/svr4/svr4_syscallnames.c#8 integrate .. //depot/projects/uart/compat/svr4/svr4_sysent.c#8 integrate .. //depot/projects/uart/conf/NOTES#44 integrate .. //depot/projects/uart/conf/files#76 integrate .. //depot/projects/uart/conf/files.amd64#26 integrate .. //depot/projects/uart/conf/files.arm#8 integrate .. //depot/projects/uart/conf/files.i386#32 integrate .. //depot/projects/uart/conf/files.ia64#20 integrate .. //depot/projects/uart/conf/files.pc98#26 integrate .. //depot/projects/uart/conf/files.powerpc#13 integrate .. //depot/projects/uart/conf/files.sparc64#16 integrate .. //depot/projects/uart/conf/files.sun4v#2 integrate .. //depot/projects/uart/conf/kern.post.mk#17 integrate .. //depot/projects/uart/conf/kern.pre.mk#15 integrate .. //depot/projects/uart/conf/kmod.mk#24 integrate .. //depot/projects/uart/conf/options#42 integrate .. //depot/projects/uart/conf/options.sparc64#7 integrate .. //depot/projects/uart/contrib/altq/altq/altq_cbq.c#3 integrate .. //depot/projects/uart/contrib/altq/altq/altq_cdnr.c#2 integrate .. //depot/projects/uart/contrib/altq/altq/altq_hfsc.c#2 integrate .. //depot/projects/uart/contrib/altq/altq/altq_priq.c#2 integrate .. //depot/projects/uart/contrib/altq/altq/altq_red.c#2 integrate .. //depot/projects/uart/contrib/altq/altq/altq_rio.c#3 integrate .. //depot/projects/uart/contrib/pf/net/if_pfsync.c#9 integrate .. //depot/projects/uart/contrib/pf/net/pf.c#11 integrate .. //depot/projects/uart/crypto/sha2/sha2.c#4 integrate .. //depot/projects/uart/ddb/db_command.c#12 integrate .. //depot/projects/uart/ddb/db_examine.c#3 integrate .. //depot/projects/uart/ddb/db_main.c#3 integrate .. //depot/projects/uart/ddb/db_output.c#8 integrate .. //depot/projects/uart/ddb/db_output.h#4 integrate .. //depot/projects/uart/ddb/db_ps.c#13 integrate .. //depot/projects/uart/dev/aac/aac_cam.c#9 integrate .. //depot/projects/uart/dev/aac/aac_pci.c#14 integrate .. //depot/projects/uart/dev/acpi_support/acpi_aiboost.c#1 branch .. //depot/projects/uart/dev/acpi_support/acpi_sony.c#6 integrate .. //depot/projects/uart/dev/acpica/acpi_pci_link.c#12 integrate .. //depot/projects/uart/dev/acpica/acpi_pcib_acpi.c#11 integrate .. //depot/projects/uart/dev/acpica/acpi_pcib_pci.c#9 integrate .. //depot/projects/uart/dev/advansys/advansys.c#7 integrate .. //depot/projects/uart/dev/advansys/advlib.c#6 integrate .. //depot/projects/uart/dev/advansys/adwcam.c#7 integrate .. //depot/projects/uart/dev/aha/aha.c#8 integrate .. //depot/projects/uart/dev/aha/ahareg.h#5 integrate .. //depot/projects/uart/dev/ahb/ahb.c#8 integrate .. //depot/projects/uart/dev/aic/aic.c#6 integrate .. //depot/projects/uart/dev/aic7xxx/aic79xx_osm.c#8 integrate .. //depot/projects/uart/dev/aic7xxx/aic79xx_osm.h#9 integrate .. //depot/projects/uart/dev/aic7xxx/aic7xxx_osm.c#7 integrate .. //depot/projects/uart/dev/aic7xxx/aic7xxx_osm.h#9 integrate .. //depot/projects/uart/dev/amd/amd.c#10 integrate .. //depot/projects/uart/dev/amr/amr.c#17 integrate .. //depot/projects/uart/dev/amr/amr_cam.c#9 integrate .. //depot/projects/uart/dev/amr/amr_disk.c#9 integrate .. //depot/projects/uart/dev/an/if_an.c#13 integrate .. //depot/projects/uart/dev/arcmsr/arcmsr.c#5 integrate .. //depot/projects/uart/dev/arl/if_arl.c#5 integrate .. //depot/projects/uart/dev/asr/asr.c#13 integrate .. //depot/projects/uart/dev/ata/ata-chipset.c#24 integrate .. //depot/projects/uart/dev/ata/ata-disk.c#16 integrate .. //depot/projects/uart/dev/ata/ata-raid.c#14 integrate .. //depot/projects/uart/dev/ata/atapi-cam.c#12 integrate .. //depot/projects/uart/dev/ata/atapi-cd.c#20 integrate .. //depot/projects/uart/dev/ath/if_athvar.h#23 integrate .. //depot/projects/uart/dev/atkbdc/atkbd.c#6 integrate .. //depot/projects/uart/dev/awi/if_awi_pccard.c#7 integrate .. //depot/projects/uart/dev/bce/if_bce.c#5 integrate .. //depot/projects/uart/dev/bce/if_bcereg.h#6 integrate .. //depot/projects/uart/dev/bge/if_bge.c#31 integrate .. //depot/projects/uart/dev/buslogic/bt.c#8 integrate .. //depot/projects/uart/dev/ce/if_ce.c#3 integrate .. //depot/projects/uart/dev/ciss/ciss.c#18 integrate .. //depot/projects/uart/dev/cnw/if_cnw.c#8 integrate .. //depot/projects/uart/dev/cp/if_cp.c#6 integrate .. //depot/projects/uart/dev/ctau/if_ct.c#7 integrate .. //depot/projects/uart/dev/cx/if_cx.c#6 integrate .. //depot/projects/uart/dev/dc/if_dc.c#9 integrate .. //depot/projects/uart/dev/dcons/dcons_os.c#7 integrate .. //depot/projects/uart/dev/dpt/dpt_scsi.c#9 integrate .. //depot/projects/uart/dev/drm/drmP.h#11 integrate .. //depot/projects/uart/dev/em/if_em.c#25 integrate .. //depot/projects/uart/dev/em/if_em.h#21 integrate .. //depot/projects/uart/dev/em/if_em_hw.c#11 integrate .. //depot/projects/uart/dev/em/if_em_hw.h#8 integrate .. //depot/projects/uart/dev/em/if_em_osdep.h#8 integrate .. //depot/projects/uart/dev/esp/ncr53c9x.c#6 integrate .. //depot/projects/uart/dev/fdc/fdc.c#14 integrate .. //depot/projects/uart/dev/firewire/sbp.c#14 integrate .. //depot/projects/uart/dev/fxp/if_fxp.c#25 integrate .. //depot/projects/uart/dev/hwpmc/hwpmc_mod.c#9 integrate .. //depot/projects/uart/dev/if_ndis/if_ndis.c#10 integrate .. //depot/projects/uart/dev/iir/iir.c#10 integrate .. //depot/projects/uart/dev/ipmi/ipmi.c#5 integrate .. //depot/projects/uart/dev/isp/isp.c#16 integrate .. //depot/projects/uart/dev/isp/isp_freebsd.c#19 integrate .. //depot/projects/uart/dev/isp/isp_freebsd.h#15 integrate .. //depot/projects/uart/dev/isp/isp_library.c#6 integrate .. //depot/projects/uart/dev/isp/isp_library.h#3 integrate .. //depot/projects/uart/dev/isp/isp_pci.c#17 integrate .. //depot/projects/uart/dev/isp/isp_sbus.c#13 integrate .. //depot/projects/uart/dev/isp/isp_stds.h#1 branch .. //depot/projects/uart/dev/isp/isp_target.c#11 integrate .. //depot/projects/uart/dev/isp/isp_target.h#9 integrate .. //depot/projects/uart/dev/isp/isp_tpublic.h#9 integrate .. //depot/projects/uart/dev/isp/ispmbox.h#9 integrate .. //depot/projects/uart/dev/isp/ispreg.h#6 integrate .. //depot/projects/uart/dev/isp/ispvar.h#14 integrate .. //depot/projects/uart/dev/ispfw/asm_2300.h#6 integrate .. //depot/projects/uart/dev/iwi/if_iwi.c#12 integrate .. //depot/projects/uart/dev/iwi/if_iwireg.h#7 integrate .. //depot/projects/uart/dev/kbd/kbd.c#8 integrate .. //depot/projects/uart/dev/lmc/if_lmc.c#8 integrate .. //depot/projects/uart/dev/lmc/if_lmc.h#4 integrate .. //depot/projects/uart/dev/md/md.c#17 integrate .. //depot/projects/uart/dev/mfi/mfi.c#8 integrate .. //depot/projects/uart/dev/mfi/mfi_debug.c#2 integrate .. //depot/projects/uart/dev/mfi/mfi_disk.c#5 integrate .. //depot/projects/uart/dev/mfi/mfi_ioctl.h#3 integrate .. //depot/projects/uart/dev/mfi/mfi_linux.c#2 integrate .. //depot/projects/uart/dev/mfi/mfireg.h#5 integrate .. //depot/projects/uart/dev/mfi/mfivar.h#5 integrate .. //depot/projects/uart/dev/mly/mly.c#10 integrate .. //depot/projects/uart/dev/mmc/bridge.h#1 branch .. //depot/projects/uart/dev/mmc/mmc.c#1 branch .. //depot/projects/uart/dev/mmc/mmcbr_if.m#1 branch .. //depot/projects/uart/dev/mmc/mmcbrvar.h#1 branch .. //depot/projects/uart/dev/mmc/mmcbus_if.m#1 branch .. //depot/projects/uart/dev/mmc/mmcreg.h#1 branch .. //depot/projects/uart/dev/mmc/mmcsd.c#1 branch .. //depot/projects/uart/dev/mmc/mmcvar.h#1 branch .. //depot/projects/uart/dev/mpt/mpt_cam.c#20 integrate .. //depot/projects/uart/dev/mpt/mpt_raid.c#7 integrate .. //depot/projects/uart/dev/mxge/if_mxge.c#5 integrate .. //depot/projects/uart/dev/nfe/if_nfe.c#3 integrate .. //depot/projects/uart/dev/nfe/if_nfereg.h#3 integrate .. //depot/projects/uart/dev/nmdm/nmdm.c#10 integrate .. //depot/projects/uart/dev/null/null.c#7 integrate .. //depot/projects/uart/dev/ofw/ofw_console.c#9 integrate .. //depot/projects/uart/dev/ofw/openfirm.c#6 integrate .. //depot/projects/uart/dev/ofw/openfirm.h#4 integrate .. //depot/projects/uart/dev/pci/pci.c#26 integrate .. //depot/projects/uart/dev/pci/pci_if.m#5 integrate .. //depot/projects/uart/dev/pci/pci_pci.c#10 integrate .. //depot/projects/uart/dev/pci/pci_private.h#9 integrate .. //depot/projects/uart/dev/pci/pcib_if.m#4 integrate .. //depot/projects/uart/dev/pci/pcib_private.h#5 integrate .. //depot/projects/uart/dev/pci/pcireg.h#12 integrate .. //depot/projects/uart/dev/pci/pcivar.h#10 integrate .. //depot/projects/uart/dev/random/randomdev.c#7 integrate .. //depot/projects/uart/dev/ray/if_ray.c#9 integrate .. //depot/projects/uart/dev/sbni/if_sbni.c#8 integrate .. //depot/projects/uart/dev/sbsh/if_sbsh.c#10 integrate .. //depot/projects/uart/dev/si/si.c#7 integrate .. //depot/projects/uart/dev/sk/if_sk.c#12 integrate .. //depot/projects/uart/dev/sk/if_skreg.h#7 integrate .. //depot/projects/uart/dev/sound/midi/sequencer.c#7 integrate .. //depot/projects/uart/dev/sound/pci/hda/hdac.c#2 integrate .. //depot/projects/uart/dev/sound/pcm/dsp.c#15 integrate .. //depot/projects/uart/dev/spibus/spibus.c#2 integrate .. //depot/projects/uart/dev/sym/sym_hipd.c#12 integrate .. //depot/projects/uart/dev/syscons/syscons.c#17 integrate .. //depot/projects/uart/dev/syscons/sysmouse.c#6 integrate .. //depot/projects/uart/dev/trm/trm.c#13 integrate .. //depot/projects/uart/dev/twa/tw_osl_cam.c#5 integrate .. //depot/projects/uart/dev/uart/uart_kbd_sun.c#10 integrate .. //depot/projects/uart/dev/uart/uart_kbd_sun.h#3 integrate .. //depot/projects/uart/dev/ubsec/ubsec.c#15 integrate .. //depot/projects/uart/dev/usb/ehci.c#19 integrate .. //depot/projects/uart/dev/usb/if_axe.c#15 integrate .. //depot/projects/uart/dev/usb/if_udav.c#8 integrate .. //depot/projects/uart/dev/usb/if_ural.c#12 integrate .. //depot/projects/uart/dev/usb/ohci.c#20 integrate .. //depot/projects/uart/dev/usb/ubsa.c#8 integrate .. //depot/projects/uart/dev/usb/uhci.c#19 integrate .. //depot/projects/uart/dev/usb/ukbd.c#10 integrate .. //depot/projects/uart/dev/usb/umass.c#20 integrate .. //depot/projects/uart/dev/usb/usb.c#13 integrate .. //depot/projects/uart/dev/usb/usb_quirks.c#10 integrate .. //depot/projects/uart/dev/usb/usbdevs#27 integrate .. //depot/projects/uart/dev/usb/usbdi.h#9 integrate .. //depot/projects/uart/dev/wi/if_wi.c#19 integrate .. //depot/projects/uart/dev/wl/if_wl.c#9 integrate .. //depot/projects/uart/dev/zs/zs.c#8 integrate .. //depot/projects/uart/fs/devfs/devfs.h#8 integrate .. //depot/projects/uart/fs/devfs/devfs_devs.c#11 integrate .. //depot/projects/uart/fs/devfs/devfs_int.h#3 integrate .. //depot/projects/uart/fs/devfs/devfs_rule.c#8 integrate .. //depot/projects/uart/fs/devfs/devfs_vnops.c#18 integrate .. //depot/projects/uart/fs/hpfs/hpfs_vnops.c#12 integrate .. //depot/projects/uart/fs/msdosfs/denode.h#7 integrate .. //depot/projects/uart/fs/msdosfs/direntry.h#6 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_conv.c#10 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_denode.c#11 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_vfsops.c#17 integrate .. //depot/projects/uart/fs/msdosfs/msdosfs_vnops.c#14 integrate .. //depot/projects/uart/fs/ntfs/ntfs_vnops.c#12 integrate .. //depot/projects/uart/fs/nullfs/null_vnops.c#11 integrate .. //depot/projects/uart/fs/nwfs/nwfs_subr.c#6 integrate .. //depot/projects/uart/fs/procfs/procfs_ioctl.c#5 integrate .. //depot/projects/uart/fs/procfs/procfs_status.c#6 integrate .. //depot/projects/uart/fs/smbfs/smbfs_node.c#9 integrate .. //depot/projects/uart/fs/smbfs/smbfs_smb.c#6 integrate .. //depot/projects/uart/fs/smbfs/smbfs_subr.c#6 integrate .. //depot/projects/uart/fs/smbfs/smbfs_vnops.c#11 integrate .. //depot/projects/uart/fs/udf/udf_vfsops.c#17 integrate .. //depot/projects/uart/fs/umapfs/umap_vfsops.c#9 integrate .. //depot/projects/uart/geom/concat/g_concat.c#7 integrate .. //depot/projects/uart/geom/eli/g_eli.c#11 integrate .. //depot/projects/uart/geom/geom.h#14 integrate .. //depot/projects/uart/geom/geom_disk.c#12 integrate .. //depot/projects/uart/geom/geom_disk.h#5 integrate .. //depot/projects/uart/geom/geom_gpt.c#10 integrate .. //depot/projects/uart/geom/geom_io.c#12 integrate .. //depot/projects/uart/geom/geom_slice.c#7 integrate .. //depot/projects/uart/geom/journal/g_journal.c#1 branch .. //depot/projects/uart/geom/journal/g_journal.h#1 branch .. //depot/projects/uart/geom/journal/g_journal_ufs.c#1 branch .. //depot/projects/uart/geom/mirror/g_mirror.c#19 integrate .. //depot/projects/uart/geom/mirror/g_mirror.h#9 integrate .. //depot/projects/uart/geom/mirror/g_mirror_ctl.c#10 integrate .. //depot/projects/uart/geom/raid3/g_raid3.c#22 integrate .. //depot/projects/uart/geom/raid3/g_raid3.h#9 integrate .. //depot/projects/uart/geom/raid3/g_raid3_ctl.c#11 integrate .. //depot/projects/uart/geom/shsec/g_shsec.c#5 integrate .. //depot/projects/uart/geom/stripe/g_stripe.c#8 integrate .. //depot/projects/uart/gnu/fs/ext2fs/ext2_vfsops.c#6 integrate .. //depot/projects/uart/gnu/fs/ext2fs/ext2_vnops.c#4 integrate .. //depot/projects/uart/gnu/fs/reiserfs/reiserfs_fs.h#3 integrate .. //depot/projects/uart/gnu/fs/reiserfs/reiserfs_vfsops.c#5 integrate .. //depot/projects/uart/gnu/fs/xfs/FreeBSD/xfs_super.c#4 integrate .. //depot/projects/uart/i386/acpica/Makefile#4 integrate .. //depot/projects/uart/i386/conf/DEFAULTS#5 integrate .. //depot/projects/uart/i386/conf/GENERIC#24 integrate .. //depot/projects/uart/i386/conf/NOTES#24 integrate .. //depot/projects/uart/i386/i386/db_trace.c#12 integrate .. //depot/projects/uart/i386/i386/genassym.c#7 integrate .. //depot/projects/uart/i386/i386/identcpu.c#22 integrate .. //depot/projects/uart/i386/i386/intr_machdep.c#8 integrate .. //depot/projects/uart/i386/i386/io.c#2 integrate .. //depot/projects/uart/i386/i386/io_apic.c#10 integrate .. //depot/projects/uart/i386/i386/local_apic.c#13 integrate .. //depot/projects/uart/i386/i386/machdep.c#26 integrate .. //depot/projects/uart/i386/i386/mp_machdep.c#26 integrate .. //depot/projects/uart/i386/i386/mptable_pci.c#4 integrate .. //depot/projects/uart/i386/i386/msi.c#1 branch .. //depot/projects/uart/i386/i386/nexus.c#8 integrate .. //depot/projects/uart/i386/i386/pmap.c#44 integrate .. //depot/projects/uart/i386/i386/support.s#8 integrate .. //depot/projects/uart/i386/i386/sys_machdep.c#17 integrate .. //depot/projects/uart/i386/i386/trap.c#16 integrate .. //depot/projects/uart/i386/i386/vm86.c#5 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_misc.c#11 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_proto.h#9 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_socksys.c#5 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_sysi86.c#4 integrate .. //depot/projects/uart/i386/ibcs2/ibcs2_xenix.h#8 integrate .. //depot/projects/uart/i386/include/apicvar.h#10 integrate .. //depot/projects/uart/i386/include/asmacros.h#4 integrate .. //depot/projects/uart/i386/include/intr_machdep.h#6 integrate .. //depot/projects/uart/i386/include/pmap.h#12 integrate .. //depot/projects/uart/i386/include/profile.h#5 integrate .. //depot/projects/uart/i386/isa/atpic.c#6 integrate .. //depot/projects/uart/i386/isa/prof_machdep.c#5 integrate .. //depot/projects/uart/i386/linux/linux.h#6 integrate .. //depot/projects/uart/i386/linux/linux_dummy.c#7 integrate .. //depot/projects/uart/i386/linux/linux_machdep.c#8 integrate .. //depot/projects/uart/i386/linux/linux_proto.h#13 integrate .. //depot/projects/uart/i386/linux/linux_syscall.h#13 integrate .. //depot/projects/uart/i386/linux/linux_sysent.c#13 integrate .. //depot/projects/uart/i386/linux/syscalls.master#13 integrate .. //depot/projects/uart/i386/pci/pci_bus.c#11 integrate .. //depot/projects/uart/i386/pci/pci_pir.c#7 integrate .. //depot/projects/uart/i4b/driver/i4b_ipr.c#5 integrate .. //depot/projects/uart/ia64/conf/DEFAULTS#6 integrate .. //depot/projects/uart/ia64/conf/GENERIC#16 integrate .. //depot/projects/uart/ia64/conf/NOTES#9 integrate .. //depot/projects/uart/ia64/ia64/busdma_machdep.c#9 integrate .. //depot/projects/uart/ia64/ia64/clock.c#8 integrate .. //depot/projects/uart/ia64/ia64/genassym.c#9 integrate .. //depot/projects/uart/ia64/ia64/machdep.c#27 integrate .. //depot/projects/uart/ia64/ia64/nexus.c#9 integrate .. //depot/projects/uart/ia64/ia64/pmap.c#26 integrate .. //depot/projects/uart/ia64/ia64/ssc.c#7 integrate .. //depot/projects/uart/ia64/ia64/support.S#6 integrate .. //depot/projects/uart/ia64/ia64/trap.c#19 integrate .. //depot/projects/uart/ia64/include/pmap.h#8 integrate .. //depot/projects/uart/isofs/cd9660/cd9660_vfsops.c#16 integrate .. //depot/projects/uart/kern/Make.tags.inc#2 integrate .. //depot/projects/uart/kern/init_main.c#17 integrate .. //depot/projects/uart/kern/init_sysent.c#20 integrate .. //depot/projects/uart/kern/kern_acct.c#12 integrate .. //depot/projects/uart/kern/kern_acl.c#6 integrate .. //depot/projects/uart/kern/kern_alq.c#8 integrate .. //depot/projects/uart/kern/kern_clock.c#12 integrate .. //depot/projects/uart/kern/kern_conf.c#12 integrate .. //depot/projects/uart/kern/kern_descrip.c#26 integrate .. //depot/projects/uart/kern/kern_environment.c#11 integrate .. //depot/projects/uart/kern/kern_exec.c#21 integrate .. //depot/projects/uart/kern/kern_exit.c#18 integrate .. //depot/projects/uart/kern/kern_fork.c#18 integrate .. //depot/projects/uart/kern/kern_idle.c#6 integrate .. //depot/projects/uart/kern/kern_intr.c#13 integrate .. //depot/projects/uart/kern/kern_jail.c#9 integrate .. //depot/projects/uart/kern/kern_kse.c#12 integrate .. //depot/projects/uart/kern/kern_ktrace.c#14 integrate .. //depot/projects/uart/kern/kern_linker.c#12 integrate .. //depot/projects/uart/kern/kern_lock.c#14 integrate .. //depot/projects/uart/kern/kern_mac.c#15 integrate .. //depot/projects/uart/kern/kern_malloc.c#15 integrate .. //depot/projects/uart/kern/kern_mbuf.c#13 integrate .. //depot/projects/uart/kern/kern_mutex.c#17 integrate .. //depot/projects/uart/kern/kern_ntptime.c#6 integrate .. //depot/projects/uart/kern/kern_poll.c#8 integrate .. //depot/projects/uart/kern/kern_priv.c#1 branch .. //depot/projects/uart/kern/kern_proc.c#17 integrate .. //depot/projects/uart/kern/kern_prot.c#14 integrate .. //depot/projects/uart/kern/kern_resource.c#12 integrate .. //depot/projects/uart/kern/kern_rwlock.c#7 integrate .. //depot/projects/uart/kern/kern_shutdown.c#10 integrate .. //depot/projects/uart/kern/kern_sig.c#32 integrate .. //depot/projects/uart/kern/kern_subr.c#8 integrate .. //depot/projects/uart/kern/kern_switch.c#13 integrate .. //depot/projects/uart/kern/kern_sx.c#9 integrate .. //depot/projects/uart/kern/kern_synch.c#18 integrate .. //depot/projects/uart/kern/kern_sysctl.c#10 integrate .. //depot/projects/uart/kern/kern_thr.c#15 integrate .. //depot/projects/uart/kern/kern_thread.c#24 integrate .. //depot/projects/uart/kern/kern_time.c#10 integrate .. //depot/projects/uart/kern/kern_timeout.c#9 integrate .. //depot/projects/uart/kern/kern_umtx.c#16 integrate .. //depot/projects/uart/kern/kern_xxx.c#6 integrate .. //depot/projects/uart/kern/ksched.c#1 branch .. //depot/projects/uart/kern/link_elf.c#10 integrate .. //depot/projects/uart/kern/link_elf_obj.c#5 integrate .. //depot/projects/uart/kern/makesyscalls.sh#6 integrate .. //depot/projects/uart/kern/p1003_1b.c#1 branch .. //depot/projects/uart/kern/posix4_mib.c#1 branch .. //depot/projects/uart/kern/sched_4bsd.c#16 integrate .. //depot/projects/uart/kern/sched_ule.c#20 integrate .. //depot/projects/uart/kern/subr_acl_posix1e.c#3 integrate .. //depot/projects/uart/kern/subr_disk.c#8 integrate .. //depot/projects/uart/kern/subr_fattime.c#1 branch .. //depot/projects/uart/kern/subr_firmware.c#5 integrate .. //depot/projects/uart/kern/subr_lock.c#2 integrate .. //depot/projects/uart/kern/subr_prf.c#12 integrate .. //depot/projects/uart/kern/subr_trap.c#10 integrate .. //depot/projects/uart/kern/subr_witness.c#18 integrate .. //depot/projects/uart/kern/sys_generic.c#15 integrate .. //depot/projects/uart/kern/sys_pipe.c#21 integrate .. //depot/projects/uart/kern/sys_process.c#16 integrate .. //depot/projects/uart/kern/sys_socket.c#9 integrate .. //depot/projects/uart/kern/syscalls.c#20 integrate .. //depot/projects/uart/kern/syscalls.master#21 integrate .. //depot/projects/uart/kern/systrace_args.c#2 integrate .. //depot/projects/uart/kern/sysv_ipc.c#4 integrate .. //depot/projects/uart/kern/sysv_msg.c#10 integrate .. //depot/projects/uart/kern/sysv_sem.c#14 integrate .. //depot/projects/uart/kern/sysv_shm.c#14 integrate .. //depot/projects/uart/kern/tty.c#13 integrate .. //depot/projects/uart/kern/tty_cons.c#10 integrate .. //depot/projects/uart/kern/tty_pts.c#5 integrate .. //depot/projects/uart/kern/tty_pty.c#11 integrate .. //depot/projects/uart/kern/uipc_mbuf.c#15 integrate .. //depot/projects/uart/kern/uipc_mbuf2.c#6 integrate .. //depot/projects/uart/kern/uipc_mqueue.c#7 integrate .. //depot/projects/uart/kern/uipc_sem.c#10 integrate .. //depot/projects/uart/kern/uipc_socket.c#23 integrate .. //depot/projects/uart/kern/uipc_syscalls.c#24 integrate .. //depot/projects/uart/kern/uipc_usrreq.c#18 integrate .. //depot/projects/uart/kern/vfs_aio.c#18 integrate .. //depot/projects/uart/kern/vfs_bio.c#26 integrate .. //depot/projects/uart/kern/vfs_cluster.c#17 integrate .. //depot/projects/uart/kern/vfs_default.c#18 integrate .. //depot/projects/uart/kern/vfs_lookup.c#15 integrate .. //depot/projects/uart/kern/vfs_mount.c#29 integrate .. //depot/projects/uart/kern/vfs_subr.c#36 integrate .. //depot/projects/uart/kern/vfs_syscalls.c#29 integrate .. //depot/projects/uart/kern/vfs_vnops.c#21 integrate .. //depot/projects/uart/kern/vnode_if.src#14 integrate .. //depot/projects/uart/modules/Makefile#42 integrate .. //depot/projects/uart/modules/acpi/Makefile#13 integrate .. //depot/projects/uart/modules/acpi/acpi_aiboost/Makefile#1 branch .. //depot/projects/uart/modules/aio/Makefile#2 integrate .. //depot/projects/uart/modules/ath_rate_amrr/Makefile#4 integrate .. //depot/projects/uart/modules/bge/Makefile#4 integrate .. //depot/projects/uart/modules/geom/Makefile#6 integrate .. //depot/projects/uart/modules/geom/geom_journal/Makefile#1 branch .. //depot/projects/uart/modules/if_ppp/Makefile#7 integrate .. //depot/projects/uart/modules/linux/Makefile#9 integrate .. //depot/projects/uart/modules/mem/Makefile#3 integrate .. //depot/projects/uart/modules/mmc/Makefile#1 branch .. //depot/projects/uart/modules/mmcsd/Makefile#1 branch .. //depot/projects/uart/modules/nfe/Makefile#2 integrate .. //depot/projects/uart/modules/powermac_nvram/Makefile#2 integrate .. //depot/projects/uart/modules/uart/Makefile#16 integrate .. //depot/projects/uart/modules/ufs/Makefile#3 integrate .. //depot/projects/uart/net/bpf.c#19 integrate .. //depot/projects/uart/net/bridgestp.c#8 integrate .. //depot/projects/uart/net/bridgestp.h#3 integrate .. //depot/projects/uart/net/bsd_comp.c#5 integrate .. //depot/projects/uart/net/if.c#24 integrate .. //depot/projects/uart/net/if_atmsubr.c#8 integrate .. //depot/projects/uart/net/if_bridge.c#14 integrate .. //depot/projects/uart/net/if_bridgevar.h#8 integrate .. //depot/projects/uart/net/if_ethersubr.c#18 integrate .. //depot/projects/uart/net/if_fddisubr.c#8 integrate .. //depot/projects/uart/net/if_fwsubr.c#9 integrate .. //depot/projects/uart/net/if_gif.c#12 integrate .. //depot/projects/uart/net/if_gre.c#12 integrate .. //depot/projects/uart/net/if_iso88025subr.c#8 integrate .. //depot/projects/uart/net/if_ppp.c#10 integrate .. //depot/projects/uart/net/if_pppvar.h#5 integrate .. //depot/projects/uart/net/if_sl.c#8 integrate .. //depot/projects/uart/net/if_stf.c#13 integrate .. //depot/projects/uart/net/if_tap.c#13 integrate .. //depot/projects/uart/net/if_tun.c#11 integrate .. //depot/projects/uart/net/if_vlan.c#19 integrate .. //depot/projects/uart/net/ppp_tty.c#7 integrate .. //depot/projects/uart/net/raw_usrreq.c#10 integrate .. //depot/projects/uart/net/rtsock.c#14 integrate .. //depot/projects/uart/net80211/ieee80211_ioctl.c#19 integrate .. //depot/projects/uart/netatalk/aarp.c#8 integrate .. //depot/projects/uart/netatalk/at_control.c#5 integrate .. //depot/projects/uart/netatalk/ddp_input.c#4 integrate .. //depot/projects/uart/netatalk/ddp_output.c#7 integrate .. //depot/projects/uart/netatalk/ddp_pcb.c#5 integrate .. //depot/projects/uart/netatm/atm_usrreq.c#9 integrate .. //depot/projects/uart/netgraph/bluetooth/drivers/h4/ng_h4.c#7 integrate .. //depot/projects/uart/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c#9 integrate .. //depot/projects/uart/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c#8 integrate .. //depot/projects/uart/netgraph/netflow/netflow.c#10 integrate .. //depot/projects/uart/netgraph/netflow/ng_netflow.c#7 integrate .. //depot/projects/uart/netgraph/netgraph.h#11 integrate .. //depot/projects/uart/netgraph/ng_base.c#14 integrate .. //depot/projects/uart/netgraph/ng_device.c#9 integrate .. //depot/projects/uart/netgraph/ng_message.h#7 integrate .. //depot/projects/uart/netgraph/ng_nat.c#3 integrate .. //depot/projects/uart/netgraph/ng_socket.c#14 integrate .. //depot/projects/uart/netgraph/ng_socket.h#4 integrate .. //depot/projects/uart/netgraph/ng_tty.c#6 integrate .. //depot/projects/uart/netinet/if_ether.c#16 integrate .. //depot/projects/uart/netinet/igmp.c#9 integrate .. //depot/projects/uart/netinet/in.c#12 integrate .. //depot/projects/uart/netinet/in_pcb.c#22 integrate .. //depot/projects/uart/netinet/in_proto.c#10 integrate .. //depot/projects/uart/netinet/ip_carp.c#9 integrate .. //depot/projects/uart/netinet/ip_divert.c#15 integrate .. //depot/projects/uart/netinet/ip_dummynet.c#17 integrate .. //depot/projects/uart/netinet/ip_fw2.c#28 integrate .. //depot/projects/uart/netinet/ip_fw_pfil.c#8 integrate .. //depot/projects/uart/netinet/ip_icmp.c#11 integrate .. //depot/projects/uart/netinet/ip_input.c#19 integrate .. //depot/projects/uart/netinet/ip_mroute.c#13 integrate .. //depot/projects/uart/netinet/ip_options.c#2 integrate .. //depot/projects/uart/netinet/ip_output.c#19 integrate .. //depot/projects/uart/netinet/libalias/alias_smedia.c#4 integrate .. //depot/projects/uart/netinet/libalias/libalias.3#5 integrate .. //depot/projects/uart/netinet/raw_ip.c#19 integrate .. //depot/projects/uart/netinet/sctp.h#1 branch .. //depot/projects/uart/netinet/sctp_asconf.c#1 branch .. //depot/projects/uart/netinet/sctp_asconf.h#1 branch .. //depot/projects/uart/netinet/sctp_auth.c#1 branch .. //depot/projects/uart/netinet/sctp_auth.h#1 branch .. //depot/projects/uart/netinet/sctp_bsd_addr.c#1 branch .. //depot/projects/uart/netinet/sctp_bsd_addr.h#1 branch .. //depot/projects/uart/netinet/sctp_constants.h#1 branch .. //depot/projects/uart/netinet/sctp_crc32.c#1 branch .. //depot/projects/uart/netinet/sctp_crc32.h#1 branch .. //depot/projects/uart/netinet/sctp_header.h#1 branch .. //depot/projects/uart/netinet/sctp_indata.c#1 branch .. //depot/projects/uart/netinet/sctp_indata.h#1 branch .. //depot/projects/uart/netinet/sctp_input.c#1 branch .. //depot/projects/uart/netinet/sctp_input.h#1 branch .. //depot/projects/uart/netinet/sctp_lock_bsd.h#1 branch .. //depot/projects/uart/netinet/sctp_os.h#1 branch .. //depot/projects/uart/netinet/sctp_os_bsd.h#1 branch .. //depot/projects/uart/netinet/sctp_output.c#1 branch .. //depot/projects/uart/netinet/sctp_output.h#1 branch .. //depot/projects/uart/netinet/sctp_pcb.c#1 branch .. //depot/projects/uart/netinet/sctp_pcb.h#1 branch .. //depot/projects/uart/netinet/sctp_peeloff.c#1 branch .. //depot/projects/uart/netinet/sctp_peeloff.h#1 branch .. //depot/projects/uart/netinet/sctp_structs.h#1 branch .. //depot/projects/uart/netinet/sctp_timer.c#1 branch .. //depot/projects/uart/netinet/sctp_timer.h#1 branch .. //depot/projects/uart/netinet/sctp_uio.h#1 branch .. //depot/projects/uart/netinet/sctp_usrreq.c#1 branch .. //depot/projects/uart/netinet/sctp_var.h#1 branch .. //depot/projects/uart/netinet/sctputil.c#1 branch .. //depot/projects/uart/netinet/sctputil.h#1 branch .. //depot/projects/uart/netinet/tcp_input.c#27 integrate .. //depot/projects/uart/netinet/tcp_output.c#11 integrate .. //depot/projects/uart/netinet/tcp_subr.c#24 integrate .. //depot/projects/uart/netinet/tcp_syncache.c#19 integrate .. //depot/projects/uart/netinet/udp_usrreq.c#22 integrate .. //depot/projects/uart/netinet6/in6.c#14 integrate .. //depot/projects/uart/netinet6/in6_ifattach.c#12 integrate .. //depot/projects/uart/netinet6/in6_pcb.c#16 integrate .. //depot/projects/uart/netinet6/in6_proto.c#10 integrate .. //depot/projects/uart/netinet6/in6_src.c#12 integrate .. //depot/projects/uart/netinet6/ipsec.c#12 integrate .. //depot/projects/uart/netinet6/nd6.c#15 integrate .. //depot/projects/uart/netinet6/sctp6_usrreq.c#1 branch .. //depot/projects/uart/netinet6/sctp6_var.h#1 branch .. //depot/projects/uart/netinet6/udp6_usrreq.c#16 integrate .. //depot/projects/uart/netipsec/ipsec.c#13 integrate .. //depot/projects/uart/netipsec/ipsec_osdep.h#4 integrate .. //depot/projects/uart/netipx/ipx_pcb.c#6 integrate .. //depot/projects/uart/netipx/ipx_usrreq.c#10 integrate .. //depot/projects/uart/netncp/ncp_conn.c#6 integrate .. //depot/projects/uart/netncp/ncp_mod.c#5 integrate .. //depot/projects/uart/netncp/ncp_subr.h#3 integrate .. //depot/projects/uart/netsmb/smb_conn.c#8 integrate .. //depot/projects/uart/netsmb/smb_subr.c#5 integrate .. //depot/projects/uart/netsmb/smb_subr.h#5 integrate .. //depot/projects/uart/nfsclient/bootp_subr.c#10 integrate .. //depot/projects/uart/nfsclient/nfs.h#9 integrate .. //depot/projects/uart/nfsclient/nfs_socket.c#16 integrate .. //depot/projects/uart/nfsclient/nfs_vnops.c#19 integrate .. //depot/projects/uart/nfsserver/nfs_serv.c#13 integrate .. //depot/projects/uart/nfsserver/nfs_srvsock.c#11 integrate .. //depot/projects/uart/nfsserver/nfs_syscalls.c#10 integrate .. //depot/projects/uart/pc98/cbus/fdc.c#7 integrate .. //depot/projects/uart/pc98/conf/DEFAULTS#5 integrate .. //depot/projects/uart/pc98/conf/GENERIC#19 integrate .. //depot/projects/uart/pc98/conf/NOTES#20 integrate .. //depot/projects/uart/pc98/pc98/machdep.c#12 integrate .. //depot/projects/uart/pci/agp.c#7 integrate .. //depot/projects/uart/pci/agp_amd64.c#8 integrate .. //depot/projects/uart/pci/if_pcn.c#12 integrate .. //depot/projects/uart/pci/if_pcnreg.h#6 integrate .. //depot/projects/uart/pci/if_sis.c#19 integrate .. //depot/projects/uart/pci/ncr.c#10 integrate .. //depot/projects/uart/pci/nfsmb.c#4 integrate .. //depot/projects/uart/posix4/_semaphore.h#5 delete .. //depot/projects/uart/posix4/ksched.c#8 delete .. //depot/projects/uart/posix4/ksem.h#2 delete .. //depot/projects/uart/posix4/p1003_1b.c#7 delete .. //depot/projects/uart/posix4/posix4.h#3 delete .. //depot/projects/uart/posix4/posix4_mib.c#3 delete .. //depot/projects/uart/posix4/sched.h#2 delete .. //depot/projects/uart/posix4/semaphore.h#3 delete .. //depot/projects/uart/powerpc/conf/DEFAULTS#3 integrate .. //depot/projects/uart/powerpc/conf/GENERIC#14 integrate .. //depot/projects/uart/powerpc/conf/NOTES#4 integrate .. //depot/projects/uart/powerpc/powerpc/copyinout.c#5 integrate .. //depot/projects/uart/powerpc/powerpc/db_interface.c#3 integrate .. //depot/projects/uart/powerpc/powerpc/genassym.c#5 integrate .. //depot/projects/uart/powerpc/powerpc/machdep.c#15 integrate .. //depot/projects/uart/powerpc/powerpc/mmu_oea.c#7 integrate .. //depot/projects/uart/powerpc/powerpc/pmap_dispatch.c#6 integrate .. //depot/projects/uart/powerpc/powerpc/trap.c#11 integrate .. //depot/projects/uart/security/audit/audit.c#7 integrate .. //depot/projects/uart/security/audit/audit_arg.c#6 integrate .. //depot/projects/uart/security/audit/audit_pipe.c#6 integrate .. //depot/projects/uart/security/audit/audit_private.h#6 integrate .. //depot/projects/uart/security/audit/audit_syscalls.c#5 integrate .. //depot/projects/uart/security/mac/mac_framework.h#2 integrate .. //depot/projects/uart/security/mac/mac_inet.c#3 integrate .. //depot/projects/uart/security/mac/mac_internal.h#3 integrate .. //depot/projects/uart/security/mac/mac_label.c#2 integrate .. //depot/projects/uart/security/mac/mac_net.c#4 integrate .. //depot/projects/uart/security/mac/mac_pipe.c#3 integrate .. //depot/projects/uart/security/mac/mac_posix_sem.c#3 integrate .. //depot/projects/uart/security/mac/mac_priv.c#1 branch .. //depot/projects/uart/security/mac/mac_process.c#6 integrate .. //depot/projects/uart/security/mac/mac_socket.c#5 integrate .. //depot/projects/uart/security/mac/mac_system.c#3 integrate .. //depot/projects/uart/security/mac/mac_sysv_msg.c#4 integrate .. //depot/projects/uart/security/mac/mac_sysv_sem.c#4 integrate .. //depot/projects/uart/security/mac/mac_sysv_shm.c#3 integrate .. //depot/projects/uart/security/mac/mac_vfs.c#9 integrate .. //depot/projects/uart/security/mac_biba/mac_biba.c#12 integrate .. //depot/projects/uart/security/mac_bsdextended/mac_bsdextended.c#10 integrate .. //depot/projects/uart/security/mac_lomac/mac_lomac.c#10 integrate .. //depot/projects/uart/security/mac_mls/mac_mls.c#10 integrate .. //depot/projects/uart/security/mac_partition/mac_partition.c#4 integrate .. //depot/projects/uart/security/mac_portacl/mac_portacl.c#5 integrate .. //depot/projects/uart/security/mac_seeotheruids/mac_seeotheruids.c#5 integrate .. //depot/projects/uart/security/mac_stub/mac_stub.c#7 integrate .. //depot/projects/uart/security/mac_test/mac_test.c#11 integrate .. //depot/projects/uart/sparc64/conf/DEFAULTS#4 integrate .. //depot/projects/uart/sparc64/conf/GENERIC#25 integrate .. //depot/projects/uart/sparc64/conf/NOTES#13 integrate .. //depot/projects/uart/sparc64/include/asi.h#3 integrate .. //depot/projects/uart/sparc64/include/endian.h#5 integrate .. //depot/projects/uart/sparc64/pci/ofw_pcib.c#6 integrate .. //depot/projects/uart/sparc64/pci/ofw_pcib_subr.c#5 integrate .. //depot/projects/uart/sparc64/pci/ofw_pcibus.c#8 integrate .. //depot/projects/uart/sparc64/sparc64/db_interface.c#3 integrate .. //depot/projects/uart/sparc64/sparc64/genassym.c#9 integrate .. //depot/projects/uart/sparc64/sparc64/machdep.c#17 integrate .. //depot/projects/uart/sparc64/sparc64/pmap.c#25 integrate .. //depot/projects/uart/sparc64/sparc64/support.S#5 integrate .. //depot/projects/uart/sparc64/sparc64/trap.c#15 integrate .. //depot/projects/uart/sun4v/conf/DEFAULTS#2 integrate .. //depot/projects/uart/sun4v/conf/GENERIC#2 integrate .. //depot/projects/uart/sun4v/conf/NOTES#2 integrate .. //depot/projects/uart/sun4v/include/asi.h#2 integrate .. //depot/projects/uart/sun4v/include/cpufunc.h#2 integrate .. //depot/projects/uart/sun4v/include/elf.h#2 integrate .. //depot/projects/uart/sun4v/include/endian.h#2 integrate .. //depot/projects/uart/sun4v/include/hypervisor_api.h#2 integrate .. //depot/projects/uart/sun4v/include/hypervisorvar.h#2 integrate .. //depot/projects/uart/sun4v/include/pmap.h#2 integrate .. //depot/projects/uart/sun4v/include/trap.h#2 integrate .. //depot/projects/uart/sun4v/include/tte.h#2 integrate .. //depot/projects/uart/sun4v/include/utrap.h#2 integrate .. //depot/projects/uart/sun4v/sun4v/exception.S#2 integrate .. //depot/projects/uart/sun4v/sun4v/fpemu.c#2 delete .. //depot/projects/uart/sun4v/sun4v/genassym.c#2 delete .. //depot/projects/uart/sun4v/sun4v/hcall.S#2 integrate .. //depot/projects/uart/sun4v/sun4v/hvcons.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/interrupt.S#2 integrate .. //depot/projects/uart/sun4v/sun4v/intr_machdep.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/machdep.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/pmap.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/rtc.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/support.S#2 integrate .. //depot/projects/uart/sun4v/sun4v/t1_copy.S#2 integrate .. //depot/projects/uart/sun4v/sun4v/trap.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/tsb.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/vnex.c#2 integrate .. //depot/projects/uart/sun4v/sun4v/wbuf.S#2 integrate .. //depot/projects/uart/sys/_lock.h#5 integrate .. //depot/projects/uart/sys/_mutex.h#3 integrate .. //depot/projects/uart/sys/_semaphore.h#1 branch .. //depot/projects/uart/sys/bio.h#8 integrate .. //depot/projects/uart/sys/clock.h#4 integrate .. //depot/projects/uart/sys/conf.h#14 integrate .. //depot/projects/uart/sys/cons.h#8 integrate .. //depot/projects/uart/sys/elf32.h#4 integrate .. //depot/projects/uart/sys/elf64.h#5 integrate .. //depot/projects/uart/sys/elf_common.h#6 integrate .. //depot/projects/uart/sys/jail.h#7 integrate .. //depot/projects/uart/sys/ksem.h#1 branch .. //depot/projects/uart/sys/libkern.h#9 integrate .. //depot/projects/uart/sys/lock.h#9 integrate .. //depot/projects/uart/sys/lock_profile.h#1 branch .. //depot/projects/uart/sys/lockmgr.h#9 integrate .. //depot/projects/uart/sys/mac.h#13 integrate .. //depot/projects/uart/sys/mac_policy.h#12 integrate .. //depot/projects/uart/sys/mbuf.h#15 integrate .. //depot/projects/uart/sys/mount.h#19 integrate .. //depot/projects/uart/sys/mutex.h#14 integrate .. //depot/projects/uart/sys/param.h#29 integrate .. //depot/projects/uart/sys/pcpu.h#6 integrate .. //depot/projects/uart/sys/posix4.h#1 branch .. //depot/projects/uart/sys/priv.h#1 branch .. //depot/projects/uart/sys/proc.h#25 integrate .. //depot/projects/uart/sys/queue.h#10 integrate .. //depot/projects/uart/sys/rtprio.h#4 integrate .. //depot/projects/uart/sys/rwlock.h#5 integrate .. //depot/projects/uart/sys/sched.h#8 integrate .. //depot/projects/uart/sys/sem.h#4 integrate .. //depot/projects/uart/sys/semaphore.h#1 branch .. //depot/projects/uart/sys/socket.h#8 integrate .. //depot/projects/uart/sys/soundcard.h#7 integrate .. //depot/projects/uart/sys/syscall.h#19 integrate .. //depot/projects/uart/sys/syscall.mk#19 integrate .. //depot/projects/uart/sys/sysproto.h#20 integrate .. //depot/projects/uart/sys/systm.h#18 integrate .. //depot/projects/uart/sys/thr.h#8 integrate .. //depot/projects/uart/sys/umtx.h#10 integrate .. //depot/projects/uart/sys/vnode.h#19 integrate .. //depot/projects/uart/ufs/ffs/ffs_alloc.c#10 integrate .. //depot/projects/uart/ufs/ffs/ffs_extern.h#10 integrate .. //depot/projects/uart/ufs/ffs/ffs_inode.c#8 integrate .. //depot/projects/uart/ufs/ffs/ffs_snapshot.c#18 integrate .. //depot/projects/uart/ufs/ffs/ffs_softdep.c#22 integrate .. //depot/projects/uart/ufs/ffs/ffs_vfsops.c#28 integrate .. //depot/projects/uart/ufs/ffs/ffs_vnops.c#15 integrate .. //depot/projects/uart/ufs/ffs/fs.h#6 integrate .. //depot/projects/uart/ufs/ufs/gjournal.h#1 branch .. //depot/projects/uart/ufs/ufs/inode.h#8 integrate .. //depot/projects/uart/ufs/ufs/ufs_extattr.c#11 integrate .. //depot/projects/uart/ufs/ufs/ufs_gjournal.c#1 branch .. //depot/projects/uart/ufs/ufs/ufs_inode.c#11 integrate .. //depot/projects/uart/ufs/ufs/ufs_quota.c#13 integrate .. //depot/projects/uart/ufs/ufs/ufs_vnops.c#18 integrate .. //depot/projects/uart/vm/device_pager.c#8 integrate .. //depot/projects/uart/vm/phys_pager.c#5 integrate .. //depot/projects/uart/vm/swap_pager.c#25 integrate .. //depot/projects/uart/vm/uma_core.c#24 integrate .. //depot/projects/uart/vm/vm_contig.c#18 integrate .. //depot/projects/uart/vm/vm_fault.c#19 integrate .. //depot/projects/uart/vm/vm_glue.c#15 integrate .. //depot/projects/uart/vm/vm_kern.c#10 integrate .. //depot/projects/uart/vm/vm_map.c#24 integrate .. //depot/projects/uart/vm/vm_mmap.c#16 integrate .. //depot/projects/uart/vm/vm_object.c#24 integrate .. //depot/projects/uart/vm/vm_page.c#25 integrate .. //depot/projects/uart/vm/vm_page.h#10 integrate .. //depot/projects/uart/vm/vm_pageout.c#21 integrate .. //depot/projects/uart/vm/vm_zeroidle.c#11 integrate .. //depot/projects/uart/vm/vnode_pager.c#20 integrate Differences ... ==== //depot/projects/uart/Makefile#9 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/Makefile,v 1.38 2006/08/10 06:29:43 imp Exp $ +# $FreeBSD: src/sys/Makefile,v 1.39 2006/11/11 16:26:55 trhodes Exp $ .include @@ -11,7 +11,7 @@ CSCOPEDIRS= coda compat conf contrib crypto ddb dev fs geom gnu i4b isa \ isofs kern libkern modules net net80211 netatalk netatm \ netgraph netinet netinet6 netipx netkey netnatm netncp \ - netsmb nfs nfsclient nfs4client rpc pccard pci posix4 sys \ + netsmb nfs nfsclient nfs4client rpc pccard pci sys \ ufs vm ${ARCHDIR} ARCHDIR ?= ${MACHINE} ==== //depot/projects/uart/amd64/amd64/busdma_machdep.c#16 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.77 2006/06/01 04:49:29 silby Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/busdma_machdep.c,v 1.78 2006/10/15 16:52:59 hrs Exp $"); #include #include @@ -520,7 +520,7 @@ __func__, dmat, dmat->flags, ENOMEM); return (ENOMEM); } else if ((uintptr_t)*vaddr & (dmat->alignment - 1)) { - printf("bus_dmamem_alloc failed to align memory properly."); + printf("bus_dmamem_alloc failed to align memory properly.\n"); } CTR4(KTR_BUSDMA, "%s: tag %p tag flags 0x%x error %d", __func__, dmat, dmat->flags, ENOMEM); ==== //depot/projects/uart/amd64/amd64/db_disasm.c#5 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.30 2005/03/30 22:57:41 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.31 2006/11/13 21:14:54 jhb Exp $"); /* * Instruction disassembler. @@ -84,6 +84,7 @@ #define Ib 21 /* byte immediate, unsigned */ #define Ibs 22 /* byte immediate, signed */ #define Iw 23 /* word immediate, unsigned */ +#define Ilq 24 /* long/quad immediate, unsigned */ #define O 25 /* direct address */ #define Db 26 /* byte displacement from EIP */ #define Dl 27 /* long displacement from EIP */ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Nov 15 05:18:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6C6AA16A415; Wed, 15 Nov 2006 05:18:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2065616A403 for ; Wed, 15 Nov 2006 05:18:00 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E199A43D49 for ; Wed, 15 Nov 2006 05:17:59 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAF5HxII076730 for ; Wed, 15 Nov 2006 05:17:59 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAF5HxTM076727 for perforce@freebsd.org; Wed, 15 Nov 2006 05:17:59 GMT (envelope-from mjacob@freebsd.org) Date: Wed, 15 Nov 2006 05:17:59 GMT Message-Id: <200611150517.kAF5HxTM076727@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110003 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 05:18:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=110003 Change 110003 by mjacob@newisp on 2006/11/15 05:17:26 A slight bit more cleanup on printouts. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#33 edit .. //depot/projects/newisp/dev/isp/isp_library.c#18 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#33 (text+ko) ==== @@ -2231,9 +2231,8 @@ } mbs.param[2] = portid >> 16; mbs.param[3] = portid; - mbs.logval = MBLOGNONE; - mbs.timeout = 250000; + mbs.timeout = 500000; isp_mboxcmd(isp, &mbs); switch (mbs.param[0]) { @@ -2286,6 +2285,7 @@ mbs.param[1] = handle << 8; } mbs.logval = MBLOGNONE; + mbs.timeout = 100000; isp_mboxcmd(isp, &mbs); } @@ -2314,6 +2314,7 @@ mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); + mbs.timeout = 250000; mbs.logval = MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR; if (dolock) { FC_SCRATCH_ACQUIRE(isp); @@ -2368,7 +2369,6 @@ } } mbs.logval = MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR; - mbs.timeout = 30000; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return (wwn); @@ -2928,7 +2928,13 @@ * which shift on a loop. */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - isp_prt(isp, ISP_LOGWARN, "bad pdb @ loop %d", handle); + int a, b, c; + a = (tmp.node_wwn == 0); + b = (tmp.port_wwn == 0); + c = (tmp.portid == 0); + isp_prt(isp, ISP_LOGWARN, + "bad pdb (%1d%1d%1d) @ handle 0x%x", a, b, c, + handle); isp_dump_portdb(isp); continue; } @@ -2980,7 +2986,7 @@ lp->new_roles = tmp.roles; lp->state = FC_PORTDB_STATE_PENDING_VALID; isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x Pending Valid", + "Loop Port 0x%02x@0x%x Pending Valid", tmp.portid, tmp.handle); break; } @@ -2996,7 +3002,7 @@ * decide what to do. */ isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x changed", + "Loop Port 0x%02x@0x%x changed", tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; @@ -3035,7 +3041,7 @@ lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x is New Entry", + "Loop Port 0x%02x@0x%x is New Entry", tmp.portid, tmp.handle); } fcp->isp_loopstate = LOOP_LSCAN_DONE; @@ -6796,7 +6802,6 @@ MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_GET_FW_STATE; mbs.logval = MBLOGALL; - mbs.timeout = 100000; isp_mboxcmd(isp, &mbs); if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { fcp->isp_fwstate = mbs.param[1]; ==== //depot/projects/newisp/dev/isp/isp_library.c#18 (text) ==== @@ -268,9 +268,9 @@ } else { SNPRINTF(mb, sizeof (mb), "---"); } - isp_prt(isp, ISP_LOGALL, "%d: %s al%d tgt %s %s 0x%06x =>%s" - " 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, - dbs[lp->state], lp->autologin, mb, + isp_prt(isp, ISP_LOGALL, "%d: hdl 0x%x %s al%d tgt %s %s " + "0x%06x =>%s 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, + lp->handle, dbs[lp->state], lp->autologin, mb, roles[lp->roles], lp->portid, roles[lp->new_roles], lp->new_portid, (uint32_t) (lp->node_wwn >> 32), From owner-p4-projects@FreeBSD.ORG Wed Nov 15 05:24:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D1F8616A417; Wed, 15 Nov 2006 05:24:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A892B16A415 for ; Wed, 15 Nov 2006 05:24:08 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3826443D5C for ; Wed, 15 Nov 2006 05:24:08 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAF5O88N078304 for ; Wed, 15 Nov 2006 05:24:08 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAF5O8h3078301 for perforce@freebsd.org; Wed, 15 Nov 2006 05:24:08 GMT (envelope-from mjacob@freebsd.org) Date: Wed, 15 Nov 2006 05:24:08 GMT Message-Id: <200611150524.kAF5O8h3078301@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110004 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 05:24:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=110004 Change 110004 by mjacob@newisp on 2006/11/15 05:23:27 FCP Response field isn't valid if response length < 4. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#34 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#34 (text+ko) ==== @@ -4861,7 +4861,7 @@ switch (etype) { case RQSTYPE_RESPONSE: XS_SET_STATE_STAT(isp, xs, sp); - if (resp) { + if (resp && rlen >= 4) { isp_prt(isp, ISP_LOGWARN, "%d.%d FCP RESPONSE: 0x%x", XS_TGT(xs), XS_LUN(xs), From owner-p4-projects@FreeBSD.ORG Wed Nov 15 05:37:26 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 822F916A407; Wed, 15 Nov 2006 05:37:26 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 454CD16A412 for ; Wed, 15 Nov 2006 05:37:26 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D35EC43D55 for ; Wed, 15 Nov 2006 05:37:25 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAF5bPex080194 for ; Wed, 15 Nov 2006 05:37:25 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAF5bPcC080191 for perforce@freebsd.org; Wed, 15 Nov 2006 05:37:25 GMT (envelope-from mjacob@freebsd.org) Date: Wed, 15 Nov 2006 05:37:25 GMT Message-Id: <200611150537.kAF5bPcC080191@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110005 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 05:37:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=110005 Change 110005 by mjacob@newisp on 2006/11/15 05:36:29 Ignore zero-valued FCP RSP INFO codes. FCP-2 claims that this is 'Task Management Complete'. This is nonsensical when it is getting returned from a normal I/O (non-task management) command. I would guess that targets just set RSP LEN VALID (0x100) in the status word, set the accepted length field for response info (4 or 8) and call it a day. Non-zero values, if we ever see them, *do* indicate a problem with the transfer that has just occurred, so in that case it is indeed correct to set a generic I/O error for the transfer and let the upper layers decide whether to retry. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#35 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#35 (text+ko) ==== @@ -4861,7 +4861,8 @@ switch (etype) { case RQSTYPE_RESPONSE: XS_SET_STATE_STAT(isp, xs, sp); - if (resp && rlen >= 4) { + if (resp && rlen >= 4 && + resp[FCP_RSPNS_CODE_OFFSET] != 0) { isp_prt(isp, ISP_LOGWARN, "%d.%d FCP RESPONSE: 0x%x", XS_TGT(xs), XS_LUN(xs), From owner-p4-projects@FreeBSD.ORG Wed Nov 15 16:32:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B832416A415; Wed, 15 Nov 2006 16:32:40 +0000 (UTC) X-Original-To: perforce@FreeBSD.org Delivered-To: perforce@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0DA4616A412 for ; Wed, 15 Nov 2006 16:32:38 +0000 (UTC) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67BD343D46 for ; Wed, 15 Nov 2006 16:32:37 +0000 (GMT) (envelope-from rdivacky@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFGWb7j094939 for ; Wed, 15 Nov 2006 16:32:37 GMT (envelope-from rdivacky@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFGWWXV094926 for perforce@freebsd.org; Wed, 15 Nov 2006 16:32:32 GMT (envelope-from rdivacky@FreeBSD.org) Date: Wed, 15 Nov 2006 16:32:32 GMT Message-Id: <200611151632.kAFGWWXV094926@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to rdivacky@FreeBSD.org using -f From: Roman Divacky To: Perforce Change Reviews Cc: Subject: PERFORCE change 110033 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 16:32:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=110033 Change 110033 by rdivacky@rdivacky_witten on 2006/11/15 16:31:50 IFC Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/amd64/db_disasm.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/local_apic.c#5 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/mptable_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/msi.c#1 branch .. //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/pmap.c#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/apicvar.h#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/intr_machdep.h#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/pmap.h#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#10 edit .. //depot/projects/linuxolator/src/sys/amd64/pci/pci_bus.c#2 integrate .. //depot/projects/linuxolator/src/sys/arm/arm/pmap.c#3 integrate .. //depot/projects/linuxolator/src/sys/arm/include/pmap.h#3 integrate .. //depot/projects/linuxolator/src/sys/coda/coda_vnops.c#2 integrate .. //depot/projects/linuxolator/src/sys/coda/coda_vnops.h#2 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#15 integrate .. //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#34 integrate .. //depot/projects/linuxolator/src/sys/conf/NOTES#11 integrate .. //depot/projects/linuxolator/src/sys/conf/files#11 integrate .. //depot/projects/linuxolator/src/sys/conf/files.amd64#8 integrate .. //depot/projects/linuxolator/src/sys/conf/files.i386#7 integrate .. //depot/projects/linuxolator/src/sys/conf/files.pc98#5 integrate .. //depot/projects/linuxolator/src/sys/conf/files.sun4v#4 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_acpi.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/fxp/if_fxp.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_freebsd.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_freebsd.h#4 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_library.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_library.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_pci.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_stds.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/ispvar.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mfi/mfi.c#6 integrate .. //depot/projects/linuxolator/src/sys/dev/mfi/mfi_ioctl.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mfi/mfi_linux.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci.c#8 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_if.m#3 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_pci.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci_private.h#4 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcib_if.m#3 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcib_private.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcireg.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pcivar.h#4 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/uark.c#1 branch .. //depot/projects/linuxolator/src/sys/dev/usb/usb_quirks.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/usb/usbdevs#5 integrate .. //depot/projects/linuxolator/src/sys/fs/nullfs/null_vnops.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/local_apic.c#5 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/mptable_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/msi.c#1 branch .. //depot/projects/linuxolator/src/sys/i386/i386/nexus.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/pmap.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/include/apicvar.h#3 integrate .. //depot/projects/linuxolator/src/sys/i386/include/intr_machdep.h#3 integrate .. //depot/projects/linuxolator/src/sys/i386/include/pmap.h#2 integrate .. //depot/projects/linuxolator/src/sys/i386/linux/linux.h#8 edit .. //depot/projects/linuxolator/src/sys/i386/pci/pci_bus.c#2 integrate .. //depot/projects/linuxolator/src/sys/ia64/ia64/pmap.c#3 integrate .. //depot/projects/linuxolator/src/sys/ia64/include/pmap.h#2 integrate .. //depot/projects/linuxolator/src/sys/kern/init_main.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_idle.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_lock.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_mutex.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_rwlock.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_sx.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/posix4_mib.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/sched_4bsd.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_lock.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/uipc_syscalls.c#5 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_default.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_subr.c#8 integrate .. //depot/projects/linuxolator/src/sys/kern/vfs_vnops.c#4 integrate .. //depot/projects/linuxolator/src/sys/kern/vnode_if.src#2 integrate .. //depot/projects/linuxolator/src/sys/modules/Makefile#3 integrate .. //depot/projects/linuxolator/src/sys/modules/uark/Makefile#1 branch .. //depot/projects/linuxolator/src/sys/netinet/ip_fw2.c#7 integrate .. //depot/projects/linuxolator/src/sys/powerpc/powerpc/mmu_oea.c#2 integrate .. //depot/projects/linuxolator/src/sys/sparc64/sparc64/pmap.c#3 integrate .. //depot/projects/linuxolator/src/sys/sun4v/include/asmacros.h#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/include/pmap.h#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/include/tte_hash.h#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/exception.S#4 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/interrupt.S#3 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/rtc.c#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/trap.c#4 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/tte_hash.c#2 integrate .. //depot/projects/linuxolator/src/sys/sys/_lock.h#3 integrate .. //depot/projects/linuxolator/src/sys/sys/elf_common.h#3 integrate .. //depot/projects/linuxolator/src/sys/sys/lock.h#3 integrate .. //depot/projects/linuxolator/src/sys/sys/lock_profile.h#2 integrate .. //depot/projects/linuxolator/src/sys/sys/mbuf.h#5 integrate .. //depot/projects/linuxolator/src/sys/sys/proc.h#6 integrate .. //depot/projects/linuxolator/src/sys/sys/vnode.h#3 integrate .. //depot/projects/linuxolator/src/sys/ufs/ffs/ffs_vnops.c#4 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_fault.c#4 integrate .. //depot/projects/linuxolator/src/sys/vm/vm_kern.c#3 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/amd64/db_disasm.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.30 2005/03/30 22:57:41 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_disasm.c,v 1.31 2006/11/13 21:14:54 jhb Exp $"); /* * Instruction disassembler. @@ -84,6 +84,7 @@ #define Ib 21 /* byte immediate, unsigned */ #define Ibs 22 /* byte immediate, signed */ #define Iw 23 /* word immediate, unsigned */ +#define Ilq 24 /* long/quad immediate, unsigned */ #define O 25 /* direct address */ #define Db 26 /* byte displacement from EIP */ #define Dl 27 /* long displacement from EIP */ @@ -351,7 +352,6 @@ 0, 0, 0, - 0, db_inst_0f8x, db_inst_0f9x, db_inst_0fax, @@ -752,14 +752,14 @@ /*b6*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 }, /*b7*/ { "mov", FALSE, BYTE, op2(I, Ri), 0 }, -/*b8*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*b9*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*ba*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bb*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bc*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bd*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*be*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, -/*bf*/ { "mov", FALSE, LONG, op2(I, Ri), 0 }, +/*b8*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*b9*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*ba*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bb*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bc*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bd*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*be*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, +/*bf*/ { "mov", FALSE, LONG, op2(Ilq, Ri), 0 }, /*c0*/ { "", TRUE, BYTE, op2(Ib, E), db_Grp2 }, /*c1*/ { "", TRUE, LONG, op2(Ib, E), db_Grp2 }, @@ -854,17 +854,6 @@ int ss; }; -static const char * const db_index_reg_16[8] = { - "%bx,%si", - "%bx,%di", - "%bp,%si", - "%bp,%di", - "%si", - "%di", - "%bp", - "%bx" -}; - static const char * const db_reg[2][4][16] = { {{"%al", "%cl", "%dl", "%bl", "%ah", "%ch", "%dh", "%bh", @@ -927,7 +916,7 @@ int regmodrm; struct i_addr * addrp; /* out */ { - int mod, rm, sib, index, disp; + int mod, rm, sib, index, disp, size, have_sib; mod = f_mod(rex, regmodrm); rm = f_rm(rex, regmodrm); @@ -940,68 +929,49 @@ addrp->is_reg = FALSE; addrp->index = 0; - if (short_addr) { - addrp->index = 0; - addrp->ss = 0; - switch (mod) { - case 0: - if (rm == 6) { - get_value_inc(disp, loc, 2, FALSE); - addrp->disp = disp; - addrp->base = 0; - } - else { - addrp->disp = 0; - addrp->base = db_index_reg_16[rm]; - } - break; - case 1: - get_value_inc(disp, loc, 1, TRUE); - disp &= 0xFFFF; - addrp->disp = disp; - addrp->base = db_index_reg_16[rm]; - break; - case 2: - get_value_inc(disp, loc, 2, FALSE); - addrp->disp = disp; - addrp->base = db_index_reg_16[rm]; - break; - } - } - else { - if (mod != 3 && rm == 4) { - get_value_inc(sib, loc, 1, FALSE); - rm = sib_base(rex, sib); - index = sib_index(rex, sib); - if (index != 4) - addrp->index = db_reg[1][QUAD][index]; - addrp->ss = sib_ss(rex, sib); - } + if (short_addr) + size = LONG; + else + size = QUAD; + + if ((rm & 0x7) == 4) { + get_value_inc(sib, loc, 1, FALSE); + rm = sib_base(rex, sib); + index = sib_index(rex, sib); + if (index != 4) + addrp->index = db_reg[1][size][index]; + addrp->ss = sib_ss(rex, sib); + have_sib = 1; + } else + have_sib = 0; - switch (mod) { - case 0: - if (rm == 5) { - get_value_inc(addrp->disp, loc, 4, FALSE); + switch (mod) { + case 0: + if (rm == 5) { + get_value_inc(addrp->disp, loc, 4, FALSE); + if (have_sib) addrp->base = 0; - } - else { - addrp->disp = 0; - addrp->base = db_reg[1][QUAD][rm]; - } - break; + else if (short_addr) + addrp->base = "%eip"; + else + addrp->base = "%rip"; + } else { + addrp->disp = 0; + addrp->base = db_reg[1][size][rm]; + } + break; - case 1: - get_value_inc(disp, loc, 1, TRUE); - addrp->disp = disp; - addrp->base = db_reg[1][QUAD][rm]; - break; + case 1: + get_value_inc(disp, loc, 1, TRUE); + addrp->disp = disp; + addrp->base = db_reg[1][size][rm]; + break; - case 2: - get_value_inc(disp, loc, 4, FALSE); - addrp->disp = disp; - addrp->base = db_reg[1][QUAD][rm]; - break; - } + case 2: + get_value_inc(disp, loc, 4, FALSE); + addrp->disp = disp; + addrp->base = db_reg[1][size][rm]; + break; } return (loc); } @@ -1022,7 +992,8 @@ db_printf("%s:", seg); } - db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); + if (addrp->disp != 0 || (addrp->base == 0 && addrp->index == 0)) + db_printsym((db_addr_t)addrp->disp, DB_STGY_ANY); if (addrp->base != 0 || addrp->index != 0) { db_printf("("); if (addrp->base) @@ -1154,6 +1125,7 @@ int prefix; int imm; int imm2; + long imm64; int len; struct i_addr address; @@ -1426,6 +1398,12 @@ db_printf("$%#r", imm); break; + case Ilq: + len = db_lengths[rex & REX_W ? QUAD : LONG]; + get_value_inc(imm64, loc, len, FALSE); + db_printf("$%#lr", imm64); + break; + case O: len = (short_addr ? 2 : 4); get_value_inc(displ, loc, len, FALSE); ==== //depot/projects/linuxolator/src/sys/amd64/amd64/local_apic.c#5 (text+ko) ==== @@ -32,7 +32,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.32 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/local_apic.c,v 1.33 2006/11/13 22:23:32 jhb Exp $"); #include "opt_hwpmc_hooks.h" @@ -744,6 +744,65 @@ panic("Couldn't find an APIC vector for IRQ %u", irq); } +/* + * Request 'count' free contiguous IDT vectors to be used by 'count' + * IRQs. 'count' must be a power of two and the vectors will be + * aligned on a boundary of 'align'. If the request cannot be + * satisfied, 0 is returned. + */ +u_int +apic_alloc_vectors(u_int *irqs, u_int count, u_int align) +{ + u_int first, run, vector; + + KASSERT(powerof2(count), ("bad count")); + KASSERT(powerof2(align), ("bad align")); + KASSERT(align >= count, ("align < count")); +#ifdef INVARIANTS + for (run = 0; run < count; run++) + KASSERT(irqs[run] < NUM_IO_INTS, ("Invalid IRQ %u at index %u", + irqs[run], run)); +#endif + + /* + * Search for 'count' free vectors. As with apic_alloc_vector(), + * this just uses a simple first fit algorithm. + */ + run = 0; + first = 0; + mtx_lock_spin(&icu_lock); + for (vector = 0; vector < APIC_NUM_IOINTS; vector++) { + + /* Vector is in use, end run. */ + if (ioint_irqs[vector] != 0) { + run = 0; + first = 0; + continue; + } + + /* Start a new run if run == 0 and vector is aligned. */ + if (run == 0) { + if ((vector & (align - 1)) != 0) + continue; + first = vector; + } + run++; + + /* Keep looping if the run isn't long enough yet. */ + if (run < count) + continue; + + /* Found a run, assign IRQs and return the first vector. */ + for (vector = 0; vector < count; vector++) + ioint_irqs[first + vector] = irqs[vector]; + mtx_unlock_spin(&icu_lock); + return (first + APIC_IO_INTS); + } + mtx_unlock_spin(&icu_lock); + printf("APIC: Couldn't find APIC vectors for %u IRQs\n", count); + return (0); +} + void apic_enable_vector(u_int vector) { @@ -1002,6 +1061,9 @@ intr_register_pic(&lapic_pic); if (bootverbose) lapic_dump("BSP"); + + /* Enable the MSI "pic". */ + msi_init(); } SYSINIT(apic_setup_io, SI_SUB_INTR, SI_ORDER_SECOND, apic_setup_io, NULL) ==== //depot/projects/linuxolator/src/sys/amd64/amd64/mptable_pci.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.4 2006/01/06 19:22:18 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mptable_pci.c,v 1.5 2006/11/13 22:23:32 jhb Exp $"); #include #include @@ -96,6 +96,10 @@ DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } }; @@ -148,6 +152,10 @@ DEVMETHOD(pcib_read_config, pcib_read_config), DEVMETHOD(pcib_write_config, pcib_write_config), DEVMETHOD(pcib_route_interrupt, mptable_pci_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} }; ==== //depot/projects/linuxolator/src/sys/amd64/amd64/nexus.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.69 2006/09/11 19:31:51 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/nexus.c,v 1.70 2006/11/13 22:23:32 jhb Exp $"); /* * This code implements a `root nexus' for Intel Architecture @@ -61,6 +61,8 @@ #include +#include "pcib_if.h" + #ifdef DEV_ISA #include #include @@ -100,6 +102,10 @@ static int nexus_set_resource(device_t, device_t, int, int, u_long, u_long); static int nexus_get_resource(device_t, device_t, int, int, u_long *, u_long *); static void nexus_delete_resource(device_t, device_t, int, int); +static int nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs); +static int nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs); +static int nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq); +static int nexus_release_msix(device_t pcib, device_t dev, int irq); static device_method_t nexus_methods[] = { /* Device interface */ @@ -125,6 +131,12 @@ DEVMETHOD(bus_get_resource, nexus_get_resource), DEVMETHOD(bus_delete_resource, nexus_delete_resource), + /* pcib interface */ + DEVMETHOD(pcib_alloc_msi, nexus_alloc_msi), + DEVMETHOD(pcib_release_msi, nexus_release_msi), + DEVMETHOD(pcib_alloc_msix, nexus_alloc_msix), + DEVMETHOD(pcib_release_msix, nexus_release_msix), + { 0, 0 } }; @@ -504,6 +516,47 @@ resource_list_delete(rl, type, rid); } +static int +nexus_alloc_msix(device_t pcib, device_t dev, int index, int *irq) +{ + int error, new; + + error = msix_alloc(dev, index, irq, &new); + if (new) + rman_manage_region(&irq_rman, *irq, *irq); + return (error); +} + +static int +nexus_release_msix(device_t pcib, device_t dev, int irq) +{ + + return (msix_release(irq)); +} + +static int +nexus_alloc_msi(device_t pcib, device_t dev, int count, int maxcount, int *irqs) +{ + int error, i, newirq, newcount; + + /* First alloc the messages. */ + error = msi_alloc(dev, count, maxcount, irqs, &newirq, &newcount); + + /* Always add any new IRQs to the rman, even on failure. */ + for (i = 0; i < newcount; i++) + rman_manage_region(&irq_rman, irqs[newirq + i], + irqs[newirq + i]); + + return (error); +} + +static int +nexus_release_msi(device_t pcib, device_t dev, int count, int *irqs) +{ + + return (msi_release(irqs, count)); +} + #ifdef DEV_ISA /* * Placeholder which claims PnP 'devices' which describe system ==== //depot/projects/linuxolator/src/sys/amd64/amd64/pmap.c#3 (text+ko) ==== @@ -77,7 +77,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.572 2006/10/22 04:18:01 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.573 2006/11/12 21:48:32 alc Exp $"); /* * Manages physical address maps. @@ -2357,8 +2357,10 @@ * Now validate mapping with desired protection/wiring. */ newpte = (pt_entry_t)(pa | PG_V); - if ((prot & VM_PROT_WRITE) != 0) + if ((prot & VM_PROT_WRITE) != 0) { newpte |= PG_RW; + vm_page_flag_set(m, PG_WRITEABLE); + } if ((prot & VM_PROT_EXECUTE) == 0) newpte |= pg_nx; if (wired) ==== //depot/projects/linuxolator/src/sys/amd64/include/apicvar.h#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.19 2006/10/10 23:23:11 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/apicvar.h,v 1.20 2006/11/13 22:23:33 jhb Exp $ */ #ifndef _MACHINE_APICVAR_H_ @@ -175,6 +175,7 @@ IDTVEC(apic_isr7), IDTVEC(spuriousint), IDTVEC(timerint); u_int apic_alloc_vector(u_int irq); +u_int apic_alloc_vectors(u_int *irqs, u_int count, u_int align); void apic_enable_vector(u_int vector); void apic_free_vector(u_int vector, u_int irq); u_int apic_idt_to_irq(u_int vector); ==== //depot/projects/linuxolator/src/sys/amd64/include/intr_machdep.h#3 (text+ko) ==== @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.11 2006/10/10 23:23:11 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/intr_machdep.h,v 1.12 2006/11/13 22:23:33 jhb Exp $ */ #ifndef __MACHINE_INTR_MACHDEP_H__ @@ -43,11 +43,18 @@ * 191 and still be safe since only interrupt sources in actual use will * allocate IDT vectors. * - * For now we stick with 255 as ISA IRQs and PCI intline IRQs only allow - * for IRQs in the range 0 - 254. When MSI support is added this number - * will likely increase. + * The first 255 IRQs (0 - 254) are reserved for ISA IRQs and PCI intline IRQs. + * IRQ values beyond 256 are used by MSI. We leave 255 unused to avoid + * confusion since 255 is used in PCI to indicate an invalid IRQ. + */ +#define NUM_MSI_INTS 128 +#define FIRST_MSI_INT 256 +#define NUM_IO_INTS (FIRST_MSI_INT + NUM_MSI_INTS) + +/* + * Default base address for MSI messages on x86 platforms. */ -#define NUM_IO_INTS 255 +#define MSI_INTEL_ADDR_BASE 0xfee00000 /* * - 1 ??? dummy counter. @@ -140,6 +147,12 @@ void intr_resume(void); void intr_suspend(void); void intrcnt_add(const char *name, u_long **countp); +void msi_init(void); +int msi_alloc(device_t dev, int count, int maxcount, int *irqs, int *newirq, + int *newcount); +int msi_release(int *irqs, int count); +int msix_alloc(device_t dev, int index, int *irq, int *new); +int msix_release(int irq); #endif /* !LOCORE */ #endif /* _KERNEL */ ==== //depot/projects/linuxolator/src/sys/amd64/include/pmap.h#2 (text+ko) ==== @@ -39,7 +39,7 @@ * * from: hp300: @(#)pmap.h 7.2 (Berkeley) 12/16/90 * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 - * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.134 2006/08/11 19:22:56 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/pmap.h,v 1.136 2006/11/13 20:33:54 ru Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -101,9 +101,10 @@ ((unsigned long)(l2) << PDRSHIFT) | \ ((unsigned long)(l1) << PAGE_SHIFT)) -/* Initial number of kernel page tables */ +/* Initial number of kernel page tables. */ #ifndef NKPT -#define NKPT 240 /* Enough for 16GB (2MB page tables) */ +/* 240 page tables needed to map 16G (120B "struct vm_page", 2M page tables). */ +#define NKPT 240 #endif #define NKPML4E 1 /* number of kernel PML4 slots */ @@ -262,7 +263,7 @@ /* * For each vm_page_t, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. + * mappings of that page. An entry is a pv_entry_t, the list is pv_list. */ typedef struct pv_entry { vm_offset_t pv_va; /* virtual address for mapping */ ==== //depot/projects/linuxolator/src/sys/amd64/linux32/linux.h#10 (text+ko) ==== @@ -842,7 +842,7 @@ #define CLONE_CHILD_SETTID 0x01000000 #define CLONE_PARENT_SETTID 0x00100000 -#define THREADING_FLAGS (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND) +#define THREADING_FLAGS (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND | CLONE_THREAD) #include ==== //depot/projects/linuxolator/src/sys/amd64/pci/pci_bus.c#2 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.117 2006/03/13 23:58:40 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/pci/pci_bus.c,v 1.118 2006/11/13 22:23:33 jhb Exp $"); #include "opt_cpu.h" @@ -322,6 +322,10 @@ DEVMETHOD(pcib_read_config, legacy_pcib_read_config), DEVMETHOD(pcib_write_config, legacy_pcib_write_config), DEVMETHOD(pcib_route_interrupt, legacy_pcib_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), { 0, 0 } }; ==== //depot/projects/linuxolator/src/sys/arm/arm/pmap.c#3 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.72 2006/11/11 20:57:51 alc Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.73 2006/11/12 21:48:32 alc Exp $"); #include #include #include @@ -3396,8 +3396,11 @@ npte |= L2_TYPE_INV; } - if (prot & VM_PROT_WRITE) + if (prot & VM_PROT_WRITE) { npte |= L2_S_PROT_W; + if (m != NULL) + vm_page_flag_set(m, PG_WRITEABLE); + } npte |= pte_l2_s_cache_mode; if (m && m == opg) { /* ==== //depot/projects/linuxolator/src/sys/arm/include/pmap.h#3 (text+ko) ==== @@ -44,7 +44,7 @@ * from: @(#)pmap.h 7.4 (Berkeley) 5/12/91 * from: FreeBSD: src/sys/i386/include/pmap.h,v 1.70 2000/11/30 * - * $FreeBSD: src/sys/arm/include/pmap.h,v 1.22 2006/11/11 20:57:52 alc Exp $ + * $FreeBSD: src/sys/arm/include/pmap.h,v 1.23 2006/11/13 06:26:56 ru Exp $ */ #ifndef _MACHINE_PMAP_H_ @@ -170,7 +170,7 @@ /* * For each vm_page_t, there is a list of all currently valid virtual - * mappings of that page. An entry is a pv_entry_t, the list is pv_table. + * mappings of that page. An entry is a pv_entry_t, the list is pv_list. */ typedef struct pv_entry { pmap_t pv_pmap; /* pmap where mapping lies */ ==== //depot/projects/linuxolator/src/sys/coda/coda_vnops.c#2 (text+ko) ==== @@ -42,7 +42,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_vnops.c,v 1.68 2006/02/01 00:25:24 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_vnops.c,v 1.69 2006/11/13 05:51:21 kmacy Exp $"); #include #include @@ -129,7 +129,7 @@ .vop_readlink = coda_readlink, /* readlink */ .vop_inactive = coda_inactive, /* inactive */ .vop_reclaim = coda_reclaim, /* reclaim */ - .vop_lock = coda_lock, /* lock */ + ._vop_lock = coda_lock, /* lock */ .vop_unlock = coda_unlock, /* unlock */ .vop_bmap = coda_bmap, /* bmap */ .vop_print = VOP_PANIC, /* print */ @@ -1627,7 +1627,7 @@ } int -coda_lock(struct vop_lock_args *ap) +coda_lock(struct _vop_lock_args *ap) { /* true args */ struct vnode *vp = ap->a_vp; ==== //depot/projects/linuxolator/src/sys/coda/coda_vnops.h#2 (text+ko) ==== @@ -27,7 +27,7 @@ * Mellon the rights to redistribute these changes without encumbrance. * * @(#) src/sys/coda/coda_vnops.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ - * $FreeBSD: src/sys/coda/coda_vnops.h,v 1.16 2005/01/19 08:24:53 phk Exp $ + * $FreeBSD: src/sys/coda/coda_vnops.h,v 1.17 2006/11/13 05:51:21 kmacy Exp $ * */ @@ -72,7 +72,7 @@ vop_bmap_t coda_bmap; vop_strategy_t coda_strategy; vop_reclaim_t coda_reclaim; -vop_lock_t coda_lock; +_vop_lock_t coda_lock; vop_unlock_t coda_unlock; vop_islocked_t coda_islocked; int coda_vop_error(void *); ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_emul.c#15 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.8 2006/10/28 10:59:59 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.9 2006/11/15 11:04:37 kib Exp $"); #include "opt_compat.h" ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_misc.c#34 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.193 2006/11/11 16:26:55 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.194 2006/11/15 10:01:06 kib Exp $"); #include "opt_compat.h" #include "opt_mac.h" ==== //depot/projects/linuxolator/src/sys/conf/NOTES#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1398 2006/11/11 05:35:39 kmacy Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1400 2006/11/15 09:13:24 maxim Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -195,7 +195,7 @@ # MUTEX_NOINLINE forces mutex operations to call functions to perform each # operation rather than inlining the simple cases. This can be used to # shrink the size of the kernel text segment. Note that this behavior is -# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, MUTEX_PROFILING, +# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, LOCK_PROFILING, # and WITNESS options. options MUTEX_NOINLINE @@ -207,7 +207,7 @@ # RWLOCK_NOINLINE forces rwlock operations to call functions to perform each # operation rather than inlining the simple cases. This can be used to # shrink the size of the kernel text segment. Note that this behavior is -# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, MUTEX_PROFILING, +# already implied by the INVARIANT_SUPPORT, INVARIANTS, KTR, LOCK_PROFILING, # and WITNESS options. options RWLOCK_NOINLINE @@ -241,8 +241,7 @@ options WITNESS_KDB options WITNESS_SKIPSPIN -# LOCK_PROFILING - Profiling locks. See -# MUTEX_PROFILING(9) for details. +# LOCK_PROFILING - Profiling locks. See LOCK_PROFILING(9) for details. options LOCK_PROFILING # Set the number of buffers and the hash size. The hash size MUST be larger # than the number of buffers. Hash size should be prime. @@ -2398,6 +2397,8 @@ # # USB serial support device ucom +# USB support for Technologies ARK3116 based serial adapters +device uark # USB support for Belkin F5U103 and compatible serial adapters device ubsa # USB support for BWCT console serial adapters ==== //depot/projects/linuxolator/src/sys/conf/files#11 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1161 2006/11/11 16:26:56 trhodes Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1162 2006/11/15 09:13:24 maxim Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1037,6 +1037,7 @@ dev/usb/ohci_pci.c optional ohci pci dev/usb/sl811hs.c optional slhci dev/usb/slhci_pccard.c optional slhci pccard +dev/usb/uark.c optional uark dev/usb/ubsa.c optional ubsa dev/usb/ubser.c optional ubser dev/usb/ucom.c optional ucom ==== //depot/projects/linuxolator/src/sys/conf/files.amd64#8 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.amd64,v 1.98 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.amd64,v 1.99 2006/11/13 22:23:33 jhb Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -114,6 +114,7 @@ amd64/amd64/mpboot.S optional smp amd64/amd64/mptable.c optional mptable amd64/amd64/mptable_pci.c optional mptable pci +amd64/amd64/msi.c optional pci amd64/amd64/nexus.c standard amd64/amd64/pmap.c standard amd64/amd64/prof_machdep.c optional profiling-routine ==== //depot/projects/linuxolator/src/sys/conf/files.i386#7 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.i386,v 1.570 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.i386,v 1.571 2006/11/13 22:23:33 jhb Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -294,6 +294,7 @@ i386/i386/mpboot.s optional smp i386/i386/mptable.c optional apic i386/i386/mptable_pci.c optional apic pci +i386/i386/msi.c optional apic pci i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard ==== //depot/projects/linuxolator/src/sys/conf/files.pc98#5 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801/PC-9821 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.349 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.350 2006/11/14 14:28:09 ru Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -176,6 +176,7 @@ i386/i386/mpboot.s optional smp i386/i386/mptable.c optional apic i386/i386/mptable_pci.c optional apic pci +i386/i386/msi.c optional apic pci i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard ==== //depot/projects/linuxolator/src/sys/conf/files.sun4v#4 (text+ko) ==== @@ -1,7 +1,7 @@ # This file tells config what files go into building a kernel, # files marked standard are always included. # -# $FreeBSD: src/sys/conf/files.sun4v,v 1.3 2006/11/08 21:45:45 ru Exp $ +# $FreeBSD: src/sys/conf/files.sun4v,v 1.4 2006/11/13 01:02:18 kmacy Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -80,6 +80,7 @@ sun4v/sun4v/pmap.c standard sun4v/sun4v/prof_machdep.c optional profiling-routine sun4v/sun4v/rwindow.c standard +sun4v/sun4v/rtc.c standard sun4v/sun4v/simdisk.c optional simulator sun4v/sun4v/support.S standard sun4v/sun4v/sys_machdep.c standard ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_acpi.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.50 2006/01/06 19:22:18 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_acpi.c,v 1.51 2006/11/13 21:47:30 jhb Exp $"); #include "opt_acpi.h" #include @@ -103,6 +103,10 @@ DEVMETHOD(pcib_read_config, acpi_pcib_read_config), DEVMETHOD(pcib_write_config, acpi_pcib_write_config), DEVMETHOD(pcib_route_interrupt, acpi_pcib_acpi_route_interrupt), + DEVMETHOD(pcib_alloc_msi, pcib_alloc_msi), + DEVMETHOD(pcib_release_msi, pcib_release_msi), + DEVMETHOD(pcib_alloc_msix, pcib_alloc_msix), + DEVMETHOD(pcib_release_msix, pcib_release_msix), {0, 0} }; ==== //depot/projects/linuxolator/src/sys/dev/acpica/acpi_pcib_pci.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.14 2006/01/06 19:22:18 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpica/acpi_pcib_pci.c,v 1.15 2006/11/13 21:47:30 jhb Exp $"); #include "opt_acpi.h" @@ -93,6 +93,10 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Nov 15 16:59:21 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 20F7F16A62B; Wed, 15 Nov 2006 16:59:20 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 905EF16A5ED for ; Wed, 15 Nov 2006 16:59:19 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A174D43D58 for ; Wed, 15 Nov 2006 16:59:18 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFGxIXt007313 for ; Wed, 15 Nov 2006 16:59:18 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFGxHrb007310 for perforce@freebsd.org; Wed, 15 Nov 2006 16:59:17 GMT (envelope-from marcel@freebsd.org) Date: Wed, 15 Nov 2006 16:59:17 GMT Message-Id: <200611151659.kAFGxHrb007310@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 110037 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 16:59:21 -0000 http://perforce.freebsd.org/chv.cgi?CH=110037 Change 110037 by marcel@marcel_nfs on 2006/11/15 16:58:17 Hide the uart_ops instances and instead have the device class point to them. By going through the class we can implement the DT tag in uart_getenv() as well as use the correct I/O range in bus_space_map(). Affected files ... .. //depot/projects/uart/dev/uart/uart.h#11 edit .. //depot/projects/uart/dev/uart/uart_bus.h#48 edit .. //depot/projects/uart/dev/uart/uart_core.c#55 edit .. //depot/projects/uart/dev/uart/uart_cpu.h#20 edit .. //depot/projects/uart/dev/uart/uart_cpu_amd64.c#11 edit .. //depot/projects/uart/dev/uart/uart_cpu_i386.c#12 edit .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#13 edit .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#13 edit .. //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#26 edit .. //depot/projects/uart/dev/uart/uart_dev_ns8250.c#46 edit .. //depot/projects/uart/dev/uart/uart_dev_sab82532.c#42 edit .. //depot/projects/uart/dev/uart/uart_dev_z8530.c#33 edit .. //depot/projects/uart/dev/uart/uart_kbd_sun.c#11 edit .. //depot/projects/uart/dev/uart/uart_subr.c#7 edit Differences ... ==== //depot/projects/uart/dev/uart/uart.h#11 (text+ko) ==== @@ -60,6 +60,16 @@ BUS_SPACE_BARRIER_READ|BUS_SPACE_BARRIER_WRITE) /* + * UART device classes. + */ +struct uart_class; + +extern struct uart_class uart_ns8250_class; +extern struct uart_class uart_quicc_class; +extern struct uart_class uart_sab82532_class; +extern struct uart_class uart_z8530_class; + +/* * Device flags. */ #define UART_FLAGS_CONSOLE(f) ((f) & 0x10) ==== //depot/projects/uart/dev/uart/uart_bus.h#48 (text+ko) ==== @@ -67,14 +67,11 @@ */ struct uart_class { KOBJ_CLASS_FIELDS; + struct uart_ops *uc_ops; /* Low-level console operations. */ u_int uc_range; /* Bus space address range. */ u_int uc_rclk; /* Default rclk for this device. */ }; -extern struct uart_class uart_ns8250_class; -extern struct uart_class uart_sab82532_class; -extern struct uart_class uart_z8530_class; - struct uart_softc { KOBJ_FIELDS; struct uart_class *sc_class; ==== //depot/projects/uart/dev/uart/uart_core.c#55 (text+ko) ==== @@ -70,6 +70,18 @@ SLIST_INSERT_HEAD(&uart_sysdevs, di, next); } +struct uart_ops * +uart_getops(struct uart_class *uc) +{ + return (uc->uc_ops); +} + +int +uart_getrange(struct uart_class *uc) +{ + return (uc->uc_range); +} + /* * Schedule a soft interrupt. We do this on the 0 to !0 transition * of the TTY pending interrupt status. ==== //depot/projects/uart/dev/uart/uart_cpu.h#20 (text+ko) ==== @@ -45,11 +45,6 @@ int (*getc)(struct uart_bas *, struct mtx *); }; -extern struct uart_ops uart_i8251_ops; -extern struct uart_ops uart_ns8250_ops; -extern struct uart_ops uart_sab82532_ops; -extern struct uart_ops uart_z8530_ops; - extern bus_space_tag_t uart_bus_space_io; extern bus_space_tag_t uart_bus_space_mem; @@ -59,7 +54,7 @@ struct uart_softc; struct uart_devinfo { SLIST_ENTRY(uart_devinfo) next; - struct uart_ops ops; + struct uart_ops *ops; struct uart_bas bas; int baudrate; int databits; @@ -77,7 +72,10 @@ int uart_cpu_eqres(struct uart_bas *, struct uart_bas *); int uart_cpu_getdev(int, struct uart_devinfo *); -int uart_getenv(int, struct uart_devinfo *); + +int uart_getenv(int, struct uart_devinfo *, struct uart_class *); +struct uart_ops *uart_getops(struct uart_class *); +int uart_getrange(struct uart_class *); void uart_add_sysdev(struct uart_devinfo *); @@ -106,7 +104,7 @@ int res; uart_lock(di->hwmtx); - res = di->ops.probe(&di->bas); + res = di->ops->probe(&di->bas); uart_unlock(di->hwmtx); return (res); } @@ -115,7 +113,7 @@ uart_init(struct uart_devinfo *di) { uart_lock(di->hwmtx); - di->ops.init(&di->bas, di->baudrate, di->databits, di->stopbits, + di->ops->init(&di->bas, di->baudrate, di->databits, di->stopbits, di->parity); uart_unlock(di->hwmtx); } @@ -124,7 +122,7 @@ uart_term(struct uart_devinfo *di) { uart_lock(di->hwmtx); - di->ops.term(&di->bas); + di->ops->term(&di->bas); uart_unlock(di->hwmtx); } @@ -132,7 +130,7 @@ uart_putc(struct uart_devinfo *di, int c) { uart_lock(di->hwmtx); - di->ops.putc(&di->bas, c); + di->ops->putc(&di->bas, c); uart_unlock(di->hwmtx); } @@ -142,7 +140,7 @@ int res; uart_lock(di->hwmtx); - res = di->ops.poll(&di->bas); + res = di->ops->poll(&di->bas); uart_unlock(di->hwmtx); return (res); } @@ -151,7 +149,7 @@ uart_getc(struct uart_devinfo *di) { - return (di->ops.getc(&di->bas, di->hwmtx)); + return (di->ops->getc(&di->bas, di->hwmtx)); } #endif /* _DEV_UART_CPU_H_ */ ==== //depot/projects/uart/dev/uart/uart_cpu_amd64.c#11 (text+ko) ==== @@ -49,11 +49,13 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { + struct uart_class *class; unsigned int i, ivar; + class = &uart_ns8250_class; + /* Check the environment. */ - di->ops = uart_ns8250_ops; - if (uart_getenv(devtype, di) == 0) + if (uart_getenv(devtype, di, class) == 0) return (0); /* @@ -82,10 +84,11 @@ * Got it. Fill in the instance and return it. We only have * ns8250 and successors on i386. */ - di->ops = uart_ns8250_ops; + di->ops = uart_getops(class); di->bas.chan = 0; di->bas.bst = uart_bus_space_io; - if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + if (bus_space_map(di->bas.bst, ivar, uart_getrange(class), 0, + &di->bas.bsh) != 0) continue; di->bas.regshft = 0; di->bas.rclk = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_i386.c#12 (text+ko) ==== @@ -49,11 +49,13 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { + struct uart_class *class; unsigned int i, ivar; + class = &uart_ns8250_class; + /* Check the environment. */ - di->ops = uart_ns8250_ops; - if (uart_getenv(devtype, di) == 0) + if (uart_getenv(devtype, di, class) == 0) return (0); /* @@ -82,10 +84,11 @@ * Got it. Fill in the instance and return it. We only have * ns8250 and successors on i386. */ - di->ops = uart_ns8250_ops; + di->ops = uart_getops(class); di->bas.chan = 0; di->bas.bst = uart_bus_space_io; - if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + if (bus_space_map(di->bas.bst, ivar, uart_getrange(class), 0, + &di->bas.bsh) != 0) continue; di->bas.regshft = 0; di->bas.rclk = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_ia64.c#13 (text+ko) ==== @@ -59,10 +59,13 @@ { struct dig64_hcdp_table *tbl; struct dig64_hcdp_entry *ent; + struct uart_class *class; bus_addr_t addr; uint64_t hcdp; unsigned int i; + class = &uart_ns8250_class; + /* * Use the DIG64 HCDP table if present. */ @@ -82,12 +85,12 @@ addr = ent->address.addr_high; addr = (addr << 32) + ent->address.addr_low; - di->ops = uart_ns8250_ops; + di->ops = uart_getops(class); di->bas.chan = 0; di->bas.bst = (ent->address.addr_space == 0) ? uart_bus_space_mem : uart_bus_space_io; - if (bus_space_map(di->bas.bst, addr, 8, 0, - &di->bas.bsh) != 0) + if (bus_space_map(di->bas.bst, addr, + uart_getrange(class), 0, &di->bas.bsh) != 0) continue; di->bas.regshft = 0; di->bas.rclk = ent->pclock << 4; @@ -104,6 +107,5 @@ } /* Check the environment. */ - di->ops = uart_ns8250_ops; - return (uart_getenv(devtype, di)); + return (uart_getenv(devtype, di, class)); } ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#13 (text+ko) ==== @@ -49,11 +49,13 @@ int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { + struct uart_class *class; unsigned int i, ivar, flags; + class = &uart_ns8250_class; + /* Check the environment. */ - di->ops = uart_ns8250_ops; - if (uart_getenv(devtype, di) == 0) + if (uart_getenv(devtype, di, class) == 0) return (0); /* @@ -81,10 +83,11 @@ ivar == 0) continue; - di->ops = uart_ns8250_ops; + di->ops = uart_getops(class); di->bas.chan = 0; di->bas.bst = uart_bus_space_io; - if (bus_space_map(di->bas.bst, ivar, 8, 0, &di->bas.bsh) != 0) + if (bus_space_map(di->bas.bst, ivar, uart_getrange(class), 0, + &di->bas.bsh) != 0) continue; di->bas.regshft = 0; di->bas.rclk = 0; ==== //depot/projects/uart/dev/uart/uart_cpu_sparc64.c#26 (text+ko) ==== @@ -194,9 +194,10 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) { char buf[32], compat[32], dev[64]; + struct uart_class *class; phandle_t input, options; bus_addr_t addr; - int baud, bits, error, space, stop; + int baud, bits, error, range, space, stop; char flag, par; if ((options = OF_finddevice("/options")) == -1) @@ -228,14 +229,15 @@ compat[0] = '\0'; di->bas.regshft = 0; di->bas.rclk = 0; + class = NULL; if (!strcmp(buf, "se") || !strcmp(compat, "sab82532")) { - di->ops = uart_sab82532_ops; + class = &uart_sab82532_class; /* SAB82532 are only known to be used for TTYs. */ if ((di->bas.chan = uart_cpu_channel(dev)) == 0) return (ENXIO); - addr += 64 * (di->bas.chan - 1); + addr += uart_getrange(class) * (di->bas.chan - 1); } else if (!strcmp(buf, "zs")) { - di->ops = uart_z8530_ops; + class = &uart_z8530_class; if ((di->bas.chan = uart_cpu_channel(dev)) == 0) { /* * There's no way to determine from OF which @@ -248,16 +250,19 @@ return (ENXIO); } di->bas.regshft = 1; - addr += 4 - 4 * (di->bas.chan - 1); + range = uart_getrange(class) << di->bas.regshft; + addr += range - range * (di->bas.chan - 1); } else if (!strcmp(buf, "lom-console") || !strcmp(buf, "su") || !strcmp(buf, "su_pnp") || !strcmp(compat, "rsc-console") || !strcmp(compat, "su") || !strcmp(compat, "su16550")) { - di->ops = uart_ns8250_ops; + class = &uart_ns8250_class; di->bas.chan = 0; - } else + } + if (class == NULL) return (ENXIO); /* Fill in the device info. */ + di->ops = uart_getops(class); di->bas.bst = &bst_store[devtype]; di->bas.bsh = sparc64_fake_bustag(space, addr, di->bas.bst); ==== //depot/projects/uart/dev/uart/uart_dev_ns8250.c#46 (text+ko) ==== @@ -220,7 +220,7 @@ static int ns8250_poll(struct uart_bas *bas); static int ns8250_getc(struct uart_bas *bas, struct mtx *); -struct uart_ops uart_ns8250_ops = { +static struct uart_ops uart_ns8250_ops = { .probe = ns8250_probe, .init = ns8250_init, .term = ns8250_term, @@ -368,9 +368,10 @@ }; struct uart_class uart_ns8250_class = { - "ns8250 class", + "ns8250", ns8250_methods, sizeof(struct ns8250_softc), + .uc_ops = &uart_ns8250_ops, .uc_range = 8, .uc_rclk = DEFAULT_RCLK }; ==== //depot/projects/uart/dev/uart/uart_dev_sab82532.c#42 (text+ko) ==== @@ -176,7 +176,7 @@ static int sab82532_poll(struct uart_bas *bas); static int sab82532_getc(struct uart_bas *bas, struct mtx *); -struct uart_ops uart_sab82532_ops = { +static struct uart_ops uart_sab82532_ops = { .probe = sab82532_probe, .init = sab82532_init, .term = sab82532_term, @@ -384,9 +384,10 @@ }; struct uart_class uart_sab82532_class = { - "sab82532 class", + "sab82532", sab82532_methods, sizeof(struct sab82532_softc), + .uc_ops = &uart_sab82532_ops, .uc_range = 64, .uc_rclk = DEFAULT_RCLK }; ==== //depot/projects/uart/dev/uart/uart_dev_z8530.c#33 (text+ko) ==== @@ -195,7 +195,7 @@ static int z8530_poll(struct uart_bas *bas); static int z8530_getc(struct uart_bas *bas, struct mtx *); -struct uart_ops uart_z8530_ops = { +static struct uart_ops uart_z8530_ops = { .probe = z8530_probe, .init = z8530_init, .term = z8530_term, @@ -300,9 +300,10 @@ }; struct uart_class uart_z8530_class = { - "z8530 class", + "z8530", z8530_methods, sizeof(struct z8530_softc), + .uc_ops = &uart_z8530_ops, .uc_range = 2, .uc_rclk = DEFAULT_RCLK }; ==== //depot/projects/uart/dev/uart/uart_kbd_sun.c#11 (text+ko) ==== @@ -719,8 +719,8 @@ if (*(int *)data & SLKED) c |= SKBD_LED_SCROLLLOCK; uart_lock(sc->sc_sysdev->hwmtx); - sc->sc_sysdev->ops.putc(&sc->sc_sysdev->bas, SKBD_CMD_SETLED); - sc->sc_sysdev->ops.putc(&sc->sc_sysdev->bas, c); + sc->sc_sysdev->ops->putc(&sc->sc_sysdev->bas, SKBD_CMD_SETLED); + sc->sc_sysdev->ops->putc(&sc->sc_sysdev->bas, c); uart_unlock(sc->sc_sysdev->hwmtx); KBD_LED_VAL(kbd) = *(int *)data; break; ==== //depot/projects/uart/dev/uart/uart_subr.c#7 (text+ko) ==== @@ -54,6 +54,12 @@ return (strtoul(*p, (char**)(uintptr_t)p, 0)); } +static struct uart_class * +uart_parse_class(struct uart_class *class, __const char **p) +{ + return (class); +} + static long uart_parse_long(__const char **p) { @@ -161,10 +167,15 @@ */ int -uart_getenv(int devtype, struct uart_devinfo *di) +uart_getenv(int devtype, struct uart_devinfo *di, struct uart_class *class) { __const char *spec; bus_addr_t addr = ~0U; + int error; + + /* We must get a valid default device class. */ + if (class == NULL) + return (EDOOFUS); /* * Check the environment variables "hw.uart.console" and @@ -203,7 +214,7 @@ di->databits = uart_parse_long(&spec); break; case UART_TAG_DT: - return (EINVAL); /* XXX not yet implemented. */ + class = uart_parse_class(class, &spec); break; case UART_TAG_IO: di->bas.bst = uart_bus_space_io; @@ -261,8 +272,9 @@ } else di->baudrate = 0; - /* XXX the size of the mapping depends on the UART class. */ - if (bus_space_map(di->bas.bst, addr, 8, 0, &di->bas.bsh) != 0) - return (EINVAL); - return (0); + /* Set the ops and create a bus space handle. */ + di->ops = uart_getops(class); + error = bus_space_map(di->bas.bst, addr, uart_getrange(class), 0, + &di->bas.bsh); + return (error); } From owner-p4-projects@FreeBSD.ORG Wed Nov 15 19:27:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3E5D616A574; Wed, 15 Nov 2006 19:27:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D97C716A4B3 for ; Wed, 15 Nov 2006 19:26:59 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A680B43D49 for ; Wed, 15 Nov 2006 19:26:59 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFJQxcu048995 for ; Wed, 15 Nov 2006 19:26:59 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFJQxuk048991 for perforce@freebsd.org; Wed, 15 Nov 2006 19:26:59 GMT (envelope-from sam@freebsd.org) Date: Wed, 15 Nov 2006 19:26:59 GMT Message-Id: <200611151926.kAFJQxuk048991@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 110050 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 19:27:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=110050 Change 110050 by sam@sam_ebb on 2006/11/15 19:26:39 o change to using bit set/clr-style macros; this is more clear to me and closer to what's used on other platforms (which simplifies comparison) o correct initialization The bit operations now match linux but our bb'ing transfer method appears to be wrong. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_iic.c#3 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_iic.c#3 (text+ko) ==== @@ -51,6 +51,12 @@ #define I2C_DELAY 10 +/* bit clr/set shorthands */ +#define GPIO_CONF_CLR(sc, reg, mask) \ + GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, reg) &~ (mask)) +#define GPIO_CONF_SET(sc, reg, mask) \ + GPIO_CONF_WRITE_4(sc, reg, GPIO_CONF_READ_4(sc, reg) | (mask)) + struct ixpiic_softc { device_t sc_dev; bus_space_tag_t sc_iot; @@ -71,8 +77,6 @@ static int ixpiic_attach(device_t dev) { - uint32_t reg; - struct ixpiic_softc *sc = device_get_softc(dev); struct ixp425_softc *sa = device_get_softc(device_get_parent(dev)); @@ -82,15 +86,11 @@ sc->sc_iot = sa->sc_iot; sc->sc_gpio_ioh = sa->sc_gpio_ioh; - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); - reg |= GPIO_I2C_SDA_BIT | GPIO_I2C_SCL_BIT; - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); + GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, + GPIO_I2C_SCL_BIT | GPIO_I2C_SDA_BIT); + GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, + GPIO_I2C_SCL_BIT | GPIO_I2C_SDA_BIT); - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER); - reg &= ~GPIO_I2C_SCL_BIT; - reg |= GPIO_I2C_SDA_BIT; - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, reg); - /* add generic bit-banging code */ if ((sc->iicbb = device_add_child(dev, "iicbb", -1)) == NULL) device_printf(dev, "could not add iicbb\n"); @@ -99,7 +99,6 @@ device_probe_and_attach(sc->iicbb); return (0); - } static int @@ -114,9 +113,7 @@ struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER); - reg |= GPIO_I2C_SCL_BIT; - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, reg); + GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); return (reg & GPIO_I2C_SCL_BIT); @@ -128,9 +125,7 @@ struct ixpiic_softc *sc = ixpiic_sc; uint32_t reg; - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER); - reg |= GPIO_I2C_SDA_BIT; - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, reg); + GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPINR); return (reg & GPIO_I2C_SDA_BIT); @@ -140,20 +135,12 @@ ixpiic_setsda(device_t dev, char val) { struct ixpiic_softc *sc = ixpiic_sc; - uint32_t reg; - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); - reg &= ~GPIO_I2C_SDA_BIT; - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); - - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER); - + GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SDA_BIT); if (val) - reg |= GPIO_I2C_SDA_BIT; + GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); else - reg &= ~GPIO_I2C_SDA_BIT; - - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, reg); + GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SDA_BIT); DELAY(I2C_DELAY); } @@ -161,20 +148,12 @@ ixpiic_setscl(device_t dev, char val) { struct ixpiic_softc *sc = ixpiic_sc; - uint32_t reg; - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOUTR); - reg &= ~GPIO_I2C_SCL_BIT; - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOUTR, reg); - - reg = GPIO_CONF_READ_4(sc, IXP425_GPIO_GPOER); - + GPIO_CONF_CLR(sc, IXP425_GPIO_GPOUTR, GPIO_I2C_SCL_BIT); if (val) - reg |= GPIO_I2C_SCL_BIT; + GPIO_CONF_SET(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); else - reg &= ~GPIO_I2C_SCL_BIT; - - GPIO_CONF_WRITE_4(sc, IXP425_GPIO_GPOER, reg); + GPIO_CONF_CLR(sc, IXP425_GPIO_GPOER, GPIO_I2C_SCL_BIT); DELAY(I2C_DELAY); } From owner-p4-projects@FreeBSD.ORG Wed Nov 15 19:32:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D742916A4C2; Wed, 15 Nov 2006 19:32:14 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8513616A47C for ; Wed, 15 Nov 2006 19:32:14 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B5DAF43E8C for ; Wed, 15 Nov 2006 19:30:35 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFJU5jt051616 for ; Wed, 15 Nov 2006 19:30:05 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFJU5ZM051601 for perforce@freebsd.org; Wed, 15 Nov 2006 19:30:05 GMT (envelope-from sam@freebsd.org) Date: Wed, 15 Nov 2006 19:30:05 GMT Message-Id: <200611151930.kAFJU5ZM051601@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 110051 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 19:32:15 -0000 http://perforce.freebsd.org/chv.cgi?CH=110051 Change 110051 by sam@sam_ebb on 2006/11/15 19:29:06 I2C chip driver for DS1672 RTC chip; probably belongs in a more generic location. This does not work yet; there's problems with doing transfers. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ds1672.c#1 add .. //depot/projects/arm/src/sys/arm/xscale/ixp425/files.avila#4 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/files.avila#4 (text+ko) ==== @@ -1,4 +1,5 @@ #$FreeBSD$ arm/xscale/ixp425/avila_machdep.c standard arm/xscale/ixp425/avila_ata.c optional ata_avila +arm/xscale/ixp425/ds1672.c optional rtc_avila arm/xscale/ixp425/ixdp425_pci.c optional pci From owner-p4-projects@FreeBSD.ORG Wed Nov 15 20:48:54 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id CC01916A47C; Wed, 15 Nov 2006 20:48:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A6D1816A40F for ; Wed, 15 Nov 2006 20:48:54 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3AD6643E9E for ; Wed, 15 Nov 2006 20:46:56 +0000 (GMT) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFKkkwM066955 for ; Wed, 15 Nov 2006 20:46:46 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFKkkad066952 for perforce@freebsd.org; Wed, 15 Nov 2006 20:46:46 GMT (envelope-from jkim@freebsd.org) Date: Wed, 15 Nov 2006 20:46:46 GMT Message-Id: <200611152046.kAFKkkad066952@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 110058 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 20:48:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=110058 Change 110058 by jkim@jkim_hammer on 2006/11/15 20:46:21 Redo 109706 and 109712. Copyin/copyout for message type is separated from kern_msgsnd() and kern_msgrcv() and it is done from its rwapper. It is still not optimal but better than the previous implementation. Fix printf formats for debugging while I am here. Add msgsz boundary check as Linux kernel does but MSGMAX check is not done because of implementation difference. This fixes LTP test case msgrcv03. Note: LTP does not need user intervention any more! Affected files ... .. //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_misc.c#6 edit .. //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#4 edit .. //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#6 edit .. //depot/projects/linuxolator/src/sys/sys/syscallsubr.h#2 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/freebsd32/freebsd32_misc.c#6 (text+ko) ==== @@ -91,10 +91,6 @@ #include #include -/* XXX This should not be here. */ -int do_msgsnd(struct thread *, struct msgsnd_args *, size_t); -int do_msgrcv(struct thread *, struct msgrcv_args *, size_t); - CTASSERT(sizeof(struct timeval32) == 8); CTASSERT(sizeof(struct timespec32) == 8); CTASSERT(sizeof(struct statfs32) == 256); @@ -1360,34 +1356,41 @@ int freebsd32_msgsnd(struct thread *td, struct freebsd32_msgsnd_args *uap) { - struct msgsnd_args ap; + const void *msgp; + long mtype; + int32_t mtype32; + int error; if (!SYSCALL_MODULE_PRESENT(msgsnd)) return (nosys(td, (struct nosys_args *)uap)); - ap.msqid = uap->msqid; - ap.msgp = PTRIN(uap->msgp); - ap.msgsz = uap->msgsz; - ap.msgflg = uap->msgflg; - - return (do_msgsnd(td, &ap, sizeof(int32_t))); + msgp = PTRIN(uap->msgp); + if ((error = copyin(msgp, &mtype32, sizeof(mtype32))) != 0) + return (error); + mtype = mtype32; + return (kern_msgsnd(td, uap->msqid, + (const char *)msgp + sizeof(mtype32), + uap->msgsz, uap->msgflg, mtype)); } int freebsd32_msgrcv(struct thread *td, struct freebsd32_msgrcv_args *uap) { - struct msgrcv_args ap; + void *msgp; + long mtype; + int32_t mtype32; + int error; if (!SYSCALL_MODULE_PRESENT(msgrcv)) return (nosys(td, (struct nosys_args *)uap)); - ap.msqid = uap->msqid; - ap.msgp = PTRIN(uap->msgp); - ap.msgsz = uap->msgsz; - ap.msgtyp = uap->msgtyp; - ap.msgflg = uap->msgflg; - - return (do_msgrcv(td, &ap, sizeof(int32_t))); + msgp = PTRIN(uap->msgp); + if ((error = kern_msgrcv(td, uap->msqid, + (char *)msgp + sizeof(mtype32), uap->msgsz, + uap->msgtyp, uap->msgflg, &mtype)) != 0) + return (error); + mtype32 = (int32_t)mtype; + return (copyout(&mtype32, msgp, sizeof(mtype32))); } int ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#4 (text+ko) ==== @@ -83,10 +83,6 @@ l_ulong swap_successes; }; -/* XXX This should not be here. */ -int do_msgsnd(struct thread *, struct msgsnd_args *, size_t); -int do_msgrcv(struct thread *, struct msgrcv_args *, size_t); - static void bsd_to_linux_shminfo( struct shminfo *bpp, struct l_shminfo *lpp) { @@ -579,39 +575,39 @@ int linux_msgsnd(struct thread *td, struct linux_msgsnd_args *args) { - struct msgsnd_args /* { - int msqid; - void *msgp; - size_t msgsz; - int msgflg; - } */ bsd_args; + const void *msgp; + long mtype; + l_long lmtype; + int error; - bsd_args.msqid = args->msqid; - bsd_args.msgp = PTRIN(args->msgp); - bsd_args.msgsz = args->msgsz; - bsd_args.msgflg = args->msgflg; - - return (do_msgsnd(td, &bsd_args, sizeof(l_long))); + if ((l_long)args->msgsz < 0) + return (EINVAL); + msgp = PTRIN(args->msgp); + if ((error = copyin(msgp, &lmtype, sizeof(lmtype))) != 0) + return (error); + mtype = (long)lmtype; + return (kern_msgsnd(td, args->msqid, + (const char *)msgp + sizeof(lmtype), + args->msgsz, args->msgflg, mtype)); } int linux_msgrcv(struct thread *td, struct linux_msgrcv_args *args) { - struct msgrcv_args /* { - int msqid; - void *msgp; - size_t msgsz; - long msgtyp; - int msgflg; - } */ bsd_args; + void *msgp; + long mtype; + l_long lmtype; + int error; - bsd_args.msqid = args->msqid; - bsd_args.msgp = PTRIN(args->msgp); - bsd_args.msgsz = args->msgsz; - bsd_args.msgtyp = args->msgtyp; - bsd_args.msgflg = args->msgflg; - - return (do_msgrcv(td, &bsd_args, sizeof(l_long))); + if ((l_long)args->msgsz < 0) + return (EINVAL); + msgp = PTRIN(args->msgp); + if ((error = kern_msgrcv(td, args->msqid, + (char *)msgp + sizeof(lmtype), args->msgsz, + args->msgtyp, args->msgflg, &mtype)) != 0) + return (error); + lmtype = (l_long)mtype; + return (copyout(&lmtype, msgp, sizeof(lmtype))); } int ==== //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#6 (text+ko) ==== @@ -396,7 +396,7 @@ struct msqid_ds msqbuf; int error; - DPRINTF(("call to msgctl(%d, %d, 0x%x)\n", msqid, cmd, uap->buf)); + DPRINTF(("call to msgctl(%d, %d, %p)\n", msqid, cmd, uap->buf)); if (cmd == IPC_SET && (error = copyin(uap->buf, &msqbuf, sizeof(msqbuf))) != 0) return (error); @@ -662,11 +662,6 @@ return (error); } -union msgtyp { - long mtype; - int32_t mtype32; -}; - #ifndef _SYS_SYSPROTO_H_ struct msgsnd_args { int msqid; @@ -676,50 +671,40 @@ }; #endif -/* XXX This should not be here. */ -int do_msgsnd(struct thread *, struct msgsnd_args *, size_t); - int -do_msgsnd(td, uap, mtsz) +kern_msgsnd(td, msqid, msgp, msgsz, msgflg, mtype) struct thread *td; - register struct msgsnd_args *uap; - size_t mtsz; + int msqid; + const void *msgp; /* XXX msgp is actually mtext. */ + size_t msgsz; + int msgflg; + long mtype; { - union msgtyp msgt; - int msqid = uap->msqid; - const void *user_msgp = uap->msgp; - size_t msgsz = uap->msgsz; - int msgflg = uap->msgflg; - int segs_needed, error = 0; + int msqix, segs_needed, error = 0; register struct msqid_kernel *msqkptr; register struct msg *msghdr; short next; - DPRINTF(("call to msgsnd(%d, 0x%x, %d, %d)\n", msqid, user_msgp, msgsz, - msgflg)); if (!jail_sysvipc_allowed && jailed(td->td_ucred)) return (ENOSYS); - if (mtsz != sizeof(msgt.mtype) && mtsz != sizeof(msgt.mtype32)) - return (EINVAL); - mtx_lock(&msq_mtx); - msqid = IPCID_TO_IX(msqid); + msqix = IPCID_TO_IX(msqid); - if (msqid < 0 || msqid >= msginfo.msgmni) { - DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqid, + if (msqix < 0 || msqix >= msginfo.msgmni) { + DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqix, msginfo.msgmni)); error = EINVAL; goto done2; } - msqkptr = &msqids[msqid]; + msqkptr = &msqids[msqix]; if (msqkptr->u.msg_qbytes == 0) { DPRINTF(("no such message queue id\n")); error = EINVAL; goto done2; } - if (msqkptr->u.msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) { + if (msqkptr->u.msg_perm.seq != IPCID_TO_SEQ(msqid)) { DPRINTF(("wrong sequence number\n")); error = EINVAL; goto done2; @@ -737,8 +722,8 @@ #endif segs_needed = (msgsz + msginfo.msgssz - 1) / msginfo.msgssz; - DPRINTF(("msgsz=%d, msgssz=%d, segs_needed=%d\n", msgsz, msginfo.msgssz, - segs_needed)); + DPRINTF(("msgsz=%zu, msgssz=%d, segs_needed=%d\n", msgsz, + msginfo.msgssz, segs_needed)); for (;;) { int need_more_resources = 0; @@ -849,6 +834,7 @@ free_msghdrs = msghdr->msg_next; msghdr->msg_spot = -1; msghdr->msg_ts = msgsz; + msghdr->msg_type = mtype; #ifdef MAC /* * XXXMAC: Should the mac_check_sysv_msgmsq check follow here @@ -881,23 +867,6 @@ } /* - * Copy in the message type - */ - - mtx_unlock(&msq_mtx); - if ((error = copyin(user_msgp, &msgt, mtsz)) != 0) { - mtx_lock(&msq_mtx); - DPRINTF(("error %d copying the message type\n", error)); - msg_freehdr(msghdr); - msqkptr->u.msg_perm.mode &= ~MSG_LOCKED; - wakeup(msqkptr); - goto done2; - } - msghdr->msg_type = (mtsz == sizeof(long)) ? msgt.mtype : msgt.mtype32; - mtx_lock(&msq_mtx); - user_msgp = (const char *)user_msgp + mtsz; - - /* * Validate the message type */ @@ -905,7 +874,7 @@ msg_freehdr(msghdr); msqkptr->u.msg_perm.mode &= ~MSG_LOCKED; wakeup(msqkptr); - DPRINTF(("mtype (%d) < 1\n", msghdr->msg_type)); + DPRINTF(("mtype (%ld) < 1\n", msghdr->msg_type)); error = EINVAL; goto done2; } @@ -926,7 +895,7 @@ if (next >= msginfo.msgseg) panic("next out of range #2"); mtx_unlock(&msq_mtx); - if ((error = copyin(user_msgp, &msgpool[next * msginfo.msgssz], + if ((error = copyin(msgp, &msgpool[next * msginfo.msgssz], tlen)) != 0) { mtx_lock(&msq_mtx); DPRINTF(("error %d copying in message segment\n", @@ -938,7 +907,7 @@ } mtx_lock(&msq_mtx); msgsz -= tlen; - user_msgp = (const char *)user_msgp + tlen; + msgp = (const char *)msgp + tlen; next = msgmaps[next].next; } if (next != -1) @@ -1013,7 +982,19 @@ struct thread *td; register struct msgsnd_args *uap; { - return (do_msgsnd(td, uap, sizeof(long))); + int error; + long mtype; + + DPRINTF(("call to msgsnd(%d, %p, %zu, %d)\n", uap->msqid, uap->msgp, + uap->msgsz, uap->msgflg)); + + if ((error = copyin(uap->msgp, &mtype, sizeof(mtype))) != 0) { + DPRINTF(("error %d copying the message type\n", error)); + return (error); + } + return (kern_msgsnd(td, uap->msqid, + (const char *)uap->msgp + sizeof(mtype), + uap->msgsz, uap->msgflg, mtype)); } #ifndef _SYS_SYSPROTO_H_ @@ -1026,52 +1007,41 @@ }; #endif -/* XXX This should not be here. */ -int do_msgrcv(struct thread *, struct msgrcv_args *, size_t); - int -do_msgrcv(td, uap, mtsz) +kern_msgrcv(td, msqid, msgp, msgsz, msgtyp, msgflg, mtype) struct thread *td; - register struct msgrcv_args *uap; - size_t mtsz; + int msqid; + void *msgp; /* XXX msgp is actually mtext. */ + size_t msgsz; + long msgtyp; + int msgflg; + long *mtype; { - union msgtyp msgt; - int msqid = uap->msqid; - void *user_msgp = uap->msgp; - size_t msgsz = uap->msgsz; - long msgtyp = uap->msgtyp; - int msgflg = uap->msgflg; size_t len; register struct msqid_kernel *msqkptr; register struct msg *msghdr; - int error = 0; + int msqix, error = 0; short next; - DPRINTF(("call to msgrcv(%d, 0x%x, %d, %ld, %d)\n", msqid, user_msgp, - msgsz, msgtyp, msgflg)); - if (!jail_sysvipc_allowed && jailed(td->td_ucred)) return (ENOSYS); - if (mtsz != sizeof(msgt.mtype) && mtsz != sizeof(msgt.mtype32)) - return (EINVAL); + msqix = IPCID_TO_IX(msqid); - msqid = IPCID_TO_IX(msqid); - - if (msqid < 0 || msqid >= msginfo.msgmni) { - DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqid, + if (msqix < 0 || msqix >= msginfo.msgmni) { + DPRINTF(("msqid (%d) out of range (0<=msqid<%d)\n", msqix, msginfo.msgmni)); return (EINVAL); } - msqkptr = &msqids[msqid]; + msqkptr = &msqids[msqix]; mtx_lock(&msq_mtx); if (msqkptr->u.msg_qbytes == 0) { DPRINTF(("no such message queue id\n")); error = EINVAL; goto done2; } - if (msqkptr->u.msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) { + if (msqkptr->u.msg_perm.seq != IPCID_TO_SEQ(msqid)) { DPRINTF(("wrong sequence number\n")); error = EINVAL; goto done2; @@ -1096,7 +1066,7 @@ if (msgsz < msghdr->msg_ts && (msgflg & MSG_NOERROR) == 0) { DPRINTF(("first message on the queue " - "is too big (want %d, got %d)\n", + "is too big (want %zu, got %d)\n", msgsz, msghdr->msg_ts)); error = E2BIG; goto done2; @@ -1134,14 +1104,14 @@ if (msgtyp == msghdr->msg_type || msghdr->msg_type <= -msgtyp) { - DPRINTF(("found message type %d, " - "requested %d\n", + DPRINTF(("found message type %ld, " + "requested %ld\n", msghdr->msg_type, msgtyp)); if (msgsz < msghdr->msg_ts && (msgflg & MSG_NOERROR) == 0) { DPRINTF(("requested message " "on the queue is too big " - "(want %d, got %d)\n", + "(want %zu, got %hu)\n", msgsz, msghdr->msg_ts)); error = E2BIG; goto done2; @@ -1191,7 +1161,7 @@ */ if ((msgflg & IPC_NOWAIT) != 0) { - DPRINTF(("no appropriate message found (msgtyp=%d)\n", + DPRINTF(("no appropriate message found (msgtyp=%ld)\n", msgtyp)); /* The SVID says to return ENOMSG. */ error = ENOMSG; @@ -1218,7 +1188,7 @@ */ if (msqkptr->u.msg_qbytes == 0 || - msqkptr->u.msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) { + msqkptr->u.msg_perm.seq != IPCID_TO_SEQ(msqid)) { DPRINTF(("msqid deleted\n")); error = EIDRM; goto done2; @@ -1242,31 +1212,13 @@ * (since msgsz is never increased). */ - DPRINTF(("found a message, msgsz=%d, msg_ts=%d\n", msgsz, + DPRINTF(("found a message, msgsz=%zu, msg_ts=%hu\n", msgsz, msghdr->msg_ts)); if (msgsz > msghdr->msg_ts) msgsz = msghdr->msg_ts; + *mtype = msghdr->msg_type; /* - * Return the type to the user. - */ - - mtx_unlock(&msq_mtx); - if (mtsz == sizeof(long)) - msgt.mtype = msghdr->msg_type; - else - msgt.mtype32 = msghdr->msg_type; - error = copyout(&msgt, user_msgp, mtsz); - mtx_lock(&msq_mtx); - if (error != 0) { - DPRINTF(("error (%d) copying out message type\n", error)); - msg_freehdr(msghdr); - wakeup(msqkptr); - goto done2; - } - user_msgp = (char *)user_msgp + mtsz; - - /* * Return the segments to the user */ @@ -1283,8 +1235,7 @@ if (next >= msginfo.msgseg) panic("next out of range #3"); mtx_unlock(&msq_mtx); - error = copyout(&msgpool[next * msginfo.msgssz], - user_msgp, tlen); + error = copyout(&msgpool[next * msginfo.msgssz], msgp, tlen); mtx_lock(&msq_mtx); if (error != 0) { DPRINTF(("error (%d) copying out message segment\n", @@ -1293,7 +1244,7 @@ wakeup(msqkptr); goto done2; } - user_msgp = (char *)user_msgp + tlen; + msgp = (char *)msgp + tlen; next = msgmaps[next].next; } @@ -1317,7 +1268,19 @@ struct thread *td; register struct msgrcv_args *uap; { - return (do_msgrcv(td, uap, sizeof(long))); + int error; + long mtype; + + DPRINTF(("call to msgrcv(%d, %p, %zu, %ld, %d)\n", uap->msqid, + uap->msgp, uap->msgsz, uap->msgtyp, uap->msgflg)); + + if ((error = kern_msgrcv(td, uap->msqid, + (char *)uap->msgp + sizeof(mtype), uap->msgsz, + uap->msgtyp, uap->msgflg, &mtype)) != 0) + return (error); + if ((error = copyout(&mtype, uap->msgp, sizeof(mtype))) != 0) + DPRINTF(("error %d copying the message type\n", error)); + return (error); } static int ==== //depot/projects/linuxolator/src/sys/sys/syscallsubr.h#2 (text+ko) ==== @@ -114,6 +114,8 @@ int kern_mknod(struct thread *td, char *path, enum uio_seg pathseg, int mode, int dev); int kern_msgctl(struct thread *, int, int, struct msqid_ds *); +int kern_msgsnd(struct thread *, int, const void *, size_t, int, long); +int kern_msgrcv(struct thread *, int, void *, size_t, long, int, long *); int kern_nanosleep(struct thread *td, struct timespec *rqt, struct timespec *rmt); int kern_open(struct thread *td, char *path, enum uio_seg pathseg, From owner-p4-projects@FreeBSD.ORG Wed Nov 15 21:40:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 8016116A4A7; Wed, 15 Nov 2006 21:40:55 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 56BB916A407 for ; Wed, 15 Nov 2006 21:40:55 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A56D943D60 for ; Wed, 15 Nov 2006 21:40:54 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFLesFV087027 for ; Wed, 15 Nov 2006 21:40:54 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFLerK2087024 for perforce@freebsd.org; Wed, 15 Nov 2006 21:40:53 GMT (envelope-from jhb@freebsd.org) Date: Wed, 15 Nov 2006 21:40:53 GMT Message-Id: <200611152140.kAFLerK2087024@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 110061 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 21:40:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=110061 Change 110061 by jhb@jhb_mutex on 2006/11/15 21:39:52 IFC @110060. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/db_trace.c#21 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#60 integrate .. //depot/projects/smpng/sys/amd64/amd64/msi.c#2 integrate .. //depot/projects/smpng/sys/amd64/include/reg.h#6 integrate .. //depot/projects/smpng/sys/compat/linux/linux_emul.c#4 integrate .. //depot/projects/smpng/sys/compat/linux/linux_misc.c#75 integrate .. //depot/projects/smpng/sys/conf/NOTES#131 integrate .. //depot/projects/smpng/sys/conf/files#191 integrate .. //depot/projects/smpng/sys/dev/bce/if_bce.c#8 integrate .. //depot/projects/smpng/sys/dev/em/if_em.c#77 integrate .. //depot/projects/smpng/sys/dev/em/if_em.h#38 integrate .. //depot/projects/smpng/sys/dev/fxp/if_fxp.c#77 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt.h#17 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#25 integrate .. //depot/projects/smpng/sys/dev/pci/pcivar.h#22 integrate .. //depot/projects/smpng/sys/dev/usb/uark.c#1 branch .. //depot/projects/smpng/sys/dev/usb/usbdevs#97 integrate .. //depot/projects/smpng/sys/i386/i386/db_trace.c#33 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#119 integrate .. //depot/projects/smpng/sys/i386/i386/msi.c#2 integrate .. //depot/projects/smpng/sys/i386/include/reg.h#10 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#106 integrate .. //depot/projects/smpng/sys/modules/Makefile#130 integrate .. //depot/projects/smpng/sys/modules/uark/Makefile#1 branch .. //depot/projects/smpng/sys/sun4v/include/asmacros.h#2 integrate .. //depot/projects/smpng/sys/sun4v/include/tte_hash.h#2 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/exception.S#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/interrupt.S#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/tte_hash.c#2 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/db_trace.c#21 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.76 2006/10/20 09:44:20 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.77 2006/11/15 19:53:47 jhb Exp $"); #include #include @@ -202,8 +202,8 @@ static char * watchtype_str(int type); int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, - int access, struct dbreg * d); -int amd64_clr_watch(int watchnum, struct dbreg * d); + int access, struct dbreg *d); +int amd64_clr_watch(int watchnum, struct dbreg *d); /* * Figure out how many arguments were passed into the frame at "fp". @@ -536,11 +536,11 @@ unsigned long watchaddr; int size; int access; - struct dbreg * d; + struct dbreg *d; { int i; unsigned int mask; - + if (watchnum == -1) { for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) if ((d->dr[7] & mask) == 0) @@ -550,7 +550,7 @@ else return (-1); } - + switch (access) { case DBREG_DR7_EXEC: size = 1; /* size must be 1 for an execution breakpoint */ @@ -558,9 +558,10 @@ case DBREG_DR7_WRONLY: case DBREG_DR7_RDWR: break; - default : return (-1); + default: + return (-1); } - + /* * we can watch a 1, 2, or 4 byte sized location */ @@ -577,7 +578,7 @@ d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); /* set drN register to the address, N=watchnum */ - DBREG_DRX(d,watchnum) = watchaddr; + DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); @@ -589,15 +590,15 @@ int amd64_clr_watch(watchnum, d) int watchnum; - struct dbreg * d; + struct dbreg *d; { if (watchnum < 0 || watchnum >= 4) return (-1); - + d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); - DBREG_DRX(d,watchnum) = 0; - + DBREG_DRX(d, watchnum) = 0; + return (0); } @@ -607,22 +608,21 @@ db_expr_t addr; db_expr_t size; { - int avail, wsize; - int i; struct dbreg d; - + int avail, i, wsize; + fill_dbregs(NULL, &d); - + avail = 0; - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if ((d.dr[7] & (3 << (i*2))) == 0) avail++; } - - if (avail*4 < size) + + if (avail * 4 < size) return (-1); - - for (i=0; i<4 && (size != 0); i++) { + + for (i = 0; i < 4 && (size != 0); i++) { if ((d.dr[7] & (3<<(i*2))) == 0) { if (size > 4) wsize = 4; @@ -630,15 +630,15 @@ wsize = size; if (wsize == 3) wsize++; - amd64_set_watch(i, addr, wsize, + amd64_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; } } - + set_dbregs(NULL, &d); - + return(0); } @@ -653,22 +653,22 @@ fill_dbregs(NULL, &d); - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if (d.dr[7] & (3 << (i*2))) { - if ((DBREG_DRX((&d), i) >= addr) && + if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) amd64_clr_watch(i, &d); - + } } - + set_dbregs(NULL, &d); - + return(0); } -static +static char * watchtype_str(type) int type; @@ -685,30 +685,29 @@ void db_md_list_watchpoints() { - int i; struct dbreg d; + int i, len, type; fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (d.dr[7] & (0x03 << (i*2))) { - unsigned type, len; type = (d.dr[7] >> (16+(i*4))) & 3; len = (d.dr[7] >> (16+(i*4)+2)) & 3; db_printf(" %-5d %-8s %10s %3d 0x%016lx\n", - i, "enabled", watchtype_str(type), + i, "enabled", watchtype_str(type), len + 1, DBREG_DRX((&d), i)); } else { db_printf(" %-5d disabled\n", i); } } - + db_printf("\ndebug register values:\n"); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX((&d), i)); } db_printf("\n"); ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#60 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.661 2006/11/15 19:53:47 jhb Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1832,9 +1832,8 @@ addr[nbp++] = (caddr_t)rdr3(); } - for (i=0; i -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.1 2006/11/13 22:23:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); #include #include @@ -315,7 +315,7 @@ /* We need count - cnt more sources starting at index 'cnt'. */ *newirq = cnt; *newcount = count - cnt; - for (j = 0; j < *newirq; j++) { + for (j = 0; j < *newcount; j++) { /* Create a new MSI source. */ msi = malloc(sizeof(struct msi_intsrc), M_MSI, ==== //depot/projects/smpng/sys/amd64/include/reg.h#6 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/reg.h,v 1.35 2004/04/05 23:55:14 imp Exp $ + * $FreeBSD: src/sys/amd64/include/reg.h,v 1.36 2006/11/15 19:53:48 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -92,11 +92,13 @@ /* Index 8-15: reserved */ }; -#define DBREG_DR7_EXEC 0x00 /* break on execute */ -#define DBREG_DR7_WRONLY 0x01 /* break on write */ -#define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by - register number */ +#define DBREG_DR7_EXEC 0x00 /* break on execute */ +#define DBREG_DR7_WRONLY 0x01 /* break on write */ +#define DBREG_DR7_RDWR 0x03 /* break on read or write */ + +#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by + register number */ + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. ==== //depot/projects/smpng/sys/compat/linux/linux_emul.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.8 2006/10/28 10:59:59 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.9 2006/11/15 11:04:37 kib Exp $"); #include "opt_compat.h" @@ -85,7 +85,7 @@ em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; em->pdeath_signal = 0; - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* handled later in the code */ } else { struct linux_emuldata_shared *s; @@ -117,10 +117,10 @@ * the newly created proc */ if (child != 0) { - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* lookup the parent */ p_em = em_find(td->td_proc, EMUL_LOCKED); - KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n")); em->shared = p_em->shared; em->shared->refs++; } else { ==== //depot/projects/smpng/sys/compat/linux/linux_misc.c#75 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.193 2006/11/11 16:26:55 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.194 2006/11/15 10:01:06 kib Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -802,7 +802,7 @@ * this is necessary because the test in kern_wait doesnt * work because we mess with the options here */ - if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED)) + if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED|__WCLONE)) return (EINVAL); options = (args->options & (WNOHANG | WUNTRACED)); ==== //depot/projects/smpng/sys/conf/NOTES#131 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1399 2006/11/11 23:37:52 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1400 2006/11/15 09:13:24 maxim Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2397,6 +2397,8 @@ # # USB serial support device ucom +# USB support for Technologies ARK3116 based serial adapters +device uark # USB support for Belkin F5U103 and compatible serial adapters device ubsa # USB support for BWCT console serial adapters ==== //depot/projects/smpng/sys/conf/files#191 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1161 2006/11/11 16:26:56 trhodes Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1162 2006/11/15 09:13:24 maxim Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1037,6 +1037,7 @@ dev/usb/ohci_pci.c optional ohci pci dev/usb/sl811hs.c optional slhci dev/usb/slhci_pccard.c optional slhci pccard +dev/usb/uark.c optional uark dev/usb/ubsa.c optional ubsa dev/usb/ubser.c optional ubser dev/usb/ucom.c optional ucom ==== //depot/projects/smpng/sys/dev/bce/if_bce.c#8 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.18 2006/10/31 03:28:25 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.19 2006/11/15 20:04:56 jhb Exp $"); /* * The following controllers are supported by this driver: @@ -452,7 +452,7 @@ struct bce_softc *sc; struct ifnet *ifp; u32 val; - int mbuf, rid, rc = 0; + int count, mbuf, rid, rc = 0; sc = device_get_softc(dev); sc->bce_dev = dev; @@ -485,7 +485,12 @@ sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res); /* Allocate PCI IRQ resources. */ - rid = 0; + count = pci_msi_count(dev); + if (count == 1 && pci_alloc_msi(dev, &count) == 0) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + } else + rid = 0; sc->bce_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -2539,9 +2544,12 @@ if (sc->bce_irq != NULL) bus_release_resource(dev, SYS_RES_IRQ, - 0, + sc->bce_flags & BCE_USING_MSI_FLAG ? 1 : 0, sc->bce_irq); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + pci_release_msi(dev); + if (sc->bce_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, ==== //depot/projects/smpng/sys/dev/em/if_em.c#77 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.163 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.164 2006/11/15 20:04:56 jhb Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -2200,7 +2200,12 @@ rman_get_bushandle(adapter->flash_mem); } - rid = 0x0; + val = pci_msi_count(dev); + if (val == 1 && pci_alloc_msi(dev, &val) == 0) { + rid = 1; + adapter->msi = 1; + } else + rid = 0; adapter->res_interrupt = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (adapter->res_interrupt == NULL) { @@ -2279,7 +2284,11 @@ device_t dev = adapter->dev; if (adapter->res_interrupt != NULL) - bus_release_resource(dev, SYS_RES_IRQ, 0, adapter->res_interrupt); + bus_release_resource(dev, SYS_RES_IRQ, adapter->msi ? 1 : 0, + adapter->res_interrupt); + + if (adapter->msi) + pci_release_msi(dev); if (adapter->res_memory != NULL) bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), ==== //depot/projects/smpng/sys/dev/em/if_em.h#38 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.55 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.56 2006/11/15 20:04:56 jhb Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -288,6 +288,7 @@ struct callout tx_fifo_timer; int watchdog_timer; int io_rid; + int msi; int if_flags; struct mtx mtx; int em_insert_vlan_header; ==== //depot/projects/smpng/sys/dev/fxp/if_fxp.c#77 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.259 2006/11/06 12:19:43 rink Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.260 2006/11/14 18:54:31 rink Exp $"); /* * Intel EtherExpress Pro/100B PCI Fast Ethernet driver @@ -179,6 +179,7 @@ { 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, { 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, { 0x1092, -1, "Intel Pro/100 VE Network Connection" }, + { 0x1093, -1, "Intel Pro/100 VM Network Connection" }, { 0x1094, -1, "Intel Pro/100 946GZ (ICH7) Network Connection" }, { 0x1209, -1, "Intel 82559ER Embedded 10/100 Ethernet" }, { 0x1229, 0x01, "Intel 82557 Pro/100 Ethernet" }, ==== //depot/projects/smpng/sys/dev/mpt/mpt.h#17 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.30 2006/09/07 23:08:21 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/mpt/mpt.h,v 1.31 2006/11/15 20:04:57 jhb Exp $ */ /*- * Generic defines for LSI '909 FC adapters. * FreeBSD Version. @@ -599,6 +599,7 @@ /* * PCI Hardware info */ + int pci_msi_count; struct resource * pci_irq; /* Interrupt map for chip */ void * ih; /* Interupt handle */ struct mpt_pci_cfg pci_cfg; /* saved PCI conf registers */ ==== //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#25 (text+ko) ==== @@ -99,7 +99,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.38 2006/09/08 05:27:04 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.40 2006/11/15 20:18:09 mjacob Exp $"); #include #include @@ -512,6 +512,15 @@ /* Get a handle to the interrupt */ iqd = 0; +#if 0 + if (pci_msi_count(dev) == 1) { + mpt->pci_msi_count = 1; + if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) + iqd = 1; + else + mpt->pci_msi_count = 0; + } +#endif mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, RF_ACTIVE | RF_SHAREABLE); if (mpt->pci_irq == NULL) { @@ -608,10 +617,16 @@ } if (mpt->pci_irq) { - bus_release_resource(mpt->dev, SYS_RES_IRQ, 0, mpt->pci_irq); + bus_release_resource(mpt->dev, SYS_RES_IRQ, + mpt->pci_msi_count ? 1 : 0, mpt->pci_irq); mpt->pci_irq = 0; } + if (mpt->pci_msi_count) { + pci_release_msi(mpt->dev); + mpt->pci_msi_count = 0; + } + if (mpt->pci_pio_reg) { bus_release_resource(mpt->dev, SYS_RES_IOPORT, mpt->pci_pio_rid, mpt->pci_pio_reg); ==== //depot/projects/smpng/sys/dev/pci/pcivar.h#22 (text+ko) ==== @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.73 2006/11/13 21:47:30 jhb Exp $ + * $FreeBSD: src/sys/dev/pci/pcivar.h,v 1.74 2006/11/14 17:54:55 jhb Exp $ * */ @@ -84,10 +84,10 @@ uint16_t msi_data; /* Contents of data register. */ }; -/* Interesting values for PCI MSI */ +/* Interesting values for PCI MSI-X */ struct pcicfg_msix { uint16_t msix_ctrl; /* Message Control */ - uint8_t msix_location; /* Offset of MSI capability registers. */ + uint8_t msix_location; /* Offset of MSI-X capability registers. */ uint16_t msix_msgnum; /* Number of messages */ int msix_alloc; /* Number of allocated messages. */ uint8_t msix_table_bar; /* BAR containing vector table. */ ==== //depot/projects/smpng/sys/dev/usb/usbdevs#97 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/sys/dev/usb/usbdevs,v 1.277 2006/11/11 23:53:25 flz Exp $ +$FreeBSD: src/sys/dev/usb/usbdevs,v 1.278 2006/11/15 09:13:24 maxim Exp $ /* $NetBSD: usbdevs,v 1.392 2004/12/29 08:38:44 imp Exp $ */ /*- @@ -545,6 +545,7 @@ vendor ONSPEC2 0x55aa OnSpec vendor ZINWELL 0x5a57 Zinwell vendor SITECOM 0x6189 Sitecom +vendor ARKMICRO 0x6547 Arkmicro Technologies vendor INTEL 0x8086 Intel vendor HP2 0xf003 Hewlett Packard @@ -676,6 +677,9 @@ product APPLE IPODVIDEO 0x1209 iPod Video product APPLE IPODNANO 0x120a iPod Nano +/* Arkmicro Technologies */ +product ARKMICRO ARK3116 0x0232 ARK3116 Serial + /* Asahi Optical products */ product ASAHIOPTICAL OPTIO230 0x0004 Digital camera product ASAHIOPTICAL OPTIO330 0x0006 Digital camera ==== //depot/projects/smpng/sys/i386/i386/db_trace.c#33 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.75 2006/10/20 09:44:21 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.76 2006/11/15 19:53:48 jhb Exp $"); #include #include @@ -192,8 +192,8 @@ static char * watchtype_str(int type); int i386_set_watch(int watchnum, unsigned int watchaddr, int size, int access, - struct dbreg * d); -int i386_clr_watch(int watchnum, struct dbreg * d); + struct dbreg *d); +int i386_clr_watch(int watchnum, struct dbreg *d); /* * Figure out how many arguments were passed into the frame at "fp". @@ -569,11 +569,11 @@ unsigned int watchaddr; int size; int access; - struct dbreg * d; + struct dbreg *d; { int i; unsigned int mask; - + if (watchnum == -1) { for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) if ((d->dr[7] & mask) == 0) @@ -583,7 +583,7 @@ else return (-1); } - + switch (access) { case DBREG_DR7_EXEC: size = 1; /* size must be 1 for an execution breakpoint */ @@ -591,9 +591,10 @@ case DBREG_DR7_WRONLY: case DBREG_DR7_RDWR: break; - default : return (-1); + default: + return (-1); } - + /* * we can watch a 1, 2, or 4 byte sized location */ @@ -610,7 +611,7 @@ d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); /* set drN register to the address, N=watchnum */ - DBREG_DRX(d,watchnum) = watchaddr; + DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); @@ -622,15 +623,15 @@ int i386_clr_watch(watchnum, d) int watchnum; - struct dbreg * d; + struct dbreg *d; { if (watchnum < 0 || watchnum >= 4) return (-1); - + d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); - DBREG_DRX(d,watchnum) = 0; - + DBREG_DRX(d, watchnum) = 0; + return (0); } @@ -640,22 +641,21 @@ db_expr_t addr; db_expr_t size; { - int avail, wsize; - int i; struct dbreg d; - + int avail, i, wsize; + fill_dbregs(NULL, &d); - + avail = 0; - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if ((d.dr[7] & (3 << (i*2))) == 0) avail++; } - - if (avail*4 < size) + + if (avail * 4 < size) return (-1); - - for (i=0; i<4 && (size != 0); i++) { + + for (i = 0; i < 4 && (size != 0); i++) { if ((d.dr[7] & (3<<(i*2))) == 0) { if (size > 4) wsize = 4; @@ -663,15 +663,15 @@ wsize = size; if (wsize == 3) wsize++; - i386_set_watch(i, addr, wsize, + i386_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; } } - + set_dbregs(NULL, &d); - + return(0); } @@ -686,22 +686,22 @@ fill_dbregs(NULL, &d); - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if (d.dr[7] & (3 << (i*2))) { - if ((DBREG_DRX((&d), i) >= addr) && + if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) i386_clr_watch(i, &d); - + } } - + set_dbregs(NULL, &d); - + return(0); } -static +static char * watchtype_str(type) int type; @@ -718,30 +718,29 @@ void db_md_list_watchpoints() { - int i; struct dbreg d; + int i, len, type; fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (d.dr[7] & (0x03 << (i*2))) { - unsigned type, len; type = (d.dr[7] >> (16+(i*4))) & 3; len = (d.dr[7] >> (16+(i*4)+2)) & 3; db_printf(" %-5d %-8s %10s %3d 0x%08x\n", - i, "enabled", watchtype_str(type), + i, "enabled", watchtype_str(type), len+1, DBREG_DRX((&d),i)); } else { db_printf(" %-5d disabled\n", i); } } - + db_printf("\ndebug register values:\n"); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { db_printf(" dr%d 0x%08x\n", i, DBREG_DRX((&d),i)); } db_printf("\n"); ==== //depot/projects/smpng/sys/i386/i386/machdep.c#119 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.640 2006/11/07 21:57:18 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.641 2006/11/15 19:53:48 jhb Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -2904,9 +2904,8 @@ addr[nbp++] = (caddr_t)rdr3(); } - for (i=0; i -__FBSDID("$FreeBSD: src/sys/i386/i386/msi.c,v 1.1 2006/11/13 22:23:33 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); #include #include @@ -315,7 +315,7 @@ /* We need count - cnt more sources starting at index 'cnt'. */ *newirq = cnt; *newcount = count - cnt; - for (j = 0; j < *newirq; j++) { + for (j = 0; j < *newcount; j++) { /* Create a new MSI source. */ msi = malloc(sizeof(struct msi_intsrc), M_MSI, ==== //depot/projects/smpng/sys/i386/include/reg.h#10 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/i386/include/reg.h,v 1.31 2005/05/31 09:43:04 dfr Exp $ + * $FreeBSD: src/sys/i386/include/reg.h,v 1.32 2006/11/15 19:53:48 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -137,12 +137,12 @@ /* Index 7: debug control */ }; -#define DBREG_DR7_EXEC 0x00 /* break on execute */ -#define DBREG_DR7_WRONLY 0x01 /* break on write */ -#define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr7 by - register number */ +#define DBREG_DR7_EXEC 0x00 /* break on execute */ +#define DBREG_DR7_WRONLY 0x01 /* break on write */ +#define DBREG_DR7_RDWR 0x03 /* break on read or write */ +#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr7 by + register number */ #ifdef _KERNEL /* ==== //depot/projects/smpng/sys/kern/kern_synch.c#106 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.282 2006/10/26 21:42:20 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_synch.c,v 1.283 2006/11/15 20:44:07 jhb Exp $"); #include "opt_ktrace.h" @@ -135,8 +135,8 @@ #endif WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, mtx == NULL ? NULL : &mtx->mtx_object, "Sleeping on \"%s\"", wmesg); - KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL, - ("sleeping without a mutex")); + KASSERT(timo != 0 || mtx_owned(&Giant) || mtx != NULL || + ident == &lbolt, ("sleeping without a mutex")); KASSERT(p != NULL, ("msleep1")); KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); @@ -188,7 +188,7 @@ * stopped, then td will no longer be on a sleep queue upon * return from cursig(). */ - sleepq_add(ident, mtx, wmesg, flags); + sleepq_add(ident, ident == &lbolt ? NULL : mtx, wmesg, flags); if (timo) sleepq_set_timeout(ident, timo); ==== //depot/projects/smpng/sys/modules/Makefile#130 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/modules/Makefile,v 1.511 2006/11/11 16:49:29 trhodes Exp $ +# $FreeBSD: src/sys/modules/Makefile,v 1.512 2006/11/15 09:13:25 maxim Exp $ .include @@ -247,6 +247,7 @@ twe \ tx \ txp \ + uark \ uart \ ubsa \ ubsec \ ==== //depot/projects/smpng/sys/sun4v/include/asmacros.h#2 (text+ko) ==== @@ -24,7 +24,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sun4v/include/asmacros.h,v 1.1 2006/10/05 06:14:25 kmacy Exp $ + * $FreeBSD: src/sys/sun4v/include/asmacros.h,v 1.2 2006/11/15 03:16:30 kmacy Exp $ */ #ifndef _MACHINE_ASMACROS_H_ @@ -302,6 +302,37 @@ ldxa [SBP + (6*8)]%asi, %l6; \ ldxa [SBP + (7*8)]%asi, %l7; +#define SAVE_OUTS_ASI(SBP) \ + stxa %o0, [SBP + (0*8)]%asi; \ + stxa %o1, [SBP + (1*8)]%asi; \ + stxa %o2, [SBP + (2*8)]%asi; \ + stxa %o3, [SBP + (3*8)]%asi; \ + stxa %o4, [SBP + (4*8)]%asi; \ + stxa %o5, [SBP + (5*8)]%asi; \ + stxa %o6, [SBP + (6*8)]%asi; \ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Wed Nov 15 22:29:05 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 087AE16A47C; Wed, 15 Nov 2006 22:29:05 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB0D616A415 for ; Wed, 15 Nov 2006 22:29:04 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9243743D5A for ; Wed, 15 Nov 2006 22:29:04 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFMT4fB096344 for ; Wed, 15 Nov 2006 22:29:04 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFMT4CS096341 for perforce@freebsd.org; Wed, 15 Nov 2006 22:29:04 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 22:29:04 GMT Message-Id: <200611152229.kAFMT4CS096341@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110066 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 22:29:05 -0000 http://perforce.freebsd.org/chv.cgi?CH=110066 Change 110066 by imp@imp_lighthouse on 2006/11/15 22:28:41 Load 12k, not 8k, for iic parts. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/arm_init.S#4 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/arm_init.S#4 (text+ko) ==== @@ -23,7 +23,7 @@ * $FreeBSD: src/sys/boot/arm/at91/bootspi/arm_init.S,v 1.3 2006/10/21 22:44:26 imp Exp $ ******************************************************************************/ - .equ TWI_EEPROM_SIZE, 0x2000 + .equ TWI_EEPROM_SIZE, 0x3000 .equ ARM_MODE_USER, 0x10 .equ ARM_MODE_FIQ, 0x11 .equ ARM_MODE_IRQ, 0x12 From owner-p4-projects@FreeBSD.ORG Wed Nov 15 22:33:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E6ABE16A416; Wed, 15 Nov 2006 22:33:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BC86616A407 for ; Wed, 15 Nov 2006 22:33:44 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B848843D80 for ; Wed, 15 Nov 2006 22:33:10 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFMXAUw097299 for ; Wed, 15 Nov 2006 22:33:10 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFMX9eb097293 for perforce@freebsd.org; Wed, 15 Nov 2006 22:33:09 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 22:33:09 GMT Message-Id: <200611152233.kAFMX9eb097293@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110067 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 22:33:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=110067 Change 110067 by imp@imp_lighthouse on 2006/11/15 22:32:11 Minor printf hacks, plus delay a bit before blasting the bits to the iic. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#13 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#13 (text) ==== @@ -32,14 +32,18 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - int len; + int len, sec; printf("\nSend data to be written into EEPROM\n"); while ((len = xmodem_rx(addr)) == -1) continue; - InitEEPROM(); + sec = GetSeconds() + 1; + while (sec >= GetSeconds()) + continue; printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, len); + InitEEPROM(); + printf("init done\n"); WriteEEPROM(0, addr, len); printf("\nWrote %d bytes. Press reset\n", len); return (1); From owner-p4-projects@FreeBSD.ORG Wed Nov 15 22:34:19 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BEB3916A417; Wed, 15 Nov 2006 22:34:19 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 853D516A415 for ; Wed, 15 Nov 2006 22:34:19 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4636043D7F for ; Wed, 15 Nov 2006 22:34:12 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFMYCRh097565 for ; Wed, 15 Nov 2006 22:34:12 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFMYBaK097562 for perforce@freebsd.org; Wed, 15 Nov 2006 22:34:11 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 22:34:11 GMT Message-Id: <200611152234.kAFMYBaK097562@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110069 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 22:34:20 -0000 http://perforce.freebsd.org/chv.cgi?CH=110069 Change 110069 by imp@imp_lighthouse on 2006/11/15 22:34:02 More ways to kludge this bodger together. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/tsc_board.c#5 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/tsc_board.c#5 (text+ko) ==== @@ -10,6 +10,7 @@ extern unsigned char mac[]; +#define KLUDGE_STRAP #define TSC_FPGA #define XMODEM_DL @@ -53,17 +54,20 @@ static void MacFromEE() { +#if 0 uint32_t sig; -#if 0 +#ifdef KLUDGE_STRAP uint8_t euid64[8] = { 0x00, 0x30, 0x96, 0x20, - 0x00, 0x00, 0x00, 0x07 }; + 0x00, 0x00, 0x00, 0x03 }; #endif -#if 0 +#ifdef KLUDGE_STRAP printf("writing...\n"); sig = 0xaa55aa55; EEWrite(0, (uint8_t *)&sig, sizeof(sig)); + printf("euid64\n"); EEWrite(48, euid64, sizeof(euid64)); + printf("done\n"); #endif sig = 0; EERead(0, (uint8_t *)&sig, sizeof(sig)); @@ -71,6 +75,14 @@ return; EERead(48, mac, 3); EERead(48+5, mac+3, 3); +#else + mac[0] = 0; + mac[1] = 0x30; + mac[2] = 0x96; + mac[3] = 0; + mac[4] = 0; + mac[5] = 3; +#endif printf("MAC %x:%x:%x:%x:%x:%x\n", mac[0], mac[1], mac[2], mac[3], mac[4], mac[5]); } @@ -116,8 +128,11 @@ SPI_InitFlash(); fpga_load(); #endif + printf("EEinit\n"); EEInit(); + printf("mac\n"); MacFromEE(); + printf("EEEEEE\n"); } #include "../bootspi/ee.c" From owner-p4-projects@FreeBSD.ORG Wed Nov 15 23:51:50 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 726A716A610; Wed, 15 Nov 2006 23:51:50 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 40E7016A60C for ; Wed, 15 Nov 2006 23:51:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EF55B43D58 for ; Wed, 15 Nov 2006 23:51:49 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFNpnKb010898 for ; Wed, 15 Nov 2006 23:51:49 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFNpnwD010895 for perforce@freebsd.org; Wed, 15 Nov 2006 23:51:49 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 23:51:49 GMT Message-Id: <200611152351.kAFNpnwD010895@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110071 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 23:51:50 -0000 http://perforce.freebsd.org/chv.cgi?CH=110071 Change 110071 by imp@imp_lighthouse on 2006/11/15 23:51:04 Codify the hack a little better. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#20 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#20 (text) ==== @@ -29,7 +29,9 @@ #include "at91rm9200_lowlevel.h" #include "spi_flash.h" -#define OFFSET 0 +#define LOADER_OFFSET 0 +#define FPGA_OFFSET (15 * FLASH_PAGE_SIZE) +#define OFFSET FPGA_OFFSET int main(void) From owner-p4-projects@FreeBSD.ORG Wed Nov 15 23:51:51 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0130F16A696; Wed, 15 Nov 2006 23:51:51 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D2F1016A694 for ; Wed, 15 Nov 2006 23:51:50 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4E6C943D58 for ; Wed, 15 Nov 2006 23:51:50 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFNpojL010904 for ; Wed, 15 Nov 2006 23:51:50 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFNpnk2010901 for perforce@freebsd.org; Wed, 15 Nov 2006 23:51:49 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 23:51:49 GMT Message-Id: <200611152351.kAFNpnk2010901@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110072 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 23:51:51 -0000 http://perforce.freebsd.org/chv.cgi?CH=110072 Change 110072 by imp@imp_lighthouse on 2006/11/15 23:51:42 Ooops, revert back to loading the loader with this. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#21 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#21 (text) ==== @@ -31,7 +31,7 @@ #define LOADER_OFFSET 0 #define FPGA_OFFSET (15 * FLASH_PAGE_SIZE) -#define OFFSET FPGA_OFFSET +#define OFFSET LOADER_OFFSET int main(void) From owner-p4-projects@FreeBSD.ORG Wed Nov 15 23:58:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 55F0916A536; Wed, 15 Nov 2006 23:58:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 169BC16A494 for ; Wed, 15 Nov 2006 23:58:07 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E0E9443D6A for ; Wed, 15 Nov 2006 23:57:59 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFNvxGU011790 for ; Wed, 15 Nov 2006 23:57:59 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFNvxF5011787 for perforce@freebsd.org; Wed, 15 Nov 2006 23:57:59 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 23:57:59 GMT Message-Id: <200611152357.kAFNvxF5011787@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110075 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 23:58:07 -0000 http://perforce.freebsd.org/chv.cgi?CH=110075 Change 110075 by imp@imp_lighthouse on 2006/11/15 23:57:10 Go back to -O2 for now. Today is gremlin day.. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#28 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#28 (text+ko) ==== @@ -8,7 +8,7 @@ # tsc, kb920x are the supported flavors BOOT_FLAVOR=kb920x -CFLAGS=-Os -mcpu=arm9 -ffreestanding \ +CFLAGS=-O2 -mcpu=arm9 -ffreestanding \ -I${.CURDIR}/../libat91 \ -I${.CURDIR}/../../../.. \ -I${.CURDIR}/../../../../arm \ From owner-p4-projects@FreeBSD.ORG Wed Nov 15 23:58:10 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 242CB16A5B4; Wed, 15 Nov 2006 23:58:10 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DE02E16A602 for ; Wed, 15 Nov 2006 23:58:09 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 20A5143D90 for ; Wed, 15 Nov 2006 23:58:00 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAFNvxWl011798 for ; Wed, 15 Nov 2006 23:57:59 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAFNvxBb011793 for perforce@freebsd.org; Wed, 15 Nov 2006 23:57:59 GMT (envelope-from imp@freebsd.org) Date: Wed, 15 Nov 2006 23:57:59 GMT Message-Id: <200611152357.kAFNvxBb011793@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110076 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Nov 2006 23:58:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=110076 Change 110076 by imp@imp_lighthouse on 2006/11/15 23:57:21 Add a done message. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#22 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot0spi/main.c#22 (text) ==== @@ -37,15 +37,15 @@ main(void) { int len, i, j, off; - char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */ - char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */ + char *addr = (char *)SDRAM_BASE + (1 << 20); /* download at + 1MB */ + char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* readback to + 2MB */ + char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* extra copy at + 3MB */ SPI_InitFlash(); printf("Waiting for data\n"); while ((len = xmodem_rx(addr)) == -1) continue; - printf("\nDownloaded %u bytes.\n", len); + // Need extra copy at addr3 memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); printf("Writing %u bytes to flash at %u\n", len, OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { @@ -59,5 +59,6 @@ if (j >= 10) printf("Bad Readback at %u\n", i); } + printf("Done\n"); return (1); } From owner-p4-projects@FreeBSD.ORG Thu Nov 16 00:19:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AA00216A492; Thu, 16 Nov 2006 00:19:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6A64B16A47B for ; Thu, 16 Nov 2006 00:19:43 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30F4E43D46 for ; Thu, 16 Nov 2006 00:19:43 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG0JhCF016647 for ; Thu, 16 Nov 2006 00:19:43 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG0JUg6016644 for perforce@freebsd.org; Thu, 16 Nov 2006 00:19:30 GMT (envelope-from imp@freebsd.org) Date: Thu, 16 Nov 2006 00:19:30 GMT Message-Id: <200611160019.kAG0JUg6016644@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110080 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 00:19:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=110080 Change 110080 by imp@imp_paco-paco on 2006/11/16 00:19:10 IFC @110078 Affected files ... .. //depot/projects/arm/src/MAINTAINERS#4 integrate .. //depot/projects/arm/src/Makefile.inc1#18 integrate .. //depot/projects/arm/src/ObsoleteFiles.inc#11 integrate .. //depot/projects/arm/src/UPDATING#7 integrate .. //depot/projects/arm/src/bin/sh/expand.c#2 integrate .. //depot/projects/arm/src/bin/sh/parser.c#3 integrate .. //depot/projects/arm/src/bin/sh/parser.h#2 integrate .. //depot/projects/arm/src/crypto/openssh/ChangeLog#3 integrate .. //depot/projects/arm/src/crypto/openssh/Makefile.in#3 integrate .. //depot/projects/arm/src/crypto/openssh/README#3 integrate .. //depot/projects/arm/src/crypto/openssh/audit-bsm.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/auth-rsa.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/auth.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/bufaux.h#3 delete .. //depot/projects/arm/src/crypto/openssh/bufbn.c#2 integrate .. //depot/projects/arm/src/crypto/openssh/buildpkg.sh.in#3 integrate .. //depot/projects/arm/src/crypto/openssh/clientloop.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/configure.ac#3 integrate .. //depot/projects/arm/src/crypto/openssh/dh.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/entropy.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/kexdhc.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/kexdhs.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/kexgexc.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/kexgexs.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/key.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/moduli.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/monitor.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/monitor_fdpass.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/openbsd-compat/port-solaris.c#2 integrate .. //depot/projects/arm/src/crypto/openssh/rsa.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/scard.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/scard/Makefile.in#2 integrate .. //depot/projects/arm/src/crypto/openssh/serverloop.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/session.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/sftp-client.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/sftp.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh-agent.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh-dss.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh-keygen.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh-keyscan.1#2 integrate .. //depot/projects/arm/src/crypto/openssh/ssh-keyscan.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh.1#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh_config#3 integrate .. //depot/projects/arm/src/crypto/openssh/ssh_config.5#3 integrate .. //depot/projects/arm/src/crypto/openssh/sshconnect.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/sshconnect1.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/sshd.c#3 integrate .. //depot/projects/arm/src/crypto/openssh/sshd_config#3 integrate .. //depot/projects/arm/src/crypto/openssh/sshd_config.5#3 integrate .. //depot/projects/arm/src/crypto/openssh/version.h#3 integrate .. //depot/projects/arm/src/etc/amd.map#2 integrate .. //depot/projects/arm/src/etc/defaults/rc.conf#9 integrate .. //depot/projects/arm/src/etc/mtree/BSD.local.dist#4 integrate .. //depot/projects/arm/src/etc/mtree/BSD.usr.dist#6 integrate .. //depot/projects/arm/src/etc/rc.d/ipfilter#2 integrate .. //depot/projects/arm/src/gnu/usr.bin/binutils/libiberty/config.h#4 integrate .. //depot/projects/arm/src/gnu/usr.bin/cc/cc_tools/arm.md.diff#2 integrate .. //depot/projects/arm/src/gnu/usr.bin/groff/tmac/mdoc.local#3 integrate .. //depot/projects/arm/src/include/Makefile#6 integrate .. //depot/projects/arm/src/include/ar.h#2 integrate .. //depot/projects/arm/src/lib/Makefile#5 integrate .. //depot/projects/arm/src/lib/libarchive/Makefile#3 integrate .. //depot/projects/arm/src/lib/libarchive/archive_check_magic.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_entry.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_platform.h#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read.c#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_data_into_buffer.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_data_into_fd.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_extract.c#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_open_fd.c#3 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_open_file.c#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_compression_bzip2.c#3 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_compression_compress.c#3 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_compression_gzip.c#3 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_compression_none.c#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_format_cpio.c#3 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_format_iso9660.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_format_tar.c#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_read_support_format_zip.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_string.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_string.h#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_util.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write.3#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write.c#4 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_open_fd.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_open_file.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_compression_bzip2.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_compression_gzip.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_compression_none.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_format.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_format_by_name.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_format_cpio.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_format_pax.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_format_shar.c#2 integrate .. //depot/projects/arm/src/lib/libarchive/archive_write_set_format_ustar.c#2 integrate .. //depot/projects/arm/src/lib/libc/amd64/net/Makefile.inc#2 delete .. //depot/projects/arm/src/lib/libc/amd64/net/htonl.S#2 delete .. //depot/projects/arm/src/lib/libc/amd64/net/htons.S#2 delete .. //depot/projects/arm/src/lib/libc/amd64/net/ntohl.S#2 delete .. //depot/projects/arm/src/lib/libc/amd64/net/ntohs.S#2 delete .. //depot/projects/arm/src/lib/libc/arm/net/Makefile.inc#2 delete .. //depot/projects/arm/src/lib/libc/arm/net/htonl.S#3 delete .. //depot/projects/arm/src/lib/libc/arm/net/htons.S#3 delete .. //depot/projects/arm/src/lib/libc/arm/net/ntohl.S#3 delete .. //depot/projects/arm/src/lib/libc/arm/net/ntohs.S#3 delete .. //depot/projects/arm/src/lib/libc/arm/sys/cerror.S#2 integrate .. //depot/projects/arm/src/lib/libc/arm/sys/ptrace.S#2 integrate .. //depot/projects/arm/src/lib/libc/i386/net/Makefile.inc#2 delete .. //depot/projects/arm/src/lib/libc/i386/net/htonl.S#2 delete .. //depot/projects/arm/src/lib/libc/i386/net/htons.S#2 delete .. //depot/projects/arm/src/lib/libc/i386/net/ntohl.S#2 delete .. //depot/projects/arm/src/lib/libc/i386/net/ntohs.S#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/Makefile.inc#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/byte_swap_2.S#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/byte_swap_4.S#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/htonl.S#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/htons.S#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/ntohl.S#2 delete .. //depot/projects/arm/src/lib/libc/ia64/net/ntohs.S#2 delete .. //depot/projects/arm/src/lib/libc/net/Makefile.inc#3 integrate .. //depot/projects/arm/src/lib/libc/net/ntoh.c#1 branch .. //depot/projects/arm/src/lib/libc/powerpc/net/Makefile.inc#2 delete .. //depot/projects/arm/src/lib/libc/powerpc/net/htonl.S#2 delete .. //depot/projects/arm/src/lib/libc/powerpc/net/htons.S#2 delete .. //depot/projects/arm/src/lib/libc/powerpc/net/ntohl.S#2 delete .. //depot/projects/arm/src/lib/libc/powerpc/net/ntohs.S#2 delete .. //depot/projects/arm/src/lib/libc/sparc64/net/Makefile.inc#2 delete .. //depot/projects/arm/src/lib/libc/sparc64/net/htonl.S#2 delete .. //depot/projects/arm/src/lib/libc/sparc64/net/htons.S#2 delete .. //depot/projects/arm/src/lib/libc/sparc64/net/ntohl.S#2 delete .. //depot/projects/arm/src/lib/libc/sparc64/net/ntohs.S#2 delete .. //depot/projects/arm/src/lib/libc/sys/extattr_get_file.2#2 integrate .. //depot/projects/arm/src/lib/libc/sys/ptrace.2#2 integrate .. //depot/projects/arm/src/lib/libelf/Makefile#1 branch .. //depot/projects/arm/src/lib/libelf/Version.map#1 branch .. //depot/projects/arm/src/lib/libelf/_libelf.h#1 branch .. //depot/projects/arm/src/lib/libelf/elf.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_begin.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_begin.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_cntl.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_cntl.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_data.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_end.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_end.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_errmsg.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_errmsg.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_errno.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_fill.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_fill.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_flag.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_flagdata.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getarhdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getarhdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getarsym.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getarsym.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getbase.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getbase.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getdata.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getident.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getident.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getscn.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getshnum.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_getshstrndx.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_hash.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_hash.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_kind.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_kind.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_memory.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_memory.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_next.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_next.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_rand.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_rand.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_rawfile.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_rawfile.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_scn.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_shnum.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_shstrndx.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_strptr.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_strptr.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_types.m4#1 branch .. //depot/projects/arm/src/lib/libelf/elf_update.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_update.c#1 branch .. //depot/projects/arm/src/lib/libelf/elf_version.3#1 branch .. //depot/projects/arm/src/lib/libelf/elf_version.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf.h#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_cap.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_checksum.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_checksum.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_dyn.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_ehdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_fsize.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_fsize.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getcap.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getclass.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getclass.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getdyn.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getehdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getmove.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getphdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getrel.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getrela.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getshdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getsym.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getsyminfo.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_getsymshndx.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_move.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_newehdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_newphdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_phdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_rel.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_rela.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_shdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_sym.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_syminfo.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_symshndx.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_update_ehdr.3#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_xlate.c#1 branch .. //depot/projects/arm/src/lib/libelf/gelf_xlatetof.3#1 branch .. //depot/projects/arm/src/lib/libelf/libelf.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf.h#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_align.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_allocate.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_ar.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_checksum.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_convert.m4#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_data.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_ehdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_fsize.m4#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_msize.m4#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_phdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_shdr.c#1 branch .. //depot/projects/arm/src/lib/libelf/libelf_xlate.c#1 branch .. //depot/projects/arm/src/lib/libpam/modules/pam_exec/pam_exec.c#2 integrate .. //depot/projects/arm/src/lib/libstand/Makefile#3 integrate .. //depot/projects/arm/src/lib/libthr/thread/thr_mutex.c#5 integrate .. //depot/projects/arm/src/lib/libutil/login_ok.3#2 integrate .. //depot/projects/arm/src/release/Makefile#6 integrate .. //depot/projects/arm/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#17 integrate .. //depot/projects/arm/src/sbin/devfs/devfs.8#2 integrate .. //depot/projects/arm/src/sbin/ifconfig/ifbridge.c#3 integrate .. //depot/projects/arm/src/sbin/ifconfig/ifconfig.8#7 integrate .. //depot/projects/arm/src/sbin/quotacheck/quotacheck.8#2 integrate .. //depot/projects/arm/src/sbin/quotacheck/quotacheck.c#2 integrate .. //depot/projects/arm/src/sbin/routed/main.c#2 integrate .. //depot/projects/arm/src/share/colldef/Makefile#3 integrate .. //depot/projects/arm/src/share/doc/IPv6/IMPLEMENTATION#2 integrate .. //depot/projects/arm/src/share/man/man4/ips.4#2 integrate .. //depot/projects/arm/src/share/man/man4/le.4#4 integrate .. //depot/projects/arm/src/share/man/man4/sem.4#2 integrate .. //depot/projects/arm/src/share/man/man4/snd_spicds.4#2 integrate .. //depot/projects/arm/src/share/man/man7/release.7#3 integrate .. //depot/projects/arm/src/share/man/man8/nanobsd.8#2 integrate .. //depot/projects/arm/src/share/man/man9/LOCK_PROFILING.9#1 branch .. //depot/projects/arm/src/share/man/man9/MUTEX_PROFILING.9#2 delete .. //depot/projects/arm/src/share/man/man9/Makefile#3 integrate .. //depot/projects/arm/src/share/man/man9/mutex.9#2 integrate .. //depot/projects/arm/src/share/man/man9/priv.9#1 branch .. //depot/projects/arm/src/share/man/man9/suser.9#2 integrate .. //depot/projects/arm/src/share/misc/bsd-family-tree#5 integrate .. //depot/projects/arm/src/share/mk/bsd.endian.mk#4 integrate .. //depot/projects/arm/src/share/mklocale/Makefile#3 integrate .. //depot/projects/arm/src/share/monetdef/Makefile#3 integrate .. //depot/projects/arm/src/share/msgdef/Makefile#3 integrate .. //depot/projects/arm/src/share/numericdef/Makefile#3 integrate .. //depot/projects/arm/src/share/timedef/Makefile#3 integrate .. //depot/projects/arm/src/share/timedef/nn_NO.ISO8859-1.src#1 branch .. //depot/projects/arm/src/share/timedef/nn_NO.UTF-8.src#1 branch .. //depot/projects/arm/src/sys/Makefile#9 integrate .. //depot/projects/arm/src/sys/amd64/amd64/db_disasm.c#3 integrate .. //depot/projects/arm/src/sys/amd64/amd64/db_trace.c#9 integrate .. //depot/projects/arm/src/sys/amd64/amd64/local_apic.c#15 integrate .. //depot/projects/arm/src/sys/amd64/amd64/machdep.c#16 integrate .. //depot/projects/arm/src/sys/amd64/amd64/mptable_pci.c#4 integrate .. //depot/projects/arm/src/sys/amd64/amd64/msi.c#1 branch .. //depot/projects/arm/src/sys/amd64/amd64/nexus.c#5 integrate .. //depot/projects/arm/src/sys/amd64/amd64/pmap.c#26 integrate .. //depot/projects/arm/src/sys/amd64/include/apicvar.h#9 integrate .. //depot/projects/arm/src/sys/amd64/include/intr_machdep.h#6 integrate .. //depot/projects/arm/src/sys/amd64/include/pmap.h#9 integrate .. //depot/projects/arm/src/sys/amd64/include/reg.h#2 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux.h#7 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_proto.h#16 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_syscall.h#16 integrate .. //depot/projects/arm/src/sys/amd64/linux32/linux32_sysent.c#16 integrate .. //depot/projects/arm/src/sys/amd64/pci/pci_bus.c#6 integrate .. //depot/projects/arm/src/sys/arm/arm/cpufunc.c#11 integrate .. //depot/projects/arm/src/sys/arm/arm/identcpu.c#9 integrate .. //depot/projects/arm/src/sys/arm/arm/pmap.c#28 integrate .. //depot/projects/arm/src/sys/arm/arm/vm_machdep.c#10 integrate .. //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c#39 integrate .. //depot/projects/arm/src/sys/arm/include/armreg.h#4 integrate .. //depot/projects/arm/src/sys/arm/include/atomic.h#8 integrate .. //depot/projects/arm/src/sys/arm/include/cpuconf.h#5 integrate .. //depot/projects/arm/src/sys/arm/include/cpufunc.h#6 integrate .. //depot/projects/arm/src/sys/arm/include/pmap.h#12 integrate .. //depot/projects/arm/src/sys/arm/sa11x0/assabet_machdep.c#8 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile#13 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/Makefile.inc#29 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/boot0iic/main.c#14 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/kb920x_board.c#4 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootiic/Makefile#20 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/bootspi/Makefile#18 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/Makefile#25 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#14 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#9 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.c#37 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac.h#16 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/emac_init.c#9 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/mci_device.h#12 integrate .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/sd-card.c#16 integrate .. //depot/projects/arm/src/sys/boot/pc98/btx/btx/btx.S#3 integrate .. //depot/projects/arm/src/sys/boot/pc98/libpc98/biossmap.c#1 branch .. //depot/projects/arm/src/sys/cam/cam_xpt.c#11 integrate .. //depot/projects/arm/src/sys/coda/coda_vnops.c#6 integrate .. //depot/projects/arm/src/sys/coda/coda_vnops.h#2 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_proto.h#20 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscall.h#20 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_syscalls.c#20 integrate .. //depot/projects/arm/src/sys/compat/freebsd32/freebsd32_sysent.c#20 integrate .. //depot/projects/arm/src/sys/compat/linux/linux_emul.c#7 integrate .. //depot/projects/arm/src/sys/compat/linux/linux_misc.c#18 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_proto.h#9 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_syscall.h#9 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_syscallnames.c#9 integrate .. //depot/projects/arm/src/sys/compat/svr4/svr4_sysent.c#9 integrate .. //depot/projects/arm/src/sys/conf/NOTES#37 integrate .. //depot/projects/arm/src/sys/conf/files#53 integrate .. //depot/projects/arm/src/sys/conf/files.amd64#20 integrate .. //depot/projects/arm/src/sys/conf/files.arm#5 integrate .. //depot/projects/arm/src/sys/conf/files.i386#22 integrate .. //depot/projects/arm/src/sys/conf/files.pc98#13 integrate .. //depot/projects/arm/src/sys/conf/files.sun4v#3 integrate .. //depot/projects/arm/src/sys/conf/options#33 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_pci_link.c#8 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_pcib_acpi.c#5 integrate .. //depot/projects/arm/src/sys/dev/acpica/acpi_pcib_pci.c#4 integrate .. //depot/projects/arm/src/sys/dev/aha/ahareg.h#2 integrate .. //depot/projects/arm/src/sys/dev/bce/if_bce.c#11 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.c#32 integrate .. //depot/projects/arm/src/sys/dev/em/if_em.h#13 integrate .. //depot/projects/arm/src/sys/dev/fxp/if_fxp.c#13 integrate .. //depot/projects/arm/src/sys/dev/isp/isp.c#13 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.c#17 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_freebsd.h#14 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_library.c#7 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_library.h#4 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_pci.c#16 integrate .. //depot/projects/arm/src/sys/dev/isp/isp_stds.h#2 integrate .. //depot/projects/arm/src/sys/dev/isp/ispvar.h#12 integrate .. //depot/projects/arm/src/sys/dev/iwi/if_iwi.c#11 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi.c#10 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi_ioctl.h#3 integrate .. //depot/projects/arm/src/sys/dev/mfi/mfi_linux.c#2 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.c#19 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt.h#19 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_cam.c#26 integrate .. //depot/projects/arm/src/sys/dev/mpt/mpt_pci.c#17 integrate .. //depot/projects/arm/src/sys/dev/pci/pci.c#16 integrate .. //depot/projects/arm/src/sys/dev/pci/pci_if.m#4 integrate .. //depot/projects/arm/src/sys/dev/pci/pci_pci.c#7 integrate .. //depot/projects/arm/src/sys/dev/pci/pci_private.h#8 integrate .. //depot/projects/arm/src/sys/dev/pci/pcib_if.m#3 integrate .. //depot/projects/arm/src/sys/dev/pci/pcib_private.h#3 integrate .. //depot/projects/arm/src/sys/dev/pci/pcireg.h#6 integrate .. //depot/projects/arm/src/sys/dev/pci/pcivar.h#8 integrate .. //depot/projects/arm/src/sys/dev/usb/uark.c#1 branch .. //depot/projects/arm/src/sys/dev/usb/usb_quirks.c#11 integrate .. //depot/projects/arm/src/sys/dev/usb/usbdevs#22 integrate .. //depot/projects/arm/src/sys/fs/nullfs/null_vnops.c#6 integrate .. //depot/projects/arm/src/sys/i386/i386/db_trace.c#8 integrate .. //depot/projects/arm/src/sys/i386/i386/identcpu.c#17 integrate .. //depot/projects/arm/src/sys/i386/i386/local_apic.c#14 integrate .. //depot/projects/arm/src/sys/i386/i386/machdep.c#20 integrate .. //depot/projects/arm/src/sys/i386/i386/mptable_pci.c#4 integrate .. //depot/projects/arm/src/sys/i386/i386/msi.c#1 branch .. //depot/projects/arm/src/sys/i386/i386/nexus.c#5 integrate .. //depot/projects/arm/src/sys/i386/i386/pmap.c#23 integrate .. //depot/projects/arm/src/sys/i386/ibcs2/ibcs2_proto.h#7 integrate .. //depot/projects/arm/src/sys/i386/ibcs2/ibcs2_xenix.h#7 integrate .. //depot/projects/arm/src/sys/i386/include/apicvar.h#8 integrate .. //depot/projects/arm/src/sys/i386/include/intr_machdep.h#6 integrate .. //depot/projects/arm/src/sys/i386/include/pmap.h#6 integrate .. //depot/projects/arm/src/sys/i386/include/reg.h#3 integrate .. //depot/projects/arm/src/sys/i386/linux/linux_proto.h#19 integrate .. //depot/projects/arm/src/sys/i386/pci/pci_bus.c#5 integrate .. //depot/projects/arm/src/sys/i386/pci/pci_pir.c#3 integrate .. //depot/projects/arm/src/sys/ia64/ia64/pmap.c#11 integrate .. //depot/projects/arm/src/sys/ia64/include/pmap.h#5 integrate .. //depot/projects/arm/src/sys/kern/Make.tags.inc#2 integrate .. //depot/projects/arm/src/sys/kern/init_main.c#11 integrate .. //depot/projects/arm/src/sys/kern/init_sysent.c#20 integrate .. //depot/projects/arm/src/sys/kern/kern_idle.c#4 integrate .. //depot/projects/arm/src/sys/kern/kern_lock.c#8 integrate .. //depot/projects/arm/src/sys/kern/kern_mutex.c#10 integrate .. //depot/projects/arm/src/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_sig.c#17 integrate .. //depot/projects/arm/src/sys/kern/kern_sx.c#6 integrate .. //depot/projects/arm/src/sys/kern/kern_synch.c#13 integrate .. //depot/projects/arm/src/sys/kern/kern_thr.c#13 integrate .. //depot/projects/arm/src/sys/kern/kern_time.c#12 integrate .. //depot/projects/arm/src/sys/kern/ksched.c#1 branch .. //depot/projects/arm/src/sys/kern/makesyscalls.sh#6 integrate .. //depot/projects/arm/src/sys/kern/p1003_1b.c#1 branch .. //depot/projects/arm/src/sys/kern/posix4_mib.c#1 branch .. //depot/projects/arm/src/sys/kern/sched_4bsd.c#11 integrate .. //depot/projects/arm/src/sys/kern/sched_ule.c#11 integrate .. //depot/projects/arm/src/sys/kern/subr_lock.c#3 integrate .. //depot/projects/arm/src/sys/kern/subr_witness.c#13 integrate .. //depot/projects/arm/src/sys/kern/syscalls.c#20 integrate .. //depot/projects/arm/src/sys/kern/systrace_args.c#8 integrate .. //depot/projects/arm/src/sys/kern/tty.c#11 integrate .. //depot/projects/arm/src/sys/kern/uipc_mqueue.c#9 integrate .. //depot/projects/arm/src/sys/kern/uipc_sem.c#8 integrate .. //depot/projects/arm/src/sys/kern/uipc_syscalls.c#18 integrate .. //depot/projects/arm/src/sys/kern/vfs_aio.c#14 integrate .. //depot/projects/arm/src/sys/kern/vfs_default.c#10 integrate .. //depot/projects/arm/src/sys/kern/vfs_subr.c#29 integrate .. //depot/projects/arm/src/sys/kern/vfs_vnops.c#13 integrate .. //depot/projects/arm/src/sys/kern/vnode_if.src#7 integrate .. //depot/projects/arm/src/sys/modules/Makefile#32 integrate .. //depot/projects/arm/src/sys/modules/acpi/Makefile#6 integrate .. //depot/projects/arm/src/sys/modules/if_ppp/Makefile#5 integrate .. //depot/projects/arm/src/sys/modules/uark/Makefile#1 branch .. //depot/projects/arm/src/sys/net/bridgestp.c#11 integrate .. //depot/projects/arm/src/sys/net/bridgestp.h#5 integrate .. //depot/projects/arm/src/sys/net/if_bridge.c#27 integrate .. //depot/projects/arm/src/sys/net/if_bridgevar.h#10 integrate .. //depot/projects/arm/src/sys/net/if_ppp.c#9 integrate .. //depot/projects/arm/src/sys/net/if_pppvar.h#3 integrate .. //depot/projects/arm/src/sys/netinet/ip_fw2.c#24 integrate .. //depot/projects/arm/src/sys/netinet/libalias/alias_smedia.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_asconf.c#2 integrate .. //depot/projects/arm/src/sys/netinet/sctp_constants.h#2 integrate .. //depot/projects/arm/src/sys/netinet/sctp_indata.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_input.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_output.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_pcb.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_structs.h#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_uio.h#3 integrate .. //depot/projects/arm/src/sys/netinet/sctp_usrreq.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctputil.c#3 integrate .. //depot/projects/arm/src/sys/netinet/sctputil.h#3 integrate .. //depot/projects/arm/src/sys/netinet6/sctp6_usrreq.c#3 integrate .. //depot/projects/arm/src/sys/netipsec/ipsec.c#7 integrate .. //depot/projects/arm/src/sys/pc98/pc98/machdep.c#11 integrate .. //depot/projects/arm/src/sys/pci/if_pcn.c#6 integrate .. //depot/projects/arm/src/sys/pci/if_pcnreg.h#4 integrate .. //depot/projects/arm/src/sys/posix4/_semaphore.h#3 delete .. //depot/projects/arm/src/sys/posix4/ksched.c#7 delete .. //depot/projects/arm/src/sys/posix4/ksem.h#2 delete .. //depot/projects/arm/src/sys/posix4/p1003_1b.c#8 delete .. //depot/projects/arm/src/sys/posix4/posix4.h#3 delete .. //depot/projects/arm/src/sys/posix4/posix4_mib.c#2 delete .. //depot/projects/arm/src/sys/posix4/sched.h#2 delete .. //depot/projects/arm/src/sys/posix4/semaphore.h#2 delete .. //depot/projects/arm/src/sys/powerpc/powerpc/mmu_oea.c#8 integrate .. //depot/projects/arm/src/sys/powerpc/powerpc/pmap_dispatch.c#7 integrate .. //depot/projects/arm/src/sys/security/mac/mac_posix_sem.c#4 integrate .. //depot/projects/arm/src/sys/security/mac_biba/mac_biba.c#7 integrate .. //depot/projects/arm/src/sys/security/mac_mls/mac_mls.c#5 integrate .. //depot/projects/arm/src/sys/security/mac_stub/mac_stub.c#4 integrate .. //depot/projects/arm/src/sys/security/mac_test/mac_test.c#3 integrate .. //depot/projects/arm/src/sys/sparc64/sparc64/pmap.c#13 integrate .. //depot/projects/arm/src/sys/sun4v/conf/GENERIC#3 integrate .. //depot/projects/arm/src/sys/sun4v/include/asmacros.h#2 integrate .. //depot/projects/arm/src/sys/sun4v/include/cpufunc.h#2 integrate .. //depot/projects/arm/src/sys/sun4v/include/pmap.h#2 integrate .. //depot/projects/arm/src/sys/sun4v/include/tte_hash.h#2 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/exception.S#4 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/hcall.S#3 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/interrupt.S#2 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/intr_machdep.c#2 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/pmap.c#4 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/rtc.c#2 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/support.S#3 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/trap.c#4 integrate .. //depot/projects/arm/src/sys/sun4v/sun4v/tte_hash.c#2 integrate .. //depot/projects/arm/src/sys/sys/_lock.h#4 integrate .. //depot/projects/arm/src/sys/sys/_mutex.h#2 integrate .. //depot/projects/arm/src/sys/sys/_semaphore.h#1 branch .. //depot/projects/arm/src/sys/sys/elf_common.h#5 integrate .. //depot/projects/arm/src/sys/sys/ksem.h#1 branch .. //depot/projects/arm/src/sys/sys/lock.h#8 integrate .. //depot/projects/arm/src/sys/sys/lock_profile.h#1 branch .. //depot/projects/arm/src/sys/sys/lockmgr.h#6 integrate .. //depot/projects/arm/src/sys/sys/mbuf.h#16 integrate .. //depot/projects/arm/src/sys/sys/mutex.h#7 integrate .. //depot/projects/arm/src/sys/sys/param.h#20 integrate .. //depot/projects/arm/src/sys/sys/posix4.h#1 branch .. //depot/projects/arm/src/sys/sys/proc.h#17 integrate .. //depot/projects/arm/src/sys/sys/sched.h#7 integrate .. //depot/projects/arm/src/sys/sys/sem.h#3 integrate .. //depot/projects/arm/src/sys/sys/semaphore.h#1 branch .. //depot/projects/arm/src/sys/sys/syscall.h#20 integrate .. //depot/projects/arm/src/sys/sys/syscall.mk#20 integrate .. //depot/projects/arm/src/sys/sys/sysproto.h#21 integrate .. //depot/projects/arm/src/sys/sys/thr.h#6 integrate .. //depot/projects/arm/src/sys/sys/umtx.h#8 integrate .. //depot/projects/arm/src/sys/sys/vnode.h#13 integrate .. //depot/projects/arm/src/sys/ufs/ffs/ffs_vnops.c#7 integrate .. //depot/projects/arm/src/sys/vm/vm_contig.c#11 integrate .. //depot/projects/arm/src/sys/vm/vm_fault.c#15 integrate .. //depot/projects/arm/src/sys/vm/vm_kern.c#3 integrate .. //depot/projects/arm/src/sys/vm/vm_page.c#22 integrate .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp1.0#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp2.2#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp2.2.stderr#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp3.2#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp3.2.stderr#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp4.2#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp4.2.stderr#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp5.2#1 branch .. //depot/projects/arm/src/tools/regression/bin/sh/errors/bad-parm-exp5.2.stderr#1 branch .. //depot/projects/arm/src/tools/regression/fifo/fifo_io/fifo_io.c#2 integrate .. //depot/projects/arm/src/tools/regression/file/dup/Makefile#1 branch .. //depot/projects/arm/src/tools/regression/file/dup/dup.c#1 branch .. //depot/projects/arm/src/tools/regression/file/dup/dup.t#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.ascii.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.block.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dddh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.ddhd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.ddhd2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.ddhh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.ddhh2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dhdd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dhdh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dhhd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dhhd2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dhhh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.dhhh2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.ed.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.grep.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hddd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hddd2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hddh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hddh2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hdhd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hdhd2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hdhh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hdhh2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhdd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhdd2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhdh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhdh2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhhd.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhhd2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhhh.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.hhhh2.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.n21.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.out#2 delete .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.sh#2 integrate .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.stutter.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.tabs.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.x.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.xaa.out#1 branch .. //depot/projects/arm/src/tools/regression/usr.bin/jot/regress.yes.out#1 branch .. //depot/projects/arm/src/tools/tools/pirtool/pirtable.h#2 integrate .. //depot/projects/arm/src/tools/tools/pirtool/pirtool.c#2 integrate .. //depot/projects/arm/src/usr.bin/calendar/calendars/calendar.freebsd#5 integrate .. //depot/projects/arm/src/usr.bin/fetch/fetch.c#2 integrate .. //depot/projects/arm/src/usr.bin/jot/jot.1#3 integrate .. //depot/projects/arm/src/usr.bin/jot/jot.c#2 integrate .. //depot/projects/arm/src/usr.bin/ktrace/ktrace.1#2 integrate .. //depot/projects/arm/src/usr.bin/netstat/if.c#3 integrate .. //depot/projects/arm/src/usr.bin/sockstat/sockstat.1#2 integrate .. //depot/projects/arm/src/usr.bin/sockstat/sockstat.c#2 integrate .. //depot/projects/arm/src/usr.bin/top/machine.c#2 integrate .. //depot/projects/arm/src/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#2 integrate .. //depot/projects/arm/src/usr.sbin/bsnmpd/bsnmpd/Makefile#3 integrate .. //depot/projects/arm/src/usr.sbin/ipfwpcap/ipfwpcap.8#3 integrate .. //depot/projects/arm/src/usr.sbin/pccard/dumpcis/dumpcis.8#2 integrate .. //depot/projects/arm/src/usr.sbin/portsnap/phttpget/phttpget.c#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/Makefile#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/eui64.c#1 branch .. //depot/projects/arm/src/usr.sbin/pppd/eui64.h#1 branch .. //depot/projects/arm/src/usr.sbin/pppd/ipv6cp.c#1 branch .. //depot/projects/arm/src/usr.sbin/pppd/ipv6cp.h#1 branch .. //depot/projects/arm/src/usr.sbin/pppd/main.c#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/options.c#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/pathnames.h#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/pppd.8#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/pppd.h#2 integrate .. //depot/projects/arm/src/usr.sbin/pppd/sys-bsd.c#2 integrate .. //depot/projects/arm/src/usr.sbin/sysinstall/install.c#4 integrate .. //depot/projects/arm/src/usr.sbin/sysinstall/installUpgrade.c#2 integrate Differences ... ==== //depot/projects/arm/src/MAINTAINERS#4 (text+ko) ==== @@ -1,4 +1,4 @@ -$FreeBSD: src/MAINTAINERS,v 1.141 2006/09/11 19:39:46 simon Exp $ +$FreeBSD: src/MAINTAINERS,v 1.142 2006/11/11 22:24:10 kris Exp $ Please note that the content of this file is strictly advisory. No locks listed here are valid. The only strict review requirements @@ -126,6 +126,7 @@ usr.bin/bluetooth emax Pre-commit review preferred. usr.sbin/bluetooth emax Pre-commit review preferred. gnu/usr.bin/send-pr bugmaster Pre-commit review requested. +BSD.{local,x11*}.dist portmgr Pre-commit review requested, since these files interface with ports. Following are the entries from the Makefiles, and a few other sources. Please remove stale entries from both their origin, and this file. ==== //depot/projects/arm/src/Makefile.inc1#18 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/Makefile.inc1,v 1.563 2006/10/16 22:18:13 jb Exp $ +# $FreeBSD: src/Makefile.inc1,v 1.564 2006/11/13 05:52:11 ru Exp $ # # Make command line options: # -DNO_CLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir @@ -30,18 +30,17 @@ # entries works correctly. Do it first since it is less likely to # grow dependencies on include and lib than vice versa. # -# We must do lib and libexec before bin, because if installworld +# We must do lib/ and libexec/ before bin/, because if installworld # installs a new /bin/sh, the 'make' command will *immediately* # use that new version. And the new (dynamically-linked) /bin/sh # will expect to find appropriate libraries in /lib and /libexec. # -# We must do etc last for install/distribute to work. -# -SUBDIR= share/info include lib libexec bin +SUBDIR= share/info lib libexec +SUBDIR+=bin .if ${MK_GAMES} != "no" SUBDIR+=games .endif -SUBDIR+=gnu +SUBDIR+=gnu include .if ${MK_KERBEROS} != "no" SUBDIR+=kerberos5 .endif @@ -55,7 +54,11 @@ .if !defined(NO_SHARE) SUBDIR+=share .endif -SUBDIR+=sys usr.bin usr.sbin etc +SUBDIR+=sys usr.bin usr.sbin +# +# We must do etc/ last for install/distribute to work. +# +SUBDIR+=etc # These are last, since it is nice to at least get the base system # rebuilt before you do them. ==== //depot/projects/arm/src/ObsoleteFiles.inc#11 (text+ko) ==== @@ -1,5 +1,5 @@ # -# $FreeBSD: src/ObsoleteFiles.inc,v 1.58 2006/11/05 00:39:56 trhodes Exp $ +# $FreeBSD: src/ObsoleteFiles.inc,v 1.59 2006/11/08 03:23:49 marcel Exp $ # # This file lists old files (OLD_FILES), libraries (OLD_LIBS) and # directories (OLD_DIRS) which should get removed at an update. Recently @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +.if ${TARGET_ARCH} == "ia64" +# 20061104: skiload.help removed +OLD_FILES+=boot/skiload.help +.endif # 20061018: pccardc removed OLD_FILES+=usr/sbin/pccardc usr/share/man/man8/pccardc.8.gz # 20060930: demangle.h from contrib/libstdc++/include/ext/ ==== //depot/projects/arm/src/UPDATING#7 (text+ko) ==== @@ -20,6 +20,12 @@ in userland, and various verbose features in the kernel. Many developers choose to disable these features on build machines to maximize performance. +20061110: + The MUTEX_PROFILING option has been renamed to LOCK_PROFILING. + The lockmgr object layout has been changed as a result of having + a lock_object embedded in it. As a consequence all file system + kernel modules must be re-compiled. The mutex profiling man page + has not yet been updated to reflect this change. 20061026: KSE in the kernel has now been made optional and turned on by @@ -639,4 +645,4 @@ Contact Warner Losh if you have any questions about your use of this document. -$FreeBSD: src/UPDATING,v 1.462 2006/10/26 22:05:24 jb Exp $ +$FreeBSD: src/UPDATING,v 1.463 2006/11/11 03:18:06 kmacy Exp $ ==== //depot/projects/arm/src/bin/sh/expand.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.49 2006/02/04 14:37:50 schweikh Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/expand.c,v 1.51 2006/11/07 22:46:13 stefanf Exp $"); #include #include @@ -98,7 +98,7 @@ STATIC int subevalvar(char *, char *, int, int, int, int); STATIC char *evalvar(char *, int); STATIC int varisset(char *, int); -STATIC void varvalue(char *, int, int); +STATIC void varvalue(char *, int, int, int); STATIC void recordregion(int, int, int); STATIC void removerecordregions(int); STATIC void ifsbreakup(char *, struct arglist *); @@ -633,7 +633,7 @@ int easy; int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); - varflags = *p++; + varflags = (unsigned char)*p++; subtype = varflags & VSTYPE; var = p; special = 0; @@ -669,7 +669,7 @@ if (set && subtype != VSPLUS) { /* insert the value of the variable */ if (special) { - varvalue(var, varflags & VSQUOTE, flag & EXP_FULL); + varvalue(var, varflags & VSQUOTE, subtype, flag); if (subtype == VSLENGTH) { varlen = expdest - stackblock() - startloc; STADJUST(-varlen, expdest); @@ -763,6 +763,11 @@ goto record; break; + case VSERROR: + c = p - var - 1; + error("${%.*s%s}: Bad substitution", c, var, + (c > 0 && *p != CTLENDVAR) ? "..." : ""); + default: abort(); } @@ -836,7 +841,7 @@ */ STATIC void -varvalue(char *name, int quoted, int allow_split) +varvalue(char *name, int quoted, int subtype, int flag) { int num; char *p; @@ -848,7 +853,7 @@ #define STRTODEST(p) \ do {\ - if (allow_split) { \ + if (flag & (EXP_FULL | EXP_CASE) && subtype != VSLENGTH) { \ syntax = quoted? DQSYNTAX : BASESYNTAX; \ while (*p) { \ if (syntax[(int)*p] == CCTL) \ @@ -883,7 +888,7 @@ } break; case '@': - if (allow_split && quoted) { + if (flag & EXP_FULL && quoted) { for (ap = shellparam.p ; (p = *ap++) != NULL ; ) { STRTODEST(p); if (*ap) ==== //depot/projects/arm/src/bin/sh/parser.c#3 (text+ko) ==== @@ -36,7 +36,7 @@ #endif #endif /* not lint */ #include -__FBSDID("$FreeBSD: src/bin/sh/parser.c,v 1.57 2006/07/31 11:32:12 yar Exp $"); +__FBSDID("$FreeBSD: src/bin/sh/parser.c,v 1.58 2006/11/05 18:36:05 stefanf Exp $"); #include #include @@ -1228,12 +1228,17 @@ c = pgetc(); } } else { - if (! is_special(c)) -badsub: synerror("Bad substitution"); - USTPUTC(c, out); - c = pgetc(); + if (! is_special(c)) { + subtype = VSERROR; + if (c == '}') + pungetc(); + else + USTPUTC(c, out); + } else { + USTPUTC(c, out); + c = pgetc(); + } } - STPUTC('=', out); flags = 0; if (subtype == 0) { switch (c) { @@ -1243,9 +1248,13 @@ /*FALLTHROUGH*/ default: p = strchr(types, c); - if (p == NULL) - goto badsub; - subtype = p - types + VSNORMAL; + if (p == NULL) { + if (flags == VSNUL) + STPUTC(':', out); + STPUTC(c, out); + subtype = VSERROR; + } else + subtype = p - types + VSNORMAL; break; case '%': case '#': @@ -1261,9 +1270,10 @@ break; } } - } else { + } else if (subtype != VSERROR) { pungetc(); } + STPUTC('=', out); if (subtype != VSLENGTH && (dblquote || arinest)) flags |= VSQUOTE; *(stackblock() + typeloc) = subtype | flags; ==== //depot/projects/arm/src/bin/sh/parser.h#2 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)parser.h 8.3 (Berkeley) 5/4/95 - * $FreeBSD: src/bin/sh/parser.h,v 1.10 2004/04/06 20:06:51 markm Exp $ + * $FreeBSD: src/bin/sh/parser.h,v 1.11 2006/11/05 18:36:05 stefanf Exp $ */ /* control characters in argument strings */ @@ -60,6 +60,7 @@ #define VSTRIMRIGHT 0x8 /* ${var%pattern} */ #define VSTRIMRIGHTMAX 0x9 /* ${var%%pattern} */ #define VSLENGTH 0xa /* ${#var} */ +#define VSERROR 0xb /* Syntax error, issue when expanded */ /* ==== //depot/projects/arm/src/crypto/openssh/ChangeLog#3 (text+ko) ==== @@ -1,7 +1,117 @@ +20061107 + - (dtucker) [sshd.c] Use privsep_pw if we have it, but only require it + if we absolutely need it. Pointed out by Corinna, ok djm@ + - (dtucker) OpenBSD CVS Sync + - markus@cvs.openbsd.org 2006/11/06 21:25:28 + [auth-rsa.c kexgexc.c kexdhs.c key.c ssh-dss.c sshd.c kexgexs.c + ssh-keygen.c bufbn.c moduli.c scard.c kexdhc.c sshconnect1.c dh.c rsa.c] + add missing checks for openssl return codes; with & ok djm@ + - markus@cvs.openbsd.org 2006/11/07 10:31:31 + [monitor.c version.h] + correctly check for bad signatures in the monitor, otherwise the monitor + and the unpriv process can get out of sync. with dtucker@, ok djm@, + dtucker@ + - (dtucker) [README contrib/{caldera,redhat,contrib}/openssh.spec] Bump + versions. + - (dtucker) [dh.c] Type fix for BN_hex2bn; ok markus@ + - (dtucker) Release 4.5p1. + +20061105 + - (djm) OpenBSD CVS Sync + - otto@cvs.openbsd.org 2006/10/28 18:08:10 + [ssh.1] + correct/expand example of usage of -w; ok jmc@ stevesk@ + - markus@cvs.openbsd.org 2006/10/31 16:33:12 + [kexdhc.c kexdhs.c kexgexc.c kexgexs.c] + check DH_compute_key() for -1 even if it should not happen because of + earlier calls to dh_pub_is_valid(); report krahmer at suse.de; ok djm + +20061101 + - (dtucker) [openbsd-compat/port-solaris.c] Bug #1255: Make only hwerr + events fatal in Solaris process contract support and tell it to signal + only processes in the same process group when something happens. + Based on information from andrew.benham at thus.net and similar to + a patch from Chad Mynhier. ok djm@ + +20061027 +- (djm) [auth.c] gc some dead code + +20061023 + - (djm) OpenBSD CVS Sync + - ray@cvs.openbsd.org 2006/09/30 17:48:22 + [sftp.c] + Clear errno before calling the strtol functions. + From Paul Stoeber . + OK deraadt@. + - djm@cvs.openbsd.org 2006/10/06 02:29:19 + [ssh-agent.c ssh-keyscan.c ssh.c] + sys/resource.h needs sys/time.h; prompted by brad@ + (NB. Id sync only for portable) + - djm@cvs.openbsd.org 2006/10/09 23:36:11 + [session.c] + xmalloc -> xcalloc that was missed previously, from portable + (NB. Id sync only for portable, obviously) + - markus@cvs.openbsd.org 2006/10/10 10:12:45 + [sshconnect.c] + sleep before retrying (not after) since sleep changes errno; fixes + pr 5250; rad@twig.com; ok dtucker djm + - markus@cvs.openbsd.org 2006/10/11 12:38:03 + [clientloop.c serverloop.c] + exit instead of doing a blocking tcp send if we detect a client/server + timeout, since the tcp sendqueue might be already full (of alive + requests); ok dtucker, report mpf + - djm@cvs.openbsd.org 2006/10/22 02:25:50 + [sftp-client.c] + cancel progress meter when upload write fails; ok deraadt@ + - (tim) [Makefile.in scard/Makefile.in] Add datarootdir= lines to keep + autoconf 2.60 from complaining. + +20061018 + - (dtucker) OpenBSD CVS Sync + - ray@cvs.openbsd.org 2006/09/25 04:55:38 + [ssh-keyscan.1 ssh.1] + Change "a SSH" to "an SSH". Hurray, I'm not the only one who + pronounces "SSH" as "ess-ess-aich". + OK jmc@ and stevesk@. + - (dtucker) [sshd.c] Reshuffle storing of pw struct; prevents warnings + on older versions of OS X. ok djm@ + +20061016 + - (dtucker) [monitor_fdpass.c] Include sys/in.h, required for cmsg macros + on older (2.0) Linuxes. Based on patch from thmo-13 at gmx de. + +20061006 + - (tim) [buildpkg.sh.in] Use uname -r instead of -v in OS_VER for Solaris. + Differentiate between OpenServer 5 and OpenServer 6 + - (dtucker) [configure.ac] Set put -lselinux into $LIBS while testing for + SELinux functions so they're detected correctly. Patch from pebenito at + gentoo.org. + - (tim) [buildpkg.sh.in] Some systems have really limited nawk (OpenServer). + Allow setting alternate awk in openssh-config.local. + +20061003 + - (tim) [configure.ac] Move CHECK_HEADERS test before platform specific + section so additional platform specific CHECK_HEADER tests will work + correctly. Fixes " on FreeBSD" problem report by des AT des.no + Feedback and "seems like a good idea" dtucker@ + +20061001 + - (dtucker) [audit-bsm.c] Include errno.h. Pointed out by des at des.no. + +20060929 + - (dtucker) [configure.ac] Bug #1239: Fix configure test for OpenSSH engine + support. Patch from andrew.benham at thus net. + +20060928 + - (dtucker) [entropy.c] Bug #1238: include signal.h to fix compilation error + on Solaris 8 w/out /dev/random or prngd. Patch from rl at + math.technion.ac.il. + 20060926 - (dtucker) [bufaux.h] nuke bufaux.h; it's already gone from OpenBSD and not referenced any more. ok djm@ - (dtucker) [sftp-server.8] Resync; spotted by djm@ + - (dtucker) Release 4.4p1. 20060924 - (tim) [configure.ac] Remove CFLAGS hack for UnixWare 1.x/2.x (added @@ -2496,2995 +2606,4 @@ OpenServer 6 and add osr5bigcrypt support so when someone migrates passwords between UnixWare and OpenServer they will still work. OK dtucker@ -20050901 - - (djm) Update RPM spec file versions - -20050831 - - (djm) OpenBSD CVS Sync - - djm@cvs.openbsd.org 2005/08/30 22:08:05 - [gss-serv.c sshconnect2.c] - destroy credentials if krb5_kuserok() call fails. Stops credentials being - delegated to users who are not authorised for GSSAPIAuthentication when - GSSAPIDeletegateCredentials=yes and another authentication mechanism - succeeds; bz#1073 reported by paul.moore AT centrify.com, fix by >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Nov 16 00:27:55 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DC73C16A47B; Thu, 16 Nov 2006 00:27:54 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B7A6216A407 for ; Thu, 16 Nov 2006 00:27:54 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 814B843D45 for ; Thu, 16 Nov 2006 00:27:54 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG0RsEF018246 for ; Thu, 16 Nov 2006 00:27:54 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG0Rrvh018243 for perforce@freebsd.org; Thu, 16 Nov 2006 00:27:53 GMT (envelope-from imp@freebsd.org) Date: Thu, 16 Nov 2006 00:27:53 GMT Message-Id: <200611160027.kAG0Rrvh018243@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110081 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 00:27:55 -0000 http://perforce.freebsd.org/chv.cgi?CH=110081 Change 110081 by imp@imp_lighthouse on 2006/11/16 00:26:58 For some reason, the loopback commit didn't pick these up. Do so by hand. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/memcmp.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/memcpy.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/memset.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/strcmp.c#3 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/strcpy.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/strcvt.c#2 edit .. //depot/projects/arm/src/sys/boot/arm/at91/libat91/strlen.c#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/memcmp.c#2 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memcmp.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + #include "lib.h" int ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/memcpy.c#3 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memcpy.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + #include "lib.h" void ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/memset.c#2 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/memset.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + #include "lib.h" void ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/strcmp.c#3 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strcmp.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + #include "lib.h" int ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/strcpy.c#2 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strcpy.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + #include "lib.h" char * ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/strcvt.c#2 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strcvt.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + /****************************************************************************** * * Filename: p_string.c @@ -19,8 +47,6 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - * - * $FreeBSD: src/sys/boot/arm/at91/libat91/p_string.c,v 1.2 2006/08/10 18:07:49 imp Exp $ *****************************************************************************/ #include "lib.h" ==== //depot/projects/arm/src/sys/boot/arm/at91/libat91/strlen.c#2 (text+ko) ==== @@ -1,3 +1,31 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/libat91/strlen.c,v 1.2 2006/11/09 20:32:36 imp Exp $"); + /****************************************************************************** * * Filename: p_string.c @@ -19,8 +47,6 @@ * owners. This software is not copyrighted and is intended for reference * only. * END_BLOCK - * - * $FreeBSD: src/sys/boot/arm/at91/libat91/p_string.c,v 1.2 2006/08/10 18:07:49 imp Exp $ *****************************************************************************/ #include "lib.h" From owner-p4-projects@FreeBSD.ORG Thu Nov 16 00:30:00 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A79A516A416; Thu, 16 Nov 2006 00:30:00 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81E6516A407 for ; Thu, 16 Nov 2006 00:30:00 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4261843D45 for ; Thu, 16 Nov 2006 00:30:00 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG0U0j3018352 for ; Thu, 16 Nov 2006 00:30:00 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG0TwPp018348 for perforce@freebsd.org; Thu, 16 Nov 2006 00:29:58 GMT (envelope-from mjacob@freebsd.org) Date: Thu, 16 Nov 2006 00:29:58 GMT Message-Id: <200611160029.kAG0TwPp018348@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110082 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 00:30:00 -0000 http://perforce.freebsd.org/chv.cgi?CH=110082 Change 110082 by mjacob@newisp on 2006/11/16 00:29:15 IFC Affected files ... .. //depot/projects/newisp/amd64/amd64/db_trace.c#3 integrate .. //depot/projects/newisp/amd64/amd64/machdep.c#7 integrate .. //depot/projects/newisp/amd64/amd64/msi.c#2 integrate .. //depot/projects/newisp/amd64/include/reg.h#2 integrate .. //depot/projects/newisp/compat/linux/linux_emul.c#6 integrate .. //depot/projects/newisp/compat/linux/linux_misc.c#8 integrate .. //depot/projects/newisp/conf/NOTES#14 integrate .. //depot/projects/newisp/conf/files#13 integrate .. //depot/projects/newisp/conf/files.pc98#4 integrate .. //depot/projects/newisp/dev/bce/if_bce.c#8 integrate .. //depot/projects/newisp/dev/em/if_em.c#13 integrate .. //depot/projects/newisp/dev/em/if_em.h#7 integrate .. //depot/projects/newisp/dev/fxp/if_fxp.c#4 integrate .. //depot/projects/newisp/dev/isp/isp.c#36 integrate .. //depot/projects/newisp/dev/isp/isp_freebsd.c#28 integrate .. //depot/projects/newisp/dev/isp/isp_freebsd.h#18 integrate .. //depot/projects/newisp/dev/isp/isp_library.c#19 integrate .. //depot/projects/newisp/dev/isp/isp_library.h#12 integrate .. //depot/projects/newisp/dev/isp/isp_pci.c#19 integrate .. //depot/projects/newisp/dev/isp/ispvar.h#16 integrate .. //depot/projects/newisp/dev/mfi/mfi.c#8 integrate .. //depot/projects/newisp/dev/mfi/mfi_ioctl.h#2 integrate .. //depot/projects/newisp/dev/mfi/mfi_linux.c#2 integrate .. //depot/projects/newisp/dev/mpt/mpt.c#3 integrate .. //depot/projects/newisp/dev/mpt/mpt.h#3 integrate .. //depot/projects/newisp/dev/mpt/mpt_cam.c#10 integrate .. //depot/projects/newisp/dev/mpt/mpt_pci.c#4 integrate .. //depot/projects/newisp/dev/pci/pcivar.h#5 integrate .. //depot/projects/newisp/dev/usb/uark.c#1 branch .. //depot/projects/newisp/dev/usb/usbdevs#5 integrate .. //depot/projects/newisp/i386/i386/db_trace.c#3 integrate .. //depot/projects/newisp/i386/i386/machdep.c#6 integrate .. //depot/projects/newisp/i386/i386/msi.c#2 integrate .. //depot/projects/newisp/i386/include/reg.h#2 integrate .. //depot/projects/newisp/kern/kern_synch.c#3 integrate .. //depot/projects/newisp/kern/sched_4bsd.c#4 integrate .. //depot/projects/newisp/modules/Makefile#5 integrate .. //depot/projects/newisp/modules/uark/Makefile#1 branch .. //depot/projects/newisp/sun4v/include/asmacros.h#2 integrate .. //depot/projects/newisp/sun4v/include/tte_hash.h#2 integrate .. //depot/projects/newisp/sun4v/sun4v/exception.S#3 integrate .. //depot/projects/newisp/sun4v/sun4v/interrupt.S#3 integrate .. //depot/projects/newisp/sun4v/sun4v/tte_hash.c#2 integrate .. //depot/projects/newisp/sys/elf_common.h#3 integrate .. //depot/projects/newisp/sys/lock_profile.h#2 integrate .. //depot/projects/newisp/sys/mbuf.h#7 integrate Differences ... ==== //depot/projects/newisp/amd64/amd64/db_trace.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.76 2006/10/20 09:44:20 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.77 2006/11/15 19:53:47 jhb Exp $"); #include #include @@ -202,8 +202,8 @@ static char * watchtype_str(int type); int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, - int access, struct dbreg * d); -int amd64_clr_watch(int watchnum, struct dbreg * d); + int access, struct dbreg *d); +int amd64_clr_watch(int watchnum, struct dbreg *d); /* * Figure out how many arguments were passed into the frame at "fp". @@ -536,11 +536,11 @@ unsigned long watchaddr; int size; int access; - struct dbreg * d; + struct dbreg *d; { int i; unsigned int mask; - + if (watchnum == -1) { for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) if ((d->dr[7] & mask) == 0) @@ -550,7 +550,7 @@ else return (-1); } - + switch (access) { case DBREG_DR7_EXEC: size = 1; /* size must be 1 for an execution breakpoint */ @@ -558,9 +558,10 @@ case DBREG_DR7_WRONLY: case DBREG_DR7_RDWR: break; - default : return (-1); + default: + return (-1); } - + /* * we can watch a 1, 2, or 4 byte sized location */ @@ -577,7 +578,7 @@ d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); /* set drN register to the address, N=watchnum */ - DBREG_DRX(d,watchnum) = watchaddr; + DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); @@ -589,15 +590,15 @@ int amd64_clr_watch(watchnum, d) int watchnum; - struct dbreg * d; + struct dbreg *d; { if (watchnum < 0 || watchnum >= 4) return (-1); - + d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); - DBREG_DRX(d,watchnum) = 0; - + DBREG_DRX(d, watchnum) = 0; + return (0); } @@ -607,22 +608,21 @@ db_expr_t addr; db_expr_t size; { - int avail, wsize; - int i; struct dbreg d; - + int avail, i, wsize; + fill_dbregs(NULL, &d); - + avail = 0; - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if ((d.dr[7] & (3 << (i*2))) == 0) avail++; } - - if (avail*4 < size) + + if (avail * 4 < size) return (-1); - - for (i=0; i<4 && (size != 0); i++) { + + for (i = 0; i < 4 && (size != 0); i++) { if ((d.dr[7] & (3<<(i*2))) == 0) { if (size > 4) wsize = 4; @@ -630,15 +630,15 @@ wsize = size; if (wsize == 3) wsize++; - amd64_set_watch(i, addr, wsize, + amd64_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; } } - + set_dbregs(NULL, &d); - + return(0); } @@ -653,22 +653,22 @@ fill_dbregs(NULL, &d); - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if (d.dr[7] & (3 << (i*2))) { - if ((DBREG_DRX((&d), i) >= addr) && + if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) amd64_clr_watch(i, &d); - + } } - + set_dbregs(NULL, &d); - + return(0); } -static +static char * watchtype_str(type) int type; @@ -685,30 +685,29 @@ void db_md_list_watchpoints() { - int i; struct dbreg d; + int i, len, type; fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (d.dr[7] & (0x03 << (i*2))) { - unsigned type, len; type = (d.dr[7] >> (16+(i*4))) & 3; len = (d.dr[7] >> (16+(i*4)+2)) & 3; db_printf(" %-5d %-8s %10s %3d 0x%016lx\n", - i, "enabled", watchtype_str(type), + i, "enabled", watchtype_str(type), len + 1, DBREG_DRX((&d), i)); } else { db_printf(" %-5d disabled\n", i); } } - + db_printf("\ndebug register values:\n"); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX((&d), i)); } db_printf("\n"); ==== //depot/projects/newisp/amd64/amd64/machdep.c#7 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.661 2006/11/15 19:53:47 jhb Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1832,9 +1832,8 @@ addr[nbp++] = (caddr_t)rdr3(); } - for (i=0; i -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.1 2006/11/13 22:23:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); #include #include @@ -315,7 +315,7 @@ /* We need count - cnt more sources starting at index 'cnt'. */ *newirq = cnt; *newcount = count - cnt; - for (j = 0; j < *newirq; j++) { + for (j = 0; j < *newcount; j++) { /* Create a new MSI source. */ msi = malloc(sizeof(struct msi_intsrc), M_MSI, ==== //depot/projects/newisp/amd64/include/reg.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/reg.h,v 1.35 2004/04/05 23:55:14 imp Exp $ + * $FreeBSD: src/sys/amd64/include/reg.h,v 1.36 2006/11/15 19:53:48 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -92,11 +92,13 @@ /* Index 8-15: reserved */ }; -#define DBREG_DR7_EXEC 0x00 /* break on execute */ -#define DBREG_DR7_WRONLY 0x01 /* break on write */ -#define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by - register number */ +#define DBREG_DR7_EXEC 0x00 /* break on execute */ +#define DBREG_DR7_WRONLY 0x01 /* break on write */ +#define DBREG_DR7_RDWR 0x03 /* break on read or write */ + +#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by + register number */ + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. ==== //depot/projects/newisp/compat/linux/linux_emul.c#6 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.8 2006/10/28 10:59:59 netchild Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_emul.c,v 1.9 2006/11/15 11:04:37 kib Exp $"); #include "opt_compat.h" @@ -85,7 +85,7 @@ em = malloc(sizeof *em, M_LINUX, M_WAITOK | M_ZERO); em->pid = child; em->pdeath_signal = 0; - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* handled later in the code */ } else { struct linux_emuldata_shared *s; @@ -117,10 +117,10 @@ * the newly created proc */ if (child != 0) { - if (flags & CLONE_VM) { + if (flags & CLONE_THREAD) { /* lookup the parent */ p_em = em_find(td->td_proc, EMUL_LOCKED); - KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_VM\n")); + KASSERT(p_em != NULL, ("proc_init: parent emuldata not found for CLONE_THREAD\n")); em->shared = p_em->shared; em->shared->refs++; } else { ==== //depot/projects/newisp/compat/linux/linux_misc.c#8 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.193 2006/11/11 16:26:55 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/compat/linux/linux_misc.c,v 1.194 2006/11/15 10:01:06 kib Exp $"); #include "opt_compat.h" #include "opt_mac.h" @@ -802,7 +802,7 @@ * this is necessary because the test in kern_wait doesnt * work because we mess with the options here */ - if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED)) + if (args->options &~ (WUNTRACED|WNOHANG|WCONTINUED|__WCLONE)) return (EINVAL); options = (args->options & (WNOHANG | WUNTRACED)); ==== //depot/projects/newisp/conf/NOTES#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1399 2006/11/11 23:37:52 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1400 2006/11/15 09:13:24 maxim Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -2397,6 +2397,8 @@ # # USB serial support device ucom +# USB support for Technologies ARK3116 based serial adapters +device uark # USB support for Belkin F5U103 and compatible serial adapters device ubsa # USB support for BWCT console serial adapters ==== //depot/projects/newisp/conf/files#13 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.1161 2006/11/11 16:26:56 trhodes Exp $ +# $FreeBSD: src/sys/conf/files,v 1.1162 2006/11/15 09:13:24 maxim Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -1037,6 +1037,7 @@ dev/usb/ohci_pci.c optional ohci pci dev/usb/sl811hs.c optional slhci dev/usb/slhci_pccard.c optional slhci pccard +dev/usb/uark.c optional uark dev/usb/ubsa.c optional ubsa dev/usb/ubser.c optional ubser dev/usb/ucom.c optional ucom ==== //depot/projects/newisp/conf/files.pc98#4 (text+ko) ==== @@ -3,7 +3,7 @@ # # modified for PC-9801/PC-9821 # -# $FreeBSD: src/sys/conf/files.pc98,v 1.349 2006/10/29 14:02:39 netchild Exp $ +# $FreeBSD: src/sys/conf/files.pc98,v 1.350 2006/11/14 14:28:09 ru Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -176,6 +176,7 @@ i386/i386/mpboot.s optional smp i386/i386/mptable.c optional apic i386/i386/mptable_pci.c optional apic pci +i386/i386/msi.c optional apic pci i386/i386/nexus.c standard i386/i386/perfmon.c optional perfmon i386/i386/pmap.c standard ==== //depot/projects/newisp/dev/bce/if_bce.c#8 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.18 2006/10/31 03:28:25 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.19 2006/11/15 20:04:56 jhb Exp $"); /* * The following controllers are supported by this driver: @@ -452,7 +452,7 @@ struct bce_softc *sc; struct ifnet *ifp; u32 val; - int mbuf, rid, rc = 0; + int count, mbuf, rid, rc = 0; sc = device_get_softc(dev); sc->bce_dev = dev; @@ -485,7 +485,12 @@ sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res); /* Allocate PCI IRQ resources. */ - rid = 0; + count = pci_msi_count(dev); + if (count == 1 && pci_alloc_msi(dev, &count) == 0) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + } else + rid = 0; sc->bce_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -2539,9 +2544,12 @@ if (sc->bce_irq != NULL) bus_release_resource(dev, SYS_RES_IRQ, - 0, + sc->bce_flags & BCE_USING_MSI_FLAG ? 1 : 0, sc->bce_irq); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + pci_release_msi(dev); + if (sc->bce_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, ==== //depot/projects/newisp/dev/em/if_em.c#13 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.163 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.164 2006/11/15 20:04:56 jhb Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -2200,7 +2200,12 @@ rman_get_bushandle(adapter->flash_mem); } - rid = 0x0; + val = pci_msi_count(dev); + if (val == 1 && pci_alloc_msi(dev, &val) == 0) { + rid = 1; + adapter->msi = 1; + } else + rid = 0; adapter->res_interrupt = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (adapter->res_interrupt == NULL) { @@ -2279,7 +2284,11 @@ device_t dev = adapter->dev; if (adapter->res_interrupt != NULL) - bus_release_resource(dev, SYS_RES_IRQ, 0, adapter->res_interrupt); + bus_release_resource(dev, SYS_RES_IRQ, adapter->msi ? 1 : 0, + adapter->res_interrupt); + + if (adapter->msi) + pci_release_msi(dev); if (adapter->res_memory != NULL) bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), ==== //depot/projects/newisp/dev/em/if_em.h#7 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.55 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.56 2006/11/15 20:04:56 jhb Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -288,6 +288,7 @@ struct callout tx_fifo_timer; int watchdog_timer; int io_rid; + int msi; int if_flags; struct mtx mtx; int em_insert_vlan_header; ==== //depot/projects/newisp/dev/fxp/if_fxp.c#4 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.259 2006/11/06 12:19:43 rink Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/fxp/if_fxp.c,v 1.260 2006/11/14 18:54:31 rink Exp $"); /* * Intel EtherExpress Pro/100B PCI Fast Ethernet driver @@ -179,6 +179,7 @@ { 0x1068, -1, "Intel 82801FBM (ICH6-M) Pro/100 VE Ethernet" }, { 0x1069, -1, "Intel 82562EM/EX/GX Pro/100 Ethernet" }, { 0x1092, -1, "Intel Pro/100 VE Network Connection" }, + { 0x1093, -1, "Intel Pro/100 VM Network Connection" }, { 0x1094, -1, "Intel Pro/100 946GZ (ICH7) Network Connection" }, { 0x1209, -1, "Intel 82559ER Embedded 10/100 Ethernet" }, { 0x1229, 0x01, "Intel 82557 Pro/100 Ethernet" }, ==== //depot/projects/newisp/dev/isp/isp.c#36 (text+ko) ==== @@ -42,7 +42,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.128 2006/11/02 03:21:30 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.129 2006/11/14 08:45:47 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ @@ -2986,7 +2986,7 @@ lp->new_roles = tmp.roles; lp->state = FC_PORTDB_STATE_PENDING_VALID; isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%02x@0x%x Pending Valid", + "Loop Port 0x%06x@0x%x Pending Valid", tmp.portid, tmp.handle); break; } ==== //depot/projects/newisp/dev/isp/isp_freebsd.c#28 (text+ko) ==== @@ -29,7 +29,7 @@ * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. */ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.126 2006/11/02 03:21:31 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.127 2006/11/14 08:45:48 mjacob Exp $"); #include #include #include ==== //depot/projects/newisp/dev/isp/isp_freebsd.h#18 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.94 2006/11/02 03:21:31 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_freebsd.h,v 1.95 2006/11/14 08:45:48 mjacob Exp $ */ /*- * Qlogic ISP SCSI Host Adapter FreeBSD Wrapper Definitions * ==== //depot/projects/newisp/dev/isp/isp_library.c#19 (text) ==== @@ -32,7 +32,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.6 2006/11/02 03:21:31 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.7 2006/11/14 08:45:48 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ ==== //depot/projects/newisp/dev/isp/isp_library.h#12 (text) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/isp_library.h,v 1.3 2006/11/02 03:21:31 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/isp_library.h,v 1.4 2006/11/14 08:45:48 mjacob Exp $ */ /*- * Qlogic Host Adapter Library Functions * ==== //depot/projects/newisp/dev/isp/isp_pci.c#19 (text+ko) ==== @@ -30,7 +30,7 @@ * FreeBSD Version. */ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.124 2006/11/02 03:21:31 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.125 2006/11/14 08:45:48 mjacob Exp $"); #include #include ==== //depot/projects/newisp/dev/isp/ispvar.h#16 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.78 2006/11/02 03:21:32 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/ispvar.h,v 1.79 2006/11/14 08:45:48 mjacob Exp $ */ /*- * Soft Definitions for for Qlogic ISP SCSI adapters. * ==== //depot/projects/newisp/dev/mfi/mfi.c#8 (text) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.21 2006/10/16 04:30:09 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi.c,v 1.22 2006/11/14 16:48:00 ambrisko Exp $"); #include "opt_mfi.h" @@ -1797,6 +1797,14 @@ { struct mfi_softc *sc; union mfi_statrequest *ms; + struct mfi_ioc_packet *ioc; + struct mfi_ioc_aen *aen; + struct mfi_command *cm = NULL; + struct mfi_dcmd_frame *dcmd; + uint32_t context; + uint32_t *sense_ptr; + uint8_t *data = NULL, *temp; + int i; int error; sc = dev->si_drv1; @@ -1818,7 +1826,133 @@ break; } break; - case 0xc1144d01: /* Firmware Linux ioctl shim */ + case MFI_CMD: + ioc = (struct mfi_ioc_packet *)arg; + + mtx_lock(&sc->mfi_io_lock); + if ((cm = mfi_dequeue_free(sc)) == NULL) { + mtx_unlock(&sc->mfi_io_lock); + return (EBUSY); + } + mtx_unlock(&sc->mfi_io_lock); + + /* + * save off original context since copying from user + * will clobber some data + */ + context = cm->cm_frame->header.context; + + bcopy(ioc->mi_frame.raw, cm->cm_frame, + ioc->mi_sgl_off); /* Linux can do 2 frames ? */ + cm->cm_total_frame_size = ioc->mi_sgl_off; + cm->cm_sg = + (union mfi_sgl *)&cm->cm_frame->bytes[ioc->mi_sgl_off]; + cm->cm_flags = MFI_CMD_DATAIN | MFI_CMD_DATAOUT + | MFI_CMD_POLLED; + cm->cm_len = cm->cm_frame->header.data_len; + cm->cm_data = data = malloc(cm->cm_len, M_MFIBUF, + M_WAITOK | M_ZERO); + + /* restore header context */ + cm->cm_frame->header.context = context; + /* ioctl's are dcmd types */ + dcmd = &cm->cm_frame->dcmd; + + temp = data; + for (i = 0; i < ioc->mi_sge_count; i++) { + error = copyin(ioc->mi_sgl[i].iov_base, + temp, + ioc->mi_sgl[i].iov_len); + if (error != 0) { + device_printf(sc->mfi_dev, + "Copy in failed"); + goto out; + } + temp = &temp[ioc->mi_sgl[i].iov_len]; + } + + if (ioc->mi_sense_len) { + sense_ptr = + (void *)&cm->cm_frame->bytes[ioc->mi_sense_off]; + *sense_ptr = cm->cm_sense_busaddr; + } + + mtx_lock(&sc->mfi_io_lock); + if ((error = mfi_mapcmd(sc, cm)) != 0) { + device_printf(sc->mfi_dev, + "Controller info buffer map failed"); + mtx_unlock(&sc->mfi_io_lock); + goto out; + } + + if ((error = mfi_polled_command(sc, cm)) != 0) { + device_printf(sc->mfi_dev, + "Controller polled failed"); + mtx_unlock(&sc->mfi_io_lock); + goto out; + } + + bus_dmamap_sync(sc->mfi_buffer_dmat, cm->cm_dmamap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->mfi_buffer_dmat, cm->cm_dmamap); + mtx_unlock(&sc->mfi_io_lock); + + temp = data; + for (i = 0; i < ioc->mi_sge_count; i++) { + error = copyout(temp, + ioc->mi_sgl[i].iov_base, + ioc->mi_sgl[i].iov_len); + if (error != 0) { + device_printf(sc->mfi_dev, + "Copy out failed"); + goto out; + } + temp = &temp[ioc->mi_sgl[i].iov_len]; + } + + if (ioc->mi_sense_len) { + /* copy out sense */ + sense_ptr = (void *) + &ioc->mi_frame.raw[ioc->mi_sense_off]; + temp = 0; + temp += cm->cm_sense_busaddr; + error = copyout(temp, sense_ptr, + ioc->mi_sense_len); + if (error != 0) { + device_printf(sc->mfi_dev, + "Copy out failed"); + goto out; + } + } + + ioc->mi_frame.hdr.cmd_status = cm->cm_frame->header.cmd_status; + if (cm->cm_frame->header.cmd_status == MFI_STAT_OK) { + switch (dcmd->opcode) { + case MFI_DCMD_CFG_CLEAR: + case MFI_DCMD_CFG_ADD: +/* + mfi_ldrescan(sc); +*/ + break; + } + } +out: + if (data) + free(data, M_MFIBUF); + if (cm) { + mtx_lock(&sc->mfi_io_lock); + mfi_release_command(cm); + mtx_unlock(&sc->mfi_io_lock); + } + + break; + case MFI_SET_AEN: + aen = (struct mfi_ioc_aen *)arg; + error = mfi_aen_register(sc, aen->aen_seq_num, + aen->aen_class_locale); + + break; + case MFI_LINUX_CMD_2: /* Firmware Linux ioctl shim */ { devclass_t devclass; struct mfi_linux_ioc_packet l_ioc; @@ -1839,7 +1973,7 @@ cmd, arg, flag, td)); break; } - case 0x400c4d03: /* AEN Linux ioctl shim */ + case MFI_LINUX_SET_AEN_2: /* AEN Linux ioctl shim */ { devclass_t devclass; struct mfi_linux_ioc_aen l_aen; @@ -1880,13 +2014,14 @@ uint32_t *sense_ptr; uint32_t context; uint8_t *data = NULL, *temp; + void *temp_convert; int i; int error; sc = dev->si_drv1; error = 0; switch (cmd) { - case 0xc1144d01: /* Firmware Linux ioctl shim */ + case MFI_LINUX_CMD_2: /* Firmware Linux ioctl shim */ error = copyin(arg, &l_ioc, sizeof(l_ioc)); if (error != 0) return (error); @@ -1924,7 +2059,9 @@ temp = data; for (i = 0; i < l_ioc.lioc_sge_count; i++) { - error = copyin(l_ioc.lioc_sgl[i].iov_base, + temp_convert = + (void *)(uintptr_t)l_ioc.lioc_sgl[i].iov_base; + error = copyin(temp_convert, temp, l_ioc.lioc_sgl[i].iov_len); if (error != 0) { @@ -1963,8 +2100,10 @@ temp = data; for (i = 0; i < l_ioc.lioc_sge_count; i++) { + temp_convert = + (void *)(uintptr_t)l_ioc.lioc_sgl[i].iov_base; error = copyout(temp, - l_ioc.lioc_sgl[i].iov_base, + temp_convert, l_ioc.lioc_sgl[i].iov_len); if (error != 0) { device_printf(sc->mfi_dev, @@ -2017,7 +2156,7 @@ } return (error); - case 0x400c4d03: /* AEN Linux ioctl shim */ + case MFI_LINUX_SET_AEN_2: /* AEN Linux ioctl shim */ error = copyin(arg, &l_aen, sizeof(l_aen)); if (error != 0) return (error); ==== //depot/projects/newisp/dev/mfi/mfi_ioctl.h#2 (text) ==== @@ -25,7 +25,14 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi_ioctl.h,v 1.2 2006/05/18 23:30:47 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi_ioctl.h,v 1.3 2006/11/14 16:48:00 ambrisko Exp $"); + +#if defined(__amd64__) /* Assume amd64 wants 32 bit Linux */ +struct iovec32 { + u_int32_t iov_base; + int iov_len; +}; +#endif #define MFIQ_FREE 0 #define MFIQ_BIO 1 @@ -43,6 +50,33 @@ struct mfi_qstat ms_qstat; }; +#define MAX_IOCTL_SGE 16 + +struct mfi_ioc_packet { + uint16_t mi_adapter_no; + uint16_t mi_pad1; + uint32_t mi_sgl_off; + uint32_t mi_sge_count; + uint32_t mi_sense_off; + uint32_t mi_sense_len; + union { + uint8_t raw[128]; + struct mfi_frame_header hdr; + } mi_frame; + + struct iovec mi_sgl[MAX_IOCTL_SGE]; +} __packed; + +struct mfi_ioc_aen { + uint16_t aen_adapter_no; + uint16_t aen_pad1; + uint32_t aen_seq_num; + uint32_t aen_class_locale; +} __packed; + +#define MFI_CMD _IOWR('M', 1, struct mfi_ioc_packet) +#define MFI_SET_AEN _IOW('M', 3, struct mfi_ioc_aen) + #define MAX_LINUX_IOCTL_SGE 16 struct mfi_linux_ioc_packet { @@ -57,7 +91,11 @@ struct mfi_frame_header hdr; } lioc_frame; +#if defined(__amd64__) /* Assume amd64 wants 32 bit Linux */ + struct iovec32 lioc_sgl[MAX_LINUX_IOCTL_SGE]; +#else struct iovec lioc_sgl[MAX_LINUX_IOCTL_SGE]; +#endif } __packed; #define MFIIO_STATS _IOWR('Q', 101, union mfi_statrequest) @@ -68,3 +106,12 @@ uint32_t laen_seq_num; uint32_t laen_class_locale; } __packed; + +/* + * Create a second set so the FreeBSD native ioctl doesn't + * conflict in FreeBSD ioctl handler. Translate in mfi_linux.c. + */ +#define MFI_LINUX_CMD 0xc1144d01 +#define MFI_LINUX_SET_AEN 0x400c4d03 +#define MFI_LINUX_CMD_2 0xc1144d02 +#define MFI_LINUX_SET_AEN_2 0x400c4d04 ==== //depot/projects/newisp/dev/mfi/mfi_linux.c#2 (text) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi_linux.c,v 1.1 2006/05/18 23:30:47 ambrisko Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mfi/mfi_linux.c,v 1.2 2006/11/14 16:48:00 ambrisko Exp $"); #include #include @@ -45,6 +45,9 @@ #include #include +#include +#include + /* There are multiple ioctl number ranges that need to be handled */ #define MFI_LINUX_IOCTL_MIN 0x4d00 #define MFI_LINUX_IOCTL_MAX 0x4d04 @@ -81,10 +84,20 @@ { struct file *fp; int error; + u_long cmd = args->cmd; + switch (cmd) { + case MFI_LINUX_CMD: + cmd = MFI_LINUX_CMD_2; + break; + case MFI_LINUX_SET_AEN: + cmd = MFI_LINUX_SET_AEN_2; + break; + } + if ((error = fget(p, args->fd, &fp)) != 0) return (error); - error = fo_ioctl(fp, args->cmd, (caddr_t)args->arg, p->td_ucred, p); + error = fo_ioctl(fp, cmd, (caddr_t)args->arg, p->td_ucred, p); fdrop(fp, p); return (error); } ==== //depot/projects/newisp/dev/mpt/mpt.c#3 (text+ko) ==== @@ -96,7 +96,7 @@ >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Nov 16 00:36:09 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3C1DD16A417; Thu, 16 Nov 2006 00:36:09 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 16FF916A412 for ; Thu, 16 Nov 2006 00:36:09 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 59C8443D5C for ; Thu, 16 Nov 2006 00:36:08 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG0a8C6019917 for ; Thu, 16 Nov 2006 00:36:08 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG0a85V019913 for perforce@freebsd.org; Thu, 16 Nov 2006 00:36:08 GMT (envelope-from mjacob@freebsd.org) Date: Thu, 16 Nov 2006 00:36:08 GMT Message-Id: <200611160036.kAG0a85V019913@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110083 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 00:36:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=110083 Change 110083 by mjacob@newisp on 2006/11/16 00:35:52 Some minor diff reduction cleanups plus a new internal FC command data structure definition for SMI-S support. Affected files ... .. //depot/projects/newisp/dev/isp/isp.c#37 edit .. //depot/projects/newisp/dev/isp/isp_library.c#20 edit .. //depot/projects/newisp/dev/isp/ispmbox.h#13 edit Differences ... ==== //depot/projects/newisp/dev/isp/isp.c#37 (text+ko) ==== @@ -26,8 +26,9 @@ /* * Machine and OS Independent (well, as best as possible) - * code for the Qlogic ISP SCSI adapters. + * code for the Qlogic ISP SCSI and FC-SCSI adapters. */ + /* * Inspiration and ideas about this driver are from Erik Moe's Linux driver * (qlogicisp.c) and Dave Miller's SBus version of same (qlogicisp.c). Some @@ -42,7 +43,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.129 2006/11/14 08:45:47 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.130 2006/11/16 00:31:46 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ ==== //depot/projects/newisp/dev/isp/isp_library.c#20 (text) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2006 by Matthew Jacob + * Copyright (c) 2006 by Matthew Jacob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.7 2006/11/14 08:45:48 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.8 2006/11/16 00:31:46 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ ==== //depot/projects/newisp/dev/isp/ispmbox.h#13 (text+ko) ==== @@ -1347,4 +1347,30 @@ #define els_recv_dsd_a4732 inout.out._els_recv_dsd_a4732 #define els_recv_dsd_a6348 inout.out._els_recv_dsd_a6348 } els_t; + +/* + * A handy package structure for running FC-SCSI commands via RUN IOCB A64. + */ +typedef struct { + uint16_t handle; + uint16_t lun; + uint32_t portid; + uint32_t timeout; + union { + struct { + uint32_t data_length; + uint8_t do_read; + uint8_t pad[3]; + uint8_t cdb[16]; + void *data_ptr; + } beg; + struct { + uint32_t data_residual; + uint8_t status; + uint8_t pad; + uint16_t sense_length; + uint8_t sense_data[32]; + } end; + } fcd; +} isp_xcmd_t; #endif /* _ISPMBOX_H */ From owner-p4-projects@FreeBSD.ORG Thu Nov 16 01:00:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 205A016A417; Thu, 16 Nov 2006 01:00:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D529D16A415 for ; Thu, 16 Nov 2006 01:00:42 +0000 (UTC) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 77C1043D5F for ; Thu, 16 Nov 2006 01:00:42 +0000 (GMT) (envelope-from imp@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG10gP6031703 for ; Thu, 16 Nov 2006 01:00:42 GMT (envelope-from imp@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG10gh8031699 for perforce@freebsd.org; Thu, 16 Nov 2006 01:00:42 GMT (envelope-from imp@freebsd.org) Date: Thu, 16 Nov 2006 01:00:42 GMT Message-Id: <200611160100.kAG10gh8031699@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to imp@freebsd.org using -f From: Warner Losh To: Perforce Change Reviews Cc: Subject: PERFORCE change 110088 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 01:00:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=110088 Change 110088 by imp@imp_lighthouse on 2006/11/16 00:59:48 another case where merging didn't happen. Affected files ... .. //depot/projects/arm/src/sys/boot/arm/at91/boot2/board.h#2 edit Differences ... ==== //depot/projects/arm/src/sys/boot/arm/at91/boot2/board.h#2 (text+ko) ==== @@ -1,2 +1,28 @@ +/*- + * Copyright (c) 2006 M. Warner Losh. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: src/sys/boot/arm/at91/boot2/board.h,v 1.1 2006/11/09 20:07:26 imp Exp $ + */ + void Update(void); void board_init(void); From owner-p4-projects@FreeBSD.ORG Thu Nov 16 03:20:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 57DF816A416; Thu, 16 Nov 2006 03:20:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 29EA616A412 for ; Thu, 16 Nov 2006 03:20:40 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id EB18D43D49 for ; Thu, 16 Nov 2006 03:20:39 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG3KdAb058150 for ; Thu, 16 Nov 2006 03:20:39 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG3Kdlg058147 for perforce@freebsd.org; Thu, 16 Nov 2006 03:20:39 GMT (envelope-from marcel@freebsd.org) Date: Thu, 16 Nov 2006 03:20:39 GMT Message-Id: <200611160320.kAG3Kdlg058147@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 110092 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 03:20:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=110092 Change 110092 by marcel@marcel_nfs on 2006/11/16 03:19:58 Declare the classes as weak. This allows device driver classes to be compiled-out without causing unresolved symbols. Implement the DT tag fully. Affected files ... .. //depot/projects/uart/dev/uart/uart.h#12 edit .. //depot/projects/uart/dev/uart/uart_core.c#56 edit .. //depot/projects/uart/dev/uart/uart_cpu.h#21 edit .. //depot/projects/uart/dev/uart/uart_cpu_amd64.c#12 edit .. //depot/projects/uart/dev/uart/uart_cpu_i386.c#13 edit .. //depot/projects/uart/dev/uart/uart_cpu_ia64.c#14 edit .. //depot/projects/uart/dev/uart/uart_cpu_pc98.c#14 edit .. //depot/projects/uart/dev/uart/uart_cpu_powerpc.c#3 edit .. //depot/projects/uart/dev/uart/uart_subr.c#8 edit Differences ... ==== //depot/projects/uart/dev/uart/uart.h#12 (text+ko) ==== @@ -64,10 +64,9 @@ */ struct uart_class; -extern struct uart_class uart_ns8250_class; -extern struct uart_class uart_quicc_class; -extern struct uart_class uart_sab82532_class; -extern struct uart_class uart_z8530_class; +extern struct uart_class uart_ns8250_class __attribute__((weak)); +extern struct uart_class uart_sab82532_class __attribute__((weak)); +extern struct uart_class uart_z8530_class __attribute__((weak)); /* * Device flags. ==== //depot/projects/uart/dev/uart/uart_core.c#56 (text+ko) ==== @@ -70,16 +70,22 @@ SLIST_INSERT_HEAD(&uart_sysdevs, di, next); } +const char * +uart_getname(struct uart_class *uc) +{ + return ((uc != NULL) ? uc->name : NULL); +} + struct uart_ops * uart_getops(struct uart_class *uc) { - return (uc->uc_ops); + return ((uc != NULL) ? uc->uc_ops : NULL); } int uart_getrange(struct uart_class *uc) { - return (uc->uc_range); + return ((uc != NULL) ? uc->uc_range : 0); } /* @@ -303,18 +309,26 @@ struct uart_devinfo *sysdev; int error; + sc = device_get_softc(dev); + /* + * All uart_class references are weak. Check that the needed + * class has been compiled-in. Fail if not. + */ + if (sc->sc_class == NULL) + return (ENXIO); + + /* * Initialize the instance. Note that the instance (=softc) does * not necessarily match the hardware specific softc. We can't do * anything about it now, because we may not attach to the device. * Hardware drivers cannot use any of the class specific fields * while probing. */ - sc = device_get_softc(dev); kobj_init((kobj_t)sc, (kobj_class_t)sc->sc_class); sc->sc_dev = dev; if (device_get_desc(dev) == NULL) - device_set_desc(dev, sc->sc_class->name); + device_set_desc(dev, uart_getname(sc->sc_class)); /* * Allocate the register resource. We assume that all UARTs have @@ -326,12 +340,13 @@ sc->sc_rrid = rid; sc->sc_rtype = SYS_RES_IOPORT; sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, sc->sc_class->uc_range, RF_ACTIVE); + 0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); if (sc->sc_rres == NULL) { sc->sc_rrid = rid; sc->sc_rtype = SYS_RES_MEMORY; sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, - &sc->sc_rrid, 0, ~0, sc->sc_class->uc_range, RF_ACTIVE); + &sc->sc_rrid, 0, ~0, uart_getrange(sc->sc_class), + RF_ACTIVE); if (sc->sc_rres == NULL) return (ENXIO); } @@ -400,7 +415,7 @@ * collected by uart_bus_probe() intact. */ sc->sc_rres = bus_alloc_resource(dev, sc->sc_rtype, &sc->sc_rrid, - 0, ~0, sc->sc_class->uc_range, RF_ACTIVE); + 0, ~0, uart_getrange(sc->sc_class), RF_ACTIVE); if (sc->sc_rres == NULL) { mtx_destroy(&sc->sc_hwmtx_s); return (ENXIO); ==== //depot/projects/uart/dev/uart/uart_cpu.h#21 (text+ko) ==== @@ -74,6 +74,7 @@ int uart_cpu_getdev(int, struct uart_devinfo *); int uart_getenv(int, struct uart_devinfo *, struct uart_class *); +const char *uart_getname(struct uart_class *); struct uart_ops *uart_getops(struct uart_class *); int uart_getrange(struct uart_class *); ==== //depot/projects/uart/dev/uart/uart_cpu_amd64.c#12 (text+ko) ==== @@ -53,6 +53,8 @@ unsigned int i, ivar; class = &uart_ns8250_class; + if (class == NULL) + return (ENXIO); /* Check the environment. */ if (uart_getenv(devtype, di, class) == 0) ==== //depot/projects/uart/dev/uart/uart_cpu_i386.c#13 (text+ko) ==== @@ -53,6 +53,8 @@ unsigned int i, ivar; class = &uart_ns8250_class; + if (class == NULL) + return (ENXIO); /* Check the environment. */ if (uart_getenv(devtype, di, class) == 0) ==== //depot/projects/uart/dev/uart/uart_cpu_ia64.c#14 (text+ko) ==== @@ -65,6 +65,8 @@ unsigned int i; class = &uart_ns8250_class; + if (class == NULL) + return (ENXIO); /* * Use the DIG64 HCDP table if present. ==== //depot/projects/uart/dev/uart/uart_cpu_pc98.c#14 (text+ko) ==== @@ -53,6 +53,8 @@ unsigned int i, ivar, flags; class = &uart_ns8250_class; + if (class == NULL) + return (ENXIO); /* Check the environment. */ if (uart_getenv(devtype, di, class) == 0) ==== //depot/projects/uart/dev/uart/uart_cpu_powerpc.c#3 (text) ==== @@ -52,9 +52,14 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) { char buf[64]; + struct uart_class *class; phandle_t input, opts; int error; + class = &uart_z8530_class; + if (class == NULL) + return (ENXIO); + if ((opts = OF_finddevice("/options")) == -1) return (ENXIO); switch (devtype) { @@ -93,7 +98,7 @@ if (error) return (error); - di->ops = uart_z8530_ops; + di->ops = uart_getops(class); di->bas.rclk = 230400; di->bas.chan = 1; ==== //depot/projects/uart/dev/uart/uart_subr.c#8 (text+ko) ==== @@ -48,6 +48,13 @@ #define UART_TAG_SB 8 #define UART_TAG_XO 9 +static struct uart_class *uart_classes[] = { + &uart_ns8250_class, + &uart_sab82532_class, + &uart_z8530_class, +}; +static size_t uart_nclasses = sizeof(uart_classes) / sizeof(uart_classes[0]); + static bus_addr_t uart_parse_addr(__const char **p) { @@ -57,6 +64,22 @@ static struct uart_class * uart_parse_class(struct uart_class *class, __const char **p) { + struct uart_class *uc; + const char *nm; + size_t len; + u_int i; + + for (i = 0; i < uart_nclasses; i++) { + uc = uart_classes[i]; + nm = uart_getname(uc); + if (nm == NULL || *nm == '\0') + continue; + len = strlen(nm); + if (strncmp(nm, *p, len) == 0) { + *p += len; + return (uc); + } + } return (class); } @@ -173,9 +196,12 @@ bus_addr_t addr = ~0U; int error; - /* We must get a valid default device class. */ + /* + * All uart_class references are weak. Make sure the default + * device class has been compiled-in. + */ if (class == NULL) - return (EDOOFUS); + return (ENXIO); /* * Check the environment variables "hw.uart.console" and From owner-p4-projects@FreeBSD.ORG Thu Nov 16 03:22:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9918216A416; Thu, 16 Nov 2006 03:22:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6FA6016A412 for ; Thu, 16 Nov 2006 03:22:43 +0000 (UTC) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3B4CC43D55 for ; Thu, 16 Nov 2006 03:22:43 +0000 (GMT) (envelope-from marcel@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG3Mh80058865 for ; Thu, 16 Nov 2006 03:22:43 GMT (envelope-from marcel@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG3MgXL058846 for perforce@freebsd.org; Thu, 16 Nov 2006 03:22:42 GMT (envelope-from marcel@freebsd.org) Date: Thu, 16 Nov 2006 03:22:42 GMT Message-Id: <200611160322.kAG3MgXL058846@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to marcel@freebsd.org using -f From: Marcel Moolenaar To: Perforce Change Reviews Cc: Subject: PERFORCE change 110093 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 03:22:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=110093 Change 110093 by marcel@marcel_nfs on 2006/11/16 03:22:07 Allow the range of a SCC class to be 0. This gives all child devices the same I/O range, which is useful for embedded communications controllers. Affected files ... .. //depot/projects/uart/dev/scc/scc_core.c#25 edit Differences ... ==== //depot/projects/uart/dev/scc/scc_core.c#25 (text) ==== @@ -101,7 +101,7 @@ struct scc_softc *sc, *sc0; const char *sep; bus_space_handle_t bh; - u_long base, size, start; + u_long base, size, start, sz; int c, error, mode, sysdev; /* @@ -153,6 +153,7 @@ */ sysdev = 0; base = rman_get_start(sc->sc_rres); + sz = (size != 0) ? size : rman_get_size(sc->sc_rres); start = base + ((cl->cl_range < 0) ? size * (cl->cl_channels - 1) : 0); for (c = 0; c < cl->cl_channels; c++) { ch = &sc->sc_chan[c]; @@ -160,11 +161,11 @@ ch->ch_nr = c + 1; resource_list_add(&ch->ch_rlist, sc->sc_rtype, 0, start, - start + size - 1, size); + start + sz - 1, sz); rle = resource_list_find(&ch->ch_rlist, sc->sc_rtype, 0); rle->res = &ch->ch_rres; bus_space_subregion(rman_get_bustag(sc->sc_rres), - rman_get_bushandle(sc->sc_rres), start - base, size, &bh); + rman_get_bushandle(sc->sc_rres), start - base, sz, &bh); rman_set_bushandle(rle->res, bh); rman_set_bustag(rle->res, rman_get_bustag(sc->sc_rres)); @@ -334,7 +335,7 @@ { struct scc_softc *sc; struct scc_class *cl; - u_long size; + u_long size, sz; int error; /* @@ -376,9 +377,10 @@ * Fill in the bus access structure and call the hardware specific * probe method. */ + sz = (size != 0) ? size : rman_get_size(sc->sc_rres); sc->sc_bas.bsh = rman_get_bushandle(sc->sc_rres); sc->sc_bas.bst = rman_get_bustag(sc->sc_rres); - sc->sc_bas.range = size; + sc->sc_bas.range = sz; sc->sc_bas.rclk = rclk; sc->sc_bas.regshft = regshft; From owner-p4-projects@FreeBSD.ORG Thu Nov 16 03:51:25 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B51B816A416; Thu, 16 Nov 2006 03:51:25 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 729CF16A412 for ; Thu, 16 Nov 2006 03:51:25 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A7F3C43D66 for ; Thu, 16 Nov 2006 03:51:18 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG3pIXQ063384 for ; Thu, 16 Nov 2006 03:51:18 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG3pIXV063378 for perforce@freebsd.org; Thu, 16 Nov 2006 03:51:18 GMT (envelope-from mjacob@freebsd.org) Date: Thu, 16 Nov 2006 03:51:18 GMT Message-Id: <200611160351.kAG3pIXV063378@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110094 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 03:51:26 -0000 http://perforce.freebsd.org/chv.cgi?CH=110094 Change 110094 by mjacob@newisp on 2006/11/16 03:50:38 Pull in mpt_pci.c change. Affected files ... .. //depot/projects/newisp/dev/mpt/mpt_pci.c#5 integrate Differences ... ==== //depot/projects/newisp/dev/mpt/mpt_pci.c#5 (text+ko) ==== @@ -99,7 +99,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.41 2006/11/15 21:41:59 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_pci.c,v 1.42 2006/11/16 02:40:18 mjacob Exp $"); #include #include @@ -512,7 +512,6 @@ /* Get a handle to the interrupt */ iqd = 0; -#if 0 if (pci_msi_count(dev) == 1) { mpt->pci_msi_count = 1; if (pci_alloc_msi(dev, &mpt->pci_msi_count) == 0) @@ -520,7 +519,6 @@ else mpt->pci_msi_count = 0; } -#endif mpt->pci_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &iqd, RF_ACTIVE | RF_SHAREABLE); if (mpt->pci_irq == NULL) { From owner-p4-projects@FreeBSD.ORG Thu Nov 16 07:52:18 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9A11816A412; Thu, 16 Nov 2006 07:52:18 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E80216A407 for ; Thu, 16 Nov 2006 07:52:18 +0000 (UTC) (envelope-from kevlo@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 282E043D4C for ; Thu, 16 Nov 2006 07:52:18 +0000 (GMT) (envelope-from kevlo@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG7qI5N016473 for ; Thu, 16 Nov 2006 07:52:18 GMT (envelope-from kevlo@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG7qHE6016470 for perforce@freebsd.org; Thu, 16 Nov 2006 07:52:17 GMT (envelope-from kevlo@freebsd.org) Date: Thu, 16 Nov 2006 07:52:17 GMT Message-Id: <200611160752.kAG7qHE6016470@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kevlo@freebsd.org using -f From: Kevin Lo To: Perforce Change Reviews Cc: Subject: PERFORCE change 110098 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 07:52:18 -0000 http://perforce.freebsd.org/chv.cgi?CH=110098 Change 110098 by kevlo@kevlo_rtsl on 2006/11/16 07:51:27 Cleanup -- eliminate unused header file and functions. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_machdep.c#6 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ds1672.c#2 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_sipvar.h#2 delete .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_timer.c#3 edit .. //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425var.h#7 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_machdep.c#6 (text+ko) ==== @@ -96,7 +96,6 @@ #include #include -#include #define KERNEL_PT_SYS 0 /* Page table for mapping proc0 zero page */ #define KERNEL_PT_IO 1 @@ -480,7 +479,7 @@ */ cpu_idcache_wbinv_all(); /* - * Fetch the SDRAM start/size from the i80321 SDRAM configration + * Fetch the SDRAM start/size from the ixp425 SDRAM configration * registers. */ cninit(); ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ds1672.c#2 (text+ko) ==== @@ -46,7 +46,6 @@ #include #include -#include #include ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425_timer.c#3 (text+ko) ==== @@ -54,7 +54,6 @@ #include #include #include -#include static uint32_t counts_per_hz; ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/ixp425var.h#7 (text+ko) ==== @@ -85,22 +85,12 @@ #define GPIO_CONF_READ_4(sc, reg) \ bus_space_read_4(sc->sc_iot, sc->sc_gpio_ioh, reg) -extern struct bus_space ixpsip_bs_tag; extern struct bus_space ixp425_bs_tag; extern struct bus_space ixp425_a4x_bs_tag; -void ixp425_bs_init(bus_space_tag_t, void *); -void ixp425_md_pci_init(struct ixp425_softc *); -void ixp425_pci_init(struct ixp425_softc *); -void ixp425_pci_dma_init(struct ixp425_softc *); void ixp425_io_bs_init(bus_space_tag_t, void *); void ixp425_mem_bs_init(bus_space_tag_t, void *); -void ixp425_clk_bootstrap(bus_space_tag_t); -void ixp425_intr_init(void); -void *ixp425_intr_establish(int, int, int (*)(void *), void *); -void ixp425_intr_disestablish(void *); - uint32_t ixp425_sdram_size(void); int ixp425_md_route_interrupt(device_t, device_t, int); From owner-p4-projects@FreeBSD.ORG Thu Nov 16 08:53:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9F82916A40F; Thu, 16 Nov 2006 08:53:35 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 602D216A47B for ; Thu, 16 Nov 2006 08:53:35 +0000 (UTC) (envelope-from kevlo@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16C8443D46 for ; Thu, 16 Nov 2006 08:53:35 +0000 (GMT) (envelope-from kevlo@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAG8rY90036716 for ; Thu, 16 Nov 2006 08:53:34 GMT (envelope-from kevlo@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAG8rYCB036712 for perforce@freebsd.org; Thu, 16 Nov 2006 08:53:34 GMT (envelope-from kevlo@freebsd.org) Date: Thu, 16 Nov 2006 08:53:34 GMT Message-Id: <200611160853.kAG8rYCB036712@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kevlo@freebsd.org using -f From: Kevin Lo To: Perforce Change Reviews Cc: Subject: PERFORCE change 110100 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 08:53:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=110100 Change 110100 by kevlo@kevlo_rtsl on 2006/11/16 08:52:37 Eliminate unused global variable avail_end. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_machdep.c#7 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_machdep.c#7 (text+ko) ==== @@ -539,7 +539,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = 0x10000000 + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); From owner-p4-projects@FreeBSD.ORG Thu Nov 16 18:12:15 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B1CBB16A49E; Thu, 16 Nov 2006 18:12:15 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 57D8F16A403 for ; Thu, 16 Nov 2006 18:12:15 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1DC6143D6D for ; Thu, 16 Nov 2006 18:12:15 +0000 (GMT) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGICEIS054983 for ; Thu, 16 Nov 2006 18:12:14 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGICE10054979 for perforce@freebsd.org; Thu, 16 Nov 2006 18:12:14 GMT (envelope-from jkim@freebsd.org) Date: Thu, 16 Nov 2006 18:12:14 GMT Message-Id: <200611161812.kAGICE10054979@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 110116 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 18:12:16 -0000 http://perforce.freebsd.org/chv.cgi?CH=110116 Change 110116 by jkim@jkim_hammer on 2006/11/16 18:11:31 IFC Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/amd64/db_trace.c#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/machdep.c#7 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/msi.c#2 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/reg.h#2 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0/arm_init.s#2 delete .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0iic/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0iic/main.c#3 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0spi/Makefile#2 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0spi/main.c#3 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot2/Makefile#3 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/bootiic/Makefile#3 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/bootiic/arm_init.S#2 delete .. //depot/projects/linuxolator/src/sys/boot/arm/at91/bootspi/Makefile#4 integrate .. //depot/projects/linuxolator/src/sys/boot/arm/at91/bootspi/arm_init.S#3 delete .. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/arm_init.S#1 branch .. //depot/projects/linuxolator/src/sys/boot/arm/at91/libat91/mci_device.c#3 delete .. //depot/projects/linuxolator/src/sys/boot/i386/loader/main.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/bce/if_bce.c#7 integrate .. //depot/projects/linuxolator/src/sys/dev/bce/if_bcereg.h#5 integrate .. //depot/projects/linuxolator/src/sys/dev/em/if_em.c#9 integrate .. //depot/projects/linuxolator/src/sys/dev/em/if_em.h#5 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_library.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/ispmbox.h#3 integrate .. //depot/projects/linuxolator/src/sys/dev/mpt/mpt.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mpt/mpt.h#2 integrate .. //depot/projects/linuxolator/src/sys/dev/mpt/mpt_cam.c#5 integrate .. //depot/projects/linuxolator/src/sys/dev/mpt/mpt_pci.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/pci/pci.c#9 integrate .. //depot/projects/linuxolator/src/sys/dev/syscons/syscons.c#6 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/db_trace.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/machdep.c#5 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/msi.c#2 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/pmap.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/include/reg.h#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_condvar.c#2 integrate .. //depot/projects/linuxolator/src/sys/kern/kern_synch.c#3 integrate .. //depot/projects/linuxolator/src/sys/kern/subr_sleepqueue.c#2 integrate .. //depot/projects/linuxolator/src/sys/sun4v/include/tte_hash.h#3 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/pmap.c#5 integrate .. //depot/projects/linuxolator/src/sys/sun4v/sun4v/tte_hash.c#3 integrate .. //depot/projects/linuxolator/src/sys/sys/sleepqueue.h#2 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/amd64/db_trace.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.76 2006/10/20 09:44:20 bde Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.77 2006/11/15 19:53:47 jhb Exp $"); #include #include @@ -202,8 +202,8 @@ static char * watchtype_str(int type); int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, - int access, struct dbreg * d); -int amd64_clr_watch(int watchnum, struct dbreg * d); + int access, struct dbreg *d); +int amd64_clr_watch(int watchnum, struct dbreg *d); /* * Figure out how many arguments were passed into the frame at "fp". @@ -536,11 +536,11 @@ unsigned long watchaddr; int size; int access; - struct dbreg * d; + struct dbreg *d; { int i; unsigned int mask; - + if (watchnum == -1) { for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) if ((d->dr[7] & mask) == 0) @@ -550,7 +550,7 @@ else return (-1); } - + switch (access) { case DBREG_DR7_EXEC: size = 1; /* size must be 1 for an execution breakpoint */ @@ -558,9 +558,10 @@ case DBREG_DR7_WRONLY: case DBREG_DR7_RDWR: break; - default : return (-1); + default: + return (-1); } - + /* * we can watch a 1, 2, or 4 byte sized location */ @@ -577,7 +578,7 @@ d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); /* set drN register to the address, N=watchnum */ - DBREG_DRX(d,watchnum) = watchaddr; + DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); @@ -589,15 +590,15 @@ int amd64_clr_watch(watchnum, d) int watchnum; - struct dbreg * d; + struct dbreg *d; { if (watchnum < 0 || watchnum >= 4) return (-1); - + d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); - DBREG_DRX(d,watchnum) = 0; - + DBREG_DRX(d, watchnum) = 0; + return (0); } @@ -607,22 +608,21 @@ db_expr_t addr; db_expr_t size; { - int avail, wsize; - int i; struct dbreg d; - + int avail, i, wsize; + fill_dbregs(NULL, &d); - + avail = 0; - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if ((d.dr[7] & (3 << (i*2))) == 0) avail++; } - - if (avail*4 < size) + + if (avail * 4 < size) return (-1); - - for (i=0; i<4 && (size != 0); i++) { + + for (i = 0; i < 4 && (size != 0); i++) { if ((d.dr[7] & (3<<(i*2))) == 0) { if (size > 4) wsize = 4; @@ -630,15 +630,15 @@ wsize = size; if (wsize == 3) wsize++; - amd64_set_watch(i, addr, wsize, + amd64_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; } } - + set_dbregs(NULL, &d); - + return(0); } @@ -653,22 +653,22 @@ fill_dbregs(NULL, &d); - for(i=0; i<4; i++) { + for(i = 0; i < 4; i++) { if (d.dr[7] & (3 << (i*2))) { - if ((DBREG_DRX((&d), i) >= addr) && + if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) amd64_clr_watch(i, &d); - + } } - + set_dbregs(NULL, &d); - + return(0); } -static +static char * watchtype_str(type) int type; @@ -685,30 +685,29 @@ void db_md_list_watchpoints() { - int i; struct dbreg d; + int i, len, type; fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { if (d.dr[7] & (0x03 << (i*2))) { - unsigned type, len; type = (d.dr[7] >> (16+(i*4))) & 3; len = (d.dr[7] >> (16+(i*4)+2)) & 3; db_printf(" %-5d %-8s %10s %3d 0x%016lx\n", - i, "enabled", watchtype_str(type), + i, "enabled", watchtype_str(type), len + 1, DBREG_DRX((&d), i)); } else { db_printf(" %-5d disabled\n", i); } } - + db_printf("\ndebug register values:\n"); - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { db_printf(" dr%d 0x%016lx\n", i, DBREG_DRX((&d), i)); } db_printf("\n"); ==== //depot/projects/linuxolator/src/sys/amd64/amd64/machdep.c#7 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.660 2006/11/07 21:57:18 ru Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.661 2006/11/15 19:53:47 jhb Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1832,9 +1832,8 @@ addr[nbp++] = (caddr_t)rdr3(); } - for (i=0; i -__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.1 2006/11/13 22:23:32 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/msi.c,v 1.2 2006/11/15 18:40:00 jhb Exp $"); #include #include @@ -315,7 +315,7 @@ /* We need count - cnt more sources starting at index 'cnt'. */ *newirq = cnt; *newcount = count - cnt; - for (j = 0; j < *newirq; j++) { + for (j = 0; j < *newcount; j++) { /* Create a new MSI source. */ msi = malloc(sizeof(struct msi_intsrc), M_MSI, ==== //depot/projects/linuxolator/src/sys/amd64/include/reg.h#2 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/reg.h,v 1.35 2004/04/05 23:55:14 imp Exp $ + * $FreeBSD: src/sys/amd64/include/reg.h,v 1.36 2006/11/15 19:53:48 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -92,11 +92,13 @@ /* Index 8-15: reserved */ }; -#define DBREG_DR7_EXEC 0x00 /* break on execute */ -#define DBREG_DR7_WRONLY 0x01 /* break on write */ -#define DBREG_DR7_RDWR 0x03 /* break on read or write */ -#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by - register number */ +#define DBREG_DR7_EXEC 0x00 /* break on execute */ +#define DBREG_DR7_WRONLY 0x01 /* break on write */ +#define DBREG_DR7_RDWR 0x03 /* break on read or write */ + +#define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by + register number */ + #ifdef _KERNEL /* * XXX these interfaces are MI, so they should be declared in a MI place. ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0/Makefile#2 (text) ==== @@ -1,11 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.4 2006/08/18 20:26:54 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.5 2006/11/16 00:53:27 imp Exp $ + +.PATH: ${.CURDIR}/../libat91 P=boot0 FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0iic/Makefile#2 (text) ==== @@ -1,12 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.2 2006/08/16 23:14:52 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.3 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../boot0 +.PATH: ${.CURDIR}/../libat91 P=boot0iic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include + +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0iic/main.c#3 (text) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.3 2006/11/09 19:55:25 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.4 2006/11/16 00:49:50 imp Exp $ */ #include "at91rm9200.h" @@ -32,12 +32,19 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + int len, sec; - while (xmodem_rx(addr) == -1) + printf("\nSend data to be written into EEPROM\n"); + while ((len = xmodem_rx(addr)) == -1) + continue; + sec = GetSeconds() + 1; + while (sec >= GetSeconds()) continue; + printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, + len); InitEEPROM(); - printf("Writing EEPROM from 0x%x to addr 0\n", addr); - WriteEEPROM(0, addr, 8192); - printf("Write complete. Press reset\n"); + printf("init done\n"); + WriteEEPROM(0, addr, len); + printf("\nWrote %d bytes. Press reset\n", len); return (1); } ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0spi/Makefile#2 (text) ==== @@ -1,13 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.2 2006/08/16 23:18:07 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.3 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../boot0 +.PATH: ${.CURDIR}/../libat91 P=boot0spi FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot0spi/main.c#3 (text) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.3 2006/10/21 22:43:07 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.4 2006/11/16 00:48:53 imp Exp $ */ #include "at91rm9200.h" @@ -29,21 +29,23 @@ #include "at91rm9200_lowlevel.h" #include "spi_flash.h" -#define OFFSET 0 +#define LOADER_OFFSET 0 +#define FPGA_OFFSET (15 * FLASH_PAGE_SIZE) +#define OFFSET LOADER_OFFSET int main(void) { int len, i, j, off; - char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */ - char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */ + char *addr = (char *)SDRAM_BASE + (1 << 20); /* download at + 1MB */ + char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* readback to + 2MB */ + char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* extra copy at + 3MB */ SPI_InitFlash(); printf("Waiting for data\n"); while ((len = xmodem_rx(addr)) == -1) continue; - printf("\nDownloaded %u bytes.\n", len); + // Need extra copy at addr3 memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); printf("Writing %u bytes to flash at %u\n", len, OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { @@ -57,5 +59,6 @@ if (j >= 10) printf("Bad Readback at %u\n", i); } + printf("Done\n"); return (1); } ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot2/Makefile#3 (text+ko) ==== @@ -1,19 +1,16 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.2 2006/11/09 20:07:26 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.3 2006/11/16 00:48:04 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 ${.CURDIR}/../bootspi P=boot2 FILES=${P} -SRCS=arm_init.S boot2.c ${BOOT_FLAVOR}_board.c +SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include -.if ${BOOT_FLAVOR} == "tsc" -SRCS+=ee.c -.endif .if ${BOOT_FLAVOR} == "kb920x" CFLAGS+=-DBOOT_IIC .endif ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/boot2/boot2.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.2 2006/11/09 20:07:26 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.3 2006/11/16 00:47:31 imp Exp $"); #include #include @@ -29,7 +29,6 @@ #include "emac.h" #include "lib.h" #include "sd-card.h" -#include "ee.h" #include "board.h" #define RBX_ASKNAME 0x0 /* -a */ ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/bootiic/Makefile#3 (text) ==== @@ -1,6 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.4 2006/11/09 20:23:51 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.5 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 P=bootiic FILES=${P} @@ -11,4 +11,4 @@ .include -CFLAGS += -DBOOT_IIC +CFLAGS += -DBOOT_IIC -DBOOT_COMMANDS ==== //depot/projects/linuxolator/src/sys/boot/arm/at91/bootspi/Makefile#4 (text) ==== @@ -1,6 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.5 2006/11/09 20:45:22 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.6 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 P=bootspi FILES=${P} @@ -14,3 +14,4 @@ .if ${MK_FPGA} == "yes" CFLAGS += -DTSC_FPGA .endif +CFLAGS += -DBOOT_COMMANDS ==== //depot/projects/linuxolator/src/sys/boot/i386/loader/main.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.38 2006/11/02 01:23:18 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.39 2006/11/16 13:32:30 ru Exp $"); /* * MD bootstrap main() and assorted miscellaneous @@ -191,7 +191,7 @@ extract_currdev(void) { struct i386_devdesc new_currdev; - int major, biosdev = -1; + int biosdev = -1; /* Assume we are booting from a BIOS disk by default */ new_currdev.d_dev = &biosdisk; @@ -222,7 +222,6 @@ B_CONTROLLER(initial_bootdev) - 1; new_currdev.d_kind.biosdisk.partition = B_PARTITION(initial_bootdev); biosdev = initial_bootinfo->bi_bios_dev; - major = B_TYPE(initial_bootdev); /* * If we are booted by an old bootstrap, we have to guess at the BIOS ==== //depot/projects/linuxolator/src/sys/dev/bce/if_bce.c#7 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.18 2006/10/31 03:28:25 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.21 2006/11/16 06:28:54 scottl Exp $"); /* * The following controllers are supported by this driver: @@ -452,7 +452,7 @@ struct bce_softc *sc; struct ifnet *ifp; u32 val; - int mbuf, rid, rc = 0; + int count, mbuf, rid, rc = 0; sc = device_get_softc(dev); sc->bce_dev = dev; @@ -485,7 +485,12 @@ sc->bce_vhandle = (vm_offset_t) rman_get_virtual(sc->bce_res); /* Allocate PCI IRQ resources. */ - rid = 0; + count = pci_msi_count(dev); + if (count == 1 && pci_alloc_msi(dev, &count) == 0) { + rid = 1; + sc->bce_flags |= BCE_USING_MSI_FLAG; + } else + rid = 0; sc->bce_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); @@ -2539,9 +2544,12 @@ if (sc->bce_irq != NULL) bus_release_resource(dev, SYS_RES_IRQ, - 0, + sc->bce_flags & BCE_USING_MSI_FLAG ? 1 : 0, sc->bce_irq); + if (sc->bce_flags & BCE_USING_MSI_FLAG) + pci_release_msi(dev); + if (sc->bce_res != NULL) bus_release_resource(dev, SYS_RES_MEMORY, @@ -4253,7 +4261,7 @@ if (sc->tx_mbuf_ptr[sw_tx_chain_cons] != NULL) { /* Validate that this is the last tx_bd. */ - DBRUNIF((!(txbd->tx_bd_vlan_tag_flags & TX_BD_FLAGS_END)), + DBRUNIF((!(txbd->tx_bd_flags & TX_BD_FLAGS_END)), BCE_PRINTF(sc, "%s(%d): tx_bd END flag not set but " "txmbuf == NULL!\n", __FILE__, __LINE__); bce_breakpoint(sc)); @@ -4521,9 +4529,9 @@ bus_dmamap_t map; struct tx_bd *txbd = NULL; struct mbuf *m0; - u32 vlan_tag_flags = 0; + u16 vlan_tag = 0, flags = 0; + u16 chain_prod, prod; u32 prod_bseq; - u16 chain_prod, prod; #ifdef BCE_DEBUG u16 debug_prod; @@ -4534,15 +4542,16 @@ m0 = *m_head; if (m0->m_pkthdr.csum_flags) { if (m0->m_pkthdr.csum_flags & CSUM_IP) - vlan_tag_flags |= TX_BD_FLAGS_IP_CKSUM; + flags |= TX_BD_FLAGS_IP_CKSUM; if (m0->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)) - vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; + flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; } /* Transfer any VLAN tags to the bd. */ - if (m0->m_flags & M_VLANTAG) - vlan_tag_flags |= (TX_BD_FLAGS_VLAN_TAG | - (m0->m_pkthdr.ether_vtag << 16)); + if (m0->m_flags & M_VLANTAG) { + flags |= TX_BD_FLAGS_VLAN_TAG; + vlan_tag = m0->m_pkthdr.ether_vtag; + } /* Map the mbuf into DMAable memory. */ prod = sc->tx_prod; @@ -4626,15 +4635,16 @@ txbd->tx_bd_haddr_lo = htole32(BCE_ADDR_LO(segs[i].ds_addr)); txbd->tx_bd_haddr_hi = htole32(BCE_ADDR_HI(segs[i].ds_addr)); txbd->tx_bd_mss_nbytes = htole16(segs[i].ds_len); - txbd->tx_bd_vlan_tag_flags = htole16(vlan_tag_flags); + txbd->tx_bd_vlan_tag = htole16(vlan_tag); + txbd->tx_bd_flags = htole16(flags); prod_bseq += segs[i].ds_len; if (i == 0) - txbd->tx_bd_vlan_tag_flags |=htole16(TX_BD_FLAGS_START); + txbd->tx_bd_flags |= htole16(TX_BD_FLAGS_START); prod = NEXT_TX_BD(prod); } /* Set the END flag on the last TX buffer descriptor. */ - txbd->tx_bd_vlan_tag_flags |= htole16(TX_BD_FLAGS_END); + txbd->tx_bd_flags |= htole16(TX_BD_FLAGS_END); DBRUN(BCE_INFO_SEND, bce_dump_tx_chain(sc, debug_prod, nseg)); @@ -4644,17 +4654,14 @@ __FUNCTION__, prod, chain_prod, prod_bseq); /* - * Ensure that the map for this transmission + * Ensure that the mbuf pointer for this transmission * is placed at the array index of the last * descriptor in this chain. This is done * because a single map is used for all * segments of the mbuf and we don't want to - * delete the map before all of the segments + * unload the map before all of the segments * have been freed. */ - sc->tx_mbuf_map[TX_CHAIN_IDX(sc->tx_prod)] = - sc->tx_mbuf_map[chain_prod]; - sc->tx_mbuf_map[chain_prod] = map; sc->tx_mbuf_ptr[chain_prod] = m0; sc->used_tx_bd += nsegs; @@ -4665,7 +4672,7 @@ DBRUN(BCE_VERBOSE_SEND, bce_dump_tx_mbuf_chain(sc, chain_prod, nsegs)); - /* prod still points the last used tx_bd at this point. */ + /* prod points to the next free tx_bd at this point. */ sc->tx_prod = prod; sc->tx_prod_bseq = prod_bseq; @@ -4703,8 +4710,11 @@ "tx_prod_bseq = 0x%08X\n", __FUNCTION__, tx_prod, tx_chain_prod, sc->tx_prod_bseq); - /* Keep adding entries while there is space in the ring. */ - while (sc->tx_mbuf_ptr[tx_chain_prod] == NULL) { + /* + * Keep adding entries while there is space in the ring. We keep + * BCE_TX_SLACK_SPACE entries unused at all times. + */ + while (sc->used_tx_bd < USABLE_TX_BD - BCE_TX_SLACK_SPACE) { /* Check for any frames to send. */ IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); @@ -6153,9 +6163,10 @@ else /* Normal tx_bd entry. */ BCE_PRINTF(sc, "tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "flags = 0x%08X\n", idx, + "vlan tag= 0x%4X, "flags = 0x%04X\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag_flags); + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); } ==== //depot/projects/linuxolator/src/sys/dev/bce/if_bcereg.h#5 (text) ==== @@ -26,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.9 2006/10/24 08:24:31 scottl Exp $ + * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.10 2006/11/16 06:28:54 scottl Exp $ */ #ifndef _BCE_H_DEFINED @@ -737,7 +737,8 @@ u32 tx_bd_haddr_hi; u32 tx_bd_haddr_lo; u32 tx_bd_mss_nbytes; - u32 tx_bd_vlan_tag_flags; + u16 tx_bd_flags; + u16 tx_bd_vlan_tag; #define TX_BD_FLAGS_CONN_FAULT (1<<0) #define TX_BD_FLAGS_TCP_UDP_CKSUM (1<<1) #define TX_BD_FLAGS_IP_CKSUM (1<<2) ==== //depot/projects/linuxolator/src/sys/dev/em/if_em.c#9 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.163 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.c,v 1.164 2006/11/15 20:04:56 jhb Exp $*/ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" @@ -2200,7 +2200,12 @@ rman_get_bushandle(adapter->flash_mem); } - rid = 0x0; + val = pci_msi_count(dev); + if (val == 1 && pci_alloc_msi(dev, &val) == 0) { + rid = 1; + adapter->msi = 1; + } else + rid = 0; adapter->res_interrupt = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (adapter->res_interrupt == NULL) { @@ -2279,7 +2284,11 @@ device_t dev = adapter->dev; if (adapter->res_interrupt != NULL) - bus_release_resource(dev, SYS_RES_IRQ, 0, adapter->res_interrupt); + bus_release_resource(dev, SYS_RES_IRQ, adapter->msi ? 1 : 0, + adapter->res_interrupt); + + if (adapter->msi) + pci_release_msi(dev); if (adapter->res_memory != NULL) bus_release_resource(dev, SYS_RES_MEMORY, PCIR_BAR(0), ==== //depot/projects/linuxolator/src/sys/dev/em/if_em.h#5 (text+ko) ==== @@ -31,7 +31,7 @@ ***************************************************************************/ -/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.55 2006/11/09 16:00:18 glebius Exp $*/ +/*$FreeBSD: src/sys/dev/em/if_em.h,v 1.56 2006/11/15 20:04:56 jhb Exp $*/ #ifndef _EM_H_DEFINED_ #define _EM_H_DEFINED_ @@ -288,6 +288,7 @@ struct callout tx_fifo_timer; int watchdog_timer; int io_rid; + int msi; int if_flags; struct mtx mtx; int em_insert_vlan_header; ==== //depot/projects/linuxolator/src/sys/dev/isp/isp.c#4 (text+ko) ==== @@ -26,8 +26,9 @@ /* * Machine and OS Independent (well, as best as possible) - * code for the Qlogic ISP SCSI adapters. + * code for the Qlogic ISP SCSI and FC-SCSI adapters. */ + /* * Inspiration and ideas about this driver are from Erik Moe's Linux driver * (qlogicisp.c) and Dave Miller's SBus version of same (qlogicisp.c). Some @@ -42,7 +43,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.129 2006/11/14 08:45:47 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.131 2006/11/16 00:39:56 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ @@ -2231,9 +2232,8 @@ } mbs.param[2] = portid >> 16; mbs.param[3] = portid; - mbs.logval = MBLOGNONE; - mbs.timeout = 250000; + mbs.timeout = 500000; isp_mboxcmd(isp, &mbs); switch (mbs.param[0]) { @@ -2286,6 +2286,7 @@ mbs.param[1] = handle << 8; } mbs.logval = MBLOGNONE; + mbs.timeout = 100000; isp_mboxcmd(isp, &mbs); } @@ -2314,6 +2315,7 @@ mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); + mbs.timeout = 250000; mbs.logval = MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR; if (dolock) { FC_SCRATCH_ACQUIRE(isp); @@ -2368,7 +2370,6 @@ } } mbs.logval = MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR; - mbs.timeout = 30000; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return (wwn); @@ -2928,7 +2929,13 @@ * which shift on a loop. */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - isp_prt(isp, ISP_LOGWARN, "bad pdb @ loop %d", handle); + int a, b, c; + a = (tmp.node_wwn == 0); + b = (tmp.port_wwn == 0); + c = (tmp.portid == 0); + isp_prt(isp, ISP_LOGWARN, + "bad pdb (%1d%1d%1d) @ handle 0x%x", a, b, c, + handle); isp_dump_portdb(isp); continue; } @@ -2996,7 +3003,7 @@ * decide what to do. */ isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x changed", + "Loop Port 0x%02x@0x%x changed", tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; @@ -3035,7 +3042,7 @@ lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x is New Entry", + "Loop Port 0x%02x@0x%x is New Entry", tmp.portid, tmp.handle); } fcp->isp_loopstate = LOOP_LSCAN_DONE; @@ -4855,7 +4862,8 @@ switch (etype) { case RQSTYPE_RESPONSE: XS_SET_STATE_STAT(isp, xs, sp); - if (resp) { + if (resp && rlen >= 4 && + resp[FCP_RSPNS_CODE_OFFSET] != 0) { isp_prt(isp, ISP_LOGWARN, "%d.%d FCP RESPONSE: 0x%x", XS_TGT(xs), XS_LUN(xs), @@ -6796,7 +6804,6 @@ MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_GET_FW_STATE; mbs.logval = MBLOGALL; - mbs.timeout = 100000; isp_mboxcmd(isp, &mbs); if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { fcp->isp_fwstate = mbs.param[1]; ==== //depot/projects/linuxolator/src/sys/dev/isp/isp_library.c#4 (text) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2006 by Matthew Jacob + * Copyright (c) 2006 by Matthew Jacob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.7 2006/11/14 08:45:48 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.9 2006/11/16 00:39:56 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ @@ -268,9 +268,9 @@ } else { SNPRINTF(mb, sizeof (mb), "---"); } - isp_prt(isp, ISP_LOGALL, "%d: %s al%d tgt %s %s 0x%06x =>%s" - " 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, - dbs[lp->state], lp->autologin, mb, + isp_prt(isp, ISP_LOGALL, "%d: hdl 0x%x %s al%d tgt %s %s " + "0x%06x =>%s 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, + lp->handle, dbs[lp->state], lp->autologin, mb, roles[lp->roles], lp->portid, roles[lp->new_roles], lp->new_portid, (uint32_t) (lp->node_wwn >> 32), ==== //depot/projects/linuxolator/src/sys/dev/isp/ispmbox.h#3 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.53 2006/11/02 03:21:31 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.54 2006/11/16 00:39:56 mjacob Exp $ */ /*- * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters. * @@ -1347,4 +1347,30 @@ #define els_recv_dsd_a4732 inout.out._els_recv_dsd_a4732 #define els_recv_dsd_a6348 inout.out._els_recv_dsd_a6348 } els_t; + +/* + * A handy package structure for running FC-SCSI commands via RUN IOCB A64. + */ +typedef struct { + uint16_t handle; + uint16_t lun; + uint32_t portid; + uint32_t timeout; + union { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:10:28 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 329DC16A492; Thu, 16 Nov 2006 19:10:28 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 09DA916A47B for ; Thu, 16 Nov 2006 19:10:28 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5E0C643D58 for ; Thu, 16 Nov 2006 19:10:27 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJARIl064944 for ; Thu, 16 Nov 2006 19:10:27 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJARdZ064932 for perforce@freebsd.org; Thu, 16 Nov 2006 19:10:27 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:10:27 GMT Message-Id: <200611161910.kAGJARdZ064932@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110117 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:10:28 -0000 http://perforce.freebsd.org/chv.cgi?CH=110117 Change 110117 by millert@millert_macbook on 2006/11/16 19:10:17 Do not use passwd calls in genhomedircon, it causes a bus error in single user mode. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/Makefile#7 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/Makefile#7 (text+ko) ==== @@ -223,6 +223,9 @@ # if not set, use the type as the name. NAME ?= $(TYPE) +# do not try to use the passwd file, it will fail in single user mode +USEPWD=-n + ifeq ($(DIRECT_INITRC),y) M4PARAM += -D direct_sysadm_daemon endif From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:11:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6587416A415; Thu, 16 Nov 2006 19:11:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2406016A407 for ; Thu, 16 Nov 2006 19:11:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5BEAE43D7D for ; Thu, 16 Nov 2006 19:11:30 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJBT6e065390 for ; Thu, 16 Nov 2006 19:11:29 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJBTej065386 for perforce@freebsd.org; Thu, 16 Nov 2006 19:11:29 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:11:29 GMT Message-Id: <200611161911.kAGJBTej065386@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110119 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:11:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=110119 Change 110119 by millert@millert_macbook on 2006/11/16 19:11:19 Update vanity policy with fdesc-related entrypoints Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#9 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#9 (text+ko) ==== @@ -3,6 +3,9 @@ #include #include +#include +#include +#include #include #include #include @@ -116,12 +119,58 @@ } static void +vanity_vnode_label_associate_file(struct ucred *cred, + struct mount *mp, struct label *mntlabel, + struct fileglob *fg, struct label *label, + struct vnode *vp, struct label *vlabel) +{ + if (vp->v_lflag & VL_LABELED) + v_print("VANITY: vanity_vnode_label_associate_file() already associated", vp); +} + +static void +vanity_vnode_label_associate_posixshm(struct ucred *cred, + struct pshminfo *pshm, struct label *pshmlabel, + struct vnode *vp, struct label *vlabel) +{ + if (vp->v_lflag & VL_LABELED) + v_print("VANITY: vanity_vnode_label_associate_posixshm() already associated", vp); +} + +static void +vanity_vnode_label_associate_posixsem(struct ucred *cred, + struct pseminfo *psem, struct label *psemlabel, + struct vnode *vp, struct label *vlabel) +{ + if (vp->v_lflag & VL_LABELED) + v_print("VANITY: vanity_vnode_label_associate_posixsem() already associated", vp); +} + +static void +vanity_vnode_label_associate_pipe(struct ucred *cred, + struct pipe *cpipe, struct label *pipelabel, + struct vnode *vp, struct label *vlabel) +{ + if (vp->v_lflag & VL_LABELED) + v_print("VANITY: vanity_vnode_label_associate_pipe() already associated", vp); +} + +static void vanity_vnode_label_associate_singlelabel(struct mount *mp, struct label *mntlabel, struct vnode *vp, struct label *vlabel) { if (vp->v_lflag & VL_LABELED) v_print("VANITY: vanity_vnode_label_associate_singlelabel() already associated", vp); } +static void +vanity_vnode_label_associate_socket(struct ucred *cred, + struct xsocket *xso, struct label *solabel, + struct vnode *vp, struct label *vlabel) +{ + if (vp->v_lflag & VL_LABELED) + v_print("VANITY: vanity_vnode_label_associate_socket() already associated", vp); +} + static int vanity_vnode_notify_create(struct ucred *cred, struct mount *mp, struct label *mntlabel, struct vnode *dvp, struct label *dlabel, struct vnode *vp, struct label *vlabel, struct componentname *cnp) { @@ -476,7 +525,12 @@ .mpo_vnode_label_update_extattr = vanity_vnode_label_update_extattr, .mpo_vnode_label_associate_devfs= vanity_vnode_label_associate_devfs, .mpo_vnode_label_associate_extattr= vanity_vnode_label_associate_extattr, + .mpo_vnode_label_associate_file = vanity_vnode_label_associate_file, .mpo_vnode_label_associate_singlelabel= vanity_vnode_label_associate_singlelabel, + .mpo_vnode_label_associate_posixshm= vanity_vnode_label_associate_posixshm, + .mpo_vnode_label_associate_posixsem= vanity_vnode_label_associate_posixsem, + .mpo_vnode_label_associate_pipe = vanity_vnode_label_associate_pipe, + .mpo_vnode_label_associate_socket= vanity_vnode_label_associate_socket, .mpo_vnode_notify_create = vanity_vnode_notify_create, .mpo_vnode_label_update = vanity_vnode_label_update, .mpo_vnode_label_store = vanity_vnode_label_store, From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:11:38 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 126EF16A416; Thu, 16 Nov 2006 19:11:38 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC85216A407 for ; Thu, 16 Nov 2006 19:11:37 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0627843D8E for ; Thu, 16 Nov 2006 19:11:29 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJBThZ065383 for ; Thu, 16 Nov 2006 19:11:29 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJBTU6065377 for perforce@freebsd.org; Thu, 16 Nov 2006 19:11:29 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:11:29 GMT Message-Id: <200611161911.kAGJBTU6065377@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110118 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:11:38 -0000 http://perforce.freebsd.org/chv.cgi?CH=110118 Change 110118 by millert@millert_macbook on 2006/11/16 19:10:59 Add mac_file_check_lock() Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#15 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#6 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#18 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#27 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#43 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#6 (text+ko) ==== @@ -523,6 +523,14 @@ if (fl.l_whence == SEEK_CUR) fl.l_start += offset; +#ifdef MAC + error = mac_file_check_lock(proc_ucred(p), fp->f_fglob, + F_SETLK, &fl); + if (error) { + (void)vnode_put(vp); + goto outdrop; + } +#endif switch (fl.l_type) { case F_RDLCK: @@ -578,6 +586,11 @@ if (fl.l_whence == SEEK_CUR) fl.l_start += offset; +#ifdef MAC + error = mac_file_check_lock(proc_ucred(p), fp->f_fglob, + F_GETLK, &fl); + if (error == 0) +#endif error = VNOP_ADVLOCK(vp, (caddr_t)p, F_GETLK, &fl, F_POSIX, &context); (void)vnode_put(vp); @@ -2495,6 +2508,11 @@ if (error) goto out; #endif +#ifdef MAC + error = mac_file_check_lock(proc_ucred(p), fp->f_fglob, F_SETLK, &lf); + if (error) + goto out; +#endif fp->f_flag |= FHASLOCK; if (how & LOCK_NB) { error = VNOP_ADVLOCK(vp, (caddr_t)fp->f_fglob, F_SETLK, &lf, F_FLOCK, &context); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#15 (text+ko) ==== @@ -1752,6 +1752,12 @@ if (error) goto bad; #endif +#ifdef MAC + error = mac_file_check_lock(vfs_context_ucred(ctx), fp->f_fglob, + F_SETLK, &lf); + if (error) + goto bad; +#endif if ((error = VNOP_ADVLOCK(vp, (caddr_t)fp->f_fglob, F_SETLK, &lf, type, ctx))) goto bad; fp->f_fglob->fg_flag |= FHASLOCK; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#6 (text+ko) ==== @@ -222,6 +222,16 @@ return (error); } +int +mac_file_check_lock(struct ucred *cred, struct fileglob *fg, int op, + struct flock *fl) +{ + int error; + + MAC_CHECK(file_check_lock, cred, fg, fg->fg_label, op, fl); + return (error); +} + /* * On some platforms, VM_PROT_READ implies VM_PROT_EXECUTE. If that is true, * both prot and maxprot will have VM_PROT_EXECUTE set after file_check_mmap ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#18 (text+ko) ==== @@ -141,6 +141,8 @@ int mac_file_check_inherit(struct ucred *cred, struct fileglob *fg); int mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, u_long com, void *data); +int mac_file_check_lock(struct ucred *cred, struct fileglob *fg, int op, + struct flock *fl); int mac_file_check_mmap(struct ucred *cred, struct fileglob *fg, int prot, int flags, int *maxprot); void mac_file_check_mmap_downgrade(struct ucred *cred, struct fileglob *fg, ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#27 (text+ko) ==== @@ -807,6 +807,28 @@ void *data ); /** + @brief Access control check for file locking + @param cred Subject credential + @param fg Fileglob structure + @param label Policy label for fg + @param op The lock operation (F_GETLK, F_SETLK, F_UNLK) + @param fl The flock structure + + Determine whether the subject identified by the credential can perform + the lock operation indicated by op and fl on the file represented by fg. + + @return Return 0 if access is granted, otherwise an appropriate value for + errno should be returned. + +*/ +typedef int mpo_file_check_lock_t( + struct ucred *cred, + struct fileglob *fg, + struct label *label, + int op, + struct flock *fl +); +/** @brief Access control check for mapping a file @param cred Subject credential @param fg fileglob representing file to map @@ -5113,6 +5135,7 @@ mpo_file_check_get_t *mpo_file_check_get; mpo_file_check_inherit_t *mpo_file_check_inherit; mpo_file_check_ioctl_t *mpo_file_check_ioctl; + mpo_file_check_lock_t *mpo_file_check_lock; mpo_file_check_mmap_downgrade_t *mpo_file_check_mmap_downgrade; mpo_file_check_mmap_t *mpo_file_check_mmap; mpo_file_check_receive_t *mpo_file_check_receive; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#43 (text+ko) ==== @@ -3120,6 +3120,16 @@ } static int +sebsd_file_check_lock(struct ucred *cred, struct fileglob *fg, + struct label *fglabel, int op, struct flock *fl) +{ + + /* SELinux doesn't use the lock operation. */ + return (file_has_perm(cred, fg, fglabel, FILE__LOCK)); +} + + +static int sebsd_file_check_receive(struct ucred *cred, struct fileglob *fg, struct label *fglabel) { @@ -3551,6 +3561,7 @@ .mpo_file_check_get_ofileflags = sebsd_file_check_get_ofileflags, .mpo_file_check_inherit = sebsd_file_check_receive, .mpo_file_check_ioctl = sebsd_file_check_ioctl, + .mpo_file_check_lock = sebsd_file_check_lock, .mpo_file_check_mmap = sebsd_file_check_mmap, .mpo_file_check_receive = sebsd_file_check_receive, .mpo_file_label_associate = sebsd_file_label_associate, From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:12:34 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A628C16A4B3; Thu, 16 Nov 2006 19:12:34 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4DBBF16A49E for ; Thu, 16 Nov 2006 19:12:34 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBA1B43D6D for ; Thu, 16 Nov 2006 19:12:31 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJCVNJ065865 for ; Thu, 16 Nov 2006 19:12:31 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJCVcr065862 for perforce@freebsd.org; Thu, 16 Nov 2006 19:12:31 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:12:31 GMT Message-Id: <200611161912.kAGJCVcr065862@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110120 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:12:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=110120 Change 110120 by millert@millert_macbook on 2006/11/16 19:11:37 Handle 'NULLOK' Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/test/mac_parse.pl#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/test/mac_parse.pl#3 (text+ko) ==== @@ -211,6 +211,9 @@ print CFILE "\tUSE_LABEL($var, TASKTYPE);\n"; } elsif ($type =~ /struct label/) { + if ($flags =~ /NULLOK/) { + print CFILE "\tif ($var != NULL)\n\t"; + } if ($firsttype ne "") { print CFILE "\tUSE_LABEL($var, $firsttype);\n"; } From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:12:35 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B4DAD16A52F; Thu, 16 Nov 2006 19:12:34 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 761FB16A4AB for ; Thu, 16 Nov 2006 19:12:34 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C52F43D82 for ; Thu, 16 Nov 2006 19:12:32 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJCVao065871 for ; Thu, 16 Nov 2006 19:12:31 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJCV7s065868 for perforce@freebsd.org; Thu, 16 Nov 2006 19:12:31 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:12:31 GMT Message-Id: <200611161912.kAGJCV7s065868@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110121 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:12:35 -0000 http://perforce.freebsd.org/chv.cgi?CH=110121 Change 110121 by millert@millert_macbook on 2006/11/16 19:12:14 If a policy registers a label namespace that starts with '?', exclude it from the default label list return by '*' during externalize. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_base.c#22 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_base.c#22 (text+ko) ==== @@ -479,7 +479,7 @@ struct mac_label_element *mle, **new_mles; struct mac_label_element_list_t *list; struct mac_policy_conf *mpc; - const char *name; + const char *name, *name2; u_int idx, mle_free, mll_free; mpc = mac_get_mpc(handle); @@ -520,25 +520,29 @@ mac_policy_grab_exclusive(); for (idx = 0; idx < mpc->mpc_labelname_count; idx++) { - name = mpc->mpc_labelnames[idx]; - + if (*(name = mpc->mpc_labelnames[idx]) == '?') + name++; /* * Check both label element lists and add to the * appropriate list only if not already on a list. */ LIST_FOREACH(mle, &mac_static_label_element_list, mle_list) { - if (strcmp(name, mle->mle_name) == 0) + if (*(name2 = mle->mle_name) == '?') + name2++; + if (strcmp(name, name2) == 0) break; } if (mle == NULL) { LIST_FOREACH(mle, &mac_label_element_list, mle_list) { - if (strcmp(name, mle->mle_name) == 0) + if (*(name2 = mle->mle_name) == '?') + name2++; + if (strcmp(name, name2) == 0) break; } } if (mle == NULL) { mle = new_mles[mle_free]; - strcpy(mle->mle_name, name); + strcpy(mle->mle_name, mpc->mpc_labelnames[idx]); LIST_INIT(&mle->mle_listeners); LIST_INSERT_HEAD(list, mle, mle_list); mle_free++; @@ -1016,6 +1020,7 @@ struct mac_label_listener *mll; struct mac_label_element *mle; struct mac_label_element_list_t *element_list; + const char *name; int (*mpo_externalize)(struct label *, char *, struct sbuf *); int all_labels = 0, ignorenotfound = 0, error = 0, busy = FALSE; unsigned int count = 0; @@ -1029,8 +1034,16 @@ element_list = &mac_static_label_element_list; element_loop: LIST_FOREACH(mle, element_list, mle_list) { - if (!all_labels && strcmp(mle->mle_name, element) != 0) - continue; + name = mle->mle_name; + if (all_labels) { + if (*name == '?') + continue; + } else { + if (*name == '?') + name++; + if (strcmp(name, element) != 0) + continue; + } LIST_FOREACH(mll, &mle->mle_listeners, mll_list) { mpc = mac_policy_list.entries[mll->mll_handle].mpc; if (mpc == NULL) @@ -1040,7 +1053,7 @@ ((char *)mpc->mpc_ops + mpo_externalize_off); if (mpo_externalize == NULL) continue; - error = sbuf_printf(sb, "%s/", mle->mle_name); + error = sbuf_printf(sb, "%s/", name); if (error) goto done; error = mpo_externalize(label, mle->mle_name, sb); @@ -1055,7 +1068,7 @@ * (but not all) object types. */ sbuf_setpos(sb, sbuf_len(sb) - - (strlen(mle->mle_name) + 1)); + (strlen(name) + 1)); error = 0; continue; } @@ -1121,11 +1134,14 @@ int (*mpo_internalize)(struct label *, char *, char *); int error = 0, busy = FALSE; unsigned int count = 0; + const char *name; element_list = &mac_static_label_element_list; element_loop: LIST_FOREACH(mle, element_list, mle_list) { - if (strcmp(element_name, mle->mle_name) != 0) + if (*(name = mle->mle_name) == '?') + name++; + if (strcmp(element_name, name) != 0) continue; LIST_FOREACH(mll, &mle->mle_listeners, mll_list) { mpc = mac_policy_list.entries[mll->mll_handle].mpc; From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:13:34 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5B86316A415; Thu, 16 Nov 2006 19:13:34 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1D79016A412 for ; Thu, 16 Nov 2006 19:13:34 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id DA46243D5D for ; Thu, 16 Nov 2006 19:13:33 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJDX0o066164 for ; Thu, 16 Nov 2006 19:13:33 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJDXYv066161 for perforce@freebsd.org; Thu, 16 Nov 2006 19:13:33 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:13:33 GMT Message-Id: <200611161913.kAGJDXYv066161@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110122 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:13:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=110122 Change 110122 by millert@millert_macbook on 2006/11/16 19:12:38 Hide sebsd_prev label namespace unless explicitly asked for. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#44 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.h#6 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#44 (text+ko) ==== @@ -3043,7 +3043,7 @@ u_int32_t sid; tsec = SLOT(label); - if (strcmp("sebsd_prev", element_name) == 0) + if (strcmp("?sebsd_prev", element_name) == 0) sid = tsec->osid; else if (strcmp("sebsd", element_name) == 0) sid = tsec->sid; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.h#6 (text+ko) ==== @@ -41,7 +41,7 @@ #define SEBSD_ID_STRING "sebsd" #define SEBSD_MAC_EXTATTR_NAME "sebsd" #define SEBSD_MAC_EXTATTR_NAMESPACE EXTATTR_NAMESPACE_SYSTEM -#define SEBSD_MAC_LABEL_NAMESPACES "sebsd","sebsd_prev" +#define SEBSD_MAC_LABEL_NAMESPACES "sebsd","?sebsd_prev" #define SEBSD_MAC_LABEL_NAME_COUNT 2 extern int sebsd_find_data(const char *key, void **valp, size_t *sizep); From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:14:44 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 5187D16A412; Thu, 16 Nov 2006 19:14:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 05C5716A407 for ; Thu, 16 Nov 2006 19:14:44 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87FBC43D99 for ; Thu, 16 Nov 2006 19:14:36 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJEZ0t066480 for ; Thu, 16 Nov 2006 19:14:35 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJEZE0066477 for perforce@freebsd.org; Thu, 16 Nov 2006 19:14:35 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:14:35 GMT Message-Id: <200611161914.kAGJEZE0066477@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110123 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:14:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=110123 Change 110123 by millert@millert_macbook on 2006/11/16 19:13:40 Remove mac_file_check_{get,change}_flags and mac_file_check_{get,change}_ofileflags. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_generic.c#5 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#16 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#7 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#19 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#28 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#45 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#7 (text+ko) ==== @@ -410,42 +410,22 @@ goto out; case F_GETFD: -#ifdef MAC - error = mac_file_check_get_ofileflags(proc_ucred(p), - fp->f_fglob, *pop); - if (error == 0) -#endif - *retval = (*pop & UF_EXCLOSE)? 1 : 0; + *retval = (*pop & UF_EXCLOSE)? 1 : 0; + error = 0; goto out; case F_SETFD: -#ifdef MAC - error = mac_file_check_change_ofileflags(proc_ucred(p), - fp->f_fglob, *pop, (*pop &~ UF_EXCLOSE) | - (uap->arg & 1 ? UF_EXCLOSE : 0)); - if (error == 0) -#endif - *pop = (*pop &~ UF_EXCLOSE) | - (uap->arg & 1)? UF_EXCLOSE : 0; + *pop = (*pop &~ UF_EXCLOSE) | + (uap->arg & 1)? UF_EXCLOSE : 0; + error = 0; goto out; case F_GETFL: -#ifdef MAC - error = mac_file_check_get_flags(proc_ucred(p), fp->f_fglob, - fp->f_flag); - if (error == 0) -#endif - *retval = OFLAGS(fp->f_flag); + *retval = OFLAGS(fp->f_flag); + error = 0; goto out; case F_SETFL: -#ifdef MAC - error = mac_file_check_change_flags(proc_ucred(p), - fp->f_fglob, fp->f_flag, (fp->f_flag & ~FCNTLFLAGS) | - (FFLAGS(CAST_DOWN(int, uap->arg)) & FCNTLFLAGS)); - if (error) - goto out; -#endif fp->f_flag &= ~FCNTLFLAGS; tmp = CAST_DOWN(int, uap->arg); fp->f_flag |= FFLAGS(tmp) & FCNTLFLAGS; @@ -2484,12 +2464,6 @@ lf.l_len = 0; if (how & LOCK_UN) { lf.l_type = F_UNLCK; -#ifdef MAC - error = mac_file_check_change_flags(proc_ucred(p), fp->f_fglob, - fp->f_flag, fp->f_flag & ~FHASLOCK); - if (error) - goto out; -#endif fp->f_flag &= ~FHASLOCK; error = VNOP_ADVLOCK(vp, (caddr_t)fp->f_fglob, F_UNLCK, &lf, F_FLOCK, &context); goto out; @@ -2503,12 +2477,6 @@ goto out; } #ifdef MAC - error = mac_file_check_change_flags(proc_ucred(p), fp->f_fglob, - fp->f_flag, fp->f_flag | FHASLOCK); - if (error) - goto out; -#endif -#ifdef MAC error = mac_file_check_lock(proc_ucred(p), fp->f_fglob, F_SETLK, &lf); if (error) goto out; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/sys_generic.c#5 (text+ko) ==== @@ -752,7 +752,7 @@ if (error) goto out; #endif - + #if NETAT /* * ### LD 6/11/97 Hack Alert: this is to get AppleTalk to work @@ -777,22 +777,12 @@ switch (com = uap->com) { case FIONCLEX: -#ifdef MAC - error = mac_file_check_change_ofileflags(proc_ucred(p), - fp->f_fglob, *fdflags(p, uap->fd), - *fdflags(p, uap->fd) & ~UF_EXCLOSE); - if (error == 0) -#endif - *fdflags(p, uap->fd) &= ~UF_EXCLOSE; + *fdflags(p, uap->fd) &= ~UF_EXCLOSE; + error =0; goto out; case FIOCLEX: -#ifdef MAC - error = mac_file_check_change_ofileflags(proc_ucred(p), - fp->f_fglob, *fdflags(p, uap->fd), - *fdflags(p, uap->fd) | UF_EXCLOSE); - if (error == 0) -#endif - *fdflags(p, uap->fd) |= UF_EXCLOSE; + *fdflags(p, uap->fd) |= UF_EXCLOSE; + error =0; goto out; } @@ -856,13 +846,6 @@ switch (com) { case FIONBIO: -#ifdef MAC - error = mac_file_check_change_flags(proc_ucred(p), fp->f_fglob, - fp->f_flag, *(int *)datap ? fp->f_flag | FNONBLOCK : - fp->f_flag & ~FNONBLOCK); - if (error) - goto out; -#endif if ( (tmp = *(int *)datap) ) fp->f_flag |= FNONBLOCK; else @@ -871,13 +854,6 @@ break; case FIOASYNC: -#ifdef MAC - error = mac_file_check_change_flags(proc_ucred(p), fp->f_fglob, - fp->f_flag, *(int *)datap ? fp->f_flag | FASYNC : - fp->f_flag & ~FASYNC); - if (error) - goto out; -#endif if ( (tmp = *(int *)datap) ) fp->f_flag |= FASYNC; else @@ -2495,4 +2471,3 @@ return(0); } - ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/vfs/vfs_syscalls.c#16 (text+ko) ==== @@ -1746,13 +1746,6 @@ if ((flags & FNONBLOCK) == 0) type |= F_WAIT; #ifdef MAC - error = mac_file_check_change_flags(vfs_context_ucred(ctx), - fp->f_fglob, fp->f_fglob->fg_flag, - fp->f_fglob->fg_flag | FHASLOCK); - if (error) - goto bad; -#endif -#ifdef MAC error = mac_file_check_lock(vfs_context_ucred(ctx), fp->f_fglob, F_SETLK, &lf); if (error) ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#7 (text+ko) ==== @@ -143,48 +143,6 @@ } int -mac_file_check_get_flags(struct ucred *cred, struct fileglob *fg, - u_int flags) -{ - int error; - - MAC_CHECK(file_check_get_flags, cred, fg, fg->fg_label, flags); - return (error); -} - -int -mac_file_check_get_ofileflags(struct ucred *cred, struct fileglob *fg, - char flags) -{ - int error; - - MAC_CHECK(file_check_get_ofileflags, cred, fg, fg->fg_label, flags); - return (error); -} - -int -mac_file_check_change_flags(struct ucred *cred, struct fileglob *fg, - u_int oldflags, u_int newflags) -{ - int error; - - MAC_CHECK(file_check_change_flags, cred, fg, fg->fg_label, oldflags, - newflags); - return (error); -} - -int -mac_file_check_change_ofileflags(struct ucred *cred, struct fileglob *fg, - char oldflags, char newflags) -{ - int error; - - MAC_CHECK(file_check_change_ofileflags, cred, fg, fg->fg_label, - oldflags, newflags); - return (error); -} - -int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg) { int error; ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#19 (text+ko) ==== @@ -122,22 +122,14 @@ void mac_devfs_label_update(struct mount *mp, struct devnode *de, struct vnode *vp); int mac_execve_enter(user_addr_t mac_p, struct label *execlabel); -int mac_file_check_change_flags(struct ucred *cred, struct fileglob *fg, - u_int oldflags, u_int newflags); int mac_file_check_change_offset(struct ucred *cred, struct fileglob *fg); -int mac_file_check_change_ofileflags(struct ucred *cred, - struct fileglob *fg, char oldflags, char newflags); int mac_file_check_create(struct ucred *cred); int mac_file_check_dup(struct ucred *cred, struct fileglob *fg, int newfd); int mac_file_check_fcntl(struct ucred *cred, struct fileglob *fg, int cmd, long arg); int mac_file_check_get(struct ucred *cred, struct fileglob *fg, char *elements, int len); -int mac_file_check_get_flags(struct ucred *cred, struct fileglob *fg, - u_int flags); int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg); -int mac_file_check_get_ofileflags(struct ucred *cred, struct fileglob *fg, - char flags); int mac_file_check_inherit(struct ucred *cred, struct fileglob *fg); int mac_file_check_ioctl(struct ucred *cred, struct fileglob *fg, u_long com, void *data); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#28 (text+ko) ==== @@ -580,48 +580,6 @@ struct label *vnodelabel ); /** - @brief Access control for changing file descriptor flags - @param cred Subject credential - @param fg Fileglob structure - @param label Policy label for fg - @param oldflags Old fd flags - @param newflags New fd flags - - Determine whether the subject identified by the credential can - change the specified flags for the fileglob structure represented by fg. - - @return Return 0 if access if granted, otherwise an appropriate - value for errno should be returned. -*/ -typedef int mpo_file_check_change_flags_t( - struct ucred *cred, - struct fileglob *fg, - struct label *label, - u_int oldflags, - u_int newflags -); -/** - @brief Access control for changing open file flags - @param cred Subject credential - @param fg Fileglob structure - @param label Policy label for fg - @param flags Old flags - @param flags New flags - - Determine whether the subject identified by the credential can - change the open file flags for the fileglob structure represented by fg. - - @return Return 0 if access if granted, otherwise an appropriate - value for errno should be returned. -*/ -typedef int mpo_file_check_change_ofileflags_t( - struct ucred *cred, - struct fileglob *fg, - struct label *label, - char oldflags, - char newflags -); -/** @brief Access control for changing the offset of a file descriptor @param cred Subject credential @param fg Fileglob structure @@ -710,25 +668,6 @@ int len ); /** - @brief Access control for getting file descriptor flags - @param cred Subject credential - @param fg Fileglob structure - @param label Policy label for fg - @param flags Requested flags - - Determine whether the subject identified by the credential can - get the specified flags for the fileglob structure represented by fg. - - @return Return 0 if access if granted, otherwise an appropriate - value for errno should be returned. -*/ -typedef int mpo_file_check_get_flags_t( - struct ucred *cred, - struct fileglob *fg, - struct label *label, - u_int flags -); -/** @brief Access control for getting the offset of a file descriptor @param cred Subject credential @param fg Fileglob structure @@ -746,25 +685,6 @@ struct label *label ); /** - @brief Access control for getting open file flags - @param cred Subject credential - @param fg Fileglob structure - @param label Policy label for fg - @param flags Requested flags - - Determine whether the subject identified by the credential can - get the open file flags for the fileglob structure represented by fg. - - @return Return 0 if access if granted, otherwise an appropriate - value for errno should be returned. -*/ -typedef int mpo_file_check_get_ofileflags_t( - struct ucred *cred, - struct fileglob *fg, - struct label *label, - char flags -); -/** @brief Access control for inheriting a file descriptor @param cred Subject credential @param fg Fileglob structure @@ -5123,15 +5043,11 @@ mpo_devfs_label_destroy_t *mpo_devfs_label_destroy; mpo_devfs_label_init_t *mpo_devfs_label_init; mpo_devfs_label_update_t *mpo_devfs_label_update; - mpo_file_check_change_flags_t *mpo_file_check_change_flags; mpo_file_check_change_offset_t *mpo_file_check_change_offset; - mpo_file_check_change_ofileflags_t *mpo_file_check_change_ofileflags; mpo_file_check_create_t *mpo_file_check_create; mpo_file_check_dup_t *mpo_file_check_dup; mpo_file_check_fcntl_t *mpo_file_check_fcntl; - mpo_file_check_get_flags_t *mpo_file_check_get_flags; mpo_file_check_get_offset_t *mpo_file_check_get_offset; - mpo_file_check_get_ofileflags_t *mpo_file_check_get_ofileflags; mpo_file_check_get_t *mpo_file_check_get; mpo_file_check_inherit_t *mpo_file_check_inherit; mpo_file_check_ioctl_t *mpo_file_check_ioctl; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#45 (text+ko) ==== @@ -3146,43 +3146,6 @@ } static int -sebsd_file_check_get_flags(struct ucred *cred, struct fileglob *fg, - struct label *fglabel, u_int flags) -{ - - return (file_has_perm(cred, fg, fglabel, 0)); -} - -static int -sebsd_file_check_get_ofileflags(struct ucred *cred, struct fileglob *fg, - struct label *fglabel, char flags) -{ - - return (file_has_perm(cred, fg, fglabel, 0)); -} - -static int -sebsd_file_check_change_flags(struct ucred *cred, struct fileglob *fg, - struct label *fglabel, u_int oldflags, u_int newflags) -{ - u_int32_t av = 0; - - if ((newflags & O_APPEND) && !(oldflags & O_APPEND)) - av = FILE__WRITE; - - return (file_has_perm(cred, fg, fglabel, av)); -} - -static int -sebsd_file_check_change_ofileflags(struct ucred *cred, struct fileglob *fg, - struct label *fglabel, char oldflags, char newflags) -{ - - /* XXX - should set av to something */ - return (file_has_perm(cred, fg, fglabel, 0)); -} - -static int sebsd_file_check_get_offset(struct ucred *cred, struct fileglob *fg, struct label *fglabel) { @@ -3552,13 +3515,9 @@ .mpo_devfs_label_destroy = sebsd_vnode_label_destroy, .mpo_devfs_label_init = sebsd_vnode_label_init, .mpo_devfs_label_update = sebsd_devfs_update, - .mpo_file_check_change_flags = sebsd_file_check_change_flags, .mpo_file_check_change_offset = sebsd_file_check_change_offset, - .mpo_file_check_change_ofileflags = sebsd_file_check_change_ofileflags, .mpo_file_check_dup = sebsd_file_check_dup, - .mpo_file_check_get_flags = sebsd_file_check_get_flags, .mpo_file_check_get_offset = sebsd_file_check_get_offset, - .mpo_file_check_get_ofileflags = sebsd_file_check_get_ofileflags, .mpo_file_check_inherit = sebsd_file_check_receive, .mpo_file_check_ioctl = sebsd_file_check_ioctl, .mpo_file_check_lock = sebsd_file_check_lock, From owner-p4-projects@FreeBSD.ORG Thu Nov 16 19:17:41 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 145DF16A4AB; Thu, 16 Nov 2006 19:17:41 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BDF0816A4A0 for ; Thu, 16 Nov 2006 19:17:40 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8878043D4C for ; Thu, 16 Nov 2006 19:17:40 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGJHeBK066798 for ; Thu, 16 Nov 2006 19:17:40 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGJHeo0066795 for perforce@freebsd.org; Thu, 16 Nov 2006 19:17:40 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 19:17:40 GMT Message-Id: <200611161917.kAGJHeo0066795@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110124 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 19:17:41 -0000 http://perforce.freebsd.org/chv.cgi?CH=110124 Change 110124 by millert@millert_macbook on 2006/11/16 19:17:24 Update policy Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/DirectoryService.te#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/KernelEventAgent.te#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.fc#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.te#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.te#7 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/diskarbitrationd.te#6 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/frameworks.if#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/loginwindow.te#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/lookupd.te#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/mDNSResponder.te#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/memberd.te#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/files.fc#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/files.if#4 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.fc#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.if#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.te#2 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/init.te#5 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/libraries.fc#4 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/DirectoryService.te#6 (text+ko) ==== @@ -51,6 +51,7 @@ # support files allow DirectoryService_t DirectoryService_resource_t:file { execute getattr read setattr write }; allow DirectoryService_t DirectoryService_resource_t:dir { getattr read search }; +allow DirectoryService_t DirectoryService_resource_t:lnk_file { getattr read }; # file descriptors and sockets allow DirectoryService_t self:fd use; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/KernelEventAgent.te#4 (text+ko) ==== @@ -33,3 +33,10 @@ # Talk to launchd init_allow_ipc(KernelEventAgent_t) +init_allow_bootstrap(KernelEventAgent_t) + +# Talk to kernel +kernel_allow_ipc(KernelEventAgent_t) + +# Talk to securityd +securityd_allow_ipc(KernelEventAgent_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.fc#3 (text+ko) ==== @@ -5,4 +5,4 @@ /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/WindowServer -- gen_context(system_u:object_r:WindowServer_exec_t,s0) -/System/Library/Displays/Overrides -- gen_context(system_u:object_r:WindowServer_resource_t) +/System/Library/Displays/.* -- gen_context(system_u:object_r:WindowServer_resource_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/WindowServer.te#6 (text+ko) ==== @@ -114,3 +114,5 @@ # Read modules allow WindowServer_t modules_dep_t:dir search; +# Read general resource files +darwin_allow_resource_read(WindowServer_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/configd.te#7 (text+ko) ==== @@ -145,7 +145,7 @@ WindowServer_allow_shm(configd_t) # Read prefs, etc -darwin_allow_global_pref_read(configd_t) +darwin_allow_global_pref_rw(configd_t) darwin_allow_host_pref_read(configd_t) darwin_allow_system_read(configd_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/diskarbitrationd.te#6 (text+ko) ==== @@ -35,12 +35,20 @@ allow diskarbitrationd_t diskarbitrationd_var_run_t:dir rw_dir_perms; files_pid_filetrans(diskarbitrationd_t,diskarbitrationd_var_run_t, { file sock_file }) +# Apparently diskarbitrationd transitions to fsadm_t at some point... +init_allow_ipc(fsadm_t) +kernel_allow_ipc(fsadm_t) +mach_allow_message(fsadm_t, fsadm_t) +allow fsadm_t device_t:chr_file { getattr ioctl read write }; + # Misc allow diskarbitrationd_t self:process signal; allow diskarbitrationd_t self:socket { connect write }; allow diskarbitrationd_t self:udp_socket create; allow diskarbitrationd_t self:unix_dgram_socket create; +allow diskarbitrationd_t sbin_t:dir search; + # Allow various file operations allow diskarbitrationd_t nfs_t:dir getattr; allow diskarbitrationd_t nfs_t:filesystem mount; @@ -96,6 +104,13 @@ # Allow access to frameworks frameworks_read(diskarbitrationd_t) - # Read /private/var files_read_var_files(diskarbitrationd_t) + +# Allow reading of /private +darwin_allow_private_read(diskarbitrationd_t) + +# Read fstools files +fstools_read_files(diskarbitrationd_t) + + ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/frameworks.if#2 (text+ko) ==== @@ -16,7 +16,7 @@ allow $1 framework_t:file read_file_perms; allow $1 framework_t:dir r_dir_perms; allow $1 framework_t:dir search_dir_perms; - allow configd_t framework_t:lnk_file { getattr read }; + allow $1 framework_t:lnk_file { getattr read }; ') ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/loginwindow.te#4 (text+ko) ==== @@ -74,3 +74,19 @@ # Talk to configd configd_allow_ipc(loginwindow_t) configd_allow_shm(loginwindow_t) + +# Use CoreServices +darwin_allow_CoreServices_read(loginwindow_t) + +# Read prefs +darwin_allow_global_pref_read(loginwindow_t) +darwin_allow_host_pref_read(loginwindow_t) + +# Read /private +darwin_allow_private_read(loginwindow_t) + +# Read /System +darwin_allow_system_read(loginwindow_t) + +# Use frameworks +frameworks_read(loginwindow_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/lookupd.te#3 (text+ko) ==== @@ -88,4 +88,15 @@ # Talk to loginwindow loginwindow_allow_ipc(lookupd_t) +# Use CoreServices +darwin_allow_CoreServices_read(lookupd_t) + +# Read /private +darwin_allow_private_read(lookupd_t) + +# Read /System +darwin_allow_system_read(lookupd_t) + +# Use frameworks +frameworks_read(lookupd_t) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/mDNSResponder.te#3 (text+ko) ==== @@ -44,6 +44,8 @@ allow mDNSResponder_t self:fd use; allow mDNSResponder_t self:socket { accept bind create read write }; allow mDNSResponder_t self:udp_socket create; +allow mDNSResponder_t self:tcp_socket create; +allow mDNSResponder_t self:unix_dgram_socket create; # Misc allow mDNSResponder_t mnt_t:dir search; @@ -61,3 +63,17 @@ # Allow mDNSResponder to talk to configd configd_allow_ipc(mDNSResponder_t) + +# Aloow mDNSResponder to talk to lookupd +lookupd_allow_ipc(mDNSResponder_t) + +# Use CoreServices +darwin_allow_CoreServices_read(mDNSResponder_t) + +# Read prefs +darwin_allow_global_pref_read(mDNSResponder_t) +darwin_allow_host_pref_read(mDNSResponder_t) + +# Read /private +darwin_allow_private_read(mDNSResponder_t) + ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/darwin/memberd.te#3 (text+ko) ==== @@ -38,7 +38,14 @@ # Talk to launchd init_allow_ipc(memberd_t) init_allow_shm(memberd_t) +init_allow_bootstrap(memberd_t) +# Talk tro self +allow memberd_t self:mach_port make_send_once; + +# Talk to kernel +kernel_allow_ipc(memberd_t) + # Talk to loginwindow loginwindow_allow_ipc(memberd_t) @@ -47,3 +54,5 @@ # Talk to WindowServer WindowServer_allow_ipc(memberd_t) + + ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/files.fc#5 (text+ko) ==== @@ -13,6 +13,7 @@ # # /etc # +/etc gen_context(system_u:object_r:etc_t,s0) /private/etc -d gen_context(system_u:object_r:etc_t,s0) /private/etc/.* gen_context(system_u:object_r:etc_t,s0) /private/etc/localtime -l gen_context(system_u:object_r:etc_t,s0) @@ -74,7 +75,8 @@ # # /private/var -# +#h +/var gen_context(system_u:object_r:var_t,s0) /private/var -d gen_context(system_u:object_r:var_t,s0) /private/var/.* gen_context(system_u:object_r:var_t,s0) ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/kernel/files.if#4 (text+ko) ==== @@ -3614,6 +3614,7 @@ allow $1 var_t:dir search_dir_perms; allow $1 var_t:file r_file_perms; + allow $1 var_t:lnk_file { read }; ') ######################################## ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.fc#2 (text+ko) ==== @@ -1,8 +1,12 @@ /Library/Preferences/.GlobalPreferences.plist -- gen_context(system_u:object_r:darwin_global_pref_t,s0) +/Library/Preferences -d gen_context(system_u:object_r:darwin_global_pref_t,s0) /private/var/db/.AppleSetupDone -- gen_context(system_u:object_r:darwin_global_pref_t,s0) -/Library/Preferences/SystemConfiguration.* -- gen_context(system_u:object_r:darwin_global_pref_t,s0) +/Library/Preferences/SystemConfiguration.* gen_context(system_u:object_r:darwin_global_pref_t,s0) /private/var/root/Library/Preferences/ByHost.* gen_context(system_u:object_r:darwin_host_pref_t,s0) /System/Library/CoreServices.* gen_context(system_u:object_r:darwin_CoreServices_t,s0) /private -d gen_context(system_u:object_r:darwin_private_t,s0) +/Library/ColorSync.* gen_context(system_u:object_r:darwin_resource_t,s0) +/System/Library/ColorSync.* gen_context(system_u:object_r:darwin_resource_t,s0) + ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.if#2 (text+ko) ==== @@ -21,6 +21,27 @@ ######################################## ## +## Allow reading/writing of global preference files +## +## +## +## Type to be used as a domain. +## +## +# +interface(`darwin_allow_global_pref_rw',` + gen_require(` + type darwin_global_pref_t; + ') + + allow $1 darwin_global_pref_t:file rw_file_perms; + allow $1 darwin_global_pref_t:dir rw_dir_perms; + allow $1 darwin_global_pref_t:file link_file_perms; + +') + +######################################## +## ## Allow reading of host preference files ## ## @@ -57,6 +78,7 @@ allow $1 darwin_CoreServices_t:file read_file_perms; allow $1 darwin_CoreServices_t:dir r_dir_perms; + allow $1 darwin_CoreServices_t:lnk_file { getattr read }; ') @@ -117,3 +139,22 @@ ') +######################################## +## +## Allow reading of general resource files +## +## +## +## Type to be used as a domain. +## +## +# +interface(`darwin_allow_resource_read',` + gen_require(` + type darwin_resource_t; + ') + + allow $1 darwin_resource_t:file read_file_perms; + allow $1 darwin_resource_t:dir r_dir_perms; + +') ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/darwin.te#2 (text+ko) ==== @@ -9,6 +9,7 @@ type darwin_host_pref_t; type darwin_CoreServices_t; type darwin_system_t; +type darwin_resource_t; type darwin_private_t; ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/init.te#5 (text+ko) ==== @@ -642,6 +642,9 @@ # Talk to yourself for bootstrap namespace init_allow_bootstrap(init_t) + +# Talk to self +init_allow_ipc(init_t) # Talk to the kernel kernel_allow_ipc(init_t) @@ -656,3 +659,10 @@ # Use Frameworks frameworks_read(init_t) + +# Use CoreServices +darwin_allow_CoreServices_read(init_t) + +darwin_allow_private_read(init_t) + + ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/refpolicy/policy/modules/system/libraries.fc#4 (text+ko) ==== @@ -8,6 +8,11 @@ #/System/Library/Frameworks gen_context(system_u:object_r:lib_t,s0) #/System/Library/Frameworks/.* gen_context(system_u:object_r:lib_t,s0) +# +# /Library +# +/Library -d gen_context(system_u:object_r:lib_t,s0) + # # /usr From owner-p4-projects@FreeBSD.ORG Thu Nov 16 20:53:45 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id DE61816A416; Thu, 16 Nov 2006 20:53:44 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B045316A40F for ; Thu, 16 Nov 2006 20:53:44 +0000 (UTC) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7EA9743D49 for ; Thu, 16 Nov 2006 20:53:44 +0000 (GMT) (envelope-from cognet@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGKri1t096876 for ; Thu, 16 Nov 2006 20:53:44 GMT (envelope-from cognet@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGKriJE096871 for perforce@freebsd.org; Thu, 16 Nov 2006 20:53:44 GMT (envelope-from cognet@freebsd.org) Date: Thu, 16 Nov 2006 20:53:44 GMT Message-Id: <200611162053.kAGKriJE096871@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to cognet@freebsd.org using -f From: Olivier Houchard To: Perforce Change Reviews Cc: Subject: PERFORCE change 110128 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 20:53:45 -0000 http://perforce.freebsd.org/chv.cgi?CH=110128 Change 110128 by cognet@cognet on 2006/11/16 20:53:22 Setup the ATA interrupt as active low. It makes the interrupt storm go away, and it still works with a CF card plugged in (and we still correctly get interrupts). Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#10 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#10 (text+ko) ==== @@ -136,9 +136,12 @@ rman_set_bustag(&sc->sc_ata, &sc->sc_expbus_tag); rman_set_bushandle(&sc->sc_ata, sc->sc_ioh); - /* interrupt is active high */ GPIO_CONF_WRITE_4(sa, IXP425_GPIO_GPOER, GPIO_CONF_READ_4(sa, IXP425_GPIO_GPOER) | (1< X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AEF7516A415; Thu, 16 Nov 2006 21:32:33 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 89BA416A403 for ; Thu, 16 Nov 2006 21:32:33 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2355443D6D for ; Thu, 16 Nov 2006 21:32:33 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGLWX9a004307 for ; Thu, 16 Nov 2006 21:32:33 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGLWWDh004304 for perforce@freebsd.org; Thu, 16 Nov 2006 21:32:32 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 21:32:32 GMT Message-Id: <200611162132.kAGLWWDh004304@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110130 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 21:32:34 -0000 http://perforce.freebsd.org/chv.cgi?CH=110130 Change 110130 by millert@millert_macbook on 2006/11/16 21:32:30 Some mac_file_check_fcntl fixes: - fix type of "arg", it should be user_long_t - add label arg to mpo_file_check_fcntl_t Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#8 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#20 edit .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#29 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_file.c#8 (text+ko) ==== @@ -106,11 +106,12 @@ } int -mac_file_check_fcntl(struct ucred *cred, struct fileglob *fg, int cmd, long arg) +mac_file_check_fcntl(struct ucred *cred, struct fileglob *fg, int cmd, + user_long_t arg) { int error; - MAC_CHECK(file_check_fcntl, cred, fg, cmd, arg); + MAC_CHECK(file_check_fcntl, cred, fg, fg->fg_label, cmd, arg); return (error); } ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_framework.h#20 (text+ko) ==== @@ -126,7 +126,7 @@ int mac_file_check_create(struct ucred *cred); int mac_file_check_dup(struct ucred *cred, struct fileglob *fg, int newfd); int mac_file_check_fcntl(struct ucred *cred, struct fileglob *fg, int cmd, - long arg); + user_long_t arg); int mac_file_check_get(struct ucred *cred, struct fileglob *fg, char *elements, int len); int mac_file_check_get_offset(struct ucred *cred, struct fileglob *fg); ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/security/mac_policy.h#29 (text+ko) ==== @@ -633,6 +633,7 @@ @brief Access control check for fcntl @param cred Subject credential @param fg Fileglob structure + @param label Policy label for fg @param cmd Control operation to be performed; see fcntl(2) @param arg fcnt arguments; see fcntl(2) @@ -645,8 +646,9 @@ typedef int mpo_file_check_fcntl_t( struct ucred *cred, struct fileglob *fg, + struct label *label, int cmd, - long arg + user_long_t arg ); /** @brief Access control check for mac_get_fd From owner-p4-projects@FreeBSD.ORG Thu Nov 16 21:32:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 0C68B16A417; Thu, 16 Nov 2006 21:32:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C606B16A407 for ; Thu, 16 Nov 2006 21:32:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id BBB8F43D66 for ; Thu, 16 Nov 2006 21:32:32 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGLWWmp004301 for ; Thu, 16 Nov 2006 21:32:32 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGLWWdB004298 for perforce@freebsd.org; Thu, 16 Nov 2006 21:32:32 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 21:32:32 GMT Message-Id: <200611162132.kAGLWWdB004298@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110129 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 21:32:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=110129 Change 110129 by millert@millert_macbook on 2006/11/16 21:31:41 Add missing call to mac_vnode_check_truncate() for F_SETSIZE fcntl. Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#8 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#8 (text+ko) ==== @@ -677,26 +677,35 @@ if (error) goto outdrop; + vp = (struct vnode *)fp->f_data; + error = vnode_getwithref(vp); + if (error) + goto outdrop; + +#ifdef MAC + error = mac_vnode_check_truncate(proc_ucred(p), + vfs_context_ucred(&context), vp); + if (error) { + (void)vnode_put(vp); + goto outdrop; + } +#endif /* * Make sure that we are root. Growing a file * without zero filling the data is a security hole * root would have access anyway so we'll allow it */ - if (!is_suser()) { error = EACCES; - goto outdrop; - } - vp = (struct vnode *)fp->f_data; - - if ( (error = vnode_getwithref(vp)) == 0 ) { - /* + } else { + /* * set the file size */ - error = vnode_setsize(vp, offset, IO_NOZEROFILL, &context); + error = vnode_setsize(vp, offset, IO_NOZEROFILL, + &context); + } - (void)vnode_put(vp); - } + (void)vnode_put(vp); goto outdrop; case F_RDAHEAD: From owner-p4-projects@FreeBSD.ORG Thu Nov 16 21:34:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id E3BFB16A47E; Thu, 16 Nov 2006 21:34:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A0DC016A40F for ; Thu, 16 Nov 2006 21:34:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 44C8443D46 for ; Thu, 16 Nov 2006 21:34:36 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGLYatb004887 for ; Thu, 16 Nov 2006 21:34:36 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGLYZDQ004884 for perforce@freebsd.org; Thu, 16 Nov 2006 21:34:36 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 21:34:36 GMT Message-Id: <200611162134.kAGLYZDQ004884@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110131 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 21:34:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=110131 Change 110131 by millert@millert_macbook on 2006/11/16 21:33:52 Implement mpo_file_check_fcntl Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#46 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/sedarwin/sebsd.c#46 (text+ko) ==== @@ -3146,6 +3146,35 @@ } static int +sebsd_file_check_fcntl(struct ucred *cred, struct fileglob *fg, + struct label *fglabel, int cmd, user_long_t arg) +{ + u_int32_t av = 0; + + switch (cmd) { + case F_DUPFD: + case F_SETLK: + case F_SETLKW: + case F_GETLK: + case F_SETSIZE: + /* These are handled by their own entry points */ + return (0); + case F_SETFL: + if (arg & O_APPEND) + av = FILE__WRITE; + break; + case F_PREALLOCATE: + av = FILE__WRITE; + break; + default: + /* Everything else just checks FD__USE */ + break; + } + + return (file_has_perm(cred, fg, fglabel, av)); +} + +static int sebsd_file_check_get_offset(struct ucred *cred, struct fileglob *fg, struct label *fglabel) { @@ -3517,6 +3546,7 @@ .mpo_devfs_label_update = sebsd_devfs_update, .mpo_file_check_change_offset = sebsd_file_check_change_offset, .mpo_file_check_dup = sebsd_file_check_dup, + .mpo_file_check_fcntl = sebsd_file_check_fcntl, .mpo_file_check_get_offset = sebsd_file_check_get_offset, .mpo_file_check_inherit = sebsd_file_check_receive, .mpo_file_check_ioctl = sebsd_file_check_ioctl, From owner-p4-projects@FreeBSD.ORG Thu Nov 16 21:34:37 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3CF1F16A56F; Thu, 16 Nov 2006 21:34:37 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD0A616A47B for ; Thu, 16 Nov 2006 21:34:36 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 98BE643D45 for ; Thu, 16 Nov 2006 21:34:36 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGLYaau004893 for ; Thu, 16 Nov 2006 21:34:36 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGLYaVg004890 for perforce@freebsd.org; Thu, 16 Nov 2006 21:34:36 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 21:34:36 GMT Message-Id: <200611162134.kAGLYaVg004890@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110132 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 21:34:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=110132 Change 110132 by millert@millert_macbook on 2006/11/16 21:34:17 For F_SETSIZE set vp before we drop the proc lock like the other parts of fcntl(). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#9 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/darwin/xnu/bsd/kern/kern_descrip.c#9 (text+ko) ==== @@ -671,13 +671,13 @@ error = EBADF; goto out; } + vp = (struct vnode *)fp->f_data; proc_fdunlock(p); error = copyin(argp, (caddr_t)&offset, sizeof (off_t)); if (error) goto outdrop; - vp = (struct vnode *)fp->f_data; error = vnode_getwithref(vp); if (error) goto outdrop; From owner-p4-projects@FreeBSD.ORG Thu Nov 16 21:35:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 217C016A4D0; Thu, 16 Nov 2006 21:35:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EE8FD16A492 for ; Thu, 16 Nov 2006 21:35:39 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8133043D5D for ; Thu, 16 Nov 2006 21:35:38 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGLZc2n005032 for ; Thu, 16 Nov 2006 21:35:38 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGLZcCl005029 for perforce@freebsd.org; Thu, 16 Nov 2006 21:35:38 GMT (envelope-from millert@freebsd.org) Date: Thu, 16 Nov 2006 21:35:38 GMT Message-Id: <200611162135.kAGLZcCl005029@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 110133 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 21:35:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=110133 Change 110133 by millert@millert_macbook on 2006/11/16 21:34:37 Adapt to mac_policy.h changes Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#22 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/mls/mac_mls.c#22 (text+ko) ==== @@ -1962,12 +1962,12 @@ static int mac_mls_file_check_fcntl(struct ucred *cred, struct fileglob *fg, - int cmd, long arg) + struct label *label, int cmd, user_long_t arg) { if (!mac_mls_enabled) return (0); - MLS_MESSAGE("file_check_fcntl: fp %p cmd %d(%x) arg %d(%p)\n", fp, cmd, arg); + MLS_MESSAGE("file_check_fcntl: fg %p cmd %d(%x) arg %lld(%llx)\n", fg, cmd, cmd, arg, arg); #warning Implement mac_mls_file_check_fcntl() return (0); } @@ -3022,7 +3022,8 @@ } static int -mac_mls_port_check_method(struct label *task, struct label *port, int msgid) +mac_mls_port_check_method(struct proc *p, struct label *task, + struct label *port, int msgid) { struct mac_mls *subj, *obj; @@ -3373,13 +3374,13 @@ } static int -mac_mls_vnode_check_ioctl(struct ucred *cred, struct fileproc *fp, - int com, caddr_t data) +mac_mls_vnode_check_ioctl(struct ucred *cred, struct vnode *vp, + struct label *label, int com, caddr_t data) { if (!mac_mls_enabled) return (0); - MLS_MESSAGE("vnode_check_ioctl: fp %p com %d(%x) data %d(%p)\n", fp, com, data); + MLS_MESSAGE("vnode_check_ioctl: fp %p com %d(%x) data %d(%p)\n", fp, com, com, data, data); #warning Implement mac_mls_vnode_check_ioctl() return (0); } From owner-p4-projects@FreeBSD.ORG Thu Nov 16 23:08:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 702A216A47C; Thu, 16 Nov 2006 23:08:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 281F016A416 for ; Thu, 16 Nov 2006 23:08:36 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E29B43D5A for ; Thu, 16 Nov 2006 23:08:35 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGN8Zpl025271 for ; Thu, 16 Nov 2006 23:08:35 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGN8ZWG025268 for perforce@freebsd.org; Thu, 16 Nov 2006 23:08:35 GMT (envelope-from sam@freebsd.org) Date: Thu, 16 Nov 2006 23:08:35 GMT Message-Id: <200611162308.kAGN8ZWG025268@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 110137 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 23:08:36 -0000 http://perforce.freebsd.org/chv.cgi?CH=110137 Change 110137 by sam@sam_ebb on 2006/11/16 23:08:26 fixup comments; include url to intel app note Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#11 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/avila_ata.c#11 (text+ko) ==== @@ -31,10 +31,12 @@ __FBSDID("$FreeBSD$"); /* - * CF-IDE Support for the Avila Gateworks XScale boards. - * There are 1 or 2 optional CF slots. Registers are on - * the Expansion Bus connected to CS1. Interrupts are - * tied to GPIO pin 12. No DMA, just PIO. + * Compact Flash Support for the Avila Gateworks XScale boards. + * There are 1 or 2 optional CF slots operated in "True IDE" mode. + * Registers are on the Expansion Bus connected to CS1. Interrupts + * are tied to GPIO pin 12. No DMA, just PIO. + * + * See also http://www.intel.com/design/network/applnots/302456.htm. */ #include #include From owner-p4-projects@FreeBSD.ORG Thu Nov 16 23:46:23 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BED5516A407; Thu, 16 Nov 2006 23:46:23 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7BB2B16A40F for ; Thu, 16 Nov 2006 23:46:23 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id D9F7743D55 for ; Thu, 16 Nov 2006 23:46:22 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAGNkMA3031271 for ; Thu, 16 Nov 2006 23:46:22 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAGNkMR8031268 for perforce@freebsd.org; Thu, 16 Nov 2006 23:46:22 GMT (envelope-from mjacob@freebsd.org) Date: Thu, 16 Nov 2006 23:46:22 GMT Message-Id: <200611162346.kAGNkMR8031268@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110138 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Nov 2006 23:46:24 -0000 http://perforce.freebsd.org/chv.cgi?CH=110138 Change 110138 by mjacob@newisp on 2006/11/16 23:45:44 Finally fix local command responses to set residual correctly. This allows us to play nicely on SANs when we have target mode enabled in f/w but have neither the scsi_targbh enabled or scsi_targ with a target enabled. Affected files ... .. //depot/projects/newisp/dev/mpt/mpt_cam.c#11 edit Differences ... ==== //depot/projects/newisp/dev/mpt/mpt_cam.c#11 (text+ko) ==== @@ -3144,14 +3144,16 @@ * XXX: FC cards report MAX_DEVICES of 512- but we * XXX: seem to hang when going higher than 255. */ - if (cpi->max_target > 255) + if (cpi->max_target > 255) { cpi->max_target = 255; + } /* * XXX: VMware ESX reports > 16 devices and then dies * XXX: when we probe. */ - if (mpt->is_spi && cpi->max_target > 15) + if (mpt->is_spi && cpi->max_target > 15) { cpi->max_target = 15; + } cpi->max_lun = 7; cpi->initiator_id = mpt->mpt_ini_id; @@ -3166,8 +3168,7 @@ */ if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = - mpt->mpt_fcport_speed * 100000; + cpi->base_transfer_speed = 100000; cpi->hba_inquiry = PI_TAG_ABLE; cpi->transport = XPORT_FC; cpi->transport_version = 0; @@ -4151,12 +4152,16 @@ bus_addr_t pptr; request_t *req; - if (length == 0) { + /* + * We enter with resid set to the data load for the command. + */ + tgt = MPT_TGT_STATE(mpt, cmd_req); + if (length == 0 || tgt->resid == 0) { + tgt->resid = 0; mpt_scsi_tgt_status(mpt, NULL, cmd_req, 0, NULL); return; } - tgt = MPT_TGT_STATE(mpt, cmd_req); if ((req = mpt_get_request(mpt, FALSE)) == NULL) { mpt_prt(mpt, "out of resources- dropping local response\n"); return; @@ -4208,7 +4213,7 @@ tgt->ccb = NULL; tgt->req = req; - tgt->resid = 0; + tgt->resid -= length; tgt->bytes_xfered = length; #ifdef WE_TRUST_AUTO_GOOD_STATUS tgt->state = TGT_STATE_MOVING_DATA_AND_STATUS; @@ -4514,6 +4519,13 @@ static void mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc) { + static uint8_t null_iqd[SHORT_INQUIRY_LENGTH] = { + 0x7f, 0x00, 0x02, 0x02, 0x20, 0x00, 0x00, 0x32, + 'F', 'R', 'E', 'E', 'B', 'S', 'D', ' ', + 'L', 'S', 'I', '-', 'L', 'O', 'G', 'I', + 'C', ' ', 'N', 'U', 'L', 'D', 'E', 'V', + '0', '0', '0', '1' + }; struct ccb_accept_tio *atiop; lun_id_t lun; int tag_action = 0; @@ -4660,11 +4672,8 @@ * REPORT LUNS gets illegal command. * All other commands get 'no such device'. */ - uint8_t *sp, cond, buf[MPT_SENSE_SIZE]; - - mpt_prt(mpt, "CMD 0x%x to unmanaged lun %u\n", - cdbp[0], lun); + size_t len; memset(buf, 0, MPT_SENSE_SIZE); cond = SCSI_STATUS_CHECK_COND; @@ -4677,31 +4686,38 @@ switch (cdbp[0]) { case INQUIRY: { - static uint8_t iqd[8] = { - 0x7f, 0x0, 0x4, 0x12, 0x0 - }; if (cdbp[1] != 0) { buf[12] = 0x26; buf[13] = 0x01; break; } - mpt_prt(mpt, "local inquiry\n"); + len = min(tgt->resid, cdbp[4]); + len = min(len, sizeof (null_iqd)); + mpt_lprt(mpt, MPT_PRT_DEBUG, + "local inquiry %ld bytes\n", len); mpt_scsi_tgt_local(mpt, req, lun, 1, - iqd, sizeof (iqd)); + null_iqd, len); return; } case REQUEST_SENSE: { buf[2] = 0x0; - mpt_prt(mpt, "local request sense\n"); + len = min(tgt->resid, cdbp[4]); + len = min(len, sizeof (buf)); + mpt_lprt(mpt, MPT_PRT_DEBUG, + "local reqsense %ld bytes\n", len); mpt_scsi_tgt_local(mpt, req, lun, 1, - buf, sizeof (buf)); + buf, len); return; } case REPORT_LUNS: + mpt_lprt(mpt, MPT_PRT_DEBUG, "REPORT LUNS\n"); buf[12] = 0x26; - break; + return; default: + mpt_lprt(mpt, MPT_PRT_DEBUG, + "CMD 0x%x to unmanaged lun %u\n", + cdbp[0], lun); buf[12] = 0x25; break; } From owner-p4-projects@FreeBSD.ORG Fri Nov 17 00:21:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 19B1816A47B; Fri, 17 Nov 2006 00:21:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E0F3D16A40F for ; Fri, 17 Nov 2006 00:21:07 +0000 (UTC) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F06643D53 for ; Fri, 17 Nov 2006 00:21:07 +0000 (GMT) (envelope-from mjacob@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAH0L7o0037667 for ; Fri, 17 Nov 2006 00:21:07 GMT (envelope-from mjacob@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAH0L7rK037663 for perforce@freebsd.org; Fri, 17 Nov 2006 00:21:07 GMT (envelope-from mjacob@freebsd.org) Date: Fri, 17 Nov 2006 00:21:07 GMT Message-Id: <200611170021.kAH0L7rK037663@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to mjacob@freebsd.org using -f From: Matt Jacob To: Perforce Change Reviews Cc: Subject: PERFORCE change 110141 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 00:21:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=110141 Change 110141 by mjacob@newisp on 2006/11/17 00:20:13 Bad- didn't do i386 compile. Affected files ... .. //depot/projects/newisp/dev/mpt/mpt_cam.c#12 edit Differences ... ==== //depot/projects/newisp/dev/mpt/mpt_cam.c#12 (text+ko) ==== @@ -4694,7 +4694,7 @@ len = min(tgt->resid, cdbp[4]); len = min(len, sizeof (null_iqd)); mpt_lprt(mpt, MPT_PRT_DEBUG, - "local inquiry %ld bytes\n", len); + "local inquiry %ld bytes\n", (long) len); mpt_scsi_tgt_local(mpt, req, lun, 1, null_iqd, len); return; @@ -4705,7 +4705,7 @@ len = min(tgt->resid, cdbp[4]); len = min(len, sizeof (buf)); mpt_lprt(mpt, MPT_PRT_DEBUG, - "local reqsense %ld bytes\n", len); + "local reqsense %ld bytes\n", (long) len); mpt_scsi_tgt_local(mpt, req, lun, 1, buf, len); return; From owner-p4-projects@FreeBSD.ORG Fri Nov 17 07:58:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6EA8516A407; Fri, 17 Nov 2006 07:58:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2D46316A492 for ; Fri, 17 Nov 2006 07:58:08 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7715D43D72 for ; Fri, 17 Nov 2006 07:58:03 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAH7w3Bh071184 for ; Fri, 17 Nov 2006 07:58:03 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAH7vu5p071160 for perforce@freebsd.org; Fri, 17 Nov 2006 07:57:56 GMT (envelope-from jb@freebsd.org) Date: Fri, 17 Nov 2006 07:57:56 GMT Message-Id: <200611170757.kAH7vu5p071160@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 110150 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 07:58:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=110150 Change 110150 by jb@jb_freebsd8 on 2006/11/17 07:56:57 IFC Affected files ... .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#35 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.committers.sgml#23 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/dev-model/book.sgml#4 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/audit/chapter.sgml#8 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/security/chapter.sgml#13 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml#6 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#32 integrate .. //depot/projects/dtrace/doc/en_US.ISO8859-1/share/sgml/authors.ent#16 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/advanced-networking/chapter.sgml#3 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/basics/chapter.sgml#3 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/config/chapter.sgml#3 integrate .. //depot/projects/dtrace/doc/fr_FR.ISO8859-1/books/handbook/x11/chapter.sgml#4 integrate .. //depot/projects/dtrace/doc/release/Makefile#4 integrate .. //depot/projects/dtrace/doc/release/texts/README#3 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/des.key#3 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/erwin.key#3 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/koitsu.key#1 branch .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys-developers.sgml#17 integrate .. //depot/projects/dtrace/doc/share/pgpkeys/pgpkeys.ent#17 integrate .. //depot/projects/dtrace/doc/share/sgml/freebsd.ent#9 integrate .. //depot/projects/dtrace/doc/share/sgml/mirrors.xml#7 integrate .. //depot/projects/dtrace/ports/GIDs#9 integrate .. //depot/projects/dtrace/ports/LEGAL#13 integrate .. //depot/projects/dtrace/ports/MOVED#32 integrate .. //depot/projects/dtrace/ports/Mk/bsd.gnustep.mk#6 integrate .. //depot/projects/dtrace/ports/Mk/bsd.lua.mk#4 integrate .. //depot/projects/dtrace/ports/Mk/bsd.wx.mk#3 integrate .. //depot/projects/dtrace/ports/UIDs#10 integrate .. //depot/projects/dtrace/ports/UPDATING#25 integrate .. //depot/projects/dtrace/src/MAINTAINERS#12 integrate .. //depot/projects/dtrace/src/Makefile.inc1#24 integrate .. //depot/projects/dtrace/src/ObsoleteFiles.inc#17 integrate .. //depot/projects/dtrace/src/UPDATING#10 integrate .. //depot/projects/dtrace/src/crypto/openssh/ChangeLog#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/Makefile.in#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/README#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/audit-bsm.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/auth-rsa.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/auth.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/bufaux.h#5 delete .. //depot/projects/dtrace/src/crypto/openssh/bufbn.c#3 integrate .. //depot/projects/dtrace/src/crypto/openssh/buildpkg.sh.in#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/clientloop.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/configure.ac#6 integrate .. //depot/projects/dtrace/src/crypto/openssh/dh.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/entropy.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/kexdhc.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/kexdhs.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/kexgexc.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/kexgexs.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/key.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/moduli.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/monitor.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/monitor_fdpass.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/openbsd-compat/port-solaris.c#3 integrate .. //depot/projects/dtrace/src/crypto/openssh/rsa.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/scard.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/scard/Makefile.in#4 integrate .. //depot/projects/dtrace/src/crypto/openssh/serverloop.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/session.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/sftp-client.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/sftp.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh-agent.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh-dss.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh-keygen.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh-keyscan.1#4 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh-keyscan.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh.1#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh_config#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/ssh_config.5#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/sshconnect.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/sshconnect1.c#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/sshd.c#6 integrate .. //depot/projects/dtrace/src/crypto/openssh/sshd_config#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/sshd_config.5#5 integrate .. //depot/projects/dtrace/src/crypto/openssh/version.h#5 integrate .. //depot/projects/dtrace/src/etc/mtree/BSD.local.dist#6 integrate .. //depot/projects/dtrace/src/etc/mtree/BSD.usr.dist#12 integrate .. //depot/projects/dtrace/src/etc/rc.d/ipfilter#4 integrate .. //depot/projects/dtrace/src/gnu/usr.bin/groff/tmac/mdoc.local#6 integrate .. //depot/projects/dtrace/src/include/Makefile#8 integrate .. //depot/projects/dtrace/src/include/ar.h#4 integrate .. //depot/projects/dtrace/src/lib/Makefile#10 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive.h.in#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_check_magic.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_entry.c#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_platform.h#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_private.h#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read.c#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_data_into_buffer.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_data_into_fd.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_extract.c#7 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_open_fd.c#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_open_file.c#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_compression_bzip2.c#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_compression_compress.c#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_compression_gzip.c#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_compression_none.c#6 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_cpio.c#5 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_iso9660.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_tar.c#7 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_read_support_format_zip.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_string.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_string.h#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_util.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write.c#7 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_open_fd.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_open_file.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_compression_bzip2.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_compression_gzip.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_compression_none.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_by_name.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_cpio.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_pax.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_shar.c#4 integrate .. //depot/projects/dtrace/src/lib/libarchive/archive_write_set_format_ustar.c#4 integrate .. //depot/projects/dtrace/src/lib/libc/arm/net/Makefile.inc#4 delete .. //depot/projects/dtrace/src/lib/libc/arm/sys/cerror.S#4 integrate .. //depot/projects/dtrace/src/lib/libc/arm/sys/ptrace.S#4 integrate .. //depot/projects/dtrace/src/lib/libc/sys/ptrace.2#4 integrate .. //depot/projects/dtrace/src/lib/libelf/Version.map#1 branch .. //depot/projects/dtrace/src/lib/libelf/elf_getarsym.c#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_cap.c#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_getcap.3#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_getsymshndx.3#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_move.c#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_shdr.c#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_syminfo.c#1 branch .. //depot/projects/dtrace/src/lib/libelf/gelf_symshndx.c#1 branch .. //depot/projects/dtrace/src/lib/libpam/modules/pam_exec/pam_exec.c#4 integrate .. //depot/projects/dtrace/src/lib/libthr/thread/thr_mutex.c#7 integrate .. //depot/projects/dtrace/src/release/Makefile#9 integrate .. //depot/projects/dtrace/src/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml#24 integrate .. //depot/projects/dtrace/src/release/scripts/package-split.py#6 integrate .. //depot/projects/dtrace/src/release/sun4v/boot_crunch.conf#1 branch .. //depot/projects/dtrace/src/sbin/ifconfig/ifbridge.c#5 integrate .. //depot/projects/dtrace/src/sbin/ifconfig/ifconfig.8#9 integrate .. //depot/projects/dtrace/src/sbin/mount/mount.c#9 integrate .. //depot/projects/dtrace/src/share/colldef/Makefile#5 integrate .. //depot/projects/dtrace/src/share/doc/IPv6/IMPLEMENTATION#4 integrate .. //depot/projects/dtrace/src/share/man/man4/Makefile#15 integrate .. //depot/projects/dtrace/src/share/man/man4/le.4#5 integrate .. //depot/projects/dtrace/src/share/man/man4/sem.4#4 integrate .. //depot/projects/dtrace/src/share/man/man4/snd_spicds.4#3 integrate .. //depot/projects/dtrace/src/share/man/man4/uark.4#1 branch .. //depot/projects/dtrace/src/share/man/man4/uhid.4#4 integrate .. //depot/projects/dtrace/src/share/man/man4/uhidev.4#4 delete .. //depot/projects/dtrace/src/share/man/man7/release.7#5 integrate .. //depot/projects/dtrace/src/share/man/man9/LOCK_PROFILING.9#1 branch .. //depot/projects/dtrace/src/share/man/man9/MUTEX_PROFILING.9#4 delete .. //depot/projects/dtrace/src/share/man/man9/Makefile#12 integrate .. //depot/projects/dtrace/src/share/man/man9/mutex.9#5 integrate .. //depot/projects/dtrace/src/share/man/man9/sleepqueue.9#4 integrate .. //depot/projects/dtrace/src/share/mklocale/Makefile#5 integrate .. //depot/projects/dtrace/src/share/monetdef/Makefile#5 integrate .. //depot/projects/dtrace/src/share/msgdef/Makefile#5 integrate .. //depot/projects/dtrace/src/share/numericdef/Makefile#5 integrate .. //depot/projects/dtrace/src/share/timedef/Makefile#5 integrate .. //depot/projects/dtrace/src/share/timedef/nn_NO.ISO8859-1.src#1 branch .. //depot/projects/dtrace/src/share/timedef/nn_NO.UTF-8.src#1 branch .. //depot/projects/dtrace/src/sys/Makefile#8 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/db_disasm.c#4 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/db_trace.c#6 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/local_apic.c#7 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/machdep.c#15 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/mptable_pci.c#4 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/msi.c#1 branch .. //depot/projects/dtrace/src/sys/amd64/amd64/nexus.c#6 integrate .. //depot/projects/dtrace/src/sys/amd64/amd64/pmap.c#17 integrate .. //depot/projects/dtrace/src/sys/amd64/include/apicvar.h#6 integrate .. //depot/projects/dtrace/src/sys/amd64/include/intr_machdep.h#5 integrate .. //depot/projects/dtrace/src/sys/amd64/include/pmap.h#7 integrate .. //depot/projects/dtrace/src/sys/amd64/include/reg.h#4 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_proto.h#12 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_syscall.h#12 integrate .. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_sysent.c#12 integrate .. //depot/projects/dtrace/src/sys/amd64/pci/pci_bus.c#4 integrate .. //depot/projects/dtrace/src/sys/arm/arm/pmap.c#15 integrate .. //depot/projects/dtrace/src/sys/arm/at91/kb920x_machdep.c#15 integrate .. //depot/projects/dtrace/src/sys/arm/include/pmap.h#9 integrate .. //depot/projects/dtrace/src/sys/arm/sa11x0/assabet_machdep.c#9 integrate .. //depot/projects/dtrace/src/sys/arm/xscale/i80321/ep80219_machdep.c#4 integrate .. //depot/projects/dtrace/src/sys/arm/xscale/i80321/iq31244_machdep.c#9 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/Makefile#3 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/Makefile.inc#5 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot0/Makefile#6 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot0/arm_init.s#3 delete .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot0iic/Makefile#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot0iic/main.c#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot0spi/Makefile#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot0spi/main.c#5 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot2/Makefile#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot2/board.h#1 branch .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot2/boot2.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/boot2/kb920x_board.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/bootiic/Makefile#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/bootiic/arm_init.S#4 delete .. //depot/projects/dtrace/src/sys/boot/arm/at91/bootspi/Makefile#5 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/bootspi/arm_init.S#4 delete .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/Makefile#6 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/arm_init.S#1 branch .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.c#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/at91rm9200_lowlevel.h#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/emac.c#6 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/emac.h#6 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/emac_init.c#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/mci_device.c#4 delete .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/mci_device.h#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/memcmp.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/memcpy.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/memset.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/sd-card.c#4 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/strcmp.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/strcpy.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/strcvt.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/arm/at91/libat91/strlen.c#2 integrate .. //depot/projects/dtrace/src/sys/boot/i386/loader/main.c#6 integrate .. //depot/projects/dtrace/src/sys/boot/pc98/btx/btx/btx.S#4 integrate .. //depot/projects/dtrace/src/sys/boot/pc98/libpc98/biossmap.c#1 branch .. //depot/projects/dtrace/src/sys/coda/coda_vnops.c#4 integrate .. //depot/projects/dtrace/src/sys/coda/coda_vnops.h#4 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_proto.h#14 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_syscall.h#14 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_syscalls.c#14 integrate .. //depot/projects/dtrace/src/sys/compat/freebsd32/freebsd32_sysent.c#14 integrate .. //depot/projects/dtrace/src/sys/compat/linux/linux_emul.c#6 integrate .. //depot/projects/dtrace/src/sys/compat/linux/linux_misc.c#13 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_proto.h#8 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_syscall.h#8 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_syscallnames.c#8 integrate .. //depot/projects/dtrace/src/sys/compat/svr4/svr4_sysent.c#8 integrate .. //depot/projects/dtrace/src/sys/conf/NOTES#25 integrate .. //depot/projects/dtrace/src/sys/conf/files#40 integrate .. //depot/projects/dtrace/src/sys/conf/files.amd64#14 integrate .. //depot/projects/dtrace/src/sys/conf/files.i386#18 integrate .. //depot/projects/dtrace/src/sys/conf/files.pc98#12 integrate .. //depot/projects/dtrace/src/sys/conf/files.sun4v#8 integrate .. //depot/projects/dtrace/src/sys/conf/options#25 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_pci_link.c#5 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_pcib_acpi.c#4 integrate .. //depot/projects/dtrace/src/sys/dev/acpica/acpi_pcib_pci.c#4 integrate .. //depot/projects/dtrace/src/sys/dev/bce/if_bce.c#13 integrate .. //depot/projects/dtrace/src/sys/dev/bce/if_bcereg.h#9 integrate .. //depot/projects/dtrace/src/sys/dev/em/if_em.c#12 integrate .. //depot/projects/dtrace/src/sys/dev/em/if_em.h#7 integrate .. //depot/projects/dtrace/src/sys/dev/fxp/if_fxp.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp.c#12 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp_freebsd.c#12 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp_freebsd.h#10 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp_library.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp_library.h#5 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp_pci.c#13 integrate .. //depot/projects/dtrace/src/sys/dev/isp/isp_stds.h#2 integrate .. //depot/projects/dtrace/src/sys/dev/isp/ispmbox.h#7 integrate .. //depot/projects/dtrace/src/sys/dev/isp/ispvar.h#7 integrate .. //depot/projects/dtrace/src/sys/dev/mfi/mfi.c#8 integrate .. //depot/projects/dtrace/src/sys/dev/mfi/mfi_ioctl.h#5 integrate .. //depot/projects/dtrace/src/sys/dev/mfi/mfi_linux.c#3 integrate .. //depot/projects/dtrace/src/sys/dev/mpt/mpt.c#14 integrate .. //depot/projects/dtrace/src/sys/dev/mpt/mpt.h#15 integrate .. //depot/projects/dtrace/src/sys/dev/mpt/mpt_cam.c#18 integrate .. //depot/projects/dtrace/src/sys/dev/mpt/mpt_pci.c#14 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pci.c#13 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pci_if.m#5 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pci_pci.c#7 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pci_private.h#6 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pcib_if.m#5 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pcib_private.h#4 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pcireg.h#5 integrate .. //depot/projects/dtrace/src/sys/dev/pci/pcivar.h#7 integrate .. //depot/projects/dtrace/src/sys/dev/syscons/syscons.c#9 integrate .. //depot/projects/dtrace/src/sys/dev/usb/uark.c#1 branch .. //depot/projects/dtrace/src/sys/dev/usb/usb_quirks.c#6 integrate .. //depot/projects/dtrace/src/sys/dev/usb/usbdevs#10 integrate .. //depot/projects/dtrace/src/sys/fs/nullfs/null_vnops.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/db_trace.c#6 integrate .. //depot/projects/dtrace/src/sys/i386/i386/local_apic.c#10 integrate .. //depot/projects/dtrace/src/sys/i386/i386/machdep.c#14 integrate .. //depot/projects/dtrace/src/sys/i386/i386/mptable_pci.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/i386/msi.c#1 branch .. //depot/projects/dtrace/src/sys/i386/i386/nexus.c#6 integrate .. //depot/projects/dtrace/src/sys/i386/i386/pmap.c#13 integrate .. //depot/projects/dtrace/src/sys/i386/ibcs2/ibcs2_proto.h#9 integrate .. //depot/projects/dtrace/src/sys/i386/ibcs2/ibcs2_xenix.h#7 integrate .. //depot/projects/dtrace/src/sys/i386/include/apicvar.h#7 integrate .. //depot/projects/dtrace/src/sys/i386/include/intr_machdep.h#5 integrate .. //depot/projects/dtrace/src/sys/i386/include/pmap.h#7 integrate .. //depot/projects/dtrace/src/sys/i386/include/reg.h#4 integrate .. //depot/projects/dtrace/src/sys/i386/linux/linux_proto.h#14 integrate .. //depot/projects/dtrace/src/sys/i386/pci/pci_bus.c#4 integrate .. //depot/projects/dtrace/src/sys/i386/pci/pci_pir.c#4 integrate .. //depot/projects/dtrace/src/sys/ia64/ia64/pmap.c#8 integrate .. //depot/projects/dtrace/src/sys/ia64/include/pmap.h#5 integrate .. //depot/projects/dtrace/src/sys/kern/Make.tags.inc#4 integrate .. //depot/projects/dtrace/src/sys/kern/init_main.c#10 integrate .. //depot/projects/dtrace/src/sys/kern/init_sysent.c#16 integrate .. //depot/projects/dtrace/src/sys/kern/kern_condvar.c#4 integrate .. //depot/projects/dtrace/src/sys/kern/kern_idle.c#6 integrate .. //depot/projects/dtrace/src/sys/kern/kern_lock.c#7 integrate .. //depot/projects/dtrace/src/sys/kern/kern_mutex.c#10 integrate .. //depot/projects/dtrace/src/sys/kern/kern_rwlock.c#6 integrate .. //depot/projects/dtrace/src/sys/kern/kern_sig.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/kern_sx.c#6 integrate .. //depot/projects/dtrace/src/sys/kern/kern_synch.c#12 integrate .. //depot/projects/dtrace/src/sys/kern/kern_thr.c#15 integrate .. //depot/projects/dtrace/src/sys/kern/kern_time.c#9 integrate .. //depot/projects/dtrace/src/sys/kern/ksched.c#1 branch .. //depot/projects/dtrace/src/sys/kern/makesyscalls.sh#8 integrate .. //depot/projects/dtrace/src/sys/kern/p1003_1b.c#1 branch .. //depot/projects/dtrace/src/sys/kern/posix4_mib.c#1 branch .. //depot/projects/dtrace/src/sys/kern/sched_4bsd.c#17 integrate .. //depot/projects/dtrace/src/sys/kern/subr_lock.c#4 integrate .. //depot/projects/dtrace/src/sys/kern/subr_sleepqueue.c#6 integrate .. //depot/projects/dtrace/src/sys/kern/subr_witness.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/syscalls.c#15 integrate .. //depot/projects/dtrace/src/sys/kern/systrace_args.c#11 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_mqueue.c#7 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_sem.c#7 integrate .. //depot/projects/dtrace/src/sys/kern/uipc_syscalls.c#16 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_aio.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_default.c#5 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_subr.c#19 integrate .. //depot/projects/dtrace/src/sys/kern/vfs_vnops.c#8 integrate .. //depot/projects/dtrace/src/sys/kern/vnode_if.src#5 integrate .. //depot/projects/dtrace/src/sys/modules/Makefile#18 integrate .. //depot/projects/dtrace/src/sys/modules/acpi/Makefile#6 integrate .. //depot/projects/dtrace/src/sys/modules/if_ppp/Makefile#5 integrate .. //depot/projects/dtrace/src/sys/modules/uark/Makefile#1 branch .. //depot/projects/dtrace/src/sys/net/bridgestp.c#10 integrate .. //depot/projects/dtrace/src/sys/net/bridgestp.h#5 integrate .. //depot/projects/dtrace/src/sys/net/if_bridge.c#18 integrate .. //depot/projects/dtrace/src/sys/net/if_bridgevar.h#7 integrate .. //depot/projects/dtrace/src/sys/net/if_ppp.c#7 integrate .. //depot/projects/dtrace/src/sys/net/if_pppvar.h#4 integrate .. //depot/projects/dtrace/src/sys/netinet/ip_fw2.c#15 integrate .. //depot/projects/dtrace/src/sys/netinet/sctp_constants.h#2 integrate .. //depot/projects/dtrace/src/sys/netinet/sctp_indata.c#4 integrate .. //depot/projects/dtrace/src/sys/netinet/sctp_input.c#5 integrate .. //depot/projects/dtrace/src/sys/netinet/sctp_output.c#4 integrate .. //depot/projects/dtrace/src/sys/netinet/sctp_uio.h#4 integrate .. //depot/projects/dtrace/src/sys/netinet/sctp_usrreq.c#5 integrate .. //depot/projects/dtrace/src/sys/netinet/sctputil.c#5 integrate .. //depot/projects/dtrace/src/sys/netinet/sctputil.h#3 integrate .. //depot/projects/dtrace/src/sys/nfsclient/nfs_node.c#6 integrate .. //depot/projects/dtrace/src/sys/nfsclient/nfs_vnops.c#8 integrate .. //depot/projects/dtrace/src/sys/pc98/pc98/machdep.c#12 integrate .. //depot/projects/dtrace/src/sys/posix4/_semaphore.h#4 delete .. //depot/projects/dtrace/src/sys/posix4/ksched.c#10 delete .. //depot/projects/dtrace/src/sys/posix4/ksem.h#4 delete .. //depot/projects/dtrace/src/sys/posix4/p1003_1b.c#8 delete .. //depot/projects/dtrace/src/sys/posix4/posix4.h#5 delete .. //depot/projects/dtrace/src/sys/posix4/posix4_mib.c#4 delete .. //depot/projects/dtrace/src/sys/posix4/sched.h#4 delete .. //depot/projects/dtrace/src/sys/posix4/semaphore.h#4 delete .. //depot/projects/dtrace/src/sys/powerpc/powerpc/mmu_oea.c#7 integrate .. //depot/projects/dtrace/src/sys/powerpc/powerpc/pmap_dispatch.c#6 integrate .. //depot/projects/dtrace/src/sys/security/mac/mac_posix_sem.c#6 integrate .. //depot/projects/dtrace/src/sys/security/mac_biba/mac_biba.c#7 integrate .. //depot/projects/dtrace/src/sys/security/mac_mls/mac_mls.c#6 integrate .. //depot/projects/dtrace/src/sys/security/mac_stub/mac_stub.c#5 integrate .. //depot/projects/dtrace/src/sys/security/mac_test/mac_test.c#4 integrate .. //depot/projects/dtrace/src/sys/sparc64/sparc64/pmap.c#9 integrate .. //depot/projects/dtrace/src/sys/sun4v/conf/GENERIC#13 integrate .. //depot/projects/dtrace/src/sys/sun4v/include/asmacros.h#5 integrate .. //depot/projects/dtrace/src/sys/sun4v/include/cpufunc.h#5 integrate .. //depot/projects/dtrace/src/sys/sun4v/include/pmap.h#5 integrate .. //depot/projects/dtrace/src/sys/sun4v/include/tte_hash.h#6 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/exception.S#8 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/interrupt.S#10 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#18 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/rtc.c#5 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/trap.c#14 integrate .. //depot/projects/dtrace/src/sys/sun4v/sun4v/tte_hash.c#6 integrate .. //depot/projects/dtrace/src/sys/sys/_lock.h#4 integrate .. //depot/projects/dtrace/src/sys/sys/_mutex.h#4 integrate .. //depot/projects/dtrace/src/sys/sys/_semaphore.h#1 branch .. //depot/projects/dtrace/src/sys/sys/elf_common.h#8 integrate .. //depot/projects/dtrace/src/sys/sys/ksem.h#1 branch .. //depot/projects/dtrace/src/sys/sys/lock.h#5 integrate .. //depot/projects/dtrace/src/sys/sys/lock_profile.h#1 branch .. //depot/projects/dtrace/src/sys/sys/lockmgr.h#6 integrate .. //depot/projects/dtrace/src/sys/sys/mbuf.h#8 integrate .. //depot/projects/dtrace/src/sys/sys/mutex.h#6 integrate .. //depot/projects/dtrace/src/sys/sys/param.h#14 integrate .. //depot/projects/dtrace/src/sys/sys/posix4.h#1 branch .. //depot/projects/dtrace/src/sys/sys/proc.h#17 integrate .. //depot/projects/dtrace/src/sys/sys/sched.h#9 integrate .. //depot/projects/dtrace/src/sys/sys/semaphore.h#1 branch .. //depot/projects/dtrace/src/sys/sys/sleepqueue.h#4 integrate .. //depot/projects/dtrace/src/sys/sys/syscall.h#15 integrate .. //depot/projects/dtrace/src/sys/sys/syscall.mk#15 integrate .. //depot/projects/dtrace/src/sys/sys/sysproto.h#15 integrate .. //depot/projects/dtrace/src/sys/sys/thr.h#7 integrate .. //depot/projects/dtrace/src/sys/sys/umtx.h#7 integrate .. //depot/projects/dtrace/src/sys/sys/vnode.h#6 integrate .. //depot/projects/dtrace/src/sys/ufs/ffs/ffs_vnops.c#8 integrate .. //depot/projects/dtrace/src/sys/vm/vm_fault.c#9 integrate .. //depot/projects/dtrace/src/sys/vm/vm_kern.c#5 integrate .. //depot/projects/dtrace/src/tools/regression/file/dup/Makefile#1 branch .. //depot/projects/dtrace/src/tools/regression/file/dup/dup.c#1 branch .. //depot/projects/dtrace/src/tools/regression/file/dup/dup.t#1 branch .. //depot/projects/dtrace/src/tools/regression/sockets/unix_sendtorace/Makefile#1 branch .. //depot/projects/dtrace/src/tools/regression/sockets/unix_sendtorace/unix_sendtorace.c#1 branch .. //depot/projects/dtrace/src/tools/regression/sysvmsg/msgtest.c#4 integrate .. //depot/projects/dtrace/src/tools/tools/nanobsd/FlashDevice.sub#6 integrate .. //depot/projects/dtrace/src/tools/tools/pirtool/pirtable.h#4 integrate .. //depot/projects/dtrace/src/tools/tools/pirtool/pirtool.c#4 integrate .. //depot/projects/dtrace/src/usr.bin/fetch/fetch.c#4 integrate .. //depot/projects/dtrace/src/usr.bin/netstat/if.c#5 integrate .. //depot/projects/dtrace/src/usr.bin/sockstat/sockstat.1#4 integrate .. //depot/projects/dtrace/src/usr.bin/sockstat/sockstat.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/Makefile#14 integrate .. //depot/projects/dtrace/src/usr.sbin/bluetooth/rfcomm_pppd/rfcomm_pppd.8#4 integrate .. //depot/projects/dtrace/src/usr.sbin/bsnmpd/bsnmpd/Makefile#6 integrate .. //depot/projects/dtrace/src/usr.sbin/ipfwpcap/ipfwpcap.8#4 integrate .. //depot/projects/dtrace/src/usr.sbin/kbdcontrol/kbdcontrol.1#5 integrate .. //depot/projects/dtrace/src/usr.sbin/kbdcontrol/kbdcontrol.c#5 integrate .. //depot/projects/dtrace/src/usr.sbin/pccard/dumpcis/dumpcis.8#2 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/Makefile#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/eui64.c#1 branch .. //depot/projects/dtrace/src/usr.sbin/pppd/eui64.h#1 branch .. //depot/projects/dtrace/src/usr.sbin/pppd/ipv6cp.c#1 branch .. //depot/projects/dtrace/src/usr.sbin/pppd/ipv6cp.h#1 branch .. //depot/projects/dtrace/src/usr.sbin/pppd/main.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/options.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/pathnames.h#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/pppd.8#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/pppd.h#4 integrate .. //depot/projects/dtrace/src/usr.sbin/pppd/sys-bsd.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/route6d/route6d.c#4 integrate .. //depot/projects/dtrace/src/usr.sbin/sysinstall/config.c#5 integrate .. //depot/projects/dtrace/src/usr.sbin/sysinstall/install.c#8 integrate .. //depot/projects/dtrace/src/usr.sbin/sysinstall/installUpgrade.c#6 integrate .. //depot/projects/dtrace/www/de/about.sgml#5 integrate .. //depot/projects/dtrace/www/de/platforms/Makefile#3 integrate .. //depot/projects/dtrace/www/de/platforms/index.sgml#5 integrate .. //depot/projects/dtrace/www/de/platforms/sun4v.sgml#1 branch .. //depot/projects/dtrace/www/de/platforms/xbox.sgml#1 branch .. //depot/projects/dtrace/www/de/share/sgml/news.xml#6 integrate .. //depot/projects/dtrace/www/en/cgi/getmsg.cgi#3 integrate .. //depot/projects/dtrace/www/en/developers.sgml#13 integrate .. //depot/projects/dtrace/www/en/donations/donors.sgml#19 integrate .. //depot/projects/dtrace/www/en/donations/wantlist.sgml#16 integrate .. //depot/projects/dtrace/www/en/platforms/Makefile#3 integrate .. //depot/projects/dtrace/www/en/platforms/index.sgml#5 integrate .. //depot/projects/dtrace/www/en/platforms/sun4v.sgml#1 branch .. //depot/projects/dtrace/www/en/ports/Makefile.inc#3 integrate .. //depot/projects/dtrace/www/en/ports/references.sgml#4 integrate .. //depot/projects/dtrace/www/en/projects/c99/index.sgml#6 integrate .. //depot/projects/dtrace/www/en/releases/6.1R/errata.html#10 integrate .. //depot/projects/dtrace/www/en/releases/6.2R/approvals.sgml#5 integrate .. //depot/projects/dtrace/www/en/releases/6.2R/schedule.sgml#10 integrate .. //depot/projects/dtrace/www/en/releases/6.2R/todo.sgml#6 integrate .. //depot/projects/dtrace/www/en/releng/index.sgml#16 integrate .. //depot/projects/dtrace/www/share/sgml/commercial.consult.xml#5 integrate .. //depot/projects/dtrace/www/share/sgml/events.xml#6 integrate .. //depot/projects/dtrace/www/share/sgml/news.xml#11 integrate .. //depot/projects/dtrace/www/share/sgml/press.xml#9 integrate .. //depot/projects/dtrace/www/zh_CN/releases/6.1R/errata.html#5 integrate Differences ... ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/contributors/contrib.additional.sgml#35 (text+ko) ==== @@ -1,4 +1,4 @@ - + + Hat currently held by: - John Polstra jdp@FreeBSD.org. + The CVSup-master team cvsup-master@FreeBSD.org. ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/audit/chapter.sgml#8 (text+ko) ==== @@ -1,6 +1,6 @@ @@ -559,7 +559,7 @@ Securing User Accounts User accounts are usually the most difficult to secure. While - you can impose Draconian access restrictions on your staff and + you can impose draconian access restrictions on your staff and star out their passwords, you may not be able to do so with any general user accounts you might have. If you do have sufficient control, then you may win out and be able to secure @@ -568,13 +568,13 @@ ssh and Kerberos for user accounts is more problematic, due to the extra administration and technical support required, but still a very good solution compared to a - crypted password file. + encrypted password file. Securing the Password File - The only sure fire way is to * out as many + The only sure fire way is to star out as many passwords as you can and use ssh or Kerberos for access to those accounts. Even though the encrypted password file (/etc/spwd.db) can only be read @@ -631,7 +631,7 @@ schg flag for every system file and directory under the sun. Another possibility is to simply mount / and /usr read-only. - It should be noted that being too Draconian in what you attempt to + It should be noted that being too draconian in what you attempt to protect may prevent the all-important detection of an intrusion. @@ -650,12 +650,11 @@ The last layer of your security onion is perhaps the most important — detection. The rest of your security is pretty much useless (or, worse, presents you with a false sense of - safety) if you cannot detect potential incursions. Half the job + security) if you cannot detect potential intrusions. Half the job of the onion is to slow down the attacker, rather than stop him, in - order to give the detection side of the equation a chance to catch - him in the act. + order to be able to catch him in the act. - The best way to detect an incursion is to look for modified, + The best way to detect an intrusion is to look for modified, missing, or unexpected files. The best way to look for modified files is from another (often centralized) limited-access system. Writing your security scripts on the extra-secure limited-access @@ -678,7 +677,7 @@ the audit-trail tracks that ssh lays. - Once you give a limited-access box, at least read access to the + Once you have given a limited-access box at least read access to the client systems it is supposed to monitor, you must write scripts to do the actual monitoring. Given an NFS mount, you can write scripts out of simple system utilities such as &man.find.1; and @@ -707,7 +706,7 @@ A good security script will also check for changes to user and staff members access configuration files: .rhosts, .shosts, - .ssh/authorized_keys and so forth… + .ssh/authorized_keys and so forth, files that might fall outside the purview of the MD5 check. @@ -718,24 +717,23 @@ nosuid options (see &man.mount.8;) are what you want to look into. You should probably scan them anyway, at least once a week, since the object of this layer is to detect a break-in - whether or not the break-in is effective. + attempt, whether or not the attempt succeeds. Process accounting (see &man.accton.8;) is a relatively low-overhead feature of the operating system which might help as a post-break-in evaluation mechanism. It is especially useful in tracking down how an intruder has actually broken into - a system, assuming the file is still intact after the break-in - occurs. + a system, assuming the file is still intact after the break-in has + occured. Finally, security scripts should process the log files, and the logs themselves should be generated in as secure a manner as possible — remote syslog can be very useful. An intruder - tries to cover his tracks, and log files are critical to the + will try to cover his tracks, and log files are critical to the sysadmin trying to track down the time and method of the initial break-in. One way to keep a permanent record of the log files is to run the system console to a serial port and collect the - information on a continuing basis through a secure machine - monitoring the consoles. + information to a secure machine monitoring the consoles. @@ -759,7 +757,7 @@ is typically a packet attack. While there is not much you can do about modern spoofed packet attacks that saturate your network, you can generally limit the damage by ensuring that the attacks - cannot take down your servers. + cannot take down your servers by: @@ -772,13 +770,14 @@ - Kernel Route Cache. + Overloading the Kernel Route Cache. - A common DoS attack is against a forking server that attempts - to cause the server to eat processes, file descriptors, and memory, - until the machine dies. inetd + A common DoS attack scenario is attacking a forking server and + making it spawning so many child processes that the host system + eventually runs out of memory, file descriptors, etc. and then + grinds to a halt. inetd (see &man.inetd.8;) has several options to limit this sort of attack. It should be noted that while it is possible to prevent a machine from going down, it is @@ -857,7 +856,7 @@ The attacker spoofs ping packets sent to your LAN's broadcast address with the source IP address set to the actual machine they wish to attack. If your border routers are not configured to - stomp on ping's to broadcast addresses, your LAN winds up + stomp on ping packets to broadcast addresses, your LAN winds up generating sufficient responses to the spoofed source address to saturate the victim, especially when the attacker uses the same trick on several dozen broadcast addresses over several dozen @@ -868,7 +867,7 @@ attacker can saturate a server's incoming network and cause the server to saturate its outgoing network with ICMP responses. This type of attack can also crash the server by running it out of - mbuf's, especially if the server cannot drain the ICMP responses + memory, especially if the server cannot drain the ICMP responses it generates fast enough. Use the sysctl variable net.inet.icmp.icmplim to limit these attacks. @@ -927,7 +926,7 @@ There are a few issues with both Kerberos and ssh that need to be addressed if - you intend to use them. Kerberos V is an excellent + you intend to use them. Kerberos 5 is an excellent authentication protocol, but there are bugs in the kerberized telnet and rlogin applications that make them @@ -936,7 +935,7 @@ option. ssh encrypts everything by default. - ssh works quite well in every + Ssh works quite well in every respect except that it forwards encryption keys by default. What this means is that if you have a secure workstation holding keys that give you access to the rest of the system, and you @@ -950,10 +949,10 @@ We recommend that you use ssh in combination with Kerberos whenever possible for staff logins. - ssh can be compiled with Kerberos + Ssh can be compiled with Kerberos support. This reduces your reliance on potentially exposed ssh keys while at the same time - protecting passwords via Kerberos. ssh + protecting passwords via Kerberos. Ssh keys should only be used for automated tasks from secure machines (something that Kerberos is unsuited to do). We also recommend that you either turn off key-forwarding in the ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml#6 (text+ko) ==== @@ -1,7 +1,7 @@ @@ -532,7 +532,7 @@ &prompt.root; cp xorg.conf.new /etc/X11/xorg.conf The X11 configuration process is now - complete. The &xorg; may be now + complete. &xorg; may be now started with the &man.startx.1; utility. The X11 server may also be started with the use of &man.xdm.1;. ==== //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#32 (text+ko) ==== @@ -1,7 +1,7 @@ - Using wxWidgets + Using <application>wxWidgets</application> + + This section describes the status of the + wxWidgets libraries in the ports tree and + its integration with the ports system. + + + Introduction + + There are many versions of the + wxWidgets libraries which conflict + between them (install files under the same name). In the ports tree + this problem has been solved by installing each version under a + different name using version number suffixes. + + The obvious disadvantage of this is that each application has to + be modified to find the expected version. Fortunately, most of the + applications call the wx-config script to + determine the necessary compiler and linker flags. The script is + named differently for every available version. Majority of + applications respect an environment variable, or accept a configure + argument, to specify which wx-config script to + call. Otherwise they have to be patched. + + + + Version selection + + To make your port use a specific version of + wxWidgets there are two variables + available for defining (if only one is defined the other will be set + to a default value): + + + Variables to select <application>wxWidgets</application> + versions + + + + + Variable + + Description + + Default value + + + + + + USE_WX + + List of versions the port can use + + All available versions + + + + USE_WX_NOT + + List of versions the port can not use + + None + + + +
+ + The following is a list of available + wxWidgets versions and the corresponding + ports in the tree: + + + Available <application>wxWidgets</application> + versions + + + + + Version + + Port + + + + + + 2.4 + + x11-toolkits/wxgtk24 + + + + 2.6 + + x11-toolkits/wxgtk26 + + + +
+ + + The 2.6 version also comes in Unicode + version and is installed by the slave port x11-toolkits/wxgtk26-unicode, but this + can be handled with variables (see ). + + + The variables in can be set + to one or more of the following combinations separated by + spaces: + + + <application>wxWidgets</application> version + specifications + + + + + Description + + Example + + + + + + Single version + + 2.4 + + + + Ascending range + + 2.4+ + + + + Descending range + + 2.6- + + + + Full range (must be ascending) + + 2.4-2.6 + + + +
+ + There are also some variables to select the preferred versions + from the available ones. They can be set to a list of versions, the + first ones will have higher priority. + + + Variables to select preferred + <application>wxWidgets</application> versions + + + + + Name + + Designed for + + + + + + WANT_WX_VER + + the port + + + + WITH_WX_VER + + the user + + + +
+ + + Component selection + + There are other applications that, while not being + wxWidgets libraries, are related to them. + These applications can be specified in the + WX_COMPS variable. The following components are + available: + + + Available <application>wxWidgets</application> + components + + + + + Name + + Description + + Version restriction + + >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Nov 17 16:27:01 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9592316A415; Fri, 17 Nov 2006 16:27:01 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68CF316A4F3 for ; Fri, 17 Nov 2006 16:27:01 +0000 (UTC) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2A23443D73 for ; Fri, 17 Nov 2006 16:26:52 +0000 (GMT) (envelope-from bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHGQnDd071890 for ; Fri, 17 Nov 2006 16:26:49 GMT (envelope-from bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHGQnL1071886 for perforce@freebsd.org; Fri, 17 Nov 2006 16:26:49 GMT (envelope-from bushman@freebsd.org) Date: Fri, 17 Nov 2006 16:26:49 GMT Message-Id: <200611171626.kAHGQnL1071886@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bushman@freebsd.org using -f From: Michael Bushkov To: Perforce Change Reviews Cc: Subject: PERFORCE change 110158 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 16:27:02 -0000 http://perforce.freebsd.org/chv.cgi?CH=110158 Change 110158 by bushman@bushman_nss_ldap_cached on 2006/11/17 16:26:28 + commong_agent and multipart_agent structures were merged into one agent structure + each agent now supports check_changes_func, which checks if something has changed and cache should be flushed + support for check_changes_func was added to all implemented agents, to query.c, mp_ws_query.c and mp_rs_query.c * TODO: "check-files" configurations' file directive now should be connected with new functionality Affected files ... .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/Makefile#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.h#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/hosts.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/hosts.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/net.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/net.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/passwd.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/passwd.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/proto.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/proto.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/rpc.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/rpc.h#5 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/services.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/services.h#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#11 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cacheutil.c#1 add .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cacheutil.h#1 add .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#7 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_rs_query.c#8 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/mp_ws_query.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/parser.c#6 edit .. //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/query.c#9 edit Differences ... ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/Makefile#5 (text) ==== @@ -5,9 +5,9 @@ MAN=cached.conf.5 cached.8 WARNS?=2 -SRCS= agent.c cached.c cachedcli.c cachelib.c cacheplcs.c debug.c log.c \ - config.c query.c mp_ws_query.c mp_rs_query.c singletons.c protocol.c \ - parser.c +SRCS= agent.c cached.c cachedcli.c cachelib.c cacheplcs.c cacheutil.c \ + debug.c log.c config.c query.c mp_ws_query.c mp_rs_query.c \ + singletons.c protocol.c parser.c CFLAGS+= -DCONFIG_PATH="\"${PREFIX}/etc/cached.conf\"" DPADD+=${LIBM} ${LIBPTHREAD} ${LIBUTIL} LDADD+=${LIBM} ${LIBPTHREAD} ${LIBUTIL} ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.c#7 (text) ==== @@ -46,25 +46,19 @@ { NULL, NULL, NULL } }; +struct standard_agent_file_check_mdata +{ + time_t nsswitch_conf_mtime; + time_t custom_file_mtime1; + time_t custom_file_mtime2; +}; static int agent_cmp_func(const void *a1, const void *a2) { - struct agent const *ap1 = *((struct agent const **)a1); - struct agent const *ap2 = *((struct agent const **)a2); - int res; - res = strcmp(ap1->name, ap2->name); - if (res == 0) { - if (ap1->type == ap2->type) - res = 0; - else if (ap1->type < ap2->type) - res = -1; - else - res = 1; - } - - return (res); + return (strcmp((*((struct agent const **)a1))->name, + (*((struct agent const **)a2))->name)); } int @@ -207,14 +201,14 @@ } struct agent * -find_agent(struct agent_table *at, const char *name, enum agent_type type) +find_agent(struct agent_table *at, const char *name) { struct agent **res; struct agent model, *model_p; TRACE_IN(find_agent); + memset(&model, 0, sizeof(struct agent)); model.name = (char *)name; - model.type = type; model_p = &model; res = bsearch(&model_p, at->agents, at->agents_num, sizeof(struct agent *), agent_cmp_func); @@ -241,8 +235,28 @@ } int +agent_check_changes(struct configuration_entry *config_entry, + struct agent *agent_) +{ + int retval; + + TRACE_IN(agent_check_changes); + if ((agent_ == NULL) || (agent_->check_changes_func == NULL)) { + TRACE_OUT(agent_check_changes); + return (0); + } + + configuration_lock_entry(config_entry, CELT_CHANGES_MDATA); + retval = agent_->check_changes_func(&config_entry->changes_mdata); + configuration_unlock_entry(config_entry, CELT_CHANGES_MDATA); + TRACE_OUT(agent_check_changes); + + return (retval); +} + +int agent_precache_results(struct configuration_entry *config_entry, - struct multipart_agent *mp_agent) + struct agent *mp_agent) { cache_mp_write_session ws; char *buffer, *keybuf, *dec_name, *en_bkp; @@ -356,3 +370,64 @@ TRACE_OUT(agent_precache_results); return (NS_SUCCESS); } + +extern int +standard_agent_file_check(char const *fname1, char const *fname2, void *md) +{ + struct standard_agent_file_check_mdata **mdata; + struct stat stat_; + time_t time1, time2, time3; + int rv; + + mdata = (struct standard_agent_file_check_mdata **)md; + if (*mdata == NULL) { + *mdata = malloc(sizeof(struct standard_agent_file_check_mdata)); + /* + * If we can't allocate memory let's just say that nothing + * changed. + */ + if (*mdata == NULL) + return (0); + memset(*mdata, 0, + sizeof(struct standard_agent_file_check_mdata)); + + stat(_PATH_NS_CONF, &stat_); + (*mdata)->nsswitch_conf_mtime = stat_.st_mtime; + + if (fname1 != NULL) { + stat(fname1, &stat_); + (*mdata)->custom_file_mtime1 = stat_.st_mtime; + } + + if (fname2 != NULL) { + stat(fname2, &stat_); + (*mdata)->custom_file_mtime2 = stat_.st_mtime; + } + + return (0); + } else { + rv = stat(_PATH_NS_CONF, &stat_); + time1 = (rv == 0) ? stat_.st_mtime : 0; + + if (fname1 != NULL) { + rv = stat(fname1, &stat_); + time2 = (rv == 0) ? stat_.st_mtime : 0; + } + + if (fname2 != NULL) { + rv = stat(fname2, &stat_); + time3 = (rv == 0) ? stat_.st_mtime : 0; + } + + rv = (time1 != (*mdata)->nsswitch_conf_mtime) || + ((fname1 != NULL) && (time2 != + (*mdata)->custom_file_mtime1)) || + ((fname2 != NULL) && (time3 != + (*mdata)->custom_file_mtime2)); + (*mdata)->nsswitch_conf_mtime = time1; + (*mdata)->custom_file_mtime1 = time2; + (*mdata)->custom_file_mtime2 = time2; + + return (rv); + } +} ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agent.h#7 (text) ==== @@ -126,11 +126,6 @@ * All agents are stored in the agents table, which is the singleton. */ -enum agent_type { - COMMON_AGENT = 0, - MULTIPART_AGENT = 1 -}; - typedef int (*agent_marshal_func)(char *, size_t *, void *, va_list, void *); typedef int (*agent_id_func)(char *, size_t *, va_list, void *); typedef int (*agent_lookup_func)(const char *, size_t, char **, size_t *); @@ -138,20 +133,13 @@ typedef int (*agent_mp_lookup_func)(char **, size_t *, void *, void *); typedef int (*agent_mp_keygen_func)(char **, size_t *, void *, void *); typedef void (*agent_mp_destroy_func)(void *); +typedef int (*agent_check_changes_func)(void *); struct agent { - char *name; - enum agent_type type; -}; + char *name; -struct common_agent { - struct agent parent; + agent_check_changes_func check_changes_func; agent_lookup_func lookup_func; -}; - -struct multipart_agent { - struct agent parent; - agent_mp_init_func mp_init_func; agent_mp_lookup_func mp_lookup_func; agent_mp_keygen_func mp_keygen_func; @@ -171,11 +159,14 @@ void *, ...); extern struct agent_table *init_agent_table(); extern int register_agent(struct agent_table *, struct agent *); -extern struct agent *find_agent(struct agent_table *, const char *, - enum agent_type); +extern struct agent *find_agent(struct agent_table *, const char *); extern void destroy_agent_table(struct agent_table *); +extern int agent_check_changes(struct configuration_entry *, + struct agent *); extern int agent_precache_results(struct configuration_entry *, - struct multipart_agent *); + struct agent *); + +extern int standard_agent_file_check(char const *, char const *, void *); #endif ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.c#8 (text) ==== @@ -58,6 +58,7 @@ { NULL, 0 } }; +static int group_check_changes_func(void *); static int group_id_func(char *, size_t *, va_list, void *); static int group_marshal_func(char *, size_t *, void *, va_list, void *); static int group_lookup_func(const char *, size_t, char **, size_t *); @@ -77,6 +78,13 @@ #endif static int +group_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check(_PATH_GROUP, NULL, mdata)); +} + +static int group_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { char *name; @@ -436,55 +444,30 @@ struct agent * init_group_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_group_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_group_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("group"); - if (retval->parent.name == NULL) { + retval->name = strdup("group"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_group_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = group_check_changes_func; retval->lookup_func = group_lookup_func; - - TRACE_OUT(init_group_agent); - return ((struct agent *)retval); -} - -struct agent * -init_group_mp_agent() -{ - struct multipart_agent *retval; - - TRACE_IN(init_group_mp_agent); - retval = malloc(sizeof(struct multipart_agent)); - if (retval == NULL) { - TRACE_OUT(init_group_mp_agent); - return (NULL); - } - memset(retval, 0, sizeof(struct multipart_agent)); - - retval->parent.name = strdup("group"); - if (retval->parent.name == NULL) { - free(retval); - TRACE_OUT(init_group_mp_agent); - return (NULL); - } - retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = group_mp_init_func; retval->mp_lookup_func = group_mp_lookup_func; retval->mp_keygen_func = group_mp_keygen_func; retval->mp_destroy_func = group_mp_destroy_func; - TRACE_OUT(init_group_mp_agent); - return ((struct agent *)retval); + TRACE_OUT(init_group_agent); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/group.h#6 (text) ==== @@ -27,4 +27,3 @@ */ extern struct agent *init_group_agent(); -extern struct agent *init_group_mp_agent(); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/hosts.c#6 (text+ko) ==== @@ -60,6 +60,7 @@ { NULL, 0 } }; +static int hosts_check_changes_func(void *); static int hostent_marshal_func(char *, size_t *, void *, va_list, void *); static int addrinfo_marshal_func(char *, size_t *, void *, va_list, void *); static int hosts_lookup_func(const char *, size_t, char **, size_t *); @@ -78,6 +79,13 @@ #define GETHOSTBY_OP_ID 1 static int +hosts_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check(_PATH_HOSTS, NULL, mdata)); +} + +static int hostent_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { @@ -447,26 +455,26 @@ struct agent * init_hosts_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_hosts_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_hosts_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("hosts"); - if (retval->parent.name == NULL) { + retval->name = strdup("hosts"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_hosts_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = hosts_check_changes_func; retval->lookup_func = hosts_lookup_func; TRACE_OUT(init_hosts_agent); - return ((struct agent *)retval); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/hosts.h#5 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/net.c#6 (text+ko) ==== @@ -59,6 +59,7 @@ { 0 } }; +static int networks_check_changes_func(void *); static int networks_marshal_func(char *, size_t *, void *, va_list, void *); static int networks_lookup_func(const char *, size_t, char **, size_t *); @@ -73,6 +74,13 @@ #endif static int +networks_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check(_PATH_NETWORKS, NULL, mdata)); +} + +static int networks_marshal_func(char *buffer, size_t *buffer_size, void *retval, va_list ap, void *cache_mdata) { @@ -278,26 +286,26 @@ struct agent * init_networks_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_networks_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_networks_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("networks"); - if (retval->parent.name == NULL) { + retval->name = strdup("networks"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_networks_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = networks_check_changes_func; retval->lookup_func = networks_lookup_func; TRACE_OUT(init_networks_agent); - return ((struct agent *)retval); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/net.h#5 (text+ko) ==== ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/passwd.c#7 (text) ==== @@ -56,6 +56,7 @@ { NULL, 0 } }; +static int passwd_check_changes_func(void *); static int passwd_id_func(char *, size_t *, va_list, void *); static int passwd_marshal_func(char *, size_t *, void *, va_list, void *); static int passwd_lookup_func(const char *, size_t, char **, size_t *); @@ -67,6 +68,13 @@ AGENT_DECLARE_BUFFER_TLS_HANDLING(passwd); static int +passwd_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check(_PATH_SMP_DB, _PATH_MP_DB, mdata)); +} + +static int passwd_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { char *name; @@ -432,55 +440,30 @@ struct agent * init_passwd_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_passwd_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_passwd_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("passwd"); - if (retval->parent.name == NULL) { + retval->name = strdup("passwd"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_passwd_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = passwd_check_changes_func; retval->lookup_func = passwd_lookup_func; - - TRACE_OUT(init_passwd_agent); - return ((struct agent *)retval); -} - -struct agent * -init_passwd_mp_agent() -{ - struct multipart_agent *retval; - - TRACE_IN(init_passwd_mp_agent); - retval = malloc(sizeof(struct multipart_agent)); - if (retval == NULL) { - TRACE_OUT(init_passwd_mp_agent); - return (NULL); - } - memset(retval, 0, sizeof(struct multipart_agent)); - - retval->parent.name = strdup("passwd"); - if (retval->parent.name == NULL) { - free(retval); - TRACE_OUT(init_passwd_mp_agent); - return (NULL); - } - retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = passwd_mp_init_func; retval->mp_lookup_func = passwd_mp_lookup_func; retval->mp_keygen_func = passwd_mp_keygen_func; retval->mp_destroy_func = passwd_mp_destroy_func; - TRACE_OUT(init_passwd_mp_agent); - return ((struct agent *)retval); + TRACE_OUT(init_passwd_agent); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/passwd.h#6 (text) ==== @@ -27,4 +27,3 @@ */ extern struct agent *init_passwd_agent(); -extern struct agent *init_passwd_mp_agent(); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/proto.c#6 (text+ko) ==== @@ -64,6 +64,7 @@ { NULL, 0 } }; +static int protocols_check_changes_func(void *); static int protocols_id_func(char *, size_t *, va_list, void *); static int protocols_marshal_func(char *, size_t *, void *, va_list, void *); static int protocols_lookup_func(const char *, size_t, char **, size_t *); @@ -83,6 +84,13 @@ #endif static int +protocols_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check(_PATH_PROTOCOLS, NULL, mdata)); +} + +static int protocols_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { @@ -455,55 +463,30 @@ struct agent * init_protocols_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_protocols_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_protocols_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("protocols"); - if (retval->parent.name == NULL) { + retval->name = strdup("protocols"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_protocols_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = protocols_check_changes_func; retval->lookup_func = protocols_lookup_func; - - TRACE_OUT(init_protocols_agent); - return ((struct agent *)retval); -} - -struct agent * -init_protocols_mp_agent() -{ - struct multipart_agent *retval; - - TRACE_IN(init_protocols_mp_agent); - retval = malloc(sizeof(struct multipart_agent)); - if (retval == NULL) { - TRACE_OUT(init_protocols_mp_agent); - return (NULL); - } - memset(retval, 0, sizeof(struct multipart_agent)); - - retval->parent.name = strdup("protocols"); - if (retval->parent.name == NULL) { - free(retval); - TRACE_OUT(init_protocols_mp_agent); - return (NULL); - } - retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = protocols_mp_init_func; retval->mp_lookup_func = protocols_mp_lookup_func; retval->mp_keygen_func = protocols_mp_keygen_func; retval->mp_destroy_func = protocols_mp_destroy_func; - TRACE_OUT(init_protocols_mp_agent); - return ((struct agent *)retval); + TRACE_OUT(init_protocols_agent); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/proto.h#5 (text+ko) ==== @@ -27,4 +27,3 @@ */ extern struct agent *init_protocols_agent(); -extern struct agent *init_protocols_mp_agent(); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/rpc.c#6 (text+ko) ==== @@ -68,6 +68,7 @@ { NULL, 0 } }; +static int rpc_check_changes_func(void *); static int rpc_id_func(char *, size_t *, va_list, void *); static int rpc_marshal_func(char *, size_t *, void *, va_list, void *); static int rpc_lookup_func(const char *, size_t, char **, size_t *); @@ -78,6 +79,13 @@ AGENT_DECLARE_BUFFER_TLS_HANDLING(rpcent); +static int +rpc_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check("/etc/rpc", NULL, mdata)); +} + static int rpc_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { @@ -449,55 +457,30 @@ struct agent * init_rpc_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_rpc_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_rpc_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("rpc"); - if (retval->parent.name == NULL) { + retval->name = strdup("rpc"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_rpc_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = rpc_check_changes_func; retval->lookup_func = rpc_lookup_func; - - TRACE_OUT(init_rpc_agent); - return ((struct agent *)retval); -} - -struct agent * -init_rpc_mp_agent() -{ - struct multipart_agent *retval; - - TRACE_IN(init_rpc_mp_agent); - retval = malloc(sizeof(struct multipart_agent)); - if (retval == NULL) { - TRACE_OUT(init_rpc_mp_agent); - return (NULL); - } - memset(retval, 0, sizeof(struct multipart_agent)); - - retval->parent.name = strdup("rpc"); - if (retval->parent.name == NULL) { - free(retval); - TRACE_OUT(init_rpc_mp_agent); - return (NULL); - } - retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = rpc_mp_init_func; retval->mp_lookup_func = rpc_mp_lookup_func; retval->mp_keygen_func = rpc_mp_keygen_func; retval->mp_destroy_func = rpc_mp_destroy_func; - TRACE_OUT(init_rpc_mp_agent); - return ((struct agent *)retval); + TRACE_OUT(init_rpc_agent); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/rpc.h#5 (text+ko) ==== @@ -27,4 +27,3 @@ */ extern struct agent *init_rpc_agent(); -extern struct agent *init_rpc_mp_agent(); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/services.c#7 (text) ==== @@ -64,6 +64,7 @@ { NULL, 0 } }; +static int services_check_changes_func(void *); static int services_id_func(char *, size_t *, va_list, void *); static int services_marshal_func(char *, size_t *, void *, va_list, void *); static int services_lookup_func(const char *, size_t, char **, size_t *); @@ -75,6 +76,13 @@ AGENT_DECLARE_BUFFER_TLS_HANDLING(servent); static int +services_check_changes_func(void *mdata) +{ + + return (standard_agent_file_check(_PATH_SERVICES, NULL, mdata)); +} + +static int services_id_func(char *buffer, size_t *buffer_size, va_list ap, void *cache_mdata) { @@ -529,55 +537,30 @@ struct agent * init_services_agent() { - struct common_agent *retval; + struct agent *retval; TRACE_IN(init_services_agent); - retval = malloc(sizeof(struct common_agent)); + retval = malloc(sizeof(struct agent)); if (retval == NULL) { TRACE_OUT(init_services_agent); return (NULL); } - memset(retval, 0, sizeof(struct common_agent)); + memset(retval, 0, sizeof(struct agent)); - retval->parent.name = strdup("services"); - if (retval->parent.name == NULL) { + retval->name = strdup("services"); + if (retval->name == NULL) { free(retval); TRACE_OUT(init_services_agent); return (NULL); } - retval->parent.type = COMMON_AGENT; + retval->check_changes_func = services_check_changes_func; retval->lookup_func = services_lookup_func; - - TRACE_OUT(init_services_agent); - return ((struct agent *)retval); -} - -struct agent * -init_services_mp_agent() -{ - struct multipart_agent *retval; - - TRACE_IN(init_services_mp_agent); - retval = malloc(sizeof(struct multipart_agent)); - if (retval == NULL) { - TRACE_OUT(init_services_mp_agent); - return (NULL); - } - memset(retval, 0, sizeof(struct multipart_agent)); - - retval->parent.name = strdup("services"); - if (retval->parent.name == NULL) { - free(retval); - TRACE_OUT(init_services_mp_agent); - return (NULL); - } - retval->parent.type = MULTIPART_AGENT; retval->mp_init_func = services_mp_init_func; retval->mp_lookup_func = services_mp_lookup_func; retval->mp_keygen_func = services_mp_keygen_func; retval->mp_destroy_func = services_mp_destroy_func; - TRACE_OUT(init_services_mp_agent); - return ((struct agent *)retval); + TRACE_OUT(init_services_agent); + return (retval); } ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/agents/services.h#6 (text) ==== @@ -27,4 +27,3 @@ */ extern struct agent *init_services_agent(); -extern struct agent *init_services_mp_agent(); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/cached.c#11 (text) ==== @@ -299,7 +299,7 @@ static void precache_entries(struct configuration *config) { - struct multipart_agent *mp_agent; + struct agent *mp_agent; struct configuration_entry *entry; size_t entries_size, i; int res; @@ -309,8 +309,7 @@ for (i = 0; i < entries_size; ++i) { entry = configuration_get_entry(config, i); if (entry->flags & CONFIG_ENTRY_PRECACHING_ENABLED_FLAG) { - mp_agent = (struct multipart_agent *)find_agent( - s_agent_table, entry->name, MULTIPART_AGENT); + mp_agent = find_agent(s_agent_table, entry->name); if (mp_agent == NULL) { LOG_ERR_1("precache_entries", @@ -909,17 +908,12 @@ } res = register_agent(s_agent_table, init_passwd_agent()); - res |= register_agent(s_agent_table, init_passwd_mp_agent()); res |= register_agent(s_agent_table, init_group_agent()); - res |= register_agent(s_agent_table, init_group_mp_agent()); res |= register_agent(s_agent_table, init_hosts_agent()); res |= register_agent(s_agent_table, init_networks_agent()); res |= register_agent(s_agent_table, init_services_agent()); - res |= register_agent(s_agent_table, init_services_mp_agent()); res |= register_agent(s_agent_table, init_protocols_agent()); - res |= register_agent(s_agent_table, init_protocols_mp_agent()); res |= register_agent(s_agent_table, init_rpc_agent()); - res |= register_agent(s_agent_table, init_rpc_mp_agent()); if (res != 0) { LOG_ERR_1("main", "request agetns registration failed: " "not enough memory"); ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.c#7 (text) ==== @@ -179,6 +179,18 @@ TRACE_OUT(create_configuration_entry); return (NULL); } + + res = pthread_mutex_init(&retval->changes_mdata_lock, NULL); + if (res != 0) { + pthread_mutex_destroy(&retval->positive_cache_lock); + pthread_mutex_destroy(&retval->negative_cache_lock); + pthread_mutex_destroy(&retval->mp_cache_lock); + free(retval); + LOG_ERR_2("create_configuration_entry", + "can't create changes mdata lock"); + TRACE_OUT(create_configuration_entry); + return (NULL); + } memcpy(&retval->positive_cache_params, positive_params, sizeof(struct common_cache_entry_params)); @@ -276,11 +288,13 @@ pthread_mutex_destroy(&entry->positive_cache_lock); pthread_mutex_destroy(&entry->negative_cache_lock); pthread_mutex_destroy(&entry->mp_cache_lock); + pthread_mutex_destroy(&entry->changes_mdata_lock); free(entry->name); free(entry->positive_cache_params.entry_name); free(entry->negative_cache_params.entry_name); free(entry->mp_cache_params.entry_name); free(entry->mp_cache_entries); + free(entry->changes_mdata); free(entry); TRACE_OUT(destroy_configuration_entry); } @@ -515,6 +529,8 @@ case CELT_MULTIPART: pthread_mutex_lock(&entry->mp_cache_lock); break; + case CELT_CHANGES_MDATA: + pthread_mutex_lock(&entry->changes_mdata_lock); default: /* should be unreachable */ break; @@ -539,6 +555,9 @@ case CELT_MULTIPART: pthread_mutex_unlock(&entry->mp_cache_lock); break; + case CELT_CHANGES_MDATA: + pthread_mutex_unlock(&entry->changes_mdata_lock); + break; default: /* should be unreachable */ break; ==== //depot/projects/soc2006/nss_ldap_cached/src/usr.sbin/cached/config.h#7 (text) ==== @@ -76,6 +76,9 @@ struct common_cache_entry_params negative_cache_params; struct mp_cache_entry_params mp_cache_params; + struct timeval common_query_timeout; + struct timeval mp_query_timeout; + /* * configuration_entry holds pointers for all actual cache_entries, * which are used for it. There is one for positive caching, one for @@ -88,13 +91,14 @@ cache_entry *mp_cache_entries; size_t mp_cache_entries_size; - struct timeval common_query_timeout; - struct timeval mp_query_timeout; - char *name; pthread_mutex_t positive_cache_lock; pthread_mutex_t negative_cache_lock; pthread_mutex_t mp_cache_lock; + pthread_mutex_t changes_mdata_lock; + + struct agent *query_agent; + void *changes_mdata; int flags; }; @@ -122,7 +126,8 @@ enum config_entry_lock_type { >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Nov 17 18:23:48 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9924716A412; Fri, 17 Nov 2006 18:23:48 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6F83F16A403 for ; Fri, 17 Nov 2006 18:23:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3682F43D53 for ; Fri, 17 Nov 2006 18:23:48 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHINmij023620 for ; Fri, 17 Nov 2006 18:23:48 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHINlWI023615 for perforce@freebsd.org; Fri, 17 Nov 2006 18:23:47 GMT (envelope-from jhb@freebsd.org) Date: Fri, 17 Nov 2006 18:23:47 GMT Message-Id: <200611171823.kAHINlWI023615@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 110164 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 18:23:48 -0000 http://perforce.freebsd.org/chv.cgi?CH=110164 Change 110164 by jhb@jhb_mutex on 2006/11/17 18:23:25 IFC @110160. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/db_trace.c#22 integrate .. //depot/projects/smpng/sys/arm/arm/nexus.c#9 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/ep80219_machdep.c#3 integrate .. //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_machdep.c#22 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot0/Makefile#4 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot0/arm_init.s#2 delete .. //depot/projects/smpng/sys/boot/arm/at91/boot0iic/Makefile#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot0iic/main.c#4 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot0spi/Makefile#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot0spi/main.c#4 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot2/Makefile#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/boot2/boot2.c#3 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/Makefile#4 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootiic/arm_init.S#3 delete .. //depot/projects/smpng/sys/boot/arm/at91/bootspi/Makefile#5 integrate .. //depot/projects/smpng/sys/boot/arm/at91/bootspi/arm_init.S#3 delete .. //depot/projects/smpng/sys/boot/arm/at91/libat91/arm_init.S#1 branch .. //depot/projects/smpng/sys/boot/arm/at91/libat91/mci_device.c#3 delete .. //depot/projects/smpng/sys/boot/i386/loader/main.c#15 integrate .. //depot/projects/smpng/sys/dev/ata/ata-all.c#85 integrate .. //depot/projects/smpng/sys/dev/bce/if_bce.c#9 integrate .. //depot/projects/smpng/sys/dev/bce/if_bcereg.h#5 integrate .. //depot/projects/smpng/sys/dev/isp/isp.c#47 integrate .. //depot/projects/smpng/sys/dev/isp/isp_library.c#7 integrate .. //depot/projects/smpng/sys/dev/isp/ispmbox.h#23 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt.c#20 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_cam.c#16 integrate .. //depot/projects/smpng/sys/dev/mpt/mpt_pci.c#26 integrate .. //depot/projects/smpng/sys/dev/pci/pci.c#77 integrate .. //depot/projects/smpng/sys/dev/syscons/syscons.c#58 integrate .. //depot/projects/smpng/sys/fs/procfs/procfs_ioctl.c#15 integrate .. //depot/projects/smpng/sys/i386/i386/db_trace.c#34 integrate .. //depot/projects/smpng/sys/i386/i386/intr_machdep.c#21 integrate .. //depot/projects/smpng/sys/i386/i386/io_apic.c#20 integrate .. //depot/projects/smpng/sys/i386/i386/pmap.c#110 integrate .. //depot/projects/smpng/sys/kern/kern_condvar.c#43 integrate .. //depot/projects/smpng/sys/kern/kern_synch.c#107 integrate .. //depot/projects/smpng/sys/kern/subr_sleepqueue.c#28 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_node.c#25 integrate .. //depot/projects/smpng/sys/nfsclient/nfs_vnops.c#63 integrate .. //depot/projects/smpng/sys/sun4v/include/tte_hash.h#3 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/pmap.c#5 integrate .. //depot/projects/smpng/sys/sun4v/sun4v/tte_hash.c#3 integrate .. //depot/projects/smpng/sys/sys/sleepqueue.h#8 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/db_trace.c#22 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.77 2006/11/15 19:53:47 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.78 2006/11/17 16:37:35 jhb Exp $"); #include #include @@ -200,7 +200,7 @@ static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t); static void decode_syscall(int, struct thread *); -static char * watchtype_str(int type); +static const char * watchtype_str(int type); int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, int access, struct dbreg *d); int amd64_clr_watch(int watchnum, struct dbreg *d); @@ -648,8 +648,8 @@ db_expr_t addr; db_expr_t size; { + struct dbreg d; int i; - struct dbreg d; fill_dbregs(NULL, &d); @@ -668,8 +668,7 @@ } -static -char * +static const char * watchtype_str(type) int type; { ==== //depot/projects/smpng/sys/arm/arm/nexus.c#9 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.9 2006/10/25 21:11:46 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.10 2006/11/17 11:56:56 cognet Exp $"); #include #include @@ -142,7 +142,7 @@ int i; for (i = rman_get_start(r); i <= rman_get_end(r); i++) - arm_mask_irq(rman_get_start(r)); + arm_mask_irq(i); error = arm_remove_irqhandler(ih); return (error); } ==== //depot/projects/smpng/sys/arm/xscale/i80321/ep80219_machdep.c#3 (text+ko) ==== @@ -49,7 +49,7 @@ #include "opt_ddb.h" #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.3 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.4 2006/11/17 00:53:39 kevlo Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -474,7 +474,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = 0xa0000000 + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); ==== //depot/projects/smpng/sys/arm/xscale/i80321/iq31244_machdep.c#22 (text+ko) ==== @@ -49,7 +49,7 @@ #include "opt_ddb.h" #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.24 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.25 2006/11/17 00:53:39 kevlo Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -477,7 +477,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = 0xa0000000 + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); ==== //depot/projects/smpng/sys/boot/arm/at91/boot0/Makefile#4 (text) ==== @@ -1,11 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.4 2006/08/18 20:26:54 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0/Makefile,v 1.5 2006/11/16 00:53:27 imp Exp $ + +.PATH: ${.CURDIR}/../libat91 P=boot0 FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/smpng/sys/boot/arm/at91/boot0iic/Makefile#3 (text) ==== @@ -1,12 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.2 2006/08/16 23:14:52 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0iic/Makefile,v 1.3 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../boot0 +.PATH: ${.CURDIR}/../libat91 P=boot0iic FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include + +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/smpng/sys/boot/arm/at91/boot0iic/main.c#4 (text) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.3 2006/11/09 19:55:25 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0iic/main.c,v 1.4 2006/11/16 00:49:50 imp Exp $ */ #include "at91rm9200.h" @@ -32,12 +32,19 @@ main(void) { char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ + int len, sec; - while (xmodem_rx(addr) == -1) + printf("\nSend data to be written into EEPROM\n"); + while ((len = xmodem_rx(addr)) == -1) + continue; + sec = GetSeconds() + 1; + while (sec >= GetSeconds()) continue; + printf("\nWriting EEPROM from 0x%x to addr 0, 0x%x bytes\n", addr, + len); InitEEPROM(); - printf("Writing EEPROM from 0x%x to addr 0\n", addr); - WriteEEPROM(0, addr, 8192); - printf("Write complete. Press reset\n"); + printf("init done\n"); + WriteEEPROM(0, addr, len); + printf("\nWrote %d bytes. Press reset\n", len); return (1); } ==== //depot/projects/smpng/sys/boot/arm/at91/boot0spi/Makefile#3 (text) ==== @@ -1,13 +1,14 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.2 2006/08/16 23:18:07 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot0spi/Makefile,v 1.3 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../boot0 +.PATH: ${.CURDIR}/../libat91 P=boot0spi FILES=${P} -SRCS=arm_init.s main.c +SRCS=arm_init.S main.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include +CFLAGS+=-DBOOT_BOOT0 ==== //depot/projects/smpng/sys/boot/arm/at91/boot0spi/main.c#4 (text) ==== @@ -21,7 +21,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.3 2006/10/21 22:43:07 imp Exp $ + * $FreeBSD: src/sys/boot/arm/at91/boot0spi/main.c,v 1.4 2006/11/16 00:48:53 imp Exp $ */ #include "at91rm9200.h" @@ -29,21 +29,23 @@ #include "at91rm9200_lowlevel.h" #include "spi_flash.h" -#define OFFSET 0 +#define LOADER_OFFSET 0 +#define FPGA_OFFSET (15 * FLASH_PAGE_SIZE) +#define OFFSET LOADER_OFFSET int main(void) { int len, i, j, off; - char *addr = (char *)SDRAM_BASE + (1 << 20); /* Load to base + 1MB */ - char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* Load to base + 2MB */ - char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* Load to base + 2MB */ + char *addr = (char *)SDRAM_BASE + (1 << 20); /* download at + 1MB */ + char *addr2 = (char *)SDRAM_BASE + (2 << 20); /* readback to + 2MB */ + char *addr3 = (char *)SDRAM_BASE + (3 << 20); /* extra copy at + 3MB */ SPI_InitFlash(); printf("Waiting for data\n"); while ((len = xmodem_rx(addr)) == -1) continue; - printf("\nDownloaded %u bytes.\n", len); + // Need extra copy at addr3 memcpy(addr3, addr, (len + FLASH_PAGE_SIZE - 1) / FLASH_PAGE_SIZE * FLASH_PAGE_SIZE); printf("Writing %u bytes to flash at %u\n", len, OFFSET); for (i = 0; i < len; i+= FLASH_PAGE_SIZE) { @@ -57,5 +59,6 @@ if (j >= 10) printf("Bad Readback at %u\n", i); } + printf("Done\n"); return (1); } ==== //depot/projects/smpng/sys/boot/arm/at91/boot2/Makefile#3 (text+ko) ==== @@ -1,19 +1,16 @@ -# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.2 2006/11/09 20:07:26 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/boot2/Makefile,v 1.3 2006/11/16 00:48:04 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 ${.CURDIR}/../bootspi P=boot2 FILES=${P} -SRCS=arm_init.S boot2.c ${BOOT_FLAVOR}_board.c +SRCS=arm_init.S boot2.c ${BOOT_FLAVOR:L}_board.c NO_MAN= LDFLAGS=-e 0 -T ${.CURDIR}/../linker.cfg OBJS+= ${SRCS:N*.h:R:S/$/.o/g} .include -.if ${BOOT_FLAVOR} == "tsc" -SRCS+=ee.c -.endif .if ${BOOT_FLAVOR} == "kb920x" CFLAGS+=-DBOOT_IIC .endif ==== //depot/projects/smpng/sys/boot/arm/at91/boot2/boot2.c#3 (text+ko) ==== @@ -14,7 +14,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.2 2006/11/09 20:07:26 imp Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/arm/at91/boot2/boot2.c,v 1.3 2006/11/16 00:47:31 imp Exp $"); #include #include @@ -29,7 +29,6 @@ #include "emac.h" #include "lib.h" #include "sd-card.h" -#include "ee.h" #include "board.h" #define RBX_ASKNAME 0x0 /* -a */ ==== //depot/projects/smpng/sys/boot/arm/at91/bootiic/Makefile#4 (text) ==== @@ -1,6 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.4 2006/11/09 20:23:51 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootiic/Makefile,v 1.5 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 P=bootiic FILES=${P} @@ -11,4 +11,4 @@ .include -CFLAGS += -DBOOT_IIC +CFLAGS += -DBOOT_IIC -DBOOT_COMMANDS ==== //depot/projects/smpng/sys/boot/arm/at91/bootspi/Makefile#5 (text) ==== @@ -1,6 +1,6 @@ -# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.5 2006/11/09 20:45:22 imp Exp $ +# $FreeBSD: src/sys/boot/arm/at91/bootspi/Makefile,v 1.6 2006/11/16 00:53:27 imp Exp $ -.PATH: ${.CURDIR}/../libat91 +.PATH: ${.CURDIR}/../libat91 P=bootspi FILES=${P} @@ -14,3 +14,4 @@ .if ${MK_FPGA} == "yes" CFLAGS += -DTSC_FPGA .endif +CFLAGS += -DBOOT_COMMANDS ==== //depot/projects/smpng/sys/boot/i386/loader/main.c#15 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.38 2006/11/02 01:23:18 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/boot/i386/loader/main.c,v 1.39 2006/11/16 13:32:30 ru Exp $"); /* * MD bootstrap main() and assorted miscellaneous @@ -191,7 +191,7 @@ extract_currdev(void) { struct i386_devdesc new_currdev; - int major, biosdev = -1; + int biosdev = -1; /* Assume we are booting from a BIOS disk by default */ new_currdev.d_dev = &biosdisk; @@ -222,7 +222,6 @@ B_CONTROLLER(initial_bootdev) - 1; new_currdev.d_kind.biosdisk.partition = B_PARTITION(initial_bootdev); biosdev = initial_bootinfo->bi_bios_dev; - major = B_TYPE(initial_bootdev); /* * If we are booted by an old bootstrap, we have to guess at the BIOS ==== //depot/projects/smpng/sys/dev/ata/ata-all.c#85 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.274 2006/09/11 18:33:59 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.275 2006/11/17 11:13:47 sos Exp $"); #include "opt_ata.h" #include @@ -601,12 +601,12 @@ isprint(atadev->param.model[1]))) { struct ata_params *atacap = &atadev->param; char buffer[64]; -#if BYTE_ORDER == BIG_ENDIAN +#ifndef __ARMEB__ int16_t *ptr; for (ptr = (int16_t *)atacap; ptr < (int16_t *)atacap + sizeof(struct ata_params)/2; ptr++) { - *ptr = bswap16(*ptr); + *ptr = le16toh(*ptr); } #endif if (!(!strncmp(atacap->model, "FX", 2) || ==== //depot/projects/smpng/sys/dev/bce/if_bce.c#9 (text) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.19 2006/11/15 20:04:56 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/bce/if_bce.c,v 1.21 2006/11/16 06:28:54 scottl Exp $"); /* * The following controllers are supported by this driver: @@ -4261,7 +4261,7 @@ if (sc->tx_mbuf_ptr[sw_tx_chain_cons] != NULL) { /* Validate that this is the last tx_bd. */ - DBRUNIF((!(txbd->tx_bd_vlan_tag_flags & TX_BD_FLAGS_END)), + DBRUNIF((!(txbd->tx_bd_flags & TX_BD_FLAGS_END)), BCE_PRINTF(sc, "%s(%d): tx_bd END flag not set but " "txmbuf == NULL!\n", __FILE__, __LINE__); bce_breakpoint(sc)); @@ -4529,9 +4529,9 @@ bus_dmamap_t map; struct tx_bd *txbd = NULL; struct mbuf *m0; - u32 vlan_tag_flags = 0; + u16 vlan_tag = 0, flags = 0; + u16 chain_prod, prod; u32 prod_bseq; - u16 chain_prod, prod; #ifdef BCE_DEBUG u16 debug_prod; @@ -4542,15 +4542,16 @@ m0 = *m_head; if (m0->m_pkthdr.csum_flags) { if (m0->m_pkthdr.csum_flags & CSUM_IP) - vlan_tag_flags |= TX_BD_FLAGS_IP_CKSUM; + flags |= TX_BD_FLAGS_IP_CKSUM; if (m0->m_pkthdr.csum_flags & (CSUM_TCP | CSUM_UDP)) - vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; + flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; } /* Transfer any VLAN tags to the bd. */ - if (m0->m_flags & M_VLANTAG) - vlan_tag_flags |= (TX_BD_FLAGS_VLAN_TAG | - (m0->m_pkthdr.ether_vtag << 16)); + if (m0->m_flags & M_VLANTAG) { + flags |= TX_BD_FLAGS_VLAN_TAG; + vlan_tag = m0->m_pkthdr.ether_vtag; + } /* Map the mbuf into DMAable memory. */ prod = sc->tx_prod; @@ -4634,15 +4635,16 @@ txbd->tx_bd_haddr_lo = htole32(BCE_ADDR_LO(segs[i].ds_addr)); txbd->tx_bd_haddr_hi = htole32(BCE_ADDR_HI(segs[i].ds_addr)); txbd->tx_bd_mss_nbytes = htole16(segs[i].ds_len); - txbd->tx_bd_vlan_tag_flags = htole16(vlan_tag_flags); + txbd->tx_bd_vlan_tag = htole16(vlan_tag); + txbd->tx_bd_flags = htole16(flags); prod_bseq += segs[i].ds_len; if (i == 0) - txbd->tx_bd_vlan_tag_flags |=htole16(TX_BD_FLAGS_START); + txbd->tx_bd_flags |= htole16(TX_BD_FLAGS_START); prod = NEXT_TX_BD(prod); } /* Set the END flag on the last TX buffer descriptor. */ - txbd->tx_bd_vlan_tag_flags |= htole16(TX_BD_FLAGS_END); + txbd->tx_bd_flags |= htole16(TX_BD_FLAGS_END); DBRUN(BCE_INFO_SEND, bce_dump_tx_chain(sc, debug_prod, nseg)); @@ -4652,17 +4654,14 @@ __FUNCTION__, prod, chain_prod, prod_bseq); /* - * Ensure that the map for this transmission + * Ensure that the mbuf pointer for this transmission * is placed at the array index of the last * descriptor in this chain. This is done * because a single map is used for all * segments of the mbuf and we don't want to - * delete the map before all of the segments + * unload the map before all of the segments * have been freed. */ - sc->tx_mbuf_map[TX_CHAIN_IDX(sc->tx_prod)] = - sc->tx_mbuf_map[chain_prod]; - sc->tx_mbuf_map[chain_prod] = map; sc->tx_mbuf_ptr[chain_prod] = m0; sc->used_tx_bd += nsegs; @@ -4673,7 +4672,7 @@ DBRUN(BCE_VERBOSE_SEND, bce_dump_tx_mbuf_chain(sc, chain_prod, nsegs)); - /* prod still points the last used tx_bd at this point. */ + /* prod points to the next free tx_bd at this point. */ sc->tx_prod = prod; sc->tx_prod_bseq = prod_bseq; @@ -4711,8 +4710,11 @@ "tx_prod_bseq = 0x%08X\n", __FUNCTION__, tx_prod, tx_chain_prod, sc->tx_prod_bseq); - /* Keep adding entries while there is space in the ring. */ - while (sc->tx_mbuf_ptr[tx_chain_prod] == NULL) { + /* + * Keep adding entries while there is space in the ring. We keep + * BCE_TX_SLACK_SPACE entries unused at all times. + */ + while (sc->used_tx_bd < USABLE_TX_BD - BCE_TX_SLACK_SPACE) { /* Check for any frames to send. */ IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head); @@ -6161,9 +6163,10 @@ else /* Normal tx_bd entry. */ BCE_PRINTF(sc, "tx_bd[0x%04X]: haddr = 0x%08X:%08X, nbytes = 0x%08X, " - "flags = 0x%08X\n", idx, + "vlan tag= 0x%4X, "flags = 0x%04X\n", idx, txbd->tx_bd_haddr_hi, txbd->tx_bd_haddr_lo, - txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag_flags); + txbd->tx_bd_mss_nbytes, txbd->tx_bd_vlan_tag, + txbd->tx_bd_flags); } ==== //depot/projects/smpng/sys/dev/bce/if_bcereg.h#5 (text) ==== @@ -26,7 +26,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.9 2006/10/24 08:24:31 scottl Exp $ + * $FreeBSD: src/sys/dev/bce/if_bcereg.h,v 1.10 2006/11/16 06:28:54 scottl Exp $ */ #ifndef _BCE_H_DEFINED @@ -737,7 +737,8 @@ u32 tx_bd_haddr_hi; u32 tx_bd_haddr_lo; u32 tx_bd_mss_nbytes; - u32 tx_bd_vlan_tag_flags; + u16 tx_bd_flags; + u16 tx_bd_vlan_tag; #define TX_BD_FLAGS_CONN_FAULT (1<<0) #define TX_BD_FLAGS_TCP_UDP_CKSUM (1<<1) #define TX_BD_FLAGS_IP_CKSUM (1<<2) ==== //depot/projects/smpng/sys/dev/isp/isp.c#47 (text+ko) ==== @@ -26,8 +26,9 @@ /* * Machine and OS Independent (well, as best as possible) - * code for the Qlogic ISP SCSI adapters. + * code for the Qlogic ISP SCSI and FC-SCSI adapters. */ + /* * Inspiration and ideas about this driver are from Erik Moe's Linux driver * (qlogicisp.c) and Dave Miller's SBus version of same (qlogicisp.c). Some @@ -42,7 +43,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.129 2006/11/14 08:45:47 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp.c,v 1.131 2006/11/16 00:39:56 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ @@ -2231,9 +2232,8 @@ } mbs.param[2] = portid >> 16; mbs.param[3] = portid; - mbs.logval = MBLOGNONE; - mbs.timeout = 250000; + mbs.timeout = 500000; isp_mboxcmd(isp, &mbs); switch (mbs.param[0]) { @@ -2286,6 +2286,7 @@ mbs.param[1] = handle << 8; } mbs.logval = MBLOGNONE; + mbs.timeout = 100000; isp_mboxcmd(isp, &mbs); } @@ -2314,6 +2315,7 @@ mbs.param[3] = DMA_WD0(fcp->isp_scdma); mbs.param[6] = DMA_WD3(fcp->isp_scdma); mbs.param[7] = DMA_WD2(fcp->isp_scdma); + mbs.timeout = 250000; mbs.logval = MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR; if (dolock) { FC_SCRATCH_ACQUIRE(isp); @@ -2368,7 +2370,6 @@ } } mbs.logval = MBLOGALL & ~MBOX_COMMAND_PARAM_ERROR; - mbs.timeout = 30000; isp_mboxcmd(isp, &mbs); if (mbs.param[0] != MBOX_COMMAND_COMPLETE) { return (wwn); @@ -2928,7 +2929,13 @@ * which shift on a loop. */ if (tmp.node_wwn == 0 || tmp.port_wwn == 0 || tmp.portid == 0) { - isp_prt(isp, ISP_LOGWARN, "bad pdb @ loop %d", handle); + int a, b, c; + a = (tmp.node_wwn == 0); + b = (tmp.port_wwn == 0); + c = (tmp.portid == 0); + isp_prt(isp, ISP_LOGWARN, + "bad pdb (%1d%1d%1d) @ handle 0x%x", a, b, c, + handle); isp_dump_portdb(isp); continue; } @@ -2996,7 +3003,7 @@ * decide what to do. */ isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x changed", + "Loop Port 0x%02x@0x%x changed", tmp.portid, tmp.handle); lp->state = FC_PORTDB_STATE_CHANGED; lp->new_portid = tmp.portid; @@ -3035,7 +3042,7 @@ lp->port_wwn = tmp.port_wwn; lp->node_wwn = tmp.node_wwn; isp_prt(isp, ISP_LOGSANCFG, - "Loop Port 0x%06x@0x%x is New Entry", + "Loop Port 0x%02x@0x%x is New Entry", tmp.portid, tmp.handle); } fcp->isp_loopstate = LOOP_LSCAN_DONE; @@ -4855,7 +4862,8 @@ switch (etype) { case RQSTYPE_RESPONSE: XS_SET_STATE_STAT(isp, xs, sp); - if (resp) { + if (resp && rlen >= 4 && + resp[FCP_RSPNS_CODE_OFFSET] != 0) { isp_prt(isp, ISP_LOGWARN, "%d.%d FCP RESPONSE: 0x%x", XS_TGT(xs), XS_LUN(xs), @@ -6796,7 +6804,6 @@ MEMZERO(&mbs, sizeof (mbs)); mbs.param[0] = MBOX_GET_FW_STATE; mbs.logval = MBLOGALL; - mbs.timeout = 100000; isp_mboxcmd(isp, &mbs); if (mbs.param[0] == MBOX_COMMAND_COMPLETE) { fcp->isp_fwstate = mbs.param[1]; ==== //depot/projects/smpng/sys/dev/isp/isp_library.c#7 (text) ==== @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2006 by Matthew Jacob + * Copyright (c) 2006 by Matthew Jacob * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -32,7 +32,7 @@ #endif #ifdef __FreeBSD__ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.7 2006/11/14 08:45:48 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_library.c,v 1.9 2006/11/16 00:39:56 mjacob Exp $"); #include #endif #ifdef __OpenBSD__ @@ -268,9 +268,9 @@ } else { SNPRINTF(mb, sizeof (mb), "---"); } - isp_prt(isp, ISP_LOGALL, "%d: %s al%d tgt %s %s 0x%06x =>%s" - " 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, - dbs[lp->state], lp->autologin, mb, + isp_prt(isp, ISP_LOGALL, "%d: hdl 0x%x %s al%d tgt %s %s " + "0x%06x =>%s 0x%06x; WWNN 0x%08x%08x WWPN 0x%08x%08x", i, + lp->handle, dbs[lp->state], lp->autologin, mb, roles[lp->roles], lp->portid, roles[lp->new_roles], lp->new_portid, (uint32_t) (lp->node_wwn >> 32), ==== //depot/projects/smpng/sys/dev/isp/ispmbox.h#23 (text+ko) ==== @@ -1,4 +1,4 @@ -/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.53 2006/11/02 03:21:31 mjacob Exp $ */ +/* $FreeBSD: src/sys/dev/isp/ispmbox.h,v 1.54 2006/11/16 00:39:56 mjacob Exp $ */ /*- * Mailbox and Queue Entry Definitions for for Qlogic ISP SCSI adapters. * @@ -1347,4 +1347,30 @@ #define els_recv_dsd_a4732 inout.out._els_recv_dsd_a4732 #define els_recv_dsd_a6348 inout.out._els_recv_dsd_a6348 } els_t; + +/* + * A handy package structure for running FC-SCSI commands via RUN IOCB A64. + */ +typedef struct { + uint16_t handle; + uint16_t lun; + uint32_t portid; + uint32_t timeout; + union { + struct { + uint32_t data_length; + uint8_t do_read; + uint8_t pad[3]; + uint8_t cdb[16]; + void *data_ptr; + } beg; + struct { + uint32_t data_residual; + uint8_t status; + uint8_t pad; + uint16_t sense_length; + uint8_t sense_data[32]; + } end; + } fcd; +} isp_xcmd_t; #endif /* _ISPMBOX_H */ ==== //depot/projects/smpng/sys/dev/mpt/mpt.c#20 (text+ko) ==== @@ -96,7 +96,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt.c,v 1.35 2006/09/07 23:08:21 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt.c,v 1.36 2006/11/15 21:46:36 jb Exp $"); #include #include /* XXX For static handler registration */ @@ -547,6 +547,10 @@ handled = 0; msg = (MSG_EVENT_NOTIFY_REPLY *)reply_frame; + msg->EventDataLength = le16toh(msg->EventDataLength); + msg->IOCStatus = le16toh(msg->IOCStatus); + msg->IOCLogInfo = le32toh(msg->IOCLogInfo); + msg->Event = le32toh(msg->Event); MPT_PERS_FOREACH(mpt, pers) handled += pers->event(mpt, req, msg); @@ -566,7 +570,7 @@ request_t *ack_req; uint32_t context; - context = htole32(req->index|MPT_REPLY_HANDLER_EVENTS); + context = req->index | MPT_REPLY_HANDLER_EVENTS; ack_req = mpt_get_request(mpt, FALSE); if (ack_req == NULL) { struct mpt_evtf_record *evtf; @@ -683,9 +687,9 @@ ackp = (MSG_EVENT_ACK *)ack_req->req_vbuf; memset(ackp, 0, sizeof (*ackp)); ackp->Function = MPI_FUNCTION_EVENT_ACK; - ackp->Event = msg->Event; - ackp->EventContext = msg->EventContext; - ackp->MsgContext = context; + ackp->Event = htole32(msg->Event); + ackp->EventContext = htole32(msg->EventContext); + ackp->MsgContext = htole32(context); mpt_check_doorbell(mpt); mpt_send_cmd(mpt, ack_req); } @@ -1375,7 +1379,7 @@ /* Send the command */ for (i = 0; i < len; i++) { - mpt_write(mpt, MPT_OFFSET_DOORBELL, *data32++); + mpt_write(mpt, MPT_OFFSET_DOORBELL, htole32(*data32++)); if (mpt_wait_db_ack(mpt) != MPT_OK) { mpt_prt(mpt, "mpt_send_handshake_cmd timeout! index = %d\n", @@ -1392,6 +1396,7 @@ { int left, reply_left; u_int16_t *data16; + uint32_t data; MSG_DEFAULT_REPLY *hdr; /* We move things out in 16 bit chunks */ @@ -1405,7 +1410,8 @@ mpt_prt(mpt, "mpt_recv_handshake_cmd timeout1\n"); return ETIMEDOUT; } - *data16++ = mpt_read(mpt, MPT_OFFSET_DOORBELL) & MPT_DB_DATA_MASK; + data = mpt_read(mpt, MPT_OFFSET_DOORBELL); + *data16++ = le16toh(data & MPT_DB_DATA_MASK); mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); /* Get Second Word */ @@ -1413,7 +1419,8 @@ mpt_prt(mpt, "mpt_recv_handshake_cmd timeout2\n"); return ETIMEDOUT; } - *data16++ = mpt_read(mpt, MPT_OFFSET_DOORBELL) & MPT_DB_DATA_MASK; + data = mpt_read(mpt, MPT_OFFSET_DOORBELL); + *data16++ = le16toh(data & MPT_DB_DATA_MASK); mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); /* @@ -1443,10 +1450,11 @@ mpt_prt(mpt, "mpt_recv_handshake_cmd timeout3\n"); return ETIMEDOUT; } - datum = mpt_read(mpt, MPT_OFFSET_DOORBELL); + data = mpt_read(mpt, MPT_OFFSET_DOORBELL); + datum = le16toh(data & MPT_DB_DATA_MASK); if (reply_left-- > 0) - *data16++ = datum & MPT_DB_DATA_MASK; + *data16++ = datum; mpt_write(mpt, MPT_OFFSET_INTR_STATUS, 0); } @@ -1553,9 +1561,9 @@ cfgp->Header.PageLength = PageLength; cfgp->Header.PageNumber = PageNumber; cfgp->Header.PageType = PageType; - cfgp->PageAddress = PageAddress; + cfgp->PageAddress = htole32(PageAddress); se = (SGE_SIMPLE32 *)&cfgp->PageBufferSGE; - se->Address = addr; + se->Address = htole32(addr); MPI_pSGE_SET_LENGTH(se, len); MPI_pSGE_SET_FLAGS(se, (MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | @@ -1563,6 +1571,7 @@ ((Action == MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT || Action == MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM) ? MPI_SGE_FLAGS_HOST_TO_IOC : MPI_SGE_FLAGS_IOC_TO_HOST))); + se->FlagsLength = htole32(se->FlagsLength); cfgp->MsgContext = htole32(req->index | MPT_REPLY_HANDLER_CONFIG); mpt_check_doorbell(mpt); @@ -2488,7 +2497,7 @@ pfp.MaxDevices); mpt->mpt_port_type = pfp.PortType; - mpt->mpt_proto_flags = pfp.ProtocolFlags; + mpt->mpt_proto_flags = le16toh(pfp.ProtocolFlags); if (pfp.PortType != MPI_PORTFACTS_PORTTYPE_SCSI && pfp.PortType != MPI_PORTFACTS_PORTTYPE_SAS && pfp.PortType != MPI_PORTFACTS_PORTTYPE_FC) { @@ -2521,10 +2530,10 @@ * if this is different from what is wanted. */ mpt->role = MPT_ROLE_NONE; - if (pfp.ProtocolFlags & MPI_PORTFACTS_PROTOCOL_INITIATOR) { + if (mpt->mpt_proto_flags & MPI_PORTFACTS_PROTOCOL_INITIATOR) { mpt->role |= MPT_ROLE_INITIATOR; } - if (pfp.ProtocolFlags & MPI_PORTFACTS_PROTOCOL_TARGET) { + if (mpt->mpt_proto_flags & MPI_PORTFACTS_PROTOCOL_TARGET) { mpt->role |= MPT_ROLE_TARGET; } if (mpt_enable_ioc(mpt, 0) != MPT_OK) { ==== //depot/projects/smpng/sys/dev/mpt/mpt_cam.c#16 (text+ko) ==== @@ -94,7 +94,7 @@ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.37 2006/11/02 23:19:00 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.40 2006/11/17 00:19:55 mjacob Exp $"); #include #include @@ -1036,6 +1036,7 @@ MPI_pSGE_SET_FLAGS(se1, (MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_END_OF_LIST)); + se1->FlagsLength = htole32(se1->FlagsLength); goto out; } @@ -1093,7 +1094,7 @@ uint32_t tf; memset(se, 0, sizeof (*se)); - se->Address.Low = dm_segs->ds_addr; + se->Address.Low = htole32(dm_segs->ds_addr & 0xffffffff); if (sizeof(bus_addr_t) > 4) { se->Address.High = ((uint64_t) dm_segs->ds_addr) >> 32; } @@ -1107,6 +1108,7 @@ MPI_SGE_FLAGS_END_OF_BUFFER; } MPI_pSGE_SET_FLAGS(se, tf); + se->FlagsLength = htole32(se->FlagsLength); } if (seg == nseg) { @@ -1169,9 +1171,9 @@ chain_list_addr += cur_off; if (sizeof (bus_addr_t) > 4) { ce->Address.High = - (uint32_t) ((uint64_t)chain_list_addr >> 32); + htole32((uint32_t) ((uint64_t)chain_list_addr >> 32)); } - ce->Address.Low = (uint32_t) chain_list_addr; + ce->Address.Low = htole32((uint32_t) chain_list_addr); ce->Flags = MPI_SGE_FLAGS_CHAIN_ELEMENT | MPI_SGE_FLAGS_64_BIT_ADDRESSING; @@ -1208,10 +1210,10 @@ */ while (seg < this_seg_lim) { memset(se, 0, sizeof (*se)); - se->Address.Low = dm_segs->ds_addr; + se->Address.Low = htole32(dm_segs->ds_addr); if (sizeof (bus_addr_t) > 4) { se->Address.High = - ((uint64_t)dm_segs->ds_addr) >> 32; + htole32(((uint64_t)dm_segs->ds_addr) >> 32); } MPI_pSGE_SET_LENGTH(se, dm_segs->ds_len); tf = flags; @@ -1223,6 +1225,7 @@ MPI_SGE_FLAGS_END_OF_BUFFER; } MPI_pSGE_SET_FLAGS(se, tf); + se->FlagsLength = htole32(se->FlagsLength); se++; seg++; dm_segs++; @@ -1436,6 +1439,7 @@ MPI_pSGE_SET_FLAGS(se1, (MPI_SGE_FLAGS_LAST_ELEMENT | MPI_SGE_FLAGS_END_OF_BUFFER | MPI_SGE_FLAGS_SIMPLE_ELEMENT | MPI_SGE_FLAGS_END_OF_LIST)); + se1->FlagsLength = htole32(se1->FlagsLength); goto out; } @@ -1507,6 +1511,7 @@ MPI_SGE_FLAGS_END_OF_BUFFER; } MPI_pSGE_SET_FLAGS(se, tf); + se->FlagsLength = htole32(se->FlagsLength); } if (seg == nseg) { @@ -1622,6 +1627,7 @@ MPI_SGE_FLAGS_END_OF_BUFFER; } MPI_pSGE_SET_FLAGS(se, tf); + se->FlagsLength = htole32(se->FlagsLength); >>> TRUNCATED FOR MAIL (1000 lines) <<< From owner-p4-projects@FreeBSD.ORG Fri Nov 17 19:02:46 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BA3BF16A47C; Fri, 17 Nov 2006 19:02:46 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7903016A417 for ; Fri, 17 Nov 2006 19:02:46 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B071B43D8A for ; Fri, 17 Nov 2006 19:02:36 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHJ2ajx030165 for ; Fri, 17 Nov 2006 19:02:36 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHJ2aMV030161 for perforce@freebsd.org; Fri, 17 Nov 2006 19:02:36 GMT (envelope-from sam@freebsd.org) Date: Fri, 17 Nov 2006 19:02:36 GMT Message-Id: <200611171902.kAHJ2aMV030161@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 110166 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 19:02:47 -0000 http://perforce.freebsd.org/chv.cgi?CH=110166 Change 110166 by sam@sam_ebb on 2006/11/17 19:02:31 o the physical address of the h/w descriptor passed to an NPE does include the portid in the low bits; not sure what goes there o correct format of NPE_SETRXQOSENTRY msg; the NPE id goes in bits 20..23, not the portid; this fixes the rx q setup for npe1 o correct memset on deactivate With these changes npe1 seems to work fine. Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#23 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#23 (text+ko) ==== @@ -442,7 +442,6 @@ npe_dma_setup(struct npe_softc *sc, struct npedma *dma, const char *name, int nbuf, int maxseg) { - int portid = npeconfig[device_get_unit(sc->sc_dev)].portid; int error, i; memset(dma, 0, sizeof(dma)); @@ -515,8 +514,6 @@ "error %u\n", dma->name, i, error); return error; } - /* add port id once */ - npe->ix_neaddr |= portid << 3; npe->ix_hw = hw; } bus_dmamap_sync(dma->buf_tag, dma->buf_map, BUS_DMASYNC_PREWRITE); @@ -543,7 +540,7 @@ bus_dma_tag_destroy(dma->buf_tag); if (dma->mtag) bus_dma_tag_destroy(dma->mtag); - memset(dma, 0, sizeof(dma)); + memset(dma, 0, sizeof(*dma)); } static int @@ -553,7 +550,6 @@ int unit = device_get_unit(dev); int error, i; - /* load NPE firmware and start it running */ error = ixpnpe_init(sc->sc_npe, "npe_fw", npeconfig[unit].imageid); if (error != 0) @@ -1472,10 +1468,10 @@ static int npe_setrxqosentry(struct npe_softc *sc, int classix, int trafclass, int qid) { - int portid = npeconfig[device_get_unit(sc->sc_dev)].portid; + int npeid = npeconfig[device_get_unit(sc->sc_dev)].npeid; uint32_t msg[2]; - msg[0] = (NPE_SETRXQOSENTRY << 24) | (portid << 16) | classix; + msg[0] = (NPE_SETRXQOSENTRY << 24) | (npeid << 20) | classix; msg[1] = (trafclass << 24) | (1 << 23) | (qid << 16) | (qid << 4); return ixpnpe_sendandrecvmsg(sc->sc_npe, msg, msg); } From owner-p4-projects@FreeBSD.ORG Fri Nov 17 19:04:07 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 78AD416A4EB; Fri, 17 Nov 2006 19:04:07 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C57E16A4B3 for ; Fri, 17 Nov 2006 19:04:07 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B195F43D5C for ; Fri, 17 Nov 2006 19:03:38 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHJ3c3U031692 for ; Fri, 17 Nov 2006 19:03:38 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHJ3cQD031687 for perforce@freebsd.org; Fri, 17 Nov 2006 19:03:38 GMT (envelope-from sam@freebsd.org) Date: Fri, 17 Nov 2006 19:03:38 GMT Message-Id: <200611171903.kAHJ3cQD031687@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 110167 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 19:04:08 -0000 http://perforce.freebsd.org/chv.cgi?CH=110167 Change 110167 by sam@sam_ebb on 2006/11/17 19:02:57 define NPE msg 0xe; the linux driver sends it and we probably will need to also eventually Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npereg.h#8 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npereg.h#8 (text+ko) ==== @@ -118,6 +118,7 @@ #define NPE_SETRXTAGMODE 0x07 /* configure VLAN rx operating mode */ #define NPE_SETDEFRXVID 0x08 /* set def VLAN tag + traffic class */ #define NPE_SETRXQOSENTRY 0x0b /* map user pri -> QoS class+rx qid */ +#define NPE_SETFIREWALLMODE 0x0e /* config firewall services */ #define NPE_SETLOOPBACK 0x12 /* enable/disable loopback */ /* ... XXX more */ From owner-p4-projects@FreeBSD.ORG Fri Nov 17 19:05:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 2001E16A4E6; Fri, 17 Nov 2006 19:05:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D09DE16A4E5 for ; Fri, 17 Nov 2006 19:05:41 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C23B43D45 for ; Fri, 17 Nov 2006 19:05:41 +0000 (GMT) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHJ5f8T032143 for ; Fri, 17 Nov 2006 19:05:41 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHJ5fdd032139 for perforce@freebsd.org; Fri, 17 Nov 2006 19:05:41 GMT (envelope-from sam@freebsd.org) Date: Fri, 17 Nov 2006 19:05:41 GMT Message-Id: <200611171905.kAHJ5fdd032139@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 110168 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 19:05:42 -0000 http://perforce.freebsd.org/chv.cgi?CH=110168 Change 110168 by sam@sam_ebb on 2006/11/17 19:04:46 don't need the portid any more; remove it Affected files ... .. //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#24 edit Differences ... ==== //depot/projects/arm/src/sys/arm/xscale/ixp425/if_npe.c#24 (text+ko) ==== @@ -149,7 +149,6 @@ static const struct { const char *desc; /* device description */ int npeid; /* NPE assignment */ - int portid; /* NPE Ethernet port */ uint32_t imageid; /* NPE firmware image id */ uint32_t regbase; int regsize; @@ -162,7 +161,6 @@ } npeconfig[NPE_PORTS_MAX] = { { .desc = "IXP NPE-B", .npeid = NPE_B, - .portid = 0, .imageid = IXP425_NPE_B_IMAGEID, .regbase = IXP425_MAC_A_HWBASE, .regsize = IXP425_MAC_A_SIZE, @@ -175,7 +173,6 @@ }, { .desc = "IXP NPE-C", .npeid = NPE_C, - .portid = 1, .imageid = IXP425_NPE_C_IMAGEID, .regbase = IXP425_MAC_B_HWBASE, .regsize = IXP425_MAC_B_SIZE, From owner-p4-projects@FreeBSD.ORG Fri Nov 17 19:05:42 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id BF57C16A695; Fri, 17 Nov 2006 19:05:42 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 852E816A691 for ; Fri, 17 Nov 2006 19:05:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0543143D45 for ; Fri, 17 Nov 2006 19:05:42 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHJ5fP8032151 for ; Fri, 17 Nov 2006 19:05:41 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHJ5fhd032146 for perforce@freebsd.org; Fri, 17 Nov 2006 19:05:41 GMT (envelope-from jhb@freebsd.org) Date: Fri, 17 Nov 2006 19:05:41 GMT Message-Id: <200611171905.kAHJ5fhd032146@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 110169 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 19:05:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=110169 Change 110169 by jhb@jhb_mutex on 2006/11/17 19:04:50 IFC @110163. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#21 integrate .. //depot/projects/smpng/sys/amd64/amd64/io_apic.c#18 integrate .. //depot/projects/smpng/sys/ddb/db_watch.c#7 integrate .. //depot/projects/smpng/sys/dev/isp/isp_pci.c#43 integrate .. //depot/projects/smpng/sys/dev/nfe/if_nfe.c#5 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/intr_machdep.c#21 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.25 2006/10/16 21:40:46 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.26 2006/11/17 16:41:03 jhb Exp $ */ /* @@ -446,10 +446,6 @@ current_cpu++; if (current_cpu >= num_cpus) current_cpu = 0; - if (bootverbose) { - printf("INTR: Assigning IRQ %d", pic->pic_vector(isrc)); - printf(" to local APIC %u\n", apic_id); - } pic->pic_assign_cpu(isrc, apic_id); } @@ -483,7 +479,7 @@ if (num_cpus <= 1) return; - /* Round-robin assign each enabled source a CPU. */ + /* Round-robin assign a CPU to each enabled source. */ mtx_lock_spin(&intr_table_lock); assign_cpu = 1; for (i = 0; i < NUM_IO_INTS; i++) { ==== //depot/projects/smpng/sys/amd64/amd64/io_apic.c#18 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.25 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.26 2006/11/17 16:41:03 jhb Exp $"); #include "opt_isa.h" @@ -512,13 +512,6 @@ * be routed to other CPUs later after they are enabled. */ intpin->io_cpu = PCPU_GET(apic_id); - if (bootverbose && intpin->io_irq != IRQ_DISABLED) { - printf("ioapic%u: intpin %d -> ", io->io_id, i); - ioapic_print_irq(intpin); - printf(" (%s, %s)\n", intpin->io_edgetrigger ? - "edge" : "level", intpin->io_activehi ? "high" : - "low"); - } value = ioapic_read(apic, IOAPIC_REDTBL_LO(i)); ioapic_write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET); } @@ -583,6 +576,8 @@ return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) return (EINVAL); + if (io->io_pins[pin].io_bus == bus_type) + return (0); io->io_pins[pin].io_bus = bus_type; if (bootverbose) printf("ioapic%u: intpin %d bus %s\n", io->io_id, pin, @@ -666,13 +661,17 @@ ioapic_set_polarity(void *cookie, u_int pin, enum intr_polarity pol) { struct ioapic *io; + int activehi; io = (struct ioapic *)cookie; if (pin >= io->io_numintr || pol == INTR_POLARITY_CONFORM) return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) return (EINVAL); - io->io_pins[pin].io_activehi = (pol == INTR_POLARITY_HIGH); + activehi = (pol == INTR_POLARITY_HIGH); + if (io->io_pins[pin].io_activehi == activehi) + return (0); + io->io_pins[pin].io_activehi = activehi; if (bootverbose) printf("ioapic%u: intpin %d polarity: %s\n", io->io_id, pin, pol == INTR_POLARITY_HIGH ? "high" : "low"); @@ -683,13 +682,17 @@ ioapic_set_triggermode(void *cookie, u_int pin, enum intr_trigger trigger) { struct ioapic *io; + int edgetrigger; io = (struct ioapic *)cookie; if (pin >= io->io_numintr || trigger == INTR_TRIGGER_CONFORM) return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) - return (EINVAL); - io->io_pins[pin].io_edgetrigger = (trigger == INTR_TRIGGER_EDGE); + return (EINVAL); + edgetrigger = (trigger == INTR_TRIGGER_EDGE); + if (io->io_pins[pin].io_edgetrigger == edgetrigger) + return (0); + io->io_pins[pin].io_edgetrigger = edgetrigger; if (bootverbose) printf("ioapic%u: intpin %d trigger: %s\n", io->io_id, pin, trigger == INTR_TRIGGER_EDGE ? "edge" : "level"); ==== //depot/projects/smpng/sys/ddb/db_watch.c#7 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_watch.c,v 1.27 2005/09/10 03:01:24 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_watch.c,v 1.28 2006/11/17 16:41:56 jhb Exp $"); #include #include @@ -168,11 +168,19 @@ return; } +#ifdef __LP64__ + db_printf(" Map Address Size\n"); +#else db_printf(" Map Address Size\n"); +#endif for (watch = db_watchpoint_list; watch != 0; watch = watch->link) +#ifdef __LP64__ + db_printf("%s%16p %16lx %lx\n", +#else db_printf("%s%8p %8lx %lx\n", +#endif db_map_current(watch->map) ? "*" : " ", (void *)watch->map, (long)watch->loaddr, (long)watch->hiaddr - (long)watch->loaddr); ==== //depot/projects/smpng/sys/dev/isp/isp_pci.c#43 (text+ko) ==== @@ -30,7 +30,7 @@ * FreeBSD Version. */ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.125 2006/11/14 08:45:48 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.126 2006/11/17 17:32:45 mjacob Exp $"); #include #include @@ -1057,6 +1057,7 @@ cmd &= ~PCIM_CMD_INTX_DISABLE; } +#ifdef WE_KNEW_WHAT_WE_WERE_DOING if (IS_24XX(isp)) { int reg; @@ -1088,6 +1089,11 @@ pci_write_config(dev, reg, 2, pectl); } } +#else + if (IS_24XX(isp)) { + cmd &= ~PCIM_CMD_INTX_DISABLE; + } +#endif pci_write_config(dev, PCIR_COMMAND, cmd, 2); ==== //depot/projects/smpng/sys/dev/nfe/if_nfe.c#5 (text+ko) ==== @@ -21,7 +21,7 @@ /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */ #include -__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.7 2006/10/19 10:01:26 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.8 2006/11/17 16:49:40 obrien Exp $"); /* Uncomment the following line to enable polling. */ /* #define DEVICE_POLLING */ @@ -1130,7 +1130,7 @@ static void nfe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct nfe_softc *sc = ifp->if_softc; + struct nfe_softc *sc = ifp->if_softc; NFE_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -1142,7 +1142,7 @@ static void nfe_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct nfe_softc *sc = ifp->if_softc; + struct nfe_softc *sc = ifp->if_softc; u_int32_t r; NFE_LOCK_ASSERT(sc); From owner-p4-projects@FreeBSD.ORG Fri Nov 17 20:09:08 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B9F7716A412; Fri, 17 Nov 2006 20:09:08 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9454916A403 for ; Fri, 17 Nov 2006 20:09:08 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2C07943D66 for ; Fri, 17 Nov 2006 20:09:05 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHK952t044249 for ; Fri, 17 Nov 2006 20:09:05 GMT (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHK95Pf044246 for perforce@freebsd.org; Fri, 17 Nov 2006 20:09:05 GMT (envelope-from jhb@freebsd.org) Date: Fri, 17 Nov 2006 20:09:05 GMT Message-Id: <200611172009.kAHK95Pf044246@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin To: Perforce Change Reviews Cc: Subject: PERFORCE change 110174 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 20:09:09 -0000 http://perforce.freebsd.org/chv.cgi?CH=110174 Change 110174 by jhb@jhb_mutex on 2006/11/17 20:08:37 IFC @110173. Affected files ... .. //depot/projects/smpng/sys/amd64/amd64/db_trace.c#23 integrate .. //depot/projects/smpng/sys/amd64/amd64/machdep.c#61 integrate .. //depot/projects/smpng/sys/amd64/include/reg.h#7 integrate .. //depot/projects/smpng/sys/i386/i386/db_trace.c#35 integrate .. //depot/projects/smpng/sys/i386/i386/machdep.c#120 integrate .. //depot/projects/smpng/sys/i386/include/reg.h#11 integrate Differences ... ==== //depot/projects/smpng/sys/amd64/amd64/db_trace.c#23 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.78 2006/11/17 16:37:35 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.79 2006/11/17 19:20:31 jhb Exp $"); #include #include @@ -538,12 +538,11 @@ int access; struct dbreg *d; { - int i; - unsigned int mask; + int i, len; if (watchnum == -1) { - for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) - if ((d->dr[7] & mask) == 0) + for (i = 0; i < 4; i++) + if (!DBREG_DR7_ENABLED(d->dr[7], i)) break; if (i < 4) watchnum = i; @@ -566,22 +565,28 @@ * we can watch a 1, 2, or 4 byte sized location */ switch (size) { - case 1 : mask = 0x00; break; - case 2 : mask = 0x01 << 2; break; - case 4 : mask = 0x03 << 2; break; - default : return (-1); + case 1: + len = DBREG_DR7_LEN_1; + break; + case 2: + len = DBREG_DR7_LEN_2; + break; + case 4: + len = DBREG_DR7_LEN_4; + break; + default: + return (-1); } - mask |= access; - /* clear the bits we are about to affect */ - d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); /* set drN register to the address, N=watchnum */ DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ - d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); + d->dr[7] |= DBREG_DR7_SET(watchnum, len, access, + DBREG_DR7_GLOBAL_ENABLE); return (watchnum); } @@ -596,7 +601,7 @@ if (watchnum < 0 || watchnum >= 4) return (-1); - d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); DBREG_DRX(d, watchnum) = 0; return (0); @@ -615,21 +620,19 @@ avail = 0; for(i = 0; i < 4; i++) { - if ((d.dr[7] & (3 << (i*2))) == 0) + if (!DBREG_DR7_ENABLED(d.dr[7], i)) avail++; } if (avail * 4 < size) return (-1); - for (i = 0; i < 4 && (size != 0); i++) { - if ((d.dr[7] & (3<<(i*2))) == 0) { - if (size > 4) + for (i = 0; i < 4 && (size > 0); i++) { + if (!DBREG_DR7_ENABLED(d.dr[7], i)) { + if (size > 2) wsize = 4; else wsize = size; - if (wsize == 3) - wsize++; amd64_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; @@ -654,7 +657,7 @@ fill_dbregs(NULL, &d); for(i = 0; i < 4; i++) { - if (d.dr[7] & (3 << (i*2))) { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) amd64_clr_watch(i, &d); @@ -690,17 +693,17 @@ fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); - db_printf(" watch status type len address\n"); - db_printf(" ----- -------- ---------- --- ----------\n"); + db_printf(" watch status type len address\n"); + db_printf(" ----- -------- ---------- --- ------------------\n"); for (i = 0; i < 4; i++) { - if (d.dr[7] & (0x03 << (i*2))) { - type = (d.dr[7] >> (16+(i*4))) & 3; - len = (d.dr[7] >> (16+(i*4)+2)) & 3; - db_printf(" %-5d %-8s %10s %3d 0x%016lx\n", - i, "enabled", watchtype_str(type), - len + 1, DBREG_DRX((&d), i)); - } - else { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { + type = DBREG_DR7_ACCESS(d.dr[7], i); + len = DBREG_DR7_LEN(d.dr[7], i); + db_printf(" %-5d %-8s %10s %3d ", + i, "enabled", watchtype_str(type), len + 1); + db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY); + db_printf("\n"); + } else { db_printf(" %-5d disabled\n", i); } } ==== //depot/projects/smpng/sys/amd64/amd64/machdep.c#61 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.661 2006/11/15 19:53:47 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.662 2006/11/17 19:20:31 jhb Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1692,7 +1692,6 @@ { struct pcb *pcb; int i; - u_int64_t mask1, mask2; if (td == NULL) { load_dr0(dbregs->dr[0]); @@ -1709,10 +1708,12 @@ * TRCTRAP or a general protection fault right here. * Upper bits of dr6 and dr7 must not be set */ - for (i = 0, mask1 = 0x3<<16, mask2 = 0x2<<16; i < 8; - i++, mask1 <<= 2, mask2 <<= 2) - if ((dbregs->dr[7] & mask1) == mask2) + for (i = 0; i < 4; i++) { + if (DBREG_DR7_ACCESS(dbregs->dr[7], i) == 0x02) + return (EINVAL); + if (DBREG_DR7_LEN(dbregs->dr[7], i) == 0x02) return (EINVAL); + } if ((dbregs->dr[6] & 0xffffffff00000000ul) != 0 || (dbregs->dr[7] & 0xffffffff00000000ul) != 0) return (EINVAL); @@ -1733,22 +1734,22 @@ * from within kernel mode? */ - if (dbregs->dr[7] & 0x3) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 0)) { /* dr0 is enabled */ if (dbregs->dr[0] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & 0x3<<2) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 1)) { /* dr1 is enabled */ if (dbregs->dr[1] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & 0x3<<4) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 2)) { /* dr2 is enabled */ if (dbregs->dr[2] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & 0x3<<6) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 3)) { /* dr3 is enabled */ if (dbregs->dr[3] >= VM_MAXUSER_ADDRESS) return (EINVAL); ==== //depot/projects/smpng/sys/amd64/include/reg.h#7 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/reg.h,v 1.36 2006/11/15 19:53:48 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/reg.h,v 1.37 2006/11/17 19:20:31 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -92,9 +92,21 @@ /* Index 8-15: reserved */ }; +#define DBREG_DR7_LOCAL_ENABLE 0x01 +#define DBREG_DR7_GLOBAL_ENABLE 0x02 +#define DBREG_DR7_LEN_1 0x00 /* 1 byte length */ +#define DBREG_DR7_LEN_2 0x01 +#define DBREG_DR7_LEN_4 0x03 #define DBREG_DR7_EXEC 0x00 /* break on execute */ #define DBREG_DR7_WRONLY 0x01 /* break on write */ #define DBREG_DR7_RDWR 0x03 /* break on read or write */ +#define DBREG_DR7_MASK(i) ((u_long)0xf << ((i) * 4 + 16) | 0x3 << (i) * 2) +#define DBREG_DR7_SET(i, len, access, enable) \ + ((u_long)((len) << 2 | (access)) << ((i) * 4 + 16) | (enable) << (i) * 2) +#define DBREG_DR7_GD 0x2000 +#define DBREG_DR7_ENABLED(d, i) (((d) & 0x3 << (i) * 2) != 0) +#define DBREG_DR7_ACCESS(d, i) ((d) >> ((i) * 4 + 16) & 0x3) +#define DBREG_DR7_LEN(d, i) ((d) >> ((i) * 4 + 18) & 0x3) #define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by register number */ ==== //depot/projects/smpng/sys/i386/i386/db_trace.c#35 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.77 2006/11/17 16:37:35 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.78 2006/11/17 19:20:32 jhb Exp $"); #include #include @@ -571,12 +571,11 @@ int access; struct dbreg *d; { - int i; - unsigned int mask; + int i, len; if (watchnum == -1) { - for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) - if ((d->dr[7] & mask) == 0) + for (i = 0; i < 4; i++) + if (!DBREG_DR7_ENABLED(d->dr[7], i)) break; if (i < 4) watchnum = i; @@ -599,22 +598,28 @@ * we can watch a 1, 2, or 4 byte sized location */ switch (size) { - case 1 : mask = 0x00; break; - case 2 : mask = 0x01 << 2; break; - case 4 : mask = 0x03 << 2; break; - default : return (-1); + case 1: + len = DBREG_DR7_LEN_1; + break; + case 2: + len = DBREG_DR7_LEN_2; + break; + case 4: + len = DBREG_DR7_LEN_4; + break; + default: + return (-1); } - mask |= access; - /* clear the bits we are about to affect */ - d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); /* set drN register to the address, N=watchnum */ DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ - d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); + d->dr[7] |= DBREG_DR7_SET(watchnum, len, access, + DBREG_DR7_GLOBAL_ENABLE); return (watchnum); } @@ -629,7 +634,7 @@ if (watchnum < 0 || watchnum >= 4) return (-1); - d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); DBREG_DRX(d, watchnum) = 0; return (0); @@ -648,21 +653,19 @@ avail = 0; for(i = 0; i < 4; i++) { - if ((d.dr[7] & (3 << (i*2))) == 0) + if (!DBREG_DR7_ENABLED(d.dr[7], i)) avail++; } if (avail * 4 < size) return (-1); - for (i = 0; i < 4 && (size != 0); i++) { - if ((d.dr[7] & (3<<(i*2))) == 0) { - if (size > 4) + for (i = 0; i < 4 && (size > 0); i++) { + if (!DBREG_DR7_ENABLED(d.dr[7], i)) { + if (size > 2) wsize = 4; else wsize = size; - if (wsize == 3) - wsize++; i386_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; @@ -687,7 +690,7 @@ fill_dbregs(NULL, &d); for(i = 0; i < 4; i++) { - if (d.dr[7] & (3 << (i*2))) { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) i386_clr_watch(i, &d); @@ -726,14 +729,14 @@ db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); for (i = 0; i < 4; i++) { - if (d.dr[7] & (0x03 << (i*2))) { - type = (d.dr[7] >> (16+(i*4))) & 3; - len = (d.dr[7] >> (16+(i*4)+2)) & 3; - db_printf(" %-5d %-8s %10s %3d 0x%08x\n", - i, "enabled", watchtype_str(type), - len+1, DBREG_DRX((&d),i)); - } - else { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { + type = DBREG_DR7_ACCESS(d.dr[7], i); + len = DBREG_DR7_LEN(d.dr[7], i); + db_printf(" %-5d %-8s %10s %3d ", + i, "enabled", watchtype_str(type), len + 1); + db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY); + db_printf("\n"); + } else { db_printf(" %-5d disabled\n", i); } } ==== //depot/projects/smpng/sys/i386/i386/machdep.c#120 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.641 2006/11/15 19:53:48 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/machdep.c,v 1.642 2006/11/17 19:20:32 jhb Exp $"); #include "opt_apic.h" #include "opt_atalk.h" @@ -2775,7 +2775,6 @@ { struct pcb *pcb; int i; - u_int32_t mask1, mask2; if (td == NULL) { load_dr0(dbregs->dr[0]); @@ -2793,10 +2792,12 @@ * result in undefined behaviour and can lead to an unexpected * TRCTRAP. */ - for (i = 0, mask1 = 0x3<<16, mask2 = 0x2<<16; i < 8; - i++, mask1 <<= 2, mask2 <<= 2) - if ((dbregs->dr[7] & mask1) == mask2) + for (i = 0; i < 4; i++) { + if (DBREG_DR7_ACCESS(dbregs->dr[7], i) == 0x02) + return (EINVAL); + if (DBREG_DR7_LEN(dbregs->dr[7], i) == 0x02) return (EINVAL); + } pcb = td->td_pcb; @@ -2814,25 +2815,25 @@ * from within kernel mode? */ - if (dbregs->dr[7] & 0x3) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 0)) { /* dr0 is enabled */ if (dbregs->dr[0] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & (0x3<<2)) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 1)) { /* dr1 is enabled */ if (dbregs->dr[1] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & (0x3<<4)) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 2)) { /* dr2 is enabled */ if (dbregs->dr[2] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & (0x3<<6)) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 3)) { /* dr3 is enabled */ if (dbregs->dr[3] >= VM_MAXUSER_ADDRESS) return (EINVAL); ==== //depot/projects/smpng/sys/i386/include/reg.h#11 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/i386/include/reg.h,v 1.32 2006/11/15 19:53:48 jhb Exp $ + * $FreeBSD: src/sys/i386/include/reg.h,v 1.33 2006/11/17 19:20:32 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -137,9 +137,21 @@ /* Index 7: debug control */ }; +#define DBREG_DR7_LOCAL_ENABLE 0x01 +#define DBREG_DR7_GLOBAL_ENABLE 0x02 +#define DBREG_DR7_LEN_1 0x00 /* 1 byte length */ +#define DBREG_DR7_LEN_2 0x01 +#define DBREG_DR7_LEN_4 0x03 #define DBREG_DR7_EXEC 0x00 /* break on execute */ #define DBREG_DR7_WRONLY 0x01 /* break on write */ #define DBREG_DR7_RDWR 0x03 /* break on read or write */ +#define DBREG_DR7_MASK(i) (0xf << ((i) * 4 + 16) | 0x3 << (i) * 2) +#define DBREG_DR7_SET(i, len, access, enable) \ + (((len) << 2 | (access)) << ((i) * 4 + 16) | (enable) << (i) * 2) +#define DBREG_DR7_GD 0x2000 +#define DBREG_DR7_ENABLED(d, i) (((d) & 0x3 << (i) * 2) != 0) +#define DBREG_DR7_ACCESS(d, i) ((d) >> ((i) * 4 + 16) & 0x3) +#define DBREG_DR7_LEN(d, i) ((d) >> ((i) * 4 + 18) & 0x3) #define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr7 by register number */ From owner-p4-projects@FreeBSD.ORG Fri Nov 17 20:56:06 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4974F16A501; Fri, 17 Nov 2006 20:56:06 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 204EC16A47E for ; Fri, 17 Nov 2006 20:56:06 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1D6043D58 for ; Fri, 17 Nov 2006 20:56:05 +0000 (GMT) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHKu5RQ061223 for ; Fri, 17 Nov 2006 20:56:05 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHKu5NZ061220 for perforce@freebsd.org; Fri, 17 Nov 2006 20:56:05 GMT (envelope-from jkim@freebsd.org) Date: Fri, 17 Nov 2006 20:56:05 GMT Message-Id: <200611172056.kAHKu5NZ061220@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 110179 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 20:56:06 -0000 http://perforce.freebsd.org/chv.cgi?CH=110179 Change 110179 by jkim@jkim_hammer on 2006/11/17 20:55:26 Add rudimentary IPC_INFO/MSG_INFO command support for linux_msgctl() to pacify Linux ipcs(1). Note: This patch and another fix from CVS fix msgctl08 and msgctl09. Affected files ... .. //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#5 edit Differences ... ==== //depot/projects/linuxolator/src/sys/compat/linux/linux_ipc.c#5 (text+ko) ==== @@ -83,6 +83,17 @@ l_ulong swap_successes; }; +struct l_msginfo { + l_int msgpool; + l_int msgmap; + l_int msgmax; + l_int msgmnb; + l_int msgmni; + l_int msgssz; + l_int msgtql; + l_ushort msgseg; +}; + static void bsd_to_linux_shminfo( struct shminfo *bpp, struct l_shminfo *lpp) { @@ -580,7 +591,7 @@ l_long lmtype; int error; - if ((l_long)args->msgsz < 0) + if ((l_long)args->msgsz < 0 || args->msgsz > (l_long)msginfo.msgmax) return (EINVAL); msgp = PTRIN(args->msgp); if ((error = copyin(msgp, &lmtype, sizeof(lmtype))) != 0) @@ -599,7 +610,7 @@ l_long lmtype; int error; - if ((l_long)args->msgsz < 0) + if ((l_long)args->msgsz < 0 || args->msgsz > (l_long)msginfo.msgmax) return (EINVAL); msgp = PTRIN(args->msgp); if ((error = kern_msgrcv(td, args->msqid, @@ -631,12 +642,39 @@ struct msqid_ds bsd_msqid; bsd_cmd = args->cmd & ~LINUX_IPC_64; - if (bsd_cmd == LINUX_IPC_SET) { + switch (bsd_cmd) { + case LINUX_IPC_INFO: + case LINUX_MSG_INFO: { + struct l_msginfo linux_msginfo; + + /* + * XXX MSG_INFO uses the same data structure but returns different + * dynamic counters in msgpool, msgmap, and msgtql fields. + */ + linux_msginfo.msgpool = (long)msginfo.msgmni * + (long)msginfo.msgmnb / 1024L; /* XXX MSG_INFO. */ + linux_msginfo.msgmap = msginfo.msgmnb; /* XXX MSG_INFO. */ + linux_msginfo.msgmax = msginfo.msgmax; + linux_msginfo.msgmnb = msginfo.msgmnb; + linux_msginfo.msgmni = msginfo.msgmni; + linux_msginfo.msgssz = msginfo.msgssz; + linux_msginfo.msgtql = msginfo.msgtql; /* XXX MSG_INFO. */ + linux_msginfo.msgseg = msginfo.msgseg; + error = copyout(&linux_msginfo, PTRIN(args->buf), + sizeof(linux_msginfo)); + if (error == 0) + td->td_retval[0] = msginfo.msgmni; /* XXX */ + + return (error); + } + + case LINUX_IPC_SET: error = linux_msqid_pullup(args->cmd & LINUX_IPC_64, &linux_msqid, PTRIN(args->buf)); if (error) return (error); linux_to_bsd_msqid_ds(&linux_msqid, &bsd_msqid); + break; } error = kern_msgctl(td, args->msqid, bsd_cmd, &bsd_msqid); From owner-p4-projects@FreeBSD.ORG Fri Nov 17 21:00:36 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A0A2216A4D1; Fri, 17 Nov 2006 21:00:36 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 60A1C16A4C9 for ; Fri, 17 Nov 2006 21:00:36 +0000 (UTC) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB51A43D9A for ; Fri, 17 Nov 2006 21:00:11 +0000 (GMT) (envelope-from jkim@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id kAHL0Bho061482 for ; Fri, 17 Nov 2006 21:00:11 GMT (envelope-from jkim@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id kAHL0B2f061477 for perforce@freebsd.org; Fri, 17 Nov 2006 21:00:11 GMT (envelope-from jkim@freebsd.org) Date: Fri, 17 Nov 2006 21:00:11 GMT Message-Id: <200611172100.kAHL0B2f061477@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jkim@freebsd.org using -f From: Jung-uk Kim To: Perforce Change Reviews Cc: Subject: PERFORCE change 110180 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Nov 2006 21:00:37 -0000 http://perforce.freebsd.org/chv.cgi?CH=110180 Change 110180 by jkim@jkim_hammer on 2006/11/17 20:59:43 IFC (for sys/kern/sysv_msg.c) Affected files ... .. //depot/projects/linuxolator/src/sys/amd64/amd64/db_trace.c#4 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/intr_machdep.c#5 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/io_apic.c#3 integrate .. //depot/projects/linuxolator/src/sys/amd64/amd64/machdep.c#8 integrate .. //depot/projects/linuxolator/src/sys/amd64/include/reg.h#3 integrate .. //depot/projects/linuxolator/src/sys/arm/arm/nexus.c#3 integrate .. //depot/projects/linuxolator/src/sys/arm/xscale/i80321/ep80219_machdep.c#3 integrate .. //depot/projects/linuxolator/src/sys/arm/xscale/i80321/iq31244_machdep.c#3 integrate .. //depot/projects/linuxolator/src/sys/ddb/db_watch.c#2 integrate .. //depot/projects/linuxolator/src/sys/dev/ata/ata-all.c#3 integrate .. //depot/projects/linuxolator/src/sys/dev/isp/isp_pci.c#4 integrate .. //depot/projects/linuxolator/src/sys/dev/mpt/mpt_cam.c#6 integrate .. //depot/projects/linuxolator/src/sys/dev/nfe/if_nfe.c#4 integrate .. //depot/projects/linuxolator/src/sys/fs/procfs/procfs_ioctl.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/db_trace.c#4 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/intr_machdep.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/io_apic.c#3 integrate .. //depot/projects/linuxolator/src/sys/i386/i386/machdep.c#6 integrate .. //depot/projects/linuxolator/src/sys/i386/include/reg.h#3 integrate .. //depot/projects/linuxolator/src/sys/kern/sysv_msg.c#7 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_node.c#3 integrate .. //depot/projects/linuxolator/src/sys/nfsclient/nfs_vnops.c#5 integrate Differences ... ==== //depot/projects/linuxolator/src/sys/amd64/amd64/db_trace.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.77 2006/11/15 19:53:47 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/db_trace.c,v 1.80 2006/11/17 20:27:00 jhb Exp $"); #include #include @@ -200,7 +200,7 @@ static void db_print_stack_entry(const char *, int, char **, long *, db_addr_t); static void decode_syscall(int, struct thread *); -static char * watchtype_str(int type); +static const char * watchtype_str(int type); int amd64_set_watch(int watchnum, unsigned long watchaddr, int size, int access, struct dbreg *d); int amd64_clr_watch(int watchnum, struct dbreg *d); @@ -538,12 +538,11 @@ int access; struct dbreg *d; { - int i; - unsigned int mask; + int i, len; if (watchnum == -1) { - for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) - if ((d->dr[7] & mask) == 0) + for (i = 0; i < 4; i++) + if (!DBREG_DR7_ENABLED(d->dr[7], i)) break; if (i < 4) watchnum = i; @@ -563,25 +562,34 @@ } /* - * we can watch a 1, 2, or 4 byte sized location + * we can watch a 1, 2, 4, or 8 byte sized location */ switch (size) { - case 1 : mask = 0x00; break; - case 2 : mask = 0x01 << 2; break; - case 4 : mask = 0x03 << 2; break; - default : return (-1); + case 1: + len = DBREG_DR7_LEN_1; + break; + case 2: + len = DBREG_DR7_LEN_2; + break; + case 4: + len = DBREG_DR7_LEN_4; + break; + case 8: + len = DBREG_DR7_LEN_8; + break; + default: + return (-1); } - mask |= access; - /* clear the bits we are about to affect */ - d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); /* set drN register to the address, N=watchnum */ DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ - d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); + d->dr[7] |= DBREG_DR7_SET(watchnum, len, access, + DBREG_DR7_GLOBAL_ENABLE); return (watchnum); } @@ -596,7 +604,7 @@ if (watchnum < 0 || watchnum >= 4) return (-1); - d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); DBREG_DRX(d, watchnum) = 0; return (0); @@ -615,25 +623,26 @@ avail = 0; for(i = 0; i < 4; i++) { - if ((d.dr[7] & (3 << (i*2))) == 0) + if (!DBREG_DR7_ENABLED(d.dr[7], i)) avail++; } - if (avail * 4 < size) + if (avail * 8 < size) return (-1); - for (i = 0; i < 4 && (size != 0); i++) { - if ((d.dr[7] & (3<<(i*2))) == 0) { - if (size > 4) + for (i = 0; i < 4 && (size > 0); i++) { + if (!DBREG_DR7_ENABLED(d.dr[7], i)) { + if (size >= 8 || (avail == 1 && size > 4)) + wsize = 8; + else if (size > 2) wsize = 4; else wsize = size; - if (wsize == 3) - wsize++; amd64_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; size -= wsize; + avail--; } } @@ -648,13 +657,13 @@ db_expr_t addr; db_expr_t size; { + struct dbreg d; int i; - struct dbreg d; fill_dbregs(NULL, &d); for(i = 0; i < 4; i++) { - if (d.dr[7] & (3 << (i*2))) { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) amd64_clr_watch(i, &d); @@ -668,8 +677,7 @@ } -static -char * +static const char * watchtype_str(type) int type; { @@ -691,17 +699,21 @@ fill_dbregs(NULL, &d); db_printf("\nhardware watchpoints:\n"); - db_printf(" watch status type len address\n"); - db_printf(" ----- -------- ---------- --- ----------\n"); + db_printf(" watch status type len address\n"); + db_printf(" ----- -------- ---------- --- ------------------\n"); for (i = 0; i < 4; i++) { - if (d.dr[7] & (0x03 << (i*2))) { - type = (d.dr[7] >> (16+(i*4))) & 3; - len = (d.dr[7] >> (16+(i*4)+2)) & 3; - db_printf(" %-5d %-8s %10s %3d 0x%016lx\n", - i, "enabled", watchtype_str(type), - len + 1, DBREG_DRX((&d), i)); - } - else { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { + type = DBREG_DR7_ACCESS(d.dr[7], i); + len = DBREG_DR7_LEN(d.dr[7], i); + if (len == DBREG_DR7_LEN_8) + len = 8; + else + len++; + db_printf(" %-5d %-8s %10s %3d ", + i, "enabled", watchtype_str(type), len); + db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY); + db_printf("\n"); + } else { db_printf(" %-5d disabled\n", i); } } ==== //depot/projects/linuxolator/src/sys/amd64/amd64/intr_machdep.c#5 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.25 2006/10/16 21:40:46 jhb Exp $ + * $FreeBSD: src/sys/amd64/amd64/intr_machdep.c,v 1.26 2006/11/17 16:41:03 jhb Exp $ */ /* @@ -446,10 +446,6 @@ current_cpu++; if (current_cpu >= num_cpus) current_cpu = 0; - if (bootverbose) { - printf("INTR: Assigning IRQ %d", pic->pic_vector(isrc)); - printf(" to local APIC %u\n", apic_id); - } pic->pic_assign_cpu(isrc, apic_id); } @@ -483,7 +479,7 @@ if (num_cpus <= 1) return; - /* Round-robin assign each enabled source a CPU. */ + /* Round-robin assign a CPU to each enabled source. */ mtx_lock_spin(&intr_table_lock); assign_cpu = 1; for (i = 0; i < NUM_IO_INTS; i++) { ==== //depot/projects/linuxolator/src/sys/amd64/amd64/io_apic.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.25 2006/10/10 23:23:11 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/io_apic.c,v 1.26 2006/11/17 16:41:03 jhb Exp $"); #include "opt_isa.h" @@ -512,13 +512,6 @@ * be routed to other CPUs later after they are enabled. */ intpin->io_cpu = PCPU_GET(apic_id); - if (bootverbose && intpin->io_irq != IRQ_DISABLED) { - printf("ioapic%u: intpin %d -> ", io->io_id, i); - ioapic_print_irq(intpin); - printf(" (%s, %s)\n", intpin->io_edgetrigger ? - "edge" : "level", intpin->io_activehi ? "high" : - "low"); - } value = ioapic_read(apic, IOAPIC_REDTBL_LO(i)); ioapic_write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET); } @@ -583,6 +576,8 @@ return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) return (EINVAL); + if (io->io_pins[pin].io_bus == bus_type) + return (0); io->io_pins[pin].io_bus = bus_type; if (bootverbose) printf("ioapic%u: intpin %d bus %s\n", io->io_id, pin, @@ -666,13 +661,17 @@ ioapic_set_polarity(void *cookie, u_int pin, enum intr_polarity pol) { struct ioapic *io; + int activehi; io = (struct ioapic *)cookie; if (pin >= io->io_numintr || pol == INTR_POLARITY_CONFORM) return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) return (EINVAL); - io->io_pins[pin].io_activehi = (pol == INTR_POLARITY_HIGH); + activehi = (pol == INTR_POLARITY_HIGH); + if (io->io_pins[pin].io_activehi == activehi) + return (0); + io->io_pins[pin].io_activehi = activehi; if (bootverbose) printf("ioapic%u: intpin %d polarity: %s\n", io->io_id, pin, pol == INTR_POLARITY_HIGH ? "high" : "low"); @@ -683,13 +682,17 @@ ioapic_set_triggermode(void *cookie, u_int pin, enum intr_trigger trigger) { struct ioapic *io; + int edgetrigger; io = (struct ioapic *)cookie; if (pin >= io->io_numintr || trigger == INTR_TRIGGER_CONFORM) return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) - return (EINVAL); - io->io_pins[pin].io_edgetrigger = (trigger == INTR_TRIGGER_EDGE); + return (EINVAL); + edgetrigger = (trigger == INTR_TRIGGER_EDGE); + if (io->io_pins[pin].io_edgetrigger == edgetrigger) + return (0); + io->io_pins[pin].io_edgetrigger = edgetrigger; if (bootverbose) printf("ioapic%u: intpin %d trigger: %s\n", io->io_id, pin, trigger == INTR_TRIGGER_EDGE ? "edge" : "level"); ==== //depot/projects/linuxolator/src/sys/amd64/amd64/machdep.c#8 (text+ko) ==== @@ -39,7 +39,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.661 2006/11/15 19:53:47 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/machdep.c,v 1.663 2006/11/17 20:27:01 jhb Exp $"); #include "opt_atalk.h" #include "opt_atpic.h" @@ -1692,7 +1692,6 @@ { struct pcb *pcb; int i; - u_int64_t mask1, mask2; if (td == NULL) { load_dr0(dbregs->dr[0]); @@ -1709,10 +1708,13 @@ * TRCTRAP or a general protection fault right here. * Upper bits of dr6 and dr7 must not be set */ - for (i = 0, mask1 = 0x3<<16, mask2 = 0x2<<16; i < 8; - i++, mask1 <<= 2, mask2 <<= 2) - if ((dbregs->dr[7] & mask1) == mask2) + for (i = 0; i < 4; i++) { + if (DBREG_DR7_ACCESS(dbregs->dr[7], i) == 0x02) + return (EINVAL); + if (td->td_frame->tf_cs == _ucode32sel && + DBREG_DR7_LEN(dbregs->dr[7], i) == DBREG_DR7_LEN_8) return (EINVAL); + } if ((dbregs->dr[6] & 0xffffffff00000000ul) != 0 || (dbregs->dr[7] & 0xffffffff00000000ul) != 0) return (EINVAL); @@ -1733,22 +1735,22 @@ * from within kernel mode? */ - if (dbregs->dr[7] & 0x3) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 0)) { /* dr0 is enabled */ if (dbregs->dr[0] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & 0x3<<2) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 1)) { /* dr1 is enabled */ if (dbregs->dr[1] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & 0x3<<4) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 2)) { /* dr2 is enabled */ if (dbregs->dr[2] >= VM_MAXUSER_ADDRESS) return (EINVAL); } - if (dbregs->dr[7] & 0x3<<6) { + if (DBREG_DR7_ENABLED(dbregs->dr[7], 3)) { /* dr3 is enabled */ if (dbregs->dr[3] >= VM_MAXUSER_ADDRESS) return (EINVAL); ==== //depot/projects/linuxolator/src/sys/amd64/include/reg.h#3 (text+ko) ==== @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)reg.h 5.5 (Berkeley) 1/18/91 - * $FreeBSD: src/sys/amd64/include/reg.h,v 1.36 2006/11/15 19:53:48 jhb Exp $ + * $FreeBSD: src/sys/amd64/include/reg.h,v 1.38 2006/11/17 20:27:01 jhb Exp $ */ #ifndef _MACHINE_REG_H_ @@ -92,9 +92,22 @@ /* Index 8-15: reserved */ }; +#define DBREG_DR7_LOCAL_ENABLE 0x01 +#define DBREG_DR7_GLOBAL_ENABLE 0x02 +#define DBREG_DR7_LEN_1 0x00 /* 1 byte length */ +#define DBREG_DR7_LEN_2 0x01 +#define DBREG_DR7_LEN_4 0x03 +#define DBREG_DR7_LEN_8 0x02 #define DBREG_DR7_EXEC 0x00 /* break on execute */ #define DBREG_DR7_WRONLY 0x01 /* break on write */ #define DBREG_DR7_RDWR 0x03 /* break on read or write */ +#define DBREG_DR7_MASK(i) ((u_long)0xf << ((i) * 4 + 16) | 0x3 << (i) * 2) +#define DBREG_DR7_SET(i, len, access, enable) \ + ((u_long)((len) << 2 | (access)) << ((i) * 4 + 16) | (enable) << (i) * 2) +#define DBREG_DR7_GD 0x2000 +#define DBREG_DR7_ENABLED(d, i) (((d) & 0x3 << (i) * 2) != 0) +#define DBREG_DR7_ACCESS(d, i) ((d) >> ((i) * 4 + 16) & 0x3) +#define DBREG_DR7_LEN(d, i) ((d) >> ((i) * 4 + 18) & 0x3) #define DBREG_DRX(d,x) ((d)->dr[(x)]) /* reference dr0 - dr15 by register number */ ==== //depot/projects/linuxolator/src/sys/arm/arm/nexus.c#3 (text+ko) ==== @@ -40,7 +40,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.9 2006/10/25 21:11:46 cognet Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/nexus.c,v 1.10 2006/11/17 11:56:56 cognet Exp $"); #include #include @@ -142,7 +142,7 @@ int i; for (i = rman_get_start(r); i <= rman_get_end(r); i++) - arm_mask_irq(rman_get_start(r)); + arm_mask_irq(i); error = arm_remove_irqhandler(ih); return (error); } ==== //depot/projects/linuxolator/src/sys/arm/xscale/i80321/ep80219_machdep.c#3 (text+ko) ==== @@ -49,7 +49,7 @@ #include "opt_ddb.h" #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.3 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/ep80219_machdep.c,v 1.4 2006/11/17 00:53:39 kevlo Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -474,7 +474,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = 0xa0000000 + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); ==== //depot/projects/linuxolator/src/sys/arm/xscale/i80321/iq31244_machdep.c#3 (text+ko) ==== @@ -49,7 +49,7 @@ #include "opt_ddb.h" #include -__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.24 2006/10/26 21:42:17 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/xscale/i80321/iq31244_machdep.c,v 1.25 2006/11/17 00:53:39 kevlo Exp $"); #define _ARM32_BUS_DMA_PRIVATE #include @@ -477,7 +477,6 @@ /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); - avail_end = 0xa0000000 + memsize - 1; kdb_init(); return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); ==== //depot/projects/linuxolator/src/sys/ddb/db_watch.c#2 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/ddb/db_watch.c,v 1.27 2005/09/10 03:01:24 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/ddb/db_watch.c,v 1.28 2006/11/17 16:41:56 jhb Exp $"); #include #include @@ -168,11 +168,19 @@ return; } +#ifdef __LP64__ + db_printf(" Map Address Size\n"); +#else db_printf(" Map Address Size\n"); +#endif for (watch = db_watchpoint_list; watch != 0; watch = watch->link) +#ifdef __LP64__ + db_printf("%s%16p %16lx %lx\n", +#else db_printf("%s%8p %8lx %lx\n", +#endif db_map_current(watch->map) ? "*" : " ", (void *)watch->map, (long)watch->loaddr, (long)watch->hiaddr - (long)watch->loaddr); ==== //depot/projects/linuxolator/src/sys/dev/ata/ata-all.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.274 2006/09/11 18:33:59 sos Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/ata/ata-all.c,v 1.275 2006/11/17 11:13:47 sos Exp $"); #include "opt_ata.h" #include @@ -601,12 +601,12 @@ isprint(atadev->param.model[1]))) { struct ata_params *atacap = &atadev->param; char buffer[64]; -#if BYTE_ORDER == BIG_ENDIAN +#ifndef __ARMEB__ int16_t *ptr; for (ptr = (int16_t *)atacap; ptr < (int16_t *)atacap + sizeof(struct ata_params)/2; ptr++) { - *ptr = bswap16(*ptr); + *ptr = le16toh(*ptr); } #endif if (!(!strncmp(atacap->model, "FX", 2) || ==== //depot/projects/linuxolator/src/sys/dev/isp/isp_pci.c#4 (text+ko) ==== @@ -30,7 +30,7 @@ * FreeBSD Version. */ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.125 2006/11/14 08:45:48 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_pci.c,v 1.126 2006/11/17 17:32:45 mjacob Exp $"); #include #include @@ -1057,6 +1057,7 @@ cmd &= ~PCIM_CMD_INTX_DISABLE; } +#ifdef WE_KNEW_WHAT_WE_WERE_DOING if (IS_24XX(isp)) { int reg; @@ -1088,6 +1089,11 @@ pci_write_config(dev, reg, 2, pectl); } } +#else + if (IS_24XX(isp)) { + cmd &= ~PCIM_CMD_INTX_DISABLE; + } +#endif pci_write_config(dev, PCIR_COMMAND, cmd, 2); ==== //depot/projects/linuxolator/src/sys/dev/mpt/mpt_cam.c#6 (text+ko) ==== @@ -94,7 +94,7 @@ * OWNER OR CONTRIBUTOR IS ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include -__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.38 2006/11/15 21:46:36 jb Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/mpt/mpt_cam.c,v 1.40 2006/11/17 00:19:55 mjacob Exp $"); #include #include @@ -3144,14 +3144,16 @@ * XXX: FC cards report MAX_DEVICES of 512- but we * XXX: seem to hang when going higher than 255. */ - if (cpi->max_target > 255) + if (cpi->max_target > 255) { cpi->max_target = 255; + } /* * XXX: VMware ESX reports > 16 devices and then dies * XXX: when we probe. */ - if (mpt->is_spi && cpi->max_target > 15) + if (mpt->is_spi && cpi->max_target > 15) { cpi->max_target = 15; + } cpi->max_lun = 7; cpi->initiator_id = mpt->mpt_ini_id; @@ -3166,8 +3168,7 @@ */ if (mpt->is_fc) { cpi->hba_misc = PIM_NOBUSRESET; - cpi->base_transfer_speed = - mpt->mpt_fcport_speed * 100000; + cpi->base_transfer_speed = 100000; cpi->hba_inquiry = PI_TAG_ABLE; cpi->transport = XPORT_FC; cpi->transport_version = 0; @@ -4151,12 +4152,16 @@ bus_addr_t pptr; request_t *req; - if (length == 0) { + /* + * We enter with resid set to the data load for the command. + */ + tgt = MPT_TGT_STATE(mpt, cmd_req); + if (length == 0 || tgt->resid == 0) { + tgt->resid = 0; mpt_scsi_tgt_status(mpt, NULL, cmd_req, 0, NULL); return; } - tgt = MPT_TGT_STATE(mpt, cmd_req); if ((req = mpt_get_request(mpt, FALSE)) == NULL) { mpt_prt(mpt, "out of resources- dropping local response\n"); return; @@ -4208,7 +4213,7 @@ tgt->ccb = NULL; tgt->req = req; - tgt->resid = 0; + tgt->resid -= length; tgt->bytes_xfered = length; #ifdef WE_TRUST_AUTO_GOOD_STATUS tgt->state = TGT_STATE_MOVING_DATA_AND_STATUS; @@ -4514,6 +4519,13 @@ static void mpt_scsi_tgt_atio(struct mpt_softc *mpt, request_t *req, uint32_t reply_desc) { + static uint8_t null_iqd[SHORT_INQUIRY_LENGTH] = { + 0x7f, 0x00, 0x02, 0x02, 0x20, 0x00, 0x00, 0x32, + 'F', 'R', 'E', 'E', 'B', 'S', 'D', ' ', + 'L', 'S', 'I', '-', 'L', 'O', 'G', 'I', + 'C', ' ', 'N', 'U', 'L', 'D', 'E', 'V', + '0', '0', '0', '1' + }; struct ccb_accept_tio *atiop; lun_id_t lun; int tag_action = 0; @@ -4660,12 +4672,9 @@ * REPORT LUNS gets illegal command. * All other commands get 'no such device'. */ - uint8_t *sp, cond, buf[MPT_SENSE_SIZE]; + size_t len; - mpt_prt(mpt, "CMD 0x%x to unmanaged lun %u\n", - cdbp[0], lun); - memset(buf, 0, MPT_SENSE_SIZE); cond = SCSI_STATUS_CHECK_COND; buf[0] = 0xf0; @@ -4677,31 +4686,38 @@ switch (cdbp[0]) { case INQUIRY: { - static uint8_t iqd[8] = { - 0x7f, 0x0, 0x4, 0x12, 0x0 - }; if (cdbp[1] != 0) { buf[12] = 0x26; buf[13] = 0x01; break; } - mpt_prt(mpt, "local inquiry\n"); + len = min(tgt->resid, cdbp[4]); + len = min(len, sizeof (null_iqd)); + mpt_lprt(mpt, MPT_PRT_DEBUG, + "local inquiry %ld bytes\n", (long) len); mpt_scsi_tgt_local(mpt, req, lun, 1, - iqd, sizeof (iqd)); + null_iqd, len); return; } case REQUEST_SENSE: { buf[2] = 0x0; - mpt_prt(mpt, "local request sense\n"); + len = min(tgt->resid, cdbp[4]); + len = min(len, sizeof (buf)); + mpt_lprt(mpt, MPT_PRT_DEBUG, + "local reqsense %ld bytes\n", (long) len); mpt_scsi_tgt_local(mpt, req, lun, 1, - buf, sizeof (buf)); + buf, len); return; } case REPORT_LUNS: + mpt_lprt(mpt, MPT_PRT_DEBUG, "REPORT LUNS\n"); buf[12] = 0x26; - break; + return; default: + mpt_lprt(mpt, MPT_PRT_DEBUG, + "CMD 0x%x to unmanaged lun %u\n", + cdbp[0], lun); buf[12] = 0x25; break; } ==== //depot/projects/linuxolator/src/sys/dev/nfe/if_nfe.c#4 (text+ko) ==== @@ -21,7 +21,7 @@ /* Driver for NVIDIA nForce MCP Fast Ethernet and Gigabit Ethernet */ #include -__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.7 2006/10/19 10:01:26 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/nfe/if_nfe.c,v 1.8 2006/11/17 16:49:40 obrien Exp $"); /* Uncomment the following line to enable polling. */ /* #define DEVICE_POLLING */ @@ -1130,7 +1130,7 @@ static void nfe_poll(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct nfe_softc *sc = ifp->if_softc; + struct nfe_softc *sc = ifp->if_softc; NFE_LOCK(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING) @@ -1142,7 +1142,7 @@ static void nfe_poll_locked(struct ifnet *ifp, enum poll_cmd cmd, int count) { - struct nfe_softc *sc = ifp->if_softc; + struct nfe_softc *sc = ifp->if_softc; u_int32_t r; NFE_LOCK_ASSERT(sc); ==== //depot/projects/linuxolator/src/sys/fs/procfs/procfs_ioctl.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/fs/procfs/procfs_ioctl.c,v 1.14 2006/11/06 13:41:57 rwatson Exp $ + * $FreeBSD: src/sys/fs/procfs/procfs_ioctl.c,v 1.15 2006/11/17 14:52:38 kib Exp $ */ #include "opt_compat.h" @@ -124,7 +124,7 @@ *(unsigned int *)data = p->p_pfsflags; break; case PIOCWAIT: - while (p->p_step == 0) { + while (p->p_step == 0 && (p->p_flag & P_WEXIT) == 0) { /* sleep until p stops */ error = msleep(&p->p_stype, &p->p_mtx, PWAIT|PCATCH, "pioctl", 0); @@ -142,7 +142,7 @@ break; #ifdef COMPAT_IA32 case PIOCWAIT32: - while (p->p_step == 0) { + while (p->p_step == 0 && (p->p_flag & P_WEXIT) == 0) { /* sleep until p stops */ error = msleep(&p->p_stype, &p->p_mtx, PWAIT|PCATCH, "pioctl", 0); ==== //depot/projects/linuxolator/src/sys/i386/i386/db_trace.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.76 2006/11/15 19:53:48 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/db_trace.c,v 1.78 2006/11/17 19:20:32 jhb Exp $"); #include #include @@ -190,7 +190,7 @@ static void db_print_stack_entry(const char *, int, char **, int *, db_addr_t); static void decode_syscall(int, struct thread *); -static char * watchtype_str(int type); +static const char * watchtype_str(int type); int i386_set_watch(int watchnum, unsigned int watchaddr, int size, int access, struct dbreg *d); int i386_clr_watch(int watchnum, struct dbreg *d); @@ -571,12 +571,11 @@ int access; struct dbreg *d; { - int i; - unsigned int mask; + int i, len; if (watchnum == -1) { - for (i = 0, mask = 0x3; i < 4; i++, mask <<= 2) - if ((d->dr[7] & mask) == 0) + for (i = 0; i < 4; i++) + if (!DBREG_DR7_ENABLED(d->dr[7], i)) break; if (i < 4) watchnum = i; @@ -599,22 +598,28 @@ * we can watch a 1, 2, or 4 byte sized location */ switch (size) { - case 1 : mask = 0x00; break; - case 2 : mask = 0x01 << 2; break; - case 4 : mask = 0x03 << 2; break; - default : return (-1); + case 1: + len = DBREG_DR7_LEN_1; + break; + case 2: + len = DBREG_DR7_LEN_2; + break; + case 4: + len = DBREG_DR7_LEN_4; + break; + default: + return (-1); } - mask |= access; - /* clear the bits we are about to affect */ - d->dr[7] &= ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); /* set drN register to the address, N=watchnum */ DBREG_DRX(d, watchnum) = watchaddr; /* enable the watchpoint */ - d->dr[7] |= (0x2 << (watchnum*2)) | (mask << (watchnum*4+16)); + d->dr[7] |= DBREG_DR7_SET(watchnum, len, access, + DBREG_DR7_GLOBAL_ENABLE); return (watchnum); } @@ -629,7 +634,7 @@ if (watchnum < 0 || watchnum >= 4) return (-1); - d->dr[7] = d->dr[7] & ~((0x3 << (watchnum*2)) | (0x0f << (watchnum*4+16))); + d->dr[7] &= ~DBREG_DR7_MASK(watchnum); DBREG_DRX(d, watchnum) = 0; return (0); @@ -648,21 +653,19 @@ avail = 0; for(i = 0; i < 4; i++) { - if ((d.dr[7] & (3 << (i*2))) == 0) + if (!DBREG_DR7_ENABLED(d.dr[7], i)) avail++; } if (avail * 4 < size) return (-1); - for (i = 0; i < 4 && (size != 0); i++) { - if ((d.dr[7] & (3<<(i*2))) == 0) { - if (size > 4) + for (i = 0; i < 4 && (size > 0); i++) { + if (!DBREG_DR7_ENABLED(d.dr[7], i)) { + if (size > 2) wsize = 4; else wsize = size; - if (wsize == 3) - wsize++; i386_set_watch(i, addr, wsize, DBREG_DR7_WRONLY, &d); addr += wsize; @@ -681,13 +684,13 @@ db_expr_t addr; db_expr_t size; { + struct dbreg d; int i; - struct dbreg d; fill_dbregs(NULL, &d); for(i = 0; i < 4; i++) { - if (d.dr[7] & (3 << (i*2))) { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { if ((DBREG_DRX((&d), i) >= addr) && (DBREG_DRX((&d), i) < addr+size)) i386_clr_watch(i, &d); @@ -701,8 +704,7 @@ } -static -char * +static const char * watchtype_str(type) int type; { @@ -727,21 +729,21 @@ db_printf(" watch status type len address\n"); db_printf(" ----- -------- ---------- --- ----------\n"); for (i = 0; i < 4; i++) { - if (d.dr[7] & (0x03 << (i*2))) { - type = (d.dr[7] >> (16+(i*4))) & 3; - len = (d.dr[7] >> (16+(i*4)+2)) & 3; - db_printf(" %-5d %-8s %10s %3d 0x%08x\n", - i, "enabled", watchtype_str(type), - len+1, DBREG_DRX((&d),i)); - } - else { + if (DBREG_DR7_ENABLED(d.dr[7], i)) { + type = DBREG_DR7_ACCESS(d.dr[7], i); + len = DBREG_DR7_LEN(d.dr[7], i); + db_printf(" %-5d %-8s %10s %3d ", + i, "enabled", watchtype_str(type), len + 1); + db_printsym((db_addr_t)DBREG_DRX((&d), i), DB_STGY_ANY); + db_printf("\n"); + } else { db_printf(" %-5d disabled\n", i); } } db_printf("\ndebug register values:\n"); for (i = 0; i < 8; i++) { - db_printf(" dr%d 0x%08x\n", i, DBREG_DRX((&d),i)); + db_printf(" dr%d 0x%08x\n", i, DBREG_DRX((&d), i)); } db_printf("\n"); } ==== //depot/projects/linuxolator/src/sys/i386/i386/intr_machdep.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.20 2006/10/10 23:23:12 jhb Exp $ + * $FreeBSD: src/sys/i386/i386/intr_machdep.c,v 1.21 2006/11/17 16:41:03 jhb Exp $ */ /* @@ -412,10 +412,6 @@ current_cpu++; if (current_cpu >= num_cpus) current_cpu = 0; - if (bootverbose) { - printf("INTR: Assigning IRQ %d", pic->pic_vector(isrc)); - printf(" to local APIC %u\n", apic_id); - } pic->pic_assign_cpu(isrc, apic_id); } @@ -449,7 +445,7 @@ if (num_cpus <= 1) return; - /* Round-robin assign each enabled source a CPU. */ + /* Round-robin assign a CPU to each enabled source. */ mtx_lock_spin(&intr_table_lock); assign_cpu = 1; for (i = 0; i < NUM_IO_INTS; i++) { ==== //depot/projects/linuxolator/src/sys/i386/i386/io_apic.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/i386/i386/io_apic.c,v 1.29 2006/10/10 23:23:12 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/i386/i386/io_apic.c,v 1.30 2006/11/17 16:41:03 jhb Exp $"); #include "opt_isa.h" @@ -512,13 +512,6 @@ * be routed to other CPUs later after they are enabled. */ intpin->io_cpu = PCPU_GET(apic_id); - if (bootverbose && intpin->io_irq != IRQ_DISABLED) { - printf("ioapic%u: intpin %d -> ", io->io_id, i); - ioapic_print_irq(intpin); - printf(" (%s, %s)\n", intpin->io_edgetrigger ? - "edge" : "level", intpin->io_activehi ? "high" : - "low"); - } value = ioapic_read(apic, IOAPIC_REDTBL_LO(i)); ioapic_write(apic, IOAPIC_REDTBL_LO(i), value | IOART_INTMSET); } @@ -583,6 +576,8 @@ return (EINVAL); if (io->io_pins[pin].io_irq >= NUM_IO_INTS) >>> TRUNCATED FOR MAIL (1000 lines) <<<