From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:07:55 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABC211065699; Sun, 26 Oct 2008 00:07:55 +0000 (UTC) (envelope-from olli@fromme.com) Received: from haluter.fromme.com (haluter.fromme.com [212.17.241.231]) by mx1.freebsd.org (Postfix) with ESMTP id 0C46C8FC12; Sun, 26 Oct 2008 00:07:54 +0000 (UTC) (envelope-from olli@fromme.com) Received: from haluter.fromme.com (irc_sucks@localhost [127.0.0.1]) by haluter.fromme.com (8.14.3/8.14.3) with ESMTP id m9Q07qBD053067; Sun, 26 Oct 2008 02:07:53 +0200 (CEST) (envelope-from olli@fromme.com) Received: (from olli@localhost) by haluter.fromme.com (8.14.3/8.14.3/Submit) id m9Q07q9Z053065; Sun, 26 Oct 2008 02:07:52 +0200 (CEST) (envelope-from olli) From: Oliver Fromme Message-Id: <200810260007.m9Q07q9Z053065@haluter.fromme.com> To: maxim@macomnet.ru (Maxim Konovalov) Date: Sun, 26 Oct 2008 02:07:52 +0200 (CEST) In-Reply-To: <20081025234159.G17979@mp2.macomnet.net> X-Mailer: ELM [version 2.5 PL8] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.1.2 (haluter.fromme.com [127.0.0.1]); Sun, 26 Oct 2008 02:07:53 +0200 (CEST) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Ceri Davies , Ed Schouten , src-committers@FreeBSD.org Subject: Re: svn commit: r184265 - head/etc/periodic/security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:07:55 -0000 Maxim Konovalov wrote: > On Sat, 25 Oct 2008, 20:16+0100, Ceri Davies wrote: > > On Sat, Oct 25, 2008 at 06:45:40PM +0000, Ed Schouten wrote: > > > Author: ed > > > Date: Sat Oct 25 18:45:40 2008 > > > New Revision: 184265 > > > URL: http://svn.freebsd.org/changeset/base/184265 > > > > > > Log: > > > Sort `mount -p' output by name before checking for any differences. > > > > > > I noticed on a system at home that restarting named(8) causes the > > > /var/named/dev mount to be moved to the bottom of the mount list, > > > because it gets remounted. When I received the daily security email this > > > morning, I was quite amazed to see that the security report listed the > > > differences, while it was nothing out of the ordinary. > > > > > > If we just throw the `mount -p' output through sort(1), we'll only > > > receive notifications about changes to mounts if something has really > > > changed. > > > > Hmm. I've always found it useful to know that the mount list has > > changed, so that I can work out if I did anything to cause it to > > happen or not - if not, I have something to worry about. I want to > > see this every time. But you didn't see it every time. See below. > Seconded. From the sysadmin point of view it's better to be on the > safe side. You should be aware that you were *not* on the safe side before that change. You only saw modifications if they happened to change the order in the mount output. If someone changed the last mount (or mounts) in the list, there would be no difference in the output. So this was completely unreliable anyway. Therefore I think Ed's change is good, because it makes the behaviour of the script more deterministic. If you *really* want to see all changes, then the script must record the device IDs of all mounts and compare them, i.e. something like this: $ mount -p | awk '{print $2}' | xargs stat -f '%N %d' | sort Then you will reliably notice if any of the file systems was umounted/remounted, even if the order in the "mount" output didn't change. Best regards Oliver -- Oliver Fromme, Bunsenstr. 13, 81735 Muenchen, Germany ``We are all but compressed light'' (Albert Einstein) From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:32:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4BCDD106567C; Sun, 26 Oct 2008 00:32:03 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3B5E88FC0A; Sun, 26 Oct 2008 00:32:03 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q0W3BR063691; Sun, 26 Oct 2008 00:32:03 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q0W3eY063690; Sun, 26 Oct 2008 00:32:03 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260032.m9Q0W3eY063690@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 00:32:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184281 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:32:03 -0000 Author: sam Date: Sun Oct 26 00:32:02 2008 New Revision: 184281 URL: http://svn.freebsd.org/changeset/base/184281 Log: fix old merge botch that causes gaps in the tx seq# space for QoS frames Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sat Oct 25 23:58:59 2008 (r184280) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 00:32:02 2008 (r184281) @@ -1083,7 +1083,6 @@ ieee80211_encap(struct ieee80211_node *n htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); ni->ni_txseqs[tid]++; } - ni->ni_txseqs[tid]++; } else { *(uint16_t *)wh->i_seq = htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:43:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB4D2106566B; Sun, 26 Oct 2008 00:43:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B9FDA8FC14; Sun, 26 Oct 2008 00:43:11 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q0hB3P064689; Sun, 26 Oct 2008 00:43:11 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q0hBYd064685; Sun, 26 Oct 2008 00:43:11 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260043.m9Q0hBYd064685@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 00:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184282 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:43:12 -0000 Author: sam Date: Sun Oct 26 00:43:11 2008 New Revision: 184282 URL: http://svn.freebsd.org/changeset/base/184282 Log: o change ieee80211_mgmt_output to take a raw xmit parameters block so the net80211 layer has complete control over the handling of mgt frames (in particular, the ac, tx rate, and retry count); this also allows us to purge the M_LINK0 flag that was attached to mbufs to mark them as needing encryption for shared key auth o change ieee80211_send_setup to take a tid parameter so it can be used to setup QoS frames Modified: head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_ht.c head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Sun Oct 26 00:32:02 2008 (r184281) +++ head/sys/net80211/ieee80211_freebsd.h Sun Oct 26 00:43:11 2008 (r184282) @@ -239,7 +239,6 @@ void ieee80211_vap_destroy(struct ieee80 struct mbuf *ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen); /* tx path usage */ -#define M_LINK0 M_PROTO1 /* WEP requested */ #define M_WDS M_PROTO2 /* WDS frame */ #define M_EAPOL M_PROTO3 /* PAE/EAPOL frame */ #define M_PWR_SAV M_PROTO4 /* bypass PS handling */ @@ -248,7 +247,7 @@ struct mbuf *ieee80211_getmgtframe(uint8 #define M_TXCB M_PROTO7 /* do tx complete callback */ #define M_AMPDU_MPDU M_PROTO8 /* ok for A-MPDU aggregation */ #define M_80211_TX \ - (M_LINK0|M_WDS|M_EAPOL|M_PWR_SAV|M_MORE_DATA|M_FF|M_TXCB|M_AMPDU_MPDU) + (M_WDS|M_EAPOL|M_PWR_SAV|M_MORE_DATA|M_FF|M_TXCB|M_AMPDU_MPDU) /* rx path usage */ #define M_AMPDU M_PROTO1 /* A-MPDU subframe */ Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sun Oct 26 00:32:02 2008 (r184281) +++ head/sys/net80211/ieee80211_ht.c Sun Oct 26 00:43:11 2008 (r184282) @@ -2104,6 +2104,7 @@ ieee80211_send_action(struct ieee80211_n } while (0) struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; + struct ieee80211_bpf_params params; struct mbuf *m; uint8_t *frm; uint16_t baparamset; @@ -2207,7 +2208,14 @@ ieee80211_send_action(struct ieee80211_n } m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); - return ieee80211_mgmt_output(ni, m, IEEE80211_FC0_SUBTYPE_ACTION); + memset(¶ms, 0, sizeof(params)); + params.ibp_pri = WME_AC_VO; + params.ibp_rate0 = ni->ni_txparms->mgmtrate; + /* NB: we know all frames are unicast */ + params.ibp_try0 = ni->ni_txparms->maxretry; + params.ibp_power = ni->ni_txpower; + return ieee80211_mgmt_output(ni, m, IEEE80211_FC0_SUBTYPE_ACTION, + ¶ms); bad: ieee80211_free_node(ni); if (m != NULL) Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Oct 26 00:32:02 2008 (r184281) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 00:43:11 2008 (r184282) @@ -409,7 +409,7 @@ static void ieee80211_send_setup( struct ieee80211_node *ni, struct ieee80211_frame *wh, - int type, + int type, int tid, const uint8_t sa[IEEE80211_ADDR_LEN], const uint8_t da[IEEE80211_ADDR_LEN], const uint8_t bssid[IEEE80211_ADDR_LEN]) @@ -457,11 +457,9 @@ ieee80211_send_setup( IEEE80211_ADDR_COPY(wh->i_addr3, bssid); } *(uint16_t *)&wh->i_dur[0] = 0; - /* XXX probe response use per-vap seq#? */ - /* NB: use non-QoS tid */ *(uint16_t *)&wh->i_seq[0] = - htole16(ni->ni_txseqs[IEEE80211_NONQOS_TID] << IEEE80211_SEQ_SEQ_SHIFT); - ni->ni_txseqs[IEEE80211_NONQOS_TID]++; + htole16(ni->ni_txseqs[tid] << IEEE80211_SEQ_SEQ_SHIFT); + ni->ni_txseqs[tid]++; #undef WH4 } @@ -474,7 +472,8 @@ ieee80211_send_setup( * otherwise deal with reclaiming any reference (on error). */ int -ieee80211_mgmt_output(struct ieee80211_node *ni, struct mbuf *m, int type) +ieee80211_mgmt_output(struct ieee80211_node *ni, struct mbuf *m, int type, + struct ieee80211_bpf_params *params) { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; @@ -501,20 +500,18 @@ ieee80211_mgmt_output(struct ieee80211_n } wh = mtod(m, struct ieee80211_frame *); - ieee80211_send_setup(ni, wh, - IEEE80211_FC0_TYPE_MGT | type, - vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); - if ((m->m_flags & M_LINK0) != 0 && ni->ni_challenge != NULL) { - m->m_flags &= ~M_LINK0; + ieee80211_send_setup(ni, wh, + IEEE80211_FC0_TYPE_MGT | type, IEEE80211_NONQOS_TID, + vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); + if (params->ibp_flags & IEEE80211_BPF_CRYPTO) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_AUTH, wh->i_addr1, "encrypting frame (%s)", __func__); wh->i_fc[1] |= IEEE80211_FC1_WEP; } - if (type != IEEE80211_FC0_SUBTYPE_PROBE_RESP) { - /* NB: force non-ProbeResp frames to the highest queue */ - M_WME_SETAC(m, WME_AC_VO); - } else - M_WME_SETAC(m, WME_AC_BE); + + KASSERT(type != IEEE80211_FC0_SUBTYPE_PROBE_RESP, ("probe response?")); + M_WME_SETAC(m, params->ibp_pri); + #ifdef IEEE80211_DEBUG /* avoid printing too many frames */ if ((ieee80211_msg_debug(vap) && doprint(vap, type)) || @@ -529,7 +526,7 @@ ieee80211_mgmt_output(struct ieee80211_n #endif IEEE80211_NODE_STAT(ni, tx_mgmt); - return ic->ic_raw_xmit(ni, m, NULL); + return ic->ic_raw_xmit(ni, m, params); } /* @@ -569,8 +566,9 @@ ieee80211_send_nulldata(struct ieee80211 wh = mtod(m, struct ieee80211_frame *); ieee80211_send_setup(ni, wh, - IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NODATA, - vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); + IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NODATA, + IEEE80211_NONQOS_TID, + vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); if (vap->iv_opmode != IEEE80211_M_WDS) { /* NB: power management bit is never sent by an AP */ if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && @@ -1726,8 +1724,8 @@ ieee80211_send_probereq(struct ieee80211 wh = mtod(m, struct ieee80211_frame *); ieee80211_send_setup(ni, wh, - IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_REQ, - sa, da, bssid); + IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_REQ, + IEEE80211_NONQOS_TID, sa, da, bssid); /* XXX power management? */ M_WME_SETAC(m, WME_AC_BE); @@ -1785,6 +1783,7 @@ ieee80211_send_mgmt(struct ieee80211_nod struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; struct ieee80211_node *bss = vap->iv_bss; + struct ieee80211_bpf_params params; struct mbuf *m; uint8_t *frm; uint16_t capinfo; @@ -1804,6 +1803,7 @@ ieee80211_send_mgmt(struct ieee80211_nod ieee80211_node_refcnt(ni)+1); ieee80211_ref_node(ni); + memset(¶ms, 0, sizeof(params)); switch (type) { case IEEE80211_FC0_SUBTYPE_AUTH: @@ -1826,7 +1826,7 @@ ieee80211_send_mgmt(struct ieee80211_nod bss->ni_authmode == IEEE80211_AUTH_SHARED); m = ieee80211_getmgtframe(&frm, - ic->ic_headroom + sizeof(struct ieee80211_frame), + ic->ic_headroom + sizeof(struct ieee80211_frame), 3 * sizeof(uint16_t) + (has_challenge && status == IEEE80211_STATUS_SUCCESS ? sizeof(uint16_t)+IEEE80211_CHALLENGE_LEN : 0) @@ -1851,7 +1851,8 @@ ieee80211_send_mgmt(struct ieee80211_nod if (arg == IEEE80211_AUTH_SHARED_RESPONSE) { IEEE80211_NOTE(vap, IEEE80211_MSG_AUTH, ni, "request encrypt frame (%s)", __func__); - m->m_flags |= M_LINK0; /* WEP-encrypt, please */ + /* mark frame for encryption */ + params.ibp_flags |= IEEE80211_BPF_CRYPTO; } } else m->m_pkthdr.len = m->m_len = 3 * sizeof(uint16_t); @@ -2092,7 +2093,13 @@ ieee80211_send_mgmt(struct ieee80211_nod /* NOTREACHED */ } - return ieee80211_mgmt_output(ni, m, type); + /* NB: force non-ProbeResp frames to the highest queue */ + params.ibp_pri = WME_AC_VO; + params.ibp_rate0 = bss->ni_txparms->mgmtrate; + /* NB: we know all frames are unicast */ + params.ibp_try0 = bss->ni_txparms->maxretry; + params.ibp_power = bss->ni_txpower; + return ieee80211_mgmt_output(ni, m, type, ¶ms); bad: ieee80211_free_node(ni); return ret; @@ -2296,8 +2303,8 @@ ieee80211_send_proberesp(struct ieee8021 wh = mtod(m, struct ieee80211_frame *); ieee80211_send_setup(bss, wh, - IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP, - vap->iv_myaddr, da, bss->ni_bssid); + IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP, + IEEE80211_NONQOS_TID, vap->iv_myaddr, da, bss->ni_bssid); /* XXX power management? */ M_WME_SETAC(m, WME_AC_BE); Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Sun Oct 26 00:32:02 2008 (r184281) +++ head/sys/net80211/ieee80211_proto.h Sun Oct 26 00:43:11 2008 (r184282) @@ -64,7 +64,8 @@ void ieee80211_syncflag_ext(struct ieee8 ((ni)->ni_vap->iv_input(ni, m, rssi, noise, rstamp)) int ieee80211_input_all(struct ieee80211com *, struct mbuf *, int, int, uint32_t); -int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int); +int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int, + struct ieee80211_bpf_params *); struct ieee80211_bpf_params; int ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:46:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A560B106567E; Sun, 26 Oct 2008 00:46:17 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 947238FC1A; Sun, 26 Oct 2008 00:46:17 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q0kH7k064996; Sun, 26 Oct 2008 00:46:17 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q0kHqZ064995; Sun, 26 Oct 2008 00:46:17 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260046.m9Q0kHqZ064995@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 00:46:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184283 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:46:17 -0000 Author: sam Date: Sun Oct 26 00:46:17 2008 New Revision: 184283 URL: http://svn.freebsd.org/changeset/base/184283 Log: change ieee80211_send_nulldata to send a QoS Null Data frame to a QoS-enabled station; this makes inactivity handling follow the spec as previously it would probe inactive stations w/ a Null Data (no QoS) data frame Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Oct 26 00:43:11 2008 (r184282) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 00:46:17 2008 (r184283) @@ -530,7 +530,9 @@ ieee80211_mgmt_output(struct ieee80211_n } /* - * Send a null data frame to the specified node. + * Send a null data frame to the specified node. If the station + * is setup for QoS then a QoS Null Data frame is constructed. + * If this is a WDS station then a 4-address frame is constructed. * * NB: the caller is assumed to have setup a node reference * for use; this is necessary to deal with a race condition @@ -546,6 +548,8 @@ ieee80211_send_nulldata(struct ieee80211 struct ieee80211com *ic = ni->ni_ic; struct mbuf *m; struct ieee80211_frame *wh; + int hdrlen; + uint8_t *frm; if (vap->iv_state == IEEE80211_S_CAC) { IEEE80211_NOTE(vap, IEEE80211_MSG_OUTPUT | IEEE80211_MSG_DOTH, @@ -555,37 +559,70 @@ ieee80211_send_nulldata(struct ieee80211 return EIO; /* XXX */ } - m = m_gethdr(M_NOWAIT, MT_HEADER); + if (ni->ni_flags & (IEEE80211_NODE_QOS|IEEE80211_NODE_HT)) + hdrlen = sizeof(struct ieee80211_qosframe); + else + hdrlen = sizeof(struct ieee80211_frame); + /* NB: only WDS vap's get 4-address frames */ + if (vap->iv_opmode == IEEE80211_M_WDS) + hdrlen += IEEE80211_ADDR_LEN; + if (ic->ic_flags & IEEE80211_F_DATAPAD) + hdrlen = roundup(hdrlen, sizeof(uint32_t)); + + m = ieee80211_getmgtframe(&frm, ic->ic_headroom + hdrlen, 0); if (m == NULL) { /* XXX debug msg */ ieee80211_unref_node(&ni); vap->iv_stats.is_tx_nobuf++; return ENOMEM; } - MH_ALIGN(m, sizeof(struct ieee80211_frame)); + KASSERT(M_LEADINGSPACE(m) >= hdrlen, + ("leading space %zd", M_LEADINGSPACE(m))); + M_PREPEND(m, hdrlen, M_DONTWAIT); + if (m == NULL) { + /* NB: cannot happen */ + ieee80211_free_node(ni); + return ENOMEM; + } - wh = mtod(m, struct ieee80211_frame *); - ieee80211_send_setup(ni, wh, - IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NODATA, - IEEE80211_NONQOS_TID, - vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); + wh = mtod(m, struct ieee80211_frame *); /* NB: a little lie */ + if (ni->ni_flags & IEEE80211_NODE_QOS) { + const int tid = WME_AC_TO_TID(WME_AC_BE); + uint8_t *qos; + + ieee80211_send_setup(ni, wh, + IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_QOS_NULL, + tid, vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); + + if (vap->iv_opmode == IEEE80211_M_WDS) + qos = ((struct ieee80211_qosframe_addr4 *) wh)->i_qos; + else + qos = ((struct ieee80211_qosframe *) wh)->i_qos; + qos[0] = tid & IEEE80211_QOS_TID; + if (ic->ic_wme.wme_wmeChanParams.cap_wmeParams[WME_AC_BE].wmep_noackPolicy) + qos[0] |= IEEE80211_QOS_ACKPOLICY_NOACK; + qos[1] = 0; + } else { + ieee80211_send_setup(ni, wh, + IEEE80211_FC0_TYPE_DATA | IEEE80211_FC0_SUBTYPE_NODATA, + IEEE80211_NONQOS_TID, + vap->iv_myaddr, ni->ni_macaddr, ni->ni_bssid); + } if (vap->iv_opmode != IEEE80211_M_WDS) { /* NB: power management bit is never sent by an AP */ if ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) && vap->iv_opmode != IEEE80211_M_HOSTAP) wh->i_fc[1] |= IEEE80211_FC1_PWR_MGT; - m->m_len = m->m_pkthdr.len = sizeof(struct ieee80211_frame); - } else { - /* NB: 4-address frame */ - m->m_len = m->m_pkthdr.len = - sizeof(struct ieee80211_frame_addr4); } + m->m_len = m->m_pkthdr.len = hdrlen; + M_WME_SETAC(m, WME_AC_BE); IEEE80211_NODE_STAT(ni, tx_data); IEEE80211_NOTE(vap, IEEE80211_MSG_DEBUG | IEEE80211_MSG_DUMPPKTS, ni, - "send null data frame on channel %u, pwr mgt %s", + "send %snull data frame on channel %u, pwr mgt %s", + ni->ni_flags & IEEE80211_NODE_QOS ? "QoS " : "", ieee80211_chan2ieee(ic, ic->ic_curchan), wh->i_fc[1] & IEEE80211_FC1_PWR_MGT ? "ena" : "dis"); From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:48:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF6BA10656A2; Sun, 26 Oct 2008 00:48:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EE288FC12; Sun, 26 Oct 2008 00:48:20 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q0mK53065204; Sun, 26 Oct 2008 00:48:20 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q0mKOt065203; Sun, 26 Oct 2008 00:48:20 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260048.m9Q0mKOt065203@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 00:48:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184284 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:48:20 -0000 Author: sam Date: Sun Oct 26 00:48:20 2008 New Revision: 184284 URL: http://svn.freebsd.org/changeset/base/184284 Log: change ieee80211_send_probereq to supply raw xmit parameters so it can control how frames are handled by the driver Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Oct 26 00:46:17 2008 (r184283) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 00:48:20 2008 (r184284) @@ -1688,6 +1688,8 @@ ieee80211_send_probereq(struct ieee80211 { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; + const struct ieee80211_txparam *tp; + struct ieee80211_bpf_params params; struct ieee80211_frame *wh; const struct ieee80211_rateset *rs; struct mbuf *m; @@ -1755,9 +1757,14 @@ ieee80211_send_probereq(struct ieee80211 frm = add_appie(frm, vap->iv_appie_probereq); m->m_pkthdr.len = m->m_len = frm - mtod(m, uint8_t *); + KASSERT(M_LEADINGSPACE(m) >= sizeof(struct ieee80211_frame), + ("leading space %zd", M_LEADINGSPACE(m))); M_PREPEND(m, sizeof(struct ieee80211_frame), M_DONTWAIT); - if (m == NULL) + if (m == NULL) { + /* NB: cannot happen */ + ieee80211_free_node(ni); return ENOMEM; + } wh = mtod(m, struct ieee80211_frame *); ieee80211_send_setup(ni, wh, @@ -1775,7 +1782,17 @@ ieee80211_send_probereq(struct ieee80211 ieee80211_chan2ieee(ic, ic->ic_curchan), ether_sprintf(bssid), ssidlen, ssid); - return ic->ic_raw_xmit(ni, m, NULL); + memset(¶ms, 0, sizeof(params)); + params.ibp_pri = M_WME_GETAC(m); + tp = &vap->iv_txparms[ieee80211_chan2mode(ic->ic_curchan)]; + params.ibp_rate0 = tp->mgmtrate; + if (IEEE80211_IS_MULTICAST(da)) { + params.ibp_flags |= IEEE80211_BPF_NOACK; + params.ibp_try0 = 1; + } else + params.ibp_try0 = tp->maxretry; + params.ibp_power = ni->ni_txpower; + return ic->ic_raw_xmit(ni, m, ¶ms); } /* From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:52:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39E781065671; Sun, 26 Oct 2008 00:52:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 293DE8FC08; Sun, 26 Oct 2008 00:52:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q0qQh2065575; Sun, 26 Oct 2008 00:52:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q0qQh4065574; Sun, 26 Oct 2008 00:52:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260052.m9Q0qQh4065574@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 00:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184285 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:52:27 -0000 Author: sam Date: Sun Oct 26 00:52:26 2008 New Revision: 184285 URL: http://svn.freebsd.org/changeset/base/184285 Log: fix comment that belonged w/ previous commit Modified: head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Oct 26 00:48:20 2008 (r184284) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 00:52:26 2008 (r184285) @@ -401,9 +401,8 @@ bad: /* * Set the direction field and address fields of an outgoing - * non-QoS frame. Note this should be called early on in - * constructing a frame as it sets i_fc[1]; other bits can - * then be or'd in. + * frame. Note this should be called early on in constructing + * a frame as it sets i_fc[1]; other bits can then be or'd in. */ static void ieee80211_send_setup( From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 00:55:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1378C1065672; Sun, 26 Oct 2008 00:55:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0217A8FC0C; Sun, 26 Oct 2008 00:55:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q0tcBN065890; Sun, 26 Oct 2008 00:55:38 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q0tcpY065888; Sun, 26 Oct 2008 00:55:38 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260055.m9Q0tcpY065888@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 00:55:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184286 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 00:55:39 -0000 Author: sam Date: Sun Oct 26 00:55:38 2008 New Revision: 184286 URL: http://svn.freebsd.org/changeset/base/184286 Log: introduce M_ENCAP flag to mark packets encapsulated w/ an 802.11 header Modified: head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_output.c Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Sun Oct 26 00:52:26 2008 (r184285) +++ head/sys/net80211/ieee80211_freebsd.h Sun Oct 26 00:55:38 2008 (r184286) @@ -239,6 +239,7 @@ void ieee80211_vap_destroy(struct ieee80 struct mbuf *ieee80211_getmgtframe(uint8_t **frm, int headroom, int pktlen); /* tx path usage */ +#define M_ENCAP M_PROTO1 /* 802.11 encap done */ #define M_WDS M_PROTO2 /* WDS frame */ #define M_EAPOL M_PROTO3 /* PAE/EAPOL frame */ #define M_PWR_SAV M_PROTO4 /* bypass PS handling */ @@ -247,7 +248,7 @@ struct mbuf *ieee80211_getmgtframe(uint8 #define M_TXCB M_PROTO7 /* do tx complete callback */ #define M_AMPDU_MPDU M_PROTO8 /* ok for A-MPDU aggregation */ #define M_80211_TX \ - (M_WDS|M_EAPOL|M_PWR_SAV|M_MORE_DATA|M_FF|M_TXCB|M_AMPDU_MPDU) + (M_ENCAP|M_WDS|M_EAPOL|M_PWR_SAV|M_MORE_DATA|M_FF|M_TXCB|M_AMPDU_MPDU) /* rx path usage */ #define M_AMPDU M_PROTO1 /* A-MPDU subframe */ Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Oct 26 00:52:26 2008 (r184285) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 00:55:38 2008 (r184286) @@ -507,6 +507,7 @@ ieee80211_mgmt_output(struct ieee80211_n "encrypting frame (%s)", __func__); wh->i_fc[1] |= IEEE80211_FC1_WEP; } + m->m_flags |= M_ENCAP; /* mark encapsulated */ KASSERT(type != IEEE80211_FC0_SUBTYPE_PROBE_RESP, ("probe response?")); M_WME_SETAC(m, params->ibp_pri); @@ -614,6 +615,7 @@ ieee80211_send_nulldata(struct ieee80211 wh->i_fc[1] |= IEEE80211_FC1_PWR_MGT; } m->m_len = m->m_pkthdr.len = hdrlen; + m->m_flags |= M_ENCAP; /* mark encapsulated */ M_WME_SETAC(m, WME_AC_BE); @@ -1151,6 +1153,8 @@ ieee80211_encap(struct ieee80211_node *n key != NULL ? key->wk_cipher->ic_header : 0, vap->iv_fragthreshold)) goto bad; + m->m_flags |= M_ENCAP; /* mark encapsulated */ + IEEE80211_NODE_STAT(ni, tx_data); if (IEEE80211_IS_MULTICAST(wh->i_addr1)) IEEE80211_NODE_STAT(ni, tx_mcast); @@ -1770,6 +1774,7 @@ ieee80211_send_probereq(struct ieee80211 IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_REQ, IEEE80211_NONQOS_TID, sa, da, bssid); /* XXX power management? */ + m->m_flags |= M_ENCAP; /* mark encapsulated */ M_WME_SETAC(m, WME_AC_BE); @@ -2359,6 +2364,7 @@ ieee80211_send_proberesp(struct ieee8021 IEEE80211_FC0_TYPE_MGT | IEEE80211_FC0_SUBTYPE_PROBE_RESP, IEEE80211_NONQOS_TID, vap->iv_myaddr, da, bss->ni_bssid); /* XXX power management? */ + m->m_flags |= M_ENCAP; /* mark encapsulated */ M_WME_SETAC(m, WME_AC_BE); From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 01:01:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 688D51065673; Sun, 26 Oct 2008 01:01:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5871D8FC12; Sun, 26 Oct 2008 01:01:01 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q111tj066381; Sun, 26 Oct 2008 01:01:01 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q1115T066379; Sun, 26 Oct 2008 01:01:01 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260101.m9Q1115T066379@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 01:01:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184287 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 01:01:01 -0000 Author: sam Date: Sun Oct 26 01:01:01 2008 New Revision: 184287 URL: http://svn.freebsd.org/changeset/base/184287 Log: move decl up before first use Modified: head/sys/net80211/ieee80211_proto.h Modified: head/sys/net80211/ieee80211_proto.h ============================================================================== --- head/sys/net80211/ieee80211_proto.h Sun Oct 26 00:55:38 2008 (r184286) +++ head/sys/net80211/ieee80211_proto.h Sun Oct 26 01:01:01 2008 (r184287) @@ -64,9 +64,9 @@ void ieee80211_syncflag_ext(struct ieee8 ((ni)->ni_vap->iv_input(ni, m, rssi, noise, rstamp)) int ieee80211_input_all(struct ieee80211com *, struct mbuf *, int, int, uint32_t); +struct ieee80211_bpf_params; int ieee80211_mgmt_output(struct ieee80211_node *, struct mbuf *, int, struct ieee80211_bpf_params *); -struct ieee80211_bpf_params; int ieee80211_raw_xmit(struct ieee80211_node *, struct mbuf *, const struct ieee80211_bpf_params *); int ieee80211_output(struct ifnet *, struct mbuf *, From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 01:04:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96D3410656AE; Sun, 26 Oct 2008 01:04:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 857BB8FC0A; Sun, 26 Oct 2008 01:04:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q14kXo066734; Sun, 26 Oct 2008 01:04:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q14krS066726; Sun, 26 Oct 2008 01:04:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810260104.m9Q14krS066726@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 01:04:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184288 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 01:04:46 -0000 Author: sam Date: Sun Oct 26 01:04:46 2008 New Revision: 184288 URL: http://svn.freebsd.org/changeset/base/184288 Log: New ap-side power save implementation; the main change is to allow drivers to queue frames previously encapsulated on a separate high priority list that is dispatched before the unencapsulated frames (to preserve order). Modified: head/sys/net80211/ieee80211_freebsd.h head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h head/sys/net80211/ieee80211_output.c head/sys/net80211/ieee80211_power.c head/sys/net80211/ieee80211_power.h head/sys/net80211/ieee80211_var.h Modified: head/sys/net80211/ieee80211_freebsd.h ============================================================================== --- head/sys/net80211/ieee80211_freebsd.h Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_freebsd.h Sun Oct 26 01:04:46 2008 (r184288) @@ -112,41 +112,14 @@ typedef struct { } while (0) /* - * Per-node power-save queue definitions. + * Power-save queue definitions. */ -#define IEEE80211_NODE_SAVEQ_INIT(_ni, _name) do { \ - mtx_init(&(_ni)->ni_savedq.ifq_mtx, _name, "802.11 ps queue", MTX_DEF);\ - (_ni)->ni_savedq.ifq_maxlen = IEEE80211_PS_MAX_QUEUE; \ -} while (0) -#define IEEE80211_NODE_SAVEQ_DESTROY(_ni) \ - mtx_destroy(&(_ni)->ni_savedq.ifq_mtx) -#define IEEE80211_NODE_SAVEQ_QLEN(_ni) \ - _IF_QLEN(&(_ni)->ni_savedq) -#define IEEE80211_NODE_SAVEQ_LOCK(_ni) do { \ - IF_LOCK(&(_ni)->ni_savedq); \ -} while (0) -#define IEEE80211_NODE_SAVEQ_UNLOCK(_ni) do { \ - IF_UNLOCK(&(_ni)->ni_savedq); \ -} while (0) -#define IEEE80211_NODE_SAVEQ_DEQUEUE(_ni, _m, _qlen) do { \ - IEEE80211_NODE_SAVEQ_LOCK(_ni); \ - _IF_DEQUEUE(&(_ni)->ni_savedq, _m); \ - (_qlen) = IEEE80211_NODE_SAVEQ_QLEN(_ni); \ - IEEE80211_NODE_SAVEQ_UNLOCK(_ni); \ -} while (0) -#define IEEE80211_NODE_SAVEQ_DRAIN(_ni, _qlen) do { \ - IEEE80211_NODE_SAVEQ_LOCK(_ni); \ - (_qlen) = IEEE80211_NODE_SAVEQ_QLEN(_ni); \ - _IF_DRAIN(&(_ni)->ni_savedq); \ - IEEE80211_NODE_SAVEQ_UNLOCK(_ni); \ -} while (0) -/* XXX could be optimized */ -#define _IEEE80211_NODE_SAVEQ_DEQUEUE_HEAD(_ni, _m) do { \ - _IF_DEQUEUE(&(_ni)->ni_savedq, m); \ -} while (0) -#define _IEEE80211_NODE_SAVEQ_ENQUEUE(_ni, _m, _qlen, _age) do {\ - _AGEQ_ENQUEUE(&ni->ni_savedq, _m, _qlen, _age); \ -} while (0) +typedef struct mtx ieee80211_psq_lock_t; +#define IEEE80211_PSQ_INIT(_psq, _name) \ + mtx_init(&(_psq)->psq_lock, _name, "802.11 ps q", MTX_DEF); +#define IEEE80211_PSQ_DESTROY(_psq) mtx_destroy(&(_psq)->psq_lock) +#define IEEE80211_PSQ_LOCK(_psq) mtx_lock(&(_psq)->psq_lock) +#define IEEE80211_PSQ_UNLOCK(_psq) mtx_unlock(&(_psq)->psq_lock) #ifndef IF_PREPEND_LIST #define _IF_PREPEND_LIST(ifq, mhead, mtail, mcount) do { \ Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_hostap.c Sun Oct 26 01:04:46 2008 (r184288) @@ -2171,7 +2171,7 @@ hostap_recv_pspoll(struct ieee80211_node { struct ieee80211vap *vap = ni->ni_vap; struct ieee80211_frame_min *wh; - struct ifnet *ifp = vap->iv_ifp; + struct ifnet *ifp; struct mbuf *m; uint16_t aid; int qlen; @@ -2208,7 +2208,7 @@ hostap_recv_pspoll(struct ieee80211_node } /* Okay, take the first queued packet and put it out... */ - IEEE80211_NODE_SAVEQ_DEQUEUE(ni, m, qlen); + m = ieee80211_node_psq_dequeue(ni, &qlen); if (m == NULL) { IEEE80211_NOTE_MAC(vap, IEEE80211_MSG_POWER, wh->i_addr2, "%s", "recv ps-poll, but queue empty"); @@ -2234,6 +2234,11 @@ hostap_recv_pspoll(struct ieee80211_node vap->iv_set_tim(ni, 0); } m->m_flags |= M_PWR_SAV; /* bypass PS handling */ + + if (m->m_flags & M_ENCAP) + ifp = vap->iv_ic->ic_ifp; + else + ifp = vap->iv_ifp; IF_ENQUEUE(&ifp->if_snd, m); if_start(ifp); } Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_node.c Sun Oct 26 01:04:46 2008 (r184288) @@ -904,7 +904,7 @@ node_cleanup(struct ieee80211_node *ni) /* * Drain power save queue and, if needed, clear TIM. */ - if (ieee80211_node_saveq_drain(ni) != 0 && vap->iv_set_tim != NULL) + if (ieee80211_node_psq_drain(ni) != 0 && vap->iv_set_tim != NULL) vap->iv_set_tim(ni, 0); ni->ni_associd = 0; @@ -943,7 +943,7 @@ node_free(struct ieee80211_node *ni) ic->ic_node_cleanup(ni); ieee80211_ies_cleanup(&ni->ni_ies); - IEEE80211_NODE_SAVEQ_DESTROY(ni); + ieee80211_psq_cleanup(&ni->ni_psq); IEEE80211_NODE_WDSQ_DESTROY(ni); FREE(ni, M_80211_NODE); } @@ -958,9 +958,8 @@ node_age(struct ieee80211_node *ni) /* * Age frames on the power save queue. */ - if (ieee80211_node_saveq_age(ni) != 0 && - IEEE80211_NODE_SAVEQ_QLEN(ni) == 0 && - vap->iv_set_tim != NULL) + if (ieee80211_node_psq_age(ni) != 0 && + ni->ni_psq.psq_len == 0 && vap->iv_set_tim != NULL) vap->iv_set_tim(ni, 0); /* * Age frames on the wds pending queue. @@ -1031,7 +1030,7 @@ ieee80211_alloc_node(struct ieee80211_no ni->ni_inact_reload = nt->nt_inact_init; ni->ni_inact = ni->ni_inact_reload; ni->ni_ath_defkeyix = 0x7fff; - IEEE80211_NODE_SAVEQ_INIT(ni, "unknown"); + ieee80211_psq_init(&ni->ni_psq, "unknown"); IEEE80211_NODE_WDSQ_INIT(ni, "unknown"); IEEE80211_NODE_LOCK(nt); @@ -1081,7 +1080,7 @@ ieee80211_tmp_node(struct ieee80211vap * IEEE80211_KEYIX_NONE); ni->ni_txpower = bss->ni_txpower; /* XXX optimize away */ - IEEE80211_NODE_SAVEQ_INIT(ni, "unknown"); + ieee80211_psq_init(&ni->ni_psq, "unknown"); IEEE80211_NODE_WDSQ_INIT(ni, "unknown"); } else { /* XXX msg */ Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_node.h Sun Oct 26 01:04:46 2008 (r184288) @@ -185,7 +185,7 @@ struct ieee80211_node { short ni_inact; /* inactivity mark count */ short ni_inact_reload;/* inactivity reload value */ int ni_txrate; /* legacy rate/MCS */ - struct ifqueue ni_savedq; /* ps-poll queue */ + struct ieee80211_psq ni_psq; /* power save queue */ struct ieee80211_nodestats ni_stats; /* per-node statistics */ struct ieee80211vap *ni_wdsvap; /* associated WDS vap */ Modified: head/sys/net80211/ieee80211_output.c ============================================================================== --- head/sys/net80211/ieee80211_output.c Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_output.c Sun Oct 26 01:04:46 2008 (r184288) @@ -225,7 +225,7 @@ ieee80211_start(struct ifnet *ifp) * the frame back when the time is right. * XXX lose WDS vap linkage? */ - ieee80211_pwrsave(ni, m); + (void) ieee80211_pwrsave(ni, m); ieee80211_free_node(ni); continue; } Modified: head/sys/net80211/ieee80211_power.c ============================================================================== --- head/sys/net80211/ieee80211_power.c Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_power.c Sun Oct 26 01:04:46 2008 (r184288) @@ -99,24 +99,115 @@ ieee80211_power_vdetach(struct ieee80211 } } +void +ieee80211_psq_init(struct ieee80211_psq *psq, const char *name) +{ + memset(psq, 0, sizeof(psq)); + psq->psq_maxlen = IEEE80211_PS_MAX_QUEUE; + IEEE80211_PSQ_INIT(psq, name); /* OS-dependent setup */ +} + +void +ieee80211_psq_cleanup(struct ieee80211_psq *psq) +{ +#if 0 + psq_drain(psq); /* XXX should not be needed? */ +#else + KASSERT(psq->psq_len == 0, ("%d frames on ps q", psq->psq_len)); +#endif + IEEE80211_PSQ_DESTROY(psq); /* OS-dependent cleanup */ +} + +/* + * Return the highest priority frame in the ps queue. + */ +struct mbuf * +ieee80211_node_psq_dequeue(struct ieee80211_node *ni, int *qlen) +{ + struct ieee80211_psq *psq = &ni->ni_psq; + struct ieee80211_psq_head *qhead; + struct mbuf *m; + + IEEE80211_PSQ_LOCK(psq); + qhead = &psq->psq_head[0]; +again: + if ((m = qhead->head) != NULL) { + if ((qhead->head = m->m_nextpkt) == NULL) + qhead->tail = NULL; + KASSERT(qhead->len > 0, ("qhead len %d", qhead->len)); + qhead->len--; + KASSERT(psq->psq_len > 0, ("psq len %d", psq->psq_len)); + psq->psq_len--; + m->m_nextpkt = NULL; + } + if (m == NULL && qhead == &psq->psq_head[0]) { + /* Algol-68 style for loop */ + qhead = &psq->psq_head[1]; + goto again; + } + if (qlen != NULL) + *qlen = psq->psq_len; + IEEE80211_PSQ_UNLOCK(psq); + return m; +} + +/* + * Reclaim an mbuf from the ps q. If marked with M_ENCAP + * we assume there is a node reference that must be relcaimed. + */ +static void +psq_mfree(struct mbuf *m) +{ + if (m->m_flags & M_ENCAP) { + struct ieee80211_node *ni = (void *) m->m_pkthdr.rcvif; + ieee80211_free_node(ni); + } + m->m_nextpkt = NULL; + m_freem(m); +} + /* - * Clear any frames queued on a node's power save queue. + * Clear any frames queued in the power save queue. * The number of frames that were present is returned. */ -int -ieee80211_node_saveq_drain(struct ieee80211_node *ni) +static int +psq_drain(struct ieee80211_psq *psq) { + struct ieee80211_psq_head *qhead; + struct mbuf *m; int qlen; - IEEE80211_NODE_SAVEQ_LOCK(ni); - qlen = IEEE80211_NODE_SAVEQ_QLEN(ni); - _IF_DRAIN(&ni->ni_savedq); - IEEE80211_NODE_SAVEQ_UNLOCK(ni); + IEEE80211_PSQ_LOCK(psq); + qlen = psq->psq_len; + qhead = &psq->psq_head[0]; +again: + while ((m = qhead->head) != NULL) { + qhead->head = m->m_nextpkt; + psq_mfree(m); + } + qhead->tail = NULL; + qhead->len = 0; + if (qhead == &psq->psq_head[0]) { /* Algol-68 style for loop */ + qhead = &psq->psq_head[1]; + goto again; + } + psq->psq_len = 0; + IEEE80211_PSQ_UNLOCK(psq); return qlen; } /* + * Clear any frames queued in the power save queue. + * The number of frames that were present is returned. + */ +int +ieee80211_node_psq_drain(struct ieee80211_node *ni) +{ + return psq_drain(&ni->ni_psq); +} + +/* * Age frames on the power save queue. The aging interval is * 4 times the listen interval specified by the station. This * number is factored into the age calculations when the frame @@ -127,28 +218,41 @@ ieee80211_node_saveq_drain(struct ieee80 * can check if it needs to adjust the tim. */ int -ieee80211_node_saveq_age(struct ieee80211_node *ni) +ieee80211_node_psq_age(struct ieee80211_node *ni) { + struct ieee80211_psq *psq = &ni->ni_psq; int discard = 0; - if (IEEE80211_NODE_SAVEQ_QLEN(ni) != 0) { + if (psq->psq_len != 0) { #ifdef IEEE80211_DEBUG struct ieee80211vap *vap = ni->ni_vap; #endif + struct ieee80211_psq_head *qhead; struct mbuf *m; - IEEE80211_NODE_SAVEQ_LOCK(ni); - while (IF_POLL(&ni->ni_savedq, m) != NULL && - M_AGE_GET(m) < IEEE80211_INACT_WAIT) { + IEEE80211_PSQ_LOCK(psq); + qhead = &psq->psq_head[0]; + again: + while ((m = qhead->head) != NULL && + M_AGE_GET(m) < IEEE80211_INACT_WAIT) { IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, "discard frame, age %u", M_AGE_GET(m)); - _IEEE80211_NODE_SAVEQ_DEQUEUE_HEAD(ni, m); - m_freem(m); + if ((qhead->head = m->m_nextpkt) == NULL) + qhead->tail = NULL; + KASSERT(qhead->len > 0, ("qhead len %d", qhead->len)); + qhead->len--; + KASSERT(psq->psq_len > 0, ("psq len %d", psq->psq_len)); + psq->psq_len--; + psq_mfree(m); discard++; } + if (qhead == &psq->psq_head[0]) { /* Algol-68 style for loop */ + qhead = &psq->psq_head[1]; + goto again; + } if (m != NULL) M_AGE_SUB(m, IEEE80211_INACT_WAIT); - IEEE80211_NODE_SAVEQ_UNLOCK(ni); + IEEE80211_PSQ_UNLOCK(psq); IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, "discard %u frames for age", discard); @@ -211,82 +315,143 @@ ieee80211_set_tim(struct ieee80211_node * The new packet is placed on the node's saved queue, and the TIM * is changed, if necessary. */ -void +int ieee80211_pwrsave(struct ieee80211_node *ni, struct mbuf *m) { + struct ieee80211_psq *psq = &ni->ni_psq; struct ieee80211vap *vap = ni->ni_vap; struct ieee80211com *ic = ni->ni_ic; + struct ieee80211_psq_head *qhead; int qlen, age; - IEEE80211_NODE_SAVEQ_LOCK(ni); - if (_IF_QFULL(&ni->ni_savedq)) { - _IF_DROP(&ni->ni_savedq); - IEEE80211_NODE_SAVEQ_UNLOCK(ni); + IEEE80211_PSQ_LOCK(psq); + if (psq->psq_len >= psq->psq_maxlen) { + psq->psq_drops++; + IEEE80211_PSQ_UNLOCK(psq); IEEE80211_NOTE(vap, IEEE80211_MSG_ANY, ni, "pwr save q overflow, drops %d (size %d)", - ni->ni_savedq.ifq_drops, IEEE80211_PS_MAX_QUEUE); + psq->psq_drops, psq->psq_len); #ifdef IEEE80211_DEBUG if (ieee80211_msg_dumppkts(vap)) ieee80211_dump_pkt(ni->ni_ic, mtod(m, caddr_t), m->m_len, -1, -1); #endif - m_freem(m); - return; + psq_mfree(m); + return ENOSPC; } /* - * Tag the frame with it's expiry time and insert - * it in the queue. The aging interval is 4 times - * the listen interval specified by the station. - * Frames that sit around too long are reclaimed - * using this information. + * Tag the frame with it's expiry time and insert it in + * the appropriate queue. The aging interval is 4 times + * the listen interval specified by the station. Frames + * that sit around too long are reclaimed using this + * information. */ /* TU -> secs. XXX handle overflow? */ age = IEEE80211_TU_TO_MS((ni->ni_intval * ic->ic_bintval) << 2) / 1000; - _IEEE80211_NODE_SAVEQ_ENQUEUE(ni, m, qlen, age); - IEEE80211_NODE_SAVEQ_UNLOCK(ni); + /* + * Encapsulated frames go on the high priority queue, + * other stuff goes on the low priority queue. We use + * this to order frames returned out of the driver + * ahead of frames we collect in ieee80211_start. + */ + if (m->m_flags & M_ENCAP) + qhead = &psq->psq_head[0]; + else + qhead = &psq->psq_head[1]; + if (qhead->tail == NULL) { + struct mbuf *mh; + + qhead->head = m; + /* + * Take care to adjust age when inserting the first + * frame of a queue and the other queue already has + * frames. We need to preserve the age difference + * relationship so ieee80211_node_psq_age works. + */ + if (qhead == &psq->psq_head[1]) { + mh = psq->psq_head[0].head; + if (mh != NULL) + age-= M_AGE_GET(mh); + } else { + mh = psq->psq_head[1].head; + if (mh != NULL) { + int nage = M_AGE_GET(mh) - age; + /* XXX is clamping to zero good 'nuf? */ + M_AGE_SET(mh, nage < 0 ? 0 : nage); + } + } + } else { + qhead->tail->m_nextpkt = m; + age -= M_AGE_GET(qhead->head); + } + KASSERT(age >= 0, ("age %d", age)); + M_AGE_SET(m, age); + m->m_nextpkt = NULL; + qhead->tail = m; + qhead->len++; + qlen = ++(psq->psq_len); + IEEE80211_PSQ_UNLOCK(psq); IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, "save frame with age %d, %u now queued", age, qlen); if (qlen == 1 && vap->iv_set_tim != NULL) vap->iv_set_tim(ni, 1); + + return 0; } /* - * Unload the frames from the ps q but don't send them - * to the driver yet. We do this in two stages to minimize - * locking but also because there's no easy way to preserve - * ordering given the existing ifnet access mechanisms. - * XXX could be optimized + * Move frames from the ps q to the vap's send queue + * and/or the driver's send queue; and kick the start + * method for each, as appropriate. Note we're careful + * to preserve packet ordering here. */ static void pwrsave_flushq(struct ieee80211_node *ni) { - struct mbuf *m, *mhead, *mtail; - int mcount; + struct ieee80211_psq *psq = &ni->ni_psq; + struct ieee80211vap *vap = ni->ni_vap; + struct ieee80211_psq_head *qhead; + struct ifnet *parent, *ifp; - IEEE80211_NODE_SAVEQ_LOCK(ni); - mcount = IEEE80211_NODE_SAVEQ_QLEN(ni); - mhead = mtail = NULL; - for (;;) { - _IEEE80211_NODE_SAVEQ_DEQUEUE_HEAD(ni, m); - if (m == NULL) - break; - if (mhead == NULL) { - mhead = m; - m->m_nextpkt = NULL; - } else - mtail->m_nextpkt = m; - mtail = m; - } - IEEE80211_NODE_SAVEQ_UNLOCK(ni); - if (mhead != NULL) { + IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, + "flush ps queue, %u packets queued", psq->psq_len); + + IEEE80211_PSQ_LOCK(psq); + qhead = &psq->psq_head[0]; /* 802.11 frames */ + if (qhead->head != NULL) { + /* XXX could dispatch through vap and check M_ENCAP */ + parent = vap->iv_ic->ic_ifp; /* XXX need different driver interface */ /* XXX bypasses q max and OACTIVE */ - struct ifnet *ifp = ni->ni_vap->iv_ifp; - IF_PREPEND_LIST(&ifp->if_snd, mhead, mtail, mcount); + IF_PREPEND_LIST(&parent->if_snd, qhead->head, qhead->tail, + qhead->len); + qhead->head = qhead->tail = NULL; + qhead->len = 0; + } else + parent = NULL; + + qhead = &psq->psq_head[1]; /* 802.3 frames */ + if (qhead->head != NULL) { + ifp = vap->iv_ifp; + /* XXX need different driver interface */ + /* XXX bypasses q max and OACTIVE */ + IF_PREPEND_LIST(&ifp->if_snd, qhead->head, qhead->tail, + qhead->len); + qhead->head = qhead->tail = NULL; + qhead->len = 0; + } else + ifp = NULL; + psq->psq_len = 0; + IEEE80211_PSQ_UNLOCK(psq); + + /* NB: do this outside the psq lock */ + /* XXX packets might get reordered if parent is OACTIVE */ + if (parent != NULL) + if_start(parent); + if (ifp != NULL) if_start(ifp); - } } /* @@ -326,7 +491,8 @@ ieee80211_node_pwrsave(struct ieee80211_ /* NB if no sta's in ps, driver should flush mc q */ vap->iv_update_ps(vap, vap->iv_ps_sta); } - pwrsave_flushq(ni); + if (ni->ni_psq.psq_len != 0) + pwrsave_flushq(ni); } } @@ -337,7 +503,6 @@ void ieee80211_sta_pwrsave(struct ieee80211vap *vap, int enable) { struct ieee80211_node *ni = vap->iv_bss; - int qlen; if (!((enable != 0) ^ ((ni->ni_flags & IEEE80211_NODE_PWR_MGT) != 0))) return; @@ -353,12 +518,8 @@ ieee80211_sta_pwrsave(struct ieee80211va * data frame we send the ap. * XXX can we use a data frame to take us out of ps? */ - qlen = IEEE80211_NODE_SAVEQ_QLEN(ni); - if (qlen != 0) { - IEEE80211_NOTE(vap, IEEE80211_MSG_POWER, ni, - "flush ps queue, %u packets queued", qlen); + if (ni->ni_psq.psq_len != 0) pwrsave_flushq(ni); - } } else { ni->ni_flags |= IEEE80211_NODE_PWR_MGT; ieee80211_send_nulldata(ieee80211_ref_node(ni)); Modified: head/sys/net80211/ieee80211_power.h ============================================================================== --- head/sys/net80211/ieee80211_power.h Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_power.h Sun Oct 26 01:04:46 2008 (r184288) @@ -28,6 +28,39 @@ #define _NET80211_IEEE80211_POWER_H_ struct ieee80211com; +struct ieee80211vap; +struct ieee80211_node; +struct mbuf; + +/* + * Power save packet queues. There are two queues, one + * for frames coming from the net80211 layer and the other + * for frames that come from the driver. Frames from the + * driver are expected to have M_ENCAP marked to indicate + * they have already been encapsulated and are treated as + * higher priority: they are sent first when flushing the + * queue on a power save state change or in response to a + * ps-poll frame. + * + * Note that frames sent from the high priority queue are + * fed directly to the driver without going through + * ieee80211_start again; drivers that send up encap'd + * frames are required to handle them when they come back. + */ +struct ieee80211_psq { + ieee80211_psq_lock_t psq_lock; + int psq_len; + int psq_maxlen; + int psq_drops; + struct ieee80211_psq_head { + struct mbuf *head; + struct mbuf *tail; + int len; + } psq_head[2]; /* 2 priorities */ +}; + +void ieee80211_psq_init(struct ieee80211_psq *, const char *); +void ieee80211_psq_cleanup(struct ieee80211_psq *); void ieee80211_power_attach(struct ieee80211com *); void ieee80211_power_detach(struct ieee80211com *); @@ -35,9 +68,10 @@ void ieee80211_power_vattach(struct ieee void ieee80211_power_vdetach(struct ieee80211vap *); void ieee80211_power_latevattach(struct ieee80211vap *); -int ieee80211_node_saveq_drain(struct ieee80211_node *); -int ieee80211_node_saveq_age(struct ieee80211_node *); -void ieee80211_pwrsave(struct ieee80211_node *, struct mbuf *); +struct mbuf *ieee80211_node_psq_dequeue(struct ieee80211_node *ni, int *qlen); +int ieee80211_node_psq_drain(struct ieee80211_node *); +int ieee80211_node_psq_age(struct ieee80211_node *); +int ieee80211_pwrsave(struct ieee80211_node *, struct mbuf *); void ieee80211_node_pwrsave(struct ieee80211_node *, int enable); void ieee80211_sta_pwrsave(struct ieee80211vap *, int enable); Modified: head/sys/net80211/ieee80211_var.h ============================================================================== --- head/sys/net80211/ieee80211_var.h Sun Oct 26 01:01:01 2008 (r184287) +++ head/sys/net80211/ieee80211_var.h Sun Oct 26 01:04:46 2008 (r184288) @@ -47,8 +47,8 @@ #include #include #include /* for ieee80211_stats */ -#include #include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 02:22:44 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 954ED1065675; Sun, 26 Oct 2008 02:22:44 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3E38B8FC13; Sun, 26 Oct 2008 02:22:44 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9Q2KvPd034144; Sat, 25 Oct 2008 20:20:57 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 25 Oct 2008 20:20:57 -0600 (MDT) Message-Id: <20081025.202057.74716595.imp@bsdimp.com> To: bms@FreeBSD.org From: Warner Losh In-Reply-To: <4902DE9E.2090004@FreeBSD.org> References: <200810250618.m9P6ICWl023370@svn.freebsd.org> <4902DE9E.2090004@FreeBSD.org> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, marcel@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 02:22:44 -0000 > Thanks for bringing this code in. Hopefully it shouldn't be too hard to > add MTD-like support on top, and/or port it to other parts. What, exactly, do you mean here? The partitioning stuff, the flash erase stuff, moving all things through the /dev/mt* or something else? Warner From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 09:35:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4BA2106566C; Sun, 26 Oct 2008 09:35:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C05928FC1D; Sun, 26 Oct 2008 09:35:09 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9Q9Z9IX077141; Sun, 26 Oct 2008 09:35:09 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9Q9Z9iu077128; Sun, 26 Oct 2008 09:35:09 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200810260935.m9Q9Z9iu077128@svn.freebsd.org> From: Xin LI Date: Sun, 26 Oct 2008 09:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184289 - in stable/7/usr.sbin/nscd: . agents X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 09:35:10 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 15:41:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8C38A106569C; Sun, 26 Oct 2008 15:41:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A3DA8FC18; Sun, 26 Oct 2008 15:41:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QFfNEp085740; Sun, 26 Oct 2008 15:41:23 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QFfN4R085739; Sun, 26 Oct 2008 15:41:23 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810261541.m9QFfN4R085739@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 26 Oct 2008 15:41:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184290 - in stable/7/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 15:41:23 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 17:03:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB0A61065671; Sun, 26 Oct 2008 17:03:51 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 992538FC0A; Sun, 26 Oct 2008 17:03:51 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QH3pAx088239; Sun, 26 Oct 2008 17:03:51 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QH3p1D088237; Sun, 26 Oct 2008 17:03:51 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200810261703.m9QH3p1D088237@svn.freebsd.org> From: Ken Smith Date: Sun, 26 Oct 2008 17:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184291 - in releng/6.4/sys: . dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 17:03:51 -0000 Author: kensmith Date: Sun Oct 26 17:03:51 2008 New Revision: 184291 URL: http://svn.freebsd.org/changeset/base/184291 Log: MFS r183978: Go ahead with adding device ID for Nikon D300 camera so it gets into 6.4-REL. PR: usb/118741 Submitted by: Yuri Approved by: re (rwatson for stable/6, kib for me doing releng/6.4) Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/dev/usb/umass.c releng/6.4/sys/dev/usb/usbdevs Modified: releng/6.4/sys/dev/usb/umass.c ============================================================================== --- releng/6.4/sys/dev/usb/umass.c Sun Oct 26 15:41:23 2008 (r184290) +++ releng/6.4/sys/dev/usb/umass.c Sun Oct 26 17:03:51 2008 (r184291) @@ -424,6 +424,10 @@ Static struct umass_devdescr_t umass_dev UMASS_PROTO_SCSI | UMASS_PROTO_BBB, FORCE_SHORT_INQUIRY }, + { USB_VENDOR_NIKON, USB_PRODUCT_NIKON_D300, RID_WILDCARD, + UMASS_PROTO_SCSI | UMASS_PROTO_BBB, + NO_QUIRKS + }, { USB_VENDOR_OLYMPUS, USB_PRODUCT_OLYMPUS_C1, RID_WILDCARD, UMASS_PROTO_SCSI | UMASS_PROTO_BBB, WRONG_CSWSIG Modified: releng/6.4/sys/dev/usb/usbdevs ============================================================================== --- releng/6.4/sys/dev/usb/usbdevs Sun Oct 26 15:41:23 2008 (r184290) +++ releng/6.4/sys/dev/usb/usbdevs Sun Oct 26 17:03:51 2008 (r184291) @@ -1356,6 +1356,7 @@ product NETGEAR FA120 0x1040 USB 2.0 Et /* Nikon products */ product NIKON E990 0x0102 Digital Camera E990 product NIKON LS40 0x4000 CoolScan LS40 ED +product NIKON D300 0x041a Digital Camera D300 /* NovaTech Products */ product NOVATECH NV902 0x9020 NovaTech NV-902W From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 17:20:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFA75106569D; Sun, 26 Oct 2008 17:20:37 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9CD208FC1D; Sun, 26 Oct 2008 17:20:37 +0000 (UTC) (envelope-from lulf@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QHKbCd089686; Sun, 26 Oct 2008 17:20:37 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QHKbEu089676; Sun, 26 Oct 2008 17:20:37 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200810261720.m9QHKbEu089676@svn.freebsd.org> From: Ulf Lilleengen Date: Sun, 26 Oct 2008 17:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184292 - head/sys/geom/vinum X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 17:20:37 -0000 Author: lulf Date: Sun Oct 26 17:20:37 2008 New Revision: 184292 URL: http://svn.freebsd.org/changeset/base/184292 Log: - Import macros used in gmirror for printing gvinum debug messages and making the output more standardized. - Add a sysctl to set the verbosity of the debug messages. - While there, fixup typos and wording in the messages. Modified: head/sys/geom/vinum/geom_vinum.c head/sys/geom/vinum/geom_vinum.h head/sys/geom/vinum/geom_vinum_drive.c head/sys/geom/vinum/geom_vinum_init.c head/sys/geom/vinum/geom_vinum_plex.c head/sys/geom/vinum/geom_vinum_raid5.c head/sys/geom/vinum/geom_vinum_rm.c head/sys/geom/vinum/geom_vinum_state.c head/sys/geom/vinum/geom_vinum_subr.c head/sys/geom/vinum/geom_vinum_volume.c Modified: head/sys/geom/vinum/geom_vinum.c ============================================================================== --- head/sys/geom/vinum/geom_vinum.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum.c Sun Oct 26 17:20:37 2008 (r184292) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -42,12 +43,12 @@ __FBSDID("$FreeBSD$"); #include #include -#if 0 SYSCTL_DECL(_kern_geom); SYSCTL_NODE(_kern_geom, OID_AUTO, vinum, CTLFLAG_RW, 0, "GEOM_VINUM stuff"); -SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &gv_debug, 0, +u_int g_vinum_debug = 0; +TUNABLE_INT("kern.geom.vinum.debug", &g_vinum_debug); +SYSCTL_UINT(_kern_geom_vinum, OID_AUTO, debug, CTLFLAG_RW, &g_vinum_debug, 0, "Debug level"); -#endif int gv_create(struct g_geom *, struct gctl_req *); @@ -363,7 +364,7 @@ gv_create(struct g_geom *gp, struct gctl */ pp = g_provider_by_name(d->device); if (pp == NULL) { - printf("geom_vinum: %s: drive disapeared?\n", + G_VINUM_DEBUG(0, "%s: drive disappeared?", d->device); continue; } Modified: head/sys/geom/vinum/geom_vinum.h ============================================================================== --- head/sys/geom/vinum/geom_vinum.h Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum.h Sun Oct 26 17:20:37 2008 (r184292) @@ -96,4 +96,30 @@ void gv_update_vol_size(struct gv_volume off_t gv_vol_size(struct gv_volume *); off_t gv_plex_size(struct gv_plex *); +extern u_int g_vinum_debug; + +#define G_VINUM_DEBUG(lvl, ...) do { \ + if (g_vinum_debug >= (lvl)) { \ + printf("GEOM_VINUM"); \ + if (g_vinum_debug > 0) \ + printf("[%u]", lvl); \ + printf(": "); \ + printf(__VA_ARGS__); \ + printf("\n"); \ + } \ +} while (0) + +#define G_VINUM_LOGREQ(lvl, bp, ...) do { \ + if (g_vinum_debug >= (lvl)) { \ + printf("GEOM_VINUM"); \ + if (g_vinum_debug > 0) \ + printf("[%u]", lvl); \ + printf(": "); \ + printf(__VA_ARGS__); \ + printf(" "); \ + g_print_bio(bp); \ + printf("\n"); \ + } \ +} while (0) + #endif /* !_GEOM_VINUM_H_ */ Modified: head/sys/geom/vinum/geom_vinum_drive.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_drive.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_drive.c Sun Oct 26 17:20:37 2008 (r184292) @@ -172,7 +172,7 @@ gv_read_header(struct g_consumer *cp, st g_free(d_hdr); return (-1); } else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_SPARC64) { - printf("VINUM: detected legacy sparc64 header\n"); + G_VINUM_DEBUG(1, "detected legacy sparc64 header"); m_hdr->magic = GV_MAGIC; /* Legacy sparc64 on-disk header */ m_hdr->config_length = GV_GET64(be); @@ -186,7 +186,7 @@ gv_read_header(struct g_consumer *cp, st m_hdr->label.last_update.tv_usec = GV_GET64(be); m_hdr->label.drive_size = GV_GET64(be); } else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_POWERPC) { - printf("VINUM: detected legacy PowerPC header\n"); + G_VINUM_DEBUG(1, "detected legacy PowerPC header"); m_hdr->magic = GV_MAGIC; /* legacy 32-bit big endian on-disk header */ m_hdr->config_length = GV_GET32(be); @@ -200,7 +200,7 @@ gv_read_header(struct g_consumer *cp, st m_hdr->label.last_update.tv_usec = GV_GET32(be); m_hdr->label.drive_size = GV_GET64(be); } else if (gv_legacy_header_type(d_hdr, be) == GV_LEGACY_I386) { - printf("VINUM: detected legacy i386 header\n"); + G_VINUM_DEBUG(1, "detected legacy i386 header"); m_hdr->magic = GV_MAGIC; /* legacy i386 on-disk header */ m_hdr->config_length = GV_GET32(le); @@ -214,7 +214,7 @@ gv_read_header(struct g_consumer *cp, st m_hdr->label.last_update.tv_usec = GV_GET32(le); m_hdr->label.drive_size = GV_GET64(le); } else { - printf("VINUM: detected legacy amd64 header\n"); + G_VINUM_DEBUG(1, "detected legacy amd64 header"); m_hdr->magic = GV_MAGIC; /* legacy amd64 on-disk header */ m_hdr->config_length = GV_GET64(le); @@ -354,7 +354,7 @@ gv_save_config(struct g_consumer *cp, st hdr = d->hdr; if (hdr == NULL) { - printf("GEOM_VINUM: drive %s has NULL hdr\n", d->name); + G_VINUM_DEBUG(0, "drive %s has NULL hdr", d->name); g_free(vhdr); return; } @@ -367,7 +367,7 @@ gv_save_config(struct g_consumer *cp, st error = g_access(cp2, 0, 1, 0); if (error) { - printf("GEOM_VINUM: g_access failed on drive %s, errno %d\n", + G_VINUM_DEBUG(0, "g_access failed on drive %s, errno %d", d->name, error); sbuf_delete(sb); g_free(vhdr); @@ -378,7 +378,7 @@ gv_save_config(struct g_consumer *cp, st do { error = gv_write_header(cp2, vhdr); if (error) { - printf("GEOM_VINUM: writing vhdr failed on drive %s, " + G_VINUM_DEBUG(0, "writing vhdr failed on drive %s, " "errno %d", d->name, error); break; } @@ -386,7 +386,7 @@ gv_save_config(struct g_consumer *cp, st error = g_write_data(cp2, GV_CFG_OFFSET, sbuf_data(sb), GV_CFG_LEN); if (error) { - printf("GEOM_VINUM: writing first config copy failed " + G_VINUM_DEBUG(0, "writing first config copy failed " "on drive %s, errno %d", d->name, error); break; } @@ -394,7 +394,7 @@ gv_save_config(struct g_consumer *cp, st error = g_write_data(cp2, GV_CFG_OFFSET + GV_CFG_LEN, sbuf_data(sb), GV_CFG_LEN); if (error) - printf("GEOM_VINUM: writing second config copy failed " + G_VINUM_DEBUG(0, "writing second config copy failed " "on drive %s, errno %d", d->name, error); } while (0); @@ -836,8 +836,8 @@ gv_drive_dead(void *arg, int flag) LIST_FOREACH(cp, &gp->consumer, consumer) { if (cp->nstart != cp->nend) { - printf("GEOM_VINUM: dead drive '%s' has still " - "active requests, can't detach consumer\n", + G_VINUM_DEBUG(0, "dead drive '%s' still has " + "active requests, cannot detach consumer", d->name); g_post_event(gv_drive_dead, d, M_WAITOK, d, NULL); @@ -847,7 +847,7 @@ gv_drive_dead(void *arg, int flag) g_access(cp, -cp->acr, -cp->acw, -cp->ace); } - printf("GEOM_VINUM: lost drive '%s'\n", d->name); + G_VINUM_DEBUG(1, "lost drive '%s'", d->name); d->geom = NULL; LIST_FOREACH(s, &d->subdisks, from_drive) { s->provider = NULL; Modified: head/sys/geom/vinum/geom_vinum_init.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_init.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_init.c Sun Oct 26 17:20:37 2008 (r184292) @@ -420,15 +420,15 @@ gv_rebuild_td(void *arg) error = g_access(cp, 1, 1, 0); if (error) { g_topology_unlock(); - printf("GEOM_VINUM: rebuild of %s failed to access consumer: " - "%d\n", p->name, error); + G_VINUM_DEBUG(0, "rebuild of %s failed to access consumer: " + "%d", p->name, error); kproc_exit(error); } g_topology_unlock(); buf = g_malloc(sync->syncsize, M_WAITOK); - printf("GEOM_VINUM: rebuild of %s started\n", p->name); + G_VINUM_DEBUG(1, "rebuild of %s started", p->name); i = 0; for (i = 0; i < p->size; i += (p->stripesize * (p->sdcount - 1))) { /* @@ -437,8 +437,8 @@ gv_rebuild_td(void *arg) */ bp = g_new_bio(); if (bp == NULL) { - printf("GEOM_VINUM: rebuild of %s failed creating bio: " - "out of memory\n", p->name); + G_VINUM_DEBUG(0, "rebuild of %s failed creating bio: " + "out of memory", p->name); break; } bp->bio_cmd = BIO_WRITE; @@ -454,8 +454,8 @@ gv_rebuild_td(void *arg) /* ... and wait for the result. */ error = biowait(bp, "gwrite"); if (error) { - printf("GEOM_VINUM: rebuild of %s failed at offset %jd " - "errno: %d\n", p->name, i, error); + G_VINUM_DEBUG(0, "rebuild of %s failed at offset %jd " + "errno: %d", p->name, i, error); break; } g_destroy_bio(bp); @@ -477,7 +477,7 @@ gv_rebuild_td(void *arg) /* Successful initialization. */ if (!error) - printf("GEOM_VINUM: rebuild of %s finished\n", p->name); + G_VINUM_DEBUG(1, "rebuild of %s finished", p->name); g_free(sync); kproc_exit(error); @@ -508,8 +508,8 @@ gv_sync_td(void *arg) error = g_access(from, 1, 0, 0); if (error) { g_topology_unlock(); - printf("GEOM_VINUM: sync from '%s' failed to access " - "consumer: %d\n", sync->from->name, error); + G_VINUM_DEBUG(0, "sync from '%s' failed to access " + "consumer: %d", sync->from->name, error); g_free(sync); kproc_exit(error); } @@ -517,21 +517,21 @@ gv_sync_td(void *arg) if (error) { g_access(from, -1, 0, 0); g_topology_unlock(); - printf("GEOM_VINUM: sync to '%s' failed to access " - "consumer: %d\n", p->name, error); + G_VINUM_DEBUG(0, "sync to '%s' failed to access " + "consumer: %d", p->name, error); g_free(sync); kproc_exit(error); } g_topology_unlock(); - printf("GEOM_VINUM: plex sync %s -> %s started\n", sync->from->name, + G_VINUM_DEBUG(1, "plex sync %s -> %s started", sync->from->name, sync->to->name); for (i = 0; i < p->size; i+= sync->syncsize) { /* Read some bits from the good plex. */ buf = g_read_data(from, i, sync->syncsize, &error); if (buf == NULL) { - printf("GEOM_VINUM: sync read from '%s' failed at " - "offset %jd; errno: %d\n", sync->from->name, i, + G_VINUM_DEBUG(0, "sync read from '%s' failed at " + "offset %jd; errno: %d", sync->from->name, i, error); break; } @@ -544,8 +544,8 @@ gv_sync_td(void *arg) */ bp = g_new_bio(); if (bp == NULL) { - printf("GEOM_VINUM: sync write to '%s' failed at " - "offset %jd; out of memory\n", p->name, i); + G_VINUM_DEBUG(0, "sync write to '%s' failed at " + "offset %jd; out of memory", p->name, i); g_free(buf); break; } @@ -569,7 +569,7 @@ gv_sync_td(void *arg) g_destroy_bio(bp); g_free(buf); if (error) { - printf("GEOM_VINUM: sync write to '%s' failed at " + G_VINUM_DEBUG(0, "sync write to '%s' failed at " "offset %jd; errno: %d\n", p->name, i, error); break; } @@ -586,7 +586,7 @@ gv_sync_td(void *arg) /* Successful initialization. */ if (!error) - printf("GEOM_VINUM: plex sync %s -> %s finished\n", + G_VINUM_DEBUG(1, "plex sync %s -> %s finished", sync->from->name, sync->to->name); p->flags &= ~GV_PLEX_SYNCING; @@ -630,8 +630,8 @@ gv_init_td(void *arg) if (error) { s->init_error = error; g_topology_unlock(); - printf("GEOM_VINUM: subdisk '%s' init: failed to access " - "consumer; error: %d\n", s->name, error); + G_VINUM_DEBUG(0, "subdisk '%s' init: failed to access " + "consumer; error: %d", s->name, error); kproc_exit(error); } g_topology_unlock(); @@ -639,8 +639,8 @@ gv_init_td(void *arg) for (i = start; i < offset + length; i += init_size) { error = g_write_data(cp, i, buf, init_size); if (error) { - printf("GEOM_VINUM: subdisk '%s' init: write failed" - " at offset %jd (drive offset %jd); error %d\n", + G_VINUM_DEBUG(0, "subdisk '%s' init: write failed" + " at offset %jd (drive offset %jd); error %d", s->name, (intmax_t)s->initialized, (intmax_t)i, error); break; @@ -664,7 +664,7 @@ gv_init_td(void *arg) gv_set_sd_state(s, GV_SD_UP, GV_SETSTATE_CONFIG); g_topology_unlock(); s->initialized = 0; - printf("GEOM_VINUM: subdisk '%s' init: finished successfully\n", + G_VINUM_DEBUG(1, "subdisk '%s' init: finished successfully", s->name); } kproc_exit(error); Modified: head/sys/geom/vinum/geom_vinum_plex.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_plex.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_plex.c Sun Oct 26 17:20:37 2008 (r184292) @@ -189,7 +189,7 @@ gv_plexbuffer(struct gv_plex *p, struct if (!(bp->bio_cflags & GV_BIO_SYNCREQ)) return (ENXIO); - printf("GEOM_VINUM: sd %s is initializing\n", s->name); + G_VINUM_DEBUG(1, "sd %s is initializing", s->name); gv_set_sd_state(s, GV_SD_INITIALIZING, GV_SETSTATE_FORCE); break; @@ -558,9 +558,7 @@ gv_plex_normal_request(struct gv_plex *p * clean up a lot. */ if (err) { - printf("GEOM_VINUM: plex request failed for "); - g_print_bio(bp); - printf("\n"); + G_VINUM_LOGREQ(0, bp, "plex request failed."); TAILQ_FOREACH_SAFE(bq, &wp->bits, queue, bq2) { TAILQ_REMOVE(&wp->bits, bq, queue); g_free(bq); @@ -620,9 +618,7 @@ gv_plex_normal_request(struct gv_plex *p /* Building the sub-request failed. */ if (err) { - printf("GEOM_VINUM: plex request failed for "); - g_print_bio(bp); - printf("\n"); + G_VINUM_LOGREQ(0, bp, "plex request failed."); cbp = bp->bio_driver1; while (cbp != NULL) { pbp = cbp->bio_caller1; @@ -719,7 +715,7 @@ gv_plex_taste(struct g_class *mp, struct /* Now find the correct plex where this subdisk belongs to. */ p = gv_find_plex(sc, s->plex); if (p == NULL) { - printf("gv_plex_taste: NULL p for '%s'\n", s->name); + G_VINUM_DEBUG(0, "%s: NULL p for '%s'", __func__, s->name); return (NULL); } @@ -740,7 +736,7 @@ gv_plex_taste(struct g_class *mp, struct cp = g_new_consumer(gp); error = g_attach(cp, pp); if (error) { - printf("geom_vinum: couldn't attach consumer to %s\n", + G_VINUM_DEBUG(0, "unable to attach consumer to %s", pp->name); g_destroy_consumer(cp); return (NULL); @@ -749,8 +745,8 @@ gv_plex_taste(struct g_class *mp, struct if ((cp2 != NULL) && (cp2->acr || cp2->acw || cp2->ace)) { error = g_access(cp, cp2->acr, cp2->acw, cp2->ace); if (error) { - printf("geom_vinum: couldn't set access counts" - " for consumer on %s\n", pp->name); + G_VINUM_DEBUG(0, "unable to set access counts" + " for consumer on %s", pp->name); g_detach(cp); g_destroy_consumer(cp); return (NULL); Modified: head/sys/geom/vinum/geom_vinum_raid5.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_raid5.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_raid5.c Sun Oct 26 17:20:37 2008 (r184292) @@ -208,7 +208,7 @@ gv_rebuild_raid5(struct gv_plex *p, stru if (!(bp->bio_cflags & GV_BIO_REBUILD)) return (ENXIO); - printf("GEOM_VINUM: sd %s is reviving\n", broken->name); + G_VINUM_DEBUG(1, "sd %s is reviving", broken->name); gv_set_sd_state(broken, GV_SD_REVIVING, GV_SETSTATE_FORCE); break; Modified: head/sys/geom/vinum/geom_vinum_rm.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_rm.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_rm.c Sun Oct 26 17:20:37 2008 (r184292) @@ -351,8 +351,8 @@ gv_rm_drive(struct gv_softc *sc, struct cp = LIST_FIRST(&gp->consumer); err = g_access(cp, 0, 1, 0); if (err) { - printf("GEOM_VINUM: gv_rm_drive: couldn't access '%s', errno: " - "%d\n", cp->provider->name, err); + G_VINUM_DEBUG(0, "%s: unable to access '%s', errno: " + "%d", __func__, cp->provider->name, err); return (err); } @@ -361,8 +361,8 @@ gv_rm_drive(struct gv_softc *sc, struct g_topology_unlock(); err = gv_write_header(cp, d->hdr); if (err) { - printf("GEOM_VINUM: gv_rm_drive: couldn't write header to '%s'" - ", errno: %d\n", cp->provider->name, err); + G_VINUM_DEBUG(0, "%s: unable to write header to '%s'" + ", errno: %d", __func__, cp->provider->name, err); d->hdr->magic = GV_MAGIC; } g_topology_lock(); Modified: head/sys/geom/vinum/geom_vinum_state.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_state.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_state.c Sun Oct 26 17:20:37 2008 (r184292) @@ -280,8 +280,8 @@ gv_update_sd_state(struct gv_sd *s) s->state = GV_SD_UP; if (s->state != oldstate) - printf("GEOM_VINUM: subdisk %s state change: %s -> %s\n", - s->name, gv_sdstate(oldstate), gv_sdstate(s->state)); + G_VINUM_DEBUG(1, "subdisk %s state change: %s -> %s", s->name, + gv_sdstate(oldstate), gv_sdstate(s->state)); /* Update the plex, if we have one. */ if (s->plex_sc != NULL) @@ -324,7 +324,7 @@ gv_update_plex_state(struct gv_plex *p) p->state = GV_PLEX_DOWN; if (p->state != oldstate) - printf("GEOM_VINUM: plex %s state change: %s -> %s\n", p->name, + G_VINUM_DEBUG(1, "plex %s state change: %s -> %s", p->name, gv_plexstate(oldstate), gv_plexstate(p->state)); /* Update our volume, if we have one. */ Modified: head/sys/geom/vinum/geom_vinum_subr.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_subr.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_subr.c Sun Oct 26 17:20:37 2008 (r184292) @@ -113,7 +113,7 @@ gv_parse_config(struct gv_softc *sc, u_c if (!strcmp(token[0], "volume")) { v = gv_new_volume(tokens, token); if (v == NULL) { - printf("geom_vinum: failed volume\n"); + G_VINUM_DEBUG(0, "failed volume"); break; } @@ -132,7 +132,7 @@ gv_parse_config(struct gv_softc *sc, u_c } else if (!strcmp(token[0], "plex")) { p = gv_new_plex(tokens, token); if (p == NULL) { - printf("geom_vinum: failed plex\n"); + G_VINUM_DEBUG(0, "failed plex"); break; } @@ -152,7 +152,7 @@ gv_parse_config(struct gv_softc *sc, u_c s = gv_new_sd(tokens, token); if (s == NULL) { - printf("geom_vinum: failed subdisk\n"); + G_VINUM_DEBUG(0, "failed subdisk"); break; } @@ -265,8 +265,8 @@ gv_sd_to_plex(struct gv_plex *p, struct /* Check correct size of this subdisk. */ s2 = LIST_FIRST(&p->subdisks); if (s2 != NULL && gv_is_striped(p) && (s2->size != s->size)) { - printf("GEOM_VINUM: need equal sized subdisks for " - "this plex organisation - %s (%jd) <-> %s (%jd)\n", + G_VINUM_DEBUG(0, "need equal sized subdisks for " + "this plex organisation - %s (%jd) <-> %s (%jd)", s2->name, s2->size, s->name, s->size); return (-1); } @@ -439,8 +439,8 @@ gv_update_plex_config(struct gv_plex *p) s = LIST_FIRST(&p->subdisks); LIST_FOREACH(s2, &p->subdisks, in_plex) { if (s->size != s2->size) { - printf("geom_vinum: subdisk size mismatch " - "%s (%jd) <> %s (%jd)\n", s->name, s->size, + G_VINUM_DEBUG(0, "subdisk size mismatch %s" + "(%jd) <> %s (%jd)", s->name, s->size, s2->name, s2->size); state = GV_PLEX_DOWN; } @@ -450,10 +450,9 @@ gv_update_plex_config(struct gv_plex *p) LIST_FOREACH(s, &p->subdisks, in_plex) { remainder = s->size % p->stripesize; if (remainder) { - printf("gvinum: size of sd %s is not a " + G_VINUM_DEBUG(1, "size of sd %s is not a " "multiple of plex stripesize, taking off " - "%jd bytes\n", s->name, - (intmax_t)remainder); + "%jd bytes", s->name, (intmax_t)remainder); gv_adjust_freespace(s, remainder); } } @@ -544,7 +543,7 @@ gv_sd_to_drive(struct gv_softc *sc, stru /* No good slot found? */ if (s->size == -1) { - snprintf(errstr, errlen, "couldn't autosize '%s' on " + snprintf(errstr, errlen, "could not autosize '%s' on " "'%s'", s->name, d->name); return (-1); } Modified: head/sys/geom/vinum/geom_vinum_volume.c ============================================================================== --- head/sys/geom/vinum/geom_vinum_volume.c Sun Oct 26 17:03:51 2008 (r184291) +++ head/sys/geom/vinum/geom_vinum_volume.c Sun Oct 26 17:20:37 2008 (r184292) @@ -385,8 +385,8 @@ gv_volume_taste(struct g_class *mp, stru if ((ocp != NULL) && (ocp->acr > 0 || ocp->acw > 0 || ocp->ace > 0)) { error = g_access(cp, ocp->acr, ocp->acw, ocp->ace); if (error) { - printf("GEOM_VINUM: failed g_access %s -> %s; " - "errno %d\n", v->name, p->name, error); + G_VINUM_DEBUG(0, "failed g_access %s -> %s; " + "errno %d", v->name, p->name, error); g_detach(cp); g_destroy_consumer(cp); if (first) From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 18:58:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4817106566B; Sun, 26 Oct 2008 18:58:04 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A1F888FC19; Sun, 26 Oct 2008 18:58:04 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QIw4Lw091895; Sun, 26 Oct 2008 18:58:04 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QIw4YV091893; Sun, 26 Oct 2008 18:58:04 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810261858.m9QIw4YV091893@svn.freebsd.org> From: Maxim Sobolev Date: Sun, 26 Oct 2008 18:58:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 18:58:04 -0000 Author: sobomax Date: Sun Oct 26 18:58:04 2008 New Revision: 184293 URL: http://svn.freebsd.org/changeset/base/184293 Log: Fix division by zero panic if kern.hz less than 32. MFC after: 1 day Modified: head/sys/amd64/amd64/local_apic.c head/sys/i386/i386/local_apic.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Sun Oct 26 17:20:37 2008 (r184292) +++ head/sys/amd64/amd64/local_apic.c Sun Oct 26 18:58:04 2008 (r184293) @@ -401,7 +401,11 @@ 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 = 128; + } else { + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + } profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Sun Oct 26 17:20:37 2008 (r184292) +++ head/sys/i386/i386/local_apic.c Sun Oct 26 18:58:04 2008 (r184293) @@ -403,7 +403,11 @@ 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 = 128; + } else { + stathz = lapic_timer_hz / (lapic_timer_hz / 128); + } profhz = lapic_timer_hz; lapic_timer_period = value / lapic_timer_hz; From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:14:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6ACBB1065679; Sun, 26 Oct 2008 19:14:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 57C5A8FC21; Sun, 26 Oct 2008 19:14:51 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJEpMf092301; Sun, 26 Oct 2008 19:14:51 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJEoDU092299; Sun, 26 Oct 2008 19:14:50 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261914.m9QJEoDU092299@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184294 - in stable/7/sys: . dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:14:51 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:17:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 915E41065675; Sun, 26 Oct 2008 19:17:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E92B8FC16; Sun, 26 Oct 2008 19:17:25 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJHPY5092418; Sun, 26 Oct 2008 19:17:25 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJHPIE092417; Sun, 26 Oct 2008 19:17:25 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810261917.m9QJHPIE092417@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sun, 26 Oct 2008 19:17:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184295 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:17:25 -0000 Author: bz Date: Sun Oct 26 19:17:25 2008 New Revision: 184295 URL: http://svn.freebsd.org/changeset/base/184295 Log: Style changes only: - Consistently add parentheses to return statements. - Use NULL instead of 0 when comparing pointers, also avoiding unnecessary casts. - Do not use pointers as booleans. Reviewed by: rwatson (earlier version) MFC after: 2 months Modified: head/sys/netinet/in.c Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Sun Oct 26 19:14:50 2008 (r184294) +++ head/sys/netinet/in.c Sun Oct 26 19:17:25 2008 (r184295) @@ -115,9 +115,9 @@ in_localip(struct in_addr in) LIST_FOREACH(ia, INADDR_HASH(in.s_addr), ia_hash) { if (IA_SIN(ia)->sin_addr.s_addr == in.s_addr) - return 1; + return (1); } - return 0; + return (0); } /* @@ -177,7 +177,7 @@ in_mask2len(mask) break; } } - return x * 8 + y; + return (x * 8 + y); } static void @@ -205,7 +205,7 @@ in_control(struct socket *so, u_long cmd { INIT_VNET_INET(curvnet); /* both so and ifp can be NULL here! */ register struct ifreq *ifr = (struct ifreq *)data; - register struct in_ifaddr *ia = 0, *iap; + register struct in_ifaddr *ia, *iap; register struct ifaddr *ifa; struct in_addr allhosts_addr; struct in_addr dst; @@ -215,6 +215,7 @@ in_control(struct socket *so, u_long cmd int error, hostIsNew, iaIsNew, maskIsNew, s; int iaIsFirst; + ia = NULL; iaIsFirst = 0; iaIsNew = 0; allhosts_addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP); @@ -226,8 +227,8 @@ in_control(struct socket *so, u_long cmd if (error) return (error); } - if (!ifp) - return EINVAL; + if (ifp == NULL) + return (EINVAL); return in_lifaddr_ioctl(so, cmd, data, ifp, td); case SIOCDLIFADDR: @@ -236,13 +237,13 @@ in_control(struct socket *so, u_long cmd if (error) return (error); } - if (!ifp) - return EINVAL; + if (ifp == NULL) + return (EINVAL); return in_lifaddr_ioctl(so, cmd, data, ifp, td); case SIOCGLIFADDR: - if (!ifp) - return EINVAL; + if (ifp == NULL) + return (EINVAL); return in_lifaddr_ioctl(so, cmd, data, ifp, td); } @@ -252,7 +253,7 @@ in_control(struct socket *so, u_long cmd * If an alias address was specified, find that one instead of * the first one on the interface, if possible. */ - if (ifp) { + if (ifp != NULL) { dst = ((struct sockaddr_in *)&ifr->ifr_addr)->sin_addr; LIST_FOREACH(iap, INADDR_HASH(dst.s_addr), ia_hash) if (iap->ia_ifp == ifp && @@ -276,7 +277,7 @@ in_control(struct socket *so, u_long cmd case SIOCAIFADDR: case SIOCDIFADDR: - if (ifp == 0) + if (ifp == NULL) return (EADDRNOTAVAIL); if (ifra->ifra_addr.sin_family == AF_INET) { for (oia = ia; ia; ia = TAILQ_NEXT(ia, ia_link)) { @@ -289,10 +290,10 @@ in_control(struct socket *so, u_long cmd && (cmd == SIOCAIFADDR) && (ifra->ifra_dstaddr.sin_addr.s_addr == INADDR_ANY)) { - return EDESTADDRREQ; + return (EDESTADDRREQ); } } - if (cmd == SIOCDIFADDR && ia == 0) + if (cmd == SIOCDIFADDR && ia == NULL) return (EADDRNOTAVAIL); /* FALLTHROUGH */ case SIOCSIFADDR: @@ -305,12 +306,12 @@ in_control(struct socket *so, u_long cmd return (error); } - if (ifp == 0) + if (ifp == NULL) return (EADDRNOTAVAIL); - if (ia == (struct in_ifaddr *)0) { + if (ia == NULL) { ia = (struct in_ifaddr *) malloc(sizeof *ia, M_IFADDR, M_WAITOK | M_ZERO); - if (ia == (struct in_ifaddr *)NULL) + if (ia == NULL) return (ENOBUFS); /* * Protect from ipintr() traversing address list @@ -351,7 +352,7 @@ in_control(struct socket *so, u_long cmd case SIOCGIFNETMASK: case SIOCGIFDSTADDR: case SIOCGIFBRDADDR: - if (ia == (struct in_ifaddr *)0) + if (ia == NULL) return (EADDRNOTAVAIL); break; } @@ -382,7 +383,7 @@ in_control(struct socket *so, u_long cmd return (EINVAL); oldaddr = ia->ia_dstaddr; ia->ia_dstaddr = *(struct sockaddr_in *)&ifr->ifr_dstaddr; - if (ifp->if_ioctl) { + if (ifp->if_ioctl != NULL) { IFF_LOCKGIANT(ifp); error = (*ifp->if_ioctl)(ifp, SIOCSIFDSTADDR, (caddr_t)ia); @@ -483,7 +484,7 @@ in_control(struct socket *so, u_long cmd break; default: - if (ifp == 0 || ifp->if_ioctl == 0) + if (ifp == NULL || ifp->if_ioctl == NULL) return (EOPNOTSUPP); IFF_LOCKGIANT(ifp); error = (*ifp->if_ioctl)(ifp, cmd, data); @@ -549,7 +550,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo struct ifaddr *ifa; /* sanity checks */ - if (!data || !ifp) { + if (data == NULL || ifp == NULL) { panic("invalid argument to in_lifaddr_ioctl"); /*NOTRECHED*/ } @@ -564,22 +565,22 @@ in_lifaddr_ioctl(struct socket *so, u_lo case SIOCDLIFADDR: /* address must be specified on ADD and DELETE */ if (iflr->addr.ss_family != AF_INET) - return EINVAL; + return (EINVAL); if (iflr->addr.ss_len != sizeof(struct sockaddr_in)) - return EINVAL; + return (EINVAL); /* XXX need improvement */ if (iflr->dstaddr.ss_family && iflr->dstaddr.ss_family != AF_INET) - return EINVAL; + return (EINVAL); if (iflr->dstaddr.ss_family && iflr->dstaddr.ss_len != sizeof(struct sockaddr_in)) - return EINVAL; + return (EINVAL); break; default: /*shouldn't happen*/ - return EOPNOTSUPP; + return (EOPNOTSUPP); } if (sizeof(struct in_addr) * 8 < iflr->prefixlen) - return EINVAL; + return (EINVAL); switch (cmd) { case SIOCALIFADDR: @@ -587,7 +588,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo struct in_aliasreq ifra; if (iflr->flags & IFLR_PREFIX) - return EINVAL; + return (EINVAL); /* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR_IN6). */ bzero(&ifra, sizeof(ifra)); @@ -605,7 +606,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo ifra.ifra_mask.sin_len = sizeof(struct sockaddr_in); in_len2mask(&ifra.ifra_mask.sin_addr, iflr->prefixlen); - return in_control(so, SIOCAIFADDR, (caddr_t)&ifra, ifp, td); + return (in_control(so, SIOCAIFADDR, (caddr_t)&ifra, ifp, td)); } case SIOCGLIFADDR: case SIOCDLIFADDR: @@ -626,7 +627,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo /* if you set extra bits, that's wrong */ if (match.s_addr != sin->sin_addr.s_addr) - return EINVAL; + return (EINVAL); } else { /* on getting an address, take the 1st match */ @@ -648,8 +649,8 @@ in_lifaddr_ioctl(struct socket *so, u_lo if (candidate.s_addr == match.s_addr) break; } - if (!ifa) - return EADDRNOTAVAIL; + if (ifa == NULL) + return (EADDRNOTAVAIL); ia = (struct in_ifaddr *)ifa; if (cmd == SIOCGLIFADDR) { @@ -667,7 +668,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo iflr->flags = 0; /*XXX*/ - return 0; + return (0); } else { struct in_aliasreq ifra; @@ -685,13 +686,13 @@ in_lifaddr_ioctl(struct socket *so, u_lo bcopy(&ia->ia_sockmask, &ifra.ifra_dstaddr, ia->ia_sockmask.sin_len); - return in_control(so, SIOCDIFADDR, (caddr_t)&ifra, - ifp, td); + return (in_control(so, SIOCDIFADDR, (caddr_t)&ifra, + ifp, td)); } } } - return EOPNOTSUPP; /*just for safety*/ + return (EOPNOTSUPP); /*just for safety*/ } /* @@ -729,7 +730,7 @@ in_ifinit(struct ifnet *ifp, struct in_i * if this is its first address, * and to validate the address if necessary. */ - if (ifp->if_ioctl) { + if (ifp->if_ioctl != NULL) { IFF_LOCKGIANT(ifp); error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia); IFF_UNLOCKGIANT(ifp); @@ -865,7 +866,7 @@ in_addprefix(struct in_ifaddr *target, i error = rtinit(&target->ia_ifa, (int)RTM_ADD, flags); if (!error) target->ia_flags |= IFA_ROUTE; - return error; + return (error); } /* @@ -882,7 +883,7 @@ in_scrubprefix(struct in_ifaddr *target) int error; if ((target->ia_flags & IFA_ROUTE) == 0) - return 0; + return (0); if (rtinitflags(target)) prefix = target->ia_dstaddr.sin_addr; @@ -923,7 +924,7 @@ in_scrubprefix(struct in_ifaddr *target) rtinitflags(ia) | RTF_UP); if (error == 0) ia->ia_flags |= IFA_ROUTE; - return error; + return (error); } } @@ -932,7 +933,7 @@ in_scrubprefix(struct in_ifaddr *target) */ rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); target->ia_flags &= ~IFA_ROUTE; - return 0; + return (0); } #undef rtinitflags @@ -948,9 +949,9 @@ in_broadcast(struct in_addr in, struct i if (in.s_addr == INADDR_BROADCAST || in.s_addr == INADDR_ANY) - return 1; + return (1); if ((ifp->if_flags & IFF_BROADCAST) == 0) - return 0; + return (0); t = ntohl(in.s_addr); /* * Look through the list of addresses for a match @@ -971,7 +972,7 @@ in_broadcast(struct in_addr in, struct i * address. */ ia->ia_subnetmask != (u_long)0xffffffff) - return 1; + return (1); return (0); #undef ia } From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:22:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B8111065675; Sun, 26 Oct 2008 19:22:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5665E8FC16; Sun, 26 Oct 2008 19:22:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJMAJO092644; Sun, 26 Oct 2008 19:22:10 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJMASR092643; Sun, 26 Oct 2008 19:22:10 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261922.m9QJMASR092643@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 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.... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:22:10 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:22:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9376E106567B; Sun, 26 Oct 2008 19:22:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DBD68FC17; Sun, 26 Oct 2008 19:22:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJMAeo092650; Sun, 26 Oct 2008 19:22:10 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJMAqV092649; Sun, 26 Oct 2008 19:22:10 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261922.m9QJMAqV092649@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 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.... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:22:10 -0000 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/6/usr.sbin/pkg_install/ (props changed) stable/6/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/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pkg_install/add/main.c Modified: stable/6/usr.sbin/pkg_install/add/main.c ============================================================================== --- stable/6/usr.sbin/pkg_install/add/main.c Sun Oct 26 19:17:25 2008 (r184295) +++ stable/6/usr.sbin/pkg_install/add/main.c Sun Oct 26 19:22:10 2008 (r184296) @@ -261,7 +261,7 @@ main(int argc, char **argv) } } /* If no packages, yelp */ - else if (!ch) { + if (!ch) { warnx("missing package name(s)"); usage(); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:22:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9816106567C; Sun, 26 Oct 2008 19:22:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4BD88FC19; Sun, 26 Oct 2008 19:22:10 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJMAW5092656; Sun, 26 Oct 2008 19:22:10 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJMAws092655; Sun, 26 Oct 2008 19:22:10 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261922.m9QJMAws092655@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:22:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 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.... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:22:10 -0000 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: releng/6.4/usr.sbin/pkg_install/ (props changed) releng/6.4/usr.sbin/pkg_install/add/main.c Changes in other areas also in this revision: Modified: stable/6/usr.sbin/pkg_install/ (props changed) stable/6/usr.sbin/pkg_install/add/main.c stable/7/usr.sbin/pkg_install/ (props changed) stable/7/usr.sbin/pkg_install/add/main.c Modified: releng/6.4/usr.sbin/pkg_install/add/main.c ============================================================================== --- releng/6.4/usr.sbin/pkg_install/add/main.c Sun Oct 26 19:17:25 2008 (r184295) +++ releng/6.4/usr.sbin/pkg_install/add/main.c Sun Oct 26 19:22:10 2008 (r184296) @@ -261,7 +261,7 @@ main(int argc, char **argv) } } /* If no packages, yelp */ - else if (!ch) { + if (!ch) { warnx("missing package name(s)"); usage(); } From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:28:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47B75106566C; Sun, 26 Oct 2008 19:28:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 340828FC16; Sun, 26 Oct 2008 19:28:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJS55G092852; Sun, 26 Oct 2008 19:28:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJS5Ko092849; Sun, 26 Oct 2008 19:28:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261928.m9QJS5Ko092849@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:28:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184297 - releng/6.4/sbin/dhclient stable/6/sbin/dhclient stable/7/sbin/dhclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:28:05 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:28:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 834CA1065674; Sun, 26 Oct 2008 19:28:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6F7718FC18; Sun, 26 Oct 2008 19:28:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJS5wc092860; Sun, 26 Oct 2008 19:28:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJS5V0092857; Sun, 26 Oct 2008 19:28:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261928.m9QJS5V0092857@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184297 - releng/6.4/sbin/dhclient stable/6/sbin/dhclient stable/7/sbin/dhclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:28:05 -0000 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/6/sbin/dhclient/ (props changed) stable/6/sbin/dhclient/dhclient.c stable/6/sbin/dhclient/dhcp.h stable/6/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/7/sbin/dhclient/ (props changed) stable/7/sbin/dhclient/dhclient.c stable/7/sbin/dhclient/dhcp.h stable/7/sbin/dhclient/tables.c Modified: stable/6/sbin/dhclient/dhclient.c ============================================================================== --- stable/6/sbin/dhclient/dhclient.c Sun Oct 26 19:22:10 2008 (r184296) +++ stable/6/sbin/dhclient/dhclient.c Sun Oct 26 19:28:04 2008 (r184297) @@ -2301,12 +2301,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); @@ -2314,6 +2318,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); @@ -2372,6 +2378,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/6/sbin/dhclient/dhcp.h ============================================================================== --- stable/6/sbin/dhclient/dhcp.h Sun Oct 26 19:22:10 2008 (r184296) +++ stable/6/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/6/sbin/dhclient/tables.c ============================================================================== --- stable/6/sbin/dhclient/tables.c Sun Oct 26 19:22:10 2008 (r184296) +++ stable/6/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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:28:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDCA91065676; Sun, 26 Oct 2008 19:28:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AA7B08FC19; Sun, 26 Oct 2008 19:28:05 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJS5M4092868; Sun, 26 Oct 2008 19:28:05 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJS5NJ092865; Sun, 26 Oct 2008 19:28:05 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <200810261928.m9QJS5NJ092865@svn.freebsd.org> From: Brooks Davis Date: Sun, 26 Oct 2008 19:28:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184297 - releng/6.4/sbin/dhclient stable/6/sbin/dhclient stable/7/sbin/dhclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:28:05 -0000 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: 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 Changes in other areas also in this revision: Modified: stable/6/sbin/dhclient/ (props changed) stable/6/sbin/dhclient/dhclient.c stable/6/sbin/dhclient/dhcp.h stable/6/sbin/dhclient/tables.c stable/7/sbin/dhclient/ (props changed) stable/7/sbin/dhclient/dhclient.c stable/7/sbin/dhclient/dhcp.h stable/7/sbin/dhclient/tables.c Modified: releng/6.4/sbin/dhclient/dhclient.c ============================================================================== --- releng/6.4/sbin/dhclient/dhclient.c Sun Oct 26 19:22:10 2008 (r184296) +++ releng/6.4/sbin/dhclient/dhclient.c Sun Oct 26 19:28:04 2008 (r184297) @@ -2301,12 +2301,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); @@ -2314,6 +2318,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); @@ -2372,6 +2378,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: releng/6.4/sbin/dhclient/dhcp.h ============================================================================== --- releng/6.4/sbin/dhclient/dhcp.h Sun Oct 26 19:22:10 2008 (r184296) +++ releng/6.4/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: releng/6.4/sbin/dhclient/tables.c ============================================================================== --- releng/6.4/sbin/dhclient/tables.c Sun Oct 26 19:22:10 2008 (r184296) +++ releng/6.4/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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:33:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3926106567A; Sun, 26 Oct 2008 19:33:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D111F8FC1D; Sun, 26 Oct 2008 19:33:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJXMFQ093050; Sun, 26 Oct 2008 19:33:22 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJXMUW093047; Sun, 26 Oct 2008 19:33:22 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810261933.m9QJXMUW093047@svn.freebsd.org> From: Robert Watson Date: Sun, 26 Oct 2008 19:33:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184298 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:33:23 -0000 Author: rwatson Date: Sun Oct 26 19:33:22 2008 New Revision: 184298 URL: http://svn.freebsd.org/changeset/base/184298 Log: Remove endearing but syntactically unnecessary "return;" statements directly before the final closeing brackets of some TCP functions. MFC after: 3 days Modified: head/sys/netinet/tcp_input.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Oct 26 19:28:04 2008 (r184297) +++ head/sys/netinet/tcp_input.c Sun Oct 26 19:33:22 2008 (r184298) @@ -925,7 +925,6 @@ drop: free(s, M_TCPLOG); if (m != NULL) m_freem(m); - return; } static void @@ -2529,7 +2528,6 @@ drop: if (headlocked) INP_INFO_WUNLOCK(&V_tcbinfo); m_freem(m); - return; } /* @@ -2588,7 +2586,6 @@ tcp_dropwithreset(struct mbuf *m, struct return; drop: m_freem(m); - return; } /* Modified: head/sys/netinet/tcp_sack.c ============================================================================== --- head/sys/netinet/tcp_sack.c Sun Oct 26 19:28:04 2008 (r184297) +++ head/sys/netinet/tcp_sack.c Sun Oct 26 19:33:22 2008 (r184298) @@ -680,5 +680,4 @@ tcp_sack_adjust(struct tcpcb *tp) if (SEQ_LT(tp->snd_nxt, cur->end)) return; tp->snd_nxt = tp->snd_fack; - return; } Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Sun Oct 26 19:28:04 2008 (r184297) +++ head/sys/netinet/tcp_syncache.c Sun Oct 26 19:33:22 2008 (r184298) @@ -1243,7 +1243,6 @@ done: *lsop = NULL; m_freem(m); } - return; } static int @@ -1576,7 +1575,6 @@ syncookie_generate(struct syncache_head } V_tcpstat.tcps_sc_sendcookie++; - return; } static struct syncache * From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 19:37:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B3D41065675; Sun, 26 Oct 2008 19:37:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 26A498FC08; Sun, 26 Oct 2008 19:37:39 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QJbd5p093209; Sun, 26 Oct 2008 19:37:39 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QJbc2O093202; Sun, 26 Oct 2008 19:37:38 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200810261937.m9QJbc2O093202@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 26 Oct 2008 19:37:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184299 - in head/sys: conf dev/adb powerpc/conf powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 19:37:39 -0000 Author: nwhitehorn Date: Sun Oct 26 19:37:38 2008 New Revision: 184299 URL: http://svn.freebsd.org/changeset/base/184299 Log: Add ADB support. This provides support for the external ADB bus on the PowerMac G3 as well as the internal ADB keyboard and mice in PowerBooks and iBooks. This also brings in Mac GPIO support, for which we should eventually have a better interface. Obtained from: NetBSD (CUDA and PMU drivers) Added: head/sys/dev/adb/ head/sys/dev/adb/adb.h (contents, props changed) head/sys/dev/adb/adb_bus.c (contents, props changed) head/sys/dev/adb/adb_hb_if.m (contents, props changed) head/sys/dev/adb/adb_if.m (contents, props changed) head/sys/dev/adb/adb_kbd.c (contents, props changed) head/sys/dev/adb/adb_mouse.c (contents, props changed) head/sys/dev/adb/adbvar.h (contents, props changed) head/sys/powerpc/powermac/cuda.c (contents, props changed) head/sys/powerpc/powermac/cudavar.h (contents, props changed) head/sys/powerpc/powermac/macgpio.c (contents, props changed) head/sys/powerpc/powermac/macgpiovar.h (contents, props changed) head/sys/powerpc/powermac/pmu.c (contents, props changed) head/sys/powerpc/powermac/pmuvar.h (contents, props changed) head/sys/powerpc/powermac/viareg.h (contents, props changed) Modified: head/sys/conf/files.powerpc head/sys/powerpc/conf/GENERIC head/sys/powerpc/powermac/macio.c Modified: head/sys/conf/files.powerpc ============================================================================== --- head/sys/conf/files.powerpc Sun Oct 26 19:33:22 2008 (r184298) +++ head/sys/conf/files.powerpc Sun Oct 26 19:37:38 2008 (r184299) @@ -28,6 +28,11 @@ opt_ah.h optional ath_hal \ crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/bm/if_bm.c optional bm powermac +dev/adb/adb_bus.c optional adb +dev/adb/adb_kbd.c optional adb +dev/adb/adb_mouse.c optional adb +dev/adb/adb_hb_if.m optional adb +dev/adb/adb_if.m optional adb dev/cfi/cfi_bus_lbc.c optional cfi dev/fb/fb.c optional sc dev/hwpmc/hwpmc_powerpc.c optional hwpmc @@ -119,6 +124,9 @@ powerpc/powermac/macio.c optional powerm powerpc/powermac/openpic_macio.c optional powermac pci powerpc/powermac/pswitch.c optional powermac pswitch powerpc/powermac/uninorth.c optional powermac pci +powerpc/powermac/cuda.c optional powermac cuda +powerpc/powermac/pmu.c optional powermac pmu +powerpc/powermac/macgpio.c optional powermac pci powerpc/powerpc/atomic.S standard powerpc/powerpc/autoconf.c standard powerpc/powerpc/bcopy.c standard Added: head/sys/dev/adb/adb.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb.h Sun Oct 26 19:37:38 2008 (r184299) @@ -0,0 +1,78 @@ +/*- + * Copyright (C) 2008 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _POWERPC_ADB_H_ +#define _POWERPC_ADB_H_ + +#include "adb_hb_if.h" +#include "adb_if.h" + +enum { + ADB_COMMAND_FLUSH = 0, + ADB_COMMAND_LISTEN = 2, + ADB_COMMAND_TALK = 3, +}; + +enum { + ADB_DEVICE_DONGLE = 0x01, + ADB_DEVICE_KEYBOARD = 0x02, + ADB_DEVICE_MOUSE = 0x03, + ADB_DEVICE_TABLET = 0x04, + ADB_DEVICE_MODEM = 0x05, + + ADB_DEVICE_MISC = 0x07 +}; + +struct adb_devinfo { + uint8_t address; + uint8_t default_address; + uint8_t handler_id; + + uint16_t register3; +}; + +/* Pass packets down through the bus manager */ +u_int adb_send_packet(device_t dev, u_char command, u_char reg, int len, + u_char *data); +u_int adb_set_autopoll(device_t dev, u_char enable); + +/* Pass packets up from the interface */ +u_int adb_receive_raw_packet(device_t dev, u_char status, u_char command, + int len, u_char *data); + +uint8_t adb_get_device_type(device_t dev); +uint8_t adb_get_device_handler(device_t dev); +uint8_t adb_set_device_handler(device_t dev, uint8_t newhandler); + +uint8_t adb_read_register(device_t dev, u_char reg, size_t *len, void *data); + +/* Bits for implementing ADB host bus adapters */ +extern devclass_t adb_devclass; +extern driver_t adb_driver; + +#endif + Added: head/sys/dev/adb/adb_bus.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb_bus.c Sun Oct 26 19:37:38 2008 (r184299) @@ -0,0 +1,384 @@ +/*- + * Copyright (C) 2008 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include "adb.h" +#include "adbvar.h" + +static int adb_bus_probe(device_t dev); +static int adb_bus_attach(device_t dev); +static int adb_bus_detach(device_t dev); +static void adb_probe_nomatch(device_t dev, device_t child); +static int adb_print_child(device_t dev, device_t child); + +static int adb_send_raw_packet_sync(device_t dev, uint8_t to, uint8_t command, uint8_t reg, int len, u_char *data); + +static char *adb_device_string[] = { + "HOST", "dongle", "keyboard", "mouse", "tablet", "modem", "RESERVED", "misc" +}; + +static device_method_t adb_bus_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, adb_bus_probe), + DEVMETHOD(device_attach, adb_bus_attach), + DEVMETHOD(device_detach, adb_bus_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* Bus Interface */ + DEVMETHOD(bus_probe_nomatch, adb_probe_nomatch), + DEVMETHOD(bus_print_child, adb_print_child), + + { 0, 0 }, +}; + +driver_t adb_driver = { + "adb", + adb_bus_methods, + sizeof(struct adb_softc), +}; + +devclass_t adb_devclass; + +static int +adb_bus_probe(device_t dev) +{ + device_set_desc(dev, "Apple Desktop Bus"); + return (0); +} + +static int +adb_bus_attach(device_t dev) +{ + struct adb_softc *sc = device_get_softc(dev); + uint8_t i, next_free; + uint16_t r3; + + sc->sc_dev = dev; + sc->parent = device_get_parent(dev); + + sc->packet_reply = 0; + sc->autopoll_mask = 0; + + mtx_init(&sc->sc_sync_mtx,"adbsyn",NULL,MTX_DEF | MTX_RECURSE); + + /* Initialize devinfo */ + for (i = 0; i < 16; i++) { + sc->devinfo[i].address = i; + sc->devinfo[i].default_address = 0; + } + + /* Reset ADB bus */ + adb_send_raw_packet_sync(dev,0,ADB_COMMAND_BUS_RESET,0,0,NULL); + DELAY(1500); + + /* Enumerate bus */ + next_free = 8; + + for (i = 1; i < 7; i++) { + int8_t first_relocated = -1; + int reply = 0; + + do { + reply = adb_send_raw_packet_sync(dev,i, + ADB_COMMAND_TALK,3,0,NULL); + + if (reply) { + /* If we got a response, relocate to next_free */ + r3 = sc->devinfo[i].register3; + r3 &= 0xf000; + r3 |= ((uint16_t)(next_free) & 0x000f) << 8; + r3 |= 0x00fe; + + adb_send_raw_packet_sync(dev,i, ADB_COMMAND_LISTEN,3, + sizeof(uint16_t),(u_char *)(&r3)); + + adb_send_raw_packet_sync(dev,next_free, + ADB_COMMAND_TALK,3,0,NULL); + + sc->devinfo[next_free].default_address = i; + if (first_relocated < 0) + first_relocated = next_free; + + next_free++; + } else if (first_relocated > 0) { + /* Collisions removed, relocate first device back */ + + r3 = sc->devinfo[i].register3; + r3 &= 0xf000; + r3 |= ((uint16_t)(i) & 0x000f) << 8; + + adb_send_raw_packet_sync(dev,first_relocated, + ADB_COMMAND_LISTEN,3, + sizeof(uint16_t),(u_char *)(&r3)); + adb_send_raw_packet_sync(dev,i, + ADB_COMMAND_TALK,3,0,NULL); + + sc->devinfo[i].default_address = i; + sc->devinfo[(int)(first_relocated)].default_address = 0; + break; + } + } while (reply); + } + + for (i = 0; i < 16; i++) { + if (sc->devinfo[i].default_address) { + sc->children[i] = device_add_child(dev, NULL, -1); + device_set_ivars(sc->children[i], &sc->devinfo[i]); + } + } + + return (bus_generic_attach(dev)); +} + +static int adb_bus_detach(device_t dev) +{ + struct adb_softc *sc = device_get_softc(dev); + + mtx_destroy(&sc->sc_sync_mtx); + + return (bus_generic_detach(dev)); +} + + +static void +adb_probe_nomatch(device_t dev, device_t child) +{ + struct adb_devinfo *dinfo; + + if (bootverbose) { + dinfo = device_get_ivars(child); + + device_printf(dev,"ADB %s at device %d (no driver attached)\n", + adb_device_string[dinfo->default_address],dinfo->address); + } +} + +u_int +adb_receive_raw_packet(device_t dev, u_char status, u_char command, int len, + u_char *data) +{ + struct adb_softc *sc = device_get_softc(dev); + u_char addr = command >> 4; + + if (len > 0 && (command & 0x0f) == ((ADB_COMMAND_TALK << 2) | 3)) { + memcpy(&sc->devinfo[addr].register3,data,2); + sc->devinfo[addr].handler_id = data[1]; + } + + if (sc->sync_packet == command) { + memcpy(sc->syncreg,data,(len > 8) ? 8 : len); + atomic_store_rel_int(&sc->packet_reply,len + 1); + } + + if (sc->children[addr] != NULL) { + ADB_RECEIVE_PACKET(sc->children[addr],status, + (command & 0x0f) >> 2,command & 0x03,len,data); + } + + return (0); +} + +static int +adb_print_child(device_t dev, device_t child) +{ + struct adb_devinfo *dinfo; + int retval = 0; + + dinfo = device_get_ivars(child); + + retval += bus_print_child_header(dev,child); + printf(" at device %d",dinfo->address); + retval += bus_print_child_footer(dev, child); + + return (retval); +} + +u_int +adb_send_packet(device_t dev, u_char command, u_char reg, int len, u_char *data) +{ + u_char command_byte = 0; + struct adb_devinfo *dinfo; + struct adb_softc *sc; + + sc = device_get_softc(device_get_parent(dev)); + dinfo = device_get_ivars(dev); + + command_byte |= dinfo->address << 4; + command_byte |= command << 2; + command_byte |= reg; + + ADB_HB_SEND_RAW_PACKET(sc->parent, command_byte, len, data, 1); + + return (0); +} + +u_int +adb_set_autopoll(device_t dev, u_char enable) +{ + struct adb_devinfo *dinfo; + struct adb_softc *sc; + uint16_t mod = 0; + + sc = device_get_softc(device_get_parent(dev)); + dinfo = device_get_ivars(dev); + + mod = enable << dinfo->address; + if (enable) { + sc->autopoll_mask |= mod; + } else { + mod = ~mod; + sc->autopoll_mask &= mod; + } + + ADB_HB_SET_AUTOPOLL_MASK(sc->parent,sc->autopoll_mask); + + return (0); +} + +uint8_t +adb_get_device_type(device_t dev) +{ + struct adb_devinfo *dinfo; + + dinfo = device_get_ivars(dev); + return (dinfo->default_address); +} + +uint8_t +adb_get_device_handler(device_t dev) +{ + struct adb_devinfo *dinfo; + + dinfo = device_get_ivars(dev); + return (dinfo->handler_id); +} + +static int +adb_send_raw_packet_sync(device_t dev, uint8_t to, uint8_t command, + uint8_t reg, int len, u_char *data) +{ + u_char command_byte = 0; + struct adb_softc *sc; + int result = -1; + int i = 0; + + sc = device_get_softc(dev); + + command_byte |= to << 4; + command_byte |= command << 2; + command_byte |= reg; + + /* Wait if someone else has a synchronous request pending */ + mtx_lock(&sc->sc_sync_mtx); + + sc->packet_reply = 0; + sc->sync_packet = command_byte; + + ADB_HB_SEND_RAW_PACKET(sc->parent, command_byte, len, data, 1); + + while (!atomic_fetchadd_int(&sc->packet_reply,0)) { + /* Sometimes CUDA controllers hang up during cold boots. + Try poking them. */ + if (i > 10) + ADB_HB_CONTROLLER_POLL(sc->parent); + + DELAY(100); + i++; + } + + result = sc->packet_reply - 1; + + /* Clear packet sync */ + sc->packet_reply = 0; + sc->sync_packet = 0xffff; /* We can't match a 16 bit value */ + + mtx_unlock(&sc->sc_sync_mtx); + + return (result); +} + +uint8_t +adb_set_device_handler(device_t dev, uint8_t newhandler) +{ + struct adb_softc *sc; + struct adb_devinfo *dinfo; + uint16_t newr3; + + dinfo = device_get_ivars(dev); + sc = device_get_softc(device_get_parent(dev)); + + newr3 = dinfo->register3 & 0xff00; + newr3 |= (uint16_t)(newhandler); + + adb_send_raw_packet_sync(sc->sc_dev,dinfo->address, + ADB_COMMAND_LISTEN, 3, sizeof(uint16_t), (u_char *)(&newr3)); + adb_send_raw_packet_sync(sc->sc_dev,dinfo->address, + ADB_COMMAND_TALK, 3, 0, NULL); + + return (dinfo->handler_id); +} + +uint8_t +adb_read_register(device_t dev, u_char reg, + size_t *len, void *data) +{ + struct adb_softc *sc; + struct adb_devinfo *dinfo; + size_t orig_len; + + dinfo = device_get_ivars(dev); + sc = device_get_softc(device_get_parent(dev)); + + orig_len = *len; + + mtx_lock(&sc->sc_sync_mtx); + + *len = adb_send_raw_packet_sync(sc->sc_dev,dinfo->address, + ADB_COMMAND_TALK, reg, 0, NULL); + + if (*len > 0) + memcpy(data,sc->syncreg,*len); + + mtx_unlock(&sc->sc_sync_mtx); + + return ((*len > 0) ? 0 : -1); +} + Added: head/sys/dev/adb/adb_hb_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb_hb_if.m Sun Oct 26 19:37:38 2008 (r184299) @@ -0,0 +1,58 @@ +#- +# Copyright (c) 2008 Nathan Whitehorn +# 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 AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +#include + +INTERFACE adb_hb; + +# +# Bus level operations. These are used by the ADB bus manager, and are +# required to inplement an ADB interface. +# + +METHOD u_int send_raw_packet { + device_t dev; + u_char command_byte; + + int len; + u_char *data; + u_char poll; +}; + +METHOD u_int controller_poll { + device_t dev; +}; + +METHOD u_int set_autopoll_mask { + device_t dev; + + uint16_t mask; +}; + Added: head/sys/dev/adb/adb_if.m ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb_if.m Sun Oct 26 19:37:38 2008 (r184299) @@ -0,0 +1,49 @@ +#- +# Copyright (c) 2008 Nathan Whitehorn +# 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 AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +#include + +#include + +INTERFACE adb; + +# +# Driver level operations +# + +METHOD u_int receive_packet { + device_t dev; + + u_char status; + u_char command; + u_char reg; + + int len; + u_char *data; +}; + Added: head/sys/dev/adb/adb_kbd.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/adb/adb_kbd.c Sun Oct 26 19:37:38 2008 (r184299) @@ -0,0 +1,692 @@ +/*- + * Copyright (C) 2008 Nathan Whitehorn + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "opt_kbd.h" +#include +#include + +#include +#include + +#include "adb.h" + +#define KBD_DRIVER_NAME "akbd" + +#define AKBD_EMULATE_ATKBD 1 + +static int adb_kbd_probe(device_t dev); +static int adb_kbd_attach(device_t dev); +static int adb_kbd_detach(device_t dev); +static void akbd_repeat(void *xsc); + +static u_int adb_kbd_receive_packet(device_t dev, u_char status, + u_char command, u_char reg, int len, u_char *data); + +struct adb_kbd_softc { + keyboard_t sc_kbd; + + device_t sc_dev; + struct mtx sc_mutex; + struct cv sc_cv; + + int sc_mode; + int sc_state; + + int have_led_control; + + uint8_t buffer[8]; + volatile int buffers; + + struct callout sc_repeater; + int sc_repeatstart; + int sc_repeatcontinue; + uint8_t last_press; +}; + +static device_method_t adb_kbd_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, adb_kbd_probe), + DEVMETHOD(device_attach, adb_kbd_attach), + DEVMETHOD(device_detach, adb_kbd_detach), + DEVMETHOD(device_shutdown, bus_generic_shutdown), + DEVMETHOD(device_suspend, bus_generic_suspend), + DEVMETHOD(device_resume, bus_generic_resume), + + /* ADB interface */ + DEVMETHOD(adb_receive_packet, adb_kbd_receive_packet), + + { 0, 0 } +}; + +static driver_t adb_kbd_driver = { + "akbd", + adb_kbd_methods, + sizeof(struct adb_kbd_softc), +}; + +static devclass_t adb_kbd_devclass; + +DRIVER_MODULE(akbd, adb, adb_kbd_driver, adb_kbd_devclass, 0, 0); + +static const uint8_t adb_to_at_scancode_map[128] = { 30, 31, 32, 33, 35, 34, + 44, 45, 46, 47, 0, 48, 16, 17, 18, 19, 21, 20, 2, 3, 4, 5, 7, 6, 13, + 10, 8, 12, 9, 11, 27, 24, 22, 26, 23, 25, 28, 38, 36, 40, 37, 39, 43, + 51, 53, 49, 50, 52, 15, 57, 41, 14, 0, 1, 29, 0, 42, 58, 56, 97, 98, + 100, 95, 0, 0, 83, 0, 55, 0, 78, 0, 69, 0, 0, 0, 91, 89, 0, 74, 13, 0, + 0, 82, 79, 80, 81, 75, 76, 77, 71, 0, 72, 73, 0, 0, 0, 63, 64, 65, 61, + 66, 67, 0, 87, 0, 105, 0, 70, 0, 68, 0, 88, 0, 107, 102, 94, 96, 103, + 62, 99, 60, 101, 59, 54, 93, 90, 0, 0 }; + +/* keyboard driver declaration */ +static int akbd_configure(int flags); +static kbd_probe_t akbd_probe; +static kbd_init_t akbd_init; +static kbd_term_t akbd_term; +static kbd_intr_t akbd_interrupt; +static kbd_test_if_t akbd_test_if; +static kbd_enable_t akbd_enable; +static kbd_disable_t akbd_disable; +static kbd_read_t akbd_read; +static kbd_check_t akbd_check; +static kbd_read_char_t akbd_read_char; +static kbd_check_char_t akbd_check_char; +static kbd_ioctl_t akbd_ioctl; +static kbd_lock_t akbd_lock; +static kbd_clear_state_t akbd_clear_state; +static kbd_get_state_t akbd_get_state; +static kbd_set_state_t akbd_set_state; +static kbd_poll_mode_t akbd_poll; + +keyboard_switch_t akbdsw = { + akbd_probe, + akbd_init, + akbd_term, + akbd_interrupt, + akbd_test_if, + akbd_enable, + akbd_disable, + akbd_read, + akbd_check, + akbd_read_char, + akbd_check_char, + akbd_ioctl, + akbd_lock, + akbd_clear_state, + akbd_get_state, + akbd_set_state, + genkbd_get_fkeystr, + akbd_poll, + genkbd_diag, +}; + +KEYBOARD_DRIVER(akbd, akbdsw, akbd_configure); + +static int +adb_kbd_probe(device_t dev) +{ + uint8_t type; + + type = adb_get_device_type(dev); + + if (type != ADB_DEVICE_KEYBOARD) + return (ENXIO); + + switch(adb_get_device_handler(dev)) { + case 1: + device_set_desc(dev,"Apple Standard Keyboard"); + break; + case 2: + device_set_desc(dev,"Apple Extended Keyboard"); + break; + case 4: + device_set_desc(dev,"Apple ISO Keyboard"); + break; + case 5: + device_set_desc(dev,"Apple Extended ISO Keyboard"); + break; + case 8: + device_set_desc(dev,"Apple Keyboard II"); + break; + case 9: + device_set_desc(dev,"Apple ISO Keyboard II"); + break; + case 12: + device_set_desc(dev,"PowerBook Keyboard"); + break; + case 13: + device_set_desc(dev,"PowerBook ISO Keyboard"); + break; + case 24: + device_set_desc(dev,"PowerBook Extended Keyboard"); + break; + case 27: + device_set_desc(dev,"Apple Design Keyboard"); + break; + case 195: + device_set_desc(dev,"PowerBook G3 Keyboard"); + break; + case 196: + device_set_desc(dev,"iBook Keyboard"); + break; + default: + device_set_desc(dev,"ADB Keyboard"); + break; + } + + return (0); +} + +static int +ms_to_ticks(int ms) +{ + if (hz > 1000) + return ms*(hz/1000); + + return ms/(1000/hz); +} + +static int +adb_kbd_attach(device_t dev) +{ + struct adb_kbd_softc *sc; + keyboard_switch_t *sw; + + sw = kbd_get_switch(KBD_DRIVER_NAME); + if (sw == NULL) { + return ENXIO; + } + + sc = device_get_softc(dev); + sc->sc_dev = dev; + sc->sc_mode = K_RAW; + sc->sc_state = 0; + sc->have_led_control = 0; + sc->buffers = 0; + + /* Try stepping forward to the extended keyboard protocol */ + adb_set_device_handler(dev,3); + + mtx_init(&sc->sc_mutex,KBD_DRIVER_NAME,MTX_DEF,0); + cv_init(&sc->sc_cv,KBD_DRIVER_NAME); + callout_init(&sc->sc_repeater, 0); + +#ifdef AKBD_EMULATE_ATKBD + kbd_init_struct(&sc->sc_kbd, KBD_DRIVER_NAME, KB_101, 0, 0, 0, 0); + kbd_set_maps(&sc->sc_kbd, &key_map, &accent_map, fkey_tab, + sizeof(fkey_tab) / sizeof(fkey_tab[0])); +#else + #error ADB raw mode not implemented +#endif + + KBD_FOUND_DEVICE(&sc->sc_kbd); + KBD_PROBE_DONE(&sc->sc_kbd); + KBD_INIT_DONE(&sc->sc_kbd); + KBD_CONFIG_DONE(&sc->sc_kbd); + + (*sw->enable)(&sc->sc_kbd); + + kbd_register(&sc->sc_kbd); + +#ifdef KBD_INSTALL_CDEV + if (kbd_attach(&sc->sc_kbd)) { + adb_kbd_detach(dev); + return ENXIO; + } +#endif + + adb_set_autopoll(dev,1); + + /* Check (asynchronously) if we can read out the LED state from + this keyboard by reading the key state register */ + adb_send_packet(dev,ADB_COMMAND_TALK,2,0,NULL); + + return (0); +} + +static int +adb_kbd_detach(device_t dev) +{ + struct adb_kbd_softc *sc; + keyboard_t *kbd; + + sc = device_get_softc(dev); + + adb_set_autopoll(dev,0); + callout_stop(&sc->sc_repeater); + + mtx_lock(&sc->sc_mutex); + + kbd = kbd_get_keyboard(kbd_find_keyboard(KBD_DRIVER_NAME, + device_get_unit(dev))); + + kbdd_disable(kbd); + +#ifdef KBD_INSTALL_CDEV + kbd_detach(kbd); +#endif + + kbdd_term(kbd); + + mtx_unlock(&sc->sc_mutex); + + mtx_destroy(&sc->sc_mutex); + cv_destroy(&sc->sc_cv); + + return (0); +} + +static u_int +adb_kbd_receive_packet(device_t dev, u_char status, + u_char command, u_char reg, int len, u_char *data) +{ + struct adb_kbd_softc *sc; + + sc = device_get_softc(dev); + + if (command != ADB_COMMAND_TALK) + return 0; + + if (reg == 2 && len == 2) { + sc->have_led_control = 1; + return 0; + } + + if (reg != 0 || len != 2) + return (0); + + mtx_lock(&sc->sc_mutex); + if ((data[0] & 0x7f) == 57 && sc->buffers < 7) { + /* Fake the down/up cycle for caps lock */ + sc->buffer[sc->buffers++] = data[0] & 0x7f; + sc->buffer[sc->buffers++] = (data[0] & 0x7f) | (1 << 7); + } else { + sc->buffer[sc->buffers++] = data[0]; + } + + if (sc->buffer[sc->buffers-1] < 0xff) + sc->last_press = sc->buffer[sc->buffers-1]; + + if ((data[1] & 0x7f) == 57 && sc->buffers < 7) { + /* Fake the down/up cycle for caps lock */ + sc->buffer[sc->buffers++] = data[1] & 0x7f; + sc->buffer[sc->buffers++] = (data[1] & 0x7f) | (1 << 7); + } else { + sc->buffer[sc->buffers++] = data[1]; + } + + if (sc->buffer[sc->buffers-1] < 0xff) + sc->last_press = sc->buffer[sc->buffers-1]; + + /* Stop any existing key repeating */ + callout_stop(&sc->sc_repeater); + + /* Schedule a repeat callback on keydown */ + if (!(sc->last_press & (1 << 7))) { + callout_reset(&sc->sc_repeater, + ms_to_ticks(sc->sc_kbd.kb_delay1), akbd_repeat, sc); + } + mtx_unlock(&sc->sc_mutex); + + cv_broadcast(&sc->sc_cv); + + if (KBD_IS_ACTIVE(&sc->sc_kbd) && KBD_IS_BUSY(&sc->sc_kbd)) { + sc->sc_kbd.kb_callback.kc_func(&sc->sc_kbd, + KBDIO_KEYINPUT, sc->sc_kbd.kb_callback.kc_arg); + } + + return (0); +} + +static void +akbd_repeat(void *xsc) { + struct adb_kbd_softc *sc = xsc; + int notify_kbd = 0; + + /* Fake an up/down key repeat so long as we have the + free buffers */ + mtx_lock(&sc->sc_mutex); + if (sc->buffers < 7) { + sc->buffer[sc->buffers++] = sc->last_press | (1 << 7); + sc->buffer[sc->buffers++] = sc->last_press; + + notify_kbd = 1; + } + mtx_unlock(&sc->sc_mutex); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 20:01:11 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32436106567E; Sun, 26 Oct 2008 20:01:11 +0000 (UTC) (envelope-from rink@rink.nu) Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2]) by mx1.freebsd.org (Postfix) with ESMTP id E45A18FC0A; Sun, 26 Oct 2008 20:01:10 +0000 (UTC) (envelope-from rink@rink.nu) Received: from localhost (localhost [127.0.0.1]) by mx1.rink.nu (Postfix) with ESMTP id ACFBC6D42B; Sun, 26 Oct 2008 20:41:57 +0100 (CET) X-Virus-Scanned: amavisd-new at rink.nu Received: from mx1.rink.nu ([213.34.49.2]) by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xjm4wAcxXFC8; Sun, 26 Oct 2008 20:41:54 +0100 (CET) Received: by mx1.rink.nu (Postfix, from userid 1000) id B921B6D423; Sun, 26 Oct 2008 20:41:54 +0100 (CET) Date: Sun, 26 Oct 2008 20:41:54 +0100 From: Rink Springer To: Nathan Whitehorn Message-ID: <20081026194154.GA64709@rink.nu> References: <200810261937.m9QJbc2O093202@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200810261937.m9QJbc2O093202@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184299 - in head/sys: conf dev/adb powerpc/conf powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 20:01:11 -0000 On Sun, Oct 26, 2008 at 07:37:38PM +0000, Nathan Whitehorn wrote: > Log: > Add ADB support. This provides support for the external ADB bus on the PowerMac > G3 as well as the internal ADB keyboard and mice in PowerBooks and iBooks. This > also brings in Mac GPIO support, for which we should eventually have a better > interface. > > Obtained from: NetBSD (CUDA and PMU drivers) Thank you! I was looking into this myself, but it seems you've already got it sorted out. Great work! -- Rink P.W. Springer - http://rink.nu "Anyway boys, this is America. Just because you get more votes doesn't mean you win." - Fox Mulder From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 20:45:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B8C51065675; Sun, 26 Oct 2008 20:45:29 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 0EF988FC12; Sun, 26 Oct 2008 20:45:28 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 301F51CCA0; Sun, 26 Oct 2008 21:45:26 +0100 (CET) Date: Sun, 26 Oct 2008 21:45:26 +0100 From: Ed Schouten To: Nathan Whitehorn Message-ID: <20081026204526.GK6808@hoeg.nl> References: <200810261937.m9QJbc2O093202@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="pN9MePJoZbRKbUk1" Content-Disposition: inline In-Reply-To: <200810261937.m9QJbc2O093202@svn.freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184299 - in head/sys: conf dev/adb powerpc/conf powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 20:45:29 -0000 --pN9MePJoZbRKbUk1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Sun Oct 26 19:37:38 2008 > New Revision: 184299 > URL: http://svn.freebsd.org/changeset/base/184299 >=20 > Log: > Add ADB support. This provides support for the external ADB bus on > the PowerMac G3 as well as the internal ADB keyboard and mice in > PowerBooks and iBooks. This also brings in Mac GPIO support, for > which we should eventually have a better interface. > =20 > Obtained from: NetBSD (CUDA and PMU drivers) I, for one, welcome our kernel hacking overlord! Thanks a lot! This means I can finally try FreeBSD/powerpc on my old rusty PowerBook. --=20 Ed Schouten WWW: http://80386.nl/ --pN9MePJoZbRKbUk1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkE1uYACgkQ52SDGA2eCwVrTwCfVmUHGCj3AY/qCThsgX5Bn9D4 Q5IAn0MOu8hp85SInFu8T+fhVszG7hcx =c7zN -----END PGP SIGNATURE----- --pN9MePJoZbRKbUk1-- From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 21:55:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E0AB81065671; Sun, 26 Oct 2008 21:55:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CD4D58FC13; Sun, 26 Oct 2008 21:55:19 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QLtJhj096819; Sun, 26 Oct 2008 21:55:19 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QLtJG5096815; Sun, 26 Oct 2008 21:55:19 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810262155.m9QLtJG5096815@svn.freebsd.org> From: Ed Schouten Date: Sun, 26 Oct 2008 21:55:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 21:55:20 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 21:56:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C734106566C; Sun, 26 Oct 2008 21:56:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 89B238FC12; Sun, 26 Oct 2008 21:56:06 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QLu6N2096998; Sun, 26 Oct 2008 21:56:06 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QLu65I096995; Sun, 26 Oct 2008 21:56:06 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810262156.m9QLu65I096995@svn.freebsd.org> From: Ed Schouten Date: Sun, 26 Oct 2008 21:56:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184301 - in stable/6/lib: libc/stdlib libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 21:56:06 -0000 Author: ed Date: Sun Oct 26 21:56:06 2008 New Revision: 184301 URL: http://svn.freebsd.org/changeset/base/184301 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/6/lib/libc/stdlib/grantpt.3 stable/6/lib/libc/stdlib/grantpt.c stable/6/lib/libutil/pty.c Modified: stable/6/lib/libc/stdlib/grantpt.3 ============================================================================== --- stable/6/lib/libc/stdlib/grantpt.3 Sun Oct 26 21:55:19 2008 (r184300) +++ stable/6/lib/libc/stdlib/grantpt.3 Sun Oct 26 21:56:06 2008 (r184301) @@ -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/6/lib/libc/stdlib/grantpt.c ============================================================================== --- stable/6/lib/libc/stdlib/grantpt.c Sun Oct 26 21:55:19 2008 (r184300) +++ stable/6/lib/libc/stdlib/grantpt.c Sun Oct 26 21:56:06 2008 (r184301) @@ -237,14 +237,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/6/lib/libutil/pty.c ============================================================================== --- stable/6/lib/libutil/pty.c Sun Oct 26 21:55:19 2008 (r184300) +++ stable/6/lib/libutil/pty.c Sun Oct 26 21:56:06 2008 (r184301) @@ -60,37 +60,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; @@ -103,6 +92,9 @@ openpty(int *amaster, int *aslave, char ioctl(slave, TIOCSWINSZ, (char *)winp); return (0); + +bad: close(master); + return (-1); } int From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 21:56:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6535B106566C; Sun, 26 Oct 2008 21:56:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5315B8FC18; Sun, 26 Oct 2008 21:56:27 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QLuRxw097075; Sun, 26 Oct 2008 21:56:27 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QLuRZN097074; Sun, 26 Oct 2008 21:56:27 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810262156.m9QLuRZN097074@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 21:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184302 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 21:56:27 -0000 Author: sam Date: Sun Oct 26 21:56:27 2008 New Revision: 184302 URL: http://svn.freebsd.org/changeset/base/184302 Log: Fix joining an 11b BSS: scanning is normally done using 11g channels (unless explicitly locked to mode 11b) so when we join the bss the channel attached to the scan cache entry may need to be demoted. o demote to 11b if the ap is advertising 11b rates o skip the ap if it's 11b but we're locked to 11g (could consider this advisory but for now treat it as mandatory) o handle an odd edge case, if there is a fixed transmit rate for 11g then the rate check against the 11b ap will fail, try to demote to 11b and retry the rate check Reviewed by: sephe, thompsa Modified: head/sys/net80211/ieee80211_scan_sta.c Modified: head/sys/net80211/ieee80211_scan_sta.c ============================================================================== --- head/sys/net80211/ieee80211_scan_sta.c Sun Oct 26 21:56:06 2008 (r184301) +++ head/sys/net80211/ieee80211_scan_sta.c Sun Oct 26 21:56:27 2008 (r184302) @@ -73,8 +73,7 @@ struct sta_entry { uint8_t se_seen; /* seen during current scan */ uint8_t se_notseen; /* not seen in previous scans */ uint8_t se_flags; -#define STA_SSID_MATCH 0x01 -#define STA_BSSID_MATCH 0x02 +#define STA_DEMOTE11B 0x01 /* match w/ demoted 11b chan */ uint32_t se_avgrssi; /* LPF rssi state */ unsigned long se_lastupdate; /* time of last update */ unsigned long se_lastfail; /* time of last failure */ @@ -107,16 +106,16 @@ static void sta_flush_table(struct sta_t * contents explains why. The following flags are or'd to to this * mask and can be used to figure out why the entry was rejected. */ -#define MATCH_CHANNEL 0x001 /* channel mismatch */ -#define MATCH_CAPINFO 0x002 /* capabilities mismatch, e.g. no ess */ -#define MATCH_PRIVACY 0x004 /* privacy mismatch */ -#define MATCH_RATE 0x008 /* rate set mismatch */ -#define MATCH_SSID 0x010 /* ssid mismatch */ -#define MATCH_BSSID 0x020 /* bssid mismatch */ -#define MATCH_FAILS 0x040 /* too many failed auth attempts */ -#define MATCH_NOTSEEN 0x080 /* not seen in recent scans */ -#define MATCH_RSSI 0x100 /* rssi deemed too low to use */ -#define MATCH_CC 0x200 /* country code mismatch */ +#define MATCH_CHANNEL 0x0001 /* channel mismatch */ +#define MATCH_CAPINFO 0x0002 /* capabilities mismatch, e.g. no ess */ +#define MATCH_PRIVACY 0x0004 /* privacy mismatch */ +#define MATCH_RATE 0x0008 /* rate set mismatch */ +#define MATCH_SSID 0x0010 /* ssid mismatch */ +#define MATCH_BSSID 0x0020 /* bssid mismatch */ +#define MATCH_FAILS 0x0040 /* too many failed auth attempts */ +#define MATCH_NOTSEEN 0x0080 /* not seen in recent scans */ +#define MATCH_RSSI 0x0100 /* rssi deemed too low to use */ +#define MATCH_CC 0x0200 /* country code mismatch */ static int match_bss(struct ieee80211vap *, const struct ieee80211_scan_state *, struct sta_entry *, int); static void adhoc_age(struct ieee80211_scan_state *); @@ -675,6 +674,26 @@ sta_cancel(struct ieee80211_scan_state * ((uint16_t) \ ((((const uint8_t *)(p))[0] ) | \ (((const uint8_t *)(p))[1] << 8))) + +/* + * Demote any supplied 11g channel to 11b. There should + * always be an 11b channel but we check anyway... + */ +static struct ieee80211_channel * +demote11b(struct ieee80211vap *vap, struct ieee80211_channel *chan) +{ + struct ieee80211_channel *c; + + if (IEEE80211_IS_CHAN_ANYG(chan) && + vap->iv_des_mode == IEEE80211_MODE_AUTO) { + c = ieee80211_find_channel(vap->iv_ic, chan->ic_freq, + (chan->ic_flags &~ (IEEE80211_CHAN_PUREG | IEEE80211_CHAN_G)) | + IEEE80211_CHAN_B); + if (c != NULL) + chan = c; + } + return chan; +} static int maxrate(const struct ieee80211_scan_entry *se) @@ -774,7 +793,8 @@ sta_compare(const struct sta_entry *a, c * XXX inspect MCS for HT */ static int -check_rate(struct ieee80211vap *vap, const struct ieee80211_scan_entry *se) +check_rate(struct ieee80211vap *vap, const struct ieee80211_channel *chan, + const struct ieee80211_scan_entry *se) { #define RV(v) ((v) & IEEE80211_RATE_VAL) const struct ieee80211_rateset *srs; @@ -783,11 +803,11 @@ check_rate(struct ieee80211vap *vap, con okrate = badrate = 0; - srs = ieee80211_get_suprates(vap->iv_ic, se->se_chan); + srs = ieee80211_get_suprates(vap->iv_ic, chan); nrs = se->se_rates[1]; rs = se->se_rates+2; /* XXX MCS */ - ucastrate = vap->iv_txparms[ieee80211_chan2mode(se->se_chan)].ucastrate; + ucastrate = vap->iv_txparms[ieee80211_chan2mode(chan)].ucastrate; fixedrate = IEEE80211_FIXED_RATE_NONE; again: for (i = 0; i < nrs; i++) { @@ -903,9 +923,38 @@ match_bss(struct ieee80211vap *vap, if (se->se_capinfo & IEEE80211_CAPINFO_PRIVACY) fail |= MATCH_PRIVACY; } - rate = check_rate(vap, se); - if (rate & IEEE80211_RATE_BASIC) + se0->se_flags &= ~STA_DEMOTE11B; + rate = check_rate(vap, se->se_chan, se); + if (rate & IEEE80211_RATE_BASIC) { fail |= MATCH_RATE; + /* + * An 11b-only ap will give a rate mismatch if there is an + * OFDM fixed tx rate for 11g. Try downgrading the channel + * in the scan list to 11b and retry the rate check. + */ + if (IEEE80211_IS_CHAN_ANYG(se->se_chan)) { + rate = check_rate(vap, demote11b(vap, se->se_chan), se); + if ((rate & IEEE80211_RATE_BASIC) == 0) { + fail &= ~MATCH_RATE; + se0->se_flags |= STA_DEMOTE11B; + } + } + } else if (rate < 2*24) { + /* + * This is an 11b-only ap. Check the desired mode in + * case that needs to be honored (mode 11g filters out + * 11b-only ap's). Otherwise force any 11g channel used + * in scanning to be demoted. + * + * NB: we cheat a bit here by looking at the max rate; + * we could/should check the rates. + */ + if (!(vap->iv_des_mode == IEEE80211_MODE_AUTO || + vap->iv_des_mode == IEEE80211_MODE_11B)) + fail |= MATCH_RATE; + else + se0->se_flags |= STA_DEMOTE11B; + } if (ss->ss_nssid != 0 && !match_ssid(se->se_ssid, ss->ss_nssid, ss->ss_ssid)) fail |= MATCH_SSID; @@ -1060,6 +1109,8 @@ notfound: if (selbs == NULL) goto notfound; chan = selbs->base.se_chan; + if (selbs->se_flags & STA_DEMOTE11B) + chan = demote11b(vap, chan); if (!ieee80211_sta_join(vap, chan, &selbs->base)) goto notfound; return 1; /* terminate scan */ @@ -1151,6 +1202,8 @@ sta_roam_check(struct ieee80211_scan_sta curRate, roamRate, curRssi, roamRssi); chan = selbs->base.se_chan; + if (selbs->se_flags & STA_DEMOTE11B) + chan = demote11b(vap, chan); (void) ieee80211_sta_join(vap, chan, &selbs->base); } } @@ -1430,6 +1483,8 @@ notfound: if (selbs == NULL) goto notfound; chan = selbs->base.se_chan; + if (selbs->se_flags & STA_DEMOTE11B) + chan = demote11b(vap, chan); if (!ieee80211_sta_join(vap, chan, &selbs->base)) goto notfound; return 1; /* terminate scan */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 21:59:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A4401065676; Sun, 26 Oct 2008 21:59:07 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 78C9A8FC12; Sun, 26 Oct 2008 21:59:07 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QLx7a8097163; Sun, 26 Oct 2008 21:59:07 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QLx7J3097162; Sun, 26 Oct 2008 21:59:07 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810262159.m9QLx7J3097162@svn.freebsd.org> From: Sam Leffler Date: Sun, 26 Oct 2008 21:59:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184303 - head/sys/net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 21:59:07 -0000 Author: sam Date: Sun Oct 26 21:59:07 2008 New Revision: 184303 URL: http://svn.freebsd.org/changeset/base/184303 Log: o re-enable a lock assert o while here reformat a comment to sync w/ other repot's Modified: head/sys/net80211/ieee80211_node.c Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Sun Oct 26 21:56:27 2008 (r184302) +++ head/sys/net80211/ieee80211_node.c Sun Oct 26 21:59:07 2008 (r184303) @@ -598,8 +598,8 @@ gethtadjustflags(struct ieee80211com *ic /* * Check if the current channel needs to change based on whether - * any vap's are using HT20/HT40. This is used sync the state of - * ic_curchan after a channel width change on a running vap. + * any vap's are using HT20/HT40. This is used to sync the state + * of ic_curchan after a channel width change on a running vap. */ void ieee80211_sync_curchan(struct ieee80211com *ic) @@ -952,9 +952,9 @@ static void node_age(struct ieee80211_node *ni) { struct ieee80211vap *vap = ni->ni_vap; -#if 0 - IEEE80211_NODE_LOCK_ASSERT(&ic->ic_sta); -#endif + + IEEE80211_NODE_LOCK_ASSERT(&vap->iv_ic->ic_sta); + /* * Age frames on the power save queue. */ From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:03:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9BA9106567A; Sun, 26 Oct 2008 22:03:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D761B8FC14; Sun, 26 Oct 2008 22:03:52 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QM3qOE097360; Sun, 26 Oct 2008 22:03:52 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QM3q9m097359; Sun, 26 Oct 2008 22:03:52 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810262203.m9QM3q9m097359@svn.freebsd.org> From: Robert Watson Date: Sun, 26 Oct 2008 22:03:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184304 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:03:53 -0000 Author: rwatson Date: Sun Oct 26 22:03:52 2008 New Revision: 184304 URL: http://svn.freebsd.org/changeset/base/184304 Log: In both dropwithreset paths in tcp_input.c, drop the tcbinfo lock sooner to decomplicate locking and eliminate the need for a rather chatty comment about why we have to handle the global lock in a special way for the benefit of ipfw and pf cred rules. MFC after: 3 days Modified: head/sys/netinet/tcp_input.c Modified: head/sys/netinet/tcp_input.c ============================================================================== --- head/sys/netinet/tcp_input.c Sun Oct 26 21:59:07 2008 (r184303) +++ head/sys/netinet/tcp_input.c Sun Oct 26 22:03:52 2008 (r184304) @@ -896,19 +896,12 @@ findpcb: dropwithreset: INP_INFO_WLOCK_ASSERT(&V_tcbinfo); + INP_INFO_WUNLOCK(&V_tcbinfo); - /* - * If inp is non-NULL, we call tcp_dropwithreset() holding both inpcb - * and global locks. However, if NULL, we must hold neither as - * firewalls may acquire the global lock in order to look for a - * matching inpcb. - */ if (inp != NULL) { tcp_dropwithreset(m, th, tp, tlen, rstreason); INP_WUNLOCK(inp); - } - INP_INFO_WUNLOCK(&V_tcbinfo); - if (inp == NULL) + } else tcp_dropwithreset(m, th, NULL, tlen, rstreason); m = NULL; /* mbuf chain got consumed. */ goto drop; @@ -2498,19 +2491,12 @@ dropafterack: dropwithreset: KASSERT(headlocked, ("%s: dropwithreset: head not locked", __func__)); + INP_INFO_WUNLOCK(&V_tcbinfo); - /* - * If tp is non-NULL, we call tcp_dropwithreset() holding both inpcb - * and global locks. However, if NULL, we must hold neither as - * firewalls may acquire the global lock in order to look for a - * matching inpcb. - */ if (tp != NULL) { tcp_dropwithreset(m, th, tp, tlen, rstreason); INP_WUNLOCK(tp->t_inpcb); - } - INP_INFO_WUNLOCK(&V_tcbinfo); - if (tp == NULL) + } else tcp_dropwithreset(m, th, NULL, tlen, rstreason); return; From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:11:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E85A4106566C; Sun, 26 Oct 2008 22:11:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCE358FC27; Sun, 26 Oct 2008 22:11:01 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMB1BQ097920; Sun, 26 Oct 2008 22:11:01 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMB1LJ097919; Sun, 26 Oct 2008 22:11:01 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810262211.m9QMB1LJ097919@svn.freebsd.org> From: Ed Schouten Date: Sun, 26 Oct 2008 22:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184305 - stable/7/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:11:02 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:11:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C6021065674; Sun, 26 Oct 2008 22:11:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50E398FC32; Sun, 26 Oct 2008 22:11:31 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMBVPP097972; Sun, 26 Oct 2008 22:11:31 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMBV2d097971; Sun, 26 Oct 2008 22:11:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810262211.m9QMBV2d097971@svn.freebsd.org> From: Ed Schouten Date: Sun, 26 Oct 2008 22:11:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184306 - stable/6/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:11:31 -0000 Author: ed Date: Sun Oct 26 22:11:31 2008 New Revision: 184306 URL: http://svn.freebsd.org/changeset/base/184306 Log: Add mergeinfo for r184301. Approved by: re Modified: stable/6/lib/libutil/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:45:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99E461065672; Sun, 26 Oct 2008 22:45:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 862F58FC0C; Sun, 26 Oct 2008 22:45:18 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMjIW0099569; Sun, 26 Oct 2008 22:45:18 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMjITE099564; Sun, 26 Oct 2008 22:45:18 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810262245.m9QMjITE099564@svn.freebsd.org> From: Robert Watson Date: Sun, 26 Oct 2008 22:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184307 - in head/sys: netinet6 security/mac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:45:18 -0000 Author: rwatson Date: Sun Oct 26 22:45:18 2008 New Revision: 184307 URL: http://svn.freebsd.org/changeset/base/184307 Log: Add a MAC label, MAC Framework, and MAC policy entry points for IPv6 fragment reassembly queues. This allows policies to label reassembly queues, perform access control checks when matching fragments to a queue, update a queue label when fragments are matched, and label the resulting reassembled datagram. Obtained from: TrustedBSD Project Modified: head/sys/netinet6/frag6.c head/sys/netinet6/ip6_var.h head/sys/security/mac/mac_framework.h head/sys/security/mac/mac_inet6.c head/sys/security/mac/mac_policy.h Modified: head/sys/netinet6/frag6.c ============================================================================== --- head/sys/netinet6/frag6.c Sun Oct 26 22:11:31 2008 (r184306) +++ head/sys/netinet6/frag6.c Sun Oct 26 22:45:18 2008 (r184307) @@ -32,6 +32,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_mac.h" + #include #include #include @@ -56,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include /* for ECN definitions */ #include /* for ECN definitions */ +#include + /* * Define it to get a correct behavior on per-interface statistics. * You will need to perform an extra routing table lookup, per fragment, @@ -228,7 +232,11 @@ frag6_input(struct mbuf **mp, int *offp, for (q6 = V_ip6q.ip6q_next; q6 != &V_ip6q; q6 = q6->ip6q_next) if (ip6f->ip6f_ident == q6->ip6q_ident && IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &q6->ip6q_src) && - IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &q6->ip6q_dst)) + IN6_ARE_ADDR_EQUAL(&ip6->ip6_dst, &q6->ip6q_dst) +#ifdef MAC + && mac_ip6q_match(m, q6) +#endif + ) break; if (q6 == &V_ip6q) { @@ -254,7 +262,13 @@ frag6_input(struct mbuf **mp, int *offp, if (q6 == NULL) goto dropfrag; bzero(q6, sizeof(*q6)); - +#ifdef MAC + if (mac_ip6q_init(q6, M_NOWAIT) != 0) { + free(q6, M_FTABLE); + goto dropfrag; + } + mac_ip6q_create(m, q6); +#endif frag6_insque(q6, &V_ip6q); /* ip6q_nxt will be filled afterwards, from 1st fragment */ @@ -461,6 +475,10 @@ frag6_input(struct mbuf **mp, int *offp, #endif insert: +#ifdef MAC + if (!first_frag) + mac_ip6q_update(m, q6); +#endif /* * Stick new segment in its place; @@ -533,6 +551,9 @@ insert: if ((t = m_split(m, offset, M_DONTWAIT)) == NULL) { frag6_remque(q6); V_frag6_nfrags -= q6->ip6q_nfrag; +#ifdef MAC + mac_ip6q_destroy(q6); +#endif free(q6, M_FTABLE); V_frag6_nfragpackets--; goto dropfrag; @@ -551,6 +572,10 @@ insert: frag6_remque(q6); V_frag6_nfrags -= q6->ip6q_nfrag; +#ifdef MAC + mac_ip6q_reassemble(q6, m); + mac_ip6q_destroy(q6); +#endif free(q6, M_FTABLE); V_frag6_nfragpackets--; @@ -623,6 +648,9 @@ frag6_freef(struct ip6q *q6) } frag6_remque(q6); V_frag6_nfrags -= q6->ip6q_nfrag; +#ifdef MAC + mac_ip6q_destroy(q6); +#endif free(q6, M_FTABLE); V_frag6_nfragpackets--; } Modified: head/sys/netinet6/ip6_var.h ============================================================================== --- head/sys/netinet6/ip6_var.h Sun Oct 26 22:11:31 2008 (r184306) +++ head/sys/netinet6/ip6_var.h Sun Oct 26 22:45:18 2008 (r184307) @@ -83,6 +83,7 @@ struct ip6q { u_char *ip6q_nxtp; #endif int ip6q_nfrag; /* # of fragments */ + struct label *ip6q_label; }; struct ip6asfrag { Modified: head/sys/security/mac/mac_framework.h ============================================================================== --- head/sys/security/mac/mac_framework.h Sun Oct 26 22:11:31 2008 (r184306) +++ head/sys/security/mac/mac_framework.h Sun Oct 26 22:45:18 2008 (r184307) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2005-2006 SPARTA, Inc. * All rights reserved. @@ -60,6 +60,7 @@ struct ifnet; struct ifreq; struct image_params; struct inpcb; +struct ip6q; struct ipq; struct ksem; struct label; @@ -138,6 +139,13 @@ void mac_inpcb_destroy(struct inpcb *); int mac_inpcb_init(struct inpcb *, int); void mac_inpcb_sosetlabel(struct socket *so, struct inpcb *inp); +void mac_ip6q_create(struct mbuf *m, struct ip6q *q6); +void mac_ip6q_destroy(struct ip6q *q6); +int mac_ip6q_init(struct ip6q *q6, int); +int mac_ip6q_match(struct mbuf *m, struct ip6q *q6); +void mac_ip6q_reassemble(struct ip6q *q6, struct mbuf *m); +void mac_ip6q_update(struct mbuf *m, struct ip6q *q6); + void mac_ipq_create(struct mbuf *m, struct ipq *q); void mac_ipq_destroy(struct ipq *q); int mac_ipq_init(struct ipq *q, int); Modified: head/sys/security/mac/mac_inet6.c ============================================================================== --- head/sys/security/mac/mac_inet6.c Sun Oct 26 22:11:31 2008 (r184306) +++ head/sys/security/mac/mac_inet6.c Sun Oct 26 22:45:18 2008 (r184307) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Robert N. M. Watson + * Copyright (c) 2007-2008 Robert N. M. Watson * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -49,10 +49,108 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include +#include + #include #include #include +static struct label * +mac_ip6q_label_alloc(int flag) +{ + struct label *label; + int error; + + label = mac_labelzone_alloc(flag); + if (label == NULL) + return (NULL); + + MAC_CHECK(ip6q_init_label, label, flag); + if (error) { + MAC_PERFORM(ip6q_destroy_label, label); + mac_labelzone_free(label); + return (NULL); + } + return (label); +} + +int +mac_ip6q_init(struct ip6q *q6, int flag) +{ + + if (mac_labeled & MPC_OBJECT_IPQ) { + q6->ip6q_label = mac_ip6q_label_alloc(flag); + if (q6->ip6q_label == NULL) + return (ENOMEM); + } else + q6->ip6q_label = NULL; + return (0); +} + +static void +mac_ip6q_label_free(struct label *label) +{ + + MAC_PERFORM(ip6q_destroy_label, label); + mac_labelzone_free(label); +} + +void +mac_ip6q_destroy(struct ip6q *q6) +{ + + if (q6->ip6q_label != NULL) { + mac_ip6q_label_free(q6->ip6q_label); + q6->ip6q_label = NULL; + } +} + +void +mac_ip6q_reassemble(struct ip6q *q6, struct mbuf *m) +{ + struct label *label; + + label = mac_mbuf_to_label(m); + + MAC_PERFORM(ip6q_reassemble, q6, q6->ip6q_label, m, label); +} + +void +mac_ip6q_create(struct mbuf *m, struct ip6q *q6) +{ + struct label *label; + + label = mac_mbuf_to_label(m); + + MAC_PERFORM(ip6q_create, m, label, q6, q6->ip6q_label); +} + +int +mac_ip6q_match(struct mbuf *m, struct ip6q *q6) +{ + struct label *label; + int result; + + label = mac_mbuf_to_label(m); + + result = 1; + MAC_BOOLEAN(ip6q_match, &&, m, label, q6, q6->ip6q_label); + + return (result); +} + +void +mac_ip6q_update(struct mbuf *m, struct ip6q *q6) +{ + struct label *label; + + label = mac_mbuf_to_label(m); + + MAC_PERFORM(ip6q_update, m, label, q6, q6->ip6q_label); +} + void mac_netinet6_nd6_send(struct ifnet *ifp, struct mbuf *m) { Modified: head/sys/security/mac/mac_policy.h ============================================================================== --- head/sys/security/mac/mac_policy.h Sun Oct 26 22:11:31 2008 (r184306) +++ head/sys/security/mac/mac_policy.h Sun Oct 26 22:45:18 2008 (r184307) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2005-2006 SPARTA, Inc. * Copyright (c) 2008 Apple Inc. @@ -72,6 +72,7 @@ struct devfs_dirent; struct ifnet; struct image_params; struct inpcb; +struct ip6q; struct ipq; struct ksem; struct label; @@ -201,6 +202,17 @@ typedef void (*mpo_inpcb_sosetlabel_t)(s struct label *label, struct inpcb *inp, struct label *inplabel); +typedef void (*mpo_ip6q_create_t)(struct mbuf *m, struct label *mlabel, + struct ip6q *q6, struct label *q6label); +typedef void (*mpo_ip6q_destroy_label_t)(struct label *label); +typedef int (*mpo_ip6q_init_label_t)(struct label *label, int flag); +typedef int (*mpo_ip6q_match_t)(struct mbuf *m, struct label *mlabel, + struct ip6q *q6, struct label *q6label); +typedef void (*mpo_ip6q_reassemble)(struct ip6q *q6, struct label *q6label, + struct mbuf *m, struct label *mlabel); +typedef void (*mpo_ip6q_update_t)(struct mbuf *m, struct label *mlabel, + struct ip6q *q6, struct label *q6label); + typedef void (*mpo_ipq_create_t)(struct mbuf *m, struct label *mlabel, struct ipq *q, struct label *qlabel); typedef void (*mpo_ipq_destroy_label_t)(struct label *label); @@ -698,6 +710,13 @@ struct mac_policy_ops { mpo_inpcb_init_label_t mpo_inpcb_init_label; mpo_inpcb_sosetlabel_t mpo_inpcb_sosetlabel; + mpo_ip6q_create_t mpo_ip6q_create; + mpo_ip6q_destroy_label_t mpo_ip6q_destroy_label; + mpo_ip6q_init_label_t mpo_ip6q_init_label; + mpo_ip6q_match_t mpo_ip6q_match; + mpo_ip6q_reassemble mpo_ip6q_reassemble; + mpo_ip6q_update_t mpo_ip6q_update; + mpo_ipq_create_t mpo_ipq_create; mpo_ipq_destroy_label_t mpo_ipq_destroy_label; mpo_ipq_init_label_t mpo_ipq_init_label; @@ -970,6 +989,7 @@ struct mac_policy_conf { #define MPC_OBJECT_SYSVSEM 0x0000000000010000 #define MPC_OBJECT_SYSVSHM 0x0000000000020000 #define MPC_OBJECT_SYNCACHE 0x0000000000040000 +#define MPC_OBJECT_IP6Q 0x0000000000080000 /*- * The TrustedBSD MAC Framework has a major version number, MAC_VERSION, From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:46:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DDBD106567E; Sun, 26 Oct 2008 22:46:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 23B4D8FC0A; Sun, 26 Oct 2008 22:46:38 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMkc2L099637; Sun, 26 Oct 2008 22:46:38 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMkbxk099632; Sun, 26 Oct 2008 22:46:37 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810262246.m9QMkbxk099632@svn.freebsd.org> From: Robert Watson Date: Sun, 26 Oct 2008 22:46:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184308 - in head/sys/security: mac_biba mac_lomac mac_mls mac_stub mac_test X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:46:38 -0000 Author: rwatson Date: Sun Oct 26 22:46:37 2008 New Revision: 184308 URL: http://svn.freebsd.org/changeset/base/184308 Log: Implement MAC policy support for IPv6 fragment reassembly queues, modeled on IPv4 fragment reassembly queue support. Obtained from: TrustedBSD Project Modified: head/sys/security/mac_biba/mac_biba.c head/sys/security/mac_lomac/mac_lomac.c head/sys/security/mac_mls/mac_mls.c head/sys/security/mac_stub/mac_stub.c head/sys/security/mac_test/mac_test.c Modified: head/sys/security/mac_biba/mac_biba.c ============================================================================== --- head/sys/security/mac_biba/mac_biba.c Sun Oct 26 22:45:18 2008 (r184307) +++ head/sys/security/mac_biba/mac_biba.c Sun Oct 26 22:46:37 2008 (r184308) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 McAfee, Inc. * Copyright (c) 2006 SPARTA, Inc. * All rights reserved. @@ -1170,6 +1170,51 @@ biba_inpcb_sosetlabel(struct socket *so, } static void +biba_ip6q_create(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + struct mac_biba *source, *dest; + + source = SLOT(mlabel); + dest = SLOT(q6label); + + biba_copy_effective(source, dest); +} + +static int +biba_ip6q_match(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + struct mac_biba *a, *b; + + a = SLOT(q6label); + b = SLOT(mlabel); + + return (biba_equal_effective(a, b)); +} + +static void +biba_ip6q_reassemble(struct ip6q *q6, struct label *q6label, struct mbuf *m, + struct label *mlabel) +{ + struct mac_biba *source, *dest; + + source = SLOT(q6label); + dest = SLOT(mlabel); + + /* Just use the head, since we require them all to match. */ + biba_copy_effective(source, dest); +} + +static void +biba_ip6q_update(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + + /* NOOP: we only accept matching labels, so no need to update */ +} + +static void biba_ipq_create(struct mbuf *m, struct label *mlabel, struct ipq *q, struct label *qlabel) { @@ -3325,6 +3370,13 @@ static struct mac_policy_ops mac_biba_op .mpo_inpcb_init_label = biba_init_label_waitcheck, .mpo_inpcb_sosetlabel = biba_inpcb_sosetlabel, + .mpo_ip6q_create = biba_ip6q_create, + .mpo_ip6q_destroy_label = biba_destroy_label, + .mpo_ip6q_init_label = biba_init_label_waitcheck, + .mpo_ip6q_match = biba_ip6q_match, + .mpo_ip6q_reassemble = biba_ip6q_reassemble, + .mpo_ip6q_update = biba_ip6q_update, + .mpo_ipq_create = biba_ipq_create, .mpo_ipq_destroy_label = biba_destroy_label, .mpo_ipq_init_label = biba_init_label_waitcheck, Modified: head/sys/security/mac_lomac/mac_lomac.c ============================================================================== --- head/sys/security/mac_lomac/mac_lomac.c Sun Oct 26 22:45:18 2008 (r184307) +++ head/sys/security/mac_lomac/mac_lomac.c Sun Oct 26 22:46:37 2008 (r184308) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2006 SPARTA, Inc. * All rights reserved. @@ -1299,6 +1299,51 @@ lomac_inpcb_sosetlabel(struct socket *so } static void +lomac_ip6q_create(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + struct mac_lomac *source, *dest; + + source = SLOT(mlabel); + dest = SLOT(q6label); + + lomac_copy_single(source, dest); +} + +static int +lomac_ip6q_match(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + struct mac_lomac *a, *b; + + a = SLOT(q6label); + b = SLOT(mlabel); + + return (lomac_equal_single(a, b)); +} + +static void +lomac_ip6q_reassemble(struct ip6q *q6, struct label *q6label, struct mbuf *m, + struct label *mlabel) +{ + struct mac_lomac *source, *dest; + + source = SLOT(q6label); + dest = SLOT(mlabel); + + /* Just use the head, since we require them all to match. */ + lomac_copy_single(source, dest); +} + +static void +lomac_ip6q_update(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + + /* NOOP: we only accept matching labels, so no need to update */ +} + +static void lomac_ipq_create(struct mbuf *m, struct label *mlabel, struct ipq *q, struct label *qlabel) { @@ -2886,6 +2931,13 @@ static struct mac_policy_ops lomac_ops = .mpo_inpcb_init_label = lomac_init_label_waitcheck, .mpo_inpcb_sosetlabel = lomac_inpcb_sosetlabel, + .mpo_ip6q_create = lomac_ip6q_create, + .mpo_ip6q_destroy_label = lomac_destroy_label, + .mpo_ip6q_init_label = lomac_init_label_waitcheck, + .mpo_ip6q_match = lomac_ip6q_match, + .mpo_ip6q_reassemble = lomac_ip6q_reassemble, + .mpo_ip6q_update = lomac_ip6q_update, + .mpo_ipq_create = lomac_ipq_create, .mpo_ipq_destroy_label = lomac_destroy_label, .mpo_ipq_init_label = lomac_init_label_waitcheck, Modified: head/sys/security/mac_mls/mac_mls.c ============================================================================== --- head/sys/security/mac_mls/mac_mls.c Sun Oct 26 22:45:18 2008 (r184307) +++ head/sys/security/mac_mls/mac_mls.c Sun Oct 26 22:46:37 2008 (r184308) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 McAfee, Inc. * Copyright (c) 2006 SPARTA, Inc. * All rights reserved. @@ -1088,6 +1088,51 @@ mls_inpcb_sosetlabel(struct socket *so, } static void +mls_ip6q_create(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + struct mac_mls *source, *dest; + + source = SLOT(mlabel); + dest = SLOT(q6label); + + mls_copy_effective(source, dest); +} + +static int +mls_ip6q_match(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + struct mac_mls *a, *b; + + a = SLOT(q6label); + b = SLOT(mlabel); + + return (mls_equal_effective(a, b)); +} + +static void +mls_ip6q_reassemble(struct ip6q *q6, struct label *q6label, struct mbuf *m, + struct label *mlabel) +{ + struct mac_mls *source, *dest; + + source = SLOT(q6label); + dest = SLOT(mlabel); + + /* Just use the head, since we require them all to match. */ + mls_copy_effective(source, dest); +} + +static void +mls_ip6q_update(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + + /* NOOP: we only accept matching labels, so no need to update */ +} + +static void mls_ipq_create(struct mbuf *m, struct label *mlabel, struct ipq *q, struct label *qlabel) { @@ -2948,6 +2993,13 @@ static struct mac_policy_ops mls_ops = .mpo_inpcb_init_label = mls_init_label_waitcheck, .mpo_inpcb_sosetlabel = mls_inpcb_sosetlabel, + .mpo_ip6q_create = mls_ip6q_create, + .mpo_ip6q_destroy_label = mls_destroy_label, + .mpo_ip6q_init_label = mls_init_label_waitcheck, + .mpo_ip6q_match = mls_ip6q_match, + .mpo_ip6q_reassemble = mls_ip6q_reassemble, + .mpo_ip6q_update = mls_ip6q_update, + .mpo_ipq_create = mls_ipq_create, .mpo_ipq_destroy_label = mls_destroy_label, .mpo_ipq_init_label = mls_init_label_waitcheck, Modified: head/sys/security/mac_stub/mac_stub.c ============================================================================== --- head/sys/security/mac_stub/mac_stub.c Sun Oct 26 22:45:18 2008 (r184307) +++ head/sys/security/mac_stub/mac_stub.c Sun Oct 26 22:46:37 2008 (r184308) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 McAfee, Inc. * Copyright (c) 2005-2006 SPARTA, Inc. * Copyright (c) 2008 Apple Inc. @@ -308,6 +308,35 @@ stub_inpcb_sosetlabel(struct socket *so, } static void +stub_ip6q_create(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + +} + +static int +stub_ip6q_match(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + + return (1); +} + +static void +stub_ip6q_reassemble(struct ip6q *q6, struct label *q6label, struct mbuf *m, + struct label *mlabel) +{ + +} + +static void +stub_ip6q_update(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + +} + +static void stub_ipq_create(struct mbuf *m, struct label *mlabel, struct ipq *q, struct label *qlabel) { @@ -1546,6 +1575,13 @@ static struct mac_policy_ops stub_ops = .mpo_inpcb_init_label = stub_init_label_waitcheck, .mpo_inpcb_sosetlabel = stub_inpcb_sosetlabel, + .mpo_ip6q_create = stub_ip6q_create, + .mpo_ip6q_destroy_label = stub_destroy_label, + .mpo_ip6q_init_label = stub_init_label_waitcheck, + .mpo_ip6q_match = stub_ip6q_match, + .mpo_ip6q_update = stub_ip6q_update, + .mpo_ip6q_reassemble = stub_ip6q_reassemble, + .mpo_ipq_create = stub_ipq_create, .mpo_ipq_destroy_label = stub_destroy_label, .mpo_ipq_init_label = stub_init_label_waitcheck, Modified: head/sys/security/mac_test/mac_test.c ============================================================================== --- head/sys/security/mac_test/mac_test.c Sun Oct 26 22:45:18 2008 (r184307) +++ head/sys/security/mac_test/mac_test.c Sun Oct 26 22:46:37 2008 (r184308) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 McAfee, Inc. * Copyright (c) 2006 SPARTA, Inc. * Copyright (c) 2008 Apple Inc. @@ -84,6 +84,7 @@ SYSCTL_NODE(_security_mac, OID_AUTO, tes #define MAGIC_DEVFS 0x9ee79c32 #define MAGIC_IFNET 0xc218b120 #define MAGIC_INPCB 0x4440f7bb +#define MAGIC_IP6Q 0x0870e1b7 #define MAGIC_IPQ 0x206188ef #define MAGIC_MBUF 0xbbefa5bb #define MAGIC_MOUNT 0xc7c46e47 @@ -564,6 +565,76 @@ test_inpcb_sosetlabel(struct socket *so, COUNTER_INC(inpcb_sosetlabel); } +COUNTER_DECL(ip6q_create); +static void +test_ip6q_create(struct mbuf *fragment, struct label *fragmentlabel, + struct ip6q *q6, struct label *q6label) +{ + + LABEL_CHECK(fragmentlabel, MAGIC_MBUF); + LABEL_CHECK(q6label, MAGIC_IP6Q); + COUNTER_INC(ip6q_create); +} + +COUNTER_DECL(ip6q_destroy_label); +static void +test_ip6q_destroy_label(struct label *label) +{ + + LABEL_DESTROY(label, MAGIC_IP6Q); + COUNTER_INC(ip6q_destroy_label); +} + +COUNTER_DECL(ip6q_init_label); +static int +test_ip6q_init_label(struct label *label, int flag) +{ + + if (flag & M_WAITOK) + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "test_ip6q_init_label() at %s:%d", __FILE__, + __LINE__); + + LABEL_INIT(label, MAGIC_IP6Q); + COUNTER_INC(ip6q_init_label); + return (0); +} + +COUNTER_DECL(ip6q_match); +static int +test_ip6q_match(struct mbuf *fragment, struct label *fragmentlabel, + struct ip6q *q6, struct label *q6label) +{ + + LABEL_CHECK(fragmentlabel, MAGIC_MBUF); + LABEL_CHECK(q6label, MAGIC_IP6Q); + COUNTER_INC(ip6q_match); + + return (1); +} + +COUNTER_DECL(ip6q_reassemble); +static void +test_ip6q_reassemble(struct ip6q *q6, struct label *q6label, struct mbuf *m, + struct label *mlabel) +{ + + LABEL_CHECK(q6label, MAGIC_IP6Q); + LABEL_CHECK(mlabel, MAGIC_MBUF); + COUNTER_INC(ip6q_reassemble); +} + +COUNTER_DECL(ip6q_update); +static void +test_ip6q_update(struct mbuf *m, struct label *mlabel, struct ip6q *q6, + struct label *q6label) +{ + + LABEL_CHECK(mlabel, MAGIC_MBUF); + LABEL_CHECK(q6label, MAGIC_IP6Q); + COUNTER_INC(ip6q_update); +} + COUNTER_DECL(ipq_create); static void test_ipq_create(struct mbuf *fragment, struct label *fragmentlabel, @@ -2860,6 +2931,13 @@ static struct mac_policy_ops test_ops = .mpo_inpcb_init_label = test_inpcb_init_label, .mpo_inpcb_sosetlabel = test_inpcb_sosetlabel, + .mpo_ip6q_create = test_ip6q_create, + .mpo_ip6q_destroy_label = test_ip6q_destroy_label, + .mpo_ip6q_init_label = test_ip6q_init_label, + .mpo_ip6q_match = test_ip6q_match, + .mpo_ip6q_reassemble = test_ip6q_reassemble, + .mpo_ip6q_update = test_ip6q_update, + .mpo_ipq_create = test_ipq_create, .mpo_ipq_destroy_label = test_ipq_destroy_label, .mpo_ipq_init_label = test_ipq_init_label, From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:52:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64813106567A; Sun, 26 Oct 2008 22:52:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52D148FC08; Sun, 26 Oct 2008 22:52:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMqv8R000294; Sun, 26 Oct 2008 22:52:57 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMqvXF000293; Sun, 26 Oct 2008 22:52:57 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200810262252.m9QMqvXF000293@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 26 Oct 2008 22:52:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184309 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:52:57 -0000 Author: stas Date: Sun Oct 26 22:52:57 2008 New Revision: 184309 URL: http://svn.freebsd.org/changeset/base/184309 Log: - Add a missing NULL-pointer check. Reviewed by: cognet Approved by: kib (mentor, implicit) MFC after: 3 days Modified: head/sys/arm/at91/at91.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Sun Oct 26 22:46:37 2008 (r184308) +++ head/sys/arm/at91/at91.c Sun Oct 26 22:52:57 2008 (r184309) @@ -534,8 +534,10 @@ at91_alloc_resource(device_t dev, device case SYS_RES_MEMORY: rle->res = rman_reserve_resource(&sc->sc_mem_rman, start, end, count, flags, child); - rman_set_bustag(rle->res, &at91_bs_tag); - rman_set_bushandle(rle->res, start); + if (rle->res != NULL) { + rman_set_bustag(rle->res, &at91_bs_tag); + rman_set_bushandle(rle->res, start); + } break; } if (rle->res) { From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:54:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FB92106569F; Sun, 26 Oct 2008 22:54:00 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF338FC22; Sun, 26 Oct 2008 22:54:00 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMs0TG000414; Sun, 26 Oct 2008 22:54:00 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMs0aJ000413; Sun, 26 Oct 2008 22:54:00 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200810262254.m9QMs0aJ000413@svn.freebsd.org> From: Stanislav Sedov Date: Sun, 26 Oct 2008 22:54:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184310 - head/sys/arm/at91 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:54:00 -0000 Author: stas Date: Sun Oct 26 22:53:59 2008 New Revision: 184310 URL: http://svn.freebsd.org/changeset/base/184310 Log: - Add stream bus_space operations. Reviewed by: cognet Approved by: kib (mentor, implicit) MFC after: 1 week Modified: head/sys/arm/at91/at91.c Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Sun Oct 26 22:52:57 2008 (r184309) +++ head/sys/arm/at91/at91.c Sun Oct 26 22:53:59 2008 (r184310) @@ -168,6 +168,42 @@ struct bus_space at91_bs_tag = { generic_armv4_bs_c_2, NULL, NULL, + + /* read (single) stream */ + generic_bs_r_1, + generic_armv4_bs_r_2, + generic_bs_r_4, + NULL, + + /* read multiple stream */ + generic_bs_rm_1, + generic_armv4_bs_rm_2, + generic_bs_rm_4, + NULL, + + /* read region stream */ + generic_bs_rr_1, + generic_armv4_bs_rr_2, + generic_bs_rr_4, + NULL, + + /* write (single) stream */ + generic_bs_w_1, + generic_armv4_bs_w_2, + generic_bs_w_4, + NULL, + + /* write multiple stream */ + generic_bs_wm_1, + generic_armv4_bs_wm_2, + generic_bs_wm_4, + NULL, + + /* write region stream */ + NULL, + generic_armv4_bs_wr_2, + generic_bs_wr_4, + NULL, }; static int From owner-svn-src-all@FreeBSD.ORG Sun Oct 26 22:56:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4BA51065673; Sun, 26 Oct 2008 22:56:17 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1C388FC22; Sun, 26 Oct 2008 22:56:17 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QMuHw7000628; Sun, 26 Oct 2008 22:56:17 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QMuHa2000627; Sun, 26 Oct 2008 22:56:17 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <200810262256.m9QMuHa2000627@svn.freebsd.org> From: Dmitry Morozovsky Date: Sun, 26 Oct 2008 22:56:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184311 - stable/7/release/doc/en_US.ISO8859-1/hardware X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 22:56:18 -0000 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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 23:05:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A2121065670; Sun, 26 Oct 2008 23:05:55 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB1A58FC0C; Sun, 26 Oct 2008 23:05:54 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QN5sSA001727; Sun, 26 Oct 2008 23:05:54 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QN5sv6001726; Sun, 26 Oct 2008 23:05:54 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <200810262305.m9QN5sv6001726@svn.freebsd.org> From: Dmitry Morozovsky Date: Sun, 26 Oct 2008 23:05:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184312 - stable/6/release/doc/en_US.ISO8859-1/hardware/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 23:05:55 -0000 Author: marck (doc committer) Date: Sun Oct 26 23:05:54 2008 New Revision: 184312 URL: http://svn.freebsd.org/changeset/base/184312 Log: MFH: r184200 Correct a typo in Nocona core name Approved by: re (hrs, kib) Modified: stable/6/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml Modified: stable/6/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml ============================================================================== --- stable/6/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml Sun Oct 26 22:56:17 2008 (r184311) +++ stable/6/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml Sun Oct 26 23:05:54 2008 (r184312) @@ -29,7 +29,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 owner-svn-src-all@FreeBSD.ORG Sun Oct 26 23:11:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 955A4106566C; Sun, 26 Oct 2008 23:11:25 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82A808FC12; Sun, 26 Oct 2008 23:11:25 +0000 (UTC) (envelope-from marck@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9QNBP9m002173; Sun, 26 Oct 2008 23:11:25 GMT (envelope-from marck@svn.freebsd.org) Received: (from marck@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9QNBPKR002172; Sun, 26 Oct 2008 23:11:25 GMT (envelope-from marck@svn.freebsd.org) Message-Id: <200810262311.m9QNBPKR002172@svn.freebsd.org> From: Dmitry Morozovsky Date: Sun, 26 Oct 2008 23:11:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184313 - releng/6.4/release/doc/en_US.ISO8859-1/hardware/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2008 23:11:25 -0000 Author: marck (doc committer) Date: Sun Oct 26 23:11:25 2008 New Revision: 184313 URL: http://svn.freebsd.org/changeset/base/184313 Log: MFH: r184200 Correct a typo in Nocona core name Approved by: re (hrs, kib) Modified: releng/6.4/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml Modified: releng/6.4/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml ============================================================================== --- releng/6.4/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml Sun Oct 26 23:05:54 2008 (r184312) +++ releng/6.4/release/doc/en_US.ISO8859-1/hardware/amd64/proc-amd64.sgml Sun Oct 26 23:11:25 2008 (r184313) @@ -29,7 +29,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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 00:09:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0E07106567F; Mon, 27 Oct 2008 00:09:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9E50F8FC14; Mon, 27 Oct 2008 00:09:14 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R09EPS008077; Mon, 27 Oct 2008 00:09:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R09ExS008076; Mon, 27 Oct 2008 00:09:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200810270009.m9R09ExS008076@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 27 Oct 2008 00:09:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184314 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 00:09:14 -0000 Author: nwhitehorn Date: Mon Oct 27 00:09:14 2008 New Revision: 184314 URL: http://svn.freebsd.org/changeset/base/184314 Log: Bring Kauai ATA driver in line with Macio ATA by reading the PIO config reg to set the initial PIO mode instead of assuming PIO4. There are still a few nagging issues: - There are some problems with 64 K DMA transfers waiting on lower level changes. - ATAPI DMA is broken on Marcel's Mac Mini because we need an ATA SELECT hook propagated up to individual drivers for hardware without timing registers for each ATA channel. Modified: head/sys/powerpc/powermac/ata_kauai.c Modified: head/sys/powerpc/powermac/ata_kauai.c ============================================================================== --- head/sys/powerpc/powermac/ata_kauai.c Sun Oct 26 23:11:25 2008 (r184313) +++ head/sys/powerpc/powermac/ata_kauai.c Mon Oct 27 00:09:14 2008 (r184314) @@ -292,16 +292,12 @@ ata_kauai_attach(device_t dev) #endif /* Set up initial mode */ - if (sc->shasta) - sc->pioconf[0] = sc->pioconf[1] = pio_timing_shasta[4]; - else - sc->pioconf[0] = sc->pioconf[1] = pio_timing_kauai[4]; + sc->pioconf[0] = sc->pioconf[1] = + bus_read_4(sc->sc_memr, PIO_CONFIG_REG) & 0x0f000fff; sc->udmaconf[0] = sc->udmaconf[1] = 0; sc->wdmaconf[0] = sc->wdmaconf[1] = 0; - bus_write_4(sc->sc_memr, PIO_CONFIG_REG, sc->pioconf[0]); - /* Magic FCR value from Apple */ bus_write_4(sc->sc_memr, 0, 0x00000007); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 00:23:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B27C41065675; Mon, 27 Oct 2008 00:23:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A02D58FC08; Mon, 27 Oct 2008 00:23:09 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R0N9kh009468; Mon, 27 Oct 2008 00:23:09 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R0N9sc009467; Mon, 27 Oct 2008 00:23:09 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <200810270023.m9R0N9sc009467@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 27 Oct 2008 00:23:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184315 - in releng/6.4/sys: . dev/mii X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 00:23:09 -0000 Author: yongari Date: Mon Oct 27 00:23:09 2008 New Revision: 184315 URL: http://svn.freebsd.org/changeset/base/184315 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 (kensmith) Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/dev/mii/e1000phy.c Modified: releng/6.4/sys/dev/mii/e1000phy.c ============================================================================== --- releng/6.4/sys/dev/mii/e1000phy.c Mon Oct 27 00:09:14 2008 (r184314) +++ releng/6.4/sys/dev/mii/e1000phy.c Mon Oct 27 00:23:09 2008 (r184315) @@ -153,6 +153,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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 00:26:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F6791065699; Mon, 27 Oct 2008 00:26:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4DF628FC12; Mon, 27 Oct 2008 00:26:07 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R0Q7dS009720; Mon, 27 Oct 2008 00:26:07 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R0Q75c009719; Mon, 27 Oct 2008 00:26:07 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200810270026.m9R0Q75c009719@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 27 Oct 2008 00:26:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184316 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 00:26:07 -0000 Author: marcel Date: Mon Oct 27 00:26:07 2008 New Revision: 184316 URL: http://svn.freebsd.org/changeset/base/184316 Log: Declare btext and etext. Needed by sys/kern/subr_prof.c for for kernel profiling. Modified: head/sys/powerpc/include/cpu.h Modified: head/sys/powerpc/include/cpu.h ============================================================================== --- head/sys/powerpc/include/cpu.h Mon Oct 27 00:23:09 2008 (r184315) +++ head/sys/powerpc/include/cpu.h Mon Oct 27 00:26:07 2008 (r184316) @@ -69,6 +69,9 @@ get_cyclecount(void) #define cpu_getstack(td) ((td)->td_frame->fixreg[1]) #define cpu_spinwait() /* nothing */ +extern char btext[]; +extern char etext[]; + void cpu_halt(void); void cpu_reset(void); void fork_trampoline(void); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 01:05:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 791FF1065675; Mon, 27 Oct 2008 01:05:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 677B68FC0A; Mon, 27 Oct 2008 01:05:10 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R15AQB013691; Mon, 27 Oct 2008 01:05:10 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R15AvS013690; Mon, 27 Oct 2008 01:05:10 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200810270105.m9R15AvS013690@svn.freebsd.org> From: Andrew Thompson Date: Mon, 27 Oct 2008 01:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184317 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 01:05:10 -0000 Author: thompsa Date: Mon Oct 27 01:05:09 2008 New Revision: 184317 URL: http://svn.freebsd.org/changeset/base/184317 Log: Show which rc script is running since the default ^T just shows 'sh' as the process. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Mon Oct 27 00:26:07 2008 (r184316) +++ head/etc/rc.subr Mon Oct 27 01:05:09 2008 (r184317) @@ -913,6 +913,7 @@ run_rc_script() else ( trap "echo Script $_file interrupted; kill -QUIT $$" 3 trap "echo Script $_file interrupted; exit 1" 2 + trap "echo Script $_file running" 29 set $_arg; . $_file ) fi fi From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 01:51:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96A55106567F; Mon, 27 Oct 2008 01:51:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84C538FC13; Mon, 27 Oct 2008 01:51:30 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R1pUhY017216; Mon, 27 Oct 2008 01:51:30 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R1pUgW017215; Mon, 27 Oct 2008 01:51:30 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200810270151.m9R1pUgW017215@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 27 Oct 2008 01:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184318 - head/sys/powerpc/booke X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 01:51:30 -0000 Author: marcel Date: Mon Oct 27 01:51:30 2008 New Revision: 184318 URL: http://svn.freebsd.org/changeset/base/184318 Log: Remove unused declarations (interrupt_vector_{base|top}). Modified: head/sys/powerpc/booke/trap.c Modified: head/sys/powerpc/booke/trap.c ============================================================================== --- head/sys/powerpc/booke/trap.c Mon Oct 27 01:05:09 2008 (r184317) +++ head/sys/powerpc/booke/trap.c Mon Oct 27 01:51:30 2008 (r184318) @@ -103,9 +103,6 @@ int badaddr_read(void *, size_t, int *); extern char *syscallnames[]; -extern char interrupt_vector_base[]; -extern char interrupt_vector_top[]; - struct powerpc_exception { u_int vector; char *name; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 02:36:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11DE21065673; Mon, 27 Oct 2008 02:36:04 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F3D108FC08; Mon, 27 Oct 2008 02:36:03 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R2a3q7019154; Mon, 27 Oct 2008 02:36:03 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R2a3cS019151; Mon, 27 Oct 2008 02:36:03 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200810270236.m9R2a3cS019151@svn.freebsd.org> From: Marcel Moolenaar Date: Mon, 27 Oct 2008 02:36:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184319 - in head/sys/powerpc: aim booke include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 02:36:04 -0000 Author: marcel Date: Mon Oct 27 02:36:03 2008 New Revision: 184319 URL: http://svn.freebsd.org/changeset/base/184319 Log: Add support for kernel profiling for both AIM and BookE. Obtained from: Juniper Networks, Inc (BookE support). Modified: head/sys/powerpc/aim/locore.S head/sys/powerpc/booke/locore.S head/sys/powerpc/include/profile.h Modified: head/sys/powerpc/aim/locore.S ============================================================================== --- head/sys/powerpc/aim/locore.S Mon Oct 27 01:51:30 2008 (r184318) +++ head/sys/powerpc/aim/locore.S Mon Oct 27 02:36:03 2008 (r184319) @@ -111,11 +111,14 @@ openfirmware_entry: srsave: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 + .text + .globl btext +btext: + /* * This symbol is here for the benefit of kvm_mkdb, and is supposed to * mark the start of kernel text. */ - .text .globl kernel_text kernel_text: Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Mon Oct 27 01:51:30 2008 (r184318) +++ head/sys/powerpc/booke/locore.S Mon Oct 27 02:36:03 2008 (r184319) @@ -41,11 +41,14 @@ #define TMPSTACKSZ 16384 + .text + .globl btext +btext: + /* * This symbol is here for the benefit of kvm_mkdb, and is supposed to * mark the start of kernel text. */ - .text .globl kernel_text kernel_text: Modified: head/sys/powerpc/include/profile.h ============================================================================== --- head/sys/powerpc/include/profile.h Mon Oct 27 01:51:30 2008 (r184318) +++ head/sys/powerpc/include/profile.h Mon Oct 27 02:36:03 2008 (r184319) @@ -81,61 +81,87 @@ typedef u_int fptrdiff_t; #define _PLT #endif -#define MCOUNT \ -__asm(" .globl _mcount \n" \ -" .type _mcount,@function \n" \ -"_mcount: \n" \ -" stwu %r1,-64(%r1) /* alloca for reg save space */ \n" \ -" stw %r3,16(%r1) /* save parameter registers, */ \n" \ -" stw %r4,20(%r1) /* r3-10 */ \n" \ -" stw %r5,24(%r1) \n" \ -" stw %r6,28(%r1) \n" \ -" stw %r7,32(%r1) \n" \ -" stw %r8,36(%r1) \n" \ -" stw %r9,40(%r1) \n" \ -" stw %r10,44(%r1) \n" \ -" \n" \ -" mflr %r4 /* link register is 'selfpc' */ \n" \ -" stw %r4,48(%r1) /* save since bl will scrub */ \n" \ -" lwz %r3,68(%r1) /* get 'frompc' from LR-save */ \n" \ -" bl __mcount" _PLT " /* __mcount(frompc, selfpc)*/ \n" \ -" lwz %r3,68(%r1) \n" \ -" mtlr %r3 /* restore caller's lr */ \n" \ -" lwz %r4,48(%r1) \n" \ -" mtctr %r4 /* set up ctr for call back */ \n" \ -" /* note that blr is not used!*/ \n" \ -" lwz %r3,16(%r1) /* restore r3-10 parameters */ \n" \ -" lwz %r4,20(%r1) \n" \ -" lwz %r5,24(%r1) \n" \ -" lwz %r6,28(%r1) \n" \ -" lwz %r7,32(%r1) \n" \ -" lwz %r8,36(%r1) \n" \ -" lwz %r9,40(%r1) \n" \ -" lwz %r10,44(%r1) \n" \ -" addi %r1,%r1,64 /* blow away alloca save area */ \n" \ -" bctr /* return with indirect call */ \n" \ -"_mcount_end: \n" \ -" .size _mcount,_mcount_end-_mcount"); - +#define MCOUNT \ +__asm( " .globl _mcount \n" \ + " .type _mcount,@function \n" \ + " .align 4 \n" \ + "_mcount: \n" \ + " stwu %r1,-64(%r1) \n" \ + " stw %r3,16(%r1) \n" \ + " stw %r4,20(%r1) \n" \ + " stw %r5,24(%r1) \n" \ + " stw %r6,28(%r1) \n" \ + " stw %r7,32(%r1) \n" \ + " stw %r8,36(%r1) \n" \ + " stw %r9,40(%r1) \n" \ + " stw %r10,44(%r1) \n" \ + " mflr %r4 \n" \ + " stw %r4,48(%r1) \n" \ + " lwz %r3,68(%r1) \n" \ + " bl __mcount" _PLT " \n" \ + " lwz %r3,68(%r1) \n" \ + " mtlr %r3 \n" \ + " lwz %r4,48(%r1) \n" \ + " mtctr %r4 \n" \ + " lwz %r3,16(%r1) \n" \ + " lwz %r4,20(%r1) \n" \ + " lwz %r5,24(%r1) \n" \ + " lwz %r6,28(%r1) \n" \ + " lwz %r7,32(%r1) \n" \ + " lwz %r8,36(%r1) \n" \ + " lwz %r9,40(%r1) \n" \ + " lwz %r10,44(%r1) \n" \ + " addi %r1,%r1,64 \n" \ + " bctr \n" \ + "_mcount_end: \n" \ + " .size _mcount,_mcount_end-_mcount"); #ifdef _KERNEL -#define MCOUNT_ENTER(s) s = intr_disable(); -#define MCOUNT_EXIT(s) intr_restore(s); -#define MCOUNT_DECL(s) register_t s - -void bintr(void); -void btrap(void); -void eintr(void); -void user(void); - -#define MCOUNT_FROMPC_USER(pc) \ - ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? (uintfptr_t)user : pc) - -#define MCOUNT_FROMPC_INTR(pc) \ - ((pc >= (uintfptr_t)btrap && pc < (uintfptr_t)eintr) ? \ - ((pc >= (uintfptr_t)bintr) ? (uintfptr_t)bintr : \ - (uintfptr_t)btrap) : ~0U) +#define MCOUNT_ENTER(s) s = intr_disable() +#define MCOUNT_EXIT(s) intr_restore(s) +#define MCOUNT_DECL(s) register_t s; + +#ifndef COMPILING_LINT +#ifdef AIM +#include +#define __PROFILE_VECTOR_BASE EXC_RST +#define __PROFILE_VECTOR_TOP (EXC_LAST + 0x100) +#endif /* AIM */ +#ifdef E500 +extern char interrupt_vector_base[]; +extern char interrupt_vector_top[]; +#define __PROFILE_VECTOR_BASE (uintfptr_t)interrupt_vector_base +#define __PROFILE_VECTOR_TOP (uintfptr_t)interrupt_vector_top +#endif /* E500 */ +#endif /* !COMPILING_LINT */ + +#ifndef __PROFILE_VECTOR_BASE +#define __PROFILE_VECTOR_BASE 0 +#endif +#ifndef __PROFILE_VECTOR_TOP +#define __PROFILE_VECTOR_TOP 1 +#endif + +static __inline void +powerpc_profile_interrupt(void) +{ +} + +static __inline void +powerpc_profile_userspace(void) +{ +} + +#define MCOUNT_FROMPC_USER(pc) \ + ((pc < (uintfptr_t)VM_MAXUSER_ADDRESS) ? \ + (uintfptr_t)powerpc_profile_userspace : pc) + +#define MCOUNT_FROMPC_INTR(pc) \ + ((pc >= __PROFILE_VECTOR_BASE && \ + pc < __PROFILE_VECTOR_TOP) ? \ + (uintfptr_t)powerpc_profile_interrupt : ~0U) +void __mcount(uintfptr_t frompc, uintfptr_t selfpc); #else /* !_KERNEL */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 05:28:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96697106566B; Mon, 27 Oct 2008 05:28:08 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 84A9D8FC0A; Mon, 27 Oct 2008 05:28:08 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R5S8l6026613; Mon, 27 Oct 2008 05:28:08 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R5S8RR026610; Mon, 27 Oct 2008 05:28:08 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810270528.m9R5S8RR026610@svn.freebsd.org> From: Ed Schouten Date: Mon, 27 Oct 2008 05:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184322 - in releng/6.4/lib: libc libc/stdlib libc/sys libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 05:28:08 -0000 Author: ed Date: Mon Oct 27 05:28:08 2008 New Revision: 184322 URL: http://svn.freebsd.org/changeset/base/184322 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: releng/6.4/lib/libc/ (props changed) releng/6.4/lib/libc/stdlib/grantpt.3 releng/6.4/lib/libc/stdlib/grantpt.c releng/6.4/lib/libc/sys/ (props changed) releng/6.4/lib/libutil/ (props changed) releng/6.4/lib/libutil/pty.c Modified: releng/6.4/lib/libc/stdlib/grantpt.3 ============================================================================== --- releng/6.4/lib/libc/stdlib/grantpt.3 Mon Oct 27 05:23:40 2008 (r184321) +++ releng/6.4/lib/libc/stdlib/grantpt.3 Mon Oct 27 05:28:08 2008 (r184322) @@ -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: releng/6.4/lib/libc/stdlib/grantpt.c ============================================================================== --- releng/6.4/lib/libc/stdlib/grantpt.c Mon Oct 27 05:23:40 2008 (r184321) +++ releng/6.4/lib/libc/stdlib/grantpt.c Mon Oct 27 05:28:08 2008 (r184322) @@ -237,14 +237,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: releng/6.4/lib/libutil/pty.c ============================================================================== --- releng/6.4/lib/libutil/pty.c Mon Oct 27 05:23:40 2008 (r184321) +++ releng/6.4/lib/libutil/pty.c Mon Oct 27 05:28:08 2008 (r184322) @@ -60,37 +60,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; @@ -103,6 +92,9 @@ openpty(int *amaster, int *aslave, char ioctl(slave, TIOCSWINSZ, (char *)winp); return (0); + +bad: close(master); + return (-1); } int From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 06:25:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B5DAB106567C; Mon, 27 Oct 2008 06:25:02 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A4C308FC1C; Mon, 27 Oct 2008 06:25:02 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R6P2i9029702; Mon, 27 Oct 2008 06:25:02 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R6P2a8029701; Mon, 27 Oct 2008 06:25:02 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810270625.m9R6P2a8029701@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 27 Oct 2008 06:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184323 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 06:25:02 -0000 Author: sobomax Date: Mon Oct 27 06:25:02 2008 New Revision: 184323 URL: http://svn.freebsd.org/changeset/base/184323 Log: Default HZ value (1,000) on i386/amd64 is not very virtual machine friendly. Due to the nature of the beast it causes lot of unproductive overhead. This is especially bad when running SMP kernel on VMWare with several virtual processors - idle FreeBSD guest with SMP kernel takes 150% host CPU time on my dual-core MacBook Pro when I am enabling two virtual CPUs, making even host not very usable. Detect when we are running in the sandbox and reduce HZ to 10 (can be adjusted via VM_HZ in the kernel config) in such cases. This brings host CPU usage of idle FreeBSD/SMP on two virtual processors down to 10%. Detect most popular VM platforms out there - VMWare, Parallels, VirtualBox and VirtualPC. MFC after: 2 weeks Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Mon Oct 27 05:28:08 2008 (r184322) +++ head/sys/kern/subr_param.c Mon Oct 27 06:25:02 2008 (r184323) @@ -57,6 +57,13 @@ __FBSDID("$FreeBSD$"); # else # define HZ 100 # endif +# ifndef HZ_VM +# define HZ_VM 10 +# endif +#else +# ifndef HZ_VM +# define HZ_VM HZ +# endif #endif #define NPROC (20 + 16 * maxusers) #ifndef NBUF @@ -111,6 +118,30 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, */ struct buf *swbuf; +char *vm_pnames[] = { + "VMware Virtual Platform", /* VMWare VM */ + "Virtual Machine", /* Microsoft VirtualPC */ + "VirtualBox", /* Sun xVM VirtualBox */ + "Parallels Virtual Platform", /* Parallels VM */ + NULL +}; + +static int +detect_virtual(void) +{ + char *sysenv; + int i; + + sysenv = getenv("smbios.system.product"); + if (sysenv != NULL) { + for (i = 0; vm_pnames[i] != NULL; i++) { + if (strcmp(sysenv, vm_pnames[i]) == 0) + return 1; + } + } + return 0; +} + /* * Boot time overrides that are not scaled against main memory */ @@ -118,8 +149,15 @@ void init_param1(void) { - hz = HZ; + hz = -1; TUNABLE_INT_FETCH("kern.hz", &hz); + if (hz == -1) { + if (detect_virtual()) { + hz = HZ_VM; + } else { + hz = HZ; + } + } tick = 1000000 / hz; #ifdef VM_SWZONE_SIZE_MAX From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 06:34:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 866E21065670; Mon, 27 Oct 2008 06:34:41 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7519C8FC1D; Mon, 27 Oct 2008 06:34:41 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R6YfiX030256; Mon, 27 Oct 2008 06:34:41 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R6YfLG030255; Mon, 27 Oct 2008 06:34:41 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810270634.m9R6YfLG030255@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 27 Oct 2008 06:34:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184324 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 06:34:41 -0000 Author: sobomax Date: Mon Oct 27 06:34:41 2008 New Revision: 184324 URL: http://svn.freebsd.org/changeset/base/184324 Log: vm_pnames has no reason to be global. MFC after: 2 weeks Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Mon Oct 27 06:25:02 2008 (r184323) +++ head/sys/kern/subr_param.c Mon Oct 27 06:34:41 2008 (r184324) @@ -118,7 +118,7 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, */ struct buf *swbuf; -char *vm_pnames[] = { +static char *vm_pnames[] = { "VMware Virtual Platform", /* VMWare VM */ "Virtual Machine", /* Microsoft VirtualPC */ "VirtualBox", /* Sun xVM VirtualBox */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 07:01:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 710611065671; Mon, 27 Oct 2008 07:01:15 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60A3C8FC18; Mon, 27 Oct 2008 07:01:15 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R71FVa030883; Mon, 27 Oct 2008 07:01:15 GMT (envelope-from dds@svn.freebsd.org) Received: (from dds@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R71F0u030881; Mon, 27 Oct 2008 07:01:15 GMT (envelope-from dds@svn.freebsd.org) Message-Id: <200810270701.m9R71F0u030881@svn.freebsd.org> From: Diomidis Spinellis Date: Mon, 27 Oct 2008 07:01:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184325 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 07:01:15 -0000 Author: dds Date: Mon Oct 27 07:01:14 2008 New Revision: 184325 URL: http://svn.freebsd.org/changeset/base/184325 Log: Add Konrad Jankowski (versus@) as a new src committer. Konrad will start his work with the i18n improvements he performed during GSoC 2008. I will be his mentor. Approved by: core Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Mon Oct 27 06:34:41 2008 (r184324) +++ svnadmin/conf/access Mon Oct 27 07:01:14 2008 (r184325) @@ -235,6 +235,7 @@ twinterg ume ups vanhu +versus weongyo wes wes@opensail.org wilko freebsd-commits@freebie.xs4all.nl Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Mon Oct 27 06:34:41 2008 (r184324) +++ svnadmin/conf/mentors Mon Oct 27 07:01:14 2008 (r184325) @@ -18,4 +18,5 @@ sbruno scottl sson jb stas kib trasz rwatson +versus dds zec julian Co-mentor: silby From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 08:09:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A25671065679; Mon, 27 Oct 2008 08:09:05 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91D828FC1C; Mon, 27 Oct 2008 08:09:05 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R8956E032152; Mon, 27 Oct 2008 08:09:05 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R895IY032151; Mon, 27 Oct 2008 08:09:05 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810270809.m9R895IY032151@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 27 Oct 2008 08:09:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184326 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 08:09:05 -0000 Author: sobomax Date: Mon Oct 27 08:09:05 2008 New Revision: 184326 URL: http://svn.freebsd.org/changeset/base/184326 Log: vm_pnames should be "const char *const[]". Submitted by: Christoph Mallon Modified: head/sys/kern/subr_param.c Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Mon Oct 27 07:01:14 2008 (r184325) +++ head/sys/kern/subr_param.c Mon Oct 27 08:09:05 2008 (r184326) @@ -118,7 +118,7 @@ SYSCTL_ULONG(_kern, OID_AUTO, sgrowsiz, */ struct buf *swbuf; -static char *vm_pnames[] = { +static const char *const vm_pnames[] = { "VMware Virtual Platform", /* VMWare VM */ "Virtual Machine", /* Microsoft VirtualPC */ "VirtualBox", /* Sun xVM VirtualBox */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 08:40:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C8AB106566B; Mon, 27 Oct 2008 08:40:14 +0000 (UTC) (envelope-from kato@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0B98A8FC16; Mon, 27 Oct 2008 08:40:14 +0000 (UTC) (envelope-from kato@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R8eDxx032820; Mon, 27 Oct 2008 08:40:13 GMT (envelope-from kato@svn.freebsd.org) Received: (from kato@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R8eDlX032818; Mon, 27 Oct 2008 08:40:13 GMT (envelope-from kato@svn.freebsd.org) Message-Id: <200810270840.m9R8eDlX032818@svn.freebsd.org> From: KATO Takenori Date: Mon, 27 Oct 2008 08:40:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184327 - head/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 08:40:14 -0000 Author: kato Date: Mon Oct 27 08:40:13 2008 New Revision: 184327 URL: http://svn.freebsd.org/changeset/base/184327 Log: Improved IDE HDD geometry adjustment. Previous code didn't work with certain ATA-6 drives including CF cards. The IDE geometry of the PC98 is calculated from the drive capacity. In addition to the algorithm in NEC BIOS, a variety of algorithms are provided by 3'rd party boards and BIOS hacks. This change has implemented the three algorithms: IDE BIOS compatible mode, SCSI BIOS compatible mode and same way as the previous version. The tunable machdep.ad_geom_method selects the algorithm. I have been using this change for a year with CF cards. Reminded by: nyan Modified: head/sys/pc98/pc98/pc98_machdep.c head/sys/pc98/pc98/pc98_machdep.h Modified: head/sys/pc98/pc98/pc98_machdep.c ============================================================================== --- head/sys/pc98/pc98/pc98_machdep.c Mon Oct 27 08:09:05 2008 (r184326) +++ head/sys/pc98/pc98/pc98_machdep.c Mon Oct 27 08:40:13 2008 (r184327) @@ -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: head/sys/pc98/pc98/pc98_machdep.h ============================================================================== --- head/sys/pc98/pc98/pc98_machdep.h Mon Oct 27 08:09:05 2008 (r184326) +++ head/sys/pc98/pc98/pc98_machdep.h Mon Oct 27 08:40:13 2008 (r184327) @@ -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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 09:26:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 967A0106567E; Mon, 27 Oct 2008 09:26:24 +0000 (UTC) (envelope-from sos@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8625D8FC12; Mon, 27 Oct 2008 09:26:24 +0000 (UTC) (envelope-from sos@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9R9QONJ033764; Mon, 27 Oct 2008 09:26:24 GMT (envelope-from sos@svn.freebsd.org) Received: (from sos@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9R9QOZQ033763; Mon, 27 Oct 2008 09:26:24 GMT (envelope-from sos@svn.freebsd.org) Message-Id: <200810270926.m9R9QOZQ033763@svn.freebsd.org> From: Søren Schmidt Date: Mon, 27 Oct 2008 09:26:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184328 - head/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 09:26:24 -0000 Author: sos Date: Mon Oct 27 09:26:24 2008 New Revision: 184328 URL: http://svn.freebsd.org/changeset/base/184328 Log: Only call dma.unload() if initialized. Reported by: Stanislav Sedov Modified: head/sys/dev/ata/ata-queue.c Modified: head/sys/dev/ata/ata-queue.c ============================================================================== --- head/sys/dev/ata/ata-queue.c Mon Oct 27 08:40:13 2008 (r184327) +++ head/sys/dev/ata/ata-queue.c Mon Oct 27 09:26:24 2008 (r184328) @@ -503,7 +503,8 @@ ata_timeout(struct ata_request *request) request->flags |= ATA_R_TIMEOUT; mtx_unlock(&ch->state_mtx); ATA_LOCKING(ch->dev, ATA_LF_UNLOCK); - ch->dma.unload(request); + if (ch->dma.unload) + ch->dma.unload(request); ata_finish(request); } else { From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 10:32:07 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AC5DD1065675; Mon, 27 Oct 2008 10:32:07 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7D48D8FC1C; Mon, 27 Oct 2008 10:32:07 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 0ADBA186D3D; Mon, 27 Oct 2008 06:31:39 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Mon, 27 Oct 2008 06:31:40 -0400 X-Sasl-enc: YgrdceUgiHQ1VlkqsGPWfTHl/OGknA0O7j6O6hIIclVC 1225103486 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id E5D5F1CA2D; Mon, 27 Oct 2008 06:31:25 -0400 (EDT) Message-ID: <4905987C.5080203@FreeBSD.org> Date: Mon, 27 Oct 2008 10:31:24 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Warner Losh References: <200810250618.m9P6ICWl023370@svn.freebsd.org> <4902DE9E.2090004@FreeBSD.org> <20081025.202057.74716595.imp@bsdimp.com> In-Reply-To: <20081025.202057.74716595.imp@bsdimp.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, marcel@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 10:32:07 -0000 Warner Losh wrote: >> Thanks for bringing this code in. Hopefully it shouldn't be too hard to >> add MTD-like support on top, and/or port it to other parts. >> > > What, exactly, do you mean here? The partitioning stuff, the flash > erase stuff, moving all things through the /dev/mt* or something else? > Well, everything... it's going to take a while to sort through all this without a commercial entity driving things (got bills to pay after all). I guess we need to deal with stuff like block erase at the BIO layer. I know that in previous discussions it has been by suggested by others that GEOM isn't the right place for flash partitioning to be handled, I'm inclined to disagree, as it takes care of a lot of the rigmarole of creating device nodes for each slice, etc, but whoever gets it done, wins the argument, really. From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 11:45:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F7E7106567E; Mon, 27 Oct 2008 11:45:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1D0E08FC13; Mon, 27 Oct 2008 11:45:32 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RBjVN2038318; Mon, 27 Oct 2008 11:45:32 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RBjVAY038315; Mon, 27 Oct 2008 11:45:31 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810271145.m9RBjVAY038315@svn.freebsd.org> From: Ed Schouten Date: Mon, 27 Oct 2008 11:45:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184329 - in head/sys: dev/cfe dev/ofw dev/xen/console sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 11:45:32 -0000 Author: ed Date: Mon Oct 27 11:45:31 2008 New Revision: 184329 URL: http://svn.freebsd.org/changeset/base/184329 Log: Remove unused consdev structure fields. The cn_unit and cn_tp fields don't seem to be used anywhere. Some drivers set them, while others don't. Just remove them, in an attempt to make our consdev code a little easier to understand. Modified: head/sys/dev/cfe/cfe_console.c head/sys/dev/ofw/ofw_console.c head/sys/dev/xen/console/console.c head/sys/sys/cons.h Modified: head/sys/dev/cfe/cfe_console.c ============================================================================== --- head/sys/dev/cfe/cfe_console.c Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/dev/cfe/cfe_console.c Mon Oct 27 11:45:31 2008 (r184329) @@ -173,8 +173,7 @@ static void cfe_cninit(struct consdev *cp) { - sprintf(cp->cn_name, "cfecons"); - cp->cn_tp = cfe_tp; + strcpy(cp->cn_name, "cfecons"); } static void Modified: head/sys/dev/ofw/ofw_console.c ============================================================================== --- head/sys/dev/ofw/ofw_console.c Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/dev/ofw/ofw_console.c Mon Oct 27 11:45:31 2008 (r184329) @@ -60,7 +60,6 @@ static struct ttydevsw ofw_ttydevsw = { .tsw_outwakeup = ofwtty_outwakeup, }; -static struct tty *ofw_tp = NULL; static int polltime; static struct callout_handle ofw_timeouthandle = CALLOUT_HANDLE_INITIALIZER(&ofw_timeouthandle); @@ -186,8 +185,7 @@ ofw_cninit(struct consdev *cp) { /* XXX: This is the alias, but that should be good enough */ - sprintf(cp->cn_name, "ofwcons"); - cp->cn_tp = ofw_tp; + strcpy(cp->cn_name, "ofwcons"); } static void Modified: head/sys/dev/xen/console/console.c ============================================================================== --- head/sys/dev/xen/console/console.c Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/dev/xen/console/console.c Mon Oct 27 11:45:31 2008 (r184329) @@ -107,7 +107,6 @@ static void xccnprobe(struct consdev *cp) { cp->cn_pri = CN_REMOTE; - cp->cn_tp = xccons; sprintf(cp->cn_name, "%s0", driver_name); } Modified: head/sys/sys/cons.h ============================================================================== --- head/sys/sys/cons.h Mon Oct 27 09:26:24 2008 (r184328) +++ head/sys/sys/cons.h Mon Oct 27 11:45:31 2008 (r184329) @@ -61,10 +61,8 @@ struct consdev { /* kernel "return char if available" interface */ cn_putc_t *cn_putc; /* kernel putchar interface */ - struct tty *cn_tp; /* tty structure for console device */ short cn_pri; /* pecking order; the higher the better */ void *cn_arg; /* drivers method argument */ - int cn_unit; /* some drivers prefer this */ int cn_flags; /* capabilities of this console */ char cn_name[SPECNAMELEN + 1]; /* console (device) name */ }; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 11:46:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D4021065685; Mon, 27 Oct 2008 11:46:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 392FE8FC08; Mon, 27 Oct 2008 11:46:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RBkKNI038370; Mon, 27 Oct 2008 11:46:20 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RBkKZo038368; Mon, 27 Oct 2008 11:46:20 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810271146.m9RBkKZo038368@svn.freebsd.org> From: Robert Watson Date: Mon, 27 Oct 2008 11:46:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184330 - head/sys/security/mac_bsdextended X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 11:46:20 -0000 Author: rwatson Date: Mon Oct 27 11:46:19 2008 New Revision: 184330 URL: http://svn.freebsd.org/changeset/base/184330 Log: Copy mac_bsdextended.c to two object-specific files as a prototype for how modularize MAC policy layout. Obtained from: TrustedBSD Project Added: head/sys/security/mac_bsdextended/ugidfw_system.c (props changed) - copied unchanged from r184328, head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_bsdextended/ugidfw_vnode.c (props changed) - copied unchanged from r184328, head/sys/security/mac_bsdextended/mac_bsdextended.c Copied: head/sys/security/mac_bsdextended/ugidfw_system.c (from r184328, head/sys/security/mac_bsdextended/mac_bsdextended.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/security/mac_bsdextended/ugidfw_system.c Mon Oct 27 11:46:19 2008 (r184330, copy of r184328, head/sys/security/mac_bsdextended/mac_bsdextended.c) @@ -0,0 +1,768 @@ +/*- + * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 2001-2005 Networks Associates Technology, Inc. + * Copyright (c) 2005 Tom Rhodes + * Copyright (c) 2006 SPARTA, Inc. + * All rights reserved. + * + * This software was developed by Robert Watson for the TrustedBSD Project. + * It was later enhanced by Tom Rhodes for the TrustedBSD Project. + * + * This software was developed for the FreeBSD Project in part by Network + * Associates Laboratories, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), + * as part of the DARPA CHATS research program. + * + * This software was enhanced by SPARTA ISSO under SPAWAR contract + * N66001-04-C-6019 ("SEFOS"). + * + * 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 AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Developed by the TrustedBSD Project. + * + * "BSD Extended" MAC policy, allowing the administrator to impose mandatory + * firewall-like rules regarding users and file system objects. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static struct mtx ugidfw_mtx; + +SYSCTL_DECL(_security_mac); + +SYSCTL_NODE(_security_mac, OID_AUTO, bsdextended, CTLFLAG_RW, 0, + "TrustedBSD extended BSD MAC policy controls"); + +static int ugidfw_enabled = 1; +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, enabled, CTLFLAG_RW, + &ugidfw_enabled, 0, "Enforce extended BSD policy"); +TUNABLE_INT("security.mac.bsdextended.enabled", &ugidfw_enabled); + +MALLOC_DEFINE(M_MACBSDEXTENDED, "mac_bsdextended", "BSD Extended MAC rule"); + +#define MAC_BSDEXTENDED_MAXRULES 250 +static struct mac_bsdextended_rule *rules[MAC_BSDEXTENDED_MAXRULES]; +static int rule_count = 0; +static int rule_slots = 0; +static int rule_version = MB_VERSION; + +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, + &rule_count, 0, "Number of defined rules\n"); +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, + &rule_slots, 0, "Number of used rule slots\n"); +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, + &rule_version, 0, "Version number for API\n"); + +/* + * This is just used for logging purposes, eventually we would like to log + * much more then failed requests. + */ +static int ugidfw_logging; +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, logging, CTLFLAG_RW, + &ugidfw_logging, 0, "Log failed authorization requests"); + +/* + * This tunable is here for compatibility. It will allow the user to switch + * between the new mode (first rule matches) and the old functionality (all + * rules match). + */ +static int ugidfw_firstmatch_enabled; +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, firstmatch_enabled, + CTLFLAG_RW, &ugidfw_firstmatch_enabled, 1, + "Disable/enable match first rule functionality"); + +static int +ugidfw_rule_valid(struct mac_bsdextended_rule *rule) +{ + + if ((rule->mbr_subject.mbs_flags | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_subject.mbs_neg | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_object.mbo_flags | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) && + (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) + return (EINVAL); + if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) + return (EINVAL); + return (0); +} + +static int +sysctl_rule(SYSCTL_HANDLER_ARGS) +{ + struct mac_bsdextended_rule temprule, *ruleptr; + u_int namelen; + int error, index, *name; + + error = 0; + name = (int *)arg1; + namelen = arg2; + if (namelen != 1) + return (EINVAL); + index = name[0]; + if (index >= MAC_BSDEXTENDED_MAXRULES) + return (ENOENT); + + ruleptr = NULL; + if (req->newptr && req->newlen != 0) { + error = SYSCTL_IN(req, &temprule, sizeof(temprule)); + if (error) + return (error); + ruleptr = malloc(sizeof(*ruleptr), M_MACBSDEXTENDED, + M_WAITOK | M_ZERO); + } + + mtx_lock(&ugidfw_mtx); + if (req->oldptr) { + if (index < 0 || index > rule_slots + 1) { + error = ENOENT; + goto out; + } + if (rules[index] == NULL) { + error = ENOENT; + goto out; + } + temprule = *rules[index]; + } + if (req->newptr && req->newlen == 0) { + KASSERT(ruleptr == NULL, ("sysctl_rule: ruleptr != NULL")); + ruleptr = rules[index]; + if (ruleptr == NULL) { + error = ENOENT; + goto out; + } + rule_count--; + rules[index] = NULL; + } else if (req->newptr) { + error = ugidfw_rule_valid(&temprule); + if (error) + goto out; + if (rules[index] == NULL) { + *ruleptr = temprule; + rules[index] = ruleptr; + ruleptr = NULL; + if (index + 1 > rule_slots) + rule_slots = index + 1; + rule_count++; + } else + *rules[index] = temprule; + } +out: + mtx_unlock(&ugidfw_mtx); + if (ruleptr != NULL) + free(ruleptr, M_MACBSDEXTENDED); + if (req->oldptr && error == 0) + error = SYSCTL_OUT(req, &temprule, sizeof(temprule)); + return (error); +} + +SYSCTL_NODE(_security_mac_bsdextended, OID_AUTO, rules, CTLFLAG_RW, + sysctl_rule, "BSD extended MAC rules"); + +static void +ugidfw_init(struct mac_policy_conf *mpc) +{ + + mtx_init(&ugidfw_mtx, "mac_bsdextended lock", NULL, MTX_DEF); +} + +static void +ugidfw_destroy(struct mac_policy_conf *mpc) +{ + + mtx_destroy(&ugidfw_mtx); +} + +static int +ugidfw_rulecheck(struct mac_bsdextended_rule *rule, + struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode) +{ + int mac_granted, match, priv_granted; + int i; + + /* + * Is there a subject match? + */ + mtx_assert(&ugidfw_mtx, MA_OWNED); + if (rule->mbr_subject.mbs_flags & MBS_UID_DEFINED) { + match = ((cred->cr_uid <= rule->mbr_subject.mbs_uid_max && + cred->cr_uid >= rule->mbr_subject.mbs_uid_min) || + (cred->cr_ruid <= rule->mbr_subject.mbs_uid_max && + cred->cr_ruid >= rule->mbr_subject.mbs_uid_min) || + (cred->cr_svuid <= rule->mbr_subject.mbs_uid_max && + cred->cr_svuid >= rule->mbr_subject.mbs_uid_min)); + if (rule->mbr_subject.mbs_neg & MBS_UID_DEFINED) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_subject.mbs_flags & MBS_GID_DEFINED) { + match = ((cred->cr_rgid <= rule->mbr_subject.mbs_gid_max && + cred->cr_rgid >= rule->mbr_subject.mbs_gid_min) || + (cred->cr_svgid <= rule->mbr_subject.mbs_gid_max && + cred->cr_svgid >= rule->mbr_subject.mbs_gid_min)); + if (!match) { + for (i = 0; i < cred->cr_ngroups; i++) { + if (cred->cr_groups[i] + <= rule->mbr_subject.mbs_gid_max && + cred->cr_groups[i] + >= rule->mbr_subject.mbs_gid_min) { + match = 1; + break; + } + } + } + if (rule->mbr_subject.mbs_neg & MBS_GID_DEFINED) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_subject.mbs_flags & MBS_PRISON_DEFINED) { + match = (cred->cr_prison != NULL && + cred->cr_prison->pr_id == rule->mbr_subject.mbs_prison); + if (rule->mbr_subject.mbs_neg & MBS_PRISON_DEFINED) + match = !match; + if (!match) + return (0); + } + + /* + * Is there an object match? + */ + if (rule->mbr_object.mbo_flags & MBO_UID_DEFINED) { + match = (vap->va_uid <= rule->mbr_object.mbo_uid_max && + vap->va_uid >= rule->mbr_object.mbo_uid_min); + if (rule->mbr_object.mbo_neg & MBO_UID_DEFINED) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_GID_DEFINED) { + match = (vap->va_gid <= rule->mbr_object.mbo_gid_max && + vap->va_gid >= rule->mbr_object.mbo_gid_min); + if (rule->mbr_object.mbo_neg & MBO_GID_DEFINED) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_FSID_DEFINED) { + match = (bcmp(&(vp->v_mount->mnt_stat.f_fsid), + &(rule->mbr_object.mbo_fsid), + sizeof(rule->mbr_object.mbo_fsid)) == 0); + if (rule->mbr_object.mbo_neg & MBO_FSID_DEFINED) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_SUID) { + match = (vap->va_mode & S_ISUID); + if (rule->mbr_object.mbo_neg & MBO_SUID) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_SGID) { + match = (vap->va_mode & S_ISGID); + if (rule->mbr_object.mbo_neg & MBO_SGID) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_UID_SUBJECT) { + match = (vap->va_uid == cred->cr_uid || + vap->va_uid == cred->cr_ruid || + vap->va_uid == cred->cr_svuid); + if (rule->mbr_object.mbo_neg & MBO_UID_SUBJECT) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_GID_SUBJECT) { + match = (groupmember(vap->va_gid, cred) || + vap->va_gid == cred->cr_rgid || + vap->va_gid == cred->cr_svgid); + if (rule->mbr_object.mbo_neg & MBO_GID_SUBJECT) + match = !match; + if (!match) + return (0); + } + + if (rule->mbr_object.mbo_flags & MBO_TYPE_DEFINED) { + switch (vap->va_type) { + case VREG: + match = (rule->mbr_object.mbo_type & MBO_TYPE_REG); + break; + case VDIR: + match = (rule->mbr_object.mbo_type & MBO_TYPE_DIR); + break; + case VBLK: + match = (rule->mbr_object.mbo_type & MBO_TYPE_BLK); + break; + case VCHR: + match = (rule->mbr_object.mbo_type & MBO_TYPE_CHR); + break; + case VLNK: + match = (rule->mbr_object.mbo_type & MBO_TYPE_LNK); + break; + case VSOCK: + match = (rule->mbr_object.mbo_type & MBO_TYPE_SOCK); + break; + case VFIFO: + match = (rule->mbr_object.mbo_type & MBO_TYPE_FIFO); + break; + default: + match = 0; + } + if (rule->mbr_object.mbo_neg & MBO_TYPE_DEFINED) + match = !match; + if (!match) + return (0); + } + + /* + * MBI_APPEND should not be here as it should get converted to + * MBI_WRITE. + */ + priv_granted = 0; + mac_granted = rule->mbr_mode; + if ((acc_mode & MBI_ADMIN) && (mac_granted & MBI_ADMIN) == 0 && + priv_check_cred(cred, PRIV_VFS_ADMIN, 0) == 0) + priv_granted |= MBI_ADMIN; + if ((acc_mode & MBI_EXEC) && (mac_granted & MBI_EXEC) == 0 && + priv_check_cred(cred, (vap->va_type == VDIR) ? PRIV_VFS_LOOKUP : + PRIV_VFS_EXEC, 0) == 0) + priv_granted |= MBI_EXEC; + if ((acc_mode & MBI_READ) && (mac_granted & MBI_READ) == 0 && + priv_check_cred(cred, PRIV_VFS_READ, 0) == 0) + priv_granted |= MBI_READ; + if ((acc_mode & MBI_STAT) && (mac_granted & MBI_STAT) == 0 && + priv_check_cred(cred, PRIV_VFS_STAT, 0) == 0) + priv_granted |= MBI_STAT; + if ((acc_mode & MBI_WRITE) && (mac_granted & MBI_WRITE) == 0 && + priv_check_cred(cred, PRIV_VFS_WRITE, 0) == 0) + priv_granted |= MBI_WRITE; + /* + * Is the access permitted? + */ + if (((mac_granted | priv_granted) & acc_mode) != acc_mode) { + if (ugidfw_logging) + log(LOG_AUTHPRIV, "mac_bsdextended: %d:%d request %d" + " on %d:%d failed. \n", cred->cr_ruid, + cred->cr_rgid, acc_mode, vap->va_uid, + vap->va_gid); + return (EACCES); + } + + /* + * If the rule matched, permits access, and first match is enabled, + * return success. + */ + if (ugidfw_firstmatch_enabled) + return (EJUSTRETURN); + else + return (0); +} + +static int +ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap, + int acc_mode) +{ + int error, i; + + /* + * Since we do not separately handle append, map append to write. + */ + if (acc_mode & MBI_APPEND) { + acc_mode &= ~MBI_APPEND; + acc_mode |= MBI_WRITE; + } + mtx_lock(&ugidfw_mtx); + for (i = 0; i < rule_slots; i++) { + if (rules[i] == NULL) + continue; + error = ugidfw_rulecheck(rules[i], cred, + vp, vap, acc_mode); + if (error == EJUSTRETURN) + break; + if (error) { + mtx_unlock(&ugidfw_mtx); + return (error); + } + } + mtx_unlock(&ugidfw_mtx); + return (0); +} + +static int +ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode) +{ + int error; + struct vattr vap; + + if (!ugidfw_enabled) + return (0); + error = VOP_GETATTR(vp, &vap, cred); + if (error) + return (error); + return (ugidfw_check(cred, vp, &vap, acc_mode)); +} + +/* + * Object-specific entry point implementations are sorted alphabetically by + * object type and then by operation. + */ +static int +ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp, + struct label *vplabel) +{ + + if (vp != NULL) + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); + else + return (0); +} + +static int +ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp, + struct label *vplabel) +{ + + if (vp != NULL) + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); + else + return (0); +} + +static int +ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, + struct label *vplabel) +{ + + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); +} + +static int +ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int acc_mode) +{ + + return (ugidfw_check_vp(cred, vp, acc_mode)); +} + +static int +ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel) +{ + + return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); +} + +static int +ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel) +{ + + return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); +} + +static int +ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct componentname *cnp, struct vattr *vap) +{ + + return (ugidfw_check_vp(cred, dvp, MBI_WRITE)); +} + +static int +ugidfw_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, + struct label *vplabel, acl_type_t type) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_vnode_check_deleteextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace, const char *name) +{ + + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); +} + +static int +ugidfw_vnode_check_exec(struct ucred *cred, struct vnode *vp, + struct label *vplabel, struct image_params *imgp, + struct label *execlabel) +{ + + return (ugidfw_check_vp(cred, vp, MBI_READ|MBI_EXEC)); +} + +static int +ugidfw_vnode_check_getacl(struct ucred *cred, struct vnode *vp, + struct label *vplabel, acl_type_t type) +{ + + return (ugidfw_check_vp(cred, vp, MBI_STAT)); +} + +static int +ugidfw_vnode_check_getextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace, const char *name, + struct uio *uio) +{ + + return (ugidfw_check_vp(cred, vp, MBI_READ)); +} + +static int +ugidfw_vnode_check_link(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *label, + struct componentname *cnp) +{ + int error; + + error = ugidfw_check_vp(cred, dvp, MBI_WRITE); + if (error) + return (error); + error = ugidfw_check_vp(cred, vp, MBI_WRITE); + if (error) + return (error); + return (0); +} + +static int +ugidfw_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace) +{ + + return (ugidfw_check_vp(cred, vp, MBI_READ)); +} + +static int +ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct componentname *cnp) +{ + + return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); +} + +static int +ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int acc_mode) +{ + + return (ugidfw_check_vp(cred, vp, acc_mode)); +} + +static int +ugidfw_vnode_check_readdir(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel) +{ + + return (ugidfw_check_vp(cred, dvp, MBI_READ)); +} + +static int +ugidfw_vnode_check_readdlink(struct ucred *cred, struct vnode *vp, + struct label *vplabel) +{ + + return (ugidfw_check_vp(cred, vp, MBI_READ)); +} + +static int +ugidfw_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *vplabel, + struct componentname *cnp) +{ + int error; + + error = ugidfw_check_vp(cred, dvp, MBI_WRITE); + if (error) + return (error); + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); +} + +static int +ugidfw_vnode_check_rename_to(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *vplabel, + int samedir, struct componentname *cnp) +{ + int error; + + error = ugidfw_check_vp(cred, dvp, MBI_WRITE); + if (error) + return (error); + if (vp != NULL) + error = ugidfw_check_vp(cred, vp, MBI_WRITE); + return (error); +} + +static int +ugidfw_vnode_check_revoke(struct ucred *cred, struct vnode *vp, + struct label *vplabel) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_check_setacl_vnode(struct ucred *cred, struct vnode *vp, + struct label *vplabel, acl_type_t type, struct acl *acl) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_vnode_check_setextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace, const char *name, + struct uio *uio) +{ + + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); +} + +static int +ugidfw_vnode_check_setflags(struct ucred *cred, struct vnode *vp, + struct label *vplabel, u_long flags) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_vnode_check_setmode(struct ucred *cred, struct vnode *vp, + struct label *vplabel, mode_t mode) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_vnode_check_setowner(struct ucred *cred, struct vnode *vp, + struct label *vplabel, uid_t uid, gid_t gid) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_vnode_check_setutimes(struct ucred *cred, struct vnode *vp, + struct label *vplabel, struct timespec atime, struct timespec utime) +{ + + return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); +} + +static int +ugidfw_vnode_check_stat(struct ucred *active_cred, + struct ucred *file_cred, struct vnode *vp, struct label *vplabel) +{ + + return (ugidfw_check_vp(active_cred, vp, MBI_STAT)); +} + +static int +ugidfw_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *vplabel, + struct componentname *cnp) +{ + int error; + + error = ugidfw_check_vp(cred, dvp, MBI_WRITE); + if (error) + return (error); + return (ugidfw_check_vp(cred, vp, MBI_WRITE)); +} + +static struct mac_policy_ops ugidfw_ops = +{ + .mpo_destroy = ugidfw_destroy, + .mpo_init = ugidfw_init, + .mpo_system_check_acct = ugidfw_system_check_acct, + .mpo_system_check_auditctl = ugidfw_system_check_auditctl, + .mpo_system_check_swapon = ugidfw_system_check_swapon, + .mpo_vnode_check_access = ugidfw_vnode_check_access, + .mpo_vnode_check_chdir = ugidfw_vnode_check_chdir, + .mpo_vnode_check_chroot = ugidfw_vnode_check_chroot, + .mpo_vnode_check_create = ugidfw_check_create_vnode, + .mpo_vnode_check_deleteacl = ugidfw_vnode_check_deleteacl, + .mpo_vnode_check_deleteextattr = ugidfw_vnode_check_deleteextattr, + .mpo_vnode_check_exec = ugidfw_vnode_check_exec, + .mpo_vnode_check_getacl = ugidfw_vnode_check_getacl, + .mpo_vnode_check_getextattr = ugidfw_vnode_check_getextattr, + .mpo_vnode_check_link = ugidfw_vnode_check_link, + .mpo_vnode_check_listextattr = ugidfw_vnode_check_listextattr, + .mpo_vnode_check_lookup = ugidfw_vnode_check_lookup, + .mpo_vnode_check_open = ugidfw_vnode_check_open, + .mpo_vnode_check_readdir = ugidfw_vnode_check_readdir, + .mpo_vnode_check_readlink = ugidfw_vnode_check_readdlink, + .mpo_vnode_check_rename_from = ugidfw_vnode_check_rename_from, + .mpo_vnode_check_rename_to = ugidfw_vnode_check_rename_to, + .mpo_vnode_check_revoke = ugidfw_vnode_check_revoke, + .mpo_vnode_check_setacl = ugidfw_check_setacl_vnode, + .mpo_vnode_check_setextattr = ugidfw_vnode_check_setextattr, + .mpo_vnode_check_setflags = ugidfw_vnode_check_setflags, + .mpo_vnode_check_setmode = ugidfw_vnode_check_setmode, + .mpo_vnode_check_setowner = ugidfw_vnode_check_setowner, + .mpo_vnode_check_setutimes = ugidfw_vnode_check_setutimes, + .mpo_vnode_check_stat = ugidfw_vnode_check_stat, + .mpo_vnode_check_unlink = ugidfw_vnode_check_unlink, +}; + +MAC_POLICY_SET(&ugidfw_ops, mac_bsdextended, "TrustedBSD MAC/BSD Extended", + MPC_LOADTIME_FLAG_UNLOADOK, NULL, 0); Copied: head/sys/security/mac_bsdextended/ugidfw_vnode.c (from r184328, head/sys/security/mac_bsdextended/mac_bsdextended.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/security/mac_bsdextended/ugidfw_vnode.c Mon Oct 27 11:46:19 2008 (r184330, copy of r184328, head/sys/security/mac_bsdextended/mac_bsdextended.c) @@ -0,0 +1,768 @@ +/*- + * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 2001-2005 Networks Associates Technology, Inc. + * Copyright (c) 2005 Tom Rhodes + * Copyright (c) 2006 SPARTA, Inc. + * All rights reserved. + * + * This software was developed by Robert Watson for the TrustedBSD Project. + * It was later enhanced by Tom Rhodes for the TrustedBSD Project. + * + * This software was developed for the FreeBSD Project in part by Network + * Associates Laboratories, the Security Research Division of Network + * Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), + * as part of the DARPA CHATS research program. + * + * This software was enhanced by SPARTA ISSO under SPAWAR contract + * N66001-04-C-6019 ("SEFOS"). + * + * 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 AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +/* + * Developed by the TrustedBSD Project. + * + * "BSD Extended" MAC policy, allowing the administrator to impose mandatory + * firewall-like rules regarding users and file system objects. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +static struct mtx ugidfw_mtx; + +SYSCTL_DECL(_security_mac); + +SYSCTL_NODE(_security_mac, OID_AUTO, bsdextended, CTLFLAG_RW, 0, + "TrustedBSD extended BSD MAC policy controls"); + +static int ugidfw_enabled = 1; +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, enabled, CTLFLAG_RW, + &ugidfw_enabled, 0, "Enforce extended BSD policy"); +TUNABLE_INT("security.mac.bsdextended.enabled", &ugidfw_enabled); + +MALLOC_DEFINE(M_MACBSDEXTENDED, "mac_bsdextended", "BSD Extended MAC rule"); + +#define MAC_BSDEXTENDED_MAXRULES 250 +static struct mac_bsdextended_rule *rules[MAC_BSDEXTENDED_MAXRULES]; +static int rule_count = 0; +static int rule_slots = 0; +static int rule_version = MB_VERSION; + +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, + &rule_count, 0, "Number of defined rules\n"); +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, + &rule_slots, 0, "Number of used rule slots\n"); +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, + &rule_version, 0, "Version number for API\n"); + +/* + * This is just used for logging purposes, eventually we would like to log + * much more then failed requests. + */ +static int ugidfw_logging; +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, logging, CTLFLAG_RW, + &ugidfw_logging, 0, "Log failed authorization requests"); + +/* + * This tunable is here for compatibility. It will allow the user to switch + * between the new mode (first rule matches) and the old functionality (all + * rules match). + */ +static int ugidfw_firstmatch_enabled; +SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, firstmatch_enabled, + CTLFLAG_RW, &ugidfw_firstmatch_enabled, 1, + "Disable/enable match first rule functionality"); + +static int +ugidfw_rule_valid(struct mac_bsdextended_rule *rule) +{ + + if ((rule->mbr_subject.mbs_flags | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_subject.mbs_neg | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_object.mbo_flags | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) + return (EINVAL); + if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) && + (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) + return (EINVAL); + if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) + return (EINVAL); + return (0); +} + +static int +sysctl_rule(SYSCTL_HANDLER_ARGS) +{ + struct mac_bsdextended_rule temprule, *ruleptr; + u_int namelen; + int error, index, *name; + + error = 0; + name = (int *)arg1; + namelen = arg2; + if (namelen != 1) + return (EINVAL); + index = name[0]; + if (index >= MAC_BSDEXTENDED_MAXRULES) + return (ENOENT); + + ruleptr = NULL; + if (req->newptr && req->newlen != 0) { + error = SYSCTL_IN(req, &temprule, sizeof(temprule)); + if (error) + return (error); + ruleptr = malloc(sizeof(*ruleptr), M_MACBSDEXTENDED, + M_WAITOK | M_ZERO); + } + + mtx_lock(&ugidfw_mtx); + if (req->oldptr) { + if (index < 0 || index > rule_slots + 1) { + error = ENOENT; + goto out; + } + if (rules[index] == NULL) { + error = ENOENT; + goto out; + } + temprule = *rules[index]; + } + if (req->newptr && req->newlen == 0) { + KASSERT(ruleptr == NULL, ("sysctl_rule: ruleptr != NULL")); + ruleptr = rules[index]; + if (ruleptr == NULL) { + error = ENOENT; + goto out; + } + rule_count--; + rules[index] = NULL; + } else if (req->newptr) { + error = ugidfw_rule_valid(&temprule); + if (error) + goto out; + if (rules[index] == NULL) { + *ruleptr = temprule; + rules[index] = ruleptr; + ruleptr = NULL; + if (index + 1 > rule_slots) + rule_slots = index + 1; + rule_count++; + } else + *rules[index] = temprule; + } +out: + mtx_unlock(&ugidfw_mtx); + if (ruleptr != NULL) + free(ruleptr, M_MACBSDEXTENDED); + if (req->oldptr && error == 0) + error = SYSCTL_OUT(req, &temprule, sizeof(temprule)); + return (error); +} + +SYSCTL_NODE(_security_mac_bsdextended, OID_AUTO, rules, CTLFLAG_RW, + sysctl_rule, "BSD extended MAC rules"); + +static void +ugidfw_init(struct mac_policy_conf *mpc) +{ + + mtx_init(&ugidfw_mtx, "mac_bsdextended lock", NULL, MTX_DEF); +} + +static void +ugidfw_destroy(struct mac_policy_conf *mpc) +{ + + mtx_destroy(&ugidfw_mtx); +} + +static int +ugidfw_rulecheck(struct mac_bsdextended_rule *rule, + struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode) +{ + int mac_granted, match, priv_granted; + int i; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 12:09:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71566106569F; Mon, 27 Oct 2008 12:09:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CA6B8FC14; Mon, 27 Oct 2008 12:09:16 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RC9GQ7038868; Mon, 27 Oct 2008 12:09:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RC9Gu4038863; Mon, 27 Oct 2008 12:09:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810271209.m9RC9Gu4038863@svn.freebsd.org> From: Robert Watson Date: Mon, 27 Oct 2008 12:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184331 - in head/sys: modules/mac_bsdextended security/mac_bsdextended X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 12:09:16 -0000 Author: rwatson Date: Mon Oct 27 12:09:15 2008 New Revision: 184331 URL: http://svn.freebsd.org/changeset/base/184331 Log: Break mac_bsdextended.c out into multiple .c files, with the base access control logic and policy registration remaining in that file, and access control checks broken out into other files by class of check. Obtained from: TrustedBSD Project Added: head/sys/security/mac_bsdextended/ugidfw_internal.h (contents, props changed) Modified: head/sys/modules/mac_bsdextended/Makefile head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_bsdextended/ugidfw_system.c head/sys/security/mac_bsdextended/ugidfw_vnode.c Modified: head/sys/modules/mac_bsdextended/Makefile ============================================================================== --- head/sys/modules/mac_bsdextended/Makefile Mon Oct 27 11:46:19 2008 (r184330) +++ head/sys/modules/mac_bsdextended/Makefile Mon Oct 27 12:09:15 2008 (r184331) @@ -4,6 +4,9 @@ KMOD= mac_bsdextended SRCS= vnode_if.h \ - mac_bsdextended.c + mac_bsdextended.h \ + mac_bsdextended.c \ + ugidfw_system.c \ + ugidfw_vnode.c .include Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- head/sys/security/mac_bsdextended/mac_bsdextended.c Mon Oct 27 11:46:19 2008 (r184330) +++ head/sys/security/mac_bsdextended/mac_bsdextended.c Mon Oct 27 12:09:15 2008 (r184331) @@ -65,6 +65,7 @@ #include #include +#include static struct mtx ugidfw_mtx; @@ -415,7 +416,7 @@ ugidfw_rulecheck(struct mac_bsdextended_ return (0); } -static int +int ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode) { @@ -445,7 +446,7 @@ ugidfw_check(struct ucred *cred, struct return (0); } -static int +int ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode) { int error; @@ -459,276 +460,6 @@ ugidfw_check_vp(struct ucred *cred, stru return (ugidfw_check(cred, vp, &vap, acc_mode)); } -/* - * Object-specific entry point implementations are sorted alphabetically by - * object type and then by operation. - */ -static int -ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp, - struct label *vplabel) -{ - - if (vp != NULL) - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); - else - return (0); -} - -static int -ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp, - struct label *vplabel) -{ - - if (vp != NULL) - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); - else - return (0); -} - -static int -ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, - struct label *vplabel) -{ - - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) -{ - - return (ugidfw_check_vp(cred, vp, acc_mode)); -} - -static int -ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); -} - -static int -ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); -} - -static int -ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct componentname *cnp, struct vattr *vap) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, - struct label *vplabel, acl_type_t type) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_deleteextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace, const char *name) -{ - - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_exec(struct ucred *cred, struct vnode *vp, - struct label *vplabel, struct image_params *imgp, - struct label *execlabel) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ|MBI_EXEC)); -} - -static int -ugidfw_vnode_check_getacl(struct ucred *cred, struct vnode *vp, - struct label *vplabel, acl_type_t type) -{ - - return (ugidfw_check_vp(cred, vp, MBI_STAT)); -} - -static int -ugidfw_vnode_check_getextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace, const char *name, - struct uio *uio) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ)); -} - -static int -ugidfw_vnode_check_link(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct vnode *vp, struct label *label, - struct componentname *cnp) -{ - int error; - - error = ugidfw_check_vp(cred, dvp, MBI_WRITE); - if (error) - return (error); - error = ugidfw_check_vp(cred, vp, MBI_WRITE); - if (error) - return (error); - return (0); -} - -static int -ugidfw_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ)); -} - -static int -ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct componentname *cnp) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); -} - -static int -ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) -{ - - return (ugidfw_check_vp(cred, vp, acc_mode)); -} - -static int -ugidfw_vnode_check_readdir(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_READ)); -} - -static int -ugidfw_vnode_check_readdlink(struct ucred *cred, struct vnode *vp, - struct label *vplabel) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ)); -} - -static int -ugidfw_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct vnode *vp, struct label *vplabel, - struct componentname *cnp) -{ - int error; - - error = ugidfw_check_vp(cred, dvp, MBI_WRITE); - if (error) - return (error); - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_rename_to(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct vnode *vp, struct label *vplabel, - int samedir, struct componentname *cnp) -{ - int error; - - error = ugidfw_check_vp(cred, dvp, MBI_WRITE); - if (error) - return (error); - if (vp != NULL) - error = ugidfw_check_vp(cred, vp, MBI_WRITE); - return (error); -} - -static int -ugidfw_vnode_check_revoke(struct ucred *cred, struct vnode *vp, - struct label *vplabel) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_check_setacl_vnode(struct ucred *cred, struct vnode *vp, - struct label *vplabel, acl_type_t type, struct acl *acl) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_setextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace, const char *name, - struct uio *uio) -{ - - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_setflags(struct ucred *cred, struct vnode *vp, - struct label *vplabel, u_long flags) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_setmode(struct ucred *cred, struct vnode *vp, - struct label *vplabel, mode_t mode) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_setowner(struct ucred *cred, struct vnode *vp, - struct label *vplabel, uid_t uid, gid_t gid) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_setutimes(struct ucred *cred, struct vnode *vp, - struct label *vplabel, struct timespec atime, struct timespec utime) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_stat(struct ucred *active_cred, - struct ucred *file_cred, struct vnode *vp, struct label *vplabel) -{ - - return (ugidfw_check_vp(active_cred, vp, MBI_STAT)); -} - -static int -ugidfw_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct vnode *vp, struct label *vplabel, - struct componentname *cnp) -{ - int error; - - error = ugidfw_check_vp(cred, dvp, MBI_WRITE); - if (error) - return (error); - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); -} - static struct mac_policy_ops ugidfw_ops = { .mpo_destroy = ugidfw_destroy, Added: head/sys/security/mac_bsdextended/ugidfw_internal.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/security/mac_bsdextended/ugidfw_internal.h Mon Oct 27 12:09:15 2008 (r184331) @@ -0,0 +1,115 @@ +/*- + * Copyright (c) 2008 Robert N. M. Watson + * 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 AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _SYS_SECURITY_MAC_BSDEXTENDED_UGIDFW_INTERNAL_H +#define _SYS_SECURITY_MAC_BSDEXTENDED_UGIDFW_INTERNAL_H + +/* + * Central access control routines used by object-specific checks. + */ +int ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap, + int acc_mode); +int ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode); + +/* + * System access control checks. + */ +int ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp, + struct label *vplabel); +int ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp, + struct label *vplabel); +int ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, + struct label *vplabel); + +/* + * Vnode access control checks. + */ +int ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int acc_mode); +int ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel); +int ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel); +int ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct componentname *cnp, + struct vattr *vap); +int ugidfw_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, + struct label *vplabel, acl_type_t type); +int ugidfw_vnode_check_deleteextattr(struct ucred *cred, + struct vnode *vp, struct label *vplabel, int attrnamespace, + const char *name); +int ugidfw_vnode_check_exec(struct ucred *cred, struct vnode *vp, + struct label *vplabel, struct image_params *imgp, + struct label *execlabel); +int ugidfw_vnode_check_getacl(struct ucred *cred, struct vnode *vp, + struct label *vplabel, acl_type_t type); +int ugidfw_vnode_check_getextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace, const char *name, + struct uio *uio); +int ugidfw_vnode_check_link(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *label, + struct componentname *cnp); +int ugidfw_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace); +int ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct componentname *cnp); +int ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int acc_mode); +int ugidfw_vnode_check_readdir(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel); +int ugidfw_vnode_check_readdlink(struct ucred *cred, struct vnode *vp, + struct label *vplabel); +int ugidfw_vnode_check_rename_from(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *vplabel, + struct componentname *cnp); +int ugidfw_vnode_check_rename_to(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *vplabel, + int samedir, struct componentname *cnp); +int ugidfw_vnode_check_revoke(struct ucred *cred, struct vnode *vp, + struct label *vplabel); +int ugidfw_check_setacl_vnode(struct ucred *cred, struct vnode *vp, + struct label *vplabel, acl_type_t type, struct acl *acl); +int ugidfw_vnode_check_setextattr(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int attrnamespace, const char *name, + struct uio *uio); +int ugidfw_vnode_check_setflags(struct ucred *cred, struct vnode *vp, + struct label *vplabel, u_long flags); +int ugidfw_vnode_check_setmode(struct ucred *cred, struct vnode *vp, + struct label *vplabel, mode_t mode); +int ugidfw_vnode_check_setowner(struct ucred *cred, struct vnode *vp, + struct label *vplabel, uid_t uid, gid_t gid); +int ugidfw_vnode_check_setutimes(struct ucred *cred, struct vnode *vp, + struct label *vplabel, struct timespec atime, + struct timespec utime); +int ugidfw_vnode_check_stat(struct ucred *active_cred, + struct ucred *file_cred, struct vnode *vp, struct label *vplabel); +int ugidfw_vnode_check_unlink(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct vnode *vp, struct label *vplabel, + struct componentname *cnp); + +#endif /* _SYS_SECURITY_MAC_BSDEXTENDED_UGIDFW_INTERNAL_H */ Modified: head/sys/security/mac_bsdextended/ugidfw_system.c ============================================================================== --- head/sys/security/mac_bsdextended/ugidfw_system.c Mon Oct 27 11:46:19 2008 (r184330) +++ head/sys/security/mac_bsdextended/ugidfw_system.c Mon Oct 27 12:09:15 2008 (r184331) @@ -40,13 +40,6 @@ * $FreeBSD$ */ -/* - * Developed by the TrustedBSD Project. - * - * "BSD Extended" MAC policy, allowing the administrator to impose mandatory - * firewall-like rules regarding users and file system objects. - */ - #include #include #include @@ -65,405 +58,9 @@ #include #include +#include -static struct mtx ugidfw_mtx; - -SYSCTL_DECL(_security_mac); - -SYSCTL_NODE(_security_mac, OID_AUTO, bsdextended, CTLFLAG_RW, 0, - "TrustedBSD extended BSD MAC policy controls"); - -static int ugidfw_enabled = 1; -SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, enabled, CTLFLAG_RW, - &ugidfw_enabled, 0, "Enforce extended BSD policy"); -TUNABLE_INT("security.mac.bsdextended.enabled", &ugidfw_enabled); - -MALLOC_DEFINE(M_MACBSDEXTENDED, "mac_bsdextended", "BSD Extended MAC rule"); - -#define MAC_BSDEXTENDED_MAXRULES 250 -static struct mac_bsdextended_rule *rules[MAC_BSDEXTENDED_MAXRULES]; -static int rule_count = 0; -static int rule_slots = 0; -static int rule_version = MB_VERSION; - -SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_count, CTLFLAG_RD, - &rule_count, 0, "Number of defined rules\n"); -SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_slots, CTLFLAG_RD, - &rule_slots, 0, "Number of used rule slots\n"); -SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, rule_version, CTLFLAG_RD, - &rule_version, 0, "Version number for API\n"); - -/* - * This is just used for logging purposes, eventually we would like to log - * much more then failed requests. - */ -static int ugidfw_logging; -SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, logging, CTLFLAG_RW, - &ugidfw_logging, 0, "Log failed authorization requests"); - -/* - * This tunable is here for compatibility. It will allow the user to switch - * between the new mode (first rule matches) and the old functionality (all - * rules match). - */ -static int ugidfw_firstmatch_enabled; -SYSCTL_INT(_security_mac_bsdextended, OID_AUTO, firstmatch_enabled, - CTLFLAG_RW, &ugidfw_firstmatch_enabled, 1, - "Disable/enable match first rule functionality"); - -static int -ugidfw_rule_valid(struct mac_bsdextended_rule *rule) -{ - - if ((rule->mbr_subject.mbs_flags | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) - return (EINVAL); - if ((rule->mbr_subject.mbs_neg | MBS_ALL_FLAGS) != MBS_ALL_FLAGS) - return (EINVAL); - if ((rule->mbr_object.mbo_flags | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) - return (EINVAL); - if ((rule->mbr_object.mbo_neg | MBO_ALL_FLAGS) != MBO_ALL_FLAGS) - return (EINVAL); - if ((rule->mbr_object.mbo_neg | MBO_TYPE_DEFINED) && - (rule->mbr_object.mbo_type | MBO_ALL_TYPE) != MBO_ALL_TYPE) - return (EINVAL); - if ((rule->mbr_mode | MBI_ALLPERM) != MBI_ALLPERM) - return (EINVAL); - return (0); -} - -static int -sysctl_rule(SYSCTL_HANDLER_ARGS) -{ - struct mac_bsdextended_rule temprule, *ruleptr; - u_int namelen; - int error, index, *name; - - error = 0; - name = (int *)arg1; - namelen = arg2; - if (namelen != 1) - return (EINVAL); - index = name[0]; - if (index >= MAC_BSDEXTENDED_MAXRULES) - return (ENOENT); - - ruleptr = NULL; - if (req->newptr && req->newlen != 0) { - error = SYSCTL_IN(req, &temprule, sizeof(temprule)); - if (error) - return (error); - ruleptr = malloc(sizeof(*ruleptr), M_MACBSDEXTENDED, - M_WAITOK | M_ZERO); - } - - mtx_lock(&ugidfw_mtx); - if (req->oldptr) { - if (index < 0 || index > rule_slots + 1) { - error = ENOENT; - goto out; - } - if (rules[index] == NULL) { - error = ENOENT; - goto out; - } - temprule = *rules[index]; - } - if (req->newptr && req->newlen == 0) { - KASSERT(ruleptr == NULL, ("sysctl_rule: ruleptr != NULL")); - ruleptr = rules[index]; - if (ruleptr == NULL) { - error = ENOENT; - goto out; - } - rule_count--; - rules[index] = NULL; - } else if (req->newptr) { - error = ugidfw_rule_valid(&temprule); - if (error) - goto out; - if (rules[index] == NULL) { - *ruleptr = temprule; - rules[index] = ruleptr; - ruleptr = NULL; - if (index + 1 > rule_slots) - rule_slots = index + 1; - rule_count++; - } else - *rules[index] = temprule; - } -out: - mtx_unlock(&ugidfw_mtx); - if (ruleptr != NULL) - free(ruleptr, M_MACBSDEXTENDED); - if (req->oldptr && error == 0) - error = SYSCTL_OUT(req, &temprule, sizeof(temprule)); - return (error); -} - -SYSCTL_NODE(_security_mac_bsdextended, OID_AUTO, rules, CTLFLAG_RW, - sysctl_rule, "BSD extended MAC rules"); - -static void -ugidfw_init(struct mac_policy_conf *mpc) -{ - - mtx_init(&ugidfw_mtx, "mac_bsdextended lock", NULL, MTX_DEF); -} - -static void -ugidfw_destroy(struct mac_policy_conf *mpc) -{ - - mtx_destroy(&ugidfw_mtx); -} - -static int -ugidfw_rulecheck(struct mac_bsdextended_rule *rule, - struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode) -{ - int mac_granted, match, priv_granted; - int i; - - /* - * Is there a subject match? - */ - mtx_assert(&ugidfw_mtx, MA_OWNED); - if (rule->mbr_subject.mbs_flags & MBS_UID_DEFINED) { - match = ((cred->cr_uid <= rule->mbr_subject.mbs_uid_max && - cred->cr_uid >= rule->mbr_subject.mbs_uid_min) || - (cred->cr_ruid <= rule->mbr_subject.mbs_uid_max && - cred->cr_ruid >= rule->mbr_subject.mbs_uid_min) || - (cred->cr_svuid <= rule->mbr_subject.mbs_uid_max && - cred->cr_svuid >= rule->mbr_subject.mbs_uid_min)); - if (rule->mbr_subject.mbs_neg & MBS_UID_DEFINED) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_subject.mbs_flags & MBS_GID_DEFINED) { - match = ((cred->cr_rgid <= rule->mbr_subject.mbs_gid_max && - cred->cr_rgid >= rule->mbr_subject.mbs_gid_min) || - (cred->cr_svgid <= rule->mbr_subject.mbs_gid_max && - cred->cr_svgid >= rule->mbr_subject.mbs_gid_min)); - if (!match) { - for (i = 0; i < cred->cr_ngroups; i++) { - if (cred->cr_groups[i] - <= rule->mbr_subject.mbs_gid_max && - cred->cr_groups[i] - >= rule->mbr_subject.mbs_gid_min) { - match = 1; - break; - } - } - } - if (rule->mbr_subject.mbs_neg & MBS_GID_DEFINED) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_subject.mbs_flags & MBS_PRISON_DEFINED) { - match = (cred->cr_prison != NULL && - cred->cr_prison->pr_id == rule->mbr_subject.mbs_prison); - if (rule->mbr_subject.mbs_neg & MBS_PRISON_DEFINED) - match = !match; - if (!match) - return (0); - } - - /* - * Is there an object match? - */ - if (rule->mbr_object.mbo_flags & MBO_UID_DEFINED) { - match = (vap->va_uid <= rule->mbr_object.mbo_uid_max && - vap->va_uid >= rule->mbr_object.mbo_uid_min); - if (rule->mbr_object.mbo_neg & MBO_UID_DEFINED) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_GID_DEFINED) { - match = (vap->va_gid <= rule->mbr_object.mbo_gid_max && - vap->va_gid >= rule->mbr_object.mbo_gid_min); - if (rule->mbr_object.mbo_neg & MBO_GID_DEFINED) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_FSID_DEFINED) { - match = (bcmp(&(vp->v_mount->mnt_stat.f_fsid), - &(rule->mbr_object.mbo_fsid), - sizeof(rule->mbr_object.mbo_fsid)) == 0); - if (rule->mbr_object.mbo_neg & MBO_FSID_DEFINED) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_SUID) { - match = (vap->va_mode & S_ISUID); - if (rule->mbr_object.mbo_neg & MBO_SUID) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_SGID) { - match = (vap->va_mode & S_ISGID); - if (rule->mbr_object.mbo_neg & MBO_SGID) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_UID_SUBJECT) { - match = (vap->va_uid == cred->cr_uid || - vap->va_uid == cred->cr_ruid || - vap->va_uid == cred->cr_svuid); - if (rule->mbr_object.mbo_neg & MBO_UID_SUBJECT) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_GID_SUBJECT) { - match = (groupmember(vap->va_gid, cred) || - vap->va_gid == cred->cr_rgid || - vap->va_gid == cred->cr_svgid); - if (rule->mbr_object.mbo_neg & MBO_GID_SUBJECT) - match = !match; - if (!match) - return (0); - } - - if (rule->mbr_object.mbo_flags & MBO_TYPE_DEFINED) { - switch (vap->va_type) { - case VREG: - match = (rule->mbr_object.mbo_type & MBO_TYPE_REG); - break; - case VDIR: - match = (rule->mbr_object.mbo_type & MBO_TYPE_DIR); - break; - case VBLK: - match = (rule->mbr_object.mbo_type & MBO_TYPE_BLK); - break; - case VCHR: - match = (rule->mbr_object.mbo_type & MBO_TYPE_CHR); - break; - case VLNK: - match = (rule->mbr_object.mbo_type & MBO_TYPE_LNK); - break; - case VSOCK: - match = (rule->mbr_object.mbo_type & MBO_TYPE_SOCK); - break; - case VFIFO: - match = (rule->mbr_object.mbo_type & MBO_TYPE_FIFO); - break; - default: - match = 0; - } - if (rule->mbr_object.mbo_neg & MBO_TYPE_DEFINED) - match = !match; - if (!match) - return (0); - } - - /* - * MBI_APPEND should not be here as it should get converted to - * MBI_WRITE. - */ - priv_granted = 0; - mac_granted = rule->mbr_mode; - if ((acc_mode & MBI_ADMIN) && (mac_granted & MBI_ADMIN) == 0 && - priv_check_cred(cred, PRIV_VFS_ADMIN, 0) == 0) - priv_granted |= MBI_ADMIN; - if ((acc_mode & MBI_EXEC) && (mac_granted & MBI_EXEC) == 0 && - priv_check_cred(cred, (vap->va_type == VDIR) ? PRIV_VFS_LOOKUP : - PRIV_VFS_EXEC, 0) == 0) - priv_granted |= MBI_EXEC; - if ((acc_mode & MBI_READ) && (mac_granted & MBI_READ) == 0 && - priv_check_cred(cred, PRIV_VFS_READ, 0) == 0) - priv_granted |= MBI_READ; - if ((acc_mode & MBI_STAT) && (mac_granted & MBI_STAT) == 0 && - priv_check_cred(cred, PRIV_VFS_STAT, 0) == 0) - priv_granted |= MBI_STAT; - if ((acc_mode & MBI_WRITE) && (mac_granted & MBI_WRITE) == 0 && - priv_check_cred(cred, PRIV_VFS_WRITE, 0) == 0) - priv_granted |= MBI_WRITE; - /* - * Is the access permitted? - */ - if (((mac_granted | priv_granted) & acc_mode) != acc_mode) { - if (ugidfw_logging) - log(LOG_AUTHPRIV, "mac_bsdextended: %d:%d request %d" - " on %d:%d failed. \n", cred->cr_ruid, - cred->cr_rgid, acc_mode, vap->va_uid, - vap->va_gid); - return (EACCES); - } - - /* - * If the rule matched, permits access, and first match is enabled, - * return success. - */ - if (ugidfw_firstmatch_enabled) - return (EJUSTRETURN); - else - return (0); -} - -static int -ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap, - int acc_mode) -{ - int error, i; - - /* - * Since we do not separately handle append, map append to write. - */ - if (acc_mode & MBI_APPEND) { - acc_mode &= ~MBI_APPEND; - acc_mode |= MBI_WRITE; - } - mtx_lock(&ugidfw_mtx); - for (i = 0; i < rule_slots; i++) { - if (rules[i] == NULL) - continue; - error = ugidfw_rulecheck(rules[i], cred, - vp, vap, acc_mode); - if (error == EJUSTRETURN) - break; - if (error) { - mtx_unlock(&ugidfw_mtx); - return (error); - } - } - mtx_unlock(&ugidfw_mtx); - return (0); -} - -static int -ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode) -{ - int error; - struct vattr vap; - - if (!ugidfw_enabled) - return (0); - error = VOP_GETATTR(vp, &vap, cred); - if (error) - return (error); - return (ugidfw_check(cred, vp, &vap, acc_mode)); -} - -/* - * Object-specific entry point implementations are sorted alphabetically by - * object type and then by operation. - */ -static int +int ugidfw_system_check_acct(struct ucred *cred, struct vnode *vp, struct label *vplabel) { @@ -474,7 +71,7 @@ ugidfw_system_check_acct(struct ucred *c return (0); } -static int +int ugidfw_system_check_auditctl(struct ucred *cred, struct vnode *vp, struct label *vplabel) { @@ -485,284 +82,10 @@ ugidfw_system_check_auditctl(struct ucre return (0); } -static int +int ugidfw_system_check_swapon(struct ucred *cred, struct vnode *vp, struct label *vplabel) { return (ugidfw_check_vp(cred, vp, MBI_WRITE)); } - -static int -ugidfw_vnode_check_access(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) -{ - - return (ugidfw_check_vp(cred, vp, acc_mode)); -} - -static int -ugidfw_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); -} - -static int -ugidfw_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); -} - -static int -ugidfw_check_create_vnode(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct componentname *cnp, struct vattr *vap) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, - struct label *vplabel, acl_type_t type) -{ - - return (ugidfw_check_vp(cred, vp, MBI_ADMIN)); -} - -static int -ugidfw_vnode_check_deleteextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace, const char *name) -{ - - return (ugidfw_check_vp(cred, vp, MBI_WRITE)); -} - -static int -ugidfw_vnode_check_exec(struct ucred *cred, struct vnode *vp, - struct label *vplabel, struct image_params *imgp, - struct label *execlabel) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ|MBI_EXEC)); -} - -static int -ugidfw_vnode_check_getacl(struct ucred *cred, struct vnode *vp, - struct label *vplabel, acl_type_t type) -{ - - return (ugidfw_check_vp(cred, vp, MBI_STAT)); -} - -static int -ugidfw_vnode_check_getextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace, const char *name, - struct uio *uio) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ)); -} - -static int -ugidfw_vnode_check_link(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct vnode *vp, struct label *label, - struct componentname *cnp) -{ - int error; - - error = ugidfw_check_vp(cred, dvp, MBI_WRITE); - if (error) - return (error); - error = ugidfw_check_vp(cred, vp, MBI_WRITE); - if (error) - return (error); - return (0); -} - -static int -ugidfw_vnode_check_listextattr(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int attrnamespace) -{ - - return (ugidfw_check_vp(cred, vp, MBI_READ)); -} - -static int -ugidfw_vnode_check_lookup(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct componentname *cnp) -{ - - return (ugidfw_check_vp(cred, dvp, MBI_EXEC)); -} - -static int -ugidfw_vnode_check_open(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) -{ - - return (ugidfw_check_vp(cred, vp, acc_mode)); -} - -static int -ugidfw_vnode_check_readdir(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 12:12:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 579101065676; Mon, 27 Oct 2008 12:12:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 456A48FC24; Mon, 27 Oct 2008 12:12:24 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RCCNlG038967; Mon, 27 Oct 2008 12:12:23 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RCCNga038966; Mon, 27 Oct 2008 12:12:23 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810271212.m9RCCNga038966@svn.freebsd.org> From: Robert Watson Date: Mon, 27 Oct 2008 12:12:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184332 - head/sys/security/mac_bsdextended X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 12:12:24 -0000 Author: rwatson Date: Mon Oct 27 12:12:23 2008 New Revision: 184332 URL: http://svn.freebsd.org/changeset/base/184332 Log: Add TrustedBSD credit to new ugidfw_internal.h file. Modified: head/sys/security/mac_bsdextended/ugidfw_internal.h Modified: head/sys/security/mac_bsdextended/ugidfw_internal.h ============================================================================== --- head/sys/security/mac_bsdextended/ugidfw_internal.h Mon Oct 27 12:09:15 2008 (r184331) +++ head/sys/security/mac_bsdextended/ugidfw_internal.h Mon Oct 27 12:12:23 2008 (r184332) @@ -2,6 +2,8 @@ * Copyright (c) 2008 Robert N. M. Watson * All rights reserved. * + * This software was developed by Robert Watson for the TrustedBSD Project. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 12:56:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 553D0106566C; Mon, 27 Oct 2008 12:56:46 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 049458FC1B; Mon, 27 Oct 2008 12:56:45 +0000 (UTC) (envelope-from stas@ht-systems.ru) Received: from [78.110.49.49] (helo=quasar.ht-systems.ru) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1KuRI2-0002L0-Pr; Mon, 27 Oct 2008 15:33:46 +0300 Received: by quasar.ht-systems.ru (Postfix, from userid 1024) id B0B6273023; Mon, 27 Oct 2008 15:33:45 +0300 (MSK) Date: Mon, 27 Oct 2008 15:33:45 +0300 From: Stanislav Sedov To: Marcel Moolenaar Message-Id: <20081027153345.d4e9dcad.stas@FreeBSD.org> In-Reply-To: <200810250618.m9P6ICWl023370@svn.freebsd.org> References: <200810250618.m9P6ICWl023370@svn.freebsd.org> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Mon__27_Oct_2008_15_33_45_+0300_iW_bfaa=sdp+hUmy" Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 12:56:46 -0000 --Signature=_Mon__27_Oct_2008_15_33_45_+0300_iW_bfaa=sdp+hUmy Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, 25 Oct 2008 06:18:12 +0000 (UTC) Marcel Moolenaar mentioned: > Author: marcel > Date: Sat Oct 25 06:18:12 2008 > New Revision: 184251 > URL: http://svn.freebsd.org/changeset/base/184251 >=20 > Log: > Add a driver for flash memory that implements to the Common Flash > Memory Interface (CFI). The flash memory can be read and written > to through /dev/cfi# and an ioctl() exists so processes can read > the query information. > The driver supports the AMD and Intel command set, though only > the AMD command has been tested. > =20 > Obtained from: Juniper Networks, Inc. Do you plan to introduce some infrastructure so other flash-like drivers could be attached (e.g. non-CFI compliant, SPI flashes, etc)? I've started working on such thing and don't want to do the duplicate works, so if you have something in mind it's time to share:-) And thanks for this great work! --=20 Stanislav Sedov ST4096-RIPE --Signature=_Mon__27_Oct_2008_15_33_45_+0300_iW_bfaa=sdp+hUmy Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkkFtSkACgkQK/VZk+smlYG6xwCeLHIByP6sf8i1V8dJ+snWwoPc boUAn0WPzvJkJgNGsrcp50wWafIkO6oy =r24C -----END PGP SIGNATURE----- --Signature=_Mon__27_Oct_2008_15_33_45_+0300_iW_bfaa=sdp+hUmy-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 13:53:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D943C1065671; Mon, 27 Oct 2008 13:53:31 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7F968FC2D; Mon, 27 Oct 2008 13:53:31 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RDrVKa040959; Mon, 27 Oct 2008 13:53:31 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RDrVvp040957; Mon, 27 Oct 2008 13:53:31 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200810271353.m9RDrVvp040957@svn.freebsd.org> From: Randall Stewart Date: Mon, 27 Oct 2008 13:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184333 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 13:53:32 -0000 Author: rrs Date: Mon Oct 27 13:53:31 2008 New Revision: 184333 URL: http://svn.freebsd.org/changeset/base/184333 Log: Invariants changes that make more sense. Modified: head/sys/netinet/sctp_timer.c head/sys/netinet/sctp_timer.h Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Mon Oct 27 12:12:23 2008 (r184332) +++ head/sys/netinet/sctp_timer.c Mon Oct 27 13:53:31 2008 (r184333) @@ -561,7 +561,8 @@ sctp_backoff_on_timeout(struct sctp_tcb } } -void +#ifndef INVARIANTS +static void sctp_recover_sent_list(struct sctp_tcb *stcb) { struct sctp_tmit_chunk *chk, *tp2; @@ -604,6 +605,8 @@ sctp_recover_sent_list(struct sctp_tcb * } } +#endif + static int sctp_mark_all_for_resend(struct sctp_tcb *stcb, struct sctp_nets *net, @@ -679,7 +682,9 @@ sctp_mark_all_for_resend(struct sctp_tcb /* Now on to each chunk */ num_mk = cnt_mk = 0; tsnfirst = tsnlast = 0; +#ifndef INVARIANTS start_again: +#endif chk = TAILQ_FIRST(&stcb->asoc.sent_queue); for (; chk != NULL; chk = tp2) { tp2 = TAILQ_NEXT(chk, sctp_next); @@ -693,8 +698,6 @@ start_again: recovery_cnt++; #ifdef INVARIANTS panic("last acked >= chk on sent-Q"); - /* to keep compiler happy */ - goto start_again; #else SCTP_PRINTF("Recover attempts a restart cnt:%d\n", recovery_cnt); sctp_recover_sent_list(stcb); Modified: head/sys/netinet/sctp_timer.h ============================================================================== --- head/sys/netinet/sctp_timer.h Mon Oct 27 12:12:23 2008 (r184332) +++ head/sys/netinet/sctp_timer.h Mon Oct 27 13:53:31 2008 (r184333) @@ -99,8 +99,6 @@ void sctp_audit_retranmission_queue(stru void sctp_iterator_timer(struct sctp_iterator *it); -void sctp_recover_sent_list(struct sctp_tcb *stcb); - #endif #endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 13:54:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8346B1065676; Mon, 27 Oct 2008 13:54:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 71F1B8FC0C; Mon, 27 Oct 2008 13:54:54 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RDssbO041037; Mon, 27 Oct 2008 13:54:54 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RDssD3041036; Mon, 27 Oct 2008 13:54:54 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200810271354.m9RDssD3041036@svn.freebsd.org> From: Randall Stewart Date: Mon, 27 Oct 2008 13:54:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184334 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 13:54:54 -0000 Author: rrs Date: Mon Oct 27 13:54:54 2008 New Revision: 184334 URL: http://svn.freebsd.org/changeset/base/184334 Log: Get rid of ifdef for vimage on version 8 comparison. Now the scrubbing program properly takes care of this. Modified: head/sys/netinet/sctp_os_bsd.h Modified: head/sys/netinet/sctp_os_bsd.h ============================================================================== --- head/sys/netinet/sctp_os_bsd.h Mon Oct 27 13:53:31 2008 (r184333) +++ head/sys/netinet/sctp_os_bsd.h Mon Oct 27 13:54:54 2008 (r184334) @@ -61,9 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if defined(__FreeBSD__) && __FreeBSD_version >= 800044 #include -#endif #include #include From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 13:56:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 206011065674; Mon, 27 Oct 2008 13:56:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0DCD88FC2C; Mon, 27 Oct 2008 13:56:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RDuR59041127; Mon, 27 Oct 2008 13:56:27 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RDuRjt041126; Mon, 27 Oct 2008 13:56:27 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810271356.m9RDuRjt041126@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 27 Oct 2008 13:56:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184335 - in stable/7/sys: . kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 13:56:28 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 14:01:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9B5A1065670; Mon, 27 Oct 2008 14:01:23 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 980818FC22; Mon, 27 Oct 2008 14:01:23 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RE1N8n041282; Mon, 27 Oct 2008 14:01:23 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RE1NGF041281; Mon, 27 Oct 2008 14:01:23 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200810271401.m9RE1NGF041281@svn.freebsd.org> From: Randall Stewart Date: Mon, 27 Oct 2008 14:01:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184336 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:01:23 -0000 Author: rrs Date: Mon Oct 27 14:01:23 2008 New Revision: 184336 URL: http://svn.freebsd.org/changeset/base/184336 Log: Two inter-related bugs. - If we send EXACTLY the size left in the send buffer and then send again, we end up with exactly 0 bytes and don't hit the pre-block code to wait for more space. - If we fall into the loop with our max_len == 0 (the bug above) we then call in to copy out the data, setup the length of the waiting to transmit data to 0 and call the mbuf copy routine which 0 indicates copy all the data to the mbuf chain.. which it does. This then leaves a "stuck" message on the stream queue with its size exactly 0 bytes but all the data there and thus nothing left in the uio structure. We then reach a stuck forever state never being able to send data. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Oct 27 13:56:27 2008 (r184335) +++ head/sys/netinet/sctp_output.c Mon Oct 27 14:01:23 2008 (r184336) @@ -11682,7 +11682,12 @@ sctp_copy_it_in(struct sctp_tcb *stcb, sp->put_last_out = 0; resv_in_first = sizeof(struct sctp_data_chunk); sp->data = sp->tail_mbuf = NULL; + if (sp->length == 0) { + *error = 0; + goto skip_copy; + } *error = sctp_copy_one(sp, uio, resv_in_first); +skip_copy: if (*error) { sctp_free_a_strmoq(stcb, sp); sp = NULL; @@ -12443,7 +12448,8 @@ sctp_lower_sosend(struct socket *so, goto skip_preblock; } if (((max_len <= local_add_more) && - (SCTP_SB_LIMIT_SND(so) > local_add_more)) || + (SCTP_SB_LIMIT_SND(so) >= local_add_more)) || + (max_len == 0) || ((stcb->asoc.chunks_on_out_queue + stcb->asoc.stream_queue_cnt) >= SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue))) { /* if */ /* No room right now ! */ SOCKBUF_LOCK(&so->so_snd); @@ -13058,7 +13064,7 @@ skip_out_eof: (void)sctp_med_chunk_output(inp, stcb, &stcb->asoc, &num_out, &reason, 1, &cwnd_full, 1, &now, &now_filled, frag_point, SCTP_SO_LOCKED); } - SCTPDBG(SCTP_DEBUG_OUTPUT1, "USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d err:%d", + SCTPDBG(SCTP_DEBUG_OUTPUT1, "USR Send complete qo:%d prw:%d unsent:%d tf:%d cooq:%d toqs:%d err:%d\n", queue_only, stcb->asoc.peers_rwnd, un_sent, stcb->asoc.total_flight, stcb->asoc.chunks_on_out_queue, stcb->asoc.total_output_queue_size, error); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 14:22:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2861C1065676; Mon, 27 Oct 2008 14:22:35 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 14CEC8FC1E; Mon, 27 Oct 2008 14:22:35 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9REMYjq041726; Mon, 27 Oct 2008 14:22:34 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9REMYR7041724; Mon, 27 Oct 2008 14:22:34 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200810271422.m9REMYR7041724@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 27 Oct 2008 14:22:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184337 - in stable/7/sys: . dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:22:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 14:27:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AF7D1065671; Mon, 27 Oct 2008 14:27:44 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 47DE08FC1C; Mon, 27 Oct 2008 14:27:44 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RERiKH041852; Mon, 27 Oct 2008 14:27:44 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RERh36041850; Mon, 27 Oct 2008 14:27:43 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200810271427.m9RERh36041850@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 27 Oct 2008 14:27:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184338 - in stable/6/sys: . dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:27:44 -0000 Author: gallatin Date: Mon Oct 27 14:27:43 2008 New Revision: 184338 URL: http://svn.freebsd.org/changeset/base/184338 Log: Merge r183515 and r184211 (mxge firmware updates) into stable/6 Approved by: re (kensmith) Sponsored by: Myricom Inc Modified: stable/6/sys/ (props changed) stable/6/sys/dev/mxge/eth_z8e.h stable/6/sys/dev/mxge/ethp_z8e.h stable/6/sys/dev/mxge/mxge_mcp.h stable/6/sys/dev/mxge/rss_eth_z8e.h stable/6/sys/dev/mxge/rss_ethp_z8e.h Modified: stable/6/sys/dev/mxge/eth_z8e.h ============================================================================== --- stable/6/sys/dev/mxge/eth_z8e.h Mon Oct 27 14:22:34 2008 (r184337) +++ stable/6/sys/dev/mxge/eth_z8e.h Mon Oct 27 14:27:43 2008 (r184338) @@ -28,13151 +28,7074 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -/* Using zlib-1.1.3. gendat version $Name: $ */ -static unsigned int eth_z8e_uncompressed_length = 606168; -#define U (unsigned char) -static unsigned int eth_z8e_length = 52566; -static unsigned char eth_z8e[52566] = { -U 0x78,U 0xDA,U 0xEC,U 0xBD, -U 0x0F,U 0x74,U 0x54,U 0xD5, -U 0xB5,U 0x3F,U 0xBE,U 0x67, -U 0x32,U 0xC0,U 0x24,U 0x46, -U 0x26,U 0xDA,U 0x88,U 0x23, -U 0xA2,U 0x8E,U 0x16,U 0xDB, -U 0xC1,U 0x82,U 0x44,U 0x8B, -U 0x2D,U 0xFA,U 0xA0,U 0xC6, -U 0x0A,U 0x1A,U 0x6A,U 0x20, -U 0x51,U 0x40,U 0x63,U 0x4B, -U 0x0D,U 0x68,U 0xD0,U 0x80, -U 0x88,U 0x03,U 0x04,U 0x0C, -U 0x18,U 0x32,U 0x61,U 0xC0, -U 0x36,U 0xA1,U 0x40,U 0x52, -U 0x4D,U 0x35,U 0x92,U 0x90, -U 0xA4,U 0x4A,U 0x5B,U 0xBE, -U 0x88,U 0x85,U 0x56,U 0xEC, -U 0x0F,U 0x5B,U 0xD4,U 0xB1, -U 0xE0,U 0x93,U 0xDA,U 0x90, -U 0xA1,U 0xFD,U 0xF1,U 0xD6, -U 0x2F,U 0x52,U 0xFC,U 0x32, -U 0xF2,U 0x22,U 0x4D,U 0x79, -U 0x41,U 0x07,U 0x32,U 0x90, -U 0x18,U 0x26,U 0x73,U 0xBE, -U 0x9F,U 0x7D,U 0xCE,U 0xBD, -U 0x93,U 0x3B,U 0x93,U 0x3B, -U 0x41,U 0x5E,U 0xDF,U 0xFA, -U 0xFD,U 0xD6,U 0x6F,U 0xAD, -U 0x66,U 0xAD,U 0x93,U 0x3B, -U 0xF7,U 0x9C,U 0x7D,U 0xF6, -U 0xD9,U 0x7B,U 0x9F,U 0x7D, -U 0xF6,U 0xD9,U 0xE7,U 0xCF, -U 0x3D,U 0x87,U 0xE8,U 0x9F, -U 0xF8,U 0xB3,U 0xEE,U 0x72, -U 0xD1,U 0xBF,U 0xFE,U 0xFE, -U 0xF5,U 0xF7,U 0xAF,U 0xBF, -U 0x7F,U 0xFD,U 0xFD,U 0xEB, -U 0xEF,U 0x5F,U 0x7F,U 0xFF, -U 0xFA,U 0xFB,U 0xFF,U 0xDD, -U 0xDF,U 0x19,U 0xAB,U 0x8D, -U 0xFE,U 0x58,U 0x43,U 0xD4, -U 0xED,U 0xB3,U 0x3B,U 0x83, -U 0x96,U 0xCC,U 0x03,U 0x2F, -U 0xBD,U 0x20,U 0x22,U 0x88, -U 0xB6,U 0x04,U 0xC9,U 0xEE, -U 0xE4,U 0xA7,U 0x16,U 0xE8, -U 0x79,U 0xC4,U 0x5B,U 0x6B, -U 0xC8,U 0x7E,U 0x43,U 0x06, -U 0xA5,U 0xDF,U 0xBD,U 0x85, -U 0xA8,U 0x76,U 0x84,U 0xE8, -U 0x7C,U 0xE1,U 0x45,U 0x11, -U 0x5A,U 0xFB,U 0xA2,U 0xE8, -U 0x9C,U 0xF2,U 0x0B,U 0xA2, -U 0xFD,U 0xA3,U 0x89,U 0x5E, -U 0x18,U 0x21,U 0xC2,U 0xC0, -U 0x33,U 0x27,U 0x48,U 0x2B, -U 0x4B,U 0x18,U 0xCF,U 0x5A, -U 0xBC,U 0x73,U 0xFA,U 0xBA, -U 0x11,U 0x22,U 0x84,U 0xF8, -U 0x12,U 0xC4,U 0x77,U 0x72, -U 0xFC,U 0x9A,U 0x11,U 0xC0, -U 0x95,U 0x49,U 0xE4,U 0x7B, -U 0x51,U 0xF4,U 0x18,U 0xF0, -U 0xDA,U 0x38,U 0x7F,U 0x97, -U 0x8F,U 0x9C,U 0x61,U 0x2B, -U 0x59,U 0xC2,U 0x3E,U 0xFF, -U 0x15,U 0xC8,U 0xB3,U 0x0D, -U 0x74,U 0xB8,U 0x75,U 0x5C, -U 0x48,U 0x23,U 0x2D,U 0xCD, -U 0x82,U 0xB4,U 0xFD,U 0xF1, -U 0x69,U 0x19,U 0xA9,U 0x5A, -U 0x9A,U 0x15,U 0x69,U 0xC1, -U 0xF8,U 0x34,U 0xEB,U 0x34, -U 0x2D,U 0xED,U 0x12,U 0xA4, -U 0x45,U 0xE2,U 0xD3,U 0x6C, -U 0xCF,U 0x6B,U 0x69,U 0xE9, -U 0xDD,U 0xBE,U 0x54,U 0x67, -U 0x92,U 0xF2,U 0x2E,U 0x43, -U 0xDA,U 0x84,U 0x24,U 0x69, -U 0x97,U 0x23,U 0x2D,U 0x3F, -U 0x3E,U 0xED,U 0x9D,U 0x2C, -U 0x2D,U 0xED,U 0x4A,U 0xA4, -U 0x2D,U 0x8A,U 0x4F,U 0xB3, -U 0xE8,U 0xF9,U 0x9C,U 0x48, -U 0xAB,U 0xD4,U 0xD3,U 0x8C, -U 0x32,U 0x31,U 0xCA,U 0x7B, -U 0x99,U 0x53,U 0x44,U 0xBD, -U 0x57,U 0x91,U 0x4D,U 0xAC, -U 0xDF,U 0x4C,U 0x51,U 0x9F, -U 0xA0,U 0x40,U 0x69,U 0x0F, -U 0xB9,U 0x46,U 0x92,U 0xF7, -U 0x38,U 0xA5,U 0x76,U 0x00, -U 0x0F,U 0x6D,U 0x5A,U 0x45, -U 0x76,U 0xAF,U 0x47,U 0xF4, -U 0x04,U 0x4A,U 0x3B,U 0xA9, -U 0x35,U 0xD4,U 0x49,U 0xDE, -U 0x90,U 0xE8,U 0x08,U 0x44, -U 0xCE,U 0x52,U 0xF9,U 0x59, -U 0xB2,U 0x07,U 0x22,U 0xA7, -U 0xA8,U 0x7C,U 0x09,U 0x39, -U 0xF7,U 0x97,U 0x7D,U 0x4A, -U 0x66,U 0x32,U 0x8F,U 0x5A, -U 0x05,U 0x79,U 0x47,U 0x71, -U 0xDE,U 0x76,U 0x6A,U 0x6D, -U 0x68,U 0x27,U 0x6F,U 0x43, -U 0x7C,U 0x5E,U 0xEF,U 0x35, -U 0xE4,U 0x3C,U 0x88,U 0x77, -U 0xE1,U 0x23,U 0x47,U 0x49, -U 0x9D,U 0x88,U 0xEE,U 0x77, -U 0x45,U 0x28,U 0x92,U 0xB6, -U 0x99,U 0xCA,U 0x7E,U 0x41, -U 0x36,U 0xEF,U 0xF5,U 0x64, -U 0x3D,U 0x58,U 0xE4,U 0x27, -U 0xD7,U 0xD7,U 0x98,U 0x96, -U 0xB4,U 0x5D,U 0x4C,U 0xCB, -U 0xBA,U 0x85,U 0x64,U 0x7F, -U 0xF5,U 0x71,U 0xBF,U 0x55, -U 0xAC,U 0x7F,U 0x85,U 0x7E, -U 0xDD,U 0xDB,U 0x63,U 0x5D, -U 0x7B,U 0x92,U 0x6C,U 0xFB, -U 0x9C,U 0x53,U 0x68,U 0x9F, -U 0xF3,U 0x28,U 0x05,U 0xEA, -U 0x26,U 0x53,U 0x20,U 0x1C, -U 0xA1,U 0x4D,U 0x0B,U 0x29, -U 0x7D,U 0x5F,U 0x78,U 0x12, -U 0x05,U 0xD6,U 0x45,U 0x89, -U 0xF1,U 0x05,U 0x16,U 0x4D, -U 0xC2,U 0xF3,U 0x2C,U 0x60, -U 0x3A,U 0xC9,U 0xB5,U 0x94, -U 0xE8,U 0x04,U 0xA5,U 0x35, -U 0xD7,U 0x02,U 0x4F,U 0x50, -U 0xE1,U 0x44,U 0x3D,U 0xA7, -U 0xED,U 0x78,U 0xCF,U 0x43, -U 0xC4,U 0x32,U 0xE2,U 0xF7, -U 0x24,U 0xBA,U 0x93,U 0x01, -U 0xDD,U 0xE9,U 0x14,U 0xA0, -U 0x01,U 0x32,U 0xEE,U 0x6C, -U 0x1A,U 0x21,U 0x3A,U 0xBE, -U 0x5A,U 0x4B,U 0x99,U 0x80, -U 0xCF,U 0x40,U 0xFE,U 0xCE, -U 0xA0,U 0xF5,U 0xF9,U 0x1E, -U 0xCE,U 0x5F,U 0x8D,U 0xF8, -U 0xF1,U 0xB5,U 0x94,U 0xB1, -U 0xBB,U 0x3C,U 0x64,U 0xAB, -U 0x86,U 0x5E,U 0x3A,U 0x4A, -U 0xC9,U 0xE2,U 0x5A,U 0x45, -U 0x43,U 0x1C,U 0x11,U 0xB2, -U 0x80,U 0x87,U 0xBF,U 0x34, -U 0x21,U 0xEE,U 0xAB,U 0x99, -U 0x9C,U 0xE7,U 0x12,U 0x57, -U 0x90,U 0x1A,U 0x27,U 0x71, -U 0x1E,U 0x71,U 0xE5,U 0x0F, -U 0x4E,U 0x47,U 0xAF,U 0xFC, -U 0x41,U 0x28,U 0xFA,U 0xD2, -U 0x0F,U 0xCE,U 0x88,U 0x97, -U 0x7E,U 0xD0,U 0xD5,U 0xF7, -U 0xD2,U 0x0F,U 0xC2,U 0xDE, -U 0x95,U 0x64,U 0xEF,U 0xBB, -U 0xF2,U 0x07,U 0x67,U 0x5B, -U 0x3D,U 0x52,U 0x56,U 0x19, -U 0xAD,U 0x1E,U 0xC8,U 0xAA, -U 0x8F,U 0xEC,U 0xAB,U 0x4F, -U 0x51,U 0xC6,U 0x23,U 0x4B, -U 0x50,U 0x47,U 0x91,U 0x8F, -U 0x69,U 0xF5,U 0x02,U 0x72, -U 0x46,U 0x53,U 0x9B,U 0xF7, -U 0x04,U 0x22,U 0xFF,U 0x41, -U 0x8F,U 0x94,U 0x91,U 0xC0, -U 0xEF,U 0x03,U 0x66,U 0xB4, -U 0x77,U 0xA5,U 0xBD,U 0x92, -U 0xAD,U 0x74,U 0xC9,U 0x8E, -U 0x36,U 0x78,U 0x49,U 0x5D, -U 0xD0,U 0xFA,U 0x82,U 0x93, -U 0xCB,U 0xED,U 0x4A,U 0xDB, -U 0xAE,U 0xC5,U 0x4B,U 0x7A, -U 0x76,U 0xE9,U 0xF1,U 0x22, -U 0xED,U 0x95,U 0x5C,U 0xD4, -U 0x87,U 0x77,U 0xF8,U 0x1A, -U 0x0B,U 0x35,U 0xF6,U 0x12, -U 0x8D,U 0x8F,U 0x92,U 0xE5, -U 0x24,U 0x5D,U 0xB2,U 0x17, -U 0xBC,U 0x64,U 0x18,U 0xF1, -U 0x3F,U 0x30,U 0xF5,U 0xC1, -U 0xC9,U 0x94,U 0x75,U 0xFB, -U 0xB8,U 0xAC,U 0x6F,U 0x7E, -U 0x7B,U 0xE2,U 0x37,U 0x69, -U 0xFA,U 0x5D,U 0x77,U 0x4F, -U 0xA6,U 0xFC,U 0x87,U 0x1E, -U 0xC0,U 0xBF,U 0x19,U 0x93, -U 0xA9,U 0xE0,U 0x9E,U 0x69, -U 0xF8,U 0x71,U 0xF7,U 0xE4, -U 0x5B,U 0xB2,U 0xEE,U 0x1D, -U 0x97,U 0x7F,U 0xF7,U 0xB4, -U 0xA9,U 0xE3,U 0x26,U 0xDE, -U 0x45,U 0xF7,U 0xCF,U 0xBA, -U 0x35,U 0xEB,U 0xD6,U 0x5B, -U 0xE9,U 0xAE,U 0xA9,U 0xB9, -U 0xB7,U 0x64,U 0x65,U 0x69, -U 0xCF,U 0x5B,U 0xB2,U 0x68, -U 0xDC,U 0xDD,U 0x94,U 0x8B, -U 0x30,U 0x6E,U 0x1A,U 0x8D, -U 0xBB,U 0x1F,U 0xBF,U 0xEE, -U 0xA7,U 0x71,U 0x0F,U 0xD0, -U 0x54,U 0x84,U 0x5C,U 0x04, -U 0xA3,U 0x4D,U 0x70,U 0x8A, -U 0x15,U 0x51,U 0x82,U 0xDC, -U 0xC3,U 0xE2,U 0x7C,U 0x0E, -U 0x71,U 0x3D,U 0xF8,U 0xCB, -U 0xCF,U 0xA0,U 0x2E,U 0xD3, -U 0xFF,U 0x03,U 0x71,U 0x21, -U 0xA5,U 0xF7,U 0x97,U 0xB4, -U 0x81,U 0x17,U 0x5B,U 0xB7, -U 0x2F,U 0xBD,U 0x0C,U 0xBC, -U 0x14,U 0x30,U 0x2F,U 0xAE, -U 0x1B,U 0xB8,U 0xBE,U 0x2F, -U 0xCD,U 0xD9,U 0xD7,U 0x4C, -U 0x84,U 0xFA,U 0x08,U 0x33, -U 0xAF,U 0x29,U 0x65,U 0x12, -U 0xA6,U 0x59,U 0xAF,U 0x33, -U 0x91,U 0xB6,U 0xD9,U 0x1D, -U 0x7E,U 0xB6,U 0x38,U 0x65, -U 0xAD,U 0xB4,U 0x2D,U 0xE9, -U 0x7B,U 0x82,U 0xD6,U 0x5A, -U 0x97,U 0xAC,U 0x4B,U 0xC0, -U 0xEF,U 0x2F,U 0xCB,U 0x26, -U 0xF1,U 0x6A,U 0x8E,U 0xC5, -U 0xE6,U 0x42,U 0x3D,U 0x96, -U 0x33,U 0xAE,U 0xF4,U 0xA2, -U 0x5A,U 0xA6,U 0xC1,U 0xBE, -U 0x3D,U 0x1F,U 0xF5,U 0xCA, -U 0xB8,U 0x09,U 0xCF,U 0x14, -U 0x51,U 0xB9,U 0x7D,U 0x96, -U 0x4A,U 0xBF,U 0xD4,U 0x22, -U 0xDF,U 0xAD,U 0x08,U 0xA9, -U 0x12,U 0x26,U 0xE5,U 0x04, -U 0x65,U 0x64,U 0xB0,U 0x8D, -U 0xEB,U 0x87,U 0xC9,U 0xC8, -U 0x00,U 0xAD,U 0x1F,U 0xA3, -U 0xBC,U 0x10,U 0x68,U 0x0F, -U 0x76,U 0xFB,U 0x2E,U 0x1D, -U 0x8B,U 0x32,U 0x0B,U 0x34, -U 0xFD,U 0x09,U 0x6A,U 0x34, -U 0xDF,U 0x25,U 0xF3,U 0x58, -U 0xC9,U 0x1A,U 0x04,U 0x3C, -U 0x70,U 0xCD,U 0xD2,U 0x78, -U 0x3C,U 0xA1,U 0x78,U 0xBC, -U 0x74,U 0x6E,U 0x02,U 0x8F, -U 0x95,U 0x48,U 0xFB,U 0x2F, -U 0xA6,U 0x59,U 0xF1,U 0x77, -U 0x69,U 0x05,U 0xF4,U 0x7B, -U 0x2F,U 0xA7,U 0x07,U 0x29, -U 0x7D,U 0x1B,U 0xE3,U 0xE2, -U 0xFC,U 0x5A,U 0xDE,U 0x86, -U 0x84,U 0xBC,U 0x07,U 0xA4, -U 0x7C,U 0x54,U 0x7A,U 0x5A, -U 0x4A,U 0xA9,U 0x84,U 0xF1, -U 0xEB,U 0xF2,U 0xE1,U 0xFC, -U 0xE1,U 0xD4,U 0xDD,U 0x35, -U 0x5A,U 0xF9,U 0x21,U 0xC0, -U 0xA4,U 0x20,U 0x3D,U 0x98, -U 0x80,U 0x23,U 0x82,U 0xB4, -U 0x30,U 0x97,U 0x0F,U 0x5D, -U 0x4F,U 0xE1,U 0x3C,U 0x4D, -U 0x2F,U 0xAA,U 0x7A,U 0x51, -U 0x65,U 0x0E,U 0xCF,U 0x88, -U 0x87,U 0x1F,U 0xDE,U 0x0C, -U 0xF8,U 0x2F,U 0xAA,U 0x25, -U 0xCE,U 0x74,U 0x3B,U 0x74, -U 0xCB,U 0x06,U 0x59,U 0x74, -U 0xEE,U 0x2B,U 0xE5,U 0x7E, -U 0x62,U 0xF8,U 0x24,U 0x5D, -U 0x1E,U 0x1A,U 0x6C,U 0x3E, -U 0xF4,U 0xD1,U 0xCA,U 0x38, -U 0x45,U 0x95,U 0x94,U 0x43, -U 0x27,U 0xF2,U 0x38,U 0x00, -U 0x57,U 0x94,U 0x00,U 0x57, -U 0xCA,U 0x72,U 0x97,U 0x70, -U 0xA9,U 0x31,U 0x38,U 0xD8, -U 0xC7,U 0xE1,U 0x1B,U 0x12, -U 0xE0,U 0x3C,U 0x80,U 0x43, -U 0xFF,U 0x33,U 0x3C,U 0x07, -U 0x78,U 0x6D,U 0x1A,U 0x8D, -U 0xC3,U 0x01,U 0xB7,U 0x3B, -U 0x9E,U 0xC6,U 0xF4,U 0x6D, -U 0xA8,U 0xEB,U 0x0E,U 0xE6, -U 0x09,U 0x78,U 0xAE,U 0x03, -U 0x8C,U 0x15,U 0xBC,U 0x0D, -U 0x07,U 0x5F,U 0xED,U 0xFB, -U 0xCA,U 0x24,U 0x9D,U 0xED, -U 0x09,U 0x3C,U 0x41,U 0x06, -U 0xE9,U 0x37,U 0x28,U 0xDC, -U 0x92,U 0x86,U 0x7C,U 0xE0, -U 0x6E,U 0x57,U 0xF2,U 0x72, -U 0x24,U 0xF2,U 0x7F,U 0x96, -U 0xE1,U 0x38,U 0x1D,U 0x79, -U 0xBE,U 0xC6,U 0xB8,U 0x01, -U 0x33,U 0x21,U 0x1E,U 0xC6, -U 0x21,U 0xE9,U 0xD3,U 0xF8, -U 0xCE,U 0xD7,U 0x60,U 0xC7, -U 0x68,U 0xB0,U 0x09,U 0xF5, -U 0xEF,U 0x28,U 0x41,U 0xDA, -U 0x58,U 0xF0,U 0x14,U 0x66, -U 0x9D,U 0x31,U 0x94,U 0x5B, -U 0x69,U 0x52,U 0xAE,U 0x55, -U 0xC3,U 0x95,U 0xA5,U 0xE1, -U 0xDA,U 0x91,U 0x80,U 0xCB, -U 0x8F,U 0xB4,U 0x6F,U 0x06, -U 0xC9,U 0x91,U 0x8D,U 0xF2, -U 0x53,U 0x0C,U 0xB8,U 0x0E, -U 0x27,U 0xC0,U 0xDD,U 0xA5, -U 0xA7,U 0x03,U 0xFE,U 0xDB, -U 0x1A,U 0x4C,U 0x8F,U 0x19, -U 0x0C,U 0xDB,U 0x45,U 0x5D, -U 0x26,U 0x66,U 0x36,U 0xEA, -U 0xBC,U 0x35,U 0xF3,U 0x3D, -U 0xF4,U 0x3F,U 0x69,U 0xE7, -U 0xBD,U 0x6E,U 0x12,U 0x95, -U 0x9B,U 0x9D,U 0xE3,U 0x30, -U 0xF2,U 0x1F,U 0x5B,U 0x41, -U 0xA9,U 0x81,U 0xC8,U 0x61, -U 0xCA,U 0x8B,U 0x88,U 0x3E, -U 0x84,U 0xF3,U 0x63,U 0x88, -U 0x2E,U 0x0B,U 0x44,U 0x5A, -U 0xE8,U 0xEB,U 0x44,U 0xD7, -U 0x07,U 0x22,U 0xB5,U 0xB0, -U 0x81,U 0x25,U 0x9C,U 0xF6, -U 0xEE,U 0x57,U 0xC9,U 0x62, -U 0xC1,U 0xD3,U 0x3B,U 0xA6, -U 0xC2,U 0x6A,U 0x09,U 0x44, -U 0x26,U 0x20,U 0xBE,U 0x81, -U 0x46,U 0x93,U 0xCD,U 0x72, -U 0xCF,U 0x73,U 0xA2,U 0x3B, -U 0x10,U 0x99,U 0x82,U 0xF7, -U 0x45,U 0x54,U 0xD8,U 0x47, -U 0x19,U 0xB9,U 0x43,U 0x84, -U 0x37,U 0xAF,U 0x4F,U 0x1C, -U 0xBB,U 0x67,U 0x48,U 0x54, -U 0x04,U 0x22,U 0xFB,U 0x11, -U 0x5F,U 0x44,U 0x79,U 0x7D, -U 0x5F,U 0x88,U 0xBC,U 0xBE, -U 0x6E,U 0x84,U 0xCF,U 0x11, -U 0x8E,U 0x21,U 0xBC,U 0x8B, -U 0xE0,U 0x15,U 0xA2,U 0x6A, -U 0xB3,U 0xF3,U 0x3C,U 0x6C, -U 0x23,U 0x68,U 0x72,U 0x9F, -U 0x17,U 0xC5,U 0x68,U 0xDF, -U 0x9B,U 0xDD,U 0xB0,U 0x95, -U 0x02,U 0xB6,U 0x62,U 0x62, -U 0x20,U 0x32,U 0x09,U 0xF8, -U 0xAC,U 0x04,U 0x18,U 0xF7, -U 0xF9,U 0xF3,U 0x48,U 0x5B, -U 0xBF,U 0xF9,U 0xDB,U 0x12, -U 0x26,U 0x6D,U 0xF3,U 0xB7, -U 0xE4,U 0x7B,U 0xE5,U 0xE6, -U 0x1C,U 0x61,U 0xDF,U 0x3C, -U 0x71,U 0x5C,U 0x05,U 0x0D, -U 0x63,U 0xFA,U 0xA3,U 0xD0, -U 0xFF,U 0x40,U 0x04,U 0xFD, -U 0x53,U 0xE4,U 0x53,U 0xCA, -U 0x5B,U 0x19,U 0x12,U 0xCC, -U 0xC3,U 0xF0,U 0x35,U 0x02, -U 0xBF,U 0xDF,U 0x15,U 0xC3, -U 0xC3,U 0xE4,U 0xC8,U 0x5B, -U 0xE9,U 0x15,U 0x85,U 0x11, -U 0xB2,U 0x8B,U 0x54,U 0xC6, -U 0xDD,U 0xC9,U 0x78,U 0x73, -U 0x80,U 0x6B,U 0xAA,U 0x86, -U 0xAB,U 0x18,U 0xB0,U 0x21, -U 0x86,U 0x63,U 0x5C,U 0x3A, -U 0x1E,U 0xC6,U 0xC1,U 0xB0, -U 0x79,U 0x7D,U 0xE4,U 0x00, -U 0x7C,U 0xF1,U 0xF9,U 0xAA, -U 0xCD,U 0x05,U 0x08,U 0xA5, -U 0x08,U 0xDB,U 0x90,U 0xF7, -U 0xF7,U 0xE7,U 0x9F,U 0x95, -U 0x72,U 0x3C,U 0x80,U 0xDF, -U 0x6D,U 0x3D,U 0x3E,U 0xB2, -U 0x48,U 0x39,U 0xF6,U 0xD1, -U 0x30,U 0xC0,U 0x1E,U 0xE8, -U 0xF6,U 0xD1,U 0x94,U 0x6E, -U 0x45,U 0x77,U 0x8F,U 0xA4, -U 0x7B,U 0xFD,U 0xE6,U 0xEE, -U 0x1E,U 0x45,U 0xFF,U 0x39, -U 0x8D,U 0x9F,U 0xB3,U 0x1C, -U 0x1F,U 0xF6,U 0xD1,U 0x10, -U 0xB1,U 0xBE,U 0xDE,U 0x19, -U 0x96,U 0x69,U 0xF5,U 0x68, -U 0x47,U 0x34,U 0x4B,U 0xE6, -U 0xAB,U 0xAC,U 0x77,U 0x0A, -U 0x7B,U 0xBD,U 0x3B,U 0x8A, -U 0x7A,U 0x85,U 0x3C,U 0x2B, -U 0x58,U 0x96,U 0x90,U 0x6F, -U 0x05,U 0xFB,U 0x07,U 0x2C, -U 0x53,U 0x51,U 0x85,U 0xF4, -U 0xD4,U 0x7A,U 0xF7,U 0xF9, -U 0xAA,U 0xFA,U 0x89,U 0xC8, -U 0xFF,U 0xBD,U 0xF3,U 0x02, -U 0xB4,U 0xA4,U 0xD5,U 0x17, -U 0xF4,U 0x48,U 0xDC,U 0xF5, -U 0x0F,U 0x01,U 0xCF,U 0x9C, -U 0x6E,U 0xC6,U 0x69,U 0xAF, -U 0x2F,U 0x00,U 0xAE,U 0xE2, -U 0x5E,U 0xAB,U 0x0B,U 0xB2, -U 0x10,U 0x3D,U 0x79,U 0x91, -U 0x35,U 0x91,U 0xC2,U 0x95, -U 0x64,U 0x0D,U 0x44,U 0x7E, -U 0x41,U 0x6E,U 0xAA,U 0xB0, -U 0x04,U 0x4A,U 0x17,U 0x01, -U 0xDF,U 0x3A,U 0x4E,U 0x3B, -U 0x96,U 0xB7,U 0x92,U 0x2E, -U 0x47,U 0x59,U 0xEF,U 0x02, -U 0x6F,U 0x01,U 0x97,U 0x87, -U 0x32,U 0x8A,U 0x81,U 0x73, -U 0x3E,U 0x70,U 0x15,U 0x31, -U 0x4D,U 0xBD,U 0x3E,U 0xCA, -U 0xC0,U 0x7B,U 0x69,U 0xAF, -U 0xA2,U 0xAF,U 0x2E,U 0x5A, -U 0x59,U 0xBF,U 0x27,U 0x6A, -U 0xAF,U 0xDF,U 0x66,U 0xD4, -U 0x1F,U 0x25,U 0x33,U 0xD6, -U 0x9B,U 0xD7,U 0x39,U 0x2E, -U 0x43,U 0xD7,U 0x95,U 0xBE, -U 0xCA,U 0xFA,U 0xCA,U 0x6F, -U 0x10,U 0x65,U 0xCC,U 0x08, -U 0x8B,U 0x08,U 0xEB,U 0xCB, -U 0x78,U 0xF2,U 0x58,U 0x5A, -U 0xC3,U 0x2D,U 0x54,U 0x18, -U 0xB1,U 0x53,U 0xAB,U 0x67, -U 0x37,U 0x8D,U 0xA9,U 0x60, -U 0x5F,U 0x25,U 0x4C,U 0xAD, -U 0xE1,U 0x5A,U 0xBC,U 0x6F, -U 0x24,U 0xA6,U 0xAF,U 0x35, -U 0x5C,U 0x42,U 0x07,U 0x3B, -U 0x1B,U 0x68,U 0x86,U 0x27, -U 0xBC,U 0xA6,U 0xCF,U 0xDE, -U 0x60,U 0x3F,U 0xD8,U 0x39, -U 0x9D,U 0x90,U 0xFF,U 0x5D, -U 0xD0,U 0x18,U 0x7D,U 0xC4, -U 0x63,U 0xAB,U 0xF8,U 0xDE, -U 0x10,U 0x11,U 0x6A,U 0xF5, -U 0x84,U 0x39,U 0xCE,U 0x7B, -U 0xB0,U 0x13,U 0x7A,U 0xDA, -U 0x27,U 0xFA,U 0x22,U 0x95, -U 0xF5,U 0xA5,U 0x11,U 0x7B, -U 0x83,U 0x73,U 0x7A,U 0x67, -U 0xC5,U 0x90,U 0xD6,U 0xF0, -U 0x56,U 0x8E,U 0x3B,U 0xEF, -U 0xB0,U 0x88,U 0x88,U 0xA3, -U 0xD4,U 0x2B,U 0x0E,U 0x76, -U 0xAE,U 0xA3,U 0x47,U 0xCE, -U 0x92,U 0xE5,U 0x60,U 0xF1, -U 0x6E,U 0xA9,U 0xAF,U 0x8F, -U 0x78,U 0x3C,U 0x24,U 0xF3, -U 0x9F,U 0x8D,U 0x38,U 0x7E, -U 0xD8,U 0x59,U 0x41,U 0x3F, -U 0x2C,U 0xA6,U 0xE1,U 0x80, -U 0xFF,U 0x9C,U 0xF5,U 0x57, -U 0x0C,U 0xAF,U 0xA0,U 0x96, -U 0xF6,U 0x22,U 0x9A,U 0x7E, -U 0x2A,U 0x92,U 0x32,U 0x03, -U 0x35,U 0xD5,U 0x32,U 0xB7, -U 0x96,U 0x0E,U 0x16,U 0xD7, -U 0xB2,U 0x4C,U 0xEA,U 0xD8, -U 0x5F,U 0x98,U 0x7E,U 0xAA, -U 0x4B,U 0xCC,U 0x38,U 0xDB, -U 0x2D,U 0x0E,U 0x16,U 0xBF, -U 0x4E,U 0x2D,U 0x73,U 0x77, -U 0x53,U 0xEE,U 0xA7,U 0x7E, -U 0x47,U 0x5F,U 0x55,U 0x7D, -U 0x65,U 0x34,U 0xB5,U 0x7E, -U 0x5B,U 0xB4,U 0xAA,U 0x7E, -U 0x4F,U 0xA4,U 0xAA,U 0xBE, -U 0xB4,U 0x2F,U 0xB5,U 0xC1, -U 0x1E,U 0x49,U 0x6D,U 0x70, -U 0x8A,U 0xF5,U 0x0D,U 0x95, -U 0x90,U 0x61,U 0xAA,U 0xAC, -U 0x8F,U 0xB4,U 0x86,U 0x1F, -U 0xE1,U 0xF7,U 0x28,U 0x59, -U 0xC7,U 0xF6,U 0x86,U 0x3A, -U 0x51,U 0xD9,U 0xB0,U 0xE7, -U 0x7C,U 0x55,U 0xC3,U 0xB6, -U 0x40,U 0xE9,U 0x24,U 0x12, -U 0xA9,U 0x0D,U 0x75,U 0xAC, -U 0xF7,U 0xA2,U 0xAA,U 0x61, -U 0x0F,U 0xE0,U 0xF6,U 0x28, -U 0x3D,U 0x69,U 0x38,U 0xC0, -U 0x7A,U 0x02,U 0x98,U 0x36, -U 0x84,U 0x0E,U 0xB1,U 0x7E, -U 0x4B,U 0x0E,U 0xF2,U 0x5F, -U 0xA6,U 0x70,U 0x6D,U 0xB9, -U 0x97,U 0x61,U 0xA2,U 0xF6, -U 0x2D,U 0x39,U 0xD1,U 0xCA, -U 0x2D,U 0x05,U 0xC2,U 0xBE, -U 0xA5,U 0x98,U 0x6D,U 0xF8, -U 0x8C,U 0x25,U 0x3D,U 0x90, -U 0x5D,U 0x03,U 0x7C,U 0x4C, -U 0x0E,U 0x7D,U 0xF8,U 0xDD, -U 0x47,U 0x7D,U 0x3E,U 0x1A, -U 0xF6,U 0xC8,U 0x12,U 0xF2, -U 0x8A,U 0x77,U 0x6A,U 0x68, -U 0xC6,U 0x92,U 0x77,U 0x45, -U 0xA0,U 0xF4,U 0x28,U 0xE2, -U 0x8F,U 0xCA,U 0xF4,U 0x19, -U 0x4B,U 0xBC,U 0x02,U 0x72, -U 0x71,U 0x44,U 0x53,U 0x81, -U 0xA7,U 0x0A,U 0x78,U 0x52, -U 0x81,U 0x67,U 0x7D,U 0x63, -U 0x5A,U 0x0F,U 0xEB,U 0x54, -U 0x65,U 0xA3,U 0x5D,U 0xD8, -U 0x1B,U 0x8B,U 0xA3,U 0x43, -U 0x09,U 0x32,U 0xDB,U 0x4A, -U 0xD1,U 0x77,U 0x84,U 0x50, -U 0x6D,U 0xA3,U 0x13,U 0xFA, -U 0x38,U 0xB2,U 0xA2,U 0xB0, -U 0x94,U 0x9A,U 0x45,U 0x15, -U 0x60,U 0x52,U 0x1B,U 0x91, -U 0xA7,U 0x79,U 0xBB,U 0xEC, -U 0x93,U 0xA5,U 0x7D,U 0x69, -U 0xDE,U 0x76,U 0xBE,U 0xAA, -U 0xF9,U 0x00,U 0xC2,U 0x1E, -U 0xCE,U 0xA7,U 0xE7,U 0x11, -U 0x55,U 0xCD,U 0xDB,U 0xE2, -U 0x7D,U 0x64,U 0x1B,U 0xBA, -U 0xCD,U 0x21,U 0x76,U 0xA2, -U 0xA1,U 0x08,U 0xC3,U 0xEC, -U 0xBA,U 0xAD,U 0xEA,U 0xF6, -U 0x65,U 0x1E,U 0x0D,U 0xD2, -U 0x7B,U 0x5B,U 0xD9,U 0xC6, -U 0xE1,U 0x37,U 0xEC,U 0xDA, -U 0x1F,U 0x4B,U 0xB5,U 0xDF, -U 0xE1,U 0x20,U 0x6D,U 0x1B, -U 0x2D,U 0x7D,U 0x0A,U 0xD8, -U 0x30,U 0x4F,U 0x39,U 0x5D, -U 0x71,U 0x92,U 0xAE,U 0xD8, -U 0x06,U 0xFE,U 0x08,U 0xBF, -U 0xD3,U 0xF1,U 0x7B,U 0x47, -U 0xDE,U 0x98,U 0x77,U 0x45, -U 0xB4,U 0xF2,U 0x58,U 0x01, -U 0xEA,U 0xB1,U 0x9B,U 0x6D, -U 0x8C,U 0xF0,U 0x4D,U 0x40, -U 0x3F,U 0x42,U 0xD9,U 0xDD, -U 0xDD,U 0xC5,U 0x76,U 0xD1, -U 0xED,U 0x4E,U 0x17,U 0x69, -U 0xDB,U 0xCB,U 0xC5,U 0x79, -U 0x27,U 0xFB,U 0x7A,U 0x0E, -U 0xBC,U 0x0F,U 0x87,U 0xCC, -U 0x46,U 0xE3,U 0x79,U 0xF9, -U 0x96,U 0x73,U 0x94,U 0x89, -U 0xE0,U 0xDC,U 0xE2,U 0x8B, -U 0x56,U 0x70,U 0x5F,U 0x8E, -U 0xDF,U 0x59,U 0xE2,U 0x19, -U 0x67,U 0xDA,U 0xA6,U 0x15, -U 0x34,U 0xD6,U 0x11,U 0x26, -U 0x7B,U 0x93,U 0x2F,U 0x5A, -U 0xE0,U 0x58,U 0x93,U 0x41, -U 0xE8,U 0x9F,U 0x32,U 0xF9, -U 0xB7,U 0xF0,U 0xED,U 0xC8, -U 0x69,U 0x3A,U 0x47,U 0x36, -U 0xF6,U 0x3F,U 0xA3,U 0xA9, -U 0x28,U 0xAF,U 0xD4,U 0x21, -U 0xC4,U 0x32,U 0x37,U 0x35, -U 0x2D,U 0x85,U 0x9D,U 0xF1, -U 0x91,U 0xBB,U 0xC9,U 0x27, -U 0x76,U 0xF5,U 0x75,U 0xBB, -U 0xAD,U 0x4C,U 0xA7,U 0x4E, -U 0x0B,U 0xD3,U 0x06,U 0x3A, -U 0xAF,U 0x01,U 0x9D,U 0x7B, -U 0x67,U 0xAF,U 0xCC,U 0xA6, -U 0xF7,U 0xD1,U 0x17,U 0x9B, -U 0xD9,U 0xEA,U 0x6E,U 0xDF, -U 0x15,U 0x31,U 0xFE,U 0x93, -U 0xA4,U 0x47,U 0x74,U 0x99, -U 0x98,U 0xA7,U 0x8F,U 0x18, -U 0xA5,U 0xCB,U 0x29,U 0xD9, -U 0x38,U 0x8D,U 0xDB,U 0x70, -U 0xDF,U 0x0A,U 0x11,U 0xAA, -U 0x5E,U 0x48,U 0x2C,U 0x0B, -U 0xA7,U 0x37,U 0x22,U 0xFE, -U 0x13,U 0x72,U 0xAC,U 0x28, -U 0xEF,U 0xA3,U 0x6B,U 0xF2, -U 0x56,U 0x5E,U 0x27,U 0x02, -U 0x9D,U 0xC2,U 0x1F,U 0x28, -U 0x3D,U 0x45,U 0x4D,U 0x48, -U 0x2F,U 0x2F,U 0x13,U 0x51, -U 0xF4,U 0x8F,U 0x45,U 0x5D, -U 0x2B,U 0x44,U 0x64,U 0x0B, -U 0xFA,U 0xEA,U 0x68,U 0xEA, -U 0xF6,U 0x62,U 0x94,U 0x01, -U 0xFF,U 0xC7,U 0xBD,U 0x5B, -U 0xD5,U 0x45,U 0x7D,U 0xDD, -U 0x46,U 0xEE,U 0xC3,U 0xED, -U 0xDB,U 0x8B,U 0x80,U 0xEB, -U 0x32,U 0xC6,U 0x75,U 0x10, -U 0xF9,U 0xFB,U 0xAA,U 0xB6, -U 0x2F,U 0x02,U 0x1C,U 0xC6, -U 0x7F,U 0xAD,U 0xEB,U 0x06, -U 0x8C,U 0x8F,U 0xE4,U 0x88, -U 0x94,U 0x20,U 0x6B,U 0xC3, -U 0xF4,U 0x33,U 0xC7,U 0xD9, -U 0x0C,U 0x03,U 0x5B,U 0xF6, -U 0xEA,U 0xB2,U 0xCD,U 0x93, -U 0x75,U 0x5E,U 0xD0,U 0x86, -U 0x9C,U 0x5D,U 0xF0,U 0x55, -U 0xBD,U 0xAB,U 0x69,U 0x14, -U 0x64,U 0x7B,U 0xF5,U 0x49, -U 0xBA,U 0xF2,U 0x1A,U 0x6F, -U 0xA9,U 0x38,U 0x21,U 0x7C, -U 0x23,U 0x76,U 0xBF,U 0xBA, -U 0xAA,U 0x07,U 0x7D,U 0xEF, -U 0x95,U 0xEE,U 0x20,U 0xD5, -U 0x76,U 0x24,U 0x93,U 0x85, -U 0x60,U 0x3B,U 0x76,U 0x0E, -U 0x3E,U 0xC8,U 0x8A,U 0x98, -U 0x1C,U 0x3E,U 0xC9,U 0x5B, -U 0x19,U 0x15,U 0xFC,U 0x9B, -U 0xDB,U 0x47,U 0x13,U 0xE2, -U 0x99,U 0x6F,U 0xE0,U 0xF1, -U 0xE8,U 0xFC,U 0x26,U 0x97, -U 0xE9,U 0xF6,U 0x52,U 0xE5, -U 0x7F,U 0x5E,U 0x79,U 0x48, -U 0x60,U 0x9C,U 0xE7,U 0xBF, -U 0x36,U 0xC2,U 0xBF,U 0xFF, -U 0xA2,U 0x7C,U 0xD3,U 0x86, -U 0x6D,U 0x5D,U 0x68,U 0xF3, -U 0x3C,U 0xC6,U 0x80,U 0x7F, -U 0x13,U 0xC6,U 0x98,U 0xB0, -U 0x07,U 0x38,U 0x31,U 0xFE, -U 0xBD,U 0xAE,U 0x40,U 0xF7, -U 0x85,U 0x03,U 0x91,U 0xA9, -U 0xDC,U 0xFE,U 0xB7,U 0x25, -U 0xC1,U 0x9F,U 0xD9,U 0x8F, -U 0x7F,U 0xA4,U 0x5F,U 0xC3, -U 0xB9,U 0x47,U 0xD8,U 0x77, -U 0x1F,U 0x2E,U 0x57,U 0x74, -U 0xF7,U 0x94,U 0x87,U 0x45, -U 0x07,U 0xE3,U 0x66,U 0xBF, -U 0xBD,U 0x1D,U 0x30,U 0x8D, -U 0xF0,U 0x0F,U 0x45,U 0xE5, -U 0xEE,U 0x03,U 0x9B,U 0x38, -U 0x6E,U 0x45,U 0x2F,U 0xC7, -U 0xBD,U 0x07,U 0xDD,U 0x14, -U 0x8A,U 0xAE,U 0x91,U 0xEF, -U 0x41,U 0x6E,U 0x57,U 0xC2, -U 0x6F,U 0x08,U 0xF9,U 0x57, -U 0xF5,U 0xD2,U 0x89,U 0x32, -U 0x4A,U 0xE1,U 0xB1,U 0x53, -U 0xB7,U 0xCF,U 0x59,U 0x10, -U 0xA4,U 0x09,U 0xB9,U 0x72, -U 0xFC,U 0xE2,U 0xA3,U 0xED, -U 0x5D,U 0xD6,U 0xD9,U 0xB3, -U 0x11,U 0x87,U 0xF1,U 0xEF, -U 0x6D,U 0x1E,U 0x19,U 0x67, -U 0x25,U 0x8C,U 0xE9,U 0x9D, -U 0x65,U 0x31,U 0x18,U 0xE0, -U 0xC0,U 0xFB,U 0x06,U 0x43, -U 0x9E,U 0xD9,U 0x5D,U 0xD6, -U 0x9B,U 0xB6,U 0x23,U 0xAE, -U 0x39,U 0x21,U 0xCF,U 0xAE, -U 0x84,U 0x3C,U 0x7E,U 0xFD, -U 0x1D,U 0xF4,U 0x75,U 0xBA, -U 0x56,U 0x48,U 0xBE,U 0xD6, -U 0x20,U 0x3F,U 0xFC,U 0x56, -U 0xAA,U 0xD0,U 0xCA,U 0x6D, -U 0x4F,U 0xC0,U 0x11,U 0x8E, -U 0xC7,U 0x71,U 0x95,U 0x6D, -U 0x20,U 0xAD,U 0x57,U 0x39, -U 0xE3,U 0xF3,U 0x5C,U 0xE5, -U 0x4E,U 0xC8,U 0x33,U 0x71, -U 0x20,U 0xAD,U 0x57,U 0xE5, -U 0x26,U 0xE4,U 0x99,U 0x93, -U 0x90,U 0x67,U 0x91,U 0xFE, -U 0xAE,U 0xCD,U 0x1B,U 0x64, -U 0x21,U 0xAE,U 0x22,U 0x21, -U 0x4F,U 0x4D,U 0x42,U 0x9E, -U 0x66,U 0xC3,U 0xFB,U 0x57, -U 0xF0,U 0x1E,U 0xE3,U 0x9F, -U 0xEB,U 0x1A,U 0x7D,U 0xBB, -U 0xE0,U 0xB1,U 0x21,U 0xF4, -U 0x96,U 0x75,U 0xB8,U 0x8E, -U 0xED,U 0x23,U 0x8F,U 0xDB, -U 0x97,U 0x95,U 0x89,U 0x1E, -U 0xE8,U 0x40,U 0x1D,U 0xE0, -U 0x83,U 0x3A,U 0x7E,U 0x5D, -U 0x77,U 0x24,U 0xBC,U 0xD2, -U 0x9F,U 0x0E,U 0xA5,U 0x3F, -U 0x23,U 0x6D,U 0x31,U 0x18, -U 0xB8,U 0x4B,U 0xFB,U 0x5D, -U 0x61,U 0x82,U 0x2C,U 0x3B, -U 0x50,U 0xA7,U 0x9D,U 0x81, -U 0xF0,U 0x54,U 0x52,U 0xE3, -U 0xA7,U 0x91,U 0x39,U 0xAC, -U 0x53,U 0x7A,U 0x99,U 0x8E, -U 0x32,U 0xA5,U 0x37,U 0x3C, -U 0xFE,U 0xD5,U 0xCB,U 0x0C, -U 0x42,U 0x57,U 0xB8,U 0xDF, -U 0x31,U 0xE8,U 0x67,U 0x3B, -U 0x97,U 0xA5,U 0x95,U 0x51, -U 0xAC,U 0x97,U 0x01,U 0xDC, -U 0xED,U 0xAC,U 0x3F,U 0x72, -U 0xCC,U 0x0F,U 0xFC,U 0x5A, -U 0xBE,U 0x6D,U 0x4A,U 0xEE, -U 0x23,U 0x6B,U 0xE2,U 0xE5, -U 0x31,U 0xB2,U 0x39,U 0x5E, -U 0x1E,U 0x23,U 0x77,U 0x19, -U 0x65,U 0xB8,U 0x16,U 0xBA, -U 0x19,U 0xA4,U 0xAB,U 0x4A, -U 0x58,U 0x8F,U 0x4D,U 0xDB, -U 0xA5,U 0xBD,U 0xBE,U 0xD8, -U 0xFB,U 0x05,U 0x5D,U 0xEB, -U 0x8D,U 0x8A,U 0xE3,U 0x27, -U 0xE8,U 0xEA,U 0xA9,U 0xD0, -U 0xFB,U 0x14,U 0x7E,U 0x4A, -U 0x9F,U 0xA8,U 0x07,U 0xFC, -U 0xDA,U 0x77,U 0xEE,U 0x95, -U 0xFE,U 0x50,U 0xD9,U 0x59, -U 0xF4,U 0x9D,U 0x12,U 0xF6, -U 0x2B,U 0x80,U 0x6D,U 0x07, -U 0xCC,U 0x6D,U 0x1A,U 0x2C, -U 0x3F,U 0x6D,U 0xDA,U 0x73, -U 0x18,U 0x3F,U 0xE1,U 0x1B, -U 0xCD,U 0x0F,U 0xD2,U 0xD5, -U 0xB9,U 0x21,U 0x2F,U 0xF7, -U 0xBF,U 0xBB,U 0x6B,U 0xF4, -U 0x77,U 0x81,U 0x77,U 0x3C, -U 0x6D,U 0xA2,U 0x6A,U 0xE7, -U 0x5E,U 0x73,U 0x7B,U 0x7A, -U 0xF5,U 0x22,U 0xDD,U 0x9E, -U 0x46,U 0x2B,U 0x1B,U 0x8B, -U 0xFB,U 0xCE,U 0x89,U 0xCE, -U 0xEA,U 0xC5,U 0xA8,U 0x8B, -U 0xB3,U 0x74,U 0x25,U 0x7C, -U 0xCF,U 0xEB,U 0x0E,U 0xD2, -U 0x71,U 0x3A,U 0x58,U 0xF6, -U 0xFF,U 0x54,U 0x78,U 0xFF, -U 0x41,U 0x5F,U 0x81,U 0x2F, -U 0xD5,U 0xCD,U 0x76,U 0xA3, -U 0xFC,U 0x2C,U 0x5D,U 0x15, -U 0xA8,U 0x38,U 0x0E,U 0x39, -U 0x89,U 0x8A,U 0x26,U 0xC0, -U 0xC2,U 0x7E,U 0x96,U 0x29, -U 0x3B,U 0x72,U 0xF5,U 0x9E, -U 0xC1,U 0xEC,U 0x08,U 0xEA, -U 0xA6,U 0x03,U 0xF4,U 0x5A, -U 0x4F,U 0xD0,U 0xA8,U 0x1B, -U 0xB9,U 0x0E,U 0x8E,U 0xD3, -U 0xA8,U 0x0C,U 0xE6,U 0x07, -U 0xC1,U 0x82,U 0x38,U 0x8B, -U 0x38,U 0x27,U 0xE6,U 0x08, -U 0xF6,U 0x9B,U 0xE1,U 0x13, -U 0x04,U 0x69,U 0xD4,U 0x24, -U 0xC1,U 0x7E,U 0x01,U 0x07, -U 0x1F,U 0xCD,U 0xD5,U 0xDE, -U 0xDB,U 0xC0,U 0x6B,U 0x48, -U 0x9C,U 0x8B,U 0x32,U 0x0C, -U 0xFA,U 0xCE,U 0x51,U 0xE8, -U 0x8F,U 0x2C,U 0x6C,U 0xC3, -U 0xF6,U 0x76,U 0xFB,U 0x46, -U 0x4D,U 0x08,U 0xD2,U 0x37, -U 0x4A,U 0xD5,U 0x98,U 0x73, -U 0x14,U 0x31,U 0xAE,U 0x24, -U 0x34,U 0xB4,U 0xF5,U 0x8F, -U 0xFF,U 0x47,U 0x6D,U 0x71, -U 0x95,U 0x5B,U 0x98,U 0x8E, -U 0x25,U 0xD2,U 0xE6,U 0x00, -U 0x57,U 0x93,U 0x55,U 0xF5, -U 0x91,U 0x51,U 0xD0,U 0xDA, -U 0xE8,U 0x8B,U 0x16,U 0xA3, -U 0x3F,U 0x2C,U 0x8E,U 0xAE, -U 0xFF,U 0xCD,U 0x21,U 0xF9, -U 0x5B,U 0x4B,U 0x63,U 0x3A, -U 0xA2,U 0x28,U 0xDF,U 0x14, -U 0x7F,U 0xCC,U 0x06,U 0x5D, -U 0x33,U 0x4D,U 0xB3,U 0x63, -U 0x07,U 0xA2,U 0xF6,U 0x86, -U 0x0E,U 0xCD,U 0xFE,U 0x32, -U 0xFF,U 0xA9,U 0xC7,U 0xE9, -U 0x9A,U 0x1C,U 0xBC,U 0x5B, -U 0x85,U 0x75,U 0x54,U 0xE7, -U 0xAF,U 0xA3,U 0x21,U 0xEB, -U 0x7B,U 0x25,U 0x7A,U 0x17, -U 0x70,U 0x4D,U 0x8E,U 0x49, -U 0x40,U 0x09,U 0xD7,U 0x8C, -U 0x46,U 0xC8,U 0xD2,U 0xDE, -U 0x27,U 0x49,U 0x1E,U 0xBA, -U 0x8A,U 0x30,U 0x4E,U 0xBC, -U 0x26,U 0x27,U 0x9A,U 0x0A, -U 0xF9,U 0x54,U 0xB2,U 0xBC, -U 0xAE,U 0x19,U 0x25,U 0xBA, -U 0x46,U 0x5B,U 0xF5,U 0xDF, -U 0x4D,U 0xA7,U 0x79,U 0xDC, -U 0x7C,U 0x4D,U 0x0E,U 0x64, -U 0x91,U 0x93,U 0xB4,U 0x3E, -U 0x62,U 0xB4,U 0x5E,U 0x3B, -U 0xC4,U 0x40,U 0x6B,U 0x9B, -U 0x81,U 0x56,U 0xFB,U 0x71, -U 0xBA,U 0xD6,U 0xA6,U 0x68, -U 0xBD,U 0xA6,U 0x2E,U 0x9E, -U 0xD6,U 0x6B,U 0xD1,U 0x5D, -U 0x5D,U 0x73,U 0x08,U 0xA1, -U 0x03,U 0xA1,U 0x47,U 0xBD, -U 0x1B,U 0xC3,U 0x35,U 0xA8, -U 0x93,U 0x6B,U 0x0E,U 0x40, -U 0xF7,U 0xF6,U 0xAB,U 0x3A, -U 0xE1,U 0x38,U 0x94,U 0xC1, -U 0xB2,U 0x38,U 0x4D,U 0xF6, -U 0xE8,U 0xF9,U 0x02,U 0xE2, -U 0x39,U 0x3C,U 0x8E,U 0x67, -U 0x79,U 0x72,U 0x7C,U 0x14, -U 0xBE,U 0x0B,U 0x68,U 0x3F, -U 0x8A,U 0xF4,U 0x0C,U 0xD6, -U 0x95,U 0xEA,U 0xA8,U 0xD2, -U 0x05,U 0x73,U 0xBD,U 0xBD, -U 0x76,U 0x74,U 0xCC,U 0x5F, -U 0x82,U 0x9F,U 0xC8,U 0xF6, -U 0xA0,U 0x93,U 0xAE,U 0xCB, -U 0x42,U 0x5B,U 0x01,U 0x1F, -U 0xBF,U 0x3D,U 0xA4,U 0xFA, -U 0x92,U 0xEB,U 0x6E,U 0xE1, -U 0x77,U 0xB4,U 0x9D,U 0x4F, -U 0xF0,U 0x7B,U 0xEC,U 0x41, -U 0x8C,U 0xBB,U 0x7B,U 0xD7, -U 0x6F,U 0xCF,U 0x3E,U 0x6F, -U 0xA5,U 0x61,U 0xBD,U 0x56, -U 0xCA,U 0x8E,U 0xAC,U 0x3F, -U 0x56,U 0x16,U 0x49,U 0x7B, -U 0x25,U 0x37,U 0xD0,U 0xB1, -U 0x9B,U 0x5A,U 0x23,U 0xBF, -U 0x25,U 0xD7,U 0x42,U 0x89, -U 0xE3,U 0xC6,U 0x40,U 0x31, -U 0xF4,U 0x7F,U 0xA5,U 0xE8, -U 0xDB,U 0xD9,U 0xBB,U 0x0D, -U 0x63,U 0xAF,U 0xCF,U 0xFD, -U 0xE8,U 0x7B,U 0xAF,U 0x3B, -U 0x49,U 0xD7,U 0x49,U 0xFA, -U 0x7F,U 0x72,U 0x1C,U 0xBD, -U 0xFA,U 0x23,U 0x12,U 0xB7, -U 0xC6,U 0xCF,U 0xB1,U 0x82, -U 0x4D,U 0x8F,U 0xC3,U 0x7E, -U 0x9C,U 0xE0,U 0xB9,U 0x25, -U 0x67,U 0xDA,U 0xC6,U 0x5E, -U 0x1A,U 0xBB,U 0x79,U 0x15, -U 0x65,U 0x35,U 0xF4,U 0xD2, -U 0xE8,U 0xC6,U 0x5E,U 0x72, -U 0x8B,U 0xBF,U 0xBB,U 0xAD, -U 0x0D,U 0xF0,U 0xA9,U 0x1E, -U 0x39,U 0x9B,U 0x41,U 0xD0, -U 0xA1,U 0x82,U 0xE1,U 0x1E, -U 0xB2,U 0x37,U 0xAE,U 0x82, -U 0x6F,U 0x15,U 0x21,U 0x4B, -U 0x5F,U 0x15,U 0x7C,U 0xAB, -U 0x08,U 0x7C,U 0xAB,U 0xCF, -U 0xE1,U 0x5B,U 0x7D,U 0xD6, -U 0xEF,U 0x5B,U 0x9D,U 0x3F, -U 0xCF,U 0xBE,U 0xD5,U 0xF6, -U 0xA3,U 0x0C,U 0x83,U 0xB6, -U 0x75,U 0xF4,U 0xD2,U 0x62, -U 0xB2,U 0xA4,U 0xCF,U 0xA5, -U 0x0C,U 0xD0,U 0xE7,U 0xFD, -U 0x8C,U 0xAE,U 0x9D,U 0x9F, -U 0xDE,U 0x0E,U 0xBF,U 0x0E, -U 0x3C,U 0x07,U 0x35,U 0x7E, -U 0x21,U 0xC3,U 0x52,U 0x47, -U 0x31,U 0x0D,U 0x93,U 0xBC, -U 0xA2,U 0x8F,U 0x17,U 0x55, -U 0xBF,U 0x3D,U 0x94,U 0x38, -U 0x5F,U 0x9B,U 0xCC,U 0x1F, -U 0x8D,U 0xCD,U 0x6B,U 0x4B, -U 0x3B,U 0x7E,U 0x5D,U 0x69, -U 0x42,U 0x5F,U 0x00,U 0xFF, -U 0xF2,U 0xBA,U 0x0D,U 0xBA, -U 0xED,U 0x2B,U 0xB9,U 0x9E, -U 0x9C,U 0x25,U 0x2E,U 0xD1, -U 0x31,U 0xC8,U 0x1C,U 0x67, -U 0x98,U 0xE7,U 0xDC,U 0x79, -U 0xEE,U 0x7D,U 0xDF,U 0x28, -U 0x99,U 0xF7,U 0x40,U 0xCC, -U 0x07,U 0xE0,U 0xF9,U 0x4F, -U 0x9F,U 0x6A,U 0x77,U 0xED, -U 0xE4,U 0xBA,U 0x86,U 0x65, -U 0xC7,U 0xFD,U 0x33,U 0xDB, -U 0x7B,U 0xF6,U 0x33,U 0x79, -U 0x1E,U 0x4E,U 0xCD,U 0xDF, -U 0x5C,U 0x17,U 0x31,U 0xF8, -U 0x0D,U 0x6C,U 0xEF,U 0xC3, -U 0xBB,U 0x57,U 0xF5,U 0xD8, -U 0x38,U 0x3F,U 0xCB,U 0x43, -U 0xE5,U 0xBF,U 0xEE,U 0x68, -U 0x32,U 0xDB,U 0xCA,U 0xF3, -U 0xFF,U 0xF0,U 0x0B,U 0xF6, -U 0xB4,U 0x36,U 0x10,U 0xB5, -U 0xC2,U 0xFD,U 0x3A,U 0xD8, -U 0x90,U 0x0D,U 0x5F,U 0xA5, -U 0x57,U 0xCE,U 0xFD,U 0x1F, -U 0x27,U 0x57,U 0x91,U 0x6C, -U 0xFB,U 0x8B,U 0x7B,U 0x89, -U 0x7F,U 0x07,U 0xCA,U 0xEE, -U 0xA0,U 0x00,U 0x60,U 0x54, -U 0x5F,U 0xE2,U 0x6A,U 0xD8, -U 0x5F,U 0xAA,U 0xE6,U 0xF9, -U 0xF6,U 0x7B,U 0xCE,U 0x10, -U 0x8F,U 0xD7,U 0xFD,U 0x4B, -U 0xD9,U 0x46,U 0xB8,U 0xFE, -U 0xB4,U 0xAF,U 0x2C,U 0x04, -U 0xBA,U 0x5C,U 0xB5,U 0xFA, -U 0x1C,U 0x67,U 0x90,U 0x5C, -U 0x07,U 0xB8,U 0xFC,U 0xAE, -U 0xCA,U 0xDD,U 0xBB,U 0x1A, -U 0xD5,U 0x3C,U 0x5C,U 0xE7, -U 0xBE,U 0xF0,U 0x44,U 0x86, -U 0x81,U 0xFD,U 0xBB,U 0xAE, -U 0x59,U 0xE7,U 0x77,U 0xD3, -U 0x08,U 0xEE,U 0x07,U 0x5C, -U 0x9E,U 0x41,U 0x68,U 0xCD, -U 0x50,U 0xFD,U 0x87,U 0x2B, -U 0x14,U 0xDF,U 0xD7,U 0x0F, -U 0x41,U 0x9F,U 0x73,U 0xBD, -U 0x2D,U 0xBE,U 0xCF,U 0xB9, -U 0x3E,U 0x33,U 0xBE,U 0xCF, -U 0xB9,U 0x7E,U 0x74,U 0x7C, -U 0x5F,U 0x6F,U 0x45,U 0x5F, -U 0x7F,U 0xFD,U 0xC4,U 0x84, -U 0x3C,U 0x39,U 0x09,U 0x79, -U 0x8C,U 0xFE,U 0x4F,U 0x8D, -U 0x56,U 0x4E,U 0x82,U 0xFF, -U 0x73,U 0x7D,U 0x82,U 0xFF, -U 0x73,U 0xFD,U 0x06,U 0xC3, -U 0x3B,U 0x78,U 0xBC,U 0xBE, -U 0x41,U 0xAF,U 0x9F,U 0x2E, -U 0x39,U 0xFF,U 0x7D,U 0xFD, -U 0x0E,U 0xC3,U 0xBB,U 0xB5, -U 0x56,U 0xAE,U 0xA5,U 0x5C, -U 0xEF,U 0xD7,U 0xE3,U 0xD0, -U 0xA7,U 0x11,U 0x7C,U 0xB5, -U 0x30,U 0xEB,U 0x84,U 0x86, -U 0xEF,U 0x68,U 0x82,U 0x8E, -U 0x31,U 0x7C,U 0x28,U 0x9E, -U 0x86,U 0x1B,U 0x28,U 0x9E, -U 0x86,U 0x1B,U 0x32,U 0x62, -U 0xFE,U 0x05,U 0xF0,U 0xA3, -U 0xBE,U 0xFE,U 0x78,U 0x82, -U 0x6E,U 0xE8,U 0x90,U 0x3A, -U 0xC4,U 0xFE,U 0x55,U 0x39, -U 0xE5,U 0xF1,U 0x3B,U 0x70, -U 0xD5,U 0x01,U 0x1E,U 0x72, -U 0xB8,U 0x21,U 0x3B,U 0x01, -U 0x5F,U 0x7E,U 0x02,U 0xBE, -U 0xB9,U 0x86,U 0xF7,U 0x0C, -U 0xBC,U 0x7B,U 0x0C,U 0x3C, -U 0x64,U 0xA4,U 0x38,U 0xC9, -U 0x02,U 0x7D,U 0xE9,U 0x40, -U 0x7C,U 0xA5,U 0x1E,U 0xCF, -U 0x7E,U 0x26,U 0xE8,U 0xED, -U 0xF0,U 0xCA,U 0xB5,U 0x87, -U 0x6C,U 0x5E,U 0xE3,U 0xB8, -U 0xFC,U 0x38,U 0xDD,U 0xB0, -U 0x9C,U 0x7D,U 0x52,U 0x0D, -U 0xE7,U 0x6E,U 0xA3,U 0x9C, -U 0x14,U 0x5F,U 0x37,U 0x1C, -U 0x48,U 0xA0,U 0xA3,U 0x2D, -U 0x81,U 0x8E,U 0x0E,U 0x03, -U 0x5F,U 0x61,U 0xC7,U 0x1A, -U 0xBA,U 0xDF,U 0x11,U 0x79, -U 0xE0,U 0x61,U 0xF6,U 0x59, -U 0xC1,U 0x57,U 0x88,U 0x7D, -U 0x47,U 0xF8,U 0x50,U 0x4E, -U 0x94,U 0x99,U 0xC1,U 0xEB, -U 0x2A,U 0x27,U 0x4A,U 0x28, -U 0x25,U 0x50,U 0xDA,U 0x01, -U 0x9F,U 0x60,U 0x7B,U 0x5B, -U 0x52,U 0x7D,U 0x4A,U 0xDB, -U 0xED,U 0xD7,U 0xE6,U 0xE5, -U 0x5D,U 0xDD,U 0xBE,U 0xAF, -U 0xE6,U 0xE8,U 0xFA,U 0x88, -U 0xDF,U 0xB3,U 0xA0,U 0x8B, -U 0x87,U 0xA5,U 0xBD,U 0x5C, -U 0xBF,U 0xCB,U 0x25,U 0xBC, -U 0x05,U 0x75,U 0x90,U 0x23, -U 0xFA,U 0xDD,U 0xD1,U 0x93, -U 0x95,U 0xED,U 0xDF,U 0x7D, -U 0x98,U 0xDB,U 0x22,U 0x7C, -U 0x97,U 0x8E,U 0xAF,U 0x66, -U 0x52,U 0xBA,U 0x9A,U 0x77, -U 0xFD,U 0x6A,U 0xA5,U 0x41, -U 0x9F,U 0xC3,U 0xAE,U 0x55, -U 0x77,U 0x8A,U 0xE3,U 0x34, -U 0x7A,U 0x1A,U 0xAF,U 0x41, -U 0xB0,U 0x2F,U 0xC6,U 0xFE, -U 0xF7,U 0xBE,U 0x70,U 0x08, -U 0x76,U 0xFC,U 0x24,U 0x31, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 14:29:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0E852106567E; Mon, 27 Oct 2008 14:29:50 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F093F8FC1C; Mon, 27 Oct 2008 14:29:49 +0000 (UTC) (envelope-from gallatin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RETnqm041930; Mon, 27 Oct 2008 14:29:49 GMT (envelope-from gallatin@svn.freebsd.org) Received: (from gallatin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RETnun041928; Mon, 27 Oct 2008 14:29:49 GMT (envelope-from gallatin@svn.freebsd.org) Message-Id: <200810271429.m9RETnun041928@svn.freebsd.org> From: Andrew Gallatin Date: Mon, 27 Oct 2008 14:29:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184339 - in releng/6.4/sys: . dev/mxge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:29:50 -0000 Author: gallatin Date: Mon Oct 27 14:29:49 2008 New Revision: 184339 URL: http://svn.freebsd.org/changeset/base/184339 Log: Merge r183515 and r184211 (mxge firmware updates) into releng/6.4 Approved by: re (kensmith) Sponsored by: Myricom Inc Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/dev/mxge/eth_z8e.h releng/6.4/sys/dev/mxge/ethp_z8e.h releng/6.4/sys/dev/mxge/mxge_mcp.h releng/6.4/sys/dev/mxge/rss_eth_z8e.h releng/6.4/sys/dev/mxge/rss_ethp_z8e.h Modified: releng/6.4/sys/dev/mxge/eth_z8e.h ============================================================================== --- releng/6.4/sys/dev/mxge/eth_z8e.h Mon Oct 27 14:27:43 2008 (r184338) +++ releng/6.4/sys/dev/mxge/eth_z8e.h Mon Oct 27 14:29:49 2008 (r184339) @@ -28,13151 +28,7074 @@ POSSIBILITY OF SUCH DAMAGE. $FreeBSD$ ***************************************************************************/ -/* Using zlib-1.1.3. gendat version $Name: $ */ -static unsigned int eth_z8e_uncompressed_length = 606168; -#define U (unsigned char) -static unsigned int eth_z8e_length = 52566; -static unsigned char eth_z8e[52566] = { -U 0x78,U 0xDA,U 0xEC,U 0xBD, -U 0x0F,U 0x74,U 0x54,U 0xD5, -U 0xB5,U 0x3F,U 0xBE,U 0x67, -U 0x32,U 0xC0,U 0x24,U 0x46, -U 0x26,U 0xDA,U 0x88,U 0x23, -U 0xA2,U 0x8E,U 0x16,U 0xDB, -U 0xC1,U 0x82,U 0x44,U 0x8B, -U 0x2D,U 0xFA,U 0xA0,U 0xC6, -U 0x0A,U 0x1A,U 0x6A,U 0x20, -U 0x51,U 0x40,U 0x63,U 0x4B, -U 0x0D,U 0x68,U 0xD0,U 0x80, -U 0x88,U 0x03,U 0x04,U 0x0C, -U 0x18,U 0x32,U 0x61,U 0xC0, -U 0x36,U 0xA1,U 0x40,U 0x52, -U 0x4D,U 0x35,U 0x92,U 0x90, -U 0xA4,U 0x4A,U 0x5B,U 0xBE, -U 0x88,U 0x85,U 0x56,U 0xEC, -U 0x0F,U 0x5B,U 0xD4,U 0xB1, -U 0xE0,U 0x93,U 0xDA,U 0x90, -U 0xA1,U 0xFD,U 0xF1,U 0xD6, -U 0x2F,U 0x52,U 0xFC,U 0x32, -U 0xF2,U 0x22,U 0x4D,U 0x79, -U 0x41,U 0x07,U 0x32,U 0x90, -U 0x18,U 0x26,U 0x73,U 0xBE, -U 0x9F,U 0x7D,U 0xCE,U 0xBD, -U 0x93,U 0x3B,U 0x93,U 0x3B, -U 0x41,U 0x5E,U 0xDF,U 0xFA, -U 0xFD,U 0xD6,U 0x6F,U 0xAD, -U 0x66,U 0xAD,U 0x93,U 0x3B, -U 0xF7,U 0x9C,U 0x7D,U 0xF6, -U 0xD9,U 0x7B,U 0x9F,U 0x7D, -U 0xF6,U 0xD9,U 0xE7,U 0xCF, -U 0x3D,U 0x87,U 0xE8,U 0x9F, -U 0xF8,U 0xB3,U 0xEE,U 0x72, -U 0xD1,U 0xBF,U 0xFE,U 0xFE, -U 0xF5,U 0xF7,U 0xAF,U 0xBF, -U 0x7F,U 0xFD,U 0xFD,U 0xEB, -U 0xEF,U 0x5F,U 0x7F,U 0xFF, -U 0xFA,U 0xFB,U 0xFF,U 0xDD, -U 0xDF,U 0x19,U 0xAB,U 0x8D, -U 0xFE,U 0x58,U 0x43,U 0xD4, -U 0xED,U 0xB3,U 0x3B,U 0x83, -U 0x96,U 0xCC,U 0x03,U 0x2F, -U 0xBD,U 0x20,U 0x22,U 0x88, -U 0xB6,U 0x04,U 0xC9,U 0xEE, -U 0xE4,U 0xA7,U 0x16,U 0xE8, -U 0x79,U 0xC4,U 0x5B,U 0x6B, -U 0xC8,U 0x7E,U 0x43,U 0x06, -U 0xA5,U 0xDF,U 0xBD,U 0x85, -U 0xA8,U 0x76,U 0x84,U 0xE8, -U 0x7C,U 0xE1,U 0x45,U 0x11, -U 0x5A,U 0xFB,U 0xA2,U 0xE8, -U 0x9C,U 0xF2,U 0x0B,U 0xA2, -U 0xFD,U 0xA3,U 0x89,U 0x5E, -U 0x18,U 0x21,U 0xC2,U 0xC0, -U 0x33,U 0x27,U 0x48,U 0x2B, -U 0x4B,U 0x18,U 0xCF,U 0x5A, -U 0xBC,U 0x73,U 0xFA,U 0xBA, -U 0x11,U 0x22,U 0x84,U 0xF8, -U 0x12,U 0xC4,U 0x77,U 0x72, -U 0xFC,U 0x9A,U 0x11,U 0xC0, -U 0x95,U 0x49,U 0xE4,U 0x7B, -U 0x51,U 0xF4,U 0x18,U 0xF0, -U 0xDA,U 0x38,U 0x7F,U 0x97, -U 0x8F,U 0x9C,U 0x61,U 0x2B, -U 0x59,U 0xC2,U 0x3E,U 0xFF, -U 0x15,U 0xC8,U 0xB3,U 0x0D, -U 0x74,U 0xB8,U 0x75,U 0x5C, -U 0x48,U 0x23,U 0x2D,U 0xCD, -U 0x82,U 0xB4,U 0xFD,U 0xF1, -U 0x69,U 0x19,U 0xA9,U 0x5A, -U 0x9A,U 0x15,U 0x69,U 0xC1, -U 0xF8,U 0x34,U 0xEB,U 0x34, -U 0x2D,U 0xED,U 0x12,U 0xA4, -U 0x45,U 0xE2,U 0xD3,U 0x6C, -U 0xCF,U 0x6B,U 0x69,U 0xE9, -U 0xDD,U 0xBE,U 0x54,U 0x67, -U 0x92,U 0xF2,U 0x2E,U 0x43, -U 0xDA,U 0x84,U 0x24,U 0x69, -U 0x97,U 0x23,U 0x2D,U 0x3F, -U 0x3E,U 0xED,U 0x9D,U 0x2C, -U 0x2D,U 0xED,U 0x4A,U 0xA4, -U 0x2D,U 0x8A,U 0x4F,U 0xB3, -U 0xE8,U 0xF9,U 0x9C,U 0x48, -U 0xAB,U 0xD4,U 0xD3,U 0x8C, -U 0x32,U 0x31,U 0xCA,U 0x7B, -U 0x99,U 0x53,U 0x44,U 0xBD, -U 0x57,U 0x91,U 0x4D,U 0xAC, -U 0xDF,U 0x4C,U 0x51,U 0x9F, -U 0xA0,U 0x40,U 0x69,U 0x0F, -U 0xB9,U 0x46,U 0x92,U 0xF7, -U 0x38,U 0xA5,U 0x76,U 0x00, -U 0x0F,U 0x6D,U 0x5A,U 0x45, -U 0x76,U 0xAF,U 0x47,U 0xF4, -U 0x04,U 0x4A,U 0x3B,U 0xA9, -U 0x35,U 0xD4,U 0x49,U 0xDE, -U 0x90,U 0xE8,U 0x08,U 0x44, -U 0xCE,U 0x52,U 0xF9,U 0x59, -U 0xB2,U 0x07,U 0x22,U 0xA7, -U 0xA8,U 0x7C,U 0x09,U 0x39, -U 0xF7,U 0x97,U 0x7D,U 0x4A, -U 0x66,U 0x32,U 0x8F,U 0x5A, -U 0x05,U 0x79,U 0x47,U 0x71, -U 0xDE,U 0x76,U 0x6A,U 0x6D, -U 0x68,U 0x27,U 0x6F,U 0x43, -U 0x7C,U 0x5E,U 0xEF,U 0x35, -U 0xE4,U 0x3C,U 0x88,U 0x77, -U 0xE1,U 0x23,U 0x47,U 0x49, -U 0x9D,U 0x88,U 0xEE,U 0x77, -U 0x45,U 0x28,U 0x92,U 0xB6, -U 0x99,U 0xCA,U 0x7E,U 0x41, -U 0x36,U 0xEF,U 0xF5,U 0x64, -U 0x3D,U 0x58,U 0xE4,U 0x27, -U 0xD7,U 0xD7,U 0x98,U 0x96, -U 0xB4,U 0x5D,U 0x4C,U 0xCB, -U 0xBA,U 0x85,U 0x64,U 0x7F, -U 0xF5,U 0x71,U 0xBF,U 0x55, -U 0xAC,U 0x7F,U 0x85,U 0x7E, -U 0xDD,U 0xDB,U 0x63,U 0x5D, -U 0x7B,U 0x92,U 0x6C,U 0xFB, -U 0x9C,U 0x53,U 0x68,U 0x9F, -U 0xF3,U 0x28,U 0x05,U 0xEA, -U 0x26,U 0x53,U 0x20,U 0x1C, -U 0xA1,U 0x4D,U 0x0B,U 0x29, -U 0x7D,U 0x5F,U 0x78,U 0x12, -U 0x05,U 0xD6,U 0x45,U 0x89, -U 0xF1,U 0x05,U 0x16,U 0x4D, -U 0xC2,U 0xF3,U 0x2C,U 0x60, -U 0x3A,U 0xC9,U 0xB5,U 0x94, -U 0xE8,U 0x04,U 0xA5,U 0x35, -U 0xD7,U 0x02,U 0x4F,U 0x50, -U 0xE1,U 0x44,U 0x3D,U 0xA7, -U 0xED,U 0x78,U 0xCF,U 0x43, -U 0xC4,U 0x32,U 0xE2,U 0xF7, -U 0x24,U 0xBA,U 0x93,U 0x01, -U 0xDD,U 0xE9,U 0x14,U 0xA0, -U 0x01,U 0x32,U 0xEE,U 0x6C, -U 0x1A,U 0x21,U 0x3A,U 0xBE, -U 0x5A,U 0x4B,U 0x99,U 0x80, -U 0xCF,U 0x40,U 0xFE,U 0xCE, -U 0xA0,U 0xF5,U 0xF9,U 0x1E, -U 0xCE,U 0x5F,U 0x8D,U 0xF8, -U 0xF1,U 0xB5,U 0x94,U 0xB1, -U 0xBB,U 0x3C,U 0x64,U 0xAB, -U 0x86,U 0x5E,U 0x3A,U 0x4A, -U 0xC9,U 0xE2,U 0x5A,U 0x45, -U 0x43,U 0x1C,U 0x11,U 0xB2, -U 0x80,U 0x87,U 0xBF,U 0x34, -U 0x21,U 0xEE,U 0xAB,U 0x99, -U 0x9C,U 0xE7,U 0x12,U 0x57, -U 0x90,U 0x1A,U 0x27,U 0x71, -U 0x1E,U 0x71,U 0xE5,U 0x0F, -U 0x4E,U 0x47,U 0xAF,U 0xFC, -U 0x41,U 0x28,U 0xFA,U 0xD2, -U 0x0F,U 0xCE,U 0x88,U 0x97, -U 0x7E,U 0xD0,U 0xD5,U 0xF7, -U 0xD2,U 0x0F,U 0xC2,U 0xDE, -U 0x95,U 0x64,U 0xEF,U 0xBB, -U 0xF2,U 0x07,U 0x67,U 0x5B, -U 0x3D,U 0x52,U 0x56,U 0x19, -U 0xAD,U 0x1E,U 0xC8,U 0xAA, -U 0x8F,U 0xEC,U 0xAB,U 0x4F, -U 0x51,U 0xC6,U 0x23,U 0x4B, -U 0x50,U 0x47,U 0x91,U 0x8F, -U 0x69,U 0xF5,U 0x02,U 0x72, -U 0x46,U 0x53,U 0x9B,U 0xF7, -U 0x04,U 0x22,U 0xFF,U 0x41, -U 0x8F,U 0x94,U 0x91,U 0xC0, -U 0xEF,U 0x03,U 0x66,U 0xB4, -U 0x77,U 0xA5,U 0xBD,U 0x92, -U 0xAD,U 0x74,U 0xC9,U 0x8E, -U 0x36,U 0x78,U 0x49,U 0x5D, -U 0xD0,U 0xFA,U 0x82,U 0x93, -U 0xCB,U 0xED,U 0x4A,U 0xDB, -U 0xAE,U 0xC5,U 0x4B,U 0x7A, -U 0x76,U 0xE9,U 0xF1,U 0x22, -U 0xED,U 0x95,U 0x5C,U 0xD4, -U 0x87,U 0x77,U 0xF8,U 0x1A, -U 0x0B,U 0x35,U 0xF6,U 0x12, -U 0x8D,U 0x8F,U 0x92,U 0xE5, -U 0x24,U 0x5D,U 0xB2,U 0x17, -U 0xBC,U 0x64,U 0x18,U 0xF1, -U 0x3F,U 0x30,U 0xF5,U 0xC1, -U 0xC9,U 0x94,U 0x75,U 0xFB, -U 0xB8,U 0xAC,U 0x6F,U 0x7E, -U 0x7B,U 0xE2,U 0x37,U 0x69, -U 0xFA,U 0x5D,U 0x77,U 0x4F, -U 0xA6,U 0xFC,U 0x87,U 0x1E, -U 0xC0,U 0xBF,U 0x19,U 0x93, -U 0xA9,U 0xE0,U 0x9E,U 0x69, -U 0xF8,U 0x71,U 0xF7,U 0xE4, -U 0x5B,U 0xB2,U 0xEE,U 0x1D, -U 0x97,U 0x7F,U 0xF7,U 0xB4, -U 0xA9,U 0xE3,U 0x26,U 0xDE, -U 0x45,U 0xF7,U 0xCF,U 0xBA, -U 0x35,U 0xEB,U 0xD6,U 0x5B, -U 0xE9,U 0xAE,U 0xA9,U 0xB9, -U 0xB7,U 0x64,U 0x65,U 0x69, -U 0xCF,U 0x5B,U 0xB2,U 0x68, -U 0xDC,U 0xDD,U 0x94,U 0x8B, -U 0x30,U 0x6E,U 0x1A,U 0x8D, -U 0xBB,U 0x1F,U 0xBF,U 0xEE, -U 0xA7,U 0x71,U 0x0F,U 0xD0, -U 0x54,U 0x84,U 0x5C,U 0x04, -U 0xA3,U 0x4D,U 0x70,U 0x8A, -U 0x15,U 0x51,U 0x82,U 0xDC, -U 0xC3,U 0xE2,U 0x7C,U 0x0E, -U 0x71,U 0x3D,U 0xF8,U 0xCB, -U 0xCF,U 0xA0,U 0x2E,U 0xD3, -U 0xFF,U 0x03,U 0x71,U 0x21, -U 0xA5,U 0xF7,U 0x97,U 0xB4, -U 0x81,U 0x17,U 0x5B,U 0xB7, -U 0x2F,U 0xBD,U 0x0C,U 0xBC, -U 0x14,U 0x30,U 0x2F,U 0xAE, -U 0x1B,U 0xB8,U 0xBE,U 0x2F, -U 0xCD,U 0xD9,U 0xD7,U 0x4C, -U 0x84,U 0xFA,U 0x08,U 0x33, -U 0xAF,U 0x29,U 0x65,U 0x12, -U 0xA6,U 0x59,U 0xAF,U 0x33, -U 0x91,U 0xB6,U 0xD9,U 0x1D, -U 0x7E,U 0xB6,U 0x38,U 0x65, -U 0xAD,U 0xB4,U 0x2D,U 0xE9, -U 0x7B,U 0x82,U 0xD6,U 0x5A, -U 0x97,U 0xAC,U 0x4B,U 0xC0, -U 0xEF,U 0x2F,U 0xCB,U 0x26, -U 0xF1,U 0x6A,U 0x8E,U 0xC5, -U 0xE6,U 0x42,U 0x3D,U 0x96, -U 0x33,U 0xAE,U 0xF4,U 0xA2, -U 0x5A,U 0xA6,U 0xC1,U 0xBE, -U 0x3D,U 0x1F,U 0xF5,U 0xCA, -U 0xB8,U 0x09,U 0xCF,U 0x14, -U 0x51,U 0xB9,U 0x7D,U 0x96, -U 0x4A,U 0xBF,U 0xD4,U 0x22, -U 0xDF,U 0xAD,U 0x08,U 0xA9, -U 0x12,U 0x26,U 0xE5,U 0x04, -U 0x65,U 0x64,U 0xB0,U 0x8D, -U 0xEB,U 0x87,U 0xC9,U 0xC8, -U 0x00,U 0xAD,U 0x1F,U 0xA3, -U 0xBC,U 0x10,U 0x68,U 0x0F, -U 0x76,U 0xFB,U 0x2E,U 0x1D, -U 0x8B,U 0x32,U 0x0B,U 0x34, -U 0xFD,U 0x09,U 0x6A,U 0x34, -U 0xDF,U 0x25,U 0xF3,U 0x58, -U 0xC9,U 0x1A,U 0x04,U 0x3C, -U 0x70,U 0xCD,U 0xD2,U 0x78, -U 0x3C,U 0xA1,U 0x78,U 0xBC, -U 0x74,U 0x6E,U 0x02,U 0x8F, -U 0x95,U 0x48,U 0xFB,U 0x2F, -U 0xA6,U 0x59,U 0xF1,U 0x77, -U 0x69,U 0x05,U 0xF4,U 0x7B, -U 0x2F,U 0xA7,U 0x07,U 0x29, -U 0x7D,U 0x1B,U 0xE3,U 0xE2, -U 0xFC,U 0x5A,U 0xDE,U 0x86, -U 0x84,U 0xBC,U 0x07,U 0xA4, -U 0x7C,U 0x54,U 0x7A,U 0x5A, -U 0x4A,U 0xA9,U 0x84,U 0xF1, -U 0xEB,U 0xF2,U 0xE1,U 0xFC, -U 0xE1,U 0xD4,U 0xDD,U 0x35, -U 0x5A,U 0xF9,U 0x21,U 0xC0, -U 0xA4,U 0x20,U 0x3D,U 0x98, -U 0x80,U 0x23,U 0x82,U 0xB4, -U 0x30,U 0x97,U 0x0F,U 0x5D, -U 0x4F,U 0xE1,U 0x3C,U 0x4D, -U 0x2F,U 0xAA,U 0x7A,U 0x51, -U 0x65,U 0x0E,U 0xCF,U 0x88, -U 0x87,U 0x1F,U 0xDE,U 0x0C, -U 0xF8,U 0x2F,U 0xAA,U 0x25, -U 0xCE,U 0x74,U 0x3B,U 0x74, -U 0xCB,U 0x06,U 0x59,U 0x74, -U 0xEE,U 0x2B,U 0xE5,U 0x7E, -U 0x62,U 0xF8,U 0x24,U 0x5D, -U 0x1E,U 0x1A,U 0x6C,U 0x3E, -U 0xF4,U 0xD1,U 0xCA,U 0x38, -U 0x45,U 0x95,U 0x94,U 0x43, -U 0x27,U 0xF2,U 0x38,U 0x00, -U 0x57,U 0x94,U 0x00,U 0x57, -U 0xCA,U 0x72,U 0x97,U 0x70, -U 0xA9,U 0x31,U 0x38,U 0xD8, -U 0xC7,U 0xE1,U 0x1B,U 0x12, -U 0xE0,U 0x3C,U 0x80,U 0x43, -U 0xFF,U 0x33,U 0x3C,U 0x07, -U 0x78,U 0x6D,U 0x1A,U 0x8D, -U 0xC3,U 0x01,U 0xB7,U 0x3B, -U 0x9E,U 0xC6,U 0xF4,U 0x6D, -U 0xA8,U 0xEB,U 0x0E,U 0xE6, -U 0x09,U 0x78,U 0xAE,U 0x03, -U 0x8C,U 0x15,U 0xBC,U 0x0D, -U 0x07,U 0x5F,U 0xED,U 0xFB, -U 0xCA,U 0x24,U 0x9D,U 0xED, -U 0x09,U 0x3C,U 0x41,U 0x06, -U 0xE9,U 0x37,U 0x28,U 0xDC, -U 0x92,U 0x86,U 0x7C,U 0xE0, -U 0x6E,U 0x57,U 0xF2,U 0x72, -U 0x24,U 0xF2,U 0x7F,U 0x96, -U 0xE1,U 0x38,U 0x1D,U 0x79, -U 0xBE,U 0xC6,U 0xB8,U 0x01, -U 0x33,U 0x21,U 0x1E,U 0xC6, -U 0x21,U 0xE9,U 0xD3,U 0xF8, -U 0xCE,U 0xD7,U 0x60,U 0xC7, -U 0x68,U 0xB0,U 0x09,U 0xF5, -U 0xEF,U 0x28,U 0x41,U 0xDA, -U 0x58,U 0xF0,U 0x14,U 0x66, -U 0x9D,U 0x31,U 0x94,U 0x5B, -U 0x69,U 0x52,U 0xAE,U 0x55, -U 0xC3,U 0x95,U 0xA5,U 0xE1, -U 0xDA,U 0x91,U 0x80,U 0xCB, -U 0x8F,U 0xB4,U 0x6F,U 0x06, -U 0xC9,U 0x91,U 0x8D,U 0xF2, -U 0x53,U 0x0C,U 0xB8,U 0x0E, -U 0x27,U 0xC0,U 0xDD,U 0xA5, -U 0xA7,U 0x03,U 0xFE,U 0xDB, -U 0x1A,U 0x4C,U 0x8F,U 0x19, -U 0x0C,U 0xDB,U 0x45,U 0x5D, -U 0x26,U 0x66,U 0x36,U 0xEA, -U 0xBC,U 0x35,U 0xF3,U 0x3D, -U 0xF4,U 0x3F,U 0x69,U 0xE7, -U 0xBD,U 0x6E,U 0x12,U 0x95, -U 0x9B,U 0x9D,U 0xE3,U 0x30, -U 0xF2,U 0x1F,U 0x5B,U 0x41, -U 0xA9,U 0x81,U 0xC8,U 0x61, -U 0xCA,U 0x8B,U 0x88,U 0x3E, -U 0x84,U 0xF3,U 0x63,U 0x88, -U 0x2E,U 0x0B,U 0x44,U 0x5A, -U 0xE8,U 0xEB,U 0x44,U 0xD7, -U 0x07,U 0x22,U 0xB5,U 0xB0, -U 0x81,U 0x25,U 0x9C,U 0xF6, -U 0xEE,U 0x57,U 0xC9,U 0x62, -U 0xC1,U 0xD3,U 0x3B,U 0xA6, -U 0xC2,U 0x6A,U 0x09,U 0x44, -U 0x26,U 0x20,U 0xBE,U 0x81, -U 0x46,U 0x93,U 0xCD,U 0x72, -U 0xCF,U 0x73,U 0xA2,U 0x3B, -U 0x10,U 0x99,U 0x82,U 0xF7, -U 0x45,U 0x54,U 0xD8,U 0x47, -U 0x19,U 0xB9,U 0x43,U 0x84, -U 0x37,U 0xAF,U 0x4F,U 0x1C, -U 0xBB,U 0x67,U 0x48,U 0x54, -U 0x04,U 0x22,U 0xFB,U 0x11, -U 0x5F,U 0x44,U 0x79,U 0x7D, -U 0x5F,U 0x88,U 0xBC,U 0xBE, -U 0x6E,U 0x84,U 0xCF,U 0x11, -U 0x8E,U 0x21,U 0xBC,U 0x8B, -U 0xE0,U 0x15,U 0xA2,U 0x6A, -U 0xB3,U 0xF3,U 0x3C,U 0x6C, -U 0x23,U 0x68,U 0x72,U 0x9F, -U 0x17,U 0xC5,U 0x68,U 0xDF, -U 0x9B,U 0xDD,U 0xB0,U 0x95, -U 0x02,U 0xB6,U 0x62,U 0x62, -U 0x20,U 0x32,U 0x09,U 0xF8, -U 0xAC,U 0x04,U 0x18,U 0xF7, -U 0xF9,U 0xF3,U 0x48,U 0x5B, -U 0xBF,U 0xF9,U 0xDB,U 0x12, -U 0x26,U 0x6D,U 0xF3,U 0xB7, -U 0xE4,U 0x7B,U 0xE5,U 0xE6, -U 0x1C,U 0x61,U 0xDF,U 0x3C, -U 0x71,U 0x5C,U 0x05,U 0x0D, -U 0x63,U 0xFA,U 0xA3,U 0xD0, -U 0xFF,U 0x40,U 0x04,U 0xFD, -U 0x53,U 0xE4,U 0x53,U 0xCA, -U 0x5B,U 0x19,U 0x12,U 0xCC, -U 0xC3,U 0xF0,U 0x35,U 0x02, -U 0xBF,U 0xDF,U 0x15,U 0xC3, -U 0xC3,U 0xE4,U 0xC8,U 0x5B, -U 0xE9,U 0x15,U 0x85,U 0x11, -U 0xB2,U 0x8B,U 0x54,U 0xC6, -U 0xDD,U 0xC9,U 0x78,U 0x73, -U 0x80,U 0x6B,U 0xAA,U 0x86, -U 0xAB,U 0x18,U 0xB0,U 0x21, -U 0x86,U 0x63,U 0x5C,U 0x3A, -U 0x1E,U 0xC6,U 0xC1,U 0xB0, -U 0x79,U 0x7D,U 0xE4,U 0x00, -U 0x7C,U 0xF1,U 0xF9,U 0xAA, -U 0xCD,U 0x05,U 0x08,U 0xA5, -U 0x08,U 0xDB,U 0x90,U 0xF7, -U 0xF7,U 0xE7,U 0x9F,U 0x95, -U 0x72,U 0x3C,U 0x80,U 0xDF, -U 0x6D,U 0x3D,U 0x3E,U 0xB2, -U 0x48,U 0x39,U 0xF6,U 0xD1, -U 0x30,U 0xC0,U 0x1E,U 0xE8, -U 0xF6,U 0xD1,U 0x94,U 0x6E, -U 0x45,U 0x77,U 0x8F,U 0xA4, -U 0x7B,U 0xFD,U 0xE6,U 0xEE, -U 0x1E,U 0x45,U 0xFF,U 0x39, -U 0x8D,U 0x9F,U 0xB3,U 0x1C, -U 0x1F,U 0xF6,U 0xD1,U 0x10, -U 0xB1,U 0xBE,U 0xDE,U 0x19, -U 0x96,U 0x69,U 0xF5,U 0x68, -U 0x47,U 0x34,U 0x4B,U 0xE6, -U 0xAB,U 0xAC,U 0x77,U 0x0A, -U 0x7B,U 0xBD,U 0x3B,U 0x8A, -U 0x7A,U 0x85,U 0x3C,U 0x2B, -U 0x58,U 0x96,U 0x90,U 0x6F, -U 0x05,U 0xFB,U 0x07,U 0x2C, -U 0x53,U 0x51,U 0x85,U 0xF4, -U 0xD4,U 0x7A,U 0xF7,U 0xF9, -U 0xAA,U 0xFA,U 0x89,U 0xC8, -U 0xFF,U 0xBD,U 0xF3,U 0x02, -U 0xB4,U 0xA4,U 0xD5,U 0x17, -U 0xF4,U 0x48,U 0xDC,U 0xF5, -U 0x0F,U 0x01,U 0xCF,U 0x9C, -U 0x6E,U 0xC6,U 0x69,U 0xAF, -U 0x2F,U 0x00,U 0xAE,U 0xE2, -U 0x5E,U 0xAB,U 0x0B,U 0xB2, -U 0x10,U 0x3D,U 0x79,U 0x91, -U 0x35,U 0x91,U 0xC2,U 0x95, -U 0x64,U 0x0D,U 0x44,U 0x7E, -U 0x41,U 0x6E,U 0xAA,U 0xB0, -U 0x04,U 0x4A,U 0x17,U 0x01, -U 0xDF,U 0x3A,U 0x4E,U 0x3B, -U 0x96,U 0xB7,U 0x92,U 0x2E, -U 0x47,U 0x59,U 0xEF,U 0x02, -U 0x6F,U 0x01,U 0x97,U 0x87, -U 0x32,U 0x8A,U 0x81,U 0x73, -U 0x3E,U 0x70,U 0x15,U 0x31, -U 0x4D,U 0xBD,U 0x3E,U 0xCA, -U 0xC0,U 0x7B,U 0x69,U 0xAF, -U 0xA2,U 0xAF,U 0x2E,U 0x5A, -U 0x59,U 0xBF,U 0x27,U 0x6A, -U 0xAF,U 0xDF,U 0x66,U 0xD4, -U 0x1F,U 0x25,U 0x33,U 0xD6, -U 0x9B,U 0xD7,U 0x39,U 0x2E, -U 0x43,U 0xD7,U 0x95,U 0xBE, -U 0xCA,U 0xFA,U 0xCA,U 0x6F, -U 0x10,U 0x65,U 0xCC,U 0x08, -U 0x8B,U 0x08,U 0xEB,U 0xCB, -U 0x78,U 0xF2,U 0x58,U 0x5A, -U 0xC3,U 0x2D,U 0x54,U 0x18, -U 0xB1,U 0x53,U 0xAB,U 0x67, -U 0x37,U 0x8D,U 0xA9,U 0x60, -U 0x5F,U 0x25,U 0x4C,U 0xAD, -U 0xE1,U 0x5A,U 0xBC,U 0x6F, -U 0x24,U 0xA6,U 0xAF,U 0x35, -U 0x5C,U 0x42,U 0x07,U 0x3B, -U 0x1B,U 0x68,U 0x86,U 0x27, -U 0xBC,U 0xA6,U 0xCF,U 0xDE, -U 0x60,U 0x3F,U 0xD8,U 0x39, -U 0x9D,U 0x90,U 0xFF,U 0x5D, -U 0xD0,U 0x18,U 0x7D,U 0xC4, -U 0x63,U 0xAB,U 0xF8,U 0xDE, -U 0x10,U 0x11,U 0x6A,U 0xF5, -U 0x84,U 0x39,U 0xCE,U 0x7B, -U 0xB0,U 0x13,U 0x7A,U 0xDA, -U 0x27,U 0xFA,U 0x22,U 0x95, -U 0xF5,U 0xA5,U 0x11,U 0x7B, -U 0x83,U 0x73,U 0x7A,U 0x67, -U 0xC5,U 0x90,U 0xD6,U 0xF0, -U 0x56,U 0x8E,U 0x3B,U 0xEF, -U 0xB0,U 0x88,U 0x88,U 0xA3, -U 0xD4,U 0x2B,U 0x0E,U 0x76, -U 0xAE,U 0xA3,U 0x47,U 0xCE, -U 0x92,U 0xE5,U 0x60,U 0xF1, -U 0x6E,U 0xA9,U 0xAF,U 0x8F, -U 0x78,U 0x3C,U 0x24,U 0xF3, -U 0x9F,U 0x8D,U 0x38,U 0x7E, -U 0xD8,U 0x59,U 0x41,U 0x3F, -U 0x2C,U 0xA6,U 0xE1,U 0x80, -U 0xFF,U 0x9C,U 0xF5,U 0x57, -U 0x0C,U 0xAF,U 0xA0,U 0x96, -U 0xF6,U 0x22,U 0x9A,U 0x7E, -U 0x2A,U 0x92,U 0x32,U 0x03, -U 0x35,U 0xD5,U 0x32,U 0xB7, -U 0x96,U 0x0E,U 0x16,U 0xD7, -U 0xB2,U 0x4C,U 0xEA,U 0xD8, -U 0x5F,U 0x98,U 0x7E,U 0xAA, -U 0x4B,U 0xCC,U 0x38,U 0xDB, -U 0x2D,U 0x0E,U 0x16,U 0xBF, -U 0x4E,U 0x2D,U 0x73,U 0x77, -U 0x53,U 0xEE,U 0xA7,U 0x7E, -U 0x47,U 0x5F,U 0x55,U 0x7D, -U 0x65,U 0x34,U 0xB5,U 0x7E, -U 0x5B,U 0xB4,U 0xAA,U 0x7E, -U 0x4F,U 0xA4,U 0xAA,U 0xBE, -U 0xB4,U 0x2F,U 0xB5,U 0xC1, -U 0x1E,U 0x49,U 0x6D,U 0x70, -U 0x8A,U 0xF5,U 0x0D,U 0x95, -U 0x90,U 0x61,U 0xAA,U 0xAC, -U 0x8F,U 0xB4,U 0x86,U 0x1F, -U 0xE1,U 0xF7,U 0x28,U 0x59, -U 0xC7,U 0xF6,U 0x86,U 0x3A, -U 0x51,U 0xD9,U 0xB0,U 0xE7, -U 0x7C,U 0x55,U 0xC3,U 0xB6, -U 0x40,U 0xE9,U 0x24,U 0x12, -U 0xA9,U 0x0D,U 0x75,U 0xAC, -U 0xF7,U 0xA2,U 0xAA,U 0x61, -U 0x0F,U 0xE0,U 0xF6,U 0x28, -U 0x3D,U 0x69,U 0x38,U 0xC0, -U 0x7A,U 0x02,U 0x98,U 0x36, -U 0x84,U 0x0E,U 0xB1,U 0x7E, -U 0x4B,U 0x0E,U 0xF2,U 0x5F, -U 0xA6,U 0x70,U 0x6D,U 0xB9, -U 0x97,U 0x61,U 0xA2,U 0xF6, -U 0x2D,U 0x39,U 0xD1,U 0xCA, -U 0x2D,U 0x05,U 0xC2,U 0xBE, -U 0xA5,U 0x98,U 0x6D,U 0xF8, -U 0x8C,U 0x25,U 0x3D,U 0x90, -U 0x5D,U 0x03,U 0x7C,U 0x4C, -U 0x0E,U 0x7D,U 0xF8,U 0xDD, -U 0x47,U 0x7D,U 0x3E,U 0x1A, -U 0xF6,U 0xC8,U 0x12,U 0xF2, -U 0x8A,U 0x77,U 0x6A,U 0x68, -U 0xC6,U 0x92,U 0x77,U 0x45, -U 0xA0,U 0xF4,U 0x28,U 0xE2, -U 0x8F,U 0xCA,U 0xF4,U 0x19, -U 0x4B,U 0xBC,U 0x02,U 0x72, -U 0x71,U 0x44,U 0x53,U 0x81, -U 0xA7,U 0x0A,U 0x78,U 0x52, -U 0x81,U 0x67,U 0x7D,U 0x63, -U 0x5A,U 0x0F,U 0xEB,U 0x54, -U 0x65,U 0xA3,U 0x5D,U 0xD8, -U 0x1B,U 0x8B,U 0xA3,U 0x43, -U 0x09,U 0x32,U 0xDB,U 0x4A, -U 0xD1,U 0x77,U 0x84,U 0x50, -U 0x6D,U 0xA3,U 0x13,U 0xFA, -U 0x38,U 0xB2,U 0xA2,U 0xB0, -U 0x94,U 0x9A,U 0x45,U 0x15, -U 0x60,U 0x52,U 0x1B,U 0x91, -U 0xA7,U 0x79,U 0xBB,U 0xEC, -U 0x93,U 0xA5,U 0x7D,U 0x69, -U 0xDE,U 0x76,U 0xBE,U 0xAA, -U 0xF9,U 0x00,U 0xC2,U 0x1E, -U 0xCE,U 0xA7,U 0xE7,U 0x11, -U 0x55,U 0xCD,U 0xDB,U 0xE2, -U 0x7D,U 0x64,U 0x1B,U 0xBA, -U 0xCD,U 0x21,U 0x76,U 0xA2, -U 0xA1,U 0x08,U 0xC3,U 0xEC, -U 0xBA,U 0xAD,U 0xEA,U 0xF6, -U 0x65,U 0x1E,U 0x0D,U 0xD2, -U 0x7B,U 0x5B,U 0xD9,U 0xC6, -U 0xE1,U 0x37,U 0xEC,U 0xDA, -U 0x1F,U 0x4B,U 0xB5,U 0xDF, -U 0xE1,U 0x20,U 0x6D,U 0x1B, -U 0x2D,U 0x7D,U 0x0A,U 0xD8, -U 0x30,U 0x4F,U 0x39,U 0x5D, -U 0x71,U 0x92,U 0xAE,U 0xD8, -U 0x06,U 0xFE,U 0x08,U 0xBF, -U 0xD3,U 0xF1,U 0x7B,U 0x47, -U 0xDE,U 0x98,U 0x77,U 0x45, -U 0xB4,U 0xF2,U 0x58,U 0x01, -U 0xEA,U 0xB1,U 0x9B,U 0x6D, -U 0x8C,U 0xF0,U 0x4D,U 0x40, -U 0x3F,U 0x42,U 0xD9,U 0xDD, -U 0xDD,U 0xC5,U 0x76,U 0xD1, -U 0xED,U 0x4E,U 0x17,U 0x69, -U 0xDB,U 0xCB,U 0xC5,U 0x79, -U 0x27,U 0xFB,U 0x7A,U 0x0E, -U 0xBC,U 0x0F,U 0x87,U 0xCC, -U 0x46,U 0xE3,U 0x79,U 0xF9, -U 0x96,U 0x73,U 0x94,U 0x89, -U 0xE0,U 0xDC,U 0xE2,U 0x8B, -U 0x56,U 0x70,U 0x5F,U 0x8E, -U 0xDF,U 0x59,U 0xE2,U 0x19, -U 0x67,U 0xDA,U 0xA6,U 0x15, -U 0x34,U 0xD6,U 0x11,U 0x26, -U 0x7B,U 0x93,U 0x2F,U 0x5A, -U 0xE0,U 0x58,U 0x93,U 0x41, -U 0xE8,U 0x9F,U 0x32,U 0xF9, -U 0xB7,U 0xF0,U 0xED,U 0xC8, -U 0x69,U 0x3A,U 0x47,U 0x36, -U 0xF6,U 0x3F,U 0xA3,U 0xA9, -U 0x28,U 0xAF,U 0xD4,U 0x21, -U 0xC4,U 0x32,U 0x37,U 0x35, -U 0x2D,U 0x85,U 0x9D,U 0xF1, -U 0x91,U 0xBB,U 0xC9,U 0x27, -U 0x76,U 0xF5,U 0x75,U 0xBB, -U 0xAD,U 0x4C,U 0xA7,U 0x4E, -U 0x0B,U 0xD3,U 0x06,U 0x3A, -U 0xAF,U 0x01,U 0x9D,U 0x7B, -U 0x67,U 0xAF,U 0xCC,U 0xA6, -U 0xF7,U 0xD1,U 0x17,U 0x9B, -U 0xD9,U 0xEA,U 0x6E,U 0xDF, -U 0x15,U 0x31,U 0xFE,U 0x93, -U 0xA4,U 0x47,U 0x74,U 0x99, -U 0x98,U 0xA7,U 0x8F,U 0x18, -U 0xA5,U 0xCB,U 0x29,U 0xD9, -U 0x38,U 0x8D,U 0xDB,U 0x70, -U 0xDF,U 0x0A,U 0x11,U 0xAA, -U 0x5E,U 0x48,U 0x2C,U 0x0B, -U 0xA7,U 0x37,U 0x22,U 0xFE, -U 0x13,U 0x72,U 0xAC,U 0x28, -U 0xEF,U 0xA3,U 0x6B,U 0xF2, -U 0x56,U 0x5E,U 0x27,U 0x02, -U 0x9D,U 0xC2,U 0x1F,U 0x28, -U 0x3D,U 0x45,U 0x4D,U 0x48, -U 0x2F,U 0x2F,U 0x13,U 0x51, -U 0xF4,U 0x8F,U 0x45,U 0x5D, -U 0x2B,U 0x44,U 0x64,U 0x0B, -U 0xFA,U 0xEA,U 0x68,U 0xEA, -U 0xF6,U 0x62,U 0x94,U 0x01, -U 0xFF,U 0xC7,U 0xBD,U 0x5B, -U 0xD5,U 0x45,U 0x7D,U 0xDD, -U 0x46,U 0xEE,U 0xC3,U 0xED, -U 0xDB,U 0x8B,U 0x80,U 0xEB, -U 0x32,U 0xC6,U 0x75,U 0x10, -U 0xF9,U 0xFB,U 0xAA,U 0xB6, -U 0x2F,U 0x02,U 0x1C,U 0xC6, -U 0x7F,U 0xAD,U 0xEB,U 0x06, -U 0x8C,U 0x8F,U 0xE4,U 0x88, -U 0x94,U 0x20,U 0x6B,U 0xC3, -U 0xF4,U 0x33,U 0xC7,U 0xD9, -U 0x0C,U 0x03,U 0x5B,U 0xF6, -U 0xEA,U 0xB2,U 0xCD,U 0x93, -U 0x75,U 0x5E,U 0xD0,U 0x86, -U 0x9C,U 0x5D,U 0xF0,U 0x55, -U 0xBD,U 0xAB,U 0x69,U 0x14, -U 0x64,U 0x7B,U 0xF5,U 0x49, -U 0xBA,U 0xF2,U 0x1A,U 0x6F, -U 0xA9,U 0x38,U 0x21,U 0x7C, -U 0x23,U 0x76,U 0xBF,U 0xBA, -U 0xAA,U 0x07,U 0x7D,U 0xEF, -U 0x95,U 0xEE,U 0x20,U 0xD5, -U 0x76,U 0x24,U 0x93,U 0x85, -U 0x60,U 0x3B,U 0x76,U 0x0E, -U 0x3E,U 0xC8,U 0x8A,U 0x98, -U 0x1C,U 0x3E,U 0xC9,U 0x5B, -U 0x19,U 0x15,U 0xFC,U 0x9B, -U 0xDB,U 0x47,U 0x13,U 0xE2, -U 0x99,U 0x6F,U 0xE0,U 0xF1, -U 0xE8,U 0xFC,U 0x26,U 0x97, -U 0xE9,U 0xF6,U 0x52,U 0xE5, -U 0x7F,U 0x5E,U 0x79,U 0x48, -U 0x60,U 0x9C,U 0xE7,U 0xBF, -U 0x36,U 0xC2,U 0xBF,U 0xFF, -U 0xA2,U 0x7C,U 0xD3,U 0x86, -U 0x6D,U 0x5D,U 0x68,U 0xF3, -U 0x3C,U 0xC6,U 0x80,U 0x7F, -U 0x13,U 0xC6,U 0x98,U 0xB0, -U 0x07,U 0x38,U 0x31,U 0xFE, -U 0xBD,U 0xAE,U 0x40,U 0xF7, -U 0x85,U 0x03,U 0x91,U 0xA9, -U 0xDC,U 0xFE,U 0xB7,U 0x25, -U 0xC1,U 0x9F,U 0xD9,U 0x8F, -U 0x7F,U 0xA4,U 0x5F,U 0xC3, -U 0xB9,U 0x47,U 0xD8,U 0x77, -U 0x1F,U 0x2E,U 0x57,U 0x74, -U 0xF7,U 0x94,U 0x87,U 0x45, -U 0x07,U 0xE3,U 0x66,U 0xBF, -U 0xBD,U 0x1D,U 0x30,U 0x8D, -U 0xF0,U 0x0F,U 0x45,U 0xE5, -U 0xEE,U 0x03,U 0x9B,U 0x38, -U 0x6E,U 0x45,U 0x2F,U 0xC7, -U 0xBD,U 0x07,U 0xDD,U 0x14, -U 0x8A,U 0xAE,U 0x91,U 0xEF, -U 0x41,U 0x6E,U 0x57,U 0xC2, -U 0x6F,U 0x08,U 0xF9,U 0x57, -U 0xF5,U 0xD2,U 0x89,U 0x32, -U 0x4A,U 0xE1,U 0xB1,U 0x53, -U 0xB7,U 0xCF,U 0x59,U 0x10, -U 0xA4,U 0x09,U 0xB9,U 0x72, -U 0xFC,U 0xE2,U 0xA3,U 0xED, -U 0x5D,U 0xD6,U 0xD9,U 0xB3, -U 0x11,U 0x87,U 0xF1,U 0xEF, -U 0x6D,U 0x1E,U 0x19,U 0x67, -U 0x25,U 0x8C,U 0xE9,U 0x9D, -U 0x65,U 0x31,U 0x18,U 0xE0, -U 0xC0,U 0xFB,U 0x06,U 0x43, -U 0x9E,U 0xD9,U 0x5D,U 0xD6, -U 0x9B,U 0xB6,U 0x23,U 0xAE, -U 0x39,U 0x21,U 0xCF,U 0xAE, -U 0x84,U 0x3C,U 0x7E,U 0xFD, -U 0x1D,U 0xF4,U 0x75,U 0xBA, -U 0x56,U 0x48,U 0xBE,U 0xD6, -U 0x20,U 0x3F,U 0xFC,U 0x56, -U 0xAA,U 0xD0,U 0xCA,U 0x6D, -U 0x4F,U 0xC0,U 0x11,U 0x8E, -U 0xC7,U 0x71,U 0x95,U 0x6D, -U 0x20,U 0xAD,U 0x57,U 0x39, -U 0xE3,U 0xF3,U 0x5C,U 0xE5, -U 0x4E,U 0xC8,U 0x33,U 0x71, -U 0x20,U 0xAD,U 0x57,U 0xE5, -U 0x26,U 0xE4,U 0x99,U 0x93, -U 0x90,U 0x67,U 0x91,U 0xFE, -U 0xAE,U 0xCD,U 0x1B,U 0x64, -U 0x21,U 0xAE,U 0x22,U 0x21, -U 0x4F,U 0x4D,U 0x42,U 0x9E, -U 0x66,U 0xC3,U 0xFB,U 0x57, -U 0xF0,U 0x1E,U 0xE3,U 0x9F, -U 0xEB,U 0x1A,U 0x7D,U 0xBB, -U 0xE0,U 0xB1,U 0x21,U 0xF4, -U 0x96,U 0x75,U 0xB8,U 0x8E, -U 0xED,U 0x23,U 0x8F,U 0xDB, -U 0x97,U 0x95,U 0x89,U 0x1E, -U 0xE8,U 0x40,U 0x1D,U 0xE0, -U 0x83,U 0x3A,U 0x7E,U 0x5D, -U 0x77,U 0x24,U 0xBC,U 0xD2, -U 0x9F,U 0x0E,U 0xA5,U 0x3F, -U 0x23,U 0x6D,U 0x31,U 0x18, -U 0xB8,U 0x4B,U 0xFB,U 0x5D, -U 0x61,U 0x82,U 0x2C,U 0x3B, -U 0x50,U 0xA7,U 0x9D,U 0x81, -U 0xF0,U 0x54,U 0x52,U 0xE3, -U 0xA7,U 0x91,U 0x39,U 0xAC, -U 0x53,U 0x7A,U 0x99,U 0x8E, -U 0x32,U 0xA5,U 0x37,U 0x3C, -U 0xFE,U 0xD5,U 0xCB,U 0x0C, -U 0x42,U 0x57,U 0xB8,U 0xDF, -U 0x31,U 0xE8,U 0x67,U 0x3B, -U 0x97,U 0xA5,U 0x95,U 0x51, -U 0xAC,U 0x97,U 0x01,U 0xDC, -U 0xED,U 0xAC,U 0x3F,U 0x72, -U 0xCC,U 0x0F,U 0xFC,U 0x5A, -U 0xBE,U 0x6D,U 0x4A,U 0xEE, -U 0x23,U 0x6B,U 0xE2,U 0xE5, -U 0x31,U 0xB2,U 0x39,U 0x5E, -U 0x1E,U 0x23,U 0x77,U 0x19, -U 0x65,U 0xB8,U 0x16,U 0xBA, -U 0x19,U 0xA4,U 0xAB,U 0x4A, -U 0x58,U 0x8F,U 0x4D,U 0xDB, -U 0xA5,U 0xBD,U 0xBE,U 0xD8, -U 0xFB,U 0x05,U 0x5D,U 0xEB, -U 0x8D,U 0x8A,U 0xE3,U 0x27, -U 0xE8,U 0xEA,U 0xA9,U 0xD0, -U 0xFB,U 0x14,U 0x7E,U 0x4A, -U 0x9F,U 0xA8,U 0x07,U 0xFC, -U 0xDA,U 0x77,U 0xEE,U 0x95, -U 0xFE,U 0x50,U 0xD9,U 0x59, -U 0xF4,U 0x9D,U 0x12,U 0xF6, -U 0x2B,U 0x80,U 0x6D,U 0x07, -U 0xCC,U 0x6D,U 0x1A,U 0x2C, -U 0x3F,U 0x6D,U 0xDA,U 0x73, -U 0x18,U 0x3F,U 0xE1,U 0x1B, -U 0xCD,U 0x0F,U 0xD2,U 0xD5, -U 0xB9,U 0x21,U 0x2F,U 0xF7, -U 0xBF,U 0xBB,U 0x6B,U 0xF4, -U 0x77,U 0x81,U 0x77,U 0x3C, -U 0x6D,U 0xA2,U 0x6A,U 0xE7, -U 0x5E,U 0x73,U 0x7B,U 0x7A, -U 0xF5,U 0x22,U 0xDD,U 0x9E, -U 0x46,U 0x2B,U 0x1B,U 0x8B, -U 0xFB,U 0xCE,U 0x89,U 0xCE, -U 0xEA,U 0xC5,U 0xA8,U 0x8B, -U 0xB3,U 0x74,U 0x25,U 0x7C, -U 0xCF,U 0xEB,U 0x0E,U 0xD2, -U 0x71,U 0x3A,U 0x58,U 0xF6, -U 0xFF,U 0x54,U 0x78,U 0xFF, -U 0x41,U 0x5F,U 0x81,U 0x2F, -U 0xD5,U 0xCD,U 0x76,U 0xA3, -U 0xFC,U 0x2C,U 0x5D,U 0x15, -U 0xA8,U 0x38,U 0x0E,U 0x39, -U 0x89,U 0x8A,U 0x26,U 0xC0, -U 0xC2,U 0x7E,U 0x96,U 0x29, -U 0x3B,U 0x72,U 0xF5,U 0x9E, -U 0xC1,U 0xEC,U 0x08,U 0xEA, -U 0xA6,U 0x03,U 0xF4,U 0x5A, -U 0x4F,U 0xD0,U 0xA8,U 0x1B, -U 0xB9,U 0x0E,U 0x8E,U 0xD3, -U 0xA8,U 0x0C,U 0xE6,U 0x07, -U 0xC1,U 0x82,U 0x38,U 0x8B, -U 0x38,U 0x27,U 0xE6,U 0x08, -U 0xF6,U 0x9B,U 0xE1,U 0x13, -U 0x04,U 0x69,U 0xD4,U 0x24, -U 0xC1,U 0x7E,U 0x01,U 0x07, -U 0x1F,U 0xCD,U 0xD5,U 0xDE, -U 0xDB,U 0xC0,U 0x6B,U 0x48, -U 0x9C,U 0x8B,U 0x32,U 0x0C, -U 0xFA,U 0xCE,U 0x51,U 0xE8, -U 0x8F,U 0x2C,U 0x6C,U 0xC3, -U 0xF6,U 0x76,U 0xFB,U 0x46, -U 0x4D,U 0x08,U 0xD2,U 0x37, -U 0x4A,U 0xD5,U 0x98,U 0x73, -U 0x14,U 0x31,U 0xAE,U 0x24, -U 0x34,U 0xB4,U 0xF5,U 0x8F, -U 0xFF,U 0x47,U 0x6D,U 0x71, -U 0x95,U 0x5B,U 0x98,U 0x8E, -U 0x25,U 0xD2,U 0xE6,U 0x00, -U 0x57,U 0x93,U 0x55,U 0xF5, -U 0x91,U 0x51,U 0xD0,U 0xDA, -U 0xE8,U 0x8B,U 0x16,U 0xA3, -U 0x3F,U 0x2C,U 0x8E,U 0xAE, -U 0xFF,U 0xCD,U 0x21,U 0xF9, -U 0x5B,U 0x4B,U 0x63,U 0x3A, -U 0xA2,U 0x28,U 0xDF,U 0x14, -U 0x7F,U 0xCC,U 0x06,U 0x5D, -U 0x33,U 0x4D,U 0xB3,U 0x63, -U 0x07,U 0xA2,U 0xF6,U 0x86, -U 0x0E,U 0xCD,U 0xFE,U 0x32, -U 0xFF,U 0xA9,U 0xC7,U 0xE9, -U 0x9A,U 0x1C,U 0xBC,U 0x5B, -U 0x85,U 0x75,U 0x54,U 0xE7, -U 0xAF,U 0xA3,U 0x21,U 0xEB, -U 0x7B,U 0x25,U 0x7A,U 0x17, -U 0x70,U 0x4D,U 0x8E,U 0x49, -U 0x40,U 0x09,U 0xD7,U 0x8C, -U 0x46,U 0xC8,U 0xD2,U 0xDE, -U 0x27,U 0x49,U 0x1E,U 0xBA, -U 0x8A,U 0x30,U 0x4E,U 0xBC, -U 0x26,U 0x27,U 0x9A,U 0x0A, -U 0xF9,U 0x54,U 0xB2,U 0xBC, -U 0xAE,U 0x19,U 0x25,U 0xBA, -U 0x46,U 0x5B,U 0xF5,U 0xDF, -U 0x4D,U 0xA7,U 0x79,U 0xDC, -U 0x7C,U 0x4D,U 0x0E,U 0x64, -U 0x91,U 0x93,U 0xB4,U 0x3E, -U 0x62,U 0xB4,U 0x5E,U 0x3B, -U 0xC4,U 0x40,U 0x6B,U 0x9B, -U 0x81,U 0x56,U 0xFB,U 0x71, -U 0xBA,U 0xD6,U 0xA6,U 0x68, -U 0xBD,U 0xA6,U 0x2E,U 0x9E, -U 0xD6,U 0x6B,U 0xD1,U 0x5D, -U 0x5D,U 0x73,U 0x08,U 0xA1, -U 0x03,U 0xA1,U 0x47,U 0xBD, -U 0x1B,U 0xC3,U 0x35,U 0xA8, -U 0x93,U 0x6B,U 0x0E,U 0x40, -U 0xF7,U 0xF6,U 0xAB,U 0x3A, -U 0xE1,U 0x38,U 0x94,U 0xC1, -U 0xB2,U 0x38,U 0x4D,U 0xF6, -U 0xE8,U 0xF9,U 0x02,U 0xE2, -U 0x39,U 0x3C,U 0x8E,U 0x67, -U 0x79,U 0x72,U 0x7C,U 0x14, -U 0xBE,U 0x0B,U 0x68,U 0x3F, -U 0x8A,U 0xF4,U 0x0C,U 0xD6, -U 0x95,U 0xEA,U 0xA8,U 0xD2, -U 0x05,U 0x73,U 0xBD,U 0xBD, -U 0x76,U 0x74,U 0xCC,U 0x5F, -U 0x82,U 0x9F,U 0xC8,U 0xF6, -U 0xA0,U 0x93,U 0xAE,U 0xCB, -U 0x42,U 0x5B,U 0x01,U 0x1F, -U 0xBF,U 0x3D,U 0xA4,U 0xFA, -U 0x92,U 0xEB,U 0x6E,U 0xE1, -U 0x77,U 0xB4,U 0x9D,U 0x4F, -U 0xF0,U 0x7B,U 0xEC,U 0x41, -U 0x8C,U 0xBB,U 0x7B,U 0xD7, -U 0x6F,U 0xCF,U 0x3E,U 0x6F, -U 0xA5,U 0x61,U 0xBD,U 0x56, -U 0xCA,U 0x8E,U 0xAC,U 0x3F, -U 0x56,U 0x16,U 0x49,U 0x7B, -U 0x25,U 0x37,U 0xD0,U 0xB1, -U 0x9B,U 0x5A,U 0x23,U 0xBF, -U 0x25,U 0xD7,U 0x42,U 0x89, -U 0xE3,U 0xC6,U 0x40,U 0x31, -U 0xF4,U 0x7F,U 0xA5,U 0xE8, -U 0xDB,U 0xD9,U 0xBB,U 0x0D, -U 0x63,U 0xAF,U 0xCF,U 0xFD, -U 0xE8,U 0x7B,U 0xAF,U 0x3B, -U 0x49,U 0xD7,U 0x49,U 0xFA, -U 0x7F,U 0x72,U 0x1C,U 0xBD, -U 0xFA,U 0x23,U 0x12,U 0xB7, -U 0xC6,U 0xCF,U 0xB1,U 0x82, -U 0x4D,U 0x8F,U 0xC3,U 0x7E, -U 0x9C,U 0xE0,U 0xB9,U 0x25, -U 0x67,U 0xDA,U 0xC6,U 0x5E, -U 0x1A,U 0xBB,U 0x79,U 0x15, -U 0x65,U 0x35,U 0xF4,U 0xD2, -U 0xE8,U 0xC6,U 0x5E,U 0x72, -U 0x8B,U 0xBF,U 0xBB,U 0xAD, -U 0x0D,U 0xF0,U 0xA9,U 0x1E, -U 0x39,U 0x9B,U 0x41,U 0xD0, -U 0xA1,U 0x82,U 0xE1,U 0x1E, -U 0xB2,U 0x37,U 0xAE,U 0x82, -U 0x6F,U 0x15,U 0x21,U 0x4B, -U 0x5F,U 0x15,U 0x7C,U 0xAB, -U 0x08,U 0x7C,U 0xAB,U 0xCF, -U 0xE1,U 0x5B,U 0x7D,U 0xD6, -U 0xEF,U 0x5B,U 0x9D,U 0x3F, -U 0xCF,U 0xBE,U 0xD5,U 0xF6, -U 0xA3,U 0x0C,U 0x83,U 0xB6, -U 0x75,U 0xF4,U 0xD2,U 0x62, -U 0xB2,U 0xA4,U 0xCF,U 0xA5, -U 0x0C,U 0xD0,U 0xE7,U 0xFD, -U 0x8C,U 0xAE,U 0x9D,U 0x9F, -U 0xDE,U 0x0E,U 0xBF,U 0x0E, -U 0x3C,U 0x07,U 0x35,U 0x7E, -U 0x21,U 0xC3,U 0x52,U 0x47, -U 0x31,U 0x0D,U 0x93,U 0xBC, -U 0xA2,U 0x8F,U 0x17,U 0x55, -U 0xBF,U 0x3D,U 0x94,U 0x38, -U 0x5F,U 0x9B,U 0xCC,U 0x1F, -U 0x8D,U 0xCD,U 0x6B,U 0x4B, -U 0x3B,U 0x7E,U 0x5D,U 0x69, -U 0x42,U 0x5F,U 0x00,U 0xFF, -U 0xF2,U 0xBA,U 0x0D,U 0xBA, -U 0xED,U 0x2B,U 0xB9,U 0x9E, -U 0x9C,U 0x25,U 0x2E,U 0xD1, -U 0x31,U 0xC8,U 0x1C,U 0x67, -U 0x98,U 0xE7,U 0xDC,U 0x79, -U 0xEE,U 0x7D,U 0xDF,U 0x28, -U 0x99,U 0xF7,U 0x40,U 0xCC, -U 0x07,U 0xE0,U 0xF9,U 0x4F, -U 0x9F,U 0x6A,U 0x77,U 0xED, -U 0xE4,U 0xBA,U 0x86,U 0x65, -U 0xC7,U 0xFD,U 0x33,U 0xDB, -U 0x7B,U 0xF6,U 0x33,U 0x79, -U 0x1E,U 0x4E,U 0xCD,U 0xDF, -U 0x5C,U 0x17,U 0x31,U 0xF8, -U 0x0D,U 0x6C,U 0xEF,U 0xC3, -U 0xBB,U 0x57,U 0xF5,U 0xD8, -U 0x38,U 0x3F,U 0xCB,U 0x43, -U 0xE5,U 0xBF,U 0xEE,U 0x68, -U 0x32,U 0xDB,U 0xCA,U 0xF3, -U 0xFF,U 0xF0,U 0x0B,U 0xF6, -U 0xB4,U 0x36,U 0x10,U 0xB5, -U 0xC2,U 0xFD,U 0x3A,U 0xD8, -U 0x90,U 0x0D,U 0x5F,U 0xA5, -U 0x57,U 0xCE,U 0xFD,U 0x1F, -U 0x27,U 0x57,U 0x91,U 0x6C, -U 0xFB,U 0x8B,U 0x7B,U 0x89, -U 0x7F,U 0x07,U 0xCA,U 0xEE, -U 0xA0,U 0x00,U 0x60,U 0x54, -U 0x5F,U 0xE2,U 0x6A,U 0xD8, -U 0x5F,U 0xAA,U 0xE6,U 0xF9, -U 0xF6,U 0x7B,U 0xCE,U 0x10, -U 0x8F,U 0xD7,U 0xFD,U 0x4B, -U 0xD9,U 0x46,U 0xB8,U 0xFE, -U 0xB4,U 0xAF,U 0x2C,U 0x04, -U 0xBA,U 0x5C,U 0xB5,U 0xFA, -U 0x1C,U 0x67,U 0x90,U 0x5C, -U 0x07,U 0xB8,U 0xFC,U 0xAE, -U 0xCA,U 0xDD,U 0xBB,U 0x1A, -U 0xD5,U 0x3C,U 0x5C,U 0xE7, -U 0xBE,U 0xF0,U 0x44,U 0x86, -U 0x81,U 0xFD,U 0xBB,U 0xAE, -U 0x59,U 0xE7,U 0x77,U 0xD3, -U 0x08,U 0xEE,U 0x07,U 0x5C, -U 0x9E,U 0x41,U 0x68,U 0xCD, -U 0x50,U 0xFD,U 0x87,U 0x2B, -U 0x14,U 0xDF,U 0xD7,U 0x0F, -U 0x41,U 0x9F,U 0x73,U 0xBD, -U 0x2D,U 0xBE,U 0xCF,U 0xB9, -U 0x3E,U 0x33,U 0xBE,U 0xCF, -U 0xB9,U 0x7E,U 0x74,U 0x7C, -U 0x5F,U 0x6F,U 0x45,U 0x5F, -U 0x7F,U 0xFD,U 0xC4,U 0x84, -U 0x3C,U 0x39,U 0x09,U 0x79, -U 0x8C,U 0xFE,U 0x4F,U 0x8D, -U 0x56,U 0x4E,U 0x82,U 0xFF, -U 0x73,U 0x7D,U 0x82,U 0xFF, -U 0x73,U 0xFD,U 0x06,U 0xC3, -U 0x3B,U 0x78,U 0xBC,U 0xBE, -U 0x41,U 0xAF,U 0x9F,U 0x2E, -U 0x39,U 0xFF,U 0x7D,U 0xFD, -U 0x0E,U 0xC3,U 0xBB,U 0xB5, -U 0x56,U 0xAE,U 0xA5,U 0x5C, -U 0xEF,U 0xD7,U 0xE3,U 0xD0, -U 0xA7,U 0x11,U 0x7C,U 0xB5, -U 0x30,U 0xEB,U 0x84,U 0x86, -U 0xEF,U 0x68,U 0x82,U 0x8E, -U 0x31,U 0x7C,U 0x28,U 0x9E, -U 0x86,U 0x1B,U 0x28,U 0x9E, -U 0x86,U 0x1B,U 0x32,U 0x62, -U 0xFE,U 0x05,U 0xF0,U 0xA3, -U 0xBE,U 0xFE,U 0x78,U 0x82, -U 0x6E,U 0xE8,U 0x90,U 0x3A, -U 0xC4,U 0xFE,U 0x55,U 0x39, -U 0xE5,U 0xF1,U 0x3B,U 0x70, -U 0xD5,U 0x01,U 0x1E,U 0x72, -U 0xB8,U 0x21,U 0x3B,U 0x01, -U 0x5F,U 0x7E,U 0x02,U 0xBE, -U 0xB9,U 0x86,U 0xF7,U 0x0C, -U 0xBC,U 0x7B,U 0x0C,U 0x3C, -U 0x64,U 0xA4,U 0x38,U 0xC9, -U 0x02,U 0x7D,U 0xE9,U 0x40, -U 0x7C,U 0xA5,U 0x1E,U 0xCF, -U 0x7E,U 0x26,U 0xE8,U 0xED, -U 0xF0,U 0xCA,U 0xB5,U 0x87, -U 0x6C,U 0x5E,U 0xE3,U 0xB8, -U 0xFC,U 0x38,U 0xDD,U 0xB0, -U 0x9C,U 0x7D,U 0x52,U 0x0D, -U 0xE7,U 0x6E,U 0xA3,U 0x9C, -U 0x14,U 0x5F,U 0x37,U 0x1C, -U 0x48,U 0xA0,U 0xA3,U 0x2D, -U 0x81,U 0x8E,U 0x0E,U 0x03, -U 0x5F,U 0x61,U 0xC7,U 0x1A, -U 0xBA,U 0xDF,U 0x11,U 0x79, -U 0xE0,U 0x61,U 0xF6,U 0x59, -U 0xC1,U 0x57,U 0x88,U 0x7D, -U 0x47,U 0xF8,U 0x50,U 0x4E, -U 0x94,U 0x99,U 0xC1,U 0xEB, -U 0x2A,U 0x27,U 0x4A,U 0x28, -U 0x25,U 0x50,U 0xDA,U 0x01, -U 0x9F,U 0x60,U 0x7B,U 0x5B, -U 0x52,U 0x7D,U 0x4A,U 0xDB, -U 0xED,U 0xD7,U 0xE6,U 0xE5, -U 0x5D,U 0xDD,U 0xBE,U 0xAF, -U 0xE6,U 0xE8,U 0xFA,U 0x88, -U 0xDF,U 0xB3,U 0xA0,U 0x8B, -U 0x87,U 0xA5,U 0xBD,U 0x5C, -U 0xBF,U 0xCB,U 0x25,U 0xBC, -U 0x05,U 0x75,U 0x90,U 0x23, -U 0xFA,U 0xDD,U 0xD1,U 0x93, -U 0x95,U 0xED,U 0xDF,U 0x7D, -U 0x98,U 0xDB,U 0x22,U 0x7C, -U 0x97,U 0x8E,U 0xAF,U 0x66, -U 0x52,U 0xBA,U 0x9A,U 0x77, -U 0xFD,U 0x6A,U 0xA5,U 0x41, -U 0x9F,U 0xC3,U 0xAE,U 0x55, -U 0x77,U 0x8A,U 0xE3,U 0x34, -U 0x7A,U 0x1A,U 0xAF,U 0x41, -U 0xB0,U 0x2F,U 0xC6,U 0xFE, -U 0xF7,U 0xBE,U 0x70,U 0x08, -U 0x76,U 0xFC,U 0x24,U 0x31, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 14:49:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B4981065672; Mon, 27 Oct 2008 14:49:13 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A2438FC0A; Mon, 27 Oct 2008 14:49:13 +0000 (UTC) (envelope-from rrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9REnCxs042438; Mon, 27 Oct 2008 14:49:12 GMT (envelope-from rrs@svn.freebsd.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9REnCsd042437; Mon, 27 Oct 2008 14:49:12 GMT (envelope-from rrs@svn.freebsd.org) Message-Id: <200810271449.m9REnCsd042437@svn.freebsd.org> From: Randall Stewart Date: Mon, 27 Oct 2008 14:49:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184340 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 14:49:13 -0000 Author: rrs Date: Mon Oct 27 14:49:12 2008 New Revision: 184340 URL: http://svn.freebsd.org/changeset/base/184340 Log: More issues with pre-blocking: a) Need for EEOR mode to take the min of the socket buffer size and the add more threshold, otherwise if you are so silly as to set a send buf size less than the add-more you could block forever in eeor mode. b) We were incorrectly using the sysctl vs the calculated value. This causes us to block forever if the addmore theshold is larger than then the socket buffer size. Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Mon Oct 27 14:29:49 2008 (r184339) +++ head/sys/netinet/sctp_output.c Mon Oct 27 14:49:12 2008 (r184340) @@ -12435,7 +12435,7 @@ sctp_lower_sosend(struct socket *so, goto out_unlocked; } if (user_marks_eor) { - local_add_more = SCTP_BASE_SYSCTL(sctp_add_more_threshold); + local_add_more = min(SCTP_SB_LIMIT_SND(so), SCTP_BASE_SYSCTL(sctp_add_more_threshold)); } else { /*- * For non-eeor the whole message must fit in @@ -12454,9 +12454,15 @@ sctp_lower_sosend(struct socket *so, /* No room right now ! */ SOCKBUF_LOCK(&so->so_snd); inqueue_bytes = stcb->asoc.total_output_queue_size - (stcb->asoc.chunks_on_out_queue * sizeof(struct sctp_data_chunk)); - while ((SCTP_SB_LIMIT_SND(so) < (inqueue_bytes + SCTP_BASE_SYSCTL(sctp_add_more_threshold))) || - ((stcb->asoc.stream_queue_cnt + stcb->asoc.chunks_on_out_queue) >= SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue) /* while */ )) { - + while ((SCTP_SB_LIMIT_SND(so) < (inqueue_bytes + local_add_more)) || + ((stcb->asoc.stream_queue_cnt + stcb->asoc.chunks_on_out_queue) >= SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue)) /* while */ ) { + SCTPDBG(SCTP_DEBUG_OUTPUT1, "pre_block limit:%d <(inq:%d + %d) || (%d+%d > %d)\n", + SCTP_SB_LIMIT_SND(so), + inqueue_bytes, + local_add_more, + stcb->asoc.stream_queue_cnt, + stcb->asoc.chunks_on_out_queue, + SCTP_BASE_SYSCTL(sctp_max_chunks_on_queue)); if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) { sctp_log_block(SCTP_BLOCK_LOG_INTO_BLKA, so, asoc, sndlen); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 15:15:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4798C1065674; Mon, 27 Oct 2008 15:15:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36F038FC1E; Mon, 27 Oct 2008 15:15:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RFF8U5042971; Mon, 27 Oct 2008 15:15:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RFF86d042970; Mon, 27 Oct 2008 15:15:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810271515.m9RFF86d042970@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 27 Oct 2008 15:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184341 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 15:15:09 -0000 Author: bz Date: Mon Oct 27 15:15:08 2008 New Revision: 184341 URL: http://svn.freebsd.org/changeset/base/184341 Log: We do not have a libkse anymore and Mk/bsd.* does not know about LIBKSE anymore, so s,MK_LIBKSE,MK_LIBPTHREAD,. Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Mon Oct 27 14:49:12 2008 (r184340) +++ head/usr.sbin/Makefile Mon Oct 27 15:15:08 2008 (r184341) @@ -292,7 +292,7 @@ _moused= moused _vidcontrol= vidcontrol .endif -.if ${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no" +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" .if ${MK_PPP} != "no" _pppctl= pppctl .endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 15:21:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59081065682; Mon, 27 Oct 2008 15:21:15 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C47258FC08; Mon, 27 Oct 2008 15:21:15 +0000 (UTC) (envelope-from dds@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RFLFIG043135; Mon, 27 Oct 2008 15:21:15 GMT (envelope-from dds@svn.freebsd.org) Received: (from dds@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RFLFpj043134; Mon, 27 Oct 2008 15:21:15 GMT (envelope-from dds@svn.freebsd.org) Message-Id: <200810271521.m9RFLFpj043134@svn.freebsd.org> From: Diomidis Spinellis Date: Mon, 27 Oct 2008 15:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184342 - head/bin/cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 15:21:15 -0000 Author: dds Date: Mon Oct 27 15:21:15 2008 New Revision: 184342 URL: http://svn.freebsd.org/changeset/base/184342 Log: Add fallback when mmap fails on regular files. Some filesystems, like smbnetfs, do not support mmap. Reported by: Harti Brandt MFC after: 1 month Modified: head/bin/cp/utils.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Mon Oct 27 15:15:08 2008 (r184341) +++ head/bin/cp/utils.c Mon Oct 27 15:21:15 2008 (r184342) @@ -137,41 +137,39 @@ copy_file(const FTSENT *entp, int dne) * Mmap and write if less than 8M (the limit is so we don't totally * trash memory on big files. This is really a minor hack, but it * wins some CPU back. + * Some filesystems, such as smbnetfs, don't support mmap, + * so this is a best-effort attempt. */ #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED if (S_ISREG(fs->st_mode) && fs->st_size > 0 && - fs->st_size <= 8 * 1048576) { - if ((p = mmap(NULL, (size_t)fs->st_size, PROT_READ, - MAP_SHARED, from_fd, (off_t)0)) == MAP_FAILED) { + fs->st_size <= 8 * 1024 * 1024 && + (p = mmap(NULL, (size_t)fs->st_size, PROT_READ, + MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) { + wtotal = 0; + for (bufp = p, wresid = fs->st_size; ; + bufp += wcount, wresid -= (size_t)wcount) { + wcount = write(to_fd, bufp, wresid); + if (wcount <= 0) + break; + wtotal += wcount; + if (info) { + info = 0; + (void)fprintf(stderr, + "%s -> %s %3d%%\n", + entp->fts_path, to.p_path, + cp_pct(wtotal, fs->st_size)); + } + if (wcount >= (ssize_t)wresid) + break; + } + if (wcount != (ssize_t)wresid) { + warn("%s", to.p_path); + rval = 1; + } + /* Some systems don't unmap on close(2). */ + if (munmap(p, fs->st_size) < 0) { warn("%s", entp->fts_path); rval = 1; - } else { - wtotal = 0; - for (bufp = p, wresid = fs->st_size; ; - bufp += wcount, wresid -= (size_t)wcount) { - wcount = write(to_fd, bufp, wresid); - if (wcount <= 0) - break; - wtotal += wcount; - if (info) { - info = 0; - (void)fprintf(stderr, - "%s -> %s %3d%%\n", - entp->fts_path, to.p_path, - cp_pct(wtotal, fs->st_size)); - } - if (wcount >= (ssize_t)wresid) - break; - } - if (wcount != (ssize_t)wresid) { - warn("%s", to.p_path); - rval = 1; - } - /* Some systems don't unmap on close(2). */ - if (munmap(p, fs->st_size) < 0) { - warn("%s", entp->fts_path); - rval = 1; - } } } else #endif From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 15:27:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E113C1065684; Mon, 27 Oct 2008 15:27:43 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout021.mac.com (asmtpout021.mac.com [17.148.16.96]) by mx1.freebsd.org (Postfix) with ESMTP id C9BE08FC1E; Mon, 27 Oct 2008 15:27:43 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=US-ASCII; format=flowed Received: from srangarajan-lt.jnpr.net (natint3.juniper.net [66.129.224.36]) by asmtp021.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug 7 2008; 32bit)) with ESMTPSA id <0K9E0012YLM37450@asmtp021.mac.com>; Mon, 27 Oct 2008 08:27:41 -0700 (PDT) Message-id: <0BBCA616-4F9D-48D5-9360-CACA69480632@mac.com> From: Marcel Moolenaar To: Stanislav Sedov In-reply-to: <20081027153345.d4e9dcad.stas@FreeBSD.org> Date: Mon, 27 Oct 2008 08:27:39 -0700 References: <200810250618.m9P6ICWl023370@svn.freebsd.org> <20081027153345.d4e9dcad.stas@FreeBSD.org> X-Mailer: Apple Mail (2.929.2) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 15:27:44 -0000 On Oct 27, 2008, at 5:33 AM, Stanislav Sedov wrote: >> Add a driver for flash memory that implements to the Common Flash >> Memory Interface (CFI). The flash memory can be read and written >> to through /dev/cfi# and an ioctl() exists so processes can read >> the query information. >> The driver supports the AMD and Intel command set, though only >> the AMD command has been tested. >> >> Obtained from: Juniper Networks, Inc. > > Do you plan to introduce some infrastructure so other flash-like > drivers could be attached (e.g. non-CFI compliant, SPI flashes, etc)? > I've started working on such thing and don't want to do the duplicate > works, so if you have something in mind it's time to share:-) I have been thinking about it, but I don't have anything yet. As it is, I probably won't have the time for it either. If you started with something, then feel free to take cfi(4) and integrate it. Also, access to the raw flash is nice, but one typically uses it for various things. It would be great if we had an infrastructure in which we could allow access to the flash through more high-level interfaces. For example: The flash may contain U-Boot (possibly with embedded environment), FreeBSD loader, separate blocks for U-Boot environment, a file system, etc. Those parts of the flash that are used for disk-like storage should ideally be exposed through GEOM. Environments should ideally be exposed through a standardized interface so that we only have to write a single utility to modify environments. Open Firmware and/or EFI environment variables could then also be exposed through that interfaces, eliminating the need for drivers like powermc_nvram and special-purpose tools like nvram(8). It's not easy, but probably worth thinking about... > And thanks for this great work! You're welcome. I hope it's a good start... -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 16:04:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D5191065684; Mon, 27 Oct 2008 16:04:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA0B8FC2E; Mon, 27 Oct 2008 16:04:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RG2Y1e012952; Mon, 27 Oct 2008 12:03:10 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Warner Losh Date: Mon, 27 Oct 2008 11:59:31 -0400 User-Agent: KMail/1.9.7 References: <868wsewzos.fsf@ds4.des.no> <200810241031.08780.jhb@freebsd.org> <20081024.164740.74747369.imp@bsdimp.com> In-Reply-To: <20081024.164740.74747369.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271159.31843.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 12:03:11 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8508/Mon Oct 27 09:02:44 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: danfe@freebsd.org, marcel@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, des@des.no Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:04:27 -0000 On Friday 24 October 2008 06:47:40 pm Warner Losh wrote: > From: John Baldwin > Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf > Date: Fri, 24 Oct 2008 10:31:07 -0400 > > > On Friday 24 October 2008 09:27:03 am Alexey Dokuchaev wrote: > > > On Fri, Oct 24, 2008 at 03:26:43AM +0200, Dag-Erling Sm??rgrav wrote: > > > > Warner Losh writes: > > > > > We already have a better mechanism for including config files. We > > > > > should be using that instead of poluting another port with the > > > > > DEFAULTS file. > > > > > > > > Should we even have DEFAULTS files at all? IMHO they just confuse > > > > matters by introducing "stealth" options into your config. > > > > > > I tend to second this. I always try to get everything possible out of > > > my kernel to modules, and thus was surprised to see io.ko and mem.ko > > > fail to load because they were silently included into my custom kernel. > > > > > > I understand that some things like 'device isa' and > > > 'device npx' aren't really optional, but if something is useful to have, > > > but can be loaded as a module, it belongs to GENERIC rather than > > > DEFAULTS. Killing the latter altogether and throwing a comment that > > > says particular option or device is mandatory in GENERIC is probably > > > even better (and more transparent). > > > > The one thing I think DEFAULTS is useful for are replacing NO_FOO options with > > FOO options. That is, if someone wants to turn a feature on by default, I'd > > rather them put 'options FOO' in DEFAULTS rather than rename all the > > #ifdef's,e tc. to '#ifndef NO_FOO'. > > Wouldn't it be better to move to a system where we explicitly include > std.i386 and have them all defined there? We already encourage stuff > like this with advice to include GENERIC with nodev... I wouldn't mind a std.i386, and if we make config's include keyword fall back to 'sys/conf' for relative path name lookups if the lookup in '.' fails then you can even put those files in sys/conf with the still-clean syntax of 'include std.i386'. However, I don't know about you, but I _never_ build a config by including GENERIC and then weeding stuff out. Too much stuff to weed out. Once I have a customized config for a machine I then include that in development branches to install kernels to different directories under /boot, etc. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 16:13:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89613106567A; Mon, 27 Oct 2008 16:13:28 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 781148FC75; Mon, 27 Oct 2008 16:13:28 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RGDSWT044217; Mon, 27 Oct 2008 16:13:28 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RGDSSU044216; Mon, 27 Oct 2008 16:13:28 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271613.m9RGDSSU044216@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 16:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184343 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:13:28 -0000 Author: sam Date: Mon Oct 27 16:13:28 2008 New Revision: 184343 URL: http://svn.freebsd.org/changeset/base/184343 Log: o fix MK_TCSH == no: the default master.passwd sets up root to use /bin/csh but there won't be one so root won't be able to login; edit the installed file to use /bin/sh in this case. o while here split csh-related files apart from sh and only install them when requested Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Mon Oct 27 15:21:15 2008 (r184342) +++ head/etc/Makefile Mon Oct 27 16:13:28 2008 (r184343) @@ -8,7 +8,7 @@ SUBDIR= sendmail .endif BIN1= auth.conf \ - crontab csh.cshrc csh.login csh.logout devd.conf devfs.conf \ + crontab devd.conf devfs.conf \ ddb.conf dhclient.conf disktab fbtab \ ftpusers gettytab group \ hosts hosts.allow hosts.equiv \ @@ -84,6 +84,10 @@ BIN1+= portsnap.conf BIN1+= pf.os .endif +.if ${MK_TCSH} != "no" +BIN1+= csh.cshrc csh.login csh.logout +.endif + .if ${MK_WIRELESS} != "no" BIN1+= regdomain.xml .endif @@ -148,9 +152,12 @@ distribution: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 \ ${BIN2} ${DESTDIR}/etc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \ - master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; \ - pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ - ${DESTDIR}/etc/master.passwd + master.passwd nsmb.conf opieaccess ${DESTDIR}/etc; +.if ${MK_TCSH} == "no" + sed -i "" -e 's;/bin/csh;;' ${DESTDIR}/etc/master.passwd +.endif + pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \ + ${DESTDIR}/etc/master.passwd .if ${MK_BLUETOOTH} != "no" ${_+_}cd ${.CURDIR}/bluetooth; ${MAKE} install .endif @@ -195,14 +202,18 @@ distribution: .endif cd ${.CURDIR}/root; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ + dot.profile ${DESTDIR}/root/.profile; \ + rm -f ${DESTDIR}/.profile; \ + ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile +.if ${MK_TCSH} != "no" + cd ${.CURDIR}/root; \ + ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.cshrc ${DESTDIR}/root/.cshrc; \ ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ dot.login ${DESTDIR}/root/.login; \ - ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 \ - dot.profile ${DESTDIR}/root/.profile; \ - rm -f ${DESTDIR}/.cshrc ${DESTDIR}/.profile; \ - ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc; \ - ln ${DESTDIR}/root/.profile ${DESTDIR}/.profile + rm -f ${DESTDIR}/.cshrc; \ + ln ${DESTDIR}/root/.cshrc ${DESTDIR}/.cshrc +.endif cd ${.CURDIR}/mtree; ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 444 \ ${MTREE} ${DESTDIR}/etc/mtree .if ${MK_PPP} != "no" From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 16:20:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4592106566B; Mon, 27 Oct 2008 16:20:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C3AA58FC08; Mon, 27 Oct 2008 16:20:40 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RGKe9X044442; Mon, 27 Oct 2008 16:20:40 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RGKeRZ044441; Mon, 27 Oct 2008 16:20:40 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200810271620.m9RGKeRZ044441@svn.freebsd.org> From: Andrew Thompson Date: Mon, 27 Oct 2008 16:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184344 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:20:40 -0000 Author: thompsa Date: Mon Oct 27 16:20:40 2008 New Revision: 184344 URL: http://svn.freebsd.org/changeset/base/184344 Log: Make a note about the notify codes for the four special function keys above the keyboard on the EeePC. Modified: head/etc/devd.conf Modified: head/etc/devd.conf ============================================================================== --- head/etc/devd.conf Mon Oct 27 16:13:28 2008 (r184343) +++ head/etc/devd.conf Mon Oct 27 16:20:40 2008 (r184344) @@ -256,6 +256,7 @@ notify 10 { }; # The next blocks enable volume hotkeys that can be found on the Asus EeePC +# The four keys above the keyboard notify 0x1a through to 0x1d respectively notify 0 { match "system" "ACPI"; match "subsystem" "ASUS-Eee"; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 16:46:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48184106567F; Mon, 27 Oct 2008 16:46:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 358508FC26; Mon, 27 Oct 2008 16:46:51 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RGkoUK045674; Mon, 27 Oct 2008 16:46:50 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RGkoKa045665; Mon, 27 Oct 2008 16:46:50 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271646.m9RGkoKa045665@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 16:46:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184345 - in head/sys: dev/ath dev/iwn dev/ral dev/usb dev/wpi net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:46:51 -0000 Author: sam Date: Mon Oct 27 16:46:50 2008 New Revision: 184345 URL: http://svn.freebsd.org/changeset/base/184345 Log: o use the new association callback to notify the driver when joining a bss in sta and adhoc modes; this should've been done forever ago as most all drivers use this hook to set per-station transmit parameters such as for tx rate control o adjust drivers to remove explicit calls to the driver newassoc method Modified: head/sys/dev/ath/if_ath.c head/sys/dev/iwn/if_iwn.c head/sys/dev/ral/rt2560.c head/sys/dev/ral/rt2661.c head/sys/dev/usb/if_zyd.c head/sys/dev/wpi/if_wpi.c head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_sta.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 16:46:50 2008 (r184345) @@ -5722,10 +5722,6 @@ ath_newstate(struct ieee80211vap *vap, e break; case IEEE80211_M_STA: /* - * Fakeup since we're not called by net80211. - */ - ath_newassoc(ni, 1); - /* * Defer beacon timer configuration to the next * beacon frame so we have a current TSF to use * (any TSF collected when scanning is likely old). Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/dev/iwn/if_iwn.c Mon Oct 27 16:46:50 2008 (r184345) @@ -3648,11 +3648,6 @@ iwn_run(struct iwn_softc *sc) return error; } - if (ic->ic_opmode == IEEE80211_M_STA) { - /* fake a join to init the tx rate */ - iwn_newassoc(ni, 1); - } - error = iwn_init_sensitivity(sc); if (error != 0) { device_printf(sc->sc_dev, Modified: head/sys/dev/ral/rt2560.c ============================================================================== --- head/sys/dev/ral/rt2560.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/dev/ral/rt2560.c Mon Oct 27 16:46:50 2008 (r184345) @@ -831,13 +831,8 @@ rt2560_newstate(struct ieee80211vap *vap /* turn assocation led on */ rt2560_update_led(sc, 1, 0); - if (vap->iv_opmode != IEEE80211_M_MONITOR) { - if (vap->iv_opmode == IEEE80211_M_STA) { - /* fake a join to init the tx rate */ - rt2560_newassoc(ni, 1); - } + if (vap->iv_opmode != IEEE80211_M_MONITOR) rt2560_enable_tsf_sync(sc); - } } return error; } Modified: head/sys/dev/ral/rt2661.c ============================================================================== --- head/sys/dev/ral/rt2661.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/dev/ral/rt2661.c Mon Oct 27 16:46:50 2008 (r184345) @@ -830,13 +830,8 @@ rt2661_newstate(struct ieee80211vap *vap if (error != 0) return error; } - if (vap->iv_opmode != IEEE80211_M_MONITOR) { - if (vap->iv_opmode == IEEE80211_M_STA) { - /* fake a join to init the tx rate */ - rt2661_newassoc(ni, 1); - } + if (vap->iv_opmode != IEEE80211_M_MONITOR) rt2661_enable_tsf_sync(sc); - } } return error; } Modified: head/sys/dev/usb/if_zyd.c ============================================================================== --- head/sys/dev/usb/if_zyd.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/dev/usb/if_zyd.c Mon Oct 27 16:46:50 2008 (r184345) @@ -740,11 +740,6 @@ zyd_task(void *arg) IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid); zyd_set_bssid(sc, sc->sc_bssid); } - - if (vap->iv_opmode == IEEE80211_M_STA) { - /* fake a join to init the tx rate */ - zyd_newassoc(ni, 1); - } break; } default: Modified: head/sys/dev/wpi/if_wpi.c ============================================================================== --- head/sys/dev/wpi/if_wpi.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/dev/wpi/if_wpi.c Mon Oct 27 16:46:50 2008 (r184345) @@ -2522,11 +2522,6 @@ wpi_run(struct wpi_softc *sc, struct iee return error; } - if (vap->iv_opmode == IEEE80211_M_STA) { - /* fake a join to init the tx rate */ - wpi_newassoc(ni, 1); - } - /* link LED always on while associated */ wpi_set_led(sc, WPI_LED_LINK, 0, 1); Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/net80211/ieee80211_adhoc.c Mon Oct 27 16:46:50 2008 (r184345) @@ -104,9 +104,7 @@ adhoc_vattach(struct ieee80211vap *vap) static int adhoc_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) { -#ifdef IEEE80211_DEBUG struct ieee80211com *ic = vap->iv_ic; -#endif struct ieee80211_node *ni; enum ieee80211_state ostate; @@ -208,6 +206,12 @@ adhoc_newstate(struct ieee80211vap *vap, */ if (ni->ni_authmode != IEEE80211_AUTH_8021X) ieee80211_node_authorize(ni); + /* + * Fake association when joining an existing bss. + */ + if (!IEEE80211_ADDR_EQ(ni->ni_macaddr, vap->iv_myaddr) && + ic->ic_newassoc != NULL) + ic->ic_newassoc(ni, ostate != IEEE80211_S_RUN); break; case IEEE80211_S_SLEEP: ieee80211_sta_pwrsave(vap, 0); Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Mon Oct 27 16:20:40 2008 (r184344) +++ head/sys/net80211/ieee80211_sta.c Mon Oct 27 16:46:50 2008 (r184345) @@ -400,6 +400,11 @@ sta_newstate(struct ieee80211vap *vap, e */ if (ni->ni_authmode != IEEE80211_AUTH_8021X) ieee80211_node_authorize(ni); + /* + * Fake association when joining an existing bss. + */ + if (ic->ic_newassoc != NULL) + ic->ic_newassoc(vap->iv_bss, ostate != IEEE80211_S_RUN); break; case IEEE80211_S_SLEEP: ieee80211_sta_pwrsave(vap, 0); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 16:47:52 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 379FB1065675; Mon, 27 Oct 2008 16:47:52 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from ebb.errno.com (ebb.errno.com [69.12.149.25]) by mx1.freebsd.org (Postfix) with ESMTP id 0DB9B8FC1E; Mon, 27 Oct 2008 16:47:51 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from trouble.errno.com (trouble.errno.com [10.0.0.248]) (authenticated bits=0) by ebb.errno.com (8.13.6/8.12.6) with ESMTP id m9RGlpid025636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Oct 2008 09:47:51 -0700 (PDT) (envelope-from sam@freebsd.org) Message-ID: <4905F0B7.2030103@freebsd.org> Date: Mon, 27 Oct 2008 09:47:51 -0700 From: Sam Leffler Organization: FreeBSD Project User-Agent: Thunderbird 2.0.0.9 (X11/20071125) MIME-Version: 1.0 To: Sam Leffler References: <200810271646.m9RGkoKa045665@svn.freebsd.org> In-Reply-To: <200810271646.m9RGkoKa045665@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-DCC-Rhyolite-Metrics: ebb.errno.com; whitelist Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184345 - in head/sys: dev/ath dev/iwn dev/ral dev/usb dev/wpi net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:47:52 -0000 Sam Leffler wrote: > Author: sam > Date: Mon Oct 27 16:46:50 2008 > New Revision: 184345 > URL: http://svn.freebsd.org/changeset/base/184345 > > Log: > o use the new association callback to notify the driver when joining a bss > in sta and adhoc modes; this should've been done forever ago as most all > drivers use this hook to set per-station transmit parameters such as for > tx rate control > o adjust drivers to remove explicit calls to the driver newassoc method > > Reviewed by: thompsa From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 16:58:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 06C2A106567B; Mon, 27 Oct 2008 16:58:07 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E83218FC1C; Mon, 27 Oct 2008 16:58:06 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RGw6G4045919; Mon, 27 Oct 2008 16:58:06 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RGw6iL045914; Mon, 27 Oct 2008 16:58:06 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271658.m9RGw6iL045914@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 16:58:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184346 - in head/sys/dev/ath: . ath_rate/amrr ath_rate/onoe ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 16:58:07 -0000 Author: sam Date: Mon Oct 27 16:58:06 2008 New Revision: 184346 URL: http://svn.freebsd.org/changeset/base/184346 Log: now that the new association callback is used when joining a bss we can eliminate the ath_rate_newassoc callback and associated code Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athrate.h Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- head/sys/dev/ath/ath_rate/amrr/amrr.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Mon Oct 27 16:58:06 2008 (r184346) @@ -321,49 +321,6 @@ ath_rate_ctl_start(struct ath_softc *sc, #undef RATE } -static void -ath_rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_update(sc, ni, 0); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; - - if (state == IEEE80211_S_INIT) - return; - if (vap->iv_opmode == IEEE80211_M_STA) { - /* - * Reset local xmit state; this is really only - * meaningful when operating in station mode. - */ - ni = vap->iv_bss; - if (state == IEEE80211_S_RUN) { - ath_rate_ctl_start(sc, ni); - } else { - ath_rate_update(sc, ni, 0); - } - } else { - /* - * When operating as a station the node table holds - * the AP's that were discovered during scanning. - * For any other operating mode we want to reset the - * tx rate state of each node. - */ - ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); - ath_rate_update(sc, vap->iv_bss, 0); - } -} - /* * Examine and potentially adjust the transmit rate. */ Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- head/sys/dev/ath/ath_rate/onoe/onoe.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Mon Oct 27 16:58:06 2008 (r184346) @@ -295,49 +295,6 @@ ath_rate_ctl_start(struct ath_softc *sc, #undef RATE } -static void -ath_rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_update(sc, ni, 0); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - struct ieee80211_node *ni; - - if (state == IEEE80211_S_INIT) - return; - if (vap->iv_opmode == IEEE80211_M_STA) { - /* - * Reset local xmit state; this is really only - * meaningful when operating in station mode. - */ - ni = vap->iv_bss; - if (state == IEEE80211_S_RUN) { - ath_rate_ctl_start(sc, ni); - } else { - ath_rate_update(sc, ni, 0); - } - } else { - /* - * When operating as a station the node table holds - * the AP's that were discovered during scanning. - * For any other operating mode we want to reset the - * tx rate state of each node. - */ - ieee80211_iterate_nodes(&ic->ic_sta, ath_rate_cb, sc); - ath_rate_update(sc, vap->iv_bss, 0); - } -} - /* * Examine and potentially adjust the transmit rate. */ Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 16:58:06 2008 (r184346) @@ -759,34 +759,6 @@ ath_rate_ctl_reset(struct ath_softc *sc, } static void -rate_cb(void *arg, struct ieee80211_node *ni) -{ - struct ath_softc *sc = arg; - - ath_rate_newassoc(sc, ATH_NODE(ni), 1); -} - -/* - * Reset the rate control state for each 802.11 state transition. - */ -void -ath_rate_newstate(struct ieee80211vap *vap, enum ieee80211_state state) -{ - struct ieee80211com *ic = vap->iv_ic; - struct ath_softc *sc = ic->ic_ifp->if_softc; - - if (state == IEEE80211_S_RUN) { - if (vap->iv_opmode != IEEE80211_M_STA) { - /* - * Sync rates for associated stations and neighbors. - */ - ieee80211_iterate_nodes(&ic->ic_sta, rate_cb, sc); - } - ath_rate_newassoc(sc, ATH_NODE(vap->iv_bss), 1); - } -} - -static void ath_rate_sysctlattach(struct ath_softc *sc, struct sample_softc *osc) { struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(sc->sc_dev); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 16:58:06 2008 (r184346) @@ -5664,11 +5664,6 @@ ath_newstate(struct ieee80211vap *vap, e if (ath_hal_keyisvalid(ah, i)) ath_hal_keysetmac(ah, i, ni->ni_bssid); } - /* - * Notify the rate control algorithm so rates - * are setup should ath_beacon_alloc be called. - */ - ath_rate_newstate(vap, nstate); /* * Invoke the parent method to do net80211 work. Modified: head/sys/dev/ath/if_athrate.h ============================================================================== --- head/sys/dev/ath/if_athrate.h Mon Oct 27 16:46:50 2008 (r184345) +++ head/sys/dev/ath/if_athrate.h Mon Oct 27 16:58:06 2008 (r184346) @@ -97,12 +97,6 @@ void ath_rate_node_cleanup(struct ath_so */ void ath_rate_newassoc(struct ath_softc *, struct ath_node *, int isNewAssociation); -/* - * Update/reset rate control state for 802.11 state transitions. - * Important mostly as the analog to ath_rate_newassoc when operating - * in station mode. - */ -void ath_rate_newstate(struct ieee80211vap *, enum ieee80211_state); /* * Transmit handling. From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:03:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D4AC106566C; Mon, 27 Oct 2008 17:03:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04D598FC1F; Mon, 27 Oct 2008 17:03:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RH3OlW046067; Mon, 27 Oct 2008 17:03:24 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RH3OjD046062; Mon, 27 Oct 2008 17:03:24 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271703.m9RH3OjD046062@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184347 - in head/sys/dev/ath: . ath_rate/amrr ath_rate/onoe ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:03:25 -0000 Author: sam Date: Mon Oct 27 17:03:24 2008 New Revision: 184347 URL: http://svn.freebsd.org/changeset/base/184347 Log: remove driver-private equivalent of ni_txparms; it's now superfluous Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c head/sys/dev/ath/ath_rate/onoe/onoe.c head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_rate/amrr/amrr.c ============================================================================== --- head/sys/dev/ath/ath_rate/amrr/amrr.c Mon Oct 27 16:58:06 2008 (r184346) +++ head/sys/dev/ath/ath_rate/amrr/amrr.c Mon Oct 27 17:03:24 2008 (r184347) @@ -277,8 +277,7 @@ static void ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) - struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = an->an_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; int srate; KASSERT(ni->ni_rates.rs_nrates > 0, ("no rates")); Modified: head/sys/dev/ath/ath_rate/onoe/onoe.c ============================================================================== --- head/sys/dev/ath/ath_rate/onoe/onoe.c Mon Oct 27 16:58:06 2008 (r184346) +++ head/sys/dev/ath/ath_rate/onoe/onoe.c Mon Oct 27 17:03:24 2008 (r184347) @@ -251,8 +251,7 @@ static void ath_rate_ctl_start(struct ath_softc *sc, struct ieee80211_node *ni) { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) - struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = an->an_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; int srate; KASSERT(ni->ni_rates.rs_nrates > 0, ("no rates")); Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 16:58:06 2008 (r184346) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 17:03:24 2008 (r184347) @@ -654,7 +654,7 @@ ath_rate_ctl_reset(struct ath_softc *sc, { #define RATE(_ix) (ni->ni_rates.rs_rates[(_ix)] & IEEE80211_RATE_VAL) struct ath_node *an = ATH_NODE(ni); - const struct ieee80211_txparam *tp = an->an_tp; + const struct ieee80211_txparam *tp = ni->ni_txparms; struct sample_node *sn = ATH_NODE_SAMPLE(an); const HAL_RATE_TABLE *rt = sc->sc_currates; int x, y, srate; Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 16:58:06 2008 (r184346) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:03:24 2008 (r184347) @@ -5820,29 +5820,10 @@ ath_newassoc(struct ieee80211_node *ni, struct ath_node *an = ATH_NODE(ni); struct ieee80211vap *vap = ni->ni_vap; struct ath_softc *sc = vap->iv_ic->ic_ifp->if_softc; - const struct ieee80211_txparam *tp; - enum ieee80211_phymode mode; + const struct ieee80211_txparam *tp = ni->ni_txparms; - /* - * Deduce netband of station to simplify setting up xmit - * parameters. Note this allows us to assign different - * parameters to each station in a mixed bss (b/g, n/[abg]). - */ - if (ni->ni_flags & IEEE80211_NODE_HT) { - if (IEEE80211_IS_CHAN_5GHZ(ni->ni_chan)) - mode = IEEE80211_MODE_11NA; - else - mode = IEEE80211_MODE_11NG; - } else if (IEEE80211_IS_CHAN_A(ni->ni_chan)) - mode = IEEE80211_MODE_11A; - else if (ni->ni_flags & IEEE80211_NODE_ERP) - mode = IEEE80211_MODE_11G; - else - mode = IEEE80211_MODE_11B; - tp = &vap->iv_txparms[mode]; - an->an_tp = tp; - an->an_mcastrix = ath_tx_findrix(sc->sc_rates[mode], tp->mcastrate); - an->an_mgmtrix = ath_tx_findrix(sc->sc_rates[mode], tp->mgmtrate); + an->an_mcastrix = ath_tx_findrix(sc->sc_currates, tp->mcastrate); + an->an_mgmtrix = ath_tx_findrix(sc->sc_currates, tp->mgmtrate); ath_rate_newassoc(sc, an, isnew); if (isnew && Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Oct 27 16:58:06 2008 (r184346) +++ head/sys/dev/ath/if_athvar.h Mon Oct 27 17:03:24 2008 (r184347) @@ -82,7 +82,6 @@ struct ath_buf; /* driver-specific node state */ struct ath_node { struct ieee80211_node an_node; /* base class */ - const struct ieee80211_txparam *an_tp; u_int8_t an_mgmtrix; /* min h/w rate index */ u_int8_t an_mcastrix; /* mcast h/w rate index */ struct ath_buf *an_ff_buf[WME_NUM_AC]; /* ff staging area */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:10:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 42285106566C; Mon, 27 Oct 2008 17:10:22 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 306E48FC1D; Mon, 27 Oct 2008 17:10:22 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHAM4L046230; Mon, 27 Oct 2008 17:10:22 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHAMQ7046229; Mon, 27 Oct 2008 17:10:22 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271710.m9RHAMQ7046229@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184348 - head/sys/dev/ath/ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:10:22 -0000 Author: sam Date: Mon Oct 27 17:10:21 2008 New Revision: 184348 URL: http://svn.freebsd.org/changeset/base/184348 Log: move complaints about bad rate codes up a level so we can print the h/w rate code and other useful info Modified: head/sys/dev/ath/ath_rate/sample/sample.c Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 17:03:24 2008 (r184347) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 17:10:21 2008 (r184348) @@ -393,11 +393,8 @@ update_stats(struct ath_softc *sc, struc size_bin = size_to_bin(frame_size); size = bin_to_size(size_bin); - if (!(0 <= ndx0 && ndx0 < sn->num_rates)) { - printf("%s: bogus ndx0 %d, max %u, mode %u\n", - __func__, ndx0, sn->num_rates, sc->sc_curmode); + if (!(0 <= ndx0 && ndx0 < sn->num_rates)) return; - } rate = sn->rates[ndx0].rate; tt += calc_usecs_unicast_packet(sc, size, sn->rates[ndx0].rix, @@ -405,11 +402,8 @@ update_stats(struct ath_softc *sc, struc MIN(tries0, tries) - 1); tries_so_far += tries0; if (tries1 && tries0 < tries) { - if (!(0 <= ndx1 && ndx1 < sn->num_rates)) { - printf("%s: bogus ndx1 %d, max %u, mode %u\n", - __func__, ndx1, sn->num_rates, sc->sc_curmode); + if (!(0 <= ndx1 && ndx1 < sn->num_rates)) return; - } tt += calc_usecs_unicast_packet(sc, size, sn->rates[ndx1].rix, short_tries, MIN(tries1 + tries_so_far, tries) - tries_so_far - 1); @@ -417,11 +411,8 @@ update_stats(struct ath_softc *sc, struc tries_so_far += tries1; if (tries2 && tries0 + tries1 < tries) { - if (!(0 <= ndx2 && ndx2 < sn->num_rates)) { - printf("%s: bogus ndx2 %d, max %u, mode %u\n", - __func__, ndx2, sn->num_rates, sc->sc_curmode); + if (!(0 <= ndx2 && ndx2 < sn->num_rates)) return; - } tt += calc_usecs_unicast_packet(sc, size, sn->rates[ndx2].rix, short_tries, MIN(tries2 + tries_so_far, tries) - tries_so_far - 1); @@ -430,11 +421,8 @@ update_stats(struct ath_softc *sc, struc tries_so_far += tries2; if (tries3 && tries0 + tries1 + tries2 < tries) { - if (!(0 <= ndx3 && ndx3 < sn->num_rates)) { - printf("%s: bogus ndx3 %d, max %u, mode %u\n", - __func__, ndx3, sn->num_rates, sc->sc_curmode); + if (!(0 <= ndx3 && ndx3 < sn->num_rates)) return; - } tt += calc_usecs_unicast_packet(sc, size, sn->rates[ndx3].rix, short_tries, MIN(tries3 + tries_so_far, tries) - tries_so_far - 1); @@ -488,6 +476,13 @@ update_stats(struct ath_softc *sc, struc } } +static void +badrate(struct ifnet *ifp, int series, int hwrate, int tries, int status) +{ + if_printf(ifp, "bad series%d hwrate 0x%x, tries %u ts_status 0x%x\n", + series, hwrate, tries, status); +} + void ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an, const struct ath_buf *bf) @@ -521,6 +516,10 @@ ath_rate_tx_complete(struct ath_softc *s if (!mrr || !(ts->ts_rate & HAL_TXSTAT_ALTRATE)) { int ndx = rate_to_ndx(sn, final_rate); + if (ndx < 0) { + badrate(ifp, 0, ts->ts_rate, long_tries, ts->ts_status); + return; + } /* * Only one rate was used; optimize work. */ @@ -574,6 +573,15 @@ ath_rate_tx_complete(struct ath_softc *s tries3 = MS(ds0->ds_ctl2, AR_XmitDataTries3); ndx3 = rate_to_ndx(sn, rate3); + if (tries0 && ndx0 < 0) + badrate(ifp, 0, hwrate0, tries0, ts->ts_status); + if (tries1 && ndx1 < 0) + badrate(ifp, 1, hwrate1, tries1, ts->ts_status); + if (tries2 && ndx2 < 0) + badrate(ifp, 2, hwrate2, tries2, ts->ts_status); + if (tries3 && ndx3 < 0) + badrate(ifp, 3, hwrate3, tries3, ts->ts_status); + IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL, &an->an_node, "%s: size %d finaltsidx %d tries %d %s rate/try [%d/%d %d/%d %d/%d %d/%d]", From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:12:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941831065679; Mon, 27 Oct 2008 17:12:41 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 82ECE8FC16; Mon, 27 Oct 2008 17:12:41 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHCfMK046330; Mon, 27 Oct 2008 17:12:41 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHCfH5046328; Mon, 27 Oct 2008 17:12:41 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271712.m9RHCfH5046328@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:12:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184349 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:12:41 -0000 Author: sam Date: Mon Oct 27 17:12:41 2008 New Revision: 184349 URL: http://svn.freebsd.org/changeset/base/184349 Log: intercept IEEE80211_IOC_TXPOWER and service tx power changes immediately Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:10:21 2008 (r184348) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:12:41 2008 (r184349) @@ -1566,7 +1566,23 @@ ath_reset(struct ifnet *ifp) static int ath_reset_vap(struct ieee80211vap *vap, u_long cmd) { - return ath_reset(vap->iv_ic->ic_ifp); + struct ieee80211com *ic = vap->iv_ic; + struct ifnet *ifp = ic->ic_ifp; + struct ath_softc *sc = ifp->if_softc; + struct ath_hal *ah = sc->sc_ah; + + switch (cmd) { + case IEEE80211_IOC_TXPOWER: + /* + * If per-packet TPC is enabled, then we have nothing + * to do; otherwise we need to force the global limit. + * All this can happen directly; no need to reset. + */ + if (!ath_hal_gettpc(ah)) + ath_hal_settxpowlimit(ah, ic->ic_txpowlimit); + return 0; + } + return ath_reset(ifp); } static int From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:14:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8EBE1065672; Mon, 27 Oct 2008 17:14:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B715B8FC16; Mon, 27 Oct 2008 17:14:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHEdxb046403; Mon, 27 Oct 2008 17:14:39 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHEddN046401; Mon, 27 Oct 2008 17:14:39 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271714.m9RHEddN046401@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:14:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184350 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:14:39 -0000 Author: sam Date: Mon Oct 27 17:14:39 2008 New Revision: 184350 URL: http://svn.freebsd.org/changeset/base/184350 Log: use the ic's opmode instead of our hal equivalent to check for adhoc mode; they are always the same Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:12:41 2008 (r184349) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:14:39 2008 (r184350) @@ -2588,7 +2588,7 @@ ath_calcrxfilter(struct ath_softc *sc) if (ic->ic_opmode == IEEE80211_M_MONITOR || (ifp->if_flags & IFF_PROMISC)) rfilt |= HAL_RX_FILTER_PROM; if (ic->ic_opmode == IEEE80211_M_STA || - sc->sc_opmode == HAL_M_IBSS || + ic->ic_opmode == IEEE80211_M_IBSS || sc->sc_swbmiss || sc->sc_scanning) rfilt |= HAL_RX_FILTER_BEACON; /* From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:16:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7D19A1065670; Mon, 27 Oct 2008 17:16:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6BB858FC0A; Mon, 27 Oct 2008 17:16:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHGkhd046477; Mon, 27 Oct 2008 17:16:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHGkpN046474; Mon, 27 Oct 2008 17:16:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271716.m9RHGkpN046474@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:16:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184351 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:16:46 -0000 Author: sam Date: Mon Oct 27 17:16:46 2008 New Revision: 184351 URL: http://svn.freebsd.org/changeset/base/184351 Log: rename bf_flags to bf_txflags in preparation for the addition of flags separate from the tx descriptor flags currently recorded Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:14:39 2008 (r184350) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:16:46 2008 (r184351) @@ -4958,7 +4958,7 @@ ath_tx_start(struct ath_softc *sc, struc , ctsrate /* rts/cts rate */ , ctsduration /* rts/cts duration */ ); - bf->bf_flags = flags; + bf->bf_txflags = flags; /* * Setup the multi-rate retry state only when we're * going to use it. This assumes ath_hal_setuptxdesc @@ -5054,7 +5054,7 @@ ath_tx_processq(struct ath_softc *sc, st * Hand the descriptor to the rate control algorithm. */ if ((ts->ts_status & HAL_TXERR_FILT) == 0 && - (bf->bf_flags & HAL_TXDESC_NOACK) == 0) { + (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) { /* * If frame was ack'd update the last rx time * used to workaround phantom bmiss interrupts. @@ -6220,7 +6220,7 @@ ath_printtxbuf(const struct ath_buf *bf, printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:04%x%s\n" " %08x %08x %08x %08x %08x %08x\n", ds, (const struct ath_desc *)bf->bf_daddr + i, - ds->ds_link, ds->ds_data, bf->bf_flags, + ds->ds_link, ds->ds_data, bf->bf_txflags, !done ? "" : (ts->ts_status == 0) ? " *" : " !", ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]); @@ -6863,7 +6863,7 @@ ath_tx_raw_start(struct ath_softc *sc, s , ctsrate /* rts/cts rate */ , ctsduration /* rts/cts duration */ ); - bf->bf_flags = flags; + bf->bf_txflags = flags; if (ismrr) { rix = ath_tx_findrix(rt, params->ibp_rate1); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Oct 27 17:14:39 2008 (r184350) +++ head/sys/dev/ath/if_athvar.h Mon Oct 27 17:16:46 2008 (r184351) @@ -106,7 +106,7 @@ struct ath_buf { TAILQ_ENTRY(ath_buf) bf_stagelist; /* stage queue list */ u_int32_t bf_age; /* age when placed on stageq */ int bf_nseg; - int bf_flags; /* tx descriptor flags */ + int bf_txflags; /* tx descriptor flags */ struct ath_desc *bf_desc; /* virtual addr of desc */ struct ath_desc_status bf_status; /* tx/rx status */ bus_addr_t bf_daddr; /* physical addr of desc */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:19:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F13251065681; Mon, 27 Oct 2008 17:19:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E005E8FC17; Mon, 27 Oct 2008 17:19:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHJEtI046555; Mon, 27 Oct 2008 17:19:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHJERi046554; Mon, 27 Oct 2008 17:19:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200810271719.m9RHJERi046554@svn.freebsd.org> From: Andrew Thompson Date: Mon, 27 Oct 2008 17:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184352 - head/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:19:15 -0000 Author: thompsa Date: Mon Oct 27 17:19:14 2008 New Revision: 184352 URL: http://svn.freebsd.org/changeset/base/184352 Log: Add ucomX shortcuts just like its uart sibling. Modified: head/etc/remote Modified: head/etc/remote ============================================================================== --- head/etc/remote Mon Oct 27 17:16:46 2008 (r184351) +++ head/etc/remote Mon Oct 27 17:19:14 2008 (r184352) @@ -66,3 +66,11 @@ uart4|com5:dv=/dev/cuau4:br#9600:pa=none uart5|com6:dv=/dev/cuau5:br#9600:pa=none: uart6|com7:dv=/dev/cuau6:br#9600:pa=none: uart7|com8:dv=/dev/cuau7:br#9600:pa=none: +ucom1:dv=/dev/cuaU0:br#9600:pa=none: +ucom2:dv=/dev/cuaU1:br#9600:pa=none: +ucom3:dv=/dev/cuaU2:br#9600:pa=none: +ucom4:dv=/dev/cuaU3:br#9600:pa=none: +ucom5:dv=/dev/cuaU4:br#9600:pa=none: +ucom6:dv=/dev/cuaU5:br#9600:pa=none: +ucom7:dv=/dev/cuaU6:br#9600:pa=none: +ucom8:dv=/dev/cuaU7:br#9600:pa=none: From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:19:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD052106566C; Mon, 27 Oct 2008 17:19:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ABF258FC13; Mon, 27 Oct 2008 17:19:39 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHJdhk046596; Mon, 27 Oct 2008 17:19:39 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHJdjl046594; Mon, 27 Oct 2008 17:19:39 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271719.m9RHJdjl046594@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184353 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:19:39 -0000 Author: sam Date: Mon Oct 27 17:19:39 2008 New Revision: 184353 URL: http://svn.freebsd.org/changeset/base/184353 Log: shuffle debug setup to simplify debugging events during attach Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:19:14 2008 (r184352) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:19:39 2008 (r184353) @@ -238,10 +238,6 @@ SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTL TUNABLE_INT("hw.ath.txbuf", &ath_txbuf); #ifdef ATH_DEBUG -static int ath_debug = 0; -SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, - 0, "control debugging printfs"); -TUNABLE_INT("hw.ath.debug", &ath_debug); enum { ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */ ATH_DEBUG_XMIT_DESC = 0x00000002, /* xmit descriptors */ @@ -266,6 +262,11 @@ enum { ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ ATH_DEBUG_ANY = 0xffffffff }; +static int ath_debug = 0; +SYSCTL_INT(_hw_ath, OID_AUTO, debug, CTLFLAG_RW, &ath_debug, + 0, "control debugging printfs"); +TUNABLE_INT("hw.ath.debug", &ath_debug); + #define IFF_DUMPPKTS(sc, m) \ ((sc->sc_debug & (m)) || \ (sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2)) @@ -331,6 +332,9 @@ ath_attach(u_int16_t devid, struct ath_s } sc->sc_ah = ah; sc->sc_invalid = 0; /* ready to go, enable interrupt handling */ +#ifdef ATH_DEBUG + sc->sc_debug = ath_debug; +#endif /* * Check if the MAC has multi-rate retry support. @@ -6635,7 +6639,6 @@ ath_sysctlattach(struct ath_softc *sc) "regdomain", CTLFLAG_RD, &sc->sc_eerd, 0, "EEPROM regdomain code"); #ifdef ATH_DEBUG - sc->sc_debug = ath_debug; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "debug", CTLFLAG_RW, &sc->sc_debug, 0, "control debugging printfs"); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:22:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A2A7106566B; Mon, 27 Oct 2008 17:22:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EC7D28FC08; Mon, 27 Oct 2008 17:22:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHMkSC046696; Mon, 27 Oct 2008 17:22:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHMkHl046693; Mon, 27 Oct 2008 17:22:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271722.m9RHMkHl046693@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:22:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184354 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:22:47 -0000 Author: sam Date: Mon Oct 27 17:22:46 2008 New Revision: 184354 URL: http://svn.freebsd.org/changeset/base/184354 Log: add sys.dev.ath.X.intmit knob to enable/disable ANI (the intmit name is historical) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:19:39 2008 (r184353) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:22:46 2008 (r184354) @@ -6625,6 +6625,19 @@ ath_sysctl_tpcts(SYSCTL_HANDLER_ARGS) return !ath_hal_settpcts(sc->sc_ah, tpcts) ? EINVAL : 0; } +static int +ath_sysctl_intmit(SYSCTL_HANDLER_ARGS) +{ + struct ath_softc *sc = arg1; + int intmit, error; + + intmit = ath_hal_getintmit(sc->sc_ah); + error = sysctl_handle_int(oidp, &intmit, 0, req); + if (error || !req->newptr) + return error; + return !ath_hal_setintmit(sc->sc_ah, intmit) ? EINVAL : 0; +} + static void ath_sysctlattach(struct ath_softc *sc) { @@ -6713,6 +6726,11 @@ ath_sysctlattach(struct ath_softc *sc) "rfkill", CTLTYPE_INT | CTLFLAG_RW, sc, 0, ath_sysctl_rfkill, "I", "enable/disable RF kill switch"); } + if (ath_hal_hasintmit(ah)) { + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, + "intmit", CTLTYPE_INT | CTLFLAG_RW, sc, 0, + ath_sysctl_intmit, "I", "interference mitigation"); + } sc->sc_monpass = HAL_RXERR_DECRYPT | HAL_RXERR_MIC; SYSCTL_ADD_INT(ctx, SYSCTL_CHILDREN(tree), OID_AUTO, "monpass", CTLFLAG_RW, &sc->sc_monpass, 0, Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Oct 27 17:19:39 2008 (r184353) +++ head/sys/dev/ath/if_athvar.h Mon Oct 27 17:22:46 2008 (r184354) @@ -601,6 +601,12 @@ void ath_intr(void *); (ath_hal_getcapability(_ah, HAL_CAP_TPC_CTS, 0, _ptpcts) == HAL_OK) #define ath_hal_settpcts(_ah, _tpcts) \ ath_hal_setcapability(_ah, HAL_CAP_TPC_CTS, 0, _tpcts, NULL) +#define ath_hal_hasintmit(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, 0, NULL) == HAL_OK) +#define ath_hal_getintmit(_ah) \ + (ath_hal_getcapability(_ah, HAL_CAP_INTMIT, 1, NULL) == HAL_OK) +#define ath_hal_setintmit(_ah, _v) \ + ath_hal_setcapability(_ah, HAL_CAP_INTMIT, 1, _v, NULL) #define ath_hal_getchannoise(_ah, _c) \ ((*(_ah)->ah_getChanNoise)((_ah), (_c))) #if HAL_ABI_VERSION < 0x05122200 From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:35:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28245106571D; Mon, 27 Oct 2008 17:35:10 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1642D8FC14; Mon, 27 Oct 2008 17:35:10 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHZ9Qs046959; Mon, 27 Oct 2008 17:35:09 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHZ9Ph046957; Mon, 27 Oct 2008 17:35:09 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271735.m9RHZ9Ph046957@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:35:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184355 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:35:10 -0000 Author: sam Date: Mon Oct 27 17:35:09 2008 New Revision: 184355 URL: http://svn.freebsd.org/changeset/base/184355 Log: add regdomain debug msgs Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:22:46 2008 (r184354) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:35:09 2008 (r184355) @@ -259,6 +259,7 @@ enum { ATH_DEBUG_LED = 0x00100000, /* led management */ ATH_DEBUG_FF = 0x00200000, /* fast frames */ ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ + ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ ATH_DEBUG_ANY = 0xffffffff }; @@ -5860,6 +5861,9 @@ getchannels(struct ath_softc *sc, int *n HAL_CHANNEL *halchans; int i, nhalchans, error; + DPRINTF(sc, ATH_DEBUG_REGDOMAIN, "%s: cc %u outdoor %u ecm %u\n", + __func__, cc, outdoor, ecm); + halchans = malloc(IEEE80211_CHAN_MAX * sizeof(HAL_CHANNEL), M_TEMP, M_NOWAIT | M_ZERO); if (halchans == NULL) { @@ -5933,7 +5937,11 @@ ath_setregdomain(struct ieee80211com *ic (void) ath_hal_getregdomain(ah, &ord); /* XXX map sku->rd */ + DPRINTF(sc, ATH_DEBUG_REGDOMAIN, + "%s: rd %u cc %u location %c ecm %u\n", + __func__, rd->regdomain, rd->country, rd->location, rd->ecm); ath_hal_setregdomain(ah, rd->regdomain); + error = getchannels(sc, &nchans, chans, rd->country, rd->ecm ? AH_TRUE : AH_FALSE, rd->location == 'O' ? AH_TRUE : AH_FALSE); @@ -5959,6 +5967,10 @@ ath_getradiocaps(struct ieee80211com *ic u_int32_t ord; (void) ath_hal_getregdomain(ah, &ord); + + DPRINTF(sc, ATH_DEBUG_REGDOMAIN, "%s: use rd %u cc %d, ord %u\n", + __func__, 0, CTRY_DEBUG, ord); + ath_hal_setregdomain(ah, 0); /* XXX not quite right but close enough for now */ getchannels(sc, nchans, chans, CTRY_DEBUG, AH_TRUE, AH_FALSE); @@ -6007,6 +6019,12 @@ ath_getchannels(struct ath_softc *sc) ic->ic_regdomain.location = 'I'; ic->ic_regdomain.isocc[0] = ' '; /* XXX don't know */ ic->ic_regdomain.isocc[1] = ' '; + + DPRINTF(sc, ATH_DEBUG_REGDOMAIN, + "%s: eeprom rd %u cc %u (mapped rd %u cc %u) location %c ecm %u\n", + __func__, sc->sc_eerd, sc->sc_eecc, + ic->ic_regdomain.regdomain, ic->ic_regdomain.country, + ic->ic_regdomain.location, ic->ic_regdomain.ecm); return 0; } From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:41:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 836B41065670; Mon, 27 Oct 2008 17:41:32 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7120A8FC0A; Mon, 27 Oct 2008 17:41:32 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHfWZq047106; Mon, 27 Oct 2008 17:41:32 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHfWAc047104; Mon, 27 Oct 2008 17:41:32 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271741.m9RHfWAc047104@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:41:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184356 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:41:32 -0000 Author: sam Date: Mon Oct 27 17:41:32 2008 New Revision: 184356 URL: http://svn.freebsd.org/changeset/base/184356 Log: Regdomain fixups: o pass country code, outdoor indication, and ecm mode into the hal when requesting a channel list o add a console msg when regulatory setup fails o add placeholder code to map between Atheros sku's and 802.11 sku's that handles only the debug country code used to unlock the full channel list (to be used only for debugging) o fix multiple instances of mismapping the 802.11 location to the outdoor indication (anywhere may be outdoor also) Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:35:09 2008 (r184355) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:41:32 2008 (r184356) @@ -5873,7 +5873,11 @@ getchannels(struct ath_softc *sc, int *n } error = 0; if (!ath_hal_init_channels(ah, halchans, IEEE80211_CHAN_MAX, &nhalchans, - NULL, 0, NULL, CTRY_DEFAULT, HAL_MODE_ALL, AH_FALSE, AH_TRUE)) { + NULL, 0, NULL, cc, HAL_MODE_ALL, outdoor, ecm)) { + u_int32_t rd; + (void) ath_hal_getregdomain(ah, &rd); + device_printf(sc->sc_dev, "ath_hal_init_channels failed, " + "rd %d cc %u outdoor %u ecm %u\n", rd, cc, outdoor, ecm); error = EINVAL; goto done; } @@ -5926,25 +5930,47 @@ done: return error; } +/* XXX hard to include ieee80211_regdomain.h right now */ +#define SKU_DEBUG 0x1ff + +static void +ath_maprd(const struct ieee80211_regdomain *rd, + u_int32_t *ath_rd, u_int32_t *ath_cc) +{ + /* map SKU's to Atheros sku's */ + switch (rd->regdomain) { + case SKU_DEBUG: + if (rd->country == 0) { + *ath_rd = 0; + *ath_cc = CTRY_DEBUG; + return; + } + break; + } + *ath_rd = rd->regdomain; + *ath_cc = rd->country; +} + static int ath_setregdomain(struct ieee80211com *ic, struct ieee80211_regdomain *rd, int nchans, struct ieee80211_channel chans[]) { struct ath_softc *sc = ic->ic_ifp->if_softc; struct ath_hal *ah = sc->sc_ah; - u_int32_t ord; + u_int32_t ord, regdomain, cc; int error; (void) ath_hal_getregdomain(ah, &ord); - /* XXX map sku->rd */ + ath_maprd(rd, ®domain, &cc); DPRINTF(sc, ATH_DEBUG_REGDOMAIN, - "%s: rd %u cc %u location %c ecm %u\n", - __func__, rd->regdomain, rd->country, rd->location, rd->ecm); - ath_hal_setregdomain(ah, rd->regdomain); + "%s: rd %u cc %u location %c ecm %u (mapped rd %u cc %u)\n", + __func__, rd->regdomain, rd->country, rd->location, rd->ecm, + regdomain, cc); + ath_hal_setregdomain(ah, regdomain); - error = getchannels(sc, &nchans, chans, rd->country, + error = getchannels(sc, &nchans, chans, cc, rd->ecm ? AH_TRUE : AH_FALSE, - rd->location == 'O' ? AH_TRUE : AH_FALSE); + rd->location != 'I' ? AH_TRUE : AH_FALSE); if (error != 0) { /* * Restore previous state. @@ -5952,7 +5978,7 @@ ath_setregdomain(struct ieee80211com *ic ath_hal_setregdomain(ah, ord); (void) getchannels(sc, NULL, NULL, ic->ic_regdomain.country, ic->ic_regdomain.ecm ? AH_TRUE : AH_FALSE, - ic->ic_regdomain.location == 'O' ? AH_TRUE : AH_FALSE); + ic->ic_regdomain.location != 'I' ? AH_TRUE : AH_FALSE); return error; } return 0; @@ -5979,14 +6005,28 @@ ath_getradiocaps(struct ieee80211com *ic ath_hal_setregdomain(ah, ord); (void) getchannels(sc, NULL, NULL, ic->ic_regdomain.country, ic->ic_regdomain.ecm ? AH_TRUE : AH_FALSE, - ic->ic_regdomain.location == 'O' ? AH_TRUE : AH_FALSE); + ic->ic_regdomain.location != 'I' ? AH_TRUE : AH_FALSE); } -static int -ath_mapregdomain(struct ath_softc *sc, u_int32_t rd) +static void +ath_mapsku(u_int32_t ath_rd, u_int32_t ath_cc, struct ieee80211_regdomain *rd) { - /* map Atheros rd's to SKU's */ - return rd; + rd->isocc[0] = ' '; /* XXX don't know */ + rd->isocc[1] = ' '; + + /* map Atheros sku's to SKU's */ + switch (ath_rd) { + case 0: + if (ath_cc == CTRY_DEBUG) { + rd->regdomain = SKU_DEBUG; + rd->country = 0; + return; + } + break; + } + /* XXX net80211 types too small */ + rd->regdomain = (uint16_t) ath_rd; + rd->country = (uint16_t) ath_cc; } static int @@ -6013,12 +6053,9 @@ ath_getchannels(struct ath_softc *sc) } return error; } - ic->ic_regdomain.regdomain = ath_mapregdomain(sc, sc->sc_eerd); - ic->ic_regdomain.country = sc->sc_eecc; ic->ic_regdomain.ecm = 1; ic->ic_regdomain.location = 'I'; - ic->ic_regdomain.isocc[0] = ' '; /* XXX don't know */ - ic->ic_regdomain.isocc[1] = ' '; + ath_mapsku(sc->sc_eerd, sc->sc_eecc, &ic->ic_regdomain); DPRINTF(sc, ATH_DEBUG_REGDOMAIN, "%s: eeprom rd %u cc %u (mapped rd %u cc %u) location %c ecm %u\n", From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:43:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F26A61065673; Mon, 27 Oct 2008 17:43:23 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9CF78FC16; Mon, 27 Oct 2008 17:43:23 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHhNSC047173; Mon, 27 Oct 2008 17:43:23 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHhNpZ047171; Mon, 27 Oct 2008 17:43:23 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271743.m9RHhNpZ047171@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:43:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184357 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:43:24 -0000 Author: sam Date: Mon Oct 27 17:43:23 2008 New Revision: 184357 URL: http://svn.freebsd.org/changeset/base/184357 Log: update the sta inactivity timer only if we actually received an ACK Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:41:32 2008 (r184356) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:43:23 2008 (r184357) @@ -5040,7 +5040,8 @@ ath_tx_processq(struct ath_softc *sc, st pri = M_WME_GETAC(bf->bf_m); if (pri >= WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; - ni->ni_inact = ni->ni_inact_reload; + if ((bf->bf_txflags & HAL_TXDESC_NOACK) == 0) + ni->ni_inact = ni->ni_inact_reload; } else { if (ts->ts_status & HAL_TXERR_XRETRY) sc->sc_stats.ast_tx_xretries++; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:51:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 03888106566C; Mon, 27 Oct 2008 17:51:25 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E61E28FC1A; Mon, 27 Oct 2008 17:51:24 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHpOa5047352; Mon, 27 Oct 2008 17:51:24 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHpOhI047349; Mon, 27 Oct 2008 17:51:24 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271751.m9RHpOhI047349@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:51:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184358 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:51:25 -0000 Author: sam Date: Mon Oct 27 17:51:24 2008 New Revision: 184358 URL: http://svn.freebsd.org/changeset/base/184358 Log: Fixup statistics: o update tx rssi data only when an ACK was received o return tx rssi from sampled data instead of the last frame o track noise floor o return rx rssi and noise floor (was broken) Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:43:23 2008 (r184357) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:51:24 2008 (r184358) @@ -3978,6 +3978,7 @@ ath_rx_proc(void *arg, int npending) DPRINTF(sc, ATH_DEBUG_RX_PROC, "%s: pending %u\n", __func__, npending); ngood = 0; nf = ath_hal_getchannoise(ah, &sc->sc_curchan); + sc->sc_stats.ast_rx_noise = nf; tsf = ath_hal_gettsf64(ah); do { bf = STAILQ_FIRST(&sc->sc_rxbuf); @@ -5034,9 +5035,6 @@ ath_tx_processq(struct ath_softc *sc, st sc->sc_ant_tx[txant]++; if (ts->ts_rate & HAL_TXSTAT_ALTRATE) sc->sc_stats.ast_tx_altrate++; - sc->sc_stats.ast_tx_rssi = ts->ts_rssi; - ATH_RSSI_LPF(sc->sc_halstats.ns_avgtxrssi, - ts->ts_rssi); pri = M_WME_GETAC(bf->bf_m); if (pri >= WME_AC_VO) ic->ic_wme.wme_hipri_traffic++; @@ -5062,11 +5060,16 @@ ath_tx_processq(struct ath_softc *sc, st if ((ts->ts_status & HAL_TXERR_FILT) == 0 && (bf->bf_txflags & HAL_TXDESC_NOACK) == 0) { /* - * If frame was ack'd update the last rx time - * used to workaround phantom bmiss interrupts. + * If frame was ack'd update statistics, + * including the last rx time used to + * workaround phantom bmiss interrupts. */ - if (ts->ts_status == 0) + if (ts->ts_status == 0) { nacked++; + sc->sc_stats.ast_tx_rssi = ts->ts_rssi; + ATH_RSSI_LPF(sc->sc_halstats.ns_avgtxrssi, + ts->ts_rssi); + } ath_rate_tx_complete(sc, an, bf); } /* @@ -6372,6 +6375,7 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, struct ath_softc *sc = ifp->if_softc; struct ieee80211com *ic = ifp->if_l2com; struct ifreq *ifr = (struct ifreq *)data; + const HAL_RATE_TABLE *rt; int error = 0; switch (cmd) { @@ -6414,10 +6418,9 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, /* NB: embed these numbers to get a consistent view */ sc->sc_stats.ast_tx_packets = ifp->if_opackets; sc->sc_stats.ast_rx_packets = ifp->if_ipackets; -#if 0 - ieee80211_getsignal(ic, &sc->sc_stats.ast_rx_rssi, - &sc->sc_stats.ast_rx_noise); -#endif + sc->sc_stats.ast_tx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgtxrssi); + sc->sc_stats.ast_rx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgrssi); + rt = sc->sc_currates; sc->sc_stats.ast_tx_rate = sc->sc_hwmap[sc->sc_txrate].ieeerate; return copyout(&sc->sc_stats, ifr->ifr_data, sizeof (sc->sc_stats)); Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Oct 27 17:43:23 2008 (r184357) +++ head/sys/dev/ath/if_athvar.h Mon Oct 27 17:51:24 2008 (r184358) @@ -100,6 +100,9 @@ struct ath_node { if ((y) >= -20) \ x = ATH_LPF_RSSI((x), ATH_RSSI_IN((y)), ATH_RSSI_LPF_LEN); \ } while (0) +#define ATH_EP_RND(x,mul) \ + ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) +#define ATH_RSSI(x) ATH_EP_RND(x, HAL_RSSI_EP_MULTIPLIER) struct ath_buf { STAILQ_ENTRY(ath_buf) bf_list; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:52:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD6C71065685; Mon, 27 Oct 2008 17:52:41 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC2888FC2B; Mon, 27 Oct 2008 17:52:41 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHqfPp047413; Mon, 27 Oct 2008 17:52:41 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHqfCd047411; Mon, 27 Oct 2008 17:52:41 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271752.m9RHqfCd047411@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184359 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:52:42 -0000 Author: sam Date: Mon Oct 27 17:52:41 2008 New Revision: 184359 URL: http://svn.freebsd.org/changeset/base/184359 Log: correct callback status parameter; only indicate success when an ACK was received Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:51:24 2008 (r184358) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:52:41 2008 (r184359) @@ -5078,7 +5078,8 @@ ath_tx_processq(struct ath_softc *sc, st */ if (bf->bf_m->m_flags & M_TXCB) ieee80211_process_callback(ni, bf->bf_m, - ts->ts_status); + (bf->bf_txflags & HAL_TXDESC_NOACK) == 0 ? + ts->ts_status : HAL_TXERR_XRETRY); /* * Reclaim reference to node. * From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:53:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95114106567C; Mon, 27 Oct 2008 17:53:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 83AA98FC2E; Mon, 27 Oct 2008 17:53:34 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHrYb6047467; Mon, 27 Oct 2008 17:53:34 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHrYfA047465; Mon, 27 Oct 2008 17:53:34 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271753.m9RHrYfA047465@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:53:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184360 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:53:34 -0000 Author: sam Date: Mon Oct 27 17:53:34 2008 New Revision: 184360 URL: http://svn.freebsd.org/changeset/base/184360 Log: fix comment Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:52:41 2008 (r184359) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:53:34 2008 (r184360) @@ -5218,7 +5218,7 @@ ath_tx_draintxq(struct ath_softc *sc, st /* * NB: this assumes output has been stopped and - * we do not need to block ath_tx_tasklet + * we do not need to block ath_tx_proc */ for (ix = 0;; ix++) { ATH_TXQ_LOCK(txq); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:54:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88797106566C; Mon, 27 Oct 2008 17:54:17 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 779538FC28; Mon, 27 Oct 2008 17:54:17 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHsHjF047528; Mon, 27 Oct 2008 17:54:17 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHsH72047526; Mon, 27 Oct 2008 17:54:17 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271754.m9RHsH72047526@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 17:54:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184361 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:54:17 -0000 Author: sam Date: Mon Oct 27 17:54:17 2008 New Revision: 184361 URL: http://svn.freebsd.org/changeset/base/184361 Log: install bssid for ahdemo mode too Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 17:53:34 2008 (r184360) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 17:54:17 2008 (r184361) @@ -5673,6 +5673,7 @@ ath_newstate(struct ieee80211vap *vap, e ni = vap->iv_bss; rfilt = ath_calcrxfilter(sc); stamode = (vap->iv_opmode == IEEE80211_M_STA || + vap->iv_opmode == IEEE80211_M_AHDEMO || vap->iv_opmode == IEEE80211_M_IBSS); if (stamode && nstate == IEEE80211_S_RUN) { sc->sc_curaid = ni->ni_associd; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 17:57:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22E68106567A; Mon, 27 Oct 2008 17:57:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11FBB8FC20; Mon, 27 Oct 2008 17:57:04 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RHv3bo047651; Mon, 27 Oct 2008 17:57:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RHv3Wb047650; Mon, 27 Oct 2008 17:57:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810271757.m9RHv3Wb047650@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Mon, 27 Oct 2008 17:57:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184362 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 17:57:04 -0000 Author: bz Date: Mon Oct 27 17:57:03 2008 New Revision: 184362 URL: http://svn.freebsd.org/changeset/base/184362 Log: Add the files missed with r184331 to make mac_bsdextended compile again. Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Oct 27 17:54:17 2008 (r184361) +++ head/sys/conf/files Mon Oct 27 17:57:03 2008 (r184362) @@ -2194,6 +2194,8 @@ security/mac/mac_sysv_shm.c optional mac security/mac/mac_vfs.c optional mac security/mac_biba/mac_biba.c optional mac_biba security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended +security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended +security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended security/mac_ifoff/mac_ifoff.c optional mac_ifoff security/mac_lomac/mac_lomac.c optional mac_lomac security/mac_mls/mac_mls.c optional mac_mls From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:00:39 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACD471065679; Mon, 27 Oct 2008 18:00:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 99FC18FC2B; Mon, 27 Oct 2008 18:00:39 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RI0dOM047809; Mon, 27 Oct 2008 18:00:39 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RI0d1h047805; Mon, 27 Oct 2008 18:00:39 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810271800.m9RI0d1h047805@svn.freebsd.org> From: John Baldwin Date: Mon, 27 Oct 2008 18:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184363 - in releng/6.4: contrib/top usr.bin/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:00:39 -0000 Author: jhb Date: Mon Oct 27 18:00:39 2008 New Revision: 184363 URL: http://svn.freebsd.org/changeset/base/184363 Log: MFC: Several top '-P' fixes originally from ru@. This fixes top -P on i386. Approved by: re (kensmith) Modified: releng/6.4/contrib/top/machine.h releng/6.4/contrib/top/top.X releng/6.4/contrib/top/top.c releng/6.4/usr.bin/top/machine.c Modified: releng/6.4/contrib/top/machine.h ============================================================================== --- releng/6.4/contrib/top/machine.h Mon Oct 27 17:57:03 2008 (r184362) +++ releng/6.4/contrib/top/machine.h Mon Oct 27 18:00:39 2008 (r184363) @@ -44,7 +44,6 @@ struct system_info int *memory; int *swap; struct timeval boottime; - unsigned long cpumask; /* bitfield of cpu states represented */ int ncpus; }; Modified: releng/6.4/contrib/top/top.X ============================================================================== --- releng/6.4/contrib/top/top.X Mon Oct 27 17:57:03 2008 (r184362) +++ releng/6.4/contrib/top/top.X Mon Oct 27 18:00:39 2008 (r184363) @@ -10,7 +10,7 @@ top \- display and update information ab .SH SYNOPSIS .B top [ -.B \-bCHIijnqStuv +.B \-bCHIijnPqStuv ] [ .BI \-d count ] [ @@ -113,6 +113,9 @@ Display either 'cpu' or 'io' statistics. Use \*(lqnon-interactive\*(rq mode. This is identical to \*(lqbatch\*(rq mode. .TP +.B \-P +Display per-cpu CPU usage statistics. +.TP .B \-q Renice .I top Modified: releng/6.4/contrib/top/top.c ============================================================================== --- releng/6.4/contrib/top/top.c Mon Oct 27 17:57:03 2008 (r184362) +++ releng/6.4/contrib/top/top.c Mon Oct 27 18:00:39 2008 (r184363) @@ -283,7 +283,7 @@ char *argv[]; optind = 1; } - while ((i = getopt(ac, av, "CSIHPbijnpquvs:d:U:m:o:t")) != EOF) + while ((i = getopt(ac, av, "CSIHPbijnquvs:d:U:m:o:t")) != EOF) { switch(i) { @@ -408,14 +408,10 @@ char *argv[]; pcpu_stats = Yes; break; - case 'p': - pcpu_stats = No; - break; - default: fprintf(stderr, "Top version %s\n" -"Usage: %s [-bCHIijnqStuv] [-d count] [-m io | cpu] [-o field] [-s time]\n" +"Usage: %s [-bCHIijnPqStuv] [-d count] [-m io | cpu] [-o field] [-s time]\n" " [-U username] [number]\n", version_string(), myname); exit(1); Modified: releng/6.4/usr.bin/top/machine.c ============================================================================== --- releng/6.4/usr.bin/top/machine.c Mon Oct 27 17:57:03 2008 (r184362) +++ releng/6.4/usr.bin/top/machine.c Mon Oct 27 18:00:39 2008 (r184363) @@ -305,6 +305,7 @@ machine_init(struct statics *statics) err(1, "malloc %zd bytes", size); if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1) err(1, "sysctlbyname kern.cp_times"); + pcpu_cp_time = calloc(1, size); maxid = (size / CPUSTATES / sizeof(long)) - 1; for (i = 0; i <= maxid; i++) { empty = 1; @@ -328,14 +329,9 @@ machine_init(struct statics *statics) Header_lines += ncpus - 1; /* 7 */ } size = sizeof(long) * ncpus * CPUSTATES; - pcpu_cp_time = malloc(size); - pcpu_cp_old = malloc(size); - pcpu_cp_diff = malloc(size); - pcpu_cpu_states = malloc(size); - bzero(pcpu_cp_time, size); - bzero(pcpu_cp_old, size); - bzero(pcpu_cp_diff, size); - bzero(pcpu_cpu_states, size); + pcpu_cp_old = calloc(1, size); + pcpu_cp_diff = calloc(1, size); + pcpu_cpu_states = calloc(1, size); statics->ncpus = ncpus; } else { statics->ncpus = 1; @@ -410,14 +406,15 @@ get_system_info(struct system_info *si) si->load_avg[i] = (double)sysload.ldavg[i] / sysload.fscale; if (pcpu_stats) { - for (i = j = 0; i <= maxid; i++, j++) { - if (cpumask && (1ul << i) == 0) + for (i = j = 0; i <= maxid; i++) { + if ((cpumask & (1ul << i)) == 0) continue; /* convert cp_time counts to percentages */ percentages(CPUSTATES, &pcpu_cpu_states[j * CPUSTATES], &pcpu_cp_time[j * CPUSTATES], &pcpu_cp_old[j * CPUSTATES], &pcpu_cp_diff[j * CPUSTATES]); + j++; } } else { /* convert cp_time counts to percentages */ @@ -478,11 +475,9 @@ get_system_info(struct system_info *si) /* set arrays and strings */ if (pcpu_stats) { si->cpustates = pcpu_cpu_states; - si->cpumask = cpumask; si->ncpus = ncpus; } else { si->cpustates = cpu_states; - si->cpumask = 1; si->ncpus = 1; } si->memory = memory_stats; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:00:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05BDE1065674; Mon, 27 Oct 2008 18:00:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E81038FC18; Mon, 27 Oct 2008 18:00:43 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RI0h5p047846; Mon, 27 Oct 2008 18:00:43 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RI0h3e047844; Mon, 27 Oct 2008 18:00:43 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271800.m9RI0h3e047844@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:00:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184364 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:00:44 -0000 Author: sam Date: Mon Oct 27 18:00:43 2008 New Revision: 184364 URL: http://svn.freebsd.org/changeset/base/184364 Log: add hack to deal with Ubiquiti XR9 cards, they have a different mapping between 900MHz and 2.4GHz frequencies than SR9 cards; they are distinguished by different country codes Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 18:00:39 2008 (r184363) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 18:00:43 2008 (r184364) @@ -120,6 +120,8 @@ enum { ATH_LED_POLL, }; +#define CTRY_XR9 5001 /* Ubiquiti XR9 */ + static struct ieee80211vap *ath_vap_create(struct ieee80211com *, const char name[IFNAMSIZ], int unit, int opmode, int flags, const uint8_t bssid[IEEE80211_ADDR_LEN], @@ -1317,7 +1319,8 @@ ath_bmiss_proc(void *arg, int pending) * the frequency possibly mapped for GSM channels. */ static void -ath_mapchan(HAL_CHANNEL *hc, const struct ieee80211_channel *chan) +ath_mapchan(const struct ieee80211com *ic, + HAL_CHANNEL *hc, const struct ieee80211_channel *chan) { #define N(a) (sizeof(a) / sizeof(a[0])) static const u_int modeflags[IEEE80211_MODE_MAX] = { @@ -1348,8 +1351,13 @@ ath_mapchan(HAL_CHANNEL *hc, const struc if (IEEE80211_IS_CHAN_HT40U(chan)) hc->channelFlags |= CHANNEL_HT40PLUS; - hc->channel = IEEE80211_IS_CHAN_GSM(chan) ? - 2422 + (922 - chan->ic_freq) : chan->ic_freq; + if (IEEE80211_IS_CHAN_GSM(chan)) { + if (ic->ic_regdomain.country == CTRY_XR9) + hc->channel = 2427 + (chan->ic_freq - 907); + else + hc->channel = 2422 + (922 - chan->ic_freq); + } else + hc->channel = chan->ic_freq; #undef N } @@ -1402,7 +1410,7 @@ ath_init(void *arg) * be followed by initialization of the appropriate bits * and then setup of the interrupt mask. */ - ath_mapchan(&sc->sc_curchan, ic->ic_curchan); + ath_mapchan(ic, &sc->sc_curchan, ic->ic_curchan); ath_settkipmic(sc); if (!ath_hal_reset(ah, sc->sc_opmode, &sc->sc_curchan, AH_FALSE, &status)) { if_printf(ifp, "unable to reset hardware; hal status %u\n", @@ -1539,7 +1547,7 @@ ath_reset(struct ifnet *ifp) * Convert to a HAL channel description with the flags * constrained to reflect the current operating mode. */ - ath_mapchan(&sc->sc_curchan, ic->ic_curchan); + ath_mapchan(ic, &sc->sc_curchan, ic->ic_curchan); ath_hal_intrset(ah, 0); /* disable interrupts */ ath_draintxq(sc); /* stop xmit side */ @@ -3723,7 +3731,7 @@ ath_node_getsignal(const struct ieee8021 *rssi = ic->ic_node_getrssi(ni); if (ni->ni_chan != IEEE80211_CHAN_ANYC) { - ath_mapchan(&hchan, ni->ni_chan); + ath_mapchan(ic, &hchan, ni->ni_chan); *noise = ath_hal_getchannoise(ah, &hchan); } else *noise = -95; /* nominally correct */ @@ -5435,7 +5443,7 @@ ath_chan_set(struct ath_softc *sc, struc * the flags constrained to reflect the current * operating mode. */ - ath_mapchan(&hchan, chan); + ath_mapchan(ic, &hchan, chan); DPRINTF(sc, ATH_DEBUG_RESET, "%s: %u (%u MHz, hal flags 0x%x) -> %u (%u MHz, hal flags 0x%x)\n", @@ -5918,8 +5926,15 @@ getchannels(struct ath_softc *sc, int *n } if (ath_hal_isgsmsku(ah)) { - /* remap to true frequencies */ - ichan->ic_freq = 922 + (2422 - ichan->ic_freq); + /* + * Remap to true frequencies: Ubiquiti XR9 cards use a + * frequency mapping different from their SR9 cards. + * We define special country codes to deal with this. + */ + if (cc == CTRY_XR9) + ichan->ic_freq = 907 + (ichan->ic_freq - 2427); + else + ichan->ic_freq = 922 + (2422 - ichan->ic_freq); ichan->ic_flags |= IEEE80211_CHAN_GSM; ichan->ic_ieee = ieee80211_mhz2ieee(ichan->ic_freq, ichan->ic_flags); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:02:47 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B081A1065676; Mon, 27 Oct 2008 18:02:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF8F8FC1D; Mon, 27 Oct 2008 18:02:47 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RI2lFF047916; Mon, 27 Oct 2008 18:02:47 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RI2lIb047915; Mon, 27 Oct 2008 18:02:47 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271802.m9RI2lIb047915@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:02:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184365 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:02:47 -0000 Author: sam Date: Mon Oct 27 18:02:47 2008 New Revision: 184365 URL: http://svn.freebsd.org/changeset/base/184365 Log: fix handling of HT rates; these overlap legacy rates and need to be marked as MCS in the inverse mapping table Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 18:00:43 2008 (r184364) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 18:02:47 2008 (r184365) @@ -6225,8 +6225,13 @@ ath_setcurmode(struct ath_softc *sc, enu memset(sc->sc_rixmap, 0xff, sizeof(sc->sc_rixmap)); rt = sc->sc_rates[mode]; KASSERT(rt != NULL, ("no h/w rate set for phy mode %u", mode)); - for (i = 0; i < rt->rateCount; i++) - sc->sc_rixmap[rt->info[i].dot11Rate & IEEE80211_RATE_VAL] = i; + for (i = 0; i < rt->rateCount; i++) { + uint8_t ieeerate = rt->info[i].dot11Rate & IEEE80211_RATE_VAL; + if (rt->info[i].phy != IEEE80211_T_HT) + sc->sc_rixmap[ieeerate] = i; + else + sc->sc_rixmap[ieeerate | IEEE80211_RATE_MCS] = i; + } memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap)); for (i = 0; i < 32; i++) { u_int8_t ix = rt->rateCodeToIndex[i]; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:03:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5AB10106567B; Mon, 27 Oct 2008 18:03:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 34C738FC1B; Mon, 27 Oct 2008 18:03:19 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTP id AFFCF46B06; Mon, 27 Oct 2008 14:03:18 -0400 (EDT) Date: Mon, 27 Oct 2008 18:03:18 +0000 (GMT) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: "Bjoern A. Zeeb" In-Reply-To: <200810271757.m9RHv3Wb047650@svn.freebsd.org> Message-ID: References: <200810271757.m9RHv3Wb047650@svn.freebsd.org> User-Agent: Alpine 1.10 (BSF 962 2008-03-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184362 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:03:19 -0000 On Mon, 27 Oct 2008, Bjoern A. Zeeb wrote: > Log: > Add the files missed with r184331 to make mac_bsdextended compile again. Thanks -- apparently I missed the conf directory when committing! Robert N M Watson Computer Laboratory University of Cambridge > > Modified: > head/sys/conf/files > > Modified: head/sys/conf/files > ============================================================================== > --- head/sys/conf/files Mon Oct 27 17:54:17 2008 (r184361) > +++ head/sys/conf/files Mon Oct 27 17:57:03 2008 (r184362) > @@ -2194,6 +2194,8 @@ security/mac/mac_sysv_shm.c optional mac > security/mac/mac_vfs.c optional mac > security/mac_biba/mac_biba.c optional mac_biba > security/mac_bsdextended/mac_bsdextended.c optional mac_bsdextended > +security/mac_bsdextended/ugidfw_system.c optional mac_bsdextended > +security/mac_bsdextended/ugidfw_vnode.c optional mac_bsdextended > security/mac_ifoff/mac_ifoff.c optional mac_ifoff > security/mac_lomac/mac_lomac.c optional mac_lomac > security/mac_mls/mac_mls.c optional mac_mls > From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:05:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A986D106566B; Mon, 27 Oct 2008 18:05:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 986A68FC1D; Mon, 27 Oct 2008 18:05:26 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RI5QFN048007; Mon, 27 Oct 2008 18:05:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RI5Q4d048006; Mon, 27 Oct 2008 18:05:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271805.m9RI5Q4d048006@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:05:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184366 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:05:26 -0000 Author: sam Date: Mon Oct 27 18:05:26 2008 New Revision: 184366 URL: http://svn.freebsd.org/changeset/base/184366 Log: prefer #define to naked constant Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 18:02:47 2008 (r184365) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 18:05:26 2008 (r184366) @@ -6243,7 +6243,7 @@ ath_setcurmode(struct ath_softc *sc, enu sc->sc_hwmap[i].ieeerate = rt->info[ix].dot11Rate & IEEE80211_RATE_VAL; if (rt->info[ix].phy == IEEE80211_T_HT) - sc->sc_hwmap[i].ieeerate |= 0x80; /* MCS */ + sc->sc_hwmap[i].ieeerate |= IEEE80211_RATE_MCS; sc->sc_hwmap[i].txflags = IEEE80211_RADIOTAP_F_DATAPAD; if (rt->info[ix].shortPreamble || rt->info[ix].phy == IEEE80211_T_OFDM) From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:08:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54BFF106567E; Mon, 27 Oct 2008 18:08:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 42F1C8FC19; Mon, 27 Oct 2008 18:08:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RI8D0X048110; Mon, 27 Oct 2008 18:08:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RI8Di9048109; Mon, 27 Oct 2008 18:08:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810271808.m9RI8Di9048109@svn.freebsd.org> From: Robert Watson Date: Mon, 27 Oct 2008 18:08:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184367 - head/sys/security/mac_bsdextended X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:08:13 -0000 Author: rwatson Date: Mon Oct 27 18:08:12 2008 New Revision: 184367 URL: http://svn.freebsd.org/changeset/base/184367 Log: When the mac_bsdextended policy is unloaded, free rule memory. Obtained from: TrustedBSD Project MFC after: 3 days Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- head/sys/security/mac_bsdextended/mac_bsdextended.c Mon Oct 27 18:05:26 2008 (r184366) +++ head/sys/security/mac_bsdextended/mac_bsdextended.c Mon Oct 27 18:08:12 2008 (r184367) @@ -214,7 +214,12 @@ ugidfw_init(struct mac_policy_conf *mpc) static void ugidfw_destroy(struct mac_policy_conf *mpc) { + int i; + for (i = 0; i < MAC_BSDEXTENDED_MAXRULES; i++) { + if (rules[i] != NULL) + free(rules[i], M_MACBSDEXTENDED); + } mtx_destroy(&ugidfw_mtx); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:22:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8D25106567C; Mon, 27 Oct 2008 18:22:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D57A18FC14; Mon, 27 Oct 2008 18:22:44 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RIMikx049028; Mon, 27 Oct 2008 18:22:44 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RIMiKh049025; Mon, 27 Oct 2008 18:22:44 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271822.m9RIMiKh049025@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184368 - in head/sys/dev/ath: . ath_rate/sample X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:22:45 -0000 Author: sam Date: Mon Oct 27 18:22:44 2008 New Revision: 184368 URL: http://svn.freebsd.org/changeset/base/184368 Log: o With the addition of HT rates the set of h/w codes has a much wider range making the use of sc_hwmap to do direct mapping impractical. Switch to indexing by the rate index instead of the rate code and adjust associated state and logic appropriately. This has several benefits including simplification of the led code. o fix radiotap capture of HT rates o fix conditional compilation of HT radiotap support to be based on the hal having 5416 support; not the ABI version as hal builds may or may not include 5416 support Modified: head/sys/dev/ath/ath_rate/sample/sample.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ath_rate/sample/sample.c ============================================================================== --- head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 18:08:12 2008 (r184367) +++ head/sys/dev/ath/ath_rate/sample/sample.c Mon Oct 27 18:22:44 2008 (r184368) @@ -493,9 +493,11 @@ ath_rate_tx_complete(struct ath_softc *s const struct ath_tx_status *ts = &bf->bf_status.ds_txstat; const struct ath_desc *ds0 = &bf->bf_desc[0]; int final_rate, short_tries, long_tries, frame_size; + const HAL_RATE_TABLE *rt = sc->sc_currates; int mrr; - final_rate = sc->sc_hwmap[ts->ts_rate &~ HAL_TXSTAT_ALTRATE].ieeerate; + final_rate = sc->sc_hwmap[ + rt->rateCodeToIndex[ts->ts_rate &~ HAL_TXSTAT_ALTRATE]].ieeerate; short_tries = ts->ts_shortretry; long_tries = ts->ts_longretry + 1; frame_size = ds0->ds_ctl0 & 0x0fff; /* low-order 12 bits of ds_ctl0 */ @@ -557,19 +559,19 @@ ath_rate_tx_complete(struct ath_softc *s hwrate3 = MS(ds0->ds_ctl3, AR5416_XmitRate3); } - rate0 = sc->sc_hwmap[hwrate0].ieeerate; + rate0 = sc->sc_hwmap[rt->rateCodeToIndex[hwrate0]].ieeerate; tries0 = MS(ds0->ds_ctl2, AR_XmitDataTries0); ndx0 = rate_to_ndx(sn, rate0); - rate1 = sc->sc_hwmap[hwrate1].ieeerate; + rate1 = sc->sc_hwmap[rt->rateCodeToIndex[hwrate1]].ieeerate; tries1 = MS(ds0->ds_ctl2, AR_XmitDataTries1); ndx1 = rate_to_ndx(sn, rate1); - rate2 = sc->sc_hwmap[hwrate2].ieeerate; + rate2 = sc->sc_hwmap[rt->rateCodeToIndex[hwrate2]].ieeerate; tries2 = MS(ds0->ds_ctl2, AR_XmitDataTries2); ndx2 = rate_to_ndx(sn, rate2); - rate3 = sc->sc_hwmap[hwrate3].ieeerate; + rate3 = sc->sc_hwmap[rt->rateCodeToIndex[hwrate3]].ieeerate; tries3 = MS(ds0->ds_ctl2, AR_XmitDataTries3); ndx3 = rate_to_ndx(sn, rate3); Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 18:08:12 2008 (r184367) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 18:22:44 2008 (r184368) @@ -114,12 +114,6 @@ CTASSERT(ATH_BCBUF <= 8); ((((u_int8_t *)(p))[0] ) | (((u_int8_t *)(p))[1] << 8) | \ (((u_int8_t *)(p))[2] << 16) | (((u_int8_t *)(p))[3] << 24))) -enum { - ATH_LED_TX, - ATH_LED_RX, - ATH_LED_POLL, -}; - #define CTRY_XR9 5001 /* Ubiquiti XR9 */ static struct ieee80211vap *ath_vap_create(struct ieee80211com *, @@ -3898,12 +3892,13 @@ static int ath_rx_tap(struct ifnet *ifp, struct mbuf *m, const struct ath_rx_status *rs, u_int64_t tsf, int16_t nf) { -#define CHAN_HT htole32(CHANNEL_HT20|CHANNEL_HT40PLUS|CHANNEL_HT40MINUS) #define CHAN_HT20 htole32(IEEE80211_CHAN_HT20) #define CHAN_HT40U htole32(IEEE80211_CHAN_HT40U) #define CHAN_HT40D htole32(IEEE80211_CHAN_HT40D) +#define CHAN_HT (CHAN_HT20|CHAN_HT40U|CHAN_HT40D) struct ath_softc *sc = ifp->if_softc; - u_int8_t rix; + const HAL_RATE_TABLE *rt; + uint8_t rix; /* * Discard anything shorter than an ack or cts. @@ -3914,12 +3909,14 @@ ath_rx_tap(struct ifnet *ifp, struct mbu sc->sc_stats.ast_rx_tooshort++; return 0; } - rix = rs->rs_rate; + rt = sc->sc_currates; + KASSERT(rt != NULL, ("no rate table, mode %u", sc->sc_curmode)); + rix = rt->rateCodeToIndex[rs->rs_rate]; sc->sc_rx_th.wr_rate = sc->sc_hwmap[rix].ieeerate; sc->sc_rx_th.wr_flags = sc->sc_hwmap[rix].rxflags; -#if HAL_ABI_VERSION >= 0x07050400 +#ifdef AH_SUPPORT_AR5416 sc->sc_rx_th.wr_chan_flags &= ~CHAN_HT; - if (sc->sc_rx_th.wr_rate & 0x80) { /* HT rate */ + if (sc->sc_rx_th.wr_rate & IEEE80211_RATE_MCS) { /* HT rate */ if ((rs->rs_flags & HAL_RX_2040) == 0) sc->sc_rx_th.wr_chan_flags |= CHAN_HT20; else if (sc->sc_curchan.channelFlags & CHANNEL_HT40PLUS) @@ -3941,10 +3938,10 @@ ath_rx_tap(struct ifnet *ifp, struct mbu bpf_mtap2(ifp->if_bpf, &sc->sc_rx_th, sc->sc_rx_th_len, m); return 1; +#undef CHAN_HT #undef CHAN_HT20 #undef CHAN_HT40U #undef CHAN_HT40D -#undef CHAN_HT } static void @@ -4175,9 +4172,11 @@ rx_accept: } if (IFF_DUMPPKTS(sc, ATH_DEBUG_RECV)) { + const HAL_RATE_TABLE *rt = sc->sc_currates; + uint8_t rix = rt->rateCodeToIndex[rs->rs_rate]; + ieee80211_dump_pkt(ic, mtod(m, caddr_t), len, - sc->sc_hwmap[rs->rs_rate].ieeerate, - rs->rs_rssi); + sc->sc_hwmap[rix].ieeerate, rs->rs_rssi); } m_adj(m, -IEEE80211_CRC_LEN); @@ -4235,10 +4234,11 @@ rx_accept: * periodic beacon frames to trigger the poll event. */ if (type == IEEE80211_FC0_TYPE_DATA) { - sc->sc_rxrate = rs->rs_rate; - ath_led_event(sc, ATH_LED_RX); + const HAL_RATE_TABLE *rt = sc->sc_currates; + ath_led_event(sc, + rt->rateCodeToIndex[rs->rs_rate]); } else if (ticks - sc->sc_ledevent >= sc->sc_ledidle) - ath_led_event(sc, ATH_LED_POLL); + ath_led_event(sc, 0); } rx_next: STAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); @@ -4759,7 +4759,7 @@ ath_tx_start(struct ath_softc *sc, struc } else { ath_rate_findrate(sc, an, shortPreamble, pktlen, &rix, &try0, &txrate); - sc->sc_txrate = txrate; /* for LED blinking */ + sc->sc_txrix = rix; /* for LED blinking */ sc->sc_lastdatarix = rix; /* for fast frames */ if (try0 != ATH_TXMAXTRY) ismrr = 1; @@ -4916,18 +4916,18 @@ ath_tx_start(struct ath_softc *sc, struc if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT)) ieee80211_dump_pkt(ic, mtod(m0, caddr_t), m0->m_len, - sc->sc_hwmap[txrate].ieeerate, -1); + sc->sc_hwmap[rix].ieeerate, -1); if (bpf_peers_present(ifp->if_bpf)) { u_int64_t tsf = ath_hal_gettsf64(ah); sc->sc_tx_th.wt_tsf = htole64(tsf); - sc->sc_tx_th.wt_flags = sc->sc_hwmap[txrate].txflags; + sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (iswep) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; if (isfrag) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_FRAG; - sc->sc_tx_th.wt_rate = sc->sc_hwmap[txrate].ieeerate; + sc->sc_tx_th.wt_rate = sc->sc_hwmap[rix].ieeerate; sc->sc_tx_th.wt_txpower = ni->ni_txpower; sc->sc_tx_th.wt_antenna = sc->sc_txantenna; @@ -5143,7 +5143,7 @@ ath_tx_proc_q0(void *arg, int npending) ifp->if_timer = 0; if (sc->sc_softled) - ath_led_event(sc, ATH_LED_TX); + ath_led_event(sc, sc->sc_txrix); ath_start(ifp); } @@ -5180,7 +5180,7 @@ ath_tx_proc_q0123(void *arg, int npendin ifp->if_timer = 0; if (sc->sc_softled) - ath_led_event(sc, ATH_LED_TX); + ath_led_event(sc, sc->sc_txrix); ath_start(ifp); } @@ -5209,7 +5209,7 @@ ath_tx_proc(void *arg, int npending) ifp->if_timer = 0; if (sc->sc_softled) - ath_led_event(sc, ATH_LED_TX); + ath_led_event(sc, sc->sc_txrix); ath_start(ifp); } @@ -6121,26 +6121,12 @@ ath_led_blink(struct ath_softc *sc, int } static void -ath_led_event(struct ath_softc *sc, int event) +ath_led_event(struct ath_softc *sc, int rix) { - sc->sc_ledevent = ticks; /* time of last event */ if (sc->sc_blinking) /* don't interrupt active blink */ return; - switch (event) { - case ATH_LED_POLL: - ath_led_blink(sc, sc->sc_hwmap[0].ledon, - sc->sc_hwmap[0].ledoff); - break; - case ATH_LED_TX: - ath_led_blink(sc, sc->sc_hwmap[sc->sc_txrate].ledon, - sc->sc_hwmap[sc->sc_txrate].ledoff); - break; - case ATH_LED_RX: - ath_led_blink(sc, sc->sc_hwmap[sc->sc_rxrate].ledon, - sc->sc_hwmap[sc->sc_rxrate].ledoff); - break; - } + ath_led_blink(sc, sc->sc_hwmap[rix].ledon, sc->sc_hwmap[rix].ledoff); } static int @@ -6233,20 +6219,19 @@ ath_setcurmode(struct ath_softc *sc, enu sc->sc_rixmap[ieeerate | IEEE80211_RATE_MCS] = i; } memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap)); - for (i = 0; i < 32; i++) { - u_int8_t ix = rt->rateCodeToIndex[i]; - if (ix == 0xff) { + for (i = 0; i < N(sc->sc_hwmap); i++) { + if (i >= rt->rateCount) { sc->sc_hwmap[i].ledon = (500 * hz) / 1000; sc->sc_hwmap[i].ledoff = (130 * hz) / 1000; continue; } sc->sc_hwmap[i].ieeerate = - rt->info[ix].dot11Rate & IEEE80211_RATE_VAL; - if (rt->info[ix].phy == IEEE80211_T_HT) + rt->info[i].dot11Rate & IEEE80211_RATE_VAL; + if (rt->info[i].phy == IEEE80211_T_HT) sc->sc_hwmap[i].ieeerate |= IEEE80211_RATE_MCS; sc->sc_hwmap[i].txflags = IEEE80211_RADIOTAP_F_DATAPAD; - if (rt->info[ix].shortPreamble || - rt->info[ix].phy == IEEE80211_T_OFDM) + if (rt->info[i].shortPreamble || + rt->info[i].phy == IEEE80211_T_OFDM) sc->sc_hwmap[i].txflags |= IEEE80211_RADIOTAP_F_SHORTPRE; /* NB: receive frames include FCS */ sc->sc_hwmap[i].rxflags = sc->sc_hwmap[i].txflags | @@ -6443,7 +6428,9 @@ ath_ioctl(struct ifnet *ifp, u_long cmd, sc->sc_stats.ast_tx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgtxrssi); sc->sc_stats.ast_rx_rssi = ATH_RSSI(sc->sc_halstats.ns_avgrssi); rt = sc->sc_currates; - sc->sc_stats.ast_tx_rate = sc->sc_hwmap[sc->sc_txrate].ieeerate; + /* XXX HT rates */ + sc->sc_stats.ast_tx_rate = + rt->info[sc->sc_txrix].dot11Rate &~ IEEE80211_RATE_BASIC; return copyout(&sc->sc_stats, ifr->ifr_data, sizeof (sc->sc_stats)); #ifdef ATH_DIAGAPI @@ -6894,7 +6881,7 @@ ath_tx_raw_start(struct ath_softc *sc, s txrate = rt->info[rix].rateCode; if (params->ibp_flags & IEEE80211_BPF_SHORTPRE) txrate |= rt->info[rix].shortPreamble; - sc->sc_txrate = txrate; + sc->sc_txrix = rix; try0 = params->ibp_try0; ismrr = (params->ibp_try1 != 0); txantenna = params->ibp_pri >> 2; @@ -6932,16 +6919,16 @@ ath_tx_raw_start(struct ath_softc *sc, s if (IFF_DUMPPKTS(sc, ATH_DEBUG_XMIT)) ieee80211_dump_pkt(ic, mtod(m0, caddr_t), m0->m_len, - sc->sc_hwmap[txrate].ieeerate, -1); + sc->sc_hwmap[rix].ieeerate, -1); if (bpf_peers_present(ifp->if_bpf)) { u_int64_t tsf = ath_hal_gettsf64(ah); sc->sc_tx_th.wt_tsf = htole64(tsf); - sc->sc_tx_th.wt_flags = sc->sc_hwmap[txrate].txflags; + sc->sc_tx_th.wt_flags = sc->sc_hwmap[rix].txflags; if (wh->i_fc[1] & IEEE80211_FC1_WEP) sc->sc_tx_th.wt_flags |= IEEE80211_RADIOTAP_F_WEP; - sc->sc_tx_th.wt_rate = sc->sc_hwmap[txrate].ieeerate; + sc->sc_tx_th.wt_rate = sc->sc_hwmap[rix].ieeerate; sc->sc_tx_th.wt_txpower = ni->ni_txpower; sc->sc_tx_th.wt_antenna = sc->sc_txantenna; Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Oct 27 18:08:12 2008 (r184367) +++ head/sys/dev/ath/if_athvar.h Mon Oct 27 18:22:44 2008 (r184368) @@ -284,8 +284,7 @@ struct ath_softc { u_int sc_ledon; /* pin setting for LED on */ u_int sc_ledidle; /* idle polling interval */ int sc_ledevent; /* time of last LED event */ - u_int8_t sc_rxrate; /* current rx rate for LED */ - u_int8_t sc_txrate; /* current tx rate for LED */ + u_int8_t sc_txrix; /* current tx rate for LED */ u_int16_t sc_ledoff; /* off time for current blink */ struct callout sc_ledtimer; /* led off timer */ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:30:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 865B11065673; Mon, 27 Oct 2008 18:30:33 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 743238FC17; Mon, 27 Oct 2008 18:30:33 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RIUXZe049560; Mon, 27 Oct 2008 18:30:33 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RIUXvn049557; Mon, 27 Oct 2008 18:30:33 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271830.m9RIUXvn049557@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184369 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:30:33 -0000 Author: sam Date: Mon Oct 27 18:30:33 2008 New Revision: 184369 URL: http://svn.freebsd.org/changeset/base/184369 Log: prepare for a new hal Modified: head/sys/dev/ath/ah_osdep.c head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_athvar.h Modified: head/sys/dev/ath/ah_osdep.c ============================================================================== --- head/sys/dev/ath/ah_osdep.c Mon Oct 27 18:22:44 2008 (r184368) +++ head/sys/dev/ath/ah_osdep.c Mon Oct 27 18:30:33 2008 (r184369) @@ -71,8 +71,12 @@ extern void ath_hal_assert_failed(const int lineno, const char* msg); #endif #ifdef AH_DEBUG +#if HAL_ABI_VERSION >= 0x08090101 +extern void HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...); +#else extern void HALDEBUG(struct ath_hal *ah, const char* fmt, ...); extern void HALDEBUGn(struct ath_hal *ah, u_int level, const char* fmt, ...); +#endif #endif /* AH_DEBUG */ /* NB: put this here instead of the driver to avoid circular references */ @@ -139,6 +143,18 @@ ath_hal_ether_sprintf(const u_int8_t *ma } #ifdef AH_DEBUG +#if HAL_ABI_VERSION >= 0x08090101 +void +HALDEBUG(struct ath_hal *ah, u_int mask, const char* fmt, ...) +{ + if (ath_hal_debug & mask) { + __va_list ap; + va_start(ap, fmt); + ath_hal_vprintf(ah, fmt, ap); + va_end(ap); + } +} +#else void HALDEBUG(struct ath_hal *ah, const char* fmt, ...) { @@ -160,6 +176,7 @@ HALDEBUGn(struct ath_hal *ah, u_int leve va_end(ap); } } +#endif #endif /* AH_DEBUG */ #ifdef AH_DEBUG_ALQ Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Oct 27 18:22:44 2008 (r184368) +++ head/sys/dev/ath/if_ath.c Mon Oct 27 18:30:33 2008 (r184369) @@ -298,6 +298,7 @@ ath_attach(u_int16_t devid, struct ath_s struct ath_hal *ah = NULL; HAL_STATUS status; int error = 0, i; + u_int wmodes; DPRINTF(sc, ATH_DEBUG_ANY, "%s: devid 0x%x\n", __func__, devid); @@ -605,7 +606,8 @@ ath_attach(u_int16_t devid, struct ath_s sc->sc_hastsfadd = ath_hal_hastsfadjust(ah); if (ath_hal_hasfastframes(ah)) ic->ic_caps |= IEEE80211_C_FF; - if (ath_hal_getwirelessmodes(ah, ic->ic_regdomain.country) & (HAL_MODE_108G|HAL_MODE_TURBO)) + wmodes = ath_hal_getwirelessmodes(ah, ic->ic_regdomain.country); + if (wmodes & (HAL_MODE_108G|HAL_MODE_TURBO)) ic->ic_caps |= IEEE80211_C_TURBOP; /* @@ -2550,10 +2552,10 @@ ath_key_update_end(struct ieee80211vap * * * o always accept unicast, broadcast, and multicast traffic * o accept PHY error frames when hardware doesn't have MIB support - * to count and we need them for ANI (sta mode only at the moment) + * to count and we need them for ANI (sta mode only until recently) * and we are not scanning (ANI is disabled) - * NB: only with recent hal's; older hal's add rx filter bits out - * of sight and we need to blindly preserve them + * NB: older hal's add rx filter bits out of sight and we need to + * blindly preserve them * o probe request frames are accepted only when operating in * hostap, adhoc, or monitor modes * o enable promiscuous mode @@ -2580,15 +2582,17 @@ ath_calcrxfilter(struct ath_softc *sc) struct ieee80211com *ic = ifp->if_l2com; u_int32_t rfilt; -#if HAL_ABI_VERSION < 0x08011600 - rfilt = (ath_hal_getrxfilter(sc->sc_ah) & - (HAL_RX_FILTER_PHYRADAR | HAL_RX_FILTER_PHYERR)) - | HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; -#else rfilt = HAL_RX_FILTER_UCAST | HAL_RX_FILTER_BCAST | HAL_RX_FILTER_MCAST; +#if HAL_ABI_VERSION < 0x08011600 + rfilt |= (ath_hal_getrxfilter(sc->sc_ah) & + (HAL_RX_FILTER_PHYRADAR | HAL_RX_FILTER_PHYERR)); +#elif HAL_ABI_VERSION < 0x08060100 if (ic->ic_opmode == IEEE80211_M_STA && !sc->sc_needmib && !sc->sc_scanning) rfilt |= HAL_RX_FILTER_PHYERR; +#else + if (!sc->sc_needmib && !sc->sc_scanning) + rfilt |= HAL_RX_FILTER_PHYERR; #endif if (ic->ic_opmode != IEEE80211_M_STA) rfilt |= HAL_RX_FILTER_PROBEREQ; Modified: head/sys/dev/ath/if_athvar.h ============================================================================== --- head/sys/dev/ath/if_athvar.h Mon Oct 27 18:22:44 2008 (r184368) +++ head/sys/dev/ath/if_athvar.h Mon Oct 27 18:30:33 2008 (r184369) @@ -506,6 +506,8 @@ void ath_intr(void *); (ath_hal_getcapability(_ah, HAL_CAP_CIPHER, _cipher, NULL) == HAL_OK) #define ath_hal_getregdomain(_ah, _prd) \ (ath_hal_getcapability(_ah, HAL_CAP_REG_DMN, 0, (_prd)) == HAL_OK) +#if HAL_ABI_VERSION < 0x08090100 +/* XXX wrong for anything but amd64 and i386 */ #if defined(__LP64__) #define ath_hal_setregdomain(_ah, _rd) \ (*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 176) = (_rd)) @@ -513,6 +515,10 @@ void ath_intr(void *); #define ath_hal_setregdomain(_ah, _rd) \ (*(uint16_t *)(((uint8_t *)&(_ah)[1]) + 128) = (_rd)) #endif +#else +#define ath_hal_setregdomain(_ah, _rd) \ + ath_hal_setcapability(_ah, HAL_CAP_REG_DMN, 0, _rd, NULL) +#endif #define ath_hal_getcountrycode(_ah, _pcc) \ (*(_pcc) = (_ah)->ah_countryCode) #define ath_hal_gettkipmic(_ah) \ From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:47:48 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 771CC1065670; Mon, 27 Oct 2008 18:47:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6566C8FC31; Mon, 27 Oct 2008 18:47:48 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RIlmrL050258; Mon, 27 Oct 2008 18:47:48 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RIlm1W050257; Mon, 27 Oct 2008 18:47:48 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271847.m9RIlm1W050257@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:47:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184370 - head/tools/tools/ath/athdebug X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:47:48 -0000 Author: sam Date: Mon Oct 27 18:47:48 2008 New Revision: 184370 URL: http://svn.freebsd.org/changeset/base/184370 Log: add regdomain knob Modified: head/tools/tools/ath/athdebug/athdebug.c Modified: head/tools/tools/ath/athdebug/athdebug.c ============================================================================== --- head/tools/tools/ath/athdebug/athdebug.c Mon Oct 27 18:30:33 2008 (r184369) +++ head/tools/tools/ath/athdebug/athdebug.c Mon Oct 27 18:47:48 2008 (r184370) @@ -41,6 +41,7 @@ #include #include #include +#include #define N(a) (sizeof(a)/sizeof(a[0])) @@ -68,6 +69,7 @@ enum { ATH_DEBUG_FF = 0x00200000, /* fast frames */ ATH_DEBUG_DFS = 0x00400000, /* DFS processing */ ATH_DEBUG_TDMA = 0x00800000, /* TDMA processing */ + ATH_DEBUG_REGDOMAIN = 0x02000000, /* regulatory processing */ ATH_DEBUG_FATAL = 0x80000000, /* fatal errors */ ATH_DEBUG_ANY = 0xffffffff }; @@ -97,6 +99,7 @@ static struct { { "ff", ATH_DEBUG_FF }, { "dfs", ATH_DEBUG_DFS }, { "tdma", ATH_DEBUG_TDMA }, + { "regdomain", ATH_DEBUG_REGDOMAIN }, { "fatal", ATH_DEBUG_FATAL }, }; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 18:50:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60ED11065673; Mon, 27 Oct 2008 18:50:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EB568FC08; Mon, 27 Oct 2008 18:50:46 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RIokWj050377; Mon, 27 Oct 2008 18:50:46 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RIokT9050374; Mon, 27 Oct 2008 18:50:46 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810271850.m9RIokT9050374@svn.freebsd.org> From: Sam Leffler Date: Mon, 27 Oct 2008 18:50:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184371 - head/tools/tools/ath/athstats X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 18:50:46 -0000 Author: sam Date: Mon Oct 27 18:50:46 2008 New Revision: 184371 URL: http://svn.freebsd.org/changeset/base/184371 Log: sync w/ driver updates; this also brings in ani stats Modified: head/tools/tools/ath/athstats/Makefile head/tools/tools/ath/athstats/athstats.c head/tools/tools/ath/athstats/main.c Modified: head/tools/tools/ath/athstats/Makefile ============================================================================== --- head/tools/tools/ath/athstats/Makefile Mon Oct 27 18:47:48 2008 (r184370) +++ head/tools/tools/ath/athstats/Makefile Mon Oct 27 18:50:46 2008 (r184371) @@ -8,12 +8,16 @@ SRCS= main.c statfoo.c athstats.c .include -CFLAGS+= -I. +SRCDIR= ${.CURDIR}/../../../.. + CLEANFILES+= opt_ah.h ah_osdep.h -CFLAGS+=-I../../../../sys/contrib/dev/ath -CFLAGS+=-I../../../../sys/net80211 -CFLAGS+=-I../../../../sys/dev/ath +CFLAGS+=-DATH_SUPPORT_ANI + +CFLAGS+=-I${.CURDIR} +CFLAGS+=-I${SRCDIR}/sys/contrib/dev/ath +CFLAGS+=-I${SRCDIR}/sys/net80211 +CFLAGS+=-I${SRCDIR}/sys/dev/ath athstats.o: opt_ah.h ah_osdep.h Modified: head/tools/tools/ath/athstats/athstats.c ============================================================================== --- head/tools/tools/ath/athstats/athstats.c Mon Oct 27 18:47:48 2008 (r184370) +++ head/tools/tools/ath/athstats/athstats.c Mon Oct 27 18:50:46 2008 (r184371) @@ -55,6 +55,12 @@ #include "athstats.h" +#ifdef ATH_SUPPORT_ANI +#define HAL_EP_RND(x,mul) \ + ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul)) +#define HAL_RSSI(x) HAL_EP_RND(x, HAL_RSSI_EP_MULTIPLIER) +#endif + #define NOTPRESENT { 0, "", "" } #define AFTER(prev) ((prev)+1) @@ -85,7 +91,7 @@ static const struct fmt athstats[] = { #else #define S_RATE AFTER(S_MIB) #endif - { 4, "rate", "rate", "current transmit rate" }, + { 5, "rate", "rate", "current transmit rate" }, #define S_WATCHDOG AFTER(S_RATE) { 5, "wdog", "wdog", "watchdog timeouts" }, #define S_FATAL AFTER(S_WATCHDOG) @@ -155,21 +161,21 @@ static const struct fmt athstats[] = { #define S_RX_PHY_ERR AFTER(S_RX_CTL) { 7, "phyerr", "phyerr", "rx failed 'cuz of PHY err" }, #define S_RX_PHY_UNDERRUN AFTER(S_RX_PHY_ERR) - { 6, "phyund", "phyund", "transmit underrun" }, + { 4, "phyund", "TUnd", "transmit underrun" }, #define S_RX_PHY_TIMING AFTER(S_RX_PHY_UNDERRUN) - { 6, "phytim", "phytim", "timing error" }, + { 4, "phytim", "Tim", "timing error" }, #define S_RX_PHY_PARITY AFTER(S_RX_PHY_TIMING) - { 6, "phypar", "phypar", "illegal parity" }, + { 4, "phypar", "IPar", "illegal parity" }, #define S_RX_PHY_RATE AFTER(S_RX_PHY_PARITY) - { 6, "phyrate", "phyrate", "illegal rate" }, + { 4, "phyrate", "IRate", "illegal rate" }, #define S_RX_PHY_LENGTH AFTER(S_RX_PHY_RATE) - { 6, "phylen", "phylen", "illegal length" }, + { 4, "phylen", "ILen", "illegal length" }, #define S_RX_PHY_RADAR AFTER(S_RX_PHY_LENGTH) - { 6, "phyradar", "phyradar", "radar detect" }, + { 4, "phyradar", "Radar", "radar detect" }, #define S_RX_PHY_SERVICE AFTER(S_RX_PHY_RADAR) - { 6, "physervice", "physervice", "illegal service" }, + { 4, "physervice", "Service", "illegal service" }, #define S_RX_PHY_TOR AFTER(S_RX_PHY_SERVICE) - { 6, "phytor", "phytor", "transmit override receive" }, + { 4, "phytor", "TOR", "transmit override receive" }, #define S_RX_PHY_OFDM_TIMING AFTER(S_RX_PHY_TOR) { 6, "ofdmtim", "ofdmtim", "OFDM timing" }, #define S_RX_PHY_OFDM_SIGNAL_PARITY AFTER(S_RX_PHY_OFDM_TIMING) @@ -258,7 +264,71 @@ static const struct fmt athstats[] = { { 5, "defsw", "defsw", "switched default/rx antenna" }, #define S_ANT_TXSWITCH AFTER(S_ANT_DEFSWITCH) { 5, "txsw", "txsw", "tx used alternate antenna" }, +#ifdef ATH_SUPPORT_ANI +#define S_ANI_NOISE AFTER(S_ANT_TXSWITCH) + { 2, "ni", "NI", "noise immunity level" }, +#define S_ANI_SPUR AFTER(S_ANI_NOISE) + { 2, "si", "SI", "spur immunity level" }, +#define S_ANI_STEP AFTER(S_ANI_SPUR) + { 2, "step", "ST", "first step level" }, +#define S_ANI_OFDM AFTER(S_ANI_STEP) + { 4, "owsd", "OWSD", "OFDM weak signal detect" }, +#define S_ANI_CCK AFTER(S_ANI_OFDM) + { 4, "cwst", "CWST", "CCK weak signal threshold" }, +#define S_ANI_MAXSPUR AFTER(S_ANI_CCK) + { 3, "maxsi","MSI", "max spur immunity level" }, +#define S_ANI_LISTEN AFTER(S_ANI_MAXSPUR) + { 6, "listen","LISTEN", "listen time" }, +#define S_ANI_NIUP AFTER(S_ANI_LISTEN) + { 4, "ni+", "NI-", "ANI increased noise immunity" }, +#define S_ANI_NIDOWN AFTER(S_ANI_NIUP) + { 4, "ni-", "NI-", "ANI decrease noise immunity" }, +#define S_ANI_SIUP AFTER(S_ANI_NIDOWN) + { 4, "si+", "SI+", "ANI increased spur immunity" }, +#define S_ANI_SIDOWN AFTER(S_ANI_SIUP) + { 4, "si-", "SI-", "ANI decrease spur immunity" }, +#define S_ANI_OFDMON AFTER(S_ANI_SIDOWN) + { 5, "ofdm+","OFDM+", "ANI enabled OFDM weak signal detect" }, +#define S_ANI_OFDMOFF AFTER(S_ANI_OFDMON) + { 5, "ofdm-","OFDM-", "ANI disabled OFDM weak signal detect" }, +#define S_ANI_CCKHI AFTER(S_ANI_OFDMOFF) + { 5, "cck+", "CCK+", "ANI enabled CCK weak signal threshold" }, +#define S_ANI_CCKLO AFTER(S_ANI_CCKHI) + { 5, "cck-", "CCK-", "ANI disabled CCK weak signal threshold" }, +#define S_ANI_STEPUP AFTER(S_ANI_CCKLO) + { 5, "step+","STEP+", "ANI increased first step level" }, +#define S_ANI_STEPDOWN AFTER(S_ANI_STEPUP) + { 5, "step-","STEP-", "ANI decreased first step level" }, +#define S_ANI_OFDMERRS AFTER(S_ANI_STEPDOWN) + { 8, "ofdm", "OFDM", "cumulative ofdm phy error count" }, +#define S_ANI_CCKERRS AFTER(S_ANI_OFDMERRS) + { 8, "cck", "CCK", "cumulative cck phy error count" }, +#define S_ANI_RESET AFTER(S_ANI_CCKERRS) + { 5, "reset","RESET", "ANI parameters zero'd for non-STA operation" }, +#define S_ANI_LZERO AFTER(S_ANI_RESET) + { 5, "lzero","LZERO", "ANI forced listen time to zero" }, +#define S_ANI_LNEG AFTER(S_ANI_LZERO) + { 5, "lneg", "LNEG", "ANI calculated listen time < 0" }, +#define S_MIB_ACKBAD AFTER(S_ANI_LNEG) + { 5, "ackbad","ACKBAD", "bad ACK's" }, +#define S_MIB_RTSBAD AFTER(S_MIB_ACKBAD) + { 5, "rtsbad","RTSBAD", "bad RTS" }, +#define S_MIB_RTSGOOD AFTER(S_MIB_RTSBAD) + { 5, "rtsgood","RTSGOOD", "good RTS" }, +#define S_MIB_FCSBAD AFTER(S_MIB_RTSGOOD) + { 5, "fcsbad","FCSBAD", "bad FCS" }, +#define S_MIB_BEACONS AFTER(S_MIB_FCSBAD) + { 5, "beacons","beacons", "beacons received" }, +#define S_NODE_AVGBRSSI AFTER(S_MIB_BEACONS) + { 3, "avgbrssi","BSI", "average rssi (beacons only)" }, +#define S_NODE_AVGRSSI AFTER(S_NODE_AVGBRSSI) + { 3, "avgrssi","DSI", "average rssi (all rx'd frames)" }, +#define S_NODE_AVGARSSI AFTER(S_NODE_AVGRSSI) + { 3, "avgtxrssi","TSI", "average rssi (ACKs only)" }, +#define S_ANT_TX0 AFTER(S_NODE_AVGARSSI) +#else #define S_ANT_TX0 AFTER(S_ANT_TXSWITCH) +#endif /* ATH_SUPPORT_ANI */ { 8, "tx0", "ant0(tx)", "frames tx on antenna 0" }, #define S_ANT_TX1 AFTER(S_ANT_TX0) { 8, "tx1", "ant1(tx)", "frames tx on antenna 1" }, @@ -302,12 +372,41 @@ static const struct fmt athstats[] = { struct _athstats { struct ath_stats ath; +#ifdef ATH_SUPPORT_ANI + struct { + uint32_t ast_ani_niup; /* increased noise immunity */ + uint32_t ast_ani_nidown; /* decreased noise immunity */ + uint32_t ast_ani_spurup; /* increased spur immunity */ + uint32_t ast_ani_spurdown; /* descreased spur immunity */ + uint32_t ast_ani_ofdmon; /* OFDM weak signal detect on */ + uint32_t ast_ani_ofdmoff; /* OFDM weak signal detect off*/ + uint32_t ast_ani_cckhigh; /* CCK weak signal thr high */ + uint32_t ast_ani_ccklow; /* CCK weak signal thr low */ + uint32_t ast_ani_stepup; /* increased first step level */ + uint32_t ast_ani_stepdown; /* decreased first step level */ + uint32_t ast_ani_ofdmerrs; /* cumulative ofdm phy err cnt*/ + uint32_t ast_ani_cckerrs; /* cumulative cck phy err cnt */ + uint32_t ast_ani_reset; /* params zero'd for non-STA */ + uint32_t ast_ani_lzero; /* listen time forced to zero */ + uint32_t ast_ani_lneg; /* listen time calculated < 0 */ + HAL_MIB_STATS ast_mibstats; /* MIB counter stats */ + HAL_NODE_STATS ast_nodestats; /* latest rssi stats */ + } ani_stats; + struct { + uint8_t noiseImmunityLevel; + uint8_t spurImmunityLevel; + uint8_t firstepLevel; + uint8_t ofdmWeakSigDetectOff; + uint32_t listenTime; + } ani_state; +#endif }; struct athstatfoo_p { struct athstatfoo base; int s; int optstats; +#define ATHSTATS_ANI 0x0001 struct ifreq ifr; struct ath_diag atd; struct _athstats cur; @@ -320,6 +419,10 @@ ath_setifname(struct athstatfoo *wf0, co struct athstatfoo_p *wf = (struct athstatfoo_p *) wf0; strncpy(wf->ifr.ifr_name, ifname, sizeof (wf->ifr.ifr_name)); +#ifdef ATH_SUPPORT_ANI + strncpy(wf->atd.ad_name, ifname, sizeof (wf->atd.ad_name)); + wf->optstats |= ATHSTATS_ANI; +#endif } static void @@ -328,6 +431,22 @@ ath_collect(struct athstatfoo_p *wf, str wf->ifr.ifr_data = (caddr_t) &stats->ath; if (ioctl(wf->s, SIOCGATHSTATS, &wf->ifr) < 0) err(1, wf->ifr.ifr_name); +#ifdef ATH_SUPPORT_ANI + if (wf->optstats & ATHSTATS_ANI) { + wf->atd.ad_id = 5; + wf->atd.ad_out_data = (caddr_t) &stats->ani_state; + wf->atd.ad_out_size = sizeof(stats->ani_state); + if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) { + warn(wf->atd.ad_name); + wf->optstats &= ~ATHSTATS_ANI; + } + wf->atd.ad_id = 8; + wf->atd.ad_out_data = (caddr_t) &stats->ani_stats; + wf->atd.ad_out_size = sizeof(stats->ani_stats); + if (ioctl(wf->s, SIOCGATHDIAG, &wf->atd) < 0) + warn(wf->atd.ad_name); + } +#endif /* ATH_SUPPORT_ANI */ } static void @@ -354,6 +473,17 @@ ath_update_tot(struct statfoo *sf) wf->total = wf->cur; } +static void +snprintrate(char b[], size_t bs, int rate) +{ + if (rate & IEEE80211_RATE_MCS) + snprintf(b, bs, "MCS%u", rate &~ IEEE80211_RATE_MCS); + else if (rate & 1) + snprintf(b, bs, "%u.5M", rate / 2); + else + snprintf(b, bs, "%uM", rate / 2); +} + static int ath_get_curstat(struct statfoo *sf, int s, char b[], size_t bs) { @@ -362,6 +492,12 @@ ath_get_curstat(struct statfoo *sf, int snprintf(b, bs, "%u", wf->cur.ath.ast_##x - wf->total.ath.ast_##x); return 1 #define PHY(x) \ snprintf(b, bs, "%u", wf->cur.ath.ast_rx_phy[x] - wf->total.ath.ast_rx_phy[x]); return 1 +#define ANI(x) \ + snprintf(b, bs, "%u", wf->cur.ani_state.x); return 1 +#define ANISTAT(x) \ + snprintf(b, bs, "%u", wf->cur.ani_stats.ast_ani_##x - wf->total.ani_stats.ast_ani_##x); return 1 +#define MIBSTAT(x) \ + snprintf(b, bs, "%u", wf->cur.ani_stats.ast_mibstats.x - wf->total.ani_stats.ast_mibstats.x); return 1 #define TXANT(x) \ snprintf(b, bs, "%u", wf->cur.ath.ast_ant_tx[x] - wf->total.ath.ast_ant_tx[x]); return 1 #define RXANT(x) \ @@ -378,7 +514,7 @@ ath_get_curstat(struct statfoo *sf, int wf->cur.ath.ast_tx_packets - wf->total.ath.ast_tx_packets); return 1; case S_RATE: - snprintf(b, bs, "%uM", wf->cur.ath.ast_tx_rate / 2); + snprintrate(b, bs, wf->cur.ath.ast_tx_rate); return 1; case S_WATCHDOG: STAT(watchdog); case S_FATAL: STAT(hardware); @@ -472,6 +608,45 @@ ath_get_curstat(struct statfoo *sf, int case S_RATE_DROP: STAT(rate_drop); case S_ANT_DEFSWITCH: STAT(ant_defswitch); case S_ANT_TXSWITCH: STAT(ant_txswitch); +#ifdef S_ANI_NOISE + case S_ANI_NOISE: ANI(noiseImmunityLevel); + case S_ANI_SPUR: ANI(spurImmunityLevel); + case S_ANI_STEP: ANI(firstepLevel); + case S_ANI_OFDM: ANI(ofdmWeakSigDetectOff); + case S_ANI_LISTEN: ANI(listenTime); + case S_ANI_NIUP: ANISTAT(niup); + case S_ANI_NIDOWN: ANISTAT(nidown); + case S_ANI_SIUP: ANISTAT(spurup); + case S_ANI_SIDOWN: ANISTAT(spurdown); + case S_ANI_OFDMON: ANISTAT(ofdmon); + case S_ANI_OFDMOFF: ANISTAT(ofdmoff); + case S_ANI_CCKHI: ANISTAT(cckhigh); + case S_ANI_CCKLO: ANISTAT(ccklow); + case S_ANI_STEPUP: ANISTAT(stepup); + case S_ANI_STEPDOWN: ANISTAT(stepdown); + case S_ANI_OFDMERRS: ANISTAT(ofdmerrs); + case S_ANI_CCKERRS: ANISTAT(cckerrs); + case S_ANI_RESET: ANISTAT(reset); + case S_ANI_LZERO: ANISTAT(lzero); + case S_ANI_LNEG: ANISTAT(lneg); + case S_MIB_ACKBAD: MIBSTAT(ackrcv_bad); + case S_MIB_RTSBAD: MIBSTAT(rts_bad); + case S_MIB_RTSGOOD: MIBSTAT(rts_good); + case S_MIB_FCSBAD: MIBSTAT(fcs_bad); + case S_MIB_BEACONS: MIBSTAT(beacons); + case S_NODE_AVGBRSSI: + snprintf(b, bs, "%u", + HAL_RSSI(wf->cur.ani_stats.ast_nodestats.ns_avgbrssi)); + return 1; + case S_NODE_AVGRSSI: + snprintf(b, bs, "%u", + HAL_RSSI(wf->cur.ani_stats.ast_nodestats.ns_avgrssi)); + return 1; + case S_NODE_AVGARSSI: + snprintf(b, bs, "%u", + HAL_RSSI(wf->cur.ani_stats.ast_nodestats.ns_avgtxrssi)); + return 1; +#endif case S_ANT_TX0: TXANT(0); case S_ANT_TX1: TXANT(1); case S_ANT_TX2: TXANT(2); @@ -513,6 +688,9 @@ ath_get_curstat(struct statfoo *sf, int return 0; #undef RXANT #undef TXANT +#undef ANI +#undef ANISTAT +#undef MIBSTAT #undef PHY #undef STAT } @@ -525,6 +703,12 @@ ath_get_totstat(struct statfoo *sf, int snprintf(b, bs, "%u", wf->total.ath.ast_##x); return 1 #define PHY(x) \ snprintf(b, bs, "%u", wf->total.ath.ast_rx_phy[x]); return 1 +#define ANI(x) \ + snprintf(b, bs, "%u", wf->total.ani_state.x); return 1 +#define ANISTAT(x) \ + snprintf(b, bs, "%u", wf->total.ani_stats.ast_ani_##x); return 1 +#define MIBSTAT(x) \ + snprintf(b, bs, "%u", wf->total.ani_stats.ast_mibstats.x); return 1 #define TXANT(x) \ snprintf(b, bs, "%u", wf->total.ath.ast_ant_tx[x]); return 1 #define RXANT(x) \ @@ -539,7 +723,7 @@ ath_get_totstat(struct statfoo *sf, int snprintf(b, bs, "%lu", wf->total.ath.ast_tx_packets); return 1; case S_RATE: - snprintf(b, bs, "%uM", wf->total.ath.ast_tx_rate / 2); + snprintrate(b, bs, wf->total.ath.ast_tx_rate); return 1; case S_WATCHDOG: STAT(watchdog); case S_FATAL: STAT(hardware); @@ -633,6 +817,44 @@ ath_get_totstat(struct statfoo *sf, int case S_RATE_DROP: STAT(rate_drop); case S_ANT_DEFSWITCH: STAT(ant_defswitch); case S_ANT_TXSWITCH: STAT(ant_txswitch); +#ifdef S_ANI_NOISE + case S_ANI_NOISE: ANI(noiseImmunityLevel); + case S_ANI_SPUR: ANI(spurImmunityLevel); + case S_ANI_STEP: ANI(firstepLevel); + case S_ANI_LISTEN: ANI(listenTime); + case S_ANI_NIUP: ANISTAT(niup); + case S_ANI_NIDOWN: ANISTAT(nidown); + case S_ANI_SIUP: ANISTAT(spurup); + case S_ANI_SIDOWN: ANISTAT(spurdown); + case S_ANI_OFDMON: ANISTAT(ofdmon); + case S_ANI_OFDMOFF: ANISTAT(ofdmoff); + case S_ANI_CCKHI: ANISTAT(cckhigh); + case S_ANI_CCKLO: ANISTAT(ccklow); + case S_ANI_STEPUP: ANISTAT(stepup); + case S_ANI_STEPDOWN: ANISTAT(stepdown); + case S_ANI_OFDMERRS: ANISTAT(ofdmerrs); + case S_ANI_CCKERRS: ANISTAT(cckerrs); + case S_ANI_RESET: ANISTAT(reset); + case S_ANI_LZERO: ANISTAT(lzero); + case S_ANI_LNEG: ANISTAT(lneg); + case S_MIB_ACKBAD: MIBSTAT(ackrcv_bad); + case S_MIB_RTSBAD: MIBSTAT(rts_bad); + case S_MIB_RTSGOOD: MIBSTAT(rts_good); + case S_MIB_FCSBAD: MIBSTAT(fcs_bad); + case S_MIB_BEACONS: MIBSTAT(beacons); + case S_NODE_AVGBRSSI: + snprintf(b, bs, "%u", + HAL_RSSI(wf->total.ani_stats.ast_nodestats.ns_avgbrssi)); + return 1; + case S_NODE_AVGRSSI: + snprintf(b, bs, "%u", + HAL_RSSI(wf->total.ani_stats.ast_nodestats.ns_avgrssi)); + return 1; + case S_NODE_AVGARSSI: + snprintf(b, bs, "%u", + HAL_RSSI(wf->total.ani_stats.ast_nodestats.ns_avgtxrssi)); + return 1; +#endif case S_ANT_TX0: TXANT(0); case S_ANT_TX1: TXANT(1); case S_ANT_TX2: TXANT(2); @@ -674,6 +896,9 @@ ath_get_totstat(struct statfoo *sf, int return 0; #undef RXANT #undef TXANT +#undef ANI +#undef ANISTAT +#undef MIBSTAT #undef PHY #undef STAT } Modified: head/tools/tools/ath/athstats/main.c ============================================================================== --- head/tools/tools/ath/athstats/main.c Mon Oct 27 18:47:48 2008 (r184370) +++ head/tools/tools/ath/athstats/main.c Mon Oct 27 18:50:46 2008 (r184371) @@ -49,8 +49,30 @@ #include "athstats.h" -#define S_DEFAULT \ - "input,output,altrate,short,long,xretry,crcerr,crypt,phyerr,rssi,rate" +static struct { + const char *tag; + const char *fmt; +} tags[] = { + { "default", + "input,output,altrate,short,long,xretry,crcerr,crypt,phyerr,rssi,rate" + }, + { "ani", + "avgbrssi,avgrssi,avgtxrssi,NI,SI,step,owsd,cwst,NI+,NI-,SI+,SI-,OFDM,CCK,LISTEN" + }, +}; + +static const char * +getfmt(const char *tag) +{ +#define N(a) (sizeof(a)/sizeof(a[0])) + int i; + for (i = 0; i < N(tags); i++) + if (strcasecmp(tags[i].tag, tag) == 0) + return tags[i].fmt; + errx(-1, "unknown tag \%s\"", tag); + /*NOTREACHED*/ +#undef N +} static int signalled; @@ -70,7 +92,7 @@ main(int argc, char *argv[]) ifname = getenv("ATH"); if (ifname == NULL) ifname = "ath0"; - wf = athstats_new(ifname, S_DEFAULT); + wf = athstats_new(ifname, getfmt("default")); while ((c = getopt(argc, argv, "i:lo:")) != -1) { switch (c) { case 'i': @@ -80,7 +102,7 @@ main(int argc, char *argv[]) wf->print_fields(wf, stdout); return 0; case 'o': - wf->setfmt(wf, optarg); + wf->setfmt(wf, getfmt(optarg)); break; default: errx(-1, "usage: %s [-a] [-i ifname] [-l] [-o fmt] [interval]\n", argv[0]); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 19:21:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BA40106566B; Mon, 27 Oct 2008 19:21:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B20608FC13; Mon, 27 Oct 2008 19:21:25 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RJLJMO014395; Mon, 27 Oct 2008 15:21:19 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Maxim Sobolev Date: Mon, 27 Oct 2008 14:11:11 -0400 User-Agent: KMail/1.9.7 References: <200810261858.m9QIw4YV091893@svn.freebsd.org> In-Reply-To: <200810261858.m9QIw4YV091893@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271411.11813.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 15:21:19 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8511/Mon Oct 27 14:23:52 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 19:21:26 -0000 On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote: > Author: sobomax > Date: Sun Oct 26 18:58:04 2008 > New Revision: 184293 > URL: http://svn.freebsd.org/changeset/base/184293 > > Log: > Fix division by zero panic if kern.hz less than 32. > > MFC after: 1 day This is wrong. In the case you are worried about here, lapic_timer_hz is less than 128. There is no way you are going to fire stathz 128 times per second from a timer running at < 128 hz. You are effectively running stathz at lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case. Also, I would drop the extra {}'s to match style(9) as well as the existing style of the file. > Modified: > head/sys/amd64/amd64/local_apic.c > head/sys/i386/i386/local_apic.c > > Modified: head/sys/amd64/amd64/local_apic.c > ============================================================================== > --- head/sys/amd64/amd64/local_apic.c Sun Oct 26 17:20:37 2008 (r184292) > +++ head/sys/amd64/amd64/local_apic.c Sun Oct 26 18:58:04 2008 (r184293) > @@ -401,7 +401,11 @@ 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 = 128; > + } else { > + stathz = lapic_timer_hz / (lapic_timer_hz / 128); > + } > profhz = lapic_timer_hz; > lapic_timer_period = value / lapic_timer_hz; -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 19:21:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD0AD106574B; Mon, 27 Oct 2008 19:21:32 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 991E78FC16; Mon, 27 Oct 2008 19:21:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RJLJMP014395; Mon, 27 Oct 2008 15:21:25 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: "Bjoern A. Zeeb" Date: Mon, 27 Oct 2008 14:18:40 -0400 User-Agent: KMail/1.9.7 References: <200810271515.m9RFF86d042970@svn.freebsd.org> In-Reply-To: <200810271515.m9RFF86d042970@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271418.41291.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 15:21:25 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8511/Mon Oct 27 14:23:52 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184341 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 19:21:33 -0000 On Monday 27 October 2008 11:15:08 am Bjoern A. Zeeb wrote: > Author: bz > Date: Mon Oct 27 15:15:08 2008 > New Revision: 184341 > URL: http://svn.freebsd.org/changeset/base/184341 > > Log: > We do not have a libkse anymore and Mk/bsd.* does not know > about LIBKSE anymore, so s,MK_LIBKSE,MK_LIBPTHREAD,. Shouldn't you just remove it instead? These two options are now basically identical. (We probably should rename libthr to libpthread at some point.) > Modified: > head/usr.sbin/Makefile > > Modified: head/usr.sbin/Makefile > ============================================================================== > --- head/usr.sbin/Makefile Mon Oct 27 14:49:12 2008 (r184340) > +++ head/usr.sbin/Makefile Mon Oct 27 15:15:08 2008 (r184341) > @@ -292,7 +292,7 @@ _moused= moused > _vidcontrol= vidcontrol > .endif > > -.if ${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no" > +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" > .if ${MK_PPP} != "no" > _pppctl= pppctl > .endif > -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 19:21:37 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9FB3106566C; Mon, 27 Oct 2008 19:21:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6C7D78FC25; Mon, 27 Oct 2008 19:21:37 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RJLJMQ014395; Mon, 27 Oct 2008 15:21:31 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ed Schouten Date: Mon, 27 Oct 2008 14:22:06 -0400 User-Agent: KMail/1.9.7 References: <200810262155.m9QLtJG5096815@svn.freebsd.org> In-Reply-To: <200810262155.m9QLtJG5096815@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271422.06751.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 15:21:31 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8511/Mon Oct 27 14:23:52 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 19:21:38 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 19:21:51 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A0D510656AF; Mon, 27 Oct 2008 19:21:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B91618FC0C; Mon, 27 Oct 2008 19:21:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RJLJMS014395; Mon, 27 Oct 2008 15:21:42 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Sam Leffler Date: Mon, 27 Oct 2008 14:28:02 -0400 User-Agent: KMail/1.9.7 References: <200810230151.m9N1ptUe044619@svn.freebsd.org> <20081023.190942.74668946.imp@bsdimp.com> <4901F173.2070701@freebsd.org> In-Reply-To: <4901F173.2070701@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271428.03345.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 15:21:42 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8511/Mon Oct 27 14:23:52 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, marcel@freebsd.org, src-committers@freebsd.org, Warner Losh Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 19:21:51 -0000 On Friday 24 October 2008 12:01:55 pm Sam Leffler wrote: > Warner Losh wrote: > > From: Marcel Moolenaar > > Subject: svn commit: r184193 - in head/sys: arm/conf conf > > Date: Thu, 23 Oct 2008 01:51:55 +0000 (UTC) > > > > > >> Author: marcel > >> Date: Thu Oct 23 01:51:55 2008 > >> New Revision: 184193 > >> URL: http://svn.freebsd.org/changeset/base/184193 > >> > >> Log: > >> Add arm/conf/DEFAULTS and populate it with: > >> machine arm > >> device mem > >> options GEOM_BSD > >> options GEOM_MBR > >> > >> Remove the first two from all kernel configuration files and > >> change geom_bsd and geom_mbr from standard to optional. > >> > >> Added: > >> head/sys/arm/conf/DEFAULTS (contents, props changed) > >> > > > > We already have a better mechanism for including config files. We > > should be using that instead of poluting another port with the > > DEFAULTS file. > > > More importantly this change forces GEOM_BSD and GEOM_MBR on every > target platform. This is just wrong and clearly Marvel never discussed > it with anyone working on arm systems or he'd have gotten an earful. > > Marcel, please back this stuff out. Sam, I have to say that if you look at what Marcel did, he actually helped your cause. Previously, any ARM kernel you built _always_ had GEOM_BSD and GEOM_MBR in unless you hacked sys/conf/files.arm. Now you can just put 'nooptions GEOM_BSD' or 'nooptions GEOM_MBR' in your kernel config to remove them without having to hack sys/conf/files.arm. This is a step forward, not a step backwards. Of course, you are always free to add explicit GEOM_MBR/GEOM_BSD lines to the ARM configs that need it and then remove them from DEFAULTS. But this change 1) preserves people's existing kernel configs to still do the same thing as before and 2) introduces the _new_ ability to turn off GEOM_MBR/GEOM_BSD that _wasn't_ _there_ _before_ without local hacks. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 19:40:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5135C1065670; Mon, 27 Oct 2008 19:40:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (unknown [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id DD81C8FC13; Mon, 27 Oct 2008 19:40:09 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 03E841CF4D; Mon, 27 Oct 2008 20:40:09 +0100 (CET) Date: Mon, 27 Oct 2008 20:40:08 +0100 From: Ed Schouten To: John Baldwin Message-ID: <20081027194008.GO6808@hoeg.nl> References: <200810262155.m9QLtJG5096815@svn.freebsd.org> <200810271422.06751.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="D3I0HgOdJ5+6n+7I" Content-Disposition: inline In-Reply-To: <200810271422.06751.jhb@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 19:40:10 -0000 --D3I0HgOdJ5+6n+7I Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin wrote: > I would perhaps add a note that the duplicate revoke() in openpty() is on= ly to=20 > support legacy libc's with broken unlockpt() routines. We could maybe re= move=20 > the revoke()/ptsname() from openpty() on 8.x though as all 8.x machines= =20 > 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? --=20 Ed Schouten WWW: http://80386.nl/ --D3I0HgOdJ5+6n+7I Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkGGRgACgkQ52SDGA2eCwXGkACdEjdPDta9QAgbe/GalVoXQNkd GagAnAi/vQe5+IqpOAIWh9rkrmv9T81p =VVa+ -----END PGP SIGNATURE----- --D3I0HgOdJ5+6n+7I-- From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 20:10:40 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2201065675; Mon, 27 Oct 2008 20:10:40 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from sippysoft.com (gk1.360sip.com [72.236.70.240]) by mx1.freebsd.org (Postfix) with ESMTP id 737898FC24; Mon, 27 Oct 2008 20:10:40 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from [192.168.1.23] (S0106001372fd1e07.vs.shawcable.net [70.71.2.169]) (authenticated bits=0) by sippysoft.com (8.13.8/8.13.8) with ESMTP id m9RJaMtc043601 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Oct 2008 12:36:22 -0700 (PDT) (envelope-from sobomax@FreeBSD.org) Message-ID: <4906185C.1010900@FreeBSD.org> Date: Mon, 27 Oct 2008 12:37:00 -0700 From: Maxim Sobolev Organization: Sippy Software, Inc. User-Agent: Thunderbird 2.0.0.17 (Windows/20080914) MIME-Version: 1.0 To: John Baldwin References: <200810261858.m9QIw4YV091893@svn.freebsd.org> <200810271411.11813.jhb@freebsd.org> In-Reply-To: <200810271411.11813.jhb@freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 20:10:40 -0000 John Baldwin wrote: > On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote: >> Author: sobomax >> Date: Sun Oct 26 18:58:04 2008 >> New Revision: 184293 >> URL: http://svn.freebsd.org/changeset/base/184293 >> >> Log: >> Fix division by zero panic if kern.hz less than 32. >> >> MFC after: 1 day > > This is wrong. In the case you are worried about here, lapic_timer_hz is less > than 128. There is no way you are going to fire stathz 128 times per second > from a timer running at < 128 hz. You are effectively running stathz at > lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case. > Also, I would drop the extra {}'s to match style(9) as well as the existing > style of the file. It might be wrong, but it's better than division by zero panic. And it actually works, check this screenshot: http://sobomax.sippysoft.com/~sobomax/ScreenShot362.png [ssp-root@sippy ~]$ sysctl -a | grep hz kern.clockrate: { hz = 10, tick = 100000, profhz = 40, stathz = 128 } As for the style(9), I am not really sure that applies, the exact quote: Space after keywords (if, while, for, return, switch). No braces (`{' and `}') are used for control statements with zero or only a single statement unless that statement is more than a single line in which case they are permitted. Forever loops are done with for's, not while's. To me the following if: if () stmt1; else stmt2; falls into the category of statements with more than single line (3 in this case), so that {} is appropriate. So that either my change is OK, or style(9) needs to be clarified to include if/else explicitly. -Maxim From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 20:25:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E609F1065672; Mon, 27 Oct 2008 20:25:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 7378E8FC16; Mon, 27 Oct 2008 20:25:56 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RKPhrs014912; Mon, 27 Oct 2008 16:25:50 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Maxim Sobolev Date: Mon, 27 Oct 2008 16:25:36 -0400 User-Agent: KMail/1.9.7 References: <200810261858.m9QIw4YV091893@svn.freebsd.org> <200810271411.11813.jhb@freebsd.org> <4906185C.1010900@FreeBSD.org> In-Reply-To: <4906185C.1010900@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200810271625.36538.jhb@freebsd.org> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 16:25:50 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8511/Mon Oct 27 14:23:52 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 20:25:57 -0000 On Monday 27 October 2008 03:37:00 pm Maxim Sobolev wrote: > John Baldwin wrote: > > On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote: > >> Author: sobomax > >> Date: Sun Oct 26 18:58:04 2008 > >> New Revision: 184293 > >> URL: http://svn.freebsd.org/changeset/base/184293 > >> > >> Log: > >> Fix division by zero panic if kern.hz less than 32. > >> > >> MFC after: 1 day > > > > This is wrong. In the case you are worried about here, lapic_timer_hz is less > > than 128. There is no way you are going to fire stathz 128 times per second > > from a timer running at < 128 hz. You are effectively running stathz at > > lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case. > > Also, I would drop the extra {}'s to match style(9) as well as the existing > > style of the file. > > It might be wrong, but it's better than division by zero panic. And it > actually works, check this screenshot: > > http://sobomax.sippysoft.com/~sobomax/ScreenShot362.png You didn't read a word I wrote apparently. :( > [ssp-root@sippy ~]$ sysctl -a | grep hz > kern.clockrate: { hz = 10, tick = 100000, profhz = 40, stathz = 128 } Yes, so now the kernel lies to userland, congratulations. :( stathz is running at 40hz, but userland will think it runs at 128, so if any code tries to actually use stathz directly (e.g. divide some stat counter by stathz, etc.) it will compute wrong results. > As for the style(9), I am not really sure that applies, the exact quote: > > > Space after keywords (if, while, for, return, switch). No braces (`{' > and `}') are used for control statements with zero or only a single > statement unless that statement is more than a single line in which case > they are permitted. Forever loops are done with for's, not while's. > > > To me the following if: > > if () > stmt1; > else > stmt2; > > falls into the category of statements with more than single line (3 in > this case), so that {} is appropriate. So that either my change is OK, > or style(9) needs to be clarified to include if/else explicitly. 1) I disagree with your interpretation. For one, 'else' is clearly not a statement by itself. In fact, if you check the BNF in "The C Programming Language", both "if (expression) statement" and "if (expression) statement else statement" are part of the "selection-statement" definition. So rather than 'else' being a statement, the entire thing is a single 'statement'. 2) The bigger rule is to be consistent within a file. Look at the 4 lines immediately preceding your change. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 20:43:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F16C106567F; Mon, 27 Oct 2008 20:43:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id 216C68FC24; Mon, 27 Oct 2008 20:43:31 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RKhCKS015014; Mon, 27 Oct 2008 16:43:13 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Ed Schouten Date: Mon, 27 Oct 2008 16:34:02 -0400 User-Agent: KMail/1.9.7 References: <200810262155.m9QLtJG5096815@svn.freebsd.org> <200810271422.06751.jhb@freebsd.org> <20081027194008.GO6808@hoeg.nl> In-Reply-To: <20081027194008.GO6808@hoeg.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271634.03328.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 16:43:13 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8511/Mon Oct 27 14:23:52 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 20:43:31 -0000 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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:06:17 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3257D106566B; Mon, 27 Oct 2008 21:06:17 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204378FC17; Mon, 27 Oct 2008 21:06:17 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RL6G5j053077; Mon, 27 Oct 2008 21:06:16 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RL6GMu053076; Mon, 27 Oct 2008 21:06:16 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810272106.m9RL6GMu053076@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 27 Oct 2008 21:06:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184372 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:06:17 -0000 Author: sobomax Date: Mon Oct 27 21:06:16 2008 New Revision: 184372 URL: http://svn.freebsd.org/changeset/base/184372 Log: Fix r184323 - set stathz to be the same as lapic_timer_hz when lapic_timer_hz is less than 128. Remove extra {} to match existing style. Modified: head/sys/i386/i386/local_apic.c Modified: head/sys/i386/i386/local_apic.c ============================================================================== --- head/sys/i386/i386/local_apic.c Mon Oct 27 18:50:46 2008 (r184371) +++ head/sys/i386/i386/local_apic.c Mon Oct 27 21:06:16 2008 (r184372) @@ -403,11 +403,10 @@ lapic_setup_clock(void) lapic_timer_hz = hz * 2; else lapic_timer_hz = hz * 4; - if (lapic_timer_hz < 128) { - stathz = 128; - } else { + 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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:16:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9564E1065670; Mon, 27 Oct 2008 21:16:07 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 842B58FC0C; Mon, 27 Oct 2008 21:16:07 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLG7vU053331; Mon, 27 Oct 2008 21:16:07 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLG7RR053330; Mon, 27 Oct 2008 21:16:07 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200810272116.m9RLG7RR053330@svn.freebsd.org> From: Robert Noland Date: Mon, 27 Oct 2008 21:16:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184373 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:16:07 -0000 Author: rnoland Date: Mon Oct 27 21:16:07 2008 New Revision: 184373 URL: http://svn.freebsd.org/changeset/base/184373 Log: Don't report GEM capability until we actually have GEM support. This was causing the newer Intel video drivers to fail and abort X. Approved by: jhb (mentor) Modified: head/sys/dev/drm/i915_dma.c Modified: head/sys/dev/drm/i915_dma.c ============================================================================== --- head/sys/dev/drm/i915_dma.c Mon Oct 27 21:06:16 2008 (r184372) +++ head/sys/dev/drm/i915_dma.c Mon Oct 27 21:16:07 2008 (r184373) @@ -914,7 +914,8 @@ static int i915_getparam(struct drm_devi value = dev->pci_device; break; case I915_PARAM_HAS_GEM: - value = 1; + /* We need to reset this to 1 once we have GEM */ + value = 0; break; default: DRM_ERROR("Unknown parameter %d\n", param->param); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:21:36 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACBF11065679; Mon, 27 Oct 2008 21:21:36 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AA548FC25; Mon, 27 Oct 2008 21:21:36 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLLa5E053462; Mon, 27 Oct 2008 21:21:36 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLLapV053460; Mon, 27 Oct 2008 21:21:36 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200810272121.m9RLLapV053460@svn.freebsd.org> From: Robert Noland Date: Mon, 27 Oct 2008 21:21:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184374 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:21:36 -0000 Author: rnoland Date: Mon Oct 27 21:21:36 2008 New Revision: 184374 URL: http://svn.freebsd.org/changeset/base/184374 Log: Fix some fallout from the busmaster disable cleanup rs400 is just like rs480 Approved by: jhb (mentor) Obtained from: drm git Modified: head/sys/dev/drm/radeon_cp.c head/sys/dev/drm/radeon_drv.h Modified: head/sys/dev/drm/radeon_cp.c ============================================================================== --- head/sys/dev/drm/radeon_cp.c Mon Oct 27 21:16:07 2008 (r184373) +++ head/sys/dev/drm/radeon_cp.c Mon Oct 27 21:21:36 2008 (r184374) @@ -655,15 +655,14 @@ static void radeon_cp_init_ring_buffer(s RADEON_WRITE(RADEON_SCRATCH_UMSK, 0x7); /* Turn on bus mastering */ - if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS400) || - ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) || + if (((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS690) || ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS740)) { - /* rs400, rs690/rs740 */ - tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RS400_BUS_MASTER_DIS; + /* rs600/rs690/rs740 */ + tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RS600_BUS_MASTER_DIS; RADEON_WRITE(RADEON_BUS_CNTL, tmp); } else if (!(((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV380) || ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R423))) { - /* r1xx, r2xx, r300, r(v)350, r420/r481, rs480 */ + /* r1xx, r2xx, r300, r(v)350, r420/r481, rs400/rs480 */ tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RADEON_BUS_MASTER_DIS; RADEON_WRITE(RADEON_BUS_CNTL, tmp); } /* PCIE cards appears to not need this */ Modified: head/sys/dev/drm/radeon_drv.h ============================================================================== --- head/sys/dev/drm/radeon_drv.h Mon Oct 27 21:16:07 2008 (r184373) +++ head/sys/dev/drm/radeon_drv.h Mon Oct 27 21:21:36 2008 (r184374) @@ -442,11 +442,11 @@ extern int r300_do_cp_cmdbuf(struct drm_ * handling, not bus mastering itself. */ #define RADEON_BUS_CNTL 0x0030 -/* r1xx, r2xx, r300, r(v)350, r420/r481, rs480 */ +/* r1xx, r2xx, r300, r(v)350, r420/r481, rs400/rs480 */ # define RADEON_BUS_MASTER_DIS (1 << 6) -/* rs400, rs690/rs740 */ -# define RS400_BUS_MASTER_DIS (1 << 14) -# define RS400_MSI_REARM (1 << 20) +/* rs600/rs690/rs740 */ +# define RS600_BUS_MASTER_DIS (1 << 14) +# define RS600_MSI_REARM (1 << 20) /* see RS480_MSI_REARM in AIC_CNTL for rs480 */ #define RADEON_BUS_CNTL1 0x0034 @@ -939,7 +939,7 @@ extern int r300_do_cp_cmdbuf(struct drm_ #define RADEON_AIC_CNTL 0x01d0 # define RADEON_PCIGART_TRANSLATE_EN (1 << 0) -# define RS480_MSI_REARM (1 << 3) +# define RS400_MSI_REARM (1 << 3) #define RADEON_AIC_STAT 0x01d4 #define RADEON_AIC_PT_BASE 0x01d8 #define RADEON_AIC_LO_ADDR 0x01dc From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:24:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B5BD1065672; Mon, 27 Oct 2008 21:24:35 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB67F8FC16; Mon, 27 Oct 2008 21:24:34 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLOY1A053584; Mon, 27 Oct 2008 21:24:34 GMT (envelope-from rnoland@svn.freebsd.org) Received: (from rnoland@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLOYWt053583; Mon, 27 Oct 2008 21:24:34 GMT (envelope-from rnoland@svn.freebsd.org) Message-Id: <200810272124.m9RLOYWt053583@svn.freebsd.org> From: Robert Noland Date: Mon, 27 Oct 2008 21:24:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184375 - head/sys/dev/drm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:24:35 -0000 Author: rnoland Date: Mon Oct 27 21:24:34 2008 New Revision: 184375 URL: http://svn.freebsd.org/changeset/base/184375 Log: Fix error in busmaster enable logic rs400/rs480 should clear the RADEON_BUS_MASTER_DIS bit. This should get the rs485 IGP chips going again. Approved by: jhb (mentor) Obtained from: drm git master Modified: head/sys/dev/drm/radeon_cp.c Modified: head/sys/dev/drm/radeon_cp.c ============================================================================== --- head/sys/dev/drm/radeon_cp.c Mon Oct 27 21:21:36 2008 (r184374) +++ head/sys/dev/drm/radeon_cp.c Mon Oct 27 21:24:34 2008 (r184375) @@ -660,8 +660,10 @@ static void radeon_cp_init_ring_buffer(s /* rs600/rs690/rs740 */ tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RS600_BUS_MASTER_DIS; RADEON_WRITE(RADEON_BUS_CNTL, tmp); - } else if (!(((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RV380) || - ((dev_priv->flags & RADEON_FAMILY_MASK) >= CHIP_R423))) { + } else if (((dev_priv->flags & RADEON_FAMILY_MASK) <= CHIP_RV350) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_R420) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS400) || + ((dev_priv->flags & RADEON_FAMILY_MASK) == CHIP_RS480)) { /* r1xx, r2xx, r300, r(v)350, r420/r481, rs400/rs480 */ tmp = RADEON_READ(RADEON_BUS_CNTL) & ~RADEON_BUS_MASTER_DIS; RADEON_WRITE(RADEON_BUS_CNTL, tmp); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:31:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F7661065675; Mon, 27 Oct 2008 21:31:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5678FC0C; Mon, 27 Oct 2008 21:31:14 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLVERo053739; Mon, 27 Oct 2008 21:31:14 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLVERs053735; Mon, 27 Oct 2008 21:31:14 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200810272131.m9RLVERs053735@svn.freebsd.org> From: Marius Strobl Date: Mon, 27 Oct 2008 21:31:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184376 - in head/sys: sparc64/sparc64 sun4v/sun4v X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:31:14 -0000 Author: marius Date: Mon Oct 27 21:31:14 2008 New Revision: 184376 URL: http://svn.freebsd.org/changeset/base/184376 Log: - In GCC 4.2 __builtin_frame_address() was fixed to include the V9 stack bias so we no longer need to add it in db_backtrace() and stack_capture() respectively. This also reverts r182018, which kludged around the resulting unaligned access. - Sync the sun4v versions of db_trace.c and stack_machdep.c with the sparc64 ones and fix some style bugs. MFC after: 3 days Modified: head/sys/sparc64/sparc64/db_trace.c head/sys/sparc64/sparc64/stack_machdep.c head/sys/sun4v/sun4v/db_trace.c head/sys/sun4v/sun4v/stack_machdep.c Modified: head/sys/sparc64/sparc64/db_trace.c ============================================================================== --- head/sys/sparc64/sparc64/db_trace.c Mon Oct 27 21:24:34 2008 (r184375) +++ head/sys/sparc64/sparc64/db_trace.c Mon Oct 27 21:31:14 2008 (r184376) @@ -276,10 +276,9 @@ db_backtrace(struct thread *td, struct f void db_trace_self(void) { - db_expr_t addr; - addr = (db_expr_t)__builtin_frame_address(1); - db_backtrace(curthread, (struct frame *)(addr + SPOFF), -1); + db_backtrace(curthread, + (struct frame *)__builtin_frame_address(1), -1); } int @@ -288,5 +287,6 @@ db_trace_thread(struct thread *td, int c struct pcb *ctx; ctx = kdb_thr_ctx(td); - return (db_backtrace(td, (struct frame*)(ctx->pcb_sp + SPOFF), count)); + return (db_backtrace(td, + (struct frame *)(ctx->pcb_sp + SPOFF), count)); } Modified: head/sys/sparc64/sparc64/stack_machdep.c ============================================================================== --- head/sys/sparc64/sparc64/stack_machdep.c Mon Oct 27 21:24:34 2008 (r184375) +++ head/sys/sparc64/sparc64/stack_machdep.c Mon Oct 27 21:31:14 2008 (r184376) @@ -28,31 +28,24 @@ __FBSDID("$FreeBSD$"); #include -#include #include #include #include -#include -#include -#include - -#include #include #include -#include #include +static void stack_capture(struct stack *st, struct frame *fp); + static void -stack_capture(struct stack *st, uint64_t addr) +stack_capture(struct stack *st, struct frame *fp) { vm_offset_t callpc; stack_zero(st); while (1) { - addr += SPOFF; - callpc = - be64dec((void *)(addr + offsetof(struct frame, fr_pc))); + callpc = fp->fr_pc; if (!INKERNEL(callpc)) break; /* Don't bother traversing trap frames. */ @@ -63,30 +56,25 @@ stack_capture(struct stack *st, uint64_t break; if (stack_put(st, callpc) == -1) break; - addr = - be64dec((void *)(addr + offsetof(struct frame, fr_fp))); + fp = v9next_frame(fp); } } void stack_save_td(struct stack *st, struct thread *td) { - uint64_t addr; if (TD_IS_SWAPPED(td)) panic("stack_save_td: swapped"); if (TD_IS_RUNNING(td)) panic("stack_save_td: running"); - addr = td->td_pcb->pcb_sp; - stack_capture(st, addr); + stack_capture(st, (struct frame *)(td->td_pcb->pcb_sp + SPOFF)); } void stack_save(struct stack *st) { - uint64_t addr; - addr = (uint64_t)__builtin_frame_address(1); - stack_capture(st, addr); + stack_capture(st, (struct frame *)__builtin_frame_address(1)); } Modified: head/sys/sun4v/sun4v/db_trace.c ============================================================================== --- head/sys/sun4v/sun4v/db_trace.c Mon Oct 27 21:24:34 2008 (r184375) +++ head/sys/sun4v/sun4v/db_trace.c Mon Oct 27 21:31:14 2008 (r184376) @@ -22,10 +22,11 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + #include #include #include @@ -241,7 +242,6 @@ db_backtrace(struct thread *td, struct f db_addr_t pc; int trap; int user; - int quit; if (count == -1) count = 1024; @@ -249,7 +249,6 @@ db_backtrace(struct thread *td, struct f trap = 0; user = 0; npc = 0; - quit = 0; while (count-- && !user && !db_pager_quit) { pc = (db_addr_t)db_get_value((db_addr_t)&fp->fr_pc, sizeof(fp->fr_pc), FALSE); @@ -288,10 +287,9 @@ db_backtrace(struct thread *td, struct f void db_trace_self(void) { - db_expr_t addr; - addr = (db_expr_t)__builtin_frame_address(1); - db_backtrace(curthread, (struct frame *)(addr + SPOFF), -1); + db_backtrace(curthread, + (struct frame *)__builtin_frame_address(1), -1); } int @@ -300,5 +298,6 @@ db_trace_thread(struct thread *td, int c struct pcb *ctx; ctx = kdb_thr_ctx(td); - return (db_backtrace(td, (struct frame*)(ctx->pcb_sp + SPOFF), count)); + return (db_backtrace(td, + (struct frame *)(ctx->pcb_sp + SPOFF), count)); } Modified: head/sys/sun4v/sun4v/stack_machdep.c ============================================================================== --- head/sys/sun4v/sun4v/stack_machdep.c Mon Oct 27 21:24:34 2008 (r184375) +++ head/sys/sun4v/sun4v/stack_machdep.c Mon Oct 27 21:31:14 2008 (r184376) @@ -32,54 +32,43 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - -#include #include #include -#include #include +static void stack_capture(struct stack *st, struct frame *fp); + static void -stack_capture(struct stack *st, uint64_t addr) +stack_capture(struct stack *st, struct frame *fp) { - struct frame *fp; vm_offset_t callpc; stack_zero(st); - fp = (struct frame *)(addr + SPOFF); while (1) { callpc = fp->fr_pc; if (!INKERNEL(callpc)) break; if (stack_put(st, callpc) == -1) break; - fp = (struct frame *)(fp->fr_fp + SPOFF); + fp = v9next_frame(fp); } - } void stack_save_td(struct stack *st, struct thread *td) { - uint64_t addr; if (TD_IS_SWAPPED(td)) panic("stack_save_td: swapped"); if (TD_IS_RUNNING(td)) panic("stack_save_td: running"); - addr = td->td_pcb->pcb_sp; - stack_capture(st, addr); + stack_capture(st, (struct frame *)(td->td_pcb->pcb_sp + SPOFF)); } void stack_save(struct stack *st) { - uint64_t addr; - addr = (uint64_t)__builtin_frame_address(1); - stack_capture(st, addr); + stack_capture(st, (struct frame *)__builtin_frame_address(1)); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:38:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AC751065670; Mon, 27 Oct 2008 21:38:29 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id D13718FC1F; Mon, 27 Oct 2008 21:38:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1]) (authenticated bits=0) by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9RLcGSp015423; Mon, 27 Oct 2008 17:38:23 -0400 (EDT) (envelope-from jhb@freebsd.org) From: John Baldwin To: Maxim Sobolev Date: Mon, 27 Oct 2008 17:37:35 -0400 User-Agent: KMail/1.9.7 References: <200810272106.m9RL6GMu053076@svn.freebsd.org> In-Reply-To: <200810272106.m9RL6GMu053076@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810271737.36072.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]); Mon, 27 Oct 2008 17:38:23 -0400 (EDT) X-Virus-Scanned: ClamAV 0.93.1/8513/Mon Oct 27 16:06:35 2008 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.1.3 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184372 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:38:29 -0000 On Monday 27 October 2008 05:06:16 pm Maxim Sobolev wrote: > Author: sobomax > Date: Mon Oct 27 21:06:16 2008 > New Revision: 184372 > URL: http://svn.freebsd.org/changeset/base/184372 > > Log: > Fix r184323 - set stathz to be the same as lapic_timer_hz when lapic_timer_hz > is less than 128. Remove extra {} to match existing style. > > Modified: > head/sys/i386/i386/local_apic.c Thanks. Don't forget amd64 as well though. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:41:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0FD59106567F; Mon, 27 Oct 2008 21:41:56 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F271E8FC12; Mon, 27 Oct 2008 21:41:55 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLftLI053959; Mon, 27 Oct 2008 21:41:55 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLftEW053958; Mon, 27 Oct 2008 21:41:55 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810272141.m9RLftEW053958@svn.freebsd.org> From: John Baldwin Date: Mon, 27 Oct 2008 21:41:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184377 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:41:56 -0000 Author: jhb Date: Mon Oct 27 21:41:55 2008 New Revision: 184377 URL: http://svn.freebsd.org/changeset/base/184377 Log: - Whitespace fix for vop_poll. - Use the right label for vop_vptofh lock assertions so they are enforced. Modified: head/sys/kern/vnode_if.src Modified: head/sys/kern/vnode_if.src ============================================================================== --- head/sys/kern/vnode_if.src Mon Oct 27 21:31:14 2008 (r184376) +++ head/sys/kern/vnode_if.src Mon Oct 27 21:41:55 2008 (r184377) @@ -216,7 +216,7 @@ vop_ioctl { }; -%% poll vp U U U +%% poll vp U U U vop_poll { IN struct vnode *vp; @@ -589,7 +589,7 @@ vop_setlabel { }; -%% setlabel vp = = = +%% vptofh vp = = = vop_vptofh { IN struct vnode *vp; From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:45:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CDF061065673; Mon, 27 Oct 2008 21:45:18 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BC9938FC24; Mon, 27 Oct 2008 21:45:18 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLjIYZ054081; Mon, 27 Oct 2008 21:45:18 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLjIZN054080; Mon, 27 Oct 2008 21:45:18 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810272145.m9RLjIZN054080@svn.freebsd.org> From: Maxim Sobolev Date: Mon, 27 Oct 2008 21:45:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184378 - head/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:45:18 -0000 Author: sobomax Date: Mon Oct 27 21:45:18 2008 New Revision: 184378 URL: http://svn.freebsd.org/changeset/base/184378 Log: Fix r184323 - set stathz to be the same as lapic_timer_hz when lapic_timer_hz is less than 128. Remove extra {} to match existing style. Modified: head/sys/amd64/amd64/local_apic.c Modified: head/sys/amd64/amd64/local_apic.c ============================================================================== --- head/sys/amd64/amd64/local_apic.c Mon Oct 27 21:41:55 2008 (r184377) +++ head/sys/amd64/amd64/local_apic.c Mon Oct 27 21:45:18 2008 (r184378) @@ -401,11 +401,10 @@ lapic_setup_clock(void) lapic_timer_hz = hz * 2; else lapic_timer_hz = hz * 4; - if (lapic_timer_hz < 128) { - stathz = 128; - } else { + 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 owner-svn-src-all@FreeBSD.ORG Mon Oct 27 21:46:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B6151065670; Mon, 27 Oct 2008 21:46:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 49E4C8FC13; Mon, 27 Oct 2008 21:46:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RLkwI3054141; Mon, 27 Oct 2008 21:46:58 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RLkwo4054140; Mon, 27 Oct 2008 21:46:58 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200810272146.m9RLkwo4054140@svn.freebsd.org> From: Marius Strobl Date: Mon, 27 Oct 2008 21:46:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184379 - head/lib/libcam X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 21:46:58 -0000 Author: marius Date: Mon Oct 27 21:46:58 2008 New Revision: 184379 URL: http://svn.freebsd.org/changeset/base/184379 Log: Supply a valid Connect ID when issuing XPT_DEV_MATCH, which according to my reading of the CAM draft is mandatory for all CCB function calls and enforced by xptioctl() since at least r168752. Previously we happened to use 0 as the Path ID, causing the XPT_DEV_MATCH call to fail if there's no SCSI bus 0. Basically the same bug was also fixed the same way for camcontrol(8) as part of r126514. PR: 127605 Submitted by: Eygene Ryabinkin Approved by: silence from ken and scottl MFC after: 1 week Modified: head/lib/libcam/camlib.c Modified: head/lib/libcam/camlib.c ============================================================================== --- head/lib/libcam/camlib.c Mon Oct 27 21:45:18 2008 (r184378) +++ head/lib/libcam/camlib.c Mon Oct 27 21:46:58 2008 (r184379) @@ -346,6 +346,9 @@ cam_open_btl(path_id_t path_id, target_i bzero(&ccb, sizeof(union ccb)); ccb.ccb_h.func_code = XPT_DEV_MATCH; + ccb.ccb_h.path_id = CAM_XPT_PATH_ID; + ccb.ccb_h.target_id = CAM_TARGET_WILDCARD; + ccb.ccb_h.target_lun = CAM_LUN_WILDCARD; /* Setup the result buffer */ bufsize = sizeof(struct dev_match_result); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 22:10:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3A2E1065673; Mon, 27 Oct 2008 22:10:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1AA68FC13; Mon, 27 Oct 2008 22:10:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RMA1TU054619; Mon, 27 Oct 2008 22:10:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RMA11M054618; Mon, 27 Oct 2008 22:10:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <200810272210.m9RMA11M054618@svn.freebsd.org> From: Marius Strobl Date: Mon, 27 Oct 2008 22:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184380 - head/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 22:10:02 -0000 Author: marius Date: Mon Oct 27 22:10:01 2008 New Revision: 184380 URL: http://svn.freebsd.org/changeset/base/184380 Log: Do as the Linux tg3 driver does and enable MSI support also for the BCM5714 revision A0 when in a multi-port configuration and unconditionally for the remainder of the class of BCM575X and beyond chips. This was prodded by mav and is based on a suggestion and a patch submitted by jhb. Reviewed by: jhb MFC after: 2 months Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Mon Oct 27 21:46:58 2008 (r184379) +++ head/sys/dev/bge/if_bge.c Mon Oct 27 22:10:01 2008 (r184380) @@ -2328,10 +2328,11 @@ bge_can_use_msi(struct bge_softc *sc) int can_use_msi = 0; switch (sc->bge_asicrev) { + case BGE_ASICREV_BCM5714_A0: case BGE_ASICREV_BCM5714: /* - * Apparently, MSI doesn't work when this chip is configured - * in single-port mode. + * Apparently, MSI doesn't work when these chips are + * configured in single-port mode. */ if (bge_has_multiple_ports(sc)) can_use_msi = 1; @@ -2341,10 +2342,9 @@ bge_can_use_msi(struct bge_softc *sc) sc->bge_chiprev != BGE_CHIPREV_5750_BX) can_use_msi = 1; break; - case BGE_ASICREV_BCM5752: - case BGE_ASICREV_BCM5780: - can_use_msi = 1; - break; + default: + if (BGE_IS_575X_PLUS(sc)) + can_use_msi = 1; } return (can_use_msi); } From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 22:44:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C606E106566C; Mon, 27 Oct 2008 22:44:22 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B26908FC0A; Mon, 27 Oct 2008 22:44:22 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RMiMYC055358; Mon, 27 Oct 2008 22:44:22 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RMiMK6055357; Mon, 27 Oct 2008 22:44:22 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200810272244.m9RMiMK6055357@svn.freebsd.org> From: Nick Hibma Date: Mon, 27 Oct 2008 22:44:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184381 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 22:44:22 -0000 Author: n_hibma Date: Mon Oct 27 22:44:22 2008 New Revision: 184381 URL: http://svn.freebsd.org/changeset/base/184381 Log: Grab Sierra and Novatel init functions from NetBSD version of the u3g driver (rev 1.3), by Joerg Sonnenberger. Note: This change is untested as I do not own the hardware. Let me know if things work or do not work for you by sending me the output dmesg (and usbctl -f /dev/usbX if possible). Thanks. Modified: head/sys/dev/usb/u3g.c Modified: head/sys/dev/usb/u3g.c ============================================================================== --- head/sys/dev/usb/u3g.c Mon Oct 27 22:10:01 2008 (r184380) +++ head/sys/dev/usb/u3g.c Mon Oct 27 22:44:22 2008 (r184381) @@ -53,7 +53,7 @@ //#define U3G_DEBUG #ifdef U3G_DEBUG -#define DPRINTF(x...) do { if (u3gdebug) device_printf(self, ##x); } while (0) +#define DPRINTF(x...) do { if (u3gdebug) device_printf(sc->dev, ##x); } while (0) #define DPRINTFN(n, x...) do { if (u3gdebug > (n)) device_printf(self, ##x); } while (0) int u3gdebug = 1; #else @@ -118,8 +118,10 @@ struct u3g_dev_type_s { u_int8_t speed; u_int8_t flags; #define U3GFL_NONE 0x00 -#define U3GFL_HUAWEI_INIT 0x01 // Requires init (Huawei cards) -#define U3GFL_STUB_WAIT 0x02 // Device reappears after a short delay +#define U3GFL_HUAWEI_INIT 0x01 // Requires init command (Huawei cards) +#define U3GFL_SCSI_EJECT 0x02 // Requires SCSI eject command (Novatel) +#define U3GFL_SIERRA_INIT 0x04 // Requires init command (Sierra cards) +#define U3GFL_STUB_WAIT 0x08 // Device reappears after a short delay }; // Note: The entries marked with XXX should be checked for the correct speed @@ -138,22 +140,22 @@ static const struct u3g_dev_type_s u3g_d {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE }, U3GSP_HSDPA, U3GFL_HUAWEI_INIT }, {{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 }, U3GSP_HSPA, U3GFL_HUAWEI_INIT }, /* OEM: Novatel */ - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM }, U3GSP_CDMA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D }, U3GSP_HSUPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U727 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740 }, U3GSP_HSDPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740_2 }, U3GSP_HSDPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U870 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V620 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V640 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V720 }, U3GSP_UMTS, U3GFL_STUB_WAIT }, // XXX - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V740 }, U3GSP_HSDPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_X950D }, U3GSP_HSUPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_XU870 }, U3GSP_HSDPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ZEROCD }, U3GSP_HSUPA, U3GFL_STUB_WAIT }, - {{ USB_VENDOR_DELL, USB_PRODUCT_DELL_U740 }, U3GSP_HSDPA, U3GFL_STUB_WAIT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_CDMA_MODEM }, U3GSP_CDMA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ES620 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_MC950D }, U3GSP_HSUPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U720 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U727 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U740_2 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_U870 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V620 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V640 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V720 }, U3GSP_UMTS, U3GFL_SCSI_EJECT }, // XXX + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_V740 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_X950D }, U3GSP_HSUPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_XU870 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_NOVATEL, USB_PRODUCT_NOVATEL_ZEROCD }, U3GSP_HSUPA, U3GFL_SCSI_EJECT }, + {{ USB_VENDOR_DELL, USB_PRODUCT_DELL_U740 }, U3GSP_HSDPA, U3GFL_SCSI_EJECT }, /* OEM: Merlin */ {{ USB_VENDOR_MERLIN, USB_PRODUCT_MERLIN_V620 }, U3GSP_UMTS, U3GFL_NONE }, // XXX /* OEM: Sierra Wireless: */ @@ -182,6 +184,7 @@ static const struct u3g_dev_type_s u3g_d {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8775_2 }, U3GSP_UMTS, U3GFL_NONE }, // XXX {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8780 }, U3GSP_UMTS, U3GFL_NONE }, // XXX {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_MC8781 }, U3GSP_UMTS, U3GFL_NONE }, // XXX + {{ USB_VENDOR_SIERRA, USB_PRODUCT_SIERRA_TRUINSTALL }, U3GSP_UMTS, U3GFL_SIERRA_INIT }, // Sierra TruInstaller device ID }; #define u3g_lookup(v, p) ((const struct u3g_dev_type_s *)usb_lookup(u3g_devs, v, p)) @@ -423,8 +426,15 @@ MODULE_VERSION(u3g, 1); ****** Stub driver to hide devices that need to reinitialise ****** *******************************************************************/ -static void -u3gstub_huawei_init(usbd_device_handle dev) +struct u3gstub_softc { + device_t sc_dev; + usbd_device_handle sc_udev; + usbd_pipe_handle sc_pipe; + usbd_xfer_handle sc_xfer; +}; + +static int +u3gstub_huawei_init(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) { usb_device_request_t req; @@ -434,7 +444,89 @@ u3gstub_huawei_init(usbd_device_handle d USETW(req.wIndex, UHF_PORT_SUSPEND); USETW(req.wLength, 0); - (void) usbd_do_request(dev, &req, 0); /* ignore any error */ + (void) usbd_do_request(uaa->device, &req, 0); /* ignore any error */ + + return 1; +} + +static int +u3gstub_scsi_eject(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) +{ + unsigned char cmd[31]; +#ifdef U3G_DEBUG + device_t self = uaa->device; +#endif + usb_interface_descriptor_t *id; + usb_endpoint_descriptor_t *ed = NULL; + int i; + + memset(cmd, 0, sizeof(cmd)); + cmd[0] = 0x55; /* Byte 0..3: Command Block Wrapper (CBW) signature */ + cmd[1] = 0x53; + cmd[2] = 0x42; + cmd[3] = 0x43; + cmd[4] = 0x01; /* 4..7: CBW Tag, has to unique, but only a single transfer used. */ + /* 8..11: CBW Transfer Length, no data here */ + /* 12: CBW Flag: output, so 0 */ + /* 13: CBW Lun: 0 */ + /* 14: CBW Length */ + cmd[14] = 0x06; + cmd[15] = 0x1b; /* 0: SCSI START/STOP opcode */ + /* 1..3 unused */ + cmd[15+4] = 0x02; /* 4 Load/Eject command */ + /* 5: unused */ + + + /* Find the bulk-out endpoints */ + id = usbd_get_interface_descriptor(uaa->iface); + for (i = 0 ; i < id->bNumEndpoints ; i++) { + ed = usbd_interface2endpoint_descriptor(uaa->iface, i); + if (ed != NULL + && UE_GET_DIR(ed->bEndpointAddress) != UE_DIR_OUT + && (ed->bmAttributes & UE_XFERTYPE) == UE_BULK) + break; + } + + if (i == id->bNumEndpoints) + return 0; + + if (usbd_open_pipe(uaa->iface, ed->bEndpointAddress, + USBD_EXCLUSIVE_USE, &sc->sc_pipe) != USBD_NORMAL_COMPLETION) { + DPRINTF("failed to open bulk-out pipe on endpoint %d\n", + ed->bEndpointAddress); + return 0; + } + + sc->sc_xfer = usbd_alloc_xfer(uaa->device); + if (sc->sc_xfer == NULL) { + DPRINTF("failed to allocate xfer\n"); + return 0; + } + + usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe, NULL, cmd, sizeof(cmd), + 0, USBD_DEFAULT_TIMEOUT, NULL); + if (usbd_transfer(sc->sc_xfer) != USBD_NORMAL_COMPLETION) { + DPRINTF("failed to start transfer\n"); + return 0; + } + + return 1; +} + +static int +u3gstub_sierra_init(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) +{ + usb_device_request_t req; + + req.bmRequestType = UT_VENDOR; + req.bRequest = UR_SET_INTERFACE; + USETW(req.wValue, UF_DEVICE_REMOTE_WAKEUP); + USETW(req.wIndex, UHF_PORT_CONNECTION); + USETW(req.wLength, 0); + + (void) usbd_do_request(uaa->device, &req, 0); /* ignore any error */ + + return 1; } static int @@ -457,6 +549,8 @@ u3gstub_match(device_t self) return UMATCH_NONE; if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT + || u3g_dev_type->flags&U3GFL_SIERRA_INIT + || u3g_dev_type->flags&U3GFL_SCSI_EJECT || u3g_dev_type->flags&U3GFL_STUB_WAIT) { /* We assume that if the first interface is still a mass * storage device the device has not yet changed appearance. @@ -472,6 +566,7 @@ u3gstub_match(device_t self) static int u3gstub_attach(device_t self) { + struct u3gstub_softc *sc = device_get_softc(self); struct usb_attach_arg *uaa = device_get_ivars(self); const struct u3g_dev_type_s *u3g_dev_type; int i; @@ -480,16 +575,26 @@ u3gstub_attach(device_t self) device_quiet(self); #endif + sc->sc_dev = self; + sc->sc_udev = uaa->device; + if (uaa->iface) for (i = 0; i < uaa->nifaces; i++) uaa->ifaces[i] = NULL; // claim all interfaces u3g_dev_type = u3g_lookup(uaa->vendor, uaa->product); if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT) { - /* XXX Should we delay the kick? - */ DPRINTF("changing Huawei modem to modem mode\n"); - u3gstub_huawei_init(uaa->device); + if (!u3gstub_huawei_init(sc, uaa)) + return ENXIO; + } else if (u3g_dev_type->flags&U3GFL_SCSI_EJECT) { + DPRINTF("sending CD eject command to change to modem mode \n"); + if (!u3gstub_scsi_eject(sc, uaa)) + return ENXIO; + } else if (u3g_dev_type->flags&U3GFL_SIERRA_INIT) { + DPRINTF("changing Sierra modem to modem mode\n"); + if (!u3gstub_sierra_init(sc, uaa)) + return ENXIO; } else if (u3g_dev_type->flags&U3GFL_STUB_WAIT) { /* nop */ } @@ -500,6 +605,16 @@ u3gstub_attach(device_t self) static int u3gstub_detach(device_t self) { + struct u3gstub_softc *sc = device_get_softc(self); + + if (sc->sc_xfer) + usbd_free_xfer(sc->sc_xfer); + + if (sc->sc_pipe) { + usbd_abort_pipe(sc->sc_pipe); + usbd_close_pipe(sc->sc_pipe); + } + return 0; } @@ -515,7 +630,7 @@ static device_method_t u3gstub_methods[] static driver_t u3gstub_driver = { "u3gstub", u3gstub_methods, - 0 + sizeof (struct u3gstub_softc) }; DRIVER_MODULE(u3gstub, uhub, u3gstub_driver, ucom_devclass, usbd_driver_load, 0); From owner-svn-src-all@FreeBSD.ORG Mon Oct 27 23:11:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 177E81065670; Mon, 27 Oct 2008 23:11:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 050B48FC1E; Mon, 27 Oct 2008 23:11:15 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9RNBElY055930; Mon, 27 Oct 2008 23:11:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9RNBEaR055928; Mon, 27 Oct 2008 23:11:14 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200810272311.m9RNBEaR055928@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 27 Oct 2008 23:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184382 - head/sys/powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2008 23:11:15 -0000 Author: nwhitehorn Date: Mon Oct 27 23:11:14 2008 New Revision: 184382 URL: http://svn.freebsd.org/changeset/base/184382 Log: Clean up some magic numbers in the DBDMA code by replacing them with appropriately defined constants. Suggested by: gnn Modified: head/sys/powerpc/powermac/dbdma.c head/sys/powerpc/powermac/dbdmavar.h Modified: head/sys/powerpc/powermac/dbdma.c ============================================================================== --- head/sys/powerpc/powermac/dbdma.c Mon Oct 27 22:44:22 2008 (r184381) +++ head/sys/powerpc/powermac/dbdma.c Mon Oct 27 23:11:14 2008 (r184382) @@ -93,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; @@ -159,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); } @@ -170,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); } @@ -182,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); } @@ -193,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) @@ -205,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); } @@ -230,7 +234,7 @@ dbdma_set_device_status(dbdma_channel_t uint32_t control_reg; control_reg = mask; - control_reg <<= 16; + control_reg <<= DBDMA_REG_MASK_SHIFT; control_reg |= value; dbdma_write_reg(chan, CHAN_CONTROL_REG, control_reg); @@ -242,7 +246,8 @@ dbdma_set_interrupt_selector(dbdma_chann 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); } @@ -253,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); } @@ -264,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); } @@ -286,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; Modified: head/sys/powerpc/powermac/dbdmavar.h ============================================================================== --- head/sys/powerpc/powermac/dbdmavar.h Mon Oct 27 22:44:22 2008 (r184381) +++ head/sys/powerpc/powermac/dbdmavar.h Mon Oct 27 23:11:14 2008 (r184382) @@ -87,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 owner-svn-src-all@FreeBSD.ORG Tue Oct 28 03:26:25 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE19D1065681; Tue, 28 Oct 2008 03:26:25 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DCCB28FC08; Tue, 28 Oct 2008 03:26:25 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S3QPdh080878; Tue, 28 Oct 2008 03:26:25 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S3QPit080877; Tue, 28 Oct 2008 03:26:25 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200810280326.m9S3QPit080877@svn.freebsd.org> From: Peter Wemm Date: Tue, 28 Oct 2008 03:26:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184385 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 03:26:26 -0000 Author: peter Date: Tue Oct 28 03:26:25 2008 New Revision: 184385 URL: http://svn.freebsd.org/changeset/base/184385 Log: After a machine has been up for a bit more than 20 days with HZ=1000, "ticks" goes negative. This breaks the signed comparison in softclock. This causes sleep() to never wake up, tcp to stop, etc etc. This is bad(TM). Use the SEQ_LT() method from tcp's sequence number comparisons. Modified: head/sys/kern/kern_timeout.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Tue Oct 28 02:15:17 2008 (r184384) +++ head/sys/kern/kern_timeout.c Tue Oct 28 03:26:25 2008 (r184385) @@ -233,7 +233,7 @@ callout_tick(void) need_softclock = 0; cc = CC_SELF(); mtx_lock_spin_flags(&cc->cc_lock, MTX_QUIET); - for (; cc->cc_softticks < ticks; cc->cc_softticks++) { + for (; (cc->cc_softticks - ticks) < 0; cc->cc_softticks++) { bucket = cc->cc_softticks & callwheelmask; if (!TAILQ_EMPTY(&cc->cc_callwheel[bucket])) { need_softclock = 1; From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 03:47:07 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32BE4106566B; Tue, 28 Oct 2008 03:47:07 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 9ADE08FC0A; Tue, 28 Oct 2008 03:47:06 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9S3icwb007895; Mon, 27 Oct 2008 21:44:38 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 27 Oct 2008 21:45:47 -0600 (MDT) Message-Id: <20081027.214547.709404828.imp@bsdimp.com> To: xcllnt@mac.com From: "M. Warner Losh" In-Reply-To: <0BBCA616-4F9D-48D5-9360-CACA69480632@mac.com> References: <200810250618.m9P6ICWl023370@svn.freebsd.org> <20081027153345.d4e9dcad.stas@FreeBSD.org> <0BBCA616-4F9D-48D5-9360-CACA69480632@mac.com> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: stas@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 03:47:07 -0000 In message: <0BBCA616-4F9D-48D5-9360-CACA69480632@mac.com> Marcel Moolenaar writes: : : On Oct 27, 2008, at 5:33 AM, Stanislav Sedov wrote: : : >> Add a driver for flash memory that implements to the Common Flash : >> Memory Interface (CFI). The flash memory can be read and written : >> to through /dev/cfi# and an ioctl() exists so processes can read : >> the query information. : >> The driver supports the AMD and Intel command set, though only : >> the AMD command has been tested. : >> : >> Obtained from: Juniper Networks, Inc. : > : > Do you plan to introduce some infrastructure so other flash-like : > drivers could be attached (e.g. non-CFI compliant, SPI flashes, etc)? : > I've started working on such thing and don't want to do the duplicate : > works, so if you have something in mind it's time to share:-) : : I have been thinking about it, but I don't have anything : yet. As it is, I probably won't have the time for it : either. If you started with something, then feel free to : take cfi(4) and integrate it. : : Also, access to the raw flash is nice, but one typically : uses it for various things. It would be great if we had : an infrastructure in which we could allow access to the : flash through more high-level interfaces. For example: : The flash may contain U-Boot (possibly with embedded : environment), FreeBSD loader, separate blocks for U-Boot : environment, a file system, etc. Those parts of the : flash that are used for disk-like storage should ideally : be exposed through GEOM. Environments should ideally be : exposed through a standardized interface so that we only : have to write a single utility to modify environments. : Open Firmware and/or EFI environment variables could then : also be exposed through that interfaces, eliminating the : need for drivers like powermc_nvram and special-purpose : tools like nvram(8). That's the main reason I made the SPI flash support I did on the at91rm9200 be a block device: people could update the flash part w/o the need of a special program, just dd. Ditto for the i2c eeprom stuff... I tend to think that we should handle the partitioning in GEOM, with higher level things figuring the rest out. We should expose flash, and its properties upstream in GEOM, but not have a separate layer for flash ala mdt. Warner From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 04:20:10 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82C0E106566B; Tue, 28 Oct 2008 04:20:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 2B3DB8FC14; Tue, 28 Oct 2008 04:20:10 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9S4I01w008246; Mon, 27 Oct 2008 22:18:00 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Mon, 27 Oct 2008 22:19:10 -0600 (MDT) Message-Id: <20081027.221910.1508179985.imp@bsdimp.com> To: jhb@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <200810271159.31843.jhb@freebsd.org> References: <200810241031.08780.jhb@freebsd.org> <20081024.164740.74747369.imp@bsdimp.com> <200810271159.31843.jhb@freebsd.org> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Oct_27_22_19_10_2008_262)--" Content-Transfer-Encoding: 7bit Cc: danfe@FreeBSD.org, marcel@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-head@FreeBSD.org, des@des.no Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 04:20:10 -0000 ----Next_Part(Mon_Oct_27_22_19_10_2008_262)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit In message: <200810271159.31843.jhb@freebsd.org> John Baldwin writes: : On Friday 24 October 2008 06:47:40 pm Warner Losh wrote: : > From: John Baldwin : > Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf : > Date: Fri, 24 Oct 2008 10:31:07 -0400 : > : > > On Friday 24 October 2008 09:27:03 am Alexey Dokuchaev wrote: : > > > On Fri, Oct 24, 2008 at 03:26:43AM +0200, Dag-Erling Sm??rgrav wrote: : > > > > Warner Losh writes: : > > > > > We already have a better mechanism for including config files. We : > > > > > should be using that instead of poluting another port with the : > > > > > DEFAULTS file. : > > > > : > > > > Should we even have DEFAULTS files at all? IMHO they just confuse : > > > > matters by introducing "stealth" options into your config. : > > > : > > > I tend to second this. I always try to get everything possible out of : > > > my kernel to modules, and thus was surprised to see io.ko and mem.ko : > > > fail to load because they were silently included into my custom kernel. : > > > : > > > I understand that some things like 'device isa' and : > > > 'device npx' aren't really optional, but if something is useful to have, : > > > but can be loaded as a module, it belongs to GENERIC rather than : > > > DEFAULTS. Killing the latter altogether and throwing a comment that : > > > says particular option or device is mandatory in GENERIC is probably : > > > even better (and more transparent). : > > : > > The one thing I think DEFAULTS is useful for are replacing NO_FOO options : with : > > FOO options. That is, if someone wants to turn a feature on by default, : I'd : > > rather them put 'options FOO' in DEFAULTS rather than rename all the : > > #ifdef's,e tc. to '#ifndef NO_FOO'. : > : > Wouldn't it be better to move to a system where we explicitly include : > std.i386 and have them all defined there? We already encourage stuff : > like this with advice to include GENERIC with nodev... : : I wouldn't mind a std.i386, and if we make config's include keyword fall back : to 'sys/conf' for relative path name lookups if the lookup in '.' fails then : you can even put those files in sys/conf with the still-clean syntax : of 'include std.i386'. Already works that way... : However, I don't know about you, but I _never_ build a config by including : GENERIC and then weeding stuff out. Too much stuff to weed out. Once I have : a customized config for a machine I then include that in development branches : to install kernels to different directories under /boot, etc. Yea, Well, I was thinking of std.firewire, et al. Trouble is we'd then have to slice thing by bus (std.pccard, std.cardbus, std.pci, std.iic, std.usb) and by function (std.wireless, std.scsi, std.serial) which slices across different functional groups... Warner P.S. Here's a diff of something we can do today... This is just a quickie demo, not a proposed patch to the tree... It also assumes that we have nocpu defined in config, which I haven't verified. ----Next_Part(Mon_Oct_27_22_19_10_2008_262)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="defaults.diff" Index: conf/std.i386 =================================================================== --- conf/std.i386 (revision 0) +++ conf/std.i386 (revision 0) @@ -0,0 +1,33 @@ +# +# DEFAULTS -- Default kernel configuration file for FreeBSD/i386 +# +# $FreeBSD: head/sys/i386/conf/DEFAULTS 181776 2008-08-15 20:58:57Z kmacy $ + +machine i386 + +# Default CPU support +cpu I486_CPU +cpu I586_CPU +cpu I686_CPU + +# Bus support. +device isa +options ISAPNP + +# Floating point support. +device npx + +# Pseudo devices. +device mem # Memory and kernel memory devices +device io # I/O device + +# UART chips on this platform +device uart_ns8250 + +# Default partitioning schemes +options GEOM_BSD +options GEOM_MBR + +# enable support for native hardware +options NATIVE +device atpic Index: i386/conf/DEFAULTS =================================================================== --- i386/conf/DEFAULTS (revision 184107) +++ i386/conf/DEFAULTS (working copy) @@ -1,28 +0,0 @@ -# -# DEFAULTS -- Default kernel configuration file for FreeBSD/i386 -# -# $FreeBSD$ - -machine i386 - -# Bus support. -device isa -options ISAPNP - -# Floating point support. -device npx - -# Pseudo devices. -device mem # Memory and kernel memory devices -device io # I/O device - -# UART chips on this platform -device uart_ns8250 - -# Default partitioning schemes -options GEOM_BSD -options GEOM_MBR - -# enable support for native hardware -options NATIVE -device atpic Index: i386/conf/GENERIC =================================================================== --- i386/conf/GENERIC (revision 184107) +++ i386/conf/GENERIC (working copy) @@ -18,9 +18,8 @@ # # $FreeBSD$ -cpu I486_CPU -cpu I586_CPU -cpu I686_CPU +include "std.i386" + ident GENERIC # To statically compile in device wiring instead of /boot/device.hints ----Next_Part(Mon_Oct_27_22_19_10_2008_262)---- From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 04:32:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D3311065676; Tue, 28 Oct 2008 04:32:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BB518FC08; Tue, 28 Oct 2008 04:32:41 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S4WfTp082264; Tue, 28 Oct 2008 04:32:41 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S4WfbP082263; Tue, 28 Oct 2008 04:32:41 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200810280432.m9S4WfbP082263@svn.freebsd.org> From: Warner Losh Date: Tue, 28 Oct 2008 04:32:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184386 - head/sys/i386/isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 04:32:41 -0000 Author: imp Date: Tue Oct 28 04:32:41 2008 New Revision: 184386 URL: http://svn.freebsd.org/changeset/base/184386 Log: style(9) nit: remove unnecessary {} pair. Modified: head/sys/i386/isa/pmtimer.c Modified: head/sys/i386/isa/pmtimer.c ============================================================================== --- head/sys/i386/isa/pmtimer.c Tue Oct 28 03:26:25 2008 (r184385) +++ head/sys/i386/isa/pmtimer.c Tue Oct 28 04:32:41 2008 (r184386) @@ -69,9 +69,8 @@ static int pmtimer_probe(device_t dev) { - if (ISA_PNP_PROBE(device_get_parent(dev), dev, pmtimer_ids) == ENXIO) { + if (ISA_PNP_PROBE(device_get_parent(dev), dev, pmtimer_ids) == ENXIO) return (ENXIO); - } /* only one instance always */ return (device_get_unit(dev)); From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 06:00:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C97DB1065673; Tue, 28 Oct 2008 06:00:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B7C618FC14; Tue, 28 Oct 2008 06:00:13 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S60Dqn084122; Tue, 28 Oct 2008 06:00:13 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S60Dn9084121; Tue, 28 Oct 2008 06:00:13 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200810280600.m9S60Dn9084121@svn.freebsd.org> From: Ed Schouten Date: Tue, 28 Oct 2008 06:00:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184389 - head/lib/libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 06:00:13 -0000 Author: ed Date: Tue Oct 28 06:00:13 2008 New Revision: 184389 URL: http://svn.freebsd.org/changeset/base/184389 Log: Remove unneeded call to revoke() inside openpty(). As discussed on the commits list, there is no need to call revoke() inside openpty(). On RELENG_6 and RELENG_7 unlockpt() will call revoke(). On HEAD we create pseudo-terminals on demand, so there is no need to revoke the slave device node. This change should never be MFC'd, because the implementation we have in RELENG_6 and RELENG_7 should work flawlessly with older versions of libc. Discussed with: jhb MFC after: never Modified: head/lib/libutil/pty.c Modified: head/lib/libutil/pty.c ============================================================================== --- head/lib/libutil/pty.c Tue Oct 28 05:50:28 2008 (r184388) +++ head/lib/libutil/pty.c Tue Oct 28 06:00:13 2008 (r184389) @@ -47,7 +47,6 @@ static char sccsid[] = "@(#)pty.c 8.3 (B #include #include #include -#include int openpty(int *amaster, int *aslave, char *name, struct termios *termp, @@ -70,9 +69,6 @@ openpty(int *amaster, int *aslave, char if (slavename == NULL) goto bad; - if (revoke(slavename) == -1) - goto bad; - slave = open(slavename, O_RDWR); if (slave == -1) goto bad; From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 06:00:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0907D1065682; Tue, 28 Oct 2008 06:00:33 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (unknown [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id 944168FC0C; Tue, 28 Oct 2008 06:00:32 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 623FA1CF4D; Tue, 28 Oct 2008 07:00:31 +0100 (CET) Date: Tue, 28 Oct 2008 07:00:31 +0100 From: Ed Schouten To: John Baldwin Message-ID: <20081028060031.GP6808@hoeg.nl> References: <200810262155.m9QLtJG5096815@svn.freebsd.org> <200810271422.06751.jhb@freebsd.org> <20081027194008.GO6808@hoeg.nl> <200810271634.03328.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+hz2tM55CCA8Ej21" Content-Disposition: inline In-Reply-To: <200810271634.03328.jhb@freebsd.org> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r184300 - in stable/7/lib: libc/stdlib libutil X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 06:00:33 -0000 --+hz2tM55CCA8Ej21 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * John Baldwin wrote: > I would go ahead and axe it from 8 now since the safety net bits are in 6= =2Ex=20 > and 7.x already. I honestly wouldn't expect people to use openpty()'s=20 > implementation as the reference way to use posix_openpt() and friends. = =20 > Rather, I imagine they would derive that from manpages online or other=20 > sources. Done. :-) --=20 Ed Schouten WWW: http://80386.nl/ --+hz2tM55CCA8Ej21 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkGqn8ACgkQ52SDGA2eCwXJoACfcLX+yPwC6xWTNzuMa/k4y/hs bVUAn1isBttUdxToUGHRLGjQAOYl1rDi =ktuV -----END PGP SIGNATURE----- --+hz2tM55CCA8Ej21-- From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 07:19:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19FE61065679; Tue, 28 Oct 2008 07:19:16 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27]) by mx1.freebsd.org (Postfix) with ESMTP id C681C8FC23; Tue, 28 Oct 2008 07:19:15 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.str.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 7050F41C69F; Tue, 28 Oct 2008 08:00:06 +0100 (CET) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([62.111.66.27]) by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id ozyvvlXKWrfW; Tue, 28 Oct 2008 08:00:06 +0100 (CET) Received: by mail.cksoft.de (Postfix, from userid 66) id 1304841C733; Tue, 28 Oct 2008 08:00:06 +0100 (CET) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id ED79E44487F; Tue, 28 Oct 2008 06:56:23 +0000 (UTC) Date: Tue, 28 Oct 2008 06:56:23 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: John Baldwin In-Reply-To: <200810271418.41291.jhb@freebsd.org> Message-ID: <20081028065010.A2978@maildrop.int.zabbadoz.net> References: <200810271515.m9RFF86d042970@svn.freebsd.org> <200810271418.41291.jhb@freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184341 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 07:19:16 -0000 On Mon, 27 Oct 2008, John Baldwin wrote: > On Monday 27 October 2008 11:15:08 am Bjoern A. Zeeb wrote: >> Author: bz >> Date: Mon Oct 27 15:15:08 2008 >> New Revision: 184341 >> URL: http://svn.freebsd.org/changeset/base/184341 >> >> Log: >> We do not have a libkse anymore and Mk/bsd.* does not know >> about LIBKSE anymore, so s,MK_LIBKSE,MK_LIBPTHREAD,. > > Shouldn't you just remove it instead? These two options are now basically > identical. (We probably should rename libthr to libpthread at some point.) tools/build/options/WITHOUT_LIBPTHREAD still talks about kse and thus does src.conf(5). I wouldn't object to removing one of the options but according to the src.conf my bet would be LIBTHR and not LIBPTHREAD. So updating the documentation might be a good initial step as well. I have to admit that I lost track about our threading libs in different branches at one time; how many are left in head - 1 or 2? Is only libthr left and we build it as libthr and add symlinks for libpthread? >> Modified: >> head/usr.sbin/Makefile >> >> Modified: head/usr.sbin/Makefile >> > ============================================================================== >> --- head/usr.sbin/Makefile Mon Oct 27 14:49:12 2008 (r184340) >> +++ head/usr.sbin/Makefile Mon Oct 27 15:15:08 2008 (r184341) >> @@ -292,7 +292,7 @@ _moused= moused >> _vidcontrol= vidcontrol >> .endif >> >> -.if ${MK_LIBTHR} != "no" || ${MK_LIBKSE} != "no" >> +.if ${MK_LIBTHR} != "no" || ${MK_LIBPTHREAD} != "no" >> .if ${MK_PPP} != "no" >> _pppctl= pppctl >> .endif >> > > > > -- Bjoern A. Zeeb Stop bit received. Insert coin for new game. From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 08:50:10 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBD5E106566B; Tue, 28 Oct 2008 08:50:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CB3ED8FC0A; Tue, 28 Oct 2008 08:50:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S8o9a0088119; Tue, 28 Oct 2008 08:50:09 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S8o9Hr088118; Tue, 28 Oct 2008 08:50:09 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810280850.m9S8o9Hr088118@svn.freebsd.org> From: Robert Watson Date: Tue, 28 Oct 2008 08:50:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184400 - head/sys/security/mac_stub X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 08:50:11 -0000 Author: rwatson Date: Tue Oct 28 08:50:09 2008 New Revision: 184400 URL: http://svn.freebsd.org/changeset/base/184400 Log: Improve alphabetical sort order of stub entry points. Modified: head/sys/security/mac_stub/mac_stub.c Modified: head/sys/security/mac_stub/mac_stub.c ============================================================================== --- head/sys/security/mac_stub/mac_stub.c Tue Oct 28 08:41:25 2008 (r184399) +++ head/sys/security/mac_stub/mac_stub.c Tue Oct 28 08:50:09 2008 (r184400) @@ -1020,38 +1020,6 @@ stub_system_check_sysctl(struct ucred *c return (0); } -static int -stub_vnode_check_access(struct ucred *cred, struct vnode *vp, - struct label *vplabel, int acc_mode) -{ - - return (0); -} - -static int -stub_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (0); -} - -static int -stub_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel) -{ - - return (0); -} - -static int -stub_vnode_check_create(struct ucred *cred, struct vnode *dvp, - struct label *dvplabel, struct componentname *cnp, struct vattr *vap) -{ - - return (0); -} - static void stub_sysvmsg_cleanup(struct label *msglabel) { @@ -1246,6 +1214,38 @@ stub_vnode_associate_singlelabel(struct } static int +stub_vnode_check_access(struct ucred *cred, struct vnode *vp, + struct label *vplabel, int acc_mode) +{ + + return (0); +} + +static int +stub_vnode_check_chdir(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel) +{ + + return (0); +} + +static int +stub_vnode_check_chroot(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel) +{ + + return (0); +} + +static int +stub_vnode_check_create(struct ucred *cred, struct vnode *dvp, + struct label *dvplabel, struct componentname *cnp, struct vattr *vap) +{ + + return (0); +} + +static int stub_vnode_check_deleteacl(struct ucred *cred, struct vnode *vp, struct label *vplabel, acl_type_t type) { From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 09:12:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6F1D8106567D; Tue, 28 Oct 2008 09:12:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5E5CF8FC20; Tue, 28 Oct 2008 09:12:13 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S9CDjj088603; Tue, 28 Oct 2008 09:12:13 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S9CDLh088602; Tue, 28 Oct 2008 09:12:13 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810280912.m9S9CDLh088602@svn.freebsd.org> From: Robert Watson Date: Tue, 28 Oct 2008 09:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184401 - head/sys/security/mac_partition X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 09:12:13 -0000 Author: rwatson Date: Tue Oct 28 09:12:13 2008 New Revision: 184401 URL: http://svn.freebsd.org/changeset/base/184401 Log: Rename label_on_label() to partition_check(), which is far more suggestive as to its actual function. Obtained from: TrustedBSD Project MFC after: 3 days Modified: head/sys/security/mac_partition/mac_partition.c Modified: head/sys/security/mac_partition/mac_partition.c ============================================================================== --- head/sys/security/mac_partition/mac_partition.c Tue Oct 28 08:50:09 2008 (r184400) +++ head/sys/security/mac_partition/mac_partition.c Tue Oct 28 09:12:13 2008 (r184401) @@ -77,7 +77,7 @@ static int partition_slot; #define SLOT_SET(l, v) mac_label_set((l), partition_slot, (v)) static int -label_on_label(struct label *subject, struct label *object) +partition_check(struct label *subject, struct label *object) { if (partition_enabled == 0) @@ -133,7 +133,7 @@ partition_cred_check_visible(struct ucre { int error; - error = label_on_label(cr1->cr_label, cr2->cr_label); + error = partition_check(cr1->cr_label, cr2->cr_label); return (error == 0 ? 0 : ESRCH); } @@ -209,7 +209,7 @@ partition_inpcb_check_visible(struct ucr { int error; - error = label_on_label(cred->cr_label, inp->inp_cred->cr_label); + error = partition_check(cred->cr_label, inp->inp_cred->cr_label); return (error ? ENOENT : 0); } @@ -219,7 +219,7 @@ partition_proc_check_debug(struct ucred { int error; - error = label_on_label(cred->cr_label, p->p_ucred->cr_label); + error = partition_check(cred->cr_label, p->p_ucred->cr_label); return (error ? ESRCH : 0); } @@ -229,7 +229,7 @@ partition_proc_check_sched(struct ucred { int error; - error = label_on_label(cred->cr_label, p->p_ucred->cr_label); + error = partition_check(cred->cr_label, p->p_ucred->cr_label); return (error ? ESRCH : 0); } @@ -240,7 +240,7 @@ partition_proc_check_signal(struct ucred { int error; - error = label_on_label(cred->cr_label, p->p_ucred->cr_label); + error = partition_check(cred->cr_label, p->p_ucred->cr_label); return (error ? ESRCH : 0); } @@ -265,7 +265,7 @@ partition_socket_check_visible(struct uc { int error; - error = label_on_label(cred->cr_label, so->so_cred->cr_label); + error = partition_check(cred->cr_label, so->so_cred->cr_label); return (error ? ENOENT : 0); } From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 09:16:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45C98106566B; Tue, 28 Oct 2008 09:16:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 352E28FC1A; Tue, 28 Oct 2008 09:16:35 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S9GZRt088761; Tue, 28 Oct 2008 09:16:35 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S9GZDX088760; Tue, 28 Oct 2008 09:16:35 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810280916.m9S9GZDX088760@svn.freebsd.org> From: Robert Watson Date: Tue, 28 Oct 2008 09:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184402 - head/sys/security/mac_partition X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 09:16:35 -0000 Author: rwatson Date: Tue Oct 28 09:16:34 2008 New Revision: 184402 URL: http://svn.freebsd.org/changeset/base/184402 Log: Extended comment on why we consider a partition relabel request of "0" to be a no-op request, and why this might have to change if we want to allow leaving a partition someday. Obtained from: TrustedBSD Project MFC after: 3 days Modified: head/sys/security/mac_partition/mac_partition.c Modified: head/sys/security/mac_partition/mac_partition.c ============================================================================== --- head/sys/security/mac_partition/mac_partition.c Tue Oct 28 09:12:13 2008 (r184401) +++ head/sys/security/mac_partition/mac_partition.c Tue Oct 28 09:16:34 2008 (r184402) @@ -114,7 +114,13 @@ partition_cred_check_relabel(struct ucre error = 0; - /* Treat "0" as a no-op request. */ + /* + * Treat "0" as a no-op request because it reflects an unset + * partition label. If we ever want to support switching back to an + * unpartitioned state for a process, we'll need to differentiate the + * "not in a partition" and "no partition defined during internalize" + * conditions. + */ if (SLOT(newlabel) != 0) { /* * Require BSD privilege in order to change the partition. From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 09:45:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5457106569D; Tue, 28 Oct 2008 09:45:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D4CEB8FC18; Tue, 28 Oct 2008 09:45:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9S9j7fE089423; Tue, 28 Oct 2008 09:45:07 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9S9j7H8089422; Tue, 28 Oct 2008 09:45:07 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810280945.m9S9j7H8089422@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 28 Oct 2008 09:45:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184403 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 09:45:09 -0000 Author: bz Date: Tue Oct 28 09:45:07 2008 New Revision: 184403 URL: http://svn.freebsd.org/changeset/base/184403 Log: Unbreak LINT from r184381 using the correct variable in debugging DPRINTF for the device and remove dead code. Modified: head/sys/dev/usb/u3g.c Modified: head/sys/dev/usb/u3g.c ============================================================================== --- head/sys/dev/usb/u3g.c Tue Oct 28 09:16:34 2008 (r184402) +++ head/sys/dev/usb/u3g.c Tue Oct 28 09:45:07 2008 (r184403) @@ -53,7 +53,7 @@ //#define U3G_DEBUG #ifdef U3G_DEBUG -#define DPRINTF(x...) do { if (u3gdebug) device_printf(sc->dev, ##x); } while (0) +#define DPRINTF(x...) do { if (u3gdebug) device_printf(sc->sc_dev, ##x); } while (0) #define DPRINTFN(n, x...) do { if (u3gdebug > (n)) device_printf(self, ##x); } while (0) int u3gdebug = 1; #else @@ -453,9 +453,6 @@ static int u3gstub_scsi_eject(struct u3gstub_softc *sc, struct usb_attach_arg *uaa) { unsigned char cmd[31]; -#ifdef U3G_DEBUG - device_t self = uaa->device; -#endif usb_interface_descriptor_t *id; usb_endpoint_descriptor_t *ed = NULL; int i; From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 09:55:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 38E68106567E; Tue, 28 Oct 2008 09:55:34 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id C5C318FC18; Tue, 28 Oct 2008 09:55:33 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-151-199.carlnfd1.nsw.optusnet.com.au (c122-106-151-199.carlnfd1.nsw.optusnet.com.au [122.106.151.199]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id m9S9tSkT006706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Oct 2008 20:55:30 +1100 Date: Tue, 28 Oct 2008 20:55:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <200810271411.11813.jhb@freebsd.org> Message-ID: <20081028202701.E85964@delplex.bde.org> References: <200810261858.m9QIw4YV091893@svn.freebsd.org> <200810271411.11813.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, Maxim Sobolev , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 09:55:34 -0000 On Mon, 27 Oct 2008, John Baldwin wrote: > On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote: >> Author: sobomax >> Date: Sun Oct 26 18:58:04 2008 >> New Revision: 184293 >> URL: http://svn.freebsd.org/changeset/base/184293 >> >> Log: >> Fix division by zero panic if kern.hz less than 32. >> >> MFC after: 1 day > > This is wrong. In the case you are worried about here, lapic_timer_hz is less > than 128. There is no way you are going to fire stathz 128 times per second > from a timer running at < 128 hz. You are effectively running stathz at > lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case. stathz needs to be about 128 to work as intended, at least for SCHED_4BSD. > Also, I would drop the extra {}'s to match style(9) as well as the existing > style of the file. I noticed this bug in the main commit too. Also, hz = 10 cannot work on i386 without lapic_timer, since the i8254 timer has a maximum interrupt period of 55 ms and thus a minimum frequency of 18.2 Hz. Attempts to set it to 10 Hz cause similar bugs to the ones here -- the best approximation of 18.2 is (supposed to be) used, but the system is not informed about the enormous error in this approximation and still thinks that 10 Hz is used. I use hz = stathz = 100 = lapic_timer_hz on all systems with lapic timer, mainly to avoid the large changes to scale all the timers perfectly. (This makes profhz = lapic_timer_hz = 100 more broken than before. Perfect scaling rarely matters, and asynchronicity of the timers is broken anyway.) hz != 100 is still supported in a simple way that makes stathz = 100 (and lapic_timer_hz unnecessarily large -- 1000) if hz < 100: lapic_timer_hz = howmany(imax(hz, 100), hz) * hz; stathz = lapic_timer_hz / (lapic_timer_hz < 100 ? 1 : lapic_timer_hz / 100); >> --- head/sys/amd64/amd64/local_apic.c Sun Oct 26 17:20:37 2008 (r184292) >> +++ head/sys/amd64/amd64/local_apic.c Sun Oct 26 18:58:04 2008 (r184293) >> @@ -401,7 +401,11 @@ 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 = 128; >> + } else { >> + stathz = lapic_timer_hz / (lapic_timer_hz / 128); >> + } Use of if/else instead a conditional expression as in the above may be another style bug here. Bruce From owner-svn-src-all@FreeBSD.ORG Tue Oct 28 10:29:57 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 74CBF1065671; Tue, 28 Oct 2008 10:29:57 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6382C8FC29; Tue, 28 Oct 2008 10:29:57 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SATvfb091457; Tue, 28 Oct 2008 10:29:57 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SATvlh091455; Tue, 28 Oct 2008 10:29:57 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <200810281029.m9SATvlh091455@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 28 Oct 2008 10:29:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184404 - vendor/tzdata/dist X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Oct 2008 10:29:57 -0000 Author: edwin Date: Tue Oct 28 10:29:56 2008 New Revision: 184404 URL: http://svn.freebsd.org/changeset/base/184404 Log: Vendor import of tzdata2008i: - United States zone reordering and recommenting - Argentina DST changes update. Modified: vendor/tzdata/dist/southamerica vendor/tzdata/dist/zone.tab Modified: vendor/tzdata/dist/southamerica ============================================================================== --- vendor/tzdata/dist/southamerica Tue Oct 28 09:45:07 2008 (r184403) +++ vendor/tzdata/dist/southamerica Tue Oct 28 10:29:56 2008 (r184404) @@ -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: vendor/tzdata/dist/zone.tab
==============================================================================
--- vendor/tzdata/dist/zone.tab	Tue Oct 28 09:45:07 2008	(r184403)
+++ vendor/tzdata/dist/zone.tab	Tue Oct 28 10:29:56 2008	(r184404)
@@ -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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 10:35:18 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5B4DF1065673;
	Tue, 28 Oct 2008 10:35:18 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 2EEB38FC37;
	Tue, 28 Oct 2008 10:35:18 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SAZImP091619;
	Tue, 28 Oct 2008 10:35:18 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SAZI7e091618;
	Tue, 28 Oct 2008 10:35:18 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200810281035.m9SAZI7e091618@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 28 Oct 2008 10:35:18 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-vendor@freebsd.org
X-SVN-Group: vendor
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184405 - vendor/tzdata/tzdata2008i
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 10:35:18 -0000

Author: edwin
Date: Tue Oct 28 10:35:17 2008
New Revision: 184405
URL: http://svn.freebsd.org/changeset/base/184405

Log:
  Tag of tzdata2008i.

Added:
  vendor/tzdata/tzdata2008i/
     - copied from r184404, vendor/tzdata/dist/

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 10:37:40 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id D17A21065684;
	Tue, 28 Oct 2008 10:37:40 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C0A348FC34;
	Tue, 28 Oct 2008 10:37:40 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SAbe7M091728;
	Tue, 28 Oct 2008 10:37:40 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SAbepV091726;
	Tue, 28 Oct 2008 10:37:40 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200810281037.m9SAbepV091726@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 28 Oct 2008 10:37:40 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184406 - head/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 10:37:40 -0000

Author: edwin
Date: Tue Oct 28 10:37:40 2008
New Revision: 184406
URL: http://svn.freebsd.org/changeset/base/184406

Log:
  MFV of tzdata2008i.
  
  - United States zone reordering and recommenting
  - Argentina DST changes update.

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

Modified: head/share/zoneinfo/southamerica
==============================================================================
--- head/share/zoneinfo/southamerica	Tue Oct 28 10:35:17 2008	(r184405)
+++ head/share/zoneinfo/southamerica	Tue Oct 28 10:37:40 2008	(r184406)
@@ -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: head/share/zoneinfo/zone.tab
==============================================================================
--- head/share/zoneinfo/zone.tab	Tue Oct 28 10:35:17 2008	(r184405)
+++ head/share/zoneinfo/zone.tab	Tue Oct 28 10:37:40 2008	(r184406)
@@ -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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 10:42:43 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A15CF106566B;
	Tue, 28 Oct 2008 10:42:43 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from sippysoft.com (gk1.360sip.com [72.236.70.240])
	by mx1.freebsd.org (Postfix) with ESMTP id 67F178FC2B;
	Tue, 28 Oct 2008 10:42:43 +0000 (UTC)
	(envelope-from sobomax@FreeBSD.org)
Received: from [192.168.1.23] (S0106001372fd1e07.vs.shawcable.net
	[70.71.2.169]) (authenticated bits=0)
	by sippysoft.com (8.13.8/8.13.8) with ESMTP id m9SAgfeO088126
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Tue, 28 Oct 2008 03:42:42 -0700 (PDT)
	(envelope-from sobomax@FreeBSD.org)
Message-ID: <4906ECC1.4080907@FreeBSD.org>
Date: Tue, 28 Oct 2008 03:43:13 -0700
From: Maxim Sobolev 
Organization: Sippy Software, Inc.
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: Bruce Evans 
References: <200810261858.m9QIw4YV091893@svn.freebsd.org>
	<200810271411.11813.jhb@freebsd.org>
	<20081028202701.E85964@delplex.bde.org>
In-Reply-To: <20081028202701.E85964@delplex.bde.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, John Baldwin 
Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 10:42:43 -0000

Bruce Evans wrote:
> On Mon, 27 Oct 2008, John Baldwin wrote:
> 
>> On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote:
>>> Author: sobomax
>>> Date: Sun Oct 26 18:58:04 2008
>>> New Revision: 184293
>>> URL: http://svn.freebsd.org/changeset/base/184293
>>>
>>> Log:
>>>   Fix division by zero panic if kern.hz less than 32.
>>>
>>>   MFC after:    1 day
>>
>> This is wrong.  In the case you are worried about here, lapic_timer_hz 
>> is less
>> than 128.  There is no way you are going to fire stathz 128 times per 
>> second
>> from a timer running at < 128 hz.  You are effectively running stathz at
>> lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case.
> 
> stathz needs to be about 128 to work as intended, at least for SCHED_4BSD.
> 
>> Also, I would drop the extra {}'s to match style(9) as well as the 
>> existing
>> style of the file.
> 
> I noticed this bug in the main commit too.
> 
> Also, hz = 10 cannot work on i386 without lapic_timer, since the i8254 
> timer
> has a maximum interrupt period of 55 ms and thus a minimum frequency of
> 18.2 Hz.  Attempts to set it to 10 Hz cause similar bugs to the ones here
> -- the best approximation of 18.2 is (supposed to be) used, but the system
> is not informed about the enormous error in this approximation and still
> thinks that 10 Hz is used.

Does it suggest that we simply need to place lower limit of 128 on 
lapic_timer_hz and lower limit of 18 on i8254 timer? As far as I 
understand timer frequency could be higher than actual HZ (at least 
lapic code suggest that it can). Will it help or cause any other issues?

-Maxim

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 08:21:08 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 87E9B1065674;
	Tue, 28 Oct 2008 08:21:08 +0000 (UTC)
	(envelope-from stas@FreeBSD.org)
Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55])
	by mx1.freebsd.org (Postfix) with ESMTP id 375BB8FC08;
	Tue, 28 Oct 2008 08:21:07 +0000 (UTC)
	(envelope-from stas@FreeBSD.org)
Received: from [85.21.245.235] (helo=orion.SpringDaemons.com)
	by smtp.ht-systems.ru with esmtpa (Exim 4.62)
	(envelope-from )
	id 1KujEy-0004gZ-Bx; Tue, 28 Oct 2008 10:43:48 +0300
Received: from orion (localhost [127.0.0.1])
	by orion.SpringDaemons.com (Postfix) with SMTP id 1E03E39956;
	Tue, 28 Oct 2008 10:44:41 +0300 (MSK)
Date: Tue, 28 Oct 2008 10:44:35 +0300
From: Stanislav Sedov 
To: "M. Warner Losh" 
Message-Id: <20081028104435.50b3fb0f.stas@FreeBSD.org>
In-Reply-To: <20081027.214547.709404828.imp@bsdimp.com>
References: <200810250618.m9P6ICWl023370@svn.freebsd.org>
	<20081027153345.d4e9dcad.stas@FreeBSD.org>
	<0BBCA616-4F9D-48D5-9360-CACA69480632@mac.com>
	<20081027.214547.709404828.imp@bsdimp.com>
Organization: The FreeBSD Project
X-XMPP: ssedov@jabber.ru
X-Voice: +7 916 849 20 23
X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2  A385 2BF5 5993 EB26 9581
X-Mailer: carrier-pigeon
Mime-Version: 1.0
Content-Type: multipart/signed; protocol="application/pgp-signature";
	micalg="PGP-SHA1";
	boundary="Signature=_Tue__28_Oct_2008_10_44_35_+0300_em0nLI1ADPhWsZ.4"
X-Mailman-Approved-At: Tue, 28 Oct 2008 11:20:03 +0000
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, xcllnt@mac.com,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 08:21:08 -0000

--Signature=_Tue__28_Oct_2008_10_44_35_+0300_em0nLI1ADPhWsZ.4
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Mon, 27 Oct 2008 21:45:47 -0600 (MDT)
"M. Warner Losh"  mentioned:

>=20
> I tend to think that we should handle the partitioning in GEOM, with
> higher level things figuring the rest out.  We should expose flash,
> and its properties upstream in GEOM, but not have a separate layer for
> flash ala mdt.
>=20

Yeah, GEOM is the right place for this kind of stuff, indeed. Wear levering
and similar things could be provided via GEOM too, probably.

--=20
Stanislav Sedov
ST4096-RIPE

--Signature=_Tue__28_Oct_2008_10_44_35_+0300_em0nLI1ADPhWsZ.4
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (FreeBSD)

iEYEARECAAYFAkkGwugACgkQK/VZk+smlYG7sQCdE74Gk/t2Ybc2h/w9h7/RFg0/
tDMAn1+DmgQvZSkstpQAOutQxCXPo3S+
=zaPA
-----END PGP SIGNATURE-----

--Signature=_Tue__28_Oct_2008_10_44_35_+0300_em0nLI1ADPhWsZ.4--

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 11:33:07 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 12478106566C;
	Tue, 28 Oct 2008 11:33:07 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id F28E98FC0C;
	Tue, 28 Oct 2008 11:33:06 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SBX6jX092847;
	Tue, 28 Oct 2008 11:33:06 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SBX65A092836;
	Tue, 28 Oct 2008 11:33:06 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200810281133.m9SBX65A092836@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 28 Oct 2008 11:33:06 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184407 - in head/sys: kern nfsserver security/mac
	security/mac_biba security/mac_lomac security/mac_mls
	security/mac_partition security/mac_stub security/mac_test
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 11:33:07 -0000

Author: rwatson
Date: Tue Oct 28 11:33:06 2008
New Revision: 184407
URL: http://svn.freebsd.org/changeset/base/184407

Log:
  Rename three MAC entry points from _proc_ to _cred_ to reflect the fact
  that they operate directly on credentials: mac_proc_create_swapper(),
  mac_proc_create_init(), and mac_proc_associate_nfsd().  Update policies.
  
  Obtained from:	TrustedBSD Project

Modified:
  head/sys/kern/init_main.c
  head/sys/nfsserver/nfs_srvsock.c
  head/sys/security/mac/mac_framework.h
  head/sys/security/mac/mac_policy.h
  head/sys/security/mac/mac_process.c
  head/sys/security/mac_biba/mac_biba.c
  head/sys/security/mac_lomac/mac_lomac.c
  head/sys/security/mac_mls/mac_mls.c
  head/sys/security/mac_partition/mac_partition.c
  head/sys/security/mac_stub/mac_stub.c
  head/sys/security/mac_test/mac_test.c

Modified: head/sys/kern/init_main.c
==============================================================================
--- head/sys/kern/init_main.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/kern/init_main.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -456,7 +456,7 @@ proc0_init(void *dummy __unused)
 	audit_cred_kproc0(p->p_ucred);
 #endif
 #ifdef MAC
-	mac_proc_create_swapper(p->p_ucred);
+	mac_cred_create_swapper(p->p_ucred);
 #endif
 	td->td_ucred = crhold(p->p_ucred);
 
@@ -736,7 +736,7 @@ create_init(const void *udata __unused)
 	oldcred = initproc->p_ucred;
 	crcopy(newcred, oldcred);
 #ifdef MAC
-	mac_proc_create_init(newcred);
+	mac_cred_create_init(newcred);
 #endif
 #ifdef AUDIT
 	audit_cred_proc1(newcred);

Modified: head/sys/nfsserver/nfs_srvsock.c
==============================================================================
--- head/sys/nfsserver/nfs_srvsock.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/nfsserver/nfs_srvsock.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -360,7 +360,7 @@ nfs_getreq(struct nfsrv_descript *nd, st
 		nd->nd_cr->cr_groups[0] = nd->nd_cr->cr_rgid =
 		    nd->nd_cr->cr_svgid = fxdr_unsigned(gid_t, *tl++);
 #ifdef MAC
-		mac_proc_associate_nfsd(nd->nd_cr);
+		mac_cred_associate_nfsd(nd->nd_cr);
 #endif
 		len = fxdr_unsigned(int, *tl);
 		if (len < 0 || len > RPCAUTH_UNIXGIDS) {

Modified: head/sys/security/mac/mac_framework.h
==============================================================================
--- head/sys/security/mac/mac_framework.h	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac/mac_framework.h	Tue Oct 28 11:33:06 2008	(r184407)
@@ -103,8 +103,11 @@ void	mac_bpfdesc_create_mbuf(struct bpf_
 void	mac_bpfdesc_destroy(struct bpf_d *);
 void	mac_bpfdesc_init(struct bpf_d *);
 
+void	mac_cred_associate_nfsd(struct ucred *cred);
 int	mac_cred_check_visible(struct ucred *cr1, struct ucred *cr2);
 void	mac_cred_copy(struct ucred *cr1, struct ucred *cr2);
+void	mac_cred_create_init(struct ucred *cred);
+void	mac_cred_create_swapper(struct ucred *cred);
 void	mac_cred_destroy(struct ucred *);
 void	mac_cred_init(struct ucred *);
 
@@ -227,7 +230,6 @@ void	mac_posixshm_init(struct shmfd *);
 int	mac_priv_check(struct ucred *cred, int priv);
 int	mac_priv_grant(struct ucred *cred, int priv);
 
-void	mac_proc_associate_nfsd(struct ucred *cred);
 int	mac_proc_check_debug(struct ucred *cred, struct proc *p);
 int	mac_proc_check_sched(struct ucred *cred, struct proc *p);
 int	mac_proc_check_setaudit(struct ucred *cred, struct auditinfo *ai);
@@ -255,8 +257,6 @@ int	mac_proc_check_setuid(struct proc *p
 int	mac_proc_check_signal(struct ucred *cred, struct proc *p,
 	    int signum);
 int	mac_proc_check_wait(struct ucred *cred, struct proc *p);
-void	mac_proc_create_init(struct ucred *cred);
-void	mac_proc_create_swapper(struct ucred *cred);
 void	mac_proc_destroy(struct proc *);
 void	mac_proc_init(struct proc *);
 int	mac_execve_enter(struct image_params *imgp, struct mac *mac_p);

Modified: head/sys/security/mac/mac_policy.h
==============================================================================
--- head/sys/security/mac/mac_policy.h	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac/mac_policy.h	Tue Oct 28 11:33:06 2008	(r184407)
@@ -128,12 +128,15 @@ typedef void	(*mpo_bpfdesc_create_mbuf_t
 typedef void	(*mpo_bpfdesc_destroy_label_t)(struct label *label);
 typedef void	(*mpo_bpfdesc_init_label_t)(struct label *label);
 
+typedef void	(*mpo_cred_associate_nfsd_t)(struct ucred *cred);
 typedef int	(*mpo_cred_check_relabel_t)(struct ucred *cred,
 		    struct label *newlabel);
 typedef int	(*mpo_cred_check_visible_t)(struct ucred *cr1,
 		    struct ucred *cr2);
 typedef void	(*mpo_cred_copy_label_t)(struct label *src,
 		    struct label *dest);
+typedef void	(*mpo_cred_create_init_t)(struct ucred *cred);
+typedef void	(*mpo_cred_create_swapper_t)(struct ucred *cred);
 typedef void	(*mpo_cred_destroy_label_t)(struct label *label);
 typedef int	(*mpo_cred_externalize_label_t)(struct label *label,
 		    char *element_name, struct sbuf *sb, int *claimed);
@@ -345,7 +348,6 @@ typedef void	(*mpo_posixshm_init_label_t
 typedef int	(*mpo_priv_check_t)(struct ucred *cred, int priv);
 typedef int	(*mpo_priv_grant_t)(struct ucred *cred, int priv);
 
-typedef void	(*mpo_proc_associate_nfsd_t)(struct ucred *cred);
 typedef int	(*mpo_proc_check_debug_t)(struct ucred *cred,
 		    struct proc *p);
 typedef int	(*mpo_proc_check_sched_t)(struct ucred *cred,
@@ -373,8 +375,6 @@ typedef int	(*mpo_proc_check_signal_t)(s
 		    struct proc *proc, int signum);
 typedef int	(*mpo_proc_check_wait_t)(struct ucred *cred,
 		    struct proc *proc);
-typedef void	(*mpo_proc_create_init_t)(struct ucred *cred);
-typedef void	(*mpo_proc_create_swapper_t)(struct ucred *cred);
 typedef void	(*mpo_proc_destroy_label_t)(struct label *label);
 typedef void	(*mpo_proc_init_label_t)(struct label *label);
 
@@ -674,9 +674,12 @@ struct mac_policy_ops {
 	mpo_bpfdesc_destroy_label_t		mpo_bpfdesc_destroy_label;
 	mpo_bpfdesc_init_label_t		mpo_bpfdesc_init_label;
 
+	mpo_cred_associate_nfsd_t		mpo_cred_associate_nfsd;
 	mpo_cred_check_relabel_t		mpo_cred_check_relabel;
 	mpo_cred_check_visible_t		mpo_cred_check_visible;
 	mpo_cred_copy_label_t			mpo_cred_copy_label;
+	mpo_cred_create_swapper_t		mpo_cred_create_swapper;
+	mpo_cred_create_init_t			mpo_cred_create_init;
 	mpo_cred_destroy_label_t		mpo_cred_destroy_label;
 	mpo_cred_externalize_label_t		mpo_cred_externalize_label;
 	mpo_cred_init_label_t			mpo_cred_init_label;
@@ -790,7 +793,6 @@ struct mac_policy_ops {
 	mpo_priv_check_t			mpo_priv_check;
 	mpo_priv_grant_t			mpo_priv_grant;
 
-	mpo_proc_associate_nfsd_t		mpo_proc_associate_nfsd;
 	mpo_proc_check_debug_t			mpo_proc_check_debug;
 	mpo_proc_check_sched_t			mpo_proc_check_sched;
 	mpo_proc_check_setaudit_t		mpo_proc_check_setaudit;
@@ -807,8 +809,6 @@ struct mac_policy_ops {
 	mpo_proc_check_setresgid_t		mpo_proc_check_setresgid;
 	mpo_proc_check_signal_t			mpo_proc_check_signal;
 	mpo_proc_check_wait_t			mpo_proc_check_wait;
-	mpo_proc_create_swapper_t		mpo_proc_create_swapper;
-	mpo_proc_create_init_t			mpo_proc_create_init;
 	mpo_proc_destroy_label_t		mpo_proc_destroy_label;
 	mpo_proc_init_label_t			mpo_proc_init_label;
 

Modified: head/sys/security/mac/mac_process.c
==============================================================================
--- head/sys/security/mac/mac_process.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac/mac_process.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1999-2002 Robert N. M. Watson
+ * Copyright (c) 1999-2002, 2008 Robert N. M. Watson
  * Copyright (c) 2001 Ilmar S. Habibulin
  * Copyright (c) 2001-2003 Networks Associates Technology, Inc.
  * Copyright (c) 2005 Samy Al Bahra
@@ -160,25 +160,20 @@ mac_proc_destroy(struct proc *p)
 	}
 }
 
-int
-mac_cred_externalize_label(struct label *label, char *elements,
-    char *outbuf, size_t outbuflen)
-{
-	int error;
-
-	MAC_EXTERNALIZE(cred, label, elements, outbuf, outbuflen);
-
-	return (error);
-}
-
-int
-mac_cred_internalize_label(struct label *label, char *string)
+/*
+ * When a thread becomes an NFS server daemon, its credential may need to be
+ * updated to reflect this so that policies can recognize when file system
+ * operations originate from the network.
+ *
+ * At some point, it would be desirable if the credential used for each NFS
+ * RPC could be set based on the RPC context (i.e., source system, etc) to
+ * provide more fine-grained access control.
+ */
+void
+mac_cred_associate_nfsd(struct ucred *cred)
 {
-	int error;
 
-	MAC_INTERNALIZE(cred, label, string);
-
-	return (error);
+	MAC_PERFORM(cred_associate_nfsd, cred);
 }
 
 /*
@@ -186,10 +181,10 @@ mac_cred_internalize_label(struct label 
  * processes and threads are spawned.
  */
 void
-mac_proc_create_swapper(struct ucred *cred)
+mac_cred_create_swapper(struct ucred *cred)
 {
 
-	MAC_PERFORM(proc_create_swapper, cred);
+	MAC_PERFORM(cred_create_swapper, cred);
 }
 
 /*
@@ -197,26 +192,31 @@ mac_proc_create_swapper(struct ucred *cr
  * userland processes and threads are spawned.
  */
 void
-mac_proc_create_init(struct ucred *cred)
+mac_cred_create_init(struct ucred *cred)
 {
 
-	MAC_PERFORM(proc_create_init, cred);
+	MAC_PERFORM(cred_create_init, cred);
 }
 
-/*
- * When a thread becomes an NFS server daemon, its credential may need to be
- * updated to reflect this so that policies can recognize when file system
- * operations originate from the network.
- *
- * At some point, it would be desirable if the credential used for each NFS
- * RPC could be set based on the RPC context (i.e., source system, etc) to
- * provide more fine-grained access control.
- */
-void
-mac_proc_associate_nfsd(struct ucred *cred)
+int
+mac_cred_externalize_label(struct label *label, char *elements,
+    char *outbuf, size_t outbuflen)
 {
+	int error;
 
-	MAC_PERFORM(proc_associate_nfsd, cred);
+	MAC_EXTERNALIZE(cred, label, elements, outbuf, outbuflen);
+
+	return (error);
+}
+
+int
+mac_cred_internalize_label(struct label *label, char *string)
+{
+	int error;
+
+	MAC_INTERNALIZE(cred, label, string);
+
+	return (error);
 }
 
 void

Modified: head/sys/security/mac_biba/mac_biba.c
==============================================================================
--- head/sys/security/mac_biba/mac_biba.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac_biba/mac_biba.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -815,6 +815,17 @@ biba_bpfdesc_create_mbuf(struct bpf_d *d
 	biba_copy_effective(source, dest);
 }
 
+static void
+biba_cred_associate_nfsd(struct ucred *cred)
+{
+	struct mac_biba *label;
+
+	label = SLOT(cred->cr_label);
+	biba_set_effective(label, MAC_BIBA_TYPE_LOW, 0, NULL);
+	biba_set_range(label, MAC_BIBA_TYPE_LOW, 0, NULL, MAC_BIBA_TYPE_HIGH,
+	    0, NULL);
+}
+
 static int
 biba_cred_check_relabel(struct ucred *cred, struct label *newlabel)
 {
@@ -895,6 +906,30 @@ biba_cred_check_visible(struct ucred *u1
 }
 
 static void
+biba_cred_create_init(struct ucred *cred)
+{
+	struct mac_biba *dest;
+
+	dest = SLOT(cred->cr_label);
+
+	biba_set_effective(dest, MAC_BIBA_TYPE_HIGH, 0, NULL);
+	biba_set_range(dest, MAC_BIBA_TYPE_LOW, 0, NULL, MAC_BIBA_TYPE_HIGH,
+	    0, NULL);
+}
+
+static void
+biba_cred_create_swapper(struct ucred *cred)
+{
+	struct mac_biba *dest;
+
+	dest = SLOT(cred->cr_label);
+
+	biba_set_effective(dest, MAC_BIBA_TYPE_EQUAL, 0, NULL);
+	biba_set_range(dest, MAC_BIBA_TYPE_LOW, 0, NULL, MAC_BIBA_TYPE_HIGH,
+	    0, NULL);
+}
+
+static void
 biba_cred_relabel(struct ucred *cred, struct label *newlabel)
 {
 	struct mac_biba *source, *dest;
@@ -1818,17 +1853,6 @@ biba_priv_check(struct ucred *cred, int 
 	return (0);
 }
 
-static void
-biba_proc_associate_nfsd(struct ucred *cred)
-{
-	struct mac_biba *label;
-
-	label = SLOT(cred->cr_label);
-	biba_set_effective(label, MAC_BIBA_TYPE_LOW, 0, NULL);
-	biba_set_range(label, MAC_BIBA_TYPE_LOW, 0, NULL, MAC_BIBA_TYPE_HIGH,
-	    0, NULL);
-}
-
 static int
 biba_proc_check_debug(struct ucred *cred, struct proc *p)
 {
@@ -1904,30 +1928,6 @@ biba_socket_check_deliver(struct socket 
 	return (biba_equal_effective(p, s) ? 0 : EACCES);
 }
 
-static void
-biba_proc_create_init(struct ucred *cred)
-{
-	struct mac_biba *dest;
-
-	dest = SLOT(cred->cr_label);
-
-	biba_set_effective(dest, MAC_BIBA_TYPE_HIGH, 0, NULL);
-	biba_set_range(dest, MAC_BIBA_TYPE_LOW, 0, NULL, MAC_BIBA_TYPE_HIGH,
-	    0, NULL);
-}
-
-static void
-biba_proc_create_swapper(struct ucred *cred)
-{
-	struct mac_biba *dest;
-
-	dest = SLOT(cred->cr_label);
-
-	biba_set_effective(dest, MAC_BIBA_TYPE_EQUAL, 0, NULL);
-	biba_set_range(dest, MAC_BIBA_TYPE_LOW, 0, NULL, MAC_BIBA_TYPE_HIGH,
-	    0, NULL);
-}
-
 static int
 biba_socket_check_relabel(struct ucred *cred, struct socket *so,
     struct label *solabel, struct label *newlabel)
@@ -3334,9 +3334,12 @@ static struct mac_policy_ops mac_biba_op
 	.mpo_bpfdesc_destroy_label = biba_destroy_label,
 	.mpo_bpfdesc_init_label = biba_init_label,
 
+	.mpo_cred_associate_nfsd = biba_cred_associate_nfsd,
 	.mpo_cred_check_relabel = biba_cred_check_relabel,
 	.mpo_cred_check_visible = biba_cred_check_visible,
 	.mpo_cred_copy_label = biba_copy_label,
+	.mpo_cred_create_init = biba_cred_create_init,
+	.mpo_cred_create_swapper = biba_cred_create_swapper,
 	.mpo_cred_destroy_label = biba_destroy_label,
 	.mpo_cred_externalize_label = biba_externalize_label,
 	.mpo_cred_init_label = biba_init_label,
@@ -3432,12 +3435,9 @@ static struct mac_policy_ops mac_biba_op
 
 	.mpo_priv_check = biba_priv_check,
 
-	.mpo_proc_associate_nfsd = biba_proc_associate_nfsd,
 	.mpo_proc_check_debug = biba_proc_check_debug,
 	.mpo_proc_check_sched = biba_proc_check_sched,
 	.mpo_proc_check_signal = biba_proc_check_signal,
-	.mpo_proc_create_init = biba_proc_create_init,
-	.mpo_proc_create_swapper = biba_proc_create_swapper,
 
 	.mpo_socket_check_deliver = biba_socket_check_deliver,
 	.mpo_socket_check_relabel = biba_socket_check_relabel,

Modified: head/sys/security/mac_lomac/mac_lomac.c
==============================================================================
--- head/sys/security/mac_lomac/mac_lomac.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac_lomac/mac_lomac.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -993,6 +993,29 @@ lomac_cred_check_visible(struct ucred *c
 
 	return (0);
 }
+
+static void
+lomac_cred_create_init(struct ucred *cred)
+{
+	struct mac_lomac *dest;
+
+	dest = SLOT(cred->cr_label);
+
+	lomac_set_single(dest, MAC_LOMAC_TYPE_HIGH, 0);
+	lomac_set_range(dest, MAC_LOMAC_TYPE_LOW, 0, MAC_LOMAC_TYPE_HIGH, 0);
+}
+
+static void
+lomac_cred_create_swapper(struct ucred *cred)
+{
+	struct mac_lomac *dest;
+
+	dest = SLOT(cred->cr_label);
+
+	lomac_set_single(dest, MAC_LOMAC_TYPE_EQUAL, 0);
+	lomac_set_range(dest, MAC_LOMAC_TYPE_LOW, 0, MAC_LOMAC_TYPE_HIGH, 0);
+}
+
 static void
 lomac_cred_relabel(struct ucred *cred, struct label *newlabel)
 {
@@ -1885,28 +1908,6 @@ lomac_proc_check_signal(struct ucred *cr
 }
 
 static void
-lomac_proc_create_init(struct ucred *cred)
-{
-	struct mac_lomac *dest;
-
-	dest = SLOT(cred->cr_label);
-
-	lomac_set_single(dest, MAC_LOMAC_TYPE_HIGH, 0);
-	lomac_set_range(dest, MAC_LOMAC_TYPE_LOW, 0, MAC_LOMAC_TYPE_HIGH, 0);
-}
-
-static void
-lomac_proc_create_swapper(struct ucred *cred)
-{
-	struct mac_lomac *dest;
-
-	dest = SLOT(cred->cr_label);
-
-	lomac_set_single(dest, MAC_LOMAC_TYPE_EQUAL, 0);
-	lomac_set_range(dest, MAC_LOMAC_TYPE_LOW, 0, MAC_LOMAC_TYPE_HIGH, 0);
-}
-
-static void
 lomac_proc_destroy_label(struct label *label)
 {
 
@@ -2894,6 +2895,8 @@ static struct mac_policy_ops lomac_ops =
 	.mpo_cred_check_relabel = lomac_cred_check_relabel,
 	.mpo_cred_check_visible = lomac_cred_check_visible,
 	.mpo_cred_copy_label = lomac_copy_label,
+	.mpo_cred_create_swapper = lomac_cred_create_swapper,
+	.mpo_cred_create_init = lomac_cred_create_init,
 	.mpo_cred_destroy_label = lomac_destroy_label,
 	.mpo_cred_externalize_label = lomac_externalize_label,
 	.mpo_cred_init_label = lomac_init_label,
@@ -2983,8 +2986,6 @@ static struct mac_policy_ops lomac_ops =
 	.mpo_proc_check_debug = lomac_proc_check_debug,
 	.mpo_proc_check_sched = lomac_proc_check_sched,
 	.mpo_proc_check_signal = lomac_proc_check_signal,
-	.mpo_proc_create_swapper = lomac_proc_create_swapper,
-	.mpo_proc_create_init = lomac_proc_create_init,
 	.mpo_proc_destroy_label = lomac_proc_destroy_label,
 	.mpo_proc_init_label = lomac_proc_init_label,
 

Modified: head/sys/security/mac_mls/mac_mls.c
==============================================================================
--- head/sys/security/mac_mls/mac_mls.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac_mls/mac_mls.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -776,6 +776,17 @@ mls_bpfdesc_create_mbuf(struct bpf_d *d,
 	mls_copy_effective(source, dest);
 }
 
+static void
+mls_cred_associate_nfsd(struct ucred *cred) 
+{
+	struct mac_mls *label;
+
+	label = SLOT(cred->cr_label);
+	mls_set_effective(label, MAC_MLS_TYPE_LOW, 0, NULL);
+	mls_set_range(label, MAC_MLS_TYPE_LOW, 0, NULL, MAC_MLS_TYPE_HIGH, 0,
+	    NULL);
+}
+
 static int
 mls_cred_check_relabel(struct ucred *cred, struct label *newlabel)
 {
@@ -855,6 +866,30 @@ mls_cred_check_visible(struct ucred *cr1
 }
 
 static void
+mls_cred_create_init(struct ucred *cred)
+{
+	struct mac_mls *dest;
+
+	dest = SLOT(cred->cr_label);
+
+	mls_set_effective(dest, MAC_MLS_TYPE_LOW, 0, NULL);
+	mls_set_range(dest, MAC_MLS_TYPE_LOW, 0, NULL, MAC_MLS_TYPE_HIGH, 0,
+	    NULL);
+}
+
+static void
+mls_cred_create_swapper(struct ucred *cred)
+{
+	struct mac_mls *dest;
+
+	dest = SLOT(cred->cr_label);
+
+	mls_set_effective(dest, MAC_MLS_TYPE_EQUAL, 0, NULL);
+	mls_set_range(dest, MAC_MLS_TYPE_LOW, 0, NULL, MAC_MLS_TYPE_HIGH, 0,
+	    NULL);
+}
+
+static void
 mls_cred_relabel(struct ucred *cred, struct label *newlabel)
 {
 	struct mac_mls *source, *dest;
@@ -1523,17 +1558,6 @@ mls_posixsem_create(struct ucred *cred, 
 	mls_copy_effective(source, dest);
 }
 
-static void
-mls_proc_associate_nfsd(struct ucred *cred) 
-{
-	struct mac_mls *label;
-
-	label = SLOT(cred->cr_label);
-	mls_set_effective(label, MAC_MLS_TYPE_LOW, 0, NULL);
-	mls_set_range(label, MAC_MLS_TYPE_LOW, 0, NULL, MAC_MLS_TYPE_HIGH, 0,
-	    NULL);
-}
-
 static int
 mls_proc_check_debug(struct ucred *cred, struct proc *p)
 {
@@ -1594,30 +1618,6 @@ mls_proc_check_signal(struct ucred *cred
 	return (0);
 }
 
-static void
-mls_proc_create_init(struct ucred *cred)
-{
-	struct mac_mls *dest;
-
-	dest = SLOT(cred->cr_label);
-
-	mls_set_effective(dest, MAC_MLS_TYPE_LOW, 0, NULL);
-	mls_set_range(dest, MAC_MLS_TYPE_LOW, 0, NULL, MAC_MLS_TYPE_HIGH, 0,
-	    NULL);
-}
-
-static void
-mls_proc_create_swapper(struct ucred *cred)
-{
-	struct mac_mls *dest;
-
-	dest = SLOT(cred->cr_label);
-
-	mls_set_effective(dest, MAC_MLS_TYPE_EQUAL, 0, NULL);
-	mls_set_range(dest, MAC_MLS_TYPE_LOW, 0, NULL, MAC_MLS_TYPE_HIGH, 0,
-	    NULL);
-}
-
 static int
 mls_socket_check_deliver(struct socket *so, struct label *solabel,
     struct mbuf *m, struct label *mlabel)
@@ -2957,9 +2957,12 @@ static struct mac_policy_ops mls_ops =
 	.mpo_bpfdesc_destroy_label = mls_destroy_label,
 	.mpo_bpfdesc_init_label = mls_init_label,
 
+	.mpo_cred_associate_nfsd = mls_cred_associate_nfsd,
 	.mpo_cred_check_relabel = mls_cred_check_relabel,
 	.mpo_cred_check_visible = mls_cred_check_visible,
 	.mpo_cred_copy_label = mls_copy_label,
+	.mpo_cred_create_init = mls_cred_create_init,
+	.mpo_cred_create_swapper = mls_cred_create_swapper,
 	.mpo_cred_destroy_label = mls_destroy_label,
 	.mpo_cred_externalize_label = mls_externalize_label,
 	.mpo_cred_init_label = mls_init_label,
@@ -3051,12 +3054,9 @@ static struct mac_policy_ops mls_ops =
 	.mpo_posixsem_destroy_label = mls_destroy_label,
 	.mpo_posixsem_init_label = mls_init_label,
 
-	.mpo_proc_associate_nfsd = mls_proc_associate_nfsd,
 	.mpo_proc_check_debug = mls_proc_check_debug,
 	.mpo_proc_check_sched = mls_proc_check_sched,
 	.mpo_proc_check_signal = mls_proc_check_signal,
-	.mpo_proc_create_init = mls_proc_create_init,
-	.mpo_proc_create_swapper = mls_proc_create_swapper,
 
 	.mpo_socket_check_deliver = mls_socket_check_deliver,
 	.mpo_socket_check_relabel = mls_socket_check_relabel,

Modified: head/sys/security/mac_partition/mac_partition.c
==============================================================================
--- head/sys/security/mac_partition/mac_partition.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac_partition/mac_partition.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -1,5 +1,5 @@
 /*-
- * Copyright (c) 1999-2002, 2007 Robert N. M. Watson
+ * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson
  * Copyright (c) 2001-2002 Networks Associates Technology, Inc.
  * Copyright (c) 2006 SPARTA, Inc.
  * Copyright (c) 2008 Apple Inc.
@@ -155,6 +155,20 @@ partition_cred_copy_label(struct label *
 }
 
 static void
+partition_cred_create_init(struct ucred *cred)
+{
+
+	SLOT_SET(cred->cr_label, 0);
+}
+
+static void
+partition_cred_create_swapper(struct ucred *cred)
+{
+
+	SLOT_SET(cred->cr_label, 0);
+}
+
+static void
 partition_cred_destroy_label(struct label *label)
 {
 
@@ -251,20 +265,6 @@ partition_proc_check_signal(struct ucred
 	return (error ? ESRCH : 0);
 }
 
-static void
-partition_proc_create_init(struct ucred *cred)
-{
-
-	SLOT_SET(cred->cr_label, 0);
-}
-
-static void
-partition_proc_create_swapper(struct ucred *cred)
-{
-
-	SLOT_SET(cred->cr_label, 0);
-}
-
 static int
 partition_socket_check_visible(struct ucred *cred, struct socket *so,
     struct label *solabel)
@@ -300,6 +300,8 @@ static struct mac_policy_ops partition_o
 	.mpo_cred_check_relabel = partition_cred_check_relabel,
 	.mpo_cred_check_visible = partition_cred_check_visible,
 	.mpo_cred_copy_label = partition_cred_copy_label,
+	.mpo_cred_create_init = partition_cred_create_init,
+	.mpo_cred_create_swapper = partition_cred_create_swapper,
 	.mpo_cred_destroy_label = partition_cred_destroy_label,
 	.mpo_cred_externalize_label = partition_cred_externalize_label,
 	.mpo_cred_init_label = partition_cred_init_label,
@@ -309,8 +311,6 @@ static struct mac_policy_ops partition_o
 	.mpo_proc_check_debug = partition_proc_check_debug,
 	.mpo_proc_check_sched = partition_proc_check_sched,
 	.mpo_proc_check_signal = partition_proc_check_signal,
-	.mpo_proc_create_init = partition_proc_create_init,
-	.mpo_proc_create_swapper = partition_proc_create_swapper,
 	.mpo_socket_check_visible = partition_socket_check_visible,
 	.mpo_vnode_check_exec = partition_vnode_check_exec,
 };

Modified: head/sys/security/mac_stub/mac_stub.c
==============================================================================
--- head/sys/security/mac_stub/mac_stub.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac_stub/mac_stub.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -185,6 +185,12 @@ stub_bpfdesc_create_mbuf(struct bpf_d *d
 
 }
 
+static void
+stub_cred_associate_nfsd(struct ucred *cred)
+{
+
+}
+
 static int
 stub_cred_check_relabel(struct ucred *cred, struct label *newlabel)
 {
@@ -200,6 +206,18 @@ stub_cred_check_visible(struct ucred *cr
 }
 
 static void
+stub_cred_create_init(struct ucred *cred)
+{
+
+}
+
+static void
+stub_cred_create_swapper(struct ucred *cred)
+{
+
+}
+
+static void
 stub_cred_relabel(struct ucred *cred, struct label *newlabel)
 {
 
@@ -668,12 +686,6 @@ stub_priv_grant(struct ucred *cred, int 
 	return (EPERM);
 }
 
-static void
-stub_proc_associate_nfsd(struct ucred *cred)
-{
-
-}
-
 static int
 stub_proc_check_debug(struct ucred *cred, struct proc *p)
 {
@@ -789,18 +801,6 @@ stub_proc_check_wait(struct ucred *cred,
 	return (0);
 }
 
-static void
-stub_proc_create_init(struct ucred *cred)
-{
-
-}
-
-static void
-stub_proc_create_swapper(struct ucred *cred)
-{
-
-}
-
 static int
 stub_socket_check_accept(struct ucred *cred, struct socket *so,
     struct label *solabel)
@@ -1539,9 +1539,12 @@ static struct mac_policy_ops stub_ops =
 	.mpo_bpfdesc_destroy_label = stub_destroy_label,
 	.mpo_bpfdesc_init_label = stub_init_label,
 
+	.mpo_cred_associate_nfsd = stub_cred_associate_nfsd,
 	.mpo_cred_check_relabel = stub_cred_check_relabel,
 	.mpo_cred_check_visible = stub_cred_check_visible,
 	.mpo_cred_copy_label = stub_copy_label,
+	.mpo_cred_create_init = stub_cred_create_init,
+	.mpo_cred_create_swapper = stub_cred_create_swapper,
 	.mpo_cred_destroy_label = stub_destroy_label,
 	.mpo_cred_externalize_label = stub_externalize_label,
 	.mpo_cred_init_label = stub_init_label,
@@ -1655,7 +1658,6 @@ static struct mac_policy_ops stub_ops =
 	.mpo_priv_check = stub_priv_check,
 	.mpo_priv_grant = stub_priv_grant,
 
-	.mpo_proc_associate_nfsd = stub_proc_associate_nfsd,
 	.mpo_proc_check_debug = stub_proc_check_debug,
 	.mpo_proc_check_sched = stub_proc_check_sched,
 	.mpo_proc_check_setaudit = stub_proc_check_setaudit,
@@ -1672,8 +1674,6 @@ static struct mac_policy_ops stub_ops =
 	.mpo_proc_check_setuid = stub_proc_check_setuid,
 	.mpo_proc_check_signal = stub_proc_check_signal,
 	.mpo_proc_check_wait = stub_proc_check_wait,
-	.mpo_proc_create_init = stub_proc_create_init,
-	.mpo_proc_create_swapper = stub_proc_create_swapper,
 
 	.mpo_socket_check_accept = stub_socket_check_accept,
 	.mpo_socket_check_bind = stub_socket_check_bind,

Modified: head/sys/security/mac_test/mac_test.c
==============================================================================
--- head/sys/security/mac_test/mac_test.c	Tue Oct 28 10:37:40 2008	(r184406)
+++ head/sys/security/mac_test/mac_test.c	Tue Oct 28 11:33:06 2008	(r184407)
@@ -242,6 +242,24 @@ test_cred_copy_label(struct label *src, 
 	COUNTER_INC(cred_copy_label);
 }
 
+COUNTER_DECL(cred_create_init);
+static void
+test_cred_create_init(struct ucred *cred)
+{
+
+	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
+	COUNTER_INC(cred_create_init);
+}
+
+COUNTER_DECL(cred_create_swapper);
+static void
+test_cred_create_swapper(struct ucred *cred)
+{
+
+	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
+	COUNTER_INC(cred_create_swapper);
+}
+
 COUNTER_DECL(cred_destroy_label);
 static void
 test_cred_destroy_label(struct label *label)
@@ -1480,24 +1498,6 @@ test_proc_check_wait(struct ucred *cred,
 	return (0);
 }
 
-COUNTER_DECL(proc_create_init);
-static void
-test_proc_create_init(struct ucred *cred)
-{
-
-	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
-	COUNTER_INC(proc_create_init);
-}
-
-COUNTER_DECL(proc_create_swapper);
-static void
-test_proc_create_swapper(struct ucred *cred)
-{
-
-	LABEL_CHECK(cred->cr_label, MAGIC_CRED);
-	COUNTER_INC(proc_create_swapper);
-}
-
 COUNTER_DECL(proc_destroy_label);
 static void
 test_proc_destroy_label(struct label *label)
@@ -2883,6 +2883,8 @@ static struct mac_policy_ops test_ops =
 	.mpo_cred_check_relabel = test_cred_check_relabel,
 	.mpo_cred_check_visible = test_cred_check_visible,
 	.mpo_cred_copy_label = test_cred_copy_label,
+	.mpo_cred_create_init = test_cred_create_init,
+	.mpo_cred_create_swapper = test_cred_create_swapper,
 	.mpo_cred_destroy_label = test_cred_destroy_label,
 	.mpo_cred_externalize_label = test_cred_externalize_label,
 	.mpo_cred_init_label = test_cred_init_label,
@@ -3022,8 +3024,6 @@ static struct mac_policy_ops test_ops =
 	.mpo_proc_check_setuid = test_proc_check_setuid,
 	.mpo_proc_check_signal = test_proc_check_signal,
 	.mpo_proc_check_wait = test_proc_check_wait,
-	.mpo_proc_create_init = test_proc_create_init,
-	.mpo_proc_create_swapper = test_proc_create_swapper,
 	.mpo_proc_destroy_label = test_proc_destroy_label,
 	.mpo_proc_init_label = test_proc_init_label,
 

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 12:00:29 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 34B6A10656CC;
	Tue, 28 Oct 2008 12:00:29 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 24E188FC23;
	Tue, 28 Oct 2008 12:00:29 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SC0THt093349;
	Tue, 28 Oct 2008 12:00:29 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SC0TPn093348;
	Tue, 28 Oct 2008 12:00:29 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200810281200.m9SC0TPn093348@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 28 Oct 2008 12:00:29 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184408 - head/sys/ufs/ufs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 12:00:29 -0000

Author: kib
Date: Tue Oct 28 12:00:28 2008
New Revision: 184408
URL: http://svn.freebsd.org/changeset/base/184408

Log:
  Provide an explanation for getinoquota() call in the ufs_access vop.
  
  MFC after:	3 days

Modified:
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/sys/ufs/ufs/ufs_vnops.c
==============================================================================
--- head/sys/ufs/ufs/ufs_vnops.c	Tue Oct 28 11:33:06 2008	(r184407)
+++ head/sys/ufs/ufs/ufs_vnops.c	Tue Oct 28 12:00:28 2008	(r184408)
@@ -330,7 +330,18 @@ ufs_access(ap)
 			if (vp->v_mount->mnt_flag & MNT_RDONLY)
 				return (EROFS);
 #ifdef QUOTA
+			/*
+			 * Inode is accounted in the quotas only if struct
+			 * dquot is attached to it. VOP_ACCESS() is called
+			 * from vn_open_cred() and provides a convenient
+			 * point to call getinoquota().
+			 */
 			if (VOP_ISLOCKED(vp) != LK_EXCLUSIVE) {
+
+				/*
+				 * Upgrade vnode lock, since getinoquota()
+				 * requires exclusive lock to modify inode.
+				 */
 				relocked = 1;
 				vhold(vp);
 				vn_lock(vp, LK_UPGRADE | LK_RETRY);

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 12:08:36 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id EEF801065671;
	Tue, 28 Oct 2008 12:08:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DEEFC8FC0A;
	Tue, 28 Oct 2008 12:08:36 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SC8aRQ093518;
	Tue, 28 Oct 2008 12:08:36 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SC8aOA093517;
	Tue, 28 Oct 2008 12:08:36 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200810281208.m9SC8aOA093517@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 28 Oct 2008 12:08:36 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184409 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 12:08:37 -0000

Author: kib
Date: Tue Oct 28 12:08:36 2008
New Revision: 184409
URL: http://svn.freebsd.org/changeset/base/184409

Log:
  Protect check for v_pollinfo == NULL and assignment of the newly allocated
  vpollinfo with vnode interlock. Fully initialize vpollinfo before putting
  pointer to it into vp->v_pollinfo.
  
  Discussed with:	dwhite
  Tested by:	pho
  MFC after:	1 week

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Tue Oct 28 12:00:28 2008	(r184408)
+++ head/sys/kern/vfs_subr.c	Tue Oct 28 12:08:36 2008	(r184409)
@@ -113,7 +113,7 @@ static void	vgonel(struct vnode *);
 static void	vfs_knllock(void *arg);
 static void	vfs_knlunlock(void *arg);
 static int	vfs_knllocked(void *arg);
-
+static void	destroy_vpollinfo(struct vpollinfo *vi);
 
 /*
  * Enable Giant pushdown based on whether or not the vm is mpsafe in this
@@ -819,11 +819,8 @@ vdestroy(struct vnode *vp)
 #ifdef MAC
 	mac_vnode_destroy(vp);
 #endif
-	if (vp->v_pollinfo != NULL) {
-		knlist_destroy(&vp->v_pollinfo->vpi_selinfo.si_note);
-		mtx_destroy(&vp->v_pollinfo->vpi_lock);
-		uma_zfree(vnodepoll_zone, vp->v_pollinfo);
-	}
+	if (vp->v_pollinfo != NULL)
+		destroy_vpollinfo(vp->v_pollinfo);
 #ifdef INVARIANTS
 	/* XXX Elsewhere we can detect an already freed vnode via NULL v_op. */
 	vp->v_op = NULL;
@@ -3197,6 +3194,14 @@ vbusy(struct vnode *vp)
 	mtx_unlock(&vnode_free_list_mtx);
 }
 
+static void
+destroy_vpollinfo(struct vpollinfo *vi)
+{
+	knlist_destroy(&vi->vpi_selinfo.si_note);
+	mtx_destroy(&vi->vpi_lock);
+	uma_zfree(vnodepoll_zone, vi);
+}
+
 /*
  * Initalize per-vnode helper structure to hold poll-related state.
  */
@@ -3205,15 +3210,20 @@ v_addpollinfo(struct vnode *vp)
 {
 	struct vpollinfo *vi;
 
+	if (vp->v_pollinfo != NULL)
+		return;
 	vi = uma_zalloc(vnodepoll_zone, M_WAITOK);
+	mtx_init(&vi->vpi_lock, "vnode pollinfo", NULL, MTX_DEF);
+	knlist_init(&vi->vpi_selinfo.si_note, vp, vfs_knllock,
+	    vfs_knlunlock, vfs_knllocked);
+	VI_LOCK(vp);
 	if (vp->v_pollinfo != NULL) {
-		uma_zfree(vnodepoll_zone, vi);
+		VI_UNLOCK(vp);
+		destroy_vpollinfo(vi);
 		return;
 	}
 	vp->v_pollinfo = vi;
-	mtx_init(&vp->v_pollinfo->vpi_lock, "vnode pollinfo", NULL, MTX_DEF);
-	knlist_init(&vp->v_pollinfo->vpi_selinfo.si_note, vp, vfs_knllock,
-	    vfs_knlunlock, vfs_knllocked);
+	VI_UNLOCK(vp);
 }
 
 /*
@@ -3228,8 +3238,7 @@ int
 vn_pollrecord(struct vnode *vp, struct thread *td, int events)
 {
 
-	if (vp->v_pollinfo == NULL)
-		v_addpollinfo(vp);
+	v_addpollinfo(vp);
 	mtx_lock(&vp->v_pollinfo->vpi_lock);
 	if (vp->v_pollinfo->vpi_revents & events) {
 		/*
@@ -4065,8 +4074,7 @@ vfs_kqfilter(struct vop_kqfilter_args *a
 
 	kn->kn_hook = (caddr_t)vp;
 
-	if (vp->v_pollinfo == NULL)
-		v_addpollinfo(vp);
+	v_addpollinfo(vp);
 	if (vp->v_pollinfo == NULL)
 		return (ENOMEM);
 	knl = &vp->v_pollinfo->vpi_selinfo.si_note;

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 12:15:11 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6CF241065679;
	Tue, 28 Oct 2008 12:15:11 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 5CB298FC1E;
	Tue, 28 Oct 2008 12:15:11 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SCFBX7093686;
	Tue, 28 Oct 2008 12:15:11 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SCFBOr093685;
	Tue, 28 Oct 2008 12:15:11 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200810281215.m9SCFBOr093685@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 28 Oct 2008 12:15:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184410 - head/sys/gnu/fs/ext2fs
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 12:15:11 -0000

Author: kib
Date: Tue Oct 28 12:15:11 2008
New Revision: 184410
URL: http://svn.freebsd.org/changeset/base/184410

Log:
  Garbage-collect ext2_kqfilter vop that is now a copy of vop_stdkqfilter().

Modified:
  head/sys/gnu/fs/ext2fs/ext2_vnops.c

Modified: head/sys/gnu/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/gnu/fs/ext2fs/ext2_vnops.c	Tue Oct 28 12:08:36 2008	(r184409)
+++ head/sys/gnu/fs/ext2fs/ext2_vnops.c	Tue Oct 28 12:15:11 2008	(r184410)
@@ -90,7 +90,6 @@ static vop_close_t	ext2_close;
 static vop_create_t	ext2_create;
 static vop_fsync_t	ext2_fsync;
 static vop_getattr_t	ext2_getattr;
-static vop_kqfilter_t	ext2_kqfilter;
 static vop_link_t	ext2_link;
 static vop_mkdir_t	ext2_mkdir;
 static vop_mknod_t	ext2_mknod;
@@ -109,10 +108,6 @@ static vop_write_t	ext2_write;
 static vop_vptofh_t	ext2_vptofh;
 static vop_close_t	ext2fifo_close;
 static vop_kqfilter_t	ext2fifo_kqfilter;
-static int filt_ext2read(struct knote *kn, long hint);
-static int filt_ext2write(struct knote *kn, long hint);
-static int filt_ext2vnode(struct knote *kn, long hint);
-static void filt_ext2detach(struct knote *kn);
 
 /* Global vfs data structures for ext2. */
 struct vop_vector ext2_vnodeops = {
@@ -132,7 +127,6 @@ struct vop_vector ext2_vnodeops = {
 	.vop_open =		ext2_open,
 	.vop_pathconf =		ext2_pathconf,
 	.vop_poll =		vop_stdpoll,
-	.vop_kqfilter =		ext2_kqfilter,
 	.vop_print =		ext2_print,
 	.vop_read =		ext2_read,
 	.vop_readdir =		ext2_readdir,
@@ -1475,7 +1469,7 @@ ext2fifo_kqfilter(ap)
 
 	error = fifo_specops.vop_kqfilter(ap);
 	if (error)
-		error = ext2_kqfilter(ap);
+		error = vfs_kqfilter(ap);
 	return (error);
 }
 
@@ -1650,103 +1644,3 @@ bad:
 	vput(tvp);
 	return (error);
 }
-
-static struct filterops ext2read_filtops = 
-	{ 1, NULL, filt_ext2detach, filt_ext2read };
-static struct filterops ext2write_filtops = 
-	{ 1, NULL, filt_ext2detach, filt_ext2write };
-static struct filterops ext2vnode_filtops = 
-	{ 1, NULL, filt_ext2detach, filt_ext2vnode };
-
-static int
-ext2_kqfilter(ap)
-	struct vop_kqfilter_args /* {
-		struct vnode *a_vp;
-		struct knote *a_kn;
-	} */ *ap;
-{
-	struct vnode *vp = ap->a_vp;
-	struct knote *kn = ap->a_kn;
-
-	switch (kn->kn_filter) {
-	case EVFILT_READ:
-		kn->kn_fop = &ext2read_filtops;
-		break;
-	case EVFILT_WRITE:
-		kn->kn_fop = &ext2write_filtops;
-		break;
-	case EVFILT_VNODE:
-		kn->kn_fop = &ext2vnode_filtops;
-		break;
-	default:
-		return (1);
-	}
-
-	kn->kn_hook = (caddr_t)vp;
-
-	if (vp->v_pollinfo == NULL)
-		v_addpollinfo(vp);
-	if (vp->v_pollinfo == NULL)
-		return ENOMEM;
-	knlist_add(&vp->v_pollinfo->vpi_selinfo.si_note, kn, 0);
-
-	return (0);
-}
-
-static void
-filt_ext2detach(struct knote *kn)
-{
-	struct vnode *vp = (struct vnode *)kn->kn_hook;
-
-	KASSERT(vp->v_pollinfo != NULL, ("Mising v_pollinfo"));
-	knlist_remove(&vp->v_pollinfo->vpi_selinfo.si_note, kn, 0);
-}
-
-/*ARGSUSED*/
-static int
-filt_ext2read(struct knote *kn, long hint)
-{
-	struct vnode *vp = (struct vnode *)kn->kn_hook;
-	struct inode *ip = VTOI(vp);
-
-	/*
-	 * filesystem is gone, so set the EOF flag and schedule 
-	 * the knote for deletion.
-	 */
-	if (hint == NOTE_REVOKE) {
-		kn->kn_flags |= (EV_EOF | EV_ONESHOT);
-		return (1);
-	}
-
-        kn->kn_data = ip->i_size - kn->kn_fp->f_offset;
-        return (kn->kn_data != 0);
-}
-
-/*ARGSUSED*/
-static int
-filt_ext2write(struct knote *kn, long hint)
-{
-
-	/*
-	 * filesystem is gone, so set the EOF flag and schedule 
-	 * the knote for deletion.
-	 */
-	if (hint == NOTE_REVOKE)
-		kn->kn_flags |= (EV_EOF | EV_ONESHOT);
-
-        kn->kn_data = 0;
-        return (1);
-}
-
-static int
-filt_ext2vnode(struct knote *kn, long hint)
-{
-
-	if (kn->kn_sfflags & hint)
-		kn->kn_fflags |= hint;
-	if (hint == NOTE_REVOKE) {
-		kn->kn_flags |= EV_EOF;
-		return (1);
-	}
-	return (kn->kn_fflags != 0);
-}

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 12:22:34 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 43B5B1065671;
	Tue, 28 Oct 2008 12:22:34 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 33A828FC2C;
	Tue, 28 Oct 2008 12:22:34 +0000 (UTC) (envelope-from kib@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SCMYgi093840;
	Tue, 28 Oct 2008 12:22:34 GMT (envelope-from kib@svn.freebsd.org)
Received: (from kib@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SCMY9x093839;
	Tue, 28 Oct 2008 12:22:34 GMT (envelope-from kib@svn.freebsd.org)
Message-Id: <200810281222.m9SCMY9x093839@svn.freebsd.org>
From: Konstantin Belousov 
Date: Tue, 28 Oct 2008 12:22:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184411 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 12:22:34 -0000

Author: kib
Date: Tue Oct 28 12:22:33 2008
New Revision: 184411
URL: http://svn.freebsd.org/changeset/base/184411

Log:
  Style return statements in vn_pollrecord().

Modified:
  head/sys/kern/vfs_subr.c

Modified: head/sys/kern/vfs_subr.c
==============================================================================
--- head/sys/kern/vfs_subr.c	Tue Oct 28 12:15:11 2008	(r184410)
+++ head/sys/kern/vfs_subr.c	Tue Oct 28 12:22:33 2008	(r184411)
@@ -3252,12 +3252,12 @@ vn_pollrecord(struct vnode *vp, struct t
 		vp->v_pollinfo->vpi_revents &= ~events;
 
 		mtx_unlock(&vp->v_pollinfo->vpi_lock);
-		return events;
+		return (events);
 	}
 	vp->v_pollinfo->vpi_events |= events;
 	selrecord(td, &vp->v_pollinfo->vpi_selinfo);
 	mtx_unlock(&vp->v_pollinfo->vpi_lock);
-	return 0;
+	return (0);
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 12:49:07 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E310A106566B;
	Tue, 28 Oct 2008 12:49:07 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D2C958FC17;
	Tue, 28 Oct 2008 12:49:07 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SCn7H9094377;
	Tue, 28 Oct 2008 12:49:07 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SCn7Q9094373;
	Tue, 28 Oct 2008 12:49:07 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200810281249.m9SCn7Q9094373@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 28 Oct 2008 12:49:07 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184412 - in head/sys/security: mac mac_lomac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 12:49:08 -0000

Author: rwatson
Date: Tue Oct 28 12:49:07 2008
New Revision: 184412
URL: http://svn.freebsd.org/changeset/base/184412

Log:
  Rename mac_cred_mmapped_drop_perms(), which revokes access to virtual
  memory mappings when the MAC label on a process changes, to
  mac_proc_vm_revoke(),
  
  It now also acquires its own credential reference directly from the
  affected process rather than accepting one passed by the the caller,
  simplifying the API and consumer code.
  
  Obtained from:	TrustedBSD Project

Modified:
  head/sys/security/mac/mac_framework.h
  head/sys/security/mac/mac_process.c
  head/sys/security/mac/mac_syscalls.c
  head/sys/security/mac_lomac/mac_lomac.c

Modified: head/sys/security/mac/mac_framework.h
==============================================================================
--- head/sys/security/mac/mac_framework.h	Tue Oct 28 12:22:33 2008	(r184411)
+++ head/sys/security/mac/mac_framework.h	Tue Oct 28 12:49:07 2008	(r184412)
@@ -259,6 +259,7 @@ int	mac_proc_check_signal(struct ucred *
 int	mac_proc_check_wait(struct ucred *cred, struct proc *p);
 void	mac_proc_destroy(struct proc *);
 void	mac_proc_init(struct proc *);
+void	mac_proc_vm_revoke(struct thread *td);
 int	mac_execve_enter(struct image_params *imgp, struct mac *mac_p);
 void	mac_execve_exit(struct image_params *imgp);
 void	mac_execve_interpreter_enter(struct vnode *interpvp,
@@ -434,8 +435,6 @@ int	mac_vnode_execve_will_transition(str
 void	mac_vnode_relabel(struct ucred *cred, struct vnode *vp,
 	    struct label *newlabel);
 
-void	mac_cred_mmapped_drop_perms(struct thread *td, struct ucred *cred);
-
 /*
  * Calls to help various file systems implement labeling functionality using
  * their existing EA implementation.

Modified: head/sys/security/mac/mac_process.c
==============================================================================
--- head/sys/security/mac/mac_process.c	Tue Oct 28 12:22:33 2008	(r184411)
+++ head/sys/security/mac/mac_process.c	Tue Oct 28 12:49:07 2008	(r184412)
@@ -81,7 +81,7 @@ SYSCTL_INT(_security_mac, OID_AUTO, mmap
     &mac_mmap_revocation_via_cow, 0, "Revoke mmap access to files via "
     "copy-on-write semantics, or by removing all write access");
 
-static void	mac_cred_mmapped_drop_perms_recurse(struct thread *td,
+static void	mac_proc_vm_revoke_recurse(struct thread *td,
 		    struct ucred *cred, struct vm_map *map);
 
 struct label *
@@ -314,13 +314,20 @@ mac_execve_interpreter_exit(struct label
  * The process lock is not held here.
  */
 void
-mac_cred_mmapped_drop_perms(struct thread *td, struct ucred *cred)
+mac_proc_vm_revoke(struct thread *td)
 {
+	struct ucred *cred;
+
+	PROC_LOCK(td->td_proc);
+	cred = crhold(td->td_proc->p_ucred);
+	PROC_UNLOCK(td->td_proc);
 
 	/* XXX freeze all other threads */
-	mac_cred_mmapped_drop_perms_recurse(td, cred,
+	mac_proc_vm_revoke_recurse(td, cred,
 	    &td->td_proc->p_vmspace->vm_map);
 	/* XXX allow other threads to continue */
+
+	crfree(cred);
 }
 
 static __inline const char *
@@ -348,7 +355,7 @@ prot2str(vm_prot_t prot)
 }
 
 static void
-mac_cred_mmapped_drop_perms_recurse(struct thread *td, struct ucred *cred,
+mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred,
     struct vm_map *map)
 {
 	struct vm_map_entry *vme;
@@ -365,7 +372,7 @@ mac_cred_mmapped_drop_perms_recurse(stru
 	vm_map_lock_read(map);
 	for (vme = map->header.next; vme != &map->header; vme = vme->next) {
 		if (vme->eflags & MAP_ENTRY_IS_SUB_MAP) {
-			mac_cred_mmapped_drop_perms_recurse(td, cred,
+			mac_proc_vm_revoke_recurse(td, cred,
 			    vme->object.sub_map);
 			continue;
 		}

Modified: head/sys/security/mac/mac_syscalls.c
==============================================================================
--- head/sys/security/mac/mac_syscalls.c	Tue Oct 28 12:22:33 2008	(r184411)
+++ head/sys/security/mac/mac_syscalls.c	Tue Oct 28 12:49:07 2008	(r184412)
@@ -203,17 +203,9 @@ __mac_set_proc(struct thread *td, struct
 	mac_cred_relabel(newcred, intlabel);
 	p->p_ucred = newcred;
 
-	/*
-	 * Grab additional reference for use while revoking mmaps, prior to
-	 * releasing the proc lock and sharing the cred.
-	 */
-	crhold(newcred);
 	PROC_UNLOCK(p);
-
-	mac_cred_mmapped_drop_perms(td, newcred);
-
-	crfree(newcred);	/* Free revocation reference. */
 	crfree(oldcred);
+	mac_proc_vm_revoke(td);
 
 out:
 	mac_cred_label_free(intlabel);

Modified: head/sys/security/mac_lomac/mac_lomac.c
==============================================================================
--- head/sys/security/mac_lomac/mac_lomac.c	Tue Oct 28 12:22:33 2008	(r184411)
+++ head/sys/security/mac_lomac/mac_lomac.c	Tue Oct 28 12:49:07 2008	(r184412)
@@ -2225,9 +2225,9 @@ lomac_thread_userret(struct thread *td)
 		mtx_unlock(&subj->mtx);
 		newcred = crget();
 		/*
-		 * Prevent a lock order reversal in
-		 * mac_cred_mmapped_drop_perms; ideally, the other user of
-		 * subj->mtx wouldn't be holding Giant.
+		 * Prevent a lock order reversal in mac_proc_vm_revoke;
+		 * ideally, the other user of subj->mtx wouldn't be holding
+		 * Giant.
 		 */
 		mtx_lock(&Giant);
 		PROC_LOCK(p);
@@ -2250,7 +2250,7 @@ lomac_thread_userret(struct thread *td)
 		mtx_unlock(&subj->mtx);
 		PROC_UNLOCK(p);
 		if (dodrop)
-			mac_cred_mmapped_drop_perms(curthread, newcred);
+			mac_proc_vm_revoke(curthread);
 		mtx_unlock(&Giant);
 	} else {
 		mtx_unlock(&subj->mtx);

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 13:44:12 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E62F41065674;
	Tue, 28 Oct 2008 13:44:12 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D27578FC21;
	Tue, 28 Oct 2008 13:44:12 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SDiCYk095399;
	Tue, 28 Oct 2008 13:44:12 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SDiBX3095365;
	Tue, 28 Oct 2008 13:44:11 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <200810281344.m9SDiBX3095365@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 28 Oct 2008 13:44:11 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184413 - in head: share/man/man9
	sys/cddl/compat/opensolaris/kern sys/cddl/compat/opensolaris/sys
	sys/cddl/contrib/opensolaris/uts/common/fs/zfs
	sys/compat/linux sys/fs/cd9660 sys/fs/c...
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 13:44:13 -0000

Author: trasz
Date: Tue Oct 28 13:44:11 2008
New Revision: 184413
URL: http://svn.freebsd.org/changeset/base/184413

Log:
  Introduce accmode_t.  This is required for NFSv4 ACLs - it will be neccessary
  to add more V* constants, and the variables changed by this patch were often
  being assigned to mode_t variables, which is 16 bit.
  
  Approved by:	rwatson (mentor)

Modified:
  head/share/man/man9/VOP_ACCESS.9
  head/share/man/man9/vaccess.9
  head/share/man/man9/vaccess_acl_posix1e.9
  head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c
  head/sys/cddl/compat/opensolaris/sys/policy.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
  head/sys/compat/linux/linux_getcwd.c
  head/sys/fs/cd9660/cd9660_vfsops.c
  head/sys/fs/cd9660/cd9660_vnops.c
  head/sys/fs/coda/coda_vnops.c
  head/sys/fs/devfs/devfs_vnops.c
  head/sys/fs/hpfs/hpfs_vnops.c
  head/sys/fs/msdosfs/msdosfs_vfsops.c
  head/sys/fs/msdosfs/msdosfs_vnops.c
  head/sys/fs/ntfs/ntfs_vnops.c
  head/sys/fs/nullfs/null_vnops.c
  head/sys/fs/nwfs/nwfs_vnops.c
  head/sys/fs/pseudofs/pseudofs_vnops.c
  head/sys/fs/smbfs/smbfs_vnops.c
  head/sys/fs/tmpfs/tmpfs_vnops.c
  head/sys/fs/udf/udf_vnops.c
  head/sys/fs/unionfs/union_vnops.c
  head/sys/gnu/fs/ext2fs/ext2_vfsops.c
  head/sys/gnu/fs/ext2fs/ext2_vnops.c
  head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
  head/sys/gnu/fs/reiserfs/reiserfs_vnops.c
  head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
  head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
  head/sys/kern/subr_acl_posix1e.c
  head/sys/kern/uipc_mqueue.c
  head/sys/kern/uipc_shm.c
  head/sys/kern/vfs_subr.c
  head/sys/kern/vfs_syscalls.c
  head/sys/kern/vfs_vnops.c
  head/sys/kern/vnode_if.src
  head/sys/nfs4client/nfs4_vnops.c
  head/sys/nfsclient/nfs_vnops.c
  head/sys/nfsserver/nfs_serv.c
  head/sys/security/mac/mac_framework.h
  head/sys/security/mac/mac_policy.h
  head/sys/security/mac/mac_vfs.c
  head/sys/security/mac_biba/mac_biba.c
  head/sys/security/mac_bsdextended/ugidfw_internal.h
  head/sys/security/mac_bsdextended/ugidfw_vnode.c
  head/sys/security/mac_lomac/mac_lomac.c
  head/sys/security/mac_mls/mac_mls.c
  head/sys/security/mac_stub/mac_stub.c
  head/sys/security/mac_test/mac_test.c
  head/sys/sys/_types.h
  head/sys/sys/extattr.h
  head/sys/sys/types.h
  head/sys/sys/vnode.h
  head/sys/ufs/ffs/ffs_vfsops.c
  head/sys/ufs/ufs/ufs_vnops.c

Modified: head/share/man/man9/VOP_ACCESS.9
==============================================================================
--- head/share/man/man9/VOP_ACCESS.9	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/share/man/man9/VOP_ACCESS.9	Tue Oct 28 13:44:11 2008	(r184413)
@@ -39,16 +39,16 @@
 .In sys/param.h
 .In sys/vnode.h
 .Ft int
-.Fn VOP_ACCESS "struct vnode *vp" "int mode" "struct ucred *cred" "struct thread *td"
+.Fn VOP_ACCESS "struct vnode *vp" "accmode_t accmode" "struct ucred *cred" "struct thread *td"
 .Sh DESCRIPTION
 This entry point checks the access permissions of the file against the
 given credentials.
 .Pp
 Its arguments are:
-.Bl -tag -width mode
+.Bl -tag -width accmode
 .It Fa vp
 The vnode of the file to check.
-.It Fa mode
+.It Fa accmode
 The type of access required.
 .It Fa cred
 The user credentials to check.
@@ -57,8 +57,8 @@ The thread which is checking.
 .El
 .Pp
 The
-.Fa mode
-is a mask which can contain
+.Fa accmode
+is a mask which can contain flags described in , e.g.
 .Dv VREAD ,
 .Dv VWRITE
 or
@@ -71,7 +71,7 @@ otherwise an appropriate error code is r
 .Sh PSEUDOCODE
 .Bd -literal
 int
-vop_access(struct vnode *vp, int mode, struct ucred *cred, struct thread *td)
+vop_access(struct vnode *vp, accmode_t accmode, struct ucred *cred, struct thread *td)
 {
     int error;
 
@@ -80,7 +80,7 @@ vop_access(struct vnode *vp, int mode, s
      * unless the file is a socket, fifo, or a block or
      * character device resident on the filesystem.
      */
-    if (mode & VWRITE) {
+    if (accmode & VWRITE) {
 	switch (vp->v_type) {
 	case VDIR:
 	case VLNK:
@@ -93,7 +93,7 @@ vop_access(struct vnode *vp, int mode, s
     }
 
     /* If immutable bit set, nobody gets to write it. */
-    if ((mode & VWRITE) && vp has immutable bit set)
+    if ((accmode & VWRITE) && vp has immutable bit set)
 	return EPERM;
 
     /* Otherwise, user id 0 always gets access. */
@@ -104,11 +104,11 @@ vop_access(struct vnode *vp, int mode, s
 
     /* Otherwise, check the owner. */
     if (cred->cr_uid == owner of vp) {
-	if (mode & VEXEC)
+	if (accmode & VEXEC)
 	    mask |= S_IXUSR;
-	if (mode & VREAD)
+	if (accmode & VREAD)
 	    mask |= S_IRUSR;
-	if (mode & VWRITE)
+	if (accmode & VWRITE)
 	    mask |= S_IWUSR;
 	return (((mode of vp) & mask) == mask ? 0 : EACCES);
     }
@@ -116,21 +116,21 @@ vop_access(struct vnode *vp, int mode, s
     /* Otherwise, check the groups. */
     for (i = 0, gp = cred->cr_groups; i < cred->cr_ngroups; i++, gp++)
 	if (group of vp == *gp) {
-	    if (mode & VEXEC)
+	    if (accmode & VEXEC)
 		mask |= S_IXGRP;
-	    if (mode & VREAD)
+	    if (accmode & VREAD)
 		mask |= S_IRGRP;
-	    if (mode & VWRITE)
+	    if (accmode & VWRITE)
 		mask |= S_IWGRP;
 	    return (((mode of vp) & mask) == mask ? 0 : EACCES);
 	}
 
     /* Otherwise, check everyone else. */
-    if (mode & VEXEC)
+    if (accmode & VEXEC)
 	mask |= S_IXOTH;
-    if (mode & VREAD)
+    if (accmode & VREAD)
 	mask |= S_IROTH;
-    if (mode & VWRITE)
+    if (accmode & VWRITE)
 	mask |= S_IWOTH;
     return (((mode of vp) & mask) == mask ? 0 : EACCES);
 }

Modified: head/share/man/man9/vaccess.9
==============================================================================
--- head/share/man/man9/vaccess.9	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/share/man/man9/vaccess.9	Tue Oct 28 13:44:11 2008	(r184413)
@@ -40,7 +40,7 @@
 .Fa "mode_t file_mode"
 .Fa "uid_t file_uid"
 .Fa "gid_t file_gid"
-.Fa "mode_t acc_mode"
+.Fa "accmode_t accmode"
 .Fa "struct ucred *cred"
 .Fa "int *privused"
 .Fc
@@ -59,7 +59,7 @@ owning UID
 owning GID
 .Fa file_gid ,
 desired access mode
-.Fa acc_mode ,
+.Fa accmode ,
 requesting credential
 .Fa cred ,
 and an optional call-by-reference

Modified: head/share/man/man9/vaccess_acl_posix1e.9
==============================================================================
--- head/share/man/man9/vaccess_acl_posix1e.9	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/share/man/man9/vaccess_acl_posix1e.9	Tue Oct 28 13:44:11 2008	(r184413)
@@ -41,7 +41,7 @@
 .Fa "uid_t file_uid"
 .Fa "gid_t file_gid"
 .Fa "struct acl *acl"
-.Fa "mode_t acc_mode"
+.Fa "accmode_t accmode"
 .Fa "struct ucred *cred"
 .Fa "int *privused"
 .Fc
@@ -59,7 +59,7 @@ owning GID
 access ACL for the file
 .Fa acl ,
 desired access mode
-.Fa acc_mode ,
+.Fa accmode ,
 requesting credential
 .Fa cred ,
 and an optional call-by-reference

Modified: head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c
==============================================================================
--- head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/cddl/compat/opensolaris/kern/opensolaris_policy.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -91,17 +91,17 @@ secpolicy_vnode_remove(struct ucred *cre
 
 int
 secpolicy_vnode_access(struct ucred *cred, struct vnode *vp, uint64_t owner,
-    int mode)
+    accmode_t accmode)
 {
 
-	if ((mode & VREAD) && priv_check_cred(cred, PRIV_VFS_READ, 0) != 0) {
+	if ((accmode & VREAD) && priv_check_cred(cred, PRIV_VFS_READ, 0) != 0) {
 		return (EACCES);
 	}
-	if ((mode & VWRITE) &&
+	if ((accmode & VWRITE) &&
 	    priv_check_cred(cred, PRIV_VFS_WRITE, 0) != 0) {
 		return (EACCES);
 	}
-	if (mode & VEXEC) {
+	if (accmode & VEXEC) {
 		if (vp->v_type == VDIR) {
 			if (priv_check_cred(cred, PRIV_VFS_LOOKUP, 0) != 0) {
 				return (EACCES);

Modified: head/sys/cddl/compat/opensolaris/sys/policy.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/policy.h	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/cddl/compat/opensolaris/sys/policy.h	Tue Oct 28 13:44:11 2008	(r184413)
@@ -46,7 +46,7 @@ int	secpolicy_basic_link(struct ucred  *
 int	secpolicy_vnode_stky_modify(struct ucred *cred);
 int	secpolicy_vnode_remove(struct ucred *cred);
 int	secpolicy_vnode_access(struct ucred *cred, struct vnode *vp,
-	    uint64_t owner, int mode);
+	    uint64_t owner, accmode_t accmode);
 int	secpolicy_vnode_setdac(struct ucred *cred, uid_t owner);
 int	secpolicy_vnode_setattr(struct ucred *cred, struct vnode *vp,
 	    struct vattr *vap, const struct vattr *ovap, int flags,

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -237,14 +237,14 @@ static int
 zfsctl_common_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
-	int mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 
-	if (mode & VWRITE)
+	if (accmode & VWRITE)
 		return (EACCES);
 
 	return (0);

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -3194,13 +3194,13 @@ static int
 zfs_freebsd_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
 
-	return (zfs_access(ap->a_vp, ap->a_mode, 0, ap->a_cred));
+	return (zfs_access(ap->a_vp, ap->a_accmode, 0, ap->a_cred));
 }
 
 static int

Modified: head/sys/compat/linux/linux_getcwd.c
==============================================================================
--- head/sys/compat/linux/linux_getcwd.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/compat/linux/linux_getcwd.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -307,7 +307,7 @@ linux_getcwd_common (lvp, rvp, bpp, bufp
 	struct vnode *uvp = NULL;
 	char *bp = NULL;
 	int error;
-	int perms = VEXEC;
+	accmode_t accmode = VEXEC;
 
 	if (rvp == NULL) {
 		rvp = fdp->fd_rdir;
@@ -352,10 +352,10 @@ linux_getcwd_common (lvp, rvp, bpp, bufp
 		 * whether or not caller cares.
 		 */
 		if (flags & GETCWD_CHECK_ACCESS) {
-			error = VOP_ACCESS(lvp, perms, td->td_ucred, td);
+			error = VOP_ACCESS(lvp, accmode, td->td_ucred, td);
 			if (error)
 				goto out;
-			perms = VEXEC|VREAD;
+			accmode = VEXEC|VREAD;
 		}
 		
 		/*

Modified: head/sys/fs/cd9660/cd9660_vfsops.c
==============================================================================
--- head/sys/fs/cd9660/cd9660_vfsops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/cd9660/cd9660_vfsops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -128,7 +128,7 @@ cd9660_mount(struct mount *mp, struct th
 	struct vnode *devvp;
 	char *fspec;
 	int error;
-	mode_t accessmode;
+	accmode_t accmode;
 	struct nameidata ndp;
 	struct iso_mnt *imp = 0;
 
@@ -168,9 +168,9 @@ cd9660_mount(struct mount *mp, struct th
 	 * Verify that user has necessary permissions on the device,
 	 * or has superuser abilities
 	 */
-	accessmode = VREAD;
+	accmode = VREAD;
 	vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
-	error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
+	error = VOP_ACCESS(devvp, accmode, td->td_ucred, td);
 	if (error)
 		error = priv_check(td, PRIV_VFS_MOUNT_PERM);
 	if (error) {

Modified: head/sys/fs/cd9660/cd9660_vnops.c
==============================================================================
--- head/sys/fs/cd9660/cd9660_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/cd9660/cd9660_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -125,14 +125,14 @@ static int
 cd9660_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
 	struct vnode *vp = ap->a_vp;
 	struct iso_node *ip = VTOI(vp);
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 
 	if (vp->v_type == VCHR || vp->v_type == VBLK)
 		return (EOPNOTSUPP);
@@ -142,7 +142,7 @@ cd9660_access(ap)
 	 * fifo, or a block or character device resident on the
 	 * filesystem.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch (vp->v_type) {
 		case VDIR:
 		case VLNK:
@@ -155,7 +155,7 @@ cd9660_access(ap)
 	}
 
 	return (vaccess(vp->v_type, ip->inode.iso_mode, ip->inode.iso_uid,
-	    ip->inode.iso_gid, ap->a_mode, ap->a_cred, NULL));
+	    ip->inode.iso_gid, ap->a_accmode, ap->a_cred, NULL));
 }
 
 static int

Modified: head/sys/fs/coda/coda_vnops.c
==============================================================================
--- head/sys/fs/coda/coda_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/coda/coda_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -607,7 +607,7 @@ coda_access(struct vop_access_args *ap)
 	/* true args */
 	struct vnode *vp = ap->a_vp;
 	struct cnode *cp = VTOC(vp);
-	int mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 	struct ucred *cred = ap->a_cred;
 	struct thread *td = ap->a_td;
 	/* locals */
@@ -624,7 +624,7 @@ coda_access(struct vop_access_args *ap)
 		 * Bogus hack - all will be marked as successes.
 		 */
 		MARK_INT_SAT(CODA_ACCESS_STATS);
-		return (((mode & VREAD) && !(mode & (VWRITE | VEXEC)))
+		return (((accmode & VREAD) && !(accmode & (VWRITE | VEXEC)))
 		    ? 0 : EACCES);
 	}
 
@@ -636,11 +636,11 @@ coda_access(struct vop_access_args *ap)
 	 */
 	if (coda_access_cache && VALID_ACCCACHE(cp) &&
 	    (cred->cr_uid == cp->c_cached_uid) &&
-	    (mode & cp->c_cached_mode) == mode) {
+	    (accmode & cp->c_cached_mode) == accmode) {
 		MARK_INT_SAT(CODA_ACCESS_STATS);
 		return (0);
 	}
-	error = venus_access(vtomi(vp), &cp->c_fid, mode, cred, td->td_proc);
+	error = venus_access(vtomi(vp), &cp->c_fid, accmode, cred, td->td_proc);
 	if (error == 0 && coda_access_cache) {
 		/*-
 		 * When we have a new successful request, we consider three
@@ -658,10 +658,10 @@ coda_access(struct vop_access_args *ap)
 		 */
 		cp->c_flags |= C_ACCCACHE;
 		if (cp->c_cached_uid != cred->cr_uid) {
-			cp->c_cached_mode = mode;
+			cp->c_cached_mode = accmode;
 			cp->c_cached_uid = cred->cr_uid;
 		} else
-			cp->c_cached_mode |= mode;
+			cp->c_cached_mode |= accmode;
 	}
 	return (error);
 }

Modified: head/sys/fs/devfs/devfs_vnops.c
==============================================================================
--- head/sys/fs/devfs/devfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/devfs/devfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -372,7 +372,7 @@ devfs_access(struct vop_access_args *ap)
 		de = de->de_dir;
 
 	error = vaccess(vp->v_type, de->de_mode, de->de_uid, de->de_gid,
-	    ap->a_mode, ap->a_cred, NULL);
+	    ap->a_accmode, ap->a_cred, NULL);
 	if (!error)
 		return (error);
 	if (error != EACCES)

Modified: head/sys/fs/hpfs/hpfs_vnops.c
==============================================================================
--- head/sys/fs/hpfs/hpfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/hpfs/hpfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -683,14 +683,14 @@ int
 hpfs_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
 	struct vnode *vp = ap->a_vp;
 	struct hpfsnode *hp = VTOHP(vp);
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 
 	dprintf(("hpfs_access(0x%x):\n", hp->h_no));
 
@@ -699,7 +699,7 @@ hpfs_access(ap)
 	 * unless the file is a socket, fifo, or a block or
 	 * character device resident on the filesystem.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch ((int)vp->v_type) {
 		case VDIR:
 		case VLNK:
@@ -711,7 +711,7 @@ hpfs_access(ap)
 	}
 
 	return (vaccess(vp->v_type, hp->h_mode, hp->h_uid, hp->h_gid,
-	    ap->a_mode, ap->a_cred, NULL));
+	    ap->a_accmode, ap->a_cred, NULL));
 }
 
 /*

Modified: head/sys/fs/msdosfs/msdosfs_vfsops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/msdosfs/msdosfs_vfsops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -240,7 +240,7 @@ msdosfs_mount(struct mount *mp, struct t
 	struct msdosfsmount *pmp = NULL;
 	struct nameidata ndp;
 	int error, flags;
-	mode_t accessmode;
+	accmode_t accmode;
 	char *from;
 
 	if (vfs_filteropt(mp->mnt_optnew, msdosfs_opts))
@@ -363,10 +363,10 @@ msdosfs_mount(struct mount *mp, struct t
 	 * If mount by non-root, then verify that user has necessary
 	 * permissions on the device.
 	 */
-	accessmode = VREAD;
+	accmode = VREAD;
 	if ((mp->mnt_flag & MNT_RDONLY) == 0)
-		accessmode |= VWRITE;
-	error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
+		accmode |= VWRITE;
+	error = VOP_ACCESS(devvp, accmode, td->td_ucred, td);
 	if (error)
 		error = priv_check(td, PRIV_VFS_MOUNT_PERM);
 	if (error) {

Modified: head/sys/fs/msdosfs/msdosfs_vnops.c
==============================================================================
--- head/sys/fs/msdosfs/msdosfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/msdosfs/msdosfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -249,7 +249,7 @@ static int
 msdosfs_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
@@ -257,7 +257,8 @@ msdosfs_access(ap)
 	struct vnode *vp = ap->a_vp;
 	struct denode *dep = VTODE(ap->a_vp);
 	struct msdosfsmount *pmp = dep->de_pmp;
-	mode_t file_mode, mode = ap->a_mode;
+	mode_t file_mode;
+	accmode_t accmode = ap->a_accmode;
 
 	file_mode = (S_IXUSR|S_IXGRP|S_IXOTH) | (S_IRUSR|S_IRGRP|S_IROTH) |
 	    ((dep->de_Attributes & ATTR_READONLY) ? 0 : (S_IWUSR|S_IWGRP|S_IWOTH));
@@ -267,7 +268,7 @@ msdosfs_access(ap)
 	 * Disallow writing to directories and regular files if the
 	 * filesystem is read-only.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch (vp->v_type) {
 		case VDIR:
 		case VREG:
@@ -280,7 +281,7 @@ msdosfs_access(ap)
 	}
 
 	return (vaccess(vp->v_type, file_mode, pmp->pm_uid, pmp->pm_gid,
-	    ap->a_mode, ap->a_cred, NULL));
+	    ap->a_accmode, ap->a_cred, NULL));
 }
 
 static int

Modified: head/sys/fs/ntfs/ntfs_vnops.c
==============================================================================
--- head/sys/fs/ntfs/ntfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/ntfs/ntfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -386,14 +386,14 @@ int
 ntfs_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
 	struct vnode *vp = ap->a_vp;
 	struct ntnode *ip = VTONT(vp);
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 #ifdef QUOTA
 	int error;
 #endif
@@ -405,7 +405,7 @@ ntfs_access(ap)
 	 * unless the file is a socket, fifo, or a block or
 	 * character device resident on the filesystem.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch ((int)vp->v_type) {
 		case VDIR:
 		case VLNK:
@@ -421,7 +421,7 @@ ntfs_access(ap)
 	}
 
 	return (vaccess(vp->v_type, ip->i_mp->ntm_mode, ip->i_mp->ntm_uid,
-	    ip->i_mp->ntm_gid, ap->a_mode, ap->a_cred, NULL));
+	    ip->i_mp->ntm_gid, ap->a_accmode, ap->a_cred, NULL));
 } 
 
 /*

Modified: head/sys/fs/nullfs/null_vnops.c
==============================================================================
--- head/sys/fs/nullfs/null_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/nullfs/null_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -451,14 +451,14 @@ static int
 null_access(struct vop_access_args *ap)
 {
 	struct vnode *vp = ap->a_vp;
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 
 	/*
 	 * Disallow write attempts on read-only layers;
 	 * unless the file is a socket, fifo, or a block or
 	 * character device resident on the filesystem.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch (vp->v_type) {
 		case VDIR:
 		case VLNK:

Modified: head/sys/fs/nwfs/nwfs_vnops.c
==============================================================================
--- head/sys/fs/nwfs/nwfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/nwfs/nwfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -121,7 +121,7 @@ static int
 nwfs_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *td;
 	} */ *ap;
@@ -131,7 +131,7 @@ nwfs_access(ap)
 	struct nwmount *nmp = VTONWFS(vp);
 
 	NCPVNDEBUG("\n");
-	if ((ap->a_mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
+	if ((ap->a_accmode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
 		switch (vp->v_type) {
 		    case VREG: case VDIR: case VLNK:
 			return (EROFS);
@@ -142,7 +142,7 @@ nwfs_access(ap)
 	mpmode = vp->v_type == VREG ? nmp->m.file_mode :
 	    nmp->m.dir_mode;
         return (vaccess(vp->v_type, mpmode, nmp->m.uid,
-            nmp->m.gid, ap->a_mode, ap->a_cred, NULL));
+            nmp->m.gid, ap->a_accmode, ap->a_cred, NULL));
 }
 /*
  * nwfs_open vnode op

Modified: head/sys/fs/pseudofs/pseudofs_vnops.c
==============================================================================
--- head/sys/fs/pseudofs/pseudofs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/pseudofs/pseudofs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -132,7 +132,7 @@ pfs_access(struct vop_access_args *va)
 	if (error)
 		PFS_RETURN (error);
 	error = vaccess(vn->v_type, vattr.va_mode, vattr.va_uid,
-	    vattr.va_gid, va->a_mode, va->a_cred, NULL);
+	    vattr.va_gid, va->a_accmode, va->a_cred, NULL);
 	PFS_RETURN (error);
 }
 

Modified: head/sys/fs/smbfs/smbfs_vnops.c
==============================================================================
--- head/sys/fs/smbfs/smbfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/smbfs/smbfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -123,18 +123,18 @@ static int
 smbfs_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
 	struct vnode *vp = ap->a_vp;
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 	mode_t mpmode;
 	struct smbmount *smp = VTOSMBFS(vp);
 
 	SMBVDEBUG("\n");
-	if ((mode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
+	if ((accmode & VWRITE) && (vp->v_mount->mnt_flag & MNT_RDONLY)) {
 		switch (vp->v_type) {
 		    case VREG: case VDIR: case VLNK:
 			return EROFS;
@@ -144,7 +144,7 @@ smbfs_access(ap)
 	}
 	mpmode = vp->v_type == VREG ? smp->sm_file_mode : smp->sm_dir_mode;
 	return (vaccess(vp->v_type, mpmode, smp->sm_uid,
-	    smp->sm_gid, ap->a_mode, ap->a_cred, NULL));
+	    smp->sm_gid, ap->a_accmode, ap->a_cred, NULL));
 }
 
 /* ARGSUSED */

Modified: head/sys/fs/tmpfs/tmpfs_vnops.c
==============================================================================
--- head/sys/fs/tmpfs/tmpfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/tmpfs/tmpfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -282,7 +282,7 @@ int
 tmpfs_access(struct vop_access_args *v)
 {
 	struct vnode *vp = v->a_vp;
-	int mode = v->a_mode;
+	accmode_t accmode = v->a_accmode;
 	struct ucred *cred = v->a_cred;
 
 	int error;
@@ -298,7 +298,7 @@ tmpfs_access(struct vop_access_args *v)
 	case VLNK:
 		/* FALLTHROUGH */
 	case VREG:
-		if (mode & VWRITE && vp->v_mount->mnt_flag & MNT_RDONLY) {
+		if (accmode & VWRITE && vp->v_mount->mnt_flag & MNT_RDONLY) {
 			error = EROFS;
 			goto out;
 		}
@@ -318,13 +318,13 @@ tmpfs_access(struct vop_access_args *v)
 		goto out;
 	}
 
-	if (mode & VWRITE && node->tn_flags & IMMUTABLE) {
+	if (accmode & VWRITE && node->tn_flags & IMMUTABLE) {
 		error = EPERM;
 		goto out;
 	}
 
 	error = vaccess(vp->v_type, node->tn_mode, node->tn_uid,
-	    node->tn_gid, mode, cred, NULL);
+	    node->tn_gid, accmode, cred, NULL);
 
 out:
 	MPASS(VOP_ISLOCKED(vp));

Modified: head/sys/fs/udf/udf_vnops.c
==============================================================================
--- head/sys/fs/udf/udf_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/udf/udf_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -139,13 +139,14 @@ udf_access(struct vop_access_args *a)
 {
 	struct vnode *vp;
 	struct udf_node *node;
-	mode_t a_mode, mode;
+	accmode_t accmode;
+	mode_t mode;
 
 	vp = a->a_vp;
 	node = VTON(vp);
-	a_mode = a->a_mode;
+	accmode = a->a_accmode;
 
-	if (a_mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch (vp->v_type) {
 		case VDIR:
 		case VLNK:
@@ -160,7 +161,7 @@ udf_access(struct vop_access_args *a)
 	mode = udf_permtomode(node);
 
 	return (vaccess(vp->v_type, mode, node->fentry->uid, node->fentry->gid,
-	    a_mode, a->a_cred, NULL));
+	    accmode, a->a_cred, NULL));
 }
 
 static int

Modified: head/sys/fs/unionfs/union_vnops.c
==============================================================================
--- head/sys/fs/unionfs/union_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/fs/unionfs/union_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -583,7 +583,7 @@ unionfs_close_abort:
  * Check the access mode toward shadow file/dir.
  */
 static int
-unionfs_check_corrected_access(u_short mode,
+unionfs_check_corrected_access(accmode_t accmode,
 			     struct vattr *va,
 			     struct ucred *cred)
 {
@@ -601,11 +601,11 @@ unionfs_check_corrected_access(u_short m
 
 	/* check owner */
 	if (cred->cr_uid == uid) {
-		if (mode & VEXEC)
+		if (accmode & VEXEC)
 			mask |= S_IXUSR;
-		if (mode & VREAD)
+		if (accmode & VREAD)
 			mask |= S_IRUSR;
-		if (mode & VWRITE)
+		if (accmode & VWRITE)
 			mask |= S_IWUSR;
 		return ((vmode & mask) == mask ? 0 : EACCES);
 	}
@@ -615,22 +615,22 @@ unionfs_check_corrected_access(u_short m
 	gp = cred->cr_groups;
 	for (; count < cred->cr_ngroups; count++, gp++) {
 		if (gid == *gp) {
-			if (mode & VEXEC)
+			if (accmode & VEXEC)
 				mask |= S_IXGRP;
-			if (mode & VREAD)
+			if (accmode & VREAD)
 				mask |= S_IRGRP;
-			if (mode & VWRITE)
+			if (accmode & VWRITE)
 				mask |= S_IWGRP;
 			return ((vmode & mask) == mask ? 0 : EACCES);
 		}
 	}
 
 	/* check other */
-	if (mode & VEXEC)
+	if (accmode & VEXEC)
 		mask |= S_IXOTH;
-	if (mode & VREAD)
+	if (accmode & VREAD)
 		mask |= S_IROTH;
-	if (mode & VWRITE)
+	if (accmode & VWRITE)
 		mask |= S_IWOTH;
 
 	return ((vmode & mask) == mask ? 0 : EACCES);
@@ -645,7 +645,7 @@ unionfs_access(struct vop_access_args *a
 	struct vnode   *lvp;
 	struct thread  *td;
 	struct vattr	va;
-	int		mode;
+	accmode_t	accmode;
 	int		error;
 
 	UNIONFS_INTERNAL_DEBUG("unionfs_access: enter\n");
@@ -655,10 +655,10 @@ unionfs_access(struct vop_access_args *a
 	uvp = unp->un_uppervp;
 	lvp = unp->un_lowervp;
 	td = ap->a_td;
-	mode = ap->a_mode;
+	accmode = ap->a_accmode;
 	error = EACCES;
 
-	if ((mode & VWRITE) &&
+	if ((accmode & VWRITE) &&
 	    (ap->a_vp->v_mount->mnt_flag & MNT_RDONLY)) {
 		switch (ap->a_vp->v_type) {
 		case VREG:
@@ -671,7 +671,7 @@ unionfs_access(struct vop_access_args *a
 	}
 
 	if (uvp != NULLVP) {
-		error = VOP_ACCESS(uvp, mode, ap->a_cred, td);
+		error = VOP_ACCESS(uvp, accmode, ap->a_cred, td);
 
 		UNIONFS_INTERNAL_DEBUG("unionfs_access: leave (%d)\n", error);
 
@@ -679,7 +679,7 @@ unionfs_access(struct vop_access_args *a
 	}
 
 	if (lvp != NULLVP) {
-		if (mode & VWRITE) {
+		if (accmode & VWRITE) {
 			if (ump->um_uppervp->v_mount->mnt_flag & MNT_RDONLY) {
 				switch (ap->a_vp->v_type) {
 				case VREG:
@@ -698,15 +698,15 @@ unionfs_access(struct vop_access_args *a
 						return (error);
 
 					error = unionfs_check_corrected_access(
-					    mode, &va, ap->a_cred);
+					    accmode, &va, ap->a_cred);
 					if (error != 0)
 						return (error);
 				}
 			}
-			mode &= ~VWRITE;
-			mode |= VREAD; /* will copy to upper */
+			accmode &= ~VWRITE;
+			accmode |= VREAD; /* will copy to upper */
 		}
-		error = VOP_ACCESS(lvp, mode, ap->a_cred, td);
+		error = VOP_ACCESS(lvp, accmode, ap->a_cred, td);
 	}
 
 	UNIONFS_INTERNAL_DEBUG("unionfs_access: leave (%d)\n", error);

Modified: head/sys/gnu/fs/ext2fs/ext2_vfsops.c
==============================================================================
--- head/sys/gnu/fs/ext2fs/ext2_vfsops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/gnu/fs/ext2fs/ext2_vfsops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -137,7 +137,7 @@ ext2_mount(mp, td)
 	struct ext2_sb_info *fs;
 	char *path, *fspec;
 	int error, flags, len;
-	mode_t accessmode;
+	accmode_t accmode;
 	struct nameidata nd, *ndp = &nd;
 
 	opts = mp->mnt_optnew;
@@ -265,10 +265,10 @@ ext2_mount(mp, td)
 	 *
 	 * XXXRW: VOP_ACCESS() enough?
 	 */
-	accessmode = VREAD;
+	accmode = VREAD;
 	if ((mp->mnt_flag & MNT_RDONLY) == 0)
-		accessmode |= VWRITE;
-	error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
+		accmode |= VWRITE;
+	error = VOP_ACCESS(devvp, accmode, td->td_ucred, td);
 	if (error)
 		error = priv_check(td, PRIV_VFS_MOUNT_PERM);
 	if (error) {

Modified: head/sys/gnu/fs/ext2fs/ext2_vnops.c
==============================================================================
--- head/sys/gnu/fs/ext2fs/ext2_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/gnu/fs/ext2fs/ext2_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -283,14 +283,14 @@ static int
 ext2_access(ap)
 	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap;
 {
 	struct vnode *vp = ap->a_vp;
 	struct inode *ip = VTOI(vp);
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 	int error;
 
 	if (vp->v_type == VBLK || vp->v_type == VCHR)
@@ -301,7 +301,7 @@ ext2_access(ap)
 	 * unless the file is a socket, fifo, or a block or
 	 * character device resident on the file system.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch (vp->v_type) {
 		case VDIR:
 		case VLNK:
@@ -315,11 +315,11 @@ ext2_access(ap)
 	}
 
 	/* If immutable bit set, nobody gets to write it. */
-	if ((mode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT)))
+	if ((accmode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT)))
 		return (EPERM);
 
 	error = vaccess(vp->v_type, ip->i_mode, ip->i_uid, ip->i_gid,
-	    ap->a_mode, ap->a_cred, NULL);
+	    ap->a_accmode, ap->a_cred, NULL);
 	return (error);
 }
 

Modified: head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c
==============================================================================
--- head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/gnu/fs/reiserfs/reiserfs_vfsops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -74,7 +74,7 @@ reiserfs_mount(struct mount *mp, struct 
 {
 	size_t size;
 	int error, len;
-	mode_t accessmode;
+	accmode_t accmode;
 	char *path, *fspec;
 	struct vnode *devvp;
 	struct vfsoptlist *opts;
@@ -124,10 +124,10 @@ reiserfs_mount(struct mount *mp, struct 
 
 	/* If mount by non-root, then verify that user has necessary
 	 * permissions on the device. */
-	accessmode = VREAD;
+	accmode = VREAD;
 	if ((mp->mnt_flag & MNT_RDONLY) == 0)
-		accessmode |= VWRITE;
-	error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
+		accmode |= VWRITE;
+	error = VOP_ACCESS(devvp, accmode, td->td_ucred, td);
 	if (error)
 		error = priv_check(td, PRIV_VFS_MOUNT_PERM);
 	if (error) {

Modified: head/sys/gnu/fs/reiserfs/reiserfs_vnops.c
==============================================================================
--- head/sys/gnu/fs/reiserfs/reiserfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/gnu/fs/reiserfs/reiserfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -57,14 +57,14 @@ reiserfs_access(struct vop_access_args *
 	int error;
 	struct vnode *vp = ap->a_vp;
 	struct reiserfs_node *ip = VTOI(vp);
-	mode_t mode = ap->a_mode;
+	accmode_t accmode = ap->a_accmode;
 
 	/*
 	 * Disallow write attempts on read-only file systems; unless the file
 	 * is a socket, fifo, or a block or character device resident on the
 	 * file system.
 	 */
-	if (mode & VWRITE) {
+	if (accmode & VWRITE) {
 		switch (vp->v_type) {
 		case VDIR:
 		case VLNK:
@@ -81,13 +81,13 @@ reiserfs_access(struct vop_access_args *
 	}
 
 	/* If immutable bit set, nobody gets to write it. */
-	if ((mode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT))) {
+	if ((accmode & VWRITE) && (ip->i_flags & (IMMUTABLE | SF_SNAPSHOT))) {
 		reiserfs_log(LOG_DEBUG, "no write access (immutable)\n");
 		return (EPERM);
 	}
 
 	error = vaccess(vp->v_type, ip->i_mode, ip->i_uid, ip->i_gid,
-	    ap->a_mode, ap->a_cred, NULL);
+	    ap->a_accmode, ap->a_cred, NULL);
 	return (error);
 }
 

Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c
==============================================================================
--- head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/gnu/fs/xfs/FreeBSD/xfs_super.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -133,7 +133,7 @@ xfs_blkdev_get(
 	struct vnode		*devvp;
 	struct g_consumer	*cp;
 	struct g_provider	*pp;
-	mode_t			accessmode;
+	accmode_t		accmode;
 
 	td = curthread;
 
@@ -151,10 +151,10 @@ xfs_blkdev_get(
 	vn_lock(devvp, LK_EXCLUSIVE | LK_RETRY);
 
 	ronly = ((XFS_MTOVFS(mp)->vfs_flag & VFS_RDONLY) != 0);
-	accessmode = VREAD;
+	accmode = VREAD;
 	if (!ronly)
-		accessmode |= VWRITE;
-	error = VOP_ACCESS(devvp, accessmode, td->td_ucred, td);
+		accmode |= VWRITE;
+	error = VOP_ACCESS(devvp, accmode, td->td_ucred, td);
 	if (error)
 		error = priv_check(td, PRIV_VFS_MOUNT_PERM);
 	if (error) {

Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
==============================================================================
--- head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -180,14 +180,14 @@ static int
 _xfs_access(
     	struct vop_access_args /* {
 		struct vnode *a_vp;
-		int  a_mode;
+		accmode_t a_accmode;
 		struct ucred *a_cred;
 		struct thread *a_td;
 	} */ *ap)
 {
 	int error;
 
-	XVOP_ACCESS(VPTOXFSVP(ap->a_vp), ap->a_mode, ap->a_cred, error);
+	XVOP_ACCESS(VPTOXFSVP(ap->a_vp), ap->a_accmode, ap->a_cred, error);
 	return (error);
 }
 

Modified: head/sys/kern/subr_acl_posix1e.c
==============================================================================
--- head/sys/kern/subr_acl_posix1e.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/kern/subr_acl_posix1e.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -53,12 +53,12 @@ __FBSDID("$FreeBSD$");
  */
 int
 vaccess_acl_posix1e(enum vtype type, uid_t file_uid, gid_t file_gid,
-    struct acl *acl, mode_t acc_mode, struct ucred *cred, int *privused)
+    struct acl *acl, accmode_t acc_mode, struct ucred *cred, int *privused)
 {
 	struct acl_entry *acl_other, *acl_mask;
-	mode_t dac_granted;
-	mode_t priv_granted;
-	mode_t acl_mask_granted;
+	accmode_t dac_granted;
+	accmode_t priv_granted;
+	accmode_t acl_mask_granted;
 	int group_matched, i;
 
 	/*

Modified: head/sys/kern/uipc_mqueue.c
==============================================================================
--- head/sys/kern/uipc_mqueue.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/kern/uipc_mqueue.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -1120,7 +1120,7 @@ mqfs_close(struct vop_close_args *ap)
 struct vop_access_args {
 	struct vop_generic_args a_gen;
 	struct vnode *a_vp;
-	int a_mode;
+	accmode_t a_accmode;
 	struct ucred *a_cred;
 	struct thread *a_td;
 };
@@ -1140,7 +1140,7 @@ mqfs_access(struct vop_access_args *ap)
 	if (error)
 		return (error);
 	error = vaccess(vp->v_type, vattr.va_mode, vattr.va_uid,
-	    vattr.va_gid, ap->a_mode, ap->a_cred, NULL);
+	    vattr.va_gid, ap->a_accmode, ap->a_cred, NULL);
 	return (error);
 }
 
@@ -2003,14 +2003,14 @@ kmq_open(struct thread *td, struct kmq_o
 		if ((flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL)) {
 			error = EEXIST;
 		} else {
-			int acc_mode = 0;
+			accmode_t accmode = 0;
 
 			if (flags & FREAD)
-				acc_mode |= VREAD;
+				accmode |= VREAD;
 			if (flags & FWRITE)
-				acc_mode |= VWRITE;
+				accmode |= VWRITE;
 			error = vaccess(VREG, pn->mn_mode, pn->mn_uid,
-				    pn->mn_gid, acc_mode, td->td_ucred, NULL);
+				    pn->mn_gid, accmode, td->td_ucred, NULL);
 		}
 	}
 

Modified: head/sys/kern/uipc_shm.c
==============================================================================
--- head/sys/kern/uipc_shm.c	Tue Oct 28 12:49:07 2008	(r184412)
+++ head/sys/kern/uipc_shm.c	Tue Oct 28 13:44:11 2008	(r184413)
@@ -367,15 +367,15 @@ shm_drop(struct shmfd *shmfd)

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 14:14:57 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 799C11065672;
	Tue, 28 Oct 2008 14:14:57 +0000 (UTC)
	(envelope-from oleg@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 6A9B48FC08;
	Tue, 28 Oct 2008 14:14:57 +0000 (UTC)
	(envelope-from oleg@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SEEvKI096009;
	Tue, 28 Oct 2008 14:14:57 GMT (envelope-from oleg@svn.freebsd.org)
Received: (from oleg@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SEEvZE096007;
	Tue, 28 Oct 2008 14:14:57 GMT (envelope-from oleg@svn.freebsd.org)
Message-Id: <200810281414.m9SEEvZE096007@svn.freebsd.org>
From: Oleg Bulyzhin 
Date: Tue, 28 Oct 2008 14:14:57 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184414 - in head: . sys/netinet
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 14:14:57 -0000

Author: oleg
Date: Tue Oct 28 14:14:57 2008
New Revision: 184414
URL: http://svn.freebsd.org/changeset/base/184414

Log:
  Type of q_time (start of queue idle time) has changed: uint32_t -> uint64_t.
  This should fix q_time overflow, which happens after 2^32/(86400*hz) days of
  uptime (~50days for hz = 1000).
  q_time overflow cause following:
  - traffic shaping may not work in 'fast' mode (not enabled by default).
  - incorrect average queue length calculation in RED/GRED algorithm.
  
  NB: due to ABI change this change is not applicable to stable.
  
  PR:		kern/128401

Modified:
  head/UPDATING
  head/sys/netinet/ip_dummynet.h

Modified: head/UPDATING
==============================================================================
--- head/UPDATING	Tue Oct 28 13:44:11 2008	(r184413)
+++ head/UPDATING	Tue Oct 28 14:14:57 2008	(r184414)
@@ -22,6 +22,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
 	to maximize performance.  (To disable malloc debugging, run
 	ln -s aj /etc/malloc.conf.)
 
+20081028:
+	dummynet(4) ABI has changed. ipfw(8) needs to be recompiled.
+
 20081009:
 	The uhci, ohci, ehci and slhci USB Host controller drivers have
 	been put into separate modules. If you load the usb module

Modified: head/sys/netinet/ip_dummynet.h
==============================================================================
--- head/sys/netinet/ip_dummynet.h	Tue Oct 28 13:44:11 2008	(r184413)
+++ head/sys/netinet/ip_dummynet.h	Tue Oct 28 14:14:57 2008	(r184414)
@@ -216,7 +216,7 @@ struct dn_flow_queue {
     int avg ;                   /* average queue length est. (scaled) */
     int count ;                 /* arrivals since last RED drop */
     int random ;                /* random value (scaled) */
-    u_int32_t q_time ;          /* start of queue idle time */
+    dn_key q_time;		/* start of queue idle time */
 
     /* WF2Q+ support */
     struct dn_flow_set *fs ;	/* parent flow set */

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 14:55:42 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0CC57106567F;
	Tue, 28 Oct 2008 14:55:42 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EEF078FC12;
	Tue, 28 Oct 2008 14:55:41 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SEtfuq096759;
	Tue, 28 Oct 2008 14:55:41 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SEtfbe096757;
	Tue, 28 Oct 2008 14:55:41 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <200810281455.m9SEtfbe096757@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Tue, 28 Oct 2008 14:55:41 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184415 - stable/7/crypto/openssh
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 14:55:42 -0000

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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 15:18:00 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 26A601065670;
	Tue, 28 Oct 2008 15:18:00 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 174968FC20;
	Tue, 28 Oct 2008 15:18:00 +0000 (UTC) (envelope-from des@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SFHxoT097173;
	Tue, 28 Oct 2008 15:17:59 GMT (envelope-from des@svn.freebsd.org)
Received: (from des@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SFHxkd097172;
	Tue, 28 Oct 2008 15:17:59 GMT (envelope-from des@svn.freebsd.org)
Message-Id: <200810281517.m9SFHxkd097172@svn.freebsd.org>
From: Dag-Erling Smorgrav 
Date: Tue, 28 Oct 2008 15:17:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184416 - in stable/7/sys: . dev/puc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 15:18:00 -0000

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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 15:30:51 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9C55A106567F;
	Tue, 28 Oct 2008 15:30:51 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id 3B8AF8FC19;
	Tue, 28 Oct 2008 15:30:51 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1])
	(authenticated bits=0)
	by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9SFUCWl024647;
	Tue, 28 Oct 2008 11:30:45 -0400 (EDT) (envelope-from jhb@freebsd.org)
From: John Baldwin 
To: Peter Wemm 
Date: Tue, 28 Oct 2008 10:22:41 -0400
User-Agent: KMail/1.9.7
References: <200810280326.m9S3QPit080877@svn.freebsd.org>
In-Reply-To: <200810280326.m9S3QPit080877@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200810281022.41296.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]);
	Tue, 28 Oct 2008 11:30:45 -0400 (EDT)
X-Virus-Scanned: ClamAV 0.93.1/8526/Tue Oct 28 09:21:35 2008 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS 
	autolearn=ham version=3.1.3
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r184385 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 15:30:51 -0000

On Monday 27 October 2008 11:26:25 pm Peter Wemm wrote:
> Author: peter
> Date: Tue Oct 28 03:26:25 2008
> New Revision: 184385
> URL: http://svn.freebsd.org/changeset/base/184385
> 
> Log:
>   After a machine has been up for a bit more than 20 days with HZ=1000,
>   "ticks" goes negative.  This breaks the signed comparison in softclock.
>   This causes sleep() to never wake up, tcp to stop, etc etc.  This is
>   bad(TM).  Use the SEQ_LT() method from tcp's sequence number comparisons.
> 
> Modified:
>   head/sys/kern/kern_timeout.c

I wonder why this used < rather than the != that older branches used.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 15:31:09 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9A067106566B;
	Tue, 28 Oct 2008 15:31:09 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id 29F748FC1D;
	Tue, 28 Oct 2008 15:31:09 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1])
	(authenticated bits=0)
	by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9SFUCWn024647;
	Tue, 28 Oct 2008 11:30:57 -0400 (EDT) (envelope-from jhb@freebsd.org)
From: John Baldwin 
To: "M. Warner Losh" 
Date: Tue, 28 Oct 2008 11:08:05 -0400
User-Agent: KMail/1.9.7
References: <200810241031.08780.jhb@freebsd.org>
	<200810271159.31843.jhb@freebsd.org>
	<20081027.221910.1508179985.imp@bsdimp.com>
In-Reply-To: <20081027.221910.1508179985.imp@bsdimp.com>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200810281108.06010.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]);
	Tue, 28 Oct 2008 11:30:57 -0400 (EDT)
X-Virus-Scanned: ClamAV 0.93.1/8526/Tue Oct 28 09:21:35 2008 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=AWL,BAYES_00,NO_RELAYS 
	autolearn=ham version=3.1.3
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx
Cc: danfe@freebsd.org, marcel@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org, svn-src-head@freebsd.org, des@des.no
Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 15:31:09 -0000

On Tuesday 28 October 2008 12:19:10 am M. Warner Losh wrote:
> In message: <200810271159.31843.jhb@freebsd.org>
>             John Baldwin  writes:
> : On Friday 24 October 2008 06:47:40 pm Warner Losh wrote:
> : > From: John Baldwin 
> : > Subject: Re: svn commit: r184193 - in head/sys: arm/conf conf
> : > Date: Fri, 24 Oct 2008 10:31:07 -0400
> : > 
> : > > On Friday 24 October 2008 09:27:03 am Alexey Dokuchaev wrote:
> : > > > On Fri, Oct 24, 2008 at 03:26:43AM +0200, Dag-Erling Sm??rgrav 
wrote:
> : > > > > Warner Losh  writes:
> : > > > > > We already have a better mechanism for including config files.  
We
> : > > > > > should be using that instead of poluting another port with the
> : > > > > > DEFAULTS file.
> : > > > > 
> : > > > > Should we even have DEFAULTS files at all?  IMHO they just confuse
> : > > > > matters by introducing "stealth" options into your config.
> : > > > 
> : > > > I tend to second this.  I always try to get everything possible out 
of
> : > > > my kernel to modules, and thus was surprised to see io.ko and mem.ko
> : > > > fail to load because they were silently included into my custom 
kernel.
> : > > > 
> : > > > I understand that some things like 'device isa' and
> : > > > 'device npx' aren't really optional, but if something is useful to 
have,
> : > > > but can be loaded as a module, it belongs to GENERIC rather than
> : > > > DEFAULTS.  Killing the latter altogether and throwing a comment that
> : > > > says particular option or device is mandatory in GENERIC is probably
> : > > > even better (and more transparent).
> : > > 
> : > > The one thing I think DEFAULTS is useful for are replacing NO_FOO 
options 
> : with 
> : > > FOO options.  That is, if someone wants to turn a feature on by 
default, 
> : I'd 
> : > > rather them put 'options FOO' in DEFAULTS rather than rename all the 
> : > > #ifdef's,e tc. to '#ifndef NO_FOO'.
> : > 
> : > Wouldn't it be better to move to a system where we explicitly include
> : > std.i386 and have them all defined there?  We already encourage stuff
> : > like this with advice to include GENERIC with nodev...
> : 
> : I wouldn't mind a std.i386, and if we make config's include keyword fall 
back 
> : to 'sys/conf' for relative path name lookups if the lookup in '.' fails 
then 
> : you can even put those files in sys/conf with the still-clean syntax 
> : of 'include std.i386'.
> 
> Already works that way...
> 
> : However, I don't know about you, but I _never_ build a config by including 
> : GENERIC and then weeding stuff out.  Too much stuff to weed out.  Once I 
have 
> : a customized config for a machine I then include that in development 
branches 
> : to install kernels to different directories under /boot, etc.
> 
> Yea,  Well, I was thinking of std.firewire, et al.  Trouble is we'd
> then have to slice thing by bus (std.pccard, std.cardbus, std.pci,
> std.iic, std.usb) and by function (std.wireless, std.scsi, std.serial)
> which slices across different functional groups...
> 
> Warner
> 
> P.S.  Here's a diff of something we can do today...  This is just a
> quickie demo, not a proposed patch to the tree...  It also assumes
> that we have nocpu defined in config, which I haven't verified.

I wouldn't bother doing the CPU bits yet, I would just rename the existing 
DEFAULTS files and then remove the code from config(8) to auto-include 
DEFAULTS.  Then if you wanted to do further tweaks to std. you can do 
that later.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 15:31:17 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E745F1065879;
	Tue, 28 Oct 2008 15:31:17 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id 68EF68FC1D;
	Tue, 28 Oct 2008 15:31:17 +0000 (UTC) (envelope-from jhb@freebsd.org)
Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1])
	(authenticated bits=0)
	by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9SFUCWp024647;
	Tue, 28 Oct 2008 11:31:11 -0400 (EDT) (envelope-from jhb@freebsd.org)
From: John Baldwin 
To: "Bjoern A. Zeeb" 
Date: Tue, 28 Oct 2008 11:11:48 -0400
User-Agent: KMail/1.9.7
References: <200810271515.m9RFF86d042970@svn.freebsd.org>
	<200810271418.41291.jhb@freebsd.org>
	<20081028065010.A2978@maildrop.int.zabbadoz.net>
In-Reply-To: <20081028065010.A2978@maildrop.int.zabbadoz.net>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200810281111.48833.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]);
	Tue, 28 Oct 2008 11:31:11 -0400 (EDT)
X-Virus-Scanned: ClamAV 0.93.1/8526/Tue Oct 28 09:21:35 2008 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS 
	autolearn=ham version=3.1.3
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r184341 - head/usr.sbin
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 15:31:18 -0000

On Tuesday 28 October 2008 02:56:23 am Bjoern A. Zeeb wrote:
> On Mon, 27 Oct 2008, John Baldwin wrote:
> 
> > On Monday 27 October 2008 11:15:08 am Bjoern A. Zeeb wrote:
> >> Author: bz
> >> Date: Mon Oct 27 15:15:08 2008
> >> New Revision: 184341
> >> URL: http://svn.freebsd.org/changeset/base/184341
> >>
> >> Log:
> >>   We do not have a libkse anymore and Mk/bsd.* does not know
> >>   about LIBKSE anymore, so s,MK_LIBKSE,MK_LIBPTHREAD,.
> >
> > Shouldn't you just remove it instead?  These two options are now basically
> > identical.  (We probably should rename libthr to libpthread at some 
point.)
> 
> tools/build/options/WITHOUT_LIBPTHREAD still talks about kse and thus
> does src.conf(5).

That should be updated.

> I wouldn't object to removing one of the options but according to the
> src.conf my bet would be LIBTHR and not LIBPTHREAD.
> So updating the documentation might be a good initial step as well.

Note that MK_LIBTHR == "NO" implies MK_LIBPTHREAD == "NO" (see bsd.own.mk), 
but not the other way around.  So for now the correct knob to check in 
Makefiles is MK_LIBTHR (since it gets set to NO in both the WITHOUT_LIBTHR 
and WITHOUT_LIBPTHREAD cases, but MK_LIBPTHREAD isn't set to NO if you just 
do WITHOUT_LIBTHR).

> I have to admit that I lost track about our threading libs in
> different branches at one time; how many are left in head - 1 or 2?
> Is only libthr left and we build it as libthr and add symlinks for
> libpthread?

Yes.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 15:53:04 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 282BD1065683;
	Tue, 28 Oct 2008 15:53:04 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85])
	by mx1.freebsd.org (Postfix) with ESMTP id D97678FC16;
	Tue, 28 Oct 2008 15:53:03 +0000 (UTC) (envelope-from imp@bsdimp.com)
Received: from localhost (localhost [127.0.0.1])
	by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m9SFqj2g025717;
	Tue, 28 Oct 2008 09:52:45 -0600 (MDT) (envelope-from imp@bsdimp.com)
Date: Tue, 28 Oct 2008 09:53:56 -0600 (MDT)
Message-Id: <20081028.095356.2040345174.imp@bsdimp.com>
To: stas@FreeBSD.org
From: "M. Warner Losh" 
In-Reply-To: <20081028104435.50b3fb0f.stas@FreeBSD.org>
References: <0BBCA616-4F9D-48D5-9360-CACA69480632@mac.com>
	<20081027.214547.709404828.imp@bsdimp.com>
	<20081028104435.50b3fb0f.stas@FreeBSD.org>
X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI)
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, xcllnt@mac.com,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 15:53:04 -0000

In message: <20081028104435.50b3fb0f.stas@FreeBSD.org>
            Stanislav Sedov  writes:
: On Mon, 27 Oct 2008 21:45:47 -0600 (MDT)
: "M. Warner Losh"  mentioned:
: 
: > 
: > I tend to think that we should handle the partitioning in GEOM, with
: > higher level things figuring the rest out.  We should expose flash,
: > and its properties upstream in GEOM, but not have a separate layer for
: > flash ala mdt.
: > 
: 
: Yeah, GEOM is the right place for this kind of stuff, indeed. Wear levering
: and similar things could be provided via GEOM too, probably.

Especially if the wear averaging were optional.  Then we could put
'legacy' file systems on top of the wear averaging layer, but could
also develop more optimized file systems with wear averaging built
in.  Which one to use can also be highly application specific for the
best performance.  The story from the Linux world indicates that many
applications just don't matter, but the ones that do often depend on a
specific type of flash is used.  NAND and NOR memories have very
different performance characteristics, and papers presented at Linux
conferences show gains for teams that have created new file systems
for the specific type of flash.

Right now, I expose the SPI flash as 1056 byte blocks (since that's
the size of the block).  A wear averaging layer would write metadata
in the 32 bytes and expose 1024 or 512 byte blocks...

Warner

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 17:01:17 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4348B106566B;
	Tue, 28 Oct 2008 17:01:17 +0000 (UTC)
	(envelope-from csjp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 32AE78FC08;
	Tue, 28 Oct 2008 17:01:17 +0000 (UTC)
	(envelope-from csjp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SH1HJo099159;
	Tue, 28 Oct 2008 17:01:17 GMT (envelope-from csjp@svn.freebsd.org)
Received: (from csjp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SH1H89099158;
	Tue, 28 Oct 2008 17:01:17 GMT (envelope-from csjp@svn.freebsd.org)
Message-Id: <200810281701.m9SH1H89099158@svn.freebsd.org>
From: "Christian S.J. Peron" 
Date: Tue, 28 Oct 2008 17:01:17 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184417 - in stable/7/sys: . kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 17:01:17 -0000

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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 17:15:46 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ADF4F1065685;
	Tue, 28 Oct 2008 17:15:46 +0000 (UTC)
	(envelope-from rdivacky@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 84A438FC1A;
	Tue, 28 Oct 2008 17:15:46 +0000 (UTC)
	(envelope-from rdivacky@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SHFkYA099448;
	Tue, 28 Oct 2008 17:15:46 GMT
	(envelope-from rdivacky@svn.freebsd.org)
Received: (from rdivacky@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SHFkRV099447;
	Tue, 28 Oct 2008 17:15:46 GMT
	(envelope-from rdivacky@svn.freebsd.org)
Message-Id: <200810281715.m9SHFkRV099447@svn.freebsd.org>
From: Roman Divacky 
Date: Tue, 28 Oct 2008 17:15:46 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184418 - head/bin/rcp
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 17:15:46 -0000

Author: rdivacky
Date: Tue Oct 28 17:15:46 2008
New Revision: 184418
URL: http://svn.freebsd.org/changeset/base/184418

Log:
  Remove superfluous va_end which was left there in rev 1.38.
  
  Approved by: kib (mentor)

Modified:
  head/bin/rcp/rcp.c

Modified: head/bin/rcp/rcp.c
==============================================================================
--- head/bin/rcp/rcp.c	Tue Oct 28 17:01:16 2008	(r184417)
+++ head/bin/rcp/rcp.c	Tue Oct 28 17:15:46 2008	(r184418)
@@ -789,6 +789,4 @@ run_err(const char *fmt, ...)
 		vwarnx(fmt, ap);
 		va_end(ap);
 	}
-
-	va_end(ap);
 }

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:08:27 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0746C10656AB;
	Tue, 28 Oct 2008 21:08:27 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id A904F904A7;
	Tue, 28 Oct 2008 19:50:50 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SJoonJ002446;
	Tue, 28 Oct 2008 19:50:50 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SJoo4F002444;
	Tue, 28 Oct 2008 19:50:50 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200810281950.m9SJoo4F002444@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 28 Oct 2008 19:50:50 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org
X-SVN-Group: stable-6
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184421 - stable/6/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:08:27 -0000

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

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

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

Modified: stable/6/share/zoneinfo/southamerica
==============================================================================
--- stable/6/share/zoneinfo/southamerica	Tue Oct 28 19:50:33 2008	(r184420)
+++ stable/6/share/zoneinfo/southamerica	Tue Oct 28 19:50:50 2008	(r184421)
@@ -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/6/share/zoneinfo/zone.tab
==============================================================================
--- stable/6/share/zoneinfo/zone.tab	Tue Oct 28 19:50:33 2008	(r184420)
+++ stable/6/share/zoneinfo/zone.tab	Tue Oct 28 19:50:50 2008	(r184421)
@@ -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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:08:28 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 9F0DB10657B5;
	Tue, 28 Oct 2008 21:08:28 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E520090457;
	Tue, 28 Oct 2008 19:48:58 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SJmwhI002341;
	Tue, 28 Oct 2008 19:48:58 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SJmwDb002340;
	Tue, 28 Oct 2008 19:48:58 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <200810281948.m9SJmwDb002340@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 28 Oct 2008 19:48:58 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184419 - head/sys/sys
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:08:29 -0000

Author: trasz
Date: Tue Oct 28 19:48:58 2008
New Revision: 184419
URL: http://svn.freebsd.org/changeset/base/184419

Log:
  Bump __FreeBSD_version after accmode_t introduction.
  
  Approved by:	rwatson (mentor)

Modified:
  head/sys/sys/param.h

Modified: head/sys/sys/param.h
==============================================================================
--- head/sys/sys/param.h	Tue Oct 28 17:15:46 2008	(r184418)
+++ head/sys/sys/param.h	Tue Oct 28 19:48:58 2008	(r184419)
@@ -57,7 +57,7 @@
  *		is created, otherwise 1.
  */
 #undef __FreeBSD_version
-#define __FreeBSD_version 800051	/* Master, propagated to newvers */
+#define __FreeBSD_version 800052	/* Master, propagated to newvers */
 
 #ifndef LOCORE
 #include 

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:08:29 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A9ECA10657BA;
	Tue, 28 Oct 2008 21:08:28 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EE8859056B;
	Tue, 28 Oct 2008 19:52:56 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SJqukM002542;
	Tue, 28 Oct 2008 19:52:56 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SJquPl002540;
	Tue, 28 Oct 2008 19:52:56 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200810281952.m9SJquPl002540@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 28 Oct 2008 19:52:56 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184422 - releng/6.4/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:08:30 -0000

Author: edwin
Date: Tue Oct 28 19:52:56 2008
New Revision: 184422
URL: http://svn.freebsd.org/changeset/base/184422

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

Modified:
  releng/6.4/share/zoneinfo/   (props changed)
  releng/6.4/share/zoneinfo/southamerica
  releng/6.4/share/zoneinfo/zone.tab

Modified: releng/6.4/share/zoneinfo/southamerica
==============================================================================
--- releng/6.4/share/zoneinfo/southamerica	Tue Oct 28 19:50:50 2008	(r184421)
+++ releng/6.4/share/zoneinfo/southamerica	Tue Oct 28 19:52:56 2008	(r184422)
@@ -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: releng/6.4/share/zoneinfo/zone.tab
==============================================================================
--- releng/6.4/share/zoneinfo/zone.tab	Tue Oct 28 19:50:50 2008	(r184421)
+++ releng/6.4/share/zoneinfo/zone.tab	Tue Oct 28 19:52:56 2008	(r184422)
@@ -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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:08:30 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B61F310657C2;
	Tue, 28 Oct 2008 21:08:28 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id EF0A19049F;
	Tue, 28 Oct 2008 19:50:33 +0000 (UTC)
	(envelope-from edwin@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SJoXIk002405;
	Tue, 28 Oct 2008 19:50:33 GMT (envelope-from edwin@svn.freebsd.org)
Received: (from edwin@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SJoXh7002403;
	Tue, 28 Oct 2008 19:50:33 GMT (envelope-from edwin@svn.freebsd.org)
Message-Id: <200810281950.m9SJoXh7002403@svn.freebsd.org>
From: Edwin Groothuis 
Date: Tue, 28 Oct 2008 19:50:33 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184420 - stable/7/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:08:30 -0000

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 owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:53:11 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1F169106564A;
	Tue, 28 Oct 2008 21:53:11 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0A9E28FC16;
	Tue, 28 Oct 2008 21:53:11 +0000 (UTC)
	(envelope-from rwatson@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SLrBof004842;
	Tue, 28 Oct 2008 21:53:11 GMT (envelope-from rwatson@svn.freebsd.org)
Received: (from rwatson@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SLrA9H004839;
	Tue, 28 Oct 2008 21:53:10 GMT (envelope-from rwatson@svn.freebsd.org)
Message-Id: <200810282153.m9SLrA9H004839@svn.freebsd.org>
From: Robert Watson 
Date: Tue, 28 Oct 2008 21:53:10 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184425 - in head/sys: conf security/mac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:53:11 -0000

Author: rwatson
Date: Tue Oct 28 21:53:10 2008
New Revision: 184425
URL: http://svn.freebsd.org/changeset/base/184425

Log:
  Break out strictly credential-related portions of mac_process.c into a
  new file, mac_cred.c.
  
  Obtained from:	TrustedBSD Project

Added:
  head/sys/security/mac/mac_cred.c   (contents, props changed)
     - copied, changed from r184412, head/sys/security/mac/mac_process.c
Modified:
  head/sys/conf/files
  head/sys/security/mac/mac_process.c

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue Oct 28 21:05:09 2008	(r184424)
+++ head/sys/conf/files	Tue Oct 28 21:53:10 2008	(r184425)
@@ -2175,6 +2175,7 @@ security/audit/audit_trigger.c	optional 
 security/audit/audit_worker.c	optional audit
 security/mac/mac_atalk.c	optional mac netatalk
 security/mac/mac_audit.c	optional mac audit
+security/mac/mac_cred.c		optional mac
 security/mac/mac_framework.c	optional mac
 security/mac/mac_inet.c		optional mac inet
 security/mac/mac_inet6.c	optional mac inet6

Copied and modified: head/sys/security/mac/mac_cred.c (from r184412, head/sys/security/mac/mac_process.c)
==============================================================================
--- head/sys/security/mac/mac_process.c	Tue Oct 28 12:49:07 2008	(r184412, copy source)
+++ head/sys/security/mac/mac_cred.c	Tue Oct 28 21:53:10 2008	(r184425)
@@ -71,19 +71,6 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 
-static int	mac_mmap_revocation = 1;
-SYSCTL_INT(_security_mac, OID_AUTO, mmap_revocation, CTLFLAG_RW,
-    &mac_mmap_revocation, 0, "Revoke mmap access to files on subject "
-    "relabel");
-
-static int	mac_mmap_revocation_via_cow = 0;
-SYSCTL_INT(_security_mac, OID_AUTO, mmap_revocation_via_cow, CTLFLAG_RW,
-    &mac_mmap_revocation_via_cow, 0, "Revoke mmap access to files via "
-    "copy-on-write semantics, or by removing all write access");
-
-static void	mac_proc_vm_revoke_recurse(struct thread *td,
-		    struct ucred *cred, struct vm_map *map);
-
 struct label *
 mac_cred_label_alloc(void)
 {
@@ -104,26 +91,6 @@ mac_cred_init(struct ucred *cred)
 		cred->cr_label = NULL;
 }
 
-static struct label *
-mac_proc_label_alloc(void)
-{
-	struct label *label;
-
-	label = mac_labelzone_alloc(M_WAITOK);
-	MAC_PERFORM(proc_init_label, label);
-	return (label);
-}
-
-void
-mac_proc_init(struct proc *p)
-{
-
-	if (mac_labeled & MPC_OBJECT_PROC)
-		p->p_label = mac_proc_label_alloc();
-	else
-		p->p_label = NULL;
-}
-
 void
 mac_cred_label_free(struct label *label)
 {
@@ -142,24 +109,6 @@ mac_cred_destroy(struct ucred *cred)
 	}
 }
 
-static void
-mac_proc_label_free(struct label *label)
-{
-
-	MAC_PERFORM(proc_destroy_label, label);
-	mac_labelzone_free(label);
-}
-
-void
-mac_proc_destroy(struct proc *p)
-{
-
-	if (p->p_label != NULL) {
-		mac_proc_label_free(p->p_label);
-		p->p_label = NULL;
-	}
-}
-
 /*
  * When a thread becomes an NFS server daemon, its credential may need to be
  * updated to reflect this so that policies can recognize when file system
@@ -219,13 +168,6 @@ mac_cred_internalize_label(struct label 
 	return (error);
 }
 
-void
-mac_thread_userret(struct thread *td)
-{
-
-	MAC_PERFORM(thread_userret, td);
-}
-
 /*
  * When a new process is created, its label must be initialized.  Generally,
  * this involves inheritence from the parent process, modulo possible deltas.
@@ -238,252 +180,6 @@ mac_cred_copy(struct ucred *src, struct 
 	MAC_PERFORM(cred_copy_label, src->cr_label, dest->cr_label);
 }
 
-int
-mac_execve_enter(struct image_params *imgp, struct mac *mac_p)
-{
-	struct label *label;
-	struct mac mac;
-	char *buffer;
-	int error;
-
-	if (mac_p == NULL)
-		return (0);
-
-	if (!(mac_labeled & MPC_OBJECT_CRED))
-		return (EINVAL);
-
-	error = copyin(mac_p, &mac, sizeof(mac));
-	if (error)
-		return (error);
-
-	error = mac_check_structmac_consistent(&mac);
-	if (error)
-		return (error);
-
-	buffer = malloc(mac.m_buflen, M_MACTEMP, M_WAITOK);
-	error = copyinstr(mac.m_string, buffer, mac.m_buflen, NULL);
-	if (error) {
-		free(buffer, M_MACTEMP);
-		return (error);
-	}
-
-	label = mac_cred_label_alloc();
-	error = mac_cred_internalize_label(label, buffer);
-	free(buffer, M_MACTEMP);
-	if (error) {
-		mac_cred_label_free(label);
-		return (error);
-	}
-	imgp->execlabel = label;
-	return (0);
-}
-
-void
-mac_execve_exit(struct image_params *imgp)
-{
-	if (imgp->execlabel != NULL) {
-		mac_cred_label_free(imgp->execlabel);
-		imgp->execlabel = NULL;
-	}
-}
-
-void
-mac_execve_interpreter_enter(struct vnode *interpvp,
-    struct label **interpvplabel)
-{
-
-	if (mac_labeled & MPC_OBJECT_VNODE) {
-		*interpvplabel = mac_vnode_label_alloc();
-		mac_vnode_copy_label(interpvp->v_label, *interpvplabel);
-	} else
-		*interpvplabel = NULL;
-}
-
-void
-mac_execve_interpreter_exit(struct label *interpvplabel)
-{
-
-	if (interpvplabel != NULL)
-		mac_vnode_label_free(interpvplabel);
-}
-
-/*
- * When relabeling a process, call out to the policies for the maximum
- * permission allowed for each object type we know about in its memory space,
- * and revoke access (in the least surprising ways we know) when necessary.
- * The process lock is not held here.
- */
-void
-mac_proc_vm_revoke(struct thread *td)
-{
-	struct ucred *cred;
-
-	PROC_LOCK(td->td_proc);
-	cred = crhold(td->td_proc->p_ucred);
-	PROC_UNLOCK(td->td_proc);
-
-	/* XXX freeze all other threads */
-	mac_proc_vm_revoke_recurse(td, cred,
-	    &td->td_proc->p_vmspace->vm_map);
-	/* XXX allow other threads to continue */
-
-	crfree(cred);
-}
-
-static __inline const char *
-prot2str(vm_prot_t prot)
-{
-
-	switch (prot & VM_PROT_ALL) {
-	case VM_PROT_READ:
-		return ("r--");
-	case VM_PROT_READ | VM_PROT_WRITE:
-		return ("rw-");
-	case VM_PROT_READ | VM_PROT_EXECUTE:
-		return ("r-x");
-	case VM_PROT_READ | VM_PROT_WRITE | VM_PROT_EXECUTE:
-		return ("rwx");
-	case VM_PROT_WRITE:
-		return ("-w-");
-	case VM_PROT_EXECUTE:
-		return ("--x");
-	case VM_PROT_WRITE | VM_PROT_EXECUTE:
-		return ("-wx");
-	default:
-		return ("---");
-	}
-}
-
-static void
-mac_proc_vm_revoke_recurse(struct thread *td, struct ucred *cred,
-    struct vm_map *map)
-{
-	struct vm_map_entry *vme;
-	int vfslocked, result;
-	vm_prot_t revokeperms;
-	vm_object_t backing_object, object;
-	vm_ooffset_t offset;
-	struct vnode *vp;
-	struct mount *mp;
-
-	if (!mac_mmap_revocation)
-		return;
-
-	vm_map_lock_read(map);
-	for (vme = map->header.next; vme != &map->header; vme = vme->next) {
-		if (vme->eflags & MAP_ENTRY_IS_SUB_MAP) {
-			mac_proc_vm_revoke_recurse(td, cred,
-			    vme->object.sub_map);
-			continue;
-		}
-		/*
-		 * Skip over entries that obviously are not shared.
-		 */
-		if (vme->eflags & (MAP_ENTRY_COW | MAP_ENTRY_NOSYNC) ||
-		    !vme->max_protection)
-			continue;
-		/*
-		 * Drill down to the deepest backing object.
-		 */
-		offset = vme->offset;
-		object = vme->object.vm_object;
-		if (object == NULL)
-			continue;
-		VM_OBJECT_LOCK(object);
-		while ((backing_object = object->backing_object) != NULL) {
-			VM_OBJECT_LOCK(backing_object);
-			offset += object->backing_object_offset;
-			VM_OBJECT_UNLOCK(object);
-			object = backing_object;
-		}
-		VM_OBJECT_UNLOCK(object);
-		/*
-		 * At the moment, vm_maps and objects aren't considered by
-		 * the MAC system, so only things with backing by a normal
-		 * object (read: vnodes) are checked.
-		 */
-		if (object->type != OBJT_VNODE)
-			continue;
-		vp = (struct vnode *)object->handle;
-		vfslocked = VFS_LOCK_GIANT(vp->v_mount);
-		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-		result = vme->max_protection;
-		mac_vnode_check_mmap_downgrade(cred, vp, &result);
-		VOP_UNLOCK(vp, 0);
-		/*
-		 * Find out what maximum protection we may be allowing now
-		 * but a policy needs to get removed.
-		 */
-		revokeperms = vme->max_protection & ~result;
-		if (!revokeperms) {
-			VFS_UNLOCK_GIANT(vfslocked);
-			continue;
-		}
-		printf("pid %ld: revoking %s perms from %#lx:%ld "
-		    "(max %s/cur %s)\n", (long)td->td_proc->p_pid,
-		    prot2str(revokeperms), (u_long)vme->start,
-		    (long)(vme->end - vme->start),
-		    prot2str(vme->max_protection), prot2str(vme->protection));
-		vm_map_lock_upgrade(map);
-		/*
-		 * This is the really simple case: if a map has more
-		 * max_protection than is allowed, but it's not being
-		 * actually used (that is, the current protection is still
-		 * allowed), we can just wipe it out and do nothing more.
-		 */
-		if ((vme->protection & revokeperms) == 0) {
-			vme->max_protection -= revokeperms;
-		} else {
-			if (revokeperms & VM_PROT_WRITE) {
-				/*
-				 * In the more complicated case, flush out all
-				 * pending changes to the object then turn it
-				 * copy-on-write.
-				 */
-				vm_object_reference(object);
-				(void) vn_start_write(vp, &mp, V_WAIT);
-				vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
-				VM_OBJECT_LOCK(object);
-				vm_object_page_clean(object,
-				    OFF_TO_IDX(offset),
-				    OFF_TO_IDX(offset + vme->end - vme->start +
-					PAGE_MASK),
-				    OBJPC_SYNC);
-				VM_OBJECT_UNLOCK(object);
-				VOP_UNLOCK(vp, 0);
-				vn_finished_write(mp);
-				vm_object_deallocate(object);
-				/*
-				 * Why bother if there's no read permissions
-				 * anymore?  For the rest, we need to leave
-				 * the write permissions on for COW, or
-				 * remove them entirely if configured to.
-				 */
-				if (!mac_mmap_revocation_via_cow) {
-					vme->max_protection &= ~VM_PROT_WRITE;
-					vme->protection &= ~VM_PROT_WRITE;
-				} if ((revokeperms & VM_PROT_READ) == 0)
-					vme->eflags |= MAP_ENTRY_COW |
-					    MAP_ENTRY_NEEDS_COPY;
-			}
-			if (revokeperms & VM_PROT_EXECUTE) {
-				vme->max_protection &= ~VM_PROT_EXECUTE;
-				vme->protection &= ~VM_PROT_EXECUTE;
-			}
-			if (revokeperms & VM_PROT_READ) {
-				vme->max_protection = 0;
-				vme->protection = 0;
-			}
-			pmap_protect(map->pmap, vme->start, vme->end,
-			    vme->protection & ~revokeperms);
-			vm_map_simplify_entry(map, vme);
-		}
-		vm_map_lock_downgrade(map);
-		VFS_UNLOCK_GIANT(vfslocked);
-	}
-	vm_map_unlock_read(map);
-}
-
 /*
  * When the subject's label changes, it may require revocation of privilege
  * to mapped objects.  This can't be done on-the-fly later with a unified
@@ -515,160 +211,3 @@ mac_cred_check_visible(struct ucred *cr1
 
 	return (error);
 }
-
-int
-mac_proc_check_debug(struct ucred *cred, struct proc *p)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_debug, cred, p);
-
-	return (error);
-}
-
-int
-mac_proc_check_sched(struct ucred *cred, struct proc *p)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_sched, cred, p);
-
-	return (error);
-}
-
-int
-mac_proc_check_signal(struct ucred *cred, struct proc *p, int signum)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_signal, cred, p, signum);
-
-	return (error);
-}
-
-int
-mac_proc_check_setuid(struct proc *p, struct ucred *cred, uid_t uid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setuid, cred, uid);
-	return (error);
-}
-
-int
-mac_proc_check_seteuid(struct proc *p, struct ucred *cred, uid_t euid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_seteuid, cred, euid);
-	return (error);
-}
-
-int
-mac_proc_check_setgid(struct proc *p, struct ucred *cred, gid_t gid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setgid, cred, gid);
-
-	return (error);
-}
-
-int
-mac_proc_check_setegid(struct proc *p, struct ucred *cred, gid_t egid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setegid, cred, egid);
-
-	return (error);
-}
-
-int
-mac_proc_check_setgroups(struct proc *p, struct ucred *cred, int ngroups,
-    gid_t *gidset)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setgroups, cred, ngroups, gidset);
-	return (error);
-}
-
-int
-mac_proc_check_setreuid(struct proc *p, struct ucred *cred, uid_t ruid,
-    uid_t euid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setreuid, cred, ruid, euid);
-
-	return (error);
-}
-
-int
-mac_proc_check_setregid(struct proc *proc, struct ucred *cred, gid_t rgid,
-    gid_t egid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(proc, MA_OWNED);
-
-	MAC_CHECK(proc_check_setregid, cred, rgid, egid);
-
-	return (error);
-}
-
-int
-mac_proc_check_setresuid(struct proc *p, struct ucred *cred, uid_t ruid,
-    uid_t euid, uid_t suid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setresuid, cred, ruid, euid, suid);
-	return (error);
-}
-
-int
-mac_proc_check_setresgid(struct proc *p, struct ucred *cred, gid_t rgid,
-    gid_t egid, gid_t sgid)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_setresgid, cred, rgid, egid, sgid);
-
-	return (error);
-}
-
-int
-mac_proc_check_wait(struct ucred *cred, struct proc *p)
-{
-	int error;
-
-	PROC_LOCK_ASSERT(p, MA_OWNED);
-
-	MAC_CHECK(proc_check_wait, cred, p);
-
-	return (error);
-}

Modified: head/sys/security/mac/mac_process.c
==============================================================================
--- head/sys/security/mac/mac_process.c	Tue Oct 28 21:05:09 2008	(r184424)
+++ head/sys/security/mac/mac_process.c	Tue Oct 28 21:53:10 2008	(r184425)
@@ -84,26 +84,6 @@ SYSCTL_INT(_security_mac, OID_AUTO, mmap
 static void	mac_proc_vm_revoke_recurse(struct thread *td,
 		    struct ucred *cred, struct vm_map *map);
 
-struct label *
-mac_cred_label_alloc(void)
-{
-	struct label *label;
-
-	label = mac_labelzone_alloc(M_WAITOK);
-	MAC_PERFORM(cred_init_label, label);
-	return (label);
-}
-
-void
-mac_cred_init(struct ucred *cred)
-{
-
-	if (mac_labeled & MPC_OBJECT_CRED)
-		cred->cr_label = mac_cred_label_alloc();
-	else
-		cred->cr_label = NULL;
-}
-
 static struct label *
 mac_proc_label_alloc(void)
 {
@@ -124,24 +104,6 @@ mac_proc_init(struct proc *p)
 		p->p_label = NULL;
 }
 
-void
-mac_cred_label_free(struct label *label)
-{
-
-	MAC_PERFORM(cred_destroy_label, label);
-	mac_labelzone_free(label);
-}
-
-void
-mac_cred_destroy(struct ucred *cred)
-{
-
-	if (cred->cr_label != NULL) {
-		mac_cred_label_free(cred->cr_label);
-		cred->cr_label = NULL;
-	}
-}
-
 static void
 mac_proc_label_free(struct label *label)
 {
@@ -160,65 +122,6 @@ mac_proc_destroy(struct proc *p)
 	}
 }
 
-/*
- * When a thread becomes an NFS server daemon, its credential may need to be
- * updated to reflect this so that policies can recognize when file system
- * operations originate from the network.
- *
- * At some point, it would be desirable if the credential used for each NFS
- * RPC could be set based on the RPC context (i.e., source system, etc) to
- * provide more fine-grained access control.
- */
-void
-mac_cred_associate_nfsd(struct ucred *cred)
-{
-
-	MAC_PERFORM(cred_associate_nfsd, cred);
-}
-
-/*
- * Initialize MAC label for the first kernel process, from which other kernel
- * processes and threads are spawned.
- */
-void
-mac_cred_create_swapper(struct ucred *cred)
-{
-
-	MAC_PERFORM(cred_create_swapper, cred);
-}
-
-/*
- * Initialize MAC label for the first userland process, from which other
- * userland processes and threads are spawned.
- */
-void
-mac_cred_create_init(struct ucred *cred)
-{
-
-	MAC_PERFORM(cred_create_init, cred);
-}
-
-int
-mac_cred_externalize_label(struct label *label, char *elements,
-    char *outbuf, size_t outbuflen)
-{
-	int error;
-
-	MAC_EXTERNALIZE(cred, label, elements, outbuf, outbuflen);
-
-	return (error);
-}
-
-int
-mac_cred_internalize_label(struct label *label, char *string)
-{
-	int error;
-
-	MAC_INTERNALIZE(cred, label, string);
-
-	return (error);
-}
-
 void
 mac_thread_userret(struct thread *td)
 {
@@ -226,18 +129,6 @@ mac_thread_userret(struct thread *td)
 	MAC_PERFORM(thread_userret, td);
 }
 
-/*
- * When a new process is created, its label must be initialized.  Generally,
- * this involves inheritence from the parent process, modulo possible deltas.
- * This function allows that processing to take place.
- */
-void
-mac_cred_copy(struct ucred *src, struct ucred *dest)
-{
-
-	MAC_PERFORM(cred_copy_label, src->cr_label, dest->cr_label);
-}
-
 int
 mac_execve_enter(struct image_params *imgp, struct mac *mac_p)
 {
@@ -484,38 +375,6 @@ mac_proc_vm_revoke_recurse(struct thread
 	vm_map_unlock_read(map);
 }
 
-/*
- * When the subject's label changes, it may require revocation of privilege
- * to mapped objects.  This can't be done on-the-fly later with a unified
- * buffer cache.
- */
-void
-mac_cred_relabel(struct ucred *cred, struct label *newlabel)
-{
-
-	MAC_PERFORM(cred_relabel, cred, newlabel);
-}
-
-int
-mac_cred_check_relabel(struct ucred *cred, struct label *newlabel)
-{
-	int error;
-
-	MAC_CHECK(cred_check_relabel, cred, newlabel);
-
-	return (error);
-}
-
-int
-mac_cred_check_visible(struct ucred *cr1, struct ucred *cr2)
-{
-	int error;
-
-	MAC_CHECK(cred_check_visible, cr1, cr2);
-
-	return (error);
-}
-
 int
 mac_proc_check_debug(struct ucred *cred, struct proc *p)
 {

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:57:32 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F195D1065688;
	Tue, 28 Oct 2008 21:57:32 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DE3148FC1F;
	Tue, 28 Oct 2008 21:57:32 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SLvWkT004964;
	Tue, 28 Oct 2008 21:57:32 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SLvWrw004963;
	Tue, 28 Oct 2008 21:57:32 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <200810282157.m9SLvWrw004963@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 28 Oct 2008 21:57:32 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184426 - head/sys/security/mac_stub
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:57:33 -0000

Author: trasz
Date: Tue Oct 28 21:57:32 2008
New Revision: 184426
URL: http://svn.freebsd.org/changeset/base/184426

Log:
  Commit part of accmode_t changes that I missed in previous commit.
  
  Approved by:	rwatson (mentor)

Modified:
  head/sys/security/mac_stub/mac_stub.c

Modified: head/sys/security/mac_stub/mac_stub.c
==============================================================================
--- head/sys/security/mac_stub/mac_stub.c	Tue Oct 28 21:53:10 2008	(r184425)
+++ head/sys/security/mac_stub/mac_stub.c	Tue Oct 28 21:57:32 2008	(r184426)
@@ -1215,7 +1215,7 @@ stub_vnode_associate_singlelabel(struct 
 
 static int
 stub_vnode_check_access(struct ucred *cred, struct vnode *vp,
-    struct label *vplabel, int acc_mode)
+    struct label *vplabel, accmode_t accmode)
 {
 
 	return (0);

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 21:58:48 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A5B9B106567D;
	Tue, 28 Oct 2008 21:58:48 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 92B0C8FC0A;
	Tue, 28 Oct 2008 21:58:48 +0000 (UTC)
	(envelope-from trasz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SLwm8o005027;
	Tue, 28 Oct 2008 21:58:48 GMT (envelope-from trasz@svn.freebsd.org)
Received: (from trasz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SLwmF4005026;
	Tue, 28 Oct 2008 21:58:48 GMT (envelope-from trasz@svn.freebsd.org)
Message-Id: <200810282158.m9SLwmF4005026@svn.freebsd.org>
From: Edward Tomasz Napierala 
Date: Tue, 28 Oct 2008 21:58:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184427 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 21:58:48 -0000

Author: trasz
Date: Tue Oct 28 21:58:48 2008
New Revision: 184427
URL: http://svn.freebsd.org/changeset/base/184427

Log:
  Rename a variable missed in previous accmode_t-related commits.
  
  Approved by:	rwatson (mentor)

Modified:
  head/sys/kern/subr_acl_posix1e.c

Modified: head/sys/kern/subr_acl_posix1e.c
==============================================================================
--- head/sys/kern/subr_acl_posix1e.c	Tue Oct 28 21:57:32 2008	(r184426)
+++ head/sys/kern/subr_acl_posix1e.c	Tue Oct 28 21:58:48 2008	(r184427)
@@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$");
  */
 int
 vaccess_acl_posix1e(enum vtype type, uid_t file_uid, gid_t file_gid,
-    struct acl *acl, accmode_t acc_mode, struct ucred *cred, int *privused)
+    struct acl *acl, accmode_t accmode, struct ucred *cred, int *privused)
 {
 	struct acl_entry *acl_other, *acl_mask;
 	accmode_t dac_granted;
@@ -81,23 +81,23 @@ vaccess_acl_posix1e(enum vtype type, uid
 	priv_granted = 0;
 
 	if (type == VDIR) {
-		if ((acc_mode & VEXEC) && !priv_check_cred(cred,
+		if ((accmode & VEXEC) && !priv_check_cred(cred,
 		     PRIV_VFS_LOOKUP, 0))
 			priv_granted |= VEXEC;
 	} else {
-		if ((acc_mode & VEXEC) && !priv_check_cred(cred,
+		if ((accmode & VEXEC) && !priv_check_cred(cred,
 		    PRIV_VFS_EXEC, 0))
 			priv_granted |= VEXEC;
 	}
 
-	if ((acc_mode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ, 0))
+	if ((accmode & VREAD) && !priv_check_cred(cred, PRIV_VFS_READ, 0))
 		priv_granted |= VREAD;
 
-	if (((acc_mode & VWRITE) || (acc_mode & VAPPEND)) &&
+	if (((accmode & VWRITE) || (accmode & VAPPEND)) &&
 	    !priv_check_cred(cred, PRIV_VFS_WRITE, 0))
 		priv_granted |= (VWRITE | VAPPEND);
 
-	if ((acc_mode & VADMIN) && !priv_check_cred(cred, PRIV_VFS_ADMIN, 0))
+	if ((accmode & VADMIN) && !priv_check_cred(cred, PRIV_VFS_ADMIN, 0))
 		priv_granted |= VADMIN;
 
 	/*
@@ -120,14 +120,14 @@ vaccess_acl_posix1e(enum vtype type, uid
 				dac_granted |= VREAD;
 			if (acl->acl_entry[i].ae_perm & ACL_WRITE)
 				dac_granted |= (VWRITE | VAPPEND);
-			if ((acc_mode & dac_granted) == acc_mode)
+			if ((accmode & dac_granted) == accmode)
 				return (0);
 
 			/*
 			 * XXXRW: Do privilege lookup here.
 			 */
-			if ((acc_mode & (dac_granted | priv_granted)) ==
-			    acc_mode) {
+			if ((accmode & (dac_granted | priv_granted)) ==
+			    accmode) {
 				if (privused != NULL)
 					*privused = 1;
 				return (0);
@@ -197,13 +197,13 @@ vaccess_acl_posix1e(enum vtype type, uid
 			if (acl->acl_entry[i].ae_perm & ACL_WRITE)
 				dac_granted |= (VWRITE | VAPPEND);
 			dac_granted &= acl_mask_granted;
-			if ((acc_mode & dac_granted) == acc_mode)
+			if ((accmode & dac_granted) == accmode)
 				return (0);
 			/*
 			 * XXXRW: Do privilege lookup here.
 			 */
-			if ((acc_mode & (dac_granted | priv_granted)) !=
-			    acc_mode)
+			if ((accmode & (dac_granted | priv_granted)) !=
+			    accmode)
 				goto error;
 
 			if (privused != NULL)
@@ -234,7 +234,7 @@ vaccess_acl_posix1e(enum vtype type, uid
 				dac_granted |= (VWRITE | VAPPEND);
 			dac_granted  &= acl_mask_granted;
 
-			if ((acc_mode & dac_granted) == acc_mode)
+			if ((accmode & dac_granted) == accmode)
 				return (0);
 
 			group_matched = 1;
@@ -252,7 +252,7 @@ vaccess_acl_posix1e(enum vtype type, uid
 				dac_granted |= (VWRITE | VAPPEND);
 			dac_granted  &= acl_mask_granted;
 
-			if ((acc_mode & dac_granted) == acc_mode)
+			if ((accmode & dac_granted) == accmode)
 				return (0);
 
 			group_matched = 1;
@@ -285,8 +285,8 @@ vaccess_acl_posix1e(enum vtype type, uid
 				/*
 				 * XXXRW: Do privilege lookup here.
 				 */
-				if ((acc_mode & (dac_granted | priv_granted))
-				    != acc_mode)
+				if ((accmode & (dac_granted | priv_granted))
+				    != accmode)
 					break;
 
 				if (privused != NULL)
@@ -309,8 +309,8 @@ vaccess_acl_posix1e(enum vtype type, uid
 				/*
 				 * XXXRW: Do privilege lookup here.
 				 */
-				if ((acc_mode & (dac_granted | priv_granted))
-				    != acc_mode)
+				if ((accmode & (dac_granted | priv_granted))
+				    != accmode)
 					break;
 
 				if (privused != NULL)
@@ -339,19 +339,19 @@ vaccess_acl_posix1e(enum vtype type, uid
 	if (acl_other->ae_perm & ACL_WRITE)
 		dac_granted |= (VWRITE | VAPPEND);
 
-	if ((acc_mode & dac_granted) == acc_mode)
+	if ((accmode & dac_granted) == accmode)
 		return (0);
 	/*
 	 * XXXRW: Do privilege lookup here.
 	 */
-	if ((acc_mode & (dac_granted | priv_granted)) == acc_mode) {
+	if ((accmode & (dac_granted | priv_granted)) == accmode) {
 		if (privused != NULL)
 			*privused = 1;
 		return (0);
 	}
 
 error:
-	return ((acc_mode & VADMIN) ? EPERM : EACCES);
+	return ((accmode & VADMIN) ? EPERM : EACCES);
 }
 
 /*

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 22:05:21 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4C739106567A;
	Tue, 28 Oct 2008 22:05:21 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 38FD48FC13;
	Tue, 28 Oct 2008 22:05:21 +0000 (UTC)
	(envelope-from marius@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SM5LUe005196;
	Tue, 28 Oct 2008 22:05:21 GMT (envelope-from marius@svn.freebsd.org)
Received: (from marius@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SM5L0H005195;
	Tue, 28 Oct 2008 22:05:21 GMT (envelope-from marius@svn.freebsd.org)
Message-Id: <200810282205.m9SM5L0H005195@svn.freebsd.org>
From: Marius Strobl 
Date: Tue, 28 Oct 2008 22:05:21 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184428 - head/sys/sparc64/pci
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 22:05:21 -0000

Author: marius
Date: Tue Oct 28 22:05:20 2008
New Revision: 184428
URL: http://svn.freebsd.org/changeset/base/184428

Log:
  - Turn off interrupts instead of only entering a critical section
    while doing the block store workaround so we restore the correct
    floating-point registers state in case of nested floating-point
    operations resulting from nested interrupts. This allows the
    VIS-based block copy/zero functions to be used on machines
    requiring this workaround. Alternatively, we could take care of
    saving the floating-point registers here, which would be more
    inefficiently though and also involves turning off interrupts.
  - It turns out that the SCZ_PCI_DMA_SYNC register doesn't work
    like the TOMXMS_PCI_DMA_SYNC_PEND one (but more like the
    corresponding register in of Hummingbird and Sabre bridges)
    and writing the INO of the respective device to it causes a
    Safari bus error. However, due to the Schizo errata I-23,
    SCZ_PCI_DMA_SYNC can't be used as intended either, so remove
    consistent DMA syncing for Schzio bridges for now, which means
    that add-on cards with non-"sun4u compliant" (whatever that
    means exactly) PCI-PCI-bridges should be avoided until the
    proper workaround is implemented. [1]
  
  Reported by:	Michael Moll [1]

Modified:
  head/sys/sparc64/pci/schizo.c

Modified: head/sys/sparc64/pci/schizo.c
==============================================================================
--- head/sys/sparc64/pci/schizo.c	Tue Oct 28 21:58:48 2008	(r184427)
+++ head/sys/sparc64/pci/schizo.c	Tue Oct 28 22:05:20 2008	(r184428)
@@ -175,7 +175,6 @@ struct schizo_dmasync {
 	driver_filter_t		*sds_handler;
 	void			*sds_arg;
 	void			*sds_cookie;
-	bus_size_t		sds_syncreg;
 	uint64_t		sds_syncval;
 	u_int			sds_bswar;
 };
@@ -955,25 +954,25 @@ schizo_dmasync(void *arg)
 	static u_char buf[VIS_BLOCKSIZE] __aligned(VIS_BLOCKSIZE);
 	struct schizo_dmasync *sds = arg;
 	struct schizo_softc *sc = sds->sds_sc;
-	uint64_t reg;
+	register_t reg, s;
 	int timeout;
 
-	SCHIZO_PCI_WRITE_8(sc, sds->sds_syncreg, sds->sds_syncval);
+	SCHIZO_PCI_WRITE_8(sc, TOMXMS_PCI_DMA_SYNC_PEND, sds->sds_syncval);
 	timeout = 1000000;
-	for (; (SCHIZO_PCI_READ_8(sc, sds->sds_syncreg) &
+	for (; (SCHIZO_PCI_READ_8(sc, TOMXMS_PCI_DMA_SYNC_PEND) &
 	    sds->sds_syncval) != 0;)
 		if (--timeout < 0)
 			panic("%s: DMA does not sync", __func__);
 
 	if (sds->sds_bswar != 0) {
-		critical_enter();
+		s = intr_disable();
 		reg = rd(fprs);
 		wr(fprs, reg | FPRS_FEF, 0);
-		__asm__ __volatile__("stda %%f0, [%0] %1"
+		__asm __volatile("stda %%f0, [%0] %1"
 		    : : "r" (buf), "n" (ASI_BLK_COMMIT_S));
-		wr(fprs, reg, 0);
 		membar(Sync);
-		critical_exit();
+		wr(fprs, reg, 0);
+		intr_restore(s);
 	}
 	return (sds->sds_handler(sds->sds_arg));
 }
@@ -1039,8 +1038,8 @@ schizo_setup_intr(device_t dev, device_t
 	}
 
 	/*
-	 * Schizo revision >= 2.3 (i.e. version >= 5) and Tomatillo bridges
-	 * need to be manually told to sync DMA writes.
+	 * Tomatillo and XMITS bridges need to be told to sync DMA writes
+	 * based on the INO of the respective device.
 	 * Tomatillo revision <= 2.3 (i.e. version <= 4) bridges additionally
 	 * need a block store as a workaround for a hardware bug.
 	 * XXX setup of the wrapper and the contents of schizo_dmasync()
@@ -1049,15 +1048,12 @@ schizo_setup_intr(device_t dev, device_t
 	 * is newbus'ified, so the wrapper isn't only applied for interrupt
 	 * handlers but also for polling(4) callbacks.
 	 */
-	if ((sc->sc_mode == SCHIZO_MODE_SCZ && sc->sc_ver >= 5) ||
-	    sc->sc_mode == SCHIZO_MODE_TOM) {
+	if (sc->sc_mode == SCHIZO_MODE_TOM || sc->sc_mode == SCHIZO_MODE_XMS) {
 		sds = malloc(sizeof(*sds), M_DEVBUF, M_NOWAIT | M_ZERO);
 		if (sds == NULL)
 			return (ENOMEM);
 		sds->sds_sc = sc;
 		sds->sds_arg = arg;
-		sds->sds_syncreg = sc->sc_mode == SCHIZO_MODE_SCZ ?
-		    SCZ_PCI_DMA_SYNC : TOMXMS_PCI_DMA_SYNC_PEND;
 		sds->sds_syncval = 1ULL << INTINO(vec);
 		if (sc->sc_mode == SCHIZO_MODE_TOM && sc->sc_ver <= 4)
 			sds->sds_bswar = 1;

From owner-svn-src-all@FreeBSD.ORG  Tue Oct 28 22:09:30 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A5372106567F;
	Tue, 28 Oct 2008 22:09:30 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 914B18FC08;
	Tue, 28 Oct 2008 22:09:30 +0000 (UTC)
	(envelope-from nwhitehorn@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9SM9UGs005357;
	Tue, 28 Oct 2008 22:09:30 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Received: (from nwhitehorn@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9SM9UMQ005356;
	Tue, 28 Oct 2008 22:09:30 GMT
	(envelope-from nwhitehorn@svn.freebsd.org)
Message-Id: <200810282209.m9SM9UMQ005356@svn.freebsd.org>
From: Nathan Whitehorn 
Date: Tue, 28 Oct 2008 22:09:30 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184429 - head/sys/powerpc/powermac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Tue, 28 Oct 2008 22:09:30 -0000

Author: nwhitehorn
Date: Tue Oct 28 22:09:30 2008
New Revision: 184429
URL: http://svn.freebsd.org/changeset/base/184429

Log:
  DBDMA can transfer a maximum of 64K - 1 bytes per descriptor, as the byte
  count field is 16 bits. Inform ATA of this fact.
  
  Reported by:	Marco Trillo

Modified:
  head/sys/powerpc/powermac/ata_dbdma.c

Modified: head/sys/powerpc/powermac/ata_dbdma.c
==============================================================================
--- head/sys/powerpc/powermac/ata_dbdma.c	Tue Oct 28 22:05:20 2008	(r184428)
+++ head/sys/powerpc/powermac/ata_dbdma.c	Tue Oct 28 22:09:30 2008	(r184429)
@@ -275,6 +275,12 @@ ata_dbdma_dmainit(device_t dev)
 	sc->sc_ch.dma.load = ata_dbdma_load;
 	sc->sc_ch.dma.reset = ata_dbdma_reset;
 
+	/*
+	 * DBDMA's field for transfer size is 16 bits. This will overflow
+	 * if we try to do a 64K transfer, so stop short of 64K.
+	 */
+	sc->sc_ch.dma.segsize = 126 * DEV_BSIZE;
+
 	sc->sc_ch.hw.status = ata_dbdma_status;
 
 	mtx_init(&sc->dbdma_mtx, "ATA DBDMA", NULL, MTX_DEF);

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 08:08:55 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F166E106564A;
	Wed, 29 Oct 2008 08:08:55 +0000 (UTC)
	(envelope-from n_hibma@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id C5B378FC1D;
	Wed, 29 Oct 2008 08:08:55 +0000 (UTC)
	(envelope-from n_hibma@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9T88thi016762;
	Wed, 29 Oct 2008 08:08:55 GMT (envelope-from n_hibma@svn.freebsd.org)
Received: (from n_hibma@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9T88tDD016760;
	Wed, 29 Oct 2008 08:08:55 GMT (envelope-from n_hibma@svn.freebsd.org)
Message-Id: <200810290808.m9T88tDD016760@svn.freebsd.org>
From: Nick Hibma 
Date: Wed, 29 Oct 2008 08:08:55 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184436 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 08:08:56 -0000

Author: n_hibma
Date: Wed Oct 29 08:08:55 2008
New Revision: 184436
URL: http://svn.freebsd.org/changeset/base/184436

Log:
  Add the device ID for the mass storage device that appears before the
  modem appears to facilitate faster switching to modem mode.

Modified:
  head/sys/dev/usb/u3g.c
  head/sys/dev/usb/usbdevs

Modified: head/sys/dev/usb/u3g.c
==============================================================================
--- head/sys/dev/usb/u3g.c	Wed Oct 29 07:16:49 2008	(r184435)
+++ head/sys/dev/usb/u3g.c	Wed Oct 29 08:08:55 2008	(r184436)
@@ -51,14 +51,12 @@
 #endif
 #include "usbdevs.h"
 
-//#define U3G_DEBUG
+#define U3G_DEBUG
 #ifdef U3G_DEBUG
 #define DPRINTF(x...)		do { if (u3gdebug) device_printf(sc->sc_dev, ##x); } while (0)
-#define DPRINTFN(n, x...)	do { if (u3gdebug > (n)) device_printf(self, ##x); } while (0)
 int	u3gdebug = 1;
 #else
 #define DPRINTF(x...)		/* nop */
-#define DPRINTFN(n, x...)	/* nop */
 #endif
 
 #define U3G_MAXPORTS		4
@@ -135,7 +133,8 @@ static const struct u3g_dev_type_s u3g_d
 	{{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_GTMAXHSUPA },		U3GSP_HSDPA,	U3GFL_NONE },
 	{{ USB_VENDOR_OPTION, USB_PRODUCT_OPTION_VODAFONEMC3G },	U3GSP_UMTS,	U3GFL_NONE },
 	/* OEM: Qualcomm, Inc. */
-	{{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM },	U3GSP_CDMA,	U3GFL_STUB_WAIT },
+	{{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_ZTE_STOR },	U3GSP_CDMA,	U3GFL_SCSI_EJECT },
+	{{ USB_VENDOR_QUALCOMMINC, USB_PRODUCT_QUALCOMMINC_CDMA_MSM },	U3GSP_CDMA,	U3GFL_SCSI_EJECT },
 	/* OEM: Huawei */
 	{{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_MOBILE },		U3GSP_HSDPA,	U3GFL_HUAWEI_INIT },
 	{{ USB_VENDOR_HUAWEI, USB_PRODUCT_HUAWEI_E220 },		U3GSP_HSPA,	U3GFL_HUAWEI_INIT },

Modified: head/sys/dev/usb/usbdevs
==============================================================================
--- head/sys/dev/usb/usbdevs	Wed Oct 29 07:16:49 2008	(r184435)
+++ head/sys/dev/usb/usbdevs	Wed Oct 29 08:08:55 2008	(r184436)
@@ -1996,6 +1996,7 @@ product QUALCOMM CDMA_MSM	0x6000	CDMA Te
 product QUALCOMM2 RWT_FCT	0x3100	RWT FCT-CDMA 2000 1xRTT modem
 product QUALCOMM2 CDMA_MSM	0x3196	CDMA Technologies MSM modem
 product QUALCOMMINC CDMA_MSM	0x0001	CDMA Technologies MSM modem
+product QUALCOMMINC ZTE_STOR	0x2000	USB ZTE Storage
 
 /* Qtronix products */
 product QTRONIX 980N		0x2011	Scorpion-980N keyboard

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 08:13:18 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BE83E1065679;
	Wed, 29 Oct 2008 08:13:18 +0000 (UTC) (envelope-from rink@rink.nu)
Received: from mx1.rink.nu (gloom.rink.nu [213.34.49.2])
	by mx1.freebsd.org (Postfix) with ESMTP id 7BFF18FC12;
	Wed, 29 Oct 2008 08:13:18 +0000 (UTC) (envelope-from rink@rink.nu)
Received: from localhost (localhost [127.0.0.1])
	by mx1.rink.nu (Postfix) with ESMTP id 10DF56D42B;
	Wed, 29 Oct 2008 09:13:47 +0100 (CET)
X-Virus-Scanned: amavisd-new at rink.nu
Received: from mx1.rink.nu ([213.34.49.2])
	by localhost (gloom.rink.nu [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 5C+VoZKHMySs; Wed, 29 Oct 2008 09:13:44 +0100 (CET)
Received: by mx1.rink.nu (Postfix, from userid 1000)
	id F1DC36D423; Wed, 29 Oct 2008 09:13:43 +0100 (CET)
Date: Wed, 29 Oct 2008 09:13:43 +0100
From: Rink Springer 
To: Nick Hibma 
Message-ID: <20081029081343.GA28461@rink.nu>
References: <200810290808.m9T88tDD016760@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <200810290808.m9T88tDD016760@svn.freebsd.org>
User-Agent: Mutt/1.5.18 (2008-05-17)
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r184436 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 08:13:18 -0000

On Wed, Oct 29, 2008 at 08:08:55AM +0000, Nick Hibma wrote:
> Modified: head/sys/dev/usb/u3g.c
> ==============================================================================
> --- head/sys/dev/usb/u3g.c	Wed Oct 29 07:16:49 2008	(r184435)
> +++ head/sys/dev/usb/u3g.c	Wed Oct 29 08:08:55 2008	(r184436)
> @@ -51,14 +51,12 @@
>  #endif
>  #include "usbdevs.h"
>  
> -//#define U3G_DEBUG
> +#define U3G_DEBUG
>  #ifdef U3G_DEBUG
>  #define DPRINTF(x...)		do { if (u3gdebug) device_printf(sc->sc_dev, ##x); } while (0)
> -#define DPRINTFN(n, x...)	do { if (u3gdebug > (n)) device_printf(self, ##x); } while (0)
>  int	u3gdebug = 1;
>  #else
>  #define DPRINTF(x...)		/* nop */
> -#define DPRINTFN(n, x...)	/* nop */
>  #endif

Were these changes also intended?

-- 
Rink P.W. Springer                                - http://rink.nu
"Anyway boys, this is America. Just because you get more votes doesn't
 mean you win." - Fox Mulder

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 08:20:08 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id B8BB51065687;
	Wed, 29 Oct 2008 08:20:08 +0000 (UTC)
	(envelope-from bzeeb-lists@lists.zabbadoz.net)
Received: from mail.cksoft.de (mail.cksoft.de [62.111.66.27])
	by mx1.freebsd.org (Postfix) with ESMTP id 6D4B68FC16;
	Wed, 29 Oct 2008 08:20:08 +0000 (UTC)
	(envelope-from bzeeb-lists@lists.zabbadoz.net)
Received: from localhost (amavis.str.cksoft.de [192.168.74.71])
	by mail.cksoft.de (Postfix) with ESMTP id 4B0BB41C4AB;
	Wed, 29 Oct 2008 09:20:07 +0100 (CET)
X-Virus-Scanned: amavisd-new at cksoft.de
Received: from mail.cksoft.de ([62.111.66.27])
	by localhost (amavis.str.cksoft.de [192.168.74.71]) (amavisd-new,
	port 10024)
	with ESMTP id Cv8DIiiBo+aa; Wed, 29 Oct 2008 09:20:05 +0100 (CET)
Received: by mail.cksoft.de (Postfix, from userid 66)
	id BD8DE41C6B4; Wed, 29 Oct 2008 09:20:05 +0100 (CET)
Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net
	[10.111.66.10])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mail.int.zabbadoz.net (Postfix) with ESMTP id 0776444487F;
	Wed, 29 Oct 2008 08:18:09 +0000 (UTC)
Date: Wed, 29 Oct 2008 08:18:08 +0000 (UTC)
From: "Bjoern A. Zeeb" 
X-X-Sender: bz@maildrop.int.zabbadoz.net
To: Nick Hibma 
In-Reply-To: <200810290808.m9T88tDD016760@svn.freebsd.org>
Message-ID: <20081029081728.M2978@maildrop.int.zabbadoz.net>
References: <200810290808.m9T88tDD016760@svn.freebsd.org>
X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r184436 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 08:20:08 -0000

On Wed, 29 Oct 2008, Nick Hibma wrote:

> Author: n_hibma
> Date: Wed Oct 29 08:08:55 2008
> New Revision: 184436
> URL: http://svn.freebsd.org/changeset/base/184436
>
> Log:
>  Add the device ID for the mass storage device that appears before the
>  modem appears to facilitate faster switching to modem mode.
>
> Modified:
>  head/sys/dev/usb/u3g.c
>  head/sys/dev/usb/usbdevs
>
> Modified: head/sys/dev/usb/u3g.c
> ==============================================================================
> --- head/sys/dev/usb/u3g.c	Wed Oct 29 07:16:49 2008	(r184435)
> +++ head/sys/dev/usb/u3g.c	Wed Oct 29 08:08:55 2008	(r184436)
> @@ -51,14 +51,12 @@
> #endif
> #include "usbdevs.h"
>
> -//#define U3G_DEBUG
> +#define U3G_DEBUG

^^^^^^^^^^^^^^^^^^^^^
you did not want to commit this, did you?


-- 
Bjoern A. Zeeb              Stop bit received. Insert coin for new game.

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 11:03:15 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id ED7D41065672;
	Wed, 29 Oct 2008 11:03:15 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id DCE018FC1F;
	Wed, 29 Oct 2008 11:03:15 +0000 (UTC) (envelope-from bz@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TB3Ftk021100;
	Wed, 29 Oct 2008 11:03:15 GMT (envelope-from bz@svn.freebsd.org)
Received: (from bz@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TB3FUU021099;
	Wed, 29 Oct 2008 11:03:15 GMT (envelope-from bz@svn.freebsd.org)
Message-Id: <200810291103.m9TB3FUU021099@svn.freebsd.org>
From: "Bjoern A. Zeeb" 
Date: Wed, 29 Oct 2008 11:03:15 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184437 - head/sys/dev/usb
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 11:03:16 -0000

Author: bz
Date: Wed Oct 29 11:03:15 2008
New Revision: 184437
URL: http://svn.freebsd.org/changeset/base/184437

Log:
  Comment out #define turning on debugging which went in with r184436 and
  which is also in conf/NOTES and thus defined twice when building LINT.

Modified:
  head/sys/dev/usb/u3g.c

Modified: head/sys/dev/usb/u3g.c
==============================================================================
--- head/sys/dev/usb/u3g.c	Wed Oct 29 08:08:55 2008	(r184436)
+++ head/sys/dev/usb/u3g.c	Wed Oct 29 11:03:15 2008	(r184437)
@@ -51,7 +51,7 @@
 #endif
 #include "usbdevs.h"
 
-#define U3G_DEBUG
+/* #define U3G_DEBUG */
 #ifdef U3G_DEBUG
 #define DPRINTF(x...)		do { if (u3gdebug) device_printf(sc->sc_dev, ##x); } while (0)
 int	u3gdebug = 1;

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 11:34:42 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 85B411065674;
	Wed, 29 Oct 2008 11:34:42 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from mail10.syd.optusnet.com.au (mail10.syd.optusnet.com.au
	[211.29.132.191])
	by mx1.freebsd.org (Postfix) with ESMTP id 1E3788FC25;
	Wed, 29 Oct 2008 11:34:41 +0000 (UTC)
	(envelope-from brde@optusnet.com.au)
Received: from besplex.bde.org (c122-106-151-199.carlnfd1.nsw.optusnet.com.au
	[122.106.151.199])
	by mail10.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id
	m9TBYcd4007961
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 29 Oct 2008 22:34:40 +1100
Date: Wed, 29 Oct 2008 22:34:38 +1100 (EST)
From: Bruce Evans 
X-X-Sender: bde@besplex.bde.org
To: Maxim Sobolev 
In-Reply-To: <4906ECC1.4080907@FreeBSD.org>
Message-ID: <20081029220255.B4187@besplex.bde.org>
References: <200810261858.m9QIw4YV091893@svn.freebsd.org>
	<200810271411.11813.jhb@freebsd.org>
	<20081028202701.E85964@delplex.bde.org>
	<4906ECC1.4080907@FreeBSD.org>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, John Baldwin ,
	Bruce Evans 
Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 11:34:42 -0000

On Tue, 28 Oct 2008, Maxim Sobolev wrote:

> Bruce Evans wrote:
>> On Mon, 27 Oct 2008, John Baldwin wrote:
>> 
>>> On Sunday 26 October 2008 02:58:04 pm Maxim Sobolev wrote:
>>>> Author: sobomax
>>>> Date: Sun Oct 26 18:58:04 2008
>>>> New Revision: 184293
>>>> URL: http://svn.freebsd.org/changeset/base/184293
>>>> 
>>>> Log:
>>>>   Fix division by zero panic if kern.hz less than 32.
>>>> 
>>>>   MFC after:    1 day
>>> 
>>> This is wrong.  In the case you are worried about here, lapic_timer_hz is 
>>> less
>>> than 128.  There is no way you are going to fire stathz 128 times per 
>>> second
>>> from a timer running at < 128 hz.  You are effectively running stathz at
>>> lapic_timer_hz, so I would just set stathz = lapic_timer_hz in this case.
>> 
>> stathz needs to be about 128 to work as intended, at least for SCHED_4BSD.
>>> ...
>> Also, hz = 10 cannot work on i386 without lapic_timer, since the i8254 
>> timer
>> has a maximum interrupt period of 55 ms and thus a minimum frequency of
>> 18.2 Hz.  Attempts to set it to 10 Hz cause similar bugs to the ones here
>> -- the best approximation of 18.2 is (supposed to be) used, but the system
>> is not informed about the enormous error in this approximation and still
>> thinks that 10 Hz is used.
>
> Does it suggest that we simply need to place lower limit of 128 on 
> lapic_timer_hz and lower limit of 18 on i8254 timer? As far as I understand 
> timer frequency could be higher than actual HZ (at least lapic code suggest 
> that it can). Will it help or cause any other issues?

I use 100 for the minimum stathz but wouldn't want it to be much lower
than that.  I've tried much lower values (10 or 20) and noticed that
this mainly makes statistics fairly innacurate, as you might expect
(e.g., 180 seconds sys time for makeworld might become 160 or 200).
SCHED_4BSD requires stathz to be about 128 but doesn't need this and
can survive with weird values of stathz.

The limit for i8254 should be 19 if anything, since the actual limit
of 18.2 is not supported and the error between 18 and 18.2 is relatively
large.  Due to the nature of the interface, any frequency >= 18.2 can
be represented precisely (more precisely at low frequencies), but there
is no simple way to get anything lower than 18.2.  I don't like such
limits in general since they mainly get in the way of trying unusual
configurations which should be under control of the user, but here they
may be machine-generated.

For emulation, I think you don't want lapic_timer_hz to be large any more
than stathz or the i8254 interrupt frequency.  The emulator might not
like interrupting at a high rate, irrespective of the interrupt source,
depending on how much it does in software for each type of source.  So
lapic_timer_hz = hz = stathz = ~100 might be best.  (Once we have interrupted
at 100 Hz, there we can use this for hz at no extra cost in the emulator).

Also, since the lapic timer is more complicated than the i8254 timer,
interrupts on it might be more expensive, so using lapic_timer might
be a pessimization, except it normally reduces the number of interrupt
sources.  But use of the RTC can be avoided too.

Bruce

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 12:11:48 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id E6C9E1065679;
	Wed, 29 Oct 2008 12:11:48 +0000 (UTC)
	(envelope-from davidxu@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id D6A068FC39;
	Wed, 29 Oct 2008 12:11:48 +0000 (UTC)
	(envelope-from davidxu@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TCBm2i022372;
	Wed, 29 Oct 2008 12:11:48 GMT (envelope-from davidxu@svn.freebsd.org)
Received: (from davidxu@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TCBmm7022371;
	Wed, 29 Oct 2008 12:11:48 GMT (envelope-from davidxu@svn.freebsd.org)
Message-Id: <200810291211.m9TCBmm7022371@svn.freebsd.org>
From: David Xu 
Date: Wed, 29 Oct 2008 12:11:48 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184438 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 12:11:49 -0000

Author: davidxu
Date: Wed Oct 29 12:11:48 2008
New Revision: 184438
URL: http://svn.freebsd.org/changeset/base/184438

Log:
  If threads limit is exceeded, increase the totoal number
  of failures.

Modified:
  head/sys/kern/kern_thr.c

Modified: head/sys/kern/kern_thr.c
==============================================================================
--- head/sys/kern/kern_thr.c	Wed Oct 29 11:03:15 2008	(r184437)
+++ head/sys/kern/kern_thr.c	Wed Oct 29 12:11:48 2008	(r184438)
@@ -76,6 +76,7 @@ suword_lwpid(void *addr, lwpid_t lwpid)
 #endif
 
 extern int max_threads_per_proc;
+extern int max_threads_hits;
 
 static int create_thread(struct thread *td, mcontext_t *ctx,
 			 void (*start_func)(void *), void *arg,
@@ -154,8 +155,10 @@ create_thread(struct thread *td, mcontex
 	p = td->td_proc;
 
 	/* Have race condition but it is cheap. */
-	if (p->p_numthreads >= max_threads_per_proc)
+	if (p->p_numthreads >= max_threads_per_proc) {
+		++max_threads_hits;
 		return (EPROCLIM);
+	}
 
 	if (rtp != NULL) {
 		switch(rtp->type) {

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 13:36:24 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1D0B21065679;
	Wed, 29 Oct 2008 13:36:24 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D2E08FC1A;
	Wed, 29 Oct 2008 13:36:24 +0000 (UTC)
	(envelope-from ivoras@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TDaNWj023911;
	Wed, 29 Oct 2008 13:36:23 GMT (envelope-from ivoras@svn.freebsd.org)
Received: (from ivoras@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TDaNCn023910;
	Wed, 29 Oct 2008 13:36:23 GMT (envelope-from ivoras@svn.freebsd.org)
Message-Id: <200810291336.m9TDaNCn023910@svn.freebsd.org>
From: Ivan Voras 
Date: Wed, 29 Oct 2008 13:36:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184439 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 13:36:24 -0000

Author: ivoras
Date: Wed Oct 29 13:36:23 2008
New Revision: 184439
URL: http://svn.freebsd.org/changeset/base/184439

Log:
  Introduce a new sysctl, kern.sched.topology_spec, that returns an XML
  dump of detected ULE CPU topology. This dump can be used to check the
  topology detection and for general system information.
  
  An example of CPU topology dump is:
  kern.sched.topology_spec: 
   
     0, 1, 2, 3, 4, 5, 6, 7
     
     
       
         0, 1, 2, 3
         
       
       
         4, 5, 6, 7
         
       
     
   
  
  
  Reviewed by:	jeff
  Approved by:	gnn (mentor)

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==============================================================================
--- head/sys/kern/sched_ule.c	Wed Oct 29 12:11:48 2008	(r184438)
+++ head/sys/kern/sched_ule.c	Wed Oct 29 13:36:23 2008	(r184439)
@@ -61,6 +61,7 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
+#include 
 #ifdef KTRACE
 #include 
 #include 
@@ -223,7 +224,7 @@ struct tdq {
 #define	TDQ_IDLE	2
 
 #ifdef SMP
-struct cpu_group *cpu_top;
+struct cpu_group *cpu_top;		/* CPU topology */
 
 #define	SCHED_AFFINITY_DEFAULT	(max(1, hz / 1000))
 #define	SCHED_AFFINITY(ts, t)	((ts)->ts_rltick > ticks - ((t) * affinity))
@@ -293,6 +294,9 @@ static inline struct tdq *sched_setcpu(s
 static inline struct mtx *thread_block_switch(struct thread *);
 static inline void thread_unblock_switch(struct thread *, struct mtx *);
 static struct mtx *sched_switch_migrate(struct tdq *, struct thread *, int);
+static int sysctl_kern_sched_topology_spec(SYSCTL_HANDLER_ARGS);
+static int sysctl_kern_sched_topology_spec_internal(struct sbuf *sb, 
+    struct cpu_group *cg, int indent);
 #endif
 
 static void sched_setup(void *dummy);
@@ -2601,6 +2605,83 @@ sched_fork_exit(struct thread *td)
 	    &TDQ_LOCKPTR(tdq)->lock_object, 0, 0, __FILE__, __LINE__);
 }
 
+#ifdef SMP
+
+/*
+ * Build the CPU topology dump string. Is recursively called to collect
+ * the topology tree.
+ */
+static int
+sysctl_kern_sched_topology_spec_internal(struct sbuf *sb, struct cpu_group *cg,
+    int indent)
+{
+	int i, first;
+
+	sbuf_printf(sb, "%*s\n", indent,
+	    "", indent, cg->cg_level);
+	sbuf_printf(sb, "%*s ", indent, "",
+	    cg->cg_count, cg->cg_mask);
+	first = TRUE;
+	for (i = 0; i < MAXCPU; i++) {
+		if ((cg->cg_mask & (1 << i)) != 0) {
+			if (!first)
+				sbuf_printf(sb, ", ");
+			else
+				first = FALSE;
+			sbuf_printf(sb, "%d", i);
+		}
+	}
+	sbuf_printf(sb, "\n");
+
+	sbuf_printf(sb, "%*s ", indent, "");
+	if (cg->cg_flags != 0) {
+		if ((cg->cg_flags & CG_FLAG_HTT) != 0)
+			sbuf_printf(sb, "HTT group");
+		if ((cg->cg_flags & CG_FLAG_THREAD) != 0)
+			sbuf_printf(sb, "SMT group");
+	}
+	sbuf_printf(sb, "\n");
+
+	if (cg->cg_children > 0) {
+		sbuf_printf(sb, "%*s \n", indent, "");
+		for (i = 0; i < cg->cg_children; i++)
+			sysctl_kern_sched_topology_spec_internal(sb, 
+			    &cg->cg_child[i], indent+2);
+		sbuf_printf(sb, "%*s \n", indent, "");
+	}
+	sbuf_printf(sb, "%*s\n", indent, "");
+	return (0);
+}
+
+/*
+ * Sysctl handler for retrieving topology dump. It's a wrapper for
+ * the recursive sysctl_kern_smp_topology_spec_internal().
+ */
+static int
+sysctl_kern_sched_topology_spec(SYSCTL_HANDLER_ARGS)
+{
+	struct sbuf *topo;
+	int err;
+
+	KASSERT(cpu_top != NULL, ("cpu_top isn't initialized"));
+
+	topo = sbuf_new(NULL, NULL, 100, SBUF_AUTOEXTEND);
+	if (topo == NULL)
+		return (ENOMEM);
+
+	sbuf_printf(topo, "\n");
+	err = sysctl_kern_sched_topology_spec_internal(topo, cpu_top, 1);
+	sbuf_printf(topo, "\n");
+
+	if (err == 0) {
+		sbuf_finish(topo);
+		err = SYSCTL_OUT(req, sbuf_data(topo), sbuf_len(topo));
+	}
+	sbuf_delete(topo);
+	return (err);
+}
+#endif
+
 SYSCTL_NODE(_kern, OID_AUTO, sched, CTLFLAG_RW, 0, "Scheduler");
 SYSCTL_STRING(_kern_sched, OID_AUTO, name, CTLFLAG_RD, "ULE", 0,
     "Scheduler name");
@@ -2630,6 +2711,11 @@ SYSCTL_INT(_kern_sched, OID_AUTO, steal_
     "Attempts to steal work from other cores before idling");
 SYSCTL_INT(_kern_sched, OID_AUTO, steal_thresh, CTLFLAG_RW, &steal_thresh, 0,
     "Minimum load on remote cpu before we'll steal");
+
+/* Retrieve SMP topology */
+SYSCTL_PROC(_kern_sched, OID_AUTO, topology_spec, CTLTYPE_STRING |
+    CTLFLAG_RD, NULL, 0, sysctl_kern_sched_topology_spec, "A", 
+    "XML dump of detected CPU topology");
 #endif
 
 /* ps compat.  All cpu percentages from ULE are weighted. */

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 13:44:04 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 0BBDC1065688;
	Wed, 29 Oct 2008 13:44:04 +0000 (UTC) (envelope-from bms@FreeBSD.org)
Received: from out1.smtp.messagingengine.com (out1.smtp.messagingengine.com
	[66.111.4.25]) by mx1.freebsd.org (Postfix) with ESMTP id D33E18FC0A;
	Wed, 29 Oct 2008 13:44:03 +0000 (UTC) (envelope-from bms@FreeBSD.org)
Received: from compute2.internal (compute2.internal [10.202.2.42])
	by out1.messagingengine.com (Postfix) with ESMTP id D659D1897A9;
	Wed, 29 Oct 2008 09:44:02 -0400 (EDT)
Received: from heartbeat1.messagingengine.com ([10.202.2.160])
	by compute2.internal (MEProxy); Wed, 29 Oct 2008 09:44:02 -0400
X-Sasl-enc: OZ1+xAp7Bxanje71DPpt7VvPH7zk29KZG+Bd0ME9k5Op 1225287842
Received: from empiric.lon.incunabulum.net
	(82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254])
	by mail.messagingengine.com (Postfix) with ESMTPSA id 1AAF2D469;
	Wed, 29 Oct 2008 09:44:01 -0400 (EDT)
Message-ID: <490868A0.2000202@FreeBSD.org>
Date: Wed, 29 Oct 2008 13:44:00 +0000
From: "Bruce M. Simpson" 
User-Agent: Thunderbird 2.0.0.14 (X11/20080514)
MIME-Version: 1.0
To: Ivan Voras 
References: <200810291336.m9TDaNCn023910@svn.freebsd.org>
In-Reply-To: <200810291336.m9TDaNCn023910@svn.freebsd.org>
X-Enigmail-Version: 0.95.6
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org,
	src-committers@freebsd.org
Subject: Re: svn commit: r184439 - head/sys/kern
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 13:44:04 -0000

Ivan Voras wrote:
> Log:
>   Introduce a new sysctl, kern.sched.topology_spec, that returns an XML
>   dump of detected ULE CPU topology. This dump can be used to check the
>   topology detection and for general system information.

This is kinda cool...

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 15:41:18 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 6943410656A3;
	Wed, 29 Oct 2008 15:41:18 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from server.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net
	[IPv6:2001:470:1f10:75::2])
	by mx1.freebsd.org (Postfix) with ESMTP id 0D1DC8FC17;
	Wed, 29 Oct 2008 15:41:17 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from localhost.corp.yahoo.com (john@localhost [IPv6:::1])
	(authenticated bits=0)
	by server.baldwin.cx (8.14.3/8.14.3) with ESMTP id m9TFf3Q4036267;
	Wed, 29 Oct 2008 11:41:12 -0400 (EDT) (envelope-from jhb@FreeBSD.org)
From: John Baldwin 
To: Nathan Whitehorn 
Date: Wed, 29 Oct 2008 11:11:47 -0400
User-Agent: KMail/1.9.7
References: <200810282209.m9SM9UMQ005356@svn.freebsd.org>
In-Reply-To: <200810282209.m9SM9UMQ005356@svn.freebsd.org>
MIME-Version: 1.0
Content-Type: text/plain;
  charset="utf-8"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
Message-Id: <200810291111.47677.jhb@freebsd.org>
X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by
	milter-greylist-2.0.2 (server.baldwin.cx [IPv6:::1]);
	Wed, 29 Oct 2008 11:41:12 -0400 (EDT)
X-Virus-Scanned: ClamAV 0.93.1/8537/Wed Oct 29 09:26:33 2008 on
	server.baldwin.cx
X-Virus-Status: Clean
X-Spam-Status: No, score=-2.6 required=4.2 tests=BAYES_00,NO_RELAYS 
	autolearn=ham version=3.1.3
X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on server.baldwin.cx
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org
Subject: Re: svn commit: r184429 - head/sys/powerpc/powermac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 15:41:18 -0000

On Tuesday 28 October 2008 06:09:30 pm Nathan Whitehorn wrote:
> Author: nwhitehorn
> Date: Tue Oct 28 22:09:30 2008
> New Revision: 184429
> URL: http://svn.freebsd.org/changeset/base/184429
> 
> Log:
>   DBDMA can transfer a maximum of 64K - 1 bytes per descriptor, as the byte
>   count field is 16 bits. Inform ATA of this fact.

You may want to use 32k transfers rather than 63k.  At least on the HT1000 
chipsets we got severe data corruption even with 63k transfers, and I'm not 
sure if some part of the kernel isn't dependent on power-of-2 transfers 
somehow.

-- 
John Baldwin

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 15:52:23 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 2EE231065674;
	Wed, 29 Oct 2008 15:52:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 18E538FC29;
	Wed, 29 Oct 2008 15:52:23 +0000 (UTC) (envelope-from jhb@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TFqMCt026648;
	Wed, 29 Oct 2008 15:52:22 GMT (envelope-from jhb@svn.freebsd.org)
Received: (from jhb@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TFqMAO026646;
	Wed, 29 Oct 2008 15:52:22 GMT (envelope-from jhb@svn.freebsd.org)
Message-Id: <200810291552.m9TFqMAO026646@svn.freebsd.org>
From: John Baldwin 
Date: Wed, 29 Oct 2008 15:52:22 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-other@freebsd.org
X-SVN-Group: stable-other
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184440 - stable/4/share/zoneinfo
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 15:52:23 -0000

Author: jhb
Date: Wed Oct 29 15:52:22 2008
New Revision: 184440
URL: http://svn.freebsd.org/changeset/base/184440

Log:
  MFC: tzdata2008i

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

Modified: stable/4/share/zoneinfo/southamerica
==============================================================================
--- stable/4/share/zoneinfo/southamerica	Wed Oct 29 13:36:23 2008	(r184439)
+++ stable/4/share/zoneinfo/southamerica	Wed Oct 29 15:52:22 2008	(r184440)
@@ -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/4/share/zoneinfo/zone.tab
==============================================================================
--- stable/4/share/zoneinfo/zone.tab	Wed Oct 29 13:36:23 2008	(r184439)
+++ stable/4/share/zoneinfo/zone.tab	Wed Oct 29 15:52:22 2008	(r184440)
@@ -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 owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 16:13:36 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 799231065672;
	Wed, 29 Oct 2008 16:13:36 +0000 (UTC)
	(envelope-from scottl@samsco.org)
Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57])
	by mx1.freebsd.org (Postfix) with ESMTP id 2B57D8FC16;
	Wed, 29 Oct 2008 16:13:35 +0000 (UTC)
	(envelope-from scottl@samsco.org)
Received: from phobos.local ([192.168.254.200]) (authenticated bits=0)
	by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id m9TGDT7e071843;
	Wed, 29 Oct 2008 10:13:29 -0600 (MDT)
	(envelope-from scottl@samsco.org)
Message-ID: <49088BA9.2000501@samsco.org>
Date: Wed, 29 Oct 2008 10:13:29 -0600
From: Scott Long 
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US;
	rv:1.8.1.13) Gecko/20080313 SeaMonkey/1.1.9
MIME-Version: 1.0
To: John Baldwin 
References: <200810282209.m9SM9UMQ005356@svn.freebsd.org>
	<200810291111.47677.jhb@freebsd.org>
In-Reply-To: <200810291111.47677.jhb@freebsd.org>
X-Enigmail-Version: 0.95.6
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,BAYES_00
	autolearn=ham version=3.1.8
X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org
Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org,
	src-committers@FreeBSD.org, Nathan Whitehorn 
Subject: Re: svn commit: r184429 - head/sys/powerpc/powermac
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 16:13:36 -0000

John Baldwin wrote:
> On Tuesday 28 October 2008 06:09:30 pm Nathan Whitehorn wrote:
>> Author: nwhitehorn
>> Date: Tue Oct 28 22:09:30 2008
>> New Revision: 184429
>> URL: http://svn.freebsd.org/changeset/base/184429
>>
>> Log:
>>   DBDMA can transfer a maximum of 64K - 1 bytes per descriptor, as the byte
>>   count field is 16 bits. Inform ATA of this fact.
> 
> You may want to use 32k transfers rather than 63k.  At least on the HT1000 
> chipsets we got severe data corruption even with 63k transfers, and I'm not 
> sure if some part of the kernel isn't dependent on power-of-2 transfers 
> somehow.
> 

There are a number of places where direct I/O that is initiated by the
kernel works just fine for non-power-of-2 sizes and offsets,
particularly in GEOM taste routines and in several filesystem drivers.
I'm pretty sure I can also reliably demonstrate it from userland via
O_DIRECT.  Buffered I/O is a different matter, and there could possibly
be some edge cases that exist below the buffer layer.

Scott

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 16:17:35 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5EA451065679;
	Wed, 29 Oct 2008 16:17:35 +0000 (UTC)
	(envelope-from n_hibma@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 500DA8FC22;
	Wed, 29 Oct 2008 16:17:35 +0000 (UTC)
	(envelope-from n_hibma@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TGHYbU027324;
	Wed, 29 Oct 2008 16:17:34 GMT (envelope-from n_hibma@svn.freebsd.org)
Received: (from n_hibma@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TGHYNr027322;
	Wed, 29 Oct 2008 16:17:34 GMT (envelope-from n_hibma@svn.freebsd.org)
Message-Id: <200810291617.m9TGHYNr027322@svn.freebsd.org>
From: Nick Hibma 
Date: Wed, 29 Oct 2008 16:17:34 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184441 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 16:17:35 -0000

Author: n_hibma
Date: Wed Oct 29 16:17:34 2008
New Revision: 184441
URL: http://svn.freebsd.org/changeset/base/184441

Log:
  - Add documentation on how to temporarily display the umass devices that
    are automatically hidden by the u3gstub device.
  - Add a link to the u3g driver man page for u3gstub.

Modified:
  head/share/man/man4/Makefile
  head/share/man/man4/u3g.4

Modified: head/share/man/man4/Makefile
==============================================================================
--- head/share/man/man4/Makefile	Wed Oct 29 15:52:22 2008	(r184440)
+++ head/share/man/man4/Makefile	Wed Oct 29 16:17:34 2008	(r184441)
@@ -553,6 +553,7 @@ MLINKS+=tl.4 if_tl.4
 MLINKS+=tun.4 if_tun.4
 MLINKS+=tx.4 if_tx.4
 MLINKS+=txp.4 if_txp.4
+MLINKS+=u3g.4 u3gstub.4
 MLINKS+=udav.4 if_udav.4
 MLINKS+=ural.4 if_ural.4
 MLINKS+=vge.4 if_vge.4

Modified: head/share/man/man4/u3g.4
==============================================================================
--- head/share/man/man4/u3g.4	Wed Oct 29 15:52:22 2008	(r184440)
+++ head/share/man/man4/u3g.4	Wed Oct 29 16:17:34 2008	(r184441)
@@ -2,7 +2,7 @@
 .\" Copyright (c) 2008 AnyWi Technologies
 .\" All rights reserved.
 .\"
-.\" This code is derived from uark.c 
+.\" This code is derived from uark.c
 .\"
 .\" Permission to use, copy, modify, and distribute this software for any
 .\" purpose with or without fee is hereby granted, provided that the above
@@ -76,18 +76,26 @@ Novatal MC950D
 .It
 Sierra cards
 .El
-(See /sys/dev/u3g.c for the complete list of supported cards for each vendor
-mentioned above).
+.Pp
+See /sys/dev/u3g.c for the complete list of supported cards for each vendor
+mentioned above.
 .Pp
 The supported 3G cards provide the necessary modem port for ppp,
 pppd, or mpd connections as well as extra ports (depending on the specific
 device) to provide other functions (diagnostic port, SIM toolkit port)
 .Pp
-In some of these devices a mass storage device supported by the 
+In some of these devices a mass storage device supported by the
 .Xr umass 4
 driver is present which contains Windows and Mac OSX drivers. This device is
 hidden, unless the machine was booted in verbose (see
 .Xr boot 8 ).
+To temporarily unhide the device, set
+.Va debug.bootverbose
+to 1 using
+.Xr sysctl 8
+and replug the device. The
+.Xr u3gstub 4
+device will attach temporarily and detach within seconds.
 .Sh SEE ALSO
 .Xr tty 4 ,
 .Xr ucom 4 ,

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 17:27:24 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id F25501065678;
	Wed, 29 Oct 2008 17:27:23 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id E0E338FC19;
	Wed, 29 Oct 2008 17:27:23 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9THRNcu028634;
	Wed, 29 Oct 2008 17:27:23 GMT (envelope-from delphij@svn.freebsd.org)
Received: (from delphij@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9THRNOu028632;
	Wed, 29 Oct 2008 17:27:23 GMT (envelope-from delphij@svn.freebsd.org)
Message-Id: <200810291727.m9THRNOu028632@svn.freebsd.org>
From: Xin LI 
Date: Wed, 29 Oct 2008 17:27:23 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
X-SVN-Group: stable-7
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184442 - in stable/7/sys: . dev/ata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 17:27:24 -0000

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 owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 18:10:40 2008
Return-Path: 
Delivered-To: svn-src-all@FreeBSD.ORG
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 75154106568B;
	Wed, 29 Oct 2008 18:10:40 +0000 (UTC)
	(envelope-from sobomax@sippysoft.com)
Received: from sippysoft.com (gk1.360sip.com [72.236.70.240])
	by mx1.freebsd.org (Postfix) with ESMTP id 324628FC29;
	Wed, 29 Oct 2008 18:10:40 +0000 (UTC)
	(envelope-from sobomax@sippysoft.com)
Received: from [192.168.1.23] (S0106001372fd1e07.vs.shawcable.net
	[70.71.2.169]) (authenticated bits=0)
	by sippysoft.com (8.13.8/8.13.8) with ESMTP id m9THum92082010
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO);
	Wed, 29 Oct 2008 10:56:49 -0700 (PDT)
	(envelope-from sobomax@sippysoft.com)
Message-ID: <4908A3E0.8080005@sippysoft.com>
Date: Wed, 29 Oct 2008 10:56:48 -0700
From: Maxim Sobolev 
Organization: Sippy Software, Inc.
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: Bruce Evans 
References: <200810261858.m9QIw4YV091893@svn.freebsd.org>
	<200810271411.11813.jhb@freebsd.org>
	<20081028202701.E85964@delplex.bde.org>
	<4906ECC1.4080907@FreeBSD.org>
	<20081029220255.B4187@besplex.bde.org>
In-Reply-To: <20081029220255.B4187@besplex.bde.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Cc: svn-src-head@FreeBSD.ORG, svn-src-all@FreeBSD.ORG,
	src-committers@FreeBSD.ORG, John Baldwin 
Subject: Re: svn commit: r184293 - in head/sys: amd64/amd64 i386/i386
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 18:10:40 -0000

Bruce Evans wrote:
> lapic_timer_hz = hz = stathz = ~100 might be best.  (Once we have 
> interrupted
> at 100 Hz, there we can use this for hz at no extra cost in the emulator).

In't there more overhead in full userland context switch implied by HZ 
100 compared to (presumably)fast timer interrupt?

Regards,
-- 
Maksym Sobolyev
Sippy Software, Inc.
Internet Telephony (VoIP) Experts
T/F: +1-646-651-1110
Web: http://www.sippysoft.com

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 18:46:47 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id BE8E81065677;
	Wed, 29 Oct 2008 18:46:47 +0000 (UTC) (envelope-from mp@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id B20F58FC1F;
	Wed, 29 Oct 2008 18:46:47 +0000 (UTC) (envelope-from mp@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TIkltd030072;
	Wed, 29 Oct 2008 18:46:47 GMT (envelope-from mp@svn.freebsd.org)
Received: (from mp@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TIklBk030071;
	Wed, 29 Oct 2008 18:46:47 GMT (envelope-from mp@svn.freebsd.org)
Message-Id: <200810291846.m9TIklBk030071@svn.freebsd.org>
From: Mark Peek 
Date: Wed, 29 Oct 2008 18:46:47 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184443 - head/etc
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 18:46:47 -0000

Author: mp
Date: Wed Oct 29 18:46:47 2008
New Revision: 184443
URL: http://svn.freebsd.org/changeset/base/184443

Log:
  Explicitly set the shell to /bin/sh when MK_TCSH == no.
  
  Not objected to by:	sam

Modified:
  head/etc/Makefile

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile	Wed Oct 29 17:27:23 2008	(r184442)
+++ head/etc/Makefile	Wed Oct 29 18:46:47 2008	(r184443)
@@ -154,7 +154,7 @@ distribution:
 	    ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 600 \
 		master.passwd nsmb.conf opieaccess ${DESTDIR}/etc;
 .if ${MK_TCSH} == "no"
-	sed -i "" -e 's;/bin/csh;;' ${DESTDIR}/etc/master.passwd
+	sed -i "" -e 's;/bin/csh;/bin/sh;' ${DESTDIR}/etc/master.passwd
 .endif
 	pwd_mkdb ${PWD_MKDB_ENDIAN} -i -p -d ${DESTDIR}/etc \
 	    ${DESTDIR}/etc/master.passwd

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 18:49:38 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 1D3D51065689;
	Wed, 29 Oct 2008 18:49:38 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 0FFD78FC17;
	Wed, 29 Oct 2008 18:49:38 +0000 (UTC)
	(envelope-from brueffer@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TInbDq030155;
	Wed, 29 Oct 2008 18:49:37 GMT
	(envelope-from brueffer@svn.freebsd.org)
Received: (from brueffer@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TInbHv030154;
	Wed, 29 Oct 2008 18:49:37 GMT
	(envelope-from brueffer@svn.freebsd.org)
Message-Id: <200810291849.m9TInbHv030154@svn.freebsd.org>
From: Christian Brueffer 
Date: Wed, 29 Oct 2008 18:49:37 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-head@freebsd.org
X-SVN-Group: head
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184444 - head/share/man/man4
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 18:49:38 -0000

Author: brueffer
Date: Wed Oct 29 18:49:37 2008
New Revision: 184444
URL: http://svn.freebsd.org/changeset/base/184444

Log:
  Misc cleanup.

Modified:
  head/share/man/man4/u3g.4

Modified: head/share/man/man4/u3g.4
==============================================================================
--- head/share/man/man4/u3g.4	Wed Oct 29 18:46:47 2008	(r184443)
+++ head/share/man/man4/u3g.4	Wed Oct 29 18:49:37 2008	(r184444)
@@ -43,7 +43,7 @@ u3g_load="YES"
 The
 .Nm
 driver provides support for the multiple USB-to-serial interfaces exposed by
-many 3G usb/pccard modems.
+many 3G USB/PCCard modems.
 .Pp
 The device is accessed through the
 .Xr ucom 4
@@ -77,23 +77,27 @@ Novatal MC950D
 Sierra cards
 .El
 .Pp
-See /sys/dev/u3g.c for the complete list of supported cards for each vendor
+See
+.Pa /sys/dev/u3g.c
+for the complete list of supported cards for each vendor
 mentioned above.
 .Pp
 The supported 3G cards provide the necessary modem port for ppp,
 pppd, or mpd connections as well as extra ports (depending on the specific
-device) to provide other functions (diagnostic port, SIM toolkit port)
+device) to provide other functions (diagnostic port, SIM toolkit port).
 .Pp
 In some of these devices a mass storage device supported by the
 .Xr umass 4
-driver is present which contains Windows and Mac OSX drivers. This device is
-hidden, unless the machine was booted in verbose (see
-.Xr boot 8 ).
+driver is present which contains Windows and Mac OS X drivers.
+This device is
+hidden, unless the machine was booted in verbose mode (see
+.Xr boot 8 ) .
 To temporarily unhide the device, set
 .Va debug.bootverbose
 to 1 using
 .Xr sysctl 8
-and replug the device. The
+and replug the device.
+The
 .Xr u3gstub 4
 device will attach temporarily and detach within seconds.
 .Sh SEE ALSO
@@ -103,10 +107,11 @@ device will attach temporarily and detac
 .Sh HISTORY
 The
 .Nm
-driver
-appeared in
+driver appeared in
 .Fx 8.0 ,
-is based on the uark driver, and written by
+is based on the
+.Xr uark 4
+driver, and written by
 .An Andrea Guzzo Aq aguzzo@anywi.com
 in September 2008.
 .Sh AUTHORS
@@ -116,4 +121,4 @@ driver was written by
 .An Andrea Guzzo Aq aguzzo@anywi.com
 and
 .An Nick Hibma Aq n_hibma@freebsd.org .
-Hardware for testing provided by AnyWi Technologies, Leiden, NL.
+Hardware for testing was provided by AnyWi Technologies, Leiden, NL.

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 18:56:59 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A739B1065678;
	Wed, 29 Oct 2008 18:56:59 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 9A0168FC12;
	Wed, 29 Oct 2008 18:56:59 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TIuxwk030321;
	Wed, 29 Oct 2008 18:56:59 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TIuxjk030320;
	Wed, 29 Oct 2008 18:56:59 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <200810291856.m9TIuxjk030320@svn.freebsd.org>
From: Hiroki Sato 
Date: Wed, 29 Oct 2008 18:56:59 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184445 - releng/6.4/release/doc/share/sgml
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 18:56:59 -0000

Author: hrs
Date: Wed Oct 29 18:56:59 2008
New Revision: 184445
URL: http://svn.freebsd.org/changeset/base/184445

Log:
  Update NetBSD version number.
  
  Approved by:	re (implicit)

Modified:
  releng/6.4/release/doc/share/sgml/release.ent

Modified: releng/6.4/release/doc/share/sgml/release.ent
==============================================================================
--- releng/6.4/release/doc/share/sgml/release.ent	Wed Oct 29 18:49:37 2008	(r184444)
+++ releng/6.4/release/doc/share/sgml/release.ent	Wed Oct 29 18:56:59 2008	(r184445)
@@ -37,7 +37,7 @@
 
 
 
-
+
 
 
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 19:11:03 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7528C1065675;
	Wed, 29 Oct 2008 19:11:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 663A08FC21;
	Wed, 29 Oct 2008 19:11:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TJB3Tn030603;
	Wed, 29 Oct 2008 19:11:03 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TJB3sU030602;
	Wed, 29 Oct 2008 19:11:03 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <200810291911.m9TJB3sU030602@svn.freebsd.org>
From: Hiroki Sato 
Date: Wed, 29 Oct 2008 19:11:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184446 -
	releng/6.4/release/doc/en_US.ISO8859-1/relnotes/common
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 19:11:03 -0000

Author: hrs
Date: Wed Oct 29 19:11:03 2008
New Revision: 184446
URL: http://svn.freebsd.org/changeset/base/184446

Log:
  Relnotes update for 6.4R.
  
  Security Advisories:
   SA-08:03.sendfile,
   SA-08:05.openssh,
   SA-08:06.bind,
   SA-08:07.amd64,
   SA-08:09.icmp6,
   SA-08:10.nd6.
  
  Kernel Changes:
   Camellia cipher support,
   malloc(9) RedZone added,
   kernel-mode client-side NFS locking (options NFSLOCKD),
   boot from GPT-labeled disk,
   acpi_asus(4) EeePC backlight support,
   DRM i915 GME support,
   bge(4) BCM5906 support,
   dummynet(4) fast support,
   aac(4) >2TB RAID array support,
   ata(4) ServerWorks HT1000 chipset workaround added,
   iir(4) stability improvement,
   mpt(4) mpt_user personality added.
  
  Userland Changes:
   bsdtar(1) --numeric-owner, -s, -S added,
   cp(1) ACL bug fixed,
   cron(8) -m added,
   cvs(1) -n added,
   dump(8) and restore(8) extattr support,
   fortune(6) FORTUNE_PATH support,
   fortune(6) -e bugfix,
   freebsd-update IDSIgnorePaths statement support,
   fwcontrol(8) -f added,
   make(1) :u variable modifier added,
   morse(6) output bug fixed,
   mountd(8) -h added,
   mv(1) behavior change,
   periodic(8) daily_status_mail_rejects_shorten variable added,
   ping6(8) exit status change,
   telnetd(8) authentication bug fixed,
   top(1) and vmstat(8) -P added,
   watch(8) now support >10 snp(4) devices,
   rc.d/ike removed,
   dymmynet_enable variable added to rc.conf,
   rc.d/ppp ppp_profile variable support,
   rc.d/sysctl loading /etc/sysctl.conf.local support,
   rc.firewall firewall_client_* and firewall_simple_* variable support,
   pkg_install updated to snapshot as of 30 May 2008 on CURRENT,
   pkg_sign(1) and pkg_check(1) removed.
  
  Contrib Software Update:
   am-utils 6.1.5,
   BIND 9.3.5-P2,
   NTP 4.2.4p5,
   FILE 4.21,
   libarchive 2.5.4b,
   ncurses 5.6-20080503,
   OpenPAM Hydrangea,
   tcsh 6.15.00,
   tzdata2008e.
  
  Approved by:	re (implicit)

Modified:
  releng/6.4/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml

Modified: releng/6.4/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml
==============================================================================
--- releng/6.4/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml	Wed Oct 29 18:56:59 2008	(r184445)
+++ releng/6.4/release/doc/en_US.ISO8859-1/relnotes/common/new.sgml	Wed Oct 29 19:11:03 2008	(r184446)
@@ -114,17 +114,88 @@
   
     Security Advisories
 
-    An error that could allow &man.sendfile.2; to
-      inappropriately access the contents of a file has been fixed.
-      For more information, see security advisory
-      FreeBSD-SA-08:03.sendfile.
-
+    Problems described in the following security advisories has
+      been fixed.  For more information, consult the individual
+      advisories available from .
+
+    
+      
+	
+	
+	
+	
+	  
+	    Advisory
+	    Date
+	    Topic
+	  
+	
+
+	
+	  
+	    SA-08:03.sendfile
+	    14 February 2008
+	    &man.sendfile.2; write-only file permission bypass
+	  
+	  
+	    SA-08:05.openssh
+	    17 April 2008
+	    OpenSSH X11-forwarding privilege escalation
+	  
+	  
+	    SA-08:06.bind
+	    13 July 2008
+	    DNS cache poisoning
+	  
+	  
+	    SA-08:07.amd64
+	    3 September 2008
+	    amd64 swapgs local privilege escalation
+	  
+	  
+	    SA-08:09.icmp6
+	    3 September 2008
+	    Remote kernel panics on IPv6 connections
+	  
+	  
+	    SA-08:10.nd6
+	    1 October 2008
+	    IPv6 Neighbor Discovery Protocol routing vulnerability
+	  
+	
+      
+    
   
 
   
     Kernel Changes
 
-    
+    The opencrypto framework (&man.crypto.9;) and &man.ipsec.4;
+      subsystem now support Camellia block cipher.
+
+    The &os; kernel &man.malloc.9; now supports buffer corruption
+      protection (RedZone).  This detects both buffer underflow and buffer
+      overflow bugs at runtime on &man.free.9; and &man.realloc.9; and
+      prints backtraces from where memory was allocated and from where it
+      was freed.  For more details, see DEBUG_REDZONE
+      kernel option.
+
+    The client side functionality of &man.rpc.lockd.8; has been
+      implemented in &os; kernel.  This implementation provides the
+      correct semantics for &man.flock.2; style locks which are used
+      by the &man.lockf.1; command line tool and the &man.pidfile.3;
+      library.  It also implements recovery from server restarts and
+      ensures that dirty cache blocks are written to the server before
+      obtaining locks (allowing multiple clients to use file locking
+      to safely share data).  Also, a new kernel option
+      options NFSLOCKD has been added and enabled
+      by default.
 
     
 
@@ -133,89 +204,235 @@
 
       
 
+      &os; now support booting from GPT-labeled disks from the BIOS.
+
       The BTX kernel used by the boot
 	loader has been changed to invoke BIOS routines from real
 	mode.  This change makes it possible to boot &os; from USB
 	devices.
-
     
 
     
       Hardware Support
 
-      
+      The &man.acpi.asus.4; driver now supports Asus EeePC backlight control.
 
       
 	Multimedia Support
 
-	 
+	The DRM driver now supports i915 GME device.
       
 
       
 	Network Interface Support
 
-	
-
+	The &man.bge.4; driver now supports BCM5906-based adapters.
       
     
 
     
       Network Protocols
 
-      
-
+      The &man.dummynet.4; subsystem now supports
+	fast mode operation which allows certain
+	packets to bypass the dummynet scheduler.  This can achieve
+	lower latency and lower overhead when the packet flow is under
+	the pipe bandwidth, and eliminate recursion in the subsystem.
+	The new sysctl variable
+	net.inet.ip.dummynet.io_fast has been
+	added to enable this feature.
+
+      The &man.resolver.3; now allows underscore in domain
+	names.  Although this is a violation of RFC 1034 [STD 13], it is
+	accepted by certain name servers as well as other popular operating
+	systems' resolver library.
     
 
     
       Disks and Storage
 
-      
+      The &man.aac.4; driver now supports 64-bit array support
+	for RAIDs larger than 2TB and simultaneous opens of the device
+	for issuing commands to the controller.
 
-    
+      A data corruption problem of the &man.ata.4; driver on
+	ServerWorks HT1000 chipsets has been fixed.
 
-    
-      File Systems
-
-      
+      Stability of the &man.iir.4; driver has been improved.
 
+      The &man.mpt.4; driver now supports mpt_user
+	personality.
     
-
   
 
   
     Userland Changes
 
-    
+    The &man.bsdtar.1; utility now supports the following options:
+      , , and
+      .
+
+    A bug in &man.cp.1; utility which prevents POSIX.1e ACL (see
+      also &man.acl.3;) from copying properly has been fixed.
+
+    The &man.cron.8; utility now supports  flag which
+      overrides the default mail recipient for cron mails unless explicitly
+      provided by MAILTO= line in crontab
+      file.
+
+    The &man.cvs.1; now supports  flag which
+      is the opposite of  flag.
+
+    The &man.dump.8; and &man.restore.8; utility now support
+      extended attributes (see also &man.extattr.9;).
+
+    The &man.fortune.6; program now supports
+      FORTUNE_PATH environment variable to specify
+      search path of the fortune files.
+
+    A bug in the &man.fortune.6; program that prevents
+       option with multiple files from working has
+      been fixed.
+
+    The &man.freebsd-update.conf.5; now supports
+      IDSIgnorePaths statement.
+
+    The &man.fwcontrol.8; utility now supports  option which specifies
+      node as the root node on the next bus
+      reset.
+
+    The &man.make.1; utility now supports :u
+      variable modifier which removes adjacent duplicate words.
+
+    The incorrect output grammer of &man.morse.6; program has
+      been fixed.
+
+    The &man.mountd.8; utility now supports  option which
+      specifies IP addresses to bind to for TCP and UDP requests.
+      This option may be specified multiple times.  If no
+       option is specified,
+      INADDR_ANY will be used.  Note that when
+      specifying IP addresses with this option, it will
+      automatically add 127.0.0.1 and if IPv6 is
+      enabled, ::1 to the list.
+
+    The &man.moused.8; utility now supports 
+      flag which changes the speed of scrolling and changes
+       option behavior to only affect the scroll
+      threshold.
+
+    The &man.mv.1; now support POSIX specification when moving a
+      directory to an existing directory across devices.
+
+    The &man.periodic.8; now supports
+      daily_status_mail_rejects_shorten
+      configuration variable in &man.periodic.conf.5;.  This allows
+      the rejected mail reports to tally the rejects per blacklist
+      without providing details about individual sender hosts.  The
+      default configuration keeps the reports in their original
+      form.
+
+    The &man.ping6.8; now uses exit status of
+      0 and 2 in the same manner
+      as &man.ping.8;.
+
+    A bug in &man.telnetd.8; that it attempts authentication
+      even when  option is specified has been
+      fixed.
+
+    The &man.top.1; and &man.vmstat.8; now support
+       flag which displays per-CPU statistics.
 
-     
+    The &man.watch.8; utility now supports more than 10
+      &man.snp.4; devices at a time.
+
+    
       <filename>/etc/rc.d</filename> Scripts
 
-      
+      The ike &man.rc.8; script has been
+	removed.
 
+      The &man.rc.conf.5; now supports
+	dummynet_enable variable which allow
+	&man.dummynet.4; kernel module to be loaded when
+	firewall_enable is YES.
+
+      The ppp &man.rc.8; script now
+	supports multiple instances.  For more details, see description of
+	ppp_profile variable in &man.rc.conf.5;.
+
+      The rfcomm_pppd_server &man.rc.8;
+	script which allows start &man.rfcomm.pppd.8; in server mode
+	at boot time, has been added.  Multiple profiles can be
+	started at the same time.  For more details, see
+	&man.rc.conf.5;.
+
+      The sysctl &man.rc.8; script now
+	supports loading /etc/sysctl.conf.local in
+	addition to /etc/sysctl.conf.
+
+      The &man.rc.conf.5; now supports configuration of
+	interfaces and attached networks for firewall rule set by
+	rc.firewall when
+	firewall_type is simple or
+	client.  See
+	firewall_client_net,
+	firewall_simple_iif,
+	firewall_simple_inet,
+	firewall_simple_oif, and
+	firewall_simple_onet.
     
-
   
 
   
     Contributed Software
 
+    am-utils has been updated to
+      version 6.1.5.
+
+    ISC BIND has been updated to
+      version 9.3.5-P2.
+
     bzip2 has been updated from 1.0.4
       to 1.0.5.
 
+    NTP has been updated to version
+      4.2.4p5.
+
+    FILE has been updated to version
+      4.21.
+
+    libarchive has been virtually updated
+      to 2.5.4b.  Note that the internal version number remains 1.9.25
+      because the API/ABI compatibility is preserved.
+
+    ncurses library has been updated
+      to version 5.6-20080503.
+
+    OpenPAM has been updated to
+      Hydrangea release.
+
     sendmail has been updated from
       8.14.2 to 8.14.3.
 
+    tcsh has been updated to version
+      6.15.00.
+
     The timezone database has been updated from
       the tzdata2007k release to
-      the tzdata2008b release.
-
+      the tzdata2008e release.
   
 
   
     Ports/Packages Collection Infrastructure
 
-    
+    The pkg_install utilities have been upgraded to
+      snapshot on 8.0-CURRENT as of May 30, 2008.
 
+    The &man.pkg.sign.1; and the &man.pkg.check.1; utility
+      have been removed.
   
 
   
@@ -224,15 +441,12 @@
     The supported version of
       the GNOME desktop environment
       (x11/gnome2) has been
-      updated from 2.20.1 to 2.22.
-
-  
-
-  
-    Documentation
-
-    
+      updated from 2.20.1 to 2.22.3.
 
+    The supported version of
+      the KDE desktop environment
+      (x11/kde3) has been
+      updated from 3.5.8 to 3.5.10.
   
 
 

From owner-svn-src-all@FreeBSD.ORG  Wed Oct 29 19:14:03 2008
Return-Path: 
Delivered-To: svn-src-all@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 95A781065673;
	Wed, 29 Oct 2008 19:14:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c])
	by mx1.freebsd.org (Postfix) with ESMTP id 886108FC12;
	Wed, 29 Oct 2008 19:14:03 +0000 (UTC) (envelope-from hrs@FreeBSD.org)
Received: from svn.freebsd.org (localhost [127.0.0.1])
	by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TJE3h2030698;
	Wed, 29 Oct 2008 19:14:03 GMT (envelope-from hrs@svn.freebsd.org)
Received: (from hrs@localhost)
	by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TJE3cr030697;
	Wed, 29 Oct 2008 19:14:03 GMT (envelope-from hrs@svn.freebsd.org)
Message-Id: <200810291914.m9TJE3cr030697@svn.freebsd.org>
From: Hiroki Sato 
Date: Wed, 29 Oct 2008 19:14:03 +0000 (UTC)
To: src-committers@freebsd.org, svn-src-all@freebsd.org,
	svn-src-releng@freebsd.org
X-SVN-Group: releng
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: 
Subject: svn commit: r184447 - releng/6.4/release/doc/en_US.ISO8859-1/errata
X-BeenThere: svn-src-all@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: "SVN commit messages for the entire src tree \(except for "
	user" and " projects" \)" 
List-Unsubscribe: ,
	
List-Archive: 
List-Post: 
List-Help: 
List-Subscribe: ,
	
X-List-Received-Date: Wed, 29 Oct 2008 19:14:03 -0000

Author: hrs
Date: Wed Oct 29 19:14:03 2008
New Revision: 184447
URL: http://svn.freebsd.org/changeset/base/184447

Log:
  Trim Errata document for 6.4R.
  
  Approved by:	re (implicit)

Modified:
  releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml

Modified: releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml
==============================================================================
--- releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml	Wed Oct 29 19:11:03 2008	(r184446)
+++ releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml	Wed Oct 29 19:14:03 2008	(r184447)
@@ -16,7 +16,7 @@
 
 
 %release;
-
+
 ]>
 
 
@@ -96,21 +96,7 @@ Late-Breaking News and Corrections - [20080204] The ISO images of &os; &release.bugfix; are sized - for 700MB CD-ROM media (ISO images of all prior versions assumed - 650MB media). This fact should have been mentioned in the - release notes. - - [20080204] Contrary to the release notes, ipfwpcap(8) - is not a feature included in &os; - &release.bugfix;. It was merged to the &release.branch; - codeline after the release branch was created. This utility - will be included in subsequent snapshots of &release.branch; and in - &release.next;. - - [20080229] The release notes gave an incorrect version - number for KDE. The correct version number is 3.5.8. - + No news. @@ -120,7 +106,9 @@ For more information, consult the individual advisories available from . + No advisories. + Known Problems and Solutions - [20080229] A bug in Linux emulation may cause segmentation - faults for some Linux programs using &man.mmap.2;. This issue - has been fixed on the HEAD and RELENG_6 branches. - - [20080229, updated 20080420] Multithreaded programs that perform a - &man.fork.2; operation may crash due to a race condition in the - threading library. This problem has been fixed on the HEAD, - RELENG_6, and RELENG_6_3 branches, and is addressed by errata - notice - FreeBSD-EN-08:01.libpthread. - - - [20080307] When using &man.sysinstall.8; to install the - X.org packages, selecting only specific components to be - installed may result in - the x11/xorg-drivers package - not being installed, and a corresponding failure of X.org server - to configure itself correctly. The recommended way to a - functioning X.org installation is simply to - select All from the Distributions - menu. - - [20080420] A reference counting bug in the IP multicast code - could cause kernel panics under some circumstances. It has been - fixed on the RELENG_6 branch by - revision 1.85.2.10 - of sys/netinet/in.c. - + No news.
From owner-svn-src-all@FreeBSD.ORG Wed Oct 29 19:22:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A93D01065670; Wed, 29 Oct 2008 19:22:00 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50A298FC13; Wed, 29 Oct 2008 19:22:00 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TJM03O030905; Wed, 29 Oct 2008 19:22:00 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TJM0TI030902; Wed, 29 Oct 2008 19:22:00 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200810291922.m9TJM0TI030902@svn.freebsd.org> From: Hiroki Sato Date: Wed, 29 Oct 2008 19:22:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184448 - releng/6.4/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 19:22:00 -0000 Author: hrs Date: Wed Oct 29 19:22:00 2008 New Revision: 184448 URL: http://svn.freebsd.org/changeset/base/184448 Log: Fix wording. Approved by: re (implicit) Modified: releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml Wed Oct 29 19:14:03 2008 (r184447) +++ releng/6.4/release/doc/en_US.ISO8859-1/errata/article.sgml Wed Oct 29 19:22:00 2008 (r184448) @@ -62,7 +62,8 @@ &os;. This errata document for &os; &release.bugfix; - will be maintained until the release of &os; &release.next;. + will be maintained until the end of 6.4-STABLE development + line support. From owner-svn-src-all@FreeBSD.ORG Wed Oct 29 19:22:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 694EE106568A; Wed, 29 Oct 2008 19:22:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5CA2C8FC13; Wed, 29 Oct 2008 19:22:29 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TJMT51030964; Wed, 29 Oct 2008 19:22:29 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TJMTRG030963; Wed, 29 Oct 2008 19:22:29 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200810291922.m9TJMTRG030963@svn.freebsd.org> From: Hiroki Sato Date: Wed, 29 Oct 2008 19:22:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184449 - releng/6.4/release/doc/en_US.ISO8859-1/share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 19:22:29 -0000 Author: hrs Date: Wed Oct 29 19:22:29 2008 New Revision: 184449 URL: http://svn.freebsd.org/changeset/base/184449 Log: Remove link for -stable mailing list. Approved by: re (implicit) Modified: releng/6.4/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Modified: releng/6.4/release/doc/en_US.ISO8859-1/share/sgml/release.dsl ============================================================================== --- releng/6.4/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Wed Oct 29 19:22:00 2008 (r184448) +++ releng/6.4/release/doc/en_US.ISO8859-1/share/sgml/release.dsl Wed Oct 29 19:22:29 2008 (r184449) @@ -38,17 +38,6 @@ (make element gi: "p" attributes: (list (list "align" "center")) (make element gi: "small" - (literal "All users of FreeBSD ") - (literal (entity-text "release.branch")) - (literal " should subscribe to the ") - (literal "<") - (create-link (list (list "HREF" "mailto:stable@FreeBSD.org")) - (literal "stable@FreeBSD.org")) - (literal "> mailing list."))) - - (make element gi: "p" - attributes: (list (list "align" "center")) - (make element gi: "small" (literal "For questions about this documentation, e-mail <") (create-link (list (list "HREF" "mailto:doc@FreeBSD.org")) (literal "doc@FreeBSD.org")) From owner-svn-src-all@FreeBSD.ORG Wed Oct 29 19:32:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7488D1065674; Wed, 29 Oct 2008 19:32:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4E1508FC0A; Wed, 29 Oct 2008 19:32:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TJWWFG031165; Wed, 29 Oct 2008 19:32:32 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TJWWSJ031164; Wed, 29 Oct 2008 19:32:32 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <200810291932.m9TJWWSJ031164@svn.freebsd.org> From: Hiroki Sato Date: Wed, 29 Oct 2008 19:32:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184450 - in releng/6.4/release/doc: de_DE.ISO8859-1 fr_FR.ISO8859-1 ja_JP.eucJP ru_RU.KOI8-R zh_CN.GB2312 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 19:32:32 -0000 Author: hrs Date: Wed Oct 29 19:32:32 2008 New Revision: 184450 URL: http://svn.freebsd.org/changeset/base/184450 Log: Remove very old translations for the moment. Approved by: re (implicit) Deleted: releng/6.4/release/doc/de_DE.ISO8859-1/ releng/6.4/release/doc/fr_FR.ISO8859-1/ releng/6.4/release/doc/ja_JP.eucJP/ releng/6.4/release/doc/ru_RU.KOI8-R/ releng/6.4/release/doc/zh_CN.GB2312/ From owner-svn-src-all@FreeBSD.ORG Wed Oct 29 19:52:24 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77132106567C; Wed, 29 Oct 2008 19:52:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A0A08FC2C; Wed, 29 Oct 2008 19:52:24 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TJqOwf031569; Wed, 29 Oct 2008 19:52:24 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TJqOr0031568; Wed, 29 Oct 2008 19:52:24 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200810291952.m9TJqOr0031568@svn.freebsd.org> From: Xin LI Date: Wed, 29 Oct 2008 19:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184451 - stable/7/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 19:52:24 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Oct 29 20:01:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A815D1065687; Wed, 29 Oct 2008 20:01:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9B2598FC25; Wed, 29 Oct 2008 20:01:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TK1QAa031787; Wed, 29 Oct 2008 20:01:26 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TK1Qpv031781; Wed, 29 Oct 2008 20:01:26 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200810292001.m9TK1Qpv031781@svn.freebsd.org> From: Alexander Motin Date: Wed, 29 Oct 2008 20:01:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184452 - in head/sys: arm/at91 dev/mmc dev/sdhci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 20:01:26 -0000 Author: mav Date: Wed Oct 29 20:01:26 2008 New Revision: 184452 URL: http://svn.freebsd.org/changeset/base/184452 Log: Allow card reader bridge driver to report maximum supported transfer size. sdhci supports up to 65535 blocks transfers, at91_mci - one block. Enable multiblock operations disabled before to follow at91_mci driver limitations. Reviewed by: imp@ Modified: head/sys/arm/at91/at91_mci.c head/sys/dev/mmc/mmc.c head/sys/dev/mmc/mmcbrvar.h head/sys/dev/mmc/mmcsd.c head/sys/dev/mmc/mmcvar.h head/sys/dev/sdhci/sdhci.c Modified: head/sys/arm/at91/at91_mci.c ============================================================================== --- head/sys/arm/at91/at91_mci.c Wed Oct 29 19:52:24 2008 (r184451) +++ head/sys/arm/at91/at91_mci.c Wed Oct 29 20:01:26 2008 (r184452) @@ -642,6 +642,9 @@ at91_mci_read_ivar(device_t bus, device_ case MMCBR_IVAR_VDD: *(int *)result = sc->host.ios.vdd; break; + case MMCBR_IVAR_MAX_DATA: + *(int *)result = 1; + break; } return (0); } @@ -682,6 +685,7 @@ at91_mci_write_ivar(device_t bus, device case MMCBR_IVAR_HOST_OCR: case MMCBR_IVAR_F_MIN: case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_MAX_DATA: return (EINVAL); } return (0); Modified: head/sys/dev/mmc/mmc.c ============================================================================== --- head/sys/dev/mmc/mmc.c Wed Oct 29 19:52:24 2008 (r184451) +++ head/sys/dev/mmc/mmc.c Wed Oct 29 20:01:26 2008 (r184452) @@ -1343,6 +1343,9 @@ mmc_read_ivar(device_t bus, device_t chi case MMC_IVAR_ERASE_SECTOR: *(int *)result = ivar->erase_sector; break; + case MMC_IVAR_MAX_DATA: + *(int *)result = mmcbr_get_max_data(bus); + break; } return (0); } Modified: head/sys/dev/mmc/mmcbrvar.h ============================================================================== --- head/sys/dev/mmc/mmcbrvar.h Wed Oct 29 19:52:24 2008 (r184451) +++ head/sys/dev/mmc/mmcbrvar.h Wed Oct 29 20:01:26 2008 (r184452) @@ -72,6 +72,7 @@ enum mmcbr_device_ivars { MMCBR_IVAR_VDD, MMCBR_IVAR_CAPS, MMCBR_IVAR_TIMING, + MMCBR_IVAR_MAX_DATA, // MMCBR_IVAR_, }; @@ -94,6 +95,7 @@ MMCBR_ACCESSOR(power_mode, POWER_MODE, i MMCBR_ACCESSOR(vdd, VDD, int) MMCBR_ACCESSOR(caps, CAPS, int) MMCBR_ACCESSOR(timing, TIMING, int) +MMCBR_ACCESSOR(max_data, MAX_DATA, int) static int __inline mmcbr_update_ios(device_t dev) Modified: head/sys/dev/mmc/mmcsd.c ============================================================================== --- head/sys/dev/mmc/mmcsd.c Wed Oct 29 19:52:24 2008 (r184451) +++ head/sys/dev/mmc/mmcsd.c Wed Oct 29 20:01:26 2008 (r184452) @@ -81,8 +81,6 @@ struct mmcsd_softc { int running; }; -#define MULTI_BLOCK_BROKEN - /* bus entry points */ static int mmcsd_probe(device_t dev); static int mmcsd_attach(device_t dev); @@ -235,12 +233,7 @@ mmcsd_rw(struct mmcsd_softc *sc, struct while (block < end) { char *vaddr = bp->bio_data + (block - bp->bio_pblkno) * sz; - int numblocks; -#ifdef MULTI_BLOCK - numblocks = end - block; -#else - numblocks = 1; -#endif + int numblocks = min(end - block, mmc_get_max_data(dev)); memset(&req, 0, sizeof(req)); memset(&cmd, 0, sizeof(cmd)); memset(&stop, 0, sizeof(stop)); Modified: head/sys/dev/mmc/mmcvar.h ============================================================================== --- head/sys/dev/mmc/mmcvar.h Wed Oct 29 19:52:24 2008 (r184451) +++ head/sys/dev/mmc/mmcvar.h Wed Oct 29 20:01:26 2008 (r184452) @@ -68,6 +68,7 @@ enum mmc_device_ivars { MMC_IVAR_CARD_TYPE, MMC_IVAR_BUS_WIDTH, MMC_IVAR_ERASE_SECTOR, + MMC_IVAR_MAX_DATA, // MMC_IVAR_, }; @@ -87,5 +88,6 @@ MMC_ACCESSOR(high_cap, HIGH_CAP, int) MMC_ACCESSOR(card_type, CARD_TYPE, int) MMC_ACCESSOR(bus_width, BUS_WIDTH, int) MMC_ACCESSOR(erase_sector, ERASE_SECTOR, int) +MMC_ACCESSOR(max_data, MAX_DATA, int) #endif /* DEV_MMC_MMCVAR_H */ Modified: head/sys/dev/sdhci/sdhci.c ============================================================================== --- head/sys/dev/sdhci/sdhci.c Wed Oct 29 19:52:24 2008 (r184451) +++ head/sys/dev/sdhci/sdhci.c Wed Oct 29 20:01:26 2008 (r184452) @@ -1440,6 +1440,9 @@ sdhci_read_ivar(device_t bus, device_t c case MMCBR_IVAR_TIMING: *(int *)result = slot->host.ios.timing; break; + case MMCBR_IVAR_MAX_DATA: + *(int *)result = 65535; + break; } return (0); } @@ -1494,6 +1497,7 @@ sdhci_write_ivar(device_t bus, device_t case MMCBR_IVAR_HOST_OCR: case MMCBR_IVAR_F_MIN: case MMCBR_IVAR_F_MAX: + case MMCBR_IVAR_MAX_DATA: return (EINVAL); } return (0); From owner-svn-src-all@FreeBSD.ORG Wed Oct 29 20:19:54 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B7FE1065680; Wed, 29 Oct 2008 20:19:54 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 504BA8FC31; Wed, 29 Oct 2008 20:19:54 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TKJs5v032131; Wed, 29 Oct 2008 20:19:54 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TKJs82032130; Wed, 29 Oct 2008 20:19:54 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810292019.m9TKJs82032130@svn.freebsd.org> From: Sam Leffler Date: Wed, 29 Oct 2008 20:19:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184453 - head/tools/tools/ath/athstats X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 20:19:54 -0000 Author: sam Date: Wed Oct 29 20:19:54 2008 New Revision: 184453 URL: http://svn.freebsd.org/changeset/base/184453 Log: o unbreak ani stat display o improve some labels Modified: head/tools/tools/ath/athstats/athstats.c Modified: head/tools/tools/ath/athstats/athstats.c ============================================================================== --- head/tools/tools/ath/athstats/athstats.c Wed Oct 29 20:01:26 2008 (r184452) +++ head/tools/tools/ath/athstats/athstats.c Wed Oct 29 20:19:54 2008 (r184453) @@ -300,9 +300,9 @@ static const struct fmt athstats[] = { #define S_ANI_STEPDOWN AFTER(S_ANI_STEPUP) { 5, "step-","STEP-", "ANI decreased first step level" }, #define S_ANI_OFDMERRS AFTER(S_ANI_STEPDOWN) - { 8, "ofdm", "OFDM", "cumulative ofdm phy error count" }, + { 8, "ofdm", "OFDM", "cumulative OFDM phy error count" }, #define S_ANI_CCKERRS AFTER(S_ANI_OFDMERRS) - { 8, "cck", "CCK", "cumulative cck phy error count" }, + { 8, "cck", "CCK", "cumulative CCK phy error count" }, #define S_ANI_RESET AFTER(S_ANI_CCKERRS) { 5, "reset","RESET", "ANI parameters zero'd for non-STA operation" }, #define S_ANI_LZERO AFTER(S_ANI_RESET) @@ -310,11 +310,11 @@ static const struct fmt athstats[] = { #define S_ANI_LNEG AFTER(S_ANI_LZERO) { 5, "lneg", "LNEG", "ANI calculated listen time < 0" }, #define S_MIB_ACKBAD AFTER(S_ANI_LNEG) - { 5, "ackbad","ACKBAD", "bad ACK's" }, + { 5, "ackbad","ACKBAD", "missing ACK's" }, #define S_MIB_RTSBAD AFTER(S_MIB_ACKBAD) - { 5, "rtsbad","RTSBAD", "bad RTS" }, + { 5, "rtsbad","RTSBAD", "RTS without CTS" }, #define S_MIB_RTSGOOD AFTER(S_MIB_RTSBAD) - { 5, "rtsgood","RTSGOOD", "good RTS" }, + { 5, "rtsgood","RTSGOOD", "successful RTS" }, #define S_MIB_FCSBAD AFTER(S_MIB_RTSGOOD) { 5, "fcsbad","FCSBAD", "bad FCS" }, #define S_MIB_BEACONS AFTER(S_MIB_FCSBAD) @@ -397,6 +397,7 @@ struct _athstats { uint8_t spurImmunityLevel; uint8_t firstepLevel; uint8_t ofdmWeakSigDetectOff; + uint8_t cckWeakSigThreshold; uint32_t listenTime; } ani_state; #endif @@ -613,6 +614,7 @@ ath_get_curstat(struct statfoo *sf, int case S_ANI_SPUR: ANI(spurImmunityLevel); case S_ANI_STEP: ANI(firstepLevel); case S_ANI_OFDM: ANI(ofdmWeakSigDetectOff); + case S_ANI_CCK: ANI(cckWeakSigThreshold); case S_ANI_LISTEN: ANI(listenTime); case S_ANI_NIUP: ANISTAT(niup); case S_ANI_NIDOWN: ANISTAT(nidown); @@ -821,6 +823,8 @@ ath_get_totstat(struct statfoo *sf, int case S_ANI_NOISE: ANI(noiseImmunityLevel); case S_ANI_SPUR: ANI(spurImmunityLevel); case S_ANI_STEP: ANI(firstepLevel); + case S_ANI_OFDM: ANI(ofdmWeakSigDetectOff); + case S_ANI_CCK: ANI(cckWeakSigThreshold); case S_ANI_LISTEN: ANI(listenTime); case S_ANI_NIUP: ANISTAT(niup); case S_ANI_NIDOWN: ANISTAT(nidown); From owner-svn-src-all@FreeBSD.ORG Wed Oct 29 21:08:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A3F7106564A; Wed, 29 Oct 2008 21:08:35 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4ED008FC24; Wed, 29 Oct 2008 21:08:35 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TL8YV2033087; Wed, 29 Oct 2008 21:08:34 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TL8YNR033085; Wed, 29 Oct 2008 21:08:34 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810292108.m9TL8YNR033085@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 29 Oct 2008 21:08:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184454 - in stable/7/sys: . amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 21:08:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Wed Oct 29 21:12:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED310106567E; Wed, 29 Oct 2008 21:12:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E1C978FC28; Wed, 29 Oct 2008 21:12:19 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TLCJ5J033236; Wed, 29 Oct 2008 21:12:19 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TLCJ9I033234; Wed, 29 Oct 2008 21:12:19 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810292112.m9TLCJ9I033234@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 29 Oct 2008 21:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184455 - in stable/6/sys: . amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 21:12:20 -0000 Author: sobomax Date: Wed Oct 29 21:12:19 2008 New Revision: 184455 URL: http://svn.freebsd.org/changeset/base/184455 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/6/sys/ (props changed) stable/6/sys/amd64/amd64/local_apic.c stable/6/sys/i386/i386/local_apic.c Modified: stable/6/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/6/sys/amd64/amd64/local_apic.c Wed Oct 29 21:08:34 2008 (r184454) +++ stable/6/sys/amd64/amd64/local_apic.c Wed Oct 29 21:12:19 2008 (r184455) @@ -392,7 +392,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/6/sys/i386/i386/local_apic.c ============================================================================== --- stable/6/sys/i386/i386/local_apic.c Wed Oct 29 21:08:34 2008 (r184454) +++ stable/6/sys/i386/i386/local_apic.c Wed Oct 29 21:12:19 2008 (r184455) @@ -393,7 +393,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 owner-svn-src-all@FreeBSD.ORG Wed Oct 29 21:31:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BE1861065689; Wed, 29 Oct 2008 21:31:01 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B3CE58FC19; Wed, 29 Oct 2008 21:31:01 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TLV1MU033631; Wed, 29 Oct 2008 21:31:01 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TLV1Dp033629; Wed, 29 Oct 2008 21:31:01 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810292131.m9TLV1Dp033629@svn.freebsd.org> From: Maxim Sobolev Date: Wed, 29 Oct 2008 21:31:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184456 - in releng/6.4/sys: . amd64/amd64 i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 21:31:01 -0000 Author: sobomax Date: Wed Oct 29 21:31:01 2008 New Revision: 184456 URL: http://svn.freebsd.org/changeset/base/184456 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: releng/6.4/sys/ (props changed) releng/6.4/sys/amd64/amd64/local_apic.c releng/6.4/sys/i386/i386/local_apic.c Modified: releng/6.4/sys/amd64/amd64/local_apic.c ============================================================================== --- releng/6.4/sys/amd64/amd64/local_apic.c Wed Oct 29 21:12:19 2008 (r184455) +++ releng/6.4/sys/amd64/amd64/local_apic.c Wed Oct 29 21:31:01 2008 (r184456) @@ -392,7 +392,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: releng/6.4/sys/i386/i386/local_apic.c ============================================================================== --- releng/6.4/sys/i386/i386/local_apic.c Wed Oct 29 21:12:19 2008 (r184455) +++ releng/6.4/sys/i386/i386/local_apic.c Wed Oct 29 21:31:01 2008 (r184456) @@ -393,7 +393,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 owner-svn-src-all@FreeBSD.ORG Wed Oct 29 21:43:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2D01065670; Wed, 29 Oct 2008 21:43:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A03F08FC1C; Wed, 29 Oct 2008 21:43:14 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9TLhEXn033912; Wed, 29 Oct 2008 21:43:14 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9TLhEgT033911; Wed, 29 Oct 2008 21:43:14 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <200810292143.m9TLhEgT033911@svn.freebsd.org> From: Andrew Thompson Date: Wed, 29 Oct 2008 21:43:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184457 - in stable/7/sys: . libkern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Oct 2008 21:43:14 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 00:19:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A20D1065670; Thu, 30 Oct 2008 00:19:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 284F28FC2F; Thu, 30 Oct 2008 00:19:20 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U0JKa1036691; Thu, 30 Oct 2008 00:19:20 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U0JKCr036690; Thu, 30 Oct 2008 00:19:20 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200810300019.m9U0JKCr036690@svn.freebsd.org> From: Xin LI Date: Thu, 30 Oct 2008 00:19:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184458 - head/lib/libc/stdtime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 00:19:20 -0000 Author: delphij Date: Thu Oct 30 00:19:19 2008 New Revision: 184458 URL: http://svn.freebsd.org/changeset/base/184458 Log: Pass a pointer to warn2 so the warn2 == IN_ALL would not be an always-false condition. Modified: head/lib/libc/stdtime/strftime.c Modified: head/lib/libc/stdtime/strftime.c ============================================================================== --- head/lib/libc/stdtime/strftime.c Wed Oct 29 21:43:14 2008 (r184457) +++ head/lib/libc/stdtime/strftime.c Thu Oct 30 00:19:19 2008 (r184458) @@ -177,7 +177,7 @@ label: { int warn2 = IN_SOME; - pt = _fmt(tptr->c_fmt, t, pt, ptlim, warnp); + pt = _fmt(tptr->c_fmt, t, pt, ptlim, &warn2); if (warn2 == IN_ALL) warn2 = IN_THIS; if (warn2 > *warnp) From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 01:54:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68DAC1065693; Thu, 30 Oct 2008 01:54:32 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52CCE8FC1B; Thu, 30 Oct 2008 01:54:32 +0000 (UTC) (envelope-from rafan@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U1sWct038387; Thu, 30 Oct 2008 01:54:32 GMT (envelope-from rafan@svn.freebsd.org) Received: (from rafan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U1sWgv038386; Thu, 30 Oct 2008 01:54:32 GMT (envelope-from rafan@svn.freebsd.org) Message-Id: <200810300154.m9U1sWgv038386@svn.freebsd.org> From: Rong-En Fan Date: Thu, 30 Oct 2008 01:54:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184459 - head/usr.sbin/rpc.yppasswdd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 01:54:32 -0000 Author: rafan Date: Thu Oct 30 01:54:31 2008 New Revision: 184459 URL: http://svn.freebsd.org/changeset/base/184459 Log: - Whenever a password/shell is changed via rpc.yppasswdd, the daemon leaves one zombie process because it does not do the cleanup. For a long running NIS/YP server, it will have lots of zombie processes on it. Fix that by ignoring the SIGCHLD signal since we don't really care about the exit status in this case. PR: bin/91980 Reported by: Arjan van der Velde Submitted by: Jui-Nan Lin" Reviewed by: delphij MFC after: 1 month Modified: head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Modified: head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c ============================================================================== --- head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Thu Oct 30 00:19:19 2008 (r184458) +++ head/usr.sbin/rpc.yppasswdd/yppasswdd_main.c Thu Oct 30 01:54:31 2008 (r184459) @@ -165,6 +165,7 @@ main(int argc, char *argv[]) struct sockaddr_in saddr; socklen_t asize = sizeof (saddr); struct netconfig *nconf; + struct sigaction sa; void *localhandle; int ch; char *mastername; @@ -268,6 +269,9 @@ the %s domain -- aborting", yppasswd_dom } } openlog("rpc.yppasswdd", LOG_PID, LOG_DAEMON); + memset(&sa, 0, sizeof(sa)); + sa.sa_flags = SA_NOCLDWAIT; + sigaction(SIGCHLD, &sa, NULL); rpcb_unset(YPPASSWDPROG, YPPASSWDVERS, NULL); rpcb_unset(MASTER_YPPASSWDPROG, MASTER_YPPASSWDVERS, NULL); From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 03:31:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 73421106567F; Thu, 30 Oct 2008 03:31:33 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AFDE8FC1E; Thu, 30 Oct 2008 03:31:33 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U3VXxq040364; Thu, 30 Oct 2008 03:31:33 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U3VX3k040363; Thu, 30 Oct 2008 03:31:33 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200810300331.m9U3VX3k040363@svn.freebsd.org> From: Marcel Moolenaar Date: Thu, 30 Oct 2008 03:31:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184460 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 03:31:33 -0000 Author: marcel Date: Thu Oct 30 03:31:33 2008 New Revision: 184460 URL: http://svn.freebsd.org/changeset/base/184460 Log: Add support for little-endian compilations to this file. Modified: head/sys/powerpc/include/endian.h Modified: head/sys/powerpc/include/endian.h ============================================================================== --- head/sys/powerpc/include/endian.h Thu Oct 30 01:54:31 2008 (r184459) +++ head/sys/powerpc/include/endian.h Thu Oct 30 03:31:33 2008 (r184460) @@ -44,15 +44,29 @@ #define _QUAD_LOWWORD 1 /* + * GCC defines _BIG_ENDIAN and _LITTLE_ENDIAN equal to __BIG_ENDIAN__ + * and __LITTLE_ENDIAN__ (resp). + */ +#ifdef _BIG_ENDIAN +#undef _BIG_ENDIAN +#endif +#ifdef _LITTLE_ENDIAN +#undef _LITTLE_ENDIAN +#endif + +/* * Definitions for byte order, according to byte significance from low * address to high. */ -#undef _BIG_ENDIAN /* GCC annoyingly defines this for PowerPC */ #define _LITTLE_ENDIAN 1234 /* LSB first: i386, vax */ #define _BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */ #define _PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */ +#ifdef __LITTLE_ENDIAN__ +#define _BYTE_ORDER _LITTLE_ENDIAN +#else #define _BYTE_ORDER _BIG_ENDIAN +#endif /* * Deprecated variants that don't have enough underscores to be useful in more From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 04:01:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C0F41065673; Thu, 30 Oct 2008 04:01:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 606C38FC0A; Thu, 30 Oct 2008 04:01:12 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U41CmY040926; Thu, 30 Oct 2008 04:01:12 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U41CMT040921; Thu, 30 Oct 2008 04:01:12 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200810300401.m9U41CMT040921@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 30 Oct 2008 04:01:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184461 - in stable/7/sys: . dev/bm powerpc/include powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 04:01:12 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 04:55:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 982801065673; Thu, 30 Oct 2008 04:55:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7D0348FC19; Thu, 30 Oct 2008 04:55:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U4tDSC041938; Thu, 30 Oct 2008 04:55:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U4tDmx041936; Thu, 30 Oct 2008 04:55:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200810300455.m9U4tDmx041936@svn.freebsd.org> From: Xin LI Date: Thu, 30 Oct 2008 04:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184463 - in stable/7/release/doc/zh_CN.GB2312: hardware relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 04:55:13 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 08:13:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0DBCA1065672; Thu, 30 Oct 2008 08:13:50 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F0F8F8FC1A; Thu, 30 Oct 2008 08:13:49 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U8DnWJ045387; Thu, 30 Oct 2008 08:13:49 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U8DnXX045386; Thu, 30 Oct 2008 08:13:49 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200810300813.m9U8DnXX045386@svn.freebsd.org> From: Nick Hibma Date: Thu, 30 Oct 2008 08:13:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184464 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 08:13:50 -0000 Author: n_hibma Date: Thu Oct 30 08:13:49 2008 New Revision: 184464 URL: http://svn.freebsd.org/changeset/base/184464 Log: Return USBD_NORMAL_COMPLETION instead of a hard coded 0. Modified: head/sys/dev/usb/usbdi.c Modified: head/sys/dev/usb/usbdi.c ============================================================================== --- head/sys/dev/usb/usbdi.c Thu Oct 30 04:55:12 2008 (r184463) +++ head/sys/dev/usb/usbdi.c Thu Oct 30 08:13:49 2008 (r184464) @@ -325,7 +325,7 @@ usbd_transfer(usbd_xfer_handle xfer) } if (!(xfer->flags & USBD_SYNCHRONOUS)) - return (xfer->done ? 0 : USBD_IN_PROGRESS); + return (xfer->done ? USBD_NORMAL_COMPLETION : USBD_IN_PROGRESS); /* Sync transfer, wait for completion. */ s = splusb(); From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 08:17:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 623921065676; Thu, 30 Oct 2008 08:17:28 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 515D68FC1D; Thu, 30 Oct 2008 08:17:28 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U8HSOE045477; Thu, 30 Oct 2008 08:17:28 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U8HSKF045476; Thu, 30 Oct 2008 08:17:28 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200810300817.m9U8HSKF045476@svn.freebsd.org> From: Nick Hibma Date: Thu, 30 Oct 2008 08:17:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184465 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 08:17:28 -0000 Author: n_hibma Date: Thu Oct 30 08:17:27 2008 New Revision: 184465 URL: http://svn.freebsd.org/changeset/base/184465 Log: Bugfix: Check the error code for in progress as well, after starting the transfer. Some changes to improve the debugging experience. Modified: head/sys/dev/usb/u3g.c Modified: head/sys/dev/usb/u3g.c ============================================================================== --- head/sys/dev/usb/u3g.c Thu Oct 30 08:13:49 2008 (r184464) +++ head/sys/dev/usb/u3g.c Thu Oct 30 08:17:27 2008 (r184465) @@ -51,7 +51,7 @@ #endif #include "usbdevs.h" -/* #define U3G_DEBUG */ +//#define U3G_DEBUG #ifdef U3G_DEBUG #define DPRINTF(x...) do { if (u3gdebug) device_printf(sc->sc_dev, ##x); } while (0) int u3gdebug = 1; @@ -483,8 +483,10 @@ u3gstub_scsi_eject(struct u3gstub_softc break; } - if (i == id->bNumEndpoints) + if (i == id->bNumEndpoints) { + DPRINTF("failed to find bulk-out pipe\n"); return 0; + } if (usbd_open_pipe(uaa->iface, ed->bEndpointAddress, USBD_EXCLUSIVE_USE, &sc->sc_pipe) != USBD_NORMAL_COMPLETION) { @@ -501,7 +503,8 @@ u3gstub_scsi_eject(struct u3gstub_softc usbd_setup_xfer(sc->sc_xfer, sc->sc_pipe, NULL, cmd, sizeof(cmd), 0, USBD_DEFAULT_TIMEOUT, NULL); - if (usbd_transfer(sc->sc_xfer) != USBD_NORMAL_COMPLETION) { + int err = usbd_transfer(sc->sc_xfer) != USBD_NORMAL_COMPLETION; + if (err != USBD_NORMAL_COMPLETION && err != USBD_IN_PROGRESS) { DPRINTF("failed to start transfer\n"); return 0; } @@ -545,8 +548,8 @@ u3gstub_match(device_t self) return UMATCH_NONE; if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT - || u3g_dev_type->flags&U3GFL_SIERRA_INIT || u3g_dev_type->flags&U3GFL_SCSI_EJECT + || u3g_dev_type->flags&U3GFL_SIERRA_INIT || u3g_dev_type->flags&U3GFL_STUB_WAIT) { /* We assume that if the first interface is still a mass * storage device the device has not yet changed appearance. @@ -574,9 +577,8 @@ u3gstub_attach(device_t self) sc->sc_dev = self; sc->sc_udev = uaa->device; - if (uaa->iface) - for (i = 0; i < uaa->nifaces; i++) - uaa->ifaces[i] = NULL; // claim all interfaces + for (i = 0; i < uaa->nifaces; i++) + uaa->ifaces[i] = NULL; // claim all interfaces u3g_dev_type = u3g_lookup(uaa->vendor, uaa->product); if (u3g_dev_type->flags&U3GFL_HUAWEI_INIT) { @@ -584,7 +586,7 @@ u3gstub_attach(device_t self) if (!u3gstub_huawei_init(sc, uaa)) return ENXIO; } else if (u3g_dev_type->flags&U3GFL_SCSI_EJECT) { - DPRINTF("sending CD eject command to change to modem mode \n"); + DPRINTF("sending CD eject command to change to modem mode\n"); if (!u3gstub_scsi_eject(sc, uaa)) return ENXIO; } else if (u3g_dev_type->flags&U3GFL_SIERRA_INIT) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 08:32:18 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D53F41065676; Thu, 30 Oct 2008 08:32:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C42E68FC17; Thu, 30 Oct 2008 08:32:18 +0000 (UTC) (envelope-from n_hibma@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9U8WI9o045753; Thu, 30 Oct 2008 08:32:18 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9U8WInO045752; Thu, 30 Oct 2008 08:32:18 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <200810300832.m9U8WInO045752@svn.freebsd.org> From: Nick Hibma Date: Thu, 30 Oct 2008 08:32:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184466 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 08:32:19 -0000 Author: n_hibma Date: Thu Oct 30 08:32:18 2008 New Revision: 184466 URL: http://svn.freebsd.org/changeset/base/184466 Log: We need to print out the device info ourselves on FBSD 6. Submitted by: Thomas Nystrom Modified: head/sys/dev/usb/u3g.c Modified: head/sys/dev/usb/u3g.c ============================================================================== --- head/sys/dev/usb/u3g.c Thu Oct 30 08:17:27 2008 (r184465) +++ head/sys/dev/usb/u3g.c Thu Oct 30 08:32:18 2008 (r184466) @@ -227,6 +227,13 @@ u3g_attach(device_t self) usb_config_descriptor_t *cd; char devnamefmt[32]; +#if __FreeBSD_version < 700000 + char *devinfo = malloc(1024, M_USBDEV, M_WAITOK); + usbd_devinfo(dev, 0, devinfo); + device_printf(self, "%s\n", devinfo); + free(devinfo, M_USBDEV); +#endif + /* get the config descriptor */ cd = usbd_get_config_descriptor(dev); if (cd == NULL) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 08:39:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 290A5106568F for ; Thu, 30 Oct 2008 08:39:08 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml12.kpnxchange.com (hpsmtp-eml12.KPNXCHANGE.COM [213.75.38.112]) by mx1.freebsd.org (Postfix) with ESMTP id AED0C8FC12 for ; Thu, 30 Oct 2008 08:39:07 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml05.kpnxchange.com ([213.75.38.105]) by hpsmtp-eml12.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Oct 2008 09:39:05 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by hpsmtp-eml05.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Oct 2008 09:39:02 +0100 Received: (qmail 68917 invoked by uid 98); 30 Oct 2008 08:39:01 -0000 Received: from 10.66.0.135 (nick@10.66.0.135) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.135):. Processed in 0.782965 secs); 30 Oct 2008 08:39:01 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.135) by uitsmijter.van-laarhoven.org with SMTP; 30 Oct 2008 08:39:00 -0000 Received: (nullmailer pid 2064 invoked by uid 1001); Thu, 30 Oct 2008 08:38:59 -0000 From: Nick Hibma To: svn-src-all@freebsd.org Date: Thu, 30 Oct 2008 09:38:57 +0100 User-Agent: KMail/1.9.7 References: <200810300832.m9U8WInO045752@svn.freebsd.org> In-Reply-To: <200810300832.m9U8WInO045752@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810300938.58420.nick@van-laarhoven.org> X-OriginalArrivalTime: 30 Oct 2008 08:39:02.0117 (UTC) FILETIME=[F5C6F150:01C93A6A] Cc: FreeBSD STABLE Mailing List , chat@freebsd.org Subject: Re: svn commit: r184466 - head/sys/dev/usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 08:39:08 -0000 Folks, Just to preempt people suggesting that I committed into the wrong tree: I didn't. FBSD 6 is still locked down. To keep things simple I keep one version of the driver in CURRENT which works on FBSD CURRENT, 7, and 6. See http://people.freebsd.org/~n_hibma/u3g.html for more info on how to use the driver in various versions of the OS. And the cross post is intentional as well as I've had many positive responses from people that became aware of the driver. Nick > Author: n_hibma > Date: Thu Oct 30 08:32:18 2008 > New Revision: 184466 > URL: http://svn.freebsd.org/changeset/base/184466 > > Log: > We need to print out the device info ourselves on FBSD 6. > > Submitted by: Thomas Nystrom > > Modified: > head/sys/dev/usb/u3g.c > > Modified: head/sys/dev/usb/u3g.c > ========================================================================= >===== --- head/sys/dev/usb/u3g.c Thu Oct 30 08:17:27 2008 (r184465) > +++ head/sys/dev/usb/u3g.c Thu Oct 30 08:32:18 2008 (r184466) > @@ -227,6 +227,13 @@ u3g_attach(device_t self) > usb_config_descriptor_t *cd; > char devnamefmt[32]; > > +#if __FreeBSD_version < 700000 > + char *devinfo = malloc(1024, M_USBDEV, M_WAITOK); > + usbd_devinfo(dev, 0, devinfo); > + device_printf(self, "%s\n", devinfo); > + free(devinfo, M_USBDEV); > +#endif > + > /* get the config descriptor */ > cd = usbd_get_config_descriptor(dev); > if (cd == NULL) { > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 08:40:40 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A86A11065670 for ; Thu, 30 Oct 2008 08:40:40 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from hpsmtp-eml14.kpnxchange.com (hpsmtp-eml14.KPNXCHANGE.COM [213.75.38.114]) by mx1.freebsd.org (Postfix) with ESMTP id 3B8F48FC08 for ; Thu, 30 Oct 2008 08:40:39 +0000 (UTC) (envelope-from nick@van-laarhoven.org) Received: from cpsmtpi-eml05.kpnxchange.com ([213.75.38.135]) by hpsmtp-eml14.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Oct 2008 09:40:38 +0100 Received: from uitsmijter.van-laarhoven.org ([81.207.207.222]) by cpsmtpi-eml05.kpnxchange.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 30 Oct 2008 09:40:39 +0100 Received: (qmail 69000 invoked by uid 98); 30 Oct 2008 08:40:38 -0000 Received: from 10.66.0.135 (nick@10.66.0.135) by uitsmijter.van-laarhoven.org (envelope-from , uid 82) with qmail-scanner-2.01 (clamdscan: 0.92/5270. f-prot: 4.6.7/3.16.15. spamassassin: 3.2.3. Clear:RC:1(10.66.0.135):. Processed in 0.769757 secs); 30 Oct 2008 08:40:38 -0000 Received: from unknown (HELO van-laarhoven.org) (nick@10.66.0.135) by uitsmijter.van-laarhoven.org with SMTP; 30 Oct 2008 08:40:37 -0000 Received: (nullmailer pid 2132 invoked by uid 1001); Thu, 30 Oct 2008 08:40:35 -0000 From: Nick Hibma To: svn-src-all@freebsd.org Date: Thu, 30 Oct 2008 09:40:35 +0100 User-Agent: KMail/1.9.7 References: <200810291849.m9TInbHv030154@svn.freebsd.org> In-Reply-To: <200810291849.m9TInbHv030154@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200810300940.35399.nick@van-laarhoven.org> X-OriginalArrivalTime: 30 Oct 2008 08:40:39.0153 (UTC) FILETIME=[2F9D7610:01C93A6B] Subject: Re: svn commit: r184444 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 08:40:40 -0000 Thanks! Nick > Author: brueffer > Date: Wed Oct 29 18:49:37 2008 > New Revision: 184444 > URL: http://svn.freebsd.org/changeset/base/184444 > > Log: > Misc cleanup. > > Modified: > head/share/man/man4/u3g.4 > > Modified: head/share/man/man4/u3g.4 > ========================================================================= >===== --- head/share/man/man4/u3g.4 Wed Oct 29 18:46:47 2008 (r184443) +++ > head/share/man/man4/u3g.4 Wed Oct 29 18:49:37 2008 (r184444) @@ -43,7 > +43,7 @@ u3g_load="YES" > The > .Nm > driver provides support for the multiple USB-to-serial interfaces > exposed by -many 3G usb/pccard modems. > +many 3G USB/PCCard modems. > .Pp > The device is accessed through the > .Xr ucom 4 > @@ -77,23 +77,27 @@ Novatal MC950D > Sierra cards > .El > .Pp > -See /sys/dev/u3g.c for the complete list of supported cards for each > vendor +See > +.Pa /sys/dev/u3g.c > +for the complete list of supported cards for each vendor > mentioned above. > .Pp > The supported 3G cards provide the necessary modem port for ppp, > pppd, or mpd connections as well as extra ports (depending on the > specific -device) to provide other functions (diagnostic port, SIM > toolkit port) +device) to provide other functions (diagnostic port, SIM > toolkit port). .Pp > In some of these devices a mass storage device supported by the > .Xr umass 4 > -driver is present which contains Windows and Mac OSX drivers. This > device is -hidden, unless the machine was booted in verbose (see > -.Xr boot 8 ). > +driver is present which contains Windows and Mac OS X drivers. > +This device is > +hidden, unless the machine was booted in verbose mode (see > +.Xr boot 8 ) . > To temporarily unhide the device, set > .Va debug.bootverbose > to 1 using > .Xr sysctl 8 > -and replug the device. The > +and replug the device. > +The > .Xr u3gstub 4 > device will attach temporarily and detach within seconds. > .Sh SEE ALSO > @@ -103,10 +107,11 @@ device will attach temporarily and detac > .Sh HISTORY > The > .Nm > -driver > -appeared in > +driver appeared in > .Fx 8.0 , > -is based on the uark driver, and written by > +is based on the > +.Xr uark 4 > +driver, and written by > .An Andrea Guzzo Aq aguzzo@anywi.com > in September 2008. > .Sh AUTHORS > @@ -116,4 +121,4 @@ driver was written by > .An Andrea Guzzo Aq aguzzo@anywi.com > and > .An Nick Hibma Aq n_hibma@freebsd.org . > -Hardware for testing provided by AnyWi Technologies, Leiden, NL. > +Hardware for testing was provided by AnyWi Technologies, Leiden, NL. > _______________________________________________ > svn-src-all@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-all > To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 10:13:53 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CBD51065698; Thu, 30 Oct 2008 10:13:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 573A28FC68; Thu, 30 Oct 2008 10:13:53 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UADrZ3047731; Thu, 30 Oct 2008 10:13:53 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UADrQ6047728; Thu, 30 Oct 2008 10:13:53 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810301013.m9UADrQ6047728@svn.freebsd.org> From: Robert Watson Date: Thu, 30 Oct 2008 10:13:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184467 - head/sys/security/mac_bsdextended X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 10:13:53 -0000 Author: rwatson Date: Thu Oct 30 10:13:53 2008 New Revision: 184467 URL: http://svn.freebsd.org/changeset/base/184467 Log: The V* flags passed using an accmode_t to the access() and open() access control checks in mac_bsdextended are not in the same namespace as the MBI_ flags used in ugidfw policies, so add an explicit conversion routine to get from one to the other. Obtained from: TrustedBSD Project Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c head/sys/security/mac_bsdextended/ugidfw_internal.h head/sys/security/mac_bsdextended/ugidfw_vnode.c Modified: head/sys/security/mac_bsdextended/mac_bsdextended.c ============================================================================== --- head/sys/security/mac_bsdextended/mac_bsdextended.c Thu Oct 30 08:32:18 2008 (r184466) +++ head/sys/security/mac_bsdextended/mac_bsdextended.c Thu Oct 30 10:13:53 2008 (r184467) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2005 Tom Rhodes * Copyright (c) 2006 SPARTA, Inc. @@ -465,6 +465,27 @@ ugidfw_check_vp(struct ucred *cred, stru return (ugidfw_check(cred, vp, &vap, acc_mode)); } +int +ugidfw_accmode2mbi(accmode_t accmode) +{ + int mbi; + + mbi = 0; + if (accmode & VEXEC) + mbi |= MBI_EXEC; + if (accmode & VWRITE) + mbi |= MBI_WRITE; + if (accmode & VREAD) + mbi |= MBI_READ; + if (accmode & VADMIN) + mbi |= MBI_ADMIN; + if (accmode & VSTAT) + mbi |= MBI_STAT; + if (accmode & VAPPEND) + mbi |= MBI_APPEND; + return (mbi); +} + static struct mac_policy_ops ugidfw_ops = { .mpo_destroy = ugidfw_destroy, Modified: head/sys/security/mac_bsdextended/ugidfw_internal.h ============================================================================== --- head/sys/security/mac_bsdextended/ugidfw_internal.h Thu Oct 30 08:32:18 2008 (r184466) +++ head/sys/security/mac_bsdextended/ugidfw_internal.h Thu Oct 30 10:13:53 2008 (r184467) @@ -34,6 +34,7 @@ /* * Central access control routines used by object-specific checks. */ +int ugidfw_accmode2mbi(accmode_t accmode); int ugidfw_check(struct ucred *cred, struct vnode *vp, struct vattr *vap, int acc_mode); int ugidfw_check_vp(struct ucred *cred, struct vnode *vp, int acc_mode); Modified: head/sys/security/mac_bsdextended/ugidfw_vnode.c ============================================================================== --- head/sys/security/mac_bsdextended/ugidfw_vnode.c Thu Oct 30 08:32:18 2008 (r184466) +++ head/sys/security/mac_bsdextended/ugidfw_vnode.c Thu Oct 30 10:13:53 2008 (r184467) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1999-2002, 2007 Robert N. M. Watson + * Copyright (c) 1999-2002, 2007-2008 Robert N. M. Watson * Copyright (c) 2001-2005 Networks Associates Technology, Inc. * Copyright (c) 2005 Tom Rhodes * Copyright (c) 2006 SPARTA, Inc. @@ -65,11 +65,7 @@ ugidfw_vnode_check_access(struct ucred * struct label *vplabel, accmode_t accmode) { - /* - * XXX: We pass accmode_t variable containing V* constants - * as an int containing MBI_* constants. - */ - return (ugidfw_check_vp(cred, vp, (int)accmode)); + return (ugidfw_check_vp(cred, vp, ugidfw_accmode2mbi(accmode))); } int @@ -175,11 +171,7 @@ ugidfw_vnode_check_open(struct ucred *cr struct label *vplabel, accmode_t accmode) { - /* - * XXX: We pass accmode_t variable containing V* constants - * as an int containing MBI_* constants. - */ - return (ugidfw_check_vp(cred, vp, (int)accmode)); + return (ugidfw_check_vp(cred, vp, ugidfw_accmode2mbi(accmode))); } int From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 12:20:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CAED51065679; Thu, 30 Oct 2008 12:20:35 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id 86FB28FC16; Thu, 30 Oct 2008 12:20:35 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 66FF16D449; Thu, 30 Oct 2008 12:20:34 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 4EC6C84494; Thu, 30 Oct 2008 13:20:34 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Maxim Sobolev References: <200810270625.m9R6P2a8029701@svn.freebsd.org> Date: Thu, 30 Oct 2008 13:20:34 +0100 In-Reply-To: <200810270625.m9R6P2a8029701@svn.freebsd.org> (Maxim Sobolev's message of "Mon, 27 Oct 2008 06:25:02 +0000 (UTC)") Message-ID: <86wsfqgtpp.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184323 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 12:20:35 -0000 Maxim Sobolev writes: > Log: > Default HZ value (1,000) on i386/amd64 is not very virtual machine frie= ndly. > Due to the nature of the beast it causes lot of unproductive overhead. = This > is especially bad when running SMP kernel on VMWare with several virtual > processors - idle FreeBSD guest with SMP kernel takes 150% host CPU tim= e on my > dual-core MacBook Pro when I am enabling two virtual CPUs, making even = host > not very usable. Detect when we are running in the sandbox and reduce HZ > to 10 (can be adjusted via VM_HZ in the kernel config) in such cases. T= his > brings host CPU usage of idle FreeBSD/SMP on two virtual processors down > to 10%. What, too chicken to go whole hog and make the kernel tickless? :) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 13:10:33 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67AC106564A; Thu, 30 Oct 2008 13:10:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 92B118FC24; Thu, 30 Oct 2008 13:10:33 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UDAXMj052163; Thu, 30 Oct 2008 13:10:33 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UDAXm0052162; Thu, 30 Oct 2008 13:10:33 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810301310.m9UDAXm0052162@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 30 Oct 2008 13:10:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184468 - in stable/6/sys: . dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 13:10:33 -0000 Author: kib Date: Thu Oct 30 13:10:33 2008 New Revision: 184468 URL: http://svn.freebsd.org/changeset/base/184468 Log: MFC of the r179312 by sos: Do not call ata_start() when ata_reinit fails in the ioctl path. Approved by: re (kensmith), sos Prodded by: Andrey V. Elsukov Modified: stable/6/sys/ (props changed) stable/6/sys/dev/ata/ata-all.c Modified: stable/6/sys/dev/ata/ata-all.c ============================================================================== --- stable/6/sys/dev/ata/ata-all.c Thu Oct 30 10:13:53 2008 (r184467) +++ stable/6/sys/dev/ata/ata-all.c Thu Oct 30 13:10:33 2008 (r184468) @@ -375,7 +375,6 @@ ata_ioctl(struct cdev *dev, u_long cmd, !(device = devclass_get_device(ata_devclass, *value))) return ENXIO; error = ata_reinit(device); - ata_start(device); break; case IOCATAATTACH: From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 13:14:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D7AE21065672; Thu, 30 Oct 2008 13:14:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C32798FC16; Thu, 30 Oct 2008 13:14:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UDEjwP052286; Thu, 30 Oct 2008 13:14:45 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UDEjMp052282; Thu, 30 Oct 2008 13:14:45 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810301314.m9UDEjMp052282@svn.freebsd.org> From: John Baldwin Date: Thu, 30 Oct 2008 13:14:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184469 - in stable/7/sys: . compat/freebsd32 kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 13:14:46 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 13:18:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81E34106567D; Thu, 30 Oct 2008 13:18:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EF448FC18; Thu, 30 Oct 2008 13:18:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UDISLl052393; Thu, 30 Oct 2008 13:18:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UDISbZ052392; Thu, 30 Oct 2008 13:18:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810301318.m9UDISbZ052392@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 30 Oct 2008 13:18:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184470 - in releng/6.4/sys: . dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 13:18:28 -0000 Author: kib Date: Thu Oct 30 13:18:28 2008 New Revision: 184470 URL: http://svn.freebsd.org/changeset/base/184470 Log: MFC of the r179312 by sos: Do not call ata_start() when ata_reinit fails in the ioctl path. Approved by: re (kensmith), sos Prodded by: Andrey V. Elsukov Modified: releng/6.4/sys/ (props changed) releng/6.4/sys/dev/ata/ata-all.c Modified: releng/6.4/sys/dev/ata/ata-all.c ============================================================================== --- releng/6.4/sys/dev/ata/ata-all.c Thu Oct 30 13:14:45 2008 (r184469) +++ releng/6.4/sys/dev/ata/ata-all.c Thu Oct 30 13:18:28 2008 (r184470) @@ -375,7 +375,6 @@ ata_ioctl(struct cdev *dev, u_long cmd, !(device = devclass_get_device(ata_devclass, *value))) return ENXIO; error = ata_reinit(device); - ata_start(device); break; case IOCATAATTACH: From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 14:05:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 429C61065678; Thu, 30 Oct 2008 14:05:58 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2F6D78FC27; Thu, 30 Oct 2008 14:05:58 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UE5w4G053252; Thu, 30 Oct 2008 14:05:58 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UE5wwZ053250; Thu, 30 Oct 2008 14:05:58 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <200810301405.m9UE5wwZ053250@svn.freebsd.org> From: Ivan Voras Date: Thu, 30 Oct 2008 14:05:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184471 - in head/bin: cat cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 14:05:58 -0000 Author: ivoras Date: Thu Oct 30 14:05:57 2008 New Revision: 184471 URL: http://svn.freebsd.org/changeset/base/184471 Log: Teach cat(1) and cp(1) to use a larger buffer if enough memory is present in the system. A simple heuristics is used to detect what is "enough" memory: if number of physmem pages is greater than 32k (equalling 128 MB on machines with 4 kB pages). Typical immediate result of these changes is reduction in context switches and the goal is to increase efficiency by using large buffers: before: /usr/bin/time -hlp cat file1 > file2 ... 163 voluntary context switches 11194 involuntary context switches after: /usr/bin/time -hlp ./cat file1 > file2 ... 417 voluntary context switches 272 involuntary context switches Reviewed by: hackers@ (no objections to earlier version of cat patch) Approved by: gnn (mentor) MFC after: 4 months Modified: head/bin/cat/cat.c head/bin/cp/utils.c Modified: head/bin/cat/cat.c ============================================================================== --- head/bin/cat/cat.c Thu Oct 30 13:18:28 2008 (r184470) +++ head/bin/cat/cat.c Thu Oct 30 14:05:57 2008 (r184471) @@ -77,6 +77,17 @@ static void raw_cat(int); static int udom_open(const char *path, int flags); #endif +/* Memory strategy threshold, in pages: if physmem is larger then this, use a + * large buffer */ +#define PHYSPAGES_THRESHOLD (32*1024) + +/* Maximum buffer size in bytes - do not allow it to grow larger than this */ +#define BUFSIZE_MAX (2*1024*1024) + +/* Small (default) buffer size in bytes. It's inefficient for this to be + * smaller than MAXPHYS */ +#define BUFSIZE_SMALL (MAXPHYS) + int main(int argc, char *argv[]) { @@ -247,9 +258,17 @@ raw_cat(int rfd) if (buf == NULL) { if (fstat(wfd, &sbuf)) err(1, "%s", filename); - bsize = MAX(sbuf.st_blksize, 1024); + if (S_ISREG(sbuf.st_mode)) { + /* If there's plenty of RAM, use a large copy buffer */ + if (sysconf(_SC_PHYS_PAGES) > PHYSPAGES_THRESHOLD) + bsize = MIN(BUFSIZE_MAX, MAXPHYS*8); + else + bsize = BUFSIZE_SMALL; + } else + bsize = MAX(sbuf.st_blksize, + (blksize_t)sysconf(_SC_PAGESIZE)); if ((buf = malloc(bsize)) == NULL) - err(1, "buffer"); + err(1, "malloc() failure of IO buffer"); } while ((nr = read(rfd, buf, bsize)) > 0) for (off = 0; nr; nr -= nw, off += nw) Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Thu Oct 30 13:18:28 2008 (r184470) +++ head/bin/cp/utils.c Thu Oct 30 14:05:57 2008 (r184471) @@ -57,10 +57,22 @@ __FBSDID("$FreeBSD$"); #define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y))) +/* Memory strategy threshold, in pages: if physmem is larger then this, use a + * large buffer */ +#define PHYSPAGES_THRESHOLD (32*1024) + +/* Maximum buffer size in bytes - do not allow it to grow larger than this */ +#define BUFSIZE_MAX (2*1024*1024) + +/* Small (default) buffer size in bytes. It's inefficient for this to be + * smaller than MAXPHYS */ +#define BUFSIZE_SMALL (MAXPHYS) + int copy_file(const FTSENT *entp, int dne) { - static char buf[MAXBSIZE]; + static char *buf = NULL; + static size_t bufsize; struct stat *fs; ssize_t wcount; size_t wresid; @@ -174,8 +186,23 @@ copy_file(const FTSENT *entp, int dne) } else #endif { + if (buf == NULL) { + /* + * Note that buf and bufsize are static. If + * malloc() fails, it will fail at the start + * and not copy only some files. + */ + if (sysconf(_SC_PHYS_PAGES) > + PHYSPAGES_THRESHOLD) + bufsize = MIN(BUFSIZE_MAX, MAXPHYS * 8); + else + bufsize = BUFSIZE_SMALL; + buf = malloc(bufsize); + if (buf == NULL) + err(1, "Not enough memory"); + } wtotal = 0; - while ((rcount = read(from_fd, buf, MAXBSIZE)) > 0) { + while ((rcount = read(from_fd, buf, bufsize)) > 0) { for (bufp = buf, wresid = rcount; ; bufp += wcount, wresid -= wcount) { wcount = write(to_fd, bufp, wresid); From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 14:30:50 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CB7B106567D; Thu, 30 Oct 2008 14:30:50 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id ED2568FC26; Thu, 30 Oct 2008 14:30:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UEUnw9053708; Thu, 30 Oct 2008 14:30:49 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UEUnEV053704; Thu, 30 Oct 2008 14:30:49 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200810301430.m9UEUnEV053704@svn.freebsd.org> From: John Baldwin Date: Thu, 30 Oct 2008 14:30:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184472 - stable/7/sys/compat/freebsd32 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 14:30:50 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 15:27:13 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7C811065673; Thu, 30 Oct 2008 15:27:13 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B51B68FC0A; Thu, 30 Oct 2008 15:27:13 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UFRD6Q054784; Thu, 30 Oct 2008 15:27:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UFRDPD054780; Thu, 30 Oct 2008 15:27:13 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200810301527.m9UFRDPD054780@svn.freebsd.org> From: Nathan Whitehorn Date: Thu, 30 Oct 2008 15:27:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184473 - in head/sys: dev/adb powerpc/powermac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 15:27:13 -0000 Author: nwhitehorn Date: Thu Oct 30 15:27:13 2008 New Revision: 184473 URL: http://svn.freebsd.org/changeset/base/184473 Log: Fix some possible infinite loops in the ADB code, and remove some hacks that were inserted in desperation during bring-up. In addition, move ADB bus enumeration and child attachment to when interrupts are available. Modified: head/sys/dev/adb/adb_bus.c head/sys/dev/adb/adbvar.h head/sys/powerpc/powermac/cuda.c head/sys/powerpc/powermac/pmu.c Modified: head/sys/dev/adb/adb_bus.c ============================================================================== --- head/sys/dev/adb/adb_bus.c Thu Oct 30 14:30:49 2008 (r184472) +++ head/sys/dev/adb/adb_bus.c Thu Oct 30 15:27:13 2008 (r184473) @@ -44,6 +44,7 @@ static int adb_bus_probe(device_t dev); static int adb_bus_attach(device_t dev); static int adb_bus_detach(device_t dev); +static void adb_bus_enumerate(void *xdev); static void adb_probe_nomatch(device_t dev, device_t child); static int adb_print_child(device_t dev, device_t child); @@ -88,6 +89,27 @@ static int adb_bus_attach(device_t dev) { struct adb_softc *sc = device_get_softc(dev); + sc->enum_hook.ich_func = adb_bus_enumerate; + sc->enum_hook.ich_arg = dev; + + /* + * We should wait until interrupts are enabled to try to probe + * the bus. Enumerating the ADB involves receiving packets, + * which works best with interrupts enabled. + */ + + if (config_intrhook_establish(&sc->enum_hook) != 0) + return (ENOMEM); + + return (0); +} + +static void +adb_bus_enumerate(void *xdev) +{ + device_t dev = (device_t)xdev; + + struct adb_softc *sc = device_get_softc(dev); uint8_t i, next_free; uint16_t r3; @@ -165,7 +187,9 @@ adb_bus_attach(device_t dev) } } - return (bus_generic_attach(dev)); + bus_generic_attach(dev); + + config_intrhook_disestablish(&sc->enum_hook); } static int adb_bus_detach(device_t dev) @@ -315,10 +339,13 @@ adb_send_raw_packet_sync(device_t dev, u ADB_HB_SEND_RAW_PACKET(sc->parent, command_byte, len, data, 1); while (!atomic_fetchadd_int(&sc->packet_reply,0)) { - /* Sometimes CUDA controllers hang up during cold boots. - Try poking them. */ - if (i > 10) - ADB_HB_CONTROLLER_POLL(sc->parent); + /* + * Maybe the command got lost? Try resending and polling the + * controller. + */ + if (i > 40) + ADB_HB_SEND_RAW_PACKET(sc->parent, command_byte, + len, data, 1); DELAY(100); i++; Modified: head/sys/dev/adb/adbvar.h ============================================================================== --- head/sys/dev/adb/adbvar.h Thu Oct 30 14:30:49 2008 (r184472) +++ head/sys/dev/adb/adbvar.h Thu Oct 30 15:27:13 2008 (r184473) @@ -37,16 +37,15 @@ enum { struct adb_softc { device_t sc_dev; - device_t parent; + struct intr_config_hook enum_hook; struct mtx sc_sync_mtx; volatile int sync_packet; volatile int packet_reply; uint16_t autopoll_mask; - uint8_t syncreg[8]; device_t children[16]; Modified: head/sys/powerpc/powermac/cuda.c ============================================================================== --- head/sys/powerpc/powermac/cuda.c Thu Oct 30 14:30:49 2008 (r184472) +++ head/sys/powerpc/powermac/cuda.c Thu Oct 30 15:27:13 2008 (r184473) @@ -341,10 +341,7 @@ cuda_send(void *cookie, int poll, int le mtx_lock(&sc->sc_mutex); - if ((sc->sc_state == CUDA_IDLE) /*&& - ((cuda_read_reg(sc, vBufB) & vPB3) == vPB3)*/) { - /* fine */ - } else { + if (sc->sc_state != CUDA_IDLE) { if (sc->sc_waiting == 0) { sc->sc_waiting = 1; } else { @@ -381,12 +378,12 @@ cuda_poll(device_t dev) { struct cuda_softc *sc = device_get_softc(dev); - while ((sc->sc_state != CUDA_IDLE) || - (cuda_intr_state(sc)) || - (sc->sc_waiting == 1)) { - if ((cuda_read_reg(sc, vIFR) & vSR_INT) == vSR_INT) - cuda_intr(dev); - } + if (sc->sc_state == CUDA_IDLE && !cuda_intr_state(sc) && + !sc->sc_waiting) + return; + + if ((cuda_read_reg(sc, vIFR) & vSR_INT) == vSR_INT) + cuda_intr(dev); } static void @@ -615,6 +612,7 @@ cuda_adb_autopoll(device_t dev, uint16_t uint8_t cmd[] = {CUDA_PSEUDO, CMD_AUTOPOLL, mask != 0}; mtx_lock(&sc->sc_mutex); + if (cmd[2] == sc->sc_autopoll) { mtx_unlock(&sc->sc_mutex); return 0; @@ -624,18 +622,10 @@ cuda_adb_autopoll(device_t dev, uint16_t mtx_sleep(dev,&sc->sc_mutex,0,"cuda",1); sc->sc_autopoll = -1; - mtx_unlock(&sc->sc_mutex); - cuda_send(sc, 0, 3, cmd); - - mtx_lock(&sc->sc_mutex); - while(sc->sc_autopoll == -1) { - mtx_sleep(dev,&sc->sc_mutex,0,"cuda",100); - cuda_poll(dev); - } mtx_unlock(&sc->sc_mutex); - + return 0; } Modified: head/sys/powerpc/powermac/pmu.c ============================================================================== --- head/sys/powerpc/powermac/pmu.c Thu Oct 30 14:30:49 2008 (r184472) +++ head/sys/powerpc/powermac/pmu.c Thu Oct 30 15:27:13 2008 (r184473) @@ -591,8 +591,6 @@ pmu_adb_autopoll(device_t dev, uint16_t { struct pmu_softc *sc = device_get_softc(dev); - mask = 0xffff; - /* magical incantation to re-enable autopolling */ uint8_t cmd[] = {0, PMU_SET_POLL_MASK, (mask >> 8) & 0xff, mask & 0xff}; uint8_t resp[16]; From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 15:48:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 164631065716; Thu, 30 Oct 2008 15:48:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03BB78FC22; Thu, 30 Oct 2008 15:48:56 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UFmtJv055212; Thu, 30 Oct 2008 15:48:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UFmta2055210; Thu, 30 Oct 2008 15:48:55 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301548.m9UFmta2055210@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 15:48:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184474 - in stable/7/sys: . netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 15:48:56 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 15:56:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5156F106567D; Thu, 30 Oct 2008 15:56:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2078FC1C; Thu, 30 Oct 2008 15:56:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UFu5R4055398; Thu, 30 Oct 2008 15:56:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UFu4SM055397; Thu, 30 Oct 2008 15:56:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301556.m9UFu4SM055397@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 15:56:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184475 - in stable/7/sys: . net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 15:56:05 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:09:08 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 45E96106567B; Thu, 30 Oct 2008 16:09:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 33E658FC08; Thu, 30 Oct 2008 16:09:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UG989o055679; Thu, 30 Oct 2008 16:09:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UG98k6055678; Thu, 30 Oct 2008 16:09:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301609.m9UG98k6055678@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 16:09:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184476 - in stable/7/sys: . netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:09:08 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:11:07 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C007106567C; Thu, 30 Oct 2008 16:11:07 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B1698FC1F; Thu, 30 Oct 2008 16:11:07 +0000 (UTC) (envelope-from dfr@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UGB7Ow055779; Thu, 30 Oct 2008 16:11:07 GMT (envelope-from dfr@svn.freebsd.org) Received: (from dfr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGB73w055778; Thu, 30 Oct 2008 16:11:07 GMT (envelope-from dfr@svn.freebsd.org) Message-Id: <200810301611.m9UGB73w055778@svn.freebsd.org> From: Doug Rabson Date: Thu, 30 Oct 2008 16:11:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184477 - head/sys/opencrypto X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:11:07 -0000 Author: dfr Date: Thu Oct 30 16:11:07 2008 New Revision: 184477 URL: http://svn.freebsd.org/changeset/base/184477 Log: Don't hang if encrypting/decrypting using struct iovecs where one of the iovecs ends on a crypto block boundary. Modified: head/sys/opencrypto/cryptosoft.c Modified: head/sys/opencrypto/cryptosoft.c ============================================================================== --- head/sys/opencrypto/cryptosoft.c Thu Oct 30 16:09:08 2008 (r184476) +++ head/sys/opencrypto/cryptosoft.c Thu Oct 30 16:11:07 2008 (r184477) @@ -352,6 +352,10 @@ swcr_encdec(struct cryptodesc *crd, stru k += blks; i -= blks; } + if (k == iov->iov_len) { + iov++; + k = 0; + } } return 0; /* Done with iovec encryption/decryption */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:15:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 927B41065673; Thu, 30 Oct 2008 16:15:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 80A538FC23; Thu, 30 Oct 2008 16:15:12 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UGFCgK055880; Thu, 30 Oct 2008 16:15:12 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGFCVa055879; Thu, 30 Oct 2008 16:15:12 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301615.m9UGFCVa055879@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 16:15:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184478 - in stable/7/sys: . netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:15:12 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:20:43 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77382106567B; Thu, 30 Oct 2008 16:20:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EE658FC18; Thu, 30 Oct 2008 16:20:43 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UGKhsO056035; Thu, 30 Oct 2008 16:20:43 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGKh4W056034; Thu, 30 Oct 2008 16:20:43 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301620.m9UGKh4W056034@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 16:20:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184479 - in stable/7/sys: . dev/lmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:20:43 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:22:04 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9DF2E1065678; Thu, 30 Oct 2008 16:22:04 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C55E8FC1A; Thu, 30 Oct 2008 16:22:04 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UGM4LR056114; Thu, 30 Oct 2008 16:22:04 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGM4Bg056108; Thu, 30 Oct 2008 16:22:04 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200810301622.m9UGM4Bg056108@svn.freebsd.org> From: Sam Leffler Date: Thu, 30 Oct 2008 16:22:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184480 - in head/sys: dev/ath net80211 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:22:04 -0000 Author: sam Date: Thu Oct 30 16:22:04 2008 New Revision: 184480 URL: http://svn.freebsd.org/changeset/base/184480 Log: Fix checks for fast frames negotiation. ni_ath_flags holds the capabilities reported by the ap. These need to be cross-checked against the local configuration in the vap. Previously we were only checking the ap capabilities which meant that if an ap reported it was ff-capable but we were not setup to use them we'd try to do ff aggregation and drop the frame. There are a number of problems to be fixed here but applying this fix immediately as the problem causes all traffic to stop (and has not workaround). Reported by: Ashish Shukla Modified: head/sys/dev/ath/if_ath.c head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_hostap.c head/sys/net80211/ieee80211_sta.c head/sys/net80211/ieee80211_wds.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/dev/ath/if_ath.c Thu Oct 30 16:22:04 2008 (r184480) @@ -1999,7 +1999,7 @@ ath_start(struct ifnet *ifp) ni = (struct ieee80211_node *) m->m_pkthdr.rcvif; pri = M_WME_GETAC(m); txq = sc->sc_ac2q[pri]; - if (ni->ni_ath_flags & IEEE80211_NODE_FF) { + if (IEEE80211_ATH_CAP(ni->ni_vap, ni, IEEE80211_NODE_FF)) { /* * Check queue length; if too deep drop this * frame (tail drop considered good). Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_adhoc.c Thu Oct 30 16:22:04 2008 (r184480) @@ -553,7 +553,7 @@ adhoc_input(struct ieee80211_node *ni, s m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; Modified: head/sys/net80211/ieee80211_hostap.c ============================================================================== --- head/sys/net80211/ieee80211_hostap.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_hostap.c Thu Oct 30 16:22:04 2008 (r184480) @@ -752,7 +752,7 @@ hostap_input(struct ieee80211_node *ni, m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; Modified: head/sys/net80211/ieee80211_sta.c ============================================================================== --- head/sys/net80211/ieee80211_sta.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_sta.c Thu Oct 30 16:22:04 2008 (r184480) @@ -795,7 +795,7 @@ sta_input(struct ieee80211_node *ni, str m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; Modified: head/sys/net80211/ieee80211_wds.c ============================================================================== --- head/sys/net80211/ieee80211_wds.c Thu Oct 30 16:20:42 2008 (r184479) +++ head/sys/net80211/ieee80211_wds.c Thu Oct 30 16:22:04 2008 (r184480) @@ -728,7 +728,7 @@ wds_input(struct ieee80211_node *ni, str m = ieee80211_decap_amsdu(ni, m); if (m == NULL) return IEEE80211_FC0_TYPE_DATA; - } else if ((ni->ni_ath_flags & IEEE80211_NODE_FF) && + } else if (IEEE80211_ATH_CAP(vap, ni, IEEE80211_NODE_FF) && #define FF_LLC_SIZE (sizeof(struct ether_header) + sizeof(struct llc)) m->m_pkthdr.len >= 3*FF_LLC_SIZE) { struct llc *llc; From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 16:29:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB2381065674; Thu, 30 Oct 2008 16:29:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 977B18FC16; Thu, 30 Oct 2008 16:29:05 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UGT5YA056299; Thu, 30 Oct 2008 16:29:05 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UGT4rY056290; Thu, 30 Oct 2008 16:29:04 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810301629.m9UGT4rY056290@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 30 Oct 2008 16:29:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184481 - in stable/7/sys: . contrib/pf/net netinet netinet6 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 16:29:05 -0000 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 owner-svn-src-all@FreeBSD.ORG Thu Oct 30 17:47:58 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 407FA1065670; Thu, 30 Oct 2008 17:47:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2EB128FC16; Thu, 30 Oct 2008 17:47:58 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UHlwBI057770; Thu, 30 Oct 2008 17:47:58 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UHlwbj057769; Thu, 30 Oct 2008 17:47:58 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810301747.m9UHlwbj057769@svn.freebsd.org> From: Robert Watson Date: Thu, 30 Oct 2008 17:47:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184482 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 17:47:58 -0000 Author: rwatson Date: Thu Oct 30 17:47:57 2008 New Revision: 184482 URL: http://svn.freebsd.org/changeset/base/184482 Log: Protect the event->class lookup database using an rwlock instead of a mutex, as it's rarely changed but frequently accessed read-only from multiple threads, so a potentially significant source of contention. MFC after: 1 month Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_bsm_klib.c Modified: head/sys/security/audit/audit_bsm_klib.c ============================================================================== --- head/sys/security/audit/audit_bsm_klib.c Thu Oct 30 16:29:04 2008 (r184481) +++ head/sys/security/audit/audit_bsm_klib.c Thu Oct 30 17:47:57 2008 (r184482) @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999-2005 Apple Inc. + * Copyright (c) 1999-2008 Apple Inc. * Copyright (c) 2005 Robert N. M. Watson * All rights reserved. * @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -65,9 +66,15 @@ struct evclass_list { }; static MALLOC_DEFINE(M_AUDITEVCLASS, "audit_evclass", "Audit event class"); -static struct mtx evclass_mtx; +static struct rwlock evclass_lock; static struct evclass_list evclass_hash[EVCLASSMAP_HASH_TABLE_SIZE]; +#define EVCLASS_LOCK_INIT() rw_init(&evclass_lock, "evclass_lock") +#define EVCLASS_RLOCK() rw_rlock(&evclass_lock) +#define EVCLASS_RUNLOCK() rw_runlock(&evclass_lock) +#define EVCLASS_WLOCK() rw_wlock(&evclass_lock) +#define EVCLASS_WUNLOCK() rw_wunlock(&evclass_lock) + /* * Look up the class for an audit event in the class mapping table. */ @@ -78,7 +85,7 @@ au_event_class(au_event_t event) struct evclass_elem *evc; au_class_t class; - mtx_lock(&evclass_mtx); + EVCLASS_RLOCK(); evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE]; class = 0; LIST_FOREACH(evc, &evcl->head, entry) { @@ -88,7 +95,7 @@ au_event_class(au_event_t event) } } out: - mtx_unlock(&evclass_mtx); + EVCLASS_RUNLOCK(); return (class); } @@ -111,12 +118,12 @@ au_evclassmap_insert(au_event_t event, a */ evc_new = malloc(sizeof(*evc), M_AUDITEVCLASS, M_WAITOK); - mtx_lock(&evclass_mtx); + EVCLASS_WLOCK(); evcl = &evclass_hash[event % EVCLASSMAP_HASH_TABLE_SIZE]; LIST_FOREACH(evc, &evcl->head, entry) { if (evc->event == event) { evc->class = class; - mtx_unlock(&evclass_mtx); + EVCLASS_WUNLOCK(); free(evc_new, M_AUDITEVCLASS); return; } @@ -125,7 +132,7 @@ au_evclassmap_insert(au_event_t event, a evc->event = event; evc->class = class; LIST_INSERT_HEAD(&evcl->head, evc, entry); - mtx_unlock(&evclass_mtx); + EVCLASS_WUNLOCK(); } void @@ -133,7 +140,7 @@ au_evclassmap_init(void) { int i; - mtx_init(&evclass_mtx, "evclass_mtx", NULL, MTX_DEF); + EVCLASS_LOCK_INIT(); for (i = 0; i < EVCLASSMAP_HASH_TABLE_SIZE; i++) LIST_INIT(&evclass_hash[i].head); From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 17:54:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FCB51065678; Thu, 30 Oct 2008 17:54:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4EEE48FC26; Thu, 30 Oct 2008 17:54:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UHsKCc057923; Thu, 30 Oct 2008 17:54:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UHsKIi057922; Thu, 30 Oct 2008 17:54:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200810301754.m9UHsKIi057922@svn.freebsd.org> From: Alexander Motin Date: Thu, 30 Oct 2008 17:54:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184483 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 17:54:20 -0000 Author: mav Date: Thu Oct 30 17:54:20 2008 New Revision: 184483 URL: http://svn.freebsd.org/changeset/base/184483 Log: Add quirk to set GPIO2 to enable internal speaker on Dell Vostro 1400. Tested by: Sergio Veloso Modified: head/sys/dev/sound/pci/hda/hdac.c Modified: head/sys/dev/sound/pci/hda/hdac.c ============================================================================== --- head/sys/dev/sound/pci/hda/hdac.c Thu Oct 30 17:47:57 2008 (r184482) +++ head/sys/dev/sound/pci/hda/hdac.c Thu Oct 30 17:54:20 2008 (r184483) @@ -83,7 +83,7 @@ #include "mixer_if.h" -#define HDA_DRV_TEST_REV "20081024_0114" +#define HDA_DRV_TEST_REV "20081030_0115" SND_DECLARE_FILE("$FreeBSD$"); @@ -204,6 +204,7 @@ SND_DECLARE_FILE("$FreeBSD$"); #define DELL_VENDORID 0x1028 #define DELL_D630_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01f9) #define DELL_D820_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01cc) +#define DELL_V1400_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0227) #define DELL_V1500_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0228) #define DELL_I1300_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01c9) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) @@ -4427,6 +4428,8 @@ static const struct { HDA_QUIRK_GPIO0 | HDA_QUIRK_GPIO1, 0 }, { DELL_D630_SUBVENDOR, HDA_CODEC_STAC9205X, HDA_QUIRK_GPIO0, 0 }, + { DELL_V1400_SUBVENDOR, HDA_CODEC_STAC9228X, + HDA_QUIRK_GPIO2, 0 }, { DELL_V1500_SUBVENDOR, HDA_CODEC_STAC9205X, HDA_QUIRK_GPIO0, 0 }, { HDA_MATCH_ALL, HDA_CODEC_AD1988, From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 19:51:03 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D6F31065696; Thu, 30 Oct 2008 19:51:03 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B90E8FC1A; Thu, 30 Oct 2008 19:51:03 +0000 (UTC) (envelope-from joerg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UJp2ue060201; Thu, 30 Oct 2008 19:51:02 GMT (envelope-from joerg@svn.freebsd.org) Received: (from joerg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UJp20Z060200; Thu, 30 Oct 2008 19:51:02 GMT (envelope-from joerg@svn.freebsd.org) Message-Id: <200810301951.m9UJp20Z060200@svn.freebsd.org> From: Joerg Wunsch Date: Thu, 30 Oct 2008 19:51:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184484 - head/bin/chio X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 19:51:03 -0000 Author: joerg Date: Thu Oct 30 19:51:02 2008 New Revision: 184484 URL: http://svn.freebsd.org/changeset/base/184484 Log: When running a "chio return" operation using a physical source unit rather than a voltag name, do not set the CESR_VOLTAGS flags in the CHIOGSTATUS command requesting the current status. As voltags are an optional feature that must be handled as "reserved" by media changers not implementing the feature, always setting CESR_VOLTAGS resulted in the command being aborted with an `Invalid field in CDB', and consequently the "chio return" failed, for media changers that do not support voltags. MFC after: 1 week Modified: head/bin/chio/chio.c Modified: head/bin/chio/chio.c ============================================================================== --- head/bin/chio/chio.c Thu Oct 30 17:54:20 2008 (r184483) +++ head/bin/chio/chio.c Thu Oct 30 19:51:02 2008 (r184484) @@ -69,7 +69,7 @@ static const char *bits_to_string(ces_st static void find_element(char *, uint16_t *, uint16_t *); static struct changer_element_status *get_element_status - (unsigned int, unsigned int); + (unsigned int, unsigned int, int); static int do_move(const char *, int, char **); static int do_exchange(const char *, int, char **); @@ -969,7 +969,8 @@ do_return(const char *cname, int argc, c ++argv; --argc; /* Get the status */ - ces = get_element_status((unsigned int)type, (unsigned int)element); + ces = get_element_status((unsigned int)type, (unsigned int)element, + CHET_VT == type); if (NULL == ces) errx(1, "%s: null element status pointer", cname); @@ -1004,7 +1005,7 @@ usage: * should free() it when done. */ static struct changer_element_status * -get_element_status(unsigned int type, unsigned int element) +get_element_status(unsigned int type, unsigned int element, int use_voltags) { struct changer_element_status_request cesr; struct changer_element_status *ces; @@ -1020,7 +1021,8 @@ get_element_status(unsigned int type, un cesr.cesr_element_type = (uint16_t)type; cesr.cesr_element_base = (uint16_t)element; cesr.cesr_element_count = 1; /* Only this one element */ - cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ + if (use_voltags) + cesr.cesr_flags |= CESR_VOLTAGS; /* Grab voltags as well */ cesr.cesr_element_status = ces; if (ioctl(changer_fd, CHIOGSTATUS, (char *)&cesr) == -1) { From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 20:24:26 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22E1B1065670; Thu, 30 Oct 2008 20:24:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 118ED8FC2A; Thu, 30 Oct 2008 20:24:26 +0000 (UTC) (envelope-from pjd@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UKOPj7060859; Thu, 30 Oct 2008 20:24:25 GMT (envelope-from pjd@svn.freebsd.org) Received: (from pjd@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UKOPm4060858; Thu, 30 Oct 2008 20:24:25 GMT (envelope-from pjd@svn.freebsd.org) Message-Id: <200810302024.m9UKOPm4060858@svn.freebsd.org> From: Pawel Jakub Dawidek Date: Thu, 30 Oct 2008 20:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184485 - head/etc/rc.d X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 20:24:26 -0000 Author: pjd Date: Thu Oct 30 20:24:25 2008 New Revision: 184485 URL: http://svn.freebsd.org/changeset/base/184485 Log: ifconfig(8) can take only one interface at a time. Modified: head/etc/rc.d/netif Modified: head/etc/rc.d/netif ============================================================================== --- head/etc/rc.d/netif Thu Oct 30 19:51:02 2008 (r184484) +++ head/etc/rc.d/netif Thu Oct 30 20:24:25 2008 (r184485) @@ -141,7 +141,9 @@ network_common() esac echo "${_str} Network:${_ok}." if [ -z "${rc_quiet}" ]; then - /sbin/ifconfig ${_ok} + for ifn in ${_ok}; do + /sbin/ifconfig ${ifn} + done fi fi From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 21:02:00 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBA51065678; Thu, 30 Oct 2008 21:02:00 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AC2B28FC08; Thu, 30 Oct 2008 21:02:00 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UL20md061671; Thu, 30 Oct 2008 21:02:00 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UL20sH061670; Thu, 30 Oct 2008 21:02:00 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810302102.m9UL20sH061670@svn.freebsd.org> From: Maxim Sobolev Date: Thu, 30 Oct 2008 21:02:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184486 - head/sys/powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 21:02:00 -0000 Author: sobomax Date: Thu Oct 30 21:02:00 2008 New Revision: 184486 URL: http://svn.freebsd.org/changeset/base/184486 Log: Fix compilation in the case when kernel doesn't have KDB ebabled. subr_kdb.c still references breakpoint() in this case. Modified: head/sys/powerpc/include/cpufunc.h Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Thu Oct 30 20:24:25 2008 (r184485) +++ head/sys/powerpc/include/cpufunc.h Thu Oct 30 21:02:00 2008 (r184486) @@ -50,6 +50,13 @@ struct thread; #ifdef KDB void breakpoint(void); +#else +static __inline void +breakpoint(void) +{ + + return; +} #endif /* CPU register mangling inlines */ From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 21:48:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53B32106567B; Thu, 30 Oct 2008 21:48:29 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 425858FC0C; Thu, 30 Oct 2008 21:48:29 +0000 (UTC) (envelope-from sobomax@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9ULmTLR062493; Thu, 30 Oct 2008 21:48:29 GMT (envelope-from sobomax@svn.freebsd.org) Received: (from sobomax@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9ULmTDu062491; Thu, 30 Oct 2008 21:48:29 GMT (envelope-from sobomax@svn.freebsd.org) Message-Id: <200810302148.m9ULmTDu062491@svn.freebsd.org> From: Maxim Sobolev Date: Thu, 30 Oct 2008 21:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184487 - in head/sys: conf kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 21:48:29 -0000 Author: sobomax Date: Thu Oct 30 21:48:28 2008 New Revision: 184487 URL: http://svn.freebsd.org/changeset/base/184487 Log: Make it possible to compile kernel with KTR but without DDB. Modified: head/sys/conf/files head/sys/kern/subr_stack.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Oct 30 21:02:00 2008 (r184486) +++ head/sys/conf/files Thu Oct 30 21:48:28 2008 (r184487) @@ -1691,7 +1691,7 @@ kern/subr_sbuf.c standard kern/subr_scanf.c standard kern/subr_sleepqueue.c standard kern/subr_smp.c standard -kern/subr_stack.c optional ddb | stack +kern/subr_stack.c optional ddb | stack | ktr kern/subr_taskqueue.c standard kern/subr_trap.c standard kern/subr_turnstile.c standard Modified: head/sys/kern/subr_stack.c ============================================================================== --- head/sys/kern/subr_stack.c Thu Oct 30 21:02:00 2008 (r184486) +++ head/sys/kern/subr_stack.c Thu Oct 30 21:48:28 2008 (r184487) @@ -155,15 +155,18 @@ stack_sbuf_print_ddb(struct sbuf *sb, st name, offset); } } +#endif #ifdef KTR void stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth, int cheap) { +#ifdef DDB const char *name; long offset; int i; +#endif KASSERT(st->depth <= STACK_MAX, ("bogus stack")); if (cheap) { @@ -180,6 +183,7 @@ stack_ktr(u_int mask, const char *file, ktr_tracepoint(mask, file, line, "#2 %p %p %p %p %p %p", st->pcs[12], st->pcs[13], st->pcs[14], st->pcs[15], st->pcs[16], st->pcs[17]); +#ifdef DDB } else { if (depth == 0 || st->depth < depth) depth = st->depth; @@ -188,10 +192,10 @@ stack_ktr(u_int mask, const char *file, ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx", i, st->pcs[i], (u_long)name, offset, 0, 0); } +#endif } } #endif -#endif /* * Two variants of stack symbol lookup -- one that uses the DDB interfaces From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 21:58:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6EF971065677; Thu, 30 Oct 2008 21:58:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1EFE98FC2B; Thu, 30 Oct 2008 21:58:40 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9ULwdLM062712; Thu, 30 Oct 2008 21:58:39 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9ULwdlk062711; Thu, 30 Oct 2008 21:58:39 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810302158.m9ULwdlk062711@svn.freebsd.org> From: Robert Watson Date: Thu, 30 Oct 2008 21:58:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184488 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 21:58:41 -0000 Author: rwatson Date: Thu Oct 30 21:58:39 2008 New Revision: 184488 URL: http://svn.freebsd.org/changeset/base/184488 Log: Break out single audit_pipe_mtx into two types of locks: a global rwlock protecting the list of audit pipes, and a per-pipe mutex protecting the queue. Likewise, replace the single global condition variable used to signal delivery of a record to one or more pipes, and add a per-pipe condition variable to avoid spurious wakeups when event subscriptions differ across multiple pipes. This slightly increases the cost of delivering to audit pipes, but should reduce lock contention in the presence of multiple readers as only the per-pipe lock is required to read from a pipe, as well as avoid overheading when different pipes are used in different ways. MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Thu Oct 30 21:48:28 2008 (r184487) +++ head/sys/security/audit/audit_pipe.c Thu Oct 30 21:58:39 2008 (r184488) @@ -1,5 +1,6 @@ /*- * Copyright (c) 2006 Robert N. M. Watson + * Copyright (c) 2008 Apple, Inc. * All rights reserved. * * This software was developed by Robert Watson for the TrustedBSD Project. @@ -41,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -115,6 +117,17 @@ struct audit_pipe { struct selinfo ap_selinfo; struct sigio *ap_sigio; + /* + * Per-pipe mutex protecting most fields in this data structure. + */ + struct mtx ap_lock; + + /* + * Condition variable to signal when data has been delivered to a + * pipe. + */ + struct cv ap_cv; + u_int ap_qlen; u_int ap_qlimit; @@ -144,19 +157,31 @@ struct audit_pipe { TAILQ_ENTRY(audit_pipe) ap_list; }; +#define AUDIT_PIPE_LOCK(ap) mtx_lock(&(ap)->ap_lock) +#define AUDIT_PIPE_LOCK_ASSERT(ap) mtx_assert(&(ap)->ap_lock, MA_OWNED) +#define AUDIT_PIPE_LOCK_DESTROY(ap) mtx_destroy(&(ap)->ap_lock) +#define AUDIT_PIPE_LOCK_INIT(ap) mtx_init(&(ap)->ap_lock, \ + "audit_pipe_lock", NULL, MTX_DEF) +#define AUDIT_PIPE_UNLOCK(ap) mtx_unlock(&(ap)->ap_lock) +#define AUDIT_PIPE_MTX(ap) (&(ap)->ap_lock) + /* - * Global list of audit pipes, mutex to protect it and the pipes. Finer - * grained locking may be desirable at some point. + * Global list of audit pipes, rwlock to protect it. Individual record + * queues on pipes are protected by per-pipe locks; these locks synchronize + * between threads walking the list to deliver to individual pipes and add/ + * remove of pipes, and are mostly acquired for read. */ static TAILQ_HEAD(, audit_pipe) audit_pipe_list; -static struct mtx audit_pipe_mtx; +static struct rwlock audit_pipe_lock; -/* - * This CV is used to wakeup on an audit record write. Eventually, it might - * be per-pipe to avoid unnecessary wakeups when several pipes with different - * preselection masks are present. - */ -static struct cv audit_pipe_cv; +#define AUDIT_PIPE_LIST_LOCK_INIT() rw_init(&audit_pipe_lock, \ + "audit_pipe_list_lock") +#define AUDIT_PIPE_LIST_RLOCK() rw_rlock(&audit_pipe_lock) +#define AUDIT_PIPE_LIST_RUNLOCK() rw_runlock(&audit_pipe_lock) +#define AUDIT_PIPE_LIST_WLOCK() rw_wlock(&audit_pipe_lock) +#define AUDIT_PIPE_LIST_WLOCK_ASSERT() rw_assert(&audit_pipe_lock, \ + RA_WLOCKED) +#define AUDIT_PIPE_LIST_WUNLOCK() rw_wunlock(&audit_pipe_lock) /* * Cloning related variables and constants. @@ -224,7 +249,7 @@ audit_pipe_preselect_find(struct audit_p { struct audit_pipe_preselect *app; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LOCK_ASSERT(ap); TAILQ_FOREACH(app, &ap->ap_preselect_list, app_list) { if (app->app_auid == auid) @@ -243,14 +268,14 @@ audit_pipe_preselect_get(struct audit_pi struct audit_pipe_preselect *app; int error; - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); app = audit_pipe_preselect_find(ap, auid); if (app != NULL) { *maskp = app->app_mask; error = 0; } else error = ENOENT; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); return (error); } @@ -268,7 +293,7 @@ audit_pipe_preselect_set(struct audit_pi * set, and allocate. We will free it if it is unneeded. */ app_new = malloc(sizeof(*app_new), M_AUDIT_PIPE_PRESELECT, M_WAITOK); - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); app = audit_pipe_preselect_find(ap, auid); if (app == NULL) { app = app_new; @@ -277,7 +302,7 @@ audit_pipe_preselect_set(struct audit_pi TAILQ_INSERT_TAIL(&ap->ap_preselect_list, app, app_list); } app->app_mask = mask; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); if (app_new != NULL) free(app_new, M_AUDIT_PIPE_PRESELECT); } @@ -291,14 +316,14 @@ audit_pipe_preselect_delete(struct audit struct audit_pipe_preselect *app; int error; - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); app = audit_pipe_preselect_find(ap, auid); if (app != NULL) { TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list); error = 0; } else error = ENOENT; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); if (app != NULL) free(app, M_AUDIT_PIPE_PRESELECT); return (error); @@ -312,7 +337,7 @@ audit_pipe_preselect_flush_locked(struct { struct audit_pipe_preselect *app; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LOCK_ASSERT(ap); while ((app = TAILQ_FIRST(&ap->ap_preselect_list)) != NULL) { TAILQ_REMOVE(&ap->ap_preselect_list, app, app_list); @@ -324,9 +349,9 @@ static void audit_pipe_preselect_flush(struct audit_pipe *ap) { - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); audit_pipe_preselect_flush_locked(ap); - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); } /*- @@ -345,7 +370,7 @@ audit_pipe_preselect_check(struct audit_ { struct audit_pipe_preselect *app; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LOCK_ASSERT(ap); switch (ap->ap_preselect_mode) { case AUDITPIPE_PRESELECT_MODE_TRAIL: @@ -382,15 +407,18 @@ audit_pipe_preselect(au_id_t auid, au_ev { struct audit_pipe *ap; - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_RLOCK(); TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) { + AUDIT_PIPE_LOCK(ap); if (audit_pipe_preselect_check(ap, auid, event, class, sorf, trail_preselect)) { - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); + AUDIT_PIPE_LIST_RUNLOCK(); return (1); } + AUDIT_PIPE_UNLOCK(ap); } - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_RUNLOCK(); return (0); } @@ -405,7 +433,7 @@ audit_pipe_append(struct audit_pipe *ap, { struct audit_pipe_entry *ape, *ape_remove; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LOCK_ASSERT(ap); ape = malloc(sizeof(*ape), M_AUDIT_PIPE_ENTRY, M_NOWAIT | M_ZERO); if (ape == NULL) { @@ -441,6 +469,7 @@ audit_pipe_append(struct audit_pipe *ap, KNOTE_LOCKED(&ap->ap_selinfo.si_note, 0); if (ap->ap_flags & AUDIT_PIPE_ASYNC) pgsigio(&ap->ap_sigio, SIGIO, 0); + cv_broadcast(&ap->ap_cv); } /* @@ -454,20 +483,23 @@ audit_pipe_submit(au_id_t auid, au_event struct audit_pipe *ap; /* - * Lockless read to avoid mutex overhead if pipes are not in use. + * Lockless read to avoid lock overhead if pipes are not in use. */ if (TAILQ_FIRST(&audit_pipe_list) == NULL) return; - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_RLOCK(); TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) { + AUDIT_PIPE_LOCK(ap); if (audit_pipe_preselect_check(ap, auid, event, class, sorf, trail_select)) audit_pipe_append(ap, record, record_len); + AUDIT_PIPE_UNLOCK(ap); } + AUDIT_PIPE_LIST_RUNLOCK(); + + /* Unlocked increment. */ audit_pipe_records++; - mtx_unlock(&audit_pipe_mtx); - cv_broadcastpri(&audit_pipe_cv, PSOCK); } /* @@ -484,17 +516,21 @@ audit_pipe_submit_user(void *record, u_i struct audit_pipe *ap; /* - * Lockless read to avoid mutex overhead if pipes are not in use. + * Lockless read to avoid lock overhead if pipes are not in use. */ if (TAILQ_FIRST(&audit_pipe_list) == NULL) return; - mtx_lock(&audit_pipe_mtx); - TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) + AUDIT_PIPE_LIST_RLOCK(); + TAILQ_FOREACH(ap, &audit_pipe_list, ap_list) { + AUDIT_PIPE_LOCK(ap); audit_pipe_append(ap, record, record_len); + AUDIT_PIPE_UNLOCK(ap); + } + AUDIT_PIPE_LIST_RUNLOCK(); + + /* Unlocked increment. */ audit_pipe_records++; - mtx_unlock(&audit_pipe_mtx); - cv_broadcastpri(&audit_pipe_cv, PSOCK); } /* @@ -505,7 +541,7 @@ audit_pipe_pop(struct audit_pipe *ap) { struct audit_pipe_entry *ape; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LOCK_ASSERT(ap); ape = TAILQ_FIRST(&ap->ap_queue); KASSERT((ape == NULL && ap->ap_qlen == 0) || @@ -526,15 +562,17 @@ audit_pipe_alloc(void) { struct audit_pipe *ap; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LIST_WLOCK_ASSERT(); ap = malloc(sizeof(*ap), M_AUDIT_PIPE, M_NOWAIT | M_ZERO); if (ap == NULL) return (NULL); ap->ap_qlimit = AUDIT_PIPE_QLIMIT_DEFAULT; TAILQ_INIT(&ap->ap_queue); - knlist_init(&ap->ap_selinfo.si_note, &audit_pipe_mtx, NULL, NULL, + knlist_init(&ap->ap_selinfo.si_note, AUDIT_PIPE_MTX(ap), NULL, NULL, NULL); + AUDIT_PIPE_LOCK_INIT(ap); + cv_init(&ap->ap_cv, "audit_pipe"); /* * Default flags, naflags, and auid-specific preselection settings to @@ -566,7 +604,7 @@ audit_pipe_flush(struct audit_pipe *ap) { struct audit_pipe_entry *ape; - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LOCK_ASSERT(ap); while ((ape = TAILQ_FIRST(&ap->ap_queue)) != NULL) { TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); @@ -578,18 +616,21 @@ audit_pipe_flush(struct audit_pipe *ap) /* * Free an audit pipe; this means freeing all preselection state and all - * records in the pipe. Assumes mutex is held to prevent any new records - * from being inserted during the free, and that the audit pipe is still on - * the global list. + * records in the pipe. Assumes global write lock and pipe mutex are held to + * prevent any new records from being inserted during the free, and that the + * audit pipe is still on the global list. */ static void audit_pipe_free(struct audit_pipe *ap) { - mtx_assert(&audit_pipe_mtx, MA_OWNED); + AUDIT_PIPE_LIST_WLOCK_ASSERT(); + AUDIT_PIPE_LOCK_ASSERT(ap); audit_pipe_preselect_flush_locked(ap); audit_pipe_flush(ap); + cv_destroy(&ap->ap_cv); + AUDIT_PIPE_LOCK_DESTROY(ap); knlist_destroy(&ap->ap_selinfo.si_note); TAILQ_REMOVE(&audit_pipe_list, ap, ap_list); free(ap, M_AUDIT_PIPE); @@ -635,22 +676,22 @@ audit_pipe_open(struct cdev *dev, int of { struct audit_pipe *ap; - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_WLOCK(); ap = dev->si_drv1; if (ap == NULL) { ap = audit_pipe_alloc(); if (ap == NULL) { - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_WUNLOCK(); return (ENOMEM); } dev->si_drv1 = ap; } else { KASSERT(ap->ap_open, ("audit_pipe_open: ap && !ap_open")); - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_WUNLOCK(); return (EBUSY); } - ap->ap_open = 1; - mtx_unlock(&audit_pipe_mtx); + ap->ap_open = 1; /* No lock required yet. */ + AUDIT_PIPE_LIST_WUNLOCK(); fsetown(td->td_proc->p_pid, &ap->ap_sigio); return (0); } @@ -666,12 +707,14 @@ audit_pipe_close(struct cdev *dev, int f ap = dev->si_drv1; KASSERT(ap != NULL, ("audit_pipe_close: ap == NULL")); KASSERT(ap->ap_open, ("audit_pipe_close: !ap_open")); + funsetown(&ap->ap_sigio); - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_WLOCK(); + AUDIT_PIPE_LOCK(ap); ap->ap_open = 0; audit_pipe_free(ap); dev->si_drv1 = NULL; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_LIST_WUNLOCK(); return (0); } @@ -702,33 +745,33 @@ audit_pipe_ioctl(struct cdev *dev, u_lon */ switch (cmd) { case FIONBIO: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); if (*(int *)data) ap->ap_flags |= AUDIT_PIPE_NBIO; else ap->ap_flags &= ~AUDIT_PIPE_NBIO; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; case FIONREAD: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); if (TAILQ_FIRST(&ap->ap_queue) != NULL) *(int *)data = TAILQ_FIRST(&ap->ap_queue)->ape_record_len; else *(int *)data = 0; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; case FIOASYNC: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); if (*(int *)data) ap->ap_flags |= AUDIT_PIPE_ASYNC; else ap->ap_flags &= ~AUDIT_PIPE_ASYNC; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; @@ -772,34 +815,34 @@ audit_pipe_ioctl(struct cdev *dev, u_lon break; case AUDITPIPE_GET_PRESELECT_FLAGS: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); maskp = (au_mask_t *)data; *maskp = ap->ap_preselect_flags; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; case AUDITPIPE_SET_PRESELECT_FLAGS: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); maskp = (au_mask_t *)data; ap->ap_preselect_flags = *maskp; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; case AUDITPIPE_GET_PRESELECT_NAFLAGS: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); maskp = (au_mask_t *)data; *maskp = ap->ap_preselect_naflags; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; case AUDITPIPE_SET_PRESELECT_NAFLAGS: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); maskp = (au_mask_t *)data; ap->ap_preselect_naflags = *maskp; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; @@ -826,9 +869,9 @@ audit_pipe_ioctl(struct cdev *dev, u_lon break; case AUDITPIPE_GET_PRESELECT_MODE: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); *(int *)data = ap->ap_preselect_mode; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; @@ -837,9 +880,9 @@ audit_pipe_ioctl(struct cdev *dev, u_lon switch (mode) { case AUDITPIPE_PRESELECT_MODE_TRAIL: case AUDITPIPE_PRESELECT_MODE_LOCAL: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); ap->ap_preselect_mode = mode; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; @@ -849,9 +892,9 @@ audit_pipe_ioctl(struct cdev *dev, u_lon break; case AUDITPIPE_FLUSH: - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); audit_pipe_flush(ap); - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); error = 0; break; @@ -910,7 +953,8 @@ audit_pipe_read(struct cdev *dev, struct ap = dev->si_drv1; KASSERT(ap != NULL, ("audit_pipe_read: ap == NULL")); - mtx_lock(&audit_pipe_mtx); + + AUDIT_PIPE_LOCK(ap); do { /* * Wait for a record that fits into the read buffer, dropping @@ -920,12 +964,12 @@ audit_pipe_read(struct cdev *dev, struct */ while ((ape = audit_pipe_pop(ap)) == NULL) { if (ap->ap_flags & AUDIT_PIPE_NBIO) { - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); return (EAGAIN); } - error = cv_wait_sig(&audit_pipe_cv, &audit_pipe_mtx); + error = cv_wait_sig(&ap->ap_cv, AUDIT_PIPE_MTX(ap)); if (error) { - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); return (error); } } @@ -935,7 +979,7 @@ audit_pipe_read(struct cdev *dev, struct ap->ap_truncates++; } while (1); ap->ap_reads++; - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); /* * Now read record to user space memory. Even if the read is short, @@ -959,13 +1003,14 @@ audit_pipe_poll(struct cdev *dev, int ev revents = 0; ap = dev->si_drv1; KASSERT(ap != NULL, ("audit_pipe_poll: ap == NULL")); + if (events & (POLLIN | POLLRDNORM)) { - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); if (TAILQ_FIRST(&ap->ap_queue) != NULL) revents |= events & (POLLIN | POLLRDNORM); else selrecord(td, &ap->ap_selinfo); - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); } return (revents); } @@ -987,9 +1032,9 @@ audit_pipe_kqfilter(struct cdev *dev, st kn->kn_fop = &audit_pipe_read_filterops; kn->kn_hook = ap; - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); knlist_add(&ap->ap_selinfo.si_note, kn, 1); - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); return (0); } @@ -1002,11 +1047,11 @@ audit_pipe_kqread(struct knote *kn, long struct audit_pipe_entry *ape; struct audit_pipe *ap; - mtx_assert(&audit_pipe_mtx, MA_OWNED); - ap = (struct audit_pipe *)kn->kn_hook; KASSERT(ap != NULL, ("audit_pipe_kqread: ap == NULL")); + AUDIT_PIPE_LOCK_ASSERT(ap); + if (ap->ap_qlen != 0) { ape = TAILQ_FIRST(&ap->ap_queue); KASSERT(ape != NULL, ("audit_pipe_kqread: ape == NULL")); @@ -1030,9 +1075,9 @@ audit_pipe_kqdetach(struct knote *kn) ap = (struct audit_pipe *)kn->kn_hook; KASSERT(ap != NULL, ("audit_pipe_kqdetach: ap == NULL")); - mtx_lock(&audit_pipe_mtx); + AUDIT_PIPE_LOCK(ap); knlist_remove(&ap->ap_selinfo.si_note, kn, 1); - mtx_unlock(&audit_pipe_mtx); + AUDIT_PIPE_UNLOCK(ap); } /* @@ -1043,8 +1088,7 @@ audit_pipe_init(void *unused) { TAILQ_INIT(&audit_pipe_list); - mtx_init(&audit_pipe_mtx, "audit_pipe_mtx", NULL, MTX_DEF); - cv_init(&audit_pipe_cv, "audit_pipe_cv"); + AUDIT_PIPE_LIST_LOCK_INIT(); clone_setup(&audit_pipe_clones); audit_pipe_eh_tag = EVENTHANDLER_REGISTER(dev_clone, From owner-svn-src-all@FreeBSD.ORG Thu Oct 30 23:09:20 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71F7E1065675; Thu, 30 Oct 2008 23:09:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52D398FC1A; Thu, 30 Oct 2008 23:09:20 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9UN9K8M063984; Thu, 30 Oct 2008 23:09:20 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9UN9KdY063983; Thu, 30 Oct 2008 23:09:20 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810302309.m9UN9KdY063983@svn.freebsd.org> From: Robert Watson Date: Thu, 30 Oct 2008 23:09:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184489 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 23:09:20 -0000 Author: rwatson Date: Thu Oct 30 23:09:19 2008 New Revision: 184489 URL: http://svn.freebsd.org/changeset/base/184489 Log: When we drop an audit record going to and audit pipe because the audit pipe has overflowed, drop the newest, rather than oldest, record. This makes overflow drop behavior consistent with memory allocation failure leading to drop, avoids touching the consumer end of the queue from a producer, and lowers the CPU overhead of dropping a record by dropping before memory allocation and copying. Obtained from: Apple, Inc. MFC after: 2 months Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Thu Oct 30 21:58:39 2008 (r184488) +++ head/sys/security/audit/audit_pipe.c Thu Oct 30 23:09:19 2008 (r184489) @@ -424,17 +424,22 @@ audit_pipe_preselect(au_id_t auid, au_ev /* * Append individual record to a queue -- allocate queue-local buffer, and - * add to the queue. We try to drop from the head of the queue so that more - * recent events take precedence over older ones, but if allocation fails we - * do drop the new event. + * add to the queue. If the queue is full or we can't allocate memory, drop + * the newest record. */ static void audit_pipe_append(struct audit_pipe *ap, void *record, u_int record_len) { - struct audit_pipe_entry *ape, *ape_remove; + struct audit_pipe_entry *ape; AUDIT_PIPE_LOCK_ASSERT(ap); + if (ap->ap_qlen >= ap->ap_qlimit) { + ap->ap_drops++; + audit_pipe_drops++; + return; + } + ape = malloc(sizeof(*ape), M_AUDIT_PIPE_ENTRY, M_NOWAIT | M_ZERO); if (ape == NULL) { ap->ap_drops++; @@ -453,15 +458,6 @@ audit_pipe_append(struct audit_pipe *ap, bcopy(record, ape->ape_record, record_len); ape->ape_record_len = record_len; - if (ap->ap_qlen >= ap->ap_qlimit) { - ape_remove = TAILQ_FIRST(&ap->ap_queue); - TAILQ_REMOVE(&ap->ap_queue, ape_remove, ape_queue); - audit_pipe_entry_free(ape_remove); - ap->ap_qlen--; - ap->ap_drops++; - audit_pipe_drops++; - } - TAILQ_INSERT_TAIL(&ap->ap_queue, ape, ape_queue); ap->ap_inserts++; ap->ap_qlen++; From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 00:52:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D17941065676; Fri, 31 Oct 2008 00:52:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BE34E8FC22; Fri, 31 Oct 2008 00:52:31 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9V0qVLK065965; Fri, 31 Oct 2008 00:52:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9V0qV0F065963; Fri, 31 Oct 2008 00:52:31 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200810310052.m9V0qV0F065963@svn.freebsd.org> From: Nathan Whitehorn Date: Fri, 31 Oct 2008 00:52:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184490 - head/sys/boot/powerpc/boot1.chrp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 00:52:31 -0000 Author: nwhitehorn Date: Fri Oct 31 00:52:31 2008 New Revision: 184490 URL: http://svn.freebsd.org/changeset/base/184490 Log: Modify our boot block to pick an output device, without which boot1 will fail on G4 machines. On the assumption that most people using FreeBSD on Apple hardware are not using serial consoles, set boot1's output to screen. This should be revisited. While here, reduce verbosity of boot1. Modified: head/sys/boot/powerpc/boot1.chrp/boot1.c head/sys/boot/powerpc/boot1.chrp/bootinfo.txt Modified: head/sys/boot/powerpc/boot1.chrp/boot1.c ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/boot1.c Thu Oct 30 23:09:19 2008 (r184489) +++ head/sys/boot/powerpc/boot1.chrp/boot1.c Fri Oct 31 00:52:31 2008 (r184490) @@ -561,6 +561,10 @@ printf(const char *fmt, ...) va_list ap; int ret; + /* Don't annoy the user as we probe for partitions */ + if (strcmp(fmt,"Not ufs\n") == 0) + return 0; + va_start(ap, fmt); ret = vprintf(fmt, ap); va_end(ap); Modified: head/sys/boot/powerpc/boot1.chrp/bootinfo.txt ============================================================================== --- head/sys/boot/powerpc/boot1.chrp/bootinfo.txt Thu Oct 30 23:09:19 2008 (r184489) +++ head/sys/boot/powerpc/boot1.chrp/bootinfo.txt Fri Oct 31 00:52:31 2008 (r184490) @@ -7,6 +7,7 @@ MacRISC MacRISC3 MacRISC4 +" screen" output boot &device;:&partition;,\ppc\boot1.elf From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 05:43:19 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4D7B1065670; Fri, 31 Oct 2008 05:43:19 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B75648FC12; Fri, 31 Oct 2008 05:43:19 +0000 (UTC) (envelope-from peter@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9V5hJS8071202; Fri, 31 Oct 2008 05:43:19 GMT (envelope-from peter@svn.freebsd.org) Received: (from peter@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9V5hJwK071200; Fri, 31 Oct 2008 05:43:19 GMT (envelope-from peter@svn.freebsd.org) Message-Id: <200810310543.m9V5hJwK071200@svn.freebsd.org> From: Peter Wemm Date: Fri, 31 Oct 2008 05:43:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184492 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 05:43:19 -0000 Author: peter Date: Fri Oct 31 05:43:19 2008 New Revision: 184492 URL: http://svn.freebsd.org/changeset/base/184492 Log: Add three extra to the kinfo_proc_vmmap data. kve_offset - the offset within an object that a mapping refers to. fileid and fsid are inode/dev for vnodes. (Linux procfs has these and valgrind is really unhappy without them.) I believe I didn't change the size of the struct. Modified: head/sys/kern/kern_proc.c head/sys/sys/user.h Modified: head/sys/kern/kern_proc.c ============================================================================== --- head/sys/kern/kern_proc.c Fri Oct 31 02:36:28 2008 (r184491) +++ head/sys/kern/kern_proc.c Fri Oct 31 05:43:19 2008 (r184492) @@ -1341,6 +1341,8 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR unsigned int last_timestamp; char *fullpath, *freepath; struct kinfo_vmentry *kve; + struct vattr va; + struct ucred *cred; int error, *name; struct vnode *vp; struct proc *p; @@ -1400,6 +1402,8 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR lobj = tobj; } + kve->kve_fileid = 0; + kve->kve_fsid = 0; freepath = NULL; fullpath = ""; if (lobj) { @@ -1440,6 +1444,11 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vn_fullpath(curthread, vp, &fullpath, &freepath); + cred = curthread->td_ucred; + if (VOP_GETATTR(vp, &va, cred) == 0) { + kve->kve_fileid = va.va_fileid; + kve->kve_fsid = va.va_fsid; + } vput(vp); VFS_UNLOCK_GIANT(vfslocked); } @@ -1451,6 +1460,7 @@ sysctl_kern_proc_vmmap(SYSCTL_HANDLER_AR kve->kve_start = (void*)entry->start; kve->kve_end = (void*)entry->end; + kve->kve_offset = (off_t)entry->offset; if (entry->protection & VM_PROT_READ) kve->kve_protection |= KVME_PROT_READ; Modified: head/sys/sys/user.h ============================================================================== --- head/sys/sys/user.h Fri Oct 31 02:36:28 2008 (r184491) +++ head/sys/sys/user.h Fri Oct 31 05:43:19 2008 (r184492) @@ -326,7 +326,10 @@ struct kinfo_vmentry { int kve_shadow_count; /* VM obj shadow count. */ char kve_path[PATH_MAX]; /* Path to VM obj, if any. */ void *_kve_pspare[8]; /* Space for more stuff. */ - int _kve_ispare[8]; /* Space for more stuff. */ + off_t kve_offset; /* Mapping offset in object */ + uint64_t kve_fileid; /* inode number of vnode */ + dev_t kve_fsid; /* dev_t of vnode location */ + int _kve_ispare[3]; /* Space for more stuff. */ }; /* From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 06:48:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 134481065673; Fri, 31 Oct 2008 06:48:22 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from igloo.linux.gr (igloo.linux.gr [62.1.205.36]) by mx1.freebsd.org (Postfix) with ESMTP id 996138FC12; Fri, 31 Oct 2008 06:48:21 +0000 (UTC) (envelope-from keramida@freebsd.org) Received: from kobe.laptop (adsl25-227.kln.forthnet.gr [77.49.152.227]) (authenticated bits=128) by igloo.linux.gr (8.14.3/8.14.3/Debian-5) with ESMTP id m9V6mA0g004474 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 31 Oct 2008 08:48:16 +0200 Received: from kobe.laptop (kobe.laptop [127.0.0.1]) by kobe.laptop (8.14.3/8.14.3) with ESMTP id m9V6m90S000453; Fri, 31 Oct 2008 08:48:09 +0200 (EET) (envelope-from keramida@freebsd.org) Received: (from keramida@localhost) by kobe.laptop (8.14.3/8.14.3/Submit) id m9V6m9Vw000452; Fri, 31 Oct 2008 08:48:09 +0200 (EET) (envelope-from keramida@freebsd.org) From: Giorgos Keramidas To: Ivan Voras References: <200810301405.m9UE5wwZ053250@svn.freebsd.org> Date: Fri, 31 Oct 2008 08:48:09 +0200 In-Reply-To: <200810301405.m9UE5wwZ053250@svn.freebsd.org> (Ivan Voras's message of "Thu, 30 Oct 2008 14:05:58 +0000 (UTC)") Message-ID: <877i7pdzva.fsf@kobe.laptop> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MailScanner-ID: m9V6mA0g004474 X-Hellug-MailScanner: Found to be clean X-Hellug-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-4.303, required 5, autolearn=not spam, ALL_TRUSTED -1.80, AWL 0.10, BAYES_00 -2.60) X-Hellug-MailScanner-From: keramida@freebsd.org X-Spam-Status: No Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184471 - in head/bin: cat cp X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 06:48:22 -0000 On Thu, 30 Oct 2008 14:05:58 +0000 (UTC), Ivan Voras wrote: > Author: ivoras > Date: Thu Oct 30 14:05:57 2008 > New Revision: 184471 > URL: http://svn.freebsd.org/changeset/base/184471 > > Log: > Teach cat(1) and cp(1) to use a larger buffer if enough memory is present > in the system. A simple heuristics is used to detect what is "enough" > memory: if number of physmem pages is greater than 32k (equalling 128 MB > on machines with 4 kB pages). > > Typical immediate result of these changes is reduction in context switches > and the goal is to increase efficiency by using large buffers: > before: /usr/bin/time -hlp cat file1 > file2 > ... > 163 voluntary context switches > 11194 involuntary context switches > after: /usr/bin/time -hlp ./cat file1 > file2 > ... > 417 voluntary context switches > 272 involuntary context switches Nice :) I didn't notice this in -hackers, but it may be worth letting the buffer size grow above 1 MB when we have more than, say, 512 MB of memory. By running dd(1) with buffer sizes of 1, 2, 4, 6, 8, 10, 12, 14, and 16 MB there are larger buffer sizes that reduce involuntary context switches even more. My laptop (with more than 2 GB or memory), with powerd disabled, running in single user mode, and copying a file of 200 MB using the script: ,----------------------------------------------------------------------- | #!/bin/sh | | mblist="1 2 4 6 8 10 12 14 16" | | for bufsize in ${mblist} ; do | cmd="dd if=testfile bs=${bufsize}m | dd of=testfile.out bs=${bufsize}m" | logname=`printf '%02d.dd-times' "${bufsize}"` | true > "${logname}" | for cnt in `jot 30 1 30` ; do | echo "Overwriting testfile" | cat datafile > testfile | printf '%2d MB buffer, run %2d, logfile=%s\n' \ | "${bufsize}" "${cnt}" "${logname}" | /usr/bin/time -l sh -c "${cmd}" 2>> "${logname}" | tail -1 "${logname}" | done | done `----------------------------------------------------------------------- got the following results for sizes < 10 MB: : tcsh% ministat -w 78 0? : x 01 : + 02 : * 04 : % 06 : # 08 : +------------------------------------------------------------------------------+ : | # % #% * * + x | : | ## %#*#* %%% # O%*O% ***+* *+ + + x x x x xx x | : |## %### %%O#O#O##OOO#OOOOOOO *OO**@*O**++*xx x x xxx x * xx x x x x x| : | |___|____AM|MA____||A|___A_M_|__| |__________MA__________| | : +------------------------------------------------------------------------------+ : N Min Max Median Avg Stddev : x 30 1383 1653 1493 1496.1 69.360801 : + 30 1286 1434 1381 1371.0667 44.393952 : Difference at 95.0% confidence : -125.033 +/- 30.1005 : -8.35728% +/- 2.01193% : (Student's t, pooled s = 58.2312) : * 30 1242 1523 1342 1339.3667 56.059379 : Difference at 95.0% confidence : -156.733 +/- 32.5975 : -10.4761% +/- 2.17883% : (Student's t, pooled s = 63.0618) : % 30 1199 1401 1292 1293.1667 50.603996 : Difference at 95.0% confidence : -202.933 +/- 31.3824 : -13.5642% +/- 2.09762% : (Student's t, pooled s = 60.7111) : # 30 1179 1402 1275 1273.9667 57.161889 : Difference at 95.0% confidence : -222.133 +/- 32.8523 : -14.8475% +/- 2.19586% : (Student's t, pooled s = 63.5547) Buffer sizes even larger didn't yield as good results as 6 MB or 8 MB, but there seems to be an improvement in 16 MB too: : tcsh% ministat -w 78 01 1? : x 01 : + 10 : * 12 : % 14 : # 16 : +------------------------------------------------------------------------------+ : | # # % % % | : | # # # ##* ## O#+% OO* %+%* + %*+ x*x x x xx x | : |# ## # #OO*#O OO* *OO%OOOOOOOO*OOOOOOO**@ xOO*%x*#%* * x xx x x x x x| : | |________A|_____||_|_AM___AAMM___|_||________A_________| | : +------------------------------------------------------------------------------+ : N Min Max Median Avg Stddev : x 30 1383 1653 1493 1496.1 69.360801 : + 30 1200 1511 1383 1363.5667 69.974716 : Difference at 95.0% confidence : -132.533 +/- 36.0126 : -8.85859% +/- 2.4071% : (Student's t, pooled s = 69.6684) : * 30 1208 1496 1336 1333.1667 79.330858 : Difference at 95.0% confidence : -162.933 +/- 38.5167 : -10.8905% +/- 2.57447% : (Student's t, pooled s = 74.5128) : % 30 1208 1488 1377 1374.1333 59.381138 : Difference at 95.0% confidence : -121.967 +/- 33.3741 : -8.15231% +/- 2.23074% : (Student's t, pooled s = 64.5641) : # 30 1124 1363 1246 1245.7667 59.806979 : Difference at 95.0% confidence : -250.333 +/- 33.4755 : -16.7324% +/- 2.23752% : (Student's t, pooled s = 64.7603) It looks like it's probably worth pushing the limit up to 8 MB when we have lots of memory :) From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 08:42:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 129DD1065670; Fri, 31 Oct 2008 08:42:35 +0000 (UTC) (envelope-from kato@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 03A288FC28; Fri, 31 Oct 2008 08:42:35 +0000 (UTC) (envelope-from kato@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9V8gYLO074504; Fri, 31 Oct 2008 08:42:34 GMT (envelope-from kato@svn.freebsd.org) Received: (from kato@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9V8gYwn074502; Fri, 31 Oct 2008 08:42:34 GMT (envelope-from kato@svn.freebsd.org) Message-Id: <200810310842.m9V8gYwn074502@svn.freebsd.org> From: KATO Takenori Date: Fri, 31 Oct 2008 08:42:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184496 - stable/7/sys/pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 08:42:35 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 09:09:23 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5857C106568B; Fri, 31 Oct 2008 09:09:23 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 48EB58FC13; Fri, 31 Oct 2008 09:09:23 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9V99Mrp075023; Fri, 31 Oct 2008 09:09:22 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9V99Mdo075022; Fri, 31 Oct 2008 09:09:22 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <200810310909.m9V99Mdo075022@svn.freebsd.org> From: David Xu Date: Fri, 31 Oct 2008 09:09:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184497 - stable/7/libexec/rtld-elf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 09:09:23 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 09:41:06 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9C70D1065678; Fri, 31 Oct 2008 09:41:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8C27A8FC1A; Fri, 31 Oct 2008 09:41:06 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9V9f6lS075817; Fri, 31 Oct 2008 09:41:06 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9V9f6i2075814; Fri, 31 Oct 2008 09:41:06 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810310941.m9V9f6i2075814@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 31 Oct 2008 09:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184498 - in stable/7/sys: . security/mac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 09:41:06 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 09:59:42 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E334E1065690; Fri, 31 Oct 2008 09:59:42 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id A2B338FC1C; Fri, 31 Oct 2008 09:59:42 +0000 (UTC) (envelope-from des@des.no) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id ACD3D6D43F; Fri, 31 Oct 2008 09:59:41 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 82DF08448F; Fri, 31 Oct 2008 10:59:41 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Marcel Moolenaar References: <200810250618.m9P6ICWl023370@svn.freebsd.org> Date: Fri, 31 Oct 2008 10:59:41 +0100 In-Reply-To: <200810250618.m9P6ICWl023370@svn.freebsd.org> (Marcel Moolenaar's message of "Sat, 25 Oct 2008 06:18:12 +0000 (UTC)") Message-ID: <863aidgk4y.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184251 - in head/sys: conf dev/cfi sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 09:59:43 -0000 Marcel Moolenaar writes: > Log: > Add a driver for flash memory that implements to the Common Flash > Memory Interface (CFI). The flash memory can be read and written > to through /dev/cfi# and an ioctl() exists so processes can read > the query information. > The driver supports the AMD and Intel command set, though only > the AMD command has been tested. >=20=20=20 > Obtained from: Juniper Networks, Inc. You may want to *carefully* review the license on this code. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 10:11:35 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D9A091065679; Fri, 31 Oct 2008 10:11:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C993B8FC20; Fri, 31 Oct 2008 10:11:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VABZT3076454; Fri, 31 Oct 2008 10:11:35 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VABZGM076450; Fri, 31 Oct 2008 10:11:35 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810311011.m9VABZGM076450@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 31 Oct 2008 10:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184499 - in head/sys: amd64/amd64 geom i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 10:11:36 -0000 Author: kib Date: Fri Oct 31 10:11:35 2008 New Revision: 184499 URL: http://svn.freebsd.org/changeset/base/184499 Log: Revert r184136. Instead, push the check for crashdumpmap overflow into the MD i386 and amd64 dump code. Requested by: jhb Retested by: pho MFC after: 3 days (+ 176304 + 184136) Modified: head/sys/amd64/amd64/dump_machdep.c head/sys/amd64/amd64/minidump_machdep.c head/sys/geom/geom_disk.c head/sys/i386/i386/dump_machdep.c Modified: head/sys/amd64/amd64/dump_machdep.c ============================================================================== --- head/sys/amd64/amd64/dump_machdep.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/amd64/amd64/dump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) @@ -165,7 +165,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; - maxdumppgs = di->maxiosize / PAGE_SIZE; + maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS); if (maxdumppgs == 0) /* seatbelt */ maxdumppgs = 1; Modified: head/sys/amd64/amd64/minidump_machdep.c ============================================================================== --- head/sys/amd64/amd64/minidump_machdep.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/amd64/amd64/minidump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) @@ -104,7 +104,7 @@ blk_write(struct dumperinfo *di, char *p int error, i, c; u_int maxdumpsz; - maxdumpsz = di->maxiosize; + maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); if (maxdumpsz == 0) /* seatbelt */ maxdumpsz = PAGE_SIZE; error = 0; Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/geom/geom_disk.c Fri Oct 31 10:11:35 2008 (r184499) @@ -179,7 +179,7 @@ g_disk_kerneldump(struct bio *bp, struct di.dumper = dp->d_dump; di.priv = dp; di.blocksize = dp->d_sectorsize; - di.maxiosize = min(dp->d_maxsize, MAXDUMPPGS * PAGE_SIZE); + di.maxiosize = dp->d_maxsize; di.mediaoffset = gkd->offset; if ((gkd->offset + gkd->length) > dp->d_mediasize) gkd->length = dp->d_mediasize - gkd->offset; Modified: head/sys/i386/i386/dump_machdep.c ============================================================================== --- head/sys/i386/i386/dump_machdep.c Fri Oct 31 09:41:06 2008 (r184498) +++ head/sys/i386/i386/dump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) @@ -165,7 +165,7 @@ cb_dumpdata(struct md_pa *mdp, int seqnr va = 0; pgs = mdp->md_size / PAGE_SIZE; pa = mdp->md_start; - maxdumppgs = di->maxiosize / PAGE_SIZE; + maxdumppgs = min(di->maxiosize / PAGE_SIZE, MAXDUMPPGS); if (maxdumppgs == 0) /* seatbelt */ maxdumppgs = 1; From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 10:14:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EE1D1065676; Fri, 31 Oct 2008 10:14:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F1C28FC16; Fri, 31 Oct 2008 10:14:29 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VAESw7076551; Fri, 31 Oct 2008 10:14:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VAEScx076550; Fri, 31 Oct 2008 10:14:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810311014.m9VAEScx076550@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 31 Oct 2008 10:14:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184500 - head/sys/i386/i386 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 10:14:29 -0000 Author: kib Date: Fri Oct 31 10:14:28 2008 New Revision: 184500 URL: http://svn.freebsd.org/changeset/base/184500 Log: The file was inadvertently excluded from r184499. Modified: head/sys/i386/i386/minidump_machdep.c Modified: head/sys/i386/i386/minidump_machdep.c ============================================================================== --- head/sys/i386/i386/minidump_machdep.c Fri Oct 31 10:11:35 2008 (r184499) +++ head/sys/i386/i386/minidump_machdep.c Fri Oct 31 10:14:28 2008 (r184500) @@ -102,7 +102,7 @@ blk_write(struct dumperinfo *di, char *p int error, i, c; u_int maxdumpsz; - maxdumpsz = di->maxiosize; + maxdumpsz = min(di->maxiosize, MAXDUMPPGS * PAGE_SIZE); if (maxdumpsz == 0) /* seatbelt */ maxdumpsz = PAGE_SIZE; error = 0; From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 10:38:30 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA4D91065678; Fri, 31 Oct 2008 10:38:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9B188FC1C; Fri, 31 Oct 2008 10:38:30 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VAcUVU077070; Fri, 31 Oct 2008 10:38:30 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VAcUXg077069; Fri, 31 Oct 2008 10:38:30 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200810311038.m9VAcUXg077069@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 31 Oct 2008 10:38:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184501 - head/sys/compat/linux X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 10:38:31 -0000 Author: kib Date: Fri Oct 31 10:38:30 2008 New Revision: 184501 URL: http://svn.freebsd.org/changeset/base/184501 Log: The code in linux_proc_exit() contains a race when multiple linux based processes exits at the same time. The linux_emuldata structure is freed but p->p_emuldata is left as a dangling pointer to the just freed memory. The check for W_EXIT in the loop scanning the child processes isn't safe since the state of the child process can change right afterwards. Lock the process and check the W_EXIT before delivering signal. Submitted by: tegge Reviewed by: davidxu MFC after: 1 week Modified: head/sys/compat/linux/linux_emul.c Modified: head/sys/compat/linux/linux_emul.c ============================================================================== --- head/sys/compat/linux/linux_emul.c Fri Oct 31 10:14:28 2008 (r184500) +++ head/sys/compat/linux/linux_emul.c Fri Oct 31 10:38:30 2008 (r184501) @@ -235,11 +235,11 @@ linux_proc_exit(void *arg __unused, stru continue; em = em_find(q, EMUL_DOLOCK); KASSERT(em != NULL, ("linux_reparent: emuldata not found: %i\n", q->p_pid)); - if (em->pdeath_signal != 0) { - PROC_LOCK(q); + PROC_LOCK(q); + if ((q->p_flag & P_WEXIT) == 0 && em->pdeath_signal != 0) { psignal(q, em->pdeath_signal); - PROC_UNLOCK(q); } + PROC_UNLOCK(q); EMUL_UNLOCK(&emul_lock); } sx_xunlock(&proctree_lock); From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 11:27:55 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FBF41065674; Fri, 31 Oct 2008 11:27:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3A5228FC20; Fri, 31 Oct 2008 11:27:55 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VBRtI4079399; Fri, 31 Oct 2008 11:27:55 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VBRscj079392; Fri, 31 Oct 2008 11:27:54 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810311127.m9VBRscj079392@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 31 Oct 2008 11:27:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: 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 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 11:27:55 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 12:58:12 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 93DA11065672; Fri, 31 Oct 2008 12:58:12 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 803D98FC17; Fri, 31 Oct 2008 12:58:12 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VCwCVC081155; Fri, 31 Oct 2008 12:58:12 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VCwCb8081154; Fri, 31 Oct 2008 12:58:12 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <200810311258.m9VCwCb8081154@svn.freebsd.org> From: Oleg Bulyzhin Date: Fri, 31 Oct 2008 12:58:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184504 - stable/7/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 12:58:12 -0000 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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 13:00:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E60B21065675; Fri, 31 Oct 2008 13:00:34 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D29888FC1B; Fri, 31 Oct 2008 13:00:34 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VD0YSt081252; Fri, 31 Oct 2008 13:00:34 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VD0Yvo081251; Fri, 31 Oct 2008 13:00:34 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <200810311300.m9VD0Yvo081251@svn.freebsd.org> From: Oleg Bulyzhin Date: Fri, 31 Oct 2008 13:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184505 - stable/6/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 13:00:35 -0000 Author: oleg Date: Fri Oct 31 13:00:34 2008 New Revision: 184505 URL: http://svn.freebsd.org/changeset/base/184505 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/6/sys/netinet/ip_dummynet.c Modified: stable/6/sys/netinet/ip_dummynet.c ============================================================================== --- stable/6/sys/netinet/ip_dummynet.c Fri Oct 31 12:58:12 2008 (r184504) +++ stable/6/sys/netinet/ip_dummynet.c Fri Oct 31 13:00:34 2008 (r184505) @@ -1186,7 +1186,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; @@ -1382,7 +1383,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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 13:01:32 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 509211065672; Fri, 31 Oct 2008 13:01:32 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3DE3A8FC25; Fri, 31 Oct 2008 13:01:32 +0000 (UTC) (envelope-from oleg@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VD1WQk081307; Fri, 31 Oct 2008 13:01:32 GMT (envelope-from oleg@svn.freebsd.org) Received: (from oleg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VD1WeJ081306; Fri, 31 Oct 2008 13:01:32 GMT (envelope-from oleg@svn.freebsd.org) Message-Id: <200810311301.m9VD1WeJ081306@svn.freebsd.org> From: Oleg Bulyzhin Date: Fri, 31 Oct 2008 13:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184506 - releng/6.4/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 13:01:32 -0000 Author: oleg Date: Fri Oct 31 13:01:31 2008 New Revision: 184506 URL: http://svn.freebsd.org/changeset/base/184506 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: releng/6.4/sys/netinet/ip_dummynet.c Modified: releng/6.4/sys/netinet/ip_dummynet.c ============================================================================== --- releng/6.4/sys/netinet/ip_dummynet.c Fri Oct 31 13:00:34 2008 (r184505) +++ releng/6.4/sys/netinet/ip_dummynet.c Fri Oct 31 13:01:31 2008 (r184506) @@ -1186,7 +1186,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; @@ -1382,7 +1383,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 owner-svn-src-all@FreeBSD.ORG Fri Oct 31 14:30:34 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 382DB106567A; Fri, 31 Oct 2008 14:30:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 231068FC17; Fri, 31 Oct 2008 14:30:34 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VEUYBS082897; Fri, 31 Oct 2008 14:30:34 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VEUXax082891; Fri, 31 Oct 2008 14:30:33 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200810311430.m9VEUXax082891@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 31 Oct 2008 14:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184507 - in stable/7/sys: . kern netinet sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 14:30:34 -0000 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); From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 14:40:22 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A627106573E; Fri, 31 Oct 2008 14:40:22 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 353CB8FC12; Fri, 31 Oct 2008 14:40:21 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VEeLaE083099; Fri, 31 Oct 2008 14:40:21 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VEeL10083098; Fri, 31 Oct 2008 14:40:21 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810311440.m9VEeL10083098@svn.freebsd.org> From: Robert Watson Date: Fri, 31 Oct 2008 14:40:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184508 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 14:40:22 -0000 Author: rwatson Date: Fri Oct 31 14:40:21 2008 New Revision: 184508 URL: http://svn.freebsd.org/changeset/base/184508 Log: Historically, /dev/auditpipe has allows only whole records to be read via read(2), which meant that records longer than the buffer passed to read(2) were dropped. Instead take the approach of allowing partial reads to be continued across multiple system calls more in the style of streaming character device. This means retaining a record on the per-pipe queue in a partially read state, so maintain a current offset into the record. Keep the record on the queue during a read, so add a new lock, ap_sx, to serialize removal of records from the queue by either read(2) or ioctl(2) requesting a pipe flush. Modify the kqueue handler to return bytes left in the current record rather than simply the size of the current record. It is now possible to use praudit, which used the standard FILE * buffer sizes, to track much larger record sizes from /dev/auditpipe, such as very long command lines to execve(2). MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Fri Oct 31 14:30:33 2008 (r184507) +++ head/sys/security/audit/audit_pipe.c Fri Oct 31 14:40:21 2008 (r184508) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -84,6 +85,7 @@ static MALLOC_DEFINE(M_AUDIT_PIPE_PRESEL struct audit_pipe_entry { void *ape_record; u_int ape_record_len; + u_int ape_record_offset; TAILQ_ENTRY(audit_pipe_entry) ape_queue; }; @@ -120,7 +122,15 @@ struct audit_pipe { /* * Per-pipe mutex protecting most fields in this data structure. */ - struct mtx ap_lock; + struct mtx ap_mtx; + + /* + * Per-pipe sleep lock serializing user-generated reads and flushes. + * uiomove() is called to copy out the current head record's data + * while the record remains in the queue, so we prevent other threads + * from removing it using this lock. + */ + struct sx ap_sx; /* * Condition variable to signal when data has been delivered to a @@ -147,7 +157,9 @@ struct audit_pipe { TAILQ_HEAD(, audit_pipe_preselect) ap_preselect_list; /* - * Current pending record list. + * Current pending record list. Protected by a combination of ap_mtx + * and ap_sx. Note particularly that *both* locks are required to + * remove a record from the head of the queue, as an in-progress read * may sleep while copying and therefore cannot hold ap_mtx. */ TAILQ_HEAD(, audit_pipe_entry) ap_queue; @@ -157,13 +169,19 @@ struct audit_pipe { TAILQ_ENTRY(audit_pipe) ap_list; }; -#define AUDIT_PIPE_LOCK(ap) mtx_lock(&(ap)->ap_lock) -#define AUDIT_PIPE_LOCK_ASSERT(ap) mtx_assert(&(ap)->ap_lock, MA_OWNED) -#define AUDIT_PIPE_LOCK_DESTROY(ap) mtx_destroy(&(ap)->ap_lock) -#define AUDIT_PIPE_LOCK_INIT(ap) mtx_init(&(ap)->ap_lock, \ - "audit_pipe_lock", NULL, MTX_DEF) -#define AUDIT_PIPE_UNLOCK(ap) mtx_unlock(&(ap)->ap_lock) -#define AUDIT_PIPE_MTX(ap) (&(ap)->ap_lock) +#define AUDIT_PIPE_LOCK(ap) mtx_lock(&(ap)->ap_mtx) +#define AUDIT_PIPE_LOCK_ASSERT(ap) mtx_assert(&(ap)->ap_mtx, MA_OWNED) +#define AUDIT_PIPE_LOCK_DESTROY(ap) mtx_destroy(&(ap)->ap_mtx) +#define AUDIT_PIPE_LOCK_INIT(ap) mtx_init(&(ap)->ap_mtx, \ + "audit_pipe_mtx", NULL, MTX_DEF) +#define AUDIT_PIPE_UNLOCK(ap) mtx_unlock(&(ap)->ap_mtx) +#define AUDIT_PIPE_MTX(ap) (&(ap)->ap_mtx) + +#define AUDIT_PIPE_SX_LOCK_DESTROY(ap) sx_destroy(&(ap)->ap_sx) +#define AUDIT_PIPE_SX_LOCK_INIT(ap) sx_init(&(ap)->ap_sx, "audit_pipe_sx") +#define AUDIT_PIPE_SX_XLOCK_ASSERT(ap) sx_assert(&(ap)->ap_sx, SA_XLOCKED) +#define AUDIT_PIPE_SX_XLOCK_SIG(ap) sx_xlock_sig(&(ap)->ap_sx) +#define AUDIT_PIPE_SX_XUNLOCK(ap) sx_xunlock(&(ap)->ap_sx) /* * Global list of audit pipes, rwlock to protect it. Individual record @@ -457,6 +475,7 @@ audit_pipe_append(struct audit_pipe *ap, bcopy(record, ape->ape_record, record_len); ape->ape_record_len = record_len; + ape->ape_record_offset = 0; TAILQ_INSERT_TAIL(&ap->ap_queue, ape, ape_queue); ap->ap_inserts++; @@ -530,26 +549,6 @@ audit_pipe_submit_user(void *record, u_i } /* - * Pop the next record off of an audit pipe. - */ -static struct audit_pipe_entry * -audit_pipe_pop(struct audit_pipe *ap) -{ - struct audit_pipe_entry *ape; - - AUDIT_PIPE_LOCK_ASSERT(ap); - - ape = TAILQ_FIRST(&ap->ap_queue); - KASSERT((ape == NULL && ap->ap_qlen == 0) || - (ape != NULL && ap->ap_qlen != 0), ("audit_pipe_pop: qlen")); - if (ape == NULL) - return (NULL); - TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); - ap->ap_qlen--; - return (ape); -} - -/* * Allocate a new audit pipe. Connects the pipe, on success, to the global * list and updates statistics. */ @@ -568,6 +567,7 @@ audit_pipe_alloc(void) knlist_init(&ap->ap_selinfo.si_note, AUDIT_PIPE_MTX(ap), NULL, NULL, NULL); AUDIT_PIPE_LOCK_INIT(ap); + AUDIT_PIPE_SX_LOCK_INIT(ap); cv_init(&ap->ap_cv, "audit_pipe"); /* @@ -626,6 +626,7 @@ audit_pipe_free(struct audit_pipe *ap) audit_pipe_preselect_flush_locked(ap); audit_pipe_flush(ap); cv_destroy(&ap->ap_cv); + AUDIT_PIPE_SX_LOCK_DESTROY(ap); AUDIT_PIPE_LOCK_DESTROY(ap); knlist_destroy(&ap->ap_selinfo.si_note); TAILQ_REMOVE(&audit_pipe_list, ap, ap_list); @@ -754,7 +755,8 @@ audit_pipe_ioctl(struct cdev *dev, u_lon AUDIT_PIPE_LOCK(ap); if (TAILQ_FIRST(&ap->ap_queue) != NULL) *(int *)data = - TAILQ_FIRST(&ap->ap_queue)->ape_record_len; + TAILQ_FIRST(&ap->ap_queue)->ape_record_len - + TAILQ_FIRST(&ap->ap_queue)->ape_record_offset; else *(int *)data = 0; AUDIT_PIPE_UNLOCK(ap); @@ -888,9 +890,12 @@ audit_pipe_ioctl(struct cdev *dev, u_lon break; case AUDITPIPE_FLUSH: + if (AUDIT_PIPE_SX_XLOCK_SIG(ap) != 0) + return (EINTR); AUDIT_PIPE_LOCK(ap); audit_pipe_flush(ap); AUDIT_PIPE_UNLOCK(ap); + AUDIT_PIPE_SX_XUNLOCK(ap); error = 0; break; @@ -945,45 +950,68 @@ audit_pipe_read(struct cdev *dev, struct { struct audit_pipe_entry *ape; struct audit_pipe *ap; + u_int toread; int error; ap = dev->si_drv1; KASSERT(ap != NULL, ("audit_pipe_read: ap == NULL")); + /* + * We hold an sx(9) lock over read and flush because we rely on the + * stability of a record in the queue during uiomove(9). + */ + if (AUDIT_PIPE_SX_XLOCK_SIG(ap) != 0) + return (EINTR); AUDIT_PIPE_LOCK(ap); - do { - /* - * Wait for a record that fits into the read buffer, dropping - * records that would be truncated if actually passed to the - * process. This helps maintain the discreet record read - * interface. - */ - while ((ape = audit_pipe_pop(ap)) == NULL) { - if (ap->ap_flags & AUDIT_PIPE_NBIO) { - AUDIT_PIPE_UNLOCK(ap); - return (EAGAIN); - } - error = cv_wait_sig(&ap->ap_cv, AUDIT_PIPE_MTX(ap)); - if (error) { - AUDIT_PIPE_UNLOCK(ap); - return (error); - } + while (TAILQ_EMPTY(&ap->ap_queue)) { + if (ap->ap_flags & AUDIT_PIPE_NBIO) { + AUDIT_PIPE_UNLOCK(ap); + AUDIT_PIPE_SX_XUNLOCK(ap); + return (EAGAIN); } - if (ape->ape_record_len <= uio->uio_resid) - break; - audit_pipe_entry_free(ape); - ap->ap_truncates++; - } while (1); + error = cv_wait_sig(&ap->ap_cv, AUDIT_PIPE_MTX(ap)); + if (error) { + AUDIT_PIPE_UNLOCK(ap); + AUDIT_PIPE_SX_XUNLOCK(ap); + return (error); + } + } + + /* + * Copy as many remaining bytes from the current record to userspace + * as we can. + * + * Note: we rely on the SX lock to maintain ape's stability here. + */ ap->ap_reads++; + ape = TAILQ_FIRST(&ap->ap_queue); + toread = MIN(ape->ape_record_len - ape->ape_record_offset, + uio->uio_resid); AUDIT_PIPE_UNLOCK(ap); + error = uiomove((char *)ape->ape_record + ape->ape_record_offset, + toread, uio); + if (error) { + AUDIT_PIPE_SX_XUNLOCK(ap); + return (error); + } /* - * Now read record to user space memory. Even if the read is short, - * we abandon the remainder of the record, supporting only discreet - * record reads. + * If the copy succeeded, update book-keeping, and if no bytes remain + * in the current record, free it. */ - error = uiomove(ape->ape_record, ape->ape_record_len, uio); - audit_pipe_entry_free(ape); + AUDIT_PIPE_LOCK(ap); + KASSERT(TAILQ_FIRST(&ap->ap_queue) == ape, + ("audit_pipe_read: queue out of sync after uiomove")); + ape->ape_record_offset += toread; + if (ape->ape_record_offset == ape->ape_record_len) { + TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); + ap->ap_qlen--; + } else + ape = NULL; + AUDIT_PIPE_UNLOCK(ap); + AUDIT_PIPE_SX_XUNLOCK(ap); + if (ape != NULL) + audit_pipe_entry_free(ape); return (error); } @@ -1052,7 +1080,7 @@ audit_pipe_kqread(struct knote *kn, long ape = TAILQ_FIRST(&ap->ap_queue); KASSERT(ape != NULL, ("audit_pipe_kqread: ape == NULL")); - kn->kn_data = ape->ape_record_len; + kn->kn_data = ape->ape_record_len - ape->ape_record_offset; return (1); } else { kn->kn_data = 0; From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 14:47:15 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA1B91065696; Fri, 31 Oct 2008 14:47:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B6FBE8FC24; Fri, 31 Oct 2008 14:47:15 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VElF0u083251; Fri, 31 Oct 2008 14:47:15 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VElFtp083250; Fri, 31 Oct 2008 14:47:15 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810311447.m9VElFtp083250@svn.freebsd.org> From: Robert Watson Date: Fri, 31 Oct 2008 14:47:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184509 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 14:47:15 -0000 Author: rwatson Date: Fri Oct 31 14:47:15 2008 New Revision: 184509 URL: http://svn.freebsd.org/changeset/base/184509 Log: In style(9) examples of err() and errx(), use sysexits(3) errors rather than returning 1. Submitted by: Bruce Cran MFC after: 3 days Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Fri Oct 31 14:40:21 2008 (r184508) +++ head/share/man/man9/style.9 Fri Oct 31 14:47:15 2008 (r184509) @@ -716,9 +716,9 @@ or do not roll your own. .Bd -literal if ((four = malloc(sizeof(struct foo))) == NULL) - err(1, (char *)NULL); + err(EX_OSERR, NULL); if ((six = (int *)overflow()) == NULL) - errx(1, "number overflowed"); + errx(EX_DATAERR, "number overflowed"); return (eight); } .Ed From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 15:11:01 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88864106564A; Fri, 31 Oct 2008 15:11:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74FDF8FC21; Fri, 31 Oct 2008 15:11:01 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VFB1Mk083691; Fri, 31 Oct 2008 15:11:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VFB1GG083690; Fri, 31 Oct 2008 15:11:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810311511.m9VFB1GG083690@svn.freebsd.org> From: Robert Watson Date: Fri, 31 Oct 2008 15:11:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184510 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 15:11:01 -0000 Author: rwatson Date: Fri Oct 31 15:11:01 2008 New Revision: 184510 URL: http://svn.freebsd.org/changeset/base/184510 Log: Since there is no longer the opportunity for record truncation, just return 0 if the truncation counter is queried on an audit pipe. MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Fri Oct 31 14:47:15 2008 (r184509) +++ head/sys/security/audit/audit_pipe.c Fri Oct 31 15:11:01 2008 (r184510) @@ -144,7 +144,6 @@ struct audit_pipe { u_int64_t ap_inserts; /* Records added. */ u_int64_t ap_reads; /* Records read. */ u_int64_t ap_drops; /* Records dropped. */ - u_int64_t ap_truncates; /* Records too long. */ /* * Fields relating to pipe interest: global masks for unmatched @@ -920,7 +919,7 @@ audit_pipe_ioctl(struct cdev *dev, u_lon break; case AUDITPIPE_GET_TRUNCATES: - *(u_int *)data = ap->ap_truncates; + *(u_int *)data = 0; error = 0; break; From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 15:14:41 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 70B0810656D3; Fri, 31 Oct 2008 15:14:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 223E18FC1B; Fri, 31 Oct 2008 15:14:41 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VFEfmq083786; Fri, 31 Oct 2008 15:14:41 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VFEfi9083785; Fri, 31 Oct 2008 15:14:41 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200810311514.m9VFEfi9083785@svn.freebsd.org> From: Robert Watson Date: Fri, 31 Oct 2008 15:14:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184511 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 15:14:41 -0000 Author: rwatson Date: Fri Oct 31 15:14:40 2008 New Revision: 184511 URL: http://svn.freebsd.org/changeset/base/184511 Log: In example use of err(3) and errx(3), use sysexits(3) constants. MFC after: 3 days Submitted by: Bruce Cran Modified: head/lib/libc/gen/err.3 Modified: head/lib/libc/gen/err.3 ============================================================================== --- head/lib/libc/gen/err.3 Fri Oct 31 15:11:01 2008 (r184510) +++ head/lib/libc/gen/err.3 Fri Oct 31 15:14:40 2008 (r184511) @@ -178,15 +178,16 @@ or a null pointer Display the current errno information string and exit: .Bd -literal -offset indent if ((p = malloc(size)) == NULL) - err(1, NULL); + err(EX_OSERR, NULL); if ((fd = open(file_name, O_RDONLY, 0)) == -1) - err(1, "%s", file_name); + err(EX_NOINPUT, "%s", file_name); .Ed .Pp Display an error message and exit: .Bd -literal -offset indent if (tm.tm_hour < START_TIME) - errx(1, "too early, wait until %s", start_time_string); + errx(EX_DATAERR, "too early, wait until %s", + start_time_string); .Ed .Pp Warn of an error: @@ -195,7 +196,7 @@ if ((fd = open(raw_device, O_RDONLY, 0)) warnx("%s: %s: trying the block device", raw_device, strerror(errno)); if ((fd = open(block_device, O_RDONLY, 0)) == -1) - err(1, "%s", block_device); + err(EX_OSFILE, "%s", block_device); .Ed .Pp Warn of an error without using the global variable From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 15:56:38 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5DFF11065678; Fri, 31 Oct 2008 15:56:38 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4B10C8FC68; Fri, 31 Oct 2008 15:56:38 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VFuchS084543; Fri, 31 Oct 2008 15:56:38 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VFucC7084542; Fri, 31 Oct 2008 15:56:38 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200810311556.m9VFucC7084542@svn.freebsd.org> From: Ken Smith Date: Fri, 31 Oct 2008 15:56:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org X-SVN-Group: releng MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184512 - releng/6.4/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 15:56:38 -0000 Author: kensmith Date: Fri Oct 31 15:56:38 2008 New Revision: 184512 URL: http://svn.freebsd.org/changeset/base/184512 Log: Prepare for the 6.4-RC2 builds. Approved by: re (implicit) Modified: releng/6.4/sys/conf/newvers.sh Modified: releng/6.4/sys/conf/newvers.sh ============================================================================== --- releng/6.4/sys/conf/newvers.sh Fri Oct 31 15:14:40 2008 (r184511) +++ releng/6.4/sys/conf/newvers.sh Fri Oct 31 15:56:38 2008 (r184512) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="6.4" -BRANCH="RC1" +BRANCH="RC2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 23:24:14 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88E011065670; Fri, 31 Oct 2008 23:24:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 77DBD8FC13; Fri, 31 Oct 2008 23:24:14 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9VNOE4u093400; Fri, 31 Oct 2008 23:24:14 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9VNOE88093395; Fri, 31 Oct 2008 23:24:14 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200810312324.m9VNOE88093395@svn.freebsd.org> From: Warner Losh Date: Fri, 31 Oct 2008 23:24:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184515 - in head/sys: conf modules/rl pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 23:24:14 -0000 Author: imp Date: Fri Oct 31 23:24:13 2008 New Revision: 184515 URL: http://svn.freebsd.org/changeset/base/184515 Log: Add RL_TWISTER_ENABLE option. This enables the magic bits to do long cable tuning. This has helped in some installations for hardware deployed by a former employer. Made optional because the lists aren't full of complaints about these cards... even when they were wildly popular. Reviewed by: attilio@, jhb@, trhodes@ (all an older version of the patch) Modified: head/sys/conf/options head/sys/modules/rl/Makefile head/sys/pci/if_rl.c head/sys/pci/if_rlreg.h Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Fri Oct 31 18:40:35 2008 (r184514) +++ head/sys/conf/options Fri Oct 31 23:24:13 2008 (r184515) @@ -672,6 +672,9 @@ ED_SIC opt_ed.h # bce driver BCE_DEBUG opt_bce.h +# rl driver +RL_TWISTER_ENABLE opt_rl.h + SOCKBUF_DEBUG opt_global.h # options for ubsec driver Modified: head/sys/modules/rl/Makefile ============================================================================== --- head/sys/modules/rl/Makefile Fri Oct 31 18:40:35 2008 (r184514) +++ head/sys/modules/rl/Makefile Fri Oct 31 23:24:13 2008 (r184515) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../pci KMOD= if_rl -SRCS= if_rl.c device_if.h bus_if.h pci_if.h +SRCS= if_rl.c device_if.h bus_if.h pci_if.h opt_rl.h SRCS+= miibus_if.h .include Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Fri Oct 31 18:40:35 2008 (r184514) +++ head/sys/pci/if_rl.c Fri Oct 31 23:24:13 2008 (r184515) @@ -85,6 +85,7 @@ __FBSDID("$FreeBSD$"); #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" +#include "opt_rl.h" #endif #include @@ -1383,19 +1384,143 @@ rl_txeof(struct rl_softc *sc) sc->rl_watchdog_timer = 0; } +#ifdef RL_TWISTER_ENABLE +static void +rl_twister_update(struct rl_softc *sc) +{ + uint16_t linktest; + /* + * Table provided by RealTek (Kinston ) for + * Linux driver. Values undocumented otherwise. + */ + static const uint32_t param[4][4] = { + {0xcb39de43, 0xcb39ce43, 0xfb38de03, 0xcb38de43}, + {0xcb39de43, 0xcb39ce43, 0xcb39ce83, 0xcb39ce83}, + {0xcb39de43, 0xcb39ce43, 0xcb39ce83, 0xcb39ce83}, + {0xbb39de43, 0xbb39ce43, 0xbb39ce83, 0xbb39ce83} + }; + + /* + * Tune the so-called twister registers of the RTL8139. These + * are used to compensate for impendence mismatches. The + * method for tuning these registes is undocumented and the + * following proceedure is collected from public sources. + */ + switch (sc->rl_twister) + { + case CHK_LINK: + /* + * If we have a sufficent link, then we can proceed in + * the state machine to the next stage. If not, then + * disable further tuning after writing sane defaults. + */ + if (CSR_READ_2(sc, RL_CSCFG) & RL_CSCFG_LINK_OK) { + CSR_WRITE_2(sc, RL_CSCFG, RL_CSCFG_LINK_DOWN_OFF_CMD); + sc->rl_twister = FIND_ROW; + } else { + CSR_WRITE_2(sc, RL_CSCFG, RL_CSCFG_LINK_DOWN_CMD); + CSR_WRITE_4(sc, RL_NWAYTST, RL_NWAYTST_CBL_TEST); + CSR_WRITE_4(sc, RL_PARA78, RL_PARA78_DEF); + CSR_WRITE_4(sc, RL_PARA7C, RL_PARA7C_DEF); + sc->rl_twister = DONE; + } + break; + case FIND_ROW: + /* + * Read how long it took to see the echo to find the tuning + * row to use. + */ + linktest = CSR_READ_2(sc, RL_CSCFG) & RL_CSCFG_STATUS; + if (linktest == RL_CSCFG_ROW3) + sc->rl_twist_row = 3; + else if (linktest == RL_CSCFG_ROW2) + sc->rl_twist_row = 2; + else if (linktest == RL_CSCFG_ROW1) + sc->rl_twist_row = 1; + else + sc->rl_twist_row = 0; + sc->rl_twist_col = 0; + sc->rl_twister = SET_PARAM; + break; + case SET_PARAM: + if (sc->rl_twist_col == 0) + CSR_WRITE_4(sc, RL_NWAYTST, RL_NWAYTST_RESET); + CSR_WRITE_4(sc, RL_PARA7C, + param[sc->rl_twist_row][sc->rl_twist_col]); + if (++sc->rl_twist_col == 4) { + if (sc->rl_twist_row == 3) + sc->rl_twister = RECHK_LONG; + else + sc->rl_twister = DONE; + } + break; + case RECHK_LONG: + /* + * For long cables, we have to double check to make sure we + * don't mistune. + */ + linktest = CSR_READ_2(sc, RL_CSCFG) & RL_CSCFG_STATUS; + if (linktest == RL_CSCFG_ROW3) + sc->rl_twister = DONE; + else { + CSR_WRITE_4(sc, RL_PARA7C, RL_PARA7C_RETUNE); + sc->rl_twister = RETUNE; + } + break; + case RETUNE: + /* Retune for a shorter cable (try column 2) */ + CSR_WRITE_4(sc, RL_NWAYTST, RL_NWAYTST_CBL_TEST); + CSR_WRITE_4(sc, RL_PARA78, RL_PARA78_DEF); + CSR_WRITE_4(sc, RL_PARA7C, RL_PARA7C_DEF); + CSR_WRITE_4(sc, RL_NWAYTST, RL_NWAYTST_RESET); + sc->rl_twist_row--; + sc->rl_twist_col = 0; + sc->rl_twister = SET_PARAM; + break; + + case DONE: + break; + } + +} +#endif + static void rl_tick(void *xsc) { struct rl_softc *sc = xsc; struct mii_data *mii; + int ticks; RL_LOCK_ASSERT(sc); + /* + * If we're doing the twister cable calibration, then we need to defer + * watchdog timeouts. This is a no-op in normal operations, but + * can falsely trigger when the cable calibration takes a while and + * there was traffic ready to go when rl was started. + * + * We don't defer mii_tick since that updates the mii status, which + * helps the twister process, at least according to similar patches + * for the Linux driver I found online while doing the fixes. Worst + * case is a few extra mii reads during calibration. + */ mii = device_get_softc(sc->rl_miibus); mii_tick(mii); - +#ifdef RL_TWISTER_ENABLE + if (sc->rl_twister == DONE) + rl_watchdog(sc); + else + rl_twister_update(sc); + if (sc->rl_twister == DONE) + ticks = hz; + else + ticks = hz / 10; +#else rl_watchdog(sc); + ticks = hz; +#endif - callout_reset(&sc->rl_stat_callout, hz, rl_tick, sc); + callout_reset(&sc->rl_stat_callout, ticks, rl_tick, sc); } #ifdef DEVICE_POLLING @@ -1643,6 +1768,14 @@ rl_init_locked(struct rl_softc *sc) rl_stop(sc); rl_reset(sc); +#ifdef RL_TWISTER_ENABLE + /* + * Reset twister register tuning state. The twister registers + * and their tuning are undocumented, but are necessary to cope + * with bad links. rl_twister = DONE here will disable this entirely. + */ + sc->rl_twister = CHK_LINK; +#endif /* * Init our MAC address. Even though the chipset Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Fri Oct 31 18:40:35 2008 (r184514) +++ head/sys/pci/if_rlreg.h Fri Oct 31 23:24:13 2008 (r184515) @@ -309,6 +309,27 @@ #define RL_CMD_RESET 0x0010 /* + * Twister register values. These are completely undocumented and derived + * from public sources. + */ +#define RL_CSCFG_LINK_OK 0x0400 +#define RL_CSCFG_CHANGE 0x0800 +#define RL_CSCFG_STATUS 0xf000 +#define RL_CSCFG_ROW3 0x7000 +#define RL_CSCFG_ROW2 0x3000 +#define RL_CSCFG_ROW1 0x1000 +#define RL_CSCFG_LINK_DOWN_OFF_CMD 0x03c0 +#define RL_CSCFG_LINK_DOWN_CMD 0xf3c0 + +#define RL_NWAYTST_RESET 0 +#define RL_NWAYTST_CBL_TEST 0x20 + +#define RL_PARA78 0x78 +#define RL_PARA78_DEF 0x78fa8388 +#define RL_PARA7C 0x7C +#define RL_PARA7C_DEF 0xcb38de43 +#define RL_PARA7C_RETUNE 0xfb38de03 +/* * EEPROM control register */ #define RL_EE_DATAOUT 0x01 /* Data out */ @@ -809,6 +830,10 @@ struct rl_list_data { bus_addr_t rl_tx_list_addr; }; +#ifdef RL_TWISTER_ENABLE +enum rl_twist { DONE, CHK_LINK, FIND_ROW, SET_PARAM, RECHK_LONG, RETUNE }; +#endif + struct rl_softc { struct ifnet *rl_ifp; /* interface info */ bus_space_handle_t rl_bhandle; /* bus space handle */ @@ -837,6 +862,11 @@ struct rl_softc { uint32_t rl_rxlenmask; int rl_testmode; int rl_if_flags; +#ifdef RL_TWISTER_ENABLE + enum rl_twist rl_twister; + int rl_twist_row; + int rl_twist_col; +#endif int suspended; /* 0 = normal 1 = suspended */ #ifdef DEVICE_POLLING int rxcycles; From owner-svn-src-all@FreeBSD.ORG Fri Oct 31 23:28:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 503621065672; Fri, 31 Oct 2008 23:28:09 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 22FA28FC0A; Fri, 31 Oct 2008 23:28:09 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id B924718A411; Fri, 31 Oct 2008 19:28:08 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Fri, 31 Oct 2008 19:28:08 -0400 X-Sasl-enc: gZb7Uu+IHVwraZC2l7ywcCIHpBmL/pgUd2X9vktgH/yn 1225495688 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id E6C9512D21; Fri, 31 Oct 2008 19:28:07 -0400 (EDT) Message-ID: <490B9486.60204@FreeBSD.org> Date: Fri, 31 Oct 2008 23:28:06 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: Warner Losh References: <200810312324.m9VNOE88093395@svn.freebsd.org> In-Reply-To: <200810312324.m9VNOE88093395@svn.freebsd.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184515 - in head/sys: conf modules/rl pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 31 Oct 2008 23:28:09 -0000 This stuff is absolutely crazy, but I'm glad you checked it in. From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 00:28:44 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFCFA1065675; Sat, 1 Nov 2008 00:28:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9EA808FC18; Sat, 1 Nov 2008 00:28:44 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA10SiF8094559; Sat, 1 Nov 2008 00:28:44 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA10SilF094558; Sat, 1 Nov 2008 00:28:44 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200811010028.mA10SilF094558@svn.freebsd.org> From: Warner Losh Date: Sat, 1 Nov 2008 00:28:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184516 - head/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 00:28:44 -0000 Author: imp Date: Sat Nov 1 00:28:44 2008 New Revision: 184516 URL: http://svn.freebsd.org/changeset/base/184516 Log: Add RL_TWISTER_ENABLE. Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Fri Oct 31 23:24:13 2008 (r184515) +++ head/sys/conf/NOTES Sat Nov 1 00:28:44 2008 (r184516) @@ -1875,6 +1875,7 @@ device my # Myson Fast Ethernet (MTD80 device nge # NatSemi DP83820 gigabit Ethernet device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 +options RL_TWISTER_ENABLE # Enable long cable compensation code device pcn # AMD Am79C97x PCI 10/100 NICs device sf # Adaptec AIC-6915 (``Starfire'') device sis # Silicon Integrated Systems SiS 900/SiS 7016 From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 00:50:26 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 585CE106564A for ; Sat, 1 Nov 2008 00:50:26 +0000 (UTC) (envelope-from bf2006a@yahoo.com) Received: from web39101.mail.mud.yahoo.com (web39101.mail.mud.yahoo.com [209.191.86.252]) by mx1.freebsd.org (Postfix) with SMTP id 1C9D98FC0A for ; Sat, 1 Nov 2008 00:50:26 +0000 (UTC) (envelope-from bf2006a@yahoo.com) Received: (qmail 33259 invoked by uid 60001); 1 Nov 2008 00:23:45 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:MIME-Version:Content-Type:Message-ID; b=aegigCRjRxeVjv7uXSZ91drylMiZBCtjnJX1RtkCfMQNyqAHhjbw2q83OiaCkiFWMYg+jMwchVOEa5HVX64nVISfanenjh9vTMpHbhz3arApBSD5BsiD2/Jbb4pBn9JUOOOJMfX601CaIyXFckn2nGoyz5wuAD3jmloxZrBrZvg=; X-YMail-OSG: XOoN3K4VM1mb.Ze9W6SljEhzySdaa2JTTumpPC.gQRMxeg6cbS9aImbMz58eu8U44w-- Received: from [78.46.181.233] by web39101.mail.mud.yahoo.com via HTTP; Fri, 31 Oct 2008 17:23:44 PDT X-Mailer: YahooMailWebService/0.7.247.3 Date: Fri, 31 Oct 2008 17:23:44 -0700 (PDT) From: bf To: svn-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1534996381-1225499024=:32703" Message-ID: <953385.32703.qm@web39101.mail.mud.yahoo.com> Cc: imp@FreeBSD.org Subject: Re: svn commit: r184515 - in head/sys: conf modules/rl pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 00:50:26 -0000 --0-1534996381-1225499024=:32703 Content-Type: text/plain; charset=us-ascii Thanks. Possibly misleading spelling errors are accumulating, though... Some fixed in attached patch. Regards, b. --0-1534996381-1225499024=:32703 Content-Type: application/octet-stream; name="if_rl.c.diff" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="if_rl.c.diff" LS0tIGlmX3JsLmMub3JpZwkyMDA4LTEwLTMxIDIwOjA0OjIzLjE4ODMyNDI1 OCAtMDQwMAorKysgaWZfcmwuYwkyMDA4LTEwLTMxIDIwOjE0OjA1LjEyMjcx NTA4MSAtMDQwMApAQCAtMTU2LDcgKzE1Niw3IEBACiAJeyBERUxUQV9WRU5E T1JJRCwgREVMVEFfREVWSUNFSURfODEzOSwgUkxfODEzOSwKIAkJIkRlbHRh IEVsZWN0cm9uaWNzIDgxMzkgMTAvMTAwQmFzZVRYIiB9LAogCXsgQUREVFJP Tl9WRU5ET1JJRCwgQUREVFJPTl9ERVZJQ0VJRF84MTM5LCBSTF84MTM5LAot CQkiQWRkdHJvbiBUZWNobm9sZ3kgODEzOSAxMC8xMDBCYXNlVFgiIH0sCisJ CSJBZGR0cm9uIFRlY2hub2xvZ3kgODEzOSAxMC8xMDBCYXNlVFgiIH0sCiAJ eyBETElOS19WRU5ET1JJRCwgRExJTktfREVWSUNFSURfNTMwVFhQTFVTLCBS TF84MTM5LAogCQkiRC1MaW5rIERGRS01MzBUWCsgMTAvMTAwQmFzZVRYIiB9 LAogCXsgRExJTktfVkVORE9SSUQsIERMSU5LX0RFVklDRUlEXzY5MFRYRCwg UkxfODEzOSwKQEAgLTEzMTksNyArMTMxOSw3IEBACiAJCVJMX0xPQ0soc2Mp OwogCX0KIAotCS8qIE5vIG5lZWQgdG8gc3luYyBSeCBtZW1vcnkgYmxvY2sg YXMgd2UgZGlkbid0IG1vZmlmeSBpdC4gKi8KKwkvKiBObyBuZWVkIHRvIHN5 bmMgUnggbWVtb3J5IGJsb2NrIGFzIHdlIGRpZG4ndCBtb2RpZnkgaXQuICov CiB9CiAKIC8qCkBAIC0xNDAyLDE1ICsxNDAyLDE1IEBACiAKIAkvKgogCSAq IFR1bmUgdGhlIHNvLWNhbGxlZCB0d2lzdGVyIHJlZ2lzdGVycyBvZiB0aGUg UlRMODEzOS4gIFRoZXNlCi0JICogYXJlIHVzZWQgdG8gY29tcGVuc2F0ZSBm b3IgaW1wZW5kZW5jZSBtaXNtYXRjaGVzLiAgVGhlCi0JICogbWV0aG9kIGZv ciB0dW5pbmcgdGhlc2UgcmVnaXN0ZXMgaXMgdW5kb2N1bWVudGVkIGFuZCB0 aGUKLQkgKiBmb2xsb3dpbmcgcHJvY2VlZHVyZSBpcyBjb2xsZWN0ZWQgZnJv bSBwdWJsaWMgc291cmNlcy4KKwkgKiBhcmUgdXNlZCB0byBjb21wZW5zYXRl IGZvciBpbXBlZGFuY2UgbWlzbWF0Y2hlcy4gIFRoZQorCSAqIG1ldGhvZCBm b3IgdHVuaW5nIHRoZXNlIHJlZ2lzdGVycyBpcyB1bmRvY3VtZW50ZWQgYW5k IHRoZQorCSAqIGZvbGxvd2luZyBwcm9jZWR1cmUgaXMgY29sbGVjdGVkIGZy b20gcHVibGljIHNvdXJjZXMuCiAJICovCiAJc3dpdGNoIChzYy0+cmxfdHdp c3RlcikKIAl7CiAJY2FzZSBDSEtfTElOSzoKIAkJLyoKLQkJICogSWYgd2Ug aGF2ZSBhIHN1ZmZpY2VudCBsaW5rLCB0aGVuIHdlIGNhbiBwcm9jZWVkIGlu CisJCSAqIElmIHdlIGhhdmUgYSBzdWZmaWNpZW50IGxpbmssIHRoZW4gd2Ug Y2FuIHByb2NlZWQgaW4KIAkJICogdGhlIHN0YXRlIG1hY2hpbmUgdG8gdGhl IG5leHQgc3RhZ2UuICBJZiBub3QsIHRoZW4KIAkJICogZGlzYWJsZSBmdXJ0 aGVyIHR1bmluZyBhZnRlciB3cml0aW5nIHNhbmUgZGVmYXVsdHMuCiAJCSAq LwpAQCAtMTY0OSw3ICsxNjQ5LDcgQEAKIAogCWlmIChwYWRsZW4gPiAwKSB7 CiAJCS8qCi0JCSAqIE1ha2Ugc2VjdXJpdHkgY29uY2lvdXMgcGVvcGxlIGhh cHB5OiB6ZXJvIG91dCB0aGUKKwkJICogTWFrZSBzZWN1cml0eS1jb25zY2lv dXMgcGVvcGxlIGhhcHB5OiB6ZXJvIG91dCB0aGUKIAkJICogYnl0ZXMgaW4g dGhlIHBhZCBhcmVhLCBzaW5jZSB3ZSBkb24ndCBrbm93IHdoYXQKIAkJICog dGhpcyBtYnVmIGNsdXN0ZXIgYnVmZmVyJ3MgcHJldmlvdXMgdXNlciBtaWdo dAogCQkgKiBoYXZlIGxlZnQgaW4gaXQuCg== --0-1534996381-1225499024=:32703-- From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 06:48:28 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BB62E1065676; Sat, 1 Nov 2008 06:48:28 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9DE88FC0A; Sat, 1 Nov 2008 06:48:28 +0000 (UTC) (envelope-from maxim@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA16mSXO001527; Sat, 1 Nov 2008 06:48:28 GMT (envelope-from maxim@svn.freebsd.org) Received: (from maxim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA16mSOA001526; Sat, 1 Nov 2008 06:48:28 GMT (envelope-from maxim@svn.freebsd.org) Message-Id: <200811010648.mA16mSOA001526@svn.freebsd.org> From: Maxim Konovalov Date: Sat, 1 Nov 2008 06:48:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184517 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 06:48:28 -0000 Author: maxim Date: Sat Nov 1 06:48:28 2008 New Revision: 184517 URL: http://svn.freebsd.org/changeset/base/184517 Log: o OpenBSD 4.4 added. Modified: head/share/misc/bsd-family-tree Modified: head/share/misc/bsd-family-tree ============================================================================== --- head/share/misc/bsd-family-tree Sat Nov 1 00:28:44 2008 (r184516) +++ head/share/misc/bsd-family-tree Sat Nov 1 06:48:28 2008 (r184517) @@ -222,6 +222,7 @@ FreeBSD 5.2 | | | 7.0 | | | | | | | | OpenBSD 4.3 | | V | | | DragonFly 2.0.0 + | | | OpenBSD 4.4 | | | | | | FreeBSD 8 -current | NetBSD -current OpenBSD -current | | | | | | @@ -486,6 +487,7 @@ DragonFly 1.12.0 2008-02-26 [DFB] FreeBSD 7.0 2008-02-27 [FBD] OpenBSD 4.3 2008-05-01 [OBD] DragonFly 2.0.0 2008-07-21 [DFB] +OpenBSD 4.4 2008-11-01 [OBD] Bibliography ------------------------ From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 07:12:01 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BC8A01065688; Sat, 1 Nov 2008 07:12:01 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from smtp-vbr4.xs4all.nl (smtp-vbr4.xs4all.nl [194.109.24.24]) by mx1.freebsd.org (Postfix) with ESMTP id 503D08FC18; Sat, 1 Nov 2008 07:12:01 +0000 (UTC) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (freebie.xs4all.nl [82.95.250.254]) by smtp-vbr4.xs4all.nl (8.13.8/8.13.8) with ESMTP id mA16rp1m047968; Sat, 1 Nov 2008 07:53:52 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: from freebie.xs4all.nl (localhost [127.0.0.1]) by freebie.xs4all.nl (8.14.2/8.14.2) with ESMTP id mA16rpL9001283; Sat, 1 Nov 2008 07:53:51 +0100 (CET) (envelope-from wb@freebie.xs4all.nl) Received: (from wb@localhost) by freebie.xs4all.nl (8.14.2/8.14.2/Submit) id mA16roYg001282; Sat, 1 Nov 2008 07:53:50 +0100 (CET) (envelope-from wb) Date: Sat, 1 Nov 2008 07:53:50 +0100 From: Wilko Bulte To: "Bruce M. Simpson" Message-ID: <20081101065350.GA1270@freebie.xs4all.nl> References: <200810312324.m9VNOE88093395@svn.freebsd.org> <490B9486.60204@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <490B9486.60204@FreeBSD.org> User-Agent: Mutt/1.5.16 (2007-06-09) X-Virus-Scanned: by XS4ALL Virus Scanner Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Warner Losh Subject: Re: svn commit: r184515 - in head/sys: conf modules/rl pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 07:12:01 -0000 Quoting Bruce M. Simpson, who wrote on Fri, Oct 31, 2008 at 11:28:06PM +0000 .. > This stuff is absolutely crazy, but I'm glad you checked it in. /* you are not expected to understand this */ From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 08:07:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA809106568B; Sat, 1 Nov 2008 08:07:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C8C238FC17; Sat, 1 Nov 2008 08:07:02 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1872Ic002942; Sat, 1 Nov 2008 08:07:02 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA18725C002941; Sat, 1 Nov 2008 08:07:02 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811010807.mA18725C002941@svn.freebsd.org> From: Ed Schouten Date: Sat, 1 Nov 2008 08:07:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184520 - head/sys/dev/adb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 08:07:03 -0000 Author: ed Date: Sat Nov 1 08:07:02 2008 New Revision: 184520 URL: http://svn.freebsd.org/changeset/base/184520 Log: Allow a read() on /dev/ams[0-9] to be interrupted. Right now ams_read() uses cv_wait() to wait for new data to arrive on the mouse device. This means that when you run `cat /dev/ams0', it cannot be interrupted directly. After you press ^C, you first need to move the mouse before cat will quit. Make this function use cv_wait_sig(), which allows it to be interrupted directly. Reviewed by: nwhitehorn Modified: head/sys/dev/adb/adb_mouse.c Modified: head/sys/dev/adb/adb_mouse.c ============================================================================== --- head/sys/dev/adb/adb_mouse.c Sat Nov 1 06:57:59 2008 (r184519) +++ head/sys/dev/adb/adb_mouse.c Sat Nov 1 08:07:02 2008 (r184520) @@ -382,6 +382,7 @@ ams_read(struct cdev *dev, struct uio *u struct adb_mouse_softc *sc; size_t len; int8_t outpacket[8]; + int error; sc = CDEV_GET_SOFTC(dev); if (sc == NULL) @@ -403,7 +404,11 @@ ams_read(struct cdev *dev, struct uio *u /* Otherwise, block on new data */ - cv_wait(&sc->sc_cv,&sc->sc_mtx); + error = cv_wait_sig(&sc->sc_cv, &sc->sc_mtx); + if (error) { + mtx_unlock(&sc->sc_mtx); + return (error); + } } sc->packet[0] = 1 << 7; From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 08:35:29 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 412921065680; Sat, 1 Nov 2008 08:35:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2DE2C8FC08; Sat, 1 Nov 2008 08:35:29 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA18ZSS8003535; Sat, 1 Nov 2008 08:35:28 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA18ZSrZ003531; Sat, 1 Nov 2008 08:35:28 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811010835.mA18ZSrZ003531@svn.freebsd.org> From: Ed Schouten Date: Sat, 1 Nov 2008 08:35:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184521 - in head/sys: conf kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 08:35:29 -0000 Author: ed Date: Sat Nov 1 08:35:28 2008 New Revision: 184521 URL: http://svn.freebsd.org/changeset/base/184521 Log: Reimplement the /dev/console device node. One of the pieces of code that I had left alone during the development of the MPSAFE TTY layer, was tty_cons.c. This file actually has two different functions: - It contains low-level console input/output routines (cnputc(), etc). - It creates /dev/console and wraps all its cdevsw calls to the appropriate TTY. This commit reimplements the second set of functions by moving it directly into the TTY layer. /dev/console is now a character device node that's basically a regular TTY, but does a lookup of `si_drv1' each time you open it. d_write has also been changed to call log_console(). d_close() is not present, because we must make sure we don't revoke the TTY after writing a log message to it. Even though I'm not convinced this is in line with the future directions of our console code, it is a good move for now. It removes recursive locking from the top half of the TTY layer. The previous implementation called into the TTY layer with Giant held. I'm renaming tty_cons.c to kern_cons.c now. The code hardly contains any TTY related bits, so we'd better give it a less misleading name. Tested by: Andrzej Tobola , Carlos A.M. dos Santos , Eygene Ryabinkin Added: head/sys/kern/kern_cons.c (contents, props changed) - copied, changed from r184520, head/sys/kern/tty_cons.c Deleted: head/sys/kern/tty_cons.c Modified: head/sys/conf/files head/sys/kern/tty.c head/sys/sys/tty.h Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Nov 1 08:07:02 2008 (r184520) +++ head/sys/conf/files Sat Nov 1 08:35:28 2008 (r184521) @@ -1596,6 +1596,7 @@ kern/kern_alq.c optional alq kern/kern_clock.c standard kern/kern_condvar.c standard kern/kern_conf.c standard +kern/kern_cons.c standard kern/kern_cpu.c standard kern/kern_cpuset.c standard kern/kern_context.c standard @@ -1708,7 +1709,6 @@ kern/sysv_sem.c optional sysvsem kern/sysv_shm.c optional sysvshm kern/tty.c standard kern/tty_compat.c optional compat_43tty -kern/tty_cons.c standard kern/tty_info.c standard kern/tty_inq.c standard kern/tty_outq.c standard Copied and modified: head/sys/kern/kern_cons.c (from r184520, head/sys/kern/tty_cons.c) ============================================================================== --- head/sys/kern/tty_cons.c Sat Nov 1 08:07:02 2008 (r184520, copy source) +++ head/sys/kern/kern_cons.c Sat Nov 1 08:35:28 2008 (r184521) @@ -68,30 +68,8 @@ __FBSDID("$FreeBSD$"); static MALLOC_DEFINE(M_TTYCONS, "tty console", "tty console handling"); -static d_open_t cnopen; -static d_close_t cnclose; -static d_read_t cnread; -static d_write_t cnwrite; -static d_ioctl_t cnioctl; -static d_poll_t cnpoll; -static d_kqfilter_t cnkqfilter; - -static struct cdevsw cn_cdevsw = { - .d_version = D_VERSION, - .d_open = cnopen, - .d_close = cnclose, - .d_read = cnread, - .d_write = cnwrite, - .d_ioctl = cnioctl, - .d_poll = cnpoll, - .d_name = "console", - .d_flags = D_TTY | D_NEEDGIANT, - .d_kqfilter = cnkqfilter, -}; - struct cn_device { STAILQ_ENTRY(cn_device) cnd_next; - struct vnode *cnd_vp; struct consdev *cnd_cn; }; @@ -101,22 +79,12 @@ static struct cn_device cn_devtab[CNDEVT static STAILQ_HEAD(, cn_device) cn_devlist = STAILQ_HEAD_INITIALIZER(cn_devlist); -#define CND_INVALID(cnd, td) \ - (cnd == NULL || cnd->cnd_vp == NULL || \ - (cnd->cnd_vp->v_type == VBAD && !cn_devopen(cnd, td, 1))) - -static dev_t cn_udev_t; -SYSCTL_OPAQUE(_machdep, OID_AUTO, consdev, CTLFLAG_RD, - &cn_udev_t, sizeof cn_udev_t, "T,struct cdev *", ""); - int cons_avail_mask = 0; /* Bit mask. Each registered low level console * which is currently unavailable for inpit * (i.e., if it is in graphics mode) will have * this bit cleared. */ static int cn_mute; -static int openflag; /* how /dev/console was opened */ -static int cn_is_open; static char *consbuf; /* buffer used by `consmsgbuf' */ static struct callout conscallout; /* callout for outputting to constty */ struct msgbuf consmsgbuf; /* message buffer for console tty */ @@ -214,6 +182,8 @@ cnadd(struct consdev *cn) printf("WARNING: console at %p has no name\n", cn); } STAILQ_INSERT_TAIL(&cn_devlist, cnd, cnd_next); + if (STAILQ_FIRST(&cn_devlist) == cnd) + ttyconsdev_select(cnd->cnd_cn->cn_name); /* Add device to the active mask. */ cnavailable(cn, (cn->cn_flags & CN_FLAG_NOAVAIL) == 0); @@ -230,10 +200,9 @@ cnremove(struct consdev *cn) STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { if (cnd->cnd_cn != cn) continue; + if (STAILQ_FIRST(&cn_devlist) == cnd) + ttyconsdev_select(NULL); STAILQ_REMOVE(&cn_devlist, cnd, cn_device, cnd_next); - if (cnd->cnd_vp != NULL) - vn_close(cnd->cnd_vp, openflag, NOCRED, NULL); - cnd->cnd_vp = NULL; cnd->cnd_cn = NULL; /* Remove this device from available mask. */ @@ -267,6 +236,7 @@ cnselect(struct consdev *cn) return; STAILQ_REMOVE(&cn_devlist, cnd, cn_device, cnd_next); STAILQ_INSERT_HEAD(&cn_devlist, cnd, cnd_next); + ttyconsdev_select(cnd->cnd_cn->cn_name); return; } } @@ -368,210 +338,12 @@ sysctl_kern_consmute(SYSCTL_HANDLER_ARGS error = sysctl_handle_int(oidp, &cn_mute, 0, req); if (error != 0 || req->newptr == NULL) return (error); - if (ocn_mute && !cn_mute && cn_is_open) - error = cnopen(NULL, openflag, 0, curthread); - else if (!ocn_mute && cn_mute && cn_is_open) { - error = cnclose(NULL, openflag, 0, curthread); - cn_is_open = 1; /* XXX hack */ - } return (error); } SYSCTL_PROC(_kern, OID_AUTO, consmute, CTLTYPE_INT|CTLFLAG_RW, 0, sizeof(cn_mute), sysctl_kern_consmute, "I", ""); -static int -cn_devopen(struct cn_device *cnd, struct thread *td, int forceopen) -{ - char path[CNDEVPATHMAX]; - struct nameidata nd; - struct vnode *vp; - struct cdev *dev; - struct cdevsw *csw; - int error; - - if ((vp = cnd->cnd_vp) != NULL) { - if (!forceopen && vp->v_type != VBAD) { - dev = vp->v_rdev; - csw = dev_refthread(dev); - if (csw == NULL) - return (ENXIO); - error = (*csw->d_open)(dev, openflag, 0, td); - dev_relthread(dev); - return (error); - } - cnd->cnd_vp = NULL; - vn_close(vp, openflag, td->td_ucred, td); - } - snprintf(path, sizeof(path), "/dev/%s", cnd->cnd_cn->cn_name); - NDINIT(&nd, LOOKUP, FOLLOW, UIO_SYSSPACE, path, td); - error = vn_open(&nd, &openflag, 0, NULL); - if (error == 0) { - NDFREE(&nd, NDF_ONLY_PNBUF); - VOP_UNLOCK(nd.ni_vp, 0); - if (nd.ni_vp->v_type == VCHR) - cnd->cnd_vp = nd.ni_vp; - else - vn_close(nd.ni_vp, openflag, td->td_ucred, td); - } - return (cnd->cnd_vp != NULL); -} - -static int -cnopen(struct cdev *dev, int flag, int mode, struct thread *td) -{ - struct cn_device *cnd; - - openflag = flag | FWRITE; /* XXX */ - cn_is_open = 1; /* console is logically open */ - if (cn_mute) - return (0); - STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) - cn_devopen(cnd, td, 0); - return (0); -} - -static int -cnclose(struct cdev *dev, int flag, int mode, struct thread *td) -{ - struct cn_device *cnd; - struct vnode *vp; - - STAILQ_FOREACH(cnd, &cn_devlist, cnd_next) { - if ((vp = cnd->cnd_vp) == NULL) - continue; - cnd->cnd_vp = NULL; - vn_close(vp, openflag, td->td_ucred, td); - } - cn_is_open = 0; - return (0); -} - -static int -cnread(struct cdev *dev, struct uio *uio, int flag) -{ - struct cn_device *cnd; - struct cdevsw *csw; - int error; - - cnd = STAILQ_FIRST(&cn_devlist); - if (cn_mute || CND_INVALID(cnd, curthread)) - return (0); - dev = cnd->cnd_vp->v_rdev; - csw = dev_refthread(dev); - if (csw == NULL) - return (ENXIO); - error = (csw->d_read)(dev, uio, flag); - dev_relthread(dev); - return (error); -} - -static int -cnwrite(struct cdev *dev, struct uio *uio, int flag) -{ - struct cn_device *cnd; - struct cdevsw *csw; - int error; - - cnd = STAILQ_FIRST(&cn_devlist); - if (cn_mute || CND_INVALID(cnd, curthread)) - goto done; - if (constty) - dev = constty->t_dev; - else - dev = cnd->cnd_vp->v_rdev; - if (dev != NULL) { - log_console(uio); - csw = dev_refthread(dev); - if (csw == NULL) - return (ENXIO); - error = (csw->d_write)(dev, uio, flag); - dev_relthread(dev); - return (error); - } -done: - uio->uio_resid = 0; /* dump the data */ - return (0); -} - -static int -cnioctl(struct cdev *dev, u_long cmd, caddr_t data, int flag, struct thread *td) -{ - struct cn_device *cnd; - struct cdevsw *csw; - int error; - - cnd = STAILQ_FIRST(&cn_devlist); - if (cn_mute || CND_INVALID(cnd, td)) - return (0); - /* - * Superuser can always use this to wrest control of console - * output from the "virtual" console. - */ - if (cmd == TIOCCONS && constty) { - error = priv_check(td, PRIV_TTY_CONSOLE); - if (error) - return (error); - constty = NULL; - return (0); - } - dev = cnd->cnd_vp->v_rdev; - if (dev == NULL) - return (0); /* XXX : ENOTTY ? */ - csw = dev_refthread(dev); - if (csw == NULL) - return (ENXIO); - error = (csw->d_ioctl)(dev, cmd, data, flag, td); - dev_relthread(dev); - return (error); -} - -/* - * XXX - * poll/kqfilter do not appear to be correct - */ -static int -cnpoll(struct cdev *dev, int events, struct thread *td) -{ - struct cn_device *cnd; - struct cdevsw *csw; - int error; - - cnd = STAILQ_FIRST(&cn_devlist); - if (cn_mute || CND_INVALID(cnd, td)) - return (0); - dev = cnd->cnd_vp->v_rdev; - if (dev == NULL) - return (0); - csw = dev_refthread(dev); - if (csw == NULL) - return (ENXIO); - error = (csw->d_poll)(dev, events, td); - dev_relthread(dev); - return (error); -} - -static int -cnkqfilter(struct cdev *dev, struct knote *kn) -{ - struct cn_device *cnd; - struct cdevsw *csw; - int error; - - cnd = STAILQ_FIRST(&cn_devlist); - if (cn_mute || CND_INVALID(cnd, curthread)) - return (EINVAL); - dev = cnd->cnd_vp->v_rdev; - if (dev == NULL) - return (ENXIO); - csw = dev_refthread(dev); - if (csw == NULL) - return (ENXIO); - error = (csw->d_kqfilter)(dev, kn); - dev_relthread(dev); - return (error); -} - /* * Low level console routines. */ @@ -737,8 +509,6 @@ static void cn_drvinit(void *unused) { - make_dev(&cn_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "console"); - mtx_init(&cnputs_mtx, "cnputs_mtx", NULL, MTX_SPIN | MTX_NOWITNESS); use_cnputs_mtx = 1; } Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Sat Nov 1 08:07:02 2008 (r184520) +++ head/sys/kern/tty.c Sat Nov 1 08:35:28 2008 (r184521) @@ -73,6 +73,10 @@ static struct sx tty_list_sx; SX_SYSINIT(tty_list, &tty_list_sx, "tty list"); static unsigned int tty_list_count = 0; +/* Character device of /dev/console. */ +static struct cdev *dev_console; +static const char *dev_console_filename; + /* * Flags that are supported and stored by this implementation. */ @@ -86,7 +90,7 @@ static unsigned int tty_list_count = 0; HUPCL|CLOCAL|CCTS_OFLOW|CRTS_IFLOW|CDTR_IFLOW|\ CDSR_OFLOW|CCAR_OFLOW) -#define TTY_CALLOUT(tp,d) ((tp)->t_dev != (d)) +#define TTY_CALLOUT(tp,d) ((d) != (tp)->t_dev && (d) != dev_console) /* * Set TTY buffer sizes. @@ -1189,11 +1193,7 @@ tty_wait(struct tty *tp, struct cv *cv) int error; int revokecnt = tp->t_revokecnt; -#if 0 - /* XXX: /dev/console also picks up Giant. */ tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED); -#endif - tty_lock_assert(tp, MA_OWNED); MPASS(!tty_gone(tp)); error = cv_wait_sig(cv, tp->t_mtx); @@ -1215,11 +1215,7 @@ tty_timedwait(struct tty *tp, struct cv int error; int revokecnt = tp->t_revokecnt; -#if 0 - /* XXX: /dev/console also picks up Giant. */ tty_lock_assert(tp, MA_OWNED|MA_NOTRECURSED); -#endif - tty_lock_assert(tp, MA_OWNED); MPASS(!tty_gone(tp)); error = cv_timedwait_sig(cv, tp->t_mtx, hz); @@ -1662,6 +1658,10 @@ tty_hiwat_in_unblock(struct tty *tp) ttydevsw_inwakeup(tp); } +/* + * TTY hooks interface. + */ + static int ttyhook_defrint(struct tty *tp, char c, int flags) { @@ -1745,6 +1745,84 @@ ttyhook_unregister(struct tty *tp) tty_rel_free(tp); } +/* + * /dev/console handling. + */ + +static int +ttyconsdev_open(struct cdev *dev, int oflags, int devtype, struct thread *td) +{ + struct tty *tp; + + /* System has no console device. */ + if (dev_console_filename == NULL) + return (ENXIO); + + /* Look up corresponding TTY by device name. */ + sx_slock(&tty_list_sx); + TAILQ_FOREACH(tp, &tty_list, t_list) { + if (strcmp(dev_console_filename, tty_devname(tp)) == 0) { + dev_console->si_drv1 = tp; + break; + } + } + sx_sunlock(&tty_list_sx); + + /* System console has no TTY associated. */ + if (dev_console->si_drv1 == NULL) + return (ENXIO); + + return (ttydev_open(dev, oflags, devtype, td)); +} + +static int +ttyconsdev_write(struct cdev *dev, struct uio *uio, int ioflag) +{ + + log_console(uio); + + return (ttydev_write(dev, uio, ioflag)); +} + +/* + * /dev/console is a little different than normal TTY's. Unlike regular + * TTY device nodes, this device node will not revoke the entire TTY + * upon closure and all data written to it will be logged. + */ +static struct cdevsw ttyconsdev_cdevsw = { + .d_version = D_VERSION, + .d_open = ttyconsdev_open, + .d_read = ttydev_read, + .d_write = ttyconsdev_write, + .d_ioctl = ttydev_ioctl, + .d_kqfilter = ttydev_kqfilter, + .d_poll = ttydev_poll, + .d_mmap = ttydev_mmap, + .d_name = "ttyconsdev", + .d_flags = D_TTY, +}; + +static void +ttyconsdev_init(void *unused) +{ + + dev_console = make_dev(&ttyconsdev_cdevsw, 0, UID_ROOT, GID_WHEEL, + 0600, "console"); +} + +SYSINIT(tty, SI_SUB_DRIVERS, SI_ORDER_FIRST, ttyconsdev_init, NULL); + +void +ttyconsdev_select(const char *name) +{ + + dev_console_filename = name; +} + +/* + * Debugging routines. + */ + #include "opt_ddb.h" #ifdef DDB #include Modified: head/sys/sys/tty.h ============================================================================== --- head/sys/sys/tty.h Sat Nov 1 08:07:02 2008 (r184520) +++ head/sys/sys/tty.h Sat Nov 1 08:35:28 2008 (r184521) @@ -192,6 +192,9 @@ dev_t tty_udev(struct tty *tp); /* Status line printing. */ void tty_info(struct tty *tp); +/* /dev/console selection. */ +void ttyconsdev_select(const char *name); + /* Pseudo-terminal hooks. */ int pts_alloc_external(int fd, struct thread *td, struct file *fp, struct cdev *dev, const char *name); From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 10:30:31 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22C8B1065673; Sat, 1 Nov 2008 10:30:31 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.terabit.net.ua (mail.terabit.net.ua [195.137.202.147]) by mx1.freebsd.org (Postfix) with ESMTP id B677F8FC12; Sat, 1 Nov 2008 10:30:30 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from skuns.zoral.com.ua ([91.193.166.194] helo=mail.zoral.com.ua) by mail.terabit.net.ua with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1KwDkS-0004LP-Qz; Sat, 01 Nov 2008 12:30:28 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id mA1AUPCu053137 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Nov 2008 12:30:25 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id mA1AUPk2034902; Sat, 1 Nov 2008 12:30:25 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id mA1AUPZH034901; Sat, 1 Nov 2008 12:30:25 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 1 Nov 2008 12:30:25 +0200 From: Kostik Belousov To: Warner Losh Message-ID: <20081101103025.GU18100@deviant.kiev.zoral.com.ua> References: <200810312324.m9VNOE88093395@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="xdFnWCcMW4kMaGnb" Content-Disposition: inline In-Reply-To: <200810312324.m9VNOE88093395@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.93.3, clamav-milter version 0.93.3 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua X-Virus-Scanned: mail.terabit.net.ua 1KwDkS-0004LP-Qz 4cac31941f32609220dbf0f125f91a04 X-Terabit: YES Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184515 - in head/sys: conf modules/rl pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 10:30:31 -0000 --xdFnWCcMW4kMaGnb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 31, 2008 at 11:24:14PM +0000, Warner Losh wrote: > Author: imp > Date: Fri Oct 31 23:24:13 2008 > New Revision: 184515 > URL: http://svn.freebsd.org/changeset/base/184515 >=20 > Log: > Add RL_TWISTER_ENABLE option. This enables the magic bits to do long > cable tuning. This has helped in some installations for hardware > deployed by a former employer. Made optional because the lists aren't > full of complaints about these cards... even when they were wildly > popular. > =20 > Reviewed by: attilio@, jhb@, trhodes@ (all an older version of the patc= h) >=20 > Modified: > head/sys/conf/options > head/sys/modules/rl/Makefile > head/sys/pci/if_rl.c > head/sys/pci/if_rlreg.h >=20 > Modified: head/sys/conf/options > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/conf/options Fri Oct 31 18:40:35 2008 (r184514) > +++ head/sys/conf/options Fri Oct 31 23:24:13 2008 (r184515) > @@ -672,6 +672,9 @@ ED_SIC opt_ed.h > # bce driver > BCE_DEBUG opt_bce.h > =20 > +# rl driver > +RL_TWISTER_ENABLE opt_rl.h Would it make sense to compile it unconditionally, but enable by a sysctl or loader knob ? --xdFnWCcMW4kMaGnb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkkML8AACgkQC3+MBN1Mb4joZACfbzNsZ3L73wv45JjcAvaYv5Ne j+0An2UfRj86WoE3K2DAQtiU7bkRvN09 =yHwE -----END PGP SIGNATURE----- --xdFnWCcMW4kMaGnb-- From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 11:05:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E211065676; Sat, 1 Nov 2008 11:05:45 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail01.syd.optusnet.com.au (mail01.syd.optusnet.com.au [211.29.132.182]) by mx1.freebsd.org (Postfix) with ESMTP id 896938FC18; Sat, 1 Nov 2008 11:05:44 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-151-199.carlnfd1.nsw.optusnet.com.au (c122-106-151-199.carlnfd1.nsw.optusnet.com.au [122.106.151.199]) by mail01.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id mA1B5f8n025247 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Nov 2008 22:05:42 +1100 Date: Sat, 1 Nov 2008 22:05:41 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Watson In-Reply-To: <200810311447.m9VElFtp083250@svn.freebsd.org> Message-ID: <20081101212937.D12448@delplex.bde.org> References: <200810311447.m9VElFtp083250@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184509 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 11:05:45 -0000 On Fri, 31 Oct 2008, Robert Watson wrote: > Log: > In style(9) examples of err() and errx(), use sysexits(3) errors rather > than returning 1. style(9) was correct. Using sysexits(3) is a style bug in most cases, especially in err() and errx() messages where there is a text message and not just a cryptic error code. (Originally, in 4.4BSD, sysexits.3 doesn't exist and /usr/src/admin/style/style had no mention of sysexits.h. What /usr/src/admin/style/style had was a rule to not label every error exit with a unique error code, since this gives a large undocumented set of program-specific error codes which no one remembers. Using sysexits gives the same results in practice -- it gives a large documented set of generic error codes which no one remembers, so it was a bug to change the rule from disallowing lots of error codes to encouraging use of sysexits. In 4.4BSD-Lite2, sysexits.3 still doesn't exist, and sysexits.h is only referred to in 11 .c files. This shows that use of sysexits is very unusual in BSD code. Some FreeBSD users like it and added it to style.9 and some FreeBSD .c files, so it is just unusual in FreeBSD code.) Bruce From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 11:32:16 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87D4E1065670; Sat, 1 Nov 2008 11:32:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail09.syd.optusnet.com.au (mail09.syd.optusnet.com.au [211.29.132.190]) by mx1.freebsd.org (Postfix) with ESMTP id 267238FC1A; Sat, 1 Nov 2008 11:32:15 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c122-106-151-199.carlnfd1.nsw.optusnet.com.au (c122-106-151-199.carlnfd1.nsw.optusnet.com.au [122.106.151.199]) by mail09.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id mA1BWCjJ009469 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Nov 2008 22:32:14 +1100 Date: Sat, 1 Nov 2008 22:32:12 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Robert Watson In-Reply-To: <200810311514.m9VFEfi9083785@svn.freebsd.org> Message-ID: <20081101220954.B12551@delplex.bde.org> References: <200810311514.m9VFEfi9083785@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r184511 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 11:32:16 -0000 On Fri, 31 Oct 2008, Robert Watson wrote: > Log: > In example use of err(3) and errx(3), use sysexits(3) constants. Use of sysexits is a style bug here too (see a reply to the corresponding change in style.9 for more details). > Modified: head/lib/libc/gen/err.3 > ============================================================================== > --- head/lib/libc/gen/err.3 Fri Oct 31 15:11:01 2008 (r184510) > +++ head/lib/libc/gen/err.3 Fri Oct 31 15:14:40 2008 (r184511) > @@ -178,15 +178,16 @@ or a null pointer > Display the current errno information string and exit: > .Bd -literal -offset indent > if ((p = malloc(size)) == NULL) > - err(1, NULL); > + err(EX_OSERR, NULL); > if ((fd = open(file_name, O_RDONLY, 0)) == -1) > - err(1, "%s", file_name); > + err(EX_NOINPUT, "%s", file_name); These have other style bugs -- a null or incomplete error message makes a sysexits error code almost useful. Normal for malloc failure is errx(1, "malloc failed"). This intentionally uses errx() instead of err() since the usual error ENOMEM for malloc() failure is considered useless, and/or the code is supposed to be portable to systems where malloc() is not guaranteed to set errno on failure. FreeBSD's actually malloc() claims to always set errno to ENOMEM on error. It seems to actually do this. This involves clobbering any possibly-more useful different errno set by mmap() etc. after preserving the original errno in a nonstandard place. Apart from this, with malloc() being even more in userland and with possibly more complicated failure modes, the printing error code might be more useful. (Except of couse malloc9) neverl fails :-), and when it does the MALLOC_OPTIONS="A" mistake makes it abort.) Also, with malloc() more in userland, EX_OSERR for malloc failure is wronger than before. Normal for open failure is err(1, "cannot open %s", file_name);. Bruce From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 13:40:46 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B976E1065672; Sat, 1 Nov 2008 13:40:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A9A208FC1A; Sat, 1 Nov 2008 13:40:46 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1DekCT010310; Sat, 1 Nov 2008 13:40:46 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1Dekxr010308; Sat, 1 Nov 2008 13:40:46 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200811011340.mA1Dekxr010308@svn.freebsd.org> From: Ed Schouten Date: Sat, 1 Nov 2008 13:40:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184522 - in head: sys/kern usr.sbin/pstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 13:40:46 -0000 Author: ed Date: Sat Nov 1 13:40:46 2008 New Revision: 184522 URL: http://svn.freebsd.org/changeset/base/184522 Log: Clamp the values of t_column to 5 digits in `pstat -t' and `show all ttys'. We often run into these very high column numbers when we run curses applications, because they don't print any newlines. This messes up the table output of `pstat -t'. If these numbers get really high, they aren't of any use to the reader anyway. Convert them to `99999' when they run out of bounds. Modified: head/sys/kern/tty.c head/usr.sbin/pstat/pstat.c Modified: head/sys/kern/tty.c ============================================================================== --- head/sys/kern/tty.c Sat Nov 1 08:35:28 2008 (r184521) +++ head/sys/kern/tty.c Sat Nov 1 13:40:46 2008 (r184522) @@ -2007,7 +2007,7 @@ DB_SHOW_ALL_COMMAND(ttys, db_show_all_tt osiz, tp->t_outq.to_end - tp->t_outq.to_begin, osiz - tp->t_outlow, - tp->t_column, + MIN(tp->t_column, 99999), tp->t_session ? tp->t_session->s_sid : 0, tp->t_pgrp ? tp->t_pgrp->pg_id : 0); Modified: head/usr.sbin/pstat/pstat.c ============================================================================== --- head/usr.sbin/pstat/pstat.c Sat Nov 1 08:35:28 2008 (r184521) +++ head/usr.sbin/pstat/pstat.c Sat Nov 1 13:40:46 2008 (r184522) @@ -334,7 +334,7 @@ ttyprt(struct xtty *xt) xt->xt_insize, xt->xt_incc, xt->xt_inlc, (xt->xt_insize - xt->xt_inlow), xt->xt_outsize, xt->xt_outcc, (xt->xt_outsize - xt->xt_outlow), - xt->xt_column, xt->xt_sid, xt->xt_pgid); + MIN(xt->xt_column, 99999), xt->xt_sid, xt->xt_pgid); for (i = j = 0; ttystates[i].flag; i++) if (xt->xt_flags & ttystates[i].flag) { putchar(ttystates[i].val); From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 14:19:56 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3222E1065670; Sat, 1 Nov 2008 14:19:56 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2083A8FC14; Sat, 1 Nov 2008 14:19:56 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1EJu1T011421; Sat, 1 Nov 2008 14:19:56 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1EJu4o011420; Sat, 1 Nov 2008 14:19:56 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <200811011419.mA1EJu4o011420@svn.freebsd.org> From: Christian Brueffer Date: Sat, 1 Nov 2008 14:19:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184523 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 14:19:56 -0000 Author: brueffer Date: Sat Nov 1 14:19:55 2008 New Revision: 184523 URL: http://svn.freebsd.org/changeset/base/184523 Log: - Add one more supported adapter (1) - Fix a couple of typos Submitted by: Horvath Andras (1) Modified: head/share/man/man4/zyd.4 Modified: head/share/man/man4/zyd.4 ============================================================================== --- head/share/man/man4/zyd.4 Sat Nov 1 13:40:46 2008 (r184522) +++ head/share/man/man4/zyd.4 Sat Nov 1 14:19:55 2008 (r184523) @@ -32,7 +32,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd Apri 13, 2008 +.Dd November 1, 2008 .Dt ZYD 4 .Os .Sh NAME @@ -84,7 +84,7 @@ driver: .It Airlink+ AWLL3025 .It Airlink 101 AWLL3026 .It AOpen 802.11g WL54 -.It Asus A9T integrated wirless +.It Asus A9T integrated wireless .It Asus WL-159g .It Belkin F5D7050 v.4000 .It Billion BiPAC 3011G @@ -98,6 +98,7 @@ driver: .It Linksys WUSBF54G .It Longshine LCS-8131G3 .It MSI US54SE +.It MyTek MWU-201 USB adapter .It Philips SNU5600 .It Planet WL-U356 .It Planex GW-US54GZ @@ -124,7 +125,7 @@ driver: .El .Sh EXAMPLES The following -examples configures zyd0 to join any BSS network using WEP key +example configures zyd0 to join any BSS network using WEP key .Dq 0x1deadbeef1 , channel 11: .Bd -literal -offset indent @@ -167,7 +168,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr ifconfig 8 , -.Xr wpa_supplicant 8 . +.Xr wpa_supplicant 8 .Sh AUTHORS .An -nosplit The original From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 16:47:21 2008 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2F255106568C; Sat, 1 Nov 2008 16:47:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id DF1C18FC14; Sat, 1 Nov 2008 16:47:20 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id mA1GisrU015627; Sat, 1 Nov 2008 10:44:54 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 01 Nov 2008 10:46:07 -0600 (MDT) Message-Id: <20081101.104607.1844477909.imp@bsdimp.com> To: kostikbel@gmail.com From: "M. Warner Losh" In-Reply-To: <20081101103025.GU18100@deviant.kiev.zoral.com.ua> References: <200810312324.m9VNOE88093395@svn.freebsd.org> <20081101103025.GU18100@deviant.kiev.zoral.com.ua> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r184515 - in head/sys: conf modules/rl pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 16:47:21 -0000 In message: <20081101103025.GU18100@deviant.kiev.zoral.com.ua> Kostik Belousov writes: : On Fri, Oct 31, 2008 at 11:24:14PM +0000, Warner Losh wrote: : > Author: imp : > Date: Fri Oct 31 23:24:13 2008 : > New Revision: 184515 : > URL: http://svn.freebsd.org/changeset/base/184515 : > : > Log: : > Add RL_TWISTER_ENABLE option. This enables the magic bits to do long : > cable tuning. This has helped in some installations for hardware : > deployed by a former employer. Made optional because the lists aren't : > full of complaints about these cards... even when they were wildly : > popular. : > : > Reviewed by: attilio@, jhb@, trhodes@ (all an older version of the patch) : > : > Modified: : > head/sys/conf/options : > head/sys/modules/rl/Makefile : > head/sys/pci/if_rl.c : > head/sys/pci/if_rlreg.h : > : > Modified: head/sys/conf/options : > ============================================================================== : > --- head/sys/conf/options Fri Oct 31 18:40:35 2008 (r184514) : > +++ head/sys/conf/options Fri Oct 31 23:24:13 2008 (r184515) : > @@ -672,6 +672,9 @@ ED_SIC opt_ed.h : > # bce driver : > BCE_DEBUG opt_bce.h : > : > +# rl driver : > +RL_TWISTER_ENABLE opt_rl.h : Would it make sense to compile it unconditionally, but enable by a sysctl : or loader knob ? That's a good idea. Given the level of problems here, and my lack of time, I'll leave it to someone else I think. Warner From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 17:02:02 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 72E2B1065673; Sat, 1 Nov 2008 17:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 60B7C8FC16; Sat, 1 Nov 2008 17:02:02 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1H22F4014218; Sat, 1 Nov 2008 17:02:02 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1H22vn014217; Sat, 1 Nov 2008 17:02:02 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <200811011702.mA1H22vn014217@svn.freebsd.org> From: Warner Losh Date: Sat, 1 Nov 2008 17:02:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184524 - head/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 17:02:02 -0000 Author: imp Date: Sat Nov 1 17:02:01 2008 New Revision: 184524 URL: http://svn.freebsd.org/changeset/base/184524 Log: Fix a few typos/spelling errors in my comments from the last commit, plus a few others that had lingered in this driver... Submitted by: "b." bf2006a att yahoo KIBO com Modified: head/sys/pci/if_rl.c Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Sat Nov 1 14:19:55 2008 (r184523) +++ head/sys/pci/if_rl.c Sat Nov 1 17:02:01 2008 (r184524) @@ -156,7 +156,7 @@ static struct rl_type rl_devs[] = { { DELTA_VENDORID, DELTA_DEVICEID_8139, RL_8139, "Delta Electronics 8139 10/100BaseTX" }, { ADDTRON_VENDORID, ADDTRON_DEVICEID_8139, RL_8139, - "Addtron Technolgy 8139 10/100BaseTX" }, + "Addtron Technology 8139 10/100BaseTX" }, { DLINK_VENDORID, DLINK_DEVICEID_530TXPLUS, RL_8139, "D-Link DFE-530TX+ 10/100BaseTX" }, { DLINK_VENDORID, DLINK_DEVICEID_690TXD, RL_8139, @@ -1319,7 +1319,7 @@ rl_rxeof(struct rl_softc *sc) RL_LOCK(sc); } - /* No need to sync Rx memory block as we didn't mofify it. */ + /* No need to sync Rx memory block as we didn't modify it. */ } /* @@ -1402,15 +1402,15 @@ rl_twister_update(struct rl_softc *sc) /* * Tune the so-called twister registers of the RTL8139. These - * are used to compensate for impendence mismatches. The - * method for tuning these registes is undocumented and the - * following proceedure is collected from public sources. + * are used to compensate for impedance mismatches. The + * method for tuning these registers is undocumented and the + * following procedure is collected from public sources. */ switch (sc->rl_twister) { case CHK_LINK: /* - * If we have a sufficent link, then we can proceed in + * If we have a sufficient link, then we can proceed in * the state machine to the next stage. If not, then * disable further tuning after writing sane defaults. */ @@ -1649,7 +1649,7 @@ rl_encap(struct rl_softc *sc, struct mbu if (padlen > 0) { /* - * Make security concious people happy: zero out the + * Make security-conscious people happy: zero out the * bytes in the pad area, since we don't know what * this mbuf cluster buffer's previous user might * have left in it. From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 19:02:05 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EBADE1065673; Sat, 1 Nov 2008 19:02:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9DA58FC0A; Sat, 1 Nov 2008 19:02:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1J25EW016487; Sat, 1 Nov 2008 19:02:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1J25nC016486; Sat, 1 Nov 2008 19:02:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200811011902.mA1J25nC016486@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 1 Nov 2008 19:02:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184528 - head/share/man/man9 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 19:02:06 -0000 Author: trasz Date: Sat Nov 1 19:02:05 2008 New Revision: 184528 URL: http://svn.freebsd.org/changeset/base/184528 Log: Remove obsolete pseudocode from VOP_ACCESS.9, replacing it with something closer to reality. Approved by: rwatson (mentor) Modified: head/share/man/man9/VOP_ACCESS.9 Modified: head/share/man/man9/VOP_ACCESS.9 ============================================================================== --- head/share/man/man9/VOP_ACCESS.9 Sat Nov 1 18:57:58 2008 (r184527) +++ head/share/man/man9/VOP_ACCESS.9 Sat Nov 1 19:02:05 2008 (r184528) @@ -94,45 +94,12 @@ vop_access(struct vnode *vp, accmode_t a /* If immutable bit set, nobody gets to write it. */ if ((accmode & VWRITE) && vp has immutable bit set) - return EPERM; + return (EPERM); - /* Otherwise, user id 0 always gets access. */ - if (cred->cr_uid == 0) - return 0; + error = vaccess(vp->v_type, mode of vp, owner of vp, + group of vp, ap->a_accmode, ap->a_cred, NULL); - mask = 0; - - /* Otherwise, check the owner. */ - if (cred->cr_uid == owner of vp) { - if (accmode & VEXEC) - mask |= S_IXUSR; - if (accmode & VREAD) - mask |= S_IRUSR; - if (accmode & VWRITE) - mask |= S_IWUSR; - return (((mode of vp) & mask) == mask ? 0 : EACCES); - } - - /* Otherwise, check the groups. */ - for (i = 0, gp = cred->cr_groups; i < cred->cr_ngroups; i++, gp++) - if (group of vp == *gp) { - if (accmode & VEXEC) - mask |= S_IXGRP; - if (accmode & VREAD) - mask |= S_IRGRP; - if (accmode & VWRITE) - mask |= S_IWGRP; - return (((mode of vp) & mask) == mask ? 0 : EACCES); - } - - /* Otherwise, check everyone else. */ - if (accmode & VEXEC) - mask |= S_IXOTH; - if (accmode & VREAD) - mask |= S_IROTH; - if (accmode & VWRITE) - mask |= S_IWOTH; - return (((mode of vp) & mask) == mask ? 0 : EACCES); + return (error); } .Ed .Sh ERRORS From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 19:11:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E072106564A; Sat, 1 Nov 2008 19:11:21 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CB2E8FC20; Sat, 1 Nov 2008 19:11:21 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1JBLHP016674; Sat, 1 Nov 2008 19:11:21 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1JBLXp016673; Sat, 1 Nov 2008 19:11:21 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200811011911.mA1JBLXp016673@svn.freebsd.org> From: Tim Kientzle Date: Sat, 1 Nov 2008 19:11:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184529 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 19:11:21 -0000 Author: kientzle Date: Sat Nov 1 19:11:21 2008 New Revision: 184529 URL: http://svn.freebsd.org/changeset/base/184529 Log: Correct the documented declaration of the archive_write_callback to match the code. PR: docs/128089 Submitted by: Mel MFC after: 3 days Modified: head/lib/libarchive/archive_write.3 Modified: head/lib/libarchive/archive_write.3 ============================================================================== --- head/lib/libarchive/archive_write.3 Sat Nov 1 19:02:05 2008 (r184528) +++ head/lib/libarchive/archive_write.3 Sat Nov 1 19:11:21 2008 (r184529) @@ -342,7 +342,7 @@ to register an error code and message an .Fo archive_write_callback .Fa "struct archive *" .Fa "void *client_data" -.Fa "void *buffer" +.Fa "const void *buffer" .Fa "size_t length" .Fc .El @@ -410,7 +410,7 @@ myopen(struct archive *a, void *client_d } ssize_t -mywrite(struct archive *a, void *client_data, void *buff, size_t n) +mywrite(struct archive *a, void *client_data, const void *buff, size_t n) { struct mydata *mydata = client_data; From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 21:16:09 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9CC531065672; Sat, 1 Nov 2008 21:16:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8A7A58FC0C; Sat, 1 Nov 2008 21:16:09 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1LG95X019045; Sat, 1 Nov 2008 21:16:09 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1LG91K019044; Sat, 1 Nov 2008 21:16:09 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811012116.mA1LG91K019044@svn.freebsd.org> From: Robert Watson Date: Sat, 1 Nov 2008 21:16:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184534 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 21:16:09 -0000 Author: rwatson Date: Sat Nov 1 21:16:09 2008 New Revision: 184534 URL: http://svn.freebsd.org/changeset/base/184534 Log: Allow a single read(2) system call on an audit pipe to retrieve data from more than one audit record at a time in order to improve efficiency. MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Sat Nov 1 20:54:52 2008 (r184533) +++ head/sys/security/audit/audit_pipe.c Sat Nov 1 21:16:09 2008 (r184534) @@ -930,19 +930,8 @@ audit_pipe_ioctl(struct cdev *dev, u_lon } /* - * Audit pipe read. Pull one record off the queue and copy to user space. - * On error, the record is dropped. - * - * Providing more sophisticated behavior, such as partial reads, is tricky - * due to the potential for parallel I/O. If partial read support is - * required, it will require a per-pipe "current record being read" along - * with an offset into that trecord which has already been read. Threads - * performing partial reads will need to allocate per-thread copies of the - * data so that if another thread completes the read of the record, it can be - * freed without adding reference count logic. If this is added, a flag to - * indicate that only atomic record reads are desired would be useful, as if - * different threads are all waiting for records on the pipe, they will want - * independent record reads, which is currently the behavior. + * Audit pipe read. Read one or more partial or complete records to user + * memory. */ static int audit_pipe_read(struct cdev *dev, struct uio *uio, int flag) @@ -978,40 +967,43 @@ audit_pipe_read(struct cdev *dev, struct /* * Copy as many remaining bytes from the current record to userspace - * as we can. + * as we can. Keep processing records until we run out of records in + * the queue, or until the user buffer runs out of space. * * Note: we rely on the SX lock to maintain ape's stability here. */ ap->ap_reads++; - ape = TAILQ_FIRST(&ap->ap_queue); - toread = MIN(ape->ape_record_len - ape->ape_record_offset, - uio->uio_resid); - AUDIT_PIPE_UNLOCK(ap); - error = uiomove((char *)ape->ape_record + ape->ape_record_offset, - toread, uio); - if (error) { - AUDIT_PIPE_SX_XUNLOCK(ap); - return (error); - } + while ((ape = TAILQ_FIRST(&ap->ap_queue)) != NULL && + uio->uio_resid > 0) { + AUDIT_PIPE_LOCK_ASSERT(ap); - /* - * If the copy succeeded, update book-keeping, and if no bytes remain - * in the current record, free it. - */ - AUDIT_PIPE_LOCK(ap); - KASSERT(TAILQ_FIRST(&ap->ap_queue) == ape, - ("audit_pipe_read: queue out of sync after uiomove")); - ape->ape_record_offset += toread; - if (ape->ape_record_offset == ape->ape_record_len) { - TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); - ap->ap_qlen--; - } else - ape = NULL; + toread = MIN(ape->ape_record_len - ape->ape_record_offset, + uio->uio_resid); + AUDIT_PIPE_UNLOCK(ap); + error = uiomove((char *)ape->ape_record + + ape->ape_record_offset, toread, uio); + if (error) { + AUDIT_PIPE_SX_XUNLOCK(ap); + return (error); + } + + /* + * If the copy succeeded, update book-keeping, and if no + * bytes remain in the current record, free it. + */ + AUDIT_PIPE_LOCK(ap); + KASSERT(TAILQ_FIRST(&ap->ap_queue) == ape, + ("audit_pipe_read: queue out of sync after uiomove")); + ape->ape_record_offset += toread; + if (ape->ape_record_offset == ape->ape_record_len) { + TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); + audit_pipe_entry_free(ape); + ap->ap_qlen--; + } + } AUDIT_PIPE_UNLOCK(ap); AUDIT_PIPE_SX_XUNLOCK(ap); - if (ape != NULL) - audit_pipe_entry_free(ape); - return (error); + return (0); } /* From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 21:56:45 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A936A1065680; Sat, 1 Nov 2008 21:56:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 971C78FC1A; Sat, 1 Nov 2008 21:56:45 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1LujDa019837; Sat, 1 Nov 2008 21:56:45 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1Lujju019836; Sat, 1 Nov 2008 21:56:45 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811012156.mA1Lujju019836@svn.freebsd.org> From: Robert Watson Date: Sat, 1 Nov 2008 21:56:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184536 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 21:56:45 -0000 Author: rwatson Date: Sat Nov 1 21:56:45 2008 New Revision: 184536 URL: http://svn.freebsd.org/changeset/base/184536 Log: We only allow a partial read of the first record in an audit pipe record queue, so move the offset field from the per-record audit_pipe_entry structure to the audit_pipe structure. Now that we support reading more than one record at a time, add a new summary field to audit_pipe, ap_qbyteslen, which tracks the total number of bytes present in a pipe, and return that (minus the current offset) via FIONREAD and kqueue's data variable for the pending byte count rather than the number of bytes remaining in only the first record. Add a number of asserts to confirm that these counts and offsets following the expected rules. MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Sat Nov 1 21:49:32 2008 (r184535) +++ head/sys/security/audit/audit_pipe.c Sat Nov 1 21:56:45 2008 (r184536) @@ -85,7 +85,6 @@ static MALLOC_DEFINE(M_AUDIT_PIPE_PRESEL struct audit_pipe_entry { void *ape_record; u_int ape_record_len; - u_int ape_record_offset; TAILQ_ENTRY(audit_pipe_entry) ape_queue; }; @@ -138,8 +137,17 @@ struct audit_pipe { */ struct cv ap_cv; + /* + * Various queue-reated variables: qlen and qlimit are a count of + * records in the queue; qbyteslen is the number of bytes of data + * across all records, and qoffset is the amount read so far of the + * first record in the queue. The number of bytes available for + * reading in the queue is qbyteslen - qoffset. + */ u_int ap_qlen; u_int ap_qlimit; + u_int ap_qbyteslen; + u_int ap_qoffset; u_int64_t ap_inserts; /* Records added. */ u_int64_t ap_reads; /* Records read. */ @@ -474,11 +482,11 @@ audit_pipe_append(struct audit_pipe *ap, bcopy(record, ape->ape_record, record_len); ape->ape_record_len = record_len; - ape->ape_record_offset = 0; TAILQ_INSERT_TAIL(&ap->ap_queue, ape, ape_queue); ap->ap_inserts++; ap->ap_qlen++; + ap->ap_qbyteslen += ape->ape_record_len; selwakeuppri(&ap->ap_selinfo, PSOCK); KNOTE_LOCKED(&ap->ap_selinfo.si_note, 0); if (ap->ap_flags & AUDIT_PIPE_ASYNC) @@ -603,10 +611,14 @@ audit_pipe_flush(struct audit_pipe *ap) while ((ape = TAILQ_FIRST(&ap->ap_queue)) != NULL) { TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); + ap->ap_qbyteslen -= ape->ape_record_len; audit_pipe_entry_free(ape); ap->ap_qlen--; } - KASSERT(ap->ap_qlen == 0, ("audit_pipe_free: ap_qlen")); + ap->ap_qoffset = 0; + + KASSERT(ap->ap_qlen == 0, ("audit_pipe_free: ap_qbyteslen")); + KASSERT(ap->ap_qbyteslen == 0, ("audit_pipe_flush: ap_qbyteslen")); } /* @@ -752,12 +764,7 @@ audit_pipe_ioctl(struct cdev *dev, u_lon case FIONREAD: AUDIT_PIPE_LOCK(ap); - if (TAILQ_FIRST(&ap->ap_queue) != NULL) - *(int *)data = - TAILQ_FIRST(&ap->ap_queue)->ape_record_len - - TAILQ_FIRST(&ap->ap_queue)->ape_record_offset; - else - *(int *)data = 0; + *(int *)data = ap->ap_qbyteslen - ap->ap_qoffset; AUDIT_PIPE_UNLOCK(ap); error = 0; break; @@ -977,11 +984,13 @@ audit_pipe_read(struct cdev *dev, struct uio->uio_resid > 0) { AUDIT_PIPE_LOCK_ASSERT(ap); - toread = MIN(ape->ape_record_len - ape->ape_record_offset, + KASSERT(ape->ape_record_len > ap->ap_qoffset, + ("audit_pipe_read: record_len > qoffset (1)")); + toread = MIN(ape->ape_record_len - ap->ap_qoffset, uio->uio_resid); AUDIT_PIPE_UNLOCK(ap); - error = uiomove((char *)ape->ape_record + - ape->ape_record_offset, toread, uio); + error = uiomove((char *)ape->ape_record + ap->ap_qoffset, + toread, uio); if (error) { AUDIT_PIPE_SX_XUNLOCK(ap); return (error); @@ -994,11 +1003,15 @@ audit_pipe_read(struct cdev *dev, struct AUDIT_PIPE_LOCK(ap); KASSERT(TAILQ_FIRST(&ap->ap_queue) == ape, ("audit_pipe_read: queue out of sync after uiomove")); - ape->ape_record_offset += toread; - if (ape->ape_record_offset == ape->ape_record_len) { + ap->ap_qoffset += toread; + KASSERT(ape->ape_record_len >= ap->ap_qoffset, + ("audit_pipe_read: record_len >= qoffset (2)")); + if (ap->ap_qoffset == ape->ape_record_len) { TAILQ_REMOVE(&ap->ap_queue, ape, ape_queue); + ap->ap_qbyteslen -= ape->ape_record_len; audit_pipe_entry_free(ape); ap->ap_qlen--; + ap->ap_qoffset = 0; } } AUDIT_PIPE_UNLOCK(ap); @@ -1071,7 +1084,7 @@ audit_pipe_kqread(struct knote *kn, long ape = TAILQ_FIRST(&ap->ap_queue); KASSERT(ape != NULL, ("audit_pipe_kqread: ape == NULL")); - kn->kn_data = ape->ape_record_len - ape->ape_record_offset; + kn->kn_data = ap->ap_qbyteslen - ap->ap_qoffset; return (1); } else { kn->kn_data = 0; From owner-svn-src-all@FreeBSD.ORG Sat Nov 1 23:05:49 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B39271065674; Sat, 1 Nov 2008 23:05:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A18CC8FC14; Sat, 1 Nov 2008 23:05:49 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id mA1N5nHn022065; Sat, 1 Nov 2008 23:05:49 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id mA1N5nRU022064; Sat, 1 Nov 2008 23:05:49 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200811012305.mA1N5nRU022064@svn.freebsd.org> From: Robert Watson Date: Sat, 1 Nov 2008 23:05:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184540 - head/sys/security/audit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Nov 2008 23:05:49 -0000 Author: rwatson Date: Sat Nov 1 23:05:49 2008 New Revision: 184540 URL: http://svn.freebsd.org/changeset/base/184540 Log: Add comment for per-pipe stats. MFC after: 2 months Sponsored by: Apple, Inc. Modified: head/sys/security/audit/audit_pipe.c Modified: head/sys/security/audit/audit_pipe.c ============================================================================== --- head/sys/security/audit/audit_pipe.c Sat Nov 1 22:18:49 2008 (r184539) +++ head/sys/security/audit/audit_pipe.c Sat Nov 1 23:05:49 2008 (r184540) @@ -149,6 +149,9 @@ struct audit_pipe { u_int ap_qbyteslen; u_int ap_qoffset; + /* + * Per-pipe operation statistics. + */ u_int64_t ap_inserts; /* Records added. */ u_int64_t ap_reads; /* Records read. */ u_int64_t ap_drops; /* Records dropped. */