From owner-p4-projects@FreeBSD.ORG Thu Aug 13 17:17:00 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 778DD1065673; Thu, 13 Aug 2009 17:17:00 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35B0F106564A for ; Thu, 13 Aug 2009 17:17:00 +0000 (UTC) (envelope-from anchie@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 233198FC4A for ; Thu, 13 Aug 2009 17:17:00 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DHH0Qi019977 for ; Thu, 13 Aug 2009 17:17:00 GMT (envelope-from anchie@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n7DHGxkU019975 for perforce@freebsd.org; Thu, 13 Aug 2009 17:16:59 GMT (envelope-from anchie@FreeBSD.org) Date: Thu, 13 Aug 2009 17:16:59 GMT Message-Id: <200908131716.n7DHGxkU019975@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to anchie@FreeBSD.org using -f From: Ana Kukec To: Perforce Change Reviews Cc: Subject: PERFORCE change 167298 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, 13 Aug 2009 17:17:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=167298 Change 167298 by anchie@anchie_desnimis on 2009/08/13 17:16:30 Integrate. Affected files ... .. //depot/projects/soc2009/anchie_send/src/sys/arm/arm/pmap.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/cddl/compat/opensolaris/kern/opensolaris.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/drm/drm_pciids.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/drm/r600_cp.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/drm/radeon_drv.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/dev/isp/isp_freebsd.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/kern_jail.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/kern_sysctl.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/kern/subr_pcpu.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/bpf.c#5 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/bpf_buffer.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/bpf_zerocopy.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/bpfdesc.h#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/rtsock.c#14 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/vnet.c#2 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net/vnet.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/net80211/ieee80211.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netatalk/at_control.c#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/netinet6/in6.c#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/security/audit/audit.h#3 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/jail.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/pcpu.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/sys/sysctl.h#4 integrate .. //depot/projects/soc2009/anchie_send/src/sys/xdr/xdr_mbuf.c#2 integrate Differences ... ==== //depot/projects/soc2009/anchie_send/src/sys/arm/arm/pmap.c#5 (text+ko) ==== @@ -147,7 +147,7 @@ #include "opt_vm.h" #include -__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.113 2009/07/24 13:50:29 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/arm/arm/pmap.c,v 1.114 2009/08/13 15:56:09 raj Exp $"); #include #include #include @@ -1212,7 +1212,7 @@ CTR4(KTR_PMAP, "pmap_l2cache_wbinv_range: pmap %p is_kernel %d " "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); + cpu_l2cache_wbinv_range(va, rest); len -= rest; va += rest; ==== //depot/projects/soc2009/anchie_send/src/sys/cddl/compat/opensolaris/kern/opensolaris.c#3 (text+ko) ==== @@ -22,7 +22,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/cddl/compat/opensolaris/kern/opensolaris.c,v 1.4 2009/06/13 15:39:12 jamie Exp $ + * $FreeBSD: src/sys/cddl/compat/opensolaris/kern/opensolaris.c,v 1.5 2009/08/13 12:28:30 trasz Exp $ * */ @@ -49,10 +49,6 @@ { int i; - printf("This module (opensolaris) contains code covered by the\n"); - printf("Common Development and Distribution License (CDDL)\n"); - printf("see http://opensolaris.org/os/licensing/opensolaris_license/\n"); - /* * "Enable" all CPUs even though they may not exist just so * that the asserts work. On FreeBSD, if a CPU exists, it is ==== //depot/projects/soc2009/anchie_send/src/sys/dev/drm/drm_pciids.h#3 (text+ko) ==== @@ -1,5 +1,5 @@ /* - * $FreeBSD: src/sys/dev/drm/drm_pciids.h,v 1.16 2009/07/09 16:39:28 rnoland Exp $ + * $FreeBSD: src/sys/dev/drm/drm_pciids.h,v 1.18 2009/08/12 12:57:02 rnoland Exp $ */ /* This file is auto-generated from the drm_pciids.txt in the DRM CVS @@ -259,9 +259,12 @@ {0x1002, 0x940F, CHIP_R600|RADEON_NEW_MEMMAP, "ATI FireGL V7600"}, \ {0x1002, 0x94A0, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4830"}, \ {0x1002, 0x94A1, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4850"}, \ + {0x1002, 0x94A3, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M7740"}, \ {0x1002, 0x94B1, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI RV740"}, \ {0x1002, 0x94B3, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B4, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4700 Series"}, \ {0x1002, 0x94B5, CHIP_RV740|RADEON_NEW_MEMMAP, "ATI Radeon HD 4770"}, \ + {0x1002, 0x94B9, CHIP_RV740|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro M5750"}, \ {0x1002, 0x94C0, CHIP_RV610|RADEON_NEW_MEMMAP, "RV610"}, \ {0x1002, 0x94C1, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 XT"}, \ {0x1002, 0x94C3, CHIP_RV610|RADEON_NEW_MEMMAP, "Radeon HD 2400 Pro"}, \ @@ -327,6 +330,11 @@ {0x1002, 0x9614, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3300 Graphics"}, \ {0x1002, 0x9615, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3200 Graphics"}, \ {0x1002, 0x9616, CHIP_RS780|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 3000 Graphics"}, \ + {0x1002, 0x9710, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon HD 4200"}, \ + {0x1002, 0x9711, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Radeon 4100"}, \ + {0x1002, 0x9712, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon HD 4200"}, \ + {0x1002, 0x9713, CHIP_RS880|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI Mobility Radeon 4100"}, \ + {0x1002, 0x9714, CHIP_RS880|RADEON_NEW_MEMMAP|RADEON_IS_IGP, "ATI RS880"}, \ {0x1002, 0x9440, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ {0x1002, 0x9441, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4870 X2"}, \ {0x1002, 0x9442, CHIP_RV770|RADEON_NEW_MEMMAP, "ATI Radeon 4800 Series"}, \ @@ -350,6 +358,7 @@ {0x1002, 0x9487, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x948F, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon RV730 (AGP)"}, \ {0x1002, 0x9490, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4670"}, \ + {0x1002, 0x9495, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4600 Series"}, \ {0x1002, 0x9498, CHIP_RV730|RADEON_NEW_MEMMAP, "ATI Radeon HD 4650"}, \ {0x1002, 0x9480, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4650"}, \ {0x1002, 0x9488, CHIP_RV730|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon HD 4670"}, \ @@ -366,6 +375,7 @@ {0x1002, 0x9552, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4300 Series"}, \ {0x1002, 0x9553, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ {0x1002, 0x9555, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI Mobility Radeon 4500 Series"}, \ + {0x1002, 0x9557, CHIP_RV710|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP, "ATI FirePro RG220"}, \ {0, 0, 0, NULL} #define r128_PCI_IDS \ ==== //depot/projects/soc2009/anchie_send/src/sys/dev/drm/r600_cp.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/r600_cp.c,v 1.8 2009/07/09 16:39:28 rnoland Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/r600_cp.c,v 1.9 2009/08/12 12:57:02 rnoland Exp $"); #include "dev/drm/drmP.h" #include "dev/drm/drm.h" @@ -318,7 +318,8 @@ pfp = RV670_pfp_microcode; break; case CHIP_RS780: - DRM_INFO("Loading RS780 Microcode\n"); + case CHIP_RS880: + DRM_INFO("Loading RS780/RS880 Microcode\n"); cp = RS780_cp_microcode; pfp = RS780_pfp_microcode; break; @@ -722,6 +723,7 @@ break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: dev_priv->r600_max_pipes = 1; dev_priv->r600_max_tile_pipes = 1; @@ -856,7 +858,8 @@ ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV630) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_DB_DEBUG, R600_PREZ_MUST_WAIT_FOR_POSTZ_DONE); else RADEON_WRITE(R600_DB_DEBUG, 0); @@ -874,7 +877,8 @@ sq_ms_fifo_sizes = RADEON_READ(R600_SQ_MS_FIFO_SIZES); if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { sq_ms_fifo_sizes = (R600_CACHE_FIFO_SIZE(0xa) | R600_FETCH_FIFO_HIWATER(0xa) | R600_DONE_FIFO_HIWATER(0xe0) | @@ -917,7 +921,8 @@ R600_NUM_ES_STACK_ENTRIES(0)); } else if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) { + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) { /* no vertex cache */ sq_config &= ~R600_VC_ENABLE; @@ -974,7 +979,8 @@ if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV610) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV620) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780)) + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS780) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS880)) RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_TC_ONLY)); else RADEON_WRITE(R600_VGT_CACHE_INVALIDATION, R600_CACHE_INVALIDATION(R600_VC_AND_TC)); @@ -1017,6 +1023,7 @@ break; case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: gs_prim_buffer_depth = 32; break; @@ -1062,6 +1069,7 @@ switch (dev_priv->flags & RADEON_FAMILY_MASK) { case CHIP_RV610: case CHIP_RS780: + case CHIP_RS880: case CHIP_RV620: tc_cntl = R600_TC_L2_SIZE(8); break; ==== //depot/projects/soc2009/anchie_send/src/sys/dev/drm/radeon_drv.h#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_drv.h,v 1.23 2009/07/09 16:39:28 rnoland Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/drm/radeon_drv.h,v 1.24 2009/08/12 12:57:02 rnoland Exp $"); #ifndef __RADEON_DRV_H__ #define __RADEON_DRV_H__ @@ -145,6 +145,7 @@ CHIP_RV635, CHIP_RV670, CHIP_RS780, + CHIP_RS880, CHIP_RV770, CHIP_RV740, CHIP_RV730, ==== //depot/projects/soc2009/anchie_send/src/sys/dev/isp/isp_freebsd.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ * Platform (FreeBSD) dependent common attachment code for Qlogic adapters. */ #include -__FBSDID("$FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.150 2009/08/01 01:04:26 mjacob Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/isp/isp_freebsd.c,v 1.151 2009/08/13 01:17:26 mjacob Exp $"); #include #include #include @@ -5280,6 +5280,10 @@ return (seed); } seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) { + return (seed); + } + return (0x400000007F000009ull); } else { seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } ==== //depot/projects/soc2009/anchie_send/src/sys/kern/kern_jail.c#4 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_jail.c,v 1.118 2009/08/01 19:26:27 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_jail.c,v 1.120 2009/08/13 10:26:34 bz Exp $"); #include "opt_compat.h" #include "opt_ddb.h" @@ -88,7 +88,11 @@ .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), +#ifdef VIMAGE + .pr_flags = PR_HOST|PR_VNET, +#else .pr_flags = PR_HOST, +#endif .pr_allow = PR_ALLOW_ALL, }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); @@ -472,10 +476,11 @@ #endif struct vfsopt *opt; struct vfsoptlist *opts; - struct prison *pr, *deadpr, *mypr, *ppr, *tpr, *tppr; + struct prison *pr, *deadpr, *mypr, *ppr, *tpr; struct vnode *root; char *domain, *errmsg, *host, *name, *p, *path, *uuid; #if defined(INET) || defined(INET6) + struct prison *tppr; void *op; #endif unsigned long hid; @@ -3307,6 +3312,25 @@ mtx_unlock(&cred->cr_prison->pr_mtx); } +#ifdef VIMAGE +/* + * Determine whether the prison represented by cred owns + * its vnet rather than having it inherited. + * + * Returns 1 in case the prison owns the vnet, 0 otherwise. + */ +int +prison_owns_vnet(struct ucred *cred) +{ + + /* + * vnets cannot be added/removed after jail creation, + * so no need to lock here. + */ + return (cred->cr_prison->pr_flags & PR_VNET ? 1 : 0); +} +#endif + /* * Determine whether the subject represented by cred can "see" * status of a mount point. ==== //depot/projects/soc2009/anchie_send/src/sys/kern/kern_sysctl.c#5 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.201 2009/08/01 19:26:27 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/kern_sysctl.c,v 1.202 2009/08/13 10:26:34 bz Exp $"); #include "opt_compat.h" #include "opt_ktrace.h" @@ -1381,10 +1381,18 @@ /* Is this sysctl writable by only privileged users? */ if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) { + int priv; + if (oid->oid_kind & CTLFLAG_PRISON) - error = priv_check(req->td, PRIV_SYSCTL_WRITEJAIL); + priv = PRIV_SYSCTL_WRITEJAIL; +#ifdef VIMAGE + else if ((oid->oid_kind & CTLFLAG_VNET) && + prison_owns_vnet(req->td->td_ucred)) + priv = PRIV_SYSCTL_WRITEJAIL; +#endif else - error = priv_check(req->td, PRIV_SYSCTL_WRITE); + priv = PRIV_SYSCTL_WRITE; + error = priv_check(req->td, priv); if (error) return (error); } ==== //depot/projects/soc2009/anchie_send/src/sys/kern/subr_pcpu.c#3 (text+ko) ==== @@ -46,7 +46,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/kern/subr_pcpu.c,v 1.15 2009/06/25 01:31:59 jeff Exp $"); +__FBSDID("$FreeBSD: src/sys/kern/subr_pcpu.c,v 1.16 2009/08/12 12:06:16 bz Exp $"); #include "opt_ddb.h" @@ -313,6 +313,18 @@ } #ifdef DDB +DB_SHOW_COMMAND(dpcpu_off, db_show_dpcpu_off) +{ + int id; + + for (id = 0; id <= mp_maxid; id++) { + if (CPU_ABSENT(id)) + continue; + db_printf("dpcpu_off[%2d] = 0x%jx (+ DPCPU_START = %p)\n", + id, (uintmax_t)dpcpu_off[id], + (void *)(uintptr_t)(dpcpu_off[id] + DPCPU_START)); + } +} static void show_pcpu(struct pcpu *pc) ==== //depot/projects/soc2009/anchie_send/src/sys/net/bpf.c#5 (text+ko) ==== @@ -35,7 +35,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/bpf.c,v 1.215 2009/08/01 19:26:27 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/net/bpf.c,v 1.216 2009/08/12 17:28:53 jkim Exp $"); #include "opt_bpf.h" #include "opt_netgraph.h" @@ -1585,6 +1585,9 @@ bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int slen; int gottime; struct timeval tv; @@ -1601,8 +1604,9 @@ * the interface pointers on the mbuf to figure it out. */ #ifdef BPF_JITTER - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL) - slen = (*(d->bd_bfilter->func))(pkt, pktlen, pktlen); + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; + if (bf != NULL) + slen = (*(bf->func))(pkt, pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, pkt, pktlen, pktlen); @@ -1634,6 +1638,9 @@ bpf_mtap(struct bpf_if *bp, struct mbuf *m) { struct bpf_d *d; +#ifdef BPF_JITTER + bpf_jit_filter *bf; +#endif u_int pktlen, slen; int gottime; struct timeval tv; @@ -1655,11 +1662,10 @@ BPFD_LOCK(d); ++d->bd_rcount; #ifdef BPF_JITTER + bf = bpf_jitter_enable != 0 ? d->bd_bfilter : NULL; /* XXX We cannot handle multiple mbufs. */ - if (bpf_jitter_enable != 0 && d->bd_bfilter != NULL && - m->m_next == NULL) - slen = (*(d->bd_bfilter->func))(mtod(m, u_char *), - pktlen, pktlen); + if (bf != NULL && m->m_next == NULL) + slen = (*(bf->func))(mtod(m, u_char *), pktlen, pktlen); else #endif slen = bpf_filter(d->bd_rfilter, (u_char *)m, pktlen, 0); ==== //depot/projects/soc2009/anchie_send/src/sys/net/bpf_buffer.c#2 (text+ko) ==== @@ -62,7 +62,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/bpf_buffer.c,v 1.3 2008/07/25 23:58:09 trhodes Exp $"); +__FBSDID("$FreeBSD: src/sys/net/bpf_buffer.c,v 1.4 2009/08/12 17:28:53 jkim Exp $"); #include "opt_bpf.h" @@ -77,7 +77,6 @@ #include #include #include -#include #include /* ==== //depot/projects/soc2009/anchie_send/src/sys/net/bpf_zerocopy.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/bpf_zerocopy.c,v 1.6 2009/03/07 10:21:37 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/net/bpf_zerocopy.c,v 1.7 2009/08/12 17:28:53 jkim Exp $"); #include "opt_bpf.h" @@ -46,7 +46,6 @@ #include #include -#include #include #include ==== //depot/projects/soc2009/anchie_send/src/sys/net/bpfdesc.h#2 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)bpfdesc.h 8.1 (Berkeley) 6/10/93 * - * $FreeBSD: src/sys/net/bpfdesc.h,v 1.40 2008/08/01 22:08:14 antoine Exp $ + * $FreeBSD: src/sys/net/bpfdesc.h,v 1.41 2009/08/12 17:28:53 jkim Exp $ */ #ifndef _NET_BPFDESC_H_ @@ -72,9 +72,7 @@ u_long bd_rtout; /* Read timeout in 'ticks' */ struct bpf_insn *bd_rfilter; /* read filter code */ struct bpf_insn *bd_wfilter; /* write filter code */ -#ifdef BPF_JITTER - bpf_jit_filter *bd_bfilter; /* binary filter code */ -#endif + void *bd_bfilter; /* binary filter code */ u_int64_t bd_rcount; /* number of packets received */ u_int64_t bd_dcount; /* number of packets dropped */ ==== //depot/projects/soc2009/anchie_send/src/sys/net/rtsock.c#14 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)rtsock.c 8.7 (Berkeley) 10/12/95 - * $FreeBSD: src/sys/net/rtsock.c,v 1.181 2009/08/01 19:26:27 rwatson Exp $ + * $FreeBSD: src/sys/net/rtsock.c,v 1.182 2009/08/13 09:29:52 bz Exp $ */ #include "opt_sctp.h" #include "opt_mpath.h" @@ -1280,11 +1280,12 @@ bcopy(data, mtod(n, void *), data_len); printf("rtsock.c: rt_msg3(), nakon bcopy!\n"); n->m_len = data_len; - printf("Nakon n->m_len = data_len;\n"); + printf("Nakon n->m_len = data_len = %d;\n", data_len); m->m_next = n; printf("Nakon m->m_next = n;\n"); } else if (data_len > 0) { printf("rtsock.c: rt_msg3(), prije bcopy 2!\n"); + printf("data_len = %d\n", data_len); bcopy(data, mtod(m, u_int8_t *) + m->m_len, data_len); printf("rtsock.c: rt_msg3(), nakon bcopy 2!\n"); m->m_len += data_len; @@ -1597,7 +1598,7 @@ /* * take care of routing entries */ - for (error = 0; error == 0 && i <= lim; i++) + for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1606,6 +1607,7 @@ RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; + } break; case NET_RT_IFLIST: ==== //depot/projects/soc2009/anchie_send/src/sys/net/vnet.c#2 (text+ko) ==== @@ -34,7 +34,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net/vnet.c,v 1.8 2009/08/01 22:22:45 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/net/vnet.c,v 1.9 2009/08/12 12:00:21 bz Exp $"); #include "opt_ddb.h" @@ -615,14 +615,20 @@ { VNET_ITERATOR_DECL(vnet_iter); -#if SIZE_MAX == UINT32_MAX /* 32-bit arch */ - db_printf(" vnet ifs socks\n"); -#else /* 64-bit arch, most probaly... */ - db_printf(" vnet ifs socks\n"); -#endif VNET_FOREACH(vnet_iter) { - db_printf("%p %3d %5d\n", vnet_iter, vnet_iter->vnet_ifcnt, - vnet_iter->vnet_sockcnt); + db_printf("vnet = %p\n", vnet_iter); + db_printf(" vnet_magic_n = 0x%x (%s, orig 0x%x)\n", + vnet_iter->vnet_magic_n, + (vnet_iter->vnet_magic_n == VNET_MAGIC_N) ? + "ok" : "mismatch", VNET_MAGIC_N); + db_printf(" vnet_ifcnt = %u\n", vnet_iter->vnet_ifcnt); + db_printf(" vnet_sockcnt = %u\n", vnet_iter->vnet_sockcnt); + db_printf(" vnet_data_mem = %p\n", vnet_iter->vnet_data_mem); + db_printf(" vnet_data_base = 0x%jx\n", + (uintmax_t)vnet_iter->vnet_data_base); + db_printf("\n"); + if (db_pager_quit) + break; } } #endif ==== //depot/projects/soc2009/anchie_send/src/sys/net/vnet.h#4 (text+ko) ==== @@ -32,7 +32,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/net/vnet.h,v 1.25 2009/08/01 21:54:15 rwatson Exp $ + * $FreeBSD: src/sys/net/vnet.h,v 1.27 2009/08/13 10:26:34 bz Exp $ */ /*- @@ -185,12 +185,14 @@ * Virtual network stack memory allocator, which allows global variables to * be automatically instantiated for each network stack instance. */ +__asm__( #if defined(__arm__) -__asm__(".section " VNET_SETNAME ", \"aw\", %progbits"); + ".section " VNET_SETNAME ", \"aw\", %progbits\n" #else -__asm__(".section " VNET_SETNAME ", \"aw\", @progbits"); + ".section " VNET_SETNAME ", \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); #define VNET_NAME(n) vnet_entry_##n #define VNET_DECLARE(t, n) extern t VNET_NAME(n) @@ -230,21 +232,25 @@ int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_int, "I", descr) #define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ - SYSCTL_OID(parent, nbr, name, access, ptr, arg, handler, fmt, \ - descr) + SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \ + handler, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), arg, \ - len, vnet_sysctl_handle_string, "A", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_STRING|CTLFLAG_VNET|(access), \ + arg, len, vnet_sysctl_handle_string, "A", descr) #define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), ptr, \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \ descr) #define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_uint, "IU", descr) #define VNET_SYSCTL_ARG(req, arg1) do { \ if (arg1 != NULL) \ ==== //depot/projects/soc2009/anchie_send/src/sys/net80211/ieee80211.c#4 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.85 2009/07/31 19:12:19 sam Exp $"); +__FBSDID("$FreeBSD: src/sys/net80211/ieee80211.c,v 1.86 2009/08/12 21:19:19 sam Exp $"); /* * IEEE 802.11 generic handler @@ -573,11 +573,13 @@ /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); ==== //depot/projects/soc2009/anchie_send/src/sys/netatalk/at_control.c#3 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netatalk/at_control.c,v 1.52 2009/06/24 21:36:09 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netatalk/at_control.c,v 1.53 2009/08/12 10:44:13 rwatson Exp $"); #include #include @@ -276,7 +276,7 @@ * If the request is specifying phase 1, then * only look at a phase one address */ - AT_IFADDR_RUNLOCK(); + AT_IFADDR_RLOCK(); for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { if (aa->aa_ifp == ifp && (aa->aa_flags & AFA_PHASE2) == 0) @@ -286,7 +286,7 @@ ifa_free(&oaa->aa_ifa); if (aa != NULL && oaa != aa) ifa_ref(&aa->aa_ifa); - AT_IFADDR_RLOCK(); + AT_IFADDR_RUNLOCK(); } else { struct at_ifaddr *oaa; ==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/in6.c#4 (text+ko) ==== @@ -61,7 +61,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netinet6/in6.c,v 1.121 2009/08/01 19:26:27 rwatson Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet6/in6.c,v 1.122 2009/08/12 19:15:26 qingli Exp $"); #include "opt_inet.h" #include "opt_inet6.h" @@ -1750,21 +1750,12 @@ * interface that share the same destination. */ plen = in6_mask2len(&ia->ia_prefixmask.sin6_addr, NULL); /* XXX */ - if (!(ia->ia_flags & IFA_ROUTE) && plen == 128) { - struct sockaddr *dstaddr; + if (!(ia->ia_flags & IFA_ROUTE) && plen == 128 && + ia->ia_dstaddr.sin6_family == AF_INET6) { int rtflags = RTF_UP | RTF_HOST; - /* - * use the interface address if configuring an - * interface address with a /128 prefix len - */ - if (ia->ia_dstaddr.sin6_family == AF_INET6) - dstaddr = (struct sockaddr *)&ia->ia_dstaddr; - else - dstaddr = (struct sockaddr *)&ia->ia_addr; - error = rtrequest(RTM_ADD, - (struct sockaddr *)dstaddr, + (struct sockaddr *)&ia->ia_dstaddr, (struct sockaddr *)&ia->ia_addr, (struct sockaddr *)&ia->ia_prefixmask, ia->ia_flags | rtflags, NULL); ==== //depot/projects/soc2009/anchie_send/src/sys/security/audit/audit.h#3 (text) ==== @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $FreeBSD: src/sys/security/audit/audit.h,v 1.29 2009/07/29 07:44:43 rwatson Exp $ + * $FreeBSD: src/sys/security/audit/audit.h,v 1.30 2009/08/12 10:45:45 rwatson Exp $ */ /* @@ -232,7 +232,7 @@ #define AUDIT_ARG_RGID(rgid) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_gid((rgid)); \ + audit_arg_rgid((rgid)); \ } while (0) #define AUDIT_ARG_RUID(ruid) do { \ ==== //depot/projects/soc2009/anchie_send/src/sys/sys/jail.h#4 (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/sys/jail.h,v 1.50 2009/07/25 14:48:57 jamie Exp $ + * $FreeBSD: src/sys/sys/jail.h,v 1.51 2009/08/13 10:26:34 bz Exp $ */ #ifndef _SYS_JAIL_H_ @@ -341,6 +341,7 @@ void getcredhostid(struct ucred *, unsigned long *); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); +int prison_owns_vnet(struct ucred *); int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); ==== //depot/projects/soc2009/anchie_send/src/sys/sys/pcpu.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/sys/pcpu.h,v 1.33 2009/07/14 22:48:30 rwatson Exp $ + * $FreeBSD: src/sys/sys/pcpu.h,v 1.34 2009/08/12 10:26:03 bz Exp $ */ #ifndef _SYS_PCPU_H_ @@ -56,12 +56,14 @@ extern uintptr_t *__start_set_pcpu; extern uintptr_t *__stop_set_pcpu; +__asm__( #if defined(__arm__) -__asm__(".section set_pcpu, \"aw\", %progbits"); + ".section set_pcpu, \"aw\", %progbits\n" #else -__asm__(".section set_pcpu, \"aw\", @progbits"); + ".section set_pcpu, \"aw\", @progbits\n" #endif -__asm__(".previous"); + "\t.p2align " __XSTRING(CACHE_LINE_SHIFT) "\n" + "\t.previous"); /* * Array of dynamic pcpu base offsets. Indexed by id. ==== //depot/projects/soc2009/anchie_send/src/sys/sys/sysctl.h#4 (text+ko) ==== @@ -30,7 +30,7 @@ * SUCH DAMAGE. * * @(#)sysctl.h 8.1 (Berkeley) 6/2/93 - * $FreeBSD: src/sys/sys/sysctl.h,v 1.176 2009/07/24 19:12:19 brooks Exp $ + * $FreeBSD: src/sys/sys/sysctl.h,v 1.177 2009/08/13 10:26:34 bz Exp $ */ #ifndef _SYS_SYSCTL_H_ @@ -85,6 +85,7 @@ #define CTLMASK_SECURE 0x00F00000 /* Secure level */ #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) /* ==== //depot/projects/soc2009/anchie_send/src/sys/xdr/xdr_mbuf.c#2 (text+ko) ==== @@ -26,7 +26,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/xdr/xdr_mbuf.c,v 1.4 2008/11/13 14:36:52 dfr Exp $"); +__FBSDID("$FreeBSD: src/sys/xdr/xdr_mbuf.c,v 1.5 2009/08/12 16:27:51 rmacklem Exp $"); #include #include @@ -282,6 +282,8 @@ size_t available; char *p; + if (!m) + return (0); if (xdrs->x_op == XDR_ENCODE) { available = M_TRAILINGSPACE(m) + (m->m_len - xdrs->x_handy); } else {