From hrs at FreeBSD.org Wed Oct 8 16:44:36 2008 From: hrs at FreeBSD.org (Hiroki Sato) Date: Wed Oct 8 16:44:48 2008 Subject: svn commit: r183702 - stable/7/release/doc/en_US.ISO8859-1/relnotes Message-ID: <200810081644.m98Giakt038613@svn.freebsd.org> Author: hrs Date: Wed Oct 8 16:44:35 2008 New Revision: 183702 URL: http://svn.freebsd.org/changeset/base/183702 Log: OpenSSH has been upgraded to 5.1p1. Approved by: re (implicit) Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Oct 8 14:45:07 2008 (r183701) +++ stable/7/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Oct 8 16:44:35 2008 (r183702) @@ -274,6 +274,9 @@ OpenPAM has been updated from the Figwort release to the Hydrangea release. + OpenSSH has been updated from + 4.5p1 to 5.1p1. + sendmail has been updated from 8.14.2 to 8.14.3. From marius at FreeBSD.org Wed Oct 8 21:45:57 2008 From: marius at FreeBSD.org (Marius Strobl) Date: Wed Oct 8 21:46:14 2008 Subject: svn commit: r183710 - in stable/7/sys: . boot/sparc64/loader Message-ID: <200810082145.m98LjuRb044033@svn.freebsd.org> Author: marius Date: Wed Oct 8 21:45:56 2008 New Revision: 183710 URL: http://svn.freebsd.org/changeset/base/183710 Log: MFC: r183628 Disable ATAPI DMA as it's once again broken in that it causes data corruption with the on-board AcerLabs M5229 controllers. While at it, remove the pointless "nothing to autoload yet." message. Approved by: re (blackend) Modified: stable/7/sys/ (props changed) stable/7/sys/boot/sparc64/loader/main.c Modified: stable/7/sys/boot/sparc64/loader/main.c ============================================================================== --- stable/7/sys/boot/sparc64/loader/main.c Wed Oct 8 21:10:55 2008 (r183709) +++ stable/7/sys/boot/sparc64/loader/main.c Wed Oct 8 21:45:56 2008 (r183710) @@ -222,7 +222,7 @@ static int sparc64_autoload(void) { - printf("nothing to autoload yet.\n"); + setenv("hw.ata.atapi_dma", "0", 0); return (0); } From jhb at FreeBSD.org Thu Oct 9 17:52:48 2008 From: jhb at FreeBSD.org (John Baldwin) Date: Thu Oct 9 17:52:55 2008 Subject: svn commit: r183726 - in stable/7/sys: . kern Message-ID: <200810091752.m99HqmLs067782@svn.freebsd.org> Author: jhb Date: Thu Oct 9 17:52:47 2008 New Revision: 183726 URL: http://svn.freebsd.org/changeset/base/183726 Log: MFC: Wait until after dropping the receive socket buffer lock to allocate space to store the socket address stored in the first mbuf in a packet chain in soreceive_dgram(). Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/uipc_socket.c Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Thu Oct 9 14:55:45 2008 (r183725) +++ stable/7/sys/kern/uipc_socket.c Thu Oct 9 17:52:47 2008 (r183726) @@ -1928,34 +1928,11 @@ soreceive_dgram(struct socket *so, struc SBLASTRECORDCHK(&so->so_rcv); SBLASTMBUFCHK(&so->so_rcv); nextrecord = m->m_nextpkt; - if (pr->pr_flags & PR_ADDR) { - KASSERT(m->m_type == MT_SONAME, - ("m->m_type == %d", m->m_type)); - if (psa != NULL) - *psa = sodupsockaddr(mtod(m, struct sockaddr *), - M_NOWAIT); - sbfree(&so->so_rcv, m); - so->so_rcv.sb_mb = m_free(m); - m = so->so_rcv.sb_mb; - sockbuf_pushsync(&so->so_rcv, nextrecord); - } - if (m == NULL) { - /* XXXRW: Can this happen? */ - SOCKBUF_UNLOCK(&so->so_rcv); - return (0); - } - KASSERT(m->m_nextpkt == nextrecord, - ("soreceive_dgram: post-control, nextrecord !sync")); if (nextrecord == NULL) { - KASSERT(so->so_rcv.sb_mb == m, - ("soreceive_dgram: post-control, sb_mb!=m")); KASSERT(so->so_rcv.sb_lastrecord == m, ("soreceive_dgram: lastrecord != m")); } - SBLASTRECORDCHK(&so->so_rcv); - SBLASTMBUFCHK(&so->so_rcv); - KASSERT(m == so->so_rcv.sb_mb, ("soreceive_dgram: m not sb_mb")); KASSERT(so->so_rcv.sb_mb->m_nextpkt == nextrecord, ("soreceive_dgram: m_nextpkt != nextrecord")); @@ -1978,6 +1955,19 @@ soreceive_dgram(struct socket *so, struc SBLASTMBUFCHK(&so->so_rcv); SOCKBUF_UNLOCK(&so->so_rcv); + if (pr->pr_flags & PR_ADDR) { + KASSERT(m->m_type == MT_SONAME, + ("m->m_type == %d", m->m_type)); + if (psa != NULL) + *psa = sodupsockaddr(mtod(m, struct sockaddr *), + M_NOWAIT); + m = m_free(m); + } + if (m == NULL) { + /* XXXRW: Can this happen? */ + return (0); + } + /* * Packet to copyout() is now in 'm' and it is disconnected from the * queue. From jhb at FreeBSD.org Thu Oct 9 20:40:12 2008 From: jhb at FreeBSD.org (John Baldwin) Date: Thu Oct 9 20:40:28 2008 Subject: svn commit: r183732 - in stable/7/sys: . kern Message-ID: <200810092040.m99KeBIN071046@svn.freebsd.org> Author: jhb Date: Thu Oct 9 20:40:11 2008 New Revision: 183732 URL: http://svn.freebsd.org/changeset/base/183732 Log: MFC: Check for duplicate attempts to add the same positive entry to the name cache. If a duplicate attempt is made, just do nothing. This fixes a race with shared locking in pathname lockups. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/vfs_cache.c Modified: stable/7/sys/kern/vfs_cache.c ============================================================================== --- stable/7/sys/kern/vfs_cache.c Thu Oct 9 20:09:56 2008 (r183731) +++ stable/7/sys/kern/vfs_cache.c Thu Oct 9 20:40:11 2008 (r183732) @@ -496,8 +496,39 @@ cache_enter(dvp, vp, cnp) hold = 0; zap = 0; + + /* + * Calculate the hash key and setup as much of the new + * namecache entry as possible before acquiring the lock. + */ ncp = cache_alloc(cnp->cn_namelen); + ncp->nc_vp = vp; + ncp->nc_dvp = dvp; + len = ncp->nc_nlen = cnp->cn_namelen; + hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); + bcopy(cnp->cn_nameptr, ncp->nc_name, len); + hash = fnv_32_buf(&dvp, sizeof(dvp), hash); CACHE_LOCK(); + + /* + * See if this vnode is already in the cache with this name. + * This can happen with concurrent lookups of the same path + * name. + */ + if (vp) { + struct namecache *n2; + + TAILQ_FOREACH(n2, &vp->v_cache_dst, nc_dst) { + if (n2->nc_dvp == dvp && + n2->nc_nlen == cnp->cn_namelen && + !bcmp(n2->nc_name, cnp->cn_nameptr, n2->nc_nlen)) { + CACHE_UNLOCK(); + cache_free(ncp); + return; + } + } + } + numcache++; if (!vp) { numneg++; @@ -509,16 +540,9 @@ cache_enter(dvp, vp, cnp) } /* - * Set the rest of the namecache entry elements, calculate it's - * hash key and insert it into the appropriate chain within - * the cache entries table. + * Insert the new namecache entry into the appropriate chain + * within the cache entries table. */ - ncp->nc_vp = vp; - ncp->nc_dvp = dvp; - len = ncp->nc_nlen = cnp->cn_namelen; - hash = fnv_32_buf(cnp->cn_nameptr, len, FNV1_32_INIT); - bcopy(cnp->cn_nameptr, ncp->nc_name, len); - hash = fnv_32_buf(&dvp, sizeof(dvp), hash); ncpp = NCHHASH(hash); LIST_INSERT_HEAD(ncpp, ncp, nc_hash); if (LIST_EMPTY(&dvp->v_cache_src)) { From rwatson at FreeBSD.org Fri Oct 10 11:40:00 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Fri Oct 10 11:40:12 2008 Subject: svn commit: r183743 - in stable/7/sys: . kern Message-ID: <200810101139.m9ABdxfw090804@svn.freebsd.org> Author: rwatson Date: Fri Oct 10 11:39:59 2008 New Revision: 183743 URL: http://svn.freebsd.org/changeset/base/183743 Log: Merge r183563 from head to stable/7: Remove or update several stale comments. A bit of whitespace/style cleanup. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/uipc_usrreq.c Modified: stable/7/sys/kern/uipc_usrreq.c ============================================================================== --- stable/7/sys/kern/uipc_usrreq.c Fri Oct 10 07:16:44 2008 (r183742) +++ stable/7/sys/kern/uipc_usrreq.c Fri Oct 10 11:39:59 2008 (r183743) @@ -575,8 +575,8 @@ uipc_detach(struct socket *so) } /* - * We hold the global lock, so it's OK to acquire multiple pcb locks - * at a time. + * We hold the global lock exclusively, so it's OK to acquire + * multiple pcb locks at a time. */ while (!LIST_EMPTY(&unp->unp_refs)) { struct unpcb *ref = LIST_FIRST(&unp->unp_refs); @@ -741,8 +741,6 @@ uipc_rcvd(struct socket *so, int flags) return (0); } -/* pru_rcvoob is EOPNOTSUPP */ - static int uipc_send(struct socket *so, int flags, struct mbuf *m, struct sockaddr *nam, struct mbuf *control, struct thread *td) @@ -760,15 +758,12 @@ uipc_send(struct socket *so, int flags, error = EOPNOTSUPP; goto release; } - if (control != NULL && (error = unp_internalize(&control, td))) goto release; - if ((nam != NULL) || (flags & PRUS_EOF)) UNP_GLOBAL_WLOCK(); else UNP_GLOBAL_RLOCK(); - switch (so->so_type) { case SOCK_DGRAM: { @@ -786,6 +781,7 @@ uipc_send(struct socket *so, int flags, break; unp2 = unp->unp_conn; } + /* * Because connect() and send() are non-atomic in a sendto() * with a target address, it's possible that the socket will @@ -826,12 +822,6 @@ uipc_send(struct socket *so, int flags, } case SOCK_STREAM: - /* - * Connect if not connected yet. - * - * Note: A better implementation would complain if not equal - * to the peer's address. - */ if ((so->so_state & SS_ISCONNECTED) == 0) { if (nam != NULL) { UNP_GLOBAL_WLOCK_ASSERT(); @@ -849,6 +839,7 @@ uipc_send(struct socket *so, int flags, error = EPIPE; break; } + /* * Because connect() and send() are non-atomic in a sendto() * with a target address, it's possible that the socket will @@ -907,7 +898,7 @@ uipc_send(struct socket *so, int flags, } /* - * SEND_EOF is equivalent to a SEND followed by a SHUTDOWN. + * PRUS_EOF is equivalent to pru_send followed by pru_shutdown. */ if (flags & PRUS_EOF) { UNP_PCB_LOCK(unp); @@ -1256,7 +1247,7 @@ bad2: if (vfslocked) /* * Giant has been previously acquired. This means filesystem - * isn't MPSAFE. Do it once again. + * isn't MPSAFE. Do it once again. */ mtx_lock(&Giant); bad: @@ -1576,6 +1567,7 @@ unp_externalize(struct mbuf *control, st unp_freerights(rp, newfds); goto next; } + /* * Now change each pointer to an fd in the global * table to an integer that is the index to the local @@ -1888,6 +1880,7 @@ unp_gc(__unused void *arg, int pending) unp_taskcount++; unp_defer = 0; + /* * Before going through all this, set all FDs to be NOT deferred and * NOT externally accessible. @@ -1913,6 +1906,7 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + /* * If we already marked it as 'defer' in a * previous pass, then try to process it this @@ -1930,6 +1924,7 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + /* * If all references are from messages in * transit, then skip it. it's not externally @@ -1939,12 +1934,14 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + /* * If it got this far then it must be * externally accessible. */ fp->f_gcflag |= FMARK; } + /* * Either it was deferred, or it is externally * accessible and not already marked so. Now check @@ -1955,6 +1952,7 @@ unp_gc(__unused void *arg, int pending) FILE_UNLOCK(fp); continue; } + if (so->so_proto->pr_domain != &localdomain || (so->so_proto->pr_flags & PR_RIGHTS) == 0) { FILE_UNLOCK(fp); @@ -1990,6 +1988,7 @@ unp_gc(__unused void *arg, int pending) } } while (unp_defer); sx_sunlock(&filelist_lock); + /* * XXXRW: The following comments need updating for a post-SMPng and * deferred unp_gc() world, but are still generally accurate. @@ -2047,6 +2046,7 @@ again: fp != NULL; fp = nextfp) { nextfp = LIST_NEXT(fp, f_list); FILE_LOCK(fp); + /* * If it's not open, skip it */ @@ -2054,6 +2054,7 @@ again: FILE_UNLOCK(fp); continue; } + /* * If all refs are from msgs, and it's not marked accessible * then it must be referenced from some unreachable cycle of @@ -2068,6 +2069,7 @@ again: FILE_UNLOCK(fp); } sx_sunlock(&filelist_lock); + /* * For each FD on our hit list, do the following two things: */ From rwatson at FreeBSD.org Fri Oct 10 21:18:12 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Fri Oct 10 21:18:30 2008 Subject: svn commit: r183753 - stable/7/sys/netinet Message-ID: <200810102118.m9ALIC5M001203@svn.freebsd.org> Author: rwatson Date: Fri Oct 10 21:18:12 2008 New Revision: 183753 URL: http://svn.freebsd.org/changeset/base/183753 Log: Test the soreceive_dgram tunable and set up the pr_usrreqs structure during UDP initialization, not during UDP inpcb initialization. Reported by: Vlad GALU Approved by: re (kib) Modified: stable/7/sys/netinet/udp_usrreq.c Modified: stable/7/sys/netinet/udp_usrreq.c ============================================================================== --- stable/7/sys/netinet/udp_usrreq.c Fri Oct 10 20:05:15 2008 (r183752) +++ stable/7/sys/netinet/udp_usrreq.c Fri Oct 10 21:18:12 2008 (r183753) @@ -163,14 +163,6 @@ udp_inpcb_init(void *mem, int size, int { struct inpcb *inp; - TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", - &udp_soreceive_dgram); - if (udp_soreceive_dgram) { - udp_usrreqs.pru_soreceive = soreceive_dgram; -#ifdef INET6 - udp6_usrreqs.pru_soreceive = soreceive_dgram; -#endif - } inp = mem; INP_LOCK_INIT(inp, "inp", "udpinp"); return (0); @@ -192,6 +184,14 @@ udp_init(void) uma_zone_set_max(udbinfo.ipi_zone, maxsockets); EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, EVENTHANDLER_PRI_ANY); + TUNABLE_INT_FETCH("net.inet.udp.soreceive_dgram_enabled", + &udp_soreceive_dgram); + if (udp_soreceive_dgram) { + udp_usrreqs.pru_soreceive = soreceive_dgram; +#ifdef INET6 + udp6_usrreqs.pru_soreceive = soreceive_dgram; +#endif + } } /* From rwatson at FreeBSD.org Sun Oct 12 10:03:12 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Oct 12 10:03:28 2008 Subject: svn commit: r183795 - in stable/7/sys: . fs/portalfs kern sys Message-ID: <200810121003.m9CA3BBm041628@svn.freebsd.org> Author: rwatson Date: Sun Oct 12 10:03:11 2008 New Revision: 183795 URL: http://svn.freebsd.org/changeset/base/183795 Log: Merge r183572, r173649, r183650, r183690, and r183764 from head to stable/7: Further minor cleanups to UNIX domain sockets: - Staticize and locally prototype functions uipc_ctloutput(), unp_dispose(), unp_init(), and unp_externalize(), none of which have been required outside of uipc_usrreq.c since uipc_proto.c was removed. - Remove stale prototype for uipc_usrreq(), which has not existed in the code since 1997 - Forward declare and staticize uipc_usrreqs structure in uipc_usrreq.c and not un.h. - Comment on why uipc_connect2() is still non-static -- it is used directly by fifofs. - Remove stale comments, tidy up whitespace. Use soconnect2() rather than directly invoking uipc_connect2() to interconnect two UNIX domain sockets. Now that portalfs doesn't directly invoke uipc_connect2(), make it a static symbol. Remove stale comment (and XXX saying so) about why we zero the file descriptor pointer in unp_freerights: we can no longer recurse into unp_gc due to unp_gc being invoked in a deferred way, but it's still a good idea. Remove stale comment: while uipc_connect2() was, until recently, not static so it could be used by fifofs (actually portalfs), it is now static. Submitted by: kensmith Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/fs/portalfs/portal_vnops.c stable/7/sys/kern/uipc_usrreq.c stable/7/sys/sys/un.h Modified: stable/7/sys/fs/portalfs/portal_vnops.c ============================================================================== --- stable/7/sys/fs/portalfs/portal_vnops.c Sun Oct 12 09:58:10 2008 (r183794) +++ stable/7/sys/fs/portalfs/portal_vnops.c Sun Oct 12 10:03:11 2008 (r183795) @@ -197,7 +197,7 @@ portal_connect(so, so2) M_NOWAIT); so2 = so3; - return (uipc_connect2(so, so2)); + return (soconnect2(so, so2)); } static int Modified: stable/7/sys/kern/uipc_usrreq.c ============================================================================== --- stable/7/sys/kern/uipc_usrreq.c Sun Oct 12 09:58:10 2008 (r183794) +++ stable/7/sys/kern/uipc_usrreq.c Sun Oct 12 10:03:11 2008 (r183795) @@ -224,10 +224,13 @@ static struct rwlock unp_global_rwlock; #define UNP_PCB_UNLOCK(unp) mtx_unlock(&(unp)->unp_mtx) #define UNP_PCB_LOCK_ASSERT(unp) mtx_assert(&(unp)->unp_mtx, MA_OWNED) +static int uipc_connect2(struct socket *, struct socket *); +static int uipc_ctloutput(struct socket *, struct sockopt *); static int unp_connect(struct socket *, struct sockaddr *, struct thread *); static int unp_connect2(struct socket *so, struct socket *so2, int); static void unp_disconnect(struct unpcb *unp, struct unpcb *unp2); +static void unp_dispose(struct mbuf *); static void unp_shutdown(struct unpcb *); static void unp_drop(struct unpcb *, int); static void unp_gc(__unused void *, int); @@ -235,13 +238,16 @@ static void unp_scan(struct mbuf *, void static void unp_mark(struct file *); static void unp_discard(struct file *); static void unp_freerights(struct file **, int); +static void unp_init(void); static int unp_internalize(struct mbuf **, struct thread *); +static int unp_externalize(struct mbuf *, struct mbuf **); static struct mbuf *unp_addsockcred(struct thread *, struct mbuf *); /* * Definitions of protocols supported in the LOCAL domain. */ static struct domain localdomain; +static struct pr_usrreqs uipc_usrreqs; static struct protosw localsw[] = { { .pr_type = SOCK_STREAM, @@ -520,7 +526,7 @@ uipc_close(struct socket *so) UNP_GLOBAL_WUNLOCK(); } -int +static int uipc_connect2(struct socket *so1, struct socket *so2) { struct unpcb *unp, *unp2; @@ -540,8 +546,6 @@ uipc_connect2(struct socket *so1, struct return (error); } -/* control is EOPNOTSUPP */ - static void uipc_detach(struct socket *so) { @@ -986,7 +990,7 @@ uipc_sockaddr(struct socket *so, struct return (0); } -struct pr_usrreqs uipc_usrreqs = { +static struct pr_usrreqs uipc_usrreqs = { .pru_abort = uipc_abort, .pru_accept = uipc_accept, .pru_attach = uipc_attach, @@ -1005,7 +1009,7 @@ struct pr_usrreqs uipc_usrreqs = { .pru_close = uipc_close, }; -int +static int uipc_ctloutput(struct socket *so, struct sockopt *sopt) { struct unpcb *unp; @@ -1494,7 +1498,6 @@ unp_drop(struct unpcb *unp, int errno) unp2 = unp->unp_conn; if (unp2 == NULL) return; - UNP_PCB_LOCK(unp2); unp_disconnect(unp, unp2); UNP_PCB_UNLOCK(unp2); @@ -1507,19 +1510,13 @@ unp_freerights(struct file **rp, int fdc struct file *fp; for (i = 0; i < fdcount; i++) { - /* - * Zero the pointer before calling unp_discard since it may - * end up in unp_gc().. - * - * XXXRW: This is less true than it used to be. - */ fp = *rp; *rp++ = NULL; unp_discard(fp); } } -int +static int unp_externalize(struct mbuf *control, struct mbuf **controlp) { struct thread *td = curthread; /* XXX */ @@ -1539,16 +1536,13 @@ unp_externalize(struct mbuf *control, st error = 0; if (controlp != NULL) /* controlp == NULL => free control messages */ *controlp = NULL; - while (cm != NULL) { if (sizeof(*cm) > clen || cm->cmsg_len > clen) { error = EINVAL; break; } - data = CMSG_DATA(cm); datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; - if (cm->cmsg_level == SOL_SOCKET && cm->cmsg_type == SCM_RIGHTS) { newfds = datalen / sizeof(struct file *); @@ -1614,7 +1608,6 @@ unp_externalize(struct mbuf *control, st CMSG_DATA(mtod(*controlp, struct cmsghdr *)), datalen); } - controlp = &(*controlp)->m_next; next: @@ -1629,7 +1622,6 @@ next: } m_freem(control); - return (error); } @@ -1640,7 +1632,7 @@ unp_zone_change(void *tag) uma_zone_set_max(unp_zone, maxsockets); } -void +static void unp_init(void) { @@ -1678,14 +1670,12 @@ unp_internalize(struct mbuf **controlp, error = 0; *controlp = NULL; - while (cm != NULL) { if (sizeof(*cm) > clen || cm->cmsg_level != SOL_SOCKET || cm->cmsg_len > clen) { error = EINVAL; goto out; } - data = CMSG_DATA(cm); datalen = (caddr_t)cm + cm->cmsg_len - (caddr_t)data; @@ -1700,7 +1690,6 @@ unp_internalize(struct mbuf **controlp, error = ENOBUFS; goto out; } - cmcred = (struct cmsgcred *) CMSG_DATA(mtod(*controlp, struct cmsghdr *)); cmcred->cmcred_pid = p->p_pid; @@ -1708,7 +1697,7 @@ unp_internalize(struct mbuf **controlp, cmcred->cmcred_gid = td->td_ucred->cr_rgid; cmcred->cmcred_euid = td->td_ucred->cr_uid; cmcred->cmcred_ngroups = MIN(td->td_ucred->cr_ngroups, - CMGROUP_MAX); + CMGROUP_MAX); for (i = 0; i < cmcred->cmcred_ngroups; i++) cmcred->cmcred_groups[i] = td->td_ucred->cr_groups[i]; @@ -1740,8 +1729,8 @@ unp_internalize(struct mbuf **controlp, } /* - * Now replace the integer FDs with pointers to - * the associated global file table entry.. + * Now replace the integer FDs with pointers to the + * associated global file table entry.. */ newlen = oldfds * sizeof(struct file *); *controlp = sbcreatecontrol(NULL, newlen, @@ -1751,7 +1740,6 @@ unp_internalize(struct mbuf **controlp, error = E2BIG; goto out; } - fdp = data; rp = (struct file **) CMSG_DATA(mtod(*controlp, struct cmsghdr *)); @@ -1787,7 +1775,6 @@ unp_internalize(struct mbuf **controlp, } controlp = &(*controlp)->m_next; - if (CMSG_SPACE(datalen) < clen) { clen -= CMSG_SPACE(datalen); cm = (struct cmsghdr *) @@ -1800,7 +1787,6 @@ unp_internalize(struct mbuf **controlp, out: m_freem(control); - return (error); } @@ -1814,7 +1800,6 @@ unp_addsockcred(struct thread *td, struc int i; ngroups = MIN(td->td_ucred->cr_ngroups, CMGROUP_MAX); - m = sbcreatecontrol(NULL, SOCKCREDSIZE(ngroups), SCM_CREDS, SOL_SOCKET); if (m == NULL) return (control); @@ -1851,7 +1836,6 @@ unp_addsockcred(struct thread *td, struc /* Prepend it to the head. */ m->m_next = control; - return (m); } @@ -2091,7 +2075,7 @@ again: free(extra_ref, M_TEMP); } -void +static void unp_dispose(struct mbuf *m) { Modified: stable/7/sys/sys/un.h ============================================================================== --- stable/7/sys/sys/un.h Sun Oct 12 09:58:10 2008 (r183794) +++ stable/7/sys/sys/un.h Sun Oct 12 10:03:11 2008 (r183795) @@ -57,27 +57,13 @@ struct sockaddr_un { #define LOCAL_CREDS 0x002 /* pass credentials to receiver */ #define LOCAL_CONNWAIT 0x004 /* connects block until accepted */ -#ifdef _KERNEL -struct mbuf; -struct socket; -struct sockopt; - -int uipc_connect2(struct socket *so1, struct socket *so2); -int uipc_ctloutput(struct socket *so, struct sockopt *sopt); -int uipc_usrreq(struct socket *so, int req, struct mbuf *m, - struct mbuf *nam, struct mbuf *control); -void unp_dispose(struct mbuf *m); -int unp_externalize(struct mbuf *mbuf, struct mbuf **controlp); -void unp_init(void); -extern struct pr_usrreqs uipc_usrreqs; - -#else /* !_KERNEL */ +#ifndef _KERNEL /* actual length of an initialized sockaddr_un */ #define SUN_LEN(su) \ (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path)) -#endif /* _KERNEL */ +#endif /* !_KERNEL */ #endif /* __BSD_VISIBLE */ From rwatson at FreeBSD.org Sun Oct 12 18:49:07 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Sun Oct 12 18:49:20 2008 Subject: svn commit: r183804 - in stable/7/sys: . kern Message-ID: <200810121849.m9CIn7eX052645@svn.freebsd.org> Author: rwatson Date: Sun Oct 12 18:49:07 2008 New Revision: 183804 URL: http://svn.freebsd.org/changeset/base/183804 Log: Merge r183661 from head to stable/7: Lock receive socket buffer in soo_stat() rather than commenting that we should lock it, which may marginally improve the consistency of the results. Remove comment. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/sys_socket.c Modified: stable/7/sys/kern/sys_socket.c ============================================================================== --- stable/7/sys/kern/sys_socket.c Sun Oct 12 12:08:09 2008 (r183803) +++ stable/7/sys/kern/sys_socket.c Sun Oct 12 18:49:07 2008 (r183804) @@ -237,17 +237,16 @@ soo_stat(struct file *fp, struct stat *u /* * If SBS_CANTRCVMORE is set, but there's still data left in the * receive buffer, the socket is still readable. - * - * XXXRW: perhaps should lock socket buffer so st_size result is - * consistent. */ - /* Unlocked read. */ + SOCKBUF_LOCK(&so->so_rcv); if ((so->so_rcv.sb_state & SBS_CANTRCVMORE) == 0 || so->so_rcv.sb_cc != 0) ub->st_mode |= S_IRUSR | S_IRGRP | S_IROTH; + ub->st_size = so->so_rcv.sb_cc - so->so_rcv.sb_ctl; + SOCKBUF_UNLOCK(&so->so_rcv); + /* Unlocked read. */ if ((so->so_snd.sb_state & SBS_CANTSENDMORE) == 0) ub->st_mode |= S_IWUSR | S_IWGRP | S_IWOTH; - ub->st_size = so->so_rcv.sb_cc - so->so_rcv.sb_ctl; ub->st_uid = so->so_cred->cr_uid; ub->st_gid = so->so_cred->cr_gid; return (*so->so_proto->pr_usrreqs->pru_sense)(so, ub); From csjp at FreeBSD.org Sun Oct 12 23:19:24 2008 From: csjp at FreeBSD.org (Christian S.J. Peron) Date: Sun Oct 12 23:19:29 2008 Subject: svn commit: r183812 - in stable/7/sys: . netinet/libalias Message-ID: <200810122319.m9CNJNLP057971@svn.freebsd.org> Author: csjp Date: Sun Oct 12 23:19:23 2008 New Revision: 183812 URL: http://svn.freebsd.org/changeset/base/183812 Log: MFC revision 183744 Improve entropy in source port generation for libalias consumers. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/netinet/libalias/alias_db.c Modified: stable/7/sys/netinet/libalias/alias_db.c ============================================================================== --- stable/7/sys/netinet/libalias/alias_db.c Sun Oct 12 21:46:11 2008 (r183811) +++ stable/7/sys/netinet/libalias/alias_db.c Sun Oct 12 23:19:23 2008 (r183812) @@ -606,7 +606,7 @@ GetNewPort(struct libalias *la, struct a port_sys = ntohs(port_net); } else { /* First trial and all subsequent are random. */ - port_sys = random() & ALIAS_PORT_MASK; + port_sys = arc4random() & ALIAS_PORT_MASK; port_sys += ALIAS_PORT_BASE; port_net = htons(port_sys); } @@ -657,7 +657,7 @@ GetNewPort(struct libalias *la, struct a } #endif } - port_sys = random() & ALIAS_PORT_MASK; + port_sys = arc4random() & ALIAS_PORT_MASK; port_sys += ALIAS_PORT_BASE; port_net = htons(port_sys); } @@ -772,9 +772,9 @@ FindNewPortGroup(struct libalias *la, /* First trial and all subsequent are random. */ if (align == FIND_EVEN_ALIAS_BASE) - port_sys = random() & ALIAS_PORT_MASK_EVEN; + port_sys = arc4random() & ALIAS_PORT_MASK_EVEN; else - port_sys = random() & ALIAS_PORT_MASK; + port_sys = arc4random() & ALIAS_PORT_MASK; port_sys += ALIAS_PORT_BASE; } @@ -796,9 +796,9 @@ FindNewPortGroup(struct libalias *la, /* Find a new base to try */ if (align == FIND_EVEN_ALIAS_BASE) - port_sys = random() & ALIAS_PORT_MASK_EVEN; + port_sys = arc4random() & ALIAS_PORT_MASK_EVEN; else - port_sys = random() & ALIAS_PORT_MASK; + port_sys = arc4random() & ALIAS_PORT_MASK; port_sys += ALIAS_PORT_BASE; } From kib at FreeBSD.org Mon Oct 13 12:45:19 2008 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon Oct 13 12:45:31 2008 Subject: svn commit: r183818 - in stable/7/sys: . i386/include Message-ID: <200810131245.m9DCjIsR076490@svn.freebsd.org> Author: kib Date: Mon Oct 13 12:45:18 2008 New Revision: 183818 URL: http://svn.freebsd.org/changeset/base/183818 Log: MFC r180756 (by luoqi): Unbreak cc -pg support on i386 by changing mcount() to always preserve %ecx. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/i386/include/profile.h Modified: stable/7/sys/i386/include/profile.h ============================================================================== --- stable/7/sys/i386/include/profile.h Mon Oct 13 12:28:33 2008 (r183817) +++ stable/7/sys/i386/include/profile.h Mon Oct 13 12:45:18 2008 (r183818) @@ -115,7 +115,15 @@ void user(void); void \ mcount() \ { \ - uintfptr_t selfpc, frompc; \ + uintfptr_t selfpc, frompc, ecx; \ + /* \ + * In gcc 4.2, ecx might be used in the caller as the arg \ + * pointer if the stack realignment option is set (-mstackrealign) \ + * or if the caller has the force_align_arg_pointer attribute \ + * (stack realignment is ALWAYS on for main). Preserve ecx \ + * here. \ + */ \ + __asm("" : "=c" (ecx)); \ /* \ * Find the return address for mcount, \ * and the return address for mcount's caller. \ @@ -132,6 +140,7 @@ mcount() \ __asm("movl (%%ebp),%0" : "=r" (frompc)); \ frompc = ((uintfptr_t *)frompc)[1]; \ _mcount(frompc, selfpc); \ + __asm("" : : "c" (ecx)); \ } #else /* !__GNUCLIKE_ASM */ #define MCOUNT From kib at FreeBSD.org Mon Oct 13 13:00:22 2008 From: kib at FreeBSD.org (Konstantin Belousov) Date: Mon Oct 13 13:00:38 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs Message-ID: <200810131300.m9DD0MaR076808@svn.freebsd.org> Author: kib Date: Mon Oct 13 13:00:21 2008 New Revision: 183819 URL: http://svn.freebsd.org/changeset/base/183819 Log: MFC r183600: Change the linprocfs /maps and procfs /map handlers to use sbuf instead of doing uiomove. Approved by: re (kensmith) Modified: stable/7/sys/ (props changed) stable/7/sys/compat/linprocfs/linprocfs.c stable/7/sys/fs/procfs/procfs_map.c Modified: stable/7/sys/compat/linprocfs/linprocfs.c ============================================================================== --- stable/7/sys/compat/linprocfs/linprocfs.c Mon Oct 13 12:45:18 2008 (r183818) +++ stable/7/sys/compat/linprocfs/linprocfs.c Mon Oct 13 13:00:21 2008 (r183819) @@ -869,16 +869,13 @@ linprocfs_doprocenviron(PFS_FILL_ARGS) static int linprocfs_doprocmaps(PFS_FILL_ARGS) { - char mebuffer[512]; vm_map_t map = &p->p_vmspace->vm_map; - vm_map_entry_t entry, tmp_entry; + vm_map_entry_t entry; vm_object_t obj, tobj, lobj; vm_offset_t saved_end; vm_ooffset_t off = 0; char *name = "", *freename = NULL; - size_t len; ino_t ino; - unsigned int last_timestamp; int ref_count, shadow_count, flags; int error; struct vnode *vp; @@ -894,13 +891,9 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) if (uio->uio_rw != UIO_READ) return (EOPNOTSUPP); - if (uio->uio_offset != 0) - return (0); - error = 0; vm_map_lock_read(map); - for (entry = map->header.next; - ((uio->uio_resid > 0) && (entry != &map->header)); + for (entry = map->header.next; entry != &map->header; entry = entry->next) { name = ""; freename = NULL; @@ -949,7 +942,7 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) * format: * start, end, access, offset, major, minor, inode, name. */ - snprintf(mebuffer, sizeof mebuffer, + error = sbuf_printf(sb, "%08lx-%08lx %s%s%s%s %08lx %02x:%02x %lu%s%s\n", (u_long)entry->start, (u_long)entry->end, (entry->protection & VM_PROT_READ)?"r":"-", @@ -965,26 +958,9 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) ); if (freename) free(freename, M_TEMP); - len = strlen(mebuffer); - if (len > uio->uio_resid) - len = uio->uio_resid; /* - * XXX We should probably return - * EFBIG here, as in procfs. - */ - last_timestamp = map->timestamp; - vm_map_unlock_read(map); - error = uiomove(mebuffer, len, uio); - vm_map_lock_read(map); - if (error) + if (error == -1) { + error = 0; break; - if (last_timestamp + 1 != map->timestamp) { - /* - * Look again for the entry because the map was - * modified while it was unlocked. Specifically, - * the entry may have been clipped, merged, or deleted. - */ - vm_map_lookup_entry(map, saved_end - 1, &tmp_entry); - entry = tmp_entry; } } vm_map_unlock_read(map); Modified: stable/7/sys/fs/procfs/procfs_map.c ============================================================================== --- stable/7/sys/fs/procfs/procfs_map.c Mon Oct 13 12:45:18 2008 (r183818) +++ stable/7/sys/fs/procfs/procfs_map.c Mon Oct 13 13:00:21 2008 (r183819) @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -81,14 +82,11 @@ extern struct sysentvec ia32_freebsd_sys int procfs_doprocmap(PFS_FILL_ARGS) { - int len; int error, vfslocked; vm_map_t map = &p->p_vmspace->vm_map; - vm_map_entry_t entry, tmp_entry; + vm_map_entry_t entry; struct vnode *vp; - char mebuffer[MEBUFFERSIZE]; char *fullpath, *freepath; - unsigned int last_timestamp; #ifdef COMPAT_IA32 int wrap32 = 0; #endif @@ -102,9 +100,6 @@ procfs_doprocmap(PFS_FILL_ARGS) if (uio->uio_rw != UIO_READ) return (EOPNOTSUPP); - if (uio->uio_offset != 0) - return (0); - #ifdef COMPAT_IA32 if (curthread->td_proc->p_sysent == &ia32_freebsd_sysvec) { if (p->p_sysent != &ia32_freebsd_sysvec) @@ -114,9 +109,8 @@ procfs_doprocmap(PFS_FILL_ARGS) #endif vm_map_lock_read(map); - for (entry = map->header.next; - ((uio->uio_resid > 0) && (entry != &map->header)); - entry = entry->next) { + for (entry = map->header.next; entry != &map->header; + entry = entry->next) { vm_object_t obj, tobj, lobj; int ref_count, shadow_count, flags; vm_offset_t addr; @@ -198,7 +192,7 @@ procfs_doprocmap(PFS_FILL_ARGS) * format: * start, end, resident, private resident, cow, access, type. */ - snprintf(mebuffer, sizeof mebuffer, + error = sbuf_printf(sb, "0x%lx 0x%lx %d %d %p %s%s%s %d %d 0x%x %s %s %s %s\n", (u_long)entry->start, (u_long)entry->end, resident, privateresident, @@ -218,25 +212,9 @@ procfs_doprocmap(PFS_FILL_ARGS) if (freepath != NULL) free(freepath, M_TEMP); - len = strlen(mebuffer); - if (len > uio->uio_resid) { - error = EFBIG; - break; - } - last_timestamp = map->timestamp; - vm_map_unlock_read(map); - error = uiomove(mebuffer, len, uio); - vm_map_lock_read(map); - if (error) + if (error == -1) { + error = 0; break; - if (last_timestamp + 1 != map->timestamp) { - /* - * Look again for the entry because the map was - * modified while it was unlocked. Specifically, - * the entry may have been clipped, merged, or deleted. - */ - vm_map_lookup_entry(map, addr - 1, &tmp_entry); - entry = tmp_entry; } } vm_map_unlock_read(map); From rdivacky at FreeBSD.org Mon Oct 13 13:29:01 2008 From: rdivacky at FreeBSD.org (Roman Divacky) Date: Mon Oct 13 13:29:17 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs In-Reply-To: <200810131300.m9DD0MaR076808@svn.freebsd.org> References: <200810131300.m9DD0MaR076808@svn.freebsd.org> Message-ID: <20081013131047.GA84887@freebsd.org> On Mon, Oct 13, 2008 at 01:00:21PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Oct 13 13:00:21 2008 > New Revision: 183819 > URL: http://svn.freebsd.org/changeset/base/183819 > > Log: > MFC r183600: > Change the linprocfs /maps and procfs /map handlers to use > sbuf instead of doing uiomove. > > Approved by: re (kensmith) what about commiting this to note this change? Index: article.sgml =================================================================== --- article.sgml (revision 183819) +++ article.sgml (working copy) @@ -380,6 +380,9 @@ third-party device drivers will need to be modified and recompiled. + A serious problem emulating /proc for Linux was fixed. Many Linux + ports are now working including the linux-flashplugin9 port. + Boot Loader Changes From des at des.no Mon Oct 13 13:43:18 2008 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Mon Oct 13 13:43:23 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs In-Reply-To: <20081013131047.GA84887@freebsd.org> (Roman Divacky's message of "Mon, 13 Oct 2008 15:10:47 +0200") References: <200810131300.m9DD0MaR076808@svn.freebsd.org> <20081013131047.GA84887@freebsd.org> Message-ID: <86skr0zlav.fsf@ds4.des.no> Roman Divacky writes: > what about commiting this to note this change? > > + A serious problem emulating /proc for Linux was fixed. Many Linux > + ports are now working including the linux-flashplugin9 port. "A serious problem was fixed"? Really? And if none of that software worked before this commit, how come they were already in ports? DES -- Dag-Erling Sm?rgrav - des@des.no From kostikbel at gmail.com Mon Oct 13 13:49:38 2008 From: kostikbel at gmail.com (Kostik Belousov) Date: Mon Oct 13 13:49:55 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs In-Reply-To: <86skr0zlav.fsf@ds4.des.no> References: <200810131300.m9DD0MaR076808@svn.freebsd.org> <20081013131047.GA84887@freebsd.org> <86skr0zlav.fsf@ds4.des.no> Message-ID: <20081013133140.GQ7782@deviant.kiev.zoral.com.ua> On Mon, Oct 13, 2008 at 03:17:28PM +0200, Dag-Erling Sm??rgrav wrote: > Roman Divacky writes: > > what about commiting this to note this change? > > > > + A serious problem emulating /proc for Linux was fixed. Many Linux > > + ports are now working including the linux-flashplugin9 port. > > "A serious problem was fixed"? Really? And if none of that software > worked before this commit, how come they were already in ports? I do not think that mentioning of this should appear in release notes, but Roman is mostly right in stating the fact. Newest glibc reads /proc/pid/maps in chunks to determine stack address for created thread. Failure of the read(2) caused new linux libraries to fail on our linuxolator. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20081013/d4bfc12a/attachment.pgp From des at des.no Mon Oct 13 14:17:54 2008 From: des at des.no (=?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?=) Date: Mon Oct 13 14:18:10 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs In-Reply-To: <20081013133140.GQ7782@deviant.kiev.zoral.com.ua> (Kostik Belousov's message of "Mon, 13 Oct 2008 16:31:40 +0300") References: <200810131300.m9DD0MaR076808@svn.freebsd.org> <20081013131047.GA84887@freebsd.org> <86skr0zlav.fsf@ds4.des.no> <20081013133140.GQ7782@deviant.kiev.zoral.com.ua> Message-ID: <86od1oziig.fsf@ds4.des.no> Kostik Belousov writes: > Dag-Erling Sm?rgrav writes: > > Roman Divacky writes: > > > what about commiting this to note this change? > > > + A serious problem emulating /proc for Linux was fixed. Many Linux > > > + ports are now working including the linux-flashplugin9 port. > > "A serious problem was fixed"? Really? And if none of that software > > worked before this commit, how come they were already in ports? > I do not think that mentioning of this should appear in release notes, > but Roman is mostly right in stating the fact. Pretend you don't really know the details of the change, and reread Roman's proposed relnotes entry. Do you think it gives a correct impression of the nature and severity of the issue? DES -- Dag-Erling Sm?rgrav - des@des.no From rdivacky at freebsd.org Mon Oct 13 14:22:48 2008 From: rdivacky at freebsd.org (Roman Divacky) Date: Mon Oct 13 14:23:11 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs In-Reply-To: <86od1oziig.fsf@ds4.des.no> References: <200810131300.m9DD0MaR076808@svn.freebsd.org> <20081013131047.GA84887@freebsd.org> <86skr0zlav.fsf@ds4.des.no> <20081013133140.GQ7782@deviant.kiev.zoral.com.ua> <86od1oziig.fsf@ds4.des.no> Message-ID: <20081013142203.GA99640@freebsd.org> On Mon, Oct 13, 2008 at 04:17:43PM +0200, Dag-Erling Sm??rgrav wrote: > Kostik Belousov writes: > > Dag-Erling Sm??rgrav writes: > > > Roman Divacky writes: > > > > what about commiting this to note this change? > > > > + A serious problem emulating /proc for Linux was fixed. Many Linux > > > > + ports are now working including the linux-flashplugin9 port. > > > "A serious problem was fixed"? Really? And if none of that software > > > worked before this commit, how come they were already in ports? > > I do not think that mentioning of this should appear in release notes, > > but Roman is mostly right in stating the fact. > > Pretend you don't really know the details of the change, and reread > Roman's proposed relnotes entry. Do you think it gives a correct > impression of the nature and severity of the issue? my intention was to advertise that flash9 works ok now. Which is a thing a lot of people care about. Feel free to submit your own wording. From kostikbel at gmail.com Mon Oct 13 14:44:39 2008 From: kostikbel at gmail.com (Kostik Belousov) Date: Mon Oct 13 14:44:55 2008 Subject: svn commit: r183819 - in stable/7/sys: . compat/linprocfs fs/procfs In-Reply-To: <86od1oziig.fsf@ds4.des.no> References: <200810131300.m9DD0MaR076808@svn.freebsd.org> <20081013131047.GA84887@freebsd.org> <86skr0zlav.fsf@ds4.des.no> <20081013133140.GQ7782@deviant.kiev.zoral.com.ua> <86od1oziig.fsf@ds4.des.no> Message-ID: <20081013144424.GU7782@deviant.kiev.zoral.com.ua> On Mon, Oct 13, 2008 at 04:17:43PM +0200, Dag-Erling Sm??rgrav wrote: > Kostik Belousov writes: > > Dag-Erling Sm??rgrav writes: > > > Roman Divacky writes: > > > > what about commiting this to note this change? > > > > + A serious problem emulating /proc for Linux was fixed. Many Linux > > > > + ports are now working including the linux-flashplugin9 port. > > > "A serious problem was fixed"? Really? And if none of that software > > > worked before this commit, how come they were already in ports? > > I do not think that mentioning of this should appear in release notes, > > but Roman is mostly right in stating the fact. > > Pretend you don't really know the details of the change, and reread > Roman's proposed relnotes entry. Do you think it gives a correct > impression of the nature and severity of the issue? Let me restate what I said above, in more explicit way: 1. The problem fixed actually caused new glibc to fail for threaded linux processes. This is a serious problem for non-default linux-base ports. It is not a serious problem for linprocfs code itself. 2. I oppose against making any promises of the quality of the linux emulator, esp. in the release notes, esp. making a statement that "flash9 works !". -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 195 bytes Desc: not available Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20081013/da5473c5/attachment.pgp From jhb at FreeBSD.org Mon Oct 13 16:14:21 2008 From: jhb at FreeBSD.org (John Baldwin) Date: Mon Oct 13 16:14:38 2008 Subject: svn commit: r183823 - in stable/7/sys: . boot/i386/libi386 Message-ID: <200810131614.m9DGELBG080222@svn.freebsd.org> Author: jhb Date: Mon Oct 13 16:14:21 2008 New Revision: 183823 URL: http://svn.freebsd.org/changeset/base/183823 Log: MFC: Fail requests to boot an amd64 kernel on an i386-only CPU. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/boot/i386/libi386/bootinfo64.c Modified: stable/7/sys/boot/i386/libi386/bootinfo64.c ============================================================================== --- stable/7/sys/boot/i386/libi386/bootinfo64.c Mon Oct 13 14:05:01 2008 (r183822) +++ stable/7/sys/boot/i386/libi386/bootinfo64.c Mon Oct 13 16:14:21 2008 (r183823) @@ -32,6 +32,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include "bootstrap.h" #include "libi386.h" #include "btxv86.h" @@ -124,7 +127,45 @@ bi_copymodules64(vm_offset_t addr) } /* - * Load the information expected by an i386 kernel. + * Check to see if this CPU supports long mode. + */ +static int +bi_checkcpu(void) +{ + char *cpu_vendor; + int vendor[3]; + int eflags, regs[4]; + + /* Check for presence of "cpuid". */ + eflags = read_eflags(); + write_eflags(eflags ^ PSL_ID); + if (!((eflags ^ read_eflags()) & PSL_ID)) + return (0); + + /* Fetch the vendor string. */ + do_cpuid(0, regs); + vendor[0] = regs[1]; + vendor[1] = regs[3]; + vendor[2] = regs[2]; + cpu_vendor = (char *)vendor; + + /* Check for vendors that support AMD features. */ + if (strncmp(cpu_vendor, "GenuineIntel", 12) != 0 && + strncmp(cpu_vendor, "AuthenticAMD", 12) != 0) + return (0); + + /* Has to support AMD features. */ + do_cpuid(0x80000000, regs); + if (!(regs[0] >= 0x80000001)) + return (0); + + /* Check for long mode. */ + do_cpuid(0x80000001, regs); + return (regs[3] & AMDID_LM); +} + +/* + * Load the information expected by an amd64 kernel. * * - The 'boothowto' argument is constructed * - The 'bootdev' argument is constructed @@ -145,6 +186,11 @@ bi_load64(char *args, vm_offset_t *modul char *rootdevname; int howto; + if (!bi_checkcpu()) { + printf("CPU doesn't support long mode\n"); + return (EINVAL); + } + howto = bi_getboothowto(args); /* From csjp at FreeBSD.org Mon Oct 13 16:46:24 2008 From: csjp at FreeBSD.org (Christian S.J. Peron) Date: Mon Oct 13 16:46:41 2008 Subject: svn commit: r183824 - in stable/7/sys: . security/audit Message-ID: <200810131646.m9DGkOA0080825@svn.freebsd.org> Author: csjp Date: Mon Oct 13 16:46:24 2008 New Revision: 183824 URL: http://svn.freebsd.org/changeset/base/183824 Log: MFC change 181604 Fix preselection on auditpipes if they have a different selection mask Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/security/audit/audit.c Modified: stable/7/sys/security/audit/audit.c ============================================================================== --- stable/7/sys/security/audit/audit.c Mon Oct 13 16:14:21 2008 (r183823) +++ stable/7/sys/security/audit/audit.c Mon Oct 13 16:46:24 2008 (r183824) @@ -609,7 +609,8 @@ audit_proc_coredump(struct thread *td, c else sorf = AU_PRS_SUCCESS; class = au_event_class(AUE_CORE); - if (au_preselect(AUE_CORE, class, aumask, sorf) == 0) + if (au_preselect(AUE_CORE, class, aumask, sorf) == 0 && + audit_pipe_preselect(auid, AUE_CORE, class, sorf, 0) == 0) return; /* * If we are interested in seeing this audit record, allocate it. From csjp at FreeBSD.org Mon Oct 13 17:33:45 2008 From: csjp at FreeBSD.org (Christian S.J. Peron) Date: Mon Oct 13 17:33:53 2008 Subject: svn commit: r183826 - in stable/7/sys: . netinet Message-ID: <200810131733.m9DHXibj081763@svn.freebsd.org> Author: csjp Date: Mon Oct 13 17:33:44 2008 New Revision: 183826 URL: http://svn.freebsd.org/changeset/base/183826 Log: MFC change 182311 Fix panics with MAC kernels when a labeled security policy is used and IP options are present on an mbuf. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/netinet/ip_options.c Modified: stable/7/sys/netinet/ip_options.c ============================================================================== --- stable/7/sys/netinet/ip_options.c Mon Oct 13 17:14:29 2008 (r183825) +++ stable/7/sys/netinet/ip_options.c Mon Oct 13 17:33:44 2008 (r183826) @@ -508,9 +508,6 @@ ip_insertoptions(struct mbuf *m, struct } M_MOVE_PKTHDR(n, m); n->m_pkthdr.rcvif = NULL; -#ifdef MAC - mac_copy_mbuf(m, n); -#endif n->m_pkthdr.len += optlen; m->m_len -= sizeof(struct ip); m->m_data += sizeof(struct ip); From rwatson at FreeBSD.org Tue Oct 14 07:58:19 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Tue Oct 14 07:58:35 2008 Subject: svn commit: r183870 - in stable/7/sys: . kern netinet Message-ID: <200810140758.m9E7wJD1099361@svn.freebsd.org> Author: rwatson Date: Tue Oct 14 07:58:18 2008 New Revision: 183870 URL: http://svn.freebsd.org/changeset/base/183870 Log: Merge r183662 and r183663 from head to stable/7: Don't pass curthread to sbreserve_locked() in tcp_do_segment(), as the netisr or ithread's socket buffer size limit is not the right limit to use. Instead, pass NULL as the other two calls to sbreserve_locked() in the TCP input path (tcp_mss()) do. In practice, this is a no-op, as ithreads and the netisr run without a process limit on socket buffer use, and a NULL thread pointer leads to not using the process's limit, if any. However, if tcp_input() is called in other contexts that do have limits, this may prevent the incorrect limit from being used. Rewrite sbreserve_locked()'s comment on NULL thread pointers, eliminating an XXXRW about the comment being stale. Approved by: re (gnn) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/uipc_sockbuf.c stable/7/sys/netinet/tcp_input.c Modified: stable/7/sys/kern/uipc_sockbuf.c ============================================================================== --- stable/7/sys/kern/uipc_sockbuf.c Tue Oct 14 07:52:47 2008 (r183869) +++ stable/7/sys/kern/uipc_sockbuf.c Tue Oct 14 07:58:18 2008 (r183870) @@ -283,10 +283,11 @@ sbreserve_locked(struct sockbuf *sb, u_l SOCKBUF_LOCK_ASSERT(sb); /* - * td will only be NULL when we're in an interrupt (e.g. in - * tcp_input()). - * - * XXXRW: This comment needs updating, as might the code. + * When a thread is passed, we take into account the thread's socket + * buffer size limit. The caller will generally pass curthread, but + * in the TCP input path, NULL will be passed to indicate that no + * appropriate thread resource limits are available. In that case, + * we don't apply a process limit. */ if (cc > sb_max_adj) return (0); Modified: stable/7/sys/netinet/tcp_input.c ============================================================================== --- stable/7/sys/netinet/tcp_input.c Tue Oct 14 07:52:47 2008 (r183869) +++ stable/7/sys/netinet/tcp_input.c Tue Oct 14 07:58:18 2008 (r183870) @@ -1215,7 +1215,7 @@ tcp_do_segment(struct mbuf *m, struct tc */ if (newsize) if (!sbreserve_locked(&so->so_rcv, - newsize, so, curthread)) + newsize, so, NULL)) so->so_rcv.sb_flags &= ~SB_AUTOSIZE; m_adj(m, drop_hdrlen); /* delayed header drop */ sbappendstream_locked(&so->so_rcv, m); From rwatson at FreeBSD.org Tue Oct 14 08:03:59 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Tue Oct 14 08:04:06 2008 Subject: svn commit: r183872 - in stable/7/sys: . netinet Message-ID: <200810140803.m9E83w1N099593@svn.freebsd.org> Author: rwatson Date: Tue Oct 14 08:03:58 2008 New Revision: 183872 URL: http://svn.freebsd.org/changeset/base/183872 Log: Merge r183744 from head to stable/7: Fix content and spelling of comment on _ipfw_insn.len -- a count of 32-bit words, not 32-byte words. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/netinet/ip_fw.h Modified: stable/7/sys/netinet/ip_fw.h ============================================================================== --- stable/7/sys/netinet/ip_fw.h Tue Oct 14 07:59:23 2008 (r183871) +++ stable/7/sys/netinet/ip_fw.h Tue Oct 14 08:03:58 2008 (r183872) @@ -217,7 +217,7 @@ enum ipfw_opcodes { /* arguments (4 byt */ typedef struct _ipfw_insn { /* template for instructions */ enum ipfw_opcodes opcode:8; - u_int8_t len; /* numer of 32-byte words */ + u_int8_t len; /* number of 32-bit words */ #define F_NOT 0x80 #define F_OR 0x40 #define F_LEN_MASK 0x3f From rwatson at FreeBSD.org Tue Oct 14 08:44:27 2008 From: rwatson at FreeBSD.org (Robert Watson) Date: Tue Oct 14 08:44:39 2008 Subject: svn commit: r183875 - in stable/7/sys: . kern Message-ID: <200810140844.m9E8iR24000567@svn.freebsd.org> Author: rwatson Date: Tue Oct 14 08:44:27 2008 New Revision: 183875 URL: http://svn.freebsd.org/changeset/base/183875 Log: Merge r183664 from head to stable/7: Remove temporary debugging KASSERT's introduced to detect protocols improperly invoking sosend(), soreceive(), and sopoll() instead of attach either specialized or _generic() versions of those functions to their pru_sosend, pru_soreceive, and pru_sopoll protosw methods. Approved by: re (kib) Modified: stable/7/sys/ (props changed) stable/7/sys/kern/uipc_socket.c Modified: stable/7/sys/kern/uipc_socket.c ============================================================================== --- stable/7/sys/kern/uipc_socket.c Tue Oct 14 08:41:54 2008 (r183874) +++ stable/7/sys/kern/uipc_socket.c Tue Oct 14 08:44:27 2008 (r183875) @@ -1285,10 +1285,6 @@ sosend(struct socket *so, struct sockadd struct mbuf *top, struct mbuf *control, int flags, struct thread *td) { - /* XXXRW: Temporary debugging. */ - KASSERT(so->so_proto->pr_usrreqs->pru_sosend != sosend, - ("sosend: protocol calls sosend")); - return (so->so_proto->pr_usrreqs->pru_sosend(so, addr, uio, top, control, flags, td)); } @@ -2032,10 +2028,6 @@ soreceive(struct socket *so, struct sock struct mbuf **mp0, struct mbuf **controlp, int *flagsp) { - /* XXXRW: Temporary debugging. */ - KASSERT(so->so_proto->pr_usrreqs->pru_soreceive != soreceive, - ("soreceive: protocol calls soreceive")); - return (so->so_proto->pr_usrreqs->pru_soreceive(so, psa, uio, mp0, controlp, flagsp)); } @@ -2659,10 +2651,6 @@ sopoll(struct socket *so, int events, st struct thread *td) { - /* XXXRW: Temporary debugging. */ - KASSERT(so->so_proto->pr_usrreqs->pru_sopoll != sopoll, - ("sopoll: protocol calls sopoll")); - return (so->so_proto->pr_usrreqs->pru_sopoll(so, events, active_cred, td)); } From edwin at FreeBSD.org Tue Oct 14 10:09:34 2008 From: edwin at FreeBSD.org (Edwin Groothuis) Date: Tue Oct 14 10:09:51 2008 Subject: svn commit: r183877 - stable/7/share/zoneinfo Message-ID: <200810141009.m9EA9W71002188@svn.freebsd.org> Author: edwin Date: Tue Oct 14 10:09:32 2008 New Revision: 183877 URL: http://svn.freebsd.org/changeset/base/183877 Log: Vendor import of tzdata2008h MFV of r183861 MFC of r183864 - Minor update for Mauritius (which I don't understand) - Syria goes to DST at 1 November instead of 1 October. - Niue is now located at the right side of the equator. Approved by: re (blackend) Modified: stable/7/share/zoneinfo/ (props changed) stable/7/share/zoneinfo/africa stable/7/share/zoneinfo/asia stable/7/share/zoneinfo/southamerica stable/7/share/zoneinfo/zone.tab Modified: stable/7/share/zoneinfo/africa ============================================================================== --- stable/7/share/zoneinfo/africa Tue Oct 14 09:53:47 2008 (r183876) +++ stable/7/share/zoneinfo/africa Tue Oct 14 10:09:32 2008 (r183877) @@ -1,4 +1,4 @@ -# @(#)africa 8.16 +# @(#)africa 8.17 #
 
 # This data is by no means authoritative; if you think you know better,
@@ -453,11 +453,19 @@ Zone Africa/Nouakchott	-1:03:48 -	LMT	19
 # year 2008 - 2009 will, therefore, be effective as from 26 October 2008
 # and end on 29 March 2009.
 
+# From Ed Maste (2008-10-07):
+# THE TIME BILL (No. XXVII of 2008) Explanatory Memorandum states the
+# beginning / ending of summer time is 2 o'clock standard time in the
+# morning of the last Sunday of October / last Sunday of March.
+# 
+# http://www.gov.mu/portal/goc/assemblysite/file/bill2708.pdf
+# 
+
 # Rule	NAME	FROM	TO	TYPE	IN	ON	AT	SAVE	LETTER/S
 Rule Mauritius	1982	only	-	Oct	10	0:00	1:00	S
 Rule Mauritius	1983	only	-	Mar	21	0:00	0	-
-Rule Mauritius	2008	max	-	Oct	lastSun	2:00	1:00	S
-Rule Mauritius	2009	max	-	Mar	lastSun	2:00	0	-
+Rule Mauritius	2008	max	-	Oct	lastSun	2:00s	1:00	S
+Rule Mauritius	2009	max	-	Mar	lastSun	2:00s	0	-
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone Indian/Mauritius	3:50:00 -	LMT	1907		# Port Louis
 			4:00 Mauritius	MU%sT	# Mauritius Time

Modified: stable/7/share/zoneinfo/asia
==============================================================================
--- stable/7/share/zoneinfo/asia	Tue Oct 14 09:53:47 2008	(r183876)
+++ stable/7/share/zoneinfo/asia	Tue Oct 14 10:09:32 2008	(r183877)
@@ -1,4 +1,4 @@
-# @(#)asia	8.23
+# @(#)asia	8.24
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -1957,8 +1957,20 @@ Rule	Syria	2007	only	-	Nov	 Fri>=1	0:00	
 # compilers can't handle  or having multiple Rules (a la Israel).
 # For now, use "Apr Fri>=1", and go with IATA on a uniform Sep 30 end.
 
+# From Steffen Thorsen (2008-10-07):
+# Syria has now officially decided to end DST on 2008-11-01 this year,
+# according to the following article in the Syrian Arab News Agency (SANA).
+#
+# The article is in Arabic, and seems to tell that they will go back to
+# winter time on 2008-11-01 at 00:00 local daylight time (delaying/setting
+# clocks back 60 minutes).
+#
+# 
+# http://sana.sy/ara/2/2008/10/07/195459.htm
+# 
+
 Rule	Syria	2008	max	-	Apr	Fri>=1	0:00	1:00	S
-Rule	Syria	2008	max	-	Oct	1	0:00	0	-
+Rule	Syria	2008	max	-	Nov	1	0:00	0	-
 
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]
 Zone	Asia/Damascus	2:25:12 -	LMT	1920	# Dimashq

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Tue Oct 14 09:53:47 2008	(r183876)
+++ stable/7/share/zoneinfo/southamerica	Tue Oct 14 10:09:32 2008	(r183877)
@@ -1,4 +1,4 @@
-# @(#)southamerica	8.29
+# @(#)southamerica	8.30
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -177,6 +177,22 @@ Rule	Arg	2000	only	-	Mar	3	0:00	0	-
 # http://www.impulsobaires.com.ar/nota.php?id=57832 (in spanish)
 # 
 
+# From Rodrigo Severo (2008-10-06):
+# Here is some info available at a Gentoo bug related to TZ on Argentina's DST:
+# ...
+# ------- Comment #1 from [jmdocile]  2008-10-06 16:28 0000 -------
+# Hi, there is a problem with timezone-data-2008e and maybe with
+# timezone-data-2008f
+# Argentinian law [Number] 25.155 is no longer valid.
+# 
+# http://www.infoleg.gov.ar/infolegInternet/anexos/60000-64999/60036/norma.htm
+# 
+# The new one is law [Number] 26.350
+# 
+# http://www.infoleg.gov.ar/infolegInternet/anexos/135000-139999/136191/norma.htm
+# 
+# So there is no summer time in Argentina for now.
+
 Rule	Arg	2007	only	-	Dec	30	0:00	1:00	S
 Rule	Arg	2008	max	-	Mar	Sun>=15	0:00	0	-
 Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:00	S

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Oct 14 09:53:47 2008	(r183876)
+++ stable/7/share/zoneinfo/zone.tab	Tue Oct 14 10:09:32 2008	(r183877)
@@ -1,4 +1,4 @@
-# @(#)zone.tab	8.18
+# @(#)zone.tab	8.19
 #
 # TZ zone descriptions
 #
@@ -293,7 +293,7 @@ NL	+5222+00454	Europe/Amsterdam
 NO	+5955+01045	Europe/Oslo
 NP	+2743+08519	Asia/Katmandu
 NR	-0031+16655	Pacific/Nauru
-NU	-1901+16955	Pacific/Niue
+NU	-1901-16955	Pacific/Niue
 NZ	-3652+17446	Pacific/Auckland	most locations
 NZ	-4357-17633	Pacific/Chatham	Chatham Islands
 OM	+2336+05835	Asia/Muscat
From christoph.mallon at gmx.de  Tue Oct 14 12:34:11 2008
From: christoph.mallon at gmx.de (Christoph Mallon)
Date: Tue Oct 14 12:34:22 2008
Subject: svn commit: r183818 - in stable/7/sys: . i386/include
In-Reply-To: <200810131245.m9DCjIsR076490@svn.freebsd.org>
References: <200810131245.m9DCjIsR076490@svn.freebsd.org>
Message-ID: <48F48B7F.5030009@gmx.de>

Hi Konstantin

Konstantin Belousov wrote:
> Author: kib
> Date: Mon Oct 13 12:45:18 2008
> New Revision: 183818
> URL: http://svn.freebsd.org/changeset/base/183818
> 
> Log:
>   MFC r180756 (by luoqi):
>   Unbreak cc -pg support on i386 by changing mcount() to always preserve %ecx.
>   
>   Approved by:	re (kensmith)
> 
> Modified:
>   stable/7/sys/   (props changed)
>   stable/7/sys/i386/include/profile.h
> 
> Modified: stable/7/sys/i386/include/profile.h
> ==============================================================================
> --- stable/7/sys/i386/include/profile.h	Mon Oct 13 12:28:33 2008	(r183817)
> +++ stable/7/sys/i386/include/profile.h	Mon Oct 13 12:45:18 2008	(r183818)
> @@ -115,7 +115,15 @@ void user(void);
>  void									\
>  mcount()								\
>  {									\
> -	uintfptr_t selfpc, frompc;					\
> +	uintfptr_t selfpc, frompc, ecx;					\
> +	/*								\
> +	 * In gcc 4.2, ecx might be used in the caller as the arg	\
> +	 * pointer if the stack realignment option is set (-mstackrealign) \
> +	 * or if the caller has the force_align_arg_pointer attribute	\
> +	 * (stack realignment is ALWAYS on for main).  Preserve ecx	\
> +	 * here.							\
> +	 */								\
> +	__asm("" : "=c" (ecx));						\
>  	/*								\
>  	 * Find the return address for mcount,				\
>  	 * and the return address for mcount's caller.			\
> @@ -132,6 +140,7 @@ mcount()								\
>  	__asm("movl (%%ebp),%0" : "=r" (frompc));			\
>  	frompc = ((uintfptr_t *)frompc)[1];				\
>  	_mcount(frompc, selfpc);					\
> +	__asm("" : : "c" (ecx));					\
>  }
>  #else /* !__GNUCLIKE_ASM */
>  #define	MCOUNT

This fix is conceptually broken and an accident waiting to happen. There 
is no way to prevent the compiler from shuffling instructions and 
clobbering %ecx. Here is a simple example, which demonstrates this problem:

unsigned f(unsigned a)
{
         unsigned ecx;
         asm("nop" : "=c" (ecx));
         a = 1 << a;
         asm("nop" : : "c" (ecx));
         return a;
}

GCC compiles this to:
f:
#APP
         nop
         nop
#NO_APP
         movl    4(%esp), %ecx
         movl    $1, %eax
         sall    %cl, %eax
         ret

As you can see, %ecx gets destroyed (GCC does not emit the #APP marker 
for empty asm statements, so I added "nop" for clarity. Even then GCC 
merged the two #APP blocks!). In mcount() the compiler could choose to 
place selfpc or frompc into %ecx and change the order of statements, 
which would destroy the contents of %ecx. In fact, if -mstackrealign is 
used, the stack realignment in mcount() destroys %ecx before any of the 
inline assembler statements is executed for sure. The only safe way is 
to implement mcount() using a global asm statement:

#define _MCOUNT_DECL static __attribute((cdecl,noinline)) void _mcount

#define MCOUNT                                         \
asm(                                                   \
	".globl mcount\n\t"                            \
	".type	mcount, @function\n"                   \
	"mcount:\n\t"                                  \
	"pushl %ecx\n\t"                               \
	"pushl 4(%esp)\n\t" // my return address       \
	"pushl 4(%ebp)\n\t" // caller's return address \
	"call  _mcount\n\t"                            \
	"addl  $8, %esp\n\t"                           \
	"pop   %ecx\n\t"                               \
	"ret\n\t"                                      \
	".size   mcount, .-mcount");

Considering the whole issue, I think this is a bug/misfeature of GCC. It 
could easily restore %ecx after calling mcount(), which it does for any 
normal (i.e. non-pg-induced) function call().


On a related note, I have submitted PR i386/127387 with patch 
(http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/127387) about a similar 
problem in _start() in crt1.c for x86.

Regards
	Christoph
From delphij at FreeBSD.org  Tue Oct 14 19:02:47 2008
From: delphij at FreeBSD.org (Xin LI)
Date: Tue Oct 14 19:02:53 2008
Subject: svn commit: r183892 - stable/7/sys/dev/twa
Message-ID: <200810141902.m9EJ2lKt013833@svn.freebsd.org>

Author: delphij
Date: Tue Oct 14 19:02:47 2008
New Revision: 183892
URL: http://svn.freebsd.org/changeset/base/183892

Log:
  MFC r183660: Limit DMA memory to lower addressable 4GB, without
  this patch, we can reliably provoke data corruption on systems
  equipped with a plenty of memory during high load.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/dev/twa/   (props changed)
  stable/7/sys/dev/twa/tw_osl_freebsd.c

Modified: stable/7/sys/dev/twa/tw_osl_freebsd.c
==============================================================================
--- stable/7/sys/dev/twa/tw_osl_freebsd.c	Tue Oct 14 18:24:40 2008	(r183891)
+++ stable/7/sys/dev/twa/tw_osl_freebsd.c	Tue Oct 14 19:02:47 2008	(r183892)
@@ -492,7 +492,7 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	if (bus_dma_tag_create(NULL,			/* parent */
 				sc->alignment,		/* alignment */
 				0,			/* boundary */
-				BUS_SPACE_MAXADDR,	/* lowaddr */
+				BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */
 				TW_CL_MAX_IO_SIZE,	/* maxsize */
@@ -515,7 +515,7 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	if (bus_dma_tag_create(sc->parent_tag,		/* parent */
 				sc->alignment,		/* alignment */
 				0,			/* boundary */
-				BUS_SPACE_MAXADDR,	/* lowaddr */
+				BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */
 				dma_mem_size,		/* maxsize */
@@ -562,7 +562,7 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	if (bus_dma_tag_create(sc->parent_tag,		/* parent */
 				sc->alignment,		/* alignment */
 				0,			/* boundary */
-				BUS_SPACE_MAXADDR,	/* lowaddr */
+				BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */
 				TW_CL_MAX_IO_SIZE,	/* maxsize */
@@ -588,7 +588,7 @@ tw_osli_alloc_mem(struct twa_softc *sc)
 	if (bus_dma_tag_create(sc->parent_tag,		/* parent */
 				sc->alignment,		/* alignment */
 				0,			/* boundary */
-				BUS_SPACE_MAXADDR,	/* lowaddr */
+				BUS_SPACE_MAXADDR_32BIT,/* lowaddr */
 				BUS_SPACE_MAXADDR, 	/* highaddr */
 				NULL, NULL, 		/* filter, filterarg */
 				TW_CL_MAX_IO_SIZE,	/* maxsize */
From dwmalone at FreeBSD.org  Tue Oct 14 19:48:58 2008
From: dwmalone at FreeBSD.org (David Malone)
Date: Tue Oct 14 19:49:15 2008
Subject: svn commit: r183893 - in stable/7/sys: . dev/twa net
Message-ID: <200810141948.m9EJmwbo014701@svn.freebsd.org>

Author: dwmalone
Date: Tue Oct 14 19:48:58 2008
New Revision: 183893
URL: http://svn.freebsd.org/changeset/base/183893

Log:
  Some people's 6to4 routers seem to have been blowing up because of
  the unlocked route caching in if_stf. Add a mutex that protects
  access to cached route. Various versions of this patch were tested
  by Pekka Savola, Nick Sayer and Wouter Snels.
  
  Approved by:    re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/twa/   (props changed)
  stable/7/sys/net/if_stf.c

Modified: stable/7/sys/net/if_stf.c
==============================================================================
--- stable/7/sys/net/if_stf.c	Tue Oct 14 19:02:47 2008	(r183892)
+++ stable/7/sys/net/if_stf.c	Tue Oct 14 19:48:58 2008	(r183893)
@@ -89,6 +89,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -119,6 +120,13 @@
 
 #include 
 
+SYSCTL_DECL(_net_link);
+SYSCTL_NODE(_net_link, IFT_STF, stf, CTLFLAG_RW, 0, "6to4 Interface");
+
+static int stf_route_cache = 1;
+SYSCTL_INT(_net_link_stf, OID_AUTO, route_cache, CTLFLAG_RW,
+    &stf_route_cache, 0, "Caching of IPv4 routes for 6to4 Output");
+
 #define STFNAME		"stf"
 #define STFUNIT		0
 
@@ -137,15 +145,15 @@ struct stf_softc {
 		struct route_in6 __sc_ro6; /* just for safety */
 	} __sc_ro46;
 #define sc_ro	__sc_ro46.__sc_ro4
+	struct mtx	sc_ro_mtx;
 	u_int	sc_fibnum;
 	const struct encaptab *encap_cookie;
 };
 #define STF2IFP(sc)	((sc)->sc_ifp)
 
 /*
- * XXXRW: Note that mutable fields in the softc are not currently locked:
- * in particular, sc_ro needs to be protected from concurrent entrance
- * of stf_output().
+ * Note that mutable fields in the softc are not currently locked.
+ * We do lock sc_ro in stf_output though.
  */
 static MALLOC_DEFINE(M_STF, STFNAME, "6to4 Tunnel Interface");
 static const int ip_stf_ttl = 40;
@@ -231,6 +239,7 @@ stf_clone_create(struct if_clone *ifc, c
 	ifp->if_dname = ifc->ifc_name;
 	ifp->if_dunit = IF_DUNIT_NONE;
 
+	mtx_init(&(sc)->sc_ro_mtx, "stf ro", NULL, MTX_DEF);
 	sc->encap_cookie = encap_attach_func(AF_INET, IPPROTO_IPV6,
 	    stf_encapcheck, &in_stf_protosw, sc);
 	if (sc->encap_cookie == NULL) {
@@ -257,6 +266,7 @@ stf_clone_destroy(struct if_clone *ifc, 
 
 	err = encap_detach(sc->encap_cookie);
 	KASSERT(err == 0, ("Unexpected error detaching encap_cookie"));
+	mtx_destroy(&(sc)->sc_ro_mtx);
 	bpfdetach(ifp);
 	if_detach(ifp);
 	if_free(ifp);
@@ -398,6 +408,7 @@ stf_output(ifp, m, dst, rt)
 {
 	struct stf_softc *sc;
 	struct sockaddr_in6 *dst6;
+	struct route *cached_route;
 	struct in_addr in4;
 	caddr_t ptr;
 	struct sockaddr_in *dst4;
@@ -406,9 +417,9 @@ stf_output(ifp, m, dst, rt)
 	struct ip6_hdr *ip6;
 	struct in6_ifaddr *ia6;
 	u_int32_t af;
-#ifdef MAC
 	int error;
 
+#ifdef MAC
 	error = mac_check_ifnet_transmit(ifp, m);
 	if (error) {
 		m_freem(m);
@@ -507,9 +518,15 @@ stf_output(ifp, m, dst, rt)
 	else
 		ip_ecn_ingress(ECN_NOCARE, &ip->ip_tos, &tos);
 
+	if (!stf_route_cache) {
+		cached_route = NULL;
+		goto sendit;
+	}
+
 	/*
-	 * XXXRW: Locking of sc_ro required.
+	 * Do we have a cached route?
 	 */
+	mtx_lock(&(sc)->sc_ro_mtx);
 	dst4 = (struct sockaddr_in *)&sc->sc_ro.ro_dst;
 	if (dst4->sin_family != AF_INET ||
 	    bcmp(&dst4->sin_addr, &ip->ip_dst, sizeof(ip->ip_dst)) != 0) {
@@ -527,14 +544,21 @@ stf_output(ifp, m, dst, rt)
 		rtalloc_fib(&sc->sc_ro, sc->sc_fibnum);
 		if (sc->sc_ro.ro_rt == NULL) {
 			m_freem(m);
+			mtx_unlock(&(sc)->sc_ro_mtx);
 			ifp->if_oerrors++;
 			return ENETUNREACH;
 		}
 	}
+	cached_route = &sc->sc_ro;
 
+sendit:
 	M_SETFIB(m, sc->sc_fibnum);
 	ifp->if_opackets++;
-	return ip_output(m, NULL, &sc->sc_ro, 0, NULL, NULL);
+	error = ip_output(m, NULL, cached_route, 0, NULL, NULL);
+
+	if (cached_route != NULL)
+		mtx_unlock(&(sc)->sc_ro_mtx);
+	return error;
 }
 
 static int
From jhb at freebsd.org  Tue Oct 14 20:17:23 2008
From: jhb at freebsd.org (John Baldwin)
Date: Tue Oct 14 20:17:40 2008
Subject: svn commit: r183892 - stable/7/sys/dev/twa
In-Reply-To: <200810141902.m9EJ2lKt013833@svn.freebsd.org>
References: <200810141902.m9EJ2lKt013833@svn.freebsd.org>
Message-ID: <200810141616.27776.jhb@freebsd.org>

On Tuesday 14 October 2008 03:02:47 pm Xin LI wrote:
> Author: delphij
> Date: Tue Oct 14 19:02:47 2008
> New Revision: 183892
> URL: http://svn.freebsd.org/changeset/base/183892
> 
> Log:
>   MFC r183660: Limit DMA memory to lower addressable 4GB, without
>   this patch, we can reliably provoke data corruption on systems
>   equipped with a plenty of memory during high load.
>   
>   Approved by:	re (kib)
> 
> Modified:
>   stable/7/sys/dev/twa/   (props changed)
>   stable/7/sys/dev/twa/tw_osl_freebsd.c

Need to re-merge this to stable/7/sys to move the merge info up to sys and out 
of sys/dev/twa.

-- 
John Baldwin
From delphij at delphij.net  Tue Oct 14 20:47:29 2008
From: delphij at delphij.net (Xin LI)
Date: Tue Oct 14 20:47:40 2008
Subject: svn commit: r183892 - stable/7/sys/dev/twa
In-Reply-To: <200810141616.27776.jhb@freebsd.org>
References: <200810141902.m9EJ2lKt013833@svn.freebsd.org>
	<200810141616.27776.jhb@freebsd.org>
Message-ID: <48F50552.7070507@delphij.net>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

John Baldwin wrote:
> On Tuesday 14 October 2008 03:02:47 pm Xin LI wrote:
>> Author: delphij
>> Date: Tue Oct 14 19:02:47 2008
>> New Revision: 183892
>> URL: http://svn.freebsd.org/changeset/base/183892
>>
>> Log:
>>   MFC r183660: Limit DMA memory to lower addressable 4GB, without
>>   this patch, we can reliably provoke data corruption on systems
>>   equipped with a plenty of memory during high load.
>>   
>>   Approved by:	re (kib)
>>
>> Modified:
>>   stable/7/sys/dev/twa/   (props changed)
>>   stable/7/sys/dev/twa/tw_osl_freebsd.c
> 
> Need to re-merge this to stable/7/sys to move the merge info up to sys and out 
> of sys/dev/twa.

Sorry for that.  Seems that David Malone has committed a merge on sys/
which already collapsed the mergeinfo?

Cheers,
- --
Xin LI 	http://www.delphij.net/
FreeBSD - The Power to Serve!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkj1BVEACgkQi+vbBBjt66D2QQCcC52AesgNxP0IDgH9LtMPzQ26
xX8An13BAPJax/5/D7LxyN1MowCGL67j
=NF1s
-----END PGP SIGNATURE-----
From rwatson at FreeBSD.org  Tue Oct 14 22:48:38 2008
From: rwatson at FreeBSD.org (Robert Watson)
Date: Tue Oct 14 22:49:56 2008
Subject: svn commit: r183898 - in stable/7/sys: . kern
Message-ID: <200810142248.m9EMmcOG017957@svn.freebsd.org>

Author: rwatson
Date: Tue Oct 14 22:48:38 2008
New Revision: 183898
URL: http://svn.freebsd.org/changeset/base/183898

Log:
  Merge r183675 from head to stable/7:
  
    In soreceive_dgram, when a 0-length buffer is passed into recv(2) and
    no data is ready, return 0 rather than blocking or returning EAGAIN.
    This is consistent with the behavior of soreceive_generic (soreceive)
    in earlier versions of FreeBSD, and restores this behavior for UDP.
  
    Discussed with: jhb, sam
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/uipc_socket.c

Modified: stable/7/sys/kern/uipc_socket.c
==============================================================================
--- stable/7/sys/kern/uipc_socket.c	Tue Oct 14 22:11:18 2008	(r183897)
+++ stable/7/sys/kern/uipc_socket.c	Tue Oct 14 22:48:38 2008	(r183898)
@@ -1900,7 +1900,8 @@ soreceive_dgram(struct socket *so, struc
 			SOCKBUF_UNLOCK(&so->so_rcv);
 			return (error);
 		}
-		if (so->so_rcv.sb_state & SBS_CANTRCVMORE) {
+		if (so->so_rcv.sb_state & SBS_CANTRCVMORE ||
+		    uio->uio_resid == 0) {
 			SOCKBUF_UNLOCK(&so->so_rcv);
 			return (0);
 		}
From kostikbel at gmail.com  Wed Oct 15 11:28:18 2008
From: kostikbel at gmail.com (Kostik Belousov)
Date: Wed Oct 15 11:28:30 2008
Subject: svn commit: r183818 - in stable/7/sys: . i386/include
In-Reply-To: <48F48B7F.5030009@gmx.de>
References: <200810131245.m9DCjIsR076490@svn.freebsd.org>
	<48F48B7F.5030009@gmx.de>
Message-ID: <20081015112810.GN7782@deviant.kiev.zoral.com.ua>

On Tue, Oct 14, 2008 at 02:07:27PM +0200, Christoph Mallon wrote:
> Hi Konstantin
> 
> Konstantin Belousov wrote:
> >Author: kib
> >Date: Mon Oct 13 12:45:18 2008
> >New Revision: 183818
> >URL: http://svn.freebsd.org/changeset/base/183818
> >
> >Log:
> >  MFC r180756 (by luoqi):
> >  Unbreak cc -pg support on i386 by changing mcount() to always preserve 
> >  %ecx.
> >  
> >  Approved by:	re (kensmith)
> >
> >Modified:
> >  stable/7/sys/   (props changed)
> >  stable/7/sys/i386/include/profile.h
> >
> >Modified: stable/7/sys/i386/include/profile.h
> >==============================================================================
> >--- stable/7/sys/i386/include/profile.h	Mon Oct 13 12:28:33 2008 
> >(r183817)
> >+++ stable/7/sys/i386/include/profile.h	Mon Oct 13 12:45:18 2008 
> >(r183818)
> >@@ -115,7 +115,15 @@ void user(void);
> > void									\
> > mcount()								\
> > {									\
> >-	uintfptr_t selfpc, frompc;					\
> >+	uintfptr_t selfpc, frompc, ecx;					\
> >+	/*								\
> >+	 * In gcc 4.2, ecx might be used in the caller as the arg	\
> >+	 * pointer if the stack realignment option is set (-mstackrealign) \
> >+	 * or if the caller has the force_align_arg_pointer attribute	\
> >+	 * (stack realignment is ALWAYS on for main).  Preserve ecx	\
> >+	 * here.							\
> >+	 */								\
> >+	__asm("" : "=c" (ecx));						\
> > 	/*								\
> > 	 * Find the return address for mcount,				\
> > 	 * and the return address for mcount's caller.			\
> >@@ -132,6 +140,7 @@ mcount()						 \
> > 	__asm("movl (%%ebp),%0" : "=r" (frompc));			\
> > 	frompc = ((uintfptr_t *)frompc)[1];				\
> > 	_mcount(frompc, selfpc);					\
> >+	__asm("" : : "c" (ecx));					\
> > }
> > #else /* !__GNUCLIKE_ASM */
> > #define	MCOUNT
> 
> This fix is conceptually broken and an accident waiting to happen. There 
> is no way to prevent the compiler from shuffling instructions and 
> clobbering %ecx. Here is a simple example, which demonstrates this problem:
> 
> unsigned f(unsigned a)
> {
>         unsigned ecx;
>         asm("nop" : "=c" (ecx));
>         a = 1 << a;
>         asm("nop" : : "c" (ecx));
>         return a;
> }
> 
> GCC compiles this to:
> f:
> #APP
>         nop
>         nop
> #NO_APP
>         movl    4(%esp), %ecx
>         movl    $1, %eax
>         sall    %cl, %eax
>         ret
> 
> As you can see, %ecx gets destroyed (GCC does not emit the #APP marker 
> for empty asm statements, so I added "nop" for clarity. Even then GCC 
> merged the two #APP blocks!). In mcount() the compiler could choose to 
> place selfpc or frompc into %ecx and change the order of statements, 
> which would destroy the contents of %ecx. In fact, if -mstackrealign is 
> used, the stack realignment in mcount() destroys %ecx before any of the 
> inline assembler statements is executed for sure. The only safe way is 
> to implement mcount() using a global asm statement:
> 
> #define _MCOUNT_DECL static __attribute((cdecl,noinline)) void _mcount
> 
> #define MCOUNT                                         \
> asm(                                                   \
> 	".globl mcount\n\t"                            \
> 	".type	mcount, @function\n"                   \
> 	"mcount:\n\t"                                  \
> 	"pushl %ecx\n\t"                               \
> 	"pushl 4(%esp)\n\t" // my return address       \
> 	"pushl 4(%ebp)\n\t" // caller's return address \
> 	"call  _mcount\n\t"                            \
> 	"addl  $8, %esp\n\t"                           \
> 	"pop   %ecx\n\t"                               \
> 	"ret\n\t"                                      \
> 	".size   mcount, .-mcount");
> 
> Considering the whole issue, I think this is a bug/misfeature of GCC. It 
> could easily restore %ecx after calling mcount(), which it does for any 
> normal (i.e. non-pg-induced) function call().
I was worried too about suspiciously looking direct asm manipulations of
the registers that could interfere with optimizer, when I have seen the
patch committed to the HEAD. On the other hand, it magically works for
the present version of the gcc and used compiler flags.

We cannot have any other fix for 7.1, I suspect. Feel free to submit
more accurate patch. And, as was stated in the original commit message,
saving of the whole register file may be right thing to do.
> 
> 
> On a related note, I have submitted PR i386/127387 with patch 
> (http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/127387) about a similar 
> problem in _start() in crt1.c for x86.
> 
> Regards
> 	Christoph
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20081015/de625d00/attachment.pgp
From christoph.mallon at gmx.de  Wed Oct 15 12:08:45 2008
From: christoph.mallon at gmx.de (Christoph Mallon)
Date: Wed Oct 15 12:08:52 2008
Subject: svn commit: r183818 - in stable/7/sys: . i386/include
In-Reply-To: <20081015112810.GN7782@deviant.kiev.zoral.com.ua>
References: <200810131245.m9DCjIsR076490@svn.freebsd.org>
	<48F48B7F.5030009@gmx.de>
	<20081015112810.GN7782@deviant.kiev.zoral.com.ua>
Message-ID: <48F5DD49.6040003@gmx.de>

Kostik Belousov wrote:
> On Tue, Oct 14, 2008 at 02:07:27PM +0200, Christoph Mallon wrote:
>> Hi Konstantin
>>
>> Konstantin Belousov wrote:
>>> Author: kib
>>> Date: Mon Oct 13 12:45:18 2008
>>> New Revision: 183818
>>> URL: http://svn.freebsd.org/changeset/base/183818
>>>
>>> Log:
>>>  MFC r180756 (by luoqi):
>>>  Unbreak cc -pg support on i386 by changing mcount() to always preserve 
>>>  %ecx.

[...]

>> As you can see, %ecx gets destroyed (GCC does not emit the #APP marker 
>> for empty asm statements, so I added "nop" for clarity. Even then GCC 
>> merged the two #APP blocks!). In mcount() the compiler could choose to 
>> place selfpc or frompc into %ecx and change the order of statements, 
>> which would destroy the contents of %ecx. In fact, if -mstackrealign is 
>> used, the stack realignment in mcount() destroys %ecx before any of the 
>> inline assembler statements is executed for sure. The only safe way is 
>> to implement mcount() using a global asm statement:
>>
>> #define _MCOUNT_DECL static __attribute((cdecl,noinline)) void _mcount
>>
>> #define MCOUNT                                         \
>> asm(                                                   \
>> 	".globl mcount\n\t"                            \
>> 	".type	mcount, @function\n"                   \
>> 	"mcount:\n\t"                                  \
>> 	"pushl %ecx\n\t"                               \
>> 	"pushl 4(%esp)\n\t" // my return address       \
>> 	"pushl 4(%ebp)\n\t" // caller's return address \
>> 	"call  _mcount\n\t"                            \
>> 	"addl  $8, %esp\n\t"                           \
>> 	"pop   %ecx\n\t"                               \
>> 	"ret\n\t"                                      \
>> 	".size   mcount, .-mcount");
>>
>> Considering the whole issue, I think this is a bug/misfeature of GCC. It 
>> could easily restore %ecx after calling mcount(), which it does for any 
>> normal (i.e. non-pg-induced) function call().
> I was worried too about suspiciously looking direct asm manipulations of
> the registers that could interfere with optimizer, when I have seen the
> patch committed to the HEAD. On the other hand, it magically works for
> the present version of the gcc and used compiler flags.

No, it does not work. I exactly described the scenario in which it plain 
breaks: If you use -mstackrealign, then mcount() gets realignment code 
too, which destroys the contents of %ecx *before* any of the inline 
assembler statemets get executed. The first thing the compiler inserts 
into mcount() is this line:

	leal    4(%esp), %ecx

This immediately destroys %ecx. And even if you do not use 
-mstackrealign - as I explained - you have *no* guarantee that you get 
the contents of %ecx from before the function call. It depends on the 
exact switches (which GCC has dozens of) to not explode - have you 
tested *all* combinations?

> We cannot have any other fix for 7.1, I suspect.

We should, for the reasons explained above.

> Feel free to submit more accurate patch.

Um, I *did*. See the code above.

Regards
	Christoph
From weongyo at FreeBSD.org  Thu Oct 16 08:24:03 2008
From: weongyo at FreeBSD.org (Weongyo Jeong)
Date: Thu Oct 16 08:24:09 2008
Subject: svn commit: r183930 - in stable/7/sys: . dev/if_ndis dev/twa
Message-ID: <200810160824.m9G8O2Pq055578@svn.freebsd.org>

Author: weongyo
Date: Thu Oct 16 08:24:02 2008
New Revision: 183930
URL: http://svn.freebsd.org/changeset/base/183930

Log:
  MFC r183587:
  
    sc->ndis_txidx should be cycle between 0 and sc->ndis_maxpkts, not
    NDIS_TXPKTS and don't allocate unused extra spaces for
    sc->ndis_txarray and sc->ndis_txpool.
  
    PR:		kern/127644
    Submitted by:	Antoine Pelisse 
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/if_ndis/if_ndis.c
  stable/7/sys/dev/if_ndis/if_ndisvar.h
  stable/7/sys/dev/twa/   (props changed)

Modified: stable/7/sys/dev/if_ndis/if_ndis.c
==============================================================================
--- stable/7/sys/dev/if_ndis/if_ndis.c	Thu Oct 16 04:17:17 2008	(r183929)
+++ stable/7/sys/dev/if_ndis/if_ndis.c	Thu Oct 16 08:24:02 2008	(r183930)
@@ -660,12 +660,12 @@ ndis_attach(dev)
 		sc->ndis_maxpkts = 10;
 
 	sc->ndis_txarray = malloc(sizeof(ndis_packet *) *
-	    NDIS_TXPKTS, M_DEVBUF, M_NOWAIT|M_ZERO);
+	    sc->ndis_maxpkts, M_DEVBUF, M_NOWAIT|M_ZERO);
 
 	/* Allocate a pool of ndis_packets for TX encapsulation. */
 
 	NdisAllocatePacketPool(&i, &sc->ndis_txpool,
-	   NDIS_TXPKTS, PROTOCOL_RESERVED_SIZE_IN_PACKET);
+	    sc->ndis_maxpkts, PROTOCOL_RESERVED_SIZE_IN_PACKET);
 
 	if (i != NDIS_STATUS_SUCCESS) {
 		sc->ndis_txpool = NULL;

Modified: stable/7/sys/dev/if_ndis/if_ndisvar.h
==============================================================================
--- stable/7/sys/dev/if_ndis/if_ndisvar.h	Thu Oct 16 04:17:17 2008	(r183929)
+++ stable/7/sys/dev/if_ndis/if_ndisvar.h	Thu Oct 16 08:24:02 2008	(r183930)
@@ -87,7 +87,7 @@ TAILQ_HEAD(nch, ndis_cfglist);
 
 #define NDIS_TXPKTS 64
 #define NDIS_INC(x)		\
-	(x)->ndis_txidx = ((x)->ndis_txidx + 1) % NDIS_TXPKTS
+	(x)->ndis_txidx = ((x)->ndis_txidx + 1) % (x)->ndis_maxpkts
 
 #if __FreeBSD_version < 600007
 #define arpcom ic.ic_ac
From jhb at FreeBSD.org  Thu Oct 16 17:11:07 2008
From: jhb at FreeBSD.org (John Baldwin)
Date: Thu Oct 16 17:11:18 2008
Subject: svn commit: r183956 - in stable/7/sys: . dev/twa
Message-ID: <200810161711.m9GHB6ue066395@svn.freebsd.org>

Author: jhb
Date: Thu Oct 16 17:11:06 2008
New Revision: 183956
URL: http://svn.freebsd.org/changeset/base/183956

Log:
  Move mergeinfo from sys/dev/twa up to sys.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/twa/   (props changed)
From jhb at FreeBSD.org  Fri Oct 17 19:52:35 2008
From: jhb at FreeBSD.org (John Baldwin)
Date: Fri Oct 17 19:52:46 2008
Subject: svn commit: r183984 - in stable/7/sys: . i386/i386 i386/include
Message-ID: <200810171952.m9HJqZ8m096334@svn.freebsd.org>

Author: jhb
Date: Fri Oct 17 19:52:35 2008
New Revision: 183984
URL: http://svn.freebsd.org/changeset/base/183984

Log:
  MFC: More CPUID feature flags: SSE4, X2APIC, POPCNT, DTES64, and 1GB
  large pages.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/i386/i386/identcpu.c
  stable/7/sys/i386/include/specialreg.h

Modified: stable/7/sys/i386/i386/identcpu.c
==============================================================================
--- stable/7/sys/i386/i386/identcpu.c	Fri Oct 17 18:19:36 2008	(r183983)
+++ stable/7/sys/i386/i386/identcpu.c	Fri Oct 17 19:52:35 2008	(r183984)
@@ -720,7 +720,7 @@ printcpuinfo(void)
 				"\020"
 				"\001SSE3"	/* SSE3 */
 				"\002"
-				"\003RSVD2"	/* "Reserved" bit 2 */
+				"\003DTES64"	/* 64-bit Debug Trace */
 				"\004MON"	/* MONITOR/MWAIT Instructions */
 				"\005DS_CPL"	/* CPL Qualified Debug Store */
 				"\006VMX"	/* Virtual Machine Extensions */
@@ -737,11 +737,11 @@ printcpuinfo(void)
 				"\021"
 				"\022"
 				"\023DCA"	/* Direct Cache Access */
-				"\024"
-				"\025"
-				"\026"
+				"\024SSE4.1"
+				"\025SSE4.2"
+				"\026x2APIC"	/* xAPIC Extensions */
 				"\027"
-				"\030"
+				"\030POPCNT"
 				"\031"
 				"\032"
 				"\033"
@@ -791,7 +791,7 @@ printcpuinfo(void)
 				"\030"	/* Same */
 				"\031"	/* Same */
 				"\032FFXSR"	/* Fast FXSAVE/FXRSTOR */
-				"\033"	/* Undefined */
+				"\033Page1GB"	/* 1-GB large page support */
 				"\034RDTSCP"	/* RDTSCP */
 				"\035"	/* Undefined */
 				"\036LM"	/* 64 bit long mode */

Modified: stable/7/sys/i386/include/specialreg.h
==============================================================================
--- stable/7/sys/i386/include/specialreg.h	Fri Oct 17 18:19:36 2008	(r183983)
+++ stable/7/sys/i386/include/specialreg.h	Fri Oct 17 19:52:35 2008	(r183984)
@@ -110,6 +110,7 @@
 #define	CPUID_PBE	0x80000000
 
 #define	CPUID2_SSE3	0x00000001
+#define	CPUID2_DTES64	0x00000004
 #define	CPUID2_MON	0x00000008
 #define	CPUID2_DS_CPL	0x00000010
 #define	CPUID2_VMX	0x00000020
@@ -122,6 +123,10 @@
 #define	CPUID2_XTPR	0x00004000
 #define	CPUID2_PDCM	0x00008000
 #define	CPUID2_DCA	0x00040000
+#define	CPUID2_SSE41	0x00080000
+#define	CPUID2_SSE42	0x00100000
+#define	CPUID2_X2APIC	0x00200000
+#define	CPUID2_POPCNT	0x00800000
 
 /*
  * Important bits in the AMD extended cpuid flags
@@ -131,6 +136,7 @@
 #define	AMDID_NX	0x00100000
 #define	AMDID_EXT_MMX	0x00400000
 #define	AMDID_FFXSR	0x01000000
+#define	AMDID_PAGE1GB	0x04000000
 #define	AMDID_RDTSCP	0x08000000
 #define	AMDID_LM	0x20000000
 #define	AMDID_EXT_3DNOW	0x40000000
From weongyo at FreeBSD.org  Sat Oct 18 04:11:25 2008
From: weongyo at FreeBSD.org (Weongyo Jeong)
Date: Sat Oct 18 04:11:42 2008
Subject: svn commit: r184009 - in stable/7/sys: . dev/usb
Message-ID: <200810180411.m9I4BPOS006256@svn.freebsd.org>

Author: weongyo
Date: Sat Oct 18 04:11:25 2008
New Revision: 184009
URL: http://svn.freebsd.org/changeset/base/184009

Log:
  MFC r182783:
    Add ZyXEL G-202
  
    Obtained from:	OpenBSD
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/usb/if_zyd.c
  stable/7/sys/dev/usb/usbdevs

Modified: stable/7/sys/dev/usb/if_zyd.c
==============================================================================
--- stable/7/sys/dev/usb/if_zyd.c	Sat Oct 18 03:57:57 2008	(r184008)
+++ stable/7/sys/dev/usb/if_zyd.c	Sat Oct 18 04:11:25 2008	(r184009)
@@ -119,6 +119,7 @@ static const struct zyd_type {
 	ZYD_ZD1211_DEV(ZYXEL,		AG225H),
 	ZYD_ZD1211_DEV(ZYXEL,		ZYAIRG220),
 	ZYD_ZD1211_DEV(ZYXEL,		G200V2),
+	ZYD_ZD1211_DEV(ZYXEL,		G202),
 
 	ZYD_ZD1211B_DEV(ACCTON,		SMCWUSBG),
 	ZYD_ZD1211B_DEV(ACCTON,		ZD1211B),

Modified: stable/7/sys/dev/usb/usbdevs
==============================================================================
--- stable/7/sys/dev/usb/usbdevs	Sat Oct 18 03:57:57 2008	(r184008)
+++ stable/7/sys/dev/usb/usbdevs	Sat Oct 18 04:11:25 2008	(r184009)
@@ -2391,5 +2391,6 @@ product ZYXEL 980N		0x2011	Scorpion-980N
 product ZYXEL ZYAIRG220		0x3401	ZyAIR G-220
 product ZYXEL G200V2		0x3407	G-200 v2
 product ZYXEL AG225H		0x3409	AG-225H
+product ZYXEL G202		0x3410	G-202
 product ZYXEL M202		0x340a	M-202
 product ZYXEL G220V2		0x340f	G-220 v2
From weongyo at FreeBSD.org  Sat Oct 18 04:13:52 2008
From: weongyo at FreeBSD.org (Weongyo Jeong)
Date: Sat Oct 18 04:13:58 2008
Subject: svn commit: r184010 - in stable/7/sys: . dev/usb
Message-ID: <200810180413.m9I4DpVM006348@svn.freebsd.org>

Author: weongyo
Date: Sat Oct 18 04:13:51 2008
New Revision: 184010
URL: http://svn.freebsd.org/changeset/base/184010

Log:
  MFC r182799:
    Sort products numerically.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/usb/usbdevs

Modified: stable/7/sys/dev/usb/usbdevs
==============================================================================
--- stable/7/sys/dev/usb/usbdevs	Sat Oct 18 04:11:25 2008	(r184009)
+++ stable/7/sys/dev/usb/usbdevs	Sat Oct 18 04:13:51 2008	(r184010)
@@ -2391,6 +2391,6 @@ product ZYXEL 980N		0x2011	Scorpion-980N
 product ZYXEL ZYAIRG220		0x3401	ZyAIR G-220
 product ZYXEL G200V2		0x3407	G-200 v2
 product ZYXEL AG225H		0x3409	AG-225H
-product ZYXEL G202		0x3410	G-202
 product ZYXEL M202		0x340a	M-202
 product ZYXEL G220V2		0x340f	G-220 v2
+product ZYXEL G202		0x3410	G-202
From yongari at FreeBSD.org  Sun Oct 19 06:38:34 2008
From: yongari at FreeBSD.org (Pyun YongHyeon)
Date: Sun Oct 19 06:38:46 2008
Subject: svn commit: r184045 - in stable/7/sys: . dev/jme
Message-ID: <200810190638.m9J6cYhm036074@svn.freebsd.org>

Author: yongari
Date: Sun Oct 19 06:38:34 2008
New Revision: 184045
URL: http://svn.freebsd.org/changeset/base/184045

Log:
  MFC r183814:
    Read PCI device id instead of PCI revision id. Also checks the read
    device id is JMC260 family. Previously it just verified the deivce
    is JMC260 Rev A0. This will make it easy for newer JMC2xx support.
  
    Pointed out by:	bouyer at NetBSD
  
  MFC r183859:
    Make sure to read the last byte of EEPROM descriptor. Previously
    the last byte of the ethernet address was not read which in turn
    resulted in getting 5 out of the 6 bytes of ethernet address and
    always returned ENOENT. I did not notice the bug on FPGA version
    because of additional configuration data in EEPROM.
  
    Pointed out by:	bouyer at NetBSD
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/jme/if_jme.c
  stable/7/sys/dev/jme/if_jmereg.h

Modified: stable/7/sys/dev/jme/if_jme.c
==============================================================================
--- stable/7/sys/dev/jme/if_jme.c	Sun Oct 19 06:12:47 2008	(r184044)
+++ stable/7/sys/dev/jme/if_jme.c	Sun Oct 19 06:38:34 2008	(r184045)
@@ -415,11 +415,8 @@ jme_eeprom_macaddr(struct jme_softc *sc)
 	do {
 		if (jme_eeprom_read_byte(sc, offset, &fup) != 0)
 			break;
-		/* Check for the end of EEPROM descriptor. */
-		if ((fup & JME_EEPROM_DESC_END) == JME_EEPROM_DESC_END)
-			break;
-		if ((uint8_t)JME_EEPROM_MKDESC(JME_EEPROM_FUNC0,
-		    JME_EEPROM_PAGE_BAR1) == fup) {
+		if (JME_EEPROM_MKDESC(JME_EEPROM_FUNC0, JME_EEPROM_PAGE_BAR1) ==
+		    (fup & (JME_EEPROM_FUNC_MASK | JME_EEPROM_PAGE_MASK))) {
 			if (jme_eeprom_read_byte(sc, offset + 1, ®) != 0)
 				break;
 			if (reg >= JME_PAR0 &&
@@ -431,6 +428,9 @@ jme_eeprom_macaddr(struct jme_softc *sc)
 				match++;
 			}
 		}
+		/* Check for the end of EEPROM descriptor. */
+		if ((fup & JME_EEPROM_DESC_END) == JME_EEPROM_DESC_END)
+			break;
 		/* Try next eeprom descriptor. */
 		offset += JME_EEPROM_DESC_BYTES;
 	} while (match != ETHER_ADDR_LEN && offset < JME_EEPROM_END);
@@ -624,8 +624,8 @@ jme_attach(device_t dev)
 		goto fail;
 	}
 
-	sc->jme_rev = pci_get_revid(dev);
-	if (sc->jme_rev == DEVICEID_JMC260) {
+	sc->jme_rev = pci_get_device(dev);
+	if ((sc->jme_rev & DEVICEID_JMC2XX_MASK) == DEVICEID_JMC260) {
 		sc->jme_flags |= JME_FLAG_FASTETH;
 		sc->jme_flags |= JME_FLAG_NOJUMBO;
 	}

Modified: stable/7/sys/dev/jme/if_jmereg.h
==============================================================================
--- stable/7/sys/dev/jme/if_jmereg.h	Sun Oct 19 06:12:47 2008	(r184044)
+++ stable/7/sys/dev/jme/if_jmereg.h	Sun Oct 19 06:38:34 2008	(r184045)
@@ -48,6 +48,8 @@
 #define	DEVICEID_JMC260		0x0260
 #define	DEVICEREVID_JMC260_A0	0x00
 
+#define	DEVICEID_JMC2XX_MASK	0x0FF0
+
 /* JMC250 PCI configuration register. */
 #define	JME_PCI_BAR0		0x10	/* 16KB memory window. */
 
From kib at FreeBSD.org  Mon Oct 20 11:15:58 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 20 11:16:15 2008
Subject: svn commit: r184075 - in stable/7/sys: . amd64/linux32 compat/linux
	i386/linux
Message-ID: <200810201115.m9KBFvoE069538@svn.freebsd.org>

Author: kib
Date: Mon Oct 20 11:15:57 2008
New Revision: 184075
URL: http://svn.freebsd.org/changeset/base/184075

Log:
  MFC r177257 (by rdivacky):
  Implement sched_setaffinity and get_setaffinity using real cpu affinity
  setting primitives.
  
  MFC r177604 (by ru):
  Fix build.
  
  MFC r183612:
  Use FreeBSD size of cpuset_t for bitmap size parameter and return EINVAL
  if length of user space bitmap less than our size of cpuset_t.
  
  Approved by: re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/amd64/linux32/syscalls.master
  stable/7/sys/compat/linux/linux_misc.c
  stable/7/sys/i386/linux/syscalls.master

Modified: stable/7/sys/amd64/linux32/syscalls.master
==============================================================================
--- stable/7/sys/amd64/linux32/syscalls.master	Mon Oct 20 10:11:33 2008	(r184074)
+++ stable/7/sys/amd64/linux32/syscalls.master	Mon Oct 20 11:15:57 2008	(r184075)
@@ -407,7 +407,8 @@
 239	AUE_SENDFILE	UNIMPL	linux_sendfile64
 240	AUE_NULL	STD	{ int linux_sys_futex(void *uaddr, int op, int val, \
 					struct l_timespec *timeout, void *uaddr2, int val3); }
-241	AUE_NULL	UNIMPL	linux_sched_setaffinity
+241	AUE_NULL	STD	{ int linux_sched_setaffinity(l_pid_t pid, l_uint len, \
+					l_ulong *user_mask_ptr); }
 242	AUE_NULL	STD	{ int linux_sched_getaffinity(l_pid_t pid, l_uint len, \
 					l_ulong *user_mask_ptr); }
 243	AUE_NULL	STD	{ int linux_set_thread_area(struct l_user_desc *desc); }

Modified: stable/7/sys/compat/linux/linux_misc.c
==============================================================================
--- stable/7/sys/compat/linux/linux_misc.c	Mon Oct 20 10:11:33 2008	(r184074)
+++ stable/7/sys/compat/linux/linux_misc.c	Mon Oct 20 11:15:57 2008	(r184075)
@@ -63,6 +63,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -1730,22 +1731,57 @@ linux_prctl(struct thread *td, struct li
 }
 
 /*
- * XXX: fake one.. waiting for real implementation of affinity mask.
+ * Get affinity of a process.
  */
 int
 linux_sched_getaffinity(struct thread *td,
     struct linux_sched_getaffinity_args *args)
 {
 	int error;
-	cpumask_t i = ~0;
+	struct cpuset_getaffinity_args cga;
 
-	if (args->len < sizeof(cpumask_t))
+#ifdef DEBUG
+	if (ldebug(sched_getaffinity))
+		printf(ARGS(sched_getaffinity, "%d, %d, *"), args->pid,
+		    args->len);
+#endif
+	if (args->len < sizeof(cpuset_t))
 		return (EINVAL);
 
-	error = copyout(&i, args->user_mask_ptr, sizeof(cpumask_t));
-	if (error)
-		return (EFAULT);
+	cga.level = CPU_LEVEL_WHICH;
+	cga.which = CPU_WHICH_PID;
+	cga.id = args->pid;
+	cga.cpusetsize = sizeof(cpuset_t);
+	cga.mask = (cpuset_t *) args->user_mask_ptr;
 
-	td->td_retval[0] = sizeof(cpumask_t);
-	return (0);
+	if ((error = cpuset_getaffinity(td, &cga)) == 0)
+		td->td_retval[0] = sizeof(cpuset_t);
+
+	return (error);
+}
+
+/*
+ *  Set affinity of a process.
+ */
+int
+linux_sched_setaffinity(struct thread *td,
+    struct linux_sched_setaffinity_args *args)
+{
+	struct cpuset_setaffinity_args csa;
+
+#ifdef DEBUG
+	if (ldebug(sched_setaffinity))
+		printf(ARGS(sched_setaffinity, "%d, %d, *"), args->pid,
+		    args->len);
+#endif
+	if (args->len < sizeof(cpuset_t))
+		return (EINVAL);
+
+	csa.level = CPU_LEVEL_WHICH;
+	csa.which = CPU_WHICH_PID;
+	csa.id = args->pid;
+	csa.cpusetsize = sizeof(cpuset_t);
+	csa.mask = (cpuset_t *) args->user_mask_ptr;
+
+	return (cpuset_setaffinity(td, &csa));
 }

Modified: stable/7/sys/i386/linux/syscalls.master
==============================================================================
--- stable/7/sys/i386/linux/syscalls.master	Mon Oct 20 10:11:33 2008	(r184074)
+++ stable/7/sys/i386/linux/syscalls.master	Mon Oct 20 11:15:57 2008	(r184075)
@@ -409,7 +409,8 @@
 239	AUE_SENDFILE	UNIMPL	linux_sendfile64
 240	AUE_NULL	STD	{ int linux_sys_futex(void *uaddr, int op, int val, \
 					struct l_timespec *timeout, void *uaddr2, int val3); }
-241	AUE_NULL	UNIMPL	linux_sched_setaffinity
+241	AUE_NULL	STD	{ int linux_sched_setaffinity(l_pid_t pid, l_uint len, \
+					l_ulong *user_mask_ptr); }
 242	AUE_NULL	STD	{ int linux_sched_getaffinity(l_pid_t pid, l_uint len, \
 					l_ulong *user_mask_ptr); }
 243	AUE_NULL	STD	{ int linux_set_thread_area(struct l_user_desc *desc); }
From kib at FreeBSD.org  Mon Oct 20 11:17:21 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 20 11:17:38 2008
Subject: svn commit: r184076 - stable/7/sys/i386/linux
Message-ID: <200810201117.m9KBHKmb069598@svn.freebsd.org>

Author: kib
Date: Mon Oct 20 11:17:20 2008
New Revision: 184076
URL: http://svn.freebsd.org/changeset/base/184076

Log:
  Regenerate.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/i386/linux/linux_proto.h
  stable/7/sys/i386/linux/linux_syscall.h
  stable/7/sys/i386/linux/linux_sysent.c

Modified: stable/7/sys/i386/linux/linux_proto.h
==============================================================================
--- stable/7/sys/i386/linux/linux_proto.h	Mon Oct 20 11:15:57 2008	(r184075)
+++ stable/7/sys/i386/linux/linux_proto.h	Mon Oct 20 11:17:20 2008	(r184076)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.89 2007/09/18 19:50:33 dwmalone Exp 
+ * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 184075 2008-10-20 11:15:57Z kib 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -731,6 +732,11 @@ struct linux_sys_futex_args {
 	char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)];
 	char val3_l_[PADL_(int)]; int val3; char val3_r_[PADR_(int)];
 };
+struct linux_sched_setaffinity_args {
+	char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
+	char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)];
+	char user_mask_ptr_l_[PADL_(l_ulong *)]; l_ulong * user_mask_ptr; char user_mask_ptr_r_[PADR_(l_ulong *)];
+};
 struct linux_sched_getaffinity_args {
 	char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
 	char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)];
@@ -1124,6 +1130,7 @@ int	linux_lremovexattr(struct thread *, 
 int	linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *);
 int	linux_tkill(struct thread *, struct linux_tkill_args *);
 int	linux_sys_futex(struct thread *, struct linux_sys_futex_args *);
+int	linux_sched_setaffinity(struct thread *, struct linux_sched_setaffinity_args *);
 int	linux_sched_getaffinity(struct thread *, struct linux_sched_getaffinity_args *);
 int	linux_set_thread_area(struct thread *, struct linux_set_thread_area_args *);
 int	linux_get_thread_area(struct thread *, struct linux_get_thread_area_args *);
@@ -1380,6 +1387,7 @@ int	linux_unshare(struct thread *, struc
 #define	LINUX_SYS_AUE_linux_fremovexattr	AUE_NULL
 #define	LINUX_SYS_AUE_linux_tkill	AUE_NULL
 #define	LINUX_SYS_AUE_linux_sys_futex	AUE_NULL
+#define	LINUX_SYS_AUE_linux_sched_setaffinity	AUE_NULL
 #define	LINUX_SYS_AUE_linux_sched_getaffinity	AUE_NULL
 #define	LINUX_SYS_AUE_linux_set_thread_area	AUE_NULL
 #define	LINUX_SYS_AUE_linux_get_thread_area	AUE_NULL

Modified: stable/7/sys/i386/linux/linux_syscall.h
==============================================================================
--- stable/7/sys/i386/linux/linux_syscall.h	Mon Oct 20 11:15:57 2008	(r184075)
+++ stable/7/sys/i386/linux/linux_syscall.h	Mon Oct 20 11:17:20 2008	(r184076)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.89 2007/09/18 19:50:33 dwmalone Exp 
+ * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 184075 2008-10-20 11:15:57Z kib 
  */
 
 #define	LINUX_SYS_exit	1
@@ -228,6 +228,7 @@
 #define	LINUX_SYS_linux_fremovexattr	237
 #define	LINUX_SYS_linux_tkill	238
 #define	LINUX_SYS_linux_sys_futex	240
+#define	LINUX_SYS_linux_sched_setaffinity	241
 #define	LINUX_SYS_linux_sched_getaffinity	242
 #define	LINUX_SYS_linux_set_thread_area	243
 #define	LINUX_SYS_linux_get_thread_area	244

Modified: stable/7/sys/i386/linux/linux_sysent.c
==============================================================================
--- stable/7/sys/i386/linux/linux_sysent.c	Mon Oct 20 11:15:57 2008	(r184075)
+++ stable/7/sys/i386/linux/linux_sysent.c	Mon Oct 20 11:17:20 2008	(r184076)
@@ -3,10 +3,9 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/i386/linux/syscalls.master,v 1.89 2007/09/18 19:50:33 dwmalone Exp 
+ * created from FreeBSD: stable/7/sys/i386/linux/syscalls.master 184075 2008-10-20 11:15:57Z kib 
  */
 
-#include 
 #include 
 #include 
 #include 
@@ -260,7 +259,7 @@ struct sysent linux_sysent[] = {
 	{ AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0 },	/* 238 = linux_tkill */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 239 = linux_sendfile64 */
 	{ AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0 },	/* 240 = linux_sys_futex */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 241 = linux_sched_setaffinity */
+	{ AS(linux_sched_setaffinity_args), (sy_call_t *)linux_sched_setaffinity, AUE_NULL, NULL, 0, 0 },	/* 241 = linux_sched_setaffinity */
 	{ AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0 },	/* 242 = linux_sched_getaffinity */
 	{ AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0 },	/* 243 = linux_set_thread_area */
 	{ AS(linux_get_thread_area_args), (sy_call_t *)linux_get_thread_area, AUE_NULL, NULL, 0, 0 },	/* 244 = linux_get_thread_area */
From kib at FreeBSD.org  Mon Oct 20 11:19:48 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 20 11:19:55 2008
Subject: svn commit: r184077 - stable/7/sys/amd64/linux32
Message-ID: <200810201119.m9KBJml3069675@svn.freebsd.org>

Author: kib
Date: Mon Oct 20 11:19:48 2008
New Revision: 184077
URL: http://svn.freebsd.org/changeset/base/184077

Log:
  Regenerate.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/amd64/linux32/linux32_proto.h
  stable/7/sys/amd64/linux32/linux32_syscall.h
  stable/7/sys/amd64/linux32/linux32_sysent.c

Modified: stable/7/sys/amd64/linux32/linux32_proto.h
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_proto.h	Mon Oct 20 11:17:20 2008	(r184076)
+++ stable/7/sys/amd64/linux32/linux32_proto.h	Mon Oct 20 11:19:48 2008	(r184077)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp 
+ * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 184075 2008-10-20 11:15:57Z kib 
  */
 
 #ifndef _LINUX_SYSPROTO_H_
@@ -11,6 +11,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -734,6 +735,11 @@ struct linux_sys_futex_args {
 	char uaddr2_l_[PADL_(void *)]; void * uaddr2; char uaddr2_r_[PADR_(void *)];
 	char val3_l_[PADL_(int)]; int val3; char val3_r_[PADR_(int)];
 };
+struct linux_sched_setaffinity_args {
+	char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
+	char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)];
+	char user_mask_ptr_l_[PADL_(l_ulong *)]; l_ulong * user_mask_ptr; char user_mask_ptr_r_[PADR_(l_ulong *)];
+};
 struct linux_sched_getaffinity_args {
 	char pid_l_[PADL_(l_pid_t)]; l_pid_t pid; char pid_r_[PADR_(l_pid_t)];
 	char len_l_[PADL_(l_uint)]; l_uint len; char len_r_[PADR_(l_uint)];
@@ -1105,6 +1111,7 @@ int	linux_lremovexattr(struct thread *, 
 int	linux_fremovexattr(struct thread *, struct linux_fremovexattr_args *);
 int	linux_tkill(struct thread *, struct linux_tkill_args *);
 int	linux_sys_futex(struct thread *, struct linux_sys_futex_args *);
+int	linux_sched_setaffinity(struct thread *, struct linux_sched_setaffinity_args *);
 int	linux_sched_getaffinity(struct thread *, struct linux_sched_getaffinity_args *);
 int	linux_set_thread_area(struct thread *, struct linux_set_thread_area_args *);
 int	linux_fadvise64(struct thread *, struct linux_fadvise64_args *);
@@ -1360,6 +1367,7 @@ int	linux_unshare(struct thread *, struc
 #define	LINUX_SYS_AUE_linux_fremovexattr	AUE_NULL
 #define	LINUX_SYS_AUE_linux_tkill	AUE_NULL
 #define	LINUX_SYS_AUE_linux_sys_futex	AUE_NULL
+#define	LINUX_SYS_AUE_linux_sched_setaffinity	AUE_NULL
 #define	LINUX_SYS_AUE_linux_sched_getaffinity	AUE_NULL
 #define	LINUX_SYS_AUE_linux_set_thread_area	AUE_NULL
 #define	LINUX_SYS_AUE_linux_fadvise64	AUE_NULL

Modified: stable/7/sys/amd64/linux32/linux32_syscall.h
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_syscall.h	Mon Oct 20 11:17:20 2008	(r184076)
+++ stable/7/sys/amd64/linux32/linux32_syscall.h	Mon Oct 20 11:19:48 2008	(r184077)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp 
+ * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 184075 2008-10-20 11:15:57Z kib 
  */
 
 #define	LINUX_SYS_exit	1
@@ -222,6 +222,7 @@
 #define	LINUX_SYS_linux_fremovexattr	237
 #define	LINUX_SYS_linux_tkill	238
 #define	LINUX_SYS_linux_sys_futex	240
+#define	LINUX_SYS_linux_sched_setaffinity	241
 #define	LINUX_SYS_linux_sched_getaffinity	242
 #define	LINUX_SYS_linux_set_thread_area	243
 #define	LINUX_SYS_linux_fadvise64	250

Modified: stable/7/sys/amd64/linux32/linux32_sysent.c
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_sysent.c	Mon Oct 20 11:17:20 2008	(r184076)
+++ stable/7/sys/amd64/linux32/linux32_sysent.c	Mon Oct 20 11:19:48 2008	(r184077)
@@ -3,10 +3,9 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: src/sys/amd64/linux32/syscalls.master,v 1.29 2007/08/28 12:26:34 kib Exp 
+ * created from FreeBSD: stable/7/sys/amd64/linux32/syscalls.master 184075 2008-10-20 11:15:57Z kib 
  */
 
-#include 
 #include "opt_compat.h"
 #include 
 #include 
@@ -261,7 +260,7 @@ struct sysent linux_sysent[] = {
 	{ AS(linux_tkill_args), (sy_call_t *)linux_tkill, AUE_NULL, NULL, 0, 0 },	/* 238 = linux_tkill */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 239 = linux_sendfile64 */
 	{ AS(linux_sys_futex_args), (sy_call_t *)linux_sys_futex, AUE_NULL, NULL, 0, 0 },	/* 240 = linux_sys_futex */
-	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 241 = linux_sched_setaffinity */
+	{ AS(linux_sched_setaffinity_args), (sy_call_t *)linux_sched_setaffinity, AUE_NULL, NULL, 0, 0 },	/* 241 = linux_sched_setaffinity */
 	{ AS(linux_sched_getaffinity_args), (sy_call_t *)linux_sched_getaffinity, AUE_NULL, NULL, 0, 0 },	/* 242 = linux_sched_getaffinity */
 	{ AS(linux_set_thread_area_args), (sy_call_t *)linux_set_thread_area, AUE_NULL, NULL, 0, 0 },	/* 243 = linux_set_thread_area */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 244 = linux_get_thread_area */
From kib at FreeBSD.org  Mon Oct 20 16:33:45 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 20 16:34:02 2008
Subject: svn commit: r184078 - stable/7/sbin/fsck_ffs
Message-ID: <200810201633.m9KGXjX3075131@svn.freebsd.org>

Author: kib
Date: Mon Oct 20 16:33:45 2008
New Revision: 184078
URL: http://svn.freebsd.org/changeset/base/184078

Log:
  MFC r183820:
  Use ufs2_daddr_t for block numbers.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sbin/fsck_ffs/   (props changed)
  stable/7/sbin/fsck_ffs/pass5.c

Modified: stable/7/sbin/fsck_ffs/pass5.c
==============================================================================
--- stable/7/sbin/fsck_ffs/pass5.c	Mon Oct 20 11:19:48 2008	(r184077)
+++ stable/7/sbin/fsck_ffs/pass5.c	Mon Oct 20 16:33:45 2008	(r184078)
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$");
 
 #include "fsck.h"
 
-static void check_maps(u_char *, u_char *, int, int, const char *, int *, int, int);
+static void check_maps(u_char *, u_char *, int, ufs2_daddr_t, const char *, int *, int, int);
 
 void
 pass5(void)
@@ -321,13 +321,17 @@ pass5(void)
 			}
 			if (excessdirs > 0)
 				check_maps(cg_inosused(newcg), cg_inosused(cg),
-				    inomapsize, cg->cg_cgx * fs->fs_ipg, "DIR",
+				    inomapsize,
+				    cg->cg_cgx * (ufs2_daddr_t) fs->fs_ipg,
+				    "DIR",
 				    freedirs, 0, excessdirs);
 			check_maps(cg_inosused(newcg), cg_inosused(cg),
-			    inomapsize, cg->cg_cgx * fs->fs_ipg, "FILE",
+			    inomapsize,
+			    cg->cg_cgx * (ufs2_daddr_t) fs->fs_ipg, "FILE",
 			    freefiles, excessdirs, fs->fs_ipg);
 			check_maps(cg_blksfree(cg), cg_blksfree(newcg),
-			    blkmapsize, cg->cg_cgx * fs->fs_fpg, "FRAG",
+			    blkmapsize,
+			    cg->cg_cgx * (ufs2_daddr_t) fs->fs_fpg, "FRAG",
 			    freeblks, 0, fs->fs_fpg);
 		}
 		if (cursnapshot == 0 &&
@@ -407,7 +411,7 @@ check_maps(
 	u_char *map1,	/* map of claimed allocations */
 	u_char *map2,	/* map of determined allocations */
 	int mapsize,	/* size of above two maps */
-	int startvalue,	/* resource value for first element in map */
+	ufs2_daddr_t startvalue, /* resource value for first element in map */
 	const char *name,	/* name of resource found in maps */
 	int *opcode,	/* sysctl opcode to free resource */
 	int skip,	/* number of entries to skip before starting to free */
@@ -415,8 +419,8 @@ check_maps(
 {
 #	define BUFSIZE 16
 	char buf[BUFSIZE];
-	long i, j, k, l, m, n, size;
-	int astart, aend, ustart, uend;
+	long i, j, k, l, m, size;
+	ufs2_daddr_t n, astart, aend, ustart, uend;
 	void (*msg)(const char *fmt, ...);
 
 	if (bkgrdflag)
@@ -443,10 +447,12 @@ check_maps(
 					continue;
 				}
 				if (astart == aend)
-					(*msg)("ALLOCATED %s %d MARKED FREE\n",
+					(*msg)("ALLOCATED %s %" PRId64
+					    " MARKED FREE\n",
 					    name, astart);
 				else
-					(*msg)("%s %sS %d-%d MARKED FREE\n",
+					(*msg)("%s %sS %" PRId64 "-%" PRId64
+					    " MARKED FREE\n",
 					    "ALLOCATED", name, astart, aend);
 				astart = aend = n;
 			} else {
@@ -472,10 +478,12 @@ check_maps(
 				if (size > limit)
 					size = limit;
 				if (debug && size == 1)
-					pwarn("%s %s %d MARKED USED\n",
+					pwarn("%s %s %" PRId64
+					    " MARKED USED\n",
 					    "UNALLOCATED", name, ustart);
 				else if (debug)
-					pwarn("%s %sS %d-%ld MARKED USED\n",
+					pwarn("%s %sS %" PRId64 "-%" PRId64
+					    " MARKED USED\n",
 					    "UNALLOCATED", name, ustart,
 					    ustart + size - 1);
 				if (bkgrdflag != 0) {
@@ -497,9 +505,11 @@ check_maps(
 	}
 	if (astart != -1) {
 		if (astart == aend)
-			(*msg)("ALLOCATED %s %d MARKED FREE\n", name, astart);
+			(*msg)("ALLOCATED %s %" PRId64
+			    " MARKED FREE\n", name, astart);
 		else
-			(*msg)("ALLOCATED %sS %d-%d MARKED FREE\n",
+			(*msg)("ALLOCATED %sS %" PRId64 "-%" PRId64
+			    " MARKED FREE\n",
 			    name, astart, aend);
 	}
 	if (ustart != -1) {
@@ -514,10 +524,12 @@ check_maps(
 			size = limit;
 		if (debug) {
 			if (size == 1)
-				pwarn("UNALLOCATED %s %d MARKED USED\n",
+				pwarn("UNALLOCATED %s %" PRId64
+				    " MARKED USED\n",
 				    name, ustart);
 			else
-				pwarn("UNALLOCATED %sS %d-%ld MARKED USED\n",
+				pwarn("UNALLOCATED %sS %" PRId64 "-%" PRId64
+				    " MARKED USED\n",
 				    name, ustart, ustart + size - 1);
 		}
 		if (bkgrdflag != 0) {
From kib at FreeBSD.org  Mon Oct 20 16:36:33 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 20 16:36:45 2008
Subject: svn commit: r184079 - stable/7/sbin/fsck_ffs
Message-ID: <200810201636.m9KGaW0N075248@svn.freebsd.org>

Author: kib
Date: Mon Oct 20 16:36:32 2008
New Revision: 184079
URL: http://svn.freebsd.org/changeset/base/184079

Log:
  MFC r183821:
  Use old summary data for cg when bgfsck is performed.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sbin/fsck_ffs/   (props changed)
  stable/7/sbin/fsck_ffs/pass5.c

Modified: stable/7/sbin/fsck_ffs/pass5.c
==============================================================================
--- stable/7/sbin/fsck_ffs/pass5.c	Mon Oct 20 16:33:45 2008	(r184078)
+++ stable/7/sbin/fsck_ffs/pass5.c	Mon Oct 20 16:36:32 2008	(r184079)
@@ -291,10 +291,17 @@ pass5(void)
 				sump[run]++;
 			}
 		}
-		cstotal.cs_nffree += newcg->cg_cs.cs_nffree;
-		cstotal.cs_nbfree += newcg->cg_cs.cs_nbfree;
-		cstotal.cs_nifree += newcg->cg_cs.cs_nifree;
-		cstotal.cs_ndir += newcg->cg_cs.cs_ndir;
+		if (bkgrdflag != 0) {
+			cstotal.cs_nffree += cg->cg_cs.cs_nffree;
+			cstotal.cs_nbfree += cg->cg_cs.cs_nbfree;
+			cstotal.cs_nifree += cg->cg_cs.cs_nifree;
+			cstotal.cs_ndir += cg->cg_cs.cs_ndir;
+		} else {
+			cstotal.cs_nffree += newcg->cg_cs.cs_nffree;
+			cstotal.cs_nbfree += newcg->cg_cs.cs_nbfree;
+			cstotal.cs_nifree += newcg->cg_cs.cs_nifree;
+			cstotal.cs_ndir += newcg->cg_cs.cs_ndir;
+		}
 		cs = &fs->fs_cs(fs, c);
 		if (cursnapshot == 0 &&
 		    memcmp(&newcg->cg_cs, cs, sizeof *cs) != 0 &&
From kib at FreeBSD.org  Mon Oct 20 16:45:00 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 20 16:45:06 2008
Subject: svn commit: r184080 - in stable/7/sys: . ufs/ffs
Message-ID: <200810201645.m9KGj0DJ075452@svn.freebsd.org>

Author: kib
Date: Mon Oct 20 16:44:59 2008
New Revision: 184080
URL: http://svn.freebsd.org/changeset/base/184080

Log:
  MFC r183822:
  Sync up summary information for cylinder groups while data is already
  in memory during snapshot creation.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/ufs/ffs/ffs_snapshot.c

Modified: stable/7/sys/ufs/ffs/ffs_snapshot.c
==============================================================================
--- stable/7/sys/ufs/ffs/ffs_snapshot.c	Mon Oct 20 16:36:32 2008	(r184079)
+++ stable/7/sys/ufs/ffs/ffs_snapshot.c	Mon Oct 20 16:44:59 2008	(r184080)
@@ -880,6 +880,13 @@ cgaccount(cg, vp, nbp, passno)
 	}
 	UFS_LOCK(ip->i_ump);
 	ACTIVESET(fs, cg);
+	/*
+	 * Recomputation of summary information might not have been performed
+	 * at mount time.  Sync up summary information for current cylinder
+	 * group while data is in memory to ensure that result of background
+	 * fsck is slightly more consistent.
+	 */
+	fs->fs_cs(fs, cg) = cgp->cg_cs;
 	UFS_UNLOCK(ip->i_ump);
 	bcopy(bp->b_data, nbp->b_data, fs->fs_cgsize);
 	if (fs->fs_cgsize < fs->fs_bsize)
From rwatson at FreeBSD.org  Tue Oct 21 09:30:42 2008
From: rwatson at FreeBSD.org (Robert Watson)
Date: Tue Oct 21 09:30:58 2008
Subject: svn commit: r184116 - in stable/7/sys: . fs/portalfs
Message-ID: <200810210930.m9L9UgbH094408@svn.freebsd.org>

Author: rwatson
Date: Tue Oct 21 09:30:42 2008
New Revision: 184116
URL: http://svn.freebsd.org/changeset/base/184116

Log:
  Merge r183806 from head to stable/7:
  
    The locking in portalfs's socket connect code is no less correct than
    identical code in connect(2), so remove XXX that it might be incorrect.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/fs/portalfs/portal_vnops.c

Modified: stable/7/sys/fs/portalfs/portal_vnops.c
==============================================================================
--- stable/7/sys/fs/portalfs/portal_vnops.c	Tue Oct 21 08:03:12 2008	(r184115)
+++ stable/7/sys/fs/portalfs/portal_vnops.c	Tue Oct 21 09:30:42 2008	(r184116)
@@ -280,7 +280,6 @@ portal_open(ap)
 	 * will happen if the server dies.  Sleep for 5 second intervals
 	 * and keep polling the reference count.   XXX.
 	 */
-	/* XXXRW: Locking? */
 	SOCK_LOCK(so);
 	while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) {
 		if (fmp->pm_server->f_count == 1) {
From bz at FreeBSD.org  Tue Oct 21 09:45:03 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Tue Oct 21 09:45:08 2008
Subject: svn commit: r184117 - in stable/7/sys: . netinet6
Message-ID: <200810210945.m9L9j2qG094714@svn.freebsd.org>

Author: bz
Date: Tue Oct 21 09:45:02 2008
New Revision: 184117
URL: http://svn.freebsd.org/changeset/base/184117

Log:
  MFC: r183923
  
    Check that the mbuf len is positive (like we do in the v4 case)
    to avoid possible panics.
  
  PR:		kern/119123
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/netinet6/ip6_output.c

Modified: stable/7/sys/netinet6/ip6_output.c
==============================================================================
--- stable/7/sys/netinet6/ip6_output.c	Tue Oct 21 09:30:42 2008	(r184116)
+++ stable/7/sys/netinet6/ip6_output.c	Tue Oct 21 09:45:02 2008	(r184117)
@@ -2814,7 +2814,7 @@ ip6_setpktopts(struct mbuf *control, str
 	if (control->m_next)
 		return (EINVAL);
 
-	for (; control->m_len; control->m_data += CMSG_ALIGN(cm->cmsg_len),
+	for (; control->m_len > 0; control->m_data += CMSG_ALIGN(cm->cmsg_len),
 	    control->m_len -= CMSG_ALIGN(cm->cmsg_len)) {
 		int error;
 
From rwatson at FreeBSD.org  Tue Oct 21 09:56:24 2008
From: rwatson at FreeBSD.org (Robert Watson)
Date: Tue Oct 21 09:56:40 2008
Subject: svn commit: r184119 - in stable/7/sys: . netinet6
Message-ID: <200810210956.m9L9uNBi094990@svn.freebsd.org>

Author: rwatson
Date: Tue Oct 21 09:56:23 2008
New Revision: 184119
URL: http://svn.freebsd.org/changeset/base/184119

Log:
  Merge r183807 from head to stable/7:
  
    When disconnecting a UDPv6 socket, acquire the socket lock around the
    changing of the so_state field, as is done in UDPv4.  Remove XXX
    locking comment.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/netinet6/udp6_usrreq.c

Modified: stable/7/sys/netinet6/udp6_usrreq.c
==============================================================================
--- stable/7/sys/netinet6/udp6_usrreq.c	Tue Oct 21 09:55:49 2008	(r184118)
+++ stable/7/sys/netinet6/udp6_usrreq.c	Tue Oct 21 09:56:23 2008	(r184119)
@@ -918,8 +918,9 @@ udp6_disconnect(struct socket *so)
 
 	in6_pcbdisconnect(inp);
 	inp->in6p_laddr = in6addr_any;
-	/* XXXRW: so_state locking? */
+	SOCK_LOCK(so);
 	so->so_state &= ~SS_ISCONNECTED;		/* XXX */
+	SOCK_UNLOCK(so);
 out:
 	INP_WUNLOCK(inp);
 	INP_INFO_WUNLOCK(&udbinfo);
From rwatson at FreeBSD.org  Tue Oct 21 10:17:52 2008
From: rwatson at FreeBSD.org (Robert Watson)
Date: Tue Oct 21 10:18:03 2008
Subject: svn commit: r184120 - in stable/7/sys: . kern
Message-ID: <200810211017.m9LAHqGK095479@svn.freebsd.org>

Author: rwatson
Date: Tue Oct 21 10:17:51 2008
New Revision: 184120
URL: http://svn.freebsd.org/changeset/base/184120

Log:
  Merge r183803 from head to stable/7:
  
    Downgrade XXX to a Note for fgetsock() and fputsock().
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/kern_descrip.c

Modified: stable/7/sys/kern/kern_descrip.c
==============================================================================
--- stable/7/sys/kern/kern_descrip.c	Tue Oct 21 09:56:23 2008	(r184119)
+++ stable/7/sys/kern/kern_descrip.c	Tue Oct 21 10:17:51 2008	(r184120)
@@ -2163,7 +2163,7 @@ fgetvp_write(struct thread *td, int fd, 
  * We bump the ref count on the returned socket.  XXX Also obtain the SX lock
  * in the future.
  *
- * XXXRW: fgetsock() and fputsock() are deprecated, as consumers should rely
+ * Note: fgetsock() and fputsock() are deprecated, as consumers should rely
  * on their file descriptor reference to prevent the socket from being free'd
  * during use.
  */
@@ -2196,7 +2196,7 @@ fgetsock(struct thread *td, int fd, stru
  * Drop the reference count on the socket and XXX release the SX lock in the
  * future.  The last reference closes the socket.
  *
- * XXXRW: fputsock() is deprecated, see comment for fgetsock().
+ * Note: fputsock() is deprecated, see comment for fgetsock().
  */
 void
 fputsock(struct socket *so)
From des at FreeBSD.org  Tue Oct 21 12:19:09 2008
From: des at FreeBSD.org (Dag-Erling Smorgrav)
Date: Tue Oct 21 12:19:25 2008
Subject: svn commit: r184124 - in stable/7/sys: . dev/puc
Message-ID: <200810211219.m9LCJ8Ad098872@svn.freebsd.org>

Author: des
Date: Tue Oct 21 12:19:08 2008
New Revision: 184124
URL: http://svn.freebsd.org/changeset/base/184124

Log:
  MFH (r183817): revert OX16PCI954 breakage
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/puc/pucdata.c

Modified: stable/7/sys/dev/puc/pucdata.c
==============================================================================
--- stable/7/sys/dev/puc/pucdata.c	Tue Oct 21 12:10:30 2008	(r184123)
+++ stable/7/sys/dev/puc/pucdata.c	Tue Oct 21 12:19:08 2008	(r184124)
@@ -603,14 +603,14 @@ const struct puc_cfg puc_pci_devices[] =
 	},
 
 	{   0x1415, 0x9501, 0xffff, 0,
-	    "Oxford Semiconductor OX16PCI954 UARTs 4-port type 1",
-	    DEFAULT_RCLK * 10,
+	    "Oxford Semiconductor OX16PCI954 UARTs",
+	    DEFAULT_RCLK,
 	    PUC_PORT_4S, 0x10, 0, 8,
 	},
 
 	{   0x1415, 0x950a, 0xffff, 0,
-	    "Oxford Semiconductor OX16PCI954 UARTs 4-port type 2",
-	    DEFAULT_RCLK * 10,
+	    "Oxford Semiconductor OX16PCI954 UARTs",
+	    DEFAULT_RCLK,
 	    PUC_PORT_4S, 0x10, 0, 8,
 	},
 
From rwatson at FreeBSD.org  Tue Oct 21 14:11:01 2008
From: rwatson at FreeBSD.org (Robert Watson)
Date: Tue Oct 21 14:11:12 2008
Subject: svn commit: r184126 - in stable/7/sys: . nfsserver
Message-ID: <200810211411.m9LEB08O000998@svn.freebsd.org>

Author: rwatson
Date: Tue Oct 21 14:11:00 2008
New Revision: 184126
URL: http://svn.freebsd.org/changeset/base/184126

Log:
  Merge r183809 from head to stable/7:
  
    Turn XXX's for unlocked writes of NFS server statistics to simple notes,
    as we consider it a feature to exchange performance for consistency.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/nfsserver/nfs_serv.c

Modified: stable/7/sys/nfsserver/nfs_serv.c
==============================================================================
--- stable/7/sys/nfsserver/nfs_serv.c	Tue Oct 21 12:50:45 2008	(r184125)
+++ stable/7/sys/nfsserver/nfs_serv.c	Tue Oct 21 14:11:00 2008	(r184126)
@@ -1177,7 +1177,7 @@ nfsrv_write(struct nfsrv_descript *nfsd,
 	    uiop->uio_td = NULL;
 	    uiop->uio_offset = off;
 	    error = VOP_WRITE(vp, uiop, ioflags, cred);
-	    /* XXXRW: unlocked write. */
+	    /* Unlocked write. */
 	    nfsrvstats.srvvop_writes++;
 	    FREE((caddr_t)iv, M_TEMP);
 	}
@@ -1492,7 +1492,7 @@ loop1:
 		    }
 		    if (!error) {
 			error = VOP_WRITE(vp, uiop, ioflags, cred);
-			/* XXXRW: unlocked write. */
+			/* Unlocked write. */
 			nfsrvstats.srvvop_writes++;
 			vn_finished_write(mntp);
 		    }
From jhb at FreeBSD.org  Tue Oct 21 18:35:05 2008
From: jhb at FreeBSD.org (John Baldwin)
Date: Tue Oct 21 18:35:33 2008
Subject: svn commit: r184131 - stable/7/sys/dev/ata
Message-ID: <200810211835.m9LIZ44K005677@svn.freebsd.org>

Author: jhb
Date: Tue Oct 21 18:35:04 2008
New Revision: 184131
URL: http://svn.freebsd.org/changeset/base/184131

Log:
  MFC: Use 32k transfers rather than 63k transfers for chipsets that can't do
  64k transfers and use the MIO method to talk to the Serverworks HT1000_S1
  SATA controller.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/dev/ata/ata-chipset.c

Modified: stable/7/sys/dev/ata/ata-chipset.c
==============================================================================
--- stable/7/sys/dev/ata/ata-chipset.c	Tue Oct 21 18:30:10 2008	(r184130)
+++ stable/7/sys/dev/ata/ata-chipset.c	Tue Oct 21 18:35:04 2008	(r184131)
@@ -1500,7 +1500,7 @@ ata_cyrix_setmode(device_t dev, int mode
     int error;
 
     ch->dma->alignment = 16;
-    ch->dma->max_iosize = 126 * DEV_BSIZE;
+    ch->dma->max_iosize = 64 * DEV_BSIZE;
 
     mode = ata_limit_mode(dev, mode, ATA_UDMA2);
 
@@ -2892,7 +2892,7 @@ ata_marvell_edma_dmainit(device_t dev)
 	    ch->dma->max_address = BUS_SPACE_MAXADDR;
 
 	/* chip does not reliably do 64K DMA transfers */
-	ch->dma->max_iosize = 126 * DEV_BSIZE; 
+	ch->dma->max_iosize = 64 * DEV_BSIZE; 
     }
 }
 
@@ -2942,7 +2942,7 @@ ata_national_setmode(device_t dev, int m
     int error;
 
     ch->dma->alignment = 16;
-    ch->dma->max_iosize = 126 * DEV_BSIZE;
+    ch->dma->max_iosize = 64 * DEV_BSIZE;
 
     mode = ata_limit_mode(dev, mode, ATA_UDMA2);
 
@@ -4192,7 +4192,7 @@ ata_serverworks_ident(device_t dev)
      { ATA_CSB6,      0x00, SWKS100, 0, ATA_UDMA5, "CSB6" },
      { ATA_CSB6_1,    0x00, SWKS66,  0, ATA_UDMA4, "CSB6" },
      { ATA_HT1000,    0x00, SWKS100, 0, ATA_UDMA5, "HT1000" },
-     { ATA_HT1000_S1, 0x00, SWKS100, 4, ATA_SA150, "HT1000" },
+     { ATA_HT1000_S1, 0x00, SWKSMIO, 4, ATA_SA150, "HT1000" },
      { ATA_HT1000_S2, 0x00, SWKSMIO, 4, ATA_SA150, "HT1000" },
      { ATA_K2,        0x00, SWKSMIO, 4, ATA_SA150, "K2" },
      { ATA_FRODO4,    0x00, SWKSMIO, 4, ATA_SA150, "Frodo4" },
@@ -4295,7 +4295,7 @@ ata_serverworks_allocate(device_t dev)
 
     /* chip does not reliably do 64K DMA transfers */
     if (ch->dma)
-	ch->dma->max_iosize = 126 * DEV_BSIZE;
+	ch->dma->max_iosize = 64 * DEV_BSIZE;
 
     return 0;
 }
From kib at FreeBSD.org  Tue Oct 21 18:50:52 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Tue Oct 21 18:51:09 2008
Subject: svn commit: r184134 - in stable/7/sys: . amd64/linux32
Message-ID: <200810211850.m9LIoqBS006088@svn.freebsd.org>

Author: kib
Date: Tue Oct 21 18:50:52 2008
New Revision: 184134
URL: http://svn.freebsd.org/changeset/base/184134

Log:
  MFC r184026:
  Set PCB_32BIT and clear PCB_GS32BIT for linux32 binaries.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/amd64/linux32/linux32_sysvec.c

Modified: stable/7/sys/amd64/linux32/linux32_sysvec.c
==============================================================================
--- stable/7/sys/amd64/linux32/linux32_sysvec.c	Tue Oct 21 18:40:29 2008	(r184133)
+++ stable/7/sys/amd64/linux32/linux32_sysvec.c	Tue Oct 21 18:50:52 2008	(r184134)
@@ -843,7 +843,8 @@ exec_linux_setregs(td, entry, stack, ps_
 	fpstate_drop(td);
 
 	/* Return via doreti so that we can change to a different %cs */
-	pcb->pcb_flags |= PCB_FULLCTX;
+	pcb->pcb_flags |= PCB_FULLCTX | PCB_32BIT;
+	pcb->pcb_flags &= ~PCB_GS32BIT;
 	td->td_retval[1] = 0;
 }
 
From kensmith at FreeBSD.org  Tue Oct 21 19:42:57 2008
From: kensmith at FreeBSD.org (Ken Smith)
Date: Tue Oct 21 19:43:09 2008
Subject: svn commit: r184137 - in stable/7/release: . scripts
Message-ID: <200810211942.m9LJgv1E007062@svn.freebsd.org>

Author: kensmith
Date: Tue Oct 21 19:42:56 2008
New Revision: 184137
URL: http://svn.freebsd.org/changeset/base/184137

Log:
  MFC r183771 and r183860:
  
  r183771:
    Add a build knob MAKE_DVD to control on a per-architecture basis whether
    or not to build a tree used for the creation of a DVD image.  If that is
    enabled set up a DVD tree by installing everything we normally install
    to the individual CDROM trees into the one DVD tree.  The result is one
    image with all the install bits, livefs bits, and doc bits suitable for
    burning to a DVD instead of CDROM.
  
    Enable building the DVD for amd64 and i386.
  
  r183860:
    The thought of making more than one DVD image for a release really
    freaks me out.  But it turns out we might be able to generalize
    a few of the other things RE uses to assemble the package trees
    for releases if the DVDs use a naming theme close to what is used
    for the CDROMS (disc1, disc2, etc).  So change the name to dvd1.
    Hopefully this way src/release/scripts/{package-split.py,package-trees.sh}
    can be generalized instead of copied-and-hacked.
  
  Approved by:	re (kib)

Modified:
  stable/7/release/   (props changed)
  stable/7/release/Makefile
  stable/7/release/scripts/src-install.sh   (props changed)

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Tue Oct 21 18:52:38 2008	(r184136)
+++ stable/7/release/Makefile	Tue Oct 21 19:42:56 2008	(r184137)
@@ -192,6 +192,7 @@ MNT=			/mnt
 .undef MAKE_FLOPPIES
 .if ${TARGET_ARCH} == "i386"
 MAKE_FLOPPIES=		true
+MAKE_DVD=
 SEPARATE_LIVEFS=
 SPLIT_MFSROOT=
 .if ${TARGET} == "pc98"
@@ -221,6 +222,7 @@ MFSLABEL=		auto
 SEPARATE_LIVEFS=
 .elif ${TARGET_ARCH} == "amd64"
 MAKE_FLOPPIES=		true
+MAKE_DVD=
 FLOPPYSIZE=		1440
 FLOPPYSPLITSIZE=	1392
 FLOPPYINODE=		40000
@@ -261,6 +263,9 @@ CD_BOOT=		${CD}/bootonly
 CD_DISC1=		${CD}/disc1
 CD_DISC2=		${CD}/disc2
 CD_DISC3=		${CD}/disc3
+.if defined(MAKE_DVD)
+CD_DVD1=		${CD}/dvd1
+.endif
 .if !defined(NODOC)
 CD_DOCS=		${CD}/docs
 .endif
@@ -479,6 +484,7 @@ release rerelease:
 	KERNELS \
 	KERNELS_BASE \
 	KERNEL_FLAGS \
+	MAKE_DVD \
 	MAKE_FLOPPIES \
 	MAKE_ISOS \
 	NOCDROM \
@@ -924,6 +930,18 @@ cdrom.1:
 			    find . -depth -print | cpio -dumpl ${CD_LIVEFS} ) ; \
 		fi \
 	done
+.if defined(MAKE_DVD)
+	@echo "Building DVD filesystem image as well as CDROM"
+	@mkdir -p ${CD_DVD1}/${BUILDNAME}
+	@for i in ${DISTRIBUTIONS} ; \
+	do \
+		if [ -d ${RD}/trees/$${i} ] ; then \
+			chflags -R noschg ${RD}/trees/$${i} || true ; \
+			( cd ${RD}/trees/$${i} && \
+			    find . -depth -print | cpio -dumpl ${CD_DVD1} ) ; \
+		fi \
+	done
+.endif
 	@echo "Copy GENERIC kernel to boot area"
 	@cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel
 	@rm -f ${CD_LIVEFS}/boot/kernel/*.symbols
@@ -941,7 +959,24 @@ cdrom.1:
 	@rm -f ${CD_LIVEFS}/boot/device.hints
 	@cp ${RD}/trees/base/boot/device.hints ${CD_LIVEFS}/boot/device.hints
 .endif
+.if defined(MAKE_DVD)
+	@cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel
+	@rm -f ${CD_DVD1}/boot/kernel/*.symbols
+	@rm -f ${CD_DVD1}/.profile
+	@cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile
+	@ln -sf /rescue ${CD_DVD1}/stand
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf
+	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf
+	@rm -f ${CD_DVD1}/boot/loader.conf
+	@cp ${RD}/mfsroot/mfsroot.gz ${CD_DVD1}/boot/mfsroot.gz
+	@echo 'mfsroot_load="YES"' > ${CD_DVD1}/boot/loader.conf
+	@echo 'mfsroot_type="mfs_root"' >> ${CD_DVD1}/boot/loader.conf
+	@echo 'mfsroot_name="/boot/mfsroot"' >> ${CD_DVD1}/boot/loader.conf
+.if exists(${RD}/trees/base/boot/device.hints)
+	@rm -f ${CD_DVD1}/boot/device.hints
+	@cp ${RD}/trees/base/boot/device.hints ${CD_DVD1}/boot/device.hints
+.endif
+.endif
 	touch ${.TARGET}
 
 # Build disc1, disc2 and disc3 cdrom images
@@ -980,11 +1015,37 @@ cdrom.2:
 	@mkdir -p ${CD_DISC3}
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DISC3}/cdrom.inf
 	@echo "CD_VOLUME = 3" >> ${CD_DISC3}/cdrom.inf
+.if defined(MAKE_DVD)
+.if defined(MAKE_FLOPPIES)
+	@cd ${RD} && find floppies -print | cpio -dumpl ${CD_DVD1}
+.endif
+	@cd ${RD}/dists && find . -print | cpio -dumpl ${CD_DVD1}/${BUILDNAME}
+.if !defined(NODOC)
+	@for i in ${DIST_DOCS_ARCH_INDEP}; do \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/article.txt \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/article.html \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
+	done
+	@for i in ${DIST_DOCS_ARCH_DEP}; do \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.txt \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.TXT; \
+	  cp ${RND}/${RELNOTES_LANG}/$$i/${TARGET}/article.html \
+	      ${CD_DVD1}/`echo $${i} | tr 'a-z' 'A-Z'`.HTM; \
+	done
+	@cp ${RND}/${RELNOTES_LANG}/readme/docbook.css ${CD_DVD1}
+.endif
+	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf
+	@echo "CD_VOLUME = 1" >> ${CD_DVD1}/cdrom.inf
+.endif
 .if !defined(NODOC)
 	echo "Building CDROM docs filesystem image"
 	@mkdir -p ${CD_DOCS}
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DOCS}/cdrom.inf
 	@mkdir -p ${CD_DOCS}/usr/share/doc
+.if defined(MAKE_DVD)
+	@mkdir -p ${CD_DVD1}/usr/share/doc
+.endif
 	@for i in `ls ${CD_LIVEFS}/usr/share/doc`; do \
 		if [ -L ${CD_LIVEFS}/usr/share/doc/$$i -o \
 		    -d /usr/doc/$$i ]; then \
@@ -992,6 +1053,10 @@ cdrom.2:
 			    ${CD_DOCS}/usr/share/doc; \
 		fi \
 	done
+.if defined(MAKE_DVD)
+	@cd ${CD_DOCS}/usr/share/doc && find . -print | \
+	    cpio -dumpl ${CD_DVD1}/usr/share/doc
+.endif
 .endif
 	touch ${.TARGET}
 
@@ -1025,6 +1090,9 @@ CD_DISC2_PKGS=	${CD_PACKAGE_TREE}/disc2
 .if exists(${CD_PACKAGE_TREE}/disc3)
 CD_DISC3_PKGS=	${CD_PACKAGE_TREE}/disc3
 .endif
+.if exists(${CD_PACKAGE_TREE}/dvd1)
+CD_DVD_PKGS=	${CD_PACKAGE_TREE}/dvd1
+.endif
 .endif
 .endif
 
@@ -1048,6 +1116,12 @@ iso.1:
 	    FreeBSD_Packages_2 \
 	    ${CD}/${BUILDNAME}-${TARGET}-disc3.iso ${CD_DISC3} \
 	    ${CD_DISC3_PKGS}
+.if defined(MAKE_DVD)
+	@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh ${BOOTABLE} \
+	    FreeBSD_Install \
+	    ${CD}/${BUILDNAME}-${TARGET}-dvd1.iso ${CD_DVD1} \
+	    ${CD_DVD1_PKGS}
+.endif
 .if !defined(NODOC)
 	@sh ${.CURDIR}/${TARGET_ARCH}/mkisoimages.sh \
 	    FreeBSD_Documentation \
From bz at FreeBSD.org  Wed Oct 22 08:52:46 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Wed Oct 22 08:53:03 2008
Subject: svn commit: r184155 - in stable/7/sys: . security/mac_partition
Message-ID: <200810220852.m9M8qkn8023649@svn.freebsd.org>

Author: bz
Date: Wed Oct 22 08:52:45 2008
New Revision: 184155
URL: http://svn.freebsd.org/changeset/base/184155

Log:
  MFC: r183970
  
    Use the label from the socket credential rather than the
    solabel which was not set by the mac_partition policy.
  
  Approved by:	re (rwatson)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/security/mac_partition/mac_partition.c

Modified: stable/7/sys/security/mac_partition/mac_partition.c
==============================================================================
--- stable/7/sys/security/mac_partition/mac_partition.c	Wed Oct 22 08:43:35 2008	(r184154)
+++ stable/7/sys/security/mac_partition/mac_partition.c	Wed Oct 22 08:52:45 2008	(r184155)
@@ -46,6 +46,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -221,7 +222,7 @@ partition_check_socket_visible(struct uc
 {
 	int error;
 
-	error = label_on_label(cred->cr_label, solabel);
+	error = label_on_label(cred->cr_label, so->so_cred->cr_label);
 
 	return (error ? ENOENT : 0);
 }
From kensmith at FreeBSD.org  Wed Oct 22 15:39:29 2008
From: kensmith at FreeBSD.org (Ken Smith)
Date: Wed Oct 22 15:39:35 2008
Subject: svn commit: r184166 - in stable/7/release: . scripts
Message-ID: <200810221539.m9MFdS7i032414@svn.freebsd.org>

Author: kensmith
Date: Wed Oct 22 15:39:28 2008
New Revision: 184166
URL: http://svn.freebsd.org/changeset/base/184166

Log:
  MFC r184144 and r184145.  Replace an @ that went missing and move an
  echo that accidentally got wrapped in the MAKE_DVD knob.
  
  Approved by:	re (kib)

Modified:
  stable/7/release/   (props changed)
  stable/7/release/Makefile
  stable/7/release/scripts/src-install.sh   (props changed)

Modified: stable/7/release/Makefile
==============================================================================
--- stable/7/release/Makefile	Wed Oct 22 15:27:59 2008	(r184165)
+++ stable/7/release/Makefile	Wed Oct 22 15:39:28 2008	(r184166)
@@ -959,13 +959,13 @@ cdrom.1:
 	@rm -f ${CD_LIVEFS}/boot/device.hints
 	@cp ${RD}/trees/base/boot/device.hints ${CD_LIVEFS}/boot/device.hints
 .endif
+	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf
 .if defined(MAKE_DVD)
 	@cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel
 	@rm -f ${CD_DVD1}/boot/kernel/*.symbols
 	@rm -f ${CD_DVD1}/.profile
 	@cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile
 	@ln -sf /rescue ${CD_DVD1}/stand
-	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DVD1}/cdrom.inf
 	@rm -f ${CD_DVD1}/boot/loader.conf
 	@cp ${RD}/mfsroot/mfsroot.gz ${CD_DVD1}/boot/mfsroot.gz
@@ -1039,7 +1039,7 @@ cdrom.2:
 	@echo "CD_VOLUME = 1" >> ${CD_DVD1}/cdrom.inf
 .endif
 .if !defined(NODOC)
-	echo "Building CDROM docs filesystem image"
+	@echo "Building CDROM docs filesystem image"
 	@mkdir -p ${CD_DOCS}
 	@echo "CD_VERSION = ${BUILDNAME}" > ${CD_DOCS}/cdrom.inf
 	@mkdir -p ${CD_DOCS}/usr/share/doc
From philip at FreeBSD.org  Wed Oct 22 19:27:41 2008
From: philip at FreeBSD.org (Philip Paeps)
Date: Wed Oct 22 19:27:58 2008
Subject: svn commit: r184175 - stable/7/usr.sbin/sysinstall
Message-ID: <200810221927.m9MJRfEZ036973@svn.freebsd.org>

Author: philip
Date: Wed Oct 22 19:27:40 2008
New Revision: 184175
URL: http://svn.freebsd.org/changeset/base/184175

Log:
  MFC r183977: Adjust default keymaps for Ireland and Channel Islands.
  
  PR:		conf/124411
  Submitted by:	Doctor Modiford 
  Approved by:	re (gnn)

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

Modified: stable/7/usr.sbin/sysinstall/keymap.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/keymap.c	Wed Oct 22 18:25:13 2008	(r184174)
+++ stable/7/usr.sbin/sysinstall/keymap.c	Wed Oct 22 19:27:40 2008	(r184175)
@@ -82,6 +82,10 @@ keymapMenuSelect(dialogMenuItem *self)
 	{"se", "swedish"},
 	{"ch", "swiss"},
 	{"gb", "uk"},
+	{"gg", "uk"},
+	{"ie", "uk"},
+	{"im", "uk"},
+	{"je", "uk"},
 	{NULL, NULL}
     };
     const char *country, *lang;
From yongari at FreeBSD.org  Thu Oct 23 00:54:09 2008
From: yongari at FreeBSD.org (Pyun YongHyeon)
Date: Thu Oct 23 00:54:26 2008
Subject: svn commit: r184190 - in stable/7/sys: . dev/mii
Message-ID: <200810230054.m9N0s81D043185@svn.freebsd.org>

Author: yongari
Date: Thu Oct 23 00:54:07 2008
New Revision: 184190
URL: http://svn.freebsd.org/changeset/base/184190

Log:
  MFC r183966:
    Some 88E1149 PHY's page select is initialized to point to other
    bank instead of copper/fiber bank which in turn resulted in
    wrong registers were accessed during PHY operation. It is
    believed that page 0 should be used for copper PHY so reinitialize
    E1000_EADR to select default copper PHY.
    This fixes link establishment issue of nfe(4) on Sun Fire X4140.
  
    OpenBSD also has similimar patch but they just reset the E1000_EADR
    register to page 0. However some Marvell PHYs((88E3082, 88E1000)
    don't have the extended address register and the meaning of the
    register is quite different for each PHY model. So selecting copper
    PHY is limited to 88E1149 PHY which seems to be the only one that
    exhibits link establishment problem. If parent device know the type
    of PHY(either copper or fiber) that information should be notified
    to PHY driver but there is no good way to pass this information yet.
  
    Reported by:	thompsa
    Reviewed by:	thompsa
    Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/mii/e1000phy.c

Modified: stable/7/sys/dev/mii/e1000phy.c
==============================================================================
--- stable/7/sys/dev/mii/e1000phy.c	Thu Oct 23 00:31:15 2008	(r184189)
+++ stable/7/sys/dev/mii/e1000phy.c	Thu Oct 23 00:54:07 2008	(r184190)
@@ -152,6 +152,20 @@ e1000phy_attach(device_t dev)
 		if (PHY_READ(sc, E1000_ESSR) & E1000_ESSR_FIBER_LINK)
 			sc->mii_flags |= MIIF_HAVEFIBER;
 		break;
+	case MII_MODEL_MARVELL_E1149:
+		/*
+		 * Some 88E1149 PHY's page select is initialized to
+		 * point to other bank instead of copper/fiber bank
+		 * which in turn resulted in wrong registers were
+		 * accessed during PHY operation. It is believed that
+		 * page 0 should be used for copper PHY so reinitialize
+		 * E1000_EADR to select default copper PHY. If parent
+		 * device know the type of PHY(either copper or fiber),
+		 * that information should be used to select default
+		 * type of PHY.
+		 */
+		PHY_WRITE(sc, E1000_EADR, 0);
+		break;
 	case MII_MODEL_MARVELL_E3082:
 		/* 88E3082 10/100 Fast Ethernet PHY. */
 		sc->mii_anegticks = MII_ANEGTICKS;
From kientzle at FreeBSD.org  Thu Oct 23 04:48:49 2008
From: kientzle at FreeBSD.org (Tim Kientzle)
Date: Thu Oct 23 04:49:06 2008
Subject: svn commit: r184195 - in stable/7/lib/libarchive: . test
Message-ID: <200810230448.m9N4mn8c048065@svn.freebsd.org>

Author: kientzle
Date: Thu Oct 23 04:48:48 2008
New Revision: 184195
URL: http://svn.freebsd.org/changeset/base/184195

Log:
  MFC r184038: Restore mtime *after* restoring ACLs.  Otherwise,
  setting the ACL changes the mtime.  (Plus a new test to exercise
  basic ACL restore logic.)
  
  PR:		kern/128203
  Submitted by:	Udo Schweigert
  Approved by:	re (Kostik Belousov)

Added:
  stable/7/lib/libarchive/test/test_acl_freebsd.c
     - copied unchanged from r184038, head/lib/libarchive/test/test_acl_freebsd.c
Modified:
  stable/7/lib/libarchive/   (props changed)
  stable/7/lib/libarchive/archive_write_disk.c
  stable/7/lib/libarchive/test/Makefile

Modified: stable/7/lib/libarchive/archive_write_disk.c
==============================================================================
--- stable/7/lib/libarchive/archive_write_disk.c	Thu Oct 23 02:16:38 2008	(r184194)
+++ stable/7/lib/libarchive/archive_write_disk.c	Thu Oct 23 04:48:48 2008	(r184195)
@@ -641,10 +641,6 @@ _archive_write_finish_entry(struct archi
 		int r2 = set_mode(a, a->mode);
 		if (r2 < ret) ret = r2;
 	}
-	if (a->todo & TODO_TIMES) {
-		int r2 = set_time(a);
-		if (r2 < ret) ret = r2;
-	}
 	if (a->todo & TODO_ACLS) {
 		int r2 = set_acls(a);
 		if (r2 < ret) ret = r2;
@@ -657,6 +653,10 @@ _archive_write_finish_entry(struct archi
 		int r2 = set_fflags(a);
 		if (r2 < ret) ret = r2;
 	}
+	if (a->todo & TODO_TIMES) {
+		int r2 = set_time(a);
+		if (r2 < ret) ret = r2;
+	}
 
 	/* If there's an fd, we can close it now. */
 	if (a->fd >= 0) {

Modified: stable/7/lib/libarchive/test/Makefile
==============================================================================
--- stable/7/lib/libarchive/test/Makefile	Thu Oct 23 02:16:38 2008	(r184194)
+++ stable/7/lib/libarchive/test/Makefile	Thu Oct 23 04:48:48 2008	(r184195)
@@ -9,6 +9,7 @@ LA_SRCS!=make -f ${LA_SRCDIR}/Makefile -
 
 TESTS= \
 	test_acl_basic.c			\
+	test_acl_freebsd.c			\
 	test_acl_pax.c				\
 	test_archive_api_feature.c		\
 	test_bad_fd.c				\

Copied: stable/7/lib/libarchive/test/test_acl_freebsd.c (from r184038, head/lib/libarchive/test/test_acl_freebsd.c)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/7/lib/libarchive/test/test_acl_freebsd.c	Thu Oct 23 04:48:48 2008	(r184195, copy of r184038, head/lib/libarchive/test/test_acl_freebsd.c)
@@ -0,0 +1,243 @@
+/*-
+ * Copyright (c) 2003-2008 Tim Kientzle
+ * 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(S) ``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(S) 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 "test.h"
+__FBSDID("$FreeBSD$");
+
+#if defined(__FreeBSD__) && __FreeBSD__ > 4
+#include 
+
+struct myacl_t {
+	int type;  /* Type of ACL: "access" or "default" */
+	int permset; /* Permissions for this class of users. */
+	int tag; /* Owner, User, Owning group, group, other, etc. */
+	int qual; /* GID or UID of user/group, depending on tag. */
+	const char *name; /* Name of user/group, depending on tag. */
+};
+
+static struct myacl_t acls2[] = {
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_EXECUTE | ARCHIVE_ENTRY_ACL_READ,
+	  ARCHIVE_ENTRY_ACL_USER_OBJ, -1, "" },
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
+	  ARCHIVE_ENTRY_ACL_USER, 77, "user77" },
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0,
+	  ARCHIVE_ENTRY_ACL_USER, 78, "user78" },
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, ARCHIVE_ENTRY_ACL_READ,
+	  ARCHIVE_ENTRY_ACL_GROUP_OBJ, -1, "" },
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS, 0007,
+	  ARCHIVE_ENTRY_ACL_GROUP, 78, "group78" },
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
+	  ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_EXECUTE,
+	  ARCHIVE_ENTRY_ACL_OTHER, -1, "" },
+	{ ARCHIVE_ENTRY_ACL_TYPE_ACCESS,
+	  ARCHIVE_ENTRY_ACL_WRITE | ARCHIVE_ENTRY_ACL_READ | ARCHIVE_ENTRY_ACL_EXECUTE,
+	  ARCHIVE_ENTRY_ACL_MASK, -1, "" },
+	{ 0, 0, 0, 0, NULL }
+};
+
+static void
+set_acls(struct archive_entry *ae, struct myacl_t *acls)
+{
+	int i;
+
+	archive_entry_acl_clear(ae);
+	for (i = 0; acls[i].name != NULL; i++) {
+		archive_entry_acl_add_entry(ae,
+		    acls[i].type, acls[i].permset, acls[i].tag, acls[i].qual,
+		    acls[i].name);
+	}
+}
+
+static int
+acl_match(acl_entry_t aclent, struct myacl_t *myacl)
+{
+	acl_tag_t tag_type;
+	acl_permset_t opaque_ps;
+	int permset = 0;
+
+	acl_get_tag_type(aclent, &tag_type);
+
+	/* translate the silly opaque permset to a bitmap */
+	acl_get_permset(aclent, &opaque_ps);
+	if (acl_get_perm_np(opaque_ps, ACL_EXECUTE))
+		permset |= ARCHIVE_ENTRY_ACL_EXECUTE;
+	if (acl_get_perm_np(opaque_ps, ACL_WRITE))
+		permset |= ARCHIVE_ENTRY_ACL_WRITE;
+	if (acl_get_perm_np(opaque_ps, ACL_READ))
+		permset |= ARCHIVE_ENTRY_ACL_READ;
+
+	if (permset != myacl->permset)
+		return (0);
+
+	switch (tag_type) {
+	case ACL_USER_OBJ:
+		if (myacl->tag != ARCHIVE_ENTRY_ACL_USER_OBJ) return (0);
+		break;
+	case ACL_USER:
+		if (myacl->tag != ARCHIVE_ENTRY_ACL_USER)
+			return (0);
+		if ((uid_t)myacl->qual != *(uid_t *)acl_get_qualifier(aclent))
+			return (0);
+		break;
+	case ACL_GROUP_OBJ:
+		if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP_OBJ) return (0);
+		break;
+	case ACL_GROUP:
+		if (myacl->tag != ARCHIVE_ENTRY_ACL_GROUP)
+			return (0);
+		if ((gid_t)myacl->qual != *(gid_t *)acl_get_qualifier(aclent))
+			return (0);
+		break;
+	case ACL_MASK:
+		if (myacl->tag != ARCHIVE_ENTRY_ACL_MASK) return (0);
+		break;
+	case ACL_OTHER:
+		if (myacl->tag != ARCHIVE_ENTRY_ACL_OTHER) return (0);
+		break;
+	}
+	return (1);
+}
+
+static void
+compare_acls(acl_t acl, struct myacl_t *myacls)
+{
+	int *marker;
+	int entry_id = ACL_FIRST_ENTRY;
+	int matched;
+	int i, n;
+	acl_entry_t acl_entry;
+
+	/* Count ACL entries in myacls array and allocate an indirect array. */
+	for (n = 0; myacls[n].name != NULL; ++n)
+		continue;
+	marker = malloc(sizeof(marker[0]) * n);
+	for (i = 0; i < n; i++)
+		marker[i] = i;
+
+	/*
+	 * Iterate over acls in system acl object, try to match each
+	 * one with an item in the myacls array.
+	 */
+	while (1 == acl_get_entry(acl, entry_id, &acl_entry)) {
+		/* After the first time... */
+		entry_id = ACL_NEXT_ENTRY;
+
+		/* Search for a matching entry (tag and qualifier) */
+		for (i = 0, matched = 0; i < n && !matched; i++) {
+			if (acl_match(acl_entry, &myacls[marker[i]])) {
+				/* We found a match; remove it. */
+				marker[i] = marker[n - 1];
+				n--;
+				matched = 1;
+			}
+		}
+
+		/* TODO: Print out more details in this case. */
+		failure("ACL entry on file that shouldn't be there");
+		assert(matched == 1);
+	}
+
+	/* Dump entries in the myacls array that weren't in the system acl. */
+	for (i = 0; i < n; ++i) {
+		failure(" ACL entry missing from file: "
+		    "type=%d,permset=%d,tag=%d,qual=%d,name=``%s''\n",
+		    myacls[marker[i]].type, myacls[marker[i]].permset,
+		    myacls[marker[i]].tag, myacls[marker[i]].qual,
+		    myacls[marker[i]].name);
+		assert(0); /* Record this as a failure. */
+	}
+	free(marker);
+}
+
+#endif
+
+
+/*
+ * Verify ACL restore-to-disk.  This test is FreeBSD-specific.
+ */
+
+DEFINE_TEST(test_acl_freebsd)
+{
+#if !defined(__FreeBSD__)
+	skipping("FreeBSD-specific ACL restore test");
+#elif __FreeBSD__ < 5
+	skipping("ACL restore supported only on FreeBSD 5.0 and later");
+#else
+	struct stat st;
+	struct archive *a;
+	struct archive_entry *ae;
+	int n, fd;
+	acl_t acl;
+
+	/*
+	 * First, do a quick manual set/read of ACL data to
+	 * verify that the local filesystem does support ACLs.
+	 * If it doesn't, we'll simply skip the remaining tests.
+	 */
+	acl = acl_from_text("u::rwx,u:1:rw,g::rwx,g:15:rx,o::rwx,m::rwx");
+	assert((void *)acl != NULL);
+	/* Create a test file and try to set an ACL on it. */
+	fd = open("pretest", O_WRONLY | O_CREAT | O_EXCL, 0777);
+	failure("Could not create test file?!");
+	n = -1;
+	if (assert(fd >= 0)) {
+		n = acl_set_fd(fd, acl);
+		failure("acl_set_fd(): errno = %d (%s)",
+		    errno, strerror(errno));
+		assertEqualInt(0, n);
+		close(fd);
+	}
+
+	if (fd < 0 || n != 0) {
+		skipping("ACL tests require that ACL support be enabled on the filesystem");
+		return;
+	}
+
+	/* Create a write-to-disk object. */
+	assert(NULL != (a = archive_write_disk_new()));
+	archive_write_disk_set_options(a,
+	    ARCHIVE_EXTRACT_TIME | ARCHIVE_EXTRACT_PERM | ARCHIVE_EXTRACT_ACL);
+
+	/* Populate an archive entry with some metadata, including ACL info */
+	ae = archive_entry_new();
+	assert(ae != NULL);
+	archive_entry_set_pathname(ae, "test0");
+	archive_entry_set_mtime(ae, 123456, 7890);
+	archive_entry_set_size(ae, 0);
+	set_acls(ae, acls2);
+	assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
+	archive_entry_free(ae);
+
+	/* Close the archive. */
+	assertEqualIntA(a, ARCHIVE_OK, archive_write_close(a));
+	assertEqualInt(ARCHIVE_OK, archive_write_finish(a));
+
+	/* Verify the data on disk. */
+	assertEqualInt(0, stat("test0", &st));
+	assertEqualInt(st.st_mtime, 123456);
+	acl = acl_get_file("test0", ACL_TYPE_ACCESS);
+	assert(acl != (acl_t)NULL);
+	compare_acls(acl, acls2);
+#endif
+}
From marcel at FreeBSD.org  Thu Oct 23 15:44:00 2008
From: marcel at FreeBSD.org (Marcel Moolenaar)
Date: Thu Oct 23 15:44:11 2008
Subject: svn commit: r184204 - in stable/7/sys: . geom/part
Message-ID: <200810231544.m9NFi0E1060412@svn.freebsd.org>

Author: marcel
Date: Thu Oct 23 15:44:00 2008
New Revision: 184204
URL: http://svn.freebsd.org/changeset/base/184204

Log:
  MFC rev 183455:
  Return G_PART_PROBE_PRI_HIGH instead of G_PART_PROBE_PRI_NORM
  if the probe succeeds. This guarantees that the BSD scheme
  wins over the MBR scheme when MBR gets to probe first.
  
  Approved by:	re (kib@)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/geom/part/g_part_bsd.c

Modified: stable/7/sys/geom/part/g_part_bsd.c
==============================================================================
--- stable/7/sys/geom/part/g_part_bsd.c	Thu Oct 23 15:32:06 2008	(r184203)
+++ stable/7/sys/geom/part/g_part_bsd.c	Thu Oct 23 15:44:00 2008	(r184204)
@@ -293,7 +293,7 @@ g_part_bsd_probe(struct g_part_table *ta
 	magic2 = le32dec(buf + 132);
 	g_free(buf);
 	return ((magic1 == DISKMAGIC && magic2 == DISKMAGIC)
-	    ? G_PART_PROBE_PRI_NORM : ENXIO);
+	    ? G_PART_PROBE_PRI_HIGH : ENXIO);
 }
 
 static int
From ru at FreeBSD.org  Fri Oct 24 13:23:55 2008
From: ru at FreeBSD.org (Ruslan Ermilov)
Date: Fri Oct 24 13:24:00 2008
Subject: svn commit: r184225 - stable/7/lib/libfetch
Message-ID: <200810241323.m9ODNsdU090931@svn.freebsd.org>

Author: ru
Date: Fri Oct 24 13:23:54 2008
New Revision: 184225
URL: http://svn.freebsd.org/changeset/base/184225

Log:
  Don't fail mistakenly with -r when we already have the whole file.
  
  Approved by:	re (kib)

Modified:
  stable/7/lib/libfetch/   (props changed)
  stable/7/lib/libfetch/http.c

Modified: stable/7/lib/libfetch/http.c
==============================================================================
--- stable/7/lib/libfetch/http.c	Fri Oct 24 07:58:38 2008	(r184224)
+++ stable/7/lib/libfetch/http.c	Fri Oct 24 13:23:54 2008	(r184225)
@@ -1064,6 +1064,7 @@ http_request(struct url *URL, const char
 			if (url->offset == size && url->length == 0) {
 				/* asked for 0 bytes; fake it */
 				offset = url->offset;
+				clength = -1;
 				conn->err = HTTP_OK;
 				break;
 			} else {
From kensmith at FreeBSD.org  Fri Oct 24 20:10:23 2008
From: kensmith at FreeBSD.org (Ken Smith)
Date: Fri Oct 24 20:10:56 2008
Subject: svn commit: r184232 - stable/7/usr.sbin/sysinstall
Message-ID: <200810242010.m9OKAMYC098120@svn.freebsd.org>

Author: kensmith
Date: Fri Oct 24 20:10:22 2008
New Revision: 184232
URL: http://svn.freebsd.org/changeset/base/184232

Log:
  MFC r183921 and r184180
  When we notice the INDEX had volume numbers (so the media the packages
  are coming from has multiple volumes) walk through the dependency tree
  for the packages selected by the user once for each volume, only
  installing packages on the current volume.  If we can't install the
  package because its on a higher volume just note that we have looked
  at it during the pass for this volume to cut down on time spent checking
  dependencies.  This stops the excessive disc swapping that users have
  complained (a lot...) about.
  
  Approved by:    re (kib)

Modified:
  stable/7/usr.sbin/sysinstall/   (props changed)
  stable/7/usr.sbin/sysinstall/config.c
  stable/7/usr.sbin/sysinstall/globals.c
  stable/7/usr.sbin/sysinstall/index.c
  stable/7/usr.sbin/sysinstall/package.c
  stable/7/usr.sbin/sysinstall/sysinstall.h

Modified: stable/7/usr.sbin/sysinstall/config.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/config.c	Fri Oct 24 19:36:28 2008	(r184231)
+++ stable/7/usr.sbin/sysinstall/config.c	Fri Oct 24 20:10:22 2008	(r184232)
@@ -737,6 +737,7 @@ configPackages(dialogMenuItem *self)
 
     while (1) {
 	int ret, pos, scroll;
+	int current, low, high;
 
 	/* Bring up the packages menu */
 	pos = scroll = 0;
@@ -751,8 +752,14 @@ configPackages(dialogMenuItem *self)
 	    else if (DITEM_STATUS(ret) != DITEM_FAILURE) {
 		dialog_clear();
 		restoreflag = 1;
-		for (tmp = Plist.kids; tmp && tmp->name; tmp = tmp->next)
-		    (void)index_extract(mediaDevice, &Top, tmp, FALSE);
+		if (have_volumes) {
+		    low = low_volume;
+		    high = high_volume;
+		} else
+		    low = high = 0;
+		for (current = low; current <= high; current++)
+		    for (tmp = Plist.kids; tmp && tmp->name; tmp = tmp->next)
+		        (void)index_extract(mediaDevice, &Top, tmp, FALSE, current);
 		break;
 	    }
 	}

Modified: stable/7/usr.sbin/sysinstall/globals.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/globals.c	Fri Oct 24 19:36:28 2008	(r184231)
+++ stable/7/usr.sbin/sysinstall/globals.c	Fri Oct 24 20:10:22 2008	(r184232)
@@ -48,10 +48,13 @@ Boolean		DialogActive;	/* Is libdialog i
 Boolean		ColorDisplay;	/* Are we on a color display? */
 Boolean		OnVTY;		/* Are we on a VTY? */
 Boolean		Restarting;	/* Are we restarting sysinstall? */
+Boolean		have_volumes;	/* Media has more than one volume. */
 Variable	*VarHead;	/* The head of the variable chain */
 Device		*mediaDevice;	/* Where we're installing from */
 int		BootMgr;	/* Which boot manager we're using */
 int		StatusLine;	/* Where to stick our status messages */
+int		low_volume;	/* Lowest volume number */
+int		high_volume;	/* Highest volume number */
 jmp_buf		BailOut;	/* Beam me up, scotty! The natives are pissed! */
 
 Chunk		*HomeChunk;

Modified: stable/7/usr.sbin/sysinstall/index.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/index.c	Fri Oct 24 19:36:28 2008	(r184231)
+++ stable/7/usr.sbin/sysinstall/index.c	Fri Oct 24 20:10:22 2008	(r184232)
@@ -225,7 +225,17 @@ new_index(char *name, char *pathto, char
     tmp->deps =		_strdup(deps);
     tmp->depc =		0;
     tmp->installed =	package_installed(name);
+    tmp->vol_checked =	0;
     tmp->volume =	volume;
+    if (volume != 0) {
+	have_volumes = TRUE;
+	if (low_volume == 0)
+	    low_volume = volume;
+	else if (low_volume > volume)
+	    low_volume = volume;
+	if (high_volume < volume)
+	    high_volume = volume;
+    }
     return tmp;
 }
 
@@ -682,9 +692,11 @@ recycle:
 }
 
 int
-index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended)
+index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended,
+    int current_volume)
 {
     int status = DITEM_SUCCESS;
+    Boolean notyet = FALSE;
     PkgNodePtr tmp2;
     IndexEntryPtr id = who->data;
     WINDOW *w;
@@ -699,7 +711,7 @@ index_extract(Device *dev, PkgNodePtr to
      * a certain faulty INDEX file. 
      */
 
-    if (id->installed == 1)
+    if (id->installed == 1 || (have_volumes && id->vol_checked == current_volume))
 	return DITEM_SUCCESS;
 
     w = savescr();
@@ -712,9 +724,13 @@ index_extract(Device *dev, PkgNodePtr to
 	    if ((cp2 = index(cp, ' ')) != NULL)
 		*cp2 = '\0';
 	    if ((tmp2 = index_search(top, cp, NULL)) != NULL) {
-		status = index_extract(dev, top, tmp2, TRUE);
+		status = index_extract(dev, top, tmp2, TRUE, current_volume);
 		if (DITEM_STATUS(status) != DITEM_SUCCESS) {
-		    if (variable_get(VAR_NO_CONFIRM))
+		    /* package probably on a future disc volume */
+		    if (status & DITEM_CONTINUE) {
+			status = DITEM_SUCCESS;
+			notyet = TRUE;
+		    } else if (variable_get(VAR_NO_CONFIRM))
 			msgNotify("Loading of dependent package %s failed", cp);
 		    else
 			msgConfirm("Loading of dependent package %s failed", cp);
@@ -732,10 +748,38 @@ index_extract(Device *dev, PkgNodePtr to
 		cp = NULL;
 	}
     }
-    /* Done with the deps?  Load the real m'coy */
+
+    /*
+     * If iterating through disc volumes one at a time indicate failure if
+     * dependency install failed due to package being on a higher volume
+     * numbered disc, but that we should continue anyway.  Note that this
+     * package has already been processed for this disc volume so we don't
+     * need to do it again.
+     */
+
+    if (notyet) {
+    	restorescr(w);
+	id->vol_checked = current_volume;
+	return DITEM_FAILURE | DITEM_CONTINUE;
+    }
+
+    /*
+     * Done with the deps?  Try to load the real m'coy.  If iterating
+     * through a multi-volume disc set fail the install if the package
+     * is on a higher numbered volume to cut down on disc switches the
+     * user needs to do, but indicate caller should continue processing
+     * despite error return.  Note this package was processed for the
+     * current disc being checked.
+     */
+
     if (DITEM_STATUS(status) == DITEM_SUCCESS) {
 	/* Prompt user if the package is not available on the current volume. */
 	if(mediaDevice->type == DEVICE_TYPE_CDROM) {
+	    if (current_volume != 0 && id->volume > current_volume) {
+		restorescr(w);
+		id->vol_checked = current_volume;
+		return DITEM_FAILURE | DITEM_CONTINUE;
+	    }
 	    while (id->volume != dev->volume) {
 		if (!msgYesNo("This is disc #%d.  Package %s is on disc #%d\n"
 			  "Would you like to switch discs now?\n", dev->volume,
@@ -801,6 +845,8 @@ index_initialize(char *path)
     if (!index_initted) {
 	w = savescr();
 	dialog_clear_norefresh();
+	have_volumes = FALSE;
+	low_volume = high_volume = 0;
 
 	/* Got any media? */
 	if (!mediaVerify()) {

Modified: stable/7/usr.sbin/sysinstall/package.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/package.c	Fri Oct 24 19:36:28 2008	(r184231)
+++ stable/7/usr.sbin/sysinstall/package.c	Fri Oct 24 20:10:22 2008	(r184232)
@@ -55,7 +55,7 @@ int
 package_add(char *name)
 {
     PkgNodePtr tmp;
-    int i;
+    int i, current, low, high;
 
     if (!mediaVerify())
 	return DITEM_FAILURE;
@@ -68,9 +68,16 @@ package_add(char *name)
 	return i;
 
     tmp = index_search(&Top, name, &tmp);
-    if (tmp)
-	return index_extract(mediaDevice, &Top, tmp, FALSE);
-    else {
+    if (tmp) {
+	if (have_volumes) {
+	    low = low_volume;
+	    high = high_volume;
+	} else
+	    low = high = 0;
+	for (current = low; current <= high; current++)
+	    i = index_extract(mediaDevice, &Top, tmp, FALSE, current);
+	return i;
+    } else {
 	msgConfirm("Sorry, package %s was not found in the INDEX.", name);
 	return DITEM_FAILURE;
     }

Modified: stable/7/usr.sbin/sysinstall/sysinstall.h
==============================================================================
--- stable/7/usr.sbin/sysinstall/sysinstall.h	Fri Oct 24 19:36:28 2008	(r184231)
+++ stable/7/usr.sbin/sysinstall/sysinstall.h	Fri Oct 24 20:10:22 2008	(r184232)
@@ -386,6 +386,7 @@ typedef struct _indexEntry {	/* A single
     char *deps;			/* packages this depends on	*/
     int  depc;			/* how many depend on me	*/
     int  installed;		/* indicates if it is installed */
+    int  vol_checked;		/* disc volume last checked for */
     char *maintainer;		/* maintainer			*/
     unsigned int volume;	/* Volume of package            */
 } IndexEntry;
@@ -418,6 +419,7 @@ extern Boolean		RunningAsInit;		/* Are w
 extern Boolean		DialogActive;		/* Is the dialog() stuff up?			*/
 extern Boolean		ColorDisplay;		/* Are we on a color display?			*/
 extern Boolean		OnVTY;			/* On a syscons VTY?				*/
+extern Boolean		have_volumes;		/* Media has multiple volumes                   */
 extern Variable		*VarHead;		/* The head of the variable chain		*/
 extern Device		*mediaDevice;		/* Where we're getting our distribution from	*/
 extern unsigned int	Dists;			/* Which distributions we want			*/
@@ -481,6 +483,8 @@ extern int              FixItMode;      
 extern const char *	StartName;		/* Which name we were started as */
 extern const char *	ProgName;		/* Program's proper name */
 extern int		NCpus;			/* # cpus on machine */
+extern int		low_volume;		/* Lowest volume number */
+extern int		high_volume;		/* Highest volume number */
 
 /* Important chunks. */
 extern Chunk *HomeChunk;
@@ -672,7 +676,7 @@ void		index_init(PkgNodePtr top, PkgNode
 void		index_node_free(PkgNodePtr top, PkgNodePtr plist);
 void		index_sort(PkgNodePtr top);
 void		index_print(PkgNodePtr top, int level);
-int		index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended);
+int		index_extract(Device *dev, PkgNodePtr top, PkgNodePtr who, Boolean depended, int current_volume);
 int		index_initialize(char *path);
 PkgNodePtr	index_search(PkgNodePtr top, char *str, PkgNodePtr *tp);
 
From davidxu at FreeBSD.org  Sat Oct 25 11:37:43 2008
From: davidxu at FreeBSD.org (David Xu)
Date: Sat Oct 25 11:37:59 2008
Subject: svn commit: r184259 - in stable/7/sys: . kern
Message-ID: <200810251137.m9PBbhnI031411@svn.freebsd.org>

Author: davidxu
Date: Sat Oct 25 11:37:42 2008
New Revision: 184259
URL: http://svn.freebsd.org/changeset/base/184259

Log:
  Merge revision 184067 from head to stable/7:
  
  	In realtimer_delete(), clear timer's value and interval to tell
  	realtimer_expire() to not rearm the timer, otherwise there is a
  	chance that a callout will be left there and be tiggered in future
  	unexpectly.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/kern_time.c

Modified: stable/7/sys/kern/kern_time.c
==============================================================================
--- stable/7/sys/kern/kern_time.c	Sat Oct 25 10:55:49 2008	(r184258)
+++ stable/7/sys/kern/kern_time.c	Sat Oct 25 11:37:42 2008	(r184259)
@@ -1225,6 +1225,12 @@ realtimer_delete(struct itimer *it)
 {
 	mtx_assert(&it->it_mtx, MA_OWNED);
 	
+	/*
+	 * clear timer's value and interval to tell realtimer_expire
+	 * to not rearm the timer.
+	 */
+	timespecclear(&it->it_time.it_value);
+	timespecclear(&it->it_time.it_interval);
 	ITIMER_UNLOCK(it);
 	callout_drain(&it->it_callout);
 	ITIMER_LOCK(it);
@@ -1374,9 +1380,11 @@ realtimer_expire(void *arg)
 			callout_reset(&it->it_callout, tvtohz(&tv),
 				 realtimer_expire, it);
 		}
+		itimer_enter(it);
 		ITIMER_UNLOCK(it);
 		itimer_fire(it);
 		ITIMER_LOCK(it);
+		itimer_leave(it);
 	} else if (timespecisset(&it->it_time.it_value)) {
 		ts = it->it_time.it_value;
 		timespecsub(&ts, &cts);
From dfr at FreeBSD.org  Sat Oct 25 14:00:38 2008
From: dfr at FreeBSD.org (Doug Rabson)
Date: Sat Oct 25 14:00:55 2008
Subject: svn commit: r184260 - in stable/7/sys: . kern
Message-ID: <200810251400.m9PE0c3B033955@svn.freebsd.org>

Author: dfr
Date: Sat Oct 25 14:00:37 2008
New Revision: 184260
URL: http://svn.freebsd.org/changeset/base/184260

Log:
  MFC: r184227 - don't use *statep without holding the vnode interlock
  
  This change is being merged earlier than originally planned at the request
  of the release engineers.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/kern_lockf.c

Modified: stable/7/sys/kern/kern_lockf.c
==============================================================================
--- stable/7/sys/kern/kern_lockf.c	Sat Oct 25 11:37:42 2008	(r184259)
+++ stable/7/sys/kern/kern_lockf.c	Sat Oct 25 14:00:37 2008	(r184260)
@@ -467,12 +467,15 @@ lf_advlockasync(struct vop_advlockasync_
 	/*
 	 * Avoid the common case of unlocking when inode has no locks.
 	 */
-	if ((*statep) == NULL || LIST_EMPTY(&(*statep)->ls_active)) {
+	VI_LOCK(vp);
+	if ((*statep) == NULL) {
 		if (ap->a_op != F_SETLK) {
 			fl->l_type = F_UNLCK;
+			VI_UNLOCK(vp);
 			return (0);
 		}
 	}
+	VI_UNLOCK(vp);
 
 	/*
 	 * Map our arguments to an existing lock owner or create one
From stas at FreeBSD.org  Sat Oct 25 21:42:43 2008
From: stas at FreeBSD.org (Stanislav Sedov)
Date: Sat Oct 25 21:42:50 2008
Subject: svn commit: r184267 - in stable/7: share/man/man4 sys sys/conf
	sys/dev/ae sys/dev/mii sys/modules sys/modules/ae
	usr.sbin/sysinstall
Message-ID: <200810252142.m9PLghfx054036@svn.freebsd.org>

Author: stas
Date: Sat Oct 25 21:42:43 2008
New Revision: 184267
URL: http://svn.freebsd.org/changeset/base/184267

Log:
  - MFC ae(4) Attansic FastEthernet controller driver.
  
  Approved by:	re (kensmith), kib (mentor)

Added:
  stable/7/share/man/man4/ae.4
     - copied, changed from r183602, head/share/man/man4/ae.4
  stable/7/sys/dev/ae/
     - copied from r183567, head/sys/dev/ae/
  stable/7/sys/modules/ae/
     - copied from r183567, head/sys/modules/ae/
Modified:
  stable/7/share/man/man4/   (props changed)
  stable/7/share/man/man4/Makefile
  stable/7/share/man/man4/vlan.4
  stable/7/sys/   (props changed)
  stable/7/sys/conf/NOTES
  stable/7/sys/conf/files
  stable/7/sys/dev/ae/if_ae.c
  stable/7/sys/dev/mii/atphy.c
  stable/7/sys/dev/mii/miidevs
  stable/7/sys/modules/Makefile
  stable/7/usr.sbin/sysinstall/   (props changed)
  stable/7/usr.sbin/sysinstall/devices.c

Modified: stable/7/share/man/man4/Makefile
==============================================================================
--- stable/7/share/man/man4/Makefile	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/share/man/man4/Makefile	Sat Oct 25 21:42:43 2008	(r184267)
@@ -8,6 +8,7 @@ MAN=	aac.4 \
 	acpi_video.4 \
 	adv.4 \
 	adw.4 \
+	ae.4 \
 	age.4 \
 	agp.4 \
 	aha.4 \

Copied and modified: stable/7/share/man/man4/ae.4 (from r183602, head/share/man/man4/ae.4)
==============================================================================
--- head/share/man/man4/ae.4	Sat Oct  4 14:21:54 2008	(r183602, copy source)
+++ stable/7/share/man/man4/ae.4	Sat Oct 25 21:42:43 2008	(r184267)
@@ -24,12 +24,12 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd October 04, 2008
+.Dd October 4, 2008
 .Dt AE 4
 .Os
 .Sh NAME
 .Nm ae
-.Nd Attansic/Atheros L2 FastEthernet controller driver
+.Nd "Attansic/Atheros L2 FastEthernet controller driver"
 .Sh SYNOPSIS
 To compile this driver into the kernel, place the following lines in your
 kernel configuration file:
@@ -84,7 +84,8 @@ For more information on configuring this
 .Sh HARDWARE
 The
 .Nm
-driver is known to support the following hardware:
+driver supports Attansic/Atheros L2 PCIe FastEthernet controllers, and
+is known to support the following hardware:
 .Pp
 .Bl -bullet -compact
 .It
@@ -149,4 +150,4 @@ driver and this manual page was written 
 .An Stanislav Sedov
 .Aq stas@FreeBSD.org .
 It first appeared in
-.Fx 8.0 .
+.Fx 7.1 .

Modified: stable/7/share/man/man4/vlan.4
==============================================================================
--- stable/7/share/man/man4/vlan.4	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/share/man/man4/vlan.4	Sat Oct 25 21:42:43 2008	(r184267)
@@ -122,6 +122,7 @@ The whole issue is very specific to a pa
 .Pp
 By now, the list of physical interfaces able of full VLAN processing
 in the hardware is limited to the following devices:
+.Xr ae 4 ,
 .Xr age 4 ,
 .Xr bce 4 ,
 .Xr bge 4 ,

Modified: stable/7/sys/conf/NOTES
==============================================================================
--- stable/7/sys/conf/NOTES	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/sys/conf/NOTES	Sat Oct 25 21:42:43 2008	(r184267)
@@ -1716,6 +1716,8 @@ device		puc
 # individual driver.
 device		miibus
 
+# ae:   Support for gigabit ethernet adapters based on the Attansic/Atheros
+#       L2 PCI-Express FastEthernet controllers.
 # an:   Aironet 4500/4800 802.11 wireless adapters. Supports the PCMCIA,
 #       PCI and ISA varieties.
 # awi:  Support for IEEE 802.11 PC Card devices using the AMD Am79C930 and
@@ -1864,6 +1866,7 @@ device		wi
 device		xe
 
 # PCI Ethernet NICs that use the common MII bus controller code.
+device		ae		# Attansic/Atheros L2 FastEthernet
 device		age		# Attansic/Atheros L1 Gigabit Ethernet
 device		bce		# Broadcom BCM5706/BCM5708 Gigabit Ethernet
 device		bfe		# Broadcom BCM440x 10/100 Ethernet

Modified: stable/7/sys/conf/files
==============================================================================
--- stable/7/sys/conf/files	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/sys/conf/files	Sat Oct 25 21:42:43 2008	(r184267)
@@ -426,6 +426,7 @@ dev/advansys/adw_pci.c		optional adw pci
 dev/advansys/adwcam.c		optional adw
 dev/advansys/adwlib.c		optional adw
 dev/advansys/adwmcode.c		optional adw
+dev/ae/if_ae.c			optional ae pci
 dev/age/if_age.c		optional age pci
 dev/aha/aha.c			optional aha
 dev/aha/aha_isa.c		optional aha isa

Modified: stable/7/sys/dev/ae/if_ae.c
==============================================================================
--- head/sys/dev/ae/if_ae.c	Fri Oct  3 10:31:31 2008	(r183567)
+++ stable/7/sys/dev/ae/if_ae.c	Sat Oct 25 21:42:43 2008	(r184267)
@@ -380,10 +380,8 @@ ae_attach(device_t dev)
 	ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN;
 	IFQ_SET_MAXLEN(&ifp->if_snd, ifp->if_snd.ifq_drv_maxlen);
 	IFQ_SET_READY(&ifp->if_snd);
-	if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0) {
-		ifp->if_capabilities |= IFCAP_WOL_MAGIC;
+	if (pci_find_extcap(dev, PCIY_PMG, &pmc) == 0)
 		sc->flags |= AE_FLAG_PMG;
-	}
 	ifp->if_capenable = ifp->if_capabilities;
 
 	/*
@@ -1334,7 +1332,6 @@ ae_pm_init(ae_softc_t *sc)
 	struct ifnet *ifp;
 	uint32_t val;
 	uint16_t pmstat;
-	struct mii_data *mii;
 	int pmc;
 
 	AE_LOCK_ASSERT(sc);
@@ -1346,40 +1343,7 @@ ae_pm_init(ae_softc_t *sc)
 		return;
 	}
 
-	/*
-	 * Configure WOL if enabled.
-	 */
-	if ((ifp->if_capenable & IFCAP_WOL) != 0) {
-		mii = device_get_softc(sc->miibus);
-		mii_pollstat(mii);
-		if ((mii->mii_media_status & IFM_AVALID) != 0 &&
-		    (mii->mii_media_status & IFM_ACTIVE) != 0) {
-			AE_WRITE_4(sc, AE_WOL_REG, AE_WOL_MAGIC | \
-			    AE_WOL_MAGIC_PME);
-
-			/*
-			 * Configure MAC.
-			 */
-			val = AE_MAC_RX_EN | AE_MAC_CLK_PHY | \
-			    AE_MAC_TX_CRC_EN | AE_MAC_TX_AUTOPAD | \
-			    ((AE_HALFBUF_DEFAULT << AE_HALFBUF_SHIFT) & \
-			    AE_HALFBUF_MASK) | \
-			    ((AE_MAC_PREAMBLE_DEFAULT << \
-			    AE_MAC_PREAMBLE_SHIFT) & AE_MAC_PREAMBLE_MASK) | \
-			    AE_MAC_BCAST_EN | AE_MAC_MCAST_EN;
-			if ((IFM_OPTIONS(mii->mii_media_active) & \
-			    IFM_FDX) != 0)
-				val |= AE_MAC_FULL_DUPLEX;
-			AE_WRITE_4(sc, AE_MAC_REG, val);
-			    
-		} else {	/* No link. */
-			AE_WRITE_4(sc, AE_WOL_REG, AE_WOL_LNKCHG | \
-			    AE_WOL_LNKCHG_PME);
-			AE_WRITE_4(sc, AE_MAC_REG, 0);
-		}
-	} else {
-		ae_powersave_enable(sc);
-	}
+	ae_powersave_enable(sc);
 
 	/*
 	 * PCIE hacks. Magic numbers.
@@ -1397,8 +1361,6 @@ ae_pm_init(ae_softc_t *sc)
 	pci_find_extcap(sc->dev, PCIY_PMG, &pmc);
 	pmstat = pci_read_config(sc->dev, pmc + PCIR_POWER_STATUS, 2);
 	pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE);
-	if ((ifp->if_capenable & IFCAP_WOL) != 0)
-		pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE;
 	pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
 }
 

Modified: stable/7/sys/dev/mii/atphy.c
==============================================================================
--- stable/7/sys/dev/mii/atphy.c	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/sys/dev/mii/atphy.c	Sat Oct 25 21:42:43 2008	(r184267)
@@ -86,6 +86,7 @@ static int	atphy_auto(struct mii_softc *
 
 static const struct mii_phydesc atphys[] = {
 	MII_PHY_DESC(ATHEROS, F1),
+	MII_PHY_DESC(ATHEROS, F2),
 	MII_PHY_END
 };
 

Modified: stable/7/sys/dev/mii/miidevs
==============================================================================
--- stable/7/sys/dev/mii/miidevs	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/sys/dev/mii/miidevs	Sat Oct 25 21:42:43 2008	(r184267)
@@ -121,6 +121,7 @@ model xxAMD 79C873		0x0000 Am79C873/DM91
 
 /* Atheros Communications/Attansic PHYs. */
 model ATHEROS F1		0x0001 Atheros F1 10/100/1000 PHY
+model ATHEROS F2		0x0002 Atheros F2 10/100 PHY
 
 /* Broadcom Corp. PHYs. */
 model BROADCOM 3C905B		0x0012 3c905B 10/100 internal PHY

Modified: stable/7/sys/modules/Makefile
==============================================================================
--- stable/7/sys/modules/Makefile	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/sys/modules/Makefile	Sat Oct 25 21:42:43 2008	(r184267)
@@ -8,6 +8,7 @@ SUBDIR=	${_3dfx} \
 	accf_data \
 	accf_http \
 	${_acpi} \
+	ae \
 	age \
 	${_agp} \
 	aha \

Modified: stable/7/usr.sbin/sysinstall/devices.c
==============================================================================
--- stable/7/usr.sbin/sysinstall/devices.c	Sat Oct 25 20:42:10 2008	(r184266)
+++ stable/7/usr.sbin/sysinstall/devices.c	Sat Oct 25 21:42:43 2008	(r184267)
@@ -93,6 +93,7 @@ static struct _devname {
     DISK("mfid%d",	"LSI MegaRAID SAS array",		4),
     FLOPPY("fd%d",	"floppy drive unit A",			4),
     SERIAL("cuad%d",	"%s on device %s (COM%d)",		16),
+    NETWORK("ae",	"Attansic/Atheros L2 FastEthernet"),
     NETWORK("age",	"Attansic/Atheros L1 Gigabit Ethernet"),
     NETWORK("an",	"Aironet 4500/4800 802.11 wireless adapter"),
     NETWORK("ath",	"Atheros IEEE 802.11 wireless adapter"),
From delphij at FreeBSD.org  Sun Oct 26 09:35:10 2008
From: delphij at FreeBSD.org (Xin LI)
Date: Sun Oct 26 09:35:29 2008
Subject: svn commit: r184289 - in stable/7/usr.sbin/nscd: . agents
Message-ID: <200810260935.m9Q9Z9iu077128@svn.freebsd.org>

Author: delphij
Date: Sun Oct 26 09:35:08 2008
New Revision: 184289
URL: http://svn.freebsd.org/changeset/base/184289

Log:
  MFC:  Sync code with -CURRENT state.
      Merged r183755,183770,184186-184189
  
  Approved by:	re (kib)

Modified:
  stable/7/usr.sbin/nscd/   (props changed)
  stable/7/usr.sbin/nscd/agent.c
  stable/7/usr.sbin/nscd/agents/group.c
  stable/7/usr.sbin/nscd/agents/passwd.c
  stable/7/usr.sbin/nscd/agents/services.c
  stable/7/usr.sbin/nscd/cachelib.c
  stable/7/usr.sbin/nscd/cacheplcs.c
  stable/7/usr.sbin/nscd/config.c
  stable/7/usr.sbin/nscd/hashtable.h
  stable/7/usr.sbin/nscd/mp_rs_query.c
  stable/7/usr.sbin/nscd/mp_ws_query.c
  stable/7/usr.sbin/nscd/nscd.c
  stable/7/usr.sbin/nscd/nscdcli.c
  stable/7/usr.sbin/nscd/query.c

Modified: stable/7/usr.sbin/nscd/agent.c
==============================================================================
--- stable/7/usr.sbin/nscd/agent.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/agent.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -60,9 +60,8 @@ init_agent_table()
    	struct agent_table	*retval;
 
 	TRACE_IN(init_agent_table);
-	retval = (struct agent_table *)malloc(sizeof(struct agent_table));
+	retval = (struct agent_table *)calloc(1, sizeof(struct agent_table));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct agent_table));
 
 	TRACE_OUT(init_agent_table);
 	return (retval);

Modified: stable/7/usr.sbin/nscd/agents/group.c
==============================================================================
--- stable/7/usr.sbin/nscd/agents/group.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/agents/group.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -140,9 +140,8 @@ group_lookup_func(const char *key, size_
 	switch (lookup_type) {
 	case nss_lt_name:
 		size = key_size - sizeof(enum nss_lookup_type)	+ 1;
-		name = (char *)malloc(size);
+		name = (char *)calloc(1, size);
 		assert(name != NULL);
-		memset(name, 0, size);
 		memcpy(name, key + sizeof(enum nss_lookup_type), size - 1);
 		break;
 	case nss_lt_id:
@@ -225,9 +224,8 @@ init_group_agent()
 	struct common_agent	*retval;
 
 	TRACE_IN(init_group_agent);
-	retval = (struct common_agent *)malloc(sizeof(struct common_agent));
+	retval = (struct common_agent *)calloc(1, sizeof(struct common_agent));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct common_agent));
 
 	retval->parent.name = strdup("group");
 	assert(retval->parent.name != NULL);
@@ -245,10 +243,9 @@ init_group_mp_agent()
 	struct multipart_agent	*retval;
 
 	TRACE_IN(init_group_mp_agent);
-	retval = (struct multipart_agent *)malloc(
+	retval = (struct multipart_agent *)calloc(1,
 		sizeof(struct multipart_agent));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct multipart_agent));
 
 	retval->parent.name = strdup("group");
 	retval->parent.type = MULTIPART_AGENT;

Modified: stable/7/usr.sbin/nscd/agents/passwd.c
==============================================================================
--- stable/7/usr.sbin/nscd/agents/passwd.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/agents/passwd.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -148,9 +148,8 @@ passwd_lookup_func(const char *key, size
 	switch (lookup_type) {
 	case nss_lt_name:
 		size = key_size - sizeof(enum nss_lookup_type)	+ 1;
-		login = (char *)malloc(size);
+		login = (char *)calloc(1, size);
 		assert(login != NULL);
-		memset(login, 0, size);
 		memcpy(login, key + sizeof(enum nss_lookup_type), size - 1);
 		break;
 	case nss_lt_id:
@@ -232,9 +231,8 @@ init_passwd_agent()
 	struct common_agent	*retval;
 
 	TRACE_IN(init_passwd_agent);
-	retval = (struct common_agent *)malloc(sizeof(struct common_agent));
+	retval = (struct common_agent *)calloc(1, sizeof(struct common_agent));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct common_agent));
 
 	retval->parent.name = strdup("passwd");
 	assert(retval->parent.name != NULL);
@@ -252,10 +250,9 @@ init_passwd_mp_agent()
 	struct multipart_agent	*retval;
 
 	TRACE_IN(init_passwd_mp_agent);
-	retval = (struct multipart_agent *)malloc(
+	retval = (struct multipart_agent *)calloc(1,
 		sizeof(struct multipart_agent));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct multipart_agent));
 
 	retval->parent.name = strdup("passwd");
 	retval->parent.type = MULTIPART_AGENT;

Modified: stable/7/usr.sbin/nscd/agents/services.c
==============================================================================
--- stable/7/usr.sbin/nscd/agents/services.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/agents/services.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -145,9 +145,8 @@ services_lookup_func(const char *key, si
 	switch (lookup_type) {
 	case nss_lt_name:
 		size = key_size - sizeof(enum nss_lookup_type);
-		name = (char *)malloc(size + 1);
+		name = (char *)calloc(1, size + 1);
 		assert(name != NULL);
-		memset(name, 0, size + 1);
 		memcpy(name, key + sizeof(enum nss_lookup_type), size);
 
 		size2 = strlen(name) + 1;
@@ -169,9 +168,8 @@ services_lookup_func(const char *key, si
 
 		size = key_size - sizeof(enum nss_lookup_type) - sizeof(int);
 		if (size > 0) {
-			proto = (char *)malloc(size + 1);
+			proto = (char *)calloc(1, size + 1);
 			assert(proto != NULL);
-			memset(proto, size + 1, 0);
 			memcpy(proto, key + sizeof(enum nss_lookup_type) +
 				sizeof(int), size);
 		}
@@ -247,9 +245,8 @@ init_services_agent()
 	struct common_agent	*retval;
 	TRACE_IN(init_services_agent);
 
-	retval = (struct common_agent *)malloc(sizeof(struct common_agent));
+	retval = (struct common_agent *)calloc(1, sizeof(struct common_agent));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct common_agent));
 
 	retval->parent.name = strdup("services");
 	assert(retval->parent.name != NULL);
@@ -267,10 +264,9 @@ init_services_mp_agent()
 	struct multipart_agent	*retval;
 
 	TRACE_IN(init_services_mp_agent);
-	retval = (struct multipart_agent *)malloc(
+	retval = (struct multipart_agent *)calloc(1,
 		sizeof(struct multipart_agent));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct multipart_agent));
 
 	retval->parent.name = strdup("services");
 	retval->parent.type = MULTIPART_AGENT;

Modified: stable/7/usr.sbin/nscd/cachelib.c
==============================================================================
--- stable/7/usr.sbin/nscd/cachelib.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/cachelib.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -479,18 +479,15 @@ init_cache(struct cache_params const *pa
 	TRACE_IN(init_cache);
 	assert(params != NULL);
 
-	retval = (struct cache_ *)malloc(sizeof(struct cache_));
+	retval = (struct cache_ *)calloc(1, sizeof(struct cache_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_));
 
 	assert(params != NULL);
 	memcpy(&retval->params, params, sizeof(struct cache_params));
 
-	retval->entries = (struct cache_entry_ **)malloc(
+	retval->entries = (struct cache_entry_ **)calloc(1,
 		sizeof(struct cache_entry_ *) * INITIAL_ENTRIES_CAPACITY);
 	assert(retval->entries != NULL);
-	memset(retval->entries, 0, sizeof(sizeof(struct cache_entry_ *)
-		* INITIAL_ENTRIES_CAPACITY));
 
 	retval->entries_capacity = INITIAL_ENTRIES_CAPACITY;
 	retval->entries_size = 0;
@@ -541,12 +538,10 @@ register_cache_entry(struct cache_ *the_
 
 		new_capacity = the_cache->entries_capacity +
 			ENTRIES_CAPACITY_STEP;
-		new_entries = (struct cache_entry_ **)malloc(
+		new_entries = (struct cache_entry_ **)calloc(1,
 			sizeof(struct cache_entry_ *) * new_capacity);
 		assert(new_entries != NULL);
 
-		memset(new_entries, 0, sizeof(struct cache_entry_ *) *
-		    new_capacity);
 		memcpy(new_entries, the_cache->entries,
 			sizeof(struct cache_entry_ *)
 			* the_cache->entries_size);
@@ -555,26 +550,23 @@ register_cache_entry(struct cache_ *the_
 		the_cache->entries = new_entries;
 	}
 
-	entry_name_size = strlen(params->entry_name);
+	entry_name_size = strlen(params->entry_name) + 1;
 	switch (params->entry_type)
 	{
 	case CET_COMMON:
-		new_common_entry = (struct cache_common_entry_ *)malloc(
+		new_common_entry = (struct cache_common_entry_ *)calloc(1,
 			sizeof(struct cache_common_entry_));
 		assert(new_common_entry != NULL);
-		memset(new_common_entry, 0, sizeof(struct cache_common_entry_));
 
 		memcpy(&new_common_entry->common_params, params,
 			sizeof(struct common_cache_entry_params));
 		new_common_entry->params =
 		  (struct cache_entry_params *)&new_common_entry->common_params;
 
-		new_common_entry->common_params.entry_name = (char *)malloc(
-			entry_name_size+1);
+		new_common_entry->common_params.entry_name = (char *)calloc(1,
+			entry_name_size);
 		assert(new_common_entry->common_params.entry_name != NULL);
-		memset(new_common_entry->common_params.entry_name, 0,
-			entry_name_size + 1);
-		strncpy(new_common_entry->common_params.entry_name,
+		strlcpy(new_common_entry->common_params.entry_name,
 			params->entry_name, entry_name_size);
 		new_common_entry->name =
 			new_common_entry->common_params.entry_name;
@@ -588,11 +580,9 @@ register_cache_entry(struct cache_ *the_
 		else
 			policies_size = 2;
 
-		new_common_entry->policies = (struct cache_policy_ **)malloc(
+		new_common_entry->policies = (struct cache_policy_ **)calloc(1,
 			sizeof(struct cache_policy_ *) * policies_size);
 		assert(new_common_entry->policies != NULL);
-		memset(new_common_entry->policies, 0,
-			sizeof(struct cache_policy_ *) * policies_size);
 
 		new_common_entry->policies_size = policies_size;
 		new_common_entry->policies[0] = init_cache_fifo_policy();
@@ -618,22 +608,19 @@ register_cache_entry(struct cache_ *the_
 			(struct cache_entry_ *)new_common_entry;
 		break;
 	case CET_MULTIPART:
-		new_mp_entry = (struct cache_mp_entry_ *)malloc(
+		new_mp_entry = (struct cache_mp_entry_ *)calloc(1,
 			sizeof(struct cache_mp_entry_));
 		assert(new_mp_entry != NULL);
-		memset(new_mp_entry, 0, sizeof(struct cache_mp_entry_));
 
 		memcpy(&new_mp_entry->mp_params, params,
 			sizeof(struct mp_cache_entry_params));
 		new_mp_entry->params =
 			(struct cache_entry_params *)&new_mp_entry->mp_params;
 
-		new_mp_entry->mp_params.entry_name = (char *)malloc(
-			entry_name_size+1);
+		new_mp_entry->mp_params.entry_name = (char *)calloc(1,
+			entry_name_size);
 		assert(new_mp_entry->mp_params.entry_name != NULL);
-		memset(new_mp_entry->mp_params.entry_name, 0,
-			entry_name_size + 1);
-		strncpy(new_mp_entry->mp_params.entry_name, params->entry_name,
+		strlcpy(new_mp_entry->mp_params.entry_name, params->entry_name,
 			entry_name_size);
 		new_mp_entry->name = new_mp_entry->mp_params.entry_name;
 
@@ -925,10 +912,9 @@ open_cache_mp_write_session(struct cache
 		return (NULL);
 	}
 
-	retval = (struct cache_mp_write_session_ *)malloc(
+	retval = (struct cache_mp_write_session_ *)calloc(1,
 		sizeof(struct cache_mp_write_session_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_mp_write_session_));
 
 	TAILQ_INIT(&retval->items);
 	retval->parent_entry = mp_entry;
@@ -961,10 +947,9 @@ cache_mp_write(struct cache_mp_write_ses
 		return (-1);
 	}
 
-	new_item = (struct cache_mp_data_item_ *)malloc(
+	new_item = (struct cache_mp_data_item_ *)calloc(1,
 		sizeof(struct cache_mp_data_item_));
 	assert(new_item != NULL);
-	memset(new_item, 0, sizeof(struct cache_mp_data_item_));
 
 	new_item->value = (char *)malloc(data_size);
 	assert(new_item->value != NULL);
@@ -1065,10 +1050,9 @@ open_cache_mp_read_session(struct cache_
 		}
 	}
 
-	retval = (struct cache_mp_read_session_ *)malloc(
+	retval = (struct cache_mp_read_session_ *)calloc(1,
 		sizeof(struct cache_mp_read_session_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_mp_read_session_));
 
 	retval->parent_entry = mp_entry;
 	retval->current_item = TAILQ_FIRST(

Modified: stable/7/usr.sbin/nscd/cacheplcs.c
==============================================================================
--- stable/7/usr.sbin/nscd/cacheplcs.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/cacheplcs.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -82,10 +82,9 @@ cache_queue_policy_create_item()
 	struct cache_queue_policy_item_ *retval;
 
 	TRACE_IN(cache_queue_policy_create_item);
-	retval = (struct cache_queue_policy_item_ *)malloc(
+	retval = (struct cache_queue_policy_item_ *)calloc(1,
 		sizeof(struct cache_queue_policy_item_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_queue_policy_item_));
 
 	TRACE_OUT(cache_queue_policy_create_item);
 	return ((struct cache_policy_item_ *)retval);
@@ -193,10 +192,9 @@ init_cache_queue_policy(void)
 	struct cache_queue_policy_	*retval;
 
 	TRACE_IN(init_cache_queue_policy);
-	retval = (struct cache_queue_policy_ *)malloc(
+	retval = (struct cache_queue_policy_ *)calloc(1,
 		sizeof(struct cache_queue_policy_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_queue_policy_));
 
 	retval->parent_data.create_item_func = cache_queue_policy_create_item;
 	retval->parent_data.destroy_item_func = cache_queue_policy_destroy_item;
@@ -334,10 +332,9 @@ cache_lfu_policy_create_item(void)
 	struct cache_lfu_policy_item_ *retval;
 
 	TRACE_IN(cache_lfu_policy_create_item);
-	retval = (struct cache_lfu_policy_item_ *)malloc(
+	retval = (struct cache_lfu_policy_item_ *)calloc(1,
 		sizeof(struct cache_lfu_policy_item_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_lfu_policy_item_));
 
 	TRACE_OUT(cache_lfu_policy_create_item);
 	return ((struct cache_policy_item_ *)retval);
@@ -539,10 +536,9 @@ init_cache_lfu_policy()
 	struct cache_lfu_policy_ *retval;
 
 	TRACE_IN(init_cache_lfu_policy);
-	retval = (struct cache_lfu_policy_ *)malloc(
+	retval = (struct cache_lfu_policy_ *)calloc(1,
 		sizeof(struct cache_lfu_policy_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct cache_lfu_policy_));
 
 	retval->parent_data.create_item_func = cache_lfu_policy_create_item;
 	retval->parent_data.destroy_item_func = cache_lfu_policy_destroy_item;

Modified: stable/7/usr.sbin/nscd/config.c
==============================================================================
--- stable/7/usr.sbin/nscd/config.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/config.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -119,10 +119,9 @@ create_configuration_entry(const char *n
 	assert(negative_params != NULL);
 	assert(mp_params != NULL);
 
-	retval = (struct configuration_entry *)malloc(
+	retval = (struct configuration_entry *)calloc(1,
 		sizeof(struct configuration_entry));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct configuration_entry));
 
 	res = pthread_mutex_init(&retval->positive_cache_lock, NULL);
 	if (res != 0) {
@@ -162,9 +161,8 @@ create_configuration_entry(const char *n
 		sizeof(struct mp_cache_entry_params));
 
 	size = strlen(name);
-	retval->name = (char *)malloc(size + 1);
+	retval->name = (char *)calloc(1, size + 1);
 	assert(retval->name != NULL);
-	memset(retval->name, 0, size + 1);
 	memcpy(retval->name, name, size);
 
 	memcpy(&retval->common_query_timeout, common_timeout,
@@ -268,12 +266,10 @@ add_configuration_entry(struct configura
 		struct configuration_entry **new_entries;
 
 		config->entries_capacity *= 2;
-		new_entries = (struct configuration_entry **)malloc(
+		new_entries = (struct configuration_entry **)calloc(1,
 			sizeof(struct configuration_entry *) *
 			config->entries_capacity);
 		assert(new_entries != NULL);
-		memset(new_entries, 0, sizeof(struct configuration_entry *) *
-			config->entries_capacity);
 		memcpy(new_entries, config->entries,
 			sizeof(struct configuration_entry *) *
 		        config->entries_size);
@@ -514,17 +510,14 @@ init_configuration(void)
 	struct configuration	*retval;
 
 	TRACE_IN(init_configuration);
-	retval = (struct configuration *)malloc(sizeof(struct configuration));
+	retval = (struct configuration *)calloc(1, sizeof(struct configuration));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct configuration));
 
 	retval->entries_capacity = INITIAL_ENTRIES_CAPACITY;
-	retval->entries = (struct configuration_entry **)malloc(
+	retval->entries = (struct configuration_entry **)calloc(1,
 		sizeof(struct configuration_entry *) *
 		retval->entries_capacity);
 	assert(retval->entries != NULL);
-	memset(retval->entries, 0, sizeof(struct configuration_entry *) *
-		retval->entries_capacity);
 
 	pthread_rwlock_init(&retval->rwlock, NULL);
 
@@ -544,15 +537,13 @@ fill_configuration_defaults(struct confi
 		free(config->socket_path);
 
 	len = strlen(DEFAULT_SOCKET_PATH);
-	config->socket_path = (char *)malloc(len + 1);
+	config->socket_path = (char *)calloc(1, len + 1);
 	assert(config->socket_path != NULL);
-	memset(config->socket_path, 0, len + 1);
 	memcpy(config->socket_path, DEFAULT_SOCKET_PATH, len);
 
 	len = strlen(DEFAULT_PIDFILE_PATH);
-	config->pidfile_path = (char *)malloc(len + 1);
+	config->pidfile_path = (char *)calloc(1, len + 1);
 	assert(config->pidfile_path != NULL);
-	memset(config->pidfile_path, 0, len + 1);
 	memcpy(config->pidfile_path, DEFAULT_PIDFILE_PATH, len);
 
 	config->socket_mode =  S_IFSOCK | S_IRUSR | S_IWUSR |

Modified: stable/7/usr.sbin/nscd/hashtable.h
==============================================================================
--- stable/7/usr.sbin/nscd/hashtable.h	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/hashtable.h	Sun Oct 26 09:35:08 2008	(r184289)
@@ -75,9 +75,7 @@ typedef int hashtable_index_t;
 #define HASHTABLE_INIT(table, type, field, _entries_size)		\
 	do {								\
 		hashtable_index_t var;					\
-		(table)->entries = (void *)malloc(			\
-			sizeof(*(table)->entries) * (_entries_size));	\
-		memset((table)->entries, 0, 				\
+		(table)->entries = (void *)calloc(1,			\
 			sizeof(*(table)->entries) * (_entries_size));	\
 		(table)->entries_size = (_entries_size);		\
 		for (var = 0; var < HASHTABLE_ENTRIES_COUNT(table); ++var) {\

Modified: stable/7/usr.sbin/nscd/mp_rs_query.c
==============================================================================
--- stable/7/usr.sbin/nscd/mp_rs_query.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/mp_rs_query.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -115,11 +115,9 @@ on_mp_read_session_request_read1(struct 
 			return (-1);
 		}
 
-		c_mp_rs_request->entry = (char *)malloc(
+		c_mp_rs_request->entry = (char *)calloc(1,
 			c_mp_rs_request->entry_length + 1);
 		assert(c_mp_rs_request->entry != NULL);
-		memset(c_mp_rs_request->entry, 0,
-			c_mp_rs_request->entry_length + 1);
 
 		qstate->kevent_watermark = c_mp_rs_request->entry_length;
 		qstate->process_func = on_mp_read_session_request_read2;

Modified: stable/7/usr.sbin/nscd/mp_ws_query.c
==============================================================================
--- stable/7/usr.sbin/nscd/mp_ws_query.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/mp_ws_query.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -121,11 +121,9 @@ on_mp_write_session_request_read1(struct
 			return (-1);
 		}
 
-		c_mp_ws_request->entry = (char *)malloc(
+		c_mp_ws_request->entry = (char *)calloc(1,
 			c_mp_ws_request->entry_length + 1);
 		assert(c_mp_ws_request->entry != NULL);
-		memset(c_mp_ws_request->entry, 0,
-			c_mp_ws_request->entry_length + 1);
 
 		qstate->kevent_watermark = c_mp_ws_request->entry_length;
 		qstate->process_func = on_mp_write_session_request_read2;
@@ -376,9 +374,8 @@ on_mp_write_session_write_request_read1(
 		return (-1);
 	}
 
-	write_request->data = (char *)malloc(write_request->data_size);
+	write_request->data = (char *)calloc(1, write_request->data_size);
 	assert(write_request->data != NULL);
-	memset(write_request->data, 0, write_request->data_size);
 
 	qstate->kevent_watermark = write_request->data_size;
 	qstate->process_func = on_mp_write_session_write_request_read2;

Modified: stable/7/usr.sbin/nscd/nscd.c
==============================================================================
--- stable/7/usr.sbin/nscd/nscd.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/nscd.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -77,7 +77,6 @@ static void destroy_cache_(cache);
 static void destroy_runtime_env(struct runtime_env *);
 static cache init_cache_(struct configuration *);
 static struct runtime_env *init_runtime_env(struct configuration *);
-static void print_version_info(void);
 static void processing_loop(cache, struct runtime_env *,
 	struct configuration *);
 static void process_socket_event(struct kevent *, struct runtime_env *,
@@ -90,14 +89,6 @@ static void usage(void);
 void get_time_func(struct timeval *);
 
 static void
-print_version_info(void)
-{
-	TRACE_IN(print_version_info);
-	printf("nscd v0.2 (20 Oct 2005)\nwas developed during SoC 2005\n");
-	TRACE_OUT(print_version_info);
-}
-
-static void
 usage(void)
 {
 	fprintf(stderr,
@@ -172,9 +163,8 @@ init_runtime_env(struct configuration *c
 	struct runtime_env *retval;
 
 	TRACE_IN(init_runtime_env);
-	retval = (struct runtime_env *)malloc(sizeof(struct runtime_env));
+	retval = (struct runtime_env *)calloc(1, sizeof(struct runtime_env));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct runtime_env));
 
 	retval->sockfd = socket(PF_LOCAL, SOCK_STREAM, 0);
 
@@ -183,7 +173,7 @@ init_runtime_env(struct configuration *c
 
 	memset(&serv_addr, 0, sizeof(struct sockaddr_un));
 	serv_addr.sun_family = PF_LOCAL;
-	strncpy(serv_addr.sun_path, config->socket_path,
+	strlcpy(serv_addr.sun_path, config->socket_path,
 		sizeof(serv_addr.sun_path));
 	serv_addr_len = sizeof(serv_addr.sun_family) +
 		strlen(serv_addr.sun_path) + 1;
@@ -417,10 +407,9 @@ process_socket_event(struct kevent *even
 			if (qstate->io_buffer != NULL)
 				free(qstate->io_buffer);
 
-			qstate->io_buffer = (char *)malloc(
+			qstate->io_buffer = (char *)calloc(1,
 				qstate->kevent_watermark);
 			assert(qstate->io_buffer != NULL);
-			memset(qstate->io_buffer, 0, qstate->kevent_watermark);
 
 			qstate->io_buffer_p = qstate->io_buffer;
 			qstate->io_buffer_size = qstate->kevent_watermark;
@@ -622,9 +611,6 @@ main(int argc, char *argv[])
 	/* by default all debug messages are omitted */
 	TRACE_OFF();
 
-	/* startup output */
-	print_version_info();
-
 	/* parsing command line arguments */
 	trace_mode_enabled = 0;
 	force_single_threaded = 0;
@@ -841,10 +827,8 @@ main(int argc, char *argv[])
 	}
 
 	if (s_configuration->threads_num > 1) {
-		threads = (pthread_t *)malloc(sizeof(pthread_t) *
+		threads = (pthread_t *)calloc(1, sizeof(pthread_t) *
 			s_configuration->threads_num);
-		memset(threads, 0, sizeof(pthread_t) *
-	    		s_configuration->threads_num);
 		for (i = 0; i < s_configuration->threads_num; ++i) {
 			thread_args = (struct processing_thread_args *)malloc(
 				sizeof(struct processing_thread_args));

Modified: stable/7/usr.sbin/nscd/nscdcli.c
==============================================================================
--- stable/7/usr.sbin/nscd/nscdcli.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/nscdcli.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -187,7 +187,7 @@ open_nscd_connection__(struct nscd_conne
 
 	client_socket = socket(PF_LOCAL, SOCK_STREAM, 0);
 	client_address.sun_family = PF_LOCAL;
-	strncpy(client_address.sun_path, params->socket_path,
+	strlcpy(client_address.sun_path, params->socket_path,
 		sizeof(client_address.sun_path));
 	client_address_len = sizeof(client_address.sun_family) +
 		strlen(client_address.sun_path) + 1;
@@ -201,9 +201,8 @@ open_nscd_connection__(struct nscd_conne
 	}
 	fcntl(client_socket, F_SETFL, O_NONBLOCK);
 
-	retval = malloc(sizeof(struct nscd_connection_));
+	retval = calloc(1, sizeof(struct nscd_connection_));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct nscd_connection_));
 
 	retval->sockfd = client_socket;
 

Modified: stable/7/usr.sbin/nscd/query.c
==============================================================================
--- stable/7/usr.sbin/nscd/query.c	Sun Oct 26 01:04:46 2008	(r184288)
+++ stable/7/usr.sbin/nscd/query.c	Sun Oct 26 09:35:08 2008	(r184289)
@@ -332,27 +332,21 @@ on_write_request_read1(struct query_stat
 			return (-1);
 		}
 
-		write_request->entry = (char *)malloc(
+		write_request->entry = (char *)calloc(1,
 			write_request->entry_length + 1);
 		assert(write_request->entry != NULL);
-		memset(write_request->entry, 0,
-			write_request->entry_length + 1);
 
-		write_request->cache_key = (char *)malloc(
+		write_request->cache_key = (char *)calloc(1,
 			write_request->cache_key_size +
 			qstate->eid_str_length);
 		assert(write_request->cache_key != NULL);
 		memcpy(write_request->cache_key, qstate->eid_str,
 			qstate->eid_str_length);
-		memset(write_request->cache_key + qstate->eid_str_length, 0,
-			write_request->cache_key_size);
 
 		if (write_request->data_size != 0) {
-			write_request->data = (char *)malloc(
+			write_request->data = (char *)calloc(1,
 				write_request->data_size);
 			assert(write_request->data != NULL);
-			memset(write_request->data, 0,
-				write_request->data_size);
 		}
 
 		qstate->kevent_watermark = write_request->entry_length +
@@ -611,19 +605,16 @@ on_read_request_read1(struct query_state
 			return (-1);
 		}
 
-		read_request->entry = (char *)malloc(
+		read_request->entry = (char *)calloc(1,
 			read_request->entry_length + 1);
 		assert(read_request->entry != NULL);
-		memset(read_request->entry, 0, read_request->entry_length + 1);
 
-		read_request->cache_key = (char *)malloc(
+		read_request->cache_key = (char *)calloc(1,
 			read_request->cache_key_size +
 			qstate->eid_str_length);
 		assert(read_request->cache_key != NULL);
 		memcpy(read_request->cache_key, qstate->eid_str,
 			qstate->eid_str_length);
-		memset(read_request->cache_key + qstate->eid_str_length, 0,
-			read_request->cache_key_size);
 
 		qstate->kevent_watermark = read_request->entry_length +
 			read_request->cache_key_size;
@@ -936,11 +927,9 @@ on_transform_request_read1(struct query_
 				return (-1);
 			}
 
-			transform_request->entry = (char *)malloc(
+			transform_request->entry = (char *)calloc(1,
 				transform_request->entry_length + 1);
 			assert(transform_request->entry != NULL);
-			memset(transform_request->entry, 0,
-				transform_request->entry_length + 1);
 
 			qstate->process_func = on_transform_request_read2;
 		} else
@@ -1228,9 +1217,8 @@ init_query_state(int sockfd, size_t keve
 	struct query_state	*retval;
 
 	TRACE_IN(init_query_state);
-	retval = (struct query_state *)malloc(sizeof(struct query_state));
+	retval = (struct query_state *)calloc(1, sizeof(struct query_state));
 	assert(retval != NULL);
-	memset(retval, 0, sizeof(struct query_state));
 
 	retval->sockfd = sockfd;
 	retval->kevent_filter = EVFILT_READ;
From kib at FreeBSD.org  Sun Oct 26 15:41:23 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Sun Oct 26 15:41:30 2008
Subject: svn commit: r184290 - in stable/7/sys: . kern
Message-ID: <200810261541.m9QFfN4R085739@svn.freebsd.org>

Author: kib
Date: Sun Oct 26 15:41:23 2008
New Revision: 184290
URL: http://svn.freebsd.org/changeset/base/184290

Log:
  MFC r184060:
  Ktr(9) stores format string and arguments in the event circular buffer,
  not the string formatted at the time of CTRX() call. Stack_ktr(9) uses
  an on-stack buffer for the symbol name, that is supplied as an argument
  to ktr. As result, stack_ktr() traces show garbage or cause page faults.
  
  Fix stack_ktr() by using pointer to module symbol table that is supposed
  to have a longer lifetime.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/subr_stack.c

Modified: stable/7/sys/kern/subr_stack.c
==============================================================================
--- stable/7/sys/kern/subr_stack.c	Sun Oct 26 09:35:08 2008	(r184289)
+++ stable/7/sys/kern/subr_stack.c	Sun Oct 26 15:41:23 2008	(r184290)
@@ -45,8 +45,7 @@ static MALLOC_DEFINE(M_STACK, "stack", "
 static void stack_symbol(vm_offset_t pc, char *namebuf, u_int buflen,
 	    long *offset);
 #ifdef DDB
-static void stack_symbol_ddb(vm_offset_t pc, char *namebuf, u_int buflen,
-	    long *offset);
+static void stack_symbol_ddb(vm_offset_t pc, const char **name, long *offset);
 #endif
 
 struct stack *
@@ -109,16 +108,15 @@ stack_print(struct stack *st)
 void
 stack_print_ddb(struct stack *st)
 {
-	char namebuf[64];
+	const char *name;
 	long offset;
 	int i;
 
 	KASSERT(st->depth <= STACK_MAX, ("bogus stack"));
 	for (i = 0; i < st->depth; i++) {
-		stack_symbol_ddb(st->pcs[i], namebuf, sizeof(namebuf),
-		    &offset);
+		stack_symbol_ddb(st->pcs[i], &name, &offset);
 		printf("#%d %p at %s+%#lx\n", i, (void *)st->pcs[i],
-		    namebuf, offset);
+		    name, offset);
 	}
 }
 #endif
@@ -146,16 +144,15 @@ stack_sbuf_print(struct sbuf *sb, struct
 void
 stack_sbuf_print_ddb(struct sbuf *sb, struct stack *st)
 {
-	char namebuf[64];
+	const char *name;
 	long offset;
 	int i;
 
 	KASSERT(st->depth <= STACK_MAX, ("bogus stack"));
 	for (i = 0; i < st->depth; i++) {
-		stack_symbol_ddb(st->pcs[i], namebuf, sizeof(namebuf),
-		    &offset);
+		stack_symbol_ddb(st->pcs[i], &name, &offset);
 		sbuf_printf(sb, "#%d %p at %s+%#lx\n", i, (void *)st->pcs[i],
-		    namebuf, offset);
+		    name, offset);
 	}
 }
 
@@ -164,7 +161,7 @@ void
 stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth,
     int cheap)
 {
-	char namebuf[64];
+	const char *name;
 	long offset;
 	int i;
 
@@ -187,10 +184,9 @@ stack_ktr(u_int mask, const char *file, 
 		if (depth == 0 || st->depth < depth)
 			depth = st->depth;
 		for (i = 0; i < depth; i++) {
-			stack_symbol_ddb(st->pcs[i], namebuf,
-			    sizeof(namebuf), &offset);
+			stack_symbol_ddb(st->pcs[i], &name, &offset);
 			ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx",
-			    i, st->pcs[i], (u_long)namebuf, offset, 0, 0);
+			    i, st->pcs[i], (u_long)name, offset, 0, 0);
 		}
 	}
 }
@@ -214,13 +210,21 @@ stack_symbol(vm_offset_t pc, char *nameb
 
 #ifdef DDB
 static void
-stack_symbol_ddb(vm_offset_t pc, char *namebuf, u_int buflen, long *offset)
+stack_symbol_ddb(vm_offset_t pc, const char **name, long *offset)
 {
+	linker_symval_t symval;
+	c_linker_sym_t sym;
 
-	if (linker_ddb_search_symbol_name((caddr_t)pc, namebuf, buflen,
-	    offset) != 0) {
-		*offset = 0;
-		strlcpy(namebuf, "??", buflen);
-	};
+	if (linker_ddb_search_symbol((caddr_t)pc, &sym, offset) != 0)
+		goto out;
+	if (linker_ddb_symbol_values(sym, &symval) != 0)
+		goto out;
+	if (symval.name != NULL) {
+		*name = symval.name;
+		return;
+	}
+ out:
+	*offset = 0;
+	*name = "??";
 }
 #endif
From brooks at FreeBSD.org  Sun Oct 26 19:14:51 2008
From: brooks at FreeBSD.org (Brooks Davis)
Date: Sun Oct 26 19:15:08 2008
Subject: svn commit: r184294 - in stable/7/sys: . dev/usb
Message-ID: <200810261914.m9QJEoDU092299@svn.freebsd.org>

Author: brooks
Date: Sun Oct 26 19:14:50 2008
New Revision: 184294
URL: http://svn.freebsd.org/changeset/base/184294

Log:
  MFC r183976:
   Wireless Mouse device of Sony VGP-WRC1 mouse/keyboard receiver has the
   same program interface as Microsoft Wireless Notebook Optical Mouse and
   needs a quirk.
  
  PR:		usb/122712
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/usb/usb_quirks.c
  stable/7/sys/dev/usb/usbdevs

Modified: stable/7/sys/dev/usb/usb_quirks.c
==============================================================================
--- stable/7/sys/dev/usb/usb_quirks.c	Sun Oct 26 18:58:04 2008	(r184293)
+++ stable/7/sys/dev/usb/usb_quirks.c	Sun Oct 26 19:14:50 2008	(r184294)
@@ -90,6 +90,8 @@ static const struct usbd_quirk_entry {
    ANY, { UQ_MS_BAD_CLASS | UQ_MS_LEADING_BYTE }},
  { USB_VENDOR_MICROSOFT, USB_PRODUCT_MICROSOFT_WLINTELLIMOUSE,
    ANY, { UQ_MS_LEADING_BYTE }},
+ { USB_VENDOR_SONY, USB_PRODUCT_SONY_RF_RECEIVER,
+   ANY,{ UQ_MS_BAD_CLASS }},
 
  /* Devices which should be ignored by uhid */
  { USB_VENDOR_APC, USB_PRODUCT_APC_UPS,

Modified: stable/7/sys/dev/usb/usbdevs
==============================================================================
--- stable/7/sys/dev/usb/usbdevs	Sun Oct 26 18:58:04 2008	(r184293)
+++ stable/7/sys/dev/usb/usbdevs	Sun Oct 26 19:14:50 2008	(r184294)
@@ -2151,6 +2151,7 @@ product SONY CLIE_41		0x009a	Sony Clie v
 product SONY CLIE_NX60		0x00da	Sony Clie nx60
 product SONY CLIE_TH55		0x0144	Sony Clie th55
 product SONY CLIE_TJ37		0x0169	Sony Clie tj37
+product SONY RF_RECEIVER	0x01db	Sony RF mouse/kbd Receiver VGP-WRC1
 
 /* Sony Ericsson products */
 product SONYERICSSON DCU10	0x0528	USB Cable
From brooks at FreeBSD.org  Sun Oct 26 19:22:10 2008
From: brooks at FreeBSD.org (Brooks Davis)
Date: Sun Oct 26 19:22:16 2008
Subject: svn commit: r184296 - releng/6.4/usr.sbin/pkg_install
	releng/6.4/usr.sbin/pkg_install/add stable/6/usr.sbin/pkg_install
	stable/6/usr.sbin/pkg_install/add
	stable/7/usr.sbin/pkg_install stable/7/usr....
Message-ID: <200810261922.m9QJMASR092643@svn.freebsd.org>

Author: brooks
Date: Sun Oct 26 19:22:10 2008
New Revision: 184296
URL: http://svn.freebsd.org/changeset/base/184296

Log:
  MFC r183979:
   Display usage when pkg_add is called with no arguments.
  
  PR:		bin/121093
  Submitted by:	volker
  Approved by:	re (kensmith)

Modified:
  stable/7/usr.sbin/pkg_install/   (props changed)
  stable/7/usr.sbin/pkg_install/add/main.c

Changes in other areas also in this revision:
Modified:
  releng/6.4/usr.sbin/pkg_install/   (props changed)
  releng/6.4/usr.sbin/pkg_install/add/main.c
  stable/6/usr.sbin/pkg_install/   (props changed)
  stable/6/usr.sbin/pkg_install/add/main.c

Modified: stable/7/usr.sbin/pkg_install/add/main.c
==============================================================================
--- stable/7/usr.sbin/pkg_install/add/main.c	Sun Oct 26 19:17:25 2008	(r184295)
+++ stable/7/usr.sbin/pkg_install/add/main.c	Sun Oct 26 19:22:10 2008	(r184296)
@@ -259,7 +259,7 @@ main(int argc, char **argv)
 	}
     }
     /* If no packages, yelp */
-    else if (!ch) {
+    if (!ch) {
 	warnx("missing package name(s)");
 	usage();
     }
From brooks at FreeBSD.org  Sun Oct 26 19:28:05 2008
From: brooks at FreeBSD.org (Brooks Davis)
Date: Sun Oct 26 19:28:22 2008
Subject: svn commit: r184297 - releng/6.4/sbin/dhclient
	stable/6/sbin/dhclient stable/7/sbin/dhclient
Message-ID: <200810261928.m9QJS5Ko092849@svn.freebsd.org>

Author: brooks
Date: Sun Oct 26 19:28:04 2008
New Revision: 184297
URL: http://svn.freebsd.org/changeset/base/184297

Log:
  MFC r183974:
   Support the remaining options listed in dhcp-options(5) and RFC 2132.
  
  PR:		bin/127076
  Submitted by:	jkim
  Approved by:	re (kensmith)

Modified:
  stable/7/sbin/dhclient/   (props changed)
  stable/7/sbin/dhclient/dhclient.c
  stable/7/sbin/dhclient/dhcp.h
  stable/7/sbin/dhclient/tables.c

Changes in other areas also in this revision:
Modified:
  releng/6.4/sbin/dhclient/   (props changed)
  releng/6.4/sbin/dhclient/dhclient.c
  releng/6.4/sbin/dhclient/dhcp.h
  releng/6.4/sbin/dhclient/tables.c
  stable/6/sbin/dhclient/   (props changed)
  stable/6/sbin/dhclient/dhclient.c
  stable/6/sbin/dhclient/dhcp.h
  stable/6/sbin/dhclient/tables.c

Modified: stable/7/sbin/dhclient/dhclient.c
==============================================================================
--- stable/7/sbin/dhclient/dhclient.c	Sun Oct 26 19:22:10 2008	(r184296)
+++ stable/7/sbin/dhclient/dhclient.c	Sun Oct 26 19:28:04 2008	(r184297)
@@ -2317,12 +2317,16 @@ check_option(struct client_lease *l, int
 	case DHO_NETBIOS_DD_SERVER:
 	case DHO_FONT_SERVERS:
 	case DHO_DHCP_SERVER_IDENTIFIER:
+	case DHO_NISPLUS_SERVERS:
+	case DHO_MOBILE_IP_HOME_AGENT:
 	case DHO_SMTP_SERVER:
 	case DHO_POP_SERVER:
 	case DHO_NNTP_SERVER:
 	case DHO_WWW_SERVER:
 	case DHO_FINGER_SERVER:
 	case DHO_IRC_SERVER:
+	case DHO_STREETTALK_SERVER:
+	case DHO_STREETTALK_DA_SERVER:
 		if (!ipv4addrs(opbuf)) {
 			warning("Invalid IP address in option: %s", opbuf);
 			return (0);
@@ -2330,6 +2334,8 @@ check_option(struct client_lease *l, int
 		return (1)  ;
 	case DHO_HOST_NAME:
 	case DHO_NIS_DOMAIN:
+	case DHO_NISPLUS_DOMAIN:
+	case DHO_TFTP_SERVER_NAME:
 		if (!res_hnok(sbuf)) {
 			warning("Bogus Host Name option %d: %s (%s)", option,
 			    sbuf, opbuf);
@@ -2388,6 +2394,7 @@ check_option(struct client_lease *l, int
 	case DHO_DHCP_REBINDING_TIME:
 	case DHO_DHCP_CLASS_IDENTIFIER:
 	case DHO_DHCP_CLIENT_IDENTIFIER:
+	case DHO_BOOTFILE_NAME:
 	case DHO_DHCP_USER_CLASS_ID:
 	case DHO_END:
 		return (1);

Modified: stable/7/sbin/dhclient/dhcp.h
==============================================================================
--- stable/7/sbin/dhclient/dhcp.h	Sun Oct 26 19:22:10 2008	(r184296)
+++ stable/7/sbin/dhclient/dhcp.h	Sun Oct 26 19:28:04 2008	(r184297)
@@ -155,12 +155,19 @@ struct dhcp_packet {
 #define DHO_DHCP_REBINDING_TIME		59
 #define DHO_DHCP_CLASS_IDENTIFIER	60
 #define DHO_DHCP_CLIENT_IDENTIFIER	61
+#define	DHO_NISPLUS_DOMAIN		64
+#define	DHO_NISPLUS_SERVERS		65
+#define	DHO_TFTP_SERVER_NAME		66
+#define	DHO_BOOTFILE_NAME		67
+#define	DHO_MOBILE_IP_HOME_AGENT	68
 #define DHO_SMTP_SERVER			69
 #define DHO_POP_SERVER			70
 #define DHO_NNTP_SERVER			71
 #define DHO_WWW_SERVER			72
 #define DHO_FINGER_SERVER		73
 #define DHO_IRC_SERVER			74
+#define	DHO_STREETTALK_SERVER		75
+#define	DHO_STREETTALK_DA_SERVER	76
 #define DHO_DHCP_USER_CLASS_ID		77
 #define DHO_CLASSLESS_ROUTES		121
 #define DHO_END				255

Modified: stable/7/sbin/dhclient/tables.c
==============================================================================
--- stable/7/sbin/dhclient/tables.c	Sun Oct 26 19:22:10 2008	(r184296)
+++ stable/7/sbin/dhclient/tables.c	Sun Oct 26 19:28:04 2008	(r184297)
@@ -387,13 +387,25 @@ unsigned char dhcp_option_default_priori
 	DHO_FONT_SERVERS,
 	DHO_X_DISPLAY_MANAGER,
 	DHO_DHCP_PARAMETER_REQUEST_LIST,
+	DHO_NISPLUS_DOMAIN,
+	DHO_NISPLUS_SERVERS,
+	DHO_TFTP_SERVER_NAME,
+	DHO_BOOTFILE_NAME,
+	DHO_MOBILE_IP_HOME_AGENT,
+	DHO_SMTP_SERVER,
+	DHO_POP_SERVER,
+	DHO_NNTP_SERVER,
+	DHO_WWW_SERVER,
+	DHO_FINGER_SERVER,
+	DHO_IRC_SERVER,
+	DHO_STREETTALK_SERVER,
+	DHO_STREETTALK_DA_SERVER,
 
 	/* Presently-undefined options... */
-	62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76,
-	78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92,
-	93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106,
-	107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118,
-	119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130,
+	62, 63, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91,
+	92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105,
+	106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117,
+	118, 119, 120, 122, 123, 124, 125, 126, 127, 128, 129, 130,
 	131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142,
 	143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
 	155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166,
From ed at FreeBSD.org  Sun Oct 26 21:55:20 2008
From: ed at FreeBSD.org (Ed Schouten)
Date: Sun Oct 26 21:55:30 2008
Subject: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil
Message-ID: <200810262155.m9QLtJG5096815@svn.freebsd.org>

Author: ed
Date: Sun Oct 26 21:55:19 2008
New Revision: 184300
URL: http://svn.freebsd.org/changeset/base/184300

Log:
  MFC r183565:
  
    Small cleanups to openpty().
  
    - Pass O_NOCTTY to posix_openpt(2). This makes the implementation work
      consistently on implementations that make the PTY the controlling TTY
      by default.
  
    - Call unlockpt() before opening the slave device. POSIX mentions that
      de slave device should only be opened after grantpt() and unlockpt()
      have been called.
  
    - Replace some redundant code by a label.
  
  As a safety net, add a call to revoke() to unlockpt(). All applications
  out there use openpty(), explicitly call revoke() or implement their own
  PTY allocation routines. Adding the call to unlockpt() won't hurt, but
  will prevent foot-shooting.
  
  Reviewed by:	jhb, kib
  Approved by:	re

Modified:
  stable/7/lib/libc/stdlib/grantpt.3
  stable/7/lib/libc/stdlib/grantpt.c
  stable/7/lib/libutil/pty.c

Modified: stable/7/lib/libc/stdlib/grantpt.3
==============================================================================
--- stable/7/lib/libc/stdlib/grantpt.3	Sun Oct 26 19:37:38 2008	(r184299)
+++ stable/7/lib/libc/stdlib/grantpt.3	Sun Oct 26 21:55:19 2008	(r184300)
@@ -212,11 +212,6 @@ and
 functions appeared in
 .Fx 5.0 .
 .Sh NOTES
-The purpose of the
-.Fn unlockpt
-function has no meaning in
-.Fx .
-.Pp
 The flag
 .Dv O_NOCTTY
 is included for compatibility; in

Modified: stable/7/lib/libc/stdlib/grantpt.c
==============================================================================
--- stable/7/lib/libc/stdlib/grantpt.c	Sun Oct 26 19:37:38 2008	(r184299)
+++ stable/7/lib/libc/stdlib/grantpt.c	Sun Oct 26 21:55:19 2008	(r184300)
@@ -281,14 +281,20 @@ invalid:
 int
 unlockpt(int fildes)
 {
+	const char *slave;
 
 	/*
-	 * Unlocking a master/slave pseudo-terminal pair has no meaning in a
-	 * non-streams PTY environment.  However, we do ensure fildes is a
-	 * valid master pseudo-terminal device.
+	 * Even though unlocking a PTY has no meaning in a non-streams
+	 * PTY environment, make this function call revoke() to ensure
+	 * the PTY slave device is not being evesdropped.
 	 */
-	if (ptsname(fildes) == NULL)
+	if ((slave = ptsname(fildes)) == NULL)
 		return (-1);
 
+	if (revoke(slave) == -1) {
+		errno = EINVAL;
+		return (-1);
+	}
+
 	return (0);
 }

Modified: stable/7/lib/libutil/pty.c
==============================================================================
--- stable/7/lib/libutil/pty.c	Sun Oct 26 19:37:38 2008	(r184299)
+++ stable/7/lib/libutil/pty.c	Sun Oct 26 21:55:19 2008	(r184300)
@@ -56,37 +56,26 @@ openpty(int *amaster, int *aslave, char 
 	const char *slavename;
 	int master, slave;
 
-	master = posix_openpt(O_RDWR);
+	master = posix_openpt(O_RDWR|O_NOCTTY);
 	if (master == -1)
 		return (-1);
 
-	if (grantpt(master) == -1) {
-		close(master);
-		return (-1);
-	}
+	if (grantpt(master) == -1)
+		goto bad;
+
+	if (unlockpt(master) == -1)
+		goto bad;
 
 	slavename = ptsname(master);
-	if (slavename == NULL) {
-		close(master);
-		return (-1);
-	}
+	if (slavename == NULL)
+		goto bad;
 
-	if (revoke(slavename) == -1) {
-		close(master);
-		return (-1);
-	}
+	if (revoke(slavename) == -1)
+		goto bad;
 
 	slave = open(slavename, O_RDWR);
-	if (slave == -1) {
-		close(master);
-		return (-1);
-	}
-
-	if (unlockpt(master) == -1) {
-		close(master);
-		close(slave);
-		return (-1);
-	}
+	if (slave == -1)
+		goto bad;
 
 	*amaster = master;
 	*aslave = slave;
@@ -99,6 +88,9 @@ openpty(int *amaster, int *aslave, char 
 		ioctl(slave, TIOCSWINSZ, (char *)winp);
 
 	return (0);
+
+bad:	close(master);
+	return (-1);
 }
 
 int
From ed at FreeBSD.org  Sun Oct 26 22:11:02 2008
From: ed at FreeBSD.org (Ed Schouten)
Date: Sun Oct 26 22:11:07 2008
Subject: svn commit: r184305 - stable/7/lib/libutil
Message-ID: <200810262211.m9QMB1LJ097919@svn.freebsd.org>

Author: ed
Date: Sun Oct 26 22:11:01 2008
New Revision: 184305
URL: http://svn.freebsd.org/changeset/base/184305

Log:
  Add mergeinfo for r184300.
  
  Approved by:	re

Modified:
  stable/7/lib/libutil/   (props changed)
From marck at FreeBSD.org  Sun Oct 26 22:56:18 2008
From: marck at FreeBSD.org (Dmitry Morozovsky)
Date: Sun Oct 26 22:56:24 2008
Subject: svn commit: r184311 - stable/7/release/doc/en_US.ISO8859-1/hardware
Message-ID: <200810262256.m9QMuHa2000627@svn.freebsd.org>

Author: marck (doc committer)
Date: Sun Oct 26 22:56:17 2008
New Revision: 184311
URL: http://svn.freebsd.org/changeset/base/184311

Log:
  MFH: r184200
  
  	Correct a typo in Nocona core name
  
  Approved by:	re (hrs, kib)

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

Modified: stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml
==============================================================================
--- stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml	Sun Oct 26 22:53:59 2008	(r184310)
+++ stable/7/release/doc/en_US.ISO8859-1/hardware/article.sgml	Sun Oct 26 22:56:17 2008	(r184311)
@@ -91,7 +91,7 @@
     
 
     
-      &intel; 64-bit &xeon; (Nacona).
+      &intel; 64-bit &xeon; (Nocona).
 	This processor is fabricated on 90nm process technology, and operates
 	with 2.80 to 3.60 GHz (FSB 800MHz) and &intel; E7520/E7525/E7320 chipsets.
     
From kib at FreeBSD.org  Mon Oct 27 13:56:28 2008
From: kib at FreeBSD.org (Konstantin Belousov)
Date: Mon Oct 27 13:56:34 2008
Subject: svn commit: r184335 - in stable/7/sys: . kern
Message-ID: <200810271356.m9RDuRjt041126@svn.freebsd.org>

Author: kib
Date: Mon Oct 27 13:56:27 2008
New Revision: 184335
URL: http://svn.freebsd.org/changeset/base/184335

Log:
  MFC r175105 (by peter):
  Fall back to the binary-specified interpreter (ld-elf.so.1) if the
  ABI override binary isn't found.
  
  MFC r183694:
  If the ABI-overriden interpreter was not loaded, do not set have_interp
  to TRUE.
  
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/imgact_elf.c

Modified: stable/7/sys/kern/imgact_elf.c
==============================================================================
--- stable/7/sys/kern/imgact_elf.c	Mon Oct 27 13:54:54 2008	(r184334)
+++ stable/7/sys/kern/imgact_elf.c	Mon Oct 27 13:56:27 2008	(r184335)
@@ -612,7 +612,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 	u_long seg_size, seg_addr;
 	u_long addr, entry = 0, proghdr = 0;
 	int error = 0, i;
-	const char *interp = NULL;
+	const char *interp = NULL, *newinterp = NULL;
 	Elf_Brandinfo *brand_info;
 	const Elf_Note *note, *note_end;
 	char *path;
@@ -665,7 +665,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 		return (ENOEXEC);
 	sv = brand_info->sysvec;
 	if (interp != NULL && brand_info->interp_newpath != NULL)
-		interp = brand_info->interp_newpath;
+		newinterp = brand_info->interp_newpath;
 
 	/*
 	 * Avoid a possible deadlock if the current address space is destroyed
@@ -802,6 +802,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 	imgp->entry_addr = entry;
 
 	if (interp != NULL) {
+		int have_interp = FALSE;
 		VOP_UNLOCK(imgp->vp, 0, td);
 		if (brand_info->emul_path != NULL &&
 		    brand_info->emul_path[0] != '\0') {
@@ -812,9 +813,15 @@ __CONCAT(exec_, __elfN(imgact))(struct i
 			    &imgp->entry_addr, sv->sv_pagesize);
 			free(path, M_TEMP);
 			if (error == 0)
-				interp = NULL;
+				have_interp = TRUE;
 		}
-		if (interp != NULL) {
+		if (!have_interp && newinterp != NULL) {
+			error = __elfN(load_file)(imgp->proc, newinterp, &addr,
+			    &imgp->entry_addr, sv->sv_pagesize);
+			if (error == 0)
+				have_interp = TRUE;
+		}
+		if (!have_interp) {
 			error = __elfN(load_file)(imgp->proc, interp, &addr,
 			    &imgp->entry_addr, sv->sv_pagesize);
 		}
From gallatin at FreeBSD.org  Mon Oct 27 14:22:35 2008
From: gallatin at FreeBSD.org (Andrew Gallatin)
Date: Mon Oct 27 14:22:43 2008
Subject: svn commit: r184337 - in stable/7/sys: . dev/mxge
Message-ID: <200810271422.m9REMYR7041724@svn.freebsd.org>

Author: gallatin
Date: Mon Oct 27 14:22:34 2008
New Revision: 184337
URL: http://svn.freebsd.org/changeset/base/184337

Log:
  Merge r184211 (mxge firmware update) into stable/7
  
  Approved by:	re (kensmith)
  Sponsored by:	Myricom Inc

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/mxge/eth_z8e.h
  stable/7/sys/dev/mxge/ethp_z8e.h
  stable/7/sys/dev/mxge/rss_eth_z8e.h
  stable/7/sys/dev/mxge/rss_ethp_z8e.h

Modified: stable/7/sys/dev/mxge/eth_z8e.h
==============================================================================
--- stable/7/sys/dev/mxge/eth_z8e.h	Mon Oct 27 14:01:23 2008	(r184336)
+++ stable/7/sys/dev/mxge/eth_z8e.h	Mon Oct 27 14:22:34 2008	(r184337)
@@ -28,7045 +28,7074 @@ POSSIBILITY OF SUCH DAMAGE.
 $FreeBSD$
 ***************************************************************************/
 
-static unsigned int eth_z8e_uncompressed_length = 369236;
-static unsigned int eth_z8e_length = 112602;
-static char eth_z8e[112602] = 
-	"\x78\x9c\xec\xbd\x7f\x7c\x94\xc5\xb5\x3f\x7e\x76\xb3\xc0\x26\x0d"
-	"\x6c\xb4\x11\xb7\x88\xba\x28\xb6\xab\x82\x44\x8b\x35\x5a\xd4\x54"
-	"\xb0\xc5\xfb\x42\x08\x12\x35\xca\x8f\x84\x0a\xde\xa0\x08\x01\x02"
-	"\x2c\x18\xb2\x61\xc1\xdb\x84\xf2\x23\x2a\x6a\xd4\x40\x62\x4b\x6f"
-	"\xb1\x62\x4d\x5b\xda\x4b\x11\x75\x95\xf4\x96\x62\x92\x05\x4b\x7b"
-	"\x73\xef\x97\x5e\x57\x3e\x48\x73\xf9\x04\xdd\x92\x85\xac\xc9\xee"
-	"\xce\xf7\x7d\x66\x9e\x67\xf3\xec\xe6\xd9\x20\xf7\xde\xd7\xf7\xfb"
-	"\x4f\xf3\xe2\xe1\xd9\x99\x39\x73\xe6\x9c\x33\x67\xce\x9c\xf9\xf1"
-	"\xcc\x10\xfd\x0f\xfe\xac\x1f\x15\xff\x4f\xb2\xff\xfd\xef\xef\x7f"
-	"\x7f\xff\xfb\xfb\xdf\xdf\xff\xfe\xfe\xf7\xf7\xbf\xff\x7f\xfe\xce"
-	"\x5a\x6d\xf4\x41\x1d\x51\x8f\xcf\xee\x0c\x5a\xf2\xe8\xa5\xe7\x45"
-	"\x14\xd1\x96\x20\xd9\x9d\xfc\xd6\x1e\x7a\x0e\xf1\xd6\x3a\xb2\x5f"
-	"\x93\x43\xd9\x93\x77\x10\x6d\x1f\x29\xba\x9e\x7f\x51\x84\x36\xbc"
-	"\x28\xba\xa6\xfc\x84\xa8\x65\x2c\xd1\xf3\x23\x45\x18\x78\xe6\x04"
-	"\x69\x43\x11\xe3\xd9\x80\x30\xa7\x6f\x1c\x29\x42\x88\xaf\x40\x7c"
-	"\x2b\xc7\xaf\x1f\x09\x5c\xb9\x44\xbe\x17\x45\xc4\x80\xd7\xce\xf9"
-	"\x19\xe7\x94\x31\x92\x9e\x5d\x29\x78\x18\xc7\xbe\x20\x6d\x9c\x32"
-	"\x08\x8e\x6c\xce\x2f\x69\x43\x9e\x6e\x1f\x39\xc3\x56\xb2\x84\x7d"
-	"\xfe\xcb\x90\x37\x0c\x9e\xdc\x9c\x77\x1b\xd2\x85\x8f\x32\x18\x6f"
-	"\x20\x12\xa5\x96\x4a\x22\xc0\x92\xab\x8a\x2c\xa7\x28\xf3\x4e\xc0"
-	"\x5b\x36\xa8\xfc\x2e\xc4\x59\x65\x1c\xf0\x70\x1c\xa7\x21\x7e\x2c"
-	"\x87\x7b\x7c\x99\x53\x13\x38\x59\x16\x9c\x6e\xf5\x5b\x91\x6e\x41"
-	"\x3e\x1b\xf2\xad\x6c\x69\x22\x52\xb8\x72\x32\x83\x94\xd9\xa0\xe5"
-	"\xab\x46\xbe\x6a\xce\x77\x10\xe9\x93\x1b\x14\x8f\xb3\x1a\xc8\xca"
-	"\xe9\x2c\x5f\x94\x63\x05\xdc\x6e\x1d\xbf\xc2\x61\xbd\x4f\xe3\xe7"
-	"\x2b\x48\x6b\x49\x4e\xb3\x3d\xa7\xa5\x65\x23\x2d\x98\x9c\x06\x7c"
-	"\x2a\xed\x12\xa4\x45\xd3\xa4\x5d\xda\xe3\xcb\x72\x26\xa7\xbd\x9b"
-	"\xa7\xa5\x5d\x8e\xb4\x89\xc9\x69\x16\x3d\x9f\x13\x69\x85\x7a\x9a"
-	"\xb1\x5e\x8c\x7a\xb3\xc2\x29\xe2\xde\xaf\x91\x4d\x6c\xda\xdf\x14"
-	"\xf7\x09\x0a\x78\x22\xe4\x1a\x45\xde\x13\x94\xd5\x0c\x3c\xb4\x75"
-	"\x2d\xd9\xbd\xe5\x22\x12\xf0\x74\x51\x7b\xa8\x8b\xbc\x21\xd1\x19"
-	"\x88\x9e\xa3\xaa\x73\x64\x0f\x44\xcf\x50\xd5\x32\x72\xb6\x54\x7e"
-	"\x4a\x66\xf5\x1e\xb7\x0a\xf2\x8e\xe6\xbc\x27\xa9\xbd\xe1\x24\x79"
-	"\x1b\x92\xf3\x7a\xaf\x24\x67\x1b\xc2\xa8\x73\x47\x45\xbd\x88\xb7"
-	"\xb8\xa2\x14\xcd\xda\xdf\x54\xf9\x13\xb2\x79\xc7\x90\xb5\x6d\x81"
-	"\x9f\x5c\x5f\x67\x5a\xbe\xe2\x61\x5a\x36\x3e\x41\xf6\x1f\x3f\xee"
-	"\xb7\x8a\x4d\x1f\x34\xfd\xbc\x37\x62\xdd\x70\x9a\x6c\x07\x9d\x53"
-	"\xe8\xa0\xf3\x38\x05\xea\xef\xa4\x40\x38\x4a\x5b\x9f\xa0\xec\x83"
-	"\xe1\x49\x14\xd8\x18\x27\xc6\x17\x58\x3c\x09\xef\x73\x80\xe9\x22"
-	"\xd7\x72\xa2\x53\xf4\x95\xb2\xed\xc0\x13\x54\x38\x51\xe7\x5f\xa9"
-	"\x78\xbf\x9c\x64\xfb\xe2\x70\x1a\xfd\xcd\x79\x9e\x75\xd3\x2a\x75"
-	"\xa6\xab\x71\xa4\xe8\xbc\x76\x3b\xe5\x02\x3e\x07\xf9\xf7\x06\xad"
-	"\xbf\x2a\xd4\xf4\xb7\x73\xc2\x76\xca\xd9\x5b\x15\xb2\x41\xef\xba"
-	"\x1c\x1e\xe8\xdb\x5a\x1a\xe2\x88\x92\x05\x3c\xbc\xdc\x88\xb8\x6b"
-	"\x73\x65\x9e\xce\x20\x35\x6f\xe7\x3c\xe2\xf2\xd9\x7f\x8b\x5f\x3e"
-	"\x3b\x14\x7f\x69\xf6\x59\xf1\xd2\xec\xee\xd8\x4b\xb3\xc3\xde\x35"
-	"\x64\x8f\x5d\x3e\xfb\x5c\x7b\xb9\x94\x55\x4e\x7b\x39\x64\x15\x23"
-	"\xfb\xba\x33\x94\x33\x6f\x19\xea\x28\xfa\x17\x5a\xb7\x88\x9c\xf1"
-	"\xcc\xf7\x8b\x03\xd1\x3f\xd1\xbc\x4a\x12\xf8\x5d\x66\x46\x7b\x77"
-	"\xd6\x07\x41\xa5\x4b\x76\xb4\xdd\xec\x52\xd0\x5a\xce\xe5\x76\x67"
-	"\x1d\xd6\xe2\x99\x9e\x6c\x8f\x1e\x2f\xb2\x3e\xe0\x36\xe8\x1d\xb1"
-	"\xde\x42\x3b\x7b\x89\x26\xc4\xc9\x72\x9a\xb2\x37\x82\x97\x1c\x23"
-	"\xfe\x07\xee\x7d\xe8\x4e\xca\xbb\x7d\x7c\xde\x37\x6f\xcb\xff\x26"
-	"\xdd\xff\x9d\xc9\x77\x52\xe1\xc3\x0f\xe0\xbf\xe9\x77\x52\xf1\x77"
-	"\xef\xc3\x8f\xc9\x77\xde\x9c\xf7\xbd\xf1\x85\x93\xef\xbb\x77\x7c"
-	"\x3e\xcd\x2c\xba\x25\xef\x96\x5b\xe8\x3b\xf7\x4e\xbb\x39\x2f\x4f"
-	"\x7b\xdf\x9c\xc7\x40\x8f\xe6\xdf\x3b\x6b\x7c\xe1\xf2\xa5\x15\x4b"
-	"\xc7\x4f\xbf\x6f\x32\x8d\xc7\xbf\xfb\x68\xfc\xcc\x42\x3c\x34\xfe"
-	"\x01\x1a\x7f\xcb\x2c\xa3\x8d\xcb\x15\xab\xe2\x04\xf9\x87\x45\xdf"
-	"\x54\xe2\xfa\xf0\x57\x9d\x45\x9d\x0e\xff\x09\xe2\x42\x4a\xff\xb3"
-	"\x9b\xc0\x93\xad\xc7\x37\x7c\x1a\x78\x6a\x66\x9e\x5c\xd7\x70\xbd"
-	"\x8f\x70\x72\x9b\x46\xbd\x84\x99\xe7\x8c\x4a\x09\x53\xae\xd7\x9d"
-	"\xc8\xda\x7f\x28\xfc\x74\x99\xb4\x3d\x88\xaf\x09\x5a\xf7\x7a\x34"
-	"\xfb\x11\x6e\xa9\x2c\x20\xf1\xe3\xa9\x16\x9b\x4b\xda\x0f\x2e\x6f"
-	"\xe2\x76\xa6\xc1\x7e\x38\x84\xfa\xe5\xf0\x11\xbc\x33\x44\xcd\xe1"
-	"\xb0\x96\x7e\x54\x86\xad\x78\x32\x25\x4c\xc6\x29\xca\x39\xc4\x36"
-	"\xbb\x1f\x26\xe7\x10\x68\xfd\x09\xca\x0b\x81\xf6\x93\x28\x33\x8a"
-	"\x32\x9b\x35\x3d\x3a\xa9\xd1\x7c\x89\xcc\x63\x25\x6b\x10\xf0\xc0"
-	"\x15\xd6\x78\xfc\xb9\xe2\x71\x44\x5e\x0a\x8f\xc5\x48\xfb\x15\xd3"
-	"\xac\xf8\x1b\x81\xf6\xff\x95\x8d\x9c\x1e\xa4\xe1\x1e\xc6\xa5\x6c"
-	"\xa1\x4c\x5b\x9c\x92\xb7\x5e\xca\x47\xa5\x67\x65\x78\x24\x4c\x9d"
-	"\x2e\x1f\xce\x1f\xce\xec\xd0\x6c\x66\xf6\x3e\xc0\x64\x20\xbd\x39"
-	"\x05\x47\x2b\xd2\x0e\x70\xf9\xd0\xf9\x0c\xce\xd3\x98\xb0\xbf\x12"
-	"\x5f\x30\x19\xde\x51\x0e\xf8\xf7\xb7\x29\x9c\x01\xe8\x98\x0d\xb2"
-	"\xe8\x3a\xe8\xe1\x7e\xc6\x91\xad\xcb\x43\x83\x75\x41\x2f\xad\x8c"
-	"\x53\xd4\x4a\x39\x74\x21\xcf\x9f\x01\x37\x31\x05\x6e\x2a\xcb\x5d"
-	"\xc2\x65\x26\xe0\xfe\x13\x70\x73\x52\xe0\x0a\x00\x87\xfe\xd4\xe1"
-	"\x04\x5e\x9b\x46\xe3\x70\xc0\x6d\x4c\xa6\x31\x67\x17\xf2\x9f\xda"
-	"\xa6\x74\x6e\x04\x68\x1c\x81\xfa\x1b\x8f\xfc\xbf\x66\x3b\xa0\xf1"
-	"\xea\x00\x9f\x9d\xc0\xd1\x09\xd8\x08\xf0\xa0\x8f\x70\xb4\xa6\xf0"
-	"\x1a\x54\xe5\x49\xba\x42\x1a\x6c\x9f\x06\x1b\x49\x29\x33\x9b\x69"
-	"\xd2\x78\xd5\x61\xe3\x4a\xe6\x39\x63\x53\xf0\xfe\x3b\xf0\x0e\x51"
-	"\x30\xc3\xad\x0a\x5f\xce\xd4\x14\x7c\x43\x58\x76\x1a\xcc\x10\x0d"
-	"\x66\xb1\x09\x9e\x0c\x0d\xc6\xae\x95\x55\x67\x82\x67\x18\xd3\x15"
-	"\x52\x3c\xa0\xad\xe4\xec\x4d\x96\x2b\x68\xb6\xd2\x50\x9d\x4f\x33"
-	"\x9b\xd4\x67\xcd\x7d\x1f\xfd\xcd\xcf\xfa\xbc\x6e\x12\x35\xfb\xf7"
-	"\x8d\x27\xb2\x8e\xab\xa6\xcc\x40\xf4\x18\xcd\x88\x8a\x18\x9e\xbe"
-	"\xeb\x89\x2e\x09\x44\x5b\xe9\x1b\x44\x63\x02\xd1\xed\xb0\x79\x15"
-	"\x9c\xf6\xde\xb5\x64\xb1\xe0\xed\xbd\x81\xac\x96\x40\x74\x22\xe2"
-	"\x77\xd1\x58\xb2\x59\xbe\xfb\x8c\xe8\x09\x44\xa7\x20\xbc\x98\x4a"
-	"\x62\x94\x33\x6d\x88\xf0\xce\x88\x89\x8f\xbf\x3b\x24\x2e\x02\xd1"
-	"\x16\xc4\x2f\xa0\x19\xb1\x2f\xc4\x8c\x58\x0f\x9e\xcf\xf1\x7c\x8c"
-	"\xe7\x3d\x3c\x5e\x21\x6a\xf7\xef\xeb\x83\x2d\x04\x4d\x87\xfa\x44"
-	"\x19\xda\xf1\x7e\xb4\x4d\x12\xb0\x09\x1d\x81\xe8\x24\xe0\xb3\x12"
-	"\x60\x0e\xf5\xf5\x21\x6d\xd3\xfe\x7f\x93\x30\x59\xfb\xff\x2c\xc3"
-	"\x35\xfb\x3b\x85\x7d\x7f\xc7\xf8\x6a\x1a\xc6\xf4\xc7\xa1\xe7\x81"
-	"\x28\xfa\xa3\xe8\xa7\x34\x63\x4d\x48\x30\x0f\x23\xd6\x0b\xfc\x7e"
-	"\x4f\x8c\x08\x93\x63\xc6\x1a\xaf\x28\x89\x92\x5d\x64\x32\xee\x2e"
-	"\xc6\xdb\x09\x5c\x9f\x2a\x5c\x6f\xdb\x01\x1b\x62\x38\xc6\xa5\xe3"
-	"\x61\x1c\x0c\x3b\x23\x46\x0e\x51\xfb\xb6\xbd\xaf\x76\x7f\xa4\xaf"
-	"\xf6\x6d\x27\x9e\xa9\x22\xeb\xed\x47\xfb\x9e\x66\x39\xbe\x5d\x86"
-	"\xdf\x9e\x08\x7c\x1c\x29\xc7\x18\x0d\x03\x6c\x59\x8f\x8f\xa6\xf4"
-	"\x48\xba\xdf\xae\x97\x74\x6f\x7a\xfb\xa5\x88\xa4\xff\xed\x17\x15"
-	"\x3f\x6f\xbf\xc0\xf1\x61\x1f\x0d\xc1\xef\x7d\x61\x95\xf6\x2f\xc8"
-	"\x57\xd4\xa3\x68\xda\x27\xec\x6f\x1f\x8a\xc3\x2f\x83\x3c\xab\x59"
-	"\x96\x90\x6f\x35\xfb\x03\x2c\x53\x94\xb1\x4f\x64\xbe\x7d\x08\xb4"
-	"\x74\x20\xff\xe9\x3e\x01\x5a\xb2\xde\x8e\x44\x14\xee\x1e\xe0\x99"
-	"\xd3\xc3\x38\xed\x6f\x47\x44\xcd\x01\xfb\x17\x3e\x17\x64\x21\x22"
-	"\x33\xa2\xeb\xa3\x25\x6b\x28\xc3\x4d\xd5\xa0\x77\x07\xfc\x8e\xc5"
-	"\xc0\xb7\x91\xd3\x3e\x9e\xb1\x86\xbe\x8a\xb2\xde\x03\xde\x08\x97"
-	"\x27\x6a\x0f\xd8\x45\xd6\x81\x21\xc0\xb5\x80\x69\xea\xf5\x51\x0e"
-	"\xc2\xce\x5e\x49\xdf\x81\xfc\x78\xcd\x81\xe2\xb8\xfd\xc0\x54\xa3"
-	"\xfe\x28\x99\xb1\xde\xbc\xc9\x71\x39\xba\xae\xc4\x6a\x0e\xb8\x6f"
-	"\x24\xca\x99\x1e\x16\x51\xd6\x97\x09\x54\x6e\x69\x0f\xb7\x52\x49"
-	"\xd4\x4e\xed\xe5\x7b\xe9\x06\x62\xdf\x24\x4c\xed\xe1\xed\x08\x6f"
-	"\xc1\xbb\x82\xda\xba\x76\x11\xd3\x38\xbd\x3c\xbc\x3e\x66\x3f\xb0"
-	"\xbb\xad\xeb\x7e\x42\xfe\xf7\x40\x63\x7c\x5e\xb9\xad\xba\xbd\x3c"
-	"\xcc\x61\x6f\x5b\x17\x74\x34\x26\x62\xd1\x9a\x03\xce\xa8\xfd\xc0"
-	"\xbe\xe9\xe7\x44\xe8\xfe\xae\xea\x21\x88\xeb\x73\x58\x44\xd4\xe1"
-	"\xf1\x8a\xb6\xae\x8d\x34\xef\x1c\x59\xda\xca\xf6\x4a\x5d\x9d\x57"
-	"\x5e\x4e\x32\xff\xb9\xa8\x63\x6e\x57\x35\xcd\x2d\xa3\x11\x80\xff"
-	"\x9c\x75\x57\x8c\xa8\xa6\xd6\x93\x0b\xe8\xfe\x33\xd1\x8c\xe9\xe7"
-	"\xfa\x44\x6b\xe9\x76\x6a\x2b\xdb\xce\xf2\xc8\x67\xdf\xe0\xfe\x33"
-	"\xdd\x62\xfa\xb9\x1e\xd1\x56\xf6\x26\xb5\x96\xee\xa5\x69\x9f\xfa"
-	"\x1d\xb1\xda\x03\xee\x78\xe6\x81\xa9\xf1\xda\x03\xc5\xd1\xda\x03"
-	"\xce\x58\xe6\x81\xdd\xd1\xcc\x03\xfb\xc4\xa6\x77\xdc\x90\x5f\xa6"
-	"\xac\x8b\xac\x77\xbe\x8e\xdf\x2e\x59\xbf\xf6\x77\xf2\x45\xcd\x3b"
-	"\xc5\x7d\xb5\xef\x4c\x0d\x78\x26\x91\xc8\x7c\x27\x9f\x75\x5e\xd4"
-	"\xbe\x53\x0c\xb8\x62\xa5\x23\xef\x94\xb1\x8e\x00\xc6\x83\xa7\x06"
-	"\x4f\x3d\xe2\x3a\x81\xe3\x12\x0d\xdf\x5f\x19\x2e\x6e\x7f\xa7\x33"
-	"\x5e\xf3\x4e\x44\xd8\xdf\xb5\xb3\xbd\x99\xbe\x2c\x02\xf9\x41\x76"
-	"\x1e\xc8\x1d\x76\x23\xe0\x89\x21\x1c\xa3\x79\xcb\xc8\x1b\xf0\x1c"
-	"\xc7\xef\xe3\x24\xde\xad\xa3\xe9\xcb\xde\x13\x9c\x36\x7d\x99\x57"
-	"\x40\x36\x8e\x78\x26\xf0\xd4\x02\x4f\x26\xf0\x6c\x7a\xf7\x67\x11"
-	"\xd6\xa9\x9a\x77\x77\xdf\xff\x8c\x08\x09\xfb\x7b\xf6\xf8\x50\x92"
-	"\x6d\x23\xfe\xae\x10\xaa\x7d\x74\x41\x27\x47\x55\x97\x78\xa8\x49"
-	"\xd4\xbe\xbb\x5b\x64\xbe\x87\x7c\xef\xff\x83\xec\x7f\xa5\x8d\x79"
-	"\x7f\x6a\x5f\xed\xfb\x65\x78\x8a\xfb\xdb\x14\xb7\xbd\xf7\xa7\xa6"
-	"\xfa\xc5\x44\x36\x3c\x43\xec\x44\x43\xf1\x0c\xb3\xeb\x36\xab\xc7"
-	"\x77\x59\x43\x90\xfe\xd8\xc0\x76\x0e\xbf\xe1\xff\x1f\x2b\xd7\x7e"
-	"\xef\x0d\xd2\xfe\x43\xd2\x87\x80\x2d\x2b\xaf\xa2\xcb\x4e\xd3\xc8"
-	"\x32\xf0\x4b\xf8\x9d\x8d\xdf\x8b\x67\x5c\xff\x9e\x88\x6f\xb6\x1e"
-	"\x42\x9d\xf6\xb0\xad\x11\xbe\x89\xe8\xdf\xa8\xa0\xa7\xa7\xcc\x2e"
-	"\x7a\xdc\xd9\x22\xab\xf5\x26\xd1\xe7\x64\x1f\xcf\x81\xf0\x08\xc8"
-	"\x6e\x2c\xde\x97\xee\x38\x4f\xb9\x78\x9c\x3b\x7c\xf1\x6a\xee\xbb"
-	"\xf1\x3b\x4f\xac\x76\x66\x6d\x5d\x45\xe3\x1c\x61\xb2\x37\xfa\xe2"
-	"\xc5\x8e\xf5\x39\x84\xfe\x27\x97\x7f\x0b\xdf\xbb\x5d\x8d\xe7\xc9"
-	"\xc6\x7e\x67\x7c\x38\xca\xf3\x38\x84\x58\xe1\xa6\xc6\xe5\xc4\xf5"
-	"\xe1\x6c\xf4\x89\xe6\x58\x8f\xdb\xca\x74\xea\xb4\x30\x6d\xa0\xf3"
-	"\x4a\xd0\x59\xf9\xe0\x9a\x02\xfa\x1d\xfa\x5e\x33\x9b\xdd\xe3\x1b"
-	"\x99\xe0\x3f\x4d\xfa\x01\x5d\x26\x69\xd2\x8f\xeb\x72\x4a\xe3\x63"
-	"\xe7\x72\x5b\x8e\x9d\x17\xa1\x6d\x4b\x88\x65\xe1\xf4\x46\xc5\xff"
-	"\x81\x3d\xad\xae\x8a\xd1\x95\x33\xd6\x5c\x2d\x02\x21\xe1\x0f\x78"
-	"\xce\xc8\xf1\x6c\x23\x60\xaa\xa2\x22\xae\x8f\x2b\xb7\xa3\xff\x8d"
-	"\xd7\xb6\xe6\x88\xda\xd6\xec\xee\x55\x22\xba\x53\xfa\x54\x97\xc3"
-	"\xff\xc9\x3b\xa6\xea\xe6\x40\xfe\x56\xc4\x75\xdb\x5b\xb3\x81\xfb"
-	"\x12\xc6\xdd\x5e\x2e\xfc\xf1\xcc\xd6\x5c\xc0\x79\x82\xf4\xf1\x21"
-	"\xe3\x98\x16\x63\xe3\xae\x8d\xc0\x89\xb4\xed\x41\x1a\x3d\x60\x6c"
-	"\xab\x46\xdf\x84\x7a\x71\xf5\x0f\xda\x2d\x9a\xfa\xe8\x7f\x39\x78"
-	"\x0a\xcc\x93\x75\xbe\x41\xd7\xbe\x6e\xf8\xb1\xde\x75\x34\x1a\xf5"
-	"\x70\xc5\x69\x72\x66\x7a\x3d\xe2\x94\xf0\x5d\xde\xf4\xe3\xb5\x11"
-	"\xf4\xd3\xce\xdc\x20\xfd\xb4\x2c\x9d\xdc\x04\xdb\xbe\xf3\xf0\x43"
-	"\x56\x25\x64\xf6\xc9\x8c\x35\x71\xc1\xbf\xb9\x4d\x35\x22\x9e\xe5"
-	"\x01\x3c\x73\x74\x59\xa4\x91\xbf\x4d\xd4\xb4\xba\x94\x6f\xea\x3c"
-	"\x20\x30\x16\xf4\x5f\x15\xe5\xdf\xef\x28\xbf\xf5\x9d\xa9\xdd\xb0"
-	"\x15\x3c\x0e\x81\xaf\x13\xc6\xb8\x31\x02\x9c\xcd\x41\x72\xed\xd3"
-	"\xfd\xe4\x40\xf4\x5e\xb6\x1b\x53\xd3\xd7\xaf\x8e\xff\x8a\x3d\x1a"
-	"\xce\x62\x61\xef\x98\x52\xa5\xe8\x8e\x54\x85\x45\x27\xe3\x66\x9f"
-	"\xfe\x24\x60\x76\xa2\x1e\x44\x4d\x47\xfe\x56\x8e\x5b\xd5\xcb\x71"
-	"\x6f\x42\x8f\x85\xa2\xeb\x8a\x37\x21\xb7\xcb\xe1\x97\x85\xfc\x6b"
-	"\x7b\xe9\x54\x25\x65\xf0\xf8\xaa\xc7\xf7\xb5\x29\x41\xba\x53\xfa"
-	"\xee\xe8\xc3\x7f\xd6\x6d\x7d\xf0\x41\xc4\x15\x07\xe9\x2e\xa9\xbb"
-	"\xc8\x73\x19\xc2\x65\x09\x18\xe0\x40\xd8\x63\xc8\xf3\x60\xb7\xf5"
-	"\x86\x9f\x21\x6e\x73\x4a\x9e\x86\x94\x3c\x7b\xf4\x30\xe8\xeb\x72"
-	"\xad\x92\x7c\x3d\x85\xfc\x4d\x78\xaa\xb5\x72\x8f\xa4\xe0\x08\xa6"
-	"\xe0\x08\x0d\xa4\x75\x94\x2d\x39\xcf\xa8\xdc\xe4\x3c\xa3\xc6\x0e"
-	"\xa4\x75\x54\x7e\x4a\x9e\xa9\x29\x79\x8a\xf5\xb0\x36\xb7\x90\x87"
-	"\xb8\xc5\x29\x79\x2a\x53\xf2\x6c\x36\x84\xbf\x8a\x70\x82\x7f\xae"
-	"\x6b\xf8\x03\x82\xc7\x8f\xd0\x5b\xe8\x20\xf7\x19\xec\x0f\x9c\xa3"
-	"\x15\x95\x22\x02\x1d\xc8\x07\x7c\xab\x8e\x5f\xd7\x1d\x09\xaf\xf4"
-	"\xa7\x53\xe9\xcf\xa8\x50\x02\x06\x2e\x56\x8b\x2b\x4c\x90\x65\x27"
-	"\xcf\x03\x05\xc2\xf7\x92\x1a\x5b\x5d\x31\x91\x75\x4a\x2f\xd3\x51"
-	"\xa9\xf4\x86\xc7\xc8\x7a\x99\x41\xe8\x0a\xf7\x57\x06\xfd\x3c\xc9"
-	"\x65\xa9\x32\xae\x28\xd2\xcb\x00\xee\x93\xac\x3f\x72\x5e\x00\xf8"
-	"\xb5\x7c\x53\x95\xdc\xaf\xa8\x4c\x96\xc7\x15\x9b\x93\xe5\x71\x45"
-	"\x83\x51\x86\x6c\x23\x82\x34\xaa\x94\xf5\xd8\xb4\x5d\xda\x0f\xd8"
-	"\xbd\x5f\xd0\x55\xde\xb8\x38\x71\x8a\x46\xdf\x0c\xbd\xcf\xe0\xb7"
-	"\xf4\xa3\x22\xe0\xd7\x7e\xf4\x98\xf4\xa1\x2a\xcf\xa1\xcf\x95\xb0"
-	"\x5f\x05\xec\x49\xc0\x8c\xd1\x60\xc7\xa8\xb9\x2a\xf9\x1e\xc6\x6f"
-	"\xb1\xe9\xc0\x10\xd8\xa2\xfc\x90\x97\xfb\xed\x0e\xd2\xc3\x02\x61"
-	"\xf0\x12\x12\xb5\x47\x8f\x99\xd3\x82\x3e\x53\xd9\xd6\x2e\x94\x73"
-	"\x39\xdb\x08\xc8\xef\x6b\xb0\x33\x9f\x54\xad\xa3\xaf\xb2\x7d\x10"
-	"\x99\xad\xe3\x94\xbc\x47\x6f\x14\xbe\x6a\x0a\xa0\x37\x2c\x5f\x45"
-	"\x57\xc0\x9e\x8e\x3d\x4d\xa3\x5f\x2e\xa9\x74\x81\x56\x8c\x0f\x3f"
-	"\x23\x92\x7d\x47\x66\xab\x9b\xfb\xd1\xc6\xcf\x78\xac\x36\x7a\x9f"
-	"\x6e\x5b\xf0\xbb\x65\x30\x3b\x8f\xba\xab\x51\x73\x77\x57\xde\xcc"
-	"\x75\x74\x82\xae\x1c\xcd\xfc\xaa\x39\xbe\x2b\x87\x8b\xf3\x62\x8e"
-	"\x60\x5f\x1c\xbe\x46\x90\xae\x9c\x8a\x77\x8d\x7c\x7c\x54\xaa\x85"
-	"\x3d\xa0\x31\x2a\xce\xc7\x19\xa6\x06\x71\xb9\xc2\x67\x61\x1b\x77"
-	"\xa0\xc7\x77\x65\x41\x90\xbe\x59\xaf\xc6\xab\x57\x66\x33\xae\x34"
-	"\x34\x78\xfa\xe7\x0e\xae\x7c\xdd\x55\x65\x61\x3a\xd6\x49\x9b\x04"
-	"\x5c\x8d\x56\xd5\xdf\xc2\x97\xa9\xd9\xe9\x8b\x97\xa1\x6f\x2d\x8b"
-	"\x6f\xfa\x53\x8e\xfc\xad\xa5\x31\x1d\xf0\x51\x6a\x4c\xf1\x27\x6c"
-	"\xd4\x55\x0f\x6a\x76\xae\x0c\xbe\x51\x8d\x66\x9f\x3b\xc1\x6b\xe6"
-	"\x09\xba\xaa\x08\x61\xab\xb0\x5e\x19\xf9\x79\x3c\x64\x7d\xbf\x42"
-	"\xef\x22\xae\x2a\x32\x79\xd0\xc9\x5c\x95\x87\x67\x92\x16\x9e\x2a"
-	"\x79\xe8\x5e\x80\xf1\xe4\x55\x45\xf0\x97\x6a\x38\x8c\xdf\x6e\xd1"
-	"\x3d\xd6\xaa\xff\x6e\xfc\x1b\x8f\xb9\xaf\x82\xfe\x5f\x59\x94\xb6"
-	"\x3e\x12\xb4\x5e\x7d\x89\x81\x56\x8f\x81\x56\xfb\x09\xba\x3a\x47"
-	"\xd1\x7a\xd5\xae\x64\x5a\xaf\x46\x0f\x77\xd5\x71\x3c\x61\xfc\xb6"
-	"\xa9\xb0\xf1\xb9\xea\x10\xca\x3f\x06\x1d\x3d\xa2\xea\x84\xe3\x50"
-	"\x06\xcb\xe2\x6f\x64\x8f\xf7\x15\x13\xcf\x03\x72\x3c\xcb\x93\xe3"
-	"\xe3\xf0\x83\x40\x7b\x27\xd2\x73\x58\x57\xb6\xc5\x95\x2e\x98\xfb"
-	"\x14\x57\xe7\x25\x7c\x2f\xf8\x9e\xac\xbf\x5d\xe4\x9a\x04\x1d\x07"
-	"\x1f\x7f\xce\x51\x7d\x8d\xeb\x4e\x0e\xa3\x6d\x7d\x82\xdf\xf9\x6d"
-	"\xd0\xe1\xde\x4d\x87\x83\x7d\x56\x1a\xd6\x6b\xa5\x82\xe8\x56\x6b"
-	"\x57\x34\xeb\x83\xae\x40\xe7\x5e\x6a\x8f\xfe\x92\x5c\x4f\x48\x1c"
-	"\x37\x07\xca\x60\xab\xd6\x88\xd8\x5b\xbd\xbb\x31\x9e\xfb\xdc\x8f"
-	"\xbe\xf9\xea\xd3\xe4\x92\xf4\xff\xf0\x04\x7a\xfd\x79\x12\xb7\xe2"
-	"\x27\xdb\x7a\x68\xeb\xe3\xb0\x2f\xa7\x78\x8e\xc0\x99\xb5\xa5\x97"
-	"\xc6\xbd\xb2\x96\xf2\x1a\x7a\x69\xec\xce\x5e\x72\x8b\xbf\xba\xad"
-	"\x0d\xf0\xcf\xe6\x9d\xcb\x21\xe8\x50\xf1\x88\x72\xb2\xef\x5c\x0b"
-	"\x3f\x2d\x4a\x96\xd8\x16\xf8\x69\x51\xf8\x69\x9f\xbb\xb9\x2d\x25"
-	"\xfc\xb4\xbe\x3e\xf6\xd3\x5a\xeb\x18\x06\x6d\xb0\x6e\x78\x19\x59"
-	"\xb2\x4b\x29\x07\xf4\x79\x3f\xa3\xab\x97\x65\x9f\x84\x8f\x08\x9e"
-	"\x83\x1a\xbf\x90\xe1\x46\x47\x19\x0d\x93\xbc\xa2\x7d\x8b\xda\x3f"
-	"\xe7\xa4\x9b\xcf\x67\x5b\xeb\x47\x95\x71\x3b\x03\x0f\xb5\x3c\x27"
-	"\xb9\x77\x54\xc4\xb6\xa2\x41\x44\x38\xbe\x62\x8c\x88\x20\xbe\x9c"
-	"\xcb\x6e\x46\x7c\x8f\xcf\x55\x1f\xb4\x36\x57\x98\xcd\x23\xa7\xf3"
-	"\x97\xd9\x9f\x90\x73\xfd\xb2\xef\x70\x75\xa4\xf4\x3f\xb0\x19\xae"
-	"\x2e\xdd\xde\x56\x8c\x21\x67\x85\x4b\x74\x0e\x32\xf7\x1a\xd6\xfd"
-	"\xbc\x83\xa3\x39\xef\x18\x77\xc2\xef\x50\x6b\x06\xa4\x7c\x86\x31"
-	"\xb2\x0d\xb3\x4f\xc0\x7d\x0c\xfb\xc1\x3c\x2f\xa8\xe6\x93\xc6\xcc"
-	"\x31\xf8\x2a\xdc\xc7\x84\xf7\xae\x8d\xd8\x38\x3f\xf3\xa9\xe5\x9f"
-	"\x94\xce\x9e\xf3\x1a\x06\x7c\x11\x77\x7b\x03\x51\x3b\x5a\x63\x5b"
-	"\x43\x01\xfc\xa3\x5e\xe9\x8b\x9e\xa0\x31\x2d\xd2\x9e\x2c\xe9\x25"
-	"\xfe\x1d\xa8\xbc\x83\x02\x80\x51\xf6\x74\x4c\xb4\xc5\xa3\xe6\x1d"
-	"\x5b\xca\xcf\xf2\x7a\x86\xf0\x2f\x67\xbb\x73\xcd\xf5\x07\x2b\x43"
-	"\x4c\x57\x58\x9f\x7b\x0d\xd2\x35\x6e\x2e\xbf\xbb\xa6\xc3\xb5\x53"
-	"\xcd\x0b\x76\x1d\x0c\xe7\x03\xe6\x1a\x67\x90\xc6\x90\xce\x2f\xfc"
-	"\x58\xf4\x3d\x63\x8e\x0c\x42\x6b\x8e\xea\xb3\xae\x29\x4c\xf6\x2f"
-	"\x86\xa0\x9f\xbb\x66\x41\x72\x3f\x77\x4d\x45\x72\x3f\x77\xcd\xc6"
-	"\x64\xff\xc2\x0a\xff\xe2\x9a\xfa\x94\x3c\xbb\x53\xf2\xec\x33\xe4"
-	"\xa9\xd3\xca\x69\x4d\xc9\x73\x3c\x25\x4f\x97\x21\xcc\x3c\x46\xf5"
-	"\xfa\xe9\x96\xf3\xf2\xd7\x66\x1b\xc2\xd6\xed\x72\xad\xea\x5a\x97"
-	"\x1e\x87\x7e\x94\xe0\x1f\x86\x59\x27\x14\xbe\x6b\x27\xa5\xe8\x18"
-	"\xc3\x17\x26\xd3\x70\x6d\x69\x32\x0d\xd7\x96\x27\x7c\x1a\xe0\x47"
-	"\x7d\x7d\x70\x8a\xc6\x4e\x95\x3a\xc4\x3e\x5d\x15\xcd\xe0\x30\x70"
-	"\xd5\x03\x1e\x72\xb8\xb6\x29\x05\x5f\x73\x0a\x3e\xbf\x21\x9c\x83"
-	"\xf0\x11\x03\x0f\x39\x19\x4e\xb2\x40\x5f\x30\xa6\xb8\xb6\x53\x8f"
-	"\x67\xdf\x96\xe7\xdc\xbc\x72\x4d\xa4\x80\xd7\x5e\x2e\x3d\x41\xd7"
-	"\xfe\x89\xfd\x60\x85\x73\xac\xd1\xff\x23\xc5\xd7\x58\x77\x32\x1d"
-	"\x63\xf3\x93\xe9\x18\x3b\xd5\xc0\x57\xd8\xb1\x9e\x66\x3a\xa2\x0f"
-	"\x3c\xc2\x7e\x32\xaf\x87\xb1\xbf\x0a\xbf\xcd\x89\x32\x73\x78\xbd"
-	"\xe7\x54\x05\x65\x04\x3c\x9d\xf0\x43\x5a\x37\xa7\xd5\xa7\xac\x8e"
-	"\x3c\x6d\xbd\xc0\x05\xfc\xbb\x75\x7d\xc4\x6f\x8c\x7f\xaf\x99\x28"
-	"\x6d\xf0\xa6\x8f\x8a\x85\xb7\xb8\x1e\x72\x44\x5f\x7e\xdd\x0e\xd5"
-	"\x9f\x74\x4c\x91\x73\xa3\x78\x60\x67\xb2\xd5\x3c\xf0\xd8\x4e\x83"
-	"\x3e\x87\x5d\x6b\xef\x16\x27\xe8\xba\xd7\xd9\x0e\xb1\xff\xc7\x3e"
-	"\xff\xc1\x70\x08\x7d\xc3\x69\x62\x9a\x91\xb6\x5b\xe5\xbb\xce\x65"
-	"\xc8\x17\xe2\x36\xc5\xf0\x9c\x36\x21\x4a\x36\xce\x03\x1c\xb9\x72"
-	"\x3c\x00\x7c\x07\xd1\x46\x91\xa7\x48\xcf\x03\x58\x99\xc7\x51\x41"
-	"\xb6\x9b\x2a\xc9\xe6\x5f\x7b\x42\xe2\xd6\xea\xbb\x73\x0b\xe4\x12"
-	"\xa8\xec\x84\x6f\xd8\xc1\x63\x6a\x9b\xbf\xea\x04\xe3\xd9\x9d\x11"
-	"\x21\x7b\x77\x6d\x07\xca\xbe\x6e\x77\xac\xb6\xc3\x1d\xaf\xe9\x80"
-	"\x9f\x31\xf6\x08\xf4\xcf\xd4\x66\x99\xaf\x85\x91\x63\x9b\x2f\xde"
-	"\xe1\xaf\x3a\xc9\x38\x8f\x71\xbf\x1b\x70\x46\xa9\xbd\x21\x8a\x7e"
-	"\x86\x72\xe4\x9a\x18\xc6\xb6\x81\x26\xf8\xa6\x18\xb7\x95\x78\xa8"
-	"\x00\xbe\x46\x87\x48\xe4\x0b\x23\xdf\xd7\xb3\x99\xd6\x8d\x1c\x8f"
-	"\xfc\xb0\x99\x21\xf6\x65\xd3\xf4\xeb\x0e\x86\xf3\x5f\xc3\x7d\xfb"
-	"\xd7\xa7\x28\xdf\x86\xa6\xc2\x97\xe9\x30\x5d\x27\xb2\x52\xa0\xc7"
-	"\xf7\xf5\xea\x20\xdd\xe3\xd2\x75\xed\x60\xbd\xac\x6f\x8c\x41\xbf"
-	"\x8e\xf6\x7f\x5d\x5a\x9f\x4e\xd3\xcb\x72\xc0\x0e\x03\x6c\xcb\x60"
-	"\xb0\x4c\xf7\x41\xf0\x2d\x36\x1d\x8e\xfc\xb8\x2a\x6f\x88\xa6\x53"
-	"\xe8\xcb\xbf\x1e\xd5\xf3\x7d\x19\xfe\xd8\x1e\xb3\x4d\x40\xbf\x10"
-	"\x56\xf3\xce\xee\x65\xbc\x46\xd7\xe3\xfb\x06\xc6\x7f\x5f\x2f\xd3"
-	"\x78\xf8\x0a\xc2\xa8\xff\xaf\x4b\xff\x63\x2b\xcf\xe1\xa3\xef\x5b"
-	"\x51\x8e\x3e\xc1\x19\x86\x6e\x7c\xa3\x5c\x4f\x93\xe3\x0b\x4e\xc3"
-	"\xf8\xe5\xa0\xf3\x24\xa7\x6d\x4e\xa4\x71\x3e\xa6\xdb\x13\xe5\xf8"
-	"\x5d\x7a\xbc\xb2\x5b\xdf\xd8\x9b\x12\x6e\xd1\xc3\xf8\x8d\xf6\xff"
-	"\xf5\x7c\x7d\x1d\x1a\x3a\xc7\xeb\x47\x96\x13\xe4\xbe\x79\xa7\xb4"
-	"\x67\xdf\x08\xe9\xe9\x4c\x97\xf7\x35\x11\xe2\xb9\xc7\x78\xd6\xe1"
-	"\x88\xb4\xf3\xc8\xf3\xd6\xd9\xc8\x10\x8c\x2d\x2d\xa2\xaf\x8c\xd7"
-	"\x66\xba\x18\x0f\xf7\x6b\xd0\x77\xee\xdb\xba\x4e\xd0\x37\x4e\xf2"
-	"\x1a\x0b\xeb\xc8\xea\x28\x8d\x2e\xbf\x8b\xc7\x10\xee\x3c\xa9\xd3"
-	"\x3e\xa9\x3f\x82\xf1\xc1\x27\x90\xb8\x19\xdf\x56\xee\x33\xbb\xcb"
-	"\x40\xab\x9b\xf9\xdf\x95\x7e\xce\xc6\x5d\x67\x90\xe5\x10\x84\x9b"
-	"\x92\x79\x75\x37\xa7\x84\xfd\x7a\x18\xf2\xaa\x56\xba\xe7\xde\xab"
-	"\xa5\x1d\x1f\xac\x2c\xf6\x17\x7a\x7c\xd7\x53\x72\x79\xd7\xe7\x24"
-	"\xe3\xbf\xde\x95\x12\xce\xd3\xc3\xdb\xe5\x5a\xc4\xf5\x05\x7a\x19"
-	"\xb2\xce\xa0\x63\xbb\xaa\x42\x43\xbe\x9c\xfe\xdc\xf0\xb2\xd2\x9f"
-	"\xeb\x37\x1a\x68\x18\x8a\xf0\xf6\xfe\xfa\xbc\xbe\x49\xc7\x8f\xdf"
-	"\x7b\x0c\x70\x68\x23\xd7\x1f\x48\xd5\x97\x15\x1e\xd6\x33\xd6\x99"
-	"\xeb\x3b\x4c\xd2\x22\x5a\x5a\xd8\x5c\xcf\x6e\xc8\x36\xc4\x6b\xeb"
-	"\x8c\x37\x2c\xd3\xfb\x26\xb9\x66\xe6\x2d\xb2\x48\x1f\xe7\x45\xa5"
-	"\x17\xbc\x2e\x2a\xf5\x42\xee\xc9\xb8\x61\x5a\x2a\x5e\xff\xda\x68"
-	"\x3f\x8e\x7e\x9c\xa3\x39\x0c\xf8\xca\x7e\xde\x6e\xc0\xb8\xca\x5d"
-	"\xa9\xeb\xad\xf2\xa3\xaf\xf7\xa4\xf3\x37\x00\xbf\x2f\x59\x66\x37"
-	"\x1c\xea\x97\xd9\x0d\xc7\x0c\x78\x83\x06\xb8\xdf\x23\x1c\x32\xc0"
-	"\x45\x2f\xa4\x1f\x6a\x1f\xcb\x8d\x63\x93\xcb\xba\x71\x62\x3f\x8e"
-	"\x1b\x0b\xfa\xcb\xba\x71\x9a\x01\xae\x03\xe1\x39\xe9\xeb\xe7\x46"
-	"\x4f\xfa\xfa\xb9\x71\xbb\x79\xfd\xdc\xb8\xc7\x50\xee\xbe\x0b\xeb"
-	"\xf6\x8d\xc7\x0d\xf4\x34\x22\xdc\x95\xac\xcb\x37\x46\x93\xc3\xe3"
-	"\x12\xf5\x2f\xd0\x7e\x77\xad\x2d\x18\xc2\xf1\xf0\x95\x73\x94\xae"
-	"\x8f\x1b\x67\x4c\x7f\xab\x57\xa5\x33\x8d\x3c\x07\x22\xe7\xfe\x14"
-	"\x5c\x51\x2a\x1c\xc3\x18\xd2\x2b\x74\xda\x37\x22\x9c\x6e\x9f\x88"
-	"\xde\x0f\x05\xe2\xdc\x0f\x8d\xdb\xae\xc6\xc0\x1f\x46\x84\xef\xbd"
-	"\xe2\x74\x7d\x0a\x70\xc3\xfe\x8d\xab\x51\x73\x40\x1f\x46\xa0\x47"
-	"\xbd\xa7\x68\xfc\x22\xbc\xfb\xf0\xbe\x3f\xb9\x6f\x1b\xd7\x89\xb1"
-	"\xf7\xac\x46\x5f\x6a\x9f\x37\x9e\xe0\xbf\xf4\x3a\xa2\xd5\xc5\x26"
-	"\x69\xa3\x85\x2f\xe3\x01\x93\xf8\x89\xa8\xa7\xde\x20\x8d\x2f\x63"
-	"\x1a\x0d\xf1\xd3\x84\x6f\x44\x11\xc3\x07\xb9\x3c\xe4\x31\x9f\x1f"
-	"\xf8\x30\xb2\xe2\x6b\xe4\x04\x9d\x5f\x9c\xa2\x9b\x2c\x2b\x9c\x72"
-	"\x1c\x0c\x9a\x6f\x7a\x30\xa5\x9c\x86\x34\x34\xef\x05\xcd\x5f\xa4"
-	"\xa1\xf9\x88\x5a\xd3\x07\xdd\x03\xfa\xf7\xf1\x3c\x96\xf9\x42\xca"
-	"\x35\x29\xfe\x26\x9b\xf7\x65\x8c\x87\xad\x24\xf3\xcc\xaa\xec\xaf"
-	"\x0f\x2d\x7d\xac\xa3\x9e\x0a\x07\x96\x75\xd3\x24\xe1\x1b\x36\x2b"
-	"\x48\x37\x55\xe8\xfd\x81\x16\x5f\xa4\x68\x80\x2c\xac\x2c\x0b\xf0"
-	"\x81\x7c\xe9\xea\x51\x6f\x7b\x2c\x87\x1e\xdf\x4d\xe8\xff\xc6\x57"
-	"\xe8\x7d\x26\xfa\xcb\x10\xcb\x4a\x4b\xf3\xa7\xa4\x45\x0c\x69\xc7"
-	"\x93\xd2\xd6\x25\xe2\xc3\x7a\xfc\x05\xea\x02\xf2\x9f\xf0\x32\xe7"
-	"\x49\xe6\x71\x82\xcb\xbc\x0e\x26\xe4\xa3\x0e\xfa\xcc\xeb\x60\x42"
-	"\x91\xb9\xde\x4c\x58\x2c\x9e\x23\x33\x5c\x1b\x51\x2f\x7d\x5c\x2f"
-	"\x5c\x0f\x03\xe5\x3f\x61\x97\x2e\xff\x0b\xf0\x10\x3b\x45\x79\xf7"
-	"\xf7\xeb\x53\xde\xcb\x29\x78\xba\xcc\x79\xc9\xb3\x81\x97\x98\x39"
-	"\x2f\x79\x2e\x73\x5e\xf2\xf2\x41\x73\x6c\xa0\x2e\xe5\x15\x22\xde"
-	"\x0c\xbe\x4c\xf8\x4c\xf1\x57\xb3\xef\x10\xa4\xbc\xbd\x3c\x27\x64"
-	"\x88\xaf\xef\x6f\x4b\x13\x78\x6f\x94\x83\xe7\x8b\xfc\x55\xb7\x10"
-	"\xd3\x73\xca\x45\xd6\xc1\xe4\x01\xfe\x3f\x3f\x45\x37\x3f\x12\xb7"
-	"\x5a\x76\x29\x59\xdc\x92\x99\x52\x6e\xc4\x5c\x16\x37\xe7\x40\x16"
-	"\x9f\x9b\xcb\xe2\xe6\x71\xe6\xb2\xb8\x79\x0a\x78\xfe\x7c\xa0\x2c"
-	"\x6e\x9e\xa3\xcb\x02\xe3\x49\x87\x78\xb5\x44\xdc\x54\x4e\x76\xf0"
-	"\x99\xe3\x40\x1d\x2b\xb8\x2e\x86\xdb\xe8\x88\xa8\xfa\x75\x2d\x27"
-	"\xfb\x67\x74\x73\x05\xef\xe5\x10\xaf\xce\x16\x23\x42\x34\x8c\xe1"
-	"\x03\x9e\xcf\xfd\x01\x58\x70\x1e\xd3\xa7\x94\xe1\x37\x6f\x9b\x37"
-	"\xc3\xc7\xcd\x78\xce\x24\x3e\xa4\xf6\x79\xde\x32\x36\xb9\xcd\xde"
-	"\x62\xef\x97\x77\x9e\xe4\xc3\xb0\x0f\x74\xd0\x67\xf0\x3a\xb8\xe5"
-	"\x0b\x4d\xfe\x7f\x49\xa6\xe3\x16\x8f\xb9\xfc\x6f\xa9\x4b\x2f\xff"
-	"\x5b\xf6\x98\xcb\xff\x96\x16\x96\x3f\x78\x8a\x24\xdb\xe3\x5b\x8e"
-	"\xf7\xf3\x74\x0b\xcf\xc9\x3a\x84\x6f\xe8\x57\x39\xfc\x65\x79\xd3"
-	"\x1f\xe0\xb7\x34\xbe\x42\xd0\x3d\xcb\x98\xff\x4e\xfe\x74\x4f\xdd"
-	"\x28\xf3\xf5\x50\x8c\x15\xc8\x75\x15\x8f\x73\xbf\xf9\x0e\x74\xa7"
-	"\x03\xbf\xad\xa7\xe8\xd6\x85\x71\x9f\xb5\x52\x93\xed\xc7\xa7\x68"
-	"\xe2\xed\x4a\xb6\xb7\xde\x9b\x2c\x8f\x6f\x1e\x33\x97\xed\x37\xbb"
-	"\x20\xdb\x8f\xcd\x65\x3b\xd1\x9e\xbe\xdf\x98\x38\x16\xfc\x7f\x3c"
-	"\x50\xbf\x27\x4e\x52\x79\x68\x03\xe7\x51\xfb\x1f\x27\xbe\xc9\x30"
-	"\x4a\x8f\x27\xbe\xc0\xe9\xac\xf3\x86\x3c\xe5\xc0\x55\xdc\xaf\xeb"
-	"\x13\x17\x6b\x38\x8c\x78\xb7\x3b\x42\x66\x3a\x3d\x51\xae\xeb\xdd"
-	"\x14\x96\xf2\x29\xde\xc9\x65\xae\x22\xfa\x8c\x6e\x95\xf9\x39\xfe"
-	"\x5a\xa7\x51\xa7\x27\x1e\xd7\xe1\xd8\xc6\x28\xd8\x89\xc7\xc4\xab"
-	"\x65\xc4\x70\xc9\xb8\x6f\xd5\xf8\x1f\x36\xab\x51\x83\x67\xb8\x14"
-	"\x98\x71\xaa\xed\xdc\x5a\x9e\xdc\x76\x6e\x9d\x92\xdc\xdf\x41\xfe"
-	"\xc8\x17\xf7\x59\xd0\x97\x7d\xf3\x00\x68\xf8\xd2\xfa\x32\x48\x5b"
-	"\x42\x7d\x7f\xeb\x5e\x55\xdf\xdf\xba\x3e\x85\xae\x16\xf3\xfa\xbe"
-	"\xf5\x78\xfa\xfa\xbe\x35\x62\xde\x96\xbe\x95\xc3\x75\x1d\xa4\x6f"
-	"\x4d\x49\x6e\x4b\xdf\x72\xf7\xb7\xa5\x5b\x5b\x54\x5b\xa2\x4b\x2e"
-	"\xa6\x2d\xc0\x57\x48\xdb\xf6\xf4\xf6\xf5\x65\x65\x82\xf6\xc0\x34"
-	"\x49\x5f\x07\x63\xfc\x7c\x96\x51\xbb\x53\xee\xe5\xf6\x9e\xa2\xdb"
-	"\x66\xf2\x3c\xae\x92\x55\xfe\xf0\x14\xfe\x42\xe6\xb2\xba\xcd\x0e"
-	"\x59\x79\xcd\x65\x75\xdb\x58\x73\x59\xdd\x36\x89\xf7\xb2\x0e\x6c"
-	"\x17\xb7\x15\xb1\xdd\x07\x8d\xbc\x87\xa2\xe3\x33\xba\xed\x27\xd2"
-	"\xfe\x77\x97\x08\xe8\x9d\x89\xfd\xbf\xad\xdf\xfe\x8f\xe2\x36\x71"
-	"\x9b\xf4\xa7\x44\x37\xec\x7f\x3d\x0d\xe3\xbe\xa0\xbf\x0f\xc8\x33"
-	"\xe9\x03\x6e\x6b\x31\xef\x03\x6e\x3b\x6e\xde\x07\xdc\x16\x56\x7a"
-	"\x9c\xef\x4e\xd6\xe3\xfc\xec\xfe\x3a\x86\x9c\xfe\x77\xfa\x80\x6d"
-	"\xc0\xfb\x09\xfa\xe1\x6a\x55\x1f\xb7\x3f\x9b\x4c\x4b\x7e\xb5\x79"
-	"\x7d\xe4\xd7\xa3\x3e\xb6\x99\xd7\x47\xfe\x5e\xf3\xfa\xc8\x6f\x85"
-	"\xdc\xb7\x0d\xac\x8f\xfc\x93\x5f\xae\x1f\xbe\x3d\x3b\xb9\x1f\xce"
-	"\x8f\x7e\xf9\x7e\xf8\xf6\xa9\xe6\x75\x70\x7b\xa9\x79\x1d\xdc\xee"
-	"\x51\x75\x70\xfb\x9e\xe4\x3a\xb8\xbd\xae\xbf\x0e\x20\x9b\xff\x79"
-	"\x1d\x44\xd5\xfa\xee\x1d\xc3\xbb\xe5\xfc\xd9\x1d\xb6\x20\xdd\xd1"
-	"\xaa\xd6\x03\xee\xf0\xab\x39\x54\x59\x4f\x6f\xa1\xec\xc8\x40\x5b"
-	"\x7c\x87\x4b\x8b\x7b\x78\x60\xbf\x70\xc7\x24\xd8\xc9\xae\x96\x4a"
-	"\xb9\xd6\xa3\xea\x09\xf2\xdd\x06\x38\x35\x17\x70\xc7\x1c\xce\x8b"
-	"\x7a\x14\xfc\xbd\x05\xdb\x56\xc0\x87\x19\x4f\x8b\x2b\x96\x22\xbf"
-	"\x3b\x6a\x2e\xa6\xdf\x4c\xc7\x2b\xfb\x87\xa7\xe8\xce\xdb\x19\x26"
-	"\xce\x7c\xad\xa2\xc6\x53\xf4\xed\x85\x78\x43\xf7\xee\xfc\x5a\x4a"
-	"\x99\x51\x73\xdd\xfb\x76\x2e\x68\x6e\x34\xd7\xbd\x6f\xe7\xa5\xef"
-	"\x27\xbf\x3d\x4d\x96\xeb\xa3\xc6\xb8\xf2\xe5\x2f\x9d\x57\x19\x4c"
-	"\xf1\xe5\xbf\x5d\xae\xf7\x6d\xdd\x99\xa8\x9b\x55\x2c\xf7\x49\x43"
-	"\x14\x7d\x93\x62\x29\xb0\x0d\xaa\x2c\xcb\x2c\x93\xb2\xf6\x81\xc6"
-	"\xb7\xd2\xd0\x78\xcc\xbc\x7d\x7c\xbb\x4b\xab\xcb\xb7\x44\x66\x6a"
-	"\x1b\x99\xc4\x73\xa7\x26\xb2\x98\xa4\xd7\x7f\xb1\xa4\x21\xa9\x7e"
-	"\x27\x4d\x4a\xae\x5f\x2a\xae\xc0\x78\xcd\x04\x6e\x81\x11\x8e\xf7"
-	"\xe2\x30\x2c\xeb\x80\x09\x6c\x5d\x2a\xce\x34\x70\xfb\x06\xe8\x16"
-	"\xef\xcd\x30\xd5\xad\x49\x27\x55\x5b\xbb\x73\x4a\x72\x5b\x9b\x14"
-	"\xed\x6f\x6b\xdf\x6e\x48\xce\x73\xa7\x33\xb9\x4f\xbf\x23\x2a\xfb"
-	"\x74\xe8\x14\x60\x37\x73\xbd\xfd\x2f\xd8\xc6\xf7\x50\x8e\xe6\x1f"
-	"\xdf\x95\x32\x5f\x71\x67\xbd\xb9\x6e\xde\xd9\x0c\x9e\xdf\x33\xaf"
-	"\xf7\x3b\x5b\xcd\xeb\xfd\x4e\xb6\x7f\xef\x69\xe3\xcb\x4b\x67\x55"
-	"\x16\x0c\x4b\x4e\xbf\xcb\x66\x6e\xbb\xee\x4a\x33\xff\x71\xd7\x44"
-	"\x25\xcf\xbb\xca\x92\xe5\x79\x97\x61\xfe\x03\xf4\xff\xef\xf4\x1f"
-	"\x81\x53\x74\xf7\x18\x25\xa3\x82\x21\x29\x74\x1c\x30\x97\xd1\x5d"
-	"\xc7\x20\xa3\x80\xb9\x8c\xee\x0a\xa5\x6f\xbf\x77\xf3\xbe\xf8\xc0"
-	"\xc0\xfe\xe3\xee\xb1\xde\x1d\x72\x7e\x44\xb6\xc3\x59\x51\xf8\x9f"
-	"\x3e\x3d\x9d\xfb\x8d\xbb\x79\xfc\x27\x1c\xa3\xa9\x30\x50\x1f\xe5"
-	"\x3d\x48\x39\x0c\x57\x52\x99\xba\x4e\x72\xb7\xf2\x75\x7d\x82\x1c"
-	"\x9e\x04\xac\x5d\x87\x4d\xc1\xc9\xfd\x9f\xd0\xe1\xd4\xbc\x4c\x75"
-	"\x8a\x2d\xb9\xfb\x80\x79\xbd\xdd\x9d\xa6\xfd\xdf\xdd\xa5\xea\xad"
-	"\x20\x65\xec\x57\x60\x4b\xd6\x75\xc8\xf5\x22\xea\x8e\xd7\x51\x4c"
-	"\xeb\x6f\xc3\xec\x8e\xf2\x2a\xba\xea\x34\x15\xbc\x2f\xf1\x23\xcc"
-	"\xdf\xfd\x94\x44\xc9\x2a\x36\x3c\xd9\xe1\xc0\xef\x46\x9f\x88\x6c"
-	"\xb3\x8a\x23\xdb\x7c\xe2\x48\x20\x7a\x96\x7d\xb6\xaf\x9e\xa0\x82"
-	"\x67\x15\x7d\x22\xa2\x64\x51\x50\xc3\xb0\x3d\xbe\x02\xbf\x3e\xdf"
-	"\x97\xae\x3c\xde\x9f\xcd\xb8\x07\x9f\xe3\xfd\x8e\x1d\x32\x98\xa3"
-	"\xaf\xe5\x22\xec\xec\xdf\x5f\xf4\x9d\xb1\x48\xfb\x52\xdf\x2b\x02"
-	"\xb6\xd0\x88\x47\x7d\xab\xf8\x9d\x05\xfa\x1e\x21\xfc\x2e\xbf\x00"
-	"\x2e\x9d\x9e\xfa\x14\x7a\x76\xa3\xef\x9f\xa3\xe1\xd8\x3b\x18\x0e"
-	"\xae\x27\xa5\x5f\x5c\x8f\xdf\x69\x1d\x6c\x9e\x28\xc3\x49\x85\xcf"
-	"\x0f\xd0\xf9\x7b\xa4\xcf\xcd\x38\xd2\xb5\x41\xd5\xa7\xde\xf3\x37"
-	"\xd5\x06\xef\x39\x9a\x92\xbf\x40\xcd\x1d\xaa\x3e\x6a\x5e\x34\x55"
-	"\x47\xef\x29\x75\x84\xcd\x74\xf4\x1e\x8f\xae\xa3\xf0\x79\x19\xef"
-	"\x2f\x52\xd2\xeb\x95\xae\xde\x13\x42\x3f\x69\x18\x87\xdc\xd3\x2c"
-	"\x75\xe9\x52\xd5\x16\x91\x5e\x9f\x92\xef\x48\xb2\x2e\xdf\x53\x30"
-	"\xd8\x3c\xac\xe2\x6d\x72\xad\xe2\x6d\xca\xa2\x64\x5c\x93\x47\x0f"
-	"\xce\xdb\xe4\x49\xe6\xbc\x4d\x2e\x4a\xe6\x6d\xca\x7d\x29\xe9\xd2"
-	"\xbf\xef\x1e\xd0\x07\x4f\xde\xac\xfb\xa9\xae\x6b\xd8\xff\x9c\xfc"
-	"\x17\xe9\xaf\x36\x96\x88\xb1\x2e\x33\x7f\x75\xf2\x81\x84\xbf\xaa"
-	"\xe0\xd5\xbe\xd7\x46\xf8\xab\x4d\xa9\xe3\x86\x02\x3a\x18\x4d\xf5"
-	"\x59\x27\x47\x1d\x0d\x66\xf4\x4f\xc9\xd5\x6c\xe4\x73\x03\x6d\xe4"
-	"\x94\x3c\x55\x2f\x53\x6a\x92\x6d\xc8\x94\xa9\xc9\xf5\x32\xb9\x22"
-	"\x25\x5f\x59\x72\xbd\x4c\x1e\xfd\xdf\xed\x1f\x58\x61\x33\x32\x32"
-	"\xac\x19\x16\xab\x25\x03\xc9\x60\x93\x86\x65\xd8\x32\x86\xe0\x19"
-	"\xaa\xbd\x87\x59\x33\xac\x36\x3c\x43\xb4\xf7\xd0\x94\xf0\x30\xce"
-	"\x8b\xc7\xa6\xbd\x87\xa4\x84\x87\x5e\x20\x7d\x98\x56\xae\x5e\xbe"
-	"\x2d\x25\x3c\xe4\x02\xe9\x43\xff\x87\xf9\x69\x40\x38\x79\x9f\xd4"
-	"\x7d\x4b\x56\xcd\x5f\xbc\x68\x81\x6b\xf5\xf2\x45\x15\x0b\x5d\xf3"
-	"\x1f\x7b\x6c\xe1\x8a\x15\xae\x8a\xa5\xae\x7b\xbe\xf3\xc0\x2d\x77"
-	"\xb8\xf2\x3c\xd7\x79\xc6\xb9\x16\xdf\x79\xdd\x82\x2c\xba\x7f\xf5"
-	"\x72\x4e\xb8\x7f\xd6\x7d\xc5\xae\xc2\x7b\xbe\x93\x9c\xa8\xa3\x59"
-	"\xbe\x70\xfe\x82\x41\xb1\x18\x6c\x5a\x41\xed\x48\xa2\x2d\x23\xa5"
-	"\x6d\x3b\xd9\xd6\x44\xa4\xc6\xea\xf3\xef\x6c\xdd\x45\x24\x7a\xbd"
-	"\xc2\x7f\x0d\xef\xb9\xf8\xee\x16\x66\x62\x7c\x53\x35\x95\x3f\xce"
-	"\xdf\x31\x7c\xf7\x75\xf1\x6e\x88\x5c\xff\x40\xd6\x13\xe4\xfd\xa4"
-	"\x05\xda\xc4\xe1\xc0\xc9\x28\xb9\xbc\x64\x3f\x45\xa5\xff\x85\x34"
-	"\x8b\xb8\x2b\x8e\xb8\xb0\xb6\xb7\xf2\xbe\x1d\x32\xee\xdd\x6a\x1d"
-	"\xce\x71\x8a\xbe\x37\x53\xbc\x2b\x64\x58\xdc\x55\xa7\xc1\x7d\x6f"
-	"\x4c\xdc\x77\x6f\x90\xd7\x64\x5f\xbe\x94\xec\x2f\x8f\x14\xc7\x1b"
-	"\x9e\x23\xdb\xce\xe7\x78\x1d\xec\x7b\xb9\x41\xeb\x2f\xe4\xfe\xfb"
-	"\x5a\xc4\x07\xc9\x1b\xe4\xb2\x19\x36\x6e\xfd\x6e\x16\xc3\x4b\xd8"
-	"\x4b\x89\x38\x1f\xe0\xa7\x24\xc3\x7f\xcf\x69\x05\xec\x8c\x4f\xc9"
-	"\x11\xc9\xfa\x20\x18\xa8\xac\x26\x47\x4c\xfc\xed\xa6\xa9\x64\x69"
-	"\xdf\x48\xb4\x26\x2a\xa2\xfe\xe5\xa7\x99\x86\x17\x1c\x6b\xc4\xdf"
-	"\x02\x18\x79\xdf\xdf\xe5\x15\x5b\xcf\x90\x0d\x63\x50\x8b\x7f\x39"
-	"\xef\x25\xf9\x5e\xe5\xce\x2f\xc8\x06\x39\x8c\x3e\x4d\x53\xf7\x54"
-	"\xde\x2f\x62\xde\xfb\xc9\x76\xd8\x53\x4d\x62\x53\xeb\x4d\x5b\x3f"
-	"\x22\xdb\x1b\xbd\xd5\xd6\x5e\xe1\xa4\xca\x0a\x5e\x9f\x10\xe4\x0d"
-	"\x8b\x08\xaf\xb7\xb7\x96\xc6\x18\xe6\xaa\x1e\xaf\x93\xda\x2b\xc2"
-	"\xb4\xee\xb8\x88\xd4\x7c\x44\x76\x9e\xeb\x6a\xeb\x0a\xf3\xf7\xd3"
-	"\xf6\x75\xf7\x53\xc6\xa9\x62\xb2\xb6\x95\xd5\x53\x60\x4e\x98\x2a"
-	"\x8f\x8b\xce\xd6\xd2\x4f\xa9\xbd\xac\x99\x4a\x3a\xc8\xda\x7a\xf2"
-	"\x2f\x24\xbf\x09\xde\x6a\x0d\x56\x9d\x23\xe7\xba\x45\x1c\x77\x8e"
-	"\xd6\xae\xa3\xe1\x6b\xff\x44\x8e\x40\x67\x07\xca\x39\x43\x8f\x1e"
-	"\x23\x0b\xf0\x59\x9f\xfe\x0b\x39\x9f\x7e\x84\xf7\x6b\x16\x50\x43"
-	"\x15\x39\x85\xd7\x9d\xdd\xeb\x75\xe7\xf4\x0a\xf7\xa5\x3d\x5e\x77"
-	"\x6e\x7b\x39\xe0\x4f\xbe\x43\x23\x3a\x28\xf7\xdd\xd3\x1d\xd6\xfa"
-	"\xb3\x34\xda\x35\x9d\x75\x60\xea\xee\x86\xb3\x80\xdf\xd4\x51\x1a"
-	"\x47\x5e\x63\x9e\x68\x66\x87\x27\x50\x1c\xa1\x38\x70\xd5\xf7\xd2"
-	"\xe8\x86\x5e\x72\xc6\x6b\x3b\x4a\x59\x16\x7d\x9b\x0e\x07\x61\x07"
-	"\x87\xbd\xf5\xfd\x7d\xb6\x40\x6b\x17\xb5\x85\x7b\xa9\x9d\xfe\x83"
-	"\x02\x9e\xbf\xfa\xdf\xf8\xfe\xbe\x21\x71\x34\x00\xff\x5a\xde\xf7"
-	"\xa2\xf4\xc6\xdb\xc6\xdf\xc8\x55\xd3\xb6\x2a\xca\x2e\x5f\x4b\xc3"
-	"\x4e\x23\x5e\x8d\x73\xdf\xe9\x0c\x44\xff\xea\x5f\x2b\xf7\x6a\x7a"
-	"\x83\x55\x6d\x94\xd1\x1e\xae\xe7\x6f\xa0\xad\xb1\x11\xd6\x60\x20"
-	"\x7c\x84\x02\xe5\x1f\xfb\xe3\xd9\xd6\x43\x9b\xe3\x64\x7f\xf3\xfc"
-	"\x11\x6b\xc0\x76\x9e\x02\xc5\x61\x7a\x0f\x65\x8b\xad\x56\x5e\x87"
-	"\x28\x68\x0f\x47\xf8\x9b\x97\x3c\xd1\xed\xcc\xda\xb6\x9c\xc6\xed"
-	"\x3c\x4b\x63\x77\x9c\x25\xb7\xe8\x71\x5b\x79\xff\xe5\xdc\x33\x39"
-	"\xb4\x03\xef\xec\x93\xd0\x9d\xb3\x6a\x1f\xa6\x18\xae\xed\xc3\xec"
-	"\x73\x53\x63\x6f\xff\x3e\xcc\xde\xee\xfe\x7d\x98\xac\x4b\xbc\x17"
-	"\x13\x6d\xe3\x08\xeb\xf4\xe6\x25\x64\xdb\xf0\x19\xd1\x84\x6a\x2b"
-	"\xef\x1b\x15\x27\x90\x7e\x70\x41\x8c\xbc\xff\xc5\xb2\xbf\xef\x48"
-	"\xf2\x5e\xd9\xef\x61\xbc\x72\xff\x71\x3c\x9d\x78\xa0\x65\x10\x38"
-	"\x4d\xcf\xc6\x83\xf1\xdb\x74\xf8\xeb\xd3\x21\x99\xe9\x85\x78\x4a"
-	"\xf1\x94\xe3\xf1\xe0\xa9\xc6\x03\x3b\x3e\x1d\x63\xae\xe9\xe8\x6f"
-	"\xa7\xa3\x85\x4e\xc7\xb8\x6a\x7a\x2b\x9e\x20\x1e\xe0\x99\x91\x83"
-	"\x67\x1c\x1e\xe4\x9f\x51\x8c\x07\x79\x67\x20\xcf\x0c\xe4\x99\x81"
-	"\xd6\x3d\x63\x37\x1e\xf4\xc9\x33\x90\x6f\x46\x0b\x9e\x0e\x3c\xf0"
-	"\x33\x51\x14\x15\xc2\x62\x17\xa2\xbf\x28\xc4\xb8\xb8\x10\xf6\xbf"
-	"\x10\x65\x16\x22\x5f\x21\xf2\x14\x22\x4f\xa1\x1f\xcf\x21\x3c\xe8"
-	"\xb3\x0b\x91\xaf\x10\xe3\xb4\x42\xd8\xf7\x99\xa0\x7b\x26\xe8\x9e"
-	"\x09\xba\x67\x02\xd1\x4c\xf8\xcd\x33\x51\xe6\x4c\xd0\x38\x13\xf9"
-	"\x66\x22\xcf\x4c\xe4\x99\x09\x1a\x67\x82\xdf\x99\xf0\xe9\x67\x22"
-	"\xdf\x03\x30\x82\x0f\x40\x0e\x0f\x80\xde\x07\x0a\xf0\x14\xe1\x01"
-	"\xbd\x0f\x6c\xc6\x83\x32\x1f\x00\x8d\x0f\x20\xdf\x03\xc8\xf3\x00"
-	"\xf2\xcc\x02\x8d\xb3\x60\x2f\x67\x81\xc7\x59\xc8\x37\x0b\xf9\x66"
-	"\x81\xcf\x59\x18\xaf\xce\x82\x6c\x66\x61\xfc\x3d\x0b\x34\xce\x02"
-	"\x5d\x45\x80\x2b\x02\x4d\x45\xc0\x5b\x04\x19\x16\x81\x9f\x22\xc0"
-	"\x14\x81\xae\x22\xf0\x54\x04\xda\x8a\xd0\xff\x16\x81\xb6\x22\xc0"
-	"\xf3\xd6\xec\x07\x47\xe3\x01\xfc\x83\xc0\xf7\x20\xe0\x1e\x84\xbc"
-	"\x1e\x04\xbe\x07\x41\xf7\x83\xa0\xe1\x21\xc0\x3c\x04\xbc\x0f\xa1"
-	"\xfc\x87\x50\xfe\x43\x28\xff\x21\x94\xff\x10\xe0\x1f\x02\xee\x87"
-	"\x50\xfe\x43\x80\x7f\x08\xf8\x1e\x06\xdc\xc3\x28\xff\x61\xe0\x7b"
-	"\x18\xe5\x3f\x8c\xf2\x1f\x06\xcc\xc3\xc0\xfb\x30\xca\x7f\x18\xe5"
-	"\x3f\x0c\xfc\x0f\x43\x3e\x0f\x23\xcf\xc3\xe0\xf3\x61\x94\xf3\x30"
-	"\xe4\x52\x0c\xfc\xc5\x6e\x3c\x90\x67\x31\xf0\x17\xcf\xc1\x83\x32"
-	"\x8a\x21\x9b\x62\xd4\x49\x31\xf0\x14\x03\x4f\x31\x70\x14\x23\x7f"
-	"\x31\x78\x28\x46\x5e\x34\x48\x7a\x04\x74\x3d\x92\x8f\x07\x75\xff"
-	"\x08\xea\xe1\x11\xc0\x3d\x02\x3d\x79\x04\xbc\x3e\x82\x72\x1e\x01"
-	"\xec\x23\x28\xeb\x11\xd4\xdf\x23\xe0\xe9\x51\xf0\xf4\x28\xf2\x3c"
-	"\x8a\x7a\x7f\x14\x65\x3d\x0a\x3a\x1f\x45\x9e\x47\x21\xff\x47\x0f"
-	"\xe0\x01\xdc\xa3\xd0\xab\x47\xa3\x44\xb3\x41\xd7\x6c\xc0\xce\x06"
-	"\x5f\xb3\x41\xdf\x6c\x94\x33\x1b\xf5\x3d\x1b\x79\x66\x83\xa6\xd9"
-	"\xa0\x67\x36\xea\x6c\x36\xf2\xcc\x06\x2d\x73\xa0\x17\x73\x00\x37"
-	"\x07\xe3\xf8\x39\xd0\xa9\x39\x90\xc3\x1c\xc0\xce\x01\x1f\x73\xc0"
-	"\xc7\x1c\xe4\x99\x03\x59\xcc\x81\x1c\xe6\x80\x8f\x39\xa0\x6f\x0e"
-	"\xf2\xce\x41\x5d\xcf\x85\xfc\xe6\x42\x1f\xe7\x22\xff\xdc\x49\x78"
-	"\x80\x63\x2e\xca\x9a\x0b\xbe\xe6\x02\xcf\x5c\xe0\x99\x0b\x1c\x73"
-	"\x91\x7f\x2e\x68\x9d\x8b\xbc\x73\x91\x77\x2e\xca\x9d\x07\x1a\xe7"
-	"\x81\xb6\x79\x28\x73\x1e\xe0\xe6\xc1\xb2\xcf\x83\x4e\xcd\x43\x39"
-	"\xf3\x00\x3b\x0f\x65\xcd\x03\x9d\xf3\x20\x8b\x79\x90\xdb\x3c\xe4"
+static unsigned int eth_z8e_uncompressed_length = 369604;
+static unsigned int eth_z8e_length = 113069;
+static unsigned char eth_z8e[113069 + 1] = 
+	"\x78\x9c\xec\xbd\x7f\x7c\x54\xd5\xb5\x37\xbc\x66\x32\xc0\x24\x0d"
+	"\x4c\xb4\x94\x8e\x88\x3a\x2a\xb6\xa3\xa2\x46\xc5\x16\x2d\x6a\x2c"
+	"\x70\x1b\xef\x8b\x12\x21\x68\x90\x1f\x09\x36\xf8\x44\x45\x18\x21"
+	"\xc0\x04\x43\x26\x0c\xd8\x06\xca\xaf\x6a\xb4\x28\x81\xa4\x15\x6f"
+	"\xb1\xc5\x8a\xb7\x78\x4b\x5b\x7e\x8c\x12\xef\xa5\x36\xc9\x44\xc1"
+	"\xe7\x06\x3f\xb4\x4e\x79\x22\x4d\x79\x82\x4e\xc9\x40\x62\x32\x33"
+	"\xfb\xfd\xae\xbd\xcf\x99\x9c\x99\x9c\x09\x72\xef\xfd\xbc\xef\x3f"
+	"\xcd\xe7\x73\x72\x66\xef\xbd\xf6\xda\x6b\xad\xbd\xf6\xda\x6b\xff"
+	"\x38\x7b\x13\xfd\x37\xfe\xac\x47\x03\xff\x9d\xec\xff\xf8\xfb\xc7"
+	"\xdf\x3f\xfe\xfe\xf1\xf7\x8f\xbf\x7f\xfc\xfd\xe3\xef\xff\x9f\xbf"
+	"\xb3\x56\x1b\xbd\xbb\x85\xa8\xdb\x6f\x77\x86\x2c\xb7\x4e\xfe\xc9"
+	"\x0b\x22\x8a\x68\x4b\x88\xec\x4e\x7e\x6b\x0f\x3d\x8f\x78\xeb\x16"
+	"\xb2\x5f\x93\x43\xd9\x93\xb6\x13\xd5\x8e\x12\x9d\x2f\xbc\x24\xc2"
+	"\x6b\x5e\x12\x9d\x93\x5f\x23\x6a\x1c\x4b\xf4\xc2\x28\x11\x01\x9e"
+	"\x39\x21\x5a\x5b\xc9\x78\xd6\x20\xcc\xe9\x6b\x47\x89\x30\xe2\xcb"
+	"\x11\x1f\xe1\xf8\xd5\xa3\x80\x6b\x24\x91\xff\x25\xd1\x63\xc0\x6b"
+	"\xe7\xfc\x8c\x73\xf2\xd5\x92\x9e\x9d\x29\x78\x18\xc7\xbe\x10\x3d"
+	"\xb7\x70\x10\x1c\xd9\x9c\x5f\xd2\x86\x3c\x5d\x7e\x72\x46\xac\x64"
+	"\x89\xf8\x03\x5f\x43\xde\x08\x78\x72\x73\xde\xcd\x48\x17\x7e\xca"
+	"\x60\xbc\xc1\x9e\x28\x35\x56\x12\x01\x96\x5c\x55\x64\x39\x45\x99"
+	"\x77\x03\xde\xb2\x46\xe5\x77\x21\xce\x2a\xe3\x80\x87\xe3\x38\x0d"
+	"\xf1\x63\x39\xdc\xed\xcf\xcc\x4f\xe0\x64\x59\x70\xba\x35\x60\x45"
+	"\xba\x05\xf9\x6c\xc8\xb7\xac\xb1\x81\x48\xe1\xca\xc9\x0c\x51\x66"
+	"\x9d\x96\xaf\x1a\xf9\xaa\x39\xdf\x61\xa4\x4f\xaa\x53\x3c\xce\xa8"
+	"\x23\x2b\xa7\xb3\x7c\x51\x8e\x15\x70\xbb\x74\xfc\x0a\x87\xf5\x7e"
+	"\x8d\x9f\xaf\x20\xad\x31\x39\xcd\xf6\xbc\x96\x96\x8d\xb4\x50\x72"
+	"\x1a\xf0\xa9\xb4\x4b\x90\x16\x4d\x93\x76\x69\xb7\x3f\xcb\x99\x9c"
+	"\x76\x30\x57\x4b\xfb\x3a\xd2\xc6\x27\xa7\x59\xf4\x7c\x4e\xa4\x15"
+	"\xe8\x69\xc6\x7a\x51\x1a\x66\xc3\x33\xc4\x4e\x34\x14\xcf\x30\xbb"
+	"\x5e\x57\x4b\x9d\x22\xee\xbb\x8c\x6c\x62\xfd\x7e\x7b\xdc\x2f\x28"
+	"\xe8\xed\x21\xd7\x68\xf2\x9d\xa4\xac\x00\xf0\xd2\xa6\x95\x64\xf7"
+	"\x79\x44\x4f\xd0\xdb\x49\x2d\xe1\x4e\xf2\x85\x45\x47\x30\x7a\x8e"
+	"\xaa\xce\x91\x3d\x18\x3d\x43\x55\xcf\x90\xb3\xb1\xf2\x53\x32\xd3"
+	"\x83\xb8\x55\x90\x6f\x0c\xe7\x6d\xa7\x96\xba\x76\xf2\xd5\x25\xe7"
+	"\xf5\x5d\x41\xce\x66\x84\xa1\x03\x8e\xf2\xad\x22\xde\xe8\x8a\x52"
+	"\x34\x6b\xbf\xbd\xf2\x35\xb2\xf9\xae\x26\x6b\x73\x69\x80\x5c\xdf"
+	"\x60\x5a\xbe\x52\xc3\xb4\xac\x7d\x92\xec\xaf\x3e\x1e\xb0\x8a\xf5"
+	"\x8d\xf6\x5f\xf5\xf6\x58\xd7\x9c\x26\xdb\x61\xe7\x64\x3a\xec\x3c"
+	"\x41\xc1\xad\x77\x53\x30\x12\xa5\x4d\x4f\x52\xf6\xe1\xc8\x44\x0a"
+	"\xae\x8d\x13\xe3\x0b\x2e\x9c\x88\xf7\x39\xc0\x74\x92\x6b\x09\xd1"
+	"\x29\xfa\x8a\xb7\x16\x78\x42\x0a\x27\x74\xe0\x2b\x6b\xdf\xf1\x10"
+	"\xb1\xcc\x38\x9c\x46\x9f\x73\x5e\x60\x5d\xb5\x4a\x1d\xea\xac\x1f"
+	"\x25\x3a\xae\xad\xa5\x91\x80\xcf\x41\xfe\xc6\x90\x75\xef\x3e\x4d"
+	"\x9f\x3b\x6e\xa9\xa5\x9c\xbd\x55\x61\x1b\xf4\xb0\xd3\xe1\x85\xfe"
+	"\xad\xa4\x21\x8e\x28\x59\xc0\xc3\xeb\xf5\x88\xbb\x76\xa4\xcc\xd3"
+	"\x13\xa2\xb7\xda\x38\x8f\xf8\xfa\xec\xbf\xc7\xbf\x3e\x3b\x1c\xff"
+	"\xc9\xec\xb3\xe2\x27\xb3\xbb\x62\x3f\x99\x1d\xf1\x55\x90\x3d\xf6"
+	"\xf5\xd9\xe7\x5a\x3c\x52\x56\x39\x2d\x1e\xc8\x2a\x46\xf6\x55\x67"
+	"\x28\x67\xde\x33\xa8\xa3\xe8\x9f\x68\xd5\x13\xe4\x8c\x67\xbe\x1b"
+	"\x08\x46\x3f\xa2\x79\x95\x24\xf0\xbb\xd5\x8c\xf6\xae\xac\xc6\x7c"
+	"\xa5\x5b\x76\xb4\xe5\x6c\x0f\x68\x95\xe5\x76\x65\x35\x69\xf1\x4c"
+	"\x4f\x76\x8d\x1e\x2f\xb2\x1a\x0b\x51\x1f\xbe\x11\xab\x2d\xb4\xa3"
+	"\x97\xe8\x96\x38\x59\x4e\x53\x76\x2d\x78\xc9\x31\xe2\x9f\x3e\xe5"
+	"\xe1\xbb\x29\xf7\xce\x9b\x72\x6f\xff\xf6\x84\xdb\xe9\x81\xfb\x26"
+	"\xdd\x4d\x05\x8f\x4c\xc7\xbf\x07\xef\xa6\xa2\x7f\xba\x1f\x3f\x26"
+	"\xdd\x7d\x6b\xee\xf7\x6e\x2a\x98\x74\xff\x94\x9b\x26\xd0\x43\x85"
+	"\xb7\xe5\xde\x76\x1b\xdd\x37\x65\xea\xad\xb9\xb9\xda\xfb\xd6\x5c"
+	"\x06\x7a\x74\xc2\x94\x19\x37\x15\x2c\x59\x5c\xbe\xf8\xa6\x07\xef"
+	"\x9f\x64\xb4\x6f\x39\xf1\xe5\x71\xda\x01\x1d\x17\x5d\xf9\xc4\xb2"
+	"\x0f\x54\x9d\x45\xfd\x0d\xff\x29\xe4\x1f\x56\xba\x9f\xbd\x07\xf4"
+	"\xdb\xba\xfd\xc3\xf3\x43\xd6\xb7\x9d\x4c\xbf\xeb\x1a\xae\xe3\x11"
+	"\x5b\xb9\x3d\xa3\x0e\x22\xcc\x5f\x46\xa5\x84\x59\xa8\xd7\x53\x3c"
+	"\x6b\x7f\x6e\x64\x69\x99\xb4\x3b\x88\x5f\x8b\xbc\x21\x8e\xdf\x84"
+	"\x70\xa3\x27\x8f\xc4\xab\xf9\x16\x9b\x4b\xda\x0e\x2e\x2f\xb7\x96"
+	"\x69\xc8\x6a\x2a\x12\x7d\x45\xa4\xc5\xb5\xc6\x39\xbc\xbe\x69\x96"
+	"\xf0\x21\x6e\xa5\x8c\xfb\x00\xe1\xa2\x6e\xd8\xb3\x6e\x51\x46\xf1"
+	"\xa5\x45\xac\x6f\x19\xa0\x65\x0a\x78\xe8\x90\xf0\x5d\x32\xff\x50"
+	"\xc4\x5d\x07\x7c\xb3\xf0\x3c\xaa\xe1\x84\x6d\xbb\x24\x8c\xfc\xb3"
+	"\xe3\xa2\x88\x44\xf6\x65\x76\xfc\x9e\x13\x58\xd9\x49\xa7\x3c\x64"
+	"\x0d\x21\x2d\xee\x2b\x23\x43\xf9\x11\xee\x0f\x50\x96\xad\xbb\xaf"
+	"\x8c\x42\x34\xbc\x47\xe2\x62\x9c\xfd\x30\xed\x5c\x26\x78\x0c\x43"
+	"\x4e\x6f\x77\xfb\x47\x80\xff\x7f\x33\xca\xa8\x86\xe1\xc1\x73\x07"
+	"\xf3\x01\x1c\x21\x2e\x03\x38\xad\x1a\x4e\x3d\x3f\xcb\xf9\xa0\x92"
+	"\xf3\x88\x3d\x29\x72\x6e\x43\xda\x61\xe8\x7d\x24\xc3\x2b\xd3\x5b"
+	"\xd1\xae\x6a\x39\x1d\xf9\xcb\x99\x46\x65\x8b\x65\x5a\x67\x72\x5e"
+	"\x87\xd3\x50\x47\x59\xaa\x8e\x1c\x39\x7a\x1d\x71\xfe\x48\xe6\x71"
+	"\x8f\x56\xfe\x11\xc0\x64\x20\x3d\x37\x05\xc7\x54\xa4\x35\x71\xbd"
+	"\x8d\xf0\x50\x06\xe7\xd9\x31\x4a\xb7\xff\x12\x5f\x49\x32\x7c\xce"
+	"\x18\xc0\x7f\xb0\x59\xe1\xfc\x04\x3a\x6d\x83\x2e\x75\x1e\xf6\x72"
+	"\x3f\xe7\xd8\x90\x2c\x1f\xc7\x2e\x96\x8b\x94\x87\x90\xf2\xd0\xf9"
+	"\xe9\x44\xde\x53\x80\xdf\x9f\x02\xdf\x06\x79\xcd\x92\xf5\xdf\x35"
+	"\x00\xfe\x33\xc0\x77\x26\xc3\xe7\x64\x4b\xfd\x51\x79\xf4\x7a\x2c"
+	"\xd7\xea\xd5\x92\x52\x26\xf3\x33\xbc\xdb\x9f\x93\xc2\xff\x25\xfb"
+	"\x80\xfb\xfc\x26\xd5\x46\x46\xa0\xde\x6f\x02\xde\x05\x23\xc2\xe4"
+	"\x40\xd8\x61\x08\xe7\xe0\xb9\x44\x74\xff\x3f\x71\xc4\xdd\x86\xb8"
+	"\xe7\xd0\x9e\xac\x08\xc7\x54\xf8\x92\xb7\x10\xb6\x80\x9e\x47\x05"
+	"\xeb\x59\x77\x3e\xeb\xd0\x78\xc4\xbf\xae\xa5\xff\x54\xc2\x03\x26"
+	"\xce\x7a\xd6\x95\xd0\xd9\x97\x99\x3e\xd6\x5b\x3d\x9f\x58\x21\xd3"
+	"\x26\x21\xed\x39\xbc\xef\xc7\xfb\x19\xbc\x1f\xc2\xfb\x01\xdf\x17"
+	"\xe4\xf4\xc5\x44\x87\x16\xbe\x13\xef\xe9\x78\x5f\x87\xf7\x0c\xbc"
+	"\x2f\xe1\x36\xc6\x3c\x87\x9f\x45\xfb\xc9\x92\x6d\x69\xa8\x51\x96"
+	"\xc6\xf6\x95\x88\x53\x70\x56\xa3\xfc\x40\x07\xb7\xdd\x02\xf0\xd9"
+	"\xc1\x65\x6a\xb8\x86\x98\xe0\xb2\x99\xe0\xb2\x18\x71\x85\x28\x67"
+	"\xbf\xcf\x2b\x04\xde\xbb\x46\x44\x38\x7c\x49\x03\xe4\x60\x43\x78"
+	"\x2d\xcb\x44\xd9\x90\x4b\x8e\x24\xd7\xed\xf0\x72\x96\x89\xae\x3b"
+	"\x5a\x59\x43\x8c\x65\x99\xd9\xea\x3e\xeb\xc8\x77\xd0\x0f\x5f\xda"
+	"\xe7\x73\x93\xa8\xd9\xef\xba\x89\xc8\x3a\xae\x9a\x32\x83\xd1\x63"
+	"\x34\x2d\x2a\x62\x78\xfa\xae\x27\xba\x24\x18\x6d\xa2\x6f\x12\x5d"
+	"\x1d\x8c\xd6\xa2\x2f\x28\xe7\xb4\x43\xd7\x92\xc5\x82\xb7\xef\x06"
+	"\xb2\x5a\x82\xd1\xf1\x88\xdf\x49\x63\xc9\x66\xf9\xa7\xe7\x44\x77"
+	"\x30\x3a\x19\xe1\x85\x54\x1c\xa3\x9c\xa9\x43\x84\x6f\x5a\x4c\x7c"
+	"\xf2\x4f\x43\xe2\x22\x18\x6d\x44\x7c\x29\x4d\x8b\x7d\x21\xa6\xc5"
+	"\xba\xf1\x7c\x8e\xe7\x13\x3c\x87\xf0\xf8\x84\x58\xb7\xdf\xd5\x87"
+	"\x3e\x02\x34\xe5\xf6\x89\xb2\x0c\xd0\x94\x8b\x3e\x43\x88\xac\xfd"
+	"\x79\xc1\xe8\x44\xe0\xb3\x12\x60\x72\xfb\xfa\x90\xb6\x7e\xff\xbd"
+	"\x12\x26\x6b\xff\x3d\x32\x5c\xb3\xbf\x40\xd8\xf7\xe7\xdd\x54\x4d"
+	"\xc3\x98\xfe\x38\x64\x16\x8c\xa2\x9f\x8e\x7e\x4a\xd3\x2a\xc2\x82"
+	"\x79\x18\xb1\x5a\xe0\xf7\x21\x01\xb9\x3a\xa6\x55\xf8\x44\x71\x94"
+	"\xec\x22\x93\x71\x77\x32\xde\x02\xe0\x7a\x40\xc3\xe5\x01\x6c\x98"
+	"\xe1\x18\x97\x8e\x87\x71\x30\xec\xb4\x18\xf4\x7d\xdd\x7e\x4f\xdf"
+	"\xba\xfd\x25\x78\xaa\xf1\xec\x41\xde\x77\xfb\x9e\x95\x72\x6c\xc5"
+	"\xef\x50\x0f\xea\x55\xca\x31\x46\xc3\x00\xdb\x8a\xfa\x98\xdc\x2d"
+	"\xe9\x3e\x40\x92\xee\xf5\xfb\x45\x8f\xa2\x3f\xae\xf1\x13\xe3\xf8"
+	"\x08\xea\x0d\x30\xae\x88\x4c\x3b\x70\x15\xf2\x15\xca\x7c\x35\x07"
+	"\x5c\xc2\x7e\x20\x37\x0e\x7d\x84\x3c\xab\x59\x96\x90\x6f\x35\xfb"
+	"\x49\x2c\x53\xb1\x0e\xe9\x99\x07\x72\xfb\xd6\x1d\xc8\x43\xfe\xe9"
+	"\x7d\x02\xb4\x64\x1d\x28\xe9\x51\x65\x16\x03\xcf\x9c\x6e\xc6\x69"
+	"\x3f\x50\x02\x5c\x9e\x2f\xfc\x2e\xc8\x42\xf4\x4c\x8b\xae\x8e\x16"
+	"\x57\x50\x86\x9b\xaa\x41\xef\x76\xf8\x63\x0b\x81\x6f\x2d\xa7\x7d"
+	"\x32\xad\x82\xbe\x8a\xb2\x0e\x01\x6f\x09\x97\x87\x32\x3c\xc0\xf9"
+	"\x34\x70\x95\x32\x4d\xbd\x7e\xca\x41\xb8\xba\x57\xd1\xd7\x10\xaf"
+	"\x39\x10\x88\xdb\x0f\xec\x31\xea\x8f\x92\x19\xeb\xcd\x1b\x1c\x97"
+	"\xa3\xeb\x4a\xac\xe6\xc0\x96\x1b\x89\x72\x1e\x8c\x88\x28\xeb\xcb"
+	"\x2d\xe4\xb1\xb4\x44\x9a\xa8\x38\x6a\xa7\x16\xcf\x5e\xba\x81\xd8"
+	"\x67\x8b\x50\x4b\xa4\x16\xe1\x8d\x78\x97\x53\x73\xe7\x4e\x62\x1a"
+	"\x1f\xf4\x44\x56\xc7\xec\x07\x73\x9a\x3b\x1f\x20\xe4\x3f\x04\x1a"
+	"\xe3\xf3\x3c\xb6\xea\x16\x4f\x84\xc3\xbe\xe6\x4e\xe8\x68\x4c\xc4"
+	"\xa2\x35\x07\xaa\xa3\xf6\x83\xae\x07\xcf\x89\xf0\x03\x9d\xd5\x43"
+	"\x10\xd7\xe7\xb0\x88\xa8\xc3\xeb\x13\xcd\x9d\x6b\x69\xde\x39\xb2"
+	"\x34\x97\xed\x95\xba\x3a\xcf\xe3\x21\x99\xff\x5c\xd4\x31\xb7\xb3"
+	"\x9a\xe6\x96\xd1\x08\xc0\x7f\xce\xba\x2b\x46\x54\x53\x53\x7b\x29"
+	"\x3d\x70\x26\x9a\xf1\xe0\xb9\x3e\xd1\x54\x52\x4b\xcd\x65\xb5\x2c"
+	"\x8f\x06\xf6\x99\x1e\x38\xd3\x25\x1e\x3c\xd7\x2d\x9a\xcb\xde\xa0"
+	"\xa6\x92\xbd\x34\xf5\xd3\x80\x23\xb6\xee\xc0\x96\x78\xe6\x81\x3d"
+	"\xf1\x75\x07\x02\xd1\x75\x07\xaa\x63\x99\x07\x73\xa2\x99\x07\x5d"
+	"\x62\xfd\xc1\x2d\x90\x5f\xa6\xac\x8b\xac\x83\x9b\xf0\xdb\x25\xeb"
+	"\xd7\x7e\xb0\x41\xd4\x1c\x0c\xf4\xad\x3b\xb8\x27\xe8\x9d\x48\x22"
+	"\xf3\x60\x03\xeb\xbc\x58\x77\x30\x00\xb8\x80\xd2\x91\x83\xad\xac"
+	"\x23\x80\x09\xe1\x09\xf7\xad\x3b\x84\xb6\x72\xa8\x00\x38\x2e\x51"
+	"\xf8\x0e\x4d\x63\xb8\xb8\xfd\x50\x41\xbc\xe6\x50\x89\xb0\x1f\xf2"
+	"\xc0\xb7\xb2\x3e\xf8\x4c\x0f\xe4\x07\xd9\x79\x21\x77\x3f\xda\x87"
+	"\x37\x86\x70\x8c\xe6\x3d\x43\xbe\xa0\xf7\x04\x7e\x9f\x20\x71\x70"
+	"\x0b\x3d\xf8\xcc\x21\xc1\x69\x0f\x3e\xe3\x13\x90\x8d\x23\x9e\x09"
+	"\x3c\xeb\x80\x27\x13\x78\xd6\x07\x2e\xed\x61\x9d\xaa\x09\xe4\x3c"
+	"\xf0\x9c\x08\x0b\x7b\xc0\x13\x1f\x4a\xb2\x6d\xc4\x0f\x0a\xa1\xda"
+	"\x47\x27\x74\x72\x74\x75\xb1\x97\x1a\xc4\xba\x40\x8e\xc8\x0c\x20"
+	"\xdf\xbb\xff\x0a\xbb\x95\x21\xa4\x8d\x79\x77\x4f\xdf\xba\x77\x5b"
+	"\xf1\x04\xfa\xdb\x14\xb7\xbd\x77\xf7\x7c\xd9\xf1\x43\xb7\x7f\x14"
+	"\xc6\x3f\xc7\xa4\xff\x84\xdf\xe8\xff\x3f\xda\xab\xfd\x3e\x11\xa2"
+	"\xfd\xd9\xd2\xa7\x84\x2d\xf3\x54\xd1\xd7\x4e\xd3\xd7\xb7\x80\x5f"
+	"\xc2\xef\x6c\xfc\xae\x9d\x76\xfd\x21\x11\xdf\x60\x9b\x80\x3a\xed"
+	"\x66\x5b\x23\xfc\xe3\xd9\xff\xc8\xeb\xee\x2e\xb3\x8b\x6e\x77\xb6"
+	"\xc8\x6a\x7e\x49\xf4\x39\xd9\xf7\x75\x20\x3c\x02\xb2\x1b\x8b\xf7"
+	"\xa5\xdb\xcf\xd3\x48\x3c\xce\xed\xfe\x78\x35\xdb\x52\xfc\xce\x15"
+	"\x2b\x9c\x59\x9b\x96\xd3\x38\x47\x84\xec\xf5\xfe\x78\x91\x63\x75"
+	"\x0e\xc1\xef\x1e\xc9\xbf\x85\x3f\x90\x5b\x7f\x9e\x6c\xec\x8f\xc7"
+	"\x87\xa3\x3c\xaf\x43\x88\xa5\x6e\xaa\x5f\x02\x7b\x83\xb1\x69\xbd"
+	"\x5f\xec\x89\x75\xbb\xad\x4c\xa7\x4e\x0b\xd3\x06\x3a\xaf\x00\x9d"
+	"\x3b\x67\x56\xe4\xd1\x7b\xf0\x11\xcc\x6c\x76\xb7\xff\xeb\x09\xfe"
+	"\xd3\xa4\xb7\xeb\x32\x31\x4f\x77\xda\x74\x39\xa5\x19\x7b\x8c\xe4"
+	"\xb6\x1c\x3b\x2f\xc2\x9b\x17\x11\xcb\xc2\xe9\x8b\x8a\xff\x03\x7b"
+	"\x5a\x5d\x15\xa3\x2b\xa6\x55\x5c\x25\x82\x61\x11\x08\x7a\xcf\xc8"
+	"\x71\x7f\x3d\x60\xaa\xa2\x22\xae\x8f\xbf\x6b\x5f\x82\xef\xb9\xae"
+	"\xd9\x2b\xd6\x35\x97\x77\x2d\x17\x51\xf8\x47\xed\x28\xd3\x1b\xa2"
+	"\x5b\xa3\xaa\x6e\x0e\x34\xc0\x7f\x68\xef\xb2\x37\x97\x03\xf7\x25"
+	"\x8c\xbb\xc5\x23\x02\xf1\xcc\xe6\x4a\xc0\x35\x84\xe8\x2f\xd9\xc6"
+	"\xb1\xff\x5a\xe0\x5c\x0b\x9c\x48\xdb\x1f\xa2\x2b\x06\xcc\x01\xa8"
+	"\x59\x0a\x42\xbd\xb8\xfa\x27\x37\x2c\x9a\xfa\xe8\x7f\x39\x78\xf2"
+	"\xcc\x93\x75\xbe\xd1\xf6\x5c\x5d\xf0\xf9\x7d\xab\x68\x0c\xea\xe1"
+	"\xf2\xd3\x74\xd9\xad\xe8\x87\x4f\x09\xbf\xf3\xc8\xab\x2b\x7b\x30"
+	"\x26\xbf\x6c\x62\x88\x76\xd5\xa6\x93\x9b\x60\xdb\x77\x5e\x74\x6c"
+	"\x5e\x9e\x90\xd9\x5f\xa6\x55\xc4\x05\xff\xe6\x36\x55\x8f\x78\x96"
+	"\x07\xf0\xac\xd5\x65\x91\x46\xfe\x36\x51\xd3\x5c\xa3\x7c\xea\xcb"
+	"\xda\x05\xc6\xc8\x81\x2b\xa3\xfc\xfb\x53\xe9\x33\xd4\x1c\xdc\xd3"
+	"\x05\x5b\xc1\xe3\x33\x8c\xef\x22\x18\x4f\xf7\x00\x67\x5b\x88\xae"
+	"\x0e\x69\xf3\x11\x91\x60\x74\x0a\xdb\x8d\x3d\xe9\xeb\x57\xc7\x3f"
+	"\xe6\x98\x86\x33\x20\xec\xc7\xf7\x56\x29\xba\x7b\xaa\x22\xa2\x83"
+	"\x71\xf3\xf8\xa7\x1d\x30\x3b\x50\x0f\xa2\xe6\xf8\xae\x4d\x1c\xb7"
+	"\xbc\x97\xe3\x3e\x82\x1e\x0b\x45\xd7\x98\x8f\x20\xb7\xaf\xc3\xc7"
+	"\x0d\x07\x56\xf6\xd2\xa9\x4a\xca\xe0\x71\x67\xb7\x7f\xf4\xc2\x10"
+	"\xdd\xd3\x20\xc7\x7e\x7e\xfa\x45\x97\x75\xe6\x4c\xc4\x55\x87\xe8"
+	"\xde\x46\x19\x67\xa5\xaf\x21\xbc\x25\x01\x03\x1c\x08\x37\x18\xf2"
+	"\xcc\xec\xb2\xde\xf0\x0b\xc4\xed\x4d\xc9\xd3\x98\x92\xe7\x98\x1e"
+	"\x06\x7d\x9d\xae\xe5\x92\xaf\x17\x91\xbf\x01\x4f\xb5\x56\x6e\x4f"
+	"\x32\x8e\xcb\xed\xc9\x38\x2e\x77\x0e\xa4\xf5\xf2\x71\x29\x79\x26"
+	"\xa6\xe4\x99\x3a\x90\xd6\xcb\x4b\x52\xf2\x78\x52\xf2\x54\xeb\x61"
+	"\x6d\x0e\x26\x17\x71\xb5\x29\x79\x76\xa6\xe4\xd9\x6b\x08\x7f\x15"
+	"\xe1\x04\xff\x5c\xd7\xf0\x07\x04\x8f\xab\xa1\xb7\xac\xc3\x0d\x6c"
+	"\x4f\x79\xce\x63\x69\x25\xdc\x8b\x75\x07\x1b\x00\x1f\xd1\xf1\xeb"
+	"\xba\x23\xe1\x95\xfe\x74\x28\xfd\x19\xe3\x4c\xc0\xc0\xc5\x6a\x74"
+	"\x45\x08\xb2\xec\xe0\xf9\xb2\x60\x64\x8a\x36\xde\x1c\x33\x87\x75"
+	"\x4a\x2f\xd3\x51\xa9\xf4\x86\xe7\x0e\xf4\x32\x43\xd0\x15\xee\xaf"
+	"\x0c\xfa\xd9\xce\x65\x69\x65\x54\xea\x65\x00\x77\x3b\xeb\x8f\x9c"
+	"\x2f\x01\x7e\x2d\xdf\x1e\x25\xf7\x31\x3b\x93\xe5\x31\x66\x6f\xb2"
+	"\x3c\xc6\x34\x1a\x65\xc8\x36\x22\x44\x97\xd7\xa4\xf3\x71\xe1\xef"
+	"\x78\xe0\x93\x5f\xe9\x8b\x8b\x93\xa7\xe8\x8a\x59\xd0\xfb\x0c\x7e"
+	"\x4b\x3f\xaa\x07\xfc\xda\x8f\x4e\x94\x3e\x54\xe5\x39\xf4\xb9\x12"
+	"\xf6\xab\x80\x6d\x07\xcc\xfd\x1a\xec\xfd\x6a\x4e\x4f\xbe\x87\xf1"
+	"\x1b\xfe\xd4\xd3\xb0\x45\x25\x61\x1f\xf7\xdb\xc7\x3d\x7a\x18\x63"
+	"\x12\x8c\x09\xaf\x70\x8a\x75\x47\x27\x9a\xd3\x82\x3e\x53\xd9\xd6"
+	"\x4e\x94\xf3\x75\xb6\x11\x90\xdf\x65\xb0\x33\x7f\xa9\x5a\x45\x5f"
+	"\x65\xfb\x20\x32\x9b\x6b\x95\xbc\xaf\xd8\x2d\xfc\xd5\x14\x44\x6f"
+	"\xe8\x59\x4e\x97\xc3\x9e\x6e\x38\x4d\x57\xbc\x53\x5c\xe9\x02\xad"
+	"\x18\xc7\x7e\x46\x24\xfb\x8e\xcc\xe6\x2d\xdc\x8f\xd6\x7f\xc6\x63"
+	"\xca\x2b\x42\xba\x6d\xc1\xef\xce\xc1\xec\x3c\xea\x2e\xac\xc6\x54"
+	"\x57\xce\xe2\x3a\x3a\x49\x57\x4e\x66\x7e\xd5\x5c\xe8\x95\x77\x88"
+	"\xf3\x62\x8e\x60\x5f\x1c\xbe\x46\x88\xae\xf4\xe0\x1d\x96\x8f\x9f"
+	"\x4a\xb4\x70\x08\x70\x63\xc5\xf9\x38\xc3\xa0\x0e\xae\x9c\x28\xfc"
+	"\x16\xb6\x71\xfb\xbb\xfd\x57\x96\x85\x68\x7c\x40\x8d\xab\xaf\x1c"
+	"\xcf\xb8\xd2\xd0\x10\xea\x9f\x67\xb9\xf2\x03\x57\x95\x85\xe9\x78"
+	"\x4d\xda\x24\xe0\xaa\xb7\xaa\xfe\x36\x0e\x5a\x77\xf8\xe3\x65\xe8"
+	"\x5b\xcb\xe2\xeb\xff\xb7\x57\xfe\xd6\xd2\x98\x8e\x38\xca\x37\xc5"
+	"\x9f\xb0\x51\x57\xad\xd2\xec\x5c\x6b\xdc\x7e\x30\xac\xd9\x67\x1e"
+	"\x17\x66\x9e\xa4\xab\x2a\x11\xc6\x58\xf3\x2a\xd7\xaf\xe2\x61\xeb"
+	"\x3b\xe5\x7a\x17\x71\x55\xa5\xc9\x93\x8f\xa7\x08\x4f\xa9\x16\xf6"
+	"\x48\x1e\xba\x4a\x31\x4e\xbb\xaa\x32\x9e\x09\xf9\xd4\xb0\xbc\xae"
+	"\x2a\x10\x5d\x63\xad\xfa\xef\xfa\xbf\xf3\xdc\xc0\x55\xd0\xff\x2b"
+	"\x2b\xd3\xd6\x47\x82\x56\xd7\x9d\x06\x5a\x43\x06\x5a\xed\x27\xc9"
+	"\x35\x41\xa3\xb5\x29\x99\x56\xd7\x04\x3c\xe8\xd2\x5c\x63\xf0\x8c"
+	"\xd3\xc2\x86\xe7\xaa\x30\xca\x47\x5d\x5c\xd1\xa3\xea\x84\xe3\x50"
+	"\x06\xcb\xe2\xef\x64\x8f\xf7\x15\x11\xcf\x8f\x72\x3c\xcb\x93\xe3"
+	"\xe3\xf0\x83\x10\xce\x41\x7a\x0e\xeb\xca\xe6\xb8\xd2\x05\x73\x9f"
+	"\xc2\x55\x94\xf0\xbd\xe0\x7b\xb2\xfe\x76\xd2\xd5\xa5\xd0\x71\xf0"
+	"\xf1\x9f\x5e\xd5\xd7\x5c\xbd\x80\xc3\x68\x5b\x7f\xc1\xef\x92\x66"
+	"\x48\xaf\x77\x7d\x53\x7e\x9f\x95\x86\xf5\x5a\x29\x2f\xba\xc9\x36"
+	"\x27\x9a\xd5\x58\x18\xec\xd8\x4b\x2d\xd1\x7f\x25\xd7\x93\x12\xc7"
+	"\xac\x60\x19\x6c\x55\x85\x88\xbd\xd9\xbb\x0b\xe3\xb9\xcf\x03\xe8"
+	"\x9b\xaf\x3a\x4d\x57\x4b\xfa\x7f\x74\x12\xdc\xcd\x93\xb8\x15\x3f"
+	"\xd9\xb6\x09\x9b\x1e\x87\x7d\x39\x25\x22\xf0\xe3\xb2\x36\xf6\xd2"
+	"\xb8\x57\x56\x52\x6e\x5d\x2f\x8d\xdd\xd1\x4b\x6e\xf1\x57\xb7\xb5"
+	"\x0e\xfe\xd9\xbc\x73\x39\x04\x1d\x2a\x1a\xe1\x21\xfb\x8e\x95\xf0"
+	"\xd3\xa2\x64\x89\x6d\x84\x9f\x16\x85\x9f\xf6\xb9\x9b\xdb\x52\xc2"
+	"\x4f\xeb\xeb\x63\x3f\xad\xb9\x87\x61\xd0\x06\x7b\x86\x97\x91\x25"
+	"\xbb\x84\x72\x40\x9f\xef\x33\x72\xbd\x9c\xdd\x0e\x1f\x11\x3c\x87"
+	"\x34\x7e\x21\xb3\xdd\x8e\x32\x1a\x26\x79\x45\xfb\x16\xeb\xfe\xd3"
+	"\x9b\x6e\xdd\x83\x6d\x6d\xe0\xca\x08\xcf\x47\x33\x0f\x6f\xf1\x5c"
+	"\xed\xde\xd1\x3d\xb6\xa5\x75\xa2\x87\xe3\xcb\xaf\x16\x3d\x88\xdf"
+	"\xca\x65\xef\x41\x7c\xb7\xff\xea\x40\xc8\xfa\xd6\x89\x8b\x99\x6f"
+	"\x67\x7f\x42\xae\x89\xc8\xbe\xe3\x1a\x4a\xe9\x7f\x60\x33\xae\x19"
+	"\xa9\xdb\xdb\xf2\xab\xc9\x59\xee\x12\x1d\x83\xcc\x49\x47\x74\x3f"
+	"\xef\xf0\x18\x99\xb7\x20\xe1\x77\xa8\xb5\x15\x52\x3e\xc3\x35\xb2"
+	"\x0d\xb3\x4f\xc0\x7d\x0c\xfb\xc1\x3c\x87\xaa\xe6\xbd\xae\x59\x6b"
+	"\xf0\x55\xb8\x8f\x89\xec\x5d\xd9\x63\xe3\xfc\xcc\xa7\x96\xbf\x34"
+	"\x9d\x3d\xe7\xb5\x1e\xf8\x22\x5b\x5b\xea\x88\x5a\xe0\xf2\x35\xd7"
+	"\xe5\xc1\x3f\xea\x95\xbe\xe8\x49\xba\x46\xce\x99\x07\x16\xf5\x12"
+	"\xff\x0e\x56\xde\x45\x41\xc0\x28\x7b\x7a\xed\xd8\x46\xaf\x9a\xff"
+	"\x6b\xf4\x9c\xe5\x75\x1f\x11\x58\xc2\x76\xe7\xda\x87\x0e\x57\x86"
+	"\x41\xd7\xb5\x63\xf4\x39\xe9\x10\x5d\x5b\xc0\xe5\x77\xd5\x1c\xdf"
+	"\xc2\xf3\x7b\x72\xce\x2e\x32\x81\x61\xf2\x42\x74\x4d\x62\x2d\x09"
+	"\x7e\x2c\xec\xde\x35\x3d\x83\xd0\x9a\xa3\xfa\xac\x6b\xbd\xc9\xfe"
+	"\xc5\x10\xf4\x73\xd7\x6e\x48\xee\xe7\xae\xad\x4b\xee\xe7\xae\xdd"
+	"\x9d\xec\x5f\x58\xe1\x5f\x5c\x1b\x48\xc9\xd3\x9a\x92\x27\x64\xc8"
+	"\xb3\x45\x2b\x27\x92\x9c\x67\xac\x2d\x39\xcf\xd8\x91\x86\x30\x78"
+	"\x1c\x3b\x56\xaf\x9f\x2e\xb9\x5e\x31\x76\xbc\x21\x6c\xad\x95\x6b"
+	"\x7a\x63\xf3\xf5\x38\xf4\xa3\x04\xff\x30\xc2\x3a\xa1\xe1\x2b\x4d"
+	"\xd1\x31\x86\xf7\xa6\xd0\x50\x93\x42\xc3\xd6\x84\x4f\x03\xfc\xa8"
+	"\xaf\x77\x4f\xd1\x75\x1e\xa9\x43\xec\xd3\x55\xd1\x34\x0e\x03\xd7"
+	"\x56\xc0\x43\x0e\x63\x8f\xa4\xe0\x6b\x4b\xc1\xd7\x61\x08\xe7\x20"
+	"\xdc\x63\xe0\x21\x27\xc3\x49\x16\xe8\x0b\xc6\x14\xd7\xe5\xe8\xf1"
+	"\xec\xdb\x82\xde\x0e\x9f\x5c\x2b\xca\xe3\x35\xa9\x4b\x4f\xd2\xd8"
+	"\x18\xfb\xc1\x0a\xe7\x75\x46\xff\x8f\x14\x5f\xd7\x15\x24\xd3\x71"
+	"\x5d\x49\x32\x1d\xd7\x79\x0c\x7c\x45\x1c\xab\xe9\x21\x47\x74\xfa"
+	"\x2c\xf6\x93\x79\xdd\x90\xfd\x55\xf8\x6d\x4e\x94\x99\xc3\xeb\x60"
+	"\xa7\xca\x29\x23\xe8\xed\x80\x1f\xd2\x1c\x49\xab\x4f\x59\xc7\x1b"
+	"\xb4\x75\x14\x17\xf0\xb7\xea\xfa\x88\xdf\x18\xff\x5e\x3b\x47\xda"
+	"\xe0\xf5\x47\x03\xc2\x57\xb4\x15\x72\x44\x5f\xfe\x8d\xf7\x54\x7f"
+	"\x72\x7c\x2f\xb7\x45\xf8\x4b\x1d\xb0\x33\xd9\x6a\xbe\xfa\x1b\x39"
+	"\x06\x7d\x8e\xb8\x56\xde\x2b\x4e\xd2\x37\x3e\x60\x3b\xc4\xfe\x1f"
+	"\xfb\xfc\x87\x23\x61\xf4\x0d\xa7\x89\x69\x46\x5a\xab\x96\x2f\xdf"
+	"\x90\x2f\xcc\x6d\x8a\xe1\x39\xed\x96\x28\xd9\x38\x0f\x70\x8c\x94"
+	"\xe3\x01\xe0\x3b\x8c\x36\x8a\x3c\x95\x7a\x1e\xc0\xca\x3c\x8e\x72"
+	"\xb2\xdd\x5c\x49\xb6\xc0\xca\x93\x12\xb7\x56\xdf\x1d\x1b\x21\x97"
+	"\x60\x65\x07\x7c\xc3\x36\x1e\x53\xdb\x02\x55\x27\x19\x4f\x6b\x46"
+	"\x0f\xd9\xbb\xd6\x1d\xc7\x98\xe1\x1b\xad\xb1\x75\xc7\xb7\xc6\x6b"
+	"\x8e\xef\x09\xd1\x75\x3d\xd0\x3f\x53\x9b\x65\xbe\x46\x48\x8e\xcd"
+	"\xfe\x78\x5b\xa0\xaa\x9d\x71\x46\xb9\xdf\x0d\x3a\xa3\xd4\x52\x17"
+	"\x45\x3f\x43\x39\x72\xad\x10\x63\xdb\x60\x03\x7c\x53\x8c\xdb\x8a"
+	"\xbd\x94\x07\x5f\xa3\x4d\x24\xf2\x45\x90\xef\x9b\xe3\x99\xd6\xb5"
+	"\x1c\x8f\xfc\xb0\x99\x61\xf6\x65\xd3\xf4\xeb\x0e\x86\x0b\x5c\xc3"
+	"\x7d\xfb\x37\x17\x2a\xdf\x86\xf2\xe1\xcb\xb4\x99\xae\x9f\x59\x29"
+	"\xd8\xed\xff\xe6\xae\x10\x4d\xca\xd7\x75\xed\xf0\x56\x59\xdf\x18"
+	"\x83\x7e\x13\xed\xff\x1b\xe1\x74\x3e\x84\xa6\x97\x1e\xc0\x0e\x03"
+	"\x6c\xe7\x60\xb0\x4c\xf7\x61\xf0\x2d\xd6\x37\x95\xbc\x5a\x95\x3b"
+	"\x44\xd3\x29\xf4\xe5\xee\xb1\x7a\xbe\x2f\xc3\x1f\xdb\x63\xb6\x09"
+	"\xe8\x17\x22\x6a\x2e\xfa\xfa\x97\x79\xed\x12\x78\x30\xfe\xfb\xe6"
+	"\x16\x8d\x87\xaf\x20\x8c\xfa\xff\x66\x8f\xbe\xee\xc5\x7d\xdf\x52"
+	"\x0f\xfa\x04\x67\x04\xba\xe1\xde\xaa\xa7\xc9\xf1\x05\xa7\x61\xfc"
+	"\x72\xd8\xd9\xce\x69\x7b\x13\x69\x9c\x8f\xe9\xf6\x46\x39\xbe\x49"
+	"\x8f\x57\x76\xcb\x7d\x22\x25\xdc\xa9\x87\xf1\x1b\xed\xff\x9b\x25"
+	"\xfa\x7a\x3d\x74\x8e\xe7\xeb\x2d\x27\xe9\xfa\x59\x3b\xa4\x3d\xbb"
+	"\xde\xa9\xa7\x33\x5d\xbe\x9f\x8a\x30\xcf\x3d\xc6\xb3\x9a\x4a\xa4"
+	"\x9d\x47\x9e\x37\xcf\xf6\x0c\xc1\xd8\xd2\x22\xfa\xca\x88\xe3\x18"
+	"\x0f\xf7\x6b\xd0\x77\xee\xdb\x3a\x81\x2b\xbb\x9e\xf5\x1a\xf5\xba"
+	"\x22\x4a\x63\x3c\xf7\xf0\x18\xe2\xfa\x22\xa9\xd3\x7e\xa9\x3f\x82"
+	"\xf1\xc1\x27\x90\xb8\x19\xdf\x26\xee\x33\xbb\x78\x0d\xec\x7a\xe6"
+	"\xbf\x29\xfd\x9c\xcd\xf5\xfb\x0c\xb2\x1c\x82\xf0\x91\x64\x5e\xaf"
+	"\x6f\x4b\x09\x77\xe8\x61\xc8\xab\x5a\xe9\xde\xf5\x27\x54\xda\x0d"
+	"\xb6\xc1\xca\x62\x7f\x01\x30\xee\xe4\xf2\x6e\x98\x90\x8c\xff\x86"
+	"\xfc\x94\x70\x91\x1e\xae\x95\xeb\x13\x37\x94\xe9\x65\xc8\x3a\x83"
+	"\x8e\xed\xac\x0a\x0f\xf9\x72\xfa\x73\xe3\x3b\x4a\x7f\x6e\xd8\x6d"
+	"\xa0\x61\x28\xc2\xfb\xfb\xeb\xf3\x86\x23\x3a\x7e\xfc\x3e\x66\x80"
+	"\x43\x1b\xb9\xa1\x3d\x55\x5f\x96\x7a\x59\xcf\x58\x67\x6e\x24\x93"
+	"\xb4\x1e\x2d\x6d\x8c\xb9\x9e\xdd\x38\xde\x10\x1f\x56\xbe\xc4\x8d"
+	"\x2f\xeb\x7d\x93\x5c\xdb\xf3\x15\x5a\xa4\x8f\xf3\x92\xd2\x0b\xe8"
+	"\x43\x44\xea\x85\xdc\xbb\x72\x63\x79\x2a\xde\xc0\xca\x68\x3f\x8e"
+	"\x7e\x9c\x93\xd5\x5a\xdc\x8d\x3b\xfb\x79\xbb\x11\xf6\xed\xfa\x9d"
+	"\xba\xde\x2a\x3f\xfa\x86\x86\x74\xfe\x06\xe0\x43\xc9\x32\xbb\x31"
+	"\xdc\x2f\xb3\x1b\xa3\xfd\x78\xc7\xd9\x0d\x70\xff\x81\xb0\xb3\x1f"
+	"\x6e\xdc\xd8\x0b\xe9\x87\xda\xef\x33\x6e\x6a\x72\x59\xe3\xe6\x18"
+	"\x70\x94\x19\xca\x2a\x37\xc0\xb5\x21\xbc\x36\x7d\xfd\x8c\x6b\x48"
+	"\x5f\x3f\xe3\xf6\x9b\xd7\xcf\xb8\x63\x86\x72\x43\x17\xd6\xed\x9b"
+	"\x6c\x06\x7a\xea\x11\x1e\x99\xac\xcb\x37\x8d\x4d\x09\x27\xea\x5f"
+	"\xa0\xfd\xee\x5c\x99\x37\x84\xe3\xe1\x2b\xe7\x28\x5d\xbf\xa9\xd0"
+	"\x98\xfe\x66\xaf\x4a\x67\x1a\x79\x0e\x44\xce\xfd\x29\xb8\xca\x54"
+	"\x38\x86\x31\xa4\xd7\xe9\xb4\xaf\x45\x38\xd5\xbf\x4f\xd8\x6d\xad"
+	"\x1f\x0a\xc6\xb9\x1f\xba\x69\xbf\x1a\x03\x37\x97\x08\xff\xa1\xa2"
+	"\x74\x7d\x0a\x70\xc3\xfe\xdd\xb4\x47\xcd\x01\x35\x97\x40\x8f\x7a"
+	"\x4f\xd1\xcd\x3f\xc6\xbb\x0f\xef\x65\xc9\x7d\xdb\xcd\x39\x18\x7b"
+	"\xcf\xa8\xf7\xa7\xf6\x79\x37\xbb\xe1\xbf\xf4\x3a\xa2\xd5\x45\x26"
+	"\x69\x93\x85\x3f\x63\xba\x49\x3c\xcf\x21\xf4\x86\xe8\xe6\x2d\x4c"
+	"\xa3\x21\xbe\x5c\xf8\x47\x14\x32\x7c\x88\xcb\x43\x1e\xf3\xf9\x81"
+	"\xe6\x92\xa5\x97\x91\x13\x74\x7e\x71\x8a\x6e\xb9\x7e\xa9\x53\x8e"
+	"\x83\x41\xf3\x2d\xab\x52\xca\x69\x4c\x43\xf3\x09\xd0\xfc\x45\x1a"
+	"\x9a\xa5\xdf\x2e\xac\xa0\x7b\x40\xff\x7e\xcb\x48\xd0\xfd\x85\x94"
+	"\x6b\x72\xfc\x38\xdf\xcb\xc4\xf4\xca\x3c\x33\x2a\xfb\xeb\x43\x4b"
+	"\x9f\xea\xd8\x4a\x05\x03\xcb\xba\xa5\x54\xf8\x87\xcd\x08\xd1\x2d"
+	"\x75\x7a\x7f\xa0\xc5\x57\x2a\x1a\x20\x0b\xab\x94\x45\x23\xe7\x4b"
+	"\x57\x8f\x7a\xdb\x63\x39\x74\xfb\x6f\x41\xff\x77\x73\x9d\xde\x67"
+	"\xa2\xbf\x0c\xb3\xac\xb4\xb4\x8e\x94\xb4\x9e\xfe\xb4\x5c\x5b\x52"
+	"\xda\xaa\x44\xfc\x18\x3d\xfe\x02\x75\x01\xf9\xe7\xbe\xc3\x79\x92"
+	"\x79\xcc\xcd\x37\xaf\x83\xdc\x12\xd4\x41\x9f\x79\x1d\xe4\x56\x9a"
+	"\xeb\x4d\x6e\xad\x78\x9e\xcc\x70\xed\x46\xbd\xf4\x71\xbd\x70\x3d"
+	"\x0c\x94\x7f\x6e\x93\x2e\xff\x0b\xf0\x10\x3b\x45\xb7\x2e\xeb\xd7"
+	"\xa7\x5b\xdf\x49\xc6\x73\xeb\x48\x73\x5e\x6e\x1d\x07\x5e\x62\xe6"
+	"\xbc\xdc\x9a\x6f\xce\xcb\xad\x68\x9b\x14\x1b\xa8\x4b\xb7\x7a\x11"
+	"\x6f\x06\xbf\x45\xf8\x4d\xf1\xef\x62\xdf\x21\x44\xb7\x9e\xe0\x39"
+	"\x21\x43\x7c\xa0\xbf\x2d\x81\x6e\xe4\xe1\xf9\xa2\x40\xd5\x6d\xc4"
+	"\xf4\x9c\x72\x91\x75\x30\x79\x80\xff\xcf\x4f\xd1\x6d\xab\xe3\x56"
+	"\xcb\x4e\x25\x8b\xdb\x6f\x4d\x2e\xf7\x36\x97\xb9\x2c\x6e\x9b\x00"
+	"\x59\x7c\x6e\x2e\x8b\xdb\x0a\xcd\x65\x71\xdb\x42\xf0\xfc\xf9\x40"
+	"\x59\xdc\xb6\x56\x97\x05\xc6\x93\x0e\xb1\xad\x58\xdc\xec\x21\x3b"
+	"\xf8\xcc\x71\xa0\x8e\x15\x5c\x27\xc3\xed\x76\xf4\xa8\xfa\x75\x2d"
+	"\x21\xfb\x67\x74\x5b\x9d\xdc\x47\xb2\x6d\xb6\x18\x11\xa6\x61\x0c"
+	"\x1f\xf4\x7e\x1e\x08\xa2\xa7\xe3\x31\x7d\x4a\x19\x1d\xe6\x6d\xf3"
+	"\x76\x96\xd3\xf3\x26\xf1\x4e\xb5\x1f\xe3\xf6\xa9\xc9\x6d\xf6\xf6"
+	"\xdc\x7e\x79\x43\x36\xc8\x63\xd8\x2f\x3b\xe8\x33\x78\x1d\x8c\xbf"
+	"\x5a\xc9\x7f\xfc\x90\x14\x3a\x1a\xcc\xe5\x7f\xfb\xbe\xf4\xf2\xbf"
+	"\xfd\x98\xb9\xfc\x6f\xe7\x39\x9a\xcf\x43\x34\xde\x95\x6c\x8f\xc7"
+	"\xdb\xfa\x79\xba\x9d\xf7\x9b\x38\x84\x7f\xe8\x57\x39\xfc\x65\x79"
+	"\xd3\x1f\xe0\xb7\xd4\xbf\x42\x90\xa9\xe5\xea\xff\x4a\xfe\x74\xcf"
+	"\x96\xd1\xe6\xeb\xa1\x18\x2b\x90\xeb\x4a\x1e\xe7\x8e\xff\x14\xba"
+	"\xd3\x86\xdf\xd6\x53\xf4\xad\x8d\x71\xbf\xb5\x52\x93\xed\x27\xa7"
+	"\xe8\x8e\xf9\x4a\xb6\xdf\x7a\x3a\x59\x1e\xe3\xa3\xe6\xb2\xbd\x63"
+	"\x24\x64\xfb\x89\xb9\x6c\xef\xc8\x4d\xdf\x6f\xdc\x31\x15\xfc\x7f"
+	"\x32\x50\xbf\xef\x28\x55\x79\x68\x0d\xe7\x51\xfb\x42\xef\xf8\x88"
+	"\x61\x94\x1e\xdf\x71\x80\xd3\x59\xe7\x0d\x79\xb6\x02\x57\x51\xbf"
+	"\xae\xdf\x51\xab\xe1\x30\xe2\xdd\xef\x08\x9b\xe9\xf4\x1d\x72\x5d"
+	"\xef\xe6\x88\x94\x4f\xd1\x0e\x2e\x73\x39\xd1\x67\xf4\xad\xeb\x19"
+	"\x8e\xe3\xaf\x75\x1a\x75\xfa\x5b\x36\x1d\x8e\x6d\x8c\x82\xbd\x23"
+	"\x2a\xb6\x95\x11\xc3\x25\xe3\xfe\x96\xc6\xff\xb0\x19\xf5\x1a\x3c"
+	"\xc3\xa5\xc0\x14\xaa\xb6\xf3\xad\xad\xc9\x6d\xe7\x5b\x0b\x93\xfb"
+	"\xbb\xf1\x3c\xde\x72\xc4\xfd\x16\xf8\xbc\xe3\xdb\x41\xc3\x97\xd6"
+	"\x97\x41\xda\x12\xea\xfb\xdb\x4f\xab\xfa\xfe\xf6\x43\x29\x74\x75"
+	"\x9a\xd7\xf7\xb7\x6d\xe9\xeb\xfb\xdb\x2e\xf3\xb6\xf4\xed\x09\x5c"
+	"\xd7\x21\xfa\xf6\xc2\xe4\xb6\xf4\xed\x82\xfe\xb6\xf4\xad\x4e\xd5"
+	"\x96\xe8\x92\x8b\x69\x0b\xf0\x15\xd2\xb6\x3d\xbd\x7d\x7d\x59\x99"
+	"\xa0\x3d\x30\x4d\xd2\xd7\xc1\x18\x7f\x02\xcb\xa8\xc5\x29\xf7\xbc"
+	"\xfb\x4e\xd1\x84\x0a\x9e\xc7\x55\xb2\xba\xf3\x8e\x64\xfe\x26\x38"
+	"\xcd\x65\x35\x21\x17\xb2\xf2\x99\xcb\x6a\xc2\x54\x73\x59\x4d\x28"
+	"\xe5\x3d\xbe\x03\xdb\xc5\x84\x4a\xb6\xfb\xa0\x91\xf7\x50\xb4\x7d"
+	"\x46\x13\x9a\xa5\xfd\xef\x2a\x16\xd0\x3b\x13\xfb\x3f\xa1\xdf\xfe"
+	"\x8f\xe6\x36\x31\x41\xfa\x53\xa2\x0b\xf6\x7f\x2b\x0d\xe3\xbe\xa0"
+	"\xbf\x0f\xc8\x35\xe9\x03\x26\x74\x9a\xf7\x01\x77\xda\xcc\xfb\x80"
+	"\x3b\xc7\x28\x3d\xbe\xb3\x20\x59\x8f\xef\x1c\xdf\x5f\xc7\x90\xd3"
+	"\xff\x4c\x1f\xb0\xf9\x14\xdd\x95\x89\x7e\xb8\x5a\xd5\xc7\x5d\xbf"
+	"\x4d\xa1\x65\x97\x79\x7d\xdc\x19\x40\x7d\x6c\x36\xaf\x8f\x3b\x4f"
+	"\x98\xd7\xc7\x9d\x3c\x7e\xda\x3c\xb0\x3e\xee\xca\xfe\x72\xfd\xf0"
+	"\x5d\xe3\x93\xfb\xe1\xbb\xc6\x7e\xf9\x7e\xf8\x2e\x8f\x79\x1d\xdc"
+	"\x55\x63\x5e\x07\x77\x35\xa8\x3a\xb8\xeb\x58\x72\x1d\xdc\xb5\xaf"
+	"\xbf\x0e\x20\x9b\xff\x7e\x1d\x94\xaa\xf5\xdd\xef\xdc\xd1\x25\xe7"
+	"\xcf\xbe\x33\x2e\x44\xdf\x89\xa8\xf5\x80\xef\x74\xa8\x39\x54\x59"
+	"\x4f\x6f\x02\xc6\x35\xd0\x16\x7f\x27\x5f\x8b\x7b\x64\x60\xbf\xf0"
+	"\x9d\x52\xd8\xc9\xce\xc6\x4a\xb9\xd6\xa3\xea\x09\xf2\xdd\x0c\x38"
+	"\x35\x17\xf0\x9d\xb5\x9c\x17\xf5\x28\xf8\xbb\x14\xb6\xad\x80\x8f"
+	"\x30\x9e\x46\x57\x2c\x45\x7e\xdf\xd9\x73\x31\xfd\x66\x3a\x5e\xd9"
+	"\x3f\x3c\x45\xf7\xcc\x67\x98\x38\xf3\xb5\x9c\xea\x4f\xd1\xc4\x8d"
+	"\x78\x43\xf7\xee\xb9\x2f\xb9\xcc\x89\x63\xcd\x75\x6f\xe2\x44\xd0"
+	"\x5c\x6f\xae\x7b\x13\x8b\xd2\xf7\x93\x13\xe5\x9e\x54\xe8\x58\x7d"
+	"\x5c\xf9\xf2\x97\xce\xab\x0c\xa5\xf8\xf2\x13\xb7\xea\x7d\x5b\x57"
+	"\x26\xea\x66\x39\xcb\xfd\xee\x9b\x34\xfa\xae\x4b\x81\x6d\x54\x65"
+	"\x59\x66\x98\x94\x15\x02\x8d\x6f\xa6\xa1\x31\x6a\xde\x3e\xee\x1e"
+	"\xa9\xd5\xe5\x9b\x22\x33\xb5\x8d\xdc\x0d\xff\xcf\x6c\x6c\x72\xb7"
+	"\x5e\xff\x45\x92\x86\xa4\xfa\xbd\xbb\x34\xb9\x7e\xa9\xa8\x1c\xe3"
+	"\x35\x13\xb8\x0d\x46\x38\xde\x8b\xc3\xb0\xac\x03\x26\xb0\xfb\x52"
+	"\x71\xa6\x81\x0b\x0d\xd0\x2d\xde\x9b\x61\xaa\x5b\xf7\x64\xab\xb6"
+	"\x76\xcf\xc2\xe4\xb6\x76\xcf\xd8\xfe\xb6\x36\xb1\x31\x25\x4f\x5e"
+	"\x72\x9f\x3e\x71\xac\xec\xd3\xa1\x53\xf8\xbd\x97\xeb\xed\x7f\xc0"
+	"\x36\x1e\x3a\x45\xf7\x6a\xfe\xf1\xbd\x29\xf3\x15\xf7\x04\xcc\x75"
+	"\xf3\x9e\x36\xf0\x7c\xc8\xbc\xde\xef\x89\x98\xd7\xfb\xbd\x6c\xff"
+	"\x0e\x69\xe3\xcb\x4b\x67\x54\xe6\x0d\x4b\x49\x1f\x67\x6e\xbb\xee"
+	"\x4d\x33\xff\x71\xef\x1c\x25\xcf\x7b\xb7\x24\xcb\xf3\x5e\xc3\xfc"
+	"\x07\xe8\xff\x9f\xe9\x3f\x82\xa7\x28\xef\x7e\x25\xa3\xfb\x6e\x4a"
+	"\xa1\xa3\xdd\x5c\x46\xf7\x46\x21\xa3\xa0\xb9\x8c\xf2\x9c\xe9\xdb"
+	"\x6f\x1e\xfa\x3f\x0a\x0e\xec\x3f\xf2\xa6\xfa\xb6\xcb\xf9\x11\xd9"
+	"\x0e\x67\x44\xe1\x7f\xfa\xf5\x74\xee\x37\xf2\x78\xfc\x27\x1c\x63"
+	"\xa8\x20\xb8\x35\xca\x7b\x90\x72\x18\xae\xb8\x32\x75\x9d\x24\x4f"
+	"\xf9\xba\x7e\x41\x0e\x6f\x02\xd6\xae\xc3\xa6\xe0\xe4\xfe\x4f\xe8"
+	"\x70\x6a\x5e\xa6\x3a\xc5\x96\xe4\xb5\x9b\xd7\x5b\x5e\x9a\xf6\x7f"
+	"\xdf\x48\x55\x6f\xf7\xa5\x8c\xfd\xee\x1b\x97\xac\xeb\x90\xeb\x45"
+	"\xd4\x1d\xaf\xa3\x98\xd6\xdf\x9a\xd9\x6d\x9e\x2a\xba\xf2\x34\xdd"
+	"\xf7\x37\x89\x1f\x61\xfe\x1e\xaa\x38\x4a\x56\xb1\xe6\x29\xe8\xb1"
+	"\x85\xea\xfd\xa2\x67\xb3\x55\xb4\x6e\xf6\x8b\xd6\x60\xf4\x2c\xfb"
+	"\x6c\x5f\x3d\x49\xf7\xfd\x56\xd1\x27\x7a\x94\x2c\xee\xdb\xc3\xb0"
+	"\xdd\xfe\xfb\x3a\xf4\xf9\xbe\x74\xe5\xf1\xfe\x6c\xc6\x3d\xf8\x1c"
+	"\xef\x77\x73\x21\x83\xb5\xfa\x5a\x2e\xc2\x79\xfd\xfb\x8b\xbe\x3b"
+	"\x15\x69\x5f\xea\xbb\x4e\xc0\x7a\x8d\x78\xd4\x37\x9d\xdf\xdd\xa0"
+	"\xef\x11\xc2\xef\xad\x17\xc0\xa5\xd3\x13\x48\xa1\xa7\x15\x7d\xff"
+	"\x5a\x0d\xc7\x89\xc1\x70\x70\x3d\x29\xfd\xe2\x7a\xfc\x6e\x64\xb0"
+	"\x79\xa2\x0c\x27\x15\xbc\x30\x40\xe7\x27\xb9\x59\xd6\x8c\x23\x5d"
+	"\x1b\x54\x7d\xea\xe4\xcb\x54\x1b\x9c\xf4\x45\x4a\xfe\x32\x35\x77"
+	"\xa8\xfa\xa8\x79\xd1\x54\x1d\x9d\x54\xe3\x88\x98\xe9\xe8\xa4\x06"
+	"\x5d\x47\xe1\xf3\x32\xde\xe3\x29\xe9\x01\xa5\xab\x93\x9d\xe8\x27"
+	"\x0d\xe3\x90\x49\x72\xfc\x20\x2e\x55\x6d\x31\x04\xb8\x94\x7c\x3d"
+	"\xc9\xba\x3c\xa9\x6c\xb0\x79\x58\x8d\xb7\xb7\x14\x6f\x53\x7e\x9c"
+	"\x8c\x6b\xf2\xe4\xc1\x79\x9b\x5c\x6a\xce\xdb\xe4\xca\x64\xde\xa6"
+	"\x3c\x93\x92\x2e\xfd\xfb\xae\x01\x7d\xf0\xe4\xbd\xba\x9f\xea\xba"
+	"\x86\xfd\xcf\x29\x43\xa4\xbf\x5a\x5f\x2c\xc6\xba\xcc\xfc\xd5\xc9"
+	"\xed\x09\x7f\x55\xc2\x4f\x56\xfb\x5e\xeb\xe1\xaf\x36\xa4\x8e\x1b"
+	"\xf2\xe8\x70\x34\xd5\x67\x9d\x32\xd6\x51\x67\x46\xff\x94\x89\x9a"
+	"\x8d\x7c\x7e\xa0\x8d\x9c\x52\xa4\xea\x65\xca\x9e\x64\x1b\x32\xc5"
+	"\x93\x5c\x2f\x93\xeb\x52\xf2\x6d\x49\xae\x97\xc9\x93\xff\xab\xfd"
+	"\x03\x0f\x12\x33\x32\x32\xac\x19\x16\xab\x25\x03\xc9\x60\x93\x86"
+	"\x65\xd8\x32\x86\xe0\x19\xaa\xbd\x87\x59\x33\xac\x36\x3c\x43\xb4"
+	"\xf7\xd0\x94\xf0\x30\xce\x8b\xc7\xa6\xbd\x87\xa4\x84\x87\x5e\x20"
+	"\x7d\x98\x56\xae\x5e\xbe\x2d\x25\x3c\xe4\x02\xe9\x43\xff\x9b\xf9"
+	"\x69\x40\x38\x79\x9f\xd4\xfd\x8b\x96\xcf\x5f\xf8\x44\xa9\x6b\xc5"
+	"\x92\x27\xca\x17\xb8\xe6\x7f\xff\xfb\x0b\x96\x2e\x75\x95\x2f\x76"
+	"\x7d\xf7\xbe\xe9\xb7\xdd\xe5\xca\xf5\x5e\xe7\x1d\xe7\x5a\x78\xf7"
+	"\x75\xa5\x59\xf4\xc0\x8a\x25\x9c\xf0\xc0\x8c\xfb\x8b\x5c\x05\xdf"
+	"\xbd\x2f\x39\x51\x47\xb3\x64\xc1\xfc\xd2\x41\xb1\x18\x6c\x5a\xde"
+	"\xba\x51\x44\x1b\x47\x49\xdb\xd6\xde\x8c\x51\x8e\x1a\xab\x3f\xb6"
+	"\xa0\x69\x27\x91\xe8\xf5\x89\xc0\x35\xbc\xe7\xe2\x7b\x6f\x33\x13"
+	"\x37\x35\x54\x93\xe7\x71\xfe\x8e\xe1\x7b\x1f\x88\x83\x61\x72\xfd"
+	"\x33\x59\x4f\xd2\xea\xcc\x46\x78\x9d\x1c\x0e\xb6\x47\xc9\xe5\x23"
+	"\x3b\xf2\x5f\x82\x34\x8b\xb8\x27\x8e\xb8\x88\xb6\xb7\xf2\x9f\xdf"
+	"\x93\x71\x07\xab\x75\x38\xc7\x29\xca\xaf\x10\x07\x85\x0c\x8b\x7b"
+	"\xb6\x68\x70\xf9\xf7\xc7\xfd\xdf\x93\x6b\xb2\x2f\x5f\x4a\xf6\x97"
+	"\x47\x89\x13\x75\xcf\x93\x6d\xc7\xf3\xbc\x0e\x96\x3f\x31\x64\xfd"
+	"\xd7\xdd\x6c\x5f\xd7\x21\x3e\x44\xab\xed\x5c\x36\xc3\xc6\xad\xdf"
+	"\xbb\x8d\xe1\x25\xec\xa5\x44\x9c\x0f\xf0\x0b\x93\xe1\xf3\xf3\xac"
+	"\x80\x9d\xf6\x29\x39\x7a\xb2\x1a\xf3\x83\x95\xd5\xe4\x88\x89\xbf"
+	"\xdf\x9c\x4f\x96\x16\x8c\x7e\x2a\xa2\x22\x1a\x58\x72\x9a\x69\x38"
+	"\xe0\xa8\x10\x7f\x0f\x46\x88\x1e\xe8\xf4\x89\x4d\x67\xc8\x86\x31"
+	"\xa8\x25\xb0\x84\xf7\x92\xe4\xef\xdc\xf1\x05\xd9\x20\x87\x31\xa7"
+	"\xe9\xfe\x63\x95\x0f\x88\x98\xef\x01\xb2\xbd\xef\xad\x26\xb1\xbe"
+	"\xf9\xa5\x4d\x1f\x92\xed\x97\xbd\xd5\xd6\x5e\xe1\xa4\xca\x72\x5e"
+	"\x9f\x10\xe4\x8b\x88\x1e\x5e\x6f\x6f\x2a\x89\x31\xcc\x0f\xba\x7d"
+	"\x4e\x6a\x29\x8f\xd0\xaa\x13\xa2\xa7\xe6\x43\xb2\xf3\x5c\x57\x73"
+	"\x67\x84\xbf\x2b\xb7\xaf\x7a\x80\x32\x4e\x15\x91\xb5\xb9\x6c\x2b"
+	"\x05\xe7\x44\xa8\xf2\x84\xe8\x68\x2a\xf9\x94\x5a\xca\xf6\x50\x71"
+	"\x1b\x59\x9b\xda\xff\x44\xf2\x5b\xe9\x4d\xb6\x82\xaa\x73\xe4\x5c"
+	"\xf5\x04\xc7\x9d\xa3\x95\xab\x68\xf8\xca\x8f\xc8\x11\xec\x68\x43"
+	"\x39\x67\xe8\xd1\x63\x64\x01\x3e\xeb\xb3\x7f\x22\xe7\xb3\xb3\x78"
+	"\xbf\x66\x1e\xd5\x55\x91\x53\xf8\xdc\xd9\xbd\x3e\x77\x4e\xaf\x70"
+	"\x5f\xda\xed\x73\x8f\x6c\xf1\x00\xbe\xfd\x00\x8d\x68\xa3\x91\x07"
+	"\x4f\xb7\x59\xb7\x9e\xa5\x31\xae\x07\x59\x07\xee\x6f\xad\x3b\x0b"
+	"\xf8\xf5\xc7\x5b\xe3\xc8\x6b\xcc\x13\xcd\x3c\xde\x11\x2c\xea\xa1"
+	"\x38\x70\x6d\xed\xa5\x31\x75\xbd\xe4\x8c\xaf\x3b\xde\xca\xb2\xe8"
+	"\x5b\xdf\x94\x0f\x3b\x38\xec\xcd\xc7\xf6\xd9\x82\x4d\x9d\xd4\x1c"
+	"\xe9\xa5\x16\xfa\x98\x82\xde\xbf\x06\x7e\xf9\xd8\xbe\x21\x71\x34"
+	"\x80\xc0\x4a\xde\xf7\xa2\xf4\xc6\xd7\xcc\xdf\xc8\x55\xd3\xe6\x2a"
+	"\xca\xf6\xac\xa4\x61\xa7\x11\xaf\xc6\xb9\x87\x0a\x82\xd1\xbf\x06"
+	"\x56\xca\xbd\x9a\xab\xed\x55\xcd\x94\xd1\x12\xd9\xca\xdf\x86\x5b"
+	"\x63\x23\x6c\x05\xc1\x48\x2b\x05\x3d\x9f\x04\xe2\xd9\xb6\x09\x1b"
+	"\xe2\x64\x7f\xe3\x7c\xab\x35\x68\x3b\x4f\xc1\xa2\x08\x1d\x42\xd9"
+	"\x62\x93\x6d\x0e\x6c\x56\x5e\x4b\xa4\x87\xbf\x79\xc9\x15\x5d\xce"
+	"\xac\xcd\x4b\x68\xdc\x8e\xb3\x34\x76\xfb\x59\x72\x8b\x6e\xb7\x95"

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
From jhb at freebsd.org  Mon Oct 27 19:21:38 2008
From: jhb at freebsd.org (John Baldwin)
Date: Mon Oct 27 19:22:03 2008
Subject: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil
In-Reply-To: <200810262155.m9QLtJG5096815@svn.freebsd.org>
References: <200810262155.m9QLtJG5096815@svn.freebsd.org>
Message-ID: <200810271422.06751.jhb@freebsd.org>

On Sunday 26 October 2008 05:55:19 pm Ed Schouten wrote:
> Author: ed
> Date: Sun Oct 26 21:55:19 2008
> New Revision: 184300
> URL: http://svn.freebsd.org/changeset/base/184300
> 
> Log:
>   MFC r183565:
>   
>     Small cleanups to openpty().
>   
>     - Pass O_NOCTTY to posix_openpt(2). This makes the implementation work
>       consistently on implementations that make the PTY the controlling TTY
>       by default.
>   
>     - Call unlockpt() before opening the slave device. POSIX mentions that
>       de slave device should only be opened after grantpt() and unlockpt()
>       have been called.
>   
>     - Replace some redundant code by a label.
>   
>   As a safety net, add a call to revoke() to unlockpt(). All applications
>   out there use openpty(), explicitly call revoke() or implement their own
>   PTY allocation routines. Adding the call to unlockpt() won't hurt, but
>   will prevent foot-shooting.
>   
>   Reviewed by:	jhb, kib
>   Approved by:	re

I would perhaps add a note that the duplicate revoke() in openpty() is only to 
support legacy libc's with broken unlockpt() routines.  We could maybe remove 
the revoke()/ptsname() from openpty() on 8.x though as all 8.x machines 
should have a working unlockpt().

-- 
John Baldwin
From ed at 80386.nl  Mon Oct 27 19:40:10 2008
From: ed at 80386.nl (Ed Schouten)
Date: Mon Oct 27 19:40:21 2008
Subject: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil
In-Reply-To: <200810271422.06751.jhb@freebsd.org>
References: <200810262155.m9QLtJG5096815@svn.freebsd.org>
	<200810271422.06751.jhb@freebsd.org>
Message-ID: <20081027194008.GO6808@hoeg.nl>

* John Baldwin  wrote:
> I would perhaps add a note that the duplicate revoke() in openpty() is only to 
> support legacy libc's with broken unlockpt() routines.  We could maybe remove 
> the revoke()/ptsname() from openpty() on 8.x though as all 8.x machines 
> should have a working unlockpt().

Good point, but I'd rather leave revoke() there for at least a couple of
months. If people just download the openpty() source from -CURRENT
through cvsweb and use it as an example for their own application, they
could create a potential security issue when they run the application on
RELENG_*.

Shall we leave the revoke() call there for now, but remove it before we
ship 8.0-RELEASE?

-- 
 Ed Schouten 
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20081027/21db89de/attachment.pgp
From jhb at freebsd.org  Mon Oct 27 20:43:31 2008
From: jhb at freebsd.org (John Baldwin)
Date: Mon Oct 27 20:43:48 2008
Subject: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil
In-Reply-To: <20081027194008.GO6808@hoeg.nl>
References: <200810262155.m9QLtJG5096815@svn.freebsd.org>
	<200810271422.06751.jhb@freebsd.org>
	<20081027194008.GO6808@hoeg.nl>
Message-ID: <200810271634.03328.jhb@freebsd.org>

On Monday 27 October 2008 03:40:08 pm Ed Schouten wrote:
> * John Baldwin  wrote:
> > I would perhaps add a note that the duplicate revoke() in openpty() is 
only to 
> > support legacy libc's with broken unlockpt() routines.  We could maybe 
remove 
> > the revoke()/ptsname() from openpty() on 8.x though as all 8.x machines 
> > should have a working unlockpt().
> 
> Good point, but I'd rather leave revoke() there for at least a couple of
> months. If people just download the openpty() source from -CURRENT
> through cvsweb and use it as an example for their own application, they
> could create a potential security issue when they run the application on
> RELENG_*.
> 
> Shall we leave the revoke() call there for now, but remove it before we
> ship 8.0-RELEASE?

I would go ahead and axe it from 8 now since the safety net bits are in 6.x 
and 7.x already.  I honestly wouldn't expect people to use openpty()'s 
implementation as the reference way to use posix_openpt() and friends.  
Rather, I imagine they would derive that from manpages online or other 
sources.

-- 
John Baldwin
From ed at 80386.nl  Tue Oct 28 06:00:33 2008
From: ed at 80386.nl (Ed Schouten)
Date: Tue Oct 28 06:00:44 2008
Subject: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil
In-Reply-To: <200810271634.03328.jhb@freebsd.org>
References: <200810262155.m9QLtJG5096815@svn.freebsd.org>
	<200810271422.06751.jhb@freebsd.org>
	<20081027194008.GO6808@hoeg.nl>
	<200810271634.03328.jhb@freebsd.org>
Message-ID: <20081028060031.GP6808@hoeg.nl>

* John Baldwin  wrote:
> I would go ahead and axe it from 8 now since the safety net bits are in 6.x 
> and 7.x already.  I honestly wouldn't expect people to use openpty()'s 
> implementation as the reference way to use posix_openpt() and friends.  
> Rather, I imagine they would derive that from manpages online or other 
> sources.

Done. :-)

-- 
 Ed Schouten 
 WWW: http://80386.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-stable-7/attachments/20081028/33ffdeac/attachment.pgp
From des at FreeBSD.org  Tue Oct 28 14:55:42 2008
From: des at FreeBSD.org (Dag-Erling Smorgrav)
Date: Tue Oct 28 14:55:53 2008
Subject: svn commit: r184415 - stable/7/crypto/openssh
Message-ID: <200810281455.m9SEtfbe096757@svn.freebsd.org>

Author: des
Date: Tue Oct 28 14:55:41 2008
New Revision: 184415
URL: http://svn.freebsd.org/changeset/base/184415

Log:
  MFC (r184122): fix UseDNS option.
  
  Approved by:	re (kib)

Modified:
  stable/7/crypto/openssh/   (props changed)
  stable/7/crypto/openssh/loginrec.c
  stable/7/crypto/openssh/sshd.c

Modified: stable/7/crypto/openssh/loginrec.c
==============================================================================
--- stable/7/crypto/openssh/loginrec.c	Tue Oct 28 14:14:57 2008	(r184414)
+++ stable/7/crypto/openssh/loginrec.c	Tue Oct 28 14:55:41 2008	(r184415)
@@ -146,7 +146,6 @@
  */
 
 #include "includes.h"
-__RCSID("$FreeBSD$");
 
 #include 
 #include 
@@ -689,8 +688,8 @@ construct_utmp(struct logininfo *li,
 	strncpy(ut->ut_name, li->username,
 	    MIN_SIZEOF(ut->ut_name, li->username));
 # ifdef HAVE_HOST_IN_UTMP
-	realhostname_sa(ut->ut_host, sizeof ut->ut_host,
-	    &li->hostaddr.sa, li->hostaddr.sa.sa_len);
+	strncpy(ut->ut_host, li->hostname,
+	    MIN_SIZEOF(ut->ut_host, li->hostname));
 # endif
 # ifdef HAVE_ADDR_IN_UTMP
 	/* this is just a 32-bit IP address */

Modified: stable/7/crypto/openssh/sshd.c
==============================================================================
--- stable/7/crypto/openssh/sshd.c	Tue Oct 28 14:14:57 2008	(r184414)
+++ stable/7/crypto/openssh/sshd.c	Tue Oct 28 14:55:41 2008	(r184415)
@@ -72,6 +72,7 @@ __RCSID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -238,7 +239,7 @@ u_char *session_id2 = NULL;
 u_int session_id2_len = 0;
 
 /* record remote hostname or ip */
-u_int utmp_len = MAXHOSTNAMELEN;
+u_int utmp_len = UT_HOSTSIZE;
 
 /* options.max_startup sized array of fd ints */
 int *startup_pipes = NULL;
From des at FreeBSD.org  Tue Oct 28 15:18:00 2008
From: des at FreeBSD.org (Dag-Erling Smorgrav)
Date: Tue Oct 28 15:18:16 2008
Subject: svn commit: r184416 - in stable/7/sys: . dev/puc
Message-ID: <200810281517.m9SFHxkd097172@svn.freebsd.org>

Author: des
Date: Tue Oct 28 15:17:59 2008
New Revision: 184416
URL: http://svn.freebsd.org/changeset/base/184416

Log:
  MFC: (r184258) Add support for the SIIG Cyber 4-port serial card.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/puc/pucdata.c

Modified: stable/7/sys/dev/puc/pucdata.c
==============================================================================
--- stable/7/sys/dev/puc/pucdata.c	Tue Oct 28 14:55:41 2008	(r184415)
+++ stable/7/sys/dev/puc/pucdata.c	Tue Oct 28 15:17:59 2008	(r184416)
@@ -596,6 +596,12 @@ const struct puc_cfg puc_pci_devices[] =
 	 * I/O Flex PCI I/O Card Model-223 with 4 serial and 1 parallel ports.
 	 */
 
+	{   0x1415, 0x9501, 0x131f, 0x2050,
+	    "SIIG Cyber 4 PCI 16550",
+	    DEFAULT_RCLK * 10,
+	    PUC_PORT_4S, 0x10, 0, 8,
+	},
+
 	{   0x1415, 0x9501, 0x131f, 0x2051,
 	    "SIIG Cyber 4S PCI 16C650 (20x family)",
 	    DEFAULT_RCLK * 10,
From csjp at FreeBSD.org  Tue Oct 28 17:01:17 2008
From: csjp at FreeBSD.org (Christian S.J. Peron)
Date: Tue Oct 28 17:01:24 2008
Subject: svn commit: r184417 - in stable/7/sys: . kern
Message-ID: <200810281701.m9SH1H89099158@svn.freebsd.org>

Author: csjp
Date: Tue Oct 28 17:01:16 2008
New Revision: 184417
URL: http://svn.freebsd.org/changeset/base/184417

Log:
  MFC SVN rev 181647
  
  - Reduce the scope of the vnode lock such that it does not
    cover the various copyouts associated with initializing
    the process's argv/env data in userspace.  It is possible
    that these copyout operations can fault under memory
    pressure, possibly resulting in dead locks.
  
  Approved by:	re@ (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/kern_exec.c

Modified: stable/7/sys/kern/kern_exec.c
==============================================================================
--- stable/7/sys/kern/kern_exec.c	Tue Oct 28 15:17:59 2008	(r184416)
+++ stable/7/sys/kern/kern_exec.c	Tue Oct 28 17:01:16 2008	(r184417)
@@ -476,6 +476,11 @@ interpret:
 	}
 
 	/*
+	 * NB: We unlock the vnode here because it is believed that none
+	 * of the sv_copyout_strings/sv_fixup operations require the vnode.
+	 */
+	VOP_UNLOCK(imgp->vp, 0, td);
+	/*
 	 * Copy out strings (args and env) and initialize stack base
 	 */
 	if (p->p_sysent->sv_copyout_strings)
@@ -512,7 +517,6 @@ interpret:
 	}
 
 	/* close files on exec */
-	VOP_UNLOCK(imgp->vp, 0, td);
 	fdcloseexec(td);
 	vn_lock(imgp->vp, LK_EXCLUSIVE | LK_RETRY, td);
 
From edwin at FreeBSD.org  Tue Oct 28 21:08:29 2008
From: edwin at FreeBSD.org (Edwin Groothuis)
Date: Tue Oct 28 21:09:21 2008
Subject: svn commit: r184420 - stable/7/share/zoneinfo
Message-ID: <200810281950.m9SJoXh7002403@svn.freebsd.org>

Author: edwin
Date: Tue Oct 28 19:50:33 2008
New Revision: 184420
URL: http://svn.freebsd.org/changeset/base/184420

Log:
  MFV of r184404 - tzdata2008i
  MFC of r184406
  
  - United States zone reordering and recommenting
  - Argentina DST changes update.
  
  Approved by:	re (kib)

Modified:
  stable/7/share/zoneinfo/   (props changed)
  stable/7/share/zoneinfo/southamerica
  stable/7/share/zoneinfo/zone.tab

Modified: stable/7/share/zoneinfo/southamerica
==============================================================================
--- stable/7/share/zoneinfo/southamerica	Tue Oct 28 19:48:58 2008	(r184419)
+++ stable/7/share/zoneinfo/southamerica	Tue Oct 28 19:50:33 2008	(r184420)
@@ -1,4 +1,4 @@
-# @(#)southamerica	8.30
+# @(#)southamerica	8.33
 # 
 
 # This data is by no means authoritative; if you think you know better,
@@ -193,6 +193,26 @@ Rule	Arg	2000	only	-	Mar	3	0:00	0	-
 # 
 # So there is no summer time in Argentina for now.
 
+# From Mariano Absatz (2008-10-20):
+# Decree 1693/2008 applies Law 26.350 for the summer 2008/2009 establishing DST in Argentina
+# From 2008-10-19 until 2009-03-15
+# 
+# http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=16102008&pi=3&pf=4&s=0&sec=01
+# 
+#
+# Decree 1705/2008 excepting 12 Provinces from applying DST in the summer 2008/2009:
+# Catamarca, La Rioja, Mendoza, Salta, San Juan, San Luis, La Pampa, Neuquen, Rio Negro, Chubut, Santa Cruz
+# and Tierra del Fuego
+# 
+# http://www.boletinoficial.gov.ar/Bora.Portal/CustomControls/PdfContent.aspx?fp=17102008&pi=1&pf=1&s=0&sec=01
+# 
+#
+# Press release 235 dated Saturday October 18th, from the Government of the Province of Jujuy saying
+# it will not apply DST either (even when it was not included in Decree 1705/2008)
+# 
+# http://www.jujuy.gov.ar/index2/partes_prensa/18_10_08/235-181008.doc
+# 
+
 Rule	Arg	2007	only	-	Dec	30	0:00	1:00	S
 Rule	Arg	2008	max	-	Mar	Sun>=15	0:00	0	-
 Rule	Arg	2008	max	-	Oct	Sun>=15	0:00	1:00	S
@@ -343,9 +363,8 @@ Zone America/Argentina/Buenos_Aires -3:5
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	Arg	AR%sT
 #
-# Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN), Chaco (CC),
-# Formosa (FM), Salta (SA), Santiago del Estero (SE), Cordoba (CB),
-# La Pampa (LP), Neuquen (NQ), Rio Negro (RN)
+# Cordoba (CB), Santa Fe (SF), Entre Rios (ER), Corrientes (CN), Misiones (MN),
+# Chaco (CC), Formosa (FM), Santiago del Estero (SE)
 #
 # Shanks & Pottenger also make the following claims, which we haven't verified:
 # - Formosa switched to -3:00 on 1991-01-07.
@@ -364,6 +383,18 @@ Zone America/Argentina/Cordoba -4:16:48 
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	Arg	AR%sT
 #
+# Salta (SA), La Pampa (LP), Neuquen (NQ), Rio Negro (RN)
+Zone America/Argentina/Salta -4:21:40 - LMT	1894 Oct 31
+			-4:16:48 -	CMT	1920 May
+			-4:00	-	ART	1930 Dec
+			-4:00	Arg	AR%sT	1969 Oct  5
+			-3:00	Arg	AR%sT	1991 Mar  3
+			-4:00	-	WART	1991 Oct 20
+			-3:00	Arg	AR%sT	1999 Oct  3
+			-4:00	Arg	AR%sT	2000 Mar  3
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
+#
 # Tucuman (TM)
 Zone America/Argentina/Tucuman -4:20:52 - LMT	1894 Oct 31
 			-4:16:48 -	CMT	1920 May
@@ -388,7 +419,8 @@ Zone America/Argentina/La_Rioja -4:27:24
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 20
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 #
 # San Juan (SJ)
 Zone America/Argentina/San_Juan -4:34:04 - LMT	1894 Oct 31
@@ -401,7 +433,8 @@ Zone America/Argentina/San_Juan -4:34:04
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 May 31
 			-4:00	-	WART	2004 Jul 25
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 #
 # Jujuy (JY)
 Zone America/Argentina/Jujuy -4:21:12 -	LMT	1894 Oct 31
@@ -415,7 +448,8 @@ Zone America/Argentina/Jujuy -4:21:12 -	
 			-3:00	1:00	ARST	1992
 			-3:00	Arg	AR%sT	1999 Oct  3
 			-4:00	Arg	AR%sT	2000 Mar  3
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 #
 # Catamarca (CT), Chubut (CH)
 Zone America/Argentina/Catamarca -4:23:08 - LMT	1894 Oct 31
@@ -428,7 +462,8 @@ Zone America/Argentina/Catamarca -4:23:0
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 20
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 #
 # Mendoza (MZ)
 Zone America/Argentina/Mendoza -4:35:16 - LMT	1894 Oct 31
@@ -445,7 +480,8 @@ Zone America/Argentina/Mendoza -4:35:16 
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 May 23
 			-4:00	-	WART	2004 Sep 26
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 #
 # San Luis (SL)
 Zone America/Argentina/San_Luis -4:25:24 - LMT	1894 Oct 31
@@ -473,7 +509,8 @@ Zone America/Argentina/Rio_Gallegos -4:3
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 Jun  1
 			-4:00	-	WART	2004 Jun 20
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 #
 # Tierra del Fuego, Antartida e Islas del Atlantico Sur (TF)
 Zone America/Argentina/Ushuaia -4:33:12 - LMT 1894 Oct 31
@@ -484,7 +521,8 @@ Zone America/Argentina/Ushuaia -4:33:12 
 			-4:00	Arg	AR%sT	2000 Mar  3
 			-3:00	-	ART	2004 May 30
 			-4:00	-	WART	2004 Jun 20
-			-3:00	Arg	AR%sT
+			-3:00	Arg	AR%sT	2008 Oct 18
+			-3:00	-	ART
 
 # Aruba
 # Zone	NAME		GMTOFF	RULES	FORMAT	[UNTIL]

Modified: stable/7/share/zoneinfo/zone.tab
==============================================================================
--- stable/7/share/zoneinfo/zone.tab	Tue Oct 28 19:48:58 2008	(r184419)
+++ stable/7/share/zoneinfo/zone.tab	Tue Oct 28 19:50:33 2008	(r184420)
@@ -1,4 +1,4 @@
-# @(#)zone.tab	8.19
+# @(#)zone.tab	8.21
 #
 # TZ zone descriptions
 #
@@ -42,14 +42,15 @@ AQ	-7824+10654	Antarctica/Vostok	Vostok 
 AQ	-6640+14001	Antarctica/DumontDUrville	Dumont-d'Urville Station, Terre Adelie
 AQ	-690022+0393524	Antarctica/Syowa	Syowa Station, E Ongul I
 AR	-3436-05827	America/Argentina/Buenos_Aires	Buenos Aires (BA, CF)
-AR	-3124-06411	America/Argentina/Cordoba	most locations (CB, CC, CN, ER, FM, LP, MN, NQ, RN, SA, SE, SF)
-AR	-3319-06621	America/Argentina/San_Luis	San Luis (SL)
+AR	-3124-06411	America/Argentina/Cordoba	most locations (CB, CC, CN, ER, FM, MN, SE, SF)
+AR	-2447-06525	America/Argentina/Salta	(SA, LP, NQ, RN)
 AR	-2411-06518	America/Argentina/Jujuy	Jujuy (JY)
 AR	-2649-06513	America/Argentina/Tucuman	Tucuman (TM)
 AR	-2828-06547	America/Argentina/Catamarca	Catamarca (CT), Chubut (CH)
 AR	-2926-06651	America/Argentina/La_Rioja	La Rioja (LR)
 AR	-3132-06831	America/Argentina/San_Juan	San Juan (SJ)
 AR	-3253-06849	America/Argentina/Mendoza	Mendoza (MZ)
+AR	-3319-06621	America/Argentina/San_Luis	San Luis (SL)
 AR	-5138-06913	America/Argentina/Rio_Gallegos	Santa Cruz (SC)
 AR	-5448-06818	America/Argentina/Ushuaia	Tierra del Fuego (TF)
 AS	-1416-17042	Pacific/Pago_Pago
@@ -384,13 +385,13 @@ US	+381515-0854534	America/Kentucky/Loui
 US	+364947-0845057	America/Kentucky/Monticello	Eastern Time - Kentucky - Wayne County
 US	+394606-0860929	America/Indiana/Indianapolis	Eastern Time - Indiana - most locations
 US	+384038-0873143	America/Indiana/Vincennes	Eastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties
-US	+411745-0863730	America/Indiana/Knox	Eastern Time - Indiana - Starke County
 US	+410305-0863611	America/Indiana/Winamac	Eastern Time - Indiana - Pulaski County
 US	+382232-0862041	America/Indiana/Marengo	Eastern Time - Indiana - Crawford County
+US	+382931-0871643	America/Indiana/Petersburg	Eastern Time - Indiana - Pike County
 US	+384452-0850402	America/Indiana/Vevay	Eastern Time - Indiana - Switzerland County
 US	+415100-0873900	America/Chicago	Central Time
 US	+375711-0864541	America/Indiana/Tell_City	Central Time - Indiana - Perry County
-US	+382931-0871643	America/Indiana/Petersburg	Central Time - Indiana - Pike County
+US	+411745-0863730	America/Indiana/Knox	Central Time - Indiana - Starke County
 US	+450628-0873651	America/Menominee	Central Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties
 US	+470659-1011757	America/North_Dakota/Center	Central Time - North Dakota - Oliver County
 US	+465042-1012439	America/North_Dakota/New_Salem	Central Time - North Dakota - Morton County (except Mandan area)
From delphij at FreeBSD.org  Wed Oct 29 17:27:24 2008
From: delphij at FreeBSD.org (Xin LI)
Date: Wed Oct 29 17:27:31 2008
Subject: svn commit: r184442 - in stable/7/sys: . dev/ata
Message-ID: <200810291727.m9THRNOu028632@svn.freebsd.org>

Author: delphij
Date: Wed Oct 29 17:27:23 2008
New Revision: 184442
URL: http://svn.freebsd.org/changeset/base/184442

Log:
  Partial MFC of recent ATA driver in order to support more new hardware.
  
   - r183380 (sos)
  
  Add support for the ITE 8213 controller.
  Thanks goes to ITE who provided docs and feedback and made this possible.
  
  Minor fixups to the Intel ICH code for bugs found while doing this.
  (ITE8213 is very semilar to an Intel ICH)
  
   - r183552 (sos)
  
  Add ICH10 PCI id's.
  
  Fix the number of PATA ports on newer ICHX chips, they have just 1 port
  not 2.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/ata/ata-chipset.c
  stable/7/sys/dev/ata/ata-pci.h

Modified: stable/7/sys/dev/ata/ata-chipset.c
==============================================================================
--- stable/7/sys/dev/ata/ata-chipset.c	Wed Oct 29 16:17:34 2008	(r184441)
+++ stable/7/sys/dev/ata/ata-chipset.c	Wed Oct 29 17:27:23 2008	(r184442)
@@ -102,7 +102,8 @@ static int ata_intel_31244_status(device
 static void ata_intel_31244_tf_write(struct ata_request *request);
 static void ata_intel_31244_reset(device_t dev);
 static int ata_ite_chipinit(device_t dev);
-static void ata_ite_setmode(device_t dev, int mode);
+static void ata_ite_8213_setmode(device_t dev, int mode);
+static void ata_ite_821x_setmode(device_t dev, int mode);
 static int ata_jmicron_chipinit(device_t dev);
 static int ata_jmicron_allocate(device_t dev);
 static void ata_jmicron_reset(device_t dev);
@@ -1762,58 +1763,66 @@ ata_intel_ident(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
     static struct ata_chip_id ids[] =
-    {{ ATA_I82371FB,     0,    0, 0x00, ATA_WDMA2, "PIIX" },
-     { ATA_I82371SB,     0,    0, 0x00, ATA_WDMA2, "PIIX3" },
-     { ATA_I82371AB,     0,    0, 0x00, ATA_UDMA2, "PIIX4" },
-     { ATA_I82443MX,     0,    0, 0x00, ATA_UDMA2, "PIIX4" },
-     { ATA_I82451NX,     0,    0, 0x00, ATA_UDMA2, "PIIX4" },
-     { ATA_I82801AB,     0,    0, 0x00, ATA_UDMA2, "ICH0" },
-     { ATA_I82801AA,     0,    0, 0x00, ATA_UDMA4, "ICH" },
-     { ATA_I82372FB,     0,    0, 0x00, ATA_UDMA4, "ICH" },
-     { ATA_I82801BA,     0,    0, 0x00, ATA_UDMA5, "ICH2" },
-     { ATA_I82801BA_1,   0,    0, 0x00, ATA_UDMA5, "ICH2" },
-     { ATA_I82801CA,     0,    0, 0x00, ATA_UDMA5, "ICH3" },
-     { ATA_I82801CA_1,   0,    0, 0x00, ATA_UDMA5, "ICH3" },
-     { ATA_I82801DB,     0,    0, 0x00, ATA_UDMA5, "ICH4" },
-     { ATA_I82801DB_1,   0,    0, 0x00, ATA_UDMA5, "ICH4" },
-     { ATA_I82801EB,     0,    0, 0x00, ATA_UDMA5, "ICH5" },
-     { ATA_I82801EB_S1,  0,    0, 0x00, ATA_SA150, "ICH5" },
-     { ATA_I82801EB_R1,  0,    0, 0x00, ATA_SA150, "ICH5" },
-     { ATA_I6300ESB,     0,    0, 0x00, ATA_UDMA5, "6300ESB" },
-     { ATA_I6300ESB_S1,  0,    0, 0x00, ATA_SA150, "6300ESB" },
-     { ATA_I6300ESB_R1,  0,    0, 0x00, ATA_SA150, "6300ESB" },
-     { ATA_I82801FB,     0,    0, 0x00, ATA_UDMA5, "ICH6" },
-     { ATA_I82801FB_S1,  0, AHCI, 0x00, ATA_SA150, "ICH6" },
-     { ATA_I82801FB_R1,  0, AHCI, 0x00, ATA_SA150, "ICH6" },
-     { ATA_I82801FBM,    0, AHCI, 0x00, ATA_SA150, "ICH6M" },
-     { ATA_I82801GB,     0,    0, 0x00, ATA_UDMA5, "ICH7" },
-     { ATA_I82801GB_S1,  0, AHCI, 0x00, ATA_SA300, "ICH7" },
-     { ATA_I82801GB_R1,  0, AHCI, 0x00, ATA_SA300, "ICH7" },
-     { ATA_I82801GB_AH,  0, AHCI, 0x00, ATA_SA300, "ICH7" },
-     { ATA_I82801GBM_S1, 0, AHCI, 0x00, ATA_SA300, "ICH7M" },
-     { ATA_I82801GBM_R1, 0, AHCI, 0x00, ATA_SA300, "ICH7M" },
-     { ATA_I82801GBM_AH, 0, AHCI, 0x00, ATA_SA300, "ICH7M" },
-     { ATA_I63XXESB2,    0,    0, 0x00, ATA_UDMA5, "63XXESB2" },
-     { ATA_I63XXESB2_S1, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" },
-     { ATA_I63XXESB2_S2, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" },
-     { ATA_I63XXESB2_R1, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" },
-     { ATA_I63XXESB2_R2, 0, AHCI, 0x00, ATA_SA300, "63XXESB2" },
-     { ATA_I82801HB_S1,  0, AHCI, 0x00, ATA_SA300, "ICH8" },
-     { ATA_I82801HB_S2,  0, AHCI, 0x00, ATA_SA300, "ICH8" },
-     { ATA_I82801HB_R1,  0, AHCI, 0x00, ATA_SA300, "ICH8" },
-     { ATA_I82801HB_AH4, 0, AHCI, 0x00, ATA_SA300, "ICH8" },
-     { ATA_I82801HB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH8" },
-     { ATA_I82801HBM,    0,    0, 0x00, ATA_UDMA5, "ICH8M" },
-     { ATA_I82801HBM_S1, 0,    0, 0x00, ATA_SA150, "ICH8M" },
-     { ATA_I82801HBM_S2, 0, AHCI, 0x00, ATA_SA300, "ICH8M" },
-     { ATA_I82801HBM_S3, 0, AHCI, 0x00, ATA_SA300, "ICH8M" },
-     { ATA_I82801IB_S1,  0, AHCI, 0x00, ATA_SA300, "ICH9" },
-     { ATA_I82801IB_S2,  0, AHCI, 0x00, ATA_SA300, "ICH9" },
-     { ATA_I82801IB_AH2, 0, AHCI, 0x00, ATA_SA300, "ICH9" },
-     { ATA_I82801IB_AH4, 0, AHCI, 0x00, ATA_SA300, "ICH9" },
-     { ATA_I82801IB_AH6, 0, AHCI, 0x00, ATA_SA300, "ICH9" },
-     { ATA_I82801IB_R1,  0, AHCI, 0x00, ATA_SA300, "ICH9" },
-     { ATA_I31244,       0,    0, 0x00, ATA_SA150, "31244" },
+    {{ ATA_I82371FB,     0,    0, 2, ATA_WDMA2, "PIIX" },
+     { ATA_I82371SB,     0,    0, 2, ATA_WDMA2, "PIIX3" },
+     { ATA_I82371AB,     0,    0, 2, ATA_UDMA2, "PIIX4" },
+     { ATA_I82443MX,     0,    0, 2, ATA_UDMA2, "PIIX4" },
+     { ATA_I82451NX,     0,    0, 2, ATA_UDMA2, "PIIX4" },
+     { ATA_I82801AB,     0,    0, 2, ATA_UDMA2, "ICH0" },
+     { ATA_I82801AA,     0,    0, 2, ATA_UDMA4, "ICH" },
+     { ATA_I82372FB,     0,    0, 2, ATA_UDMA4, "ICH" },
+     { ATA_I82801BA,     0,    0, 2, ATA_UDMA5, "ICH2" },
+     { ATA_I82801BA_1,   0,    0, 2, ATA_UDMA5, "ICH2" },
+     { ATA_I82801CA,     0,    0, 2, ATA_UDMA5, "ICH3" },
+     { ATA_I82801CA_1,   0,    0, 2, ATA_UDMA5, "ICH3" },
+     { ATA_I82801DB,     0,    0, 2, ATA_UDMA5, "ICH4" },
+     { ATA_I82801DB_1,   0,    0, 2, ATA_UDMA5, "ICH4" },
+     { ATA_I82801EB,     0,    0, 2, ATA_UDMA5, "ICH5" },
+     { ATA_I82801EB_S1,  0,    0, 2, ATA_SA150, "ICH5" },
+     { ATA_I82801EB_R1,  0,    0, 2, ATA_SA150, "ICH5" },
+     { ATA_I6300ESB,     0,    0, 2, ATA_UDMA5, "6300ESB" },
+     { ATA_I6300ESB_S1,  0,    0, 2, ATA_SA150, "6300ESB" },
+     { ATA_I6300ESB_R1,  0,    0, 2, ATA_SA150, "6300ESB" },
+     { ATA_I82801FB,     0,    0, 2, ATA_UDMA5, "ICH6" },
+     { ATA_I82801FB_S1,  0, AHCI, 0, ATA_SA150, "ICH6" },
+     { ATA_I82801FB_R1,  0, AHCI, 0, ATA_SA150, "ICH6" },
+     { ATA_I82801FBM,    0, AHCI, 0, ATA_SA150, "ICH6M" },
+     { ATA_I82801GB,     0,    0, 1, ATA_UDMA5, "ICH7" },
+     { ATA_I82801GB_S1,  0, AHCI, 0, ATA_SA300, "ICH7" },
+     { ATA_I82801GB_R1,  0, AHCI, 0, ATA_SA300, "ICH7" },
+     { ATA_I82801GB_AH,  0, AHCI, 0, ATA_SA300, "ICH7" },
+     { ATA_I82801GBM_S1, 0, AHCI, 0, ATA_SA300, "ICH7M" },
+     { ATA_I82801GBM_R1, 0, AHCI, 0, ATA_SA300, "ICH7M" },
+     { ATA_I82801GBM_AH, 0, AHCI, 0, ATA_SA300, "ICH7M" },
+     { ATA_I63XXESB2,    0,    0, 1, ATA_UDMA5, "63XXESB2" },
+     { ATA_I63XXESB2_S1, 0, AHCI, 0, ATA_SA300, "63XXESB2" },
+     { ATA_I63XXESB2_S2, 0, AHCI, 0, ATA_SA300, "63XXESB2" },
+     { ATA_I63XXESB2_R1, 0, AHCI, 0, ATA_SA300, "63XXESB2" },
+     { ATA_I63XXESB2_R2, 0, AHCI, 0, ATA_SA300, "63XXESB2" },
+     { ATA_I82801HB_S1,  0, AHCI, 0, ATA_SA300, "ICH8" },
+     { ATA_I82801HB_S2,  0, AHCI, 0, ATA_SA300, "ICH8" },
+     { ATA_I82801HB_R1,  0, AHCI, 0, ATA_SA300, "ICH8" },
+     { ATA_I82801HB_AH4, 0, AHCI, 0, ATA_SA300, "ICH8" },
+     { ATA_I82801HB_AH6, 0, AHCI, 0, ATA_SA300, "ICH8" },
+     { ATA_I82801HBM,    0,    0, 1, ATA_UDMA5, "ICH8M" },
+     { ATA_I82801HBM_S1, 0, AHCI, 0, ATA_SA300, "ICH8M" },
+     { ATA_I82801HBM_S2, 0, AHCI, 0, ATA_SA300, "ICH8M" },
+     { ATA_I82801HBM_S3, 0, AHCI, 0, ATA_SA300, "ICH8M" },
+     { ATA_I82801IB_S1,  0, AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IB_S2,  0, AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IB_AH2, 0, AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IB_AH4, 0, AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IB_AH6, 0, AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801IB_R1,  0, AHCI, 0, ATA_SA300, "ICH9" },
+     { ATA_I82801JIB_S1, 0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JIB_AH, 0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JIB_R1, 0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JIB_S2, 0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JD_S1,  0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JD_AH,  0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JD_R1,  0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I82801JD_S2,  0, AHCI, 0, ATA_SA300, "ICH10" },
+     { ATA_I31244,       0,    0, 2, ATA_SA150, "31244" },
      { 0, 0, 0, 0, 0, 0}};
 
     if (!(ctlr->chip = ata_match_chip(dev, ids)))
@@ -1855,6 +1864,7 @@ ata_intel_chipinit(device_t dev)
 
     /* non SATA intel chips goes here */
     else if (ctlr->chip->max_dma < ATA_SA150) {
+	ctlr->channels = ctlr->chip->cfg2;
 	ctlr->allocate = ata_intel_allocate;
 	ctlr->setmode = ata_intel_new_setmode;
     }
@@ -1988,52 +1998,54 @@ ata_intel_new_setmode(device_t dev, int 
 	device_printf(dev, "%ssetting %s on %s chip\n",
 		      (error) ? "FAILURE " : "",
 		      ata_mode2str(mode), ctlr->chip->text);
-    if (error)
-	return;
+    if (!error) {
+	if (mode >= ATA_UDMA0) {
+	    u_int8_t utimings[] = { 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10 };
 
-    if (mode >= ATA_UDMA0) {
-	pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2);
-	pci_write_config(gparent, 0x4a,
-			 (reg4a & ~(0x3 << (devno << 2))) |
-			 ((0x01 + !(mode & 0x01)) << (devno << 2)), 2);
-    }
-    else {
-	pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2);
-	pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))), 2);
-    }
-    reg54 |= 0x0400;
-    if (mode >= ATA_UDMA2)
-	pci_write_config(gparent, 0x54, reg54 | (0x1 << devno), 2);
-    else
-	pci_write_config(gparent, 0x54, reg54 & ~(0x1 << devno), 2);
+	    pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2);
+	    pci_write_config(gparent, 0x4a,
+			     (reg4a & ~(0x3 << (devno << 2))) |
+			     (utimings[mode & ATA_MODE_MASK] << (devno<<2)), 2);
+	}
+	else {
+	    pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2);
+	    pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))),2);
+	}
+	reg54 |= 0x0400;
+	if (mode >= ATA_UDMA2)
+	    reg54 |= (0x1 << devno);
+	else
+	    reg54 &= ~(0x1 << devno);
+	if (mode >= ATA_UDMA5)
+	    reg54 |= (0x1000 << devno);
+	else 
+	    reg54 &= ~(0x1000 << devno);
 
-    if (mode >= ATA_UDMA5)
-	pci_write_config(gparent, 0x54, reg54 | (0x1000 << devno), 2);
-    else 
-	pci_write_config(gparent, 0x54, reg54 & ~(0x1000 << devno), 2);
+	pci_write_config(gparent, 0x54, reg54, 2);
 
-    reg40 &= ~0x00ff00ff;
-    reg40 |= 0x40774077;
+	reg40 &= ~0x00ff00ff;
+	reg40 |= 0x40774077;
 
-    if (atadev->unit == ATA_MASTER) {
-	mask40 = 0x3300;
-	new40 = timings[ata_mode2idx(mode)] << 8;
-    }
-    else {
-	mask44 = 0x0f;
-	new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) |
-		(timings[ata_mode2idx(mode)] & 0x03);
-    }
-    if (ch->unit) {
-	mask40 <<= 16;
-	new40 <<= 16;
-	mask44 <<= 4;
-	new44 <<= 4;
-    }
-    pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4);
-    pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1);
+	if (atadev->unit == ATA_MASTER) {
+	    mask40 = 0x3300;
+	    new40 = timings[ata_mode2idx(mode)] << 8;
+	}
+	else {
+	    mask44 = 0x0f;
+	    new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) |
+		    (timings[ata_mode2idx(mode)] & 0x03);
+	}
+	if (ch->unit) {
+	    mask40 <<= 16;
+	    new40 <<= 16;
+	    mask44 <<= 4;
+	    new44 <<= 4;
+	}
+	pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4);
+	pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1);
 
-    atadev->mode = mode;
+	atadev->mode = mode;
+    }
 }
 
 static void
@@ -2193,7 +2205,8 @@ ata_ite_ident(device_t dev)
 {
     struct ata_pci_controller *ctlr = device_get_softc(dev);
     static struct ata_chip_id ids[] =
-    {{ ATA_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8212F" },
+    {{ ATA_IT8213F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8213F" },
+     { ATA_IT8212F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8212F" },
      { ATA_IT8211F, 0x00, 0x00, 0x00, ATA_UDMA6, "IT8211F" },
      { 0, 0, 0, 0, 0, 0}};
 
@@ -2213,19 +2226,28 @@ ata_ite_chipinit(device_t dev)
     if (ata_setup_interrupt(dev))
 	return ENXIO;
 
-    ctlr->setmode = ata_ite_setmode;
+    if (ctlr->chip->chipid == ATA_IT8213F) {
+	/* the ITE 8213F only has one channel */
+	ctlr->channels = 1;
 
-    /* set PCI mode and 66Mhz reference clock */
-    pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) & ~0x83, 1);
+	ctlr->setmode = ata_ite_8213_setmode;
+    }
+    else {
+	/* set PCI mode and 66Mhz reference clock */
+	pci_write_config(dev, 0x50, pci_read_config(dev, 0x50, 1) & ~0x83, 1);
+
+	/* set default active & recover timings */
+	pci_write_config(dev, 0x54, 0x31, 1);
+	pci_write_config(dev, 0x56, 0x31, 1);
+
+	ctlr->setmode = ata_ite_821x_setmode;
+    }
 
-    /* set default active & recover timings */
-    pci_write_config(dev, 0x54, 0x31, 1);
-    pci_write_config(dev, 0x56, 0x31, 1);
     return 0;
 }
  
 static void
-ata_ite_setmode(device_t dev, int mode)
+ata_ite_821x_setmode(device_t dev, int mode)
 {
     device_t gparent = GRANDPARENT(dev);
     struct ata_channel *ch = device_get_softc(device_get_parent(dev));
@@ -2285,6 +2307,80 @@ ata_ite_setmode(device_t dev, int mode)
     }
 }
 
+static void
+ata_ite_8213_setmode(device_t dev, int mode)
+{
+    device_t gparent = GRANDPARENT(dev);
+    struct ata_pci_controller *ctlr = device_get_softc(gparent);
+    struct ata_device *atadev = device_get_softc(dev);
+    u_int16_t reg40 = pci_read_config(gparent, 0x40, 2);
+    u_int8_t reg44 = pci_read_config(gparent, 0x44, 1);
+    u_int8_t reg48 = pci_read_config(gparent, 0x48, 1);
+    u_int16_t reg4a = pci_read_config(gparent, 0x4a, 2);
+    u_int16_t reg54 = pci_read_config(gparent, 0x54, 2);
+    u_int16_t mask40 = 0, new40 = 0;
+    u_int8_t mask44 = 0, new44 = 0;
+    int devno = atadev->unit;
+    int error;
+    u_int8_t timings[] = { 0x00, 0x00, 0x10, 0x21, 0x23, 0x10, 0x21, 0x23,
+			   0x23, 0x23, 0x23, 0x23, 0x23, 0x23 };
+
+    mode = ata_limit_mode(dev, mode, ctlr->chip->max_dma);
+
+    if (mode > ATA_UDMA2 && !(reg54 & (0x10 << devno))) {
+	ata_print_cable(dev, "controller");
+	mode = ATA_UDMA2;
+    }
+
+    error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode);
+
+    if (bootverbose)
+	device_printf(dev, "%ssetting %s on %s chip\n",
+		      (error) ? "FAILURE " : "",
+		      ata_mode2str(mode), ctlr->chip->text);
+    if (!error) {
+	if (mode >= ATA_UDMA0) {
+	    u_int8_t utimings[] = { 0x00, 0x01, 0x10, 0x01, 0x10, 0x01, 0x10 };
+
+	    pci_write_config(gparent, 0x48, reg48 | (0x0001 << devno), 2);
+	    pci_write_config(gparent, 0x4a,
+			     (reg4a & ~(0x3 << (devno << 2))) |
+			     (utimings[mode & ATA_MODE_MASK] << (devno<<2)), 2);
+	}
+	else {
+	    pci_write_config(gparent, 0x48, reg48 & ~(0x0001 << devno), 2);
+	    pci_write_config(gparent, 0x4a, (reg4a & ~(0x3 << (devno << 2))),2);
+	}
+	if (mode >= ATA_UDMA2)
+	    reg54 |= (0x1 << devno);
+	else
+	    reg54 &= ~(0x1 << devno);
+	if (mode >= ATA_UDMA5)
+	    reg54 |= (0x1000 << devno);
+	else 
+	    reg54 &= ~(0x1000 << devno);
+	pci_write_config(gparent, 0x54, reg54, 2);
+
+	reg40 &= 0xff00;
+	reg40 |= 0x4033;
+	if (atadev->unit == ATA_MASTER) {
+	    reg40 |= (ata_atapi(dev) ? 0x04 : 0x00);
+	    mask40 = 0x3300;
+	    new40 = timings[ata_mode2idx(mode)] << 8;
+	}
+	else {
+	    reg40 |= (ata_atapi(dev) ? 0x40 : 0x00);
+	    mask44 = 0x0f;
+	    new44 = ((timings[ata_mode2idx(mode)] & 0x30) >> 2) |
+		    (timings[ata_mode2idx(mode)] & 0x03);
+	}
+	pci_write_config(gparent, 0x40, (reg40 & ~mask40) | new40, 4);
+	pci_write_config(gparent, 0x44, (reg44 & ~mask44) | new44, 1);
+
+	atadev->mode = mode;
+    }
+}
+
 
 /*
  * JMicron chipset support functions
@@ -4517,7 +4613,7 @@ ata_sii_chipinit(device_t dev)
 	ctlr->r_type2 = SYS_RES_MEMORY;
 	ctlr->r_rid2 = PCIR_BAR(5);
 	if (!(ctlr->r_res2 = bus_alloc_resource_any(dev, ctlr->r_type2,
-						    &ctlr->r_rid2, RF_ACTIVE))) {
+						    &ctlr->r_rid2, RF_ACTIVE))){
 	    if (ctlr->chip->chipid != ATA_SII0680 ||
 			    (pci_read_config(dev, 0x8a, 1) & 1))
 		return ENXIO;

Modified: stable/7/sys/dev/ata/ata-pci.h
==============================================================================
--- stable/7/sys/dev/ata/ata-pci.h	Wed Oct 29 16:17:34 2008	(r184441)
+++ stable/7/sys/dev/ata/ata-pci.h	Wed Oct 29 17:27:23 2008	(r184442)
@@ -180,11 +180,20 @@ struct ata_connect_task {
 #define ATA_I82801IB_AH4        0x29238086
 #define ATA_I82801IB_R1         0x29258086
 #define ATA_I82801IB_S2         0x29268086
+#define ATA_I82801JIB_S1        0x3a208086
+#define ATA_I82801JIB_AH        0x3a228086
+#define ATA_I82801JIB_R1        0x3a258086
+#define ATA_I82801JIB_S2        0x3a268086
+#define ATA_I82801JD_S1         0x3a008086
+#define ATA_I82801JD_AH         0x3a028086
+#define ATA_I82801JD_R1         0x3a058086
+#define ATA_I82801JD_S2         0x3a068086
 #define ATA_I31244              0x32008086
 
 #define ATA_ITE_ID              0x1283
 #define ATA_IT8211F             0x82111283
 #define ATA_IT8212F             0x82121283
+#define ATA_IT8213F             0x82131283
 
 #define ATA_JMICRON_ID          0x197b
 #define ATA_JMB360              0x2360197b
From delphij at FreeBSD.org  Wed Oct 29 19:52:24 2008
From: delphij at FreeBSD.org (Xin LI)
Date: Wed Oct 29 19:52:35 2008
Subject: svn commit: r184451 - stable/7/share/man/man4
Message-ID: <200810291952.m9TJqOr0031568@svn.freebsd.org>

Author: delphij
Date: Wed Oct 29 19:52:24 2008
New Revision: 184451
URL: http://svn.freebsd.org/changeset/base/184451

Log:
  MFC recent ata(4) manual page updates:
  
   - r183613 by delphij
     Note recently added ICH10 support
  
   - r183570 by brueffer
     ITE IT8213F support.
  
   - r181826 by simon
     Fix mdoc markup in r181825.
  
  Approved by:	re (kib)

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

Modified: stable/7/share/man/man4/ata.4
==============================================================================
--- stable/7/share/man/man4/ata.4	Wed Oct 29 19:32:32 2008	(r184450)
+++ stable/7/share/man/man4/ata.4	Wed Oct 29 19:52:24 2008	(r184451)
@@ -27,7 +27,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd August 31, 2008
+.Dd October 4, 2008
 .Dt ATA 4
 .Os
 .Sh NAME
@@ -121,9 +121,9 @@ Cyrix 5530.
 .It HighPoint:
 HPT302, HPT366, HPT368, HPT370, HPT371, HPT372, HPT372N, HPT374.
 .It Intel:
-6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9.
+6300ESB, 31244, PIIX, PIIX3, PIIX4, ESB2, ICH, ICH0, ICH2, ICH3, ICH4, ICH5, ICH6, ICH7, ICH8, ICH9, ICH10.
 .It ITE:
-IT8211F, IT8212F.
+IT8211F, IT8212F, IT8213F.
 .It JMicron:
 JMB360, JMB361, JMB363, JMB365, JMB366, JMB368.
 .It Marvell
@@ -171,7 +171,8 @@ the
 driver has detected that the required 80 conductor cable is not present
 or could not be detected properly,
 or that one of the devices on the channel only accepts up
-to UDMA2/ATA33. The
+to UDMA2/ATA33.
+The
 .Va hw.ata.ata_dma_check_80pin
 tunable can be set to 0 to disable this check.
 .Pp
From sobomax at FreeBSD.org  Wed Oct 29 21:08:35 2008
From: sobomax at FreeBSD.org (Maxim Sobolev)
Date: Wed Oct 29 21:08:46 2008
Subject: svn commit: r184454 - in stable/7/sys: . amd64/amd64 i386/i386
Message-ID: <200810292108.m9TL8YNR033085@svn.freebsd.org>

Author: sobomax
Date: Wed Oct 29 21:08:34 2008
New Revision: 184454
URL: http://svn.freebsd.org/changeset/base/184454

Log:
  MFC: don't panic when HZ value is below 32. This change may need a bit
  of refinement later, as bde says that 4BSD expects stathz of 128, while
  in this case stathz would be in the range 40-128.
  
  Approved by:	re (kib, kensmith)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/amd64/amd64/local_apic.c
  stable/7/sys/i386/i386/local_apic.c

Modified: stable/7/sys/amd64/amd64/local_apic.c
==============================================================================
--- stable/7/sys/amd64/amd64/local_apic.c	Wed Oct 29 20:19:54 2008	(r184453)
+++ stable/7/sys/amd64/amd64/local_apic.c	Wed Oct 29 21:08:34 2008	(r184454)
@@ -401,7 +401,10 @@ lapic_setup_clock(void)
 		lapic_timer_hz = hz * 2;
 	else
 		lapic_timer_hz = hz * 4;
-	stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+	if (lapic_timer_hz < 128)
+		stathz = lapic_timer_hz;
+	else
+		stathz = lapic_timer_hz / (lapic_timer_hz / 128);
 	profhz = lapic_timer_hz;
 	lapic_timer_period = value / lapic_timer_hz;
 

Modified: stable/7/sys/i386/i386/local_apic.c
==============================================================================
--- stable/7/sys/i386/i386/local_apic.c	Wed Oct 29 20:19:54 2008	(r184453)
+++ stable/7/sys/i386/i386/local_apic.c	Wed Oct 29 21:08:34 2008	(r184454)
@@ -403,7 +403,10 @@ lapic_setup_clock(void)
 		lapic_timer_hz = hz * 2;
 	else
 		lapic_timer_hz = hz * 4;
-	stathz = lapic_timer_hz / (lapic_timer_hz / 128);
+	if (lapic_timer_hz < 128)
+		stathz = lapic_timer_hz;
+	else
+		stathz = lapic_timer_hz / (lapic_timer_hz / 128);
 	profhz = lapic_timer_hz;
 	lapic_timer_period = value / lapic_timer_hz;
 
From thompsa at FreeBSD.org  Wed Oct 29 21:43:14 2008
From: thompsa at FreeBSD.org (Andrew Thompson)
Date: Wed Oct 29 21:43:31 2008
Subject: svn commit: r184457 - in stable/7/sys: . libkern
Message-ID: <200810292143.m9TLhEgT033911@svn.freebsd.org>

Author: thompsa
Date: Wed Oct 29 21:43:14 2008
New Revision: 184457
URL: http://svn.freebsd.org/changeset/base/184457

Log:
  MFC r183733
  
   Prefix the static shl function with '__' like its parent function __qdivrem to
   avoid being picked up by the DTrace fbt provider.
  
   This is called by __udivdi3() for doing 64bit division on a 32bit arch and may
   be called from within the dtrace context causing a double fault.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/libkern/qdivrem.c

Modified: stable/7/sys/libkern/qdivrem.c
==============================================================================
--- stable/7/sys/libkern/qdivrem.c	Wed Oct 29 21:31:01 2008	(r184456)
+++ stable/7/sys/libkern/qdivrem.c	Wed Oct 29 21:43:14 2008	(r184457)
@@ -59,7 +59,7 @@ typedef u_long digit;
  * We may assume len >= 0.  NOTE THAT THIS WRITES len+1 DIGITS.
  */
 static void
-shl(register digit *p, register int len, register int sh)
+__shl(register digit *p, register int len, register int sh)
 {
 	register int i;
 
@@ -182,8 +182,8 @@ __qdivrem(uq, vq, arq)
 	for (t = v[1]; t < B / 2; t <<= 1)
 		d++;
 	if (d > 0) {
-		shl(&u[0], m + n, d);		/* u <<= d */
-		shl(&v[1], n - 1, d);		/* v <<= d */
+		__shl(&u[0], m + n, d);		/* u <<= d */
+		__shl(&v[1], n - 1, d);		/* v <<= d */
 	}
 	/*
 	 * D2: j = 0.
From nwhitehorn at FreeBSD.org  Thu Oct 30 04:01:12 2008
From: nwhitehorn at FreeBSD.org (Nathan Whitehorn)
Date: Thu Oct 30 04:01:30 2008
Subject: svn commit: r184461 - in stable/7/sys: . dev/bm powerpc/include
	powerpc/powermac
Message-ID: <200810300401.m9U41CMT040921@svn.freebsd.org>

Author: nwhitehorn
Date: Thu Oct 30 04:01:11 2008
New Revision: 184461
URL: http://svn.freebsd.org/changeset/base/184461

Log:
  MFC r183288,183411,183827,184382:
  
  Expand DBDMA API to allow setting device-dependent control bits and allow
  DBDMA registers to lie in a subregion of a resource.
  
  Also import changes to the BMAC driver to handle these changes and
  change the way we enable the BMAC cell in macio. Instead of calling the
  macio's enable-enet word, which apparently does nothing on some machines,
  open an OF instance of the ethernet controller. This fixes cold booting
  from disk on my Blue & White G3.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/bm/if_bm.c
  stable/7/sys/powerpc/include/dbdma.h
  stable/7/sys/powerpc/powermac/dbdma.c
  stable/7/sys/powerpc/powermac/dbdmavar.h

Modified: stable/7/sys/dev/bm/if_bm.c
==============================================================================
--- stable/7/sys/dev/bm/if_bm.c	Thu Oct 30 03:31:33 2008	(r184460)
+++ stable/7/sys/dev/bm/if_bm.c	Thu Oct 30 04:01:11 2008	(r184461)
@@ -488,9 +488,9 @@ bm_attach(device_t dev)
 		return (ENXIO);
 	}
 
-	error = dbdma_allocate_channel(sc->sc_txdmar, bus_get_dma_tag(dev),
+	error = dbdma_allocate_channel(sc->sc_txdmar, 0, bus_get_dma_tag(dev),
 	    BM_MAX_DMA_COMMANDS, &sc->sc_txdma);
-	error += dbdma_allocate_channel(sc->sc_rxdmar, bus_get_dma_tag(dev),
+	error += dbdma_allocate_channel(sc->sc_rxdmar, 0, bus_get_dma_tag(dev),
 	    BM_MAX_DMA_COMMANDS, &sc->sc_rxdma);
 
 	if (error) {
@@ -1119,21 +1119,25 @@ bm_chip_setup(struct bm_softc *sc)
 {
 	uint16_t reg;
 	uint16_t *eaddr_sect;
-	char hrow_path[128];
-	ihandle_t hrow_ih;
+	char path[128];
+	ihandle_t bmac_ih;
 
 	eaddr_sect = (uint16_t *)(sc->sc_enaddr);
 
-	/* Enable BMAC cell */
-	OF_package_to_path(OF_parent(ofw_bus_get_node(sc->sc_dev)),
-	    hrow_path, sizeof(hrow_path));
-	hrow_ih = OF_open(hrow_path);
-	if (hrow_ih == -1) {
+	/* 
+	 * Enable BMAC cell by opening and closing its OF node. This enables 
+	 * the cell in macio as a side effect. We should probably directly 
+	 * twiddle the FCR bits, but we lack a good interface for this at the
+	 * present time. 
+	 */
+
+	OF_package_to_path(ofw_bus_get_node(sc->sc_dev), path, sizeof(path));
+	bmac_ih = OF_open(path);
+	if (bmac_ih == -1) {
 		device_printf(sc->sc_dev,
 		    "Enabling BMAC cell failed! Hoping it's already active.\n");
 	} else {
-		OF_call_method("enable-enet", hrow_ih, 0, 0);
-		OF_close(hrow_ih);
+		OF_close(bmac_ih);
 	}
 
 	/* Reset chip */

Modified: stable/7/sys/powerpc/include/dbdma.h
==============================================================================
--- stable/7/sys/powerpc/include/dbdma.h	Thu Oct 30 03:31:33 2008	(r184460)
+++ stable/7/sys/powerpc/include/dbdma.h	Thu Oct 30 04:01:11 2008	(r184461)
@@ -78,15 +78,12 @@ typedef struct dbdma_command dbdma_comma
 struct dbdma_channel;
 typedef struct dbdma_channel dbdma_channel_t;
 
-int dbdma_allocate_channel(struct resource *dbdma_regs,
+int dbdma_allocate_channel(struct resource *dbdma_regs, u_int offset,
     bus_dma_tag_t parent_dma, int slots, dbdma_channel_t **chan);
 
 int dbdma_resize_channel(dbdma_channel_t *chan, int newslots);
 int dbdma_free_channel(dbdma_channel_t *chan);
 
-uint16_t dbdma_get_cmd_status(dbdma_channel_t *chan, int slot);
-uint16_t dbdma_get_residuals(dbdma_channel_t *chan, int slot);
-
 void dbdma_run(dbdma_channel_t *chan);
 void dbdma_stop(dbdma_channel_t *chan);
 void dbdma_reset(dbdma_channel_t *chan);
@@ -95,8 +92,43 @@ void dbdma_set_current_cmd(dbdma_channel
 void dbdma_pause(dbdma_channel_t *chan);
 void dbdma_wake(dbdma_channel_t *chan);
 
+/*
+ * DBDMA uses a 16 bit channel control register to describe the current
+ * state of DMA on the channel. The high-order bits (8-15) contain information
+ * on the run state and are listed in the DBDMA_STATUS_* constants above. These
+ * are manipulated with the dbdma_run/stop/reset() routines above.
+ *
+ * The low order bits (0-7) are device dependent status bits. These can be set
+ * and read by both hardware and software. The mask is the set of bits to 
+ * modify; if mask is 0x03 and value is 0, the lowest order 2 bits will be
+ * zeroed.
+ */
+
 uint16_t dbdma_get_chan_status(dbdma_channel_t *chan);
-uint8_t dbdma_get_chan_device_status(dbdma_channel_t *chan);
+
+uint8_t dbdma_get_device_status(dbdma_channel_t *chan);
+void dbdma_set_device_status(dbdma_channel_t *chan, uint8_t mask,
+    uint8_t value);
+
+/*
+ * Each DBDMA command word has the current channel status register and the
+ * number of residual bytes (requested - actually transferred) written to it
+ * at time of command completion.
+ */
+
+uint16_t dbdma_get_cmd_status(dbdma_channel_t *chan, int slot);
+uint16_t dbdma_get_residuals(dbdma_channel_t *chan, int slot);
+
+void dbdma_clear_cmd_status(dbdma_channel_t *chan, int slot);
+
+/*
+ * The interrupt/branch/wait selector let you specify a set of values
+ * of the device dependent status bits that will cause intterupt/branch/wait
+ * conditions to be taken if the flags for these are set to one of the 
+ * DBDMA_COND_* values.
+ * 
+ * The condition is considered true if (status & mask) == value.
+ */
 
 void dbdma_set_interrupt_selector(dbdma_channel_t *chan, uint8_t mask,
     uint8_t value);

Modified: stable/7/sys/powerpc/powermac/dbdma.c
==============================================================================
--- stable/7/sys/powerpc/powermac/dbdma.c	Thu Oct 30 03:31:33 2008	(r184460)
+++ stable/7/sys/powerpc/powermac/dbdma.c	Thu Oct 30 04:01:11 2008	(r184461)
@@ -56,8 +56,8 @@ dbdma_phys_callback(void *chan, bus_dma_
 }
 
 int
-dbdma_allocate_channel(struct resource *dbdma_regs, bus_dma_tag_t parent_dma,
-    int slots, dbdma_channel_t **chan)
+dbdma_allocate_channel(struct resource *dbdma_regs, u_int offset,
+    bus_dma_tag_t parent_dma, int slots, dbdma_channel_t **chan)
 {
 	int error = 0;
 	dbdma_channel_t *channel;
@@ -65,8 +65,8 @@ dbdma_allocate_channel(struct resource *
 	channel = *chan = malloc(sizeof(struct dbdma_channel), M_DBDMA, 
 	    M_WAITOK | M_ZERO);
 
-	channel->sc_bt = rman_get_bustag(dbdma_regs);
-	channel->sc_bh = rman_get_bushandle(dbdma_regs);
+	channel->sc_regs = dbdma_regs;
+	channel->sc_off = offset;
 	dbdma_stop(channel);
 
 	channel->sc_slots_pa = 0;
@@ -82,6 +82,8 @@ dbdma_allocate_channel(struct resource *
 	error = bus_dmamap_load(channel->sc_dmatag, channel->sc_dmamap,
 	    channel->sc_slots, PAGE_SIZE, dbdma_phys_callback, channel, 0);
 
+	dbdma_write_reg(channel, CHAN_CMDPTR_HI, 0);
+
 	channel->sc_nslots = slots;
 
 	return (error);
@@ -91,7 +93,7 @@ int
 dbdma_resize_channel(dbdma_channel_t *chan, int newslots)
 {
 
-	if (newslots > (PAGE_SIZE / 16))
+	if (newslots > (PAGE_SIZE / sizeof(struct dbdma_command)))
 		return (-1);
 	
 	chan->sc_nslots = newslots;
@@ -125,6 +127,13 @@ dbdma_get_cmd_status(dbdma_channel_t *ch
 	return (le16toh(chan->sc_slots[slot].resCount));
 }
 
+void
+dbdma_clear_cmd_status(dbdma_channel_t *chan, int slot)
+{
+	/* See endian note above */
+	chan->sc_slots[slot].resCount = 0;
+}
+
 uint16_t
 dbdma_get_residuals(dbdma_channel_t *chan, int slot)
 {
@@ -150,7 +159,8 @@ dbdma_run(dbdma_channel_t *chan)
 
 	control_reg = DBDMA_STATUS_RUN | DBDMA_STATUS_PAUSE |
 	    DBDMA_STATUS_WAKE | DBDMA_STATUS_DEAD;
-	control_reg <<= 16;
+	control_reg <<= DBDMA_REG_MASK_SHIFT;
+
 	control_reg |= DBDMA_STATUS_RUN;
 	dbdma_write_reg(chan, CHAN_CONTROL_REG, control_reg);
 }
@@ -161,7 +171,8 @@ dbdma_pause(dbdma_channel_t *chan)
 	uint32_t control_reg;
 
 	control_reg = DBDMA_STATUS_PAUSE;
-	control_reg <<= 16;
+	control_reg <<= DBDMA_REG_MASK_SHIFT;
+
 	control_reg |= DBDMA_STATUS_PAUSE;
 	dbdma_write_reg(chan, CHAN_CONTROL_REG, control_reg);
 }
@@ -173,7 +184,8 @@ dbdma_wake(dbdma_channel_t *chan)
 
 	control_reg = DBDMA_STATUS_WAKE | DBDMA_STATUS_PAUSE |
 	    DBDMA_STATUS_RUN | DBDMA_STATUS_DEAD;
-	control_reg <<= 16;
+	control_reg <<= DBDMA_REG_MASK_SHIFT;
+
 	control_reg |= DBDMA_STATUS_WAKE | DBDMA_STATUS_RUN;
 	dbdma_write_reg(chan, CHAN_CONTROL_REG, control_reg);
 }
@@ -184,7 +196,8 @@ dbdma_stop(dbdma_channel_t *chan)
 	uint32_t control_reg;
 
 	control_reg = DBDMA_STATUS_RUN;
-	control_reg <<= 16;
+	control_reg <<= DBDMA_REG_MASK_SHIFT;
+
 	dbdma_write_reg(chan, CHAN_CONTROL_REG, control_reg);
 
 	while (dbdma_read_reg(chan, CHAN_STATUS_REG) & DBDMA_STATUS_ACTIVE)
@@ -196,7 +209,7 @@ dbdma_set_current_cmd(dbdma_channel_t *c
 {
 	uint32_t cmd;
 
-	cmd = chan->sc_slots_pa + slot * 16;
+	cmd = chan->sc_slots_pa + slot * sizeof(struct dbdma_command);
 	dbdma_write_reg(chan, CHAN_CMDPTR, cmd);
 }
 
@@ -210,19 +223,31 @@ dbdma_get_chan_status(dbdma_channel_t *c
 }
 
 uint8_t
-dbdma_get_chan_device_status(dbdma_channel_t *chan)
+dbdma_get_device_status(dbdma_channel_t *chan)
 {
-
 	return (dbdma_get_chan_status(chan) & 0x00ff);
 }
 
 void
+dbdma_set_device_status(dbdma_channel_t *chan, uint8_t mask, uint8_t value)
+{
+	uint32_t control_reg;
+	
+	control_reg = mask;
+	control_reg <<= DBDMA_REG_MASK_SHIFT;
+	control_reg |= value;
+
+	dbdma_write_reg(chan, CHAN_CONTROL_REG, control_reg);
+}
+
+void
 dbdma_set_interrupt_selector(dbdma_channel_t *chan, uint8_t mask, uint8_t val)
 {
 	uint32_t intr_select;
 
 	intr_select = mask;
-	intr_select <<= 16;
+	intr_select <<= DBDMA_REG_MASK_SHIFT;
+
 	intr_select |= val;
 	dbdma_write_reg(chan, CHAN_INTR_SELECT, intr_select);
 }
@@ -233,7 +258,8 @@ dbdma_set_branch_selector(dbdma_channel_
 	uint32_t br_select;
 
 	br_select = mask;
-	br_select <<= 16;
+	br_select <<= DBDMA_REG_MASK_SHIFT;
+
 	br_select |= val;
 	dbdma_write_reg(chan, CHAN_BRANCH_SELECT, br_select);
 }
@@ -244,7 +270,7 @@ dbdma_set_wait_selector(dbdma_channel_t 
 	uint32_t wait_select;
 
 	wait_select = mask;
-	wait_select <<= 16;
+	wait_select <<= DBDMA_REG_MASK_SHIFT;
 	wait_select |= val;
 	dbdma_write_reg(chan, CHAN_WAIT_SELECT, wait_select);
 }
@@ -266,7 +292,8 @@ dbdma_insert_command(dbdma_channel_t *ch
 	cmd.reqCount = count;
 	cmd.address = (uint32_t)(data);
 	if (command != DBDMA_STORE_QUAD && command != DBDMA_LOAD_QUAD)
-		cmd.cmdDep = chan->sc_slots_pa + branch_slot * 16;
+		cmd.cmdDep = chan->sc_slots_pa + 
+		    branch_slot * sizeof(struct dbdma_command);
 	else
 		cmd.cmdDep = branch_slot;
 
@@ -320,12 +347,12 @@ static uint32_t
 dbdma_read_reg(dbdma_channel_t *chan, u_int offset)
 {
 
-	return (bus_space_read_4(chan->sc_bt, chan->sc_bh, offset));
+	return (bus_read_4(chan->sc_regs, chan->sc_off + offset));
 }
 
 static void
 dbdma_write_reg(dbdma_channel_t *chan, u_int offset, uint32_t val)
 {
 
-	bus_space_write_4(chan->sc_bt, chan->sc_bh, offset, val);
+	bus_write_4(chan->sc_regs, chan->sc_off + offset, val);
 }

Modified: stable/7/sys/powerpc/powermac/dbdmavar.h
==============================================================================
--- stable/7/sys/powerpc/powermac/dbdmavar.h	Thu Oct 30 03:31:33 2008	(r184460)
+++ stable/7/sys/powerpc/powermac/dbdmavar.h	Thu Oct 30 04:01:11 2008	(r184461)
@@ -51,8 +51,8 @@ struct dbdma_command {
 };
 
 struct dbdma_channel {
-	bus_space_tag_t		sc_bt;
-	bus_space_handle_t	sc_bh;
+	struct resource 	*sc_regs;
+	u_int			sc_off;
 
 	struct dbdma_command	*sc_slots;
 	int			sc_nslots;
@@ -78,6 +78,7 @@ struct dbdma_channel {
 
 #define CHAN_CONTROL_REG	0x00
 #define	CHAN_STATUS_REG		0x04
+#define CHAN_CMDPTR_HI		0x08
 #define CHAN_CMDPTR		0x0C
 #define	CHAN_INTR_SELECT	0x10
 #define CHAN_BRANCH_SELECT	0x14
@@ -86,6 +87,8 @@ struct dbdma_channel {
 /* Channel control is the write channel to channel status, the upper 16 bits
    are a mask of which bytes to change */
 
+#define	DBDMA_REG_MASK_SHIFT	16
+
 /* Status bits 0-7 are device dependent status bits */
 
 /*
From delphij at FreeBSD.org  Thu Oct 30 04:55:13 2008
From: delphij at FreeBSD.org (Xin LI)
Date: Thu Oct 30 04:55:25 2008
Subject: svn commit: r184463 - in stable/7/release/doc/zh_CN.GB2312:
	hardware relnotes
Message-ID: <200810300455.m9U4tDmx041936@svn.freebsd.org>

Author: delphij
Date: Thu Oct 30 04:55:12 2008
New Revision: 184463
URL: http://svn.freebsd.org/changeset/base/184463

Log:
  Sync with English revisions.
  
  Approved by:	re (hrs)

Modified:
  stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml
  stable/7/release/doc/zh_CN.GB2312/relnotes/article.sgml

Modified: stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml
==============================================================================
--- stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml	Thu Oct 30 04:16:40 2008	(r184462)
+++ stable/7/release/doc/zh_CN.GB2312/hardware/article.sgml	Thu Oct 30 04:55:12 2008	(r184463)
@@ -88,7 +88,7 @@
     
 
     
-      &intel; 64-位 &xeon; (Nacona)。
+      &intel; 64-位 &xeon; (Nocona)。
 	这类处理器采用 90nm 制程工艺制造, 配合 &intel; E7520/E7525/E7320 芯片组,
 	能够运行于 2.80 到 3.60 GHz (FSB 800MHz)。
     
@@ -392,7 +392,7 @@
 
 
 
-
+
 
 
 
@@ -129,7 +129,7 @@
     对内核的改动
     
     为内核调试器 &man.ddb.4; 新增了输出捕捉机制。
-      来自 &man.ddb.4; 的輸入和输出内容会自动捕捉到一个内存缓冲区,
+      来自 &man.ddb.4; 的输入和输出内容会自动捕捉到一个内存缓冲区,
       以便在随后通过 &man.sysctl.8; 或 textdump 来读取和分析。
       新增的 capture 命令可以控制这个功能。
 
@@ -253,6 +253,12 @@
     OpenPAM 从
       Figwort 版升级到了 Hydrangea 版。
 
+    OpenSSH 从
+      4.5p1 版升级到了 5.1p1 版。
+
+    sendmail 从
+      8.14.2 版升级到了 8.14.3 版。
+
     时区数据库从
       tzdata2007h 版升级到了
       tzdata2008b 版。
From jhb at FreeBSD.org  Thu Oct 30 13:14:46 2008
From: jhb at FreeBSD.org (John Baldwin)
Date: Thu Oct 30 13:15:03 2008
Subject: svn commit: r184469 - in stable/7/sys: . compat/freebsd32 kern sys
Message-ID: <200810301314.m9UDEjMp052282@svn.freebsd.org>

Author: jhb
Date: Thu Oct 30 13:14:45 2008
New Revision: 184469
URL: http://svn.freebsd.org/changeset/base/184469

Log:
  MFC: Split most of getdirentries() out into a kern_getdirentries() and add
  a freebsd32 frontend to fix a data corruption bug with 32-bit binaries.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/compat/freebsd32/freebsd32_misc.c
  stable/7/sys/compat/freebsd32/syscalls.master
  stable/7/sys/kern/vfs_syscalls.c
  stable/7/sys/sys/syscallsubr.h

Modified: stable/7/sys/compat/freebsd32/freebsd32_misc.c
==============================================================================
--- stable/7/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 30 13:10:33 2008	(r184468)
+++ stable/7/sys/compat/freebsd32/freebsd32_misc.c	Thu Oct 30 13:14:45 2008	(r184469)
@@ -1724,6 +1724,24 @@ freebsd32_ftruncate(struct thread *td, s
 	return (ftruncate(td, &ap));
 }
 
+int
+freebsd32_getdirentries(struct thread *td,
+    struct freebsd32_getdirentries_args *uap)
+{
+	long base;
+	int32_t base32;
+	int error;
+
+	error = kern_getdirentries(td, uap->fd, uap->buf, uap->count, &base);
+	if (error)
+		return (error);
+	if (uap->basep != NULL) {
+		base32 = base;
+		error = copyout(&base32, uap->basep, sizeof(int32_t));
+	}
+	return (error);
+}
+
 #ifdef COMPAT_FREEBSD6
 /* versions with the 'int pad' argument */
 int

Modified: stable/7/sys/compat/freebsd32/syscalls.master
==============================================================================
--- stable/7/sys/compat/freebsd32/syscalls.master	Thu Oct 30 13:10:33 2008	(r184468)
+++ stable/7/sys/compat/freebsd32/syscalls.master	Thu Oct 30 13:14:45 2008	(r184469)
@@ -350,8 +350,8 @@
 195	AUE_SETRLIMIT	NOPROTO	{ int setrlimit(u_int which, \
 				    struct rlimit *rlp); } setrlimit \
 				    __setrlimit_args int
-196	AUE_GETDIRENTRIES	NOPROTO	{ int getdirentries(int fd, char *buf, \
-				    u_int count, long *basep); }
+196	AUE_GETDIRENTRIES	STD	{ int freebsd32_getdirentries(int fd, \
+				    char *buf, u_int count, int32_t *basep); }
 197	AUE_MMAP	COMPAT6	{ caddr_t freebsd32_mmap(caddr_t addr, \
 				    size_t len, int prot, int flags, int fd, \
 				    int pad, u_int32_t poslo, \

Modified: stable/7/sys/kern/vfs_syscalls.c
==============================================================================
--- stable/7/sys/kern/vfs_syscalls.c	Thu Oct 30 13:10:33 2008	(r184468)
+++ stable/7/sys/kern/vfs_syscalls.c	Thu Oct 30 13:14:45 2008	(r184469)
@@ -3761,6 +3761,21 @@ getdirentries(td, uap)
 		long *basep;
 	} */ *uap;
 {
+	long base;
+	int error;
+
+	error = kern_getdirentries(td, uap->fd, uap->buf, uap->count, &base);
+	if (error)
+		return (error);
+	if (uap->basep != NULL)
+		error = copyout(&base, uap->basep, sizeof(long));
+	return (error);
+}
+
+int
+kern_getdirentries(struct thread *td, int fd, char *buf, u_int count,
+    long *basep)
+{
 	struct vnode *vp;
 	struct file *fp;
 	struct uio auio;
@@ -3769,8 +3784,8 @@ getdirentries(td, uap)
 	long loff;
 	int error, eofflag;
 
-	AUDIT_ARG(fd, uap->fd);
-	if ((error = getvnode(td->td_proc->p_fd, uap->fd, &fp)) != 0)
+	AUDIT_ARG(fd, fd);
+	if ((error = getvnode(td->td_proc->p_fd, fd, &fp)) != 0)
 		return (error);
 	if ((fp->f_flag & FREAD) == 0) {
 		fdrop(fp, td);
@@ -3784,14 +3799,14 @@ unionread:
 		error = EINVAL;
 		goto fail;
 	}
-	aiov.iov_base = uap->buf;
-	aiov.iov_len = uap->count;
+	aiov.iov_base = buf;
+	aiov.iov_len = count;
 	auio.uio_iov = &aiov;
 	auio.uio_iovcnt = 1;
 	auio.uio_rw = UIO_READ;
 	auio.uio_segflg = UIO_USERSPACE;
 	auio.uio_td = td;
-	auio.uio_resid = uap->count;
+	auio.uio_resid = count;
 	/* vn_lock(vp, LK_SHARED | LK_RETRY, td); */
 	vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
 	AUDIT_ARG(vnode, vp, ARG_VNODE1);
@@ -3808,7 +3823,7 @@ unionread:
 		VFS_UNLOCK_GIANT(vfslocked);
 		goto fail;
 	}
-	if (uap->count == auio.uio_resid &&
+	if (count == auio.uio_resid &&
 	    (vp->v_vflag & VV_ROOT) &&
 	    (vp->v_mount->mnt_flag & MNT_UNION)) {
 		struct vnode *tvp = vp;
@@ -3823,10 +3838,8 @@ unionread:
 	}
 	VOP_UNLOCK(vp, 0, td);
 	VFS_UNLOCK_GIANT(vfslocked);
-	if (uap->basep != NULL) {
-		error = copyout(&loff, uap->basep, sizeof(long));
-	}
-	td->td_retval[0] = uap->count - auio.uio_resid;
+	*basep = loff;
+	td->td_retval[0] = count - auio.uio_resid;
 fail:
 	fdrop(fp, td);
 	return (error);

Modified: stable/7/sys/sys/syscallsubr.h
==============================================================================
--- stable/7/sys/sys/syscallsubr.h	Thu Oct 30 13:10:33 2008	(r184468)
+++ stable/7/sys/sys/syscallsubr.h	Thu Oct 30 13:14:45 2008	(r184469)
@@ -84,6 +84,8 @@ int	kern_fstat(struct thread *td, int fd
 int	kern_fstatfs(struct thread *td, int fd, struct statfs *buf);
 int	kern_futimes(struct thread *td, int fd, struct timeval *tptr,
 	    enum uio_seg tptrseg);
+int	kern_getdirentries(struct thread *td, int fd, char *buf, u_int count,
+	    long *basep);
 int	kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize,
 	    enum uio_seg bufseg, int flags);
 int	kern_getgroups(struct thread *td, u_int *ngrp, gid_t *groups);
From jhb at FreeBSD.org  Thu Oct 30 14:30:50 2008
From: jhb at FreeBSD.org (John Baldwin)
Date: Thu Oct 30 14:31:02 2008
Subject: svn commit: r184472 - stable/7/sys/compat/freebsd32
Message-ID: <200810301430.m9UEUnEV053704@svn.freebsd.org>

Author: jhb
Date: Thu Oct 30 14:30:49 2008
New Revision: 184472
URL: http://svn.freebsd.org/changeset/base/184472

Log:
  Regen for freebsd32_getdirentries().
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/compat/freebsd32/freebsd32_proto.h
  stable/7/sys/compat/freebsd32/freebsd32_syscall.h
  stable/7/sys/compat/freebsd32/freebsd32_syscalls.c
  stable/7/sys/compat/freebsd32/freebsd32_sysent.c

Modified: stable/7/sys/compat/freebsd32/freebsd32_proto.h
==============================================================================
--- stable/7/sys/compat/freebsd32/freebsd32_proto.h	Thu Oct 30 14:05:57 2008	(r184471)
+++ stable/7/sys/compat/freebsd32/freebsd32_proto.h	Thu Oct 30 14:30:49 2008	(r184472)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 183644 2008-10-06 16:11:08Z obrien 
+ * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb 
  */
 
 #ifndef _FREEBSD32_SYSPROTO_H_
@@ -152,6 +152,12 @@ struct freebsd32_lstat_args {
 	char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)];
 	char ub_l_[PADL_(struct stat32 *)]; struct stat32 * ub; char ub_r_[PADR_(struct stat32 *)];
 };
+struct freebsd32_getdirentries_args {
+	char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
+	char buf_l_[PADL_(char *)]; char * buf; char buf_r_[PADR_(char *)];
+	char count_l_[PADL_(u_int)]; u_int count; char count_r_[PADR_(u_int)];
+	char basep_l_[PADL_(int32_t *)]; int32_t * basep; char basep_r_[PADR_(int32_t *)];
+};
 struct freebsd32_sysctl_args {
 	char name_l_[PADL_(int *)]; int * name; char name_r_[PADR_(int *)];
 	char namelen_l_[PADL_(u_int)]; u_int namelen; char namelen_r_[PADR_(u_int)];
@@ -390,6 +396,7 @@ int	freebsd32_shmsys(struct thread *, st
 int	freebsd32_stat(struct thread *, struct freebsd32_stat_args *);
 int	freebsd32_fstat(struct thread *, struct freebsd32_fstat_args *);
 int	freebsd32_lstat(struct thread *, struct freebsd32_lstat_args *);
+int	freebsd32_getdirentries(struct thread *, struct freebsd32_getdirentries_args *);
 int	freebsd32_sysctl(struct thread *, struct freebsd32_sysctl_args *);
 int	freebsd32_futimes(struct thread *, struct freebsd32_futimes_args *);
 int	freebsd32_semctl(struct thread *, struct freebsd32_semctl_args *);
@@ -599,6 +606,7 @@ int	freebsd6_freebsd32_ftruncate(struct 
 #define	FREEBSD32_SYS_AUE_freebsd32_stat	AUE_STAT
 #define	FREEBSD32_SYS_AUE_freebsd32_fstat	AUE_FSTAT
 #define	FREEBSD32_SYS_AUE_freebsd32_lstat	AUE_LSTAT
+#define	FREEBSD32_SYS_AUE_freebsd32_getdirentries	AUE_GETDIRENTRIES
 #define	FREEBSD32_SYS_AUE_freebsd32_sysctl	AUE_SYSCTL
 #define	FREEBSD32_SYS_AUE_freebsd32_futimes	AUE_FUTIMES
 #define	FREEBSD32_SYS_AUE_freebsd32_semctl	AUE_SEMCTL

Modified: stable/7/sys/compat/freebsd32/freebsd32_syscall.h
==============================================================================
--- stable/7/sys/compat/freebsd32/freebsd32_syscall.h	Thu Oct 30 14:05:57 2008	(r184471)
+++ stable/7/sys/compat/freebsd32/freebsd32_syscall.h	Thu Oct 30 14:30:49 2008	(r184472)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 183644 2008-10-06 16:11:08Z obrien 
+ * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb 
  */
 
 #define	FREEBSD32_SYS_syscall	0
@@ -177,7 +177,7 @@
 #define	FREEBSD32_SYS_fpathconf	192
 #define	FREEBSD32_SYS_getrlimit	194
 #define	FREEBSD32_SYS_setrlimit	195
-#define	FREEBSD32_SYS_getdirentries	196
+#define	FREEBSD32_SYS_freebsd32_getdirentries	196
 #define	FREEBSD32_SYS_freebsd6_freebsd32_mmap	197
 #define	FREEBSD32_SYS___syscall	198
 #define	FREEBSD32_SYS_freebsd6_freebsd32_lseek	199

Modified: stable/7/sys/compat/freebsd32/freebsd32_syscalls.c
==============================================================================
--- stable/7/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Oct 30 14:05:57 2008	(r184471)
+++ stable/7/sys/compat/freebsd32/freebsd32_syscalls.c	Thu Oct 30 14:30:49 2008	(r184472)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 183644 2008-10-06 16:11:08Z obrien 
+ * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb 
  */
 
 const char *freebsd32_syscallnames[] = {
@@ -203,7 +203,7 @@ const char *freebsd32_syscallnames[] = {
 	"#193",			/* 193 = nosys */
 	"getrlimit",			/* 194 = getrlimit */
 	"setrlimit",			/* 195 = setrlimit */
-	"getdirentries",			/* 196 = getdirentries */
+	"freebsd32_getdirentries",			/* 196 = freebsd32_getdirentries */
 	"compat6.freebsd32_mmap",		/* 197 = old freebsd32_mmap */
 	"__syscall",			/* 198 = __syscall */
 	"compat6.freebsd32_lseek",		/* 199 = old freebsd32_lseek */

Modified: stable/7/sys/compat/freebsd32/freebsd32_sysent.c
==============================================================================
--- stable/7/sys/compat/freebsd32/freebsd32_sysent.c	Thu Oct 30 14:05:57 2008	(r184471)
+++ stable/7/sys/compat/freebsd32/freebsd32_sysent.c	Thu Oct 30 14:30:49 2008	(r184472)
@@ -3,7 +3,7 @@
  *
  * DO NOT EDIT-- this file is automatically generated.
  * $FreeBSD$
- * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 183644 2008-10-06 16:11:08Z obrien 
+ * created from FreeBSD: stable/7/sys/compat/freebsd32/syscalls.master 184469 2008-10-30 13:14:45Z jhb 
  */
 
 #include "opt_compat.h"
@@ -234,7 +234,7 @@ struct sysent freebsd32_sysent[] = {
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },			/* 193 = nosys */
 	{ AS(__getrlimit_args), (sy_call_t *)getrlimit, AUE_GETRLIMIT, NULL, 0, 0 },	/* 194 = getrlimit */
 	{ AS(__setrlimit_args), (sy_call_t *)setrlimit, AUE_SETRLIMIT, NULL, 0, 0 },	/* 195 = setrlimit */
-	{ AS(getdirentries_args), (sy_call_t *)getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0 },	/* 196 = getdirentries */
+	{ AS(freebsd32_getdirentries_args), (sy_call_t *)freebsd32_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0 },	/* 196 = freebsd32_getdirentries */
 	{ compat6(AS(freebsd6_freebsd32_mmap_args),freebsd32_mmap), AUE_MMAP, NULL, 0, 0 },	/* 197 = old freebsd32_mmap */
 	{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0 },		/* 198 = __syscall */
 	{ compat6(AS(freebsd6_freebsd32_lseek_args),freebsd32_lseek), AUE_LSEEK, NULL, 0, 0 },	/* 199 = old freebsd32_lseek */
From bz at FreeBSD.org  Thu Oct 30 08:48:56 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Thu Oct 30 08:49:10 2008
Subject: svn commit: r184474 - in stable/7/sys: . netinet
Message-ID: <200810301548.m9UFmta2055210@svn.freebsd.org>

Author: bz
Date: Thu Oct 30 15:48:55 2008
New Revision: 184474
URL: http://svn.freebsd.org/changeset/base/184474

Log:
  MFC: r182855
  
    There is no real consumer of ip6_plen (IPv6 payload length)
    as set in tcpip_fillheaders().
    ip6_output() will calculate it based of the length from the
    mbuf packet header itself.
    Initialize the value in tcpip_fillheaders() in correct
    (network) byte order.
  
    With the above change, all places calling tcp_trace() pass in
    the ip6 header serialized in the mbuf as ipgen and with
    ip6_plen in network byte order.  Thus convert the IPv6 payload
    length to host byte order before printing.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/netinet/tcp_debug.c
  stable/7/sys/netinet/tcp_subr.c

Modified: stable/7/sys/netinet/tcp_debug.c
==============================================================================
--- stable/7/sys/netinet/tcp_debug.c	Thu Oct 30 15:27:13 2008	(r184473)
+++ stable/7/sys/netinet/tcp_debug.c	Thu Oct 30 15:48:55 2008	(r184474)
@@ -171,7 +171,7 @@ tcp_trace(short act, short ostate, struc
 		ack = th->th_ack;
 		len =
 #ifdef INET6
-		    isipv6 ? ((struct ip6_hdr *)ipgen)->ip6_plen :
+		    isipv6 ? ntohs(((struct ip6_hdr *)ipgen)->ip6_plen) :
 #endif
 		    ((struct ip *)ipgen)->ip_len;
 		if (act == TA_OUTPUT) {

Modified: stable/7/sys/netinet/tcp_subr.c
==============================================================================
--- stable/7/sys/netinet/tcp_subr.c	Thu Oct 30 15:27:13 2008	(r184473)
+++ stable/7/sys/netinet/tcp_subr.c	Thu Oct 30 15:48:55 2008	(r184474)
@@ -344,7 +344,7 @@ tcpip_fillheaders(struct inpcb *inp, voi
 		ip6->ip6_vfc = (ip6->ip6_vfc & ~IPV6_VERSION_MASK) |
 			(IPV6_VERSION & IPV6_VERSION_MASK);
 		ip6->ip6_nxt = IPPROTO_TCP;
-		ip6->ip6_plen = sizeof(struct tcphdr);
+		ip6->ip6_plen = htons(sizeof(struct tcphdr));
 		ip6->ip6_src = inp->in6p_laddr;
 		ip6->ip6_dst = inp->in6p_faddr;
 	} else
From bz at FreeBSD.org  Thu Oct 30 08:56:05 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Thu Oct 30 08:56:22 2008
Subject: svn commit: r184475 - in stable/7/sys: . net
Message-ID: <200810301556.m9UFu4SM055397@svn.freebsd.org>

Author: bz
Date: Thu Oct 30 15:56:04 2008
New Revision: 184475
URL: http://svn.freebsd.org/changeset/base/184475

Log:
  MFC: r182106
  
  Make the checks for ptp interfaces in ifa_ifwithdstaddr() and
  ifa_ifwithnet() look more similar by comparing the pointer to NULL
  in both cases.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/net/if.c

Modified: stable/7/sys/net/if.c
==============================================================================
--- stable/7/sys/net/if.c	Thu Oct 30 15:48:55 2008	(r184474)
+++ stable/7/sys/net/if.c	Thu Oct 30 15:56:04 2008	(r184475)
@@ -1172,7 +1172,7 @@ ifa_ifwithdstaddr(struct sockaddr *addr)
 		TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) {
 			if (ifa->ifa_addr->sa_family != addr->sa_family)
 				continue;
-			if (ifa->ifa_dstaddr &&
+			if (ifa->ifa_dstaddr != NULL &&
 			    sa_equal(addr, ifa->ifa_dstaddr))
 				goto done;
 		}
@@ -1226,7 +1226,7 @@ next:				continue;
 				 * The trouble is that we don't know the
 				 * netmask for the remote end.
 				 */
-				if (ifa->ifa_dstaddr != 0 &&
+				if (ifa->ifa_dstaddr != NULL &&
 				    sa_equal(addr, ifa->ifa_dstaddr))
 					goto done;
 			} else {
From bz at FreeBSD.org  Thu Oct 30 09:09:08 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Thu Oct 30 09:09:19 2008
Subject: svn commit: r184476 - in stable/7/sys: . netinet6
Message-ID: <200810301609.m9UG98k6055678@svn.freebsd.org>

Author: bz
Date: Thu Oct 30 16:09:08 2008
New Revision: 184476
URL: http://svn.freebsd.org/changeset/base/184476

Log:
  MFC: r182915
  
    mld_timerresid() returns ms so instead of doing the maths in usec
    and then dividing down to ms, do the maths in ms.
  
  Obtained from:	NetBSD mld6.c rev. 1.47
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/netinet6/mld6.c

Modified: stable/7/sys/netinet6/mld6.c
==============================================================================
--- stable/7/sys/netinet6/mld6.c	Thu Oct 30 15:56:04 2008	(r184475)
+++ stable/7/sys/netinet6/mld6.c	Thu Oct 30 16:09:08 2008	(r184476)
@@ -203,7 +203,7 @@ mld_timerresid(struct in6_multi *in6m)
 	}
 
 	/* return the remaining time in milliseconds */
-	return (((u_long)(diff.tv_sec * 1000000 + diff.tv_usec)) / 1000);
+	return (diff.tv_sec * 1000 + diff.tv_usec / 1000);
 }
 
 void
From bz at FreeBSD.org  Thu Oct 30 09:15:12 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Thu Oct 30 09:15:29 2008
Subject: svn commit: r184478 - in stable/7/sys: . netinet6
Message-ID: <200810301615.m9UGFCVa055879@svn.freebsd.org>

Author: bz
Date: Thu Oct 30 16:15:12 2008
New Revision: 184478
URL: http://svn.freebsd.org/changeset/base/184478

Log:
  MFC: r183611
  
    Style changes: compare pointer to NULL and move a }.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/netinet6/in6_pcb.c

Modified: stable/7/sys/netinet6/in6_pcb.c
==============================================================================
--- stable/7/sys/netinet6/in6_pcb.c	Thu Oct 30 16:11:07 2008	(r184477)
+++ stable/7/sys/netinet6/in6_pcb.c	Thu Oct 30 16:15:12 2008	(r184478)
@@ -255,8 +255,7 @@ in6_pcbbind(register struct inpcb *inp, 
 		int e;
 		if ((e = in6_pcbsetport(&inp->in6p_laddr, inp, cred)) != 0)
 			return (e);
-	}
-	else {
+	} else {
 		inp->inp_lport = lport;
 		if (in_pcbinshash(inp) != 0) {
 			inp->in6p_laddr = in6addr_any;
@@ -325,7 +324,7 @@ in6_pcbladdr(register struct inpcb *inp,
 		return(error);
 	}
 
-	if (*plocal_addr6 == 0) {
+	if (*plocal_addr6 == NULL) {
 		if (error == 0)
 			error = EADDRNOTAVAIL;
 		return (error);
From bz at FreeBSD.org  Thu Oct 30 09:20:43 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Thu Oct 30 09:20:59 2008
Subject: svn commit: r184479 - in stable/7/sys: . dev/lmc
Message-ID: <200810301620.m9UGKh4W056034@svn.freebsd.org>

Author: bz
Date: Thu Oct 30 16:20:42 2008
New Revision: 184479
URL: http://svn.freebsd.org/changeset/base/184479

Log:
  MFC: r182112
  
    Make lmc(4) compile without INET6 defined. While here make it
    compile if there is no INET defined.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/dev/lmc/if_lmc.c

Modified: stable/7/sys/dev/lmc/if_lmc.c
==============================================================================
--- stable/7/sys/dev/lmc/if_lmc.c	Thu Oct 30 16:15:12 2008	(r184478)
+++ stable/7/sys/dev/lmc/if_lmc.c	Thu Oct 30 16:20:42 2008	(r184479)
@@ -80,6 +80,12 @@
 # ifdef HAVE_KERNEL_OPTION_HEADERS
 # include "opt_device_polling.h" /* DEVICE_POLLING */
 # endif
+# ifndef INET
+#  define INET 0
+# endif
+# ifndef INET6
+#  define INET6 0
+# endif
 # ifndef NETGRAPH
 #  define NETGRAPH 0
 # endif
From bz at FreeBSD.org  Thu Oct 30 09:29:05 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Thu Oct 30 09:29:12 2008
Subject: svn commit: r184481 - in stable/7/sys: . contrib/pf/net netinet
	netinet6
Message-ID: <200810301629.m9UGT4rY056290@svn.freebsd.org>

Author: bz
Date: Thu Oct 30 16:29:04 2008
New Revision: 184481
URL: http://svn.freebsd.org/changeset/base/184481

Log:
  MFC: r183606, r183610
  
    Cache so_cred as inp_cred in the inpcb.
    This means that inp_cred is always there, even after the socket
    has gone away. It also means that it is constant for the lifetime
    of the inp.
    Both facts lead to simpler code and possibly less locking.
  
  Approved by:	re (gnn)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/contrib/pf/net/pf.c
  stable/7/sys/netinet/in_pcb.c
  stable/7/sys/netinet/in_pcb.h
  stable/7/sys/netinet/ip_fw2.c
  stable/7/sys/netinet/raw_ip.c
  stable/7/sys/netinet/tcp_subr.c
  stable/7/sys/netinet/udp_usrreq.c
  stable/7/sys/netinet6/in6_pcb.c
  stable/7/sys/netinet6/udp6_usrreq.c

Modified: stable/7/sys/contrib/pf/net/pf.c
==============================================================================
--- stable/7/sys/contrib/pf/net/pf.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/contrib/pf/net/pf.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -2938,13 +2938,9 @@ pf_socket_lookup(int direction, struct p
 #ifdef __FreeBSD__
 	if (inp_arg != NULL) {
 		INP_LOCK_ASSERT(inp_arg);
-		if (inp_arg->inp_socket) {
-			pd->lookup.uid = inp_arg->inp_socket->so_cred->cr_uid;
-			pd->lookup.gid =
-			    inp_arg->inp_socket->so_cred->cr_groups[0];
-			return (1);
-		} else
-			return (-1);
+		pd->lookup.uid = inp_arg->inp_cred->cr_uid;
+		pd->lookup.gid = inp_arg->inp_cred->cr_groups[0];
+		return (1);
 	}
 #endif
 	switch (pd->proto) {
@@ -3040,15 +3036,9 @@ pf_socket_lookup(int direction, struct p
 		return (-1);
 	}
 #ifdef __FreeBSD__
-	INP_RLOCK(inp);
+	pd->lookup.uid = inp->inp_cred->cr_uid;
+	pd->lookup.gid = inp->inp_cred->cr_groups[0];
 	INP_INFO_RUNLOCK(pi);
-	if ((inp->inp_socket == NULL) || (inp->inp_socket->so_cred == NULL)) {
-		INP_RUNLOCK(inp);
-		return (-1);
-	}
-	pd->lookup.uid = inp->inp_socket->so_cred->cr_uid;
-	pd->lookup.gid = inp->inp_socket->so_cred->cr_groups[0];
-	INP_RUNLOCK(inp);
 #else
 	pd->lookup.uid = inp->inp_socket->so_euid;
 	pd->lookup.gid = inp->inp_socket->so_egid;

Modified: stable/7/sys/netinet/in_pcb.c
==============================================================================
--- stable/7/sys/netinet/in_pcb.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet/in_pcb.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -186,6 +186,7 @@ in_pcballoc(struct socket *so, struct in
 	bzero(inp, inp_zero_size);
 	inp->inp_pcbinfo = pcbinfo;
 	inp->inp_socket = so;
+	inp->inp_cred = crhold(so->so_cred);
 	inp->inp_inc.inc_fibnum = so->so_fibnum;
 #ifdef MAC
 	error = mac_init_inpcb(inp, M_NOWAIT);
@@ -224,8 +225,10 @@ in_pcballoc(struct socket *so, struct in
 
 #if defined(IPSEC) || defined(MAC)
 out:
-	if (error != 0)
+	if (error != 0) {
+		crfree(inp->inp_cred);
 		uma_zfree(pcbinfo->ipi_zone, inp);
+	}
 #endif
 	return (error);
 }
@@ -345,7 +348,7 @@ in_pcbbind_setup(struct inpcb *inp, stru
 			if (jailed(cred))
 				prison = 1;
 			if (!IN_MULTICAST(ntohl(sin->sin_addr.s_addr)) &&
-			    priv_check_cred(so->so_cred,
+			    priv_check_cred(inp->inp_cred,
 			    PRIV_NETINET_REUSEPORT, 0) != 0) {
 				t = in_pcblookup_local(pcbinfo, sin->sin_addr,
 				    lport, prison ? 0 : INPLOOKUP_WILDCARD,
@@ -362,8 +365,8 @@ in_pcbbind_setup(struct inpcb *inp, stru
 				     ntohl(t->inp_laddr.s_addr) != INADDR_ANY ||
 				     (t->inp_socket->so_options &
 					 SO_REUSEPORT) == 0) &&
-				    (so->so_cred->cr_uid !=
-				     t->inp_socket->so_cred->cr_uid))
+				    (inp->inp_cred->cr_uid !=
+				     t->inp_cred->cr_uid))
 					return (EADDRINUSE);
 			}
 			if (prison && prison_ip(cred, 0, &sin->sin_addr.s_addr))
@@ -745,6 +748,7 @@ in_pcbfree(struct inpcb *inp)
 	if (inp->inp_moptions != NULL)
 		inp_freemoptions(inp->inp_moptions);
 	inp->inp_vflag = 0;
+	crfree(inp->inp_cred);
 
 #ifdef MAC
 	mac_destroy_inpcb(inp);

Modified: stable/7/sys/netinet/in_pcb.h
==============================================================================
--- stable/7/sys/netinet/in_pcb.h	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet/in_pcb.h	Thu Oct 30 16:29:04 2008	(r184481)
@@ -169,7 +169,8 @@ struct inpcb {
 	u_char	inp_ip_p;		/* (c) protocol proto */
 	u_char	inp_ip_minttl;		/* (i) minimum TTL or drop */
 	uint32_t inp_ispare1;		/* (x) connection id / queue id */
-	void	*inp_pspare[2];		/* (x) rtentry / general use */
+	void	*inp_pspare;		/* (x) rtentry / general use */
+	struct	ucred	*inp_cred;	/* (c) cache of socket cred */
 
 	/* Local and foreign ports, local and foreign addr. */
 	struct	in_conninfo inp_inc;

Modified: stable/7/sys/netinet/ip_fw2.c
==============================================================================
--- stable/7/sys/netinet/ip_fw2.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet/ip_fw2.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -1962,15 +1962,11 @@ fill_ugid_cache(struct inpcb *inp, struc
 {
 	struct ucred *cr;
 
-	if (inp->inp_socket != NULL) {
-		cr = inp->inp_socket->so_cred;
-		ugp->fw_prid = jailed(cr) ?
-		    cr->cr_prison->pr_id : -1;
-		ugp->fw_uid = cr->cr_uid;
-		ugp->fw_ngroups = cr->cr_ngroups;
-		bcopy(cr->cr_groups, ugp->fw_groups,
-		    sizeof(ugp->fw_groups));
-	}
+	cr = inp->inp_cred;
+	ugp->fw_prid = jailed(cr) ? cr->cr_prison->pr_id : -1;
+	ugp->fw_uid = cr->cr_uid;
+	ugp->fw_ngroups = cr->cr_ngroups;
+	bcopy(cr->cr_groups, ugp->fw_groups, sizeof(ugp->fw_groups));
 }
 
 static int
@@ -2026,12 +2022,8 @@ check_uidgid(ipfw_insn_u32 *insn, int pr
 				dst_ip, htons(dst_port),
 				wildcard, NULL);
 		if (pcb != NULL) {
-			INP_RLOCK(pcb);
-			if (pcb->inp_socket != NULL) {
-				fill_ugid_cache(pcb, ugp);
-				*ugid_lookupp = 1;
-			}
-			INP_RUNLOCK(pcb);
+			fill_ugid_cache(pcb, ugp);
+			*ugid_lookupp = 1;
 		}
 		INP_INFO_RUNLOCK(pi);
 		if (*ugid_lookupp == 0) {

Modified: stable/7/sys/netinet/raw_ip.c
==============================================================================
--- stable/7/sys/netinet/raw_ip.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet/raw_ip.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -257,6 +257,7 @@ rip_input(struct mbuf *m, int off)
 		if (inp->inp_ip_p != proto)
 			continue;
 #ifdef INET6
+		/* XXX inp locking */
 		if ((inp->inp_vflag & INP_IPV4) == 0)
 			continue;
 #endif
@@ -264,11 +265,9 @@ rip_input(struct mbuf *m, int off)
 			continue;
 		if (inp->inp_faddr.s_addr != ip->ip_src.s_addr)
 			continue;
-		INP_RLOCK(inp);
-		if (jailed(inp->inp_socket->so_cred) &&
-		    (htonl(prison_getip(inp->inp_socket->so_cred)) !=
+		if (jailed(inp->inp_cred) &&
+		    (htonl(prison_getip(inp->inp_cred)) !=
 		    ip->ip_dst.s_addr)) {
-			INP_RUNLOCK(inp);
 			continue;
 		}
 		if (last) {
@@ -280,12 +279,14 @@ rip_input(struct mbuf *m, int off)
 			/* XXX count dropped packet */
 			INP_RUNLOCK(last);
 		}
+		INP_RLOCK(inp);
 		last = inp;
 	}
 	LIST_FOREACH(inp, &ripcbinfo.ipi_hashbase[0], inp_hash) {
 		if (inp->inp_ip_p && inp->inp_ip_p != proto)
 			continue;
 #ifdef INET6
+		/* XXX inp locking */
 		if ((inp->inp_vflag & INP_IPV4) == 0)
 			continue;
 #endif
@@ -295,11 +296,9 @@ rip_input(struct mbuf *m, int off)
 		if (inp->inp_faddr.s_addr &&
 		    inp->inp_faddr.s_addr != ip->ip_src.s_addr)
 			continue;
-		INP_RLOCK(inp);
-		if (jailed(inp->inp_socket->so_cred) &&
-		    (htonl(prison_getip(inp->inp_socket->so_cred)) !=
+		if (jailed(inp->inp_cred) &&
+		    (htonl(prison_getip(inp->inp_cred)) !=
 		    ip->ip_dst.s_addr)) {
-			INP_RUNLOCK(inp);
 			continue;
 		}
 		if (last) {
@@ -311,6 +310,7 @@ rip_input(struct mbuf *m, int off)
 			/* XXX count dropped packet */
 			INP_RUNLOCK(last);
 		}
+		INP_RLOCK(inp);
 		last = inp;
 	}
 	INP_INFO_RUNLOCK(&ripcbinfo);
@@ -360,9 +360,9 @@ rip_output(struct mbuf *m, struct socket
 			ip->ip_off = 0;
 		ip->ip_p = inp->inp_ip_p;
 		ip->ip_len = m->m_pkthdr.len;
-		if (jailed(inp->inp_socket->so_cred))
+		if (jailed(inp->inp_cred))
 			ip->ip_src.s_addr =
-			    htonl(prison_getip(inp->inp_socket->so_cred));
+			    htonl(prison_getip(inp->inp_cred));
 		else
 			ip->ip_src = inp->inp_laddr;
 		ip->ip_dst.s_addr = dst;
@@ -374,9 +374,9 @@ rip_output(struct mbuf *m, struct socket
 		}
 		INP_RLOCK(inp);
 		ip = mtod(m, struct ip *);
-		if (jailed(inp->inp_socket->so_cred)) {
+		if (jailed(inp->inp_cred)) {
 			if (ip->ip_src.s_addr !=
-			    htonl(prison_getip(inp->inp_socket->so_cred))) {
+			    htonl(prison_getip(inp->inp_cred))) {
 				INP_RUNLOCK(inp);
 				m_freem(m);
 				return (EPERM);

Modified: stable/7/sys/netinet/tcp_subr.c
==============================================================================
--- stable/7/sys/netinet/tcp_subr.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet/tcp_subr.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -1047,7 +1047,7 @@ tcp_getcred(SYSCTL_HANDLER_ARGS)
 			error = cr_canseesocket(req->td->td_ucred,
 			    inp->inp_socket);
 		if (error == 0)
-			cru2x(inp->inp_socket->so_cred, &xuc);
+			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);
 	} else {
 		INP_INFO_RUNLOCK(&tcbinfo);
@@ -1109,7 +1109,7 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
 			error = cr_canseesocket(req->td->td_ucred,
 			    inp->inp_socket);
 		if (error == 0)
-			cru2x(inp->inp_socket->so_cred, &xuc);
+			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);
 	} else {
 		INP_INFO_RUNLOCK(&tcbinfo);

Modified: stable/7/sys/netinet/udp_usrreq.c
==============================================================================
--- stable/7/sys/netinet/udp_usrreq.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet/udp_usrreq.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -768,7 +768,7 @@ udp_getcred(SYSCTL_HANDLER_ARGS)
 			error = cr_canseesocket(req->td->td_ucred,
 			    inp->inp_socket);
 		if (error == 0)
-			cru2x(inp->inp_socket->so_cred, &xuc);
+			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);
 	} else {
 		INP_INFO_RUNLOCK(&udbinfo);

Modified: stable/7/sys/netinet6/in6_pcb.c
==============================================================================
--- stable/7/sys/netinet6/in6_pcb.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet6/in6_pcb.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -185,7 +185,7 @@ in6_pcbbind(register struct inpcb *inp, 
 			    0))
 				return (EACCES);
 			if (!IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr) &&
-			    priv_check_cred(so->so_cred,
+			    priv_check_cred(inp->inp_cred,
 			    PRIV_NETINET_REUSEPORT, 0) != 0) {
 				t = in6_pcblookup_local(pcbinfo,
 				    &sin6->sin6_addr, lport,
@@ -197,8 +197,8 @@ in6_pcbbind(register struct inpcb *inp, 
 				    (!IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr) ||
 				     !IN6_IS_ADDR_UNSPECIFIED(&t->in6p_laddr) ||
 				     (t->inp_socket->so_options & SO_REUSEPORT)
-				      == 0) && (so->so_cred->cr_uid !=
-				     t->inp_socket->so_cred->cr_uid))
+				      == 0) && (inp->inp_cred->cr_uid !=
+				     t->inp_cred->cr_uid))
 					return (EADDRINUSE);
 				if ((inp->inp_flags & IN6P_IPV6_V6ONLY) == 0 &&
 				    IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
@@ -214,8 +214,8 @@ in6_pcbbind(register struct inpcb *inp, 
 					    (so->so_type != SOCK_STREAM ||
 					     ntohl(t->inp_faddr.s_addr) ==
 					      INADDR_ANY) &&
-					    (so->so_cred->cr_uid !=
-					     t->inp_socket->so_cred->cr_uid))
+					    (inp->inp_cred->cr_uid !=
+					     t->inp_cred->cr_uid))
 						return (EADDRINUSE);
 				}
 			}
@@ -317,7 +317,7 @@ in6_pcbladdr(register struct inpcb *inp,
 	 */
 	*plocal_addr6 = in6_selectsrc(sin6, inp->in6p_outputopts,
 				      inp, NULL,
-				      inp->inp_socket->so_cred,
+				      inp->inp_cred,
 				      &ifp, &error);
 	if (ifp && scope_ambiguous &&
 	    (error = in6_setscope(&sin6->sin6_addr, ifp, NULL)) != 0) {

Modified: stable/7/sys/netinet6/udp6_usrreq.c
==============================================================================
--- stable/7/sys/netinet6/udp6_usrreq.c	Thu Oct 30 16:22:04 2008	(r184480)
+++ stable/7/sys/netinet6/udp6_usrreq.c	Thu Oct 30 16:29:04 2008	(r184481)
@@ -458,7 +458,7 @@ udp6_getcred(SYSCTL_HANDLER_ARGS)
 			error = cr_canseesocket(req->td->td_ucred,
 			    inp->inp_socket);
 		if (error == 0)
-			cru2x(inp->inp_socket->so_cred, &xuc);
+			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);
 	} else {
 		INP_INFO_RUNLOCK(&udbinfo);
From kato at FreeBSD.org  Fri Oct 31 01:42:35 2008
From: kato at FreeBSD.org (KATO Takenori)
Date: Fri Oct 31 01:42:52 2008
Subject: svn commit: r184496 - stable/7/sys/pc98/pc98
Message-ID: <200810310842.m9V8gYwn074502@svn.freebsd.org>

Author: kato
Date: Fri Oct 31 08:42:34 2008
New Revision: 184496
URL: http://svn.freebsd.org/changeset/base/184496

Log:
  MFC of r184327.
  
  Improved IDE HDD geometry adjustment.  Previous code didn't work with
  certain ATA-6 drives including CF cards.
  
  Approved by:	re (kib)

Modified:
  stable/7/sys/pc98/pc98/pc98_machdep.c
  stable/7/sys/pc98/pc98/pc98_machdep.h

Modified: stable/7/sys/pc98/pc98/pc98_machdep.c
==============================================================================
--- stable/7/sys/pc98/pc98/pc98_machdep.c	Fri Oct 31 06:27:13 2008	(r184495)
+++ stable/7/sys/pc98/pc98/pc98_machdep.c	Fri Oct 31 08:42:34 2008	(r184496)
@@ -36,15 +36,23 @@
 #include 
 #include 
 
-#include 
-#include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 
+static	int	ad_geom_method = AD_GEOM_ADJUST_COMPATIDE;
+
+TUNABLE_INT("machdep.ad_geom_method", &ad_geom_method);
+SYSCTL_INT(_machdep, OID_AUTO, ad_geom_method, CTLFLAG_RW, &ad_geom_method, 0,
+    "IDE disk geometry conversion method");
+
 /*
  * Initialize DMA controller
  */
@@ -198,12 +206,62 @@ scsi_da_bios_params(struct ccb_calc_geom
 }
 
 /*
- * Get the geometry of the ATA HDD from the BIOS work area.
- *
- * XXX for now, we hack it
+ * Adjust the geometry of the IDE HDD.
  */
-void
-pc98_ad_firmware_geom_adjust(device_t dev, struct disk *disk)
+
+/* IDE BIOS compatible mode. */
+static	void
+pc98_ad_geom_adjust_idebios(struct disk *disk)
+{
+
+	if (disk->d_mediasize < MEDIASIZE_4_3G) {
+		disk->d_fwsectors = 17;
+		disk->d_fwheads = 8;
+	} else if (disk->d_mediasize < MEDIASIZE_29_5G) {
+		disk->d_fwsectors = 63;
+		if (disk->d_fwheads != 15)	/* Allow 15H63S. */
+			disk->d_fwheads = 16;
+	} else if (disk->d_mediasize < MEDIASIZE_31_5G) {
+		disk->d_fwsectors = 63;
+		disk->d_fwheads = 16;
+	} else if (disk->d_mediasize < MEDIASIZE_127G) {
+		disk->d_fwsectors = 255;
+		disk->d_fwheads = 16;
+	} else {
+		/* XXX */
+		disk->d_fwsectors = 255;
+		disk->d_fwheads = 255;
+	}
+}
+
+/* SCSI BIOS compatible mode. */
+static	void
+pc98_ad_geom_adjust_scsibios(struct disk *disk)
+{
+
+	if (disk->d_mediasize < MEDIASIZE_8G) {
+		disk->d_fwsectors = 32;
+		disk->d_fwheads = 8;
+	} else if (disk->d_mediasize < MEDIASIZE_32G) {
+		disk->d_fwsectors = 128;
+		disk->d_fwheads = 8;
+	} else if (disk->d_mediasize < MEDIASIZE_60G) {
+		/* Compatible with IFC-USP 1.2. */
+		disk->d_fwsectors = 128;
+		disk->d_fwheads = 15;
+	} else if (disk->d_mediasize < MEDIASIZE_120G) {
+		disk->d_fwsectors = 255;
+		disk->d_fwheads = 15;
+	} else {
+		/* XXX */
+		disk->d_fwsectors = 255;
+		disk->d_fwheads = 255;
+	}
+}
+
+/* Compatible with the revision 1.28. */
+static	void
+pc98_ad_geom_adjust_cyl16bit(struct disk *disk)
 {
 	off_t totsec = disk->d_mediasize / disk->d_sectorsize;
 	off_t cyl = totsec / disk->d_fwsectors / disk->d_fwheads;
@@ -229,3 +287,35 @@ pc98_ad_firmware_geom_adjust(device_t de
 		}
 	}
 }
+
+void
+pc98_ad_firmware_geom_adjust(device_t dev, struct disk *disk)
+{
+	u_int	oldsectors, oldheads;
+
+	oldsectors = disk->d_fwsectors;
+	oldheads = disk->d_fwheads;
+
+	switch (ad_geom_method) {
+	case AD_GEOM_ADJUST_COMPATIDE:
+		pc98_ad_geom_adjust_idebios(disk);
+		break;
+	case AD_GEOM_ADJUST_COMPATSCSI:
+		pc98_ad_geom_adjust_scsibios(disk);
+		break;
+	case AD_GEOM_ADJUST_COMPATCYL16:
+		pc98_ad_geom_adjust_cyl16bit(disk);
+		break;
+	default:
+		/* Do nothing. */
+		break;
+	}
+
+	if (bootverbose &&
+	    (oldsectors != disk->d_fwsectors || oldheads != disk->d_fwheads))
+		device_printf(dev,
+		    "geometry adjusted from [%dH/%dS] to [%dH/%dS]\n",
+		    oldheads, oldsectors,
+		    disk->d_fwheads, disk->d_fwsectors);
+
+}

Modified: stable/7/sys/pc98/pc98/pc98_machdep.h
==============================================================================
--- stable/7/sys/pc98/pc98/pc98_machdep.h	Fri Oct 31 06:27:13 2008	(r184495)
+++ stable/7/sys/pc98/pc98/pc98_machdep.h	Fri Oct 31 08:42:34 2008	(r184496)
@@ -85,6 +85,21 @@ extern unsigned char	pc98_system_paramet
 #define EPSON_PC486_SR		0x38
 #define EPSON_PC486_HA		0x3b
 
+/* IDE HDD geometry conversion. */
+#define	AD_GEOM_ADJUST_NONE		0	/* Do nothing. */
+#define	AD_GEOM_ADJUST_COMPATIDE	1	/* PC-98 IDE BIOS. */
+#define	AD_GEOM_ADJUST_COMPATSCSI	2	/* PC-98 SCSI. */
+#define	AD_GEOM_ADJUST_COMPATCYL16	100	/* Compat Rev. 1.28. */
+
+#define	MEDIASIZE_4_3G		(4351LL * 1024LL * 1024LL)      /* 4351M */
+#define	MEDIASIZE_8G		(8192LL * 1024LL * 1024LL)      /* 8192M */
+#define	MEDIASIZE_29_5G		(30239LL * 1024LL * 1024LL)	/* 30239M */
+#define	MEDIASIZE_31_5G		(32255LL * 1024 * 1024)         /* 32255M */
+#define	MEDIASIZE_32G		(32768LL * 1024LL * 1024LL)     /* 32768M */
+#define	MEDIASIZE_60G		(61440LL * 1024LL * 1024LL)     /* 61440M */
+#define	MEDIASIZE_120G		(122400LL * 1024LL * 1024LL)    /* 122400M */
+#define	MEDIASIZE_127G		(130558LL * 1024LL * 1024LL)    /* 130558M */
+
 #endif /* _KERNEL */
 
 #endif /* __PC98_PC98_PC98_MACHDEP_H__ */
From davidxu at FreeBSD.org  Fri Oct 31 02:09:23 2008
From: davidxu at FreeBSD.org (David Xu)
Date: Fri Oct 31 02:09:34 2008
Subject: svn commit: r184497 - stable/7/libexec/rtld-elf
Message-ID: <200810310909.m9V99Mdo075022@svn.freebsd.org>

Author: davidxu
Date: Fri Oct 31 09:09:22 2008
New Revision: 184497
URL: http://svn.freebsd.org/changeset/base/184497

Log:
  Merge revision 183061 from head to stable/7.
  
  > Allow multiple locks to be acquired by detecting corresponding
  > bit flag, otherwise if a thread acquired a lock, another thread
  > or the current thread itself can no longer acquire another lock
  > because thread_mask_set() return whole flag word, this results
  > bit leaking in the word and misbehavior in later locking and
  > unlocking.
  
  Approved by:	re (kib)

Modified:
  stable/7/libexec/rtld-elf/   (props changed)
  stable/7/libexec/rtld-elf/rtld_lock.c

Modified: stable/7/libexec/rtld-elf/rtld_lock.c
==============================================================================
--- stable/7/libexec/rtld-elf/rtld_lock.c	Fri Oct 31 08:42:34 2008	(r184496)
+++ stable/7/libexec/rtld-elf/rtld_lock.c	Fri Oct 31 09:09:22 2008	(r184497)
@@ -184,7 +184,7 @@ rtld_lock_t	rtld_phdr_lock = &rtld_locks
 int
 rlock_acquire(rtld_lock_t lock)
 {
-	if (thread_mask_set(lock->mask)) {
+	if (thread_mask_set(lock->mask) & lock->mask) {
 	    dbg("rlock_acquire: recursed");
 	    return (0);
 	}
@@ -195,7 +195,7 @@ rlock_acquire(rtld_lock_t lock)
 int
 wlock_acquire(rtld_lock_t lock)
 {
-	if (thread_mask_set(lock->mask)) {
+	if (thread_mask_set(lock->mask) & lock->mask) {
 	    dbg("wlock_acquire: recursed");
 	    return (0);
 	}
From bz at FreeBSD.org  Fri Oct 31 02:41:06 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Fri Oct 31 02:41:13 2008
Subject: svn commit: r184498 - in stable/7/sys: . security/mac
Message-ID: <200810310941.m9V9f6i2075814@svn.freebsd.org>

Author: bz
Date: Fri Oct 31 09:41:06 2008
New Revision: 184498
URL: http://svn.freebsd.org/changeset/base/184498

Log:
  MFC: r183973
  
    Add mac_check_inpcb_visible MAC Framework entry point, which is similar
    to mac_check_socket_visible but operates on the inpcb.
  
  Approved by:	re (rwatson)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/security/mac/mac_framework.h
  stable/7/sys/security/mac/mac_inet.c
  stable/7/sys/security/mac/mac_policy.h

Modified: stable/7/sys/security/mac/mac_framework.h
==============================================================================
--- stable/7/sys/security/mac/mac_framework.h	Fri Oct 31 09:09:22 2008	(r184497)
+++ stable/7/sys/security/mac/mac_framework.h	Fri Oct 31 09:41:06 2008	(r184498)
@@ -250,6 +250,7 @@ int	mac_check_bpfdesc_receive(struct bpf
 int	mac_check_cred_visible(struct ucred *cr1, struct ucred *cr2);
 int	mac_check_ifnet_transmit(struct ifnet *ifp, struct mbuf *m);
 int	mac_check_inpcb_deliver(struct inpcb *inp, struct mbuf *m);
+int	mac_check_inpcb_visible(struct ucred *cred, struct inpcb *inp);
 int	mac_check_sysv_msgmsq(struct ucred *cred, struct msg *msgptr,
 	    struct msqid_kernel *msqkptr);
 int	mac_check_sysv_msgrcv(struct ucred *cred, struct msg *msgptr);

Modified: stable/7/sys/security/mac/mac_inet.c
==============================================================================
--- stable/7/sys/security/mac/mac_inet.c	Fri Oct 31 09:09:22 2008	(r184497)
+++ stable/7/sys/security/mac/mac_inet.c	Fri Oct 31 09:41:06 2008	(r184498)
@@ -263,6 +263,18 @@ mac_check_inpcb_deliver(struct inpcb *in
 	return (error);
 }
 
+int
+mac_check_inpcb_visible(struct ucred *cred, struct inpcb *inp)
+{
+	int error;
+
+	INP_LOCK_ASSERT(inp);
+
+	MAC_CHECK(check_inpcb_visible, cred, inp, inp->inp_label);
+
+	return (error);
+}
+
 void
 mac_inpcb_sosetlabel(struct socket *so, struct inpcb *inp)
 {

Modified: stable/7/sys/security/mac/mac_policy.h
==============================================================================
--- stable/7/sys/security/mac/mac_policy.h	Fri Oct 31 09:09:22 2008	(r184497)
+++ stable/7/sys/security/mac/mac_policy.h	Fri Oct 31 09:41:06 2008	(r184498)
@@ -370,6 +370,8 @@ typedef int	(*mpo_check_ifnet_transmit_t
 typedef int	(*mpo_check_inpcb_deliver_t)(struct inpcb *inp,
 		    struct label *inplabel, struct mbuf *m,
 		    struct label *mlabel);
+typedef int	(*mpo_check_inpcb_visible_t)(struct ucred *cred,
+		    struct inpcb *inp, struct label *inplabel);
 typedef int	(*mpo_check_sysv_msgmsq_t)(struct ucred *cred,
 		    struct msg *msgptr, struct label *msglabel,
 		    struct msqid_kernel *msqkptr, struct label *msqklabel);
@@ -786,7 +788,7 @@ struct mac_policy_ops {
 	mpo_placeholder_t			_mpo_placeholder15;
 	mpo_placeholder_t			_mpo_placeholder16;
 	mpo_placeholder_t			_mpo_placeholder17;
-	mpo_placeholder_t			_mpo_placeholder18;
+	mpo_check_inpcb_visible_t		mpo_check_inpcb_visible;
 	mpo_check_ifnet_relabel_t		mpo_check_ifnet_relabel;
 	mpo_check_ifnet_transmit_t		mpo_check_ifnet_transmit;
 	mpo_check_inpcb_deliver_t		mpo_check_inpcb_deliver;
From bz at FreeBSD.org  Fri Oct 31 04:27:55 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Fri Oct 31 04:28:02 2008
Subject: svn commit: r184502 - in stable/7/sys: . security/mac_biba
	security/mac_lomac security/mac_mls security/mac_partition
	security/mac_seeotheruids security/mac_stub security/mac_test
Message-ID: <200810311127.m9VBRscj079392@svn.freebsd.org>

Author: bz
Date: Fri Oct 31 11:27:54 2008
New Revision: 184502
URL: http://svn.freebsd.org/changeset/base/184502

Log:
  MFC: r183980
  
    Add a mac_check_inpcb_visible implementation to all MAC policies
    that handle mac_check_socket_visible.
  
  Approved by:	re (rwatson)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/security/mac_biba/mac_biba.c
  stable/7/sys/security/mac_lomac/mac_lomac.c
  stable/7/sys/security/mac_mls/mac_mls.c
  stable/7/sys/security/mac_partition/mac_partition.c
  stable/7/sys/security/mac_seeotheruids/mac_seeotheruids.c
  stable/7/sys/security/mac_stub/mac_stub.c
  stable/7/sys/security/mac_test/mac_test.c

Modified: stable/7/sys/security/mac_biba/mac_biba.c
==============================================================================
--- stable/7/sys/security/mac_biba/mac_biba.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_biba/mac_biba.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -1599,6 +1599,24 @@ biba_check_inpcb_deliver(struct inpcb *i
 }
 
 static int
+biba_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+    struct label *inplabel)
+{
+	struct mac_biba *subj, *obj;
+
+	if (!biba_enabled)
+		return (0);
+
+	subj = SLOT(cred->cr_label);
+	obj = SLOT(inplabel);
+
+	if (!biba_dominate_effective(obj, subj))
+		return (ENOENT);
+
+	return (0);
+}
+
+static int
 biba_check_sysv_msgrcv(struct ucred *cred, struct msg *msgptr,
     struct label *msglabel)
 {
@@ -3333,6 +3351,7 @@ static struct mac_policy_ops mac_biba_op
 	.mpo_check_ifnet_relabel = biba_check_ifnet_relabel,
 	.mpo_check_ifnet_transmit = biba_check_ifnet_transmit,
 	.mpo_check_inpcb_deliver = biba_check_inpcb_deliver,
+	.mpo_check_inpcb_visible = biba_check_inpcb_visible,
 	.mpo_check_sysv_msgrcv = biba_check_sysv_msgrcv,
 	.mpo_check_sysv_msgrmid = biba_check_sysv_msgrmid,
 	.mpo_check_sysv_msqget = biba_check_sysv_msqget,

Modified: stable/7/sys/security/mac_lomac/mac_lomac.c
==============================================================================
--- stable/7/sys/security/mac_lomac/mac_lomac.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_lomac/mac_lomac.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -1742,6 +1742,24 @@ lomac_check_inpcb_deliver(struct inpcb *
 }
 
 static int
+lomac_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+    struct label *inplabel)
+{
+	struct mac_lomac *subj, *obj;
+
+	if (!lomac_enabled)
+		return (0);
+
+	subj = SLOT(cred->cr_label);
+	obj = SLOT(inplabel);
+
+	if (!lomac_dominate_single(obj, subj))
+		return (ENOENT);
+
+	return (0);
+}
+
+static int
 lomac_check_kld_load(struct ucred *cred, struct vnode *vp,
     struct label *vplabel)
 {
@@ -2893,6 +2911,7 @@ static struct mac_policy_ops lomac_ops =
 	.mpo_check_ifnet_relabel = lomac_check_ifnet_relabel,
 	.mpo_check_ifnet_transmit = lomac_check_ifnet_transmit,
 	.mpo_check_inpcb_deliver = lomac_check_inpcb_deliver,
+	.mpo_check_inpcb_visible = lomac_check_inpcb_visible,
 	.mpo_check_kld_load = lomac_check_kld_load,
 	.mpo_check_pipe_ioctl = lomac_check_pipe_ioctl,
 	.mpo_check_pipe_read = lomac_check_pipe_read,

Modified: stable/7/sys/security/mac_mls/mac_mls.c
==============================================================================
--- stable/7/sys/security/mac_mls/mac_mls.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_mls/mac_mls.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -1540,6 +1540,24 @@ mls_check_inpcb_deliver(struct inpcb *in
 }
 
 static int
+mls_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+    struct label *inplabel)
+{
+	struct mac_mls *subj, *obj;
+
+	if (!mls_enabled)
+		return (0);
+
+	subj = SLOT(cred->cr_label);
+	obj = SLOT(inplabel);
+
+	if (!mls_dominate_effective(subj, obj))
+		return (ENOENT);
+
+	return (0);
+}
+
+static int
 mls_check_sysv_msgrcv(struct ucred *cred, struct msg *msgptr,
     struct label *msglabel)
 {
@@ -2957,6 +2975,7 @@ static struct mac_policy_ops mls_ops =
 	.mpo_check_ifnet_relabel = mls_check_ifnet_relabel,
 	.mpo_check_ifnet_transmit = mls_check_ifnet_transmit,
 	.mpo_check_inpcb_deliver = mls_check_inpcb_deliver,
+	.mpo_check_inpcb_visible = mls_check_inpcb_visible,
 	.mpo_check_sysv_msgrcv = mls_check_sysv_msgrcv,
 	.mpo_check_sysv_msgrmid = mls_check_sysv_msgrmid,
 	.mpo_check_sysv_msqget = mls_check_sysv_msqget,

Modified: stable/7/sys/security/mac_partition/mac_partition.c
==============================================================================
--- stable/7/sys/security/mac_partition/mac_partition.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_partition/mac_partition.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -46,10 +46,15 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 #include 
 
@@ -186,6 +191,17 @@ partition_check_cred_visible(struct ucre
 }
 
 static int
+partition_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+    struct label *inplabel)
+{
+	int error;
+
+	error = label_on_label(cred->cr_label, inp->inp_cred->cr_label);
+
+	return (error ? ENOENT : 0);
+}
+
+static int
 partition_check_proc_debug(struct ucred *cred, struct proc *p)
 {
 	int error;
@@ -258,6 +274,7 @@ static struct mac_policy_ops partition_o
 	.mpo_relabel_cred = partition_relabel_cred,
 	.mpo_check_cred_relabel = partition_check_cred_relabel,
 	.mpo_check_cred_visible = partition_check_cred_visible,
+	.mpo_check_inpcb_visible = partition_check_inpcb_visible,
 	.mpo_check_proc_debug = partition_check_proc_debug,
 	.mpo_check_proc_sched = partition_check_proc_sched,
 	.mpo_check_proc_signal = partition_check_proc_signal,

Modified: stable/7/sys/security/mac_seeotheruids/mac_seeotheruids.c
==============================================================================
--- stable/7/sys/security/mac_seeotheruids/mac_seeotheruids.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_seeotheruids/mac_seeotheruids.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -47,9 +47,14 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
+#include 
+#include 
+#include 
+
 #include 
 
 SYSCTL_DECL(_security_mac);
@@ -129,6 +134,14 @@ seeotheruids_check_cred_visible(struct u
 }
 
 static int
+seeotheruids_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+    struct label *inplabel)
+{
+
+	return (seeotheruids_check(cred, inp->inp_cred));
+}
+
+static int
 seeotheruids_check_proc_signal(struct ucred *cred, struct proc *p,
     int signum)
 {
@@ -161,6 +174,7 @@ seeotheruids_check_socket_visible(struct
 static struct mac_policy_ops seeotheruids_ops =
 {
 	.mpo_check_cred_visible = seeotheruids_check_cred_visible,
+	.mpo_check_inpcb_visible = seeotheruids_check_inpcb_visible,
 	.mpo_check_proc_debug = seeotheruids_check_proc_debug,
 	.mpo_check_proc_sched = seeotheruids_check_proc_sched,
 	.mpo_check_proc_signal = seeotheruids_check_proc_signal,

Modified: stable/7/sys/security/mac_stub/mac_stub.c
==============================================================================
--- stable/7/sys/security/mac_stub/mac_stub.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_stub/mac_stub.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -614,6 +614,14 @@ stub_check_inpcb_deliver(struct inpcb *i
 }
 
 static int
+stub_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+   struct label *inplabel)
+{
+
+	return (0);
+}
+
+static int
 stub_check_sysv_msgmsq(struct ucred *cred, struct msg *msgptr,
     struct label *msglabel, struct msqid_kernel *msqkptr,
     struct label *msqklabel)
@@ -1550,6 +1558,7 @@ static struct mac_policy_ops stub_ops =
 	.mpo_check_ifnet_relabel = stub_check_ifnet_relabel,
 	.mpo_check_ifnet_transmit = stub_check_ifnet_transmit,
 	.mpo_check_inpcb_deliver = stub_check_inpcb_deliver,
+	.mpo_check_inpcb_visible = stub_check_inpcb_visible,
 	.mpo_check_sysv_msgmsq = stub_check_sysv_msgmsq,
 	.mpo_check_sysv_msgrcv = stub_check_sysv_msgrcv,
 	.mpo_check_sysv_msgrmid = stub_check_sysv_msgrmid,

Modified: stable/7/sys/security/mac_test/mac_test.c
==============================================================================
--- stable/7/sys/security/mac_test/mac_test.c	Fri Oct 31 10:38:30 2008	(r184501)
+++ stable/7/sys/security/mac_test/mac_test.c	Fri Oct 31 11:27:54 2008	(r184502)
@@ -1258,6 +1258,19 @@ test_check_inpcb_deliver(struct inpcb *i
 	return (0);
 }
 
+COUNTER_DECL(check_inpcb_visible);
+static int
+test_check_inpcb_visible(struct ucred *cred, struct inpcb *inp,
+    struct label *inplabel)
+{
+
+	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
+	LABEL_CHECK(inplabel, MAGIC_INPCB);
+	COUNTER_INC(check_inpcb_visible);
+
+	return (0);
+}
+
 COUNTER_DECL(check_sysv_msgmsq);
 static int
 test_check_sysv_msgmsq(struct ucred *cred, struct msg *msgptr,
@@ -2577,6 +2590,7 @@ static struct mac_policy_ops test_ops =
 	.mpo_check_ifnet_relabel = test_check_ifnet_relabel,
 	.mpo_check_ifnet_transmit = test_check_ifnet_transmit,
 	.mpo_check_inpcb_deliver = test_check_inpcb_deliver,
+	.mpo_check_inpcb_visible = test_check_inpcb_visible,
 	.mpo_check_sysv_msgmsq = test_check_sysv_msgmsq,
 	.mpo_check_sysv_msgrcv = test_check_sysv_msgrcv,
 	.mpo_check_sysv_msgrmid = test_check_sysv_msgrmid,
From oleg at FreeBSD.org  Fri Oct 31 05:58:12 2008
From: oleg at FreeBSD.org (Oleg Bulyzhin)
Date: Fri Oct 31 05:58:18 2008
Subject: svn commit: r184504 - stable/7/sys/netinet
Message-ID: <200810311258.m9VCwCb8081154@svn.freebsd.org>

Author: oleg
Date: Fri Oct 31 12:58:12 2008
New Revision: 184504
URL: http://svn.freebsd.org/changeset/base/184504

Log:
  Direct commit (r184414 is not applicable to stable due to ABI change):
  
  Workaround possible q_time overflow (will happen after 2^32/(86400*hz)
  days of uptime (~50days for hz = 1000)), which may lead to:
  - broken shaping in 'fast' io mode.
  - incorrect average queue length calculation in RED/GRED algorithm.
  
  PR:		kern/128401
  Approved by:	re (kensmith)

Modified:
  stable/7/sys/netinet/ip_dummynet.c

Modified: stable/7/sys/netinet/ip_dummynet.c
==============================================================================
--- stable/7/sys/netinet/ip_dummynet.c	Fri Oct 31 11:47:51 2008	(r184503)
+++ stable/7/sys/netinet/ip_dummynet.c	Fri Oct 31 12:58:12 2008	(r184504)
@@ -1155,7 +1155,8 @@ red_drops(struct dn_flow_set *fs, struct
 		 * XXX check wraps...
 		 */
 		if (q->avg) {
-			u_int t = (curr_time - q->q_time) / fs->lookup_step;
+			u_int t = ((uint32_t)curr_time - q->q_time) /
+			    fs->lookup_step;
 
 			q->avg = (t < fs->lookup_depth) ?
 			    SCALE_MUL(q->avg, fs->w_q_lookup[t]) : 0;
@@ -1350,7 +1351,7 @@ dummynet_io(struct mbuf **m0, int dir, s
 	if (q->head != m)		/* Flow was not idle, we are done. */
 		goto done;
 
-	if (q->q_time < curr_time)
+	if (q->q_time < (uint32_t)curr_time)
 		q->numbytes = io_fast ? fs->pipe->bandwidth : 0;
 	q->q_time = curr_time;
 
From bz at FreeBSD.org  Fri Oct 31 07:30:34 2008
From: bz at FreeBSD.org (Bjoern A. Zeeb)
Date: Fri Oct 31 07:30:50 2008
Subject: svn commit: r184507 - in stable/7/sys: . kern netinet sys
Message-ID: <200810311430.m9VEUXax082891@svn.freebsd.org>

Author: bz
Date: Fri Oct 31 14:30:33 2008
New Revision: 184507
URL: http://svn.freebsd.org/changeset/base/184507

Log:
  MFC: r183982
  
    Add cr_canseeinpcb() doing checks using the cached socket
    credentials from inp_cred which is also available after the
    socket is gone.
    Switch cr_canseesocket consumers to cr_canseeinpcb.
    This removes an extra acquisition of the socket lock.
  
  Approved by:	re (rwatson)

Modified:
  stable/7/sys/   (props changed)
  stable/7/sys/kern/kern_prot.c
  stable/7/sys/netinet/ip_divert.c
  stable/7/sys/netinet/raw_ip.c
  stable/7/sys/netinet/tcp_subr.c
  stable/7/sys/netinet/udp_usrreq.c
  stable/7/sys/sys/systm.h

Modified: stable/7/sys/kern/kern_prot.c
==============================================================================
--- stable/7/sys/kern/kern_prot.c	Fri Oct 31 13:01:31 2008	(r184506)
+++ stable/7/sys/kern/kern_prot.c	Fri Oct 31 14:30:33 2008	(r184507)
@@ -45,6 +45,8 @@
 __FBSDID("$FreeBSD$");
 
 #include "opt_compat.h"
+#include "opt_inet.h"
+#include "opt_inet6.h"
 #include "opt_mac.h"
 
 #include 
@@ -68,6 +70,11 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
+#if defined(INET) || defined(INET6)
+#include 
+#include 
+#endif
+
 #include 
 #include 
 
@@ -1704,6 +1711,34 @@ cr_canseesocket(struct ucred *cred, stru
 	return (0);
 }
 
+#if defined(INET) || defined(INET6)
+/*-
+ * Determine whether the subject represented by cred can "see" a socket.
+ * Returns: 0 for permitted, ENOENT otherwise.
+ */
+int
+cr_canseeinpcb(struct ucred *cred, struct inpcb *inp)
+{
+	int error;
+
+	error = prison_check(cred, inp->inp_cred);
+	if (error)
+		return (ENOENT);
+#ifdef MAC
+	INP_LOCK_ASSERT(inp);
+	error = mac_check_inpcb_visible(cred, inp);
+	if (error)
+		return (error);
+#endif
+	if (cr_seeotheruids(cred, inp->inp_cred))
+		return (ENOENT);
+	if (cr_seeothergids(cred, inp->inp_cred))
+		return (ENOENT);
+
+	return (0);
+}
+#endif
+
 /*-
  * Determine whether td can wait for the exit of p.
  * Returns: 0 for permitted, an errno value otherwise

Modified: stable/7/sys/netinet/ip_divert.c
==============================================================================
--- stable/7/sys/netinet/ip_divert.c	Fri Oct 31 13:01:31 2008	(r184506)
+++ stable/7/sys/netinet/ip_divert.c	Fri Oct 31 14:30:33 2008	(r184507)
@@ -616,7 +616,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
 	     inp = LIST_NEXT(inp, inp_list)) {
 		INP_RLOCK(inp);
 		if (inp->inp_gencnt <= gencnt &&
-		    cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0)
+		    cr_canseeinpcb(req->td->td_ucred, inp) == 0)
 			inp_list[i++] = inp;
 		INP_RUNLOCK(inp);
 	}

Modified: stable/7/sys/netinet/raw_ip.c
==============================================================================
--- stable/7/sys/netinet/raw_ip.c	Fri Oct 31 13:01:31 2008	(r184506)
+++ stable/7/sys/netinet/raw_ip.c	Fri Oct 31 14:30:33 2008	(r184507)
@@ -926,7 +926,7 @@ rip_pcblist(SYSCTL_HANDLER_ARGS)
 	     inp = LIST_NEXT(inp, inp_list)) {
 		INP_RLOCK(inp);
 		if (inp->inp_gencnt <= gencnt &&
-		    cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0) {
+		    cr_canseeinpcb(req->td->td_ucred, inp) == 0) {
 			/* XXX held references? */
 			inp_list[i++] = inp;
 		}

Modified: stable/7/sys/netinet/tcp_subr.c
==============================================================================
--- stable/7/sys/netinet/tcp_subr.c	Fri Oct 31 13:01:31 2008	(r184506)
+++ stable/7/sys/netinet/tcp_subr.c	Fri Oct 31 14:30:33 2008	(r184507)
@@ -956,8 +956,7 @@ tcp_pcblist(SYSCTL_HANDLER_ARGS)
 				else
 					error = EINVAL;	/* Skip this inp. */
 			} else
-				error = cr_canseesocket(req->td->td_ucred,
-				    inp->inp_socket);
+				error = cr_canseeinpcb(req->td->td_ucred, inp);
 			if (error == 0)
 				inp_list[i++] = inp;
 		}
@@ -1044,8 +1043,7 @@ tcp_getcred(SYSCTL_HANDLER_ARGS)
 		if (inp->inp_socket == NULL)
 			error = ENOENT;
 		if (error == 0)
-			error = cr_canseesocket(req->td->td_ucred,
-			    inp->inp_socket);
+			error = cr_canseeinpcb(req->td->td_ucred, inp);
 		if (error == 0)
 			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);
@@ -1106,8 +1104,7 @@ tcp6_getcred(SYSCTL_HANDLER_ARGS)
 		if (inp->inp_socket == NULL)
 			error = ENOENT;
 		if (error == 0)
-			error = cr_canseesocket(req->td->td_ucred,
-			    inp->inp_socket);
+			error = cr_canseeinpcb(req->td->td_ucred, inp);
 		if (error == 0)
 			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);

Modified: stable/7/sys/netinet/udp_usrreq.c
==============================================================================
--- stable/7/sys/netinet/udp_usrreq.c	Fri Oct 31 13:01:31 2008	(r184506)
+++ stable/7/sys/netinet/udp_usrreq.c	Fri Oct 31 14:30:33 2008	(r184507)
@@ -696,7 +696,7 @@ udp_pcblist(SYSCTL_HANDLER_ARGS)
 	     inp = LIST_NEXT(inp, inp_list)) {
 		INP_RLOCK(inp);
 		if (inp->inp_gencnt <= gencnt &&
-		    cr_canseesocket(req->td->td_ucred, inp->inp_socket) == 0)
+		    cr_canseeinpcb(req->td->td_ucred, inp) == 0)
 			inp_list[i++] = inp;
 		INP_RUNLOCK(inp);
 	}
@@ -765,8 +765,7 @@ udp_getcred(SYSCTL_HANDLER_ARGS)
 		if (inp->inp_socket == NULL)
 			error = ENOENT;
 		if (error == 0)
-			error = cr_canseesocket(req->td->td_ucred,
-			    inp->inp_socket);
+			error = cr_canseeinpcb(req->td->td_ucred, inp);
 		if (error == 0)
 			cru2x(inp->inp_cred, &xuc);
 		INP_RUNLOCK(inp);

Modified: stable/7/sys/sys/systm.h
==============================================================================
--- stable/7/sys/sys/systm.h	Fri Oct 31 13:01:31 2008	(r184506)
+++ stable/7/sys/sys/systm.h	Fri Oct 31 14:30:33 2008	(r184507)
@@ -116,6 +116,7 @@ extern char **kenvp;
  * General function declarations.
  */
 
+struct inpcb;
 struct lock_object;
 struct malloc_type;
 struct mtx;
@@ -230,6 +231,7 @@ void	cpu_stopprofclock(void);
 
 int	cr_cansee(struct ucred *u1, struct ucred *u2);
 int	cr_canseesocket(struct ucred *cred, struct socket *so);
+int	cr_canseeinpcb(struct ucred *cred, struct inpcb *inp);
 
 char	*getenv(const char *name);
 void	freeenv(char *env);