From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 03:19:26 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A788D1065673; Sun, 12 Jul 2009 03:19: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 63E948FC13; Sun, 12 Jul 2009 03:19: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 n6C3JQxu070956; Sun, 12 Jul 2009 03:19:26 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6C3JQlW070953; Sun, 12 Jul 2009 03:19:26 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907120319.n6C3JQlW070953@svn.freebsd.org> From: Sam Leffler Date: Sun, 12 Jul 2009 03:19: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: r195630 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 03:19:27 -0000 Author: sam Date: Sun Jul 12 03:19:25 2009 New Revision: 195630 URL: http://svn.freebsd.org/changeset/base/195630 Log: first cut at documenting ioctl api's for net80211 (replaces mostly incorrect information) Approved by: re (blanket) Added: head/share/man/man4/net80211.4 (contents, props changed) Deleted: head/share/man/man4/ieee80211.4 Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Sun Jul 12 00:27:54 2009 (r195629) +++ head/share/man/man4/Makefile Sun Jul 12 03:19:25 2009 (r195630) @@ -131,7 +131,6 @@ MAN= aac.4 \ icmp6.4 \ ida.4 \ idt.4 \ - ieee80211.4 \ ifmib.4 \ igb.4 \ igmp.4 \ @@ -216,6 +215,7 @@ MAN= aac.4 \ ncr.4 \ ncv.4 \ ${_ndis.4} \ + net80211.4 \ netgraph.4 \ netintro.4 \ ${_nfe.4} \ Added: head/share/man/man4/net80211.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/net80211.4 Sun Jul 12 03:19:25 2009 (r195630) @@ -0,0 +1,1302 @@ +.\"- +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting +.\" 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, +.\" without modification. +.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer +.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any +.\" redistribution must be conditioned upon including a substantially +.\" similar Disclaimer requirement for further binary redistribution. +.\" +.\" NO WARRANTY +.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY +.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL +.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR 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 DAMAGES. +.\" +.\" $FreeBSD$ +.\" +.Dd July 10, 2009 +.Dt NET80211 4 +.Os +.Sh NAME +.Nm net80211 +.Nd standard interface to IEEE 802.11 devices +.Sh SYNOPSIS +.In sys/types.h +.In sys/socket.h +.In net/if.h +.In net/ethernet.h +.In net80211/ieee80211_ioctl.h +.Sh DESCRIPTION +This section describes the standard programming +interface to configure and retrieve status information +for IEEE 802.11 devices that depend on the +.Xr wlan 4 +module for operation. +The interface is via one +of the following +.Xr ioctl 2 +calls on a socket: +.Bl -tag -width ".Dv SIOCG80211" +.It Dv SIOCG80211 +Get configuration or status information. +.It Dv SIOCS80211 +Set configuration information. +.El +.Pp +These requests are made via a modified +.Vt ifreq +structure. +This structure is defined as follows: +.Bd -literal +struct ieee80211req { + char i_name[IFNAMSIZ]; /* if_name, e.g. "wi0" */ + u_int16_t i_type; /* req type */ + int16_t i_val; /* Index or simple value */ + int16_t i_len; /* Index or simple value */ + void *i_data; /* Extra data */ +}; +.Ed +.Pp +Requests that are not supported by the underlying device return +-1 and set the global variable errno to +.Er EOPNOTSUPP . +.Dv SIOCG80211 +requests that return data to an application place small values in +.Va i_val +or in a user-specified buffer pointed to by +.Va i_data . +When an indirect buffer is used +.Va i_len +specifies how large the indirect buffer is and on return it is set by the +system to the actual amount of data returned. +.Dv SIOCS80211 +requests use a similar scheme with data passed to the system taken either +from +.Va i_val +or an indirect buffer pointed to by +.Va i_data . +.Pp +For +.Dv SIOCG80211 +the following values of +.Va i_type +are valid: +.Bl -tag -width indent +.It Dv IEEE80211_IOC_AMPDU +Return whether or not AMPDU is enabled in +.Va i_val . +AMPDU is an aggregation scheme that is part of the 802.11n specification +and is used only when operating on an HT channel. +The value returned is one of: +0 (AMPDU disabled), +1 (AMPDU enabled for transmit), +2 (AMPDU enabled for receive), +and +3 (AMPDU enabled for transmit and receive). +The 802.11n specification says a compliant station must receive AMPDU but +may not support transmitting AMPDU frames. +Disabling AMPDU receive is mainly useful for testing and working around bugs. +.It Dv IEEE80211_IOC_AMPDU_DENSITY +Return the minimum density for bursting AMPDU frames in +.Va i_val . +The value returned is one of: +0 (no time restriction), +1 (1/4 usec), +2 (1/2 usec), +3 (1 usec), +4 (2 usec), +5 (4 usec), +6 (8 usec), +and +7 (16 usec). +.It Dv IEEE80211_IOC_AMPDU_LIMIT +Return the limit on the size of AMPDU frames in +.Va i_val . +The value returned is one of: +0 (8 kilobytes), +1 (16 kilobytes), +2 (32 kilobytes), +and +3 (64 kilobytes). +.It Dv IEEE80211_IOC_AMSDU +Return whether or not AMSDU is enabled in +.Va i_val . +AMSDU is an aggregation scheme that is part of the 802.11n specification +and is used only when operating on an HT channel. +The value returned is one of: +0 (AMSDU disabled), +1 (AMSDU enabled for transmit), +2 (AMSDU enabled for receive), +and +3 (AMSDU enabled for transmit and receive). +The 802.11n specification says a compliant station must receive AMSDU but +may not support transmitting AMSDU frames. +Disabling AMSDU receive is mainly useful for testing and working around bugs. +.It Dv IEEE80211_IOC_AMSDU_LIMIT +Return the limit on the size of AMSDU frames in +.Va i_val . +The value returned is one of: +3839 (bytes) +and +7935 (bytes). +Note these values are specified by 802.11n; arbitrary values are not allowed. +.It Dv IEEE80211_IOC_APBRIDGE +Return whether AP bridging is enabled in +.Va i_val . +Normally packets sent between stations associated +to the same access point are delivered without going through system layers +that do packet filtering; when AP bridging is disabled packets are +passed up the system to be forwarded using some other mechanism. +This value will be non-zero when AP bridging is enabled and otherwise zero. +.It Dv IEEE80211_IOC_APPIE +Return an application information element via +.Va i_data . +Application IE's are maintained for many 802.11 frames; the +request must identify the frame to return an IE for in +.Va i_val . +For example, to retrieve the IE sent in each Beacon frame +.Va i_val +would be set to +.Va IEEE80211_FC0_SUBTYPE_BEACON | IEEE80211_FC0_TYPE_MGT . +If no information element is installed then +.Er EINVAL +is returned. +If the data buffer for returning data is too small to hold the information +element the value is truncated; this permits querying the presence of +data by requesting zero bytes of data be returned. +.It Dv IEEE80211_IOC_AUTHMODE +Return the current authentication mode in +.Va i_val . +Valid values are +.Dv IEEE80211_AUTH_NONE +(no authentication), +.Dv IEEE80211_AUTH_OPEN +(open authentication), +.Dv IEEE80211_AUTH_SHARED +(shared key authentication), +.Dv IEEE80211_AUTH_8021X +(802.1x only authentication), +and +.Dv IEEE80211_AUTH_WPA +(WPA/802.11i/802.1x authentication). +.It Dv IEEE80211_IOC_BEACON_INTERVAL +Return the time between Beacon frames (in TU) in +.Va i_val . +.It Dv IEEE80211_IOC_BGSCAN +Return whether background scanning is enabled in +.Va i_val . +When this value is non-zero and operating in station mode +the station will periodically leave +the current channel and scan for neighboring stations. +See also +.Dv IEEE80211_IOC_BGSCAN_IDLE +and +.Dv IEEE80211_IOC_BGSCAN_INTERVAL . +.It Dv IEEE80211_IOC_BGSCAN_IDLE +Return in +.Va i_val +the minimum time (msecs) a station must be idle +(i.e. not transmitting or receiving frames) +before it will do a background scan. +See also +.Dv IEEE80211_IOC_BGSCAN_INTERVAL . +.It Dv IEEE80211_IOC_BGSCAN_INTERVAL +Return in +.Va i_val +the minimum time (seconds) between background scan operations. +See also +.Dv IEEE80211_IOC_BGSCAN_IDLE . +.It Dv IEEE80211_IOC_BMISSTHRESHOLD +Return in +.Va i_val +the number of consecutive missed Beacon frames before the system will +attempt to roam to a different/better access point. +.It Dv IEEE80211_IOC_BSSID +Return the MAC address for the current BSS identifier via +.Va i_data . +When the interface is running, the bssid is either the value +configured locally (e.g. for an IBSS network started by the local station) +or the value adopted when joing an existing network. +For WDS interfaces this value is the address of the remote station. +When the interface is not running, the bssid returned is the desired +bssid, if any, that has been configured. +.It Dv IEEE80211_IOC_BURST +Return whether or not packet bursting is enabled in +.Va i_val . +If this value is non-zero then the system will try to send packets closely +spaced to improve throughput. +.It Dv IEEE80211_IOC_CHANINFO +Return the set of available channels via +.Va i_data . +Note this data should be used by user applications to map between +channel specifications (frequency and attributes) and IEEE channel numbers +as user applications may not have the necessary information to do +this directly (e.g. for 900MHz radios, operation in the Public Safety Band). +.It Dv IEEE80211_IOC_CHANLIST +Return the current list of usable channels via +.Va i_data . +The channel list is returned as a bit vector with bit N set to 1 if +IEEE channel number N is available for use. +.It Dv IEEE80211_IOC_CHANNEL +Return the IEEE channel number of the current channel in +.Va i_val . +Note this request is deprecated; use +.Dv IEEE80211_IOC_CURCHAN +instead. +.It Dv IEEE80211_IOC_COUNTERMEASURES +Return whether TKIP Countermeasures are enabled in +.Va i_val . +This value will be non-zero when Countermeasures are enabled and +otherwise zero. +.It Dv IEEE80211_IOC_CURCHAN +Return information for the current channel via +.Va i_data . +This information includes the IEEE channel number, the frequency, and +attributes that describe the operating constraints (e.g. Passive Scan, +DFS, usage restrictions). +.It Dv IEEE80211_IOC_DEVCAPS +Return device capabilities in the data buffer pointed at by +.Va i_data . +The buffer must be large enough to return the number of available +channels but otherwise may be made small to limit how much information +is returned. +.It Dv IEEE80211_IOC_DFS +Return whether or not Dynamic Frequency Selection (DFS) is enabled in +.Va i_val . +DFS embodies several facilities including detection of overlapping +radar signals, dynamic transmit power control, and channel selection +according to a least-congested criteria. +DFS support is mandatory for some 5Ghz frequencies in certain +locales (e.g. ETSI). +By default DFS is enabled according to the regulatory definitions +and the curent country code, regdomain, and channel. +.It Dv IEEE80211_IOC_DOTD +Return whether or not 802.11d support is enabled in +.Va i_val . +When 802.11d is enabled in station mode, Beacon frames that advertise +a country code different than the currently configured country code will +cause an event to be dispatched to user applications. +This event can be used by the station to adopt that country code and +operate according to the associated regulatory constraints. +When operating as an access point with 802.11d enabled the Beacon and +ProbeResponse frames transmitted will advertise the current regulatory +domain settings. +.It Dv IEEE80211_IOC_DOTH +Return whether 802.11h support is enabled in +.Va i_val . +When 802.11h is enabled Beacon and ProbeResponse frames will have +the SpectrumMgt bit set in the capabilities field and +country and power constraint information elements will be present. +802.11h support also includes handling Channel Switch Announcements (CSA) +which are a mechanism to coordinate channel changes by an access point. +By default 802.11h is enabled if the device is capable. +.It Dv IEEE80211_IOC_DROPUNENCRYPTED +Return, in +.Va i_val , +whether unencrypted packets transmit/received should be discarded. +This value will be zero if unecrypted packets will be accepted and +non-zero if they are to be discarded. +.It Dv IEEE80211_IOC_DTIM_PERIOD +Return the period (in beacon intervals) between DTIM events in +.Va i_val . +.It Dv IEEE80211_IOC_DWDS +Return, in +.Va i_val , +whether or not Dynamic WDS support is enabled. +Dynamic WDS is a facility by which packets may be tunneled over normal +Infrastructure BSS associations using 4-address (WDS) frames. +.It Dv IEEE80211_IOC_FF +Return, in +.Va i_val , +whether Atheros fast-frames support is enabled. +Fast-frames is a non-standard protocol extension that aggregates multiple +frames to improve throughput. +Note that enabling fast-frames support does not guarantee use; +the client and access point must negotiate its use. +.It Dv IEEE80211_IOC_FRAGTHRESHOLD +Return, in +.Va i_val , +the threshold (in bytes) for enabling fragmentation frames. +Packets larger than this value will automatically be split into multiple +fragmented frames that are sent one after the other. +.It Dv IEEE80211_IOC_GREENFIELD +Return, in +.Va i_val , +whether or not Greenfield preamble use is enabled. +This setting is meaningful only when operating with 802.11n on an HT channel. +.It Dv IEEE80211_IOC_HIDESSID +Return, in +.Va i_val , +whether SSID hiding/cloaking is enabled. +SSID hiding is only meaningful when operating as an access point. +When this is enabled Beacon frames do not include the SSID and +ProbeRequest frames are not answered unless they include the AP's SSID. +This value will be non-zero when SSID hiding is enabled and otherwise zero. +.It Dv IEEE80211_IOC_HTCOMPAT +Return, in +.Va i_val , +whether or not 802.11n compatibility support is enabled. +The 802.11n protocol specification went through several incompatible iterations. +Some vendors implemented 11n support to older specifications that +will not interoperate with a purely 11n-compliant station. +In particular the information elements included in management frames +for old devices are different. +When compatibility support is enabled both standard and compatible data +will be provided and/or accepted. +.It Dv IEEE80211_IOC_HTCONF +Return the setting for automatic promotion of HT channels in +.Va i_val . +Promotion happens when the system must select a channel and may choose +between legacy, HT20, and HT40 operation (e.g. when scanning). +Valid values are: +0 (do not promote, use legacy), +1 (promote to HT20), +and +2 (promote to HT40), +.It Dv IEEE80211_IOC_HTPROTMODE +Return, in +.Va i_val , +the technique used to protect HT frames in a mixed 802.11n network. +Valid values are: +.Dv IEEE80211_PROTMODE_OFF +(no protection enabled) +and +.Dv IEEE80211_PROTMODE_RTSCTS +(send RTS and wait for CTS). +.It Dv IEEE80211_IOC_HWMP_MAXHOPS +Return the maximum acceptable hop count in an HWMP path in +.Va i_val . +.It Dv IEEE80211_IOC_HWMP_ROOTMODE +Return the setting for Mesh root mode operation in +.Va i_val . +Valid values are: +.Dv IEEE80211_HWMP_ROOTMODE_DISABLED +(root mode is disabled), +.Dv IEEE80211_HWMP_ROOTMODE_NORMAL +(send broadcast Path Request frames), +.Dv IEEE80211_HWMP_ROOTMODE_PROACTIVE +(send broadcast Path Request frames and force replies) +and +.Dv IEEE80211_HWMP_ROOTMODE_RANN +(send broadcast Root Announcement (RANN) frames). +.It Dv IEEE80211_IOC_INACTIVITY +Return whether or not the system handles inactivity processing in +.Va i_val . +When inactivity processing is enabled the system will track stations +that have not trasmitted frames and periodically probe them to +check if they are still present. +Stations that are inactive and do not respond to probes are dropped. +.It Dv IEEE80211_IOC_MACCMD +Return information about the state of the MAC address +access control list (ACL) system. +There are two requests supported: +.Dv IEEE80211_MACCMD_POLICY +(to retrieve the current policy in +.Va i_val ), +and +.Dv IEEE80211_MACCMD_LIST +to retrieve the list installed/active ACL's via +.Va i_data . +The +.Xr wlan_acl 4 +module must be installed and enabled or +.Er EINVAL +will be returned. +.It Dv IEEE80211_IOC_MESH_AP +Return whether or not Mesh AP support is enabled in +.Va i_val . +.It Dv IEEE80211_IOC_MESH_ID +Return the Mesh ID in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_MESH_FWRD +Return whether or not packet forwarding support is enabled in +.Va i_val . +.It Dv IEEE80211_IOC_MESH_PP_METRIC +Return the link metric protocol in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_MESH_PP_PATH +Return the path selection protocol in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_MESH_RTCMD +Return information about the state of the Mesh routing tables. +One request is supported: +.Dv IEEE80211_MESH_RTCMD_LIST +to retrieve the contents of the routing table in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_MESH_TTL +Return, in +.Va i_val , +the Mesh Time To Live (TTL) setting installed in packets +transmitted by this mesh node. +.It Dv IEEE80211_IOC_NUMSSIDS +Return the number of SSIDs supported in +.Va i_val . +.It Dv IEEE80211_IOC_NUMWEPKEYS +Return the number of WEP keys supported in +.Va i_val +.It Dv IEEE80211_IOC_POWERSAVE +Return the current powersaving mode in +.Va i_val . +Valid values are +.Dv IEEE80211_POWERSAVE_OFF +(power save operation is disabled) +and +.Dv IEEE80211_POWERSAVE_ON +(power save operation is enabled). +.It Dv IEEE80211_IOC_POWERSAVESLEEP +Return the powersave sleep time in TU in +.Va i_val . +This value is also termed the listen interval and represents the maximum time +a station will sleep before waking to retrieve packets buffered by +an access point. +.It Dv IEEE80211_IOC_PRIVACY +Return the current MLME setting for PRIVACY in +.Va i_val . +When PRIVACY is enabled all data packets must be encrypted. +This value will be zero if PRIVACY is disabled and +non-zero when PRIVACY is enabled. +.It Dv IEEE80211_IOC_PROTMODE +Return the current 802.11g protection mode in +.Va i_val . +Protection is the mechanism used to safeguard 802.11b stations operating +on an 802.11g network. +Valid values are +.Dv IEEE80211_PROTMODE_OFF +(no protection enabled), +.Dv IEEE80211_PROTMODE_CTS +(send CTS to yourself), +and +.Dv IEEE80211_PROTMODE_RTSCTS +(send RTS and wait for CTS). +.It Dv IEEE80211_IOC_PUREG +Return whether ``pure 11g'' mode is enabled in +.Va i_val . +This setting is meaningful only for acces point operation; +when non-zero, 802.11b stations will not be allowed to associate. +.It Dv IEEE80211_IOC_PUREN +Return whether ``pure 11n'' mode is enabled in +.Va i_val . +This setting is meaningful only for acces point operation; +when non-zero, legacy (non-11n capable) stations will not be +allowed to associate. +.It Dv IEEE80211_IOC_REGDOMAIN +Return the regulatory state in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_RIFS +Return whether or not Reduced InterFrame Spacing (RIFS) is enabled in +.Va i_val . +This setting is meaningful only when operating with 802.11n on an HT channel. +.It Dv IEEE80211_IOC_ROAM +Return station roaming parameters in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_ROAMING +Return the current roaming mode in +.Va i_val . +Roaming mode specifies which entity controls operation of the MLME +state machine when operating as a station in an Infrastructure BSS. +Valid values are: +.Dv IEEE80211_ROAMING_DEVICE +(driver/firmware is in control), +.Dv IEEE80211_ROAMING_AUTO +(host 802.11 layer is in control), +and +.Dv IEEE80211_ROAMING_MANUAL +(application is in control). +.It Dv IEEE80211_IOC_RTSTHRESHOLD +Return the threshold (in bytes) for enabling transmission of RTS frames in +.Va i_val . +Packets larger than this value will automatically have an RTS frame +sent preceding it to reduce the likelihood of packet loss. +.It Dv IEEE80211_IOC_SCAN_RESULTS +Return the current contents of the scan cache in the data area pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_SCANVALID +Return in +.Va i_val +how long (in seconds) results from a scan operation will be considered valid. +When scan results are no longer valid and they are needed (e.g. to roam) the +system will initiate a scan operation to replenish the scan cache. +.It Dv IEEE80211_IOC_SHORTGI +Return whether or not Short Guard Interval (SGI) is enabled in +.Va i_val . +Note SGI is only used when operating with 802.11n on an HT channel. +.It Dv IEEE80211_IOC_SMPS +Return the Spatial Multiplexing Power Save (SMPS) setting in +.Va i_val . +This setting is meaningful only when operating with 802.11n on an HT channel. +Valid values are: +.Dv IEEE80211_HTCAP_SMPS_DYNAMIC +(Dynamic SMPS is enabled), +.Dv IEEE80211_HTCAP_SMPS_ENA +(Static SMPS is enabled), +and +.Dv IEEE80211_HTCAP_SMPS_OFF +(SMPS is disabled). +.It Dv IEEE80211_IOC_SSID +Return the requested SSID in the buffer pointed to by +.Va i_data . +If +.Va i_val +is \(>= 0 then the request refers to the configured value for that slot. +Generally, 0 is the only valid value, but some interfaces support more +SSIDs. +.It Dv IEEE80211_IOC_STA_INFO +Return information about the current state of the specified station(s) via +.Va i_data . +The MAC address of a single station may be passed in or, if the broadcast +address is supplied, information about all stations will be returned. +If a single station is requested and the MAC address is unknown then +.Er ENOENT +will be returned. +.It Dv IEEE80211_IOC_STA_STATS +Return collected statistics for the specified station via +.Va i_data . +The MAC address of the desired station is passed in; if it is unknown +.Er ENOENT +will be returned. +.It Dv IEEE80211_IOC_STA_VLAN +Return any VLAN tag assigned to a station via +.Va i_data . +.It Dv IEEE80211_IOC_TDMA_SLOT +Return the slot number for the station in +.Va i_val . +Slot number zero is the master station in a TDMA network. +.It Dv IEEE80211_IOC_TDMA_SLOTCNT +Return the count of slots in the TDMA network in +.Va i_val . +.It Dv IEEE80211_IOC_TDMA_SLOTLEN +Return the length (in usecs) of the TDMA slot assigned to each +station in the network in +.Va i_val . +.It Dv IEEE80211_IOC_TDMA_BINTERVAL +Return the number of superframes between Beacon frames in +.Va i_val . +A TDMA network with N slots and slot length T has a superframe of NxT. +.It Dv IEEE80211_IOC_TSN +Return whether or not Transitional Security Network (TSN) is enabled in +.Va i_val . +.It Dv IEEE80211_IOC_TURBOP +Return whether Atheros Dynamic Turbo mode is enabled in +.Va i_val . +Dynamic Turbo mode is a non-standard protocol extension available only +on Atheros devices where channel width is dynamically +changed between 20MHz and 40MHz. +Note tht enabling Dynamic Turbo mode support does not guarantee use; +both client and access point must use Atheros devices and support must +be enabled on both sides. +.It Dv IEEE80211_IOC_TXPARAMS +Return transmit parameters in the buffer pointed to by +.Va i_data . +.It Dv IEEE80211_IOC_TXPOWER +Return the transmit power limit in .5 dBm units in +.Va i_val . +This value represents the effective maximum and is calculated according to +the maximum power allowed by local regulations, any user-specified +power limit, and the maximum power the device is capable of. +.It Dv IEEE80211_IOC_TXPOWMAX +Return the user-specified maximum transmit power in .5 dBm units in +.Va i_val . +The maximum setting is applied after any regulatory cap. +.It Dv IEEE80211_IOC_WEP +Return the current WEP status in +.Va i_val . +Valid values are: +.Dv IEEE80211_WEP_ON +(enabled for all packets sent and received), +.Dv IEEE80211_WEP_OFF +(disabled), +and +.Dv IEEE80211_WEP_MIXED +(enabled for transmit and receive but also willing to receive +unencrypted frames). +This request is deprecated; use +.Dv IEEE80211_IOC_PRIVACY +and +.Dv IEEE80211_IOC_UNENCRYPTED +instead. +.It Dv IEEE80211_IOC_WEPKEY +Return the requested WEP key via +.Va i_data . +The key number is specified in +.Va i_val +and may be 0-3. +If the device does not support returning the WEP key or the user is not +root then the key may be returned as all zeros. +This request is deprecated in favor of +.Dv IEEE80211_IOC_WPAKEY . +.It Dv IEEE80211_IOC_WEPTXKEY +Return the number of the WEP key used for transmission in +.Va i_val . +.It Dv IEEE80211_IOC_WME +Return whether 802.11e/WME/WMM support is enabled in +.Va i_val . +This value will be non-zero when support is enabled and otherwise zero. +.It Dv IEEE80211_IOC_WME_CWMIN +Return the WME CWmin setting (log2) for the specified Access Class (AC) in +.Va i_val . +The AC is passed in through +.Va i_len +together with an optional IEEE80211_WMEPARAM_BSS flag to indicate if the +parameter for the BSS or the channel is desired. +If WME is not supported then +.Er EINVAL +wil be returned. +.It Dv IEEE80211_IOC_WME_CWMAX +Return the WME CWmax setting (log2) for the specified Access Class (AC) in +.Va i_val . +See +.Dv IEEE80211_IOC_WME_CWMIN +above for more details. +.It Dv IEEE80211_IOC_WME_AIFS +Return the WME AIFS setting for the specified Access Class (AC) in +.Va i_val . +See +.Dv IEEE80211_IOC_WME_CWMIN +above for more details. +.It Dv IEEE80211_IOC_WME_TXOPLIMIT +Return the WME TxOpLimit (msec) for the specified Access Class (AC) in +.Va i_val . +See +.Dv IEEE80211_IOC_WME_CWMIN +above for more details. +.It Dv IEEE80211_IOC_WME_ACM +Return the WME Admission Control Mechanism (ACM) setting +for the specified Access Class (AC) in +.Va i_val . +This value is meaningful only for the BSS (not channel). +See +.Dv IEEE80211_IOC_WME_CWMIN +above for more details. +.It Dv IEEE80211_IOC_WME_ACKPOLICY +Return the WME ACK Policy setting +for the specified Access Class (AC) in +.Va i_val . +When this value is zero frames will be transmitted without waiting for +an Acknowledgement. +This value is meaningful only for the channel (not BSS). +See +.Dv IEEE80211_IOC_WME_CWMIN +above for more details. +.It Dv IEEE80211_IOC_WPA +Return the WPA configuration in +.Va i_val . +Valid values are +0 (WPA is not enabled), +1 (WPA1 is enabled), +2 (WPA2/802.11i is enabled), +and +3 (WPA1 and WPA2/802.11i are both enabled). +.It Dv IEEE80211_IOC_WPAIE +Return any WPA information element for an associated station via +.Va i_data . +The request passed in through +.Va i_data +identifies the MAC address of the desired station. +If an RSN (802.11i) element is present it is returned; otherwise any WPA +element is returned. +Note this request is deprecated; use +.Dv IEEE80211_IOC_WPAIE2 +instead. +.It Dv IEEE80211_IOC_WPAIE2 +Return any WPA information elements for an associated station via +.Va i_data . +The request passed in through +.Va i_data +identifies the MAC address of the desired station. +One or both of RSN (802.11i) and WPA elements may be returned. +.It Dv IEEE80211_IOC_WPAKEY +Return the requested cryptographic key in the buffer pointed to by +.Va i_data . +The key number is specified in +.Va i_val +and may be 0-3. +A key number of zero is used to retrieve a station's unicast cipher key +when operating with WPA enabled. +If the user is not root then the key data returned is all zeros. +.It Dv IEEE80211_IOC_WPS +Return whether or not Wi-FI Protected Setup (WPS) is enabled in +.Va i_val . +.El +.Pp +For +.Dv SIOCS80211 +the following values of +.Va i_type +are valid. +Note that changing a value on an interface that is running may +cause the interface to be +.Sq reset . +Resets may be handled without altering the state if the parameter +does not affect the MLME state (e.g. RTS threshold), but in some +cases the interface may need to scan for a new network or clear +state (including any associated stations); in that case the interface +is said to be +.Sq restarted +(it is equivalent to marking the interface down and back up). +The information below identifies whether changing a value affects the +state of a running interface. +.Bl -tag -width indent +.It Dv IEEE80211_IOC_ADDMAC +Add an entry to the MAC address Access Control List (ACL) database using +the value pointed to by +.Va i_data . +The +.Xr wlan_acl 4 +module must be installed and enabled or +.Er EINVAL +will be returned. +.It Dv IEEE80211_IOC_AMPDU +Set whether or not AMPDU is enabled for transmit and/or receive +using the value in +.Va i_val . +This request causes a running interface operating on an HT channel +to be reset. +See +.Dv IEEE80211_IOC_AMPDU +above for details. +.It Dv IEEE80211_IOC_AMPDU_DENSITY +Set the minimum density for bursting AMPDU frames to the value in +.Va i_val . +This request causes a running interface to be reset. +See +.Dv IEEE80211_IOC_AMPDU_DENSITY +above for details. +.It Dv IEEE80211_IOC_AMPDU_LIMIT +Set the limit on the size of AMPDU frames to the value in +.Va i_val . +This request causes a running interface to be reset. +See +.Dv IEEE80211_IOC_AMPDU_LIMIT +above for details. +.It Dv IEEE80211_IOC_AMSDU +Set whether or not AMSDU is enabled for transmit and/or receive +using the value in +.Va i_val . +This request causes a running interface operating on an HT channel +to be reset. +See +.Dv IEEE80211_IOC_AMSDU +above for details. +.It Dv IEEE80211_IOC_AMSDU_LIMIT +Set the limit on the size of AMSDU frames to the value in +.Va i_val . +This request causes a running interface to be reset. +See +.Dv IEEE80211_IOC_AMSDU_LIMIT +above for details. +.It Dv IEEE80211_IOC_APBRIDGE +Set whether AP bridging is enabled using the value in +.Va i_val . +See +.Dv IEEE80211_IOC_APBRIDGE +above for details. +.It Dv IEEE80211_IOC_APPIE +Set an application information element using the data pointed to by +.Va i_data . +This request causes a running interface to be restarted if the WPA +information element is changed. +See +.Dv IEEE80211_IOC_APPIE +above for details. +.It Dv IEEE80211_IOC_AUTHMODE +Set the current authentication mode using the value in +.Va i_val . +This request causes a running interface to be restarted. +See +.Dv IEEE80211_IOC_AUTHMODE +above for details. +This request causes a running interface to be restarted. +.It Dv IEEE80211_IOC_BEACON_INTERVAL +Set the time between Beacon frames (in TU) to the value in +.Va i_val . +This request causes a running interface to be restarted. +.It Dv IEEE80211_IOC_BGSCAN +Set whether background scanning is enabled using the value in +.Va i_val . +.It Dv IEEE80211_IOC_BGSCAN_IDLE +Set the minimum time (in msecs) a station must be idle +before it will do a background scan to the value in +.Va i_val . +.It Dv IEEE80211_IOC_BGSCAN_INTERVAL +Set the minimum time (seconds) between background scan operations to the value in +.Va i_val . +.It Dv IEEE80211_IOC_BMISSTHRESHOLD +Set the number of consecutive missed Beacon frames before the system will +attempt to roam to the value in +.Va i_val . +This request causes a running interface to be reset. +.It Dv IEEE80211_IOC_BSSID +Set the 802.11 MAC address for the desired BSS identifier according to +.Va i_data . +This request causes a running interface to be restarted. +.It Dv IEEE80211_IOC_BURST +Set whether or not packet bursting is enabled using the value in +.Va i_val . +This request causes a running interface to be reset. +.It Dv IEEE80211_IOC_CHANNEL +Set the desired/current channel to the value given by +.Va i_val . +This request causes a running interface to +immediately change to the specified channel if possible; +otherwise the interface will be restarted. +Note this request is deprecated; use +.Dv IEEE80211_IOC_CURCHAN +instead. +.It Dv IEEE80211_IOC_CHANLIST +Set the list of available channels using the channel list pointed to by +.Va i_data . +The channel list is a bit vector with bit N set to 1 if +IEEE channel number N is available for use. +The specified channel list is checked against the set of supported +channels and any channels not supported are silently ignored. +If the intersection of the channel list and the supported channels is empty +.Er EINVAL +is returned. +Note the current channel may be marked invalid after installing a +new channel list. +This request causes a running interface to be restarted. +.It Dv IEEE80211_IOC_COUNTERMEASURES +Set whether TKIP Countermeasures are enabled using the value in +.Va i_val . +This request can only be used when the authentication mode is set +WPA; otherwise +.Er EOPNOTSUPP +will be returned. +.It Dv IEEE80211_IOC_CURCHAN +Set the current channel using the information referenced by +.Va i_data . +This request causes a running interface to +immediately change to the specified channel if possible; +otherwise the interface will be restarted. +.It Dv IEEE80211_IOC_DELKEY +Delete the key specified by the information referenced by +.Va i_data . +.It Dv IEEE80211_IOC_DELMAC +Remove an entry in the MAC address Access Control List (ACL) database using +the value pointed to by +.Va i_data . +The +.Xr wlan_acl 4 +module must be installed and enabled or +.Er EINVAL +will be returned. +.It Dv IEEE80211_IOC_DFS +Set whether or not Dynamic Frequency Selection (DFS) is enabled +using the value in +.Va i_val . +This request will fail with +.Er EINVAL +if 802.11h support is not enabled. +See +.Dv IEEE80211_IOC_DFS +above for details. +.It Dv IEEE80211_IOC_DOTD +Set whether or not 802.11d support is enabled using the value in +.Va i_val . +This request causes a running interface to be restarted. +See +.Dv IEEE80211_IOC_DOTD +above for details. +.It Dv IEEE80211_IOC_DOTH +Return whether 802.11h support is enabled using the value in +.Va i_val . +See +.Dv IEEE80211_IOC_DOTH +above for details. +.It Dv IEEE80211_IOC_DROPUNENCRYPTED +Set whether unencrypted packets transmit/received should be discarded +using the value in +.Va i_val . +.It Dv IEEE80211_IOC_DTIM_PERIOD +Set the period (in beacon intervals) between DTIM events to the value in +This request causes a running interface to be restarted. +.Va i_val . +.It Dv IEEE80211_IOC_DWDS +Set whether or not Dynamic WDS support is enabled using the value in +.Va i_val . +See +.Dv IEEE80211_IOC_DWDS +above for details. +.It Dv IEEE80211_IOC_FF +Set whether Atheros fast-frames support is enabled using the value in +.Va i_val . +This request causes a running interface to be restarted. +See +.Dv IEEE80211_IOC_FF +above for details. +.It Dv IEEE80211_IOC_FRAGTHRESHOLD +Set the threshold (in bytes) for enabling fragmentation frames using the value in +.Va i_val . +This request causes a running interface to be reset. +See +.Dv IEEE80211_IOC_FRAGTHRESHOLD +above for details. +.It Dv IEEE80211_IOC_GREENFIELD +Set whether or not Greenfield preamble use is enabled using the value in +.Va i_val . +This request causes a running interface to be reset. +See +.Dv IEEE80211_IOC_GREENFIELD +above for details. +.It Dv IEEE80211_IOC_HIDESSID +Set whether SSID hiding/cloaking is enabled using the value in +.Va i_val . +This request causes a running interface to be reset. +See +.Dv IEEE80211_IOC_HIDESSID +above for details. +.It Dv IEEE80211_IOC_HTCOMPAT +Set whether or not 802.11n compatibility support is enabled using the value in +.Va i_val . +This request causes a running interface to be reset if operating on HT channel. +See +.Dv IEEE80211_IOC_HTCOMPAT +above for details. +.It Dv IEEE80211_IOC_HTCONF +Set automatic promotion of HT channels using the value in +.Va i_val . +This request causes a running interface to be restarted. +See +.Dv IEEE80211_IOC_HTCONF +above for details. +.It Dv IEEE80211_IOC_HTPROTMODE +Set the technique used to protect HT frames in a mixed 802.11n network +using the value in +.Va i_val . *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 03:40:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6F84106564A; Sun, 12 Jul 2009 03:40:04 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id 8AD2C8FC13; Sun, 12 Jul 2009 03:40:03 +0000 (UTC) (envelope-from minimarmot@gmail.com) Received: by ey-out-2122.google.com with SMTP id 9so374350eyd.3 for ; Sat, 11 Jul 2009 20:40:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=jOZnx93KOS+npQm76AUmNeaF+CUuErUvuSkluXbCXdc=; b=f9pPBATI4TAZ3vcf6lqhNpSaIG4dTjaSx/erIG9csKPwUXFLEQypu55/lVTyrTuTiY liFYvh5S06IRlTQv2m3camPuqfQ0kwDopCHjrDbo5LEfLCzWiif6BnnSUxDcuC9M70/q GnI8sM1hq1oFZy1Pp2br7c2ZEMszEvrLH4Z2g= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=ajj0fULdEkKXSn/Zk+xm3ulWbfYA4cJp+yU6FyWtJqvFLnLXCk+6EzEu5YSnR3lA3y 3i8UbtMfEZNPuT0SsUQBJYc3pLBFbK2psMTfQThhLQjkgjrTEHaxxKeTV6OPmfDJOoYj Icr8cjYU7QbzPfDEeu2nbTPxQE/y33xPqsOc8= MIME-Version: 1.0 Received: by 10.210.142.6 with SMTP id p6mr3179170ebd.76.1247370002575; Sat, 11 Jul 2009 20:40:02 -0700 (PDT) In-Reply-To: <200907111525.n6BFPDrY056196@svn.freebsd.org> References: <200907111525.n6BFPDrY056196@svn.freebsd.org> Date: Sat, 11 Jul 2009 23:40:02 -0400 Message-ID: <47d0403c0907112040v785b6f4se7e927809035b3b5@mail.gmail.com> From: Ben Kaduk To: Joel Dahl Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ariff@freebsd.org Subject: Re: svn commit: r195619 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 03:40:05 -0000 On Sat, Jul 11, 2009 at 11:25 AM, Joel Dahl wrote: > Author: joel (doc committer) > Date: Sat Jul 11 15:25:13 2009 > New Revision: 195619 > URL: http://svn.freebsd.org/changeset/base/195619 > > Log: > Document the new multichannel support. > > Reviewed by: ariff > Approved by: re (blanket) > > Modified: > head/share/man/man4/pcm.4 > > Modified: head/share/man/man4/pcm.4 > ============================================================================== > --- head/share/man/man4/pcm.4 Sat Jul 11 15:02:45 2009 (r195618) > +++ head/share/man/man4/pcm.4 Sat Jul 11 15:25:13 2009 (r195619) > @@ -25,7 +25,7 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd July 9, 2009 > +.Dd July 11, 2009 > .Dt SOUND 4 > .Os > .Sh NAME > @@ -141,6 +141,30 @@ To define default values for the differe > set the channel to the preferred value using hints, e.g.: > .Va hint.pcm.0.line Ns = Ns Qq Li 0 . > This will mute the input channel per default. > +.Ss Multichannel Audio > +Multichannel audio, popularly referred to as > +.Dq surround sound > +is supported and enabled by default. > +The FreeBSD multichannel matrix processor supports up to 18 interleaved > +channels, but the limit is currently set to 8 channels (known as 7.1). The expression "known as 7.1" is a bit odd. Maybe "as commonly used for 7.1"? > +The internal matrix mapping can handle reduction, expansion or > +re-routing of channels. > +This provides a base interface for related multichannel > +.Fn ioctl > +support. > +Works with or without > +.Tn VCHANs . This sentence has no subject. Is the intent to say "multichannel audio works with both software VCHANs and hardware channels"? > +Most bridge device drivers are still missing multichannel matrixing support > +, but in most cases this should be trivial to implement. > +Use the > +.Va dev.pcm.%d.[play|rec].vchanformat > +.Xr sysctl(8) Pedantically, this is a sysctl node, though the meaning is probably clear enough with the current text. > +to adjust the number of channels used. > +The current multichannel interleaved structure and arrangement was > +implemented by inspecting various popular UNIX applications. > +There were no single standard, so much care has been taken to try > +to satisfy each possible scenario, despite the fact that each > +application has its own conflicting standard. > .Ss EQ > The Parametric Software Equlizer (EQ) enables the use of > .Dq tone > @@ -407,6 +431,32 @@ Format for > mixing. > All playback paths will be converted to this format before the mixing > process begins. > +By default only 2 channels are enabled. > +Available options include: > +.Bl -tag -width 2n > +.It s16le:1.0 > +Mono > +.It s16le:2.0 > +Stereo, 2 channels, (left, right). The second comma is probably spurious (cf. quadrophonic, below). > +.It s16le:2.1 > +3 channels (left, right, LFE). > +.It s16le:3.0 > +3 channels (left, right, rear center). > +.It s16le:4.0 > +Quadraphonic, 4 channels (front/rear left and right). > +.It s16le:4.1 > +5 channels (4.0 + LFE). > +.It s16le:5.0 > +5 channels (4.0 + center). > +.It s16le:5.1 > +6 channels (4.0 + center + LFE). > +.It s16le:6.0 > +6 channels (4.0 + front/rear center). > +.It s16le:6.1 > +7 channels (6.0 + LFE). > +.It s16le:7.1 > +8 channels (4.0 + center + LFE + left and right side). > +.El It would be nice to be consistent about using "and", "+" or neither for the parentheticals. Also, "LFE" does not appear to be expanded to "low frequency enhancement" anywhere .... Documentation nits aside, I'm really glad to have this audio work hit the tree -- my primary audio setup is currently based on a box running -current. -Ben Kaduk From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 03:53:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AFD81065675; Sun, 12 Jul 2009 03:53:52 +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 690F68FC18; Sun, 12 Jul 2009 03:53:52 +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 n6C3rqXM071586; Sun, 12 Jul 2009 03:53:52 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6C3rqeD071584; Sun, 12 Jul 2009 03:53:52 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200907120353.n6C3rqeD071584@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 12 Jul 2009 03:53: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: r195631 - head/sys/nfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 03:53:53 -0000 Author: marcel Date: Sun Jul 12 03:53:52 2009 New Revision: 195631 URL: http://svn.freebsd.org/changeset/base/195631 Log: Revert rev 192323 (nfs_common.c only): The D-cache flushing added here was to deal with I-cache incoherency observed on ia64. However, the problem was in the implementation of pmap_enter_object() for ia64: it was missing I-cache coherency logic for prefaulted pages. After this got added in rev 195625, testing showed that no D-cache flushing was required. The SIGILL that was observed on Book-E (see commit log for rev 192323) ended up not being related to I-cache incoherency, but was found to be caused by bad memory. This discovery further undermined the need for D-cache flushing in the NFS I/O code, triggering the reversal. Approved by: re (kensmith) Modified: head/sys/nfs/nfs_common.c Modified: head/sys/nfs/nfs_common.c ============================================================================== --- head/sys/nfs/nfs_common.c Sun Jul 12 03:19:25 2009 (r195630) +++ head/sys/nfs/nfs_common.c Sun Jul 12 03:53:52 2009 (r195631) @@ -126,10 +126,9 @@ nfsm_mbuftouio(struct mbuf **mrep, struc (mbufcp, uiocp, xfer); else #endif - if (uiop->uio_segflg == UIO_SYSSPACE) { + if (uiop->uio_segflg == UIO_SYSSPACE) bcopy(mbufcp, uiocp, xfer); - cpu_flush_dcache(uiocp, xfer); - } else + else copyout(mbufcp, uiocp, xfer); left -= xfer; len -= xfer; From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 04:07:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB49106566B; Sun, 12 Jul 2009 04:07:52 +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 CB9A98FC08; Sun, 12 Jul 2009 04:07:52 +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 n6C47q5S071888; Sun, 12 Jul 2009 04:07:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6C47qGi071886; Sun, 12 Jul 2009 04:07:52 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <200907120407.n6C47qGi071886@svn.freebsd.org> From: Nathan Whitehorn Date: Sun, 12 Jul 2009 04:07: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: r195632 - head/sys/powerpc/aim X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 04:07:53 -0000 Author: nwhitehorn Date: Sun Jul 12 04:07:52 2009 New Revision: 195632 URL: http://svn.freebsd.org/changeset/base/195632 Log: Increase the size of the page table on 64-bit PowerPC machines as a bandaid to prevent exhaustion of the primary and secondary hash groups in the event of extreme stress on the PMAP layer (e.g. a forkbomb). This wastes memory, and should be revised to properly handle PTEG spills instead. Suggested by: grehan Approved by: re (kensmith) Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Sun Jul 12 03:53:52 2009 (r195631) +++ head/sys/powerpc/aim/mmu_oea64.c Sun Jul 12 04:07:52 2009 (r195632) @@ -781,8 +781,6 @@ moea64_bridge_bootstrap(mmu_t mmup, vm_o while (moea64_pteg_count < physmem) moea64_pteg_count <<= 1; - - moea64_pteg_count >>= 1; #endif /* PTEGCOUNT */ size = moea64_pteg_count * sizeof(struct lpteg); From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 04:48:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF39A106564A; Sun, 12 Jul 2009 04:48:47 +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 CD4748FC18; Sun, 12 Jul 2009 04:48:47 +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 n6C4mlIp072703; Sun, 12 Jul 2009 04:48:47 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6C4mlxt072700; Sun, 12 Jul 2009 04:48:47 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200907120448.n6C4mlxt072700@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 12 Jul 2009 04:48: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: r195633 - in head/sys: conf sun4v/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 04:48:48 -0000 Author: marcel Date: Sun Jul 12 04:48:47 2009 New Revision: 195633 URL: http://svn.freebsd.org/changeset/base/195633 Log: Rename option USBVERBOSE to USB_VERBOSE for 2 reasons: 1. USB_VERBOSE is more consistent with USB_DEBUG, 2. sys/dev/usb/usb_device.c uses option USB_VERBOSE and not USBVERBOSE. POLA with the USBVERBOSE option as it's found in 7-STABLE has been considered but found insignificant in the face of the USB stack overhaul. Approved by: re (kensmith) Modified: head/sys/conf/options head/sys/sun4v/conf/GENERIC Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sun Jul 12 04:07:52 2009 (r195632) +++ head/sys/conf/options Sun Jul 12 04:48:47 2009 (r195633) @@ -631,7 +631,7 @@ BUS_DEBUG opt_bus.h # options for USB support USB_DEBUG opt_usb.h -USBVERBOSE opt_usb.h +USB_VERBOSE opt_usb.h USB_EHCI_BIG_ENDIAN_DESC opt_usb.h U3G_DEBUG opt_u3g.h UKBD_DFLT_KEYMAP opt_ukbd.h Modified: head/sys/sun4v/conf/GENERIC ============================================================================== --- head/sys/sun4v/conf/GENERIC Sun Jul 12 04:07:52 2009 (r195632) +++ head/sys/sun4v/conf/GENERIC Sun Jul 12 04:48:47 2009 (r195633) @@ -208,7 +208,7 @@ device ums # Mouse #options KTR #options KTR_MASK=(KTR_TRAP) #options USB_DEBUG -#options USBVERBOSE +#options USB_VERBOSE #options DEBUG_LOCKS #options DEBUG_VFS_LOCKS From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 08:27:59 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BEB6E106564A; Sun, 12 Jul 2009 08:27:59 +0000 (UTC) (envelope-from prvs=1437942421=brian@Awfulhak.org) Received: from idcmail-mo1so.shaw.ca (idcmail-mo1so.shaw.ca [24.71.223.10]) by mx1.freebsd.org (Postfix) with ESMTP id 33F948FC08; Sun, 12 Jul 2009 08:27:59 +0000 (UTC) (envelope-from prvs=1437942421=brian@Awfulhak.org) Received: from pd4ml2so-ssvc.prod.shaw.ca ([10.0.141.136]) by pd3mo1so-svcs.prod.shaw.ca with ESMTP; 12 Jul 2009 02:00:05 -0600 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.0 c=1 a=EWNm_wjlFqYA:10 a=4Z0QP1WVBuUwHZGQKe2N1A==:17 a=6I5d2MoRAAAA:8 a=MMwg4So0AAAA:8 a=T8zZneuBG7IdSop2wwwA:9 a=me4XV7-WuLOwEnSp5ZMA:7 a=g3B8dPg0RoKtagHlef2POzrIIacA:4 a=SV7veod9ZcQA:10 a=WJ3hkfHDukgA:10 Received: from unknown (HELO store.lan.Awfulhak.org) ([174.7.23.140]) by pd4ml2so-dmz.prod.shaw.ca with ESMTP; 12 Jul 2009 02:00:05 -0600 Received: from store.lan.Awfulhak.org (localhost.localdomain [127.0.0.1]) by localhost (Email Security Appliance) with SMTP id D3B01C433AC_A599842B; Sun, 12 Jul 2009 08:01:06 +0000 (GMT) Received: from gw.Awfulhak.org (gw.lan.Awfulhak.org [172.16.0.1]) by store.lan.Awfulhak.org (Sophos Email Appliance) with ESMTP id 84BCCC460FC_A59983CF; Sun, 12 Jul 2009 08:01:00 +0000 (GMT) Received: from dev.lan.Awfulhak.org (brian@dev.lan.Awfulhak.org [172.16.0.5]) by gw.Awfulhak.org (8.14.3/8.14.3) with ESMTP id n6C7xw8q081328; Sun, 12 Jul 2009 00:59:58 -0700 (PDT) (envelope-from brian@Awfulhak.org) Date: Sun, 12 Jul 2009 00:59:57 -0700 From: Brian Somers To: Colin Percival Message-ID: <20090712005957.5f395c96@dev.lan.Awfulhak.org> In-Reply-To: <200907112230.n6BMUbXE065104@svn.freebsd.org> References: <200907112230.n6BMUbXE065104@svn.freebsd.org> X-Mailer: Claws Mail 3.7.2 (GTK+ 2.16.4; i386-portbld-freebsd8.0) 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: r195626 - in head: contrib/amd/amd contrib/ntp/scripts contrib/sendmail/cf/sh secure/lib/libcrypto sys/contrib/dev/acpica/compiler sys/dev/hptrr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 08:28:00 -0000 On Sat, 11 Jul 2009 22:30:37 +0000 (UTC) Colin Percival wrote: > Author: cperciva > Date: Sat Jul 11 22:30:37 2009 > New Revision: 195626 > URL: http://svn.freebsd.org/changeset/base/195626 > > Log: > Remove build timestamps from the following files: > /boot/kernel/hptrr.ko > /etc/mail/*.cf > /lib/libcrypto.so.5 > /usr/bin/ntpq > /usr/sbin/amd > /usr/sbin/iasl > /usr/sbin/ntpd > /usr/sbin/ntpdate > /usr/sbin/ntpdc > > There does not appear to be any purpose to having these timestamps, and > they have the irritating consequence that the aforementioned files will > be different every time they are rebuilt. > > After this commit, the only remaining build timestamps are in the kernel, > the boot loaders, /usr/include/osreldate.h (the year in the copyright > notice), and lib*.a (the timestamps on all of the included .o files). > > Reviewed by: scottl (hptrr), gshapiro (sendmail), simon (openssl), > roberto (ntp), jkim (acpica) > Approved by: re (kib) This is a fantastic change. Our new-branch-per-project methodology @work made us implement this change locally. Another change that was necessary along the same lines was to remove any hostnames or path names that leak into object code, the most noticeable of which is of course one of the first kernel boot message lines. Are there plans to change kernel code and/or hostname/path name stuff? -- Brian Somers Don't _EVER_ lose your sense of humour ! From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 09:14:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E03DE106566B; Sun, 12 Jul 2009 09:14:28 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CE1C18FC1B; Sun, 12 Jul 2009 09:14:28 +0000 (UTC) (envelope-from lstewart@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 n6C9ESxk077616; Sun, 12 Jul 2009 09:14:28 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6C9ESBM077612; Sun, 12 Jul 2009 09:14:28 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200907120914.n6C9ESBM077612@svn.freebsd.org> From: Lawrence Stewart Date: Sun, 12 Jul 2009 09: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: r195634 - in head: . sys/netinet sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 09:14:29 -0000 Author: lstewart Date: Sun Jul 12 09:14:28 2009 New Revision: 195634 URL: http://svn.freebsd.org/changeset/base/195634 Log: Pad the following TCP related structs to allow MFCs of upcoming features/fixes back to the 8 branch: tcp_var.h - struct sackhint - struct tcpcb - struct tcpstat The patch breaks the ABI. Bump __FreeBSD_version to 800102 accordingly. User space tools that rely on the size of any of these structs (e.g. sockstat) need to be recompiled. Reviewed by: rpaulo, sam, andre, rwatson Approved by: re & mentor (gnn) Modified: head/UPDATING head/sys/netinet/tcp_var.h head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jul 12 04:48:47 2009 (r195633) +++ head/UPDATING Sun Jul 12 09:14:28 2009 (r195634) @@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090712: + Padding has been added to struct tcpcb, sackhint and tcpstat in + to facilitate future MFCs and bug fixes whilst + maintainig the ABI. However, this change breaks the ABI, so bump + __FreeBSD_version to 800102. User space tools that rely on the size of + any of these structs (e.g. sockstat) need to be recompiled. + 20090630: The NFS_LEGACYRPC option has been removed along with the old kernel RPC implementation that this option selected. Kernel Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Sun Jul 12 04:48:47 2009 (r195633) +++ head/sys/netinet/tcp_var.h Sun Jul 12 09:14:28 2009 (r195634) @@ -72,6 +72,9 @@ struct sackhole { struct sackhint { struct sackhole *nexthole; int sack_bytes_rexmit; + + int ispare; /* explicit pad for 64bit alignment */ + uint64_t _pad[2]; /* 1 sacked_bytes, 1 TBD */ }; struct tcptemp { @@ -99,6 +102,7 @@ do { \ */ struct tcpcb { struct tsegqe_head t_segq; /* segment reassembly queue */ + void *t_pspare[2]; /* new reassembly queue */ int t_segqlen; /* segment reassembly queue length */ int t_dupacks; /* consecutive dup acks recd */ @@ -190,10 +194,13 @@ struct tcpcb { int t_rttlow; /* smallest observerved RTT */ u_int32_t rfbuf_ts; /* recv buffer autoscaling timestamp */ int rfbuf_cnt; /* recv buffer autoscaling byte count */ - void *t_pspare[3]; /* toe usrreqs / toepcb * / congestion algo / 1 general use */ struct toe_usrreqs *t_tu; /* offload operations vector */ void *t_toe; /* TOE pcb pointer */ int t_bytes_acked; /* # bytes acked during current RTT */ + + int t_ispare; /* explicit pad for 64bit alignment */ + void *t_pspare2[6]; /* 2 CC / 4 TBD */ + uint64_t _pad[12]; /* 7 UTO, 5 TBD (1-2 CC/RTT?) */ }; /* @@ -460,6 +467,8 @@ struct tcpstat { u_long tcps_ecn_ect1; /* ECN Capable Transport */ u_long tcps_ecn_shs; /* ECN successful handshakes */ u_long tcps_ecn_rcwnd; /* # times ECN reduced the cwnd */ + + u_long _pad[12]; /* 6 UTO, 6 TBD */ }; #ifdef _KERNEL Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Jul 12 04:48:47 2009 (r195633) +++ head/sys/sys/param.h Sun Jul 12 09:14:28 2009 (r195634) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 800101 /* Master, propagated to newvers */ +#define __FreeBSD_version 800102 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 09:18:40 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4D4D106566C; Sun, 12 Jul 2009 09:18:40 +0000 (UTC) (envelope-from onemda@gmail.com) Received: from mail-bw0-f221.google.com (mail-bw0-f221.google.com [209.85.218.221]) by mx1.freebsd.org (Postfix) with ESMTP id 007068FC08; Sun, 12 Jul 2009 09:18:39 +0000 (UTC) (envelope-from onemda@gmail.com) Received: by bwz21 with SMTP id 21so1360952bwz.43 for ; Sun, 12 Jul 2009 02:18:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=s26MfTnSiV8+wSdLLid+tUJfTsHP3FSa+x3prPoZ+j4=; b=MeexxCJYQT0OcHcDPl5sR4idsZkO4GM5kup8h+H3eFQelN9dhRV4/vsYTU0dBBkUJH xuoNcANMx5DslFZ+ZkpSSoFB7KmU7IhIqNSpHINyjqb+DlLubTz+V2Z3BXk3C/Xi2lLx GP1bmzUwQB1YiHxdD/bjpvY1i6i3zVlDwJgf4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=UVxXvhT72u3EWN58+i98XyJFeIslIEra8rEf+61f2PywkJYKpf7KzrDCeCwjrxhw4N mlj2xWuyZLykR8YJmIe3HN+IMP1X7fE6Imh+mlJtG5hRc1JxixjCxqJXUpSYFZpqULUO 2KzvUmD15ioEx1C9LS0UXWqtb4YBfBFvSkst0= MIME-Version: 1.0 Received: by 10.204.120.3 with SMTP id b3mr3934008bkr.58.1247390318864; Sun, 12 Jul 2009 02:18:38 -0700 (PDT) In-Reply-To: <3a142e750907111030h159ac2e0q435e5ddbc305fb14@mail.gmail.com> References: <200907100818.n6A8I8p1011853@svn.freebsd.org> <3a142e750907110250p166d2d64q19a3c883ef79ba43@mail.gmail.com> <3a142e750907111030h159ac2e0q435e5ddbc305fb14@mail.gmail.com> Date: Sun, 12 Jul 2009 11:18:38 +0200 Message-ID: <3a142e750907120218r2496d40fv96ade26a9fb24890@mail.gmail.com> From: "Paul B. Mahol" To: Scott Long Content-Type: multipart/mixed; boundary=001636c59978da3206046e7eb0f0 Cc: svn-src-head@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 09:18:40 -0000 --001636c59978da3206046e7eb0f0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On 7/11/09, Paul B. Mahol wrote: > On 7/11/09, Paul B. Mahol wrote: >> This one breaks cam.ko for me. >> I can't load cam any more. I can't load ahci.ko >> If I try to use umass it will panic system(obviously because cam is >> never loaded in kernel) > > It is loaded (somehow in bad shape) but not reported via kldstat. > >> Well that is another bug because umass should not be loaded at first >> place. > > db:0:kdb.enter.unknown> bt > Tracing pid 33066 tid 100081 td 0xc41d3d80 > malloc_type_zone_allocated(c108ca80,0,1,0,c41bea0c,...) at > malloc_type_zone_allocated+0x31 > malloc(3c,c43c20c4,1,c41bea0c,c3be9b18,...) at malloc+0xfd > cam_devq_alloc(0,1,c3be9b64,c444ec2d,1,...) at cam_devq_alloc+0x23 > cam_simq_alloc(1,3e8,c41bea8c,c44529c0,9,...) at cam_simq_alloc+0x19 > umass_attach(c45dda00,c450905c,c064d8a8,c0621520,80000000,...) at > umass_attach+0x323 > device_attach(c45dda00,4,c0621469,9f1) at device_attach+0x36a > device_probe_and_attach(c45dda00,c3be9c18,ffffffff,c3e28800,0,...) at > device_probe_and_attach+0x53 > usb_probe_and_attach_sub(c3e28800,0,c447461b,4d8,7373614d,...) at > usb_probe_and_attach_sub+0x71 > usb_probe_and_attach(c3e28800,ff,c3f79800,1,5,...) at > usb_probe_and_attach+0x146 > uhub_explore(c3f79800,0,c4473a37,e0,c451cd34,...) at uhub_explore+0x4c9 > usb_bus_explore(c451cd34,c451cdac,c4475dee,67,c0692640,...) at > usb_bus_explore+0xb3 > usb_process(c451ccd4,c3be9d38,c061a053,342,c4373aa0,...) at > usb_process+0xda > fork_exit(c446cff9,c451ccd4,c3be9d38) at fork_exit+0xb8 > fork_trampoline() at fork_trampoline+0x8 > --- trap 0, eip = 0, esp = 0xc3be9d70, ebp = 0 --- > >> When trying to load cam.ko nothing verbose is displayed, just this: >> >> module_register: module probe already exists! >> Module probe failed to register: 17 > > Argh, it's so obvious, it doesnt get loaded because module probe is > used twice with > PERIPHDRIVER_DECLARE(probe, ...) in scsi_xpt.c and ata_xpt.c > > If I load cam from loader it works fine. > I was attempting to fix this "probe" issue already but I give up > because I did not get any results(maybe because cam.ko was really already > "loaded"?) > > Now one nasty question: Is there any plan to make cam.ko unloadable? Patch attached. -- Paul --001636c59978da3206046e7eb0f0 Content-Type: application/octet-stream; name="cam.patch" Content-Disposition: attachment; filename="cam.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: file0 LS0tIHNjc2lfeHB0LmMub2xkCTIwMDktMDctMTEgMjM6NDE6NDcuMDAwMDAwMDAwICswMDAwCisr KyBzY3NpX3hwdC5jCTIwMDktMDctMTEgMjM6NDI6NDIuMDAwMDAwMDAwICswMDAwCkBAIC0xMDUs MTUgKzEwNSwxNSBAQAogICAmJiAoKFNDU0lfUVVJUksoZHYpLT5xdWlya3MgJiBDQU1fUVVJUktf SElMVU5TKQkJXAogICB8fCAoU0lEX0FOU0lfUkVWKCZkdi0+aW5xX2RhdGEpID4gU0NTSV9SRVZf MikpKQogCi1zdGF0aWMgcGVyaXBoX2luaXRfdCBwcm9iZV9wZXJpcGhfaW5pdDsKK3N0YXRpYyBw ZXJpcGhfaW5pdF90IHNjc2lfcGVyaXBoX2luaXQ7CiAKLXN0YXRpYyBzdHJ1Y3QgcGVyaXBoX2Ry aXZlciBwcm9iZV9kcml2ZXIgPQorc3RhdGljIHN0cnVjdCBwZXJpcGhfZHJpdmVyIHNjc2lfZHJp dmVyID0KIHsKLQlwcm9iZV9wZXJpcGhfaW5pdCwgInByb2JlIiwKLQlUQUlMUV9IRUFEX0lOSVRJ QUxJWkVSKHByb2JlX2RyaXZlci51bml0cykKKwlzY3NpX3BlcmlwaF9pbml0LCAic2NzaSIsCisJ VEFJTFFfSEVBRF9JTklUSUFMSVpFUihzY3NpX2RyaXZlci51bml0cykKIH07CiAKLVBFUklQSERS SVZFUl9ERUNMQVJFKHByb2JlLCBwcm9iZV9kcml2ZXIpOworUEVSSVBIRFJJVkVSX0RFQ0xBUkUo c2NzaSwgc2NzaV9kcml2ZXIpOwogCiB0eXBlZGVmIGVudW0gewogCVBST0JFX1RVUiwKQEAgLTU2 NSw3ICs1NjUsNyBAQAogfQogCiBzdGF0aWMgdm9pZAotcHJvYmVfcGVyaXBoX2luaXQoKQorc2Nz aV9wZXJpcGhfaW5pdCgpCiB7CiB9CiAK --001636c59978da3206046e7eb0f0-- From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 11:42:31 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id 9B82D1065673 for ; Sun, 12 Jul 2009 11:42:31 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 1F96A14E0FF for ; Sun, 12 Jul 2009 11:42:31 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: (qmail 4976 invoked from network); 12 Jul 2009 11:42:30 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 12 Jul 2009 11:42:30 -0000 Message-ID: <4A59CC26.7010106@freebsd.org> Date: Sun, 12 Jul 2009 04:42:30 -0700 From: Colin Percival User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: Brian Somers References: <200907112230.n6BMUbXE065104@svn.freebsd.org> <20090712005957.5f395c96@dev.lan.Awfulhak.org> In-Reply-To: <20090712005957.5f395c96@dev.lan.Awfulhak.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: r195626 - in head: contrib/amd/amd contrib/ntp/scripts contrib/sendmail/cf/sh secure/lib/libcrypto sys/contrib/dev/acpica/compiler sys/dev/hptrr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 11:42:32 -0000 Brian Somers wrote: > On Sat, 11 Jul 2009 22:30:37 +0000 (UTC) Colin Percival wrote: >> Remove build timestamps from the following files: >> [...] >> After this commit, the only remaining build timestamps are in the kernel, >> the boot loaders, /usr/include/osreldate.h (the year in the copyright >> notice), and lib*.a (the timestamps on all of the included .o files). > > This is a fantastic change. Our new-branch-per-project methodology > @work made us implement this change locally. > > Another change that was necessary along the same lines was to remove > any hostnames or path names that leak into object code, the most noticeable > of which is of course one of the first kernel boot message lines. > > Are there plans to change kernel code and/or hostname/path name stuff? I'm not particularly concerned about the hostname or paths, since there are workarounds (i.e., set the same hostname and use the same path, and files will come out the same). The timestamps in the kernel and boot loaders can probably be removed, but I wanted to consult with the community first, since it is conceivable that those timestamps are useful in some situations. I'm even less certain about the timestamps included in library archive files -- if anyone with binutils-fu can confirm for me if these are used at all, and if not, how to get rid of them, I'd be very very happy. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 12:37:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D855B106564A; Sun, 12 Jul 2009 12:37:38 +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 C6DC88FC1D; Sun, 12 Jul 2009 12:37:38 +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 n6CCbcaM084306; Sun, 12 Jul 2009 12:37:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CCbcwH084305; Sun, 12 Jul 2009 12:37:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907121237.n6CCbcwH084305@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 12 Jul 2009 12: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: r195635 - head/sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 12:37:39 -0000 Author: kib Date: Sun Jul 12 12:37:38 2009 New Revision: 195635 URL: http://svn.freebsd.org/changeset/base/195635 Log: When VM_MAP_WIRE_HOLESOK is not specified and vm_map_wire(9) encounters non-readable and non-executable map entry, the entry is skipped from wiring and loop is aborted. But, since MAP_ENTRY_WIRE_SKIPPED was not set for the map entry, its wired_count is later erronously decremented. vm_map_delete(9) for such map entry stuck in "vmmaps". Properly set MAP_ENTRY_WIRE_SKIPPED when aborting the loop. Reported by: John Marshall Approved by: re (kensmith) Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sun Jul 12 09:14:28 2009 (r195634) +++ head/sys/vm/vm_map.c Sun Jul 12 12:37:38 2009 (r195635) @@ -2354,12 +2354,12 @@ vm_map_wire(vm_map_t map, vm_offset_t st if (entry->wired_count == 0) { if ((entry->protection & (VM_PROT_READ|VM_PROT_EXECUTE)) == 0) { + entry->eflags |= MAP_ENTRY_WIRE_SKIPPED; if ((flags & VM_MAP_WIRE_HOLESOK) == 0) { end = entry->end; rv = KERN_INVALID_ADDRESS; goto done; } - entry->eflags |= MAP_ENTRY_WIRE_SKIPPED; goto next_entry; } entry->wired_count++; From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 12:50:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A33E106566B; Sun, 12 Jul 2009 12:50:44 +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 570BF8FC0A; Sun, 12 Jul 2009 12:50:44 +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 n6CCoixw084751; Sun, 12 Jul 2009 12:50:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CCoiHP084736; Sun, 12 Jul 2009 12:50:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907121250.n6CCoiHP084736@svn.freebsd.org> From: Konstantin Belousov Date: Sun, 12 Jul 2009 12:50: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: r195636 - in head/tools/regression/poll: . 4 7 l m n X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 12:50:44 -0000 Author: kib Date: Sun Jul 12 12:50:43 2009 New Revision: 195636 URL: http://svn.freebsd.org/changeset/base/195636 Log: Test suite for the poll(2)/select(2) on fifos, pipes and sockets, and recorded results for several operating systems. Submitted by: bde Approved by: re (kensmith) Added: head/tools/regression/poll/ head/tools/regression/poll/4/ head/tools/regression/poll/4/pipepoll.out (contents, props changed) head/tools/regression/poll/4/pipeselect.out (contents, props changed) head/tools/regression/poll/7/ head/tools/regression/poll/7/pipepoll.out (contents, props changed) head/tools/regression/poll/7/pipeselect.out (contents, props changed) head/tools/regression/poll/Makefile (contents, props changed) head/tools/regression/poll/Readme (contents, props changed) head/tools/regression/poll/l/ head/tools/regression/poll/l/pipepoll.out (contents, props changed) head/tools/regression/poll/l/pipeselect.out (contents, props changed) head/tools/regression/poll/m/ head/tools/regression/poll/m/pipepoll.out (contents, props changed) head/tools/regression/poll/m/pipeselect.out (contents, props changed) head/tools/regression/poll/n/ head/tools/regression/poll/n/pipepoll.out (contents, props changed) head/tools/regression/poll/n/pipeselect.out (contents, props changed) head/tools/regression/poll/pipepoll.c (contents, props changed) head/tools/regression/poll/pipeselect.c (contents, props changed) Added: head/tools/regression/poll/4/pipepoll.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/4/pipepoll.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected 0; got 0 +ok 2 Pipe state 5: expected POLLIN; got POLLIN +ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +not ok 4 Pipe state 6a: expected POLLHUP; got POLLIN | POLLHUP +ok 5 Sock state 4: expected 0; got 0 +ok 6 Sock state 5: expected POLLIN; got POLLIN +not ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN +not ok 8 Sock state 6a: expected POLLHUP; got POLLIN +not ok 9 FIFO state 0: expected 0; got POLLIN +ok 10 FIFO state 1: expected 0; got 0 +ok 11 FIFO state 2: expected POLLIN; got POLLIN +ok 12 FIFO state 2a: expected 0; got 0 +not ok 13 FIFO state 3: expected POLLHUP; got POLLIN +ok 14 FIFO state 4: expected 0; got 0 +ok 15 FIFO state 5: expected POLLIN; got POLLIN +not ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN +not ok 17 FIFO state 6a: expected POLLHUP; got POLLIN +not ok 18 FIFO state 6b: expected 0; got POLLIN +not ok 19 FIFO state 6c: expected POLLHUP; got POLLIN +not ok 20 FIFO state 6d: expected POLLHUP; got POLLIN Added: head/tools/regression/poll/4/pipeselect.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/4/pipeselect.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected clear; got clear +ok 2 Pipe state 5: expected set; got set +ok 3 Pipe state 6: expected set; got set +ok 4 Pipe state 6a: expected set; got set +ok 5 Sock state 4: expected clear; got clear +ok 6 Sock state 5: expected set; got set +ok 7 Sock state 6: expected set; got set +ok 8 Sock state 6a: expected set; got set +not ok 9 FIFO state 0: expected clear; got set +ok 10 FIFO state 1: expected clear; got clear +ok 11 FIFO state 2: expected set; got set +ok 12 FIFO state 2a: expected clear; got clear +ok 13 FIFO state 3: expected set; got set +ok 14 FIFO state 4: expected clear; got clear +ok 15 FIFO state 5: expected set; got set +ok 16 FIFO state 6: expected set; got set +ok 17 FIFO state 6a: expected set; got set +not ok 18 FIFO state 6b: expected clear; got set +ok 19 FIFO state 6c: expected set; got set +ok 20 FIFO state 6d: expected set; got set Added: head/tools/regression/poll/7/pipepoll.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/7/pipepoll.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected 0; got 0 +ok 2 Pipe state 5: expected POLLIN; got POLLIN +ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +not ok 4 Pipe state 6a: expected POLLHUP; got POLLIN | POLLHUP +ok 5 Sock state 4: expected 0; got 0 +ok 6 Sock state 5: expected POLLIN; got POLLIN +not ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN +not ok 8 Sock state 6a: expected POLLHUP; got POLLIN +ok 9 FIFO state 0: expected 0; got 0 +ok 10 FIFO state 1: expected 0; got 0 +ok 11 FIFO state 2: expected POLLIN; got POLLIN +ok 12 FIFO state 2a: expected 0; got 0 +not ok 13 FIFO state 3: expected POLLHUP; got 0 +ok 14 FIFO state 4: expected 0; got 0 +ok 15 FIFO state 5: expected POLLIN; got POLLIN +not ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN +not ok 17 FIFO state 6a: expected POLLHUP; got 0 +ok 18 FIFO state 6b: expected 0; got 0 +not ok 19 FIFO state 6c: expected POLLHUP; got 0 +not ok 20 FIFO state 6d: expected POLLHUP; got 0 Added: head/tools/regression/poll/7/pipeselect.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/7/pipeselect.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected clear; got clear +ok 2 Pipe state 5: expected set; got set +ok 3 Pipe state 6: expected set; got set +ok 4 Pipe state 6a: expected set; got set +ok 5 Sock state 4: expected clear; got clear +ok 6 Sock state 5: expected set; got set +ok 7 Sock state 6: expected set; got set +ok 8 Sock state 6a: expected set; got set +ok 9 FIFO state 0: expected clear; got clear +ok 10 FIFO state 1: expected clear; got clear +ok 11 FIFO state 2: expected set; got set +ok 12 FIFO state 2a: expected clear; got clear +not ok 13 FIFO state 3: expected set; got clear +ok 14 FIFO state 4: expected clear; got clear +ok 15 FIFO state 5: expected set; got set +ok 16 FIFO state 6: expected set; got set +not ok 17 FIFO state 6a: expected set; got clear +ok 18 FIFO state 6b: expected clear; got clear +not ok 19 FIFO state 6c: expected set; got clear +not ok 20 FIFO state 6d: expected set; got clear Added: head/tools/regression/poll/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/Makefile Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,35 @@ +$ $FreeBSD$ +# This makefile has been uglified for portability. +# Nothing yet works with gmake for the path to the sources. +.PATH: .. + +PROG= pipepoll pipeselect +CFLAGS+= -Werror -Wall + +all: ${PROG} +pipepoll: pipepoll.c +pipeselect: pipeselect.c + +pipepoll pipeselect: + ${CC} ${CFLAGS} ${LDFLAGS} -o $@ $@.c + +test: all + -for prog in ${PROG}; do \ + ./$${prog} > $${prog}.out.new; \ + diff -u1 $${prog}.out $${prog}.out.new; \ + done + +clean: + for prog in ${PROG}; do \ + rm -f $${prog} $${prog}.out.new; \ + done + +rename: + for prog in ${PROG}; do \ + mv $${prog}.out.new $${prog}.out; \ + done + +veryclean: clean + for prog in ${PROG}; do \ + rm -f $${prog}.out; \ + done Added: head/tools/regression/poll/Readme ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/Readme Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,18 @@ +$FreeBSD$ + +The directory contains poll(2) and select(2) compliance (and more) tests +from Bruce Evans, together with canned test results from several systems +for reference. + +Citing Bruce Evans: +The subdirectories contain results of old runs: + +{4,7}: FreeBSD-{4,7} with old tests (only state 0 and 6b have different +expectations; state 0 fails in FreeBSD-4 so the above is wrong +about at least when it was broken. I thought that I fixed it +completely for select() in FreeBSD-1. One or both of these states +were very broken in Net/2 and maybe in 4.4BSD-Lite*). + +l: Linux-2.6.10 with old tests (only state 0 has different expectations) +m: my current version of FreeBSD with old tests (0 and 6b) +n: my previous version of FreeBSD with old tests (0 and 6b) Added: head/tools/regression/poll/l/pipepoll.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/l/pipepoll.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected 0; got 0 +ok 2 Pipe state 5: expected POLLIN; got POLLIN +ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 4 Pipe state 6a: expected POLLHUP; got POLLHUP +ok 5 Sock state 4: expected 0; got 0 +ok 6 Sock state 5: expected POLLIN; got POLLIN +ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +not ok 8 Sock state 6a: expected POLLHUP; got POLLIN | POLLHUP +ok 9 FIFO state 0: expected 0; got 0 +ok 10 FIFO state 1: expected 0; got 0 +ok 11 FIFO state 2: expected POLLIN; got POLLIN +ok 12 FIFO state 2a: expected 0; got 0 +ok 13 FIFO state 3: expected POLLHUP; got POLLHUP +ok 14 FIFO state 4: expected 0; got 0 +ok 15 FIFO state 5: expected POLLIN; got POLLIN +ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 17 FIFO state 6a: expected POLLHUP; got POLLHUP +not ok 18 FIFO state 6b: expected POLLHUP; got 0 +ok 19 FIFO state 6c: expected POLLHUP; got POLLHUP +ok 20 FIFO state 6d: expected POLLHUP; got POLLHUP Added: head/tools/regression/poll/l/pipeselect.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/l/pipeselect.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected clear; got clear +ok 2 Pipe state 5: expected set; got set +ok 3 Pipe state 6: expected set; got set +ok 4 Pipe state 6a: expected set; got set +ok 5 Sock state 4: expected clear; got clear +ok 6 Sock state 5: expected set; got set +ok 7 Sock state 6: expected set; got set +ok 8 Sock state 6a: expected set; got set +not ok 9 FIFO state 0: expected set; got clear +ok 10 FIFO state 1: expected clear; got clear +ok 11 FIFO state 2: expected set; got set +ok 12 FIFO state 2a: expected clear; got clear +ok 13 FIFO state 3: expected set; got set +ok 14 FIFO state 4: expected clear; got clear +ok 15 FIFO state 5: expected set; got set +ok 16 FIFO state 6: expected set; got set +ok 17 FIFO state 6a: expected set; got set +not ok 18 FIFO state 6b: expected set; got clear +ok 19 FIFO state 6c: expected set; got set +ok 20 FIFO state 6d: expected set; got set Added: head/tools/regression/poll/m/pipepoll.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/m/pipepoll.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected 0; got 0 +ok 2 Pipe state 5: expected POLLIN; got POLLIN +ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 4 Pipe state 6a: expected POLLHUP; got POLLHUP +ok 5 Sock state 4: expected 0; got 0 +ok 6 Sock state 5: expected POLLIN; got POLLIN +ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 8 Sock state 6a: expected POLLHUP; got POLLHUP +ok 9 FIFO state 0: expected 0; got 0 +ok 10 FIFO state 1: expected 0; got 0 +ok 11 FIFO state 2: expected POLLIN; got POLLIN +ok 12 FIFO state 2a: expected 0; got 0 +ok 13 FIFO state 3: expected POLLHUP; got POLLHUP +ok 14 FIFO state 4: expected 0; got 0 +ok 15 FIFO state 5: expected POLLIN; got POLLIN +ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 17 FIFO state 6a: expected POLLHUP; got POLLHUP +ok 18 FIFO state 6b: expected POLLHUP; got POLLHUP +ok 19 FIFO state 6c: expected POLLHUP; got POLLHUP +ok 20 FIFO state 6d: expected POLLHUP; got POLLHUP Added: head/tools/regression/poll/m/pipeselect.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/m/pipeselect.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected clear; got clear +ok 2 Pipe state 5: expected set; got set +ok 3 Pipe state 6: expected set; got set +ok 4 Pipe state 6a: expected set; got set +ok 5 Sock state 4: expected clear; got clear +ok 6 Sock state 5: expected set; got set +ok 7 Sock state 6: expected set; got set +ok 8 Sock state 6a: expected set; got set +not ok 9 FIFO state 0: expected set; got clear +ok 10 FIFO state 1: expected clear; got clear +ok 11 FIFO state 2: expected set; got set +ok 12 FIFO state 2a: expected clear; got clear +ok 13 FIFO state 3: expected set; got set +ok 14 FIFO state 4: expected clear; got clear +ok 15 FIFO state 5: expected set; got set +ok 16 FIFO state 6: expected set; got set +ok 17 FIFO state 6a: expected set; got set +ok 18 FIFO state 6b: expected set; got set +ok 19 FIFO state 6c: expected set; got set +ok 20 FIFO state 6d: expected set; got set Added: head/tools/regression/poll/n/pipepoll.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/n/pipepoll.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected 0; got 0 +ok 2 Pipe state 5: expected POLLIN; got POLLIN +ok 3 Pipe state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 4 Pipe state 6a: expected POLLHUP; got POLLHUP +ok 5 Sock state 4: expected 0; got 0 +ok 6 Sock state 5: expected POLLIN; got POLLIN +ok 7 Sock state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 8 Sock state 6a: expected POLLHUP; got POLLHUP +ok 9 FIFO state 0: expected 0; got 0 +ok 10 FIFO state 1: expected 0; got 0 +ok 11 FIFO state 2: expected POLLIN; got POLLIN +ok 12 FIFO state 2a: expected 0; got 0 +ok 13 FIFO state 3: expected POLLHUP; got POLLHUP +ok 14 FIFO state 4: expected 0; got 0 +ok 15 FIFO state 5: expected POLLIN; got POLLIN +ok 16 FIFO state 6: expected POLLIN | POLLHUP; got POLLIN | POLLHUP +ok 17 FIFO state 6a: expected POLLHUP; got POLLHUP +ok 18 FIFO state 6b: expected 0; got 0 +ok 19 FIFO state 6c: expected POLLHUP; got POLLHUP +ok 20 FIFO state 6d: expected POLLHUP; got POLLHUP Added: head/tools/regression/poll/n/pipeselect.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/n/pipeselect.out Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,21 @@ +1..20 +ok 1 Pipe state 4: expected clear; got clear +ok 2 Pipe state 5: expected set; got set +ok 3 Pipe state 6: expected set; got set +ok 4 Pipe state 6a: expected set; got set +ok 5 Sock state 4: expected clear; got clear +ok 6 Sock state 5: expected set; got set +ok 7 Sock state 6: expected set; got set +ok 8 Sock state 6a: expected set; got set +ok 9 FIFO state 0: expected clear; got clear +ok 10 FIFO state 1: expected clear; got clear +ok 11 FIFO state 2: expected set; got set +ok 12 FIFO state 2a: expected clear; got clear +ok 13 FIFO state 3: expected set; got set +ok 14 FIFO state 4: expected clear; got clear +ok 15 FIFO state 5: expected set; got set +ok 16 FIFO state 6: expected set; got set +ok 17 FIFO state 6a: expected set; got set +ok 18 FIFO state 6b: expected clear; got clear +ok 19 FIFO state 6c: expected set; got set +ok 20 FIFO state 6d: expected set; got set Added: head/tools/regression/poll/pipepoll.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/pipepoll.c Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,302 @@ +/* $FreeBSD$ */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define FIFONAME "fifo.tmp" +#define FT_END 3 +#define FT_FIFO 2 +#define FT_PIPE 0 +#define FT_SOCKETPAIR 1 + +static int filetype; + +static const char * +decode_events(int events) +{ + char *ncresult; + const char *result; + + switch (events) { + case POLLIN: + result = "POLLIN"; + break; + case POLLHUP: + result = "POLLHUP"; + break; + case POLLIN | POLLHUP: + result = "POLLIN | POLLHUP"; + break; + default: + asprintf(&ncresult, "%#x", events); + result = ncresult; + break; + } + return (result); +} + +static void +report(int num, const char *state, int expected, int got) +{ + if (expected == got) + printf("ok %-2d ", num); + else + printf("not ok %-2d", num); + printf(" %s state %s: expected %s; got %s\n", + filetype == FT_PIPE ? "Pipe" : + filetype == FT_SOCKETPAIR ? "Sock" : "FIFO", + state, decode_events(expected), decode_events(got)); + fflush(stdout); +} + +static pid_t cpid; +static pid_t ppid; +static volatile sig_atomic_t state; + +static void +catch(int sig) +{ + state++; +} + +static void +child(int fd, int num) +{ + struct pollfd pfd; + int fd2; + char buf[256]; + + if (filetype == FT_FIFO) { + fd = open(FIFONAME, O_RDONLY | O_NONBLOCK); + if (fd < 0) + err(1, "open for read"); + } + pfd.fd = fd; + pfd.events = POLLIN; + + if (filetype == FT_FIFO) { + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "0", 0, pfd.revents); + } + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 1) + ; + if (filetype != FT_FIFO) { + /* + * The connection cannot be reestablished. Use the code that + * delays the read until after the writer disconnects since + * that case is more interesting. + */ + state = 4; + goto state4; + } + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "1", 0, pfd.revents); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 2) + ; + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "2", POLLIN, pfd.revents); + if (read(fd, buf, sizeof buf) != 1) + err(1, "read"); + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "2a", 0, pfd.revents); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 3) + ; + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "3", POLLHUP, pfd.revents); + kill(ppid, SIGUSR1); + + /* + * Now we expect a new writer, and a new connection too since + * we read all the data. The only new point is that we didn't + * start quite from scratch since the read fd is not new. Check + * startup state as above, but don't do the read as above. + */ + usleep(1); + while (state != 4) + ; +state4: + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "4", 0, pfd.revents); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 5) + ; + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "5", POLLIN, pfd.revents); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 6) + ; + /* + * Now we have no writer, but should still have data from the old + * writer. Check that we have both a data-readable condition and a + * hangup condition, and that the data can be read in the usual way. + * Since Linux does this, programs must not quit reading when they + * see POLLHUP; they must see POLLHUP without POLLIN (or another + * input condition) before they decide that there is EOF. gdb-6.1.1 + * is an example of a broken program that quits on POLLHUP only -- + * see its event-loop.c. + */ + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "6", POLLIN | POLLHUP, pfd.revents); + if (read(fd, buf, sizeof buf) != 1) + err(1, "read"); + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "6a", POLLHUP, pfd.revents); + if (filetype == FT_FIFO) { + /* + * Check that POLLHUP is sticky for a new reader and for + * the old reader. + */ + fd2 = open(FIFONAME, O_RDONLY | O_NONBLOCK); + if (fd2 < 0) + err(1, "open for read"); + pfd.fd = fd2; + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "6b", POLLHUP, pfd.revents); + pfd.fd = fd; + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "6c", POLLHUP, pfd.revents); + close(fd2); + if (poll(&pfd, 1, 0) < 0) + err(1, "poll"); + report(num++, "6d", POLLHUP, pfd.revents); + } + close(fd); + kill(ppid, SIGUSR1); + + exit(0); +} + +static void +parent(int fd) +{ + usleep(1); + while (state != 1) + ; + if (filetype == FT_FIFO) { + fd = open(FIFONAME, O_WRONLY | O_NONBLOCK); + if (fd < 0) + err(1, "open for write"); + } + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 2) + ; + if (write(fd, "", 1) != 1) + err(1, "write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 3) + ; + if (close(fd) != 0) + err(1, "close for write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 4) + ; + if (filetype != FT_FIFO) + return; + fd = open(FIFONAME, O_WRONLY | O_NONBLOCK); + if (fd < 0) + err(1, "open for write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 5) + ; + if (write(fd, "", 1) != 1) + err(1, "write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 6) + ; + if (close(fd) != 0) + err(1, "close for write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 7) + ; +} + +int +main(void) +{ + int fd[2], num; + + num = 1; + printf("1..20\n"); + fflush(stdout); + signal(SIGUSR1, catch); + ppid = getpid(); + for (filetype = 0; filetype < FT_END; filetype++) { + switch (filetype) { + case FT_FIFO: + if (mkfifo(FIFONAME, 0666) != 0) + err(1, "mkfifo"); + fd[0] = -1; + fd[1] = -1; + break; + case FT_SOCKETPAIR: + if (socketpair(AF_UNIX, SOCK_STREAM, AF_UNSPEC, + fd) != 0) + err(1, "socketpair"); + break; + case FT_PIPE: + if (pipe(fd) != 0) + err(1, "pipe"); + break; + } + state = 0; + switch (cpid = fork()) { + case -1: + err(1, "fork"); + case 0: + (void)close(fd[1]); + child(fd[0], num); + break; + default: + (void)close(fd[0]); + parent(fd[1]); + break; + } + num += filetype == FT_FIFO ? 12 : 4; + } + (void)unlink(FIFONAME); + return (0); +} Added: head/tools/regression/poll/pipeselect.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/poll/pipeselect.c Sun Jul 12 12:50:43 2009 (r195636) @@ -0,0 +1,318 @@ +/* $FreeBSD$ */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#define FIFONAME "fifo.tmp" +#define FT_END 3 +#define FT_FIFO 2 +#define FT_PIPE 0 +#define FT_SOCKETPAIR 1 + +#define SETUP(fd, rfds, tv) do { \ + FD_ZERO(&(rfds)); \ + FD_SET((fd), &(rfds)); \ + (tv).tv_sec = 0; \ + (tv).tv_usec = 0; \ +} while (0) + +static int filetype; + +static const char * +decode_events(int events) +{ + return (events ? "set" : "clear"); +} + +static void +report(int num, const char *state, int expected, int got) +{ + if (!expected == !got) + printf("ok %-2d ", num); + else + printf("not ok %-2d", num); + printf(" %s state %s: expected %s; got %s\n", + filetype == FT_PIPE ? "Pipe" : + filetype == FT_SOCKETPAIR ? "Sock" : "FIFO", + state, decode_events(expected), decode_events(got)); + fflush(stdout); +} + +static pid_t cpid; +static pid_t ppid; +static volatile sig_atomic_t state; + +static void +catch(int sig) +{ + state++; +} + +static void +child(int fd, int num) +{ + fd_set rfds; + struct timeval tv; + int fd1, fd2; + char buf[256]; + + if (filetype == FT_FIFO) { + fd = open(FIFONAME, O_RDONLY | O_NONBLOCK); + if (fd < 0) + err(1, "open for read"); + } + if (fd >= FD_SETSIZE) + errx(1, "fd = %d too large for select()", fd); + + if (filetype == FT_FIFO) { + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + /* + * This state (a reader for which there has never been a + * writer) is reported quite differently for select() than + * for poll(). select() must see a ready-to-read descriptor + * since read() will see EOF and not block; it cannot + * distinguish this state from the one of a reader for which + * there has been a writer but all writers have gone away + * and all data has been read. poll() and distinguish these + * states by returning POLLHUP only for the latter; it does + * this, although this makes it inconsistent with the + * blockability of read() in the former. + */ + report(num++, "0", 1, FD_ISSET(fd, &rfds)); + } + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 1) + ; + if (filetype != FT_FIFO) { + /* + * The connection cannot be reestablished. Use the code that + * delays the read until after the writer disconnects since + * that case is more interesting. + */ + state = 4; + goto state4; + } + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "1", 0, FD_ISSET(fd, &rfds)); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 2) + ; + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "2", 1, FD_ISSET(fd, &rfds)); + if (read(fd, buf, sizeof buf) != 1) + err(1, "read"); + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "2a", 0, FD_ISSET(fd, &rfds)); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 3) + ; + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "3", 1, FD_ISSET(fd, &rfds)); + kill(ppid, SIGUSR1); + + /* + * Now we expect a new writer, and a new connection too since + * we read all the data. The only new point is that we didn't + * start quite from scratch since the read fd is not new. Check + * startup state as above, but don't do the read as above. + */ + usleep(1); + while (state != 4) + ; +state4: + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "4", 0, FD_ISSET(fd, &rfds)); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 5) + ; + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "5", 1, FD_ISSET(fd, &rfds)); + kill(ppid, SIGUSR1); + + usleep(1); + while (state != 6) + ; + /* + * Now we have no writer, but should still have data from the old + * writer. Check that we have a data-readable condition, and that + * the data can be read in the usual way. + */ + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "6", 1, FD_ISSET(fd, &rfds)); + if (read(fd, buf, sizeof buf) != 1) + err(1, "read"); + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "6a", 1, FD_ISSET(fd, &rfds)); + if (filetype == FT_FIFO) { + /* + * Check that the readable-data condition is sticky for a + * new reader and for the old reader. We really only have + * a hangup condition, but select() can only see this as + * a readable-data condition for null data. select() + * cannot distinguish this state from the initial state + * where there is a reader but has never been a writer, so + * the following tests (to follow the pattern in pipepoll.c) + * essentially test state 0 again. + */ + fd2 = open(FIFONAME, O_RDONLY | O_NONBLOCK); + if (fd2 < 0) + err(1, "open for read"); + fd1 = fd; + fd = fd2; + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "6b", 1, FD_ISSET(fd, &rfds)); + fd = fd1; + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "6c", 1, FD_ISSET(fd, &rfds)); + close(fd2); + SETUP(fd, rfds, tv); + if (select(fd + 1, &rfds, NULL, NULL, &tv) < 0) + err(1, "select"); + report(num++, "6d", 1, FD_ISSET(fd, &rfds)); + } + close(fd); + kill(ppid, SIGUSR1); + + exit(0); +} + +static void +parent(int fd) +{ + usleep(1); + while (state != 1) + ; + if (filetype == FT_FIFO) { + fd = open(FIFONAME, O_WRONLY | O_NONBLOCK); + if (fd < 0) + err(1, "open for write"); + } + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 2) + ; + if (write(fd, "", 1) != 1) + err(1, "write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 3) + ; + if (close(fd) != 0) + err(1, "close for write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 4) + ; + if (filetype != FT_FIFO) + return; + fd = open(FIFONAME, O_WRONLY | O_NONBLOCK); + if (fd < 0) + err(1, "open for write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 5) + ; + if (write(fd, "", 1) != 1) + err(1, "write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 6) + ; + if (close(fd) != 0) + err(1, "close for write"); + kill(cpid, SIGUSR1); + + usleep(1); + while (state != 7) + ; +} + +int +main(void) +{ + int fd[2], num; + + num = 1; + printf("1..20\n"); + fflush(stdout); + signal(SIGUSR1, catch); + ppid = getpid(); + for (filetype = 0; filetype < FT_END; filetype++) { + switch (filetype) { + case FT_FIFO: + if (mkfifo(FIFONAME, 0666) != 0) + err(1, "mkfifo"); + fd[0] = -1; + fd[1] = -1; + break; + case FT_SOCKETPAIR: + if (socketpair(AF_UNIX, SOCK_STREAM, AF_UNSPEC, + fd) != 0) + err(1, "socketpair"); + break; + case FT_PIPE: + if (pipe(fd) != 0) + err(1, "pipe"); + break; + } + state = 0; + switch (cpid = fork()) { + case -1: + err(1, "fork"); + case 0: + (void)close(fd[1]); + child(fd[0], num); + break; + default: + (void)close(fd[0]); + parent(fd[1]); + break; + } + num += filetype == FT_FIFO ? 12 : 4; + } + (void)unlink(FIFONAME); + return (0); +} From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 13:09:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54D55106566C; Sun, 12 Jul 2009 13:09:44 +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 42B6C8FC1E; Sun, 12 Jul 2009 13:09:44 +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 n6CD9iCx085208; Sun, 12 Jul 2009 13:09:44 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CD9iXj085206; Sun, 12 Jul 2009 13:09:44 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200907121309.n6CD9iXj085206@svn.freebsd.org> From: Ed Schouten Date: Sun, 12 Jul 2009 13:09: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: r195637 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 13:09:45 -0000 Author: ed Date: Sun Jul 12 13:09:43 2009 New Revision: 195637 URL: http://svn.freebsd.org/changeset/base/195637 Log: Fix fwrite() to return 0 when size or nmemb are zero. Right now nmemb is returned when size is 0. In newer versions of the standards, it is explicitly required that fwrite() should return 0. Submitted by: Christoph Mallon Approved by: re (kib) Modified: head/lib/libc/stdio/fread.c head/lib/libc/stdio/fwrite.c Modified: head/lib/libc/stdio/fread.c ============================================================================== --- head/lib/libc/stdio/fread.c Sun Jul 12 12:50:43 2009 (r195636) +++ head/lib/libc/stdio/fread.c Sun Jul 12 13:09:43 2009 (r195637) @@ -67,9 +67,7 @@ __fread(void * __restrict buf, size_t si size_t total; /* - * The ANSI standard requires a return value of 0 for a count - * or a size of 0. Peculiarily, it imposes no such requirements - * on fwrite; it only requires fread to be broken. + * ANSI and SUSv2 require a return value of 0 if size or count are 0. */ if ((resid = count * size) == 0) return (0); Modified: head/lib/libc/stdio/fwrite.c ============================================================================== --- head/lib/libc/stdio/fwrite.c Sun Jul 12 12:50:43 2009 (r195636) +++ head/lib/libc/stdio/fwrite.c Sun Jul 12 13:09:43 2009 (r195637) @@ -57,8 +57,15 @@ fwrite(buf, size, count, fp) struct __suio uio; struct __siov iov; + /* + * ANSI and SUSv2 require a return value of 0 if size or count are 0. + */ + n = count * size; + if (n == 0) + return (0); + iov.iov_base = (void *)buf; - uio.uio_resid = iov.iov_len = n = count * size; + uio.uio_resid = iov.iov_len = n; uio.uio_iov = &iov; uio.uio_iovcnt = 1; From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 16:46:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EFF9106566C; Sun, 12 Jul 2009 16:46:43 +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 6D0588FC0A; Sun, 12 Jul 2009 16:46:43 +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 n6CGkhUk089847; Sun, 12 Jul 2009 16:46:43 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CGkhOA089845; Sun, 12 Jul 2009 16:46:43 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200907121646.n6CGkhOA089845@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 12 Jul 2009 16:46: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: r195639 - head/sys/dev/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 16:46:44 -0000 Author: marcel Date: Sun Jul 12 16:46:43 2009 New Revision: 195639 URL: http://svn.freebsd.org/changeset/base/195639 Log: MFp4: USB CORE: busdma improvement For single segment allocations the boundary field of the BUSDMA tag should be zero. Currently all single segment allocations are less than or equal to 4096 bytes, so the limit does not kick in. If any single segment USB allocations would be greater than 4K, then it would be a problem. Approved by: re (kensmith) Obtained from: HPS Modified: head/sys/dev/usb/usb_busdma.c Modified: head/sys/dev/usb/usb_busdma.c ============================================================================== --- head/sys/dev/usb/usb_busdma.c Sun Jul 12 16:04:12 2009 (r195638) +++ head/sys/dev/usb/usb_busdma.c Sun Jul 12 16:46:43 2009 (r195639) @@ -359,7 +359,8 @@ usb_dma_tag_create(struct usb_dma_tag *u if (bus_dma_tag_create ( /* parent */ udt->tag_parent->tag, /* alignment */ align, - /* boundary */ USB_PAGE_SIZE, + /* boundary */ (align == 1) ? + USB_PAGE_SIZE : 0, /* lowaddr */ (2ULL << (udt->tag_parent->dma_bits - 1)) - 1, /* highaddr */ BUS_SPACE_MAXADDR, /* filter */ NULL, From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 16:50:33 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A65D10656B2; Sun, 12 Jul 2009 16:50: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 387338FC0A; Sun, 12 Jul 2009 16:50: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 n6CGoXjM089945; Sun, 12 Jul 2009 16:50:33 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CGoXI9089943; Sun, 12 Jul 2009 16:50:33 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <200907121650.n6CGoXI9089943@svn.freebsd.org> From: Marcel Moolenaar Date: Sun, 12 Jul 2009 16:50: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: r195640 - head/sys/dev/sound/usb X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 16:50:34 -0000 Author: marcel Date: Sun Jul 12 16:50:32 2009 New Revision: 195640 URL: http://svn.freebsd.org/changeset/base/195640 Log: Isochronous transfers only have 1 frame buffer, but multiple frame lengths. The frame buffer is at index 0. Approved by: re (kensmith) Obtained from: HPS Modified: head/sys/dev/sound/usb/uaudio.c Modified: head/sys/dev/sound/usb/uaudio.c ============================================================================== --- head/sys/dev/sound/usb/uaudio.c Sun Jul 12 16:46:43 2009 (r195639) +++ head/sys/dev/sound/usb/uaudio.c Sun Jul 12 16:50:32 2009 (r195640) @@ -1256,7 +1256,7 @@ tr_transferred: for (n = 0; n != nframes; n++) { offset1 = offset0; - pc = usbd_xfer_get_frame(xfer, n); + pc = usbd_xfer_get_frame(xfer, 0); len = usbd_xfer_frame_len(xfer, n); while (len > 0) { From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 17:02:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 584BB1065670; Sun, 12 Jul 2009 17:02:18 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 462A98FC13; Sun, 12 Jul 2009 17:02:18 +0000 (UTC) (envelope-from rmacklem@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 n6CH2Igg090212; Sun, 12 Jul 2009 17:02:18 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CH2Iju090210; Sun, 12 Jul 2009 17:02:18 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200907121702.n6CH2Iju090210@svn.freebsd.org> From: Rick Macklem Date: Sun, 12 Jul 2009 17:02: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: r195641 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 17:02:18 -0000 Author: rmacklem Date: Sun Jul 12 17:02:17 2009 New Revision: 195641 URL: http://svn.freebsd.org/changeset/base/195641 Log: Fix the handling of dotdot in lookup for the experimental nfs client in a manner analagous to the change in r195294 for the regular nfs client. Approved by: re (kensmith), kib (mentor) Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Jul 12 16:50:32 2009 (r195640) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun Jul 12 17:02:17 2009 (r195641) @@ -1111,9 +1111,11 @@ nfs_lookup(struct vop_lookup_args *ap) ltype = VOP_ISLOCKED(dvp); error = vfs_busy(mp, MBF_NOWAIT); if (error != 0) { + vfs_ref(mp); VOP_UNLOCK(dvp, 0); error = vfs_busy(mp, 0); vn_lock(dvp, ltype | LK_RETRY); + vfs_rel(mp); if (error == 0 && (dvp->v_iflag & VI_DOOMED)) { vfs_unbusy(mp); error = ENOENT; From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 17:07:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD2131065693; Sun, 12 Jul 2009 17:07:35 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9090C8FC18; Sun, 12 Jul 2009 17:07:35 +0000 (UTC) (envelope-from rmacklem@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 n6CH7Zkj090334; Sun, 12 Jul 2009 17:07:35 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CH7ZHa090332; Sun, 12 Jul 2009 17:07:35 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200907121707.n6CH7ZHa090332@svn.freebsd.org> From: Rick Macklem Date: Sun, 12 Jul 2009 17:07: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: r195642 - head/sys/fs/nfs X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 17:07:36 -0000 Author: rmacklem Date: Sun Jul 12 17:07:35 2009 New Revision: 195642 URL: http://svn.freebsd.org/changeset/base/195642 Log: Add calls to the experimental nfs client for the case of an "intr" mount, so that signals that aren't supposed to terminate RPCs in progress are masked off during the RPC. Approved by: re (kensmith), kib (mentor) Modified: head/sys/fs/nfs/nfs_commonkrpc.c Modified: head/sys/fs/nfs/nfs_commonkrpc.c ============================================================================== --- head/sys/fs/nfs/nfs_commonkrpc.c Sun Jul 12 17:02:17 2009 (r195641) +++ head/sys/fs/nfs/nfs_commonkrpc.c Sun Jul 12 17:07:35 2009 (r195642) @@ -404,7 +404,7 @@ newnfs_request(struct nfsrv_descript *nd { u_int32_t *tl; time_t waituntil; - int i, j, set_uid = 0; + int i, j, set_uid = 0, set_sigset = 0; int trycnt, error = 0, usegssname = 0, secflavour = AUTH_SYS; u_int16_t procnum; u_int trylater_delay = 1; @@ -416,6 +416,7 @@ newnfs_request(struct nfsrv_descript *nd struct nfsreq *rep = NULL; char *srv_principal = NULL; uid_t saved_uid = (uid_t)-1; + sigset_t oldset; if (xidp != NULL) *xidp = 0; @@ -425,6 +426,12 @@ newnfs_request(struct nfsrv_descript *nd return (ESTALE); } + /* For client side interruptible mounts, mask off the signals. */ + if (nmp != NULL && td != NULL && NFSHASINT(nmp)) { + newnfs_set_sigmask(td, &oldset); + set_sigset = 1; + } + /* * XXX if not already connected call nfs_connect now. Longer * term, change nfs_mount to call nfs_connect unconditionally @@ -507,6 +514,8 @@ newnfs_request(struct nfsrv_descript *nd cred->cr_uid = saved_uid; if (auth == NULL) { m_freem(nd->nd_mreq); + if (set_sigset) + newnfs_restore_sigmask(td, &oldset); return (EACCES); } bzero(&ext, sizeof(ext)); @@ -598,6 +607,8 @@ tryagain: AUTH_DESTROY(auth); if (rep != NULL) FREE((caddr_t)rep, M_NFSDREQ); + if (set_sigset) + newnfs_restore_sigmask(td, &oldset); return (error); } @@ -728,6 +739,8 @@ tryagain: AUTH_DESTROY(auth); if (rep != NULL) FREE((caddr_t)rep, M_NFSDREQ); + if (set_sigset) + newnfs_restore_sigmask(td, &oldset); return (0); nfsmout: mbuf_freem(nd->nd_mrep); @@ -735,6 +748,8 @@ nfsmout: AUTH_DESTROY(auth); if (rep != NULL) FREE((caddr_t)rep, M_NFSDREQ); + if (set_sigset) + newnfs_restore_sigmask(td, &oldset); return (error); } From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 19:20:55 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC103106564A; Sun, 12 Jul 2009 19:20:55 +0000 (UTC) (envelope-from qingli@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA5A88FC14; Sun, 12 Jul 2009 19:20:55 +0000 (UTC) (envelope-from qingli@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 n6CJKt4P092992; Sun, 12 Jul 2009 19:20:55 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CJKtf1092990; Sun, 12 Jul 2009 19:20:55 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200907121920.n6CJKtf1092990@svn.freebsd.org> From: Qing Li Date: Sun, 12 Jul 2009 19:20: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: r195643 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 19:20:56 -0000 Author: qingli Date: Sun Jul 12 19:20:55 2009 New Revision: 195643 URL: http://svn.freebsd.org/changeset/base/195643 Log: This patch adds a host route to an interface address (that is assigned to a non loopback/ppp link type) through the loopback interface. Prior to the new L2/L3 rewrite, this host route was explicitly created when processing the IPv6 address assignment. This loopback host route is deleted when that IPv6 address is removed from the interface. Reviewed by: bz, gnn Approved by: re Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c ============================================================================== --- head/sys/netinet6/in6.c Sun Jul 12 17:07:35 2009 (r195642) +++ head/sys/netinet6/in6.c Sun Jul 12 19:20:55 2009 (r195643) @@ -1194,6 +1194,25 @@ in6_purgeaddr(struct ifaddr *ifa) ifa_ref(ifa0); IF_ADDR_UNLOCK(ifp); + if (!(ia->ia_ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) { + struct rt_addrinfo info; + struct sockaddr_dl null_sdl; + + bzero(&null_sdl, sizeof(null_sdl)); + null_sdl.sdl_len = sizeof(null_sdl); + null_sdl.sdl_family = AF_LINK; + null_sdl.sdl_type = V_loif->if_type; + null_sdl.sdl_index = V_loif->if_index; + bzero(&info, sizeof(info)); + info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC; + info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr; + info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; + error = rtrequest1_fib(RTM_DELETE, &info, NULL, 0); + + if (error != 0) + log(LOG_INFO, "in6_purgeaddr: deletion failed\n"); + } + /* stop DAD processing */ nd6_dad_stop(ifa); @@ -1755,6 +1774,33 @@ in6_ifinit(struct ifnet *ifp, struct in6 ia->ia_flags |= IFA_ROUTE; } + /* + * add a loopback route to self + */ + if (!(ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) { + struct rt_addrinfo info; + struct rtentry *rt = NULL; + static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; + + bzero(&info, sizeof(info)); + info.rti_ifp = V_loif; + info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC; + info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr; + info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; + error = rtrequest1_fib(RTM_ADD, &info, &rt, 0); + + if (error == 0 && rt != NULL) { + RT_LOCK(rt); + ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = + rt->rt_ifp->if_type; + ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = + rt->rt_ifp->if_index; + RT_REMREF(rt); + RT_UNLOCK(rt); + } else if (error != 0) + log(LOG_INFO, "in6_ifinit: insertion failed\n"); + } + /* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */ if (newhost) { struct llentry *ln; From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 19:58:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 59A61106566B; Sun, 12 Jul 2009 19:58:53 +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 3D1718FC14; Sun, 12 Jul 2009 19:58:53 +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 n6CJwrM4093698; Sun, 12 Jul 2009 19:58:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CJwrhH093690; Sun, 12 Jul 2009 19:58:53 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907121958.n6CJwrhH093690@svn.freebsd.org> From: Sam Leffler Date: Sun, 12 Jul 2009 19:58: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: r195644 - in head/usr.sbin/wpa: hostapd hostapd_cli wpa_cli wpa_passphrase wpa_supplicant X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 19:58:53 -0000 Author: sam Date: Sun Jul 12 19:58:52 2009 New Revision: 195644 URL: http://svn.freebsd.org/changeset/base/195644 Log: fix Jouni's email address Approved by: re (blanket) Modified: head/usr.sbin/wpa/hostapd/hostapd.8 head/usr.sbin/wpa/hostapd/hostapd.conf.5 head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 head/usr.sbin/wpa/wpa_cli/wpa_cli.8 head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Modified: head/usr.sbin/wpa/hostapd/hostapd.8 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/hostapd/hostapd.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -126,7 +126,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmaline@cc.hut.fi . +.An Jouni Malinen Aq j@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/hostapd/hostapd.conf.5 ============================================================================== --- head/usr.sbin/wpa/hostapd/hostapd.conf.5 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/hostapd/hostapd.conf.5 Sun Jul 12 19:58:52 2009 (r195644) @@ -207,4 +207,4 @@ and files in the .Nm hostapd distribution provided by -.An Jouni Malinen Aq jkmaline@cc.hut.fi . +.An Jouni Malinen Aq j@w1.fi . Modified: head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 ============================================================================== --- head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/hostapd_cli/hostapd_cli.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -104,7 +104,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmaline@cc.hut.fi . +.An Jouni Malinen Aq j@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/wpa_cli/wpa_cli.8 ============================================================================== --- head/usr.sbin/wpa/wpa_cli/wpa_cli.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/wpa_cli/wpa_cli.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -214,7 +214,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmaline@cc.hut.fi . +.An Jouni Malinen Aq j@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 ============================================================================== --- head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/wpa_passphrase/wpa_passphrase.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -59,7 +59,7 @@ The .Nm utility was written by .An Jouni Malinen -.Aq jkmaline@cc.hut.fi . +.Aq j@w1.fi . .Pp This manual page was written by .An Henrik Brix Andersen Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.8 Sun Jul 12 19:58:52 2009 (r195644) @@ -147,7 +147,7 @@ utility first appeared in The .Nm utility was written by -.An Jouni Malinen Aq jkmaline@cc.hut.fi . +.An Jouni Malinen Aq j@w1.fi . This manual page is derived from the .Pa README file included in the Modified: head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 ============================================================================== --- head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sun Jul 12 19:20:55 2009 (r195643) +++ head/usr.sbin/wpa/wpa_supplicant/wpa_supplicant.conf.5 Sun Jul 12 19:58:52 2009 (r195644) @@ -542,4 +542,4 @@ and files in the .Nm wpa_supplicant distribution provided by -.An Jouni Malinen Aq jkmaline@cc.hut.fi . +.An Jouni Malinen Aq j@w1.fi . From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 20:17:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 37394106566B; Sun, 12 Jul 2009 20:17: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 25D6A8FC14; Sun, 12 Jul 2009 20:17: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 n6CKHVWa094148; Sun, 12 Jul 2009 20:17:31 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CKHVSo094146; Sun, 12 Jul 2009 20:17:31 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907122017.n6CKHVSo094146@svn.freebsd.org> From: Sam Leffler Date: Sun, 12 Jul 2009 20:17: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: r195645 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 20:17:32 -0000 Author: sam Date: Sun Jul 12 20:17:31 2009 New Revision: 195645 URL: http://svn.freebsd.org/changeset/base/195645 Log: add IEEE80211_SCAN_REQ Approved by: re (blanket) Modified: head/share/man/man4/net80211.4 Modified: head/share/man/man4/net80211.4 ============================================================================== --- head/share/man/man4/net80211.4 Sun Jul 12 19:58:52 2009 (r195644) +++ head/share/man/man4/net80211.4 Sun Jul 12 20:17:31 2009 (r195645) @@ -1156,6 +1156,22 @@ Set the age (in seconds) that results fr considered valid. When scan results are no longer valid and they are needed (e.g. to roam) the system will initiate a scan operation to replenish the scan cache. +.It Dv IEEE80211_IOC_SCAN_REQ +Request a scan operation using the parameters pointed to by +.Va i_val . +The underlying device must be running or +.Er ENXIO +will be returned. +Values for +.Va sr_duration , +.Va sr_mindwell , +and +.Va sr_maxdwell +shorter than 1 clock tick are rounded up to a tick. +If more SSID's are supplied than the system is capable of handling +the extra ones are silently ignored. +If a scan operation is already in progress the request will be +(silently) ignored. .It Dv IEEE80211_IOC_SCAN_CANCEL Cancel any pending/active scan operation. .It Dv IEEE80211_IOC_SHORTGI From owner-svn-src-head@FreeBSD.ORG Sun Jul 12 23:31:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A38201065675; Sun, 12 Jul 2009 23:31:21 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8D6688FC1F; Sun, 12 Jul 2009 23:31:21 +0000 (UTC) (envelope-from alc@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 n6CNVLgd098033; Sun, 12 Jul 2009 23:31:21 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6CNVLvf098002; Sun, 12 Jul 2009 23:31:21 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200907122331.n6CNVLvf098002@svn.freebsd.org> From: Alan Cox Date: Sun, 12 Jul 2009 23:31: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: r195649 - in head/sys: amd64/amd64 amd64/include arm/include i386/i386 i386/include i386/xen ia64/include kern mips/include powerpc/include sparc64/include sun4v/include vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Jul 2009 23:31:22 -0000 Author: alc Date: Sun Jul 12 23:31:20 2009 New Revision: 195649 URL: http://svn.freebsd.org/changeset/base/195649 Log: Add support to the virtual memory system for configuring machine- dependent memory attributes: Rename vm_cache_mode_t to vm_memattr_t. The new name reflects the fact that there are machine-dependent memory attributes that have nothing to do with controlling the cache's behavior. Introduce vm_object_set_memattr() for setting the default memory attributes that will be given to an object's pages. Introduce and use pmap_page_{get,set}_memattr() for getting and setting a page's machine-dependent memory attributes. Add full support for these functions on amd64 and i386 and stubs for them on the other architectures. The function pmap_page_set_memattr() is also responsible for any other machine-dependent aspects of changing a page's memory attributes, such as flushing the cache or updating the direct map. The uses include kmem_alloc_contig(), vm_page_alloc(), and the device pager: kmem_alloc_contig() can now be used to allocate kernel memory with non-default memory attributes on amd64 and i386. vm_page_alloc() and the device pager will set the memory attributes for the real or fictitious page according to the object's default memory attributes. Update the various pmap functions on amd64 and i386 that map pages to incorporate each page's memory attributes in the mapping. Notes: (1) Inherent to this design are safety features that prevent the specification of inconsistent memory attributes by different mappings on amd64 and i386. In addition, the device pager provides a warning when a device driver creates a fictitious page with memory attributes that are inconsistent with the real page that the fictitious page is an alias for. (2) Storing the machine-dependent memory attributes for amd64 and i386 as a dedicated "int" in "struct md_page" represents a compromise between space efficiency and the ease of MFCing these changes to RELENG_7. In collaboration with: jhb Approved by: re (kib) Modified: head/sys/amd64/amd64/pmap.c head/sys/amd64/include/pmap.h head/sys/amd64/include/vm.h head/sys/arm/include/pmap.h head/sys/arm/include/vm.h head/sys/i386/i386/pmap.c head/sys/i386/include/pmap.h head/sys/i386/include/vm.h head/sys/i386/xen/pmap.c head/sys/ia64/include/pmap.h head/sys/ia64/include/vm.h head/sys/kern/kern_mbuf.c head/sys/mips/include/pmap.h head/sys/mips/include/vm.h head/sys/powerpc/include/pmap.h head/sys/powerpc/include/vm.h head/sys/sparc64/include/pmap.h head/sys/sparc64/include/vm.h head/sys/sun4v/include/pmap.h head/sys/sun4v/include/vm.h head/sys/vm/device_pager.c head/sys/vm/pmap.h head/sys/vm/vm.h head/sys/vm/vm_contig.c head/sys/vm/vm_extern.h head/sys/vm/vm_object.c head/sys/vm/vm_object.h head/sys/vm/vm_page.c head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/amd64/amd64/pmap.c Sun Jul 12 23:31:20 2009 (r195649) @@ -614,6 +614,7 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); + m->md.pat_mode = PAT_WRITE_BACK; } /* @@ -1120,7 +1121,8 @@ pmap_qenter(vm_offset_t sva, vm_page_t * endpte = pte + count; while (pte < endpte) { oldpte |= *pte; - pte_store(pte, VM_PAGE_TO_PHYS(*ma) | PG_G | PG_RW | PG_V); + pte_store(pte, VM_PAGE_TO_PHYS(*ma) | PG_G | + pmap_cache_bits((*ma)->md.pat_mode, 0) | PG_RW | PG_V); pte++; ma++; } @@ -3025,7 +3027,7 @@ validate: /* * Now validate mapping with desired protection/wiring. */ - newpte = (pt_entry_t)(pa | PG_V); + newpte = (pt_entry_t)(pa | pmap_cache_bits(m->md.pat_mode, 0) | PG_V); if ((prot & VM_PROT_WRITE) != 0) { newpte |= PG_RW; vm_page_flag_set(m, PG_WRITEABLE); @@ -3110,7 +3112,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t " in pmap %p", va, pmap); return (FALSE); } - newpde = VM_PAGE_TO_PHYS(m) | PG_PS | PG_V; + newpde = VM_PAGE_TO_PHYS(m) | pmap_cache_bits(m->md.pat_mode, 1) | + PG_PS | PG_V; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { newpde |= PG_MANAGED; @@ -3292,7 +3295,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ */ pmap->pm_stats.resident_count++; - pa = VM_PAGE_TO_PHYS(m); + pa = VM_PAGE_TO_PHYS(m) | pmap_cache_bits(m->md.pat_mode, 0); if ((prot & VM_PROT_EXECUTE) == 0) pa |= pg_nx; @@ -3333,6 +3336,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs pd_entry_t *pde; vm_paddr_t pa, ptepa; vm_page_t p, pdpg; + int pat_mode; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); KASSERT(object->type == OBJT_DEVICE, @@ -3343,6 +3347,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs p = vm_page_lookup(object, pindex); KASSERT(p->valid == VM_PAGE_BITS_ALL, ("pmap_object_init_pt: invalid page %p", p)); + pat_mode = p->md.pat_mode; /* * Abort the mapping if the first page is not physically @@ -3354,21 +3359,28 @@ pmap_object_init_pt(pmap_t pmap, vm_offs /* * Skip the first page. Abort the mapping if the rest of - * the pages are not physically contiguous. + * the pages are not physically contiguous or have differing + * memory attributes. */ p = TAILQ_NEXT(p, listq); for (pa = ptepa + PAGE_SIZE; pa < ptepa + size; pa += PAGE_SIZE) { KASSERT(p->valid == VM_PAGE_BITS_ALL, ("pmap_object_init_pt: invalid page %p", p)); - if (pa != VM_PAGE_TO_PHYS(p)) + if (pa != VM_PAGE_TO_PHYS(p) || + pat_mode != p->md.pat_mode) return; p = TAILQ_NEXT(p, listq); } - /* Map using 2MB pages. */ + /* + * Map using 2MB pages. Since "ptepa" is 2M aligned and + * "size" is a multiple of 2M, adding the PAT setting to "pa" + * will not affect the termination of this loop. + */ PMAP_LOCK(pmap); - for (pa = ptepa; pa < ptepa + size; pa += NBPDR) { + for (pa = ptepa | pmap_cache_bits(pat_mode, 1); pa < ptepa + + size; pa += NBPDR) { pdpg = pmap_allocpde(pmap, addr, M_NOWAIT); if (pdpg == NULL) { /* @@ -4373,6 +4385,23 @@ pmap_demote_pdpe(pmap_t pmap, pdp_entry_ } /* + * Sets the memory attribute for the specified page. + */ +void +pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) +{ + + m->md.pat_mode = ma; + + /* + * Update the direct mapping and flush the cache. + */ + if (pmap_change_attr(PHYS_TO_DMAP(VM_PAGE_TO_PHYS(m)), PAGE_SIZE, + m->md.pat_mode)) + panic("memory attribute change on the direct map failed"); +} + +/* * Changes the specified virtual address range's memory type to that given by * the parameter "mode". The specified virtual address range must be * completely contained within either the direct map or the kernel map. If Modified: head/sys/amd64/include/pmap.h ============================================================================== --- head/sys/amd64/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/amd64/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -233,6 +233,7 @@ struct pv_chunk; struct md_page { TAILQ_HEAD(,pv_entry) pv_list; + int pat_mode; }; /* @@ -299,6 +300,7 @@ extern vm_paddr_t dump_avail[]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; +#define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) void pmap_bootstrap(vm_paddr_t *); @@ -312,6 +314,7 @@ void *pmap_mapbios(vm_paddr_t, vm_size_t void *pmap_mapdev(vm_paddr_t, vm_size_t); void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); boolean_t pmap_page_is_mapped(vm_page_t m); +void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); void pmap_unmapdev(vm_offset_t, vm_size_t); void pmap_invalidate_page(pmap_t, vm_offset_t); void pmap_invalidate_range(pmap_t, vm_offset_t, vm_offset_t); Modified: head/sys/amd64/include/vm.h ============================================================================== --- head/sys/amd64/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/amd64/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -32,14 +32,14 @@ #include -/* Cache control options. */ -#define VM_CACHE_UNCACHEABLE ((vm_cache_mode_t)PAT_UNCACHEABLE) -#define VM_CACHE_WRITE_COMBINING ((vm_cache_mode_t)PAT_WRITE_COMBINING) -#define VM_CACHE_WRITE_THROUGH ((vm_cache_mode_t)PAT_WRITE_THROUGH) -#define VM_CACHE_WRITE_PROTECTED ((vm_cache_mode_t)PAT_WRITE_PROTECTED) -#define VM_CACHE_WRITE_BACK ((vm_cache_mode_t)PAT_WRITE_BACK) -#define VM_CACHE_UNCACHED ((vm_cache_mode_t)PAT_UNCACHED) +/* Memory attributes. */ +#define VM_MEMATTR_UNCACHEABLE ((vm_memattr_t)PAT_UNCACHEABLE) +#define VM_MEMATTR_WRITE_COMBINING ((vm_memattr_t)PAT_WRITE_COMBINING) +#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)PAT_WRITE_THROUGH) +#define VM_MEMATTR_WRITE_PROTECTED ((vm_memattr_t)PAT_WRITE_PROTECTED) +#define VM_MEMATTR_WRITE_BACK ((vm_memattr_t)PAT_WRITE_BACK) +#define VM_MEMATTR_UNCACHED ((vm_memattr_t)PAT_UNCACHED) -#define VM_CACHE_DEFAULT VM_CACHE_WRITE_BACK +#define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/arm/include/pmap.h ============================================================================== --- head/sys/arm/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/arm/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -75,7 +75,10 @@ #endif +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_page_set_memattr(m, ma) (void)0 + /* * Pmap stuff */ Modified: head/sys/arm/include/vm.h ============================================================================== --- head/sys/arm/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/arm/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -29,7 +29,7 @@ #ifndef _MACHINE_VM_H_ #define _MACHINE_VM_H_ -/* Cache control is not (yet) implemented. */ -#define VM_CACHE_DEFAULT 0 +/* Memory attribute configuration is not (yet) implemented. */ +#define VM_MEMATTR_DEFAULT 0 #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/i386/i386/pmap.c Sun Jul 12 23:31:20 2009 (r195649) @@ -559,6 +559,7 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); + m->md.pat_mode = PAT_WRITE_BACK; } #ifdef PAE @@ -569,7 +570,7 @@ pmap_pdpt_allocf(uma_zone_t zone, int by /* Inform UMA that this allocator uses kernel_map/object. */ *flags = UMA_SLAB_KERNEL; return ((void *)kmem_alloc_contig(kernel_map, bytes, wait, 0x0ULL, - 0xffffffffULL, 1, 0, VM_CACHE_DEFAULT)); + 0xffffffffULL, 1, 0, VM_MEMATTR_DEFAULT)); } #endif @@ -1210,7 +1211,8 @@ pmap_qenter(vm_offset_t sva, vm_page_t * endpte = pte + count; while (pte < endpte) { oldpte |= *pte; - pte_store(pte, VM_PAGE_TO_PHYS(*ma) | pgeflag | PG_RW | PG_V); + pte_store(pte, VM_PAGE_TO_PHYS(*ma) | pgeflag | + pmap_cache_bits((*ma)->md.pat_mode, 0) | PG_RW | PG_V); pte++; ma++; } @@ -3132,7 +3134,7 @@ validate: /* * Now validate mapping with desired protection/wiring. */ - newpte = (pt_entry_t)(pa | PG_V); + newpte = (pt_entry_t)(pa | pmap_cache_bits(m->md.pat_mode, 0) | PG_V); if ((prot & VM_PROT_WRITE) != 0) { newpte |= PG_RW; vm_page_flag_set(m, PG_WRITEABLE); @@ -3214,7 +3216,8 @@ pmap_enter_pde(pmap_t pmap, vm_offset_t " in pmap %p", va, pmap); return (FALSE); } - newpde = VM_PAGE_TO_PHYS(m) | PG_PS | PG_V; + newpde = VM_PAGE_TO_PHYS(m) | pmap_cache_bits(m->md.pat_mode, 1) | + PG_PS | PG_V; if ((m->flags & (PG_FICTITIOUS | PG_UNMANAGED)) == 0) { newpde |= PG_MANAGED; @@ -3399,7 +3402,7 @@ pmap_enter_quick_locked(pmap_t pmap, vm_ */ pmap->pm_stats.resident_count++; - pa = VM_PAGE_TO_PHYS(m); + pa = VM_PAGE_TO_PHYS(m) | pmap_cache_bits(m->md.pat_mode, 0); #ifdef PAE if ((prot & VM_PROT_EXECUTE) == 0) pa |= pg_nx; @@ -3442,6 +3445,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs pd_entry_t *pde; vm_paddr_t pa, ptepa; vm_page_t p; + int pat_mode; VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); KASSERT(object->type == OBJT_DEVICE, @@ -3453,6 +3457,7 @@ pmap_object_init_pt(pmap_t pmap, vm_offs p = vm_page_lookup(object, pindex); KASSERT(p->valid == VM_PAGE_BITS_ALL, ("pmap_object_init_pt: invalid page %p", p)); + pat_mode = p->md.pat_mode; /* * Abort the mapping if the first page is not physically @@ -3464,21 +3469,28 @@ pmap_object_init_pt(pmap_t pmap, vm_offs /* * Skip the first page. Abort the mapping if the rest of - * the pages are not physically contiguous. + * the pages are not physically contiguous or have differing + * memory attributes. */ p = TAILQ_NEXT(p, listq); for (pa = ptepa + PAGE_SIZE; pa < ptepa + size; pa += PAGE_SIZE) { KASSERT(p->valid == VM_PAGE_BITS_ALL, ("pmap_object_init_pt: invalid page %p", p)); - if (pa != VM_PAGE_TO_PHYS(p)) + if (pa != VM_PAGE_TO_PHYS(p) || + pat_mode != p->md.pat_mode) return; p = TAILQ_NEXT(p, listq); } - /* Map using 2/4MB pages. */ + /* + * Map using 2/4MB pages. Since "ptepa" is 2/4M aligned and + * "size" is a multiple of 2/4M, adding the PAT setting to + * "pa" will not affect the termination of this loop. + */ PMAP_LOCK(pmap); - for (pa = ptepa; pa < ptepa + size; pa += NBPDR) { + for (pa = ptepa | pmap_cache_bits(pat_mode, 1); pa < ptepa + + size; pa += NBPDR) { pde = pmap_pde(pmap, addr); if (*pde == 0) { pde_store(pde, pa | PG_PS | PG_M | PG_A | @@ -3696,7 +3708,8 @@ pmap_zero_page(vm_page_t m) if (*sysmaps->CMAP2) panic("pmap_zero_page: CMAP2 busy"); sched_pin(); - *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M; + *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M | + pmap_cache_bits(m->md.pat_mode, 0); invlcaddr(sysmaps->CADDR2); pagezero(sysmaps->CADDR2); *sysmaps->CMAP2 = 0; @@ -3718,9 +3731,10 @@ pmap_zero_page_area(vm_page_t m, int off sysmaps = &sysmaps_pcpu[PCPU_GET(cpuid)]; mtx_lock(&sysmaps->lock); if (*sysmaps->CMAP2) - panic("pmap_zero_page: CMAP2 busy"); + panic("pmap_zero_page_area: CMAP2 busy"); sched_pin(); - *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M; + *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M | + pmap_cache_bits(m->md.pat_mode, 0); invlcaddr(sysmaps->CADDR2); if (off == 0 && size == PAGE_SIZE) pagezero(sysmaps->CADDR2); @@ -3742,9 +3756,10 @@ pmap_zero_page_idle(vm_page_t m) { if (*CMAP3) - panic("pmap_zero_page: CMAP3 busy"); + panic("pmap_zero_page_idle: CMAP3 busy"); sched_pin(); - *CMAP3 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M; + *CMAP3 = PG_V | PG_RW | VM_PAGE_TO_PHYS(m) | PG_A | PG_M | + pmap_cache_bits(m->md.pat_mode, 0); invlcaddr(CADDR3); pagezero(CADDR3); *CMAP3 = 0; @@ -3771,8 +3786,10 @@ pmap_copy_page(vm_page_t src, vm_page_t sched_pin(); invlpg((u_int)sysmaps->CADDR1); invlpg((u_int)sysmaps->CADDR2); - *sysmaps->CMAP1 = PG_V | VM_PAGE_TO_PHYS(src) | PG_A; - *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(dst) | PG_A | PG_M; + *sysmaps->CMAP1 = PG_V | VM_PAGE_TO_PHYS(src) | PG_A | + pmap_cache_bits(src->md.pat_mode, 0); + *sysmaps->CMAP2 = PG_V | PG_RW | VM_PAGE_TO_PHYS(dst) | PG_A | PG_M | + pmap_cache_bits(dst->md.pat_mode, 0); bcopy(sysmaps->CADDR1, sysmaps->CADDR2, PAGE_SIZE); *sysmaps->CMAP1 = 0; *sysmaps->CMAP2 = 0; @@ -4437,6 +4454,22 @@ pmap_unmapdev(vm_offset_t va, vm_size_t kmem_free(kernel_map, base, size); } +/* + * Sets the memory attribute for the specified page. + */ +void +pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma) +{ + + m->md.pat_mode = ma; + + /* + * Flush CPU caches to make sure any data isn't cached that shouldn't + * be, etc. + */ + pmap_invalidate_cache(); +} + int pmap_change_attr(vm_offset_t va, vm_size_t size, int mode) { Modified: head/sys/i386/include/pmap.h ============================================================================== --- head/sys/i386/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/i386/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -389,6 +389,7 @@ struct pv_chunk; struct md_page { TAILQ_HEAD(,pv_entry) pv_list; + int pat_mode; }; struct pmap { @@ -458,6 +459,7 @@ extern char *ptvmmap; /* poor name! */ extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; +#define pmap_page_get_memattr(m) ((vm_memattr_t)(m)->md.pat_mode) #define pmap_unmapbios(va, sz) pmap_unmapdev((va), (sz)) void pmap_bootstrap(vm_paddr_t); @@ -470,6 +472,7 @@ void *pmap_mapbios(vm_paddr_t, vm_size_t void *pmap_mapdev(vm_paddr_t, vm_size_t); void *pmap_mapdev_attr(vm_paddr_t, vm_size_t, int); boolean_t pmap_page_is_mapped(vm_page_t m); +void pmap_page_set_memattr(vm_page_t m, vm_memattr_t ma); void pmap_unmapdev(vm_offset_t, vm_size_t); pt_entry_t *pmap_pte(pmap_t, vm_offset_t) __pure2; void pmap_set_pg(void); Modified: head/sys/i386/include/vm.h ============================================================================== --- head/sys/i386/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/i386/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -32,14 +32,14 @@ #include -/* Cache control options. */ -#define VM_CACHE_UNCACHEABLE ((vm_cache_mode_t)PAT_UNCACHEABLE) -#define VM_CACHE_WRITE_COMBINING ((vm_cache_mode_t)PAT_WRITE_COMBINING) -#define VM_CACHE_WRITE_THROUGH ((vm_cache_mode_t)PAT_WRITE_THROUGH) -#define VM_CACHE_WRITE_PROTECTED ((vm_cache_mode_t)PAT_WRITE_PROTECTED) -#define VM_CACHE_WRITE_BACK ((vm_cache_mode_t)PAT_WRITE_BACK) -#define VM_CACHE_UNCACHED ((vm_cache_mode_t)PAT_UNCACHED) +/* Memory attributes. */ +#define VM_MEMATTR_UNCACHEABLE ((vm_memattr_t)PAT_UNCACHEABLE) +#define VM_MEMATTR_WRITE_COMBINING ((vm_memattr_t)PAT_WRITE_COMBINING) +#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)PAT_WRITE_THROUGH) +#define VM_MEMATTR_WRITE_PROTECTED ((vm_memattr_t)PAT_WRITE_PROTECTED) +#define VM_MEMATTR_WRITE_BACK ((vm_memattr_t)PAT_WRITE_BACK) +#define VM_MEMATTR_UNCACHED ((vm_memattr_t)PAT_UNCACHED) -#define VM_CACHE_DEFAULT VM_CACHE_WRITE_BACK +#define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/i386/xen/pmap.c ============================================================================== --- head/sys/i386/xen/pmap.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/i386/xen/pmap.c Sun Jul 12 23:31:20 2009 (r195649) @@ -605,6 +605,7 @@ pmap_page_init(vm_page_t m) { TAILQ_INIT(&m->md.pv_list); + m->md.pat_mode = PAT_WRITE_BACK; } #if defined(PAE) && !defined(XEN) @@ -615,7 +616,7 @@ pmap_pdpt_allocf(uma_zone_t zone, int by /* Inform UMA that this allocator uses kernel_map/object. */ *flags = UMA_SLAB_KERNEL; return ((void *)kmem_alloc_contig(kernel_map, bytes, wait, 0x0ULL, - 0xffffffffULL, 1, 0, VM_CACHE_DEFAULT)); + 0xffffffffULL, 1, 0, VM_MEMATTR_DEFAULT)); } #endif Modified: head/sys/ia64/include/pmap.h ============================================================================== --- head/sys/ia64/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/ia64/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -118,7 +118,9 @@ extern vm_offset_t virtual_end; extern uint64_t pmap_vhpt_base[]; extern int pmap_vhpt_log2size; +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_page_set_memattr(m, ma) (void)0 #define pmap_mapbios(pa, sz) pmap_mapdev(pa, sz) #define pmap_unmapbios(va, sz) pmap_unmapdev(va, sz) Modified: head/sys/ia64/include/vm.h ============================================================================== --- head/sys/ia64/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/ia64/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -32,13 +32,13 @@ #include #include -/* Cache control options. */ -#define VM_CACHE_WRITE_BACK ((vm_cache_mode_t)PTE_MA_WB) -#define VM_CACHE_UNCACHEABLE ((vm_cache_mode_t)PTE_MA_UC) -#define VM_CACHE_UNCACHEABLE_EXPORTED ((vm_cache_mode_t)PTE_MA_UCE) -#define VM_CACHE_WRITE_COMBINING ((vm_cache_mode_t)PTE_MA_WC) -#define VM_CACHE_NATPAGE ((vm_cache_mode_t)PTE_MA_NATPAGE) +/* Memory attributes. */ +#define VM_MEMATTR_WRITE_BACK ((vm_memattr_t)PTE_MA_WB) +#define VM_MEMATTR_UNCACHEABLE ((vm_memattr_t)PTE_MA_UC) +#define VM_MEMATTR_UNCACHEABLE_EXPORTED ((vm_memattr_t)PTE_MA_UCE) +#define VM_MEMATTR_WRITE_COMBINING ((vm_memattr_t)PTE_MA_WC) +#define VM_MEMATTR_NATPAGE ((vm_memattr_t)PTE_MA_NATPAGE) -#define VM_CACHE_DEFAULT VM_CACHE_WRITE_BACK +#define VM_MEMATTR_DEFAULT VM_MEMATTR_WRITE_BACK #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/kern/kern_mbuf.c ============================================================================== --- head/sys/kern/kern_mbuf.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/kern/kern_mbuf.c Sun Jul 12 23:31:20 2009 (r195649) @@ -356,7 +356,7 @@ mbuf_jumbo_alloc(uma_zone_t zone, int by /* Inform UMA that this allocator uses kernel_map/object. */ *flags = UMA_SLAB_KERNEL; return ((void *)kmem_alloc_contig(kernel_map, bytes, wait, - (vm_paddr_t)0, ~(vm_paddr_t)0, 1, 0, VM_CACHE_DEFAULT)); + (vm_paddr_t)0, ~(vm_paddr_t)0, 1, 0, VM_MEMATTR_DEFAULT)); } /* Modified: head/sys/mips/include/pmap.h ============================================================================== --- head/sys/mips/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/mips/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -155,7 +155,9 @@ extern vm_paddr_t mips_wired_tlb_physmem extern vm_paddr_t mips_wired_tlb_physmem_end; extern u_int need_wired_tlb_page_pool; +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_page_set_memattr(m, ma) (void)0 void pmap_bootstrap(void); void *pmap_mapdev(vm_offset_t, vm_size_t); Modified: head/sys/mips/include/vm.h ============================================================================== --- head/sys/mips/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/mips/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -31,10 +31,10 @@ #include -/* Cache control options. */ -#define VM_CACHE_UNCACHED ((vm_cache_mode_t)PTE_UNCACHED) -#define VM_CACHE_CACHEABLE_NONCOHERENT ((vm_cache_mode_t)PTE_CACHE) +/* Memory attributes. */ +#define VM_MEMATTR_UNCACHED ((vm_memattr_t)PTE_UNCACHED) +#define VM_MEMATTR_CACHEABLE_NONCOHERENT ((vm_memattr_t)PTE_CACHE) -#define VM_CACHE_DEFAULT VM_CACHE_CACHEABLE_NONCOHERENT +#define VM_MEMATTR_DEFAULT VM_MEMATTR_CACHEABLE_NONCOHERENT #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/powerpc/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -113,7 +113,9 @@ struct md_page { struct pvo_head mdpg_pvoh; }; +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!LIST_EMPTY(&(m)->md.mdpg_pvoh)) +#define pmap_page_set_memattr(m, ma) (void)0 #else @@ -143,7 +145,9 @@ struct md_page { TAILQ_HEAD(, pv_entry) pv_list; }; +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_page_set_memattr(m, ma) (void)0 #endif /* AIM */ Modified: head/sys/powerpc/include/vm.h ============================================================================== --- head/sys/powerpc/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/powerpc/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -31,10 +31,12 @@ #include -/* Cache control options. */ -#define VM_CACHE_INHIBIT ((vm_cache_mode_t)PTE_I) -#define VM_CACHE_WRITE_THROUGH ((vm_cache_mode_t)PTE_W) +/* Memory attributes. */ +#define VM_MEMATTR_CACHING_INHIBIT ((vm_memattr_t)PTE_I) +#define VM_MEMATTR_GUARD ((vm_memattr_t)PTE_G) +#define VM_MEMATTR_MEMORY_COHERENCE ((vm_memattr_t)PTE_M) +#define VM_MEMATTR_WRITE_THROUGH ((vm_memattr_t)PTE_W) -#define VM_CACHE_DEFAULT 0 +#define VM_MEMATTR_DEFAULT 0 #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/sparc64/include/pmap.h ============================================================================== --- head/sys/sparc64/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/sparc64/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -77,6 +77,9 @@ struct pmap { #define PMAP_TRYLOCK(pmap) mtx_trylock(&(pmap)->pm_mtx) #define PMAP_UNLOCK(pmap) mtx_unlock(&(pmap)->pm_mtx) +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT +#define pmap_page_set_memattr(m, ma) (void)0 + void pmap_bootstrap(void); vm_paddr_t pmap_kextract(vm_offset_t va); void pmap_kenter(vm_offset_t va, vm_page_t m); Modified: head/sys/sparc64/include/vm.h ============================================================================== --- head/sys/sparc64/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/sparc64/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -29,7 +29,7 @@ #ifndef _MACHINE_VM_H_ #define _MACHINE_VM_H_ -/* Cache control is not (yet) implemented. */ -#define VM_CACHE_DEFAULT 0 +/* Memory attribute configuration is not (yet) implemented. */ +#define VM_MEMATTR_DEFAULT 0 #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/sun4v/include/pmap.h ============================================================================== --- head/sys/sun4v/include/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/sun4v/include/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -106,7 +106,9 @@ typedef struct pv_entry { TAILQ_ENTRY(pv_entry) pv_plist; } *pv_entry_t; +#define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#define pmap_page_set_memattr(m, ma) (void)0 void pmap_bootstrap(vm_offset_t ekva); vm_paddr_t pmap_kextract(vm_offset_t va); Modified: head/sys/sun4v/include/vm.h ============================================================================== --- head/sys/sun4v/include/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/sun4v/include/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -29,7 +29,7 @@ #ifndef _MACHINE_VM_H_ #define _MACHINE_VM_H_ -/* Cache control is not (yet) implemented. */ -#define VM_CACHE_DEFAULT 0 +/* Memory attribute configuration is not (yet) implemented. */ +#define VM_MEMATTR_DEFAULT 0 #endif /* !_MACHINE_VM_H_ */ Modified: head/sys/vm/device_pager.c ============================================================================== --- head/sys/vm/device_pager.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/device_pager.c Sun Jul 12 23:31:20 2009 (r195649) @@ -70,9 +70,9 @@ static struct mtx dev_pager_mtx; static uma_zone_t fakepg_zone; -static vm_page_t dev_pager_getfake(vm_paddr_t); +static vm_page_t dev_pager_getfake(vm_paddr_t, vm_memattr_t); static void dev_pager_putfake(vm_page_t); -static void dev_pager_updatefake(vm_page_t, vm_paddr_t); +static void dev_pager_updatefake(vm_page_t, vm_paddr_t, vm_memattr_t); struct pagerops devicepagerops = { .pgo_init = dev_pager_init, @@ -210,7 +210,8 @@ dev_pager_getpages(object, m, count, req { vm_pindex_t offset; vm_paddr_t paddr; - vm_page_t page; + vm_page_t m_paddr, page; + vm_memattr_t memattr; struct cdev *dev; int i, ret; int prot; @@ -222,6 +223,7 @@ dev_pager_getpages(object, m, count, req dev = object->handle; page = m[reqpage]; offset = page->pindex; + memattr = object->memattr; VM_OBJECT_UNLOCK(object); csw = dev_refthread(dev); if (csw == NULL) @@ -235,14 +237,20 @@ dev_pager_getpages(object, m, count, req KASSERT(ret == 0, ("dev_pager_getpage: map function returns error")); td->td_fpop = fpop; dev_relthread(dev); - + /* If "paddr" is a real page, perform a sanity check on "memattr". */ + if ((m_paddr = vm_phys_paddr_to_vm_page(paddr)) != NULL && + pmap_page_get_memattr(m_paddr) != memattr) { + memattr = pmap_page_get_memattr(m_paddr); + printf( + "WARNING: A device driver has set \"memattr\" inconsistently.\n"); + } if ((page->flags & PG_FICTITIOUS) != 0) { /* * If the passed in reqpage page is a fake page, update it with * the new physical address. */ VM_OBJECT_LOCK(object); - dev_pager_updatefake(page, paddr); + dev_pager_updatefake(page, paddr, memattr); if (count > 1) { vm_page_lock_queues(); for (i = 0; i < count; i++) { @@ -256,7 +264,7 @@ dev_pager_getpages(object, m, count, req * Replace the passed in reqpage page with our own fake page and * free up the all of the original pages. */ - page = dev_pager_getfake(paddr); + page = dev_pager_getfake(paddr, memattr); VM_OBJECT_LOCK(object); TAILQ_INSERT_TAIL(&object->un_pager.devp.devp_pglist, page, pageq); vm_page_lock_queues(); @@ -296,47 +304,56 @@ dev_pager_haspage(object, pindex, before } /* - * Instantiate a fictitious page. Unlike physical memory pages, only - * the machine-independent fields must be initialized. + * Create a fictitious page with the specified physical address and memory + * attribute. */ static vm_page_t -dev_pager_getfake(paddr) - vm_paddr_t paddr; +dev_pager_getfake(vm_paddr_t paddr, vm_memattr_t memattr) { vm_page_t m; - m = uma_zalloc(fakepg_zone, M_WAITOK); - + m = uma_zalloc(fakepg_zone, M_WAITOK | M_ZERO); + m->phys_addr = paddr; + /* Fictitious pages don't use "segind". */ m->flags = PG_FICTITIOUS; + /* Fictitious pages don't use "order" or "pool". */ + pmap_page_init(m); m->oflags = VPO_BUSY; - /* Fictitious pages don't use "act_count". */ - m->dirty = 0; - m->busy = 0; - m->queue = PQ_NONE; - m->object = NULL; - m->wire_count = 1; - m->hold_count = 0; - m->phys_addr = paddr; - + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); return (m); } +/* + * Release a fictitious page. + */ static void -dev_pager_putfake(m) - vm_page_t m; +dev_pager_putfake(vm_page_t m) { + if (!(m->flags & PG_FICTITIOUS)) panic("dev_pager_putfake: bad page"); + /* Restore the default memory attribute to "phys_addr". */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); uma_zfree(fakepg_zone, m); } +/* + * Update the given fictitious page to the specified physical address and + * memory attribute. + */ static void -dev_pager_updatefake(m, paddr) - vm_page_t m; - vm_paddr_t paddr; +dev_pager_updatefake(vm_page_t m, vm_paddr_t paddr, vm_memattr_t memattr) { + if (!(m->flags & PG_FICTITIOUS)) panic("dev_pager_updatefake: bad page"); + /* Restore the default memory attribute before changing "phys_addr". */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); m->phys_addr = paddr; + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); } Modified: head/sys/vm/pmap.h ============================================================================== --- head/sys/vm/pmap.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/pmap.h Sun Jul 12 23:31:20 2009 (r195649) @@ -79,10 +79,16 @@ struct pmap_statistics { }; typedef struct pmap_statistics *pmap_statistics_t; +/* + * Each machine dependent implementation is expected to provide: + * + * vm_memattr_t pmap_page_get_memattr(vm_page_t); + * boolean_t pmap_page_is_mapped(vm_page_t); + * void pmap_page_set_memattr(vm_page_t, vm_memattr_t); + */ #include #ifdef _KERNEL -struct proc; struct thread; /* Modified: head/sys/vm/vm.h ============================================================================== --- head/sys/vm/vm.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm.h Sun Jul 12 23:31:20 2009 (r195649) @@ -64,10 +64,10 @@ #include /* - * The exact set of cache control codes is machine dependent. However, every - * machine is required to define VM_CACHE_DEFAULT. + * The exact set of memory attributes is machine dependent. However, every + * machine is required to define VM_MEMATTR_DEFAULT. */ -typedef char vm_cache_mode_t; /* cache control codes */ +typedef char vm_memattr_t; /* memory attribute codes */ typedef char vm_inherit_t; /* inheritance codes */ Modified: head/sys/vm/vm_contig.c ============================================================================== --- head/sys/vm/vm_contig.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm_contig.c Sun Jul 12 23:31:20 2009 (r195649) @@ -194,7 +194,8 @@ vm_page_release_contig(vm_page_t m, vm_p * before they are mapped. */ static vm_offset_t -contigmapping(vm_map_t map, vm_size_t size, vm_page_t m, int flags) +contigmapping(vm_map_t map, vm_size_t size, vm_page_t m, vm_memattr_t memattr, + int flags) { vm_object_t object = kernel_object; vm_offset_t addr, tmp_addr; @@ -210,6 +211,8 @@ contigmapping(vm_map_t map, vm_size_t si vm_map_unlock(map); VM_OBJECT_LOCK(object); for (tmp_addr = addr; tmp_addr < addr + size; tmp_addr += PAGE_SIZE) { + if (memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, memattr); vm_page_insert(m, object, OFF_TO_IDX(tmp_addr - VM_MIN_KERNEL_ADDRESS)); if ((flags & M_ZERO) && (m->flags & PG_ZERO) == 0) @@ -236,7 +239,7 @@ contigmalloc( void *ret; ret = (void *)kmem_alloc_contig(kernel_map, size, flags, low, high, - alignment, boundary, VM_CACHE_DEFAULT); + alignment, boundary, VM_MEMATTR_DEFAULT); if (ret != NULL) malloc_type_allocated(type, round_page(size)); return (ret); @@ -245,7 +248,7 @@ contigmalloc( vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary, - vm_cache_mode_t mode) + vm_memattr_t memattr) { vm_offset_t ret; vm_page_t pages; @@ -256,8 +259,7 @@ kmem_alloc_contig(vm_map_t map, vm_size_ npgs = size >> PAGE_SHIFT; tries = 0; retry: - pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary, - mode); + pages = vm_phys_alloc_contig(npgs, low, high, alignment, boundary); if (pages == NULL) { if (tries < ((flags & M_NOWAIT) != 0 ? 1 : 3)) { vm_page_lock_queues(); @@ -282,7 +284,7 @@ again: } ret = 0; } else { - ret = contigmapping(map, size, pages, flags); + ret = contigmapping(map, size, pages, memattr, flags); if (ret == 0) vm_page_release_contig(pages, npgs); } Modified: head/sys/vm/vm_extern.h ============================================================================== --- head/sys/vm/vm_extern.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm_extern.h Sun Jul 12 23:31:20 2009 (r195649) @@ -43,7 +43,7 @@ int kernacc(void *, int, int); vm_offset_t kmem_alloc(vm_map_t, vm_size_t); vm_offset_t kmem_alloc_contig(vm_map_t map, vm_size_t size, int flags, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, - unsigned long boundary, vm_cache_mode_t mode); + unsigned long boundary, vm_memattr_t memattr); vm_offset_t kmem_alloc_nofault(vm_map_t, vm_size_t); vm_offset_t kmem_alloc_wait(vm_map_t, vm_size_t); void kmem_free(vm_map_t, vm_offset_t, vm_size_t); Modified: head/sys/vm/vm_object.c ============================================================================== --- head/sys/vm/vm_object.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm_object.c Sun Jul 12 23:31:20 2009 (r195649) @@ -222,6 +222,7 @@ _vm_object_allocate(objtype_t type, vm_p object->size = size; object->generation = 1; object->ref_count = 1; + object->memattr = VM_MEMATTR_DEFAULT; object->flags = 0; object->uip = NULL; object->charge = 0; @@ -290,6 +291,36 @@ vm_object_clear_flag(vm_object_t object, object->flags &= ~bits; } +/* + * Sets the default memory attribute for the specified object. Pages + * that are allocated to this object are by default assigned this memory + * attribute. + * + * Presently, this function must be called before any pages are allocated + * to the object. In the future, this requirement may be relaxed for + * "default" and "swap" objects. + */ +int +vm_object_set_memattr(vm_object_t object, vm_memattr_t memattr) +{ + + VM_OBJECT_LOCK_ASSERT(object, MA_OWNED); + switch (object->type) { + case OBJT_DEFAULT: + case OBJT_DEVICE: + case OBJT_PHYS: + case OBJT_SWAP: + case OBJT_VNODE: + if (!TAILQ_EMPTY(&object->memq)) + return (KERN_FAILURE); + break; + case OBJT_DEAD: + return (KERN_INVALID_ARGUMENT); + } + object->memattr = memattr; + return (KERN_SUCCESS); +} + void vm_object_pip_add(vm_object_t object, short i) { Modified: head/sys/vm/vm_object.h ============================================================================== --- head/sys/vm/vm_object.h Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm_object.h Sun Jul 12 23:31:20 2009 (r195649) @@ -92,6 +92,7 @@ struct vm_object { int generation; /* generation ID */ int ref_count; /* How many refs?? */ int shadow_count; /* how many objects that this is a shadow for */ + vm_memattr_t memattr; /* default memory attribute for pages */ objtype_t type; /* type of pager */ u_short flags; /* see below */ u_short pg_color; /* (c) color of first page in obj */ @@ -213,6 +214,7 @@ void vm_object_page_remove (vm_object_t, boolean_t vm_object_populate(vm_object_t, vm_pindex_t, vm_pindex_t); void vm_object_reference (vm_object_t); void vm_object_reference_locked(vm_object_t); +int vm_object_set_memattr(vm_object_t object, vm_memattr_t memattr); void vm_object_shadow (vm_object_t *, vm_ooffset_t *, vm_size_t); void vm_object_split(vm_map_entry_t); void vm_object_sync(vm_object_t, vm_ooffset_t, vm_size_t, boolean_t, Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm_page.c Sun Jul 12 23:31:20 2009 (r195649) @@ -1109,12 +1109,15 @@ vm_page_alloc(vm_object_t object, vm_pin */ KASSERT(m != NULL, ("vm_page_alloc: missing page")); - KASSERT(m->queue == PQ_NONE, ("vm_page_alloc: page %p has unexpected queue %d", - m, m->queue)); + KASSERT(m->queue == PQ_NONE, + ("vm_page_alloc: page %p has unexpected queue %d", m, m->queue)); KASSERT(m->wire_count == 0, ("vm_page_alloc: page %p is wired", m)); KASSERT(m->hold_count == 0, ("vm_page_alloc: page %p is held", m)); KASSERT(m->busy == 0, ("vm_page_alloc: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_page_alloc: page %p is dirty", m)); + KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, + ("vm_page_alloc: page %p has unexpected memattr %d", m, + pmap_page_get_memattr(m))); if ((m->flags & PG_CACHED) != 0) { KASSERT(m->valid != 0, ("vm_page_alloc: cached page %p is invalid", m)); @@ -1157,9 +1160,11 @@ vm_page_alloc(vm_object_t object, vm_pin m->act_count = 0; mtx_unlock(&vm_page_queue_free_mtx); - if ((req & VM_ALLOC_NOOBJ) == 0) + if (object != NULL) { + if (object->memattr != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, object->memattr); vm_page_insert(m, object, pindex); - else + } else m->pindex = pindex; /* @@ -1415,6 +1420,16 @@ vm_page_free_toq(vm_page_t m) m->flags &= ~PG_ZERO; vm_page_enqueue(PQ_HOLD, m); } else { + /* + * Restore the default memory attribute to the page. + */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + + /* + * Insert the page into the physical memory allocator's + * cache/free page queues. + */ mtx_lock(&vm_page_queue_free_mtx); m->flags |= PG_FREE; cnt.v_free_count++; @@ -1664,6 +1679,12 @@ vm_page_cache(vm_page_t m) object->generation++; /* + * Restore the default memory attribute to the page. + */ + if (pmap_page_get_memattr(m) != VM_MEMATTR_DEFAULT) + pmap_page_set_memattr(m, VM_MEMATTR_DEFAULT); + + /* * Insert the page into the object's collection of cached pages * and the physical memory allocator's cache/free page queues. */ Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Sun Jul 12 22:19:50 2009 (r195648) +++ head/sys/vm/vm_phys.c Sun Jul 12 23:31:20 2009 (r195649) @@ -588,7 +588,7 @@ vm_phys_zero_pages_idle(void) */ vm_page_t vm_phys_alloc_contig(unsigned long npages, vm_paddr_t low, vm_paddr_t high, - unsigned long alignment, unsigned long boundary, vm_cache_mode_t mode) + unsigned long alignment, unsigned long boundary) { struct vm_freelist *fl; struct vm_phys_seg *seg; @@ -698,6 +698,9 @@ done: ("vm_phys_alloc_contig: page %p is busy", m)); KASSERT(m->dirty == 0, ("vm_phys_alloc_contig: page %p is dirty", m)); + KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 01:39:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0F697106566B; Mon, 13 Jul 2009 01:39:00 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 402508FC14; Mon, 13 Jul 2009 01:38:58 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fxm24 with SMTP id 24so1623405fxm.43 for ; Sun, 12 Jul 2009 18:38:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Zj7kjRt6yTExypg2AYTfAcnyWOHGR2oH5Egbceaukz4=; b=OGndbzug2TNHLhl9q9XN8z6teEz7Oki2AcxODXNVrCyEezlUCnMzwAE34lQ3jlkSLC 8OShIM/Dn6Xj06ZeACaxXNtj/kaRQC2RYOIaV1Ifer+PgCeZtWA2l9RWONFqW1+dfvfR YuhE+xZ1ULBlvpZDZiJNVmoEg6DQNHou2Dk8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=duxXkq22EHcvL507hPwHiUc+uZFLNCDKx5pZAWdnW90/aDTA5owLg0zaaHPmawI8hR JY2wpPvWZ0iLdf+RAOMfQGt7qFJafl8DTIqQ9W5B/J7bGwkv8iFSJqov9zgOr1wPqnVL XfDgmhkfKgek0BYLGvzGzfjj8fUfl9/CxHDew= MIME-Version: 1.0 Received: by 10.239.168.6 with SMTP id i6mr377581hbe.25.1247447378182; Sun, 12 Jul 2009 18:09:38 -0700 (PDT) In-Reply-To: <4A56FC7C.8060107@samsco.org> References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> Date: Sun, 12 Jul 2009 22:09:38 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Scott Long Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, Scott Long , svn-src-all@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 01:39:00 -0000 On Fri, Jul 10, 2009 at 5:31 AM, Scott Long wrote: > Poul-Henning Kamp wrote: >> >> In message <200907100818.n6A8I8p1011853@svn.freebsd.org>, Scott Long >> writes: >> >>> ATA drives are accessed via 'ada' device nodes. >> >> It there a particular good reason why we insist on making this >> silly mistake every five years ? >> >> I am pretty sure you were around when Justin won friends by renaming >> the SCSI disk devices ? > > 1. I clearly stated that the name is experimental and that a change in > the future is possible. Well, from a user's perspective, if CD/DVD drives are to be seen as 'cdX', then it would make sense that hard disks were seen as daX, as already advertised by cam(4). > 2. If the name does change, and if it changes to either 'ad' or 'da', it > can't happen until the newbus stuff is done first. I desperately need > help with that, btw, starting with removing the need for Giant from > newbus. Contact myself and/or Warner for details. > > 3. Exposing driver name details as the primary handle for users is > something that I disagree with, and I'd ultimately like to see every > direct-access block device in the system be called 'disk'. Or "phk". > Or "bde" for all I care =-) > > 4. While feelings may have been hurt 12 years ago, life did, in fact, go > on. > > Scott From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 02:16:32 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D70131065670; Mon, 13 Jul 2009 02:16:32 +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 45B908FC08; Mon, 13 Jul 2009 02:16:31 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n6D2GQUx039076; Sun, 12 Jul 2009 20:16:26 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A5A98FA.3050208@samsco.org> Date: Sun, 12 Jul 2009 20:16:26 -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: "Carlos A. M. dos Santos" References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=3.8 tests=ALL_TRUSTED,AWL,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 Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 02:16:33 -0000 Carlos A. M. dos Santos wrote: > On Fri, Jul 10, 2009 at 5:31 AM, Scott Long wrote: >> Poul-Henning Kamp wrote: >>> In message <200907100818.n6A8I8p1011853@svn.freebsd.org>, Scott Long >>> writes: >>> >>>> ATA drives are accessed via 'ada' device nodes. >>> It there a particular good reason why we insist on making this >>> silly mistake every five years ? >>> >>> I am pretty sure you were around when Justin won friends by renaming >>> the SCSI disk devices ? >> 1. I clearly stated that the name is experimental and that a change in >> the future is possible. > > Well, from a user's perspective, if CD/DVD drives are to be seen as > 'cdX', then it would make sense that hard disks were seen as daX, as > already advertised by cam(4). > It gets more complicated than that, even. What about a SAS controller that handles both SATA and SAS disks? Should some disks on the controller be called one thing and some disks be called something else, even though they are both disks? What about intelligent controllers like MPT that do ATA emulation in firmware; SATA and SAS already both show up as 'da' under that controller. How consistent should it be that some disks show up under one name instead of the other name, depending on some feature of controller and/or disk firmware (and I'm not even talking about RAID controllers yet, see below). Should users be expected to care about this level of detail just to get their filesystem created and mounted (and no, this is not a debate about disk and/or filesystem labels, k thx)? SATA vs SCSI/SAS is really just a difference in firmware these days, and it's a difference that the computer should be smart enough to handle transparently in the common case of detecting the disks and doing i/o. Why burden users with caring about the details of a protocol, when all they want to do is access their data? Computers are supposed to automate mundane tasks and decisions like this, not add new mundane tasks and decisions for us to manage by hand. The only time that the protocol matters in a user-visible way is when using camcontrol to manually send a command. I consider camcontrol to be a power-user tool anyways; it's not something that is needed at boot or needed in order to access a USB thumb drive. The only big downside to using the 'da' device moniker for SATA disks is that it hinders people who want to experiment with switching back and forth between the old and new ahci/ata drivers. I feel for these people, and I don't like making their lives hard. But on the other hand, this is a transition period, and experimenting is not without headaches and risks. A day will come, hopefully fairly soon, where switching between the two subsystems is no longer needed, and I don't like catering to a short term need at the expense of a long-term need. One solution to moderate the risk and workload for these experimental users is to add some sort of intelligence to the system that would create 'ad' aliases for 'da' sata disks, but only if the classic ata driver is not present. This restriction would be needed so that there aren't any name clashes in the 'ad' space. Users could then generate some CAM hints to specify 'adX' unit numbers that match what the classic ata driver would use. Another solution is to just bite the bullet and do what I've ultimately wanted to do with disk device names, and create 'diskX' aliases for all direct-access block devices. This would affect hard disks, memory sticks, logical disks like g_raid things, and things that look like hard disks. It would not include cdroms, tapes, etc, that operate on different paradigm than disks. Then you'd have a single handle for both classic ata and new cam devices. There would be a problem with keping unit numbers consistent between classic ata and CAM, though, so this would still present some risk to the experimenter group. However, it also represents where I'd ultimately like this whole disk naming debate to go. What needs to happen in any case is that newbus needs to get out from under Giant. CAM needs to be able to create and destroy devices on the fly, and having to juggle Giant to do that is a step backwards that I don't want to take. Once the newbus problem is solved (and there is already at least one person interested in it, please contact me if you are also interested) then CAM periphs and buses can be made into newbus objects, and the unit numbering for them can be handled consistently and safely though the devclass mechanism in newbus. Once that happens, SATA disks can use 'da' or 'ad' or anything else without conflicts in the unit number space. And then, it's just a question of which color best suits the shed that houses our nuclear reactor. Scott From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 03:09:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BBF28106566B; Mon, 13 Jul 2009 03:09:02 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.freebsd.org (Postfix) with ESMTP id 0AFBD8FC13; Mon, 13 Jul 2009 03:09:01 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (130.48.233.220.static.exetel.com.au [220.233.48.130]) (authenticated bits=0) by cain.gsoft.com.au (8.13.8/8.13.8) with ESMTP id n6D38sMY038900 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Mon, 13 Jul 2009 12:38:56 +0930 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: cvs-all@freebsd.org Date: Mon, 13 Jul 2009 13:08:32 +1000 User-Agent: KMail/1.9.10 References: <37131.1247214217@critter.freebsd.dk> <4A5A98FA.3050208@samsco.org> In-Reply-To: <4A5A98FA.3050208@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1487338.LL4kmf39c3"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200907131308.41598.doconnor@gsoft.com.au> X-Spam-Score: -2.053 () AWL,BAYES_00 X-Scanned-By: MIMEDefang 2.63 on 203.31.81.10 Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 03:09:03 -0000 --nextPart1487338.LL4kmf39c3 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 13 Jul 2009, Scott Long wrote: > The only big downside to using the 'da' device moniker for SATA disks > is that it hinders people who want to experiment with switching back > and forth between the old and new ahci/ata drivers. =A0I feel for these > people, and I don't like making their lives hard. =A0But on the other > hand, this is a transition period, and experimenting is not without > headaches and risks. =A0A day will come, hopefully fairly soon, where > switching between the two subsystems is no longer needed, and I don't > like catering to a short term need at the expense of a long-term > need. If you are such a user it is trivial to switch to using UFS ID labels. Swap is a little more complex but you can use glabel fairly easily. =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1487338.LL4kmf39c3 Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iD8DBQBKWqU55ZPcIHs/zowRAtvsAJ9mN1w8mJ8gZuYaJ93YzKK5uRUBtQCgiplv Bth9nZEPfCRBP/2loydhdac= =0Yed -----END PGP SIGNATURE----- --nextPart1487338.LL4kmf39c3-- From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 05:17:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D902A106566C; Mon, 13 Jul 2009 05:17:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id A57548FC12; Mon, 13 Jul 2009 05:17:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 248401194; Mon, 13 Jul 2009 08:17:49 +0300 Message-ID: <4A5AC36D.1040705@FreeBSD.org> Date: Mon, 13 Jul 2009 08:17:33 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: "Carlos A. M. dos Santos" References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, Scott Long , svn-src-all@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 05:17:54 -0000 Carlos A. M. dos Santos wrote: > On Fri, Jul 10, 2009 at 5:31 AM, Scott Long wrote: >> Poul-Henning Kamp wrote: >>> In message <200907100818.n6A8I8p1011853@svn.freebsd.org>, Scott Long >>> writes: >>> >>>> ATA drives are accessed via 'ada' device nodes. >>> It there a particular good reason why we insist on making this >>> silly mistake every five years ? >>> >>> I am pretty sure you were around when Justin won friends by renaming >>> the SCSI disk devices ? >> 1. I clearly stated that the name is experimental and that a change in >> the future is possible. > > Well, from a user's perspective, if CD/DVD drives are to be seen as > 'cdX', then it would make sense that hard disks were seen as daX, as > already advertised by cam(4). cdX implemented by cd(4) driver in both cases uses the same SCSI command set. In ATA case, SCSI commands are just wrapped within ATAPI PACKET command. For disks, situation is completely different, as ATA disks have completely different command and feature set. So da(4) is a driver for SCSI command set devices and ada(4) is a driver for ATA command set devices. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 05:51:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C534F106566C; Mon, 13 Jul 2009 05:51:34 +0000 (UTC) (envelope-from dwmalone@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 97FD48FC0C; Mon, 13 Jul 2009 05:51:34 +0000 (UTC) (envelope-from dwmalone@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 n6D5pYLs012692; Mon, 13 Jul 2009 05:51:34 GMT (envelope-from dwmalone@svn.freebsd.org) Received: (from dwmalone@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6D5pYoY012691; Mon, 13 Jul 2009 05:51:34 GMT (envelope-from dwmalone@svn.freebsd.org) Message-Id: <200907130551.n6D5pYoY012691@svn.freebsd.org> From: David Malone Date: Mon, 13 Jul 2009 05:51: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: r195652 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 05:51:35 -0000 Author: dwmalone Date: Mon Jul 13 05:51:33 2009 New Revision: 195652 URL: http://svn.freebsd.org/changeset/base/195652 Log: 1) Use our vendor domain at the pool. 2) Point people at the pool website and encourage people to provide a server in the pool (as a courtesy to the pool guys). 3) Fix a spelling. 4) Comment out the local clock and include a link to documentation for use of the local clock on the ntp.org site. Approved by: re (kib) Modified: head/etc/ntp.conf Modified: head/etc/ntp.conf ============================================================================== --- head/etc/ntp.conf Mon Jul 13 01:37:48 2009 (r195651) +++ head/etc/ntp.conf Mon Jul 13 05:51:33 2009 (r195652) @@ -13,19 +13,22 @@ # # The following three servers will give you a random set of three # NTP servers geographically close to you. -# See http://en.wikipedia.org/wiki/NTP_pool for details. +# See http://www.pool.ntp.org/ for details. Note, the pool encourages +# users with a static IP and good upstream NTP servers to add a server +# to the pool. See http://www.pool.ntp.org/join.html if you are interested. # # The option `iburst' is used for faster initial synchronisation. # The option `maxpoll 9' is used to prevent PLL/FLL flipping on FreeBSD. # -server 0.pool.ntp.org iburst maxpoll 9 -server 1.pool.ntp.org iburst maxpoll 9 -server 2.pool.ntp.org iburst maxpoll 9 +server 0.freebsd.pool.ntp.org iburst maxpoll 9 +server 1.freebsd.pool.ntp.org iburst maxpoll 9 +server 2.freebsd.pool.ntp.org iburst maxpoll 9 +#server 3.freebsd.pool.ntp.org iburst maxpoll 9 # # If you want to pick yourself which country's public NTP server # you want sync against, comment out the above servers, uncomment -# the next ones and replace CC with the country's abbrevation. +# the next ones and replace CC with the country's abbreviation. # Make sure that the hostnames resolve to a proper IP address! # # server 0.CC.pool.ntp.org iburst maxpoll 9 @@ -50,10 +53,12 @@ server 2.pool.ntp.org iburst maxpoll 9 #restrict 127.127.1.0 # -# If we lose sync against all configured servers, the NTP clients -# syncing against this server will lose sync too. To overcome this, -# we will act as a stratum 10 server with our own internal clock -# so that everybody at least will have the same time as we have. +# If a server loses sync with all upstream servers, NTP clients +# no longer follow that server. The local clock can be configured +# to provide a time source when this happens, but it should usually +# be configured on just one server on a network. For more details see +# http://support.ntp.org/bin/view/Support/UndisciplinedLocalClock +# The use of Orphan Mode may be preferable. # -server 127.127.1.0 -fudge 127.127.1.0 stratum 10 +#server 127.127.1.0 +#fudge 127.127.1.0 stratum 10 From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 06:12:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE4AB1065670; Mon, 13 Jul 2009 06:12:21 +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 BC5FB8FC12; Mon, 13 Jul 2009 06:12:21 +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 n6D6CLND014562; Mon, 13 Jul 2009 06:12:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6D6CLMP014560; Mon, 13 Jul 2009 06:12:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907130612.n6D6CLMP014560@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Jul 2009 06:12: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: r195653 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 06:12:22 -0000 Author: mav Date: Mon Jul 13 06:12:21 2009 New Revision: 195653 URL: http://svn.freebsd.org/changeset/base/195653 Log: Rename ATA probe driver to "aprobe" to resolve name conflict with SCSI and fix loading cam as module. Approved by: re (implicitly) Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Mon Jul 13 05:51:33 2009 (r195652) +++ head/sys/cam/ata/ata_xpt.c Mon Jul 13 06:12:21 2009 (r195653) @@ -83,11 +83,11 @@ static periph_init_t probe_periph_init; static struct periph_driver probe_driver = { - probe_periph_init, "probe", + probe_periph_init, "aprobe", TAILQ_HEAD_INITIALIZER(probe_driver.units) }; -PERIPHDRIVER_DECLARE(probe, probe_driver); +PERIPHDRIVER_DECLARE(aprobe, probe_driver); typedef enum { PROBE_RESET, @@ -1311,7 +1311,7 @@ ata_scan_lun(struct cam_periph *periph, request_ccb->crcn.flags = flags; } - if ((old_periph = cam_periph_find(path, "probe")) != NULL) { + if ((old_periph = cam_periph_find(path, "aprobe")) != NULL) { probe_softc *softc; softc = (probe_softc *)old_periph->softc; @@ -1319,7 +1319,7 @@ ata_scan_lun(struct cam_periph *periph, periph_links.tqe); } else { status = cam_periph_alloc(proberegister, NULL, probecleanup, - probestart, "probe", + probestart, "aprobe", CAM_PERIPH_BIO, request_ccb->ccb_h.path, NULL, 0, request_ccb); From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 06:17:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9E3241065670; Mon, 13 Jul 2009 06:17:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from cmail.optima.ua (cmail.optima.ua [195.248.191.121]) by mx1.freebsd.org (Postfix) with ESMTP id 5E3EF8FC12; Mon, 13 Jul 2009 06:17:01 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from [212.86.226.226] (account mav@alkar.net HELO mavbook.mavhome.dp.ua) by cmail.optima.ua (CommuniGate Pro SMTP 5.2.9) with ESMTPSA id 248405980; Mon, 13 Jul 2009 09:16:58 +0300 Message-ID: <4A5AD14A.6090307@FreeBSD.org> Date: Mon, 13 Jul 2009 09:16:42 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.21 (X11/20090405) MIME-Version: 1.0 To: "Paul B. Mahol" References: <200907100818.n6A8I8p1011853@svn.freebsd.org> <3a142e750907110250p166d2d64q19a3c883ef79ba43@mail.gmail.com> <3a142e750907111030h159ac2e0q435e5ddbc305fb14@mail.gmail.com> In-Reply-To: <3a142e750907111030h159ac2e0q435e5ddbc305fb14@mail.gmail.com> 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, Scott Long Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 06:17:04 -0000 Paul B. Mahol wrote: > On 7/11/09, Paul B. Mahol wrote: >> When trying to load cam.ko nothing verbose is displayed, just this: >> >> module_register: module probe already exists! >> Module probe failed to register: 17 > > Argh, it's so obvious, it doesnt get loaded because module probe is > used twice with > PERIPHDRIVER_DECLARE(probe, ...) in scsi_xpt.c and ata_xpt.c Fixed. Thanks. -- Alexander Motin From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 06:33:33 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 655D81065687 for ; Mon, 13 Jul 2009 06:33:33 +0000 (UTC) (envelope-from njm@njm.me.uk) Received: from smtp003.apm-internet.net (smtp003.apm-internet.net [85.119.248.52]) by mx1.freebsd.org (Postfix) with SMTP id CC9F78FC18 for ; Mon, 13 Jul 2009 06:33:32 +0000 (UTC) (envelope-from njm@njm.me.uk) Received: (qmail 50783 invoked from network); 13 Jul 2009 06:33:30 -0000 Received: from unknown (HELO titania.njm.me.uk) (86.148.211.148) by smtp003.apm-internet.net with SMTP; 13 Jul 2009 06:33:30 -0000 Received: from titania.njm.me.uk (localhost [127.0.0.1]) by titania.njm.me.uk (8.14.3/8.14.3) with ESMTP id n6D6XSAk078711; Mon, 13 Jul 2009 07:33:28 +0100 (BST) (envelope-from njm@njm.me.uk) Received: (from njm@localhost) by titania.njm.me.uk (8.14.3/8.14.3/Submit) id n6D6XSrd078710; Mon, 13 Jul 2009 07:33:28 +0100 (BST) (envelope-from njm@njm.me.uk) Date: Mon, 13 Jul 2009 07:33:28 +0100 From: "N.J. Mann" To: David Malone Message-ID: <20090713063328.GA78384@titania.njm.me.uk> Mail-Followup-To: David Malone , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200907130551.n6D5pYoY012691@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907130551.n6D5pYoY012691@svn.freebsd.org> X-Operating-System: FreeBSD 7.2-STABLE User-Agent: mutt-NJM (2009-06-23) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r195652 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 06:33:33 -0000 In message <200907130551.n6D5pYoY012691@svn.freebsd.org>, David Malone (dwmalone@FreeBSD.org) wrote: > Author: dwmalone > Date: Mon Jul 13 05:51:33 2009 > New Revision: 195652 > URL: http://svn.freebsd.org/changeset/base/195652 > > Log: > 1) Use our vendor domain at the pool. > 2) Point people at the pool website and encourage > people to provide a server in the pool (as a > courtesy to the pool guys). > 3) Fix a spelling. > 4) Comment out the local clock and include a link > to documentation for use of the local clock on > the ntp.org site. > > Approved by: re (kib) > > Modified: > head/etc/ntp.conf > > Modified: head/etc/ntp.conf > ============================================================================== > --- head/etc/ntp.conf Mon Jul 13 01:37:48 2009 (r195651) > +++ head/etc/ntp.conf Mon Jul 13 05:51:33 2009 (r195652) > @@ -13,19 +13,22 @@ > # > # The following three servers will give you a random set of three > # NTP servers geographically close to you. > -# See http://en.wikipedia.org/wiki/NTP_pool for details. > +# See http://www.pool.ntp.org/ for details. Note, the pool encourages > +# users with a static IP and good upstream NTP servers to add a server > +# to the pool. See http://www.pool.ntp.org/join.html if you are interested. > # > # The option `iburst' is used for faster initial synchronisation. > # The option `maxpoll 9' is used to prevent PLL/FLL flipping on FreeBSD. > # > -server 0.pool.ntp.org iburst maxpoll 9 > -server 1.pool.ntp.org iburst maxpoll 9 > -server 2.pool.ntp.org iburst maxpoll 9 > +server 0.freebsd.pool.ntp.org iburst maxpoll 9 > +server 1.freebsd.pool.ntp.org iburst maxpoll 9 > +server 2.freebsd.pool.ntp.org iburst maxpoll 9 > +#server 3.freebsd.pool.ntp.org iburst maxpoll 9 > > # > # If you want to pick yourself which country's public NTP server > # you want sync against, comment out the above servers, uncomment The above sentence seems very clumsy to me. How about: # If you wish to choose which country's public server you want # to sync against, ... Cheers, Nick. -- From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 11:51:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C21B106566B; Mon, 13 Jul 2009 11:51:03 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 687778FC15; Mon, 13 Jul 2009 11:51:03 +0000 (UTC) (envelope-from lstewart@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 n6DBp3he024161; Mon, 13 Jul 2009 11:51:03 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DBp35J024156; Mon, 13 Jul 2009 11:51:03 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200907131151.n6DBp35J024156@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 13 Jul 2009 11:51: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: r195654 - in head: . sys/dev/cxgb/ulp/tom sys/netinet sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 11:51:03 -0000 Author: lstewart Date: Mon Jul 13 11:51:02 2009 New Revision: 195654 URL: http://svn.freebsd.org/changeset/base/195654 Log: Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface to the TCP syncache. This returns struct tcpopt to being private within the TCP implementation, thus allowing it to be modified without ABI concerns. The patch breaks the ABI. Bump __FreeBSD_version to 800103 accordingly. The cxgb driver is the only TOE consumer affected by this change, and needs to be recompiled along with the kernel. Suggested by: rwatson Reviewed by: rwatson, kmacy Approved by: re (kensmith), kensmith (mentor temporarily unavailable) Modified: head/UPDATING head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c head/sys/netinet/tcp_offload.h head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_syncache.h head/sys/netinet/tcp_var.h head/sys/sys/param.h Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jul 13 06:12:21 2009 (r195653) +++ head/UPDATING Mon Jul 13 11:51:02 2009 (r195654) @@ -22,6 +22,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090713: + The TOE interface to the TCP syncache has been modified to remove struct + tcpopt () from the ABI of the network stack. The + cxgb driver is the only TOE consumer affected by this change, and needs + to be recompiled along with the kernel. As this change breaks the ABI, + bump __FreeBSD_version to 800103. + 20090712: Padding has been added to struct tcpcb, sackhint and tcpstat in to facilitate future MFCs and bug fixes whilst Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Mon Jul 13 06:12:21 2009 (r195653) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Mon Jul 13 11:51:02 2009 (r195654) @@ -3249,13 +3249,13 @@ static void syncache_add_accept_req(struct cpl_pass_accept_req *req, struct socket *lso, struct toepcb *toep) { struct in_conninfo inc; - struct tcpopt to; + struct toeopt toeo; struct tcphdr th; struct inpcb *inp; int mss, wsf, sack, ts; uint32_t rcv_isn = ntohl(req->rcv_isn); - bzero(&to, sizeof(struct tcpopt)); + bzero(&toeo, sizeof(struct toeopt)); inp = so_sotoinpcb(lso); /* @@ -3281,10 +3281,11 @@ syncache_add_accept_req(struct cpl_pass_ wsf = req->tcp_options.wsf; ts = req->tcp_options.tstamp; sack = req->tcp_options.sack; - to.to_mss = mss; - to.to_wscale = wsf; - to.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0); - tcp_offload_syncache_add(&inc, &to, &th, inp, &lso, &cxgb_toe_usrreqs, toep); + toeo.to_mss = mss; + toeo.to_wscale = wsf; + toeo.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0); + tcp_offload_syncache_add(&inc, &toeo, &th, inp, &lso, &cxgb_toe_usrreqs, +toep); } @@ -3584,7 +3585,7 @@ syncache_expand_establish_req(struct cpl { struct in_conninfo inc; - struct tcpopt to; + struct toeopt to; struct tcphdr th; int mss, wsf, sack, ts; struct mbuf *m = NULL; @@ -3597,7 +3598,7 @@ syncache_expand_establish_req(struct cpl opt = ntohs(req->tcp_opt); - bzero(&to, sizeof(struct tcpopt)); + bzero(&toeo, sizeof(struct toeopt)); /* * Fill out information for entering us into the syncache @@ -3617,15 +3618,15 @@ syncache_expand_establish_req(struct cpl ts = G_TCPOPT_TSTAMP(opt); sack = G_TCPOPT_SACK(opt); - to.to_mss = mss; - to.to_wscale = G_TCPOPT_SND_WSCALE(opt); - to.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0); + toeo.to_mss = mss; + toeo.to_wscale = G_TCPOPT_SND_WSCALE(opt); + toeo.to_flags = (mss ? TOF_MSS : 0) | (wsf ? TOF_SCALE : 0) | (ts ? TOF_TS : 0) | (sack ? TOF_SACKPERM : 0); DPRINTF("syncache expand of %d:%d %d:%d mss:%d wsf:%d ts:%d sack:%d\n", ntohl(req->local_ip), ntohs(req->local_port), ntohl(req->peer_ip), ntohs(req->peer_port), mss, wsf, ts, sack); - return tcp_offload_syncache_expand(&inc, &to, &th, so, m); + return tcp_offload_syncache_expand(&inc, &toeo, &th, so, m); } Modified: head/sys/netinet/tcp_offload.h ============================================================================== --- head/sys/netinet/tcp_offload.h Mon Jul 13 06:12:21 2009 (r195653) +++ head/sys/netinet/tcp_offload.h Mon Jul 13 11:51:02 2009 (r195654) @@ -184,6 +184,19 @@ struct toe_usrreqs { void (*tu_syncache_event)(int event, void *toep); }; +/* + * Proxy for struct tcpopt between TOE drivers and TCP functions. + */ +struct toeopt { + u_int64_t to_flags; /* see tcpopt in tcp_var.h */ + u_int16_t to_mss; /* maximum segment size */ + u_int8_t to_wscale; /* window scaling */ + + u_int8_t _pad1; /* explicit pad for 64bit alignment */ + u_int32_t _pad2; /* explicit pad for 64bit alignment */ + u_int64_t _pad3[4]; /* TBD */ +}; + #define TOE_SC_ENTRY_PRESENT 1 /* 4-tuple already present */ #define TOE_SC_DROP 2 /* connection was timed out */ Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Mon Jul 13 06:12:21 2009 (r195653) +++ head/sys/netinet/tcp_syncache.c Mon Jul 13 11:51:02 2009 (r195654) @@ -943,14 +943,20 @@ failed: } int -tcp_offload_syncache_expand(struct in_conninfo *inc, struct tcpopt *to, +tcp_offload_syncache_expand(struct in_conninfo *inc, struct toeopt *toeo, struct tcphdr *th, struct socket **lsop, struct mbuf *m) { INIT_VNET_INET(curvnet); + struct tcpopt to; int rc; + + bzero(&to, sizeof(struct tcpopt)); + to.to_mss = toeo->to_mss; + to.to_wscale = toeo->to_wscale; + to.to_flags = toeo->to_flags; INP_INFO_WLOCK(&V_tcbinfo); - rc = syncache_expand(inc, to, th, lsop, m); + rc = syncache_expand(inc, &to, th, lsop, m); INP_INFO_WUNLOCK(&V_tcbinfo); return (rc); @@ -1437,15 +1443,22 @@ syncache_add(struct in_conninfo *inc, st } void -tcp_offload_syncache_add(struct in_conninfo *inc, struct tcpopt *to, +tcp_offload_syncache_add(struct in_conninfo *inc, struct toeopt *toeo, struct tcphdr *th, struct inpcb *inp, struct socket **lsop, struct toe_usrreqs *tu, void *toepcb) { INIT_VNET_INET(curvnet); + struct tcpopt to; + + bzero(&to, sizeof(struct tcpopt)); + to.to_mss = toeo->to_mss; + to.to_wscale = toeo->to_wscale; + to.to_flags = toeo->to_flags; INP_INFO_WLOCK(&V_tcbinfo); INP_WLOCK(inp); - _syncache_add(inc, to, th, inp, lsop, NULL, tu, toepcb); + + _syncache_add(inc, &to, th, inp, lsop, NULL, tu, toepcb); } /* Modified: head/sys/netinet/tcp_syncache.h ============================================================================== --- head/sys/netinet/tcp_syncache.h Mon Jul 13 06:12:21 2009 (r195653) +++ head/sys/netinet/tcp_syncache.h Mon Jul 13 11:51:02 2009 (r195654) @@ -34,6 +34,8 @@ #define _NETINET_TCP_SYNCACHE_H_ #ifdef _KERNEL +struct toeopt; + void syncache_init(void); #ifdef VIMAGE void syncache_destroy(void); @@ -41,11 +43,11 @@ void syncache_destroy(void); void syncache_unreach(struct in_conninfo *, struct tcphdr *); int syncache_expand(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct socket **, struct mbuf *); -int tcp_offload_syncache_expand(struct in_conninfo *inc, struct tcpopt *to, +int tcp_offload_syncache_expand(struct in_conninfo *inc, struct toeopt *toeo, struct tcphdr *th, struct socket **lsop, struct mbuf *m); void syncache_add(struct in_conninfo *, struct tcpopt *, struct tcphdr *, struct inpcb *, struct socket **, struct mbuf *); -void tcp_offload_syncache_add(struct in_conninfo *, struct tcpopt *, +void tcp_offload_syncache_add(struct in_conninfo *, struct toeopt *, struct tcphdr *, struct inpcb *, struct socket **, struct toe_usrreqs *tu, void *toepcb); Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Mon Jul 13 06:12:21 2009 (r195653) +++ head/sys/netinet/tcp_var.h Mon Jul 13 11:51:02 2009 (r195654) @@ -267,7 +267,7 @@ struct tcpcb { * options in tcp_addoptions. */ struct tcpopt { - u_long to_flags; /* which options are present */ + u_int64_t to_flags; /* which options are present */ #define TOF_MSS 0x0001 /* maximum segment size */ #define TOF_SCALE 0x0002 /* window scaling */ #define TOF_SACKPERM 0x0004 /* SACK permitted */ @@ -277,11 +277,11 @@ struct tcpopt { #define TOF_MAXOPT 0x0100 u_int32_t to_tsval; /* new timestamp */ u_int32_t to_tsecr; /* reflected timestamp */ + u_char *to_sacks; /* pointer to the first SACK blocks */ + u_char *to_signature; /* pointer to the TCP-MD5 signature */ u_int16_t to_mss; /* maximum segment size */ u_int8_t to_wscale; /* window scaling */ u_int8_t to_nsacks; /* number of SACK blocks */ - u_char *to_sacks; /* pointer to the first SACK blocks */ - u_char *to_signature; /* pointer to the TCP-MD5 signature */ }; /* Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Mon Jul 13 06:12:21 2009 (r195653) +++ head/sys/sys/param.h Mon Jul 13 11:51:02 2009 (r195654) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 800102 /* Master, propagated to newvers */ +#define __FreeBSD_version 800103 /* Master, propagated to newvers */ #ifndef LOCORE #include From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 11:59:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99FFD106566C; Mon, 13 Jul 2009 11:59:38 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DA208FC15; Mon, 13 Jul 2009 11:59:38 +0000 (UTC) (envelope-from lstewart@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 n6DBxcXQ024365; Mon, 13 Jul 2009 11:59:38 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DBxcF8024363; Mon, 13 Jul 2009 11:59:38 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200907131159.n6DBxcF8024363@svn.freebsd.org> From: Lawrence Stewart Date: Mon, 13 Jul 2009 11:59: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: r195655 - head/sys/netinet X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 11:59:39 -0000 Author: lstewart Date: Mon Jul 13 11:59:38 2009 New Revision: 195655 URL: http://svn.freebsd.org/changeset/base/195655 Log: Fix a race in the manipulation of the V_tcp_sack_globalholes global variable, which is currently not protected by any type of lock. When triggered, the bug would sometimes cause a panic when the TCP activity to an affected machine eventually slowed during a lull. The panic only occurs if INVARIANTS is compiled into the kernel, and has laid dormant for some time as a result of INVARIANTS being off by default except in FreeBSD-CURRENT. Switch to atomic operations in the locations where the variable is changed. Reads have not been updated to be protected by atomics, so there is a possibility of accounting errors in any given calculation where the variable is read. This is considered unlikely to occur in the wild, and will not cause serious harm on rare occasions where it does. Thanks to Robert Watson for debugging help. Reported by: Kamigishi Rei Tested by: Kamigishi Rei Reviewed by: silby Approved by: re (rwatson), kensmith (mentor temporarily unavailable) Modified: head/sys/netinet/tcp_sack.c Modified: head/sys/netinet/tcp_sack.c ============================================================================== --- head/sys/netinet/tcp_sack.c Mon Jul 13 11:51:02 2009 (r195654) +++ head/sys/netinet/tcp_sack.c Mon Jul 13 11:59:38 2009 (r195655) @@ -273,7 +273,7 @@ tcp_sackhole_alloc(struct tcpcb *tp, tcp hole->rxmit = start; tp->snd_numholes++; - V_tcp_sack_globalholes++; + atomic_add_int(&V_tcp_sack_globalholes, 1); return hole; } @@ -289,7 +289,7 @@ tcp_sackhole_free(struct tcpcb *tp, stru uma_zfree(V_sack_hole_zone, hole); tp->snd_numholes--; - V_tcp_sack_globalholes--; + atomic_subtract_int(&V_tcp_sack_globalholes, 1); KASSERT(tp->snd_numholes >= 0, ("tp->snd_numholes >= 0")); KASSERT(V_tcp_sack_globalholes >= 0, ("tcp_sack_globalholes >= 0")); From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 12:46:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 815151065676; Mon, 13 Jul 2009 12:46:48 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: from mail-fx0-f224.google.com (mail-fx0-f224.google.com [209.85.220.224]) by mx1.freebsd.org (Postfix) with ESMTP id 5900D8FC0C; Mon, 13 Jul 2009 12:46:47 +0000 (UTC) (envelope-from unixmania@gmail.com) Received: by fxm24 with SMTP id 24so1847225fxm.43 for ; Mon, 13 Jul 2009 05:46:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Xc0akfhVqLxUY3lnwC6xw04BxCpm+7d1ggYybGxY1NY=; b=h+gQp5cebXKnwB0b8+eUw6HZF0uWUJiJjZbLzj2Fv7Wn2Hb5lFPsl+73fWexU/DRKu 1s2PZTeX1sBI/8y3mDKKvLIlaMC9lBC37amJCfeezz3TTElrkmemmwQ3WyH1mZfxkf2q pRAF6X0wANAiiNRo742FVZe/iZ3UuwV8YEgkc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=UTlfvd1FAnhPQi30sm9vs5CqN098ng3Ra/5FzILjrxOmmFm8uVo1vKuGlpTaDwmUlS LoxwpMy7GJplMuAgVXzKd80SUCgoyuaPY8yEsYJD9CdDpoxGm/4GgLR6vsWEsLDtWHO1 tjlaBeG2Hlj8oRml5NXHHm4d+wd1tW8I2jtrE= MIME-Version: 1.0 Received: by 10.239.169.80 with SMTP id n16mr451438hbe.167.1247489206359; Mon, 13 Jul 2009 05:46:46 -0700 (PDT) In-Reply-To: <4A5AC36D.1040705@FreeBSD.org> References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> <4A5AC36D.1040705@FreeBSD.org> Date: Mon, 13 Jul 2009 09:46:46 -0300 Message-ID: From: "Carlos A. M. dos Santos" To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, Scott Long , svn-src-all@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 12:46:51 -0000 On Mon, Jul 13, 2009 at 2:17 AM, Alexander Motin wrote: > Carlos A. M. dos Santos wrote: >> >> On Fri, Jul 10, 2009 at 5:31 AM, Scott Long wrote: >>> >>> Poul-Henning Kamp wrote: >>>> >>>> In message <200907100818.n6A8I8p1011853@svn.freebsd.org>, Scott Long >>>> writes: >>>> >>>>> =A0ATA drives are accessed via 'ada' device nodes. >>>> >>>> It there a particular good reason why we insist on making this >>>> silly mistake every five years ? >>>> >>>> I am pretty sure you were around when Justin won friends by renaming >>>> the SCSI disk devices ? >>> >>> 1. I clearly stated that the name is experimental and that a change in >>> the future is possible. >> >> Well, from a user's perspective, if CD/DVD drives are to be seen as >> 'cdX', then it would make sense that hard disks were seen as daX, as >> already advertised by cam(4). > > cdX implemented by cd(4) driver in both cases uses the same SCSI command > set. In ATA case, SCSI commands are just wrapped within ATAPI PACKET > command. For disks, situation is completely different, as ATA disks have > completely different command and feature set. So da(4) is a driver for SC= SI > command set devices and ada(4) is a driver for ATA command set devices. I know, but that is the driver's perspective, not the user's perspective. --=20 My preferred quotation of Robert Louis Stevenson is "You cannot make an omelette without breaking eggs". Not because I like the omelettes, but because I like the sound of eggs being broken. From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 12:53:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A44B1065675; Mon, 13 Jul 2009 12:53:43 +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 7D4B08FC08; Mon, 13 Jul 2009 12:53:43 +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 n6DCrhVb025508; Mon, 13 Jul 2009 12:53:43 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DCrhaP025499; Mon, 13 Jul 2009 12:53:43 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200907131253.n6DCrhaP025499@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 13 Jul 2009 12:53: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: r195656 - in head: . lib/libc/gen lib/libc/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 12:53:44 -0000 Author: trasz Date: Mon Jul 13 12:53:43 2009 New Revision: 195656 URL: http://svn.freebsd.org/changeset/base/195656 Log: Move msg{snd,recv,get,ctl} manual pages from section 3 to 2. Approved by: re (kib) Added: head/lib/libc/sys/msgctl.2 - copied, changed from r195490, head/lib/libc/gen/msgctl.3 head/lib/libc/sys/msgget.2 - copied, changed from r195490, head/lib/libc/gen/msgget.3 head/lib/libc/sys/msgrcv.2 - copied, changed from r195490, head/lib/libc/gen/msgrcv.3 head/lib/libc/sys/msgsnd.2 - copied, changed from r195490, head/lib/libc/gen/msgsnd.3 Deleted: head/lib/libc/gen/msgctl.3 head/lib/libc/gen/msgget.3 head/lib/libc/gen/msgrcv.3 head/lib/libc/gen/msgsnd.3 Modified: head/ObsoleteFiles.inc head/lib/libc/gen/Makefile.inc head/lib/libc/gen/ftok.3 head/lib/libc/sys/Makefile.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Mon Jul 13 11:59:38 2009 (r195655) +++ head/ObsoleteFiles.inc Mon Jul 13 12:53:43 2009 (r195656) @@ -14,6 +14,11 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090709: msgctl.3 msgget.3 msgrcv.3 msgsnd.3 manual pages moved +OLD_FILES+=usr/share/man/man3/msgctl.3.gz +OLD_FILES+=usr/share/man/man3/msgget.3.gz +OLD_FILES+=usr/share/man/man3/msgrcv.3.gz +OLD_FILES+=usr/share/man/man3/msgsnd.3.gz # 20090630: old kernel RPC implementation removal OLD_FILES+=usr/include/nfs/rpcv2.h # 20090624: update usbdi(9) Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Mon Jul 13 11:59:38 2009 (r195655) +++ head/lib/libc/gen/Makefile.inc Mon Jul 13 12:53:43 2009 (r195656) @@ -55,7 +55,7 @@ MAN+= alarm.3 arc4random.3 \ getpagesize.3 getpass.3 getpeereid.3 getprogname.3 getpwent.3 \ getttyent.3 getusershell.3 getvfsbyname.3 \ glob.3 initgroups.3 isgreater.3 ldexp.3 lockf.3 makecontext.3 \ - modf.3 msgctl.3 msgget.3 msgrcv.3 msgsnd.3 \ + modf.3 \ nice.3 nlist.3 pause.3 popen.3 \ posix_spawn.3 posix_spawn_file_actions_addopen.3 \ posix_spawn_file_actions_init.3 posix_spawnattr_getflags.3 \ Modified: head/lib/libc/gen/ftok.3 ============================================================================== --- head/lib/libc/gen/ftok.3 Mon Jul 13 11:59:38 2009 (r195655) +++ head/lib/libc/gen/ftok.3 Mon Jul 13 12:53:43 2009 (r195656) @@ -24,7 +24,7 @@ .\" ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd June 24, 1994 +.Dd July 9, 2009 .Os .Dt FTOK 3 .Sh NAME @@ -41,7 +41,7 @@ The .Fn ftok function attempts to create a unique key suitable for use with the -.Xr msgget 3 , +.Xr msgget 2 , .Xr semget 2 and .Xr shmget 2 @@ -66,7 +66,7 @@ does not exist or if it cannot be access .Sh SEE ALSO .Xr semget 2 , .Xr shmget 2 , -.Xr msgget 3 +.Xr msgget 2 .Sh HISTORY The .Fn ftok Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Mon Jul 13 11:59:38 2009 (r195655) +++ head/lib/libc/sys/Makefile.inc Mon Jul 13 12:53:43 2009 (r195656) @@ -81,6 +81,7 @@ MAN+= abort2.2 accept.2 access.2 acct.2 mlockall.2 mmap.2 modfind.2 modnext.2 modstat.2 mount.2 mprotect.2 \ mq_close.2 mq_getattr.2 mq_notify.2 mq_open.2 mq_receive.2 mq_send.2 \ mq_setattr.2 \ + msgctl.2 msgget.2 msgrcv.2 msgsnd.2 \ msync.2 munmap.2 nanosleep.2 nfssvc.2 ntp_adjtime.2 open.2 \ pathconf.2 pipe.2 poll.2 posix_openpt.2 profil.2 ptrace.2 quotactl.2 \ read.2 readlink.2 reboot.2 recv.2 rename.2 revoke.2 rfork.2 rmdir.2 \ Copied and modified: head/lib/libc/sys/msgctl.2 (from r195490, head/lib/libc/gen/msgctl.3) ============================================================================== --- head/lib/libc/gen/msgctl.3 Thu Jul 9 12:48:43 2009 (r195490, copy source) +++ head/lib/libc/sys/msgctl.2 Mon Jul 13 12:53:43 2009 (r195656) @@ -31,8 +31,8 @@ .\" .\" $FreeBSD$ .\"/ -.Dd April 3, 2008 -.Dt MSGCTL 3 +.Dd July 9, 2009 +.Dt MSGCTL 2 .Os .Sh NAME .Nm msgctl @@ -144,9 +144,9 @@ values in the data structure associated .El .Pp The permission to read from or write to a message queue (see -.Xr msgsnd 3 +.Xr msgsnd 2 and -.Xr msgrcv 3 ) +.Xr msgrcv 2 ) is determined by the .Va msg_perm.mode field in the same way as is @@ -202,9 +202,9 @@ argument specifies an invalid address. .El .Sh SEE ALSO -.Xr msgget 3 , -.Xr msgrcv 3 , -.Xr msgsnd 3 +.Xr msgget 2 , +.Xr msgrcv 2 , +.Xr msgsnd 2 .Sh HISTORY Message queues appeared in the first release of .At V . Copied and modified: head/lib/libc/sys/msgget.2 (from r195490, head/lib/libc/gen/msgget.3) ============================================================================== --- head/lib/libc/gen/msgget.3 Thu Jul 9 12:48:43 2009 (r195490, copy source) +++ head/lib/libc/sys/msgget.2 Mon Jul 13 12:53:43 2009 (r195656) @@ -31,8 +31,8 @@ .\" $FreeBSD$ .\" .\"/ -.Dd August 17, 1995 -.Dt MSGGET 3 +.Dd July 9, 2009 +.Dt MSGGET 2 .Os .Sh NAME .Nm msgget @@ -67,7 +67,7 @@ bit is set in If a new message queue is created, the data structure associated with it (the .Va msqid_ds structure, see -.Xr msgctl 3 ) +.Xr msgctl 2 ) is initialized as follows: .Bl -bullet .It @@ -133,9 +133,9 @@ and no message queue associated with was found. .El .Sh SEE ALSO -.Xr msgctl 3 , -.Xr msgrcv 3 , -.Xr msgsnd 3 +.Xr msgctl 2 , +.Xr msgrcv 2 , +.Xr msgsnd 2 .Sh HISTORY Message queues appeared in the first release of .At V . Copied and modified: head/lib/libc/sys/msgrcv.2 (from r195490, head/lib/libc/gen/msgrcv.3) ============================================================================== --- head/lib/libc/gen/msgrcv.3 Thu Jul 9 12:48:43 2009 (r195490, copy source) +++ head/lib/libc/sys/msgrcv.2 Mon Jul 13 12:53:43 2009 (r195656) @@ -31,8 +31,8 @@ .\" $FreeBSD$ .\" .\"/ -.Dd June 15, 2005 -.Dt MSGRCV 3 +.Dd July 9, 2009 +.Dt MSGRCV 2 .Os .Sh NAME .Nm msgrcv @@ -214,9 +214,9 @@ is set in .Fa msgflg . .El .Sh SEE ALSO -.Xr msgctl 3 , -.Xr msgget 3 , -.Xr msgsnd 3 +.Xr msgctl 2 , +.Xr msgget 2 , +.Xr msgsnd 2 .Sh HISTORY Message queues appeared in the first release of .At V . Copied and modified: head/lib/libc/sys/msgsnd.2 (from r195490, head/lib/libc/gen/msgsnd.3) ============================================================================== --- head/lib/libc/gen/msgsnd.3 Thu Jul 9 12:48:43 2009 (r195490, copy source) +++ head/lib/libc/sys/msgsnd.2 Mon Jul 13 12:53:43 2009 (r195656) @@ -31,8 +31,8 @@ .\" .\" $FreeBSD$ .\" -.Dd October 12, 2006 -.Dt MSGSND 3 +.Dd July 9, 2009 +.Dt MSGSND 2 .Os .Sh NAME .Nm msgsnd @@ -63,7 +63,7 @@ consist of the following members: .Pp .Va mtype is an integer greater than 0 that can be used for selecting messages (see -.Xr msgrcv 3 ) , +.Xr msgrcv 2 ) , .Va mtext is an array of .Fa msgsz @@ -78,7 +78,7 @@ If the number of bytes already on the me is bigger than the maximum number of bytes on the message queue .Pf ( Va msg_qbytes , see -.Xr msgctl 3 ) , +.Xr msgctl 2 ) , or the number of messages on all queues system-wide is already equal to the system limit, .Fa msgflg From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 15:32:43 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 270141065670; Mon, 13 Jul 2009 15:32:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id E80688FC25; Mon, 13 Jul 2009 15:32:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 9B49B46B39; Mon, 13 Jul 2009 11:32:42 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 85E538A097; Mon, 13 Jul 2009 11:32:41 -0400 (EDT) From: John Baldwin To: Scott Long Date: Mon, 13 Jul 2009 11:20:00 -0400 User-Agent: KMail/1.9.7 References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> In-Reply-To: <4A56FC7C.8060107@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131120.01016.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 11:32:41 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Poul-Henning Kamp , src-committers@freebsd.org, Scott Long , svn-src-all@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 15:32:43 -0000 On Friday 10 July 2009 4:31:56 am Scott Long wrote: > Poul-Henning Kamp wrote: > > In message <200907100818.n6A8I8p1011853@svn.freebsd.org>, Scott Long writes: > > > >> ATA drives are accessed via 'ada' device nodes. > > > > It there a particular good reason why we insist on making this > > silly mistake every five years ? > > > > I am pretty sure you were around when Justin won friends by renaming > > the SCSI disk devices ? > > > > 1. I clearly stated that the name is experimental and that a change in > the future is possible. > > 2. If the name does change, and if it changes to either 'ad' or 'da', it > can't happen until the newbus stuff is done first. I desperately need > help with that, btw, starting with removing the need for Giant from > newbus. Contact myself and/or Warner for details. > > 3. Exposing driver name details as the primary handle for users is > something that I disagree with, and I'd ultimately like to see every > direct-access block device in the system be called 'disk'. Or "phk". > Or "bde" for all I care =-) > > 4. While feelings may have been hurt 12 years ago, life did, in fact, go > on. Actaully, if all you want is a unified name you can use unrdr (or whatever it is called) to manage the daX unit number namespace without having to have all of new-bus to do that for you. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 15:32:52 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1E562106573D; Mon, 13 Jul 2009 15:32:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 668DA8FC1B; Mon, 13 Jul 2009 15:32:50 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 1A96F46B53; Mon, 13 Jul 2009 11:32:50 -0400 (EDT) Received: from jhbbsd.hudson-trading.com (unknown [209.249.190.8]) by bigwig.baldwin.cx (Postfix) with ESMTPA id CA5748A094; Mon, 13 Jul 2009 11:32:42 -0400 (EDT) From: John Baldwin To: Colin Percival Date: Mon, 13 Jul 2009 11:22:57 -0400 User-Agent: KMail/1.9.7 References: <200907112230.n6BMUbXE065104@svn.freebsd.org> <20090712005957.5f395c96@dev.lan.Awfulhak.org> <4A59CC26.7010106@freebsd.org> In-Reply-To: <4A59CC26.7010106@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907131122.58463.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Mon, 13 Jul 2009 11:32:42 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, Brian Somers , svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195626 - in head: contrib/amd/amd contrib/ntp/scripts contrib/sendmail/cf/sh secure/lib/libcrypto sys/contrib/dev/acpica/compiler sys/dev/hptrr X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 15:32:53 -0000 On Sunday 12 July 2009 7:42:30 am Colin Percival wrote: > Brian Somers wrote: > > On Sat, 11 Jul 2009 22:30:37 +0000 (UTC) Colin Percival wrote: > >> Remove build timestamps from the following files: > >> [...] > >> After this commit, the only remaining build timestamps are in the kernel, > >> the boot loaders, /usr/include/osreldate.h (the year in the copyright > >> notice), and lib*.a (the timestamps on all of the included .o files). > > > > This is a fantastic change. Our new-branch-per-project methodology > > @work made us implement this change locally. > > > > Another change that was necessary along the same lines was to remove > > any hostnames or path names that leak into object code, the most noticeable > > of which is of course one of the first kernel boot message lines. > > > > Are there plans to change kernel code and/or hostname/path name stuff? > > I'm not particularly concerned about the hostname or paths, since there are > workarounds (i.e., set the same hostname and use the same path, and files > will come out the same). > > The timestamps in the kernel and boot loaders can probably be removed, but I > wanted to consult with the community first, since it is conceivable that those > timestamps are useful in some situations. I'm even less certain about the > timestamps included in library archive files -- if anyone with binutils-fu > can confirm for me if these are used at all, and if not, how to get rid of > them, I'd be very very happy. I find the timestamps in kernel builds quite useful when doing work in feature branches. OTOH, back when I used sendmail as my MTA on my mail server I found the date in sendmail.cf useful as well. I don't use sendmail anymore so I am no longer worried about that one, but the kernel date one I would hate to see go away. -- John Baldwin From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 18:01:50 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0898F1065670; Mon, 13 Jul 2009 18:01:50 +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 EA9588FC19; Mon, 13 Jul 2009 18:01:49 +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 n6DI1nb5031826; Mon, 13 Jul 2009 18:01:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DI1nKg031824; Mon, 13 Jul 2009 18:01:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907131801.n6DI1nKg031824@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Jul 2009 18:01: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: r195659 - head/sys/dev/ata/chipsets X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:01:50 -0000 Author: mav Date: Mon Jul 13 18:01:49 2009 New Revision: 195659 URL: http://svn.freebsd.org/changeset/base/195659 Log: Fix Marvel SATA controllers operation, broken by rev. 188765, by using uninitialized variable. Tested by: Chris Hedley Approved by: re (kensmith) Modified: head/sys/dev/ata/chipsets/ata-marvell.c Modified: head/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-marvell.c Mon Jul 13 17:46:17 2009 (r195658) +++ head/sys/dev/ata/chipsets/ata-marvell.c Mon Jul 13 18:01:49 2009 (r195659) @@ -220,11 +220,11 @@ ata_marvell_edma_ch_attach(device_t dev) { struct ata_pci_controller *ctlr = device_get_softc(device_get_parent(dev)); struct ata_channel *ch = device_get_softc(dev); - u_int64_t work = ch->dma.work_bus; + u_int64_t work; int i; ata_marvell_edma_dmainit(dev); - + work = ch->dma.work_bus; /* clear work area */ bzero(ch->dma.work, 1024+256); From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 18:12:00 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01C2E1065677; Mon, 13 Jul 2009 18:12:00 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E427C8FC21; Mon, 13 Jul 2009 18:11:59 +0000 (UTC) (envelope-from alc@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 n6DIBxmJ032071; Mon, 13 Jul 2009 18:11:59 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DIBxjn032069; Mon, 13 Jul 2009 18:11:59 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200907131811.n6DIBxjn032069@svn.freebsd.org> From: Alan Cox Date: Mon, 13 Jul 2009 18:11:59 +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: r195660 - head/sys/sun4v/sun4v X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:12:00 -0000 Author: alc Date: Mon Jul 13 18:11:59 2009 New Revision: 195660 URL: http://svn.freebsd.org/changeset/base/195660 Log: Correct an error of omission in r195649 ("Add support to the virtual memory system for configuring machine-dependent memory attributes: ..."). In r195649, the "vm_cache_mode_t/vm_memattr_t" parameter was removed from vm_phys_alloc_contig(). Approved by: re (kensmith) Modified: head/sys/sun4v/sun4v/pmap.c Modified: head/sys/sun4v/sun4v/pmap.c ============================================================================== --- head/sys/sun4v/sun4v/pmap.c Mon Jul 13 18:01:49 2009 (r195659) +++ head/sys/sun4v/sun4v/pmap.c Mon Jul 13 18:11:59 2009 (r195660) @@ -1297,8 +1297,7 @@ pmap_alloc_zeroed_contig_pages(int npage while (m == NULL) { for (i = 0; phys_avail[i + 1] != 0; i += 2) { m = vm_phys_alloc_contig(npages, phys_avail[i], - phys_avail[i + 1], alignment, (1UL<<34), - VM_CACHE_DEFAULT); + phys_avail[i + 1], alignment, (1UL<<34)); if (m) goto found; } From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 18:23:58 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B67F8106564A; Mon, 13 Jul 2009 18:23:58 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A497C8FC0C; Mon, 13 Jul 2009 18:23:58 +0000 (UTC) (envelope-from rpaulo@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 n6DINwcJ032336; Mon, 13 Jul 2009 18:23:58 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DINwxZ032334; Mon, 13 Jul 2009 18:23:58 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200907131823.n6DINwxZ032334@svn.freebsd.org> From: Rui Paulo Date: Mon, 13 Jul 2009 18:23: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: r195661 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:23:59 -0000 Author: rpaulo Date: Mon Jul 13 18:23:58 2009 New Revision: 195661 URL: http://svn.freebsd.org/changeset/base/195661 Log: Fix inline function declaration and prototype. Approved by: re (kensmith) Modified: head/sys/net80211/ieee80211_mesh.c Modified: head/sys/net80211/ieee80211_mesh.c ============================================================================== --- head/sys/net80211/ieee80211_mesh.c Mon Jul 13 18:11:59 2009 (r195660) +++ head/sys/net80211/ieee80211_mesh.c Mon Jul 13 18:23:58 2009 (r195661) @@ -66,9 +66,8 @@ static int mesh_select_proto_path(struct static int mesh_select_proto_metric(struct ieee80211vap *, const char *); static void mesh_vattach(struct ieee80211vap *); static int mesh_newstate(struct ieee80211vap *, enum ieee80211_state, int); -static __inline void - mesh_linkchange(struct ieee80211_node *, - enum ieee80211_mesh_mlstate); +static void mesh_linkchange(struct ieee80211_node *, + enum ieee80211_mesh_mlstate); static void mesh_checkid(void *, struct ieee80211_node *); static uint32_t mesh_generateid(struct ieee80211vap *); static int mesh_checkpseq(struct ieee80211vap *, @@ -2029,7 +2028,7 @@ mesh_peer_timeout_cb(void *arg) } } -static __inline int +static int mesh_verify_meshpeerver(struct ieee80211vap *vap, const uint8_t *ie) { static const uint8_t peer[4] = IEEE80211_MESHPEERVER_PEER; @@ -2042,7 +2041,7 @@ mesh_verify_meshpeerver(struct ieee80211 return memcmp(meshpeerver->peerver_proto, peer, 4); } -static __inline int +static int mesh_verify_meshid(struct ieee80211vap *vap, const uint8_t *ie) { struct ieee80211_mesh_state *ms = vap->iv_mesh; From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 18:55:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 261E91065673; Mon, 13 Jul 2009 18:55:47 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 146848FC23; Mon, 13 Jul 2009 18:55:47 +0000 (UTC) (envelope-from joel@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 n6DItksY033021; Mon, 13 Jul 2009 18:55:46 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DItkJc033019; Mon, 13 Jul 2009 18:55:46 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <200907131855.n6DItkJc033019@svn.freebsd.org> From: Joel Dahl Date: Mon, 13 Jul 2009 18:55: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: r195662 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 18:55:47 -0000 Author: joel (doc committer) Date: Mon Jul 13 18:55:46 2009 New Revision: 195662 URL: http://svn.freebsd.org/changeset/base/195662 Log: Fix a few language nits. Submitted by: Ben Kaduk Approved by: re (blanket) Modified: head/share/man/man4/pcm.4 Modified: head/share/man/man4/pcm.4 ============================================================================== --- head/share/man/man4/pcm.4 Mon Jul 13 18:23:58 2009 (r195661) +++ head/share/man/man4/pcm.4 Mon Jul 13 18:55:46 2009 (r195662) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 11, 2009 +.Dd July 13, 2009 .Dt SOUND 4 .Os .Sh NAME @@ -146,13 +146,14 @@ Multichannel audio, popularly referred t .Dq surround sound is supported and enabled by default. The FreeBSD multichannel matrix processor supports up to 18 interleaved -channels, but the limit is currently set to 8 channels (known as 7.1). +channels, but the limit is currently set to 8 channels (as commonly used +for 7.1 surround sound). The internal matrix mapping can handle reduction, expansion or re-routing of channels. This provides a base interface for related multichannel .Fn ioctl support. -Works with or without +Multichannel audio works both with and without .Tn VCHANs . Most bridge device drivers are still missing multichannel matrixing support , but in most cases this should be trivial to implement. @@ -437,9 +438,9 @@ Available options include: .It s16le:1.0 Mono .It s16le:2.0 -Stereo, 2 channels, (left, right). +Stereo, 2 channels (left, right). .It s16le:2.1 -3 channels (left, right, LFE). +3 channels (left, right, LFE). .It s16le:3.0 3 channels (left, right, rear center). .It s16le:4.0 From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 19:04:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 68058106564A; Mon, 13 Jul 2009 19:04:45 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.82]) by mx1.freebsd.org (Postfix) with ESMTP id 1EC448FC27; Mon, 13 Jul 2009 19:04:45 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from iMac.local (pgw.vnode.se [77.110.37.134]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id 2C82DE9F42C; Mon, 13 Jul 2009 21:04:37 +0200 (CEST) Message-ID: <4A5B8544.3040405@FreeBSD.org> Date: Mon, 13 Jul 2009 21:04:36 +0200 From: Joel Dahl User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Ben Kaduk References: <200907111525.n6BFPDrY056196@svn.freebsd.org> <47d0403c0907112040v785b6f4se7e927809035b3b5@mail.gmail.com> In-Reply-To: <47d0403c0907112040v785b6f4se7e927809035b3b5@mail.gmail.com> 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, ariff@freebsd.org Subject: Re: svn commit: r195619 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 19:04:45 -0000 Ben Kaduk skrev: > It would be nice to be consistent about using "and", "+" > or neither for the parentheticals. > Also, "LFE" does not appear to be expanded to "low frequency > enhancement" anywhere .... I've fixed most of the issues you reported now, thanks. I didn't expand LFE though, because I'm not sure where I should put the explanation. Btw, if you have any more suggestions, just send them over. I think the entire man page needs more love. -- Joel From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 20:19:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D96B106566C; Mon, 13 Jul 2009 20:19:30 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CD3E8FC16; Mon, 13 Jul 2009 20:19:30 +0000 (UTC) (envelope-from scottl@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 n6DKJUAX034688; Mon, 13 Jul 2009 20:19:30 GMT (envelope-from scottl@svn.freebsd.org) Received: (from scottl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DKJUMU034686; Mon, 13 Jul 2009 20:19:30 GMT (envelope-from scottl@svn.freebsd.org) Message-Id: <200907132019.n6DKJUMU034686@svn.freebsd.org> From: Scott Long Date: Mon, 13 Jul 2009 20:19: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: r195663 - head/sys/dev/ciss X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 20:19:30 -0000 Author: scottl Date: Mon Jul 13 20:19:29 2009 New Revision: 195663 URL: http://svn.freebsd.org/changeset/base/195663 Log: Revert the CISS driver to 64K i/o, the previous change was in error and missing a lot of needed infrastructure. Approved by: re Modified: head/sys/dev/ciss/cissvar.h Modified: head/sys/dev/ciss/cissvar.h ============================================================================== --- head/sys/dev/ciss/cissvar.h Mon Jul 13 18:55:46 2009 (r195662) +++ head/sys/dev/ciss/cissvar.h Mon Jul 13 20:19:29 2009 (r195663) @@ -142,7 +142,7 @@ struct ciss_request / sizeof(struct ciss_sg_entry)) /* XXX Prep for increasing max i/o */ -#define CISS_MAX_SG_ELEMENTS 33 +#define CISS_MAX_SG_ELEMENTS 17 /* * Per-logical-drive data. From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 20:34:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1205) id 6EB86106566B; Mon, 13 Jul 2009 20:34:16 +0000 (UTC) Date: Mon, 13 Jul 2009 20:34:16 +0000 From: Navdeep Parhar To: Lawrence Stewart Message-ID: <20090713203416.GA2976@hub.freebsd.org> Mail-Followup-To: Lawrence Stewart , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <200907131151.n6DBp35J024156@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200907131151.n6DBp35J024156@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195654 - in head: . sys/dev/cxgb/ulp/tom sys/netinet sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 20:34:16 -0000 On Mon, Jul 13, 2009 at 11:51:03AM +0000, Lawrence Stewart wrote: > Author: lstewart > Date: Mon Jul 13 11:51:02 2009 > New Revision: 195654 > URL: http://svn.freebsd.org/changeset/base/195654 > > Log: > Replace struct tcpopt with a proxy toeopt struct in the TOE driver interface to > the TCP syncache. This returns struct tcpopt to being private within the TCP > implementation, thus allowing it to be modified without ABI concerns. > > The patch breaks the ABI. Bump __FreeBSD_version to 800103 accordingly. The cxgb > driver is the only TOE consumer affected by this change, and needs to be > recompiled along with the kernel. > > Suggested by: rwatson > Reviewed by: rwatson, kmacy > Approved by: re (kensmith), kensmith (mentor temporarily unavailable) > Hello Lawrence, 'to' should be renamed to 'toeo' in syncache_expand_establish_req() before the changes you made to cxgb_cpl_io.c will even compile. - struct toeopt to; + struct toeopt toeo; Unfortunately, cxgb's TOM is commented out of the build system (ever since ARPv2) and so buildkernel won't catch stuff like this. I have a tree that builds TOM with the latest head but it won't be ready+tested in time for 8.0. Regards, Navdeep > Modified: > head/UPDATING > head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c > head/sys/netinet/tcp_offload.h > head/sys/netinet/tcp_syncache.c > head/sys/netinet/tcp_syncache.h > head/sys/netinet/tcp_var.h > head/sys/sys/param.h From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 21:19:11 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 120AA1065677; Mon, 13 Jul 2009 21:19:11 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from asmtpout027.mac.com (asmtpout027.mac.com [17.148.16.102]) by mx1.freebsd.org (Postfix) with ESMTP id B2C1E8FC1D; Mon, 13 Jul 2009 21:19:10 +0000 (UTC) (envelope-from xcllnt@mac.com) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; charset=us-ascii; format=flowed; delsp=yes Received: from macbook-pro.lan.xcllnt.net (mail.xcllnt.net [75.101.29.67]) by asmtp027.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KMQ00KJXOJ1O190@asmtp027.mac.com>; Mon, 13 Jul 2009 14:18:38 -0700 (PDT) From: Marcel Moolenaar In-reply-to: <200907130612.n6D6CLMP014560@svn.freebsd.org> Date: Mon, 13 Jul 2009 14:18:37 -0700 Message-id: <4C53B490-A1B0-4841-81B2-A8F06D353349@mac.com> References: <200907130612.n6D6CLMP014560@svn.freebsd.org> To: Alexander Motin X-Mailer: Apple Mail (2.1070) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195653 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 21:19:12 -0000 On Jul 12, 2009, at 11:12 PM, Alexander Motin wrote: > Author: mav > Date: Mon Jul 13 06:12:21 2009 > New Revision: 195653 > URL: http://svn.freebsd.org/changeset/base/195653 > > Log: > Rename ATA probe driver to "aprobe" to resolve name conflict with > SCSI > and fix loading cam as module. While this may avoid a conflict, it's hardly a good name that has a low chance of conflicting with something else. Please consider (in due time) to improve the descriptiveness. Something like "ata_cam_probe" doesn't look like a bad choice to me... Just food for thought... -- Marcel Moolenaar xcllnt@mac.com From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 21:21:30 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86D9C106566C; Mon, 13 Jul 2009 21:21:30 +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 769928FC0A; Mon, 13 Jul 2009 21:21:30 +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 n6DLLUrP036057; Mon, 13 Jul 2009 21:21:30 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DLLUbm036055; Mon, 13 Jul 2009 21:21:30 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907132121.n6DLLUbm036055@svn.freebsd.org> From: Alexander Motin Date: Mon, 13 Jul 2009 21:21: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: r195665 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 21:21:30 -0000 Author: mav Date: Mon Jul 13 21:21:30 2009 New Revision: 195665 URL: http://svn.freebsd.org/changeset/base/195665 Log: Fix copy-paste bug, enabling SIM PMP support, when it was not really found. Approved by: re (implicitly) Modified: head/sys/cam/ata/ata_xpt.c Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Mon Jul 13 21:18:54 2009 (r195664) +++ head/sys/cam/ata/ata_xpt.c Mon Jul 13 21:21:30 2009 (r195665) @@ -1204,7 +1204,7 @@ ata_scan_bus(struct cam_periph *periph, scan_info->request_ccb->ccb_h.path, 1); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; - cts.xport_specific.sata.pm_present = 1; + cts.xport_specific.sata.pm_present = 0; cts.xport_specific.sata.valid = CTS_SATA_VALID_PM; xpt_action((union ccb *)&cts); } From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 21:36:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A05D41065679; Mon, 13 Jul 2009 21:36:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8FA628FC35; Mon, 13 Jul 2009 21:36:31 +0000 (UTC) (envelope-from jkim@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 n6DLaVjd036386; Mon, 13 Jul 2009 21:36:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6DLaViP036382; Mon, 13 Jul 2009 21:36:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <200907132136.n6DLaViP036382@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 13 Jul 2009 21:36: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: r195666 - in head/sys: amd64/pci dev/acpica i386/pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 21:36:32 -0000 Author: jkim Date: Mon Jul 13 21:36:31 2009 New Revision: 195666 URL: http://svn.freebsd.org/changeset/base/195666 Log: Match PCI Express root bridge _HID directly instead of relying on _CID. Reviewed by: jhb Approved by: re (kib) Modified: head/sys/amd64/pci/pci_bus.c head/sys/dev/acpica/acpi_pcib_acpi.c head/sys/i386/pci/pci_bus.c Modified: head/sys/amd64/pci/pci_bus.c ============================================================================== --- head/sys/amd64/pci/pci_bus.c Mon Jul 13 21:21:30 2009 (r195665) +++ head/sys/amd64/pci/pci_bus.c Mon Jul 13 21:36:31 2009 (r195666) @@ -386,6 +386,7 @@ DRIVER_MODULE(pcib, legacy, legacy_pcib_ */ static struct isa_pnp_id pcibus_pnp_ids[] = { { 0x030ad041 /* PNP0A03 */, "PCI Bus" }, + { 0x080ad041 /* PNP0A08 */, "PCIe Bus" }, { 0 } }; Modified: head/sys/dev/acpica/acpi_pcib_acpi.c ============================================================================== --- head/sys/dev/acpica/acpi_pcib_acpi.c Mon Jul 13 21:21:30 2009 (r195665) +++ head/sys/dev/acpica/acpi_pcib_acpi.c Mon Jul 13 21:36:31 2009 (r195666) @@ -131,7 +131,7 @@ MODULE_DEPEND(acpi_pcib, acpi, 1, 1, 1); static int acpi_pcib_acpi_probe(device_t dev) { - static char *pcib_ids[] = { "PNP0A03", NULL }; + static char *pcib_ids[] = { "PNP0A03", "PNP0A08", NULL }; if (acpi_disabled("pcib") || ACPI_ID_PROBE(device_get_parent(dev), dev, pcib_ids) == NULL) Modified: head/sys/i386/pci/pci_bus.c ============================================================================== --- head/sys/i386/pci/pci_bus.c Mon Jul 13 21:21:30 2009 (r195665) +++ head/sys/i386/pci/pci_bus.c Mon Jul 13 21:36:31 2009 (r195666) @@ -598,6 +598,7 @@ DRIVER_MODULE(pcib, legacy, legacy_pcib_ */ static struct isa_pnp_id pcibus_pnp_ids[] = { { 0x030ad041 /* PNP0A03 */, "PCI Bus" }, + { 0x080ad041 /* PNP0A08 */, "PCIe Bus" }, { 0 } }; From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 21:43:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75439106564A; Mon, 13 Jul 2009 21:43:35 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 03A3E8FC0A; Mon, 13 Jul 2009 21:43:34 +0000 (UTC) (envelope-from lstewart@freebsd.org) Received: from lstewart-laptop.caia.swin.edu.au (host86-150-124-14.range86-150.btcentralplus.com [86.150.124.14]) (authenticated bits=0) by lauren.room52.net (8.14.3/8.14.3) with ESMTP id n6DLM3wZ051224 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Jul 2009 07:22:09 +1000 (EST) (envelope-from lstewart@freebsd.org) Message-ID: <4A5BA56A.8000208@freebsd.org> Date: Mon, 13 Jul 2009 22:21:46 +0100 From: Lawrence Stewart User-Agent: Thunderbird 2.0.0.22 (X11/20090626) MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, np@freebsd.org References: <200907131151.n6DBp35J024156@svn.freebsd.org> <20090713203416.GA2976@hub.freebsd.org> In-Reply-To: <20090713203416.GA2976@hub.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_40,RCVD_IN_PBL, RDNS_DYNAMIC,SPF_SOFTFAIL autolearn=disabled version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on lauren.room52.net Cc: Subject: Re: svn commit: r195654 - in head: . sys/dev/cxgb/ulp/tom sys/netinet sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 21:43:35 -0000 Navdeep Parhar wrote: [snip] > > Hello Lawrence, > > 'to' should be renamed to 'toeo' in syncache_expand_establish_req() before the > changes you made to cxgb_cpl_io.c will even compile. > > - struct toeopt to; > + struct toeopt toeo; Oh dear, mea culpa. > > Unfortunately, cxgb's TOM is commented out of the build system (ever since > ARPv2) and so buildkernel won't catch stuff like this. I have a tree that > builds TOM with the latest head but it won't be ready+tested in time for 8.0. That would explain why I missed this :( Will get it fixed right away. Cheers, Lawrence From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 22:18:54 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 669361065676; Mon, 13 Jul 2009 22:18:54 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from gizmo.2hip.net (gizmo.2hip.net [64.74.207.195]) by mx1.freebsd.org (Postfix) with ESMTP id 234488FC16; Mon, 13 Jul 2009 22:18:52 +0000 (UTC) (envelope-from rnoland@FreeBSD.org) Received: from [192.168.1.4] (adsl-154-199-204.ard.bellsouth.net [72.154.199.204]) (authenticated bits=0) by gizmo.2hip.net (8.14.3/8.14.3) with ESMTP id n6DMIo8D063879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 13 Jul 2009 18:18:50 -0400 (EDT) (envelope-from rnoland@FreeBSD.org) From: Robert Noland To: Joel Dahl In-Reply-To: <4A5B8544.3040405@FreeBSD.org> References: <200907111525.n6BFPDrY056196@svn.freebsd.org> <47d0403c0907112040v785b6f4se7e927809035b3b5@mail.gmail.com> <4A5B8544.3040405@FreeBSD.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-EhnLPsL79V0sGZlpEoTu" Organization: FreeBSD Date: Mon, 13 Jul 2009 17:18:45 -0500 Message-Id: <1247523525.1745.14.camel@balrog.2hip.net> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 FreeBSD GNOME Team Port X-Spam-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_00, MIME_QP_LONG_LINE, RCVD_IN_PBL, RCVD_IN_SORBS_DUL, RDNS_DYNAMIC, SPF_SOFTFAIL autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on gizmo.2hip.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, ariff@freebsd.org, Ben Kaduk Subject: Re: svn commit: r195619 - head/share/man/man4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 22:18:54 -0000 --=-EhnLPsL79V0sGZlpEoTu Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Mon, 2009-07-13 at 21:04 +0200, Joel Dahl wrote: > Ben Kaduk skrev: > > It would be nice to be consistent about using "and", "+" > > or neither for the parentheticals. > > Also, "LFE" does not appear to be expanded to "low frequency > > enhancement" anywhere .... >=20 > I've fixed most of the issues you reported now, thanks. I didn't expand = LFE=20 > though, because I'm not sure where I should put the explanation. I'm no writer... but what I remember from our technical writers is to just expand the acronym on first use. Once people know what it stands for they can google it for an explanation if they need it.... robert. > Btw, if you have any more suggestions, just send them over. I think the=20 > entire man page needs more love. >=20 > -- > Joel --=20 Robert Noland FreeBSD --=-EhnLPsL79V0sGZlpEoTu Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.11 (FreeBSD) iEYEABECAAYFAkpbssUACgkQM4TrQ4qfRONO9wCfa3dQZvT4burWEu8Q6lCbhw5q PkEAnR3Y1w9TEzFUsTH6yFb34VXGy57F =Y3GB -----END PGP SIGNATURE----- --=-EhnLPsL79V0sGZlpEoTu-- From owner-svn-src-head@FreeBSD.ORG Mon Jul 13 23:23:10 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30466106566B; Mon, 13 Jul 2009 23:23:10 +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 D52A38FC12; Mon, 13 Jul 2009 23:23:09 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n6DNN4Mo044740; Mon, 13 Jul 2009 17:23:05 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A5BC1D7.8080300@samsco.org> Date: Mon, 13 Jul 2009 17:23:03 -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: Marcel Moolenaar References: <200907130612.n6D6CLMP014560@svn.freebsd.org> <4C53B490-A1B0-4841-81B2-A8F06D353349@mac.com> In-Reply-To: <4C53B490-A1B0-4841-81B2-A8F06D353349@mac.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; 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, Alexander Motin , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org Subject: Re: svn commit: r195653 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Jul 2009 23:23:10 -0000 Marcel Moolenaar wrote: > > On Jul 12, 2009, at 11:12 PM, Alexander Motin wrote: > >> Author: mav >> Date: Mon Jul 13 06:12:21 2009 >> New Revision: 195653 >> URL: http://svn.freebsd.org/changeset/base/195653 >> >> Log: >> Rename ATA probe driver to "aprobe" to resolve name conflict with SCSI >> and fix loading cam as module. > > While this may avoid a conflict, it's hardly a good name that > has a low chance of conflicting with something else. > > Please consider (in due time) to improve the descriptiveness. > Something like "ata_cam_probe" doesn't look like a bad choice > to me... > > Just food for thought... > Is there nothing else in this entire piece of work that can be commented on besides the goddamned names? Holy hell. The bikeshed, it's not just a cliche, it's a f@@@ing way of life around here. Scott From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 00:31:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E3E2106566B; Tue, 14 Jul 2009 00:31:07 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au [211.29.133.76]) by mx1.freebsd.org (Postfix) with ESMTP id CCF258FC0C; Tue, 14 Jul 2009 00:31:06 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (c122-106-216-251.belrs3.nsw.optusnet.com.au [122.106.216.251]) by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n6E0UW3O011049 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 14 Jul 2009 10:30:48 +1000 X-Bogosity: Ham, spamicity=0.000000 Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by server.vk2pj.dyndns.org (8.14.3/8.14.3) with ESMTP id n6E0UVgu093539; Tue, 14 Jul 2009 10:30:31 +1000 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.14.3/8.14.3/Submit) id n6E0UUrU093538; Tue, 14 Jul 2009 10:30:30 +1000 (EST) (envelope-from peter) Date: Tue, 14 Jul 2009 10:30:30 +1000 From: Peter Jeremy To: Scott Long Message-ID: <20090714003030.GE43362@server.vk2pj.dyndns.org> References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> <4A5A98FA.3050208@samsco.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TYecfFk8j8mZq+dy" Content-Disposition: inline In-Reply-To: <4A5A98FA.3050208@samsco.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.19 (2009-01-05) Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 00:31:07 -0000 --TYecfFk8j8mZq+dy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2009-Jul-12 20:16:26 -0600, Scott Long wrote: >Another solution is to just bite the bullet and do what I've ultimately >wanted to do with disk device names, and create 'diskX' aliases for all >direct-access block devices. This would affect hard disks, memory >sticks, logical disks like g_raid things, and things that look like hard >disks. Having removable devices in the same space as fixed devices _will_ bite users when they accidently reboot without pulling out their memory stick and find that their disk numbering is all changed. Wiring physical addresses to names might help but can need manual configuration. I suspect a "one size fits all" approach isn't going to satisfy everyone. Someone with a bog standard desktop with one HDD on SATA channel 0 who occasionally plugs in a USB stick has significantly different needs to someone running a server with multiple SATA port multipliers and multi-pathed fibre-channel who has a USB stick permanently installed for booting. (Note that physical cXtYdZ approaches don't mesh cleanly with multi-pathing). IMHO, you need a provision to apply user-selected labels to disks and then reference them via those labels (with some sort of fallback to handle clashes). WWN or system-generated labels are too unfriendly to use. (And one of our HP support techs related a story where a customer was having some really strange problems on a Tru64 system which he eventually tracked down to two of the disks having the same WWID - which he agrees should never occur). --=20 Peter Jeremy --TYecfFk8j8mZq+dy Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.12 (FreeBSD) iEUEARECAAYFAkpb0aYACgkQ/opHv/APuIdFtwCcD0YWeV9teDsL8IZ/z56c0kVo LMcAmMz1C8PAlcevQiAdz+/FOypL1iQ= =UgfN -----END PGP SIGNATURE----- --TYecfFk8j8mZq+dy-- From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 04:35:14 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D33E106566C; Tue, 14 Jul 2009 04:35:14 +0000 (UTC) (envelope-from avatar@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B38F8FC1D; Tue, 14 Jul 2009 04:35:14 +0000 (UTC) (envelope-from avatar@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 n6E4ZEJS045049; Tue, 14 Jul 2009 04:35:14 GMT (envelope-from avatar@svn.freebsd.org) Received: (from avatar@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6E4ZDjh045046; Tue, 14 Jul 2009 04:35:13 GMT (envelope-from avatar@svn.freebsd.org) Message-Id: <200907140435.n6E4ZDjh045046@svn.freebsd.org> From: Tai-hwa Liang Date: Tue, 14 Jul 2009 04:35: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: r195675 - in head/sys: dev/re pci X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 04:35:14 -0000 Author: avatar Date: Tue Jul 14 04:35:13 2009 New Revision: 195675 URL: http://svn.freebsd.org/changeset/base/195675 Log: Adding hardware ID for RTL810x PCIe found on HP Pavilion DV2-1022AX. Reviewed by: yongari Approved by: re (kib, kensmith) Modified: head/sys/dev/re/if_re.c head/sys/pci/if_rlreg.h Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Tue Jul 14 03:25:10 2009 (r195674) +++ head/sys/dev/re/if_re.c Tue Jul 14 04:35:13 2009 (r195675) @@ -211,6 +211,7 @@ static struct rl_hwrev re_hwrevs[] = { { RL_HWREV_8101E, RL_8169, "8101E"}, { RL_HWREV_8102E, RL_8169, "8102E"}, { RL_HWREV_8102EL, RL_8169, "8102EL"}, + { RL_HWREV_8102EL_SPIN1, RL_8169, "8102EL"}, { RL_HWREV_8168_SPIN2, RL_8169, "8168"}, { RL_HWREV_8168_SPIN3, RL_8169, "8168"}, { RL_HWREV_8168C, RL_8169, "8168C/8111C"}, @@ -1260,6 +1261,7 @@ re_attach(device_t dev) break; case RL_HWREV_8102E: case RL_HWREV_8102EL: + case RL_HWREV_8102EL_SPIN1: sc->rl_flags |= RL_FLAG_NOJUMBO | RL_FLAG_PHYWAKE | RL_FLAG_PAR | RL_FLAG_DESCV2 | RL_FLAG_MACSTAT | RL_FLAG_FASTETHER | RL_FLAG_CMDSTOP | RL_FLAG_AUTOPAD; Modified: head/sys/pci/if_rlreg.h ============================================================================== --- head/sys/pci/if_rlreg.h Tue Jul 14 03:25:10 2009 (r195674) +++ head/sys/pci/if_rlreg.h Tue Jul 14 04:35:13 2009 (r195675) @@ -159,6 +159,7 @@ #define RL_HWREV_8169_8110SB 0x10000000 #define RL_HWREV_8169_8110SC 0x18000000 #define RL_HWREV_8102EL 0x24800000 +#define RL_HWREV_8102EL_SPIN1 0x24c00000 #define RL_HWREV_8168D 0x28000000 #define RL_HWREV_8168_SPIN1 0x30000000 #define RL_HWREV_8100E 0x30800000 From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 06:27:36 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CA205106564A; Tue, 14 Jul 2009 06:27: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 627228FC15; Tue, 14 Jul 2009 06:27:36 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.local (pooker.samsco.org [168.103.85.57]) by pooker.samsco.org (8.14.2/8.14.2) with ESMTP id n6E6RV1R046175; Tue, 14 Jul 2009 00:27:31 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4A5C2553.2040401@samsco.org> Date: Tue, 14 Jul 2009 00:27:31 -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: Peter Jeremy References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> <4A5A98FA.3050208@samsco.org> <20090714003030.GE43362@server.vk2pj.dyndns.org> In-Reply-To: <20090714003030.GE43362@server.vk2pj.dyndns.org> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=3.8 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: "Carlos A. M. dos Santos" , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 06:27:37 -0000 Peter Jeremy wrote: > On 2009-Jul-12 20:16:26 -0600, Scott Long wrote: >> Another solution is to just bite the bullet and do what I've ultimately >> wanted to do with disk device names, and create 'diskX' aliases for all >> direct-access block devices. This would affect hard disks, memory >> sticks, logical disks like g_raid things, and things that look like hard >> disks. > > Having removable devices in the same space as fixed devices _will_ bite > users when they accidently reboot without pulling out their memory stick > and find that their disk numbering is all changed. Wiring physical > addresses to names might help but can need manual configuration. > The problem is that it's hard to define "removable" these days. Traditional disks are easy to hot-swap, even in simple desktop systems. It's also trivial to boot off of a USB drive, or and SDCard. One thing that helps is that CAM has always had a mechanism for wiring device paths to unit numbers, so ahci0:bus0:target0:lun0 can always be 'da0' no matter what else is plugged in. It's not a very convenient interface right now, but it does work. > I suspect a "one size fits all" approach isn't going to satisfy > everyone. Someone with a bog standard desktop with one HDD on SATA > channel 0 who occasionally plugs in a USB stick has significantly > different needs to someone running a server with multiple SATA port > multipliers and multi-pathed fibre-channel who has a USB stick > permanently installed for booting. (Note that physical cXtYdZ > approaches don't mesh cleanly with multi-pathing). The real problem that we have here is that you want to ensure that the device that was used to boot the loader and kernel typically needs to also be the device that is considered for the root filesystem. Unfortunately, there's no way to correlate BIOS device numbers to OS driver names and unit numbers. > > IMHO, you need a provision to apply user-selected labels to disks and > then reference them via those labels (with some sort of fallback to > handle clashes). WWN or system-generated labels are too unfriendly to > use. (And one of our HP support techs related a story where a > customer was having some really strange problems on a Tru64 system > which he eventually tracked down to two of the disks having the same > WWID - which he agrees should never occur). > Ultimately labels of some sort are the way to go, yes. I'm not really thrilled with the unfriendliness of filesystem labels, but maybe that's the best option at the moment. Scott From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 06:47:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AA8F106566B; Tue, 14 Jul 2009 06:47:32 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-yx0-f181.google.com (mail-yx0-f181.google.com [209.85.210.181]) by mx1.freebsd.org (Postfix) with ESMTP id B31638FC1E; Tue, 14 Jul 2009 06:47:31 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by yxe11 with SMTP id 11so5021964yxe.3 for ; Mon, 13 Jul 2009 23:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=m+Q5+odvfyXogsoMGLbn1mxi7bxtbWPqeKw+fqWg6Es=; b=K0YrToVGMFq30nk6oTYd2rS5w1TrDTxfmOjfZjkcBL5mk1rBpv/jHBEfdM9oZXuWrO dzrud9iGhWldEbFgY7ivIJst0JF7yRQbRtufZXhZVqs45+ULwreGbitK4AkPXoyFufpm OdSTfKGn+oP9tbX+xzL+Rc6q7/j5oD+0sueuI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=l18suG96QIK0tBva3MQmIYfjawZE24w/a2Y8mw3hULkyFyB5f2xueJ/irJgF4i/3JU Oz6Kd0pH3Tsr/ksl3s6lBO3aYy1o93zhHveGwhlLkaw/N8IV6sh5rHZq967TTalgoHVK ZZrwabtlfJuS0QEh5z9vnpuk6G0Qc06K2eSuI= MIME-Version: 1.0 Received: by 10.151.79.16 with SMTP id g16mr9468543ybl.313.1247552487304; Mon, 13 Jul 2009 23:21:27 -0700 (PDT) In-Reply-To: <200907121309.n6CD9iXj085206@svn.freebsd.org> References: <200907121309.n6CD9iXj085206@svn.freebsd.org> Date: Mon, 13 Jul 2009 23:21:27 -0700 Message-ID: From: Navdeep Parhar To: Ed Schouten Content-Type: multipart/mixed; boundary=00151750d95cd83019046ea47262 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195637 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 06:47:32 -0000 --00151750d95cd83019046ea47262 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Sun, Jul 12, 2009 at 6:09 AM, Ed Schouten wrote: > Author: ed > Date: Sun Jul 12 13:09:43 2009 > New Revision: 195637 > URL: http://svn.freebsd.org/changeset/base/195637 > > Log: > Fix fwrite() to return 0 when size or nmemb are zero. Hello Ed, This breaks buildworld. This change itself compiles, but once the system's libc has this fwrite (say, after an installworld), buildworld on that system will fail. mklocale does not like fwrite returning 0. And who knows if there are other programs like this out there... .... mklocale -o am_ET.UTF-8.out /usr/src/share/mklocale/am_ET.UTF-8.src am_ET.UTF-8.out: Inappropriate ioctl for device *** Error code 1 Stop in /usr/src/share/mklocale. .... I've attached a patch to mklocale that will fix the problem. Regards, Navdeep --00151750d95cd83019046ea47262 Content-Type: application/octet-stream; name="mklocale.diff" Content-Disposition: attachment; filename="mklocale.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fx48emxj0 ZGlmZiAtciAzMzdhY2FhYjM2OGYgdXNyLmJpbi9ta2xvY2FsZS95YWNjLnkKLS0tIGEvdXNyLmJp bi9ta2xvY2FsZS95YWNjLnkJTW9uIEp1bCAxMyAyMjo0NDo0MyAyMDA5IC0wNzAwCisrKyBiL3Vz ci5iaW4vbWtsb2NhbGUveWFjYy55CU1vbiBKdWwgMTMgMjM6MTc6MTcgMjAwOSAtMDcwMApAQCAt NzMwLDggKzczMCw4IEBACiAgICAgLyoKICAgICAgKiBQQVJUIDY6IEFuZCBmaW5hbGx5IHRoZSB2 YXJpYWJsZSBkYXRhCiAgICAgICovCi0gICAgaWYgKGZ3cml0ZSh2YXJpYWJsZSwKLQkgICAgICAg bnRvaGwobmV3X2xvY2FsZS52YXJpYWJsZV9sZW4pLCAxLCBmcCkgIT0gMSkgeworICAgIGlmIChu ZXdfbG9jYWxlLnZhcmlhYmxlX2xlbiAmJgorCWZ3cml0ZSh2YXJpYWJsZSwgbnRvaGwobmV3X2xv Y2FsZS52YXJpYWJsZV9sZW4pLCAxLCBmcCkgIT0gMSkgewogCXBlcnJvcihsb2NhbGVfZmlsZSk7 CiAJZXhpdCgxKTsKICAgICB9Cg== --00151750d95cd83019046ea47262-- From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 08:04:43 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18D1B1065678; Tue, 14 Jul 2009 08:04:43 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [IPv6:2001:770:10:300::86e2:510b]) by mx1.freebsd.org (Postfix) with SMTP id 1E1FE8FC0A; Tue, 14 Jul 2009 08:04:41 +0000 (UTC) (envelope-from dwmalone@maths.tcd.ie) Received: from walton.maths.tcd.ie ([134.226.81.10] helo=walton.maths.tcd.ie) by salmon.maths.tcd.ie with SMTP id ; 14 Jul 2009 09:04:41 +0100 (BST) Received: from localhost ([127.0.0.1] helo=maths.tcd.ie) by walton.maths.tcd.ie with SMTP id ; 14 Jul 2009 09:04:40 +0100 (BST) To: "N.J. Mann" In-reply-to: Your message of "Mon, 13 Jul 2009 07:33:28 BST." <20090713063328.GA78384@titania.njm.me.uk> X-Request-Do: Date: Tue, 14 Jul 2009 09:04:40 +0100 From: David Malone Message-ID: <200907140904.aa90354@walton.maths.tcd.ie> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r195652 - head/etc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 08:04:43 -0000 > The above sentence seems very clumsy to me. How about: > # If you wish to choose which country's public server you want > # to sync against, ... Looks reasonable to me. I might collect up some suggestions like this and commit them at a later date. As it stands, I think we have a reasonable config file to ship with 8.0. David. From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 09:10:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20F3610656CE; Tue, 14 Jul 2009 09:10:09 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id 7C4AE8FC0A; Tue, 14 Jul 2009 09:10:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 0CC2541C690; Tue, 14 Jul 2009 11:10:07 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id HlqSPVFeaqw3; Tue, 14 Jul 2009 11:10:06 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 1622641C6A7; Tue, 14 Jul 2009 11:10:06 +0200 (CEST) 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 1B5824448E6; Tue, 14 Jul 2009 09:08:17 +0000 (UTC) Date: Tue, 14 Jul 2009 09:08:16 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Ed Schouten In-Reply-To: Message-ID: <20090714090127.K245@maildrop.int.zabbadoz.net> References: <200907121309.n6CD9iXj085206@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, FreBSD Release Engineering Team Subject: Re: svn commit: r195637 - head/lib/libc/stdio X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 09:10:09 -0000 On Mon, 13 Jul 2009, Navdeep Parhar wrote: > On Sun, Jul 12, 2009 at 6:09 AM, Ed Schouten wrote: >> Author: ed >> Date: Sun Jul 12 13:09:43 2009 >> New Revision: 195637 >> URL: http://svn.freebsd.org/changeset/base/195637 >> >> Log: >> Fix fwrite() to return 0 when size or nmemb are zero. > > Hello Ed, > > This breaks buildworld. This change itself compiles, but once the > system's libc has this fwrite (say, after an installworld), buildworld > on that system will fail. mklocale does not like fwrite returning 0. > And who knows if there are other programs like this out there... > > .... > mklocale -o am_ET.UTF-8.out /usr/src/share/mklocale/am_ET.UTF-8.src > am_ET.UTF-8.out: Inappropriate ioctl for device > *** Error code 1 > Stop in /usr/src/share/mklocale. > .... > > > I've attached a patch to mklocale that will fix the problem. As I hit this last night on a reference machine and someone else did, I did a quick check for fwrite uses; I already removed a bit but not all of the noise: src/ > svngrep -r fwrite . > ../tmp/fwrite.files src/ > cd ../tmp tmp/ > grep -v '(void)fwrite' fwrite.files | grep -v zyd_rfwrite | grep -v cfwrite8 | grep -v bufwrite | grep -v ObsoleteFiles.inc | grep -v bpfwrite | grep -v fread.3 | grep -v Makefile | grep -v Symbol.map: | cut -d: -f1 | sed -e 's,\(.*\)/[^/]*,\1,g' | sort | uniq -c 2 ./bin/ed 2 ./bin/sh 1 ./cddl/contrib/opensolaris/cmd/sgs/tools/common 1 ./contrib/amd/amd 1 ./contrib/amd/fsinfo 5 ./contrib/amd/libamu 1 ./contrib/bc 1 ./contrib/bc/dc 2 ./contrib/bind9/bin/dnssec 3 ./contrib/bind9/lib/dns 1 ./contrib/bind9/lib/isc/unix 8 ./contrib/binutils/bfd 1 ./contrib/binutils/bfd/doc 13 ./contrib/binutils/binutils 1 ./contrib/binutils/gas/config 1 ./contrib/binutils/ld 1 ./contrib/binutils/libiberty 5 ./contrib/bzip2 2 ./contrib/com_err 9 ./contrib/cpio/lib 2 ./contrib/csup 3 ./contrib/cvs/diff 34 ./contrib/cvs/src 3 ./contrib/diff 3 ./contrib/diff/lib 15 ./contrib/diff/src 1 ./contrib/file 69 ./contrib/gcc 1 ./contrib/gcc/cp 31 ./contrib/gcclibs/libcpp 1 ./contrib/gcclibs/libiberty 1 ./contrib/gcclibs/libiberty/testsuite 6 ./contrib/gcclibs/libmudflap 5 ./contrib/gdb/gdb 1 ./contrib/gdb/gdb/cli 2 ./contrib/gnu-sort 1 ./contrib/gnu-sort/src 2 ./contrib/groff 1 ./contrib/groff/contrib/groffer 1 ./contrib/groff/contrib/pdfmark 1 ./contrib/groff/src/devices/grolbp 2 ./contrib/groff/src/preproc/html 1 ./contrib/groff/src/preproc/tbl 11 ./contrib/groff/src/utils/indxbib 1 ./contrib/groff/src/utils/lkbib 1 ./contrib/groff/src/utils/lookbib 2 ./contrib/ipfilter/tools 3 ./contrib/less 5 ./contrib/libf2c/libI77 3 ./contrib/libobjc 1 ./contrib/libpcap 1 ./contrib/libpcap/lbl 2 ./contrib/libreadline 5 ./contrib/libstdc++ 1 ./contrib/libstdc++/include/c 1 ./contrib/libstdc++/include/c_compatibility 2 ./contrib/libstdc++/include/c_std 1 ./contrib/libstdc++/include/ext 1 ./contrib/lukemftp/src 1 ./contrib/ncurses/man 1 ./contrib/ncurses/ncurses 2 ./contrib/ncurses/ncurses/base 1 ./contrib/ncurses/ncurses/tinfo 1 ./contrib/ncurses/progs 2 ./contrib/ntp/sntp 1 ./contrib/nvi/ex 2 ./contrib/one-true-awk 1 ./contrib/openbsm/bin/auditreduce 3 ./contrib/opie/libmissing 7 ./contrib/pf/pflogd 1 ./contrib/sendmail/libmilter 1 ./contrib/sendmail/libmilter/docs 4 ./contrib/sendmail/libsm 1 ./contrib/sendmail/mail.local 4 ./contrib/sendmail/src 1 ./contrib/tcpdump 1 ./contrib/tcpdump/lbl 1 ./contrib/telnet/telnet 1 ./contrib/texinfo 4 ./contrib/texinfo/info 6 ./contrib/texinfo/makeinfo 5 ./contrib/texinfo/util 1 ./contrib/traceroute/lbl 1 ./contrib/wpa/src/eap_peer 1 ./contrib/wpa/src/utils 1 ./crypto/heimdal/appl/ftp/ftpd 1 ./crypto/heimdal/appl/telnet/telnet 6 ./crypto/heimdal/lib/asn1 2 ./crypto/heimdal/lib/com_err 5 ./crypto/heimdal/lib/hx509 2 ./crypto/heimdal/lib/krb5 1 ./crypto/heimdal/lib/roken 4 ./crypto/heimdal/lib/sl 1 ./crypto/openssl/crypto/asn1 5 ./crypto/openssl/crypto/bio 13 ./crypto/openssl/crypto/des 1 ./crypto/openssl/crypto/err 1 ./crypto/openssl/crypto/pkcs12 1 ./crypto/openssl/crypto/pkcs7 1 ./crypto/openssl/crypto/rand 1 ./crypto/openssl/crypto/rc4 2 ./crypto/openssl/crypto/threads 2 ./crypto/openssl/demos/bio 4 ./crypto/openssl/demos/eay 3 ./crypto/openssl/doc/crypto 1 ./crypto/openssl/fips/dsa 1 ./crypto/openssl/fips/sha 1 ./crypto/openssl/ssl 1 ./crypto/openssl/test 1 ./games/fortune/fortune 3 ./games/fortune/strfile 2 ./gnu/usr.bin/cc/cc_tools 2 ./gnu/usr.bin/cc/libcpp 1 ./gnu/usr.bin/cpio 5 ./gnu/usr.bin/grep 3 ./gnu/usr.bin/rcs/lib 1 ./gnu/usr.bin/sort 1 ./include 1 ./lib/libarchive 3 ./lib/libc/rpc/PSD.doc 6 ./lib/libc/stdio 3 ./lib/libc/xdr 2 ./lib/libfetch 5 ./lib/libz 1 ./libexec/bootpd 1 ./libexec/bootpd/tools/bootpef 1 ./sbin/ldconfig 1 ./sbin/md5 2 ./sbin/quotacheck 9 ./sbin/restore 3 ./sbin/savecore 1 ./sbin/sysctl 3 ./secure/lib/libcrypto/man 2 ./secure/usr.bin/bdes 1 ./share/doc/papers/sysperf 1 ./share/doc/psd/04.uprog 1 ./share/syscons/scrnmaps 1 ./sys/boot/arm/ixp425/boot2 7 ./sys/boot/ficl 1 ./sys/boot/forth 1 ./sys/contrib/dev/acpica/common 2 ./sys/contrib/dev/acpica/compiler 1 ./tools/test/ppsapi 2 ./usr.bin/at 4 ./usr.bin/bsdiff/bsdiff 5 ./usr.bin/colldef 8 ./usr.bin/compress 4 ./usr.bin/compress/doc 2 ./usr.bin/cut 1 ./usr.bin/fetch 3 ./usr.bin/gprof 1 ./usr.bin/gzip 2 ./usr.bin/head 2 ./usr.bin/indent 4 ./usr.bin/lex 1 ./usr.bin/locate/code 2 ./usr.bin/mail 1 ./usr.bin/make 6 ./usr.bin/mklocale 2 ./usr.bin/mkstr 1 ./usr.bin/msgs 1 ./usr.bin/pr 2 ./usr.bin/printf 3 ./usr.bin/sed 6 ./usr.bin/tip/tip 1 ./usr.bin/uudecode 1 ./usr.bin/xlint/common 1 ./usr.bin/xlint/lint1 2 ./usr.bin/xlint/llib 1 ./usr.bin/xstr 1 ./usr.sbin/acpi/acpidump 3 ./usr.sbin/ctm/ctm 2 ./usr.sbin/ctm/ctm_rmail 1 ./usr.sbin/ctm/ctm_smail 3 ./usr.sbin/ctm/mkCTM 1 ./usr.sbin/extattr 4 ./usr.sbin/fdread 3 ./usr.sbin/kgmon 3 ./usr.sbin/kldxref 5 ./usr.sbin/lpr/common_source 1 ./usr.sbin/lpr/lpc 1 ./usr.sbin/ndiscvt 1 ./usr.sbin/pkg_install/info 2 ./usr.sbin/pkg_install/lib 1 ./usr.sbin/pmcstat 1 ./usr.sbin/pw 3 ./usr.sbin/sysinstall 5 ./usr.sbin/zic About 550+ places to audit in src/ for proper usage to say world would be clean and we can ship it; some are in contrib/ ... Considering that world already broke after this I'd prefer it to be backed out. As others pointed out, noone knows how many ports will break runtime by that. We should re-introduce it a later time, possibly after 8.0-R though for standard compliance, once more code has been audited. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 09:19:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 194C6106564A; Tue, 14 Jul 2009 09:19:34 +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 07E518FC19; Tue, 14 Jul 2009 09:19:34 +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 n6E9JXvT053242; Tue, 14 Jul 2009 09:19:33 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6E9JXsg053241; Tue, 14 Jul 2009 09:19:33 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <200907140919.n6E9JXsg053241@svn.freebsd.org> From: Ed Schouten Date: Tue, 14 Jul 2009 09:19: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: r195676 - head/usr.bin/mklocale X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 09:19:34 -0000 Author: ed Date: Tue Jul 14 09:19:33 2009 New Revision: 195676 URL: http://svn.freebsd.org/changeset/base/195676 Log: Make mklocale work again, now that fwrite()'s return codes are different. Submitted by: Navdeep Parhar Approved by: re (kib) Modified: head/usr.bin/mklocale/yacc.y Modified: head/usr.bin/mklocale/yacc.y ============================================================================== --- head/usr.bin/mklocale/yacc.y Tue Jul 14 04:35:13 2009 (r195675) +++ head/usr.bin/mklocale/yacc.y Tue Jul 14 09:19:33 2009 (r195676) @@ -730,8 +730,8 @@ dump_tables() /* * PART 6: And finally the variable data */ - if (fwrite(variable, - ntohl(new_locale.variable_len), 1, fp) != 1) { + if (new_locale.variable_len != 0 && + fwrite(variable, ntohl(new_locale.variable_len), 1, fp) != 1) { perror(locale_file); exit(1); } From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 10:15:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 23A54106564A; Tue, 14 Jul 2009 10:15:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.cksoft.de (mail.cksoft.de [195.88.108.3]) by mx1.freebsd.org (Postfix) with ESMTP id A3C068FC1D; Tue, 14 Jul 2009 10:15:07 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id 8615741C65E; Tue, 14 Jul 2009 12:15:06 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([195.88.108.3]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id XJ7+R2ClRKP7; Tue, 14 Jul 2009 12:15:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id A3F0041C67B; Tue, 14 Jul 2009 12:15:05 +0200 (CEST) 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 BC8204448E6; Tue, 14 Jul 2009 10:10:37 +0000 (UTC) Date: Tue, 14 Jul 2009 10:10:37 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Qing Li In-Reply-To: <200907121920.n6CJKtf1092990@svn.freebsd.org> Message-ID: <20090714100524.P245@maildrop.int.zabbadoz.net> References: <200907121920.n6CJKtf1092990@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: r195643 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 10:15:08 -0000 On Sun, 12 Jul 2009, Qing Li wrote: > Author: qingli > Date: Sun Jul 12 19:20:55 2009 > New Revision: 195643 > URL: http://svn.freebsd.org/changeset/base/195643 > > Log: > This patch adds a host route to an interface address (that is assigned > to a non loopback/ppp link type) through the loopback interface. Prior > to the new L2/L3 rewrite, this host route was explicitly created when > processing the IPv6 address assignment. This loopback host route is > deleted when that IPv6 address is removed from the interface. Thanks a lot for fixing this. Now I am reviewing another patch and I found that this here used to be configurable actually by sysctls: nd6_useloopback for v6 and the v4 version from r192011 used to use useloopback; see the lines following pointing at the 7-STABLE tree to have a tree before new-arp: http://fxr.watson.org/fxr/source/netinet/if_ether.c?v=FREEBSD7#L259 http://fxr.watson.org/fxr/source/netinet6/nd6.c?v=FREEBSD7#L1320 Not sure if we'll want to restore that behaviour or remove the sysctls? /bz > Reviewed by: bz, gnn > Approved by: re > > Modified: > head/sys/netinet6/in6.c > > Modified: head/sys/netinet6/in6.c > ============================================================================== > --- head/sys/netinet6/in6.c Sun Jul 12 17:07:35 2009 (r195642) > +++ head/sys/netinet6/in6.c Sun Jul 12 19:20:55 2009 (r195643) > @@ -1194,6 +1194,25 @@ in6_purgeaddr(struct ifaddr *ifa) > ifa_ref(ifa0); > IF_ADDR_UNLOCK(ifp); > > + if (!(ia->ia_ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) { > + struct rt_addrinfo info; > + struct sockaddr_dl null_sdl; > + > + bzero(&null_sdl, sizeof(null_sdl)); > + null_sdl.sdl_len = sizeof(null_sdl); > + null_sdl.sdl_family = AF_LINK; > + null_sdl.sdl_type = V_loif->if_type; > + null_sdl.sdl_index = V_loif->if_index; > + bzero(&info, sizeof(info)); > + info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC; > + info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr; > + info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; > + error = rtrequest1_fib(RTM_DELETE, &info, NULL, 0); > + > + if (error != 0) > + log(LOG_INFO, "in6_purgeaddr: deletion failed\n"); > + } > + > /* stop DAD processing */ > nd6_dad_stop(ifa); > > @@ -1755,6 +1774,33 @@ in6_ifinit(struct ifnet *ifp, struct in6 > ia->ia_flags |= IFA_ROUTE; > } > > + /* > + * add a loopback route to self > + */ > + if (!(ifp->if_flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) { > + struct rt_addrinfo info; > + struct rtentry *rt = NULL; > + static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; > + > + bzero(&info, sizeof(info)); > + info.rti_ifp = V_loif; > + info.rti_flags = ia->ia_flags | RTF_HOST | RTF_STATIC; > + info.rti_info[RTAX_DST] = (struct sockaddr *)&ia->ia_addr; > + info.rti_info[RTAX_GATEWAY] = (struct sockaddr *)&null_sdl; > + error = rtrequest1_fib(RTM_ADD, &info, &rt, 0); > + > + if (error == 0 && rt != NULL) { > + RT_LOCK(rt); > + ((struct sockaddr_dl *)rt->rt_gateway)->sdl_type = > + rt->rt_ifp->if_type; > + ((struct sockaddr_dl *)rt->rt_gateway)->sdl_index = > + rt->rt_ifp->if_index; > + RT_REMREF(rt); > + RT_UNLOCK(rt); > + } else if (error != 0) > + log(LOG_INFO, "in6_ifinit: insertion failed\n"); > + } > + > /* Add ownaddr as loopback rtentry, if necessary (ex. on p2p link). */ > if (newhost) { > struct llentry *ln; > -- Bjoern A. Zeeb The greatest risk is not taking one. From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 11:53:22 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 22702106566C; Tue, 14 Jul 2009 11:53:22 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1109B8FC12; Tue, 14 Jul 2009 11:53:22 +0000 (UTC) (envelope-from lstewart@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 n6EBrLWM059292; Tue, 14 Jul 2009 11:53:21 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EBrLjK059290; Tue, 14 Jul 2009 11:53:21 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <200907141153.n6EBrLjK059290@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 14 Jul 2009 11:53: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: r195677 - head/sys/dev/cxgb/ulp/tom X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 11:53:22 -0000 Author: lstewart Date: Tue Jul 14 11:53:21 2009 New Revision: 195677 URL: http://svn.freebsd.org/changeset/base/195677 Log: Fix a buglet that slipped into r195654. My buildworld/buildkernel sanity check missed this because cxgb's TOM is currently commented out of the build system. Submitted by: Navdeep Parhar Approved by: re (kensmith), kensmith (mentor temporarily unavailable) Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Tue Jul 14 09:19:33 2009 (r195676) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Tue Jul 14 11:53:21 2009 (r195677) @@ -3585,7 +3585,7 @@ syncache_expand_establish_req(struct cpl { struct in_conninfo inc; - struct toeopt to; + struct toeopt toeo; struct tcphdr th; int mss, wsf, sack, ts; struct mbuf *m = NULL; From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 16:02:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6717106564A; Tue, 14 Jul 2009 16:02:36 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: from kientzle.com (kientzle.com [66.166.149.50]) by mx1.freebsd.org (Postfix) with ESMTP id B1CBF8FC08; Tue, 14 Jul 2009 16:02:36 +0000 (UTC) (envelope-from kientzle@freebsd.org) Received: (from root@localhost) by kientzle.com (8.14.3/8.14.3) id n6EG2ZLM086374; Tue, 14 Jul 2009 09:02:35 -0700 (PDT) (envelope-from kientzle@freebsd.org) Received: from dark.x.kientzle.com (fw2.kientzle.com [10.123.1.2]) by kientzle.com with SMTP id d3a99zhxb8fiixhi4ftaup5982; Tue, 14 Jul 2009 09:02:35 -0700 (PDT) (envelope-from kientzle@freebsd.org) Message-ID: <4A5CAC1B.4070006@freebsd.org> Date: Tue, 14 Jul 2009 09:02:35 -0700 From: Tim Kientzle User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.21) Gecko/20090601 SeaMonkey/1.1.16 MIME-Version: 1.0 To: Jilles Tjoelker References: <200907081523.n68FNIpi055036@svn.freebsd.org> <20090709173046.GA48155@stack.nl> In-Reply-To: <20090709173046.GA48155@stack.nl> 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, Edward Tomasz Napierala Subject: Re: svn commit: r195458 - in head: include lib/libc/sys sys/bsm sys/compat/freebsd32 sys/compat/svr4 sys/i386/ibcs2 sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 16:02:37 -0000 Jilles Tjoelker wrote: > On Wed, Jul 08, 2009 at 03:23:18PM +0000, Edward Tomasz Napierala wrote: >> Author: trasz >> Date: Wed Jul 8 15:23:18 2009 >> New Revision: 195458 >> URL: http://svn.freebsd.org/changeset/base/195458 > >> Log: >> There is an optimization in chmod(1), that makes it not to call chmod(2) >> if the new file mode is the same as it was before; however, this >> optimization must be disabled for filesystems that support NFSv4 ACLs. >> Chmod uses pathconf(2) to determine whether this is the case - however, >> pathconf(2) always follows symbolic links, while the 'chmod -h' doesn't. > >> This change adds lpathconf(3) to make it possible to solve that problem >> in a clean way. > > I think pathconfat() would be nicer than adding a function that will not > appear in standards and lacks a useful feature. Compare futimens() and > utimensat() in the 2008 POSIX spec, and notice that there is no such > thing as lutimes() in POSIX (it can be done with utimensat()). Another data point: I've started looking at the *at() functions for libarchive's deep directory handling. The current code uses chdir() to manipulate files with very long pathnames, but that causes complications for libarchive clients that I'd like to eliminate. Using *at() functions to manage a "virtual current directory" looks a lot more robust. Unfortunately, there are still a few operations that are unavailable with this paradigm: * ACL functions * extattr functions * link() * symlink() From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 17:11:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E73771065784; Tue, 14 Jul 2009 17:11:06 +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 D48328FC08; Tue, 14 Jul 2009 17:11: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 n6EHB6Uk065745; Tue, 14 Jul 2009 17:11:06 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EHB6eP065743; Tue, 14 Jul 2009 17:11:06 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907141711.n6EHB6eP065743@svn.freebsd.org> From: Sam Leffler Date: Tue, 14 Jul 2009 17:11: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: r195684 - head/contrib/tcpdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 17:11:07 -0000 Author: sam Date: Tue Jul 14 17:11:06 2009 New Revision: 195684 URL: http://svn.freebsd.org/changeset/base/195684 Log: Updates, mostly to add 802.11s support: o add missing Status and Reason codes o parse/display Action frames o parse/display Mesh data frames o parse/display BA frames Reviewed by: rpaulo Approved by: re (kib) Modified: head/contrib/tcpdump/ieee802_11.h head/contrib/tcpdump/print-802_11.c Modified: head/contrib/tcpdump/ieee802_11.h ============================================================================== --- head/contrib/tcpdump/ieee802_11.h Tue Jul 14 15:42:13 2009 (r195683) +++ head/contrib/tcpdump/ieee802_11.h Tue Jul 14 17:11:06 2009 (r195684) @@ -69,12 +69,13 @@ #define ST_DISASSOC 0xA #define ST_AUTH 0xB #define ST_DEAUTH 0xC -/* RESERVED 0xD */ +#define ST_ACTION 0xD /* RESERVED 0xE */ /* RESERVED 0xF */ #define CTRL_BAR 0x8 +#define CTRL_BA 0x9 #define CTRL_PS_POLL 0xA #define CTRL_RTS 0xB #define CTRL_CTS 0xC @@ -315,6 +316,15 @@ struct ctrl_end_ack_t { #define CTRL_END_ACK_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+\ IEEE802_11_RA_LEN+IEEE802_11_BSSID_LEN) +struct ctrl_ba_t { + u_int16_t fc; + u_int16_t duration; + u_int8_t ra[6]; + u_int8_t fcs[4]; +}; + +#define CTRL_BA_HDRLEN (IEEE802_11_FC_LEN+IEEE802_11_DUR_LEN+IEEE802_11_RA_LEN) + struct ctrl_bar_t { u_int16_t fc; u_int16_t dur; @@ -329,6 +339,15 @@ struct ctrl_bar_t { IEEE802_11_RA_LEN+IEEE802_11_TA_LEN+\ IEEE802_11_CTL_LEN+IEEE802_11_SEQ_LEN) +struct meshcntl_t { + u_int8_t flags; + u_int8_t ttl; + u_int8_t seq[4]; + u_int8_t addr4[6]; + u_int8_t addr5[6]; + u_int8_t addr6[6]; +}; + #define IV_IV(iv) ((iv) & 0xFFFFFF) #define IV_PAD(iv) (((iv) >> 24) & 0x3F) #define IV_KEYID(iv) (((iv) >> 30) & 0x03) Modified: head/contrib/tcpdump/print-802_11.c ============================================================================== --- head/contrib/tcpdump/print-802_11.c Tue Jul 14 15:42:13 2009 (r195683) +++ head/contrib/tcpdump/print-802_11.c Tue Jul 14 17:11:06 2009 (r195684) @@ -121,41 +121,154 @@ static const char *auth_alg_text[]={"Ope #define NUM_AUTH_ALGS (sizeof auth_alg_text / sizeof auth_alg_text[0]) static const char *status_text[] = { - "Succesful", /* 0 */ - "Unspecified failure", /* 1 */ - "Reserved", /* 2 */ - "Reserved", /* 3 */ - "Reserved", /* 4 */ - "Reserved", /* 5 */ - "Reserved", /* 6 */ - "Reserved", /* 7 */ - "Reserved", /* 8 */ - "Reserved", /* 9 */ - "Cannot Support all requested capabilities in the Capability Information field", /* 10 */ - "Reassociation denied due to inability to confirm that association exists", /* 11 */ - "Association denied due to reason outside the scope of the standard", /* 12 */ - "Responding station does not support the specified authentication algorithm ", /* 13 */ - "Received an Authentication frame with authentication transaction " \ - "sequence number out of expected sequence", /* 14 */ - "Authentication rejected because of challenge failure", /* 15 */ - "Authentication rejected due to timeout waiting for next frame in sequence", /* 16 */ - "Association denied because AP is unable to handle additional associated stations", /* 17 */ - "Association denied due to requesting station not supporting all of the " \ - "data rates in BSSBasicRateSet parameter", /* 18 */ + "Succesful", /* 0 */ + "Unspecified failure", /* 1 */ + "Reserved", /* 2 */ + "Reserved", /* 3 */ + "Reserved", /* 4 */ + "Reserved", /* 5 */ + "Reserved", /* 6 */ + "Reserved", /* 7 */ + "Reserved", /* 8 */ + "Reserved", /* 9 */ + "Cannot Support all requested capabilities in the Capability " + "Information field", /* 10 */ + "Reassociation denied due to inability to confirm that association " + "exists", /* 11 */ + "Association denied due to reason outside the scope of the " + "standard", /* 12 */ + "Responding station does not support the specified authentication " + "algorithm ", /* 13 */ + "Received an Authentication frame with authentication transaction " + "sequence number out of expected sequence", /* 14 */ + "Authentication rejected because of challenge failure", /* 15 */ + "Authentication rejected due to timeout waiting for next frame in " + "sequence", /* 16 */ + "Association denied because AP is unable to handle additional" + "associated stations", /* 17 */ + "Association denied due to requesting station not supporting all of " + "the data rates in BSSBasicRateSet parameter", /* 18 */ + "Association denied due to requesting station not supporting " + "short preamble operation", /* 19 */ + "Association denied due to requesting station not supporting " + "PBCC encoding", /* 20 */ + "Association denied due to requesting station not supporting " + "channel agility", /* 21 */ + "Association request rejected because Spectrum Management " + "capability is required", /* 22 */ + "Association request rejected because the information in the " + "Power Capability element is unacceptable", /* 23 */ + "Association request rejected because the information in the " + "Supported Channels element is unacceptable", /* 24 */ + "Association denied due to requesting station not supporting " + "short slot operation", /* 25 */ + "Association denied due to requesting station not supporting " + "DSSS-OFDM operation", /* 26 */ + "Association denied because the requested STA does not support HT " + "features", /* 27 */ + "Reserved", /* 28 */ + "Association denied because the requested STA does not support " + "the PCO transition time required by the AP", /* 29 */ + "Reserved", /* 30 */ + "Reserved", /* 31 */ + "Unspecified, QoS-related failure", /* 32 */ + "Association denied due to QAP having insufficient bandwidth " + "to handle another QSTA", /* 33 */ + "Association denied due to excessive frame loss rates and/or " + "poor conditions on current operating channel", /* 34 */ + "Association (with QBSS) denied due to requesting station not " + "supporting the QoS facility", /* 35 */ + "Association denied due to requesting station not supporting " + "Block Ack", /* 36 */ + "The request has been declined", /* 37 */ + "The request has not been successful as one or more parameters " + "have invalid values", /* 38 */ + "The TS has not been created because the request cannot be honored. " + "However, a suggested TSPEC is provided so that the initiating QSTA" + "may attempt to set another TS with the suggested changes to the " + "TSPEC", /* 39 */ + "Invalid Information Element", /* 40 */ + "Group Cipher is not valid", /* 41 */ + "Pairwise Cipher is not valid", /* 42 */ + "AKMP is not valid", /* 43 */ + "Unsupported RSN IE version", /* 44 */ + "Invalid RSN IE Capabilities", /* 45 */ + "Cipher suite is rejected per security policy", /* 46 */ + "The TS has not been created. However, the HC may be capable of " + "creating a TS, in response to a request, after the time indicated " + "in the TS Delay element", /* 47 */ + "Direct Link is not allowed in the BSS by policy", /* 48 */ + "Destination STA is not present within this QBSS.", /* 49 */ + "The Destination STA is not a QSTA.", /* 50 */ + }; #define NUM_STATUSES (sizeof status_text / sizeof status_text[0]) static const char *reason_text[] = { - "Reserved", /* 0 */ - "Unspecified reason", /* 1 */ - "Previous authentication no longer valid", /* 2 */ - "Deauthenticated because sending station is leaving (or has left) IBSS or ESS", /* 3 */ - "Disassociated due to inactivity", /* 4 */ - "Disassociated because AP is unable to handle all currently associated stations", /* 5 */ + "Reserved", /* 0 */ + "Unspecified reason", /* 1 */ + "Previous authentication no longer valid", /* 2 */ + "Deauthenticated because sending station is leaving (or has left) " + "IBSS or ESS", /* 3 */ + "Disassociated due to inactivity", /* 4 */ + "Disassociated because AP is unable to handle all currently " + " associated stations", /* 5 */ "Class 2 frame received from nonauthenticated station", /* 6 */ - "Class 3 frame received from nonassociated station", /* 7 */ - "Disassociated because sending station is leaving (or has left) BSS", /* 8 */ - "Station requesting (re)association is not authenticated with responding station", /* 9 */ + "Class 3 frame received from nonassociated station", /* 7 */ + "Disassociated because sending station is leaving " + "(or has left) BSS", /* 8 */ + "Station requesting (re)association is not authenticated with " + "responding station", /* 9 */ + "Disassociated because the information in the Power Capability " + "element is unacceptable", /* 10 */ + "Disassociated because the information in the SupportedChannels " + "element is unacceptable", /* 11 */ + "Invalid Information Element", /* 12 */ + "Reserved", /* 13 */ + "Michael MIC failure", /* 14 */ + "4-Way Handshake timeout", /* 15 */ + "Group key update timeout", /* 16 */ + "Information element in 4-Way Handshake different from (Re)Association" + "Request/Probe Response/Beacon", /* 17 */ + "Group Cipher is not valid", /* 18 */ + "AKMP is not valid", /* 20 */ + "Unsupported RSN IE version", /* 21 */ + "Invalid RSN IE Capabilities", /* 22 */ + "IEEE 802.1X Authentication failed", /* 23 */ + "Cipher suite is rejected per security policy", /* 24 */ + "Reserved", /* 25 */ + "Reserved", /* 26 */ + "Reserved", /* 27 */ + "Reserved", /* 28 */ + "Reserved", /* 29 */ + "Reserved", /* 30 */ + "TS deleted because QoS AP lacks sufficient bandwidth for this " + "QoS STA due to a change in BSS service characteristics or " + "operational mode (e.g. an HT BSS change from 40 MHz channel " + "to 20 MHz channel)", /* 31 */ + "Disassociated for unspecified, QoS-related reason", /* 32 */ + "Disassociated because QoS AP lacks sufficient bandwidth for this " + "QoS STA", /* 33 */ + "Disassociated because of excessive number of frames that need to be " + "acknowledged, but are not acknowledged for AP transmissions " + "and/or poor channel conditions", /* 34 */ + "Disassociated because STA is transmitting outside the limits " + "of its TXOPs", /* 35 */ + "Requested from peer STA as the STA is leaving the BSS " + "(or resetting)", /* 36 */ + "Requested from peer STA as it does not want to use the " + "mechanism", /* 37 */ + "Requested from peer STA as the STA received frames using the " + "mechanism for which a set up is required", /* 38 */ + "Requested from peer STA due to time out", /* 39 */ + "Reserved", /* 40 */ + "Reserved", /* 41 */ + "Reserved", /* 42 */ + "Reserved", /* 43 */ + "Reserved", /* 44 */ + "Peer STA does not support the requested cipher suite", /* 45 */ + "Association denied due to requesting STA not supporting HT " + "features", /* 46 */ }; #define NUM_REASONS (sizeof reason_text / sizeof reason_text[0]) @@ -571,6 +684,66 @@ handle_deauth(const struct mgmt_header_t return 1; } +#define PRINT_HT_ACTION(v) (\ + (v) == 0 ? printf("TxChWidth") : \ + (v) == 1 ? printf("MIMOPwrSave") : \ + printf("Act#%d", (v)) \ +) +#define PRINT_BA_ACTION(v) (\ + (v) == 0 ? printf("ADDBA Request") : \ + (v) == 1 ? printf("ADDBA Response") : \ + (v) == 2 ? printf("DELBA") : \ + printf("Act#%d", (v)) \ +) +#define PRINT_MESHLINK_ACTION(v) (\ + (v) == 0 ? printf("Request") : \ + (v) == 1 ? printf("Report") : \ + printf("Act#%d", (v)) \ +) +#define PRINT_MESHPEERING_ACTION(v) (\ + (v) == 0 ? printf("Open") : \ + (v) == 1 ? printf("Confirm") : \ + (v) == 2 ? printf("Close") : \ + printf("Act#%d", (v)) \ +) +#define PRINT_MESHPATH_ACTION(v) (\ + (v) == 0 ? printf("Request") : \ + (v) == 1 ? printf("Report") : \ + (v) == 2 ? printf("Error") : \ + (v) == 3 ? printf("RootAnnouncement") : \ + printf("Act#%d", (v)) \ +) + +static int +handle_action(const struct mgmt_header_t *pmh, const u_char *p) +{ + if (!TTEST2(*p, 2)) + return 0; + if (eflag) { + printf(": "); + } else { + printf(" (%s): ", etheraddr_string(pmh->sa)); + } + switch (p[0]) { + case 0: printf("Spectrum Management Act#%d", p[1]); break; + case 1: printf("QoS Act#%d", p[1]); break; + case 2: printf("DLS Act#%d", p[1]); break; + case 3: printf("BA "); PRINT_BA_ACTION(p[1]); break; + case 7: printf("HT "); PRINT_HT_ACTION(p[1]); break; + case 13: printf("MeshLMetric "); PRINT_MESHLINK_ACTION(p[1]); break; + case 15: printf("Interwork Act#%d", p[1]); break; + case 16: printf("Resource Act#%d", p[1]); break; + case 17: printf("Proxy Act#%d", p[1]); break; + case 30: printf("MeshPeering "); PRINT_MESHPEERING_ACTION(p[1]); break; + case 32: printf("MeshPath "); PRINT_MESHPATH_ACTION(p[1]); break; + case 127: printf("Vendor Act#%d", p[1]); break; + default: + printf("Reserved(%d) Act#%d", p[0], p[1]); + break; + } + return 1; +} + /********************************************************************************* * Print Body funcs @@ -622,6 +795,10 @@ mgmt_body_print(u_int16_t fc, const stru printf("DeAuthentication"); return handle_deauth(pmh, p); break; + case ST_ACTION: + printf("Action"); + return handle_action(pmh, p); + break; default: printf("Unhandled Management subtype(%x)", FC_SUBTYPE(fc)); @@ -649,6 +826,14 @@ ctrl_body_print(u_int16_t fc, const u_ch EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->ctl)), EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->seq))); break; + case CTRL_BA: + printf("BA"); + if (!TTEST2(*p, CTRL_BA_HDRLEN)) + return 0; + if (!eflag) + printf(" RA:%s ", + etheraddr_string(((const struct ctrl_ba_t *)p)->ra)); + break; case CTRL_PS_POLL: printf("Power Save-Poll"); if (!TTEST2(*p, CTRL_PS_POLL_HDRLEN)) @@ -829,6 +1014,10 @@ ctrl_header_print(u_int16_t fc, const u_ EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->ctl)), EXTRACT_LE_16BITS(&(((const struct ctrl_bar_t *)p)->seq))); break; + case CTRL_BA: + printf("RA:%s ", + etheraddr_string(((const struct ctrl_ba_t *)p)->ra)); + break; case CTRL_PS_POLL: printf("BSSID:%s TA:%s ", etheraddr_string(((const struct ctrl_ps_poll_t *)p)->bssid), @@ -901,14 +1090,20 @@ extract_header_length(u_int16_t fc) } } +static int +extract_mesh_header_length(const u_char *p) +{ + return (p[0] &~ 3) ? 0 : 6*(1 + (p[0] & 3)); +} + /* * Print the 802.11 MAC header if eflag is set, and set "*srcp" and "*dstp" * to point to the source and destination MAC addresses in any case if * "srcp" and "dstp" aren't null. */ -static inline void -ieee_802_11_hdr_print(u_int16_t fc, const u_char *p, const u_int8_t **srcp, - const u_int8_t **dstp) +static void +ieee_802_11_hdr_print(u_int16_t fc, const u_char *p, u_int hdrlen, + u_int meshdrlen, const u_int8_t **srcp, const u_int8_t **dstp) { if (vflag) { if (FC_MORE_DATA(fc)) @@ -928,6 +1123,21 @@ ieee_802_11_hdr_print(u_int16_t fc, cons EXTRACT_LE_16BITS( &((const struct mgmt_header_t *)p)->duration)); } + if (meshdrlen != 0) { + const struct meshcntl_t *mc = + (const struct meshcntl_t *)&p[hdrlen - meshdrlen]; + int ae = mc->flags & 3; + + printf("MeshData (AE %d TTL %u seq %u", ae, mc->ttl, + EXTRACT_LE_32BITS(mc->seq)); + if (ae > 0) + printf(" A4:%s", etheraddr_string(mc->addr4)); + if (ae > 1) + printf(" A5:%s", etheraddr_string(mc->addr5)); + if (ae > 2) + printf(" A6:%s", etheraddr_string(mc->addr6)); + printf(") "); + } switch (FC_TYPE(fc)) { case T_MGMT: @@ -956,7 +1166,7 @@ static u_int ieee802_11_print(const u_char *p, u_int length, u_int caplen, int pad) { u_int16_t fc; - u_int hdrlen; + u_int hdrlen, meshdrlen; const u_int8_t *src, *dst; u_short extracted_ethertype; @@ -969,13 +1179,19 @@ ieee802_11_print(const u_char *p, u_int hdrlen = extract_header_length(fc); if (pad) hdrlen = roundup2(hdrlen, 4); + if (FC_TYPE(fc) == T_DATA && DATA_FRAME_IS_QOS(FC_SUBTYPE(fc))) { + meshdrlen = extract_mesh_header_length(p+hdrlen); + hdrlen += meshdrlen; + } else + meshdrlen = 0; + if (caplen < hdrlen) { printf("[|802.11]"); return hdrlen; } - ieee_802_11_hdr_print(fc, p, &src, &dst); + ieee_802_11_hdr_print(fc, p, hdrlen, meshdrlen, &src, &dst); /* * Go past the 802.11 header. @@ -1014,8 +1230,8 @@ ieee802_11_print(const u_char *p, u_int * handle intelligently */ if (!eflag) - ieee_802_11_hdr_print(fc, p - hdrlen, NULL, - NULL); + ieee_802_11_hdr_print(fc, p - hdrlen, hdrlen, + meshdrlen, NULL, NULL); if (extracted_ethertype) printf("(LLC %s) ", etherproto_string( From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 17:26:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EC385106564A; Tue, 14 Jul 2009 17:26:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DA0458FC14; Tue, 14 Jul 2009 17:26:37 +0000 (UTC) (envelope-from emaste@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 n6EHQbvs066208; Tue, 14 Jul 2009 17:26:37 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EHQbis066206; Tue, 14 Jul 2009 17:26:37 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200907141726.n6EHQbis066206@svn.freebsd.org> From: Ed Maste Date: Tue, 14 Jul 2009 17:26: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: r195685 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 17:26:38 -0000 Author: emaste Date: Tue Jul 14 17:26:37 2009 New Revision: 195685 URL: http://svn.freebsd.org/changeset/base/195685 Log: Fix leaks in probestart, probedone, and scsi_scan_bus. Also free page_list using the matching malloc type for the allocation. Approved by: re Reviewed by: scottl [1] MFC after: 1 week [1] Original patch was against xpt_cam.c, prior to the cam refactoring. Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Tue Jul 14 17:11:06 2009 (r195684) +++ head/sys/cam/scsi/scsi_xpt.c Tue Jul 14 17:26:37 2009 (r195685) @@ -836,8 +836,11 @@ probestart(struct cam_periph *periph, un serial_buf = NULL; device = periph->path->device; - device->serial_num = NULL; - device->serial_num_len = 0; + if (device->serial_num != NULL) { + free(device->serial_num, M_CAMXPT); + device->serial_num = NULL; + device->serial_num_len = 0; + } serial_buf = (struct scsi_vpd_unit_serial_number *) malloc(sizeof(*serial_buf), M_CAMXPT, M_NOWAIT|M_ZERO); @@ -1176,7 +1179,7 @@ probedone(struct cam_periph *periph, uni } if (page_list != NULL) - free(page_list, M_DEVBUF); + free(page_list, M_CAMXPT); if (serialnum_supported) { xpt_release_ccb(done_ccb); @@ -1561,6 +1564,7 @@ scsi_scan_bus(struct cam_periph *periph, } work_ccb = xpt_alloc_ccb_nowait(); if (work_ccb == NULL) { + xpt_free_ccb((union ccb *)scan_info->cpi); free(scan_info, M_CAMXPT); xpt_free_path(path); request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; @@ -1682,6 +1686,7 @@ scsi_scan_bus(struct cam_periph *periph, } if ((scan_info->cpi->hba_misc & PIM_SEQSCAN) == 0) { + xpt_free_ccb(request_ccb); break; } status = xpt_create_path(&path, xpt_periph, From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 18:44:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E4C410656C9; Tue, 14 Jul 2009 18:44:18 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1F08FC0C; Tue, 14 Jul 2009 18:44:18 +0000 (UTC) (envelope-from emaste@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 n6EIiIW5067929; Tue, 14 Jul 2009 18:44:18 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EIiIQQ067927; Tue, 14 Jul 2009 18:44:18 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <200907141844.n6EIiIQQ067927@svn.freebsd.org> From: Ed Maste Date: Tue, 14 Jul 2009 18:44: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: r195688 - head/sys/cam/scsi X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 18:44:43 -0000 Author: emaste Date: Tue Jul 14 18:44:17 2009 New Revision: 195688 URL: http://svn.freebsd.org/changeset/base/195688 Log: Change xpt_scan_bus to scsi_scan_bus and xpt_scan_lun to scsi_scan_lun in comments and printfs to match new function names after refacoring. Approved by: re Modified: head/sys/cam/scsi/scsi_xpt.c Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Tue Jul 14 18:40:31 2009 (r195687) +++ head/sys/cam/scsi/scsi_xpt.c Tue Jul 14 18:44:17 2009 (r195688) @@ -1468,14 +1468,14 @@ typedef struct { /* * To start a scan, request_ccb is an XPT_SCAN_BUS ccb. - * As the scan progresses, xpt_scan_bus is used as the + * As the scan progresses, scsi_scan_bus is used as the * callback on completion function. */ static void scsi_scan_bus(struct cam_periph *periph, union ccb *request_ccb) { CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, - ("xpt_scan_bus\n")); + ("scsi_scan_bus\n")); switch (request_ccb->ccb_h.func_code) { case XPT_SCAN_BUS: { @@ -1553,7 +1553,7 @@ scsi_scan_bus(struct cam_periph *periph, request_ccb->ccb_h.path_id, i, 0); if (status != CAM_REQ_CMP) { - printf("xpt_scan_bus: xpt_create_path failed" + printf("scsi_scan_bus: xpt_create_path failed" " with status %#x, bus scan halted\n", status); free(scan_info, M_CAMXPT); @@ -1693,7 +1693,7 @@ scsi_scan_bus(struct cam_periph *periph, scan_info->request_ccb->ccb_h.path_id, scan_info->counter, 0); if (status != CAM_REQ_CMP) { - printf("xpt_scan_bus: xpt_create_path failed" + printf("scsi_scan_bus: xpt_create_path failed" " with status %#x, bus scan halted\n", status); xpt_free_ccb(request_ccb); @@ -1715,7 +1715,7 @@ scsi_scan_bus(struct cam_periph *periph, status = xpt_create_path(&path, xpt_periph, path_id, target_id, lun_id); if (status != CAM_REQ_CMP) { - printf("xpt_scan_bus: xpt_create_path failed " + printf("scsi_scan_bus: xpt_create_path failed " "with status %#x, halting LUN scan\n", status); goto hop_again; @@ -1746,7 +1746,7 @@ scsi_scan_lun(struct cam_periph *periph, struct cam_periph *old_periph; CAM_DEBUG(request_ccb->ccb_h.path, CAM_DEBUG_TRACE, - ("xpt_scan_lun\n")); + ("scsi_scan_lun\n")); xpt_setup_ccb(&cpi.ccb_h, path, /*priority*/1); cpi.ccb_h.func_code = XPT_PATH_INQ; @@ -1775,13 +1775,13 @@ scsi_scan_lun(struct cam_periph *periph, if (request_ccb == NULL) { request_ccb = malloc(sizeof(union ccb), M_CAMXPT, M_NOWAIT); if (request_ccb == NULL) { - xpt_print(path, "xpt_scan_lun: can't allocate CCB, " + xpt_print(path, "scsi_scan_lun: can't allocate CCB, " "can't continue\n"); return; } new_path = malloc(sizeof(*new_path), M_CAMXPT, M_NOWAIT); if (new_path == NULL) { - xpt_print(path, "xpt_scan_lun: can't allocate path, " + xpt_print(path, "scsi_scan_lun: can't allocate path, " "can't continue\n"); free(request_ccb, M_CAMXPT); return; @@ -1792,7 +1792,7 @@ scsi_scan_lun(struct cam_periph *periph, path->device->lun_id); if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: can't compile path, " + xpt_print(path, "scsi_scan_lun: can't compile path, " "can't continue\n"); free(request_ccb, M_CAMXPT); free(new_path, M_CAMXPT); @@ -1818,7 +1818,7 @@ scsi_scan_lun(struct cam_periph *periph, request_ccb); if (status != CAM_REQ_CMP) { - xpt_print(path, "xpt_scan_lun: cam_alloc_periph " + xpt_print(path, "scsi_scan_lun: cam_alloc_periph " "returned an error, can't continue probe\n"); request_ccb->ccb_h.status = status; xpt_done(request_ccb); From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 18:53:34 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAA711065676; Tue, 14 Jul 2009 18:53:34 +0000 (UTC) (envelope-from ariff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C832F8FC15; Tue, 14 Jul 2009 18:53:34 +0000 (UTC) (envelope-from ariff@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 n6EIrYVk068212; Tue, 14 Jul 2009 18:53:34 GMT (envelope-from ariff@svn.freebsd.org) Received: (from ariff@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EIrYY2068210; Tue, 14 Jul 2009 18:53:34 GMT (envelope-from ariff@svn.freebsd.org) Message-Id: <200907141853.n6EIrYY2068210@svn.freebsd.org> From: Ariff Abdullah Date: Tue, 14 Jul 2009 18: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: r195689 - head/sys/dev/sound/pcm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 18:53:35 -0000 Author: ariff Date: Tue Jul 14 18:53:34 2009 New Revision: 195689 URL: http://svn.freebsd.org/changeset/base/195689 Log: - Do aggresive saturation on various polynomial interpolators. This dramatically pushing 99.9% interpolations and quantizations error _below_ -180dB on 32bit dynamic range, resulting extremely high quality conversion. - Use BSPLINE interpolator for filter oversampling factor greater or equal than 64 (log2 6). Approved by: re (kib) Modified: head/sys/dev/sound/pcm/feeder_rate.c Modified: head/sys/dev/sound/pcm/feeder_rate.c ============================================================================== --- head/sys/dev/sound/pcm/feeder_rate.c Tue Jul 14 18:44:17 2009 (r195688) +++ head/sys/dev/sound/pcm/feeder_rate.c Tue Jul 14 18:53:34 2009 (r195689) @@ -789,10 +789,8 @@ z_resampler_sinc_len(struct z_info *info defined(Z_COEFF_INTER_BSPLINE) || defined(Z_COEFF_INTERP_OPT32X) || \ defined(Z_COEFF_INTERP_OPT16X) || defined(Z_COEFF_INTERP_OPT8X) || \ defined(Z_COEFF_INTERP_OPT4X) || defined(Z_COEFF_INTERP_OPT2X)) -#if Z_DRIFT_SHIFT >= 12 -#define Z_COEFF_INTERP_LINEAR 1 -#elif Z_DRIFT_SHIFT >= 8 -#define Z_COEFF_INTERP_QUADRATIC 1 +#if Z_DRIFT_SHIFT >= 6 +#define Z_COEFF_INTERP_BSPLINE 1 #elif Z_DRIFT_SHIFT >= 5 #define Z_COEFF_INTERP_OPT32X 1 #elif Z_DRIFT_SHIFT == 4 @@ -835,7 +833,7 @@ z_coeff_interpolate(int32_t z, int32_t * zl0 = z_coeff[0]; zl1 = z_coeff[1] - z_coeff[0]; - coeff = (((int64_t)zl1 * z) >> Z_SHIFT) + zl0; + coeff = Z_RSHIFT((int64_t)zl1 * z, Z_SHIFT) + zl0; #elif defined(Z_COEFF_INTERP_QUADRATIC) int32_t zq0, zq1, zq2; @@ -844,8 +842,8 @@ z_coeff_interpolate(int32_t z, int32_t * zq1 = z_coeff[1] - z_coeff[-1]; zq2 = z_coeff[1] + z_coeff[-1] - (z_coeff[0] << 1); - coeff = ((((((int64_t)zq2 * z) >> Z_SHIFT) + - zq1) * z) >> (Z_SHIFT + 1)) + zq0; + coeff = Z_RSHIFT((Z_RSHIFT((int64_t)zq2 * z, Z_SHIFT) + + zq1) * z, Z_SHIFT + 1) + zq0; #elif defined(Z_COEFF_INTERP_HERMITE) int32_t zh0, zh1, zh2, zh3; @@ -856,19 +854,21 @@ z_coeff_interpolate(int32_t z, int32_t * z_coeff[2]; zh3 = z_coeff[2] - z_coeff[-1] + ((z_coeff[0] - z_coeff[1]) * 3); - coeff = (((((((((int64_t)zh3 * z) >> Z_SHIFT) + - zh2) * z) >> Z_SHIFT) + zh1) * z) >> (Z_SHIFT + 1)) + zh0; + coeff = Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((int64_t)zh3 * z, Z_SHIFT) + + zh2) * z, Z_SHIFT) + zh1) * z, Z_SHIFT + 1) + zh0; #elif defined(Z_COEFF_INTERP_BSPLINE) int32_t zb0, zb1, zb2, zb3; /* 4-point, 3rd-order B-Spline */ - zb0 = (((int64_t)z_coeff[0] << 2) + z_coeff[-1] + z_coeff[1]) / 3; + zb0 = Z_RSHIFT(0x15555555LL * (((int64_t)z_coeff[0] << 2) + + z_coeff[-1] + z_coeff[1]), 30); zb1 = z_coeff[1] - z_coeff[-1]; zb2 = z_coeff[-1] + z_coeff[1] - (z_coeff[0] << 1); - zb3 = (((z_coeff[0] - z_coeff[1]) * 3) + z_coeff[2] - z_coeff[-1]) / 3; + zb3 = Z_RSHIFT(0x15555555LL * (((z_coeff[0] - z_coeff[1]) * 3) + + z_coeff[2] - z_coeff[-1]), 30); - coeff = ((((((((((int64_t)zb3 * z) >> Z_SHIFT) + - zb2) * z) >> Z_SHIFT) + zb1) * z) >> Z_SHIFT) + zb0) >> 1; + coeff = (Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((int64_t)zb3 * z, Z_SHIFT) + + zb2) * z, Z_SHIFT) + zb1) * z, Z_SHIFT) + zb0 + 1) >> 1; #elif defined(Z_COEFF_INTERP_OPT32X) int32_t zoz, zoe1, zoe2, zoe3, zoo1, zoo2, zoo3; int32_t zoc0, zoc1, zoc2, zoc3, zoc4, zoc5; @@ -882,22 +882,23 @@ z_coeff_interpolate(int32_t z, int32_t * zoo2 = z_coeff[2] - z_coeff[-1]; zoo3 = z_coeff[3] - z_coeff[-2]; - zoc0 = ((0x1ac2260dLL * zoe1) + (0x0526cdcaLL * zoe2) + - (0x00170c29LL * zoe3)) >> 30; - zoc1 = ((0x14f8a49aLL * zoo1) + (0x0d6d1109LL * zoo2) + - (0x008cd4dcLL * zoo3)) >> 30; - zoc2 = ((-0x0d3e94a4LL * zoe1) + (0x0bddded4LL * zoe2) + - (0x0160b5d0LL * zoe3)) >> 30; - zoc3 = ((-0x0de10cc4LL * zoo1) + (0x019b2a7dLL * zoo2) + - (0x01cfe914LL * zoo3)) >> 30; - zoc4 = ((0x02aa12d7LL * zoe1) + (-0x03ff1bb3LL * zoe2) + - (0x015508ddLL * zoe3)) >> 30; - zoc5 = ((0x051d29e5LL * zoo1) + (-0x028e7647LL * zoo2) + - (0x0082d81aLL * zoo3)) >> 30; - - coeff = (((((((((((((((int64_t)zoc5 * zoz) >> Z_SHIFT) + - zoc4) * zoz) >> Z_SHIFT) + zoc3) * zoz) >> Z_SHIFT) + - zoc2) * zoz) >> Z_SHIFT) + zoc1) * zoz) >> Z_SHIFT) + zoc0; + zoc0 = Z_RSHIFT((0x1ac2260dLL * zoe1) + (0x0526cdcaLL * zoe2) + + (0x00170c29LL * zoe3), 30); + zoc1 = Z_RSHIFT((0x14f8a49aLL * zoo1) + (0x0d6d1109LL * zoo2) + + (0x008cd4dcLL * zoo3), 30); + zoc2 = Z_RSHIFT((-0x0d3e94a4LL * zoe1) + (0x0bddded4LL * zoe2) + + (0x0160b5d0LL * zoe3), 30); + zoc3 = Z_RSHIFT((-0x0de10cc4LL * zoo1) + (0x019b2a7dLL * zoo2) + + (0x01cfe914LL * zoo3), 30); + zoc4 = Z_RSHIFT((0x02aa12d7LL * zoe1) + (-0x03ff1bb3LL * zoe2) + + (0x015508ddLL * zoe3), 30); + zoc5 = Z_RSHIFT((0x051d29e5LL * zoo1) + (-0x028e7647LL * zoo2) + + (0x0082d81aLL * zoo3), 30); + + coeff = Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT( + (int64_t)zoc5 * zoz, Z_SHIFT) + + zoc4) * zoz, Z_SHIFT) + zoc3) * zoz, Z_SHIFT) + + zoc2) * zoz, Z_SHIFT) + zoc1) * zoz, Z_SHIFT) + zoc0; #elif defined(Z_COEFF_INTERP_OPT16X) int32_t zoz, zoe1, zoe2, zoe3, zoo1, zoo2, zoo3; int32_t zoc0, zoc1, zoc2, zoc3, zoc4, zoc5; @@ -911,22 +912,23 @@ z_coeff_interpolate(int32_t z, int32_t * zoo2 = z_coeff[2] - z_coeff[-1]; zoo3 = z_coeff[3] - z_coeff[-2]; - zoc0 = ((0x1ac2260dLL * zoe1) + (0x0526cdcaLL * zoe2) + - (0x00170c29LL * zoe3)) >> 30; - zoc1 = ((0x14f8a49aLL * zoo1) + (0x0d6d1109LL * zoo2) + - (0x008cd4dcLL * zoo3)) >> 30; - zoc2 = ((-0x0d3e94a4LL * zoe1) + (0x0bddded4LL * zoe2) + - (0x0160b5d0LL * zoe3)) >> 30; - zoc3 = ((-0x0de10cc4LL * zoo1) + (0x019b2a7dLL * zoo2) + - (0x01cfe914LL * zoo3)) >> 30; - zoc4 = ((0x02aa12d7LL * zoe1) + (-0x03ff1bb3LL * zoe2) + - (0x015508ddLL * zoe3)) >> 30; - zoc5 = ((0x051d29e5LL * zoo1) + (-0x028e7647LL * zoo2) + - (0x0082d81aLL * zoo3)) >> 30; - - coeff = (((((((((((((((int64_t)zoc5 * zoz) >> Z_SHIFT) + - zoc4) * zoz) >> Z_SHIFT) + zoc3) * zoz) >> Z_SHIFT) + - zoc2) * zoz) >> Z_SHIFT) + zoc1) * zoz) >> Z_SHIFT) + zoc0; + zoc0 = Z_RSHIFT((0x1ac2260dLL * zoe1) + (0x0526cdcaLL * zoe2) + + (0x00170c29LL * zoe3), 30); + zoc1 = Z_RSHIFT((0x14f8a49aLL * zoo1) + (0x0d6d1109LL * zoo2) + + (0x008cd4dcLL * zoo3), 30); + zoc2 = Z_RSHIFT((-0x0d3e94a4LL * zoe1) + (0x0bddded4LL * zoe2) + + (0x0160b5d0LL * zoe3), 30); + zoc3 = Z_RSHIFT((-0x0de10cc4LL * zoo1) + (0x019b2a7dLL * zoo2) + + (0x01cfe914LL * zoo3), 30); + zoc4 = Z_RSHIFT((0x02aa12d7LL * zoe1) + (-0x03ff1bb3LL * zoe2) + + (0x015508ddLL * zoe3), 30); + zoc5 = Z_RSHIFT((0x051d29e5LL * zoo1) + (-0x028e7647LL * zoo2) + + (0x0082d81aLL * zoo3), 30); + + coeff = Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT( + (int64_t)zoc5 * zoz, Z_SHIFT) + + zoc4) * zoz, Z_SHIFT) + zoc3) * zoz, Z_SHIFT) + + zoc2) * zoz, Z_SHIFT) + zoc1) * zoz, Z_SHIFT) + zoc0; #elif defined(Z_COEFF_INTERP_OPT8X) int32_t zoz, zoe1, zoe2, zoe3, zoo1, zoo2, zoo3; int32_t zoc0, zoc1, zoc2, zoc3, zoc4, zoc5; @@ -940,22 +942,23 @@ z_coeff_interpolate(int32_t z, int32_t * zoo2 = z_coeff[2] - z_coeff[-1]; zoo3 = z_coeff[3] - z_coeff[-2]; - zoc0 = ((0x1aa9b47dLL * zoe1) + (0x053d9944LL * zoe2) + - (0x0018b23fLL * zoe3)) >> 30; - zoc1 = ((0x14a104d1LL * zoo1) + (0x0d7d2504LL * zoo2) + - (0x0094b599LL * zoo3)) >> 30; - zoc2 = ((-0x0d22530bLL * zoe1) + (0x0bb37a2cLL * zoe2) + - (0x016ed8e0LL * zoe3)) >> 30; - zoc3 = ((-0x0d744b1cLL * zoo1) + (0x01649591LL * zoo2) + - (0x01dae93aLL * zoo3)) >> 30; - zoc4 = ((0x02a7ee1bLL * zoe1) + (-0x03fbdb24LL * zoe2) + - (0x0153ed07LL * zoe3)) >> 30; - zoc5 = ((0x04cf9b6cLL * zoo1) + (-0x0266b378LL * zoo2) + - (0x007a7c26LL * zoo3)) >> 30; - - coeff = (((((((((((((((int64_t)zoc5 * zoz) >> Z_SHIFT) + - zoc4) * zoz) >> Z_SHIFT) + zoc3) * zoz) >> Z_SHIFT) + - zoc2) * zoz) >> Z_SHIFT) + zoc1) * zoz) >> Z_SHIFT) + zoc0; + zoc0 = Z_RSHIFT((0x1aa9b47dLL * zoe1) + (0x053d9944LL * zoe2) + + (0x0018b23fLL * zoe3), 30); + zoc1 = Z_RSHIFT((0x14a104d1LL * zoo1) + (0x0d7d2504LL * zoo2) + + (0x0094b599LL * zoo3), 30); + zoc2 = Z_RSHIFT((-0x0d22530bLL * zoe1) + (0x0bb37a2cLL * zoe2) + + (0x016ed8e0LL * zoe3), 30); + zoc3 = Z_RSHIFT((-0x0d744b1cLL * zoo1) + (0x01649591LL * zoo2) + + (0x01dae93aLL * zoo3), 30); + zoc4 = Z_RSHIFT((0x02a7ee1bLL * zoe1) + (-0x03fbdb24LL * zoe2) + + (0x0153ed07LL * zoe3), 30); + zoc5 = Z_RSHIFT((0x04cf9b6cLL * zoo1) + (-0x0266b378LL * zoo2) + + (0x007a7c26LL * zoo3), 30); + + coeff = Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT( + (int64_t)zoc5 * zoz, Z_SHIFT) + + zoc4) * zoz, Z_SHIFT) + zoc3) * zoz, Z_SHIFT) + + zoc2) * zoz, Z_SHIFT) + zoc1) * zoz, Z_SHIFT) + zoc0; #elif defined(Z_COEFF_INTERP_OPT4X) int32_t zoz, zoe1, zoe2, zoe3, zoo1, zoo2, zoo3; int32_t zoc0, zoc1, zoc2, zoc3, zoc4, zoc5; @@ -969,22 +972,23 @@ z_coeff_interpolate(int32_t z, int32_t * zoo2 = z_coeff[2] - z_coeff[-1]; zoo3 = z_coeff[3] - z_coeff[-2]; - zoc0 = ((0x1a8eda43LL * zoe1) + (0x0556ee38LL * zoe2) + - (0x001a3784LL * zoe3)) >> 30; - zoc1 = ((0x143d863eLL * zoo1) + (0x0d910e36LL * zoo2) + - (0x009ca889LL * zoo3)) >> 30; - zoc2 = ((-0x0d026821LL * zoe1) + (0x0b837773LL * zoe2) + - (0x017ef0c6LL * zoe3)) >> 30; - zoc3 = ((-0x0cef1502LL * zoo1) + (0x01207a8eLL * zoo2) + - (0x01e936dbLL * zoo3)) >> 30; - zoc4 = ((0x029fe643LL * zoe1) + (-0x03ef3fc8LL * zoe2) + - (0x014f5923LL * zoe3)) >> 30; - zoc5 = ((0x043a9d08LL * zoo1) + (-0x02154febLL * zoo2) + - (0x00670dbdLL * zoo3)) >> 30; - - coeff = (((((((((((((((int64_t)zoc5 * zoz) >> Z_SHIFT) + - zoc4) * zoz) >> Z_SHIFT) + zoc3) * zoz) >> Z_SHIFT) + - zoc2) * zoz) >> Z_SHIFT) + zoc1) * zoz) >> Z_SHIFT) + zoc0; + zoc0 = Z_RSHIFT((0x1a8eda43LL * zoe1) + (0x0556ee38LL * zoe2) + + (0x001a3784LL * zoe3), 30); + zoc1 = Z_RSHIFT((0x143d863eLL * zoo1) + (0x0d910e36LL * zoo2) + + (0x009ca889LL * zoo3), 30); + zoc2 = Z_RSHIFT((-0x0d026821LL * zoe1) + (0x0b837773LL * zoe2) + + (0x017ef0c6LL * zoe3), 30); + zoc3 = Z_RSHIFT((-0x0cef1502LL * zoo1) + (0x01207a8eLL * zoo2) + + (0x01e936dbLL * zoo3), 30); + zoc4 = Z_RSHIFT((0x029fe643LL * zoe1) + (-0x03ef3fc8LL * zoe2) + + (0x014f5923LL * zoe3), 30); + zoc5 = Z_RSHIFT((0x043a9d08LL * zoo1) + (-0x02154febLL * zoo2) + + (0x00670dbdLL * zoo3), 30); + + coeff = Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT( + (int64_t)zoc5 * zoz, Z_SHIFT) + + zoc4) * zoz, Z_SHIFT) + zoc3) * zoz, Z_SHIFT) + + zoc2) * zoz, Z_SHIFT) + zoc1) * zoz, Z_SHIFT) + zoc0; #elif defined(Z_COEFF_INTERP_OPT2X) int32_t zoz, zoe1, zoe2, zoe3, zoo1, zoo2, zoo3; int32_t zoc0, zoc1, zoc2, zoc3, zoc4, zoc5; @@ -998,22 +1002,23 @@ z_coeff_interpolate(int32_t z, int32_t * zoo2 = z_coeff[2] - z_coeff[-1]; zoo3 = z_coeff[3] - z_coeff[-2]; - zoc0 = ((0x19edb6fdLL * zoe1) + (0x05ebd062LL * zoe2) + - (0x00267881LL * zoe3)) >> 30; - zoc1 = ((0x1223af76LL * zoo1) + (0x0de3dd6bLL * zoo2) + - (0x00d683cdLL * zoo3)) >> 30; - zoc2 = ((-0x0c3ee068LL * zoe1) + (0x0a5c3769LL * zoe2) + - (0x01e2aceaLL * zoe3)) >> 30; - zoc3 = ((-0x0a8ab614LL * zoo1) + (-0x0019522eLL * zoo2) + - (0x022cefc7LL * zoo3)) >> 30; - zoc4 = ((0x0276187dLL * zoe1) + (-0x03a801e8LL * zoe2) + - (0x0131d935LL * zoe3)) >> 30; - zoc5 = ((0x02c373f5LL * zoo1) + (-0x01275f83LL * zoo2) + - (0x0018ee79LL * zoo3)) >> 30; - - coeff = (((((((((((((((int64_t)zoc5 * zoz) >> Z_SHIFT) + - zoc4) * zoz) >> Z_SHIFT) + zoc3) * zoz) >> Z_SHIFT) + - zoc2) * zoz) >> Z_SHIFT) + zoc1) * zoz) >> Z_SHIFT) + zoc0; + zoc0 = Z_RSHIFT((0x19edb6fdLL * zoe1) + (0x05ebd062LL * zoe2) + + (0x00267881LL * zoe3), 30); + zoc1 = Z_RSHIFT((0x1223af76LL * zoo1) + (0x0de3dd6bLL * zoo2) + + (0x00d683cdLL * zoo3), 30); + zoc2 = Z_RSHIFT((-0x0c3ee068LL * zoe1) + (0x0a5c3769LL * zoe2) + + (0x01e2aceaLL * zoe3), 30); + zoc3 = Z_RSHIFT((-0x0a8ab614LL * zoo1) + (-0x0019522eLL * zoo2) + + (0x022cefc7LL * zoo3), 30); + zoc4 = Z_RSHIFT((0x0276187dLL * zoe1) + (-0x03a801e8LL * zoe2) + + (0x0131d935LL * zoe3), 30); + zoc5 = Z_RSHIFT((0x02c373f5LL * zoo1) + (-0x01275f83LL * zoo2) + + (0x0018ee79LL * zoo3), 30); + + coeff = Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT((Z_RSHIFT( + (int64_t)zoc5 * zoz, Z_SHIFT) + + zoc4) * zoz, Z_SHIFT) + zoc3) * zoz, Z_SHIFT) + + zoc2) * zoz, Z_SHIFT) + zoc1) * zoz, Z_SHIFT) + zoc0; #else #error "Interpolation type screwed!" #endif From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 19:18:32 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2E8111065677; Tue, 14 Jul 2009 19:18:32 +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 1CB5C8FC1F; Tue, 14 Jul 2009 19:18:32 +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 n6EJIWmH068749; Tue, 14 Jul 2009 19:18:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EJIVh2068747; Tue, 14 Jul 2009 19:18:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907141918.n6EJIVh2068747@svn.freebsd.org> From: Alexander Motin Date: Tue, 14 Jul 2009 19:18: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: r195690 - head/sys/dev/sound/pci/hda X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 19:18:32 -0000 Author: mav Date: Tue Jul 14 19:18:31 2009 New Revision: 195690 URL: http://svn.freebsd.org/changeset/base/195690 Log: Disable MSI by default for nVidia MCP55 chipset. It is reported to be broken in the same way as MCP51. PR: kern/136429 Approved by: re (kib) 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 Tue Jul 14 18:53:34 2009 (r195689) +++ head/sys/dev/sound/pci/hda/hdac.c Tue Jul 14 19:18:31 2009 (r195690) @@ -490,7 +490,7 @@ static const struct { { HDA_INTEL_PCH, "Intel PCH", 0 }, { HDA_INTEL_SCH, "Intel SCH", 0 }, { HDA_NVIDIA_MCP51, "NVidia MCP51", HDAC_NO_MSI }, - { HDA_NVIDIA_MCP55, "NVidia MCP55", 0 }, + { HDA_NVIDIA_MCP55, "NVidia MCP55", HDAC_NO_MSI }, { HDA_NVIDIA_MCP61_1, "NVidia MCP61", 0 }, { HDA_NVIDIA_MCP61_2, "NVidia MCP61", 0 }, { HDA_NVIDIA_MCP65_1, "NVidia MCP65", 0 }, From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 19:32:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 36ED9106566C; Tue, 14 Jul 2009 19:32:38 +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 0B1058FC12; Tue, 14 Jul 2009 19:32:38 +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 n6EJWagd069025; Tue, 14 Jul 2009 19:32:36 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EJWadf069023; Tue, 14 Jul 2009 19:32:36 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200907141932.n6EJWadf069023@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 14 Jul 2009 19:32: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: r195691 - head/sys/dev/e1000 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 19:32:38 -0000 Author: bz Date: Tue Jul 14 19:32:36 2009 New Revision: 195691 URL: http://svn.freebsd.org/changeset/base/195691 Log: Re-add opt_inet.h, as we did in r193862 and lost yet again. Approved by: re (kib) Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Tue Jul 14 19:18:31 2009 (r195690) +++ head/sys/dev/e1000/if_igb.c Tue Jul 14 19:32:36 2009 (r195691) @@ -35,6 +35,7 @@ #ifdef HAVE_KERNEL_OPTION_HEADERS #include "opt_device_polling.h" +#include "opt_inet.h" #endif #include From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 19:37:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ADCE31065670; Tue, 14 Jul 2009 19:37:53 +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 9BEA68FC12; Tue, 14 Jul 2009 19:37:53 +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 n6EJbrtt069163; Tue, 14 Jul 2009 19:37:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EJbrnI069161; Tue, 14 Jul 2009 19:37:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200907141937.n6EJbrnI069161@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 14 Jul 2009 19:37: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: r195692 - head/lib/libc/posix1e X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 19:37:54 -0000 Author: trasz Date: Tue Jul 14 19:37:53 2009 New Revision: 195692 URL: http://svn.freebsd.org/changeset/base/195692 Log: Add missing MLINKS for acl_{get,set}_link_fd(3). Approved by: re (kib) Modified: head/lib/libc/posix1e/Makefile.inc Modified: head/lib/libc/posix1e/Makefile.inc ============================================================================== --- head/lib/libc/posix1e/Makefile.inc Tue Jul 14 19:32:36 2009 (r195691) +++ head/lib/libc/posix1e/Makefile.inc Tue Jul 14 19:37:53 2009 (r195692) @@ -93,9 +93,11 @@ MLINKS+=acl_create_entry.3 acl_create_en acl_get.3 acl_get_file.3 \ acl_get.3 acl_get_fd.3 \ acl_get.3 acl_get_fd_np.3 \ + acl_get.3 acl_get_link_np.3 \ acl_set.3 acl_set_file.3 \ acl_set.3 acl_set_fd.3 \ acl_set.3 acl_set_fd_np.3 \ + acl_set.3 acl_set_link_np.3 \ acl_to_text.3 acl_to_text_np.3 \ acl_valid.3 acl_valid_file_np.3 \ acl_valid.3 acl_valid_fd_np.3 \ From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 19:45:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FD3B1065670; Tue, 14 Jul 2009 19:45:37 +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 1DFC38FC1E; Tue, 14 Jul 2009 19:45:37 +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 n6EJjbfh069359; Tue, 14 Jul 2009 19:45:37 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EJjaMC069356; Tue, 14 Jul 2009 19:45:36 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200907141945.n6EJjaMC069356@svn.freebsd.org> From: John Baldwin Date: Tue, 14 Jul 2009 19:45: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: r195693 - in head: lib/libc/sys sys/vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 19:45:37 -0000 Author: jhb Date: Tue Jul 14 19:45:36 2009 New Revision: 195693 URL: http://svn.freebsd.org/changeset/base/195693 Log: - Change mmap() to fail requests with EINVAL that pass a length of 0. This behavior is mandated by POSIX. - Do not fail requests that pass a length greater than SSIZE_MAX (such as > 2GB on 32-bit platforms). The 'len' parameter is actually an unsigned 'size_t' so negative values don't really make sense. Submitted by: Alexander Best alexbestms at math.uni-muenster.de Reviewed by: alc Approved by: re (kib) MFC after: 1 week Modified: head/lib/libc/sys/mmap.2 head/sys/vm/vm_mmap.c Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Tue Jul 14 19:37:53 2009 (r195692) +++ head/lib/libc/sys/mmap.2 Tue Jul 14 19:45:36 2009 (r195693) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd October 24, 2008 +.Dd July 14, 2009 .Dt MMAP 2 .Os .Sh NAME @@ -306,7 +306,7 @@ resides out of the valid address space f The .Fa len argument -was negative. +was equal to zero. .It Bq Er EINVAL .Dv MAP_ANON was specified and the Modified: head/sys/vm/vm_mmap.c ============================================================================== --- head/sys/vm/vm_mmap.c Tue Jul 14 19:37:53 2009 (r195692) +++ head/sys/vm/vm_mmap.c Tue Jul 14 19:45:36 2009 (r195693) @@ -229,7 +229,7 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ - if ((ssize_t) uap->len < 0 || + if (uap->len == 0 || ((flags & MAP_ANON) && uap->fd != -1)) return (EINVAL); From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 21:19:13 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DE7A61065675; Tue, 14 Jul 2009 21:19:13 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C52798FC18; Tue, 14 Jul 2009 21:19:13 +0000 (UTC) (envelope-from kan@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 n6ELJDgV071511; Tue, 14 Jul 2009 21:19:13 GMT (envelope-from kan@svn.freebsd.org) Received: (from kan@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6ELJDG1071501; Tue, 14 Jul 2009 21:19:13 GMT (envelope-from kan@svn.freebsd.org) Message-Id: <200907142119.n6ELJDG1071501@svn.freebsd.org> From: Alexander Kabaev Date: Tue, 14 Jul 2009 21:19: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: r195697 - in head: . contrib/gcc/config gnu/lib/libgcc gnu/lib/libssp/libssp_nonshared lib/libc lib/libc/sys libexec/rtld-elf share/mk X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 21:19:14 -0000 Author: kan Date: Tue Jul 14 21:19:13 2009 New Revision: 195697 URL: http://svn.freebsd.org/changeset/base/195697 Log: Second attempt at eliminating .text relocations in shared libraries compiled with stack protector. Use libssp_nonshared library to pull __stack_chk_fail_local symbol into each library that needs it instead of pulling it from libc. GCC generates local calls to this function which result in absolute relocations put into position-independent code segment, making dynamic loader do extra work every time given shared library is being relocated and making affected text pages non-shareable. Reviewed by: kib Approved by: re (kib) Modified: head/Makefile.inc1 head/contrib/gcc/config/freebsd-spec.h head/gnu/lib/libgcc/Makefile head/gnu/lib/libssp/libssp_nonshared/Makefile head/lib/libc/Makefile head/lib/libc/sys/Symbol.map head/lib/libc/sys/stack_protector.c head/libexec/rtld-elf/Makefile head/share/mk/bsd.lib.mk Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Tue Jul 14 20:46:19 2009 (r195696) +++ head/Makefile.inc1 Tue Jul 14 21:19:13 2009 (r195697) @@ -1069,7 +1069,7 @@ libraries: # # static libgcc.a prerequisite for shared libc # -_prereq_libs= gnu/lib/libgcc +_prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc # These dependencies are not automatically generated: # Modified: head/contrib/gcc/config/freebsd-spec.h ============================================================================== --- head/contrib/gcc/config/freebsd-spec.h Tue Jul 14 20:46:19 2009 (r195696) +++ head/contrib/gcc/config/freebsd-spec.h Tue Jul 14 21:19:13 2009 (r195697) @@ -168,6 +168,7 @@ is built with the --enable-threads confi %{pg: %{pthread:-lpthread_p} -lc_p}} \ %{shared: \ %{pthread:-lpthread} -lc} \ + %{fstack-protector|fstack-protector-all:-lssp_nonshared} \ " #endif #endif Modified: head/gnu/lib/libgcc/Makefile ============================================================================== --- head/gnu/lib/libgcc/Makefile Tue Jul 14 20:46:19 2009 (r195696) +++ head/gnu/lib/libgcc/Makefile Tue Jul 14 21:19:13 2009 (r195697) @@ -7,6 +7,12 @@ SHLIB_NAME= libgcc_s.so.1 SHLIBDIR?= /lib .include +# +# libgcc is linked in last and thus cannot depend on ssp symbols coming +# from earlier libraries. Disable stack protection for this library. +# +MK_SSP= no + .include "${.CURDIR}/../../usr.bin/cc/Makefile.tgt" .PATH: ${GCCDIR}/config/${GCC_CPU} ${GCCDIR}/config ${GCCDIR} Modified: head/gnu/lib/libssp/libssp_nonshared/Makefile ============================================================================== --- head/gnu/lib/libssp/libssp_nonshared/Makefile Tue Jul 14 20:46:19 2009 (r195696) +++ head/gnu/lib/libssp/libssp_nonshared/Makefile Tue Jul 14 21:19:13 2009 (r195697) @@ -13,6 +13,6 @@ SRCS= ssp-local.c CFLAGS+= -DHAVE_CONFIG_H CFLAGS+= -I${.CURDIR}/.. -I${GCCLIB}/libssp -I${GCCLIB}/include -CFLAGS+= -fPIC -DPIC +CFLAGS+= -fPIC -DPIC -fvisibility=hidden .include Modified: head/lib/libc/Makefile ============================================================================== --- head/lib/libc/Makefile Tue Jul 14 20:46:19 2009 (r195696) +++ head/lib/libc/Makefile Tue Jul 14 21:19:13 2009 (r195697) @@ -26,7 +26,7 @@ PRECIOUSLIB= # DPADD+= ${LIBGCC} LDFLAGS+= -nodefaultlibs -LDADD+= -lgcc +LDADD+= -lgcc -lssp_nonshared # Define (empty) variables so that make doesn't give substitution # errors if the included makefiles don't change these: Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Tue Jul 14 20:46:19 2009 (r195696) +++ head/lib/libc/sys/Symbol.map Tue Jul 14 21:19:13 2009 (r195697) @@ -282,7 +282,6 @@ FBSD_1.0 { socket; socketpair; __stack_chk_fail; - __stack_chk_fail_local; __stack_chk_guard; stat; statfs; Modified: head/lib/libc/sys/stack_protector.c ============================================================================== --- head/lib/libc/sys/stack_protector.c Tue Jul 14 20:46:19 2009 (r195696) +++ head/lib/libc/sys/stack_protector.c Tue Jul 14 21:19:13 2009 (r195697) @@ -47,7 +47,6 @@ static void __guard_setup(void) __attrib static void __fail(const char *); void __stack_chk_fail(void); void __chk_fail(void); -void __stack_chk_fail_local(void); /*LINTED used*/ static void @@ -109,8 +108,4 @@ __chk_fail(void) __fail("buffer overflow detected; terminated"); } -void -__stack_chk_fail_local(void) -{ - __stack_chk_fail(); -} +__sym_compat(__stack_chk_fail_local, __stack_chk_fail, FBSD_1.0); Modified: head/libexec/rtld-elf/Makefile ============================================================================== --- head/libexec/rtld-elf/Makefile Tue Jul 14 20:46:19 2009 (r195696) +++ head/libexec/rtld-elf/Makefile Tue Jul 14 21:19:13 2009 (r195697) @@ -22,7 +22,7 @@ MLINKS= rtld.1 ld-elf.so.1.1 \ CFLAGS+= -fpic -DPIC LDFLAGS+= -shared -Wl,-Bsymbolic DPADD= ${LIBC_PIC} -LDADD= -lc_pic +LDADD= -lc_pic -lssp_nonshared .if ${MACHINE_ARCH} != "ia64" .if ${MK_SYMVER} == "yes" Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Tue Jul 14 20:46:19 2009 (r195696) +++ head/share/mk/bsd.lib.mk Tue Jul 14 21:19:13 2009 (r195697) @@ -200,11 +200,11 @@ ${SHLIB_NAME}: ${SOBJS} @ln -fs ${.TARGET} ${SHLIB_LINK} .endif .if !defined(NM) - @${CC} ${LDFLAGS} -shared -Wl,-x \ + @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `lorder ${SOBJS} | tsort -q` ${LDADD} .else - @${CC} ${LDFLAGS} -shared -Wl,-x \ + @${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \ -o ${.TARGET} -Wl,-soname,${SONAME} \ `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD} .endif From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 22:48:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 355F81065674; Tue, 14 Jul 2009 22:48:31 +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 1E4078FC19; Tue, 14 Jul 2009 22:48:31 +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 n6EMmVLK073487; Tue, 14 Jul 2009 22:48:31 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EMmUVd073453; Tue, 14 Jul 2009 22:48:30 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200907142248.n6EMmUVd073453@svn.freebsd.org> From: Robert Watson Date: Tue, 14 Jul 2009 22:48: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: r195699 - in head: . sys/compat/linprocfs sys/compat/linux sys/compat/svr4 sys/conf sys/contrib/altq/altq sys/contrib/ipfilter/netinet sys/contrib/pf/net sys/contrib/rdma sys/ddb sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:48:31 -0000 Author: rwatson Date: Tue Jul 14 22:48:30 2009 New Revision: 195699 URL: http://svn.freebsd.org/changeset/base/195699 Log: Build on Jeff Roberson's linker-set based dynamic per-CPU allocator (DPCPU), as suggested by Peter Wemm, and implement a new per-virtual network stack memory allocator. Modify vnet to use the allocator instead of monolithic global container structures (vinet, ...). This change solves many binary compatibility problems associated with VIMAGE, and restores ELF symbols for virtualized global variables. Each virtualized global variable exists as a "reference copy", and also once per virtual network stack. Virtualized global variables are tagged at compile-time, placing the in a special linker set, which is loaded into a contiguous region of kernel memory. Virtualized global variables in the base kernel are linked as normal, but those in modules are copied and relocated to a reserved portion of the kernel's vnet region with the help of a the kernel linker. Virtualized global variables exist in per-vnet memory set up when the network stack instance is created, and are initialized statically from the reference copy. Run-time access occurs via an accessor macro, which converts from the current vnet and requested symbol to a per-vnet address. When "options VIMAGE" is not compiled into the kernel, normal global ELF symbols will be used instead and indirection is avoided. This change restores static initialization for network stack global variables, restores support for non-global symbols and types, eliminates the need for many subsystem constructors, eliminates large per-subsystem structures that caused many binary compatibility issues both for monitoring applications (netstat) and kernel modules, removes the per-function INIT_VNET_*() macros throughout the stack, eliminates the need for vnet_symmap ksym(2) munging, and eliminates duplicate definitions of virtualized globals under VIMAGE_GLOBALS. Bump __FreeBSD_version and update UPDATING. Portions submitted by: bz Reviewed by: bz, zec Discussed with: gnn, jamie, jeff, jhb, julian, sam Suggested by: peter Approved by: re (kensmith) Added: head/sys/net/vnet.c (contents, props changed) Deleted: head/sys/netinet/vinet.h head/sys/netinet6/vinet6.h head/sys/netipsec/vipsec.h Modified: head/ObsoleteFiles.inc head/UPDATING head/sys/compat/linprocfs/linprocfs.c head/sys/compat/linux/linux_ioctl.c head/sys/compat/linux/linux_socket.c head/sys/compat/svr4/svr4_sockio.c head/sys/conf/files head/sys/conf/options head/sys/contrib/altq/altq/altq_subr.c head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c head/sys/contrib/pf/net/pf.c head/sys/contrib/pf/net/pf_if.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pf_subr.c head/sys/contrib/pf/net/pfvar.h head/sys/contrib/rdma/rdma_cma.c head/sys/ddb/db_expr.c head/sys/ddb/db_sym.c head/sys/ddb/db_variables.c head/sys/ddb/db_variables.h head/sys/ddb/ddb.h head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c head/sys/fs/nfs/nfsport.h head/sys/fs/nfsclient/nfs_clvnops.c head/sys/fs/nfsserver/nfs_nfsdport.c head/sys/kern/kern_linker.c head/sys/kern/kern_poll.c head/sys/kern/kern_sysctl.c head/sys/kern/kern_uuid.c head/sys/kern/kern_vimage.c head/sys/kern/link_elf.c head/sys/kern/link_elf_obj.c head/sys/kern/uipc_domain.c head/sys/net/bridgestp.c head/sys/net/flowtable.c head/sys/net/flowtable.h head/sys/net/if.c head/sys/net/if_bridge.c head/sys/net/if_clone.c head/sys/net/if_ef.c head/sys/net/if_enc.c head/sys/net/if_ethersubr.c head/sys/net/if_faith.c head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/net/if_gre.c head/sys/net/if_loop.c head/sys/net/if_mib.c head/sys/net/if_spppsubr.c head/sys/net/if_stf.c head/sys/net/if_var.h head/sys/net/if_vlan.c head/sys/net/raw_cb.c head/sys/net/raw_cb.h head/sys/net/raw_usrreq.c head/sys/net/route.c head/sys/net/rtsock.c head/sys/net/vnet.h head/sys/net80211/ieee80211_ddb.c head/sys/netgraph/atm/ng_atm.c head/sys/netgraph/netgraph.h head/sys/netgraph/ng_base.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_ether.c head/sys/netgraph/ng_gif.c head/sys/netgraph/ng_iface.c head/sys/netinet/icmp6.h head/sys/netinet/icmp_var.h head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_gif.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/in_rmx.c head/sys/netinet/in_var.h head/sys/netinet/ip_carp.c head/sys/netinet/ip_divert.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_fw.h head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_mroute.c head/sys/netinet/ip_options.c head/sys/netinet/ip_output.c head/sys/netinet/ip_var.h head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/ipfw/ip_fw_pfil.c head/sys/netinet/raw_ip.c head/sys/netinet/sctp_os_bsd.h head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_input.c head/sys/netinet/tcp_offload.c head/sys/netinet/tcp_output.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timer.c head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_usrreq.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/dest6.c head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6.c head/sys/netinet6/in6_gif.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_mcast.c head/sys/netinet6/in6_pcb.c head/sys/netinet6/in6_proto.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/in6_src.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_forward.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_output.c head/sys/netinet6/ip6_var.h head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/raw_ip6.h head/sys/netinet6/route6.c head/sys/netinet6/scope6.c head/sys/netinet6/tcp6_var.h head/sys/netinet6/udp6_usrreq.c head/sys/netipsec/ah_var.h head/sys/netipsec/esp_var.h head/sys/netipsec/ipcomp_var.h head/sys/netipsec/ipip_var.h head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec6.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_mbuf.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/key.c head/sys/netipsec/key_debug.c head/sys/netipsec/key_debug.h head/sys/netipsec/keysock.c head/sys/netipsec/keysock.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c head/sys/netipsec/xform_ipip.c head/sys/netipsec/xform_tcp.c head/sys/nfsclient/bootp_subr.c head/sys/nfsclient/nfs_diskless.c head/sys/nfsclient/nfs_vnops.c head/sys/sys/param.h head/sys/sys/pcpu.h head/sys/sys/sysctl.h head/sys/sys/vimage.h Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 14 22:16:32 2009 (r195698) +++ head/ObsoleteFiles.inc Tue Jul 14 22:48:30 2009 (r195699) @@ -14,6 +14,10 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090713: vimage container structs removed. +OLD_FILES+=usr/include/netinet/vinet.h +OLD_FILES+=usr/include/netinet6/vinet6.h +OLD_FILES+=usr/include/netipsec/vipsec.h # 20090709: msgctl.3 msgget.3 msgrcv.3 msgsnd.3 manual pages moved OLD_FILES+=usr/share/man/man3/msgctl.3.gz OLD_FILES+=usr/share/man/man3/msgget.3.gz Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jul 14 22:16:32 2009 (r195698) +++ head/UPDATING Tue Jul 14 22:48:30 2009 (r195699) @@ -22,6 +22,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090714: + Due to changes in the implementation of virtual network stack + support, all network-related kernel modules must be recompiled. + As this change breaks the ABI, bump __FreeBSD_version to 800104. + 20090713: The TOE interface to the TCP syncache has been modified to remove struct tcpopt () from the ABI of the network stack. The Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/compat/linprocfs/linprocfs.c Tue Jul 14 22:48:30 2009 (r195699) @@ -1078,7 +1078,6 @@ linprocfs_doprocmaps(PFS_FILL_ARGS) static int linprocfs_donetdev(PFS_FILL_ARGS) { - INIT_VNET_NET(TD_TO_VNET(td)); char ifname[16]; /* XXX LINUX_IFNAMSIZ */ struct ifnet *ifp; Modified: head/sys/compat/linux/linux_ioctl.c ============================================================================== --- head/sys/compat/linux/linux_ioctl.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/compat/linux/linux_ioctl.c Tue Jul 14 22:48:30 2009 (r195699) @@ -2059,7 +2059,6 @@ linux_ioctl_console(struct thread *td, s int linux_ifname(struct ifnet *ifp, char *buffer, size_t buflen) { - INIT_VNET_NET(ifp->if_vnet); struct ifnet *ifscan; int ethno; @@ -2093,7 +2092,6 @@ linux_ifname(struct ifnet *ifp, char *bu static struct ifnet * ifname_linux_to_bsd(struct thread *td, const char *lxname, char *bsdname) { - INIT_VNET_NET(TD_TO_VNET(td)); struct ifnet *ifp; int len, unit; char *ep; @@ -2134,7 +2132,6 @@ ifname_linux_to_bsd(struct thread *td, c static int linux_ifconf(struct thread *td, struct ifconf *uifc) { - INIT_VNET_NET(TD_TO_VNET(td)); #ifdef COMPAT_LINUX32 struct l_ifconf ifc; #else Modified: head/sys/compat/linux/linux_socket.c ============================================================================== --- head/sys/compat/linux/linux_socket.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/compat/linux/linux_socket.c Tue Jul 14 22:48:30 2009 (r195699) @@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #endif #ifdef COMPAT_LINUX32 @@ -599,11 +598,6 @@ struct linux_socket_args { static int linux_socket(struct thread *td, struct linux_socket_args *args) { -#ifdef INET6 -#ifndef KLD_MODULE - INIT_VNET_INET6(curvnet); -#endif -#endif struct socket_args /* { int domain; int type; Modified: head/sys/compat/svr4/svr4_sockio.c ============================================================================== --- head/sys/compat/svr4/svr4_sockio.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/compat/svr4/svr4_sockio.c Tue Jul 14 22:48:30 2009 (r195699) @@ -89,7 +89,6 @@ svr4_sock_ioctl(fp, td, retval, fd, cmd, switch (cmd) { case SVR4_SIOCGIFNUM: { - INIT_VNET_NET(curvnet); struct ifnet *ifp; struct ifaddr *ifa; int ifnum = 0; Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/conf/files Tue Jul 14 22:48:30 2009 (r195699) @@ -1989,7 +1989,7 @@ kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_umtx.c standard kern/kern_uuid.c standard -kern/kern_vimage.c standard +kern/kern_vimage.c optional vimage kern/kern_xxx.c standard kern/link_elf.c standard kern/linker_if.m standard @@ -2231,6 +2231,7 @@ net/route.c standard net/rtsock.c standard net/slcompress.c optional netgraph_vjc | sppp | \ netgraph_sppp +net/vnet.c optional vimage net/zlib.c optional crypto | geom_uzip | ipsec | \ mxge | netgraph_deflate | \ ddb_ctf Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/conf/options Tue Jul 14 22:48:30 2009 (r195699) @@ -823,7 +823,6 @@ TDMA_TXRATE_11NG_DEFAULT opt_tdma.h # Virtualize the network stack VIMAGE opt_global.h -VIMAGE_GLOBALS opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h Modified: head/sys/contrib/altq/altq/altq_subr.c ============================================================================== --- head/sys/contrib/altq/altq/altq_subr.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/altq/altq/altq_subr.c Tue Jul 14 22:48:30 2009 (r195699) @@ -469,7 +469,6 @@ tbr_timeout(arg) VNET_LIST_RLOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); - INIT_VNET_NET(vnet_iter); #endif for (ifp = TAILQ_FIRST(&V_ifnet); ifp; ifp = TAILQ_NEXT(ifp, if_list)) { Modified: head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/ipfilter/netinet/ip_fil_freebsd.c Tue Jul 14 22:48:30 2009 (r195699) @@ -64,6 +64,7 @@ static const char rcsid[] = "@(#)$Id: ip #endif #if __FreeBSD_version >= 800044 # include +# include #else #define V_path_mtu_discovery path_mtu_discovery #define V_ipforwarding ipforwarding @@ -92,9 +93,6 @@ static const char rcsid[] = "@(#)$Id: ip #include #include #include -#if defined(__FreeBSD_version) && (__FreeBSD_version >= 800056) -# include -#endif #ifndef _KERNEL # include "netinet/ipf.h" #endif @@ -213,7 +211,6 @@ char *s; int ipfattach() { - INIT_VNET_INET(curvnet); #ifdef USE_SPL int s; #endif @@ -265,7 +262,6 @@ int ipfattach() */ int ipfdetach() { - INIT_VNET_INET(curvnet); #ifdef USE_SPL int s; #endif @@ -654,7 +650,6 @@ static int fr_send_ip(fin, m, mpp) fr_info_t *fin; mb_t *m, **mpp; { - INIT_VNET_INET(curvnet); fr_info_t fnew; ip_t *ip, *oip; int hlen; Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/pf/net/pf.c Tue Jul 14 22:48:30 2009 (r195699) @@ -119,9 +119,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef __FreeBSD__ -#include -#endif #ifndef __FreeBSD__ #include @@ -141,7 +138,6 @@ __FBSDID("$FreeBSD$"); #ifdef __FreeBSD__ #include #include -#include #endif #endif /* INET6 */ @@ -1762,7 +1758,6 @@ pf_send_tcp(const struct pf_rule *r, sa_ u_int8_t flags, u_int16_t win, u_int16_t mss, u_int8_t ttl, int tag, u_int16_t rtag, struct ether_header *eh, struct ifnet *ifp) { - INIT_VNET_INET(curvnet); struct mbuf *m; int len, tlen; #ifdef INET @@ -2926,7 +2921,6 @@ pf_socket_lookup(int direction, struct p pf_socket_lookup(int direction, struct pf_pdesc *pd) #endif { - INIT_VNET_INET(curvnet); struct pf_addr *saddr, *daddr; u_int16_t sport, dport; #ifdef __FreeBSD__ @@ -3096,7 +3090,6 @@ pf_get_wscale(struct mbuf *m, int off, u u_int16_t pf_get_mss(struct mbuf *m, int off, u_int16_t th_off, sa_family_t af) { - INIT_VNET_INET(curvnet); int hlen; u_int8_t hdr[60]; u_int8_t *opt, optlen; @@ -3136,7 +3129,6 @@ u_int16_t pf_calc_mss(struct pf_addr *addr, sa_family_t af, u_int16_t offer) { #ifdef INET - INIT_VNET_INET(curvnet); struct sockaddr_in *dst; struct route ro; #endif /* INET */ @@ -3239,7 +3231,6 @@ pf_test_tcp(struct pf_rule **rm, struct struct ifqueue *ifq) #endif { - INIT_VNET_INET(curvnet); struct pf_rule *nr = NULL; struct pf_addr *saddr = pd->src, *daddr = pd->dst; struct tcphdr *th = pd->hdr.tcp; @@ -6094,7 +6085,6 @@ void pf_route(struct mbuf **m, struct pf_rule *r, int dir, struct ifnet *oifp, struct pf_state *s, struct pf_pdesc *pd) { - INIT_VNET_INET(curvnet); struct mbuf *m0, *m1; struct route iproute; struct route *ro = NULL; @@ -6633,26 +6623,22 @@ pf_check_proto_cksum(struct mbuf *m, int switch (p) { case IPPROTO_TCP: { - INIT_VNET_INET(curvnet); TCPSTAT_INC(tcps_rcvbadsum); break; } case IPPROTO_UDP: { - INIT_VNET_INET(curvnet); UDPSTAT_INC(udps_badsum); break; } case IPPROTO_ICMP: { - INIT_VNET_INET(curvnet); ICMPSTAT_INC(icps_checksum); break; } #ifdef INET6 case IPPROTO_ICMPV6: { - INIT_VNET_INET6(curvnet); ICMP6STAT_INC(icp6s_checksum); break; } Modified: head/sys/contrib/pf/net/pf_if.c ============================================================================== --- head/sys/contrib/pf/net/pf_if.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/pf/net/pf_if.c Tue Jul 14 22:48:30 2009 (r195699) @@ -115,9 +115,6 @@ void pfi_change_group_event(void * __u void pfi_detach_group_event(void * __unused, struct ifg_group *); void pfi_ifaddr_event(void * __unused, struct ifnet *); -#ifdef VIMAGE_GLOBALS -extern struct ifgrouphead ifg_head; -#endif #endif RB_PROTOTYPE(pfi_ifhead, pfi_kif, pfik_tree, pfi_if_compare); @@ -129,7 +126,6 @@ RB_GENERATE(pfi_ifhead, pfi_kif, pfik_tr void pfi_initialize(void) { - INIT_VNET_NET(curvnet); if (pfi_all != NULL) /* already initialized */ return; Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/pf/net/pf_ioctl.c Tue Jul 14 22:48:30 2009 (r195699) @@ -3703,7 +3703,6 @@ static int pf_check6_in(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - INIT_VNET_NET(curvnet); /* * IPv6 is not affected by ip_len/ip_off byte order changes. Modified: head/sys/contrib/pf/net/pf_subr.c ============================================================================== --- head/sys/contrib/pf/net/pf_subr.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/pf/net/pf_subr.c Tue Jul 14 22:48:30 2009 (r195699) @@ -65,7 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include /* Modified: head/sys/contrib/pf/net/pfvar.h ============================================================================== --- head/sys/contrib/pf/net/pfvar.h Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/pf/net/pfvar.h Tue Jul 14 22:48:30 2009 (r195699) @@ -1855,12 +1855,4 @@ int pf_osfp_match(struct pf_osfp_enlist struct pf_os_fingerprint * pf_osfp_validate(void); -/* - * Symbol translation macros - */ -#define INIT_VNET_PF(vnet) \ - INIT_FROM_VNET(vnet, VNET_MOD_PF, struct vnet_pf, vnet_pf) - -#define VNET_PF(sym) VSYM(vnet_pf, sym) - #endif /* _NET_PFVAR_H_ */ Modified: head/sys/contrib/rdma/rdma_cma.c ============================================================================== --- head/sys/contrib/rdma/rdma_cma.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/contrib/rdma/rdma_cma.c Tue Jul 14 22:48:30 2009 (r195699) @@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -1950,7 +1949,6 @@ err1: static int cma_alloc_any_port(struct kvl *ps, struct rdma_id_private *id_priv) { - INIT_VNET_INET(curvnet); struct rdma_bind_list *bind_list; int port, ret; @@ -1995,7 +1993,6 @@ err1: static int cma_use_port(struct kvl *ps, struct rdma_id_private *id_priv) { - INIT_VNET_INET(curvnet); struct rdma_id_private *cur_id; struct sockaddr_in *sin, *cur_sin; struct rdma_bind_list *bind_list; @@ -2915,7 +2912,6 @@ static void cma_remove_one(struct ib_dev static int cma_init(void) { - INIT_VNET_INET(curvnet); int ret; LIST_INIT(&listen_any_list); Modified: head/sys/ddb/db_expr.c ============================================================================== --- head/sys/ddb/db_expr.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/ddb/db_expr.c Tue Jul 14 22:48:30 2009 (r195699) @@ -51,7 +51,9 @@ db_term(db_expr_t *valuep) t = db_read_token(); if (t == tIDENT) { - if (!db_value_of_name(db_tok_string, valuep)) { + if (!db_value_of_name(db_tok_string, valuep) && + !db_value_of_name_pcpu(db_tok_string, valuep) && + !db_value_of_name_vnet(db_tok_string, valuep)) { db_error("Symbol not found\n"); /*NOTREACHED*/ } Modified: head/sys/ddb/db_sym.c ============================================================================== --- head/sys/ddb/db_sym.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/ddb/db_sym.c Tue Jul 14 22:48:30 2009 (r195699) @@ -32,10 +32,15 @@ __FBSDID("$FreeBSD$"); #include +#include #include +#include + +#include #include #include +#include #include @@ -56,6 +61,117 @@ static char *db_qualify(c_db_sym_t sym, static boolean_t db_symbol_is_ambiguous(c_db_sym_t sym); static boolean_t db_line_at_pc(c_db_sym_t, char **, int *, db_expr_t); +static int db_cpu = -1; + +#ifdef VIMAGE +extern uintptr_t *__start_set_vnet; +extern uintptr_t *__stop_set_vnet; + +#define VNET_START (uintptr_t)&__start_set_vnet +#define VNET_STOP (uintptr_t)&__stop_set_vnet + +static void *db_vnet = NULL; +#endif + +/* + * Validate the CPU number used to interpret per-CPU variables so we can + * avoid later confusion if an invalid CPU is requested. + */ +int +db_var_db_cpu(struct db_variable *vp, db_expr_t *valuep, int op) +{ + + switch (op) { + case DB_VAR_GET: + *valuep = db_cpu; + return (1); + + case DB_VAR_SET: + if (*(int *)valuep < -1 && *(int *)valuep > mp_maxid) { + db_printf("Invalid value: %d", *(int*)valuep); + return (0); + } + db_cpu = *(int *)valuep; + return (1); + + default: + db_printf("db_var_db_cpu: unknown operation\n"); + return (0); + } +} + +/* + * Read-only variable reporting the current CPU, which is what we use when + * db_cpu is set to -1. + */ +int +db_var_curcpu(struct db_variable *vp, db_expr_t *valuep, int op) +{ + + switch (op) { + case DB_VAR_GET: + *valuep = curcpu; + return (1); + + case DB_VAR_SET: + db_printf("Read-only variable.\n"); + return (0); + + default: + db_printf("db_var_curcpu: unknown operation\n"); + return (0); + } +} + +#ifdef VIMAGE +/* + * Validate the virtual network pointer used to interpret per-vnet global + * variable expansion. Right now we don't do much here, really we should + * walk the global vnet list to check it's an OK pointer. + */ +int +db_var_db_vnet(struct db_variable *vp, db_expr_t *valuep, int op) +{ + + switch (op) { + case DB_VAR_GET: + *valuep = (db_expr_t)db_vnet; + return (1); + + case DB_VAR_SET: + db_vnet = *(void **)valuep; + return (1); + + default: + db_printf("db_var_db_vnet: unknown operation\n"); + return (0); + } +} + +/* + * Read-only variable reporting the current vnet, which is what we use when + * db_vnet is set to NULL. + */ +int +db_var_curvnet(struct db_variable *vp, db_expr_t *valuep, int op) +{ + + switch (op) { + case DB_VAR_GET: + *valuep = (db_expr_t)curvnet; + return (1); + + case DB_VAR_SET: + db_printf("Read-only variable.\n"); + return (0); + + default: + db_printf("db_var_curcpu: unknown operation\n"); + return (0); + } +} +#endif + /* * Add symbol table, with given name, to list of symbol tables. */ @@ -125,6 +241,59 @@ db_value_of_name(name, valuep) return (TRUE); } +boolean_t +db_value_of_name_pcpu(name, valuep) + const char *name; + db_expr_t *valuep; +{ + static char tmp[256]; + db_expr_t value; + c_db_sym_t sym; + int cpu; + + if (db_cpu != -1) + cpu = db_cpu; + else + cpu = curcpu; + snprintf(tmp, sizeof(tmp), "pcpu_entry_%s", name); + sym = db_lookup(tmp); + if (sym == C_DB_SYM_NULL) + return (FALSE); + db_symbol_values(sym, &name, &value); + if (value < DPCPU_START || value >= DPCPU_STOP) + return (FALSE); + *valuep = (db_expr_t)((uintptr_t)value + dpcpu_off[cpu]); + return (TRUE); +} + +boolean_t +db_value_of_name_vnet(name, valuep) + const char *name; + db_expr_t *valuep; +{ +#ifdef VIMAGE + static char tmp[256]; + db_expr_t value; + c_db_sym_t sym; + struct vnet *vnet; + + if (db_vnet != NULL) + vnet = db_vnet; + else + vnet = curvnet; + snprintf(tmp, sizeof(tmp), "vnet_entry_%s", name); + sym = db_lookup(tmp); + if (sym == C_DB_SYM_NULL) + return (FALSE); + db_symbol_values(sym, &name, &value); + if (value < VNET_START || value >= VNET_STOP) + return (FALSE); + *valuep = (db_expr_t)((uintptr_t)value + vnet->vnet_data_base); + return (TRUE); +#else + return (FALSE); +#endif +} /* * Lookup a symbol. Modified: head/sys/ddb/db_variables.c ============================================================================== --- head/sys/ddb/db_variables.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/ddb/db_variables.c Tue Jul 14 22:48:30 2009 (r195699) @@ -46,6 +46,12 @@ static struct db_variable db_vars[] = { { "maxwidth", &db_max_width, FCN_NULL }, { "tabstops", &db_tab_stop_width, FCN_NULL }, { "lines", &db_lines_per_page, FCN_NULL }, + { "curcpu", NULL, db_var_curcpu }, + { "db_cpu", NULL, db_var_db_cpu }, +#ifdef VIMAGE + { "curvnet", NULL, db_var_curvnet }, + { "db_vnet", NULL, db_var_db_vnet }, +#endif }; static struct db_variable *db_evars = db_vars + sizeof(db_vars)/sizeof(db_vars[0]); Modified: head/sys/ddb/db_variables.h ============================================================================== --- head/sys/ddb/db_variables.h Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/ddb/db_variables.h Tue Jul 14 22:48:30 2009 (r195699) @@ -52,6 +52,11 @@ struct db_variable { extern struct db_variable db_regs[]; /* machine registers */ extern struct db_variable *db_eregs; +extern db_varfcn_t db_var_curcpu; /* DPCPU default CPU */ +extern db_varfcn_t db_var_curvnet; /* Default vnet */ +extern db_varfcn_t db_var_db_cpu; /* DPCPU active CPU */ +extern db_varfcn_t db_var_db_vnet; /* Active vnet */ + int db_read_variable(struct db_variable *, db_expr_t *); int db_write_variable(struct db_variable *, db_expr_t); Modified: head/sys/ddb/ddb.h ============================================================================== --- head/sys/ddb/ddb.h Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/ddb/ddb.h Tue Jul 14 22:48:30 2009 (r195699) @@ -213,6 +213,8 @@ boolean_t db_stop_at_pc(boolean_t *is_br void db_trace_self(void); int db_trace_thread(struct thread *, int); int db_value_of_name(const char *name, db_expr_t *valuep); +int db_value_of_name_pcpu(const char *name, db_expr_t *valuep); +int db_value_of_name_vnet(const char *name, db_expr_t *valuep); int db_write_bytes(vm_offset_t addr, size_t size, char *data); void db_command_register(struct command_table *, struct command *); void db_command_unregister(struct command_table *, struct command *); Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Tue Jul 14 22:48:30 2009 (r195699) @@ -240,7 +240,6 @@ iwch_init_module(void) VNET_LIST_RLOCK(); VNET_FOREACH(vnet_iter) { CURVNET_SET(vnet_iter); /* XXX CURVNET_SET_QUIET() ? */ - INIT_VNET_NET(vnet_iter); TAILQ_FOREACH(ifp, &V_ifnet, if_link) (void)ifaddr_event_handler(NULL, ifp); CURVNET_RESTORE(); Modified: head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c ============================================================================== --- head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c Tue Jul 14 22:48:30 2009 (r195699) @@ -78,9 +78,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#if __FreeBSD_version >= 800056 -#include -#endif #include #include @@ -274,7 +271,6 @@ mk_tid_release(struct mbuf *m, const str static inline void make_tx_data_wr(struct socket *so, struct mbuf *m, int len, struct mbuf *tail) { - INIT_VNET_INET(so->so_vnet); struct tcpcb *tp = so_sototcpcb(so); struct toepcb *toep = tp->t_toe; struct tx_data_wr *req; @@ -1219,7 +1215,6 @@ install_offload_ops(struct socket *so) static __inline int select_rcv_wscale(int space, struct vnet *vnet) { - INIT_VNET_INET(vnet); int wscale = 0; if (space > MAX_RCV_WND) @@ -1237,7 +1232,6 @@ select_rcv_wscale(int space, struct vnet static unsigned long select_rcv_wnd(struct toedev *dev, struct socket *so) { - INIT_VNET_INET(so->so_vnet); struct tom_data *d = TOM_DATA(dev); unsigned int wnd; unsigned int max_rcv_wnd; @@ -3780,7 +3774,6 @@ fixup_and_send_ofo(struct toepcb *toep) static void socket_act_establish(struct socket *so, struct mbuf *m) { - INIT_VNET_INET(so->so_vnet); struct cpl_act_establish *req = cplhdr(m); u32 rcv_isn = ntohl(req->rcv_isn); /* real RCV_ISN + 1 */ struct tcpcb *tp = so_sototcpcb(so); Modified: head/sys/fs/nfs/nfsport.h ============================================================================== --- head/sys/fs/nfs/nfsport.h Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/fs/nfs/nfsport.h Tue Jul 14 22:48:30 2009 (r195699) @@ -95,7 +95,6 @@ #include #include #include -#include #include #include #include Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Jul 14 22:48:30 2009 (r195699) @@ -75,7 +75,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include #include #include @@ -1401,7 +1400,6 @@ again: CURVNET_SET(P_TO_VNET(&proc0)); #ifdef INET - INIT_VNET_INET(curvnet); IN_IFADDR_RLOCK(); if (!TAILQ_EMPTY(&V_in_ifaddrhead)) cverf.lval[0] = IA_SIN(TAILQ_FIRST(&V_in_ifaddrhead))->sin_addr.s_addr; Modified: head/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- head/sys/fs/nfsserver/nfs_nfsdport.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/fs/nfsserver/nfs_nfsdport.c Tue Jul 14 22:48:30 2009 (r195699) @@ -2671,7 +2671,6 @@ nfsrv_v4rootexport(void *argp, struct uc int nfsrv_getsocksndseq(struct socket *so, tcp_seq *maxp, tcp_seq *unap) { - INIT_VNET_INET(so->so_vnet); struct inpcb *inp; struct tcpcb *tp; int error = EPIPE; Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/kern/kern_linker.c Tue Jul 14 22:48:30 2009 (r195699) @@ -1334,23 +1334,8 @@ kldsym(struct thread *td, struct kldsym_ break; } } -#ifndef VIMAGE_GLOBALS - /* - * If the symbol is not found in global namespace, - * try to look it up in the current vimage namespace. - */ - if (lf == NULL) { - CURVNET_SET(TD_TO_VNET(td)); - error = vi_symlookup(&lookup, symstr); - CURVNET_RESTORE(); - if (error == 0) - error = copyout(&lookup, uap->data, - sizeof(lookup)); - } -#else if (lf == NULL) error = ENOENT; -#endif } KLD_UNLOCK(); out: Modified: head/sys/kern/kern_poll.c ============================================================================== --- head/sys/kern/kern_poll.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/kern/kern_poll.c Tue Jul 14 22:48:30 2009 (r195699) @@ -545,7 +545,6 @@ ether_poll_deregister(struct ifnet *ifp) static int poll_switch(SYSCTL_HANDLER_ARGS) { - INIT_VNET_NET(curvnet); struct ifnet *ifp; int error; int val = polling; Modified: head/sys/kern/kern_sysctl.c ============================================================================== --- head/sys/kern/kern_sysctl.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/kern/kern_sysctl.c Tue Jul 14 22:48:30 2009 (r195699) @@ -59,6 +59,8 @@ __FBSDID("$FreeBSD$"); #include #endif +#include + #include #include @@ -936,33 +938,9 @@ sysctl_handle_int(SYSCTL_HANDLER_ARGS) return (error); } -#ifdef VIMAGE -int -sysctl_handle_v_int(SYSCTL_HANDLER_ARGS) -{ - int tmpout, error = 0; - - SYSCTL_RESOLVE_V_ARG1(); - - /* - * Attempt to get a coherent snapshot by making a copy of the data. - */ - tmpout = *(int *)arg1; - error = SYSCTL_OUT(req, &tmpout, sizeof(int)); - - if (error || !req->newptr) - return (error); - - if (!arg1) - error = EPERM; - else - error = SYSCTL_IN(req, arg1, sizeof(int)); - return (error); -} -#endif - /* * Based on on sysctl_handle_int() convert milliseconds into ticks. + * Note: this is used by TCP. */ int @@ -970,8 +948,11 @@ sysctl_msec_to_ticks(SYSCTL_HANDLER_ARGS { int error, s, tt; - SYSCTL_RESOLVE_V_ARG1(); - +#ifdef VIMAGE + if (arg1 != NULL) + arg1 = (void *)(TD_TO_VNET(req->td)->vnet_data_base + + (uintptr_t)arg1); +#endif tt = *(int *)arg1; s = (int)((int64_t)tt * 1000 / hz); @@ -1097,47 +1078,6 @@ retry: return (error); } -#ifdef VIMAGE -int -sysctl_handle_v_string(SYSCTL_HANDLER_ARGS) -{ - int error=0; - char *tmparg; - size_t outlen; - - SYSCTL_RESOLVE_V_ARG1(); - - /* - * Attempt to get a coherent snapshot by copying to a - * temporary kernel buffer. - */ -retry: - outlen = strlen((char *)arg1)+1; - tmparg = malloc(outlen, M_SYSCTLTMP, M_WAITOK); - - if (strlcpy(tmparg, (char *)arg1, outlen) >= outlen) { - free(tmparg, M_SYSCTLTMP); - goto retry; - } - - error = SYSCTL_OUT(req, tmparg, outlen); - free(tmparg, M_SYSCTLTMP); - - if (error || !req->newptr) - return (error); - - if ((req->newlen - req->newidx) >= arg2) { - error = EINVAL; - } else { - arg2 = (req->newlen - req->newidx); - error = SYSCTL_IN(req, arg1, arg2); - ((char *)arg1)[arg2] = '\0'; - } - - return (error); -} -#endif - /* * Handle any kind of opaque data. * arg1 points to it, arg2 is the size. @@ -1175,35 +1115,6 @@ retry: return (error); } -#ifdef VIMAGE -int -sysctl_handle_v_opaque(SYSCTL_HANDLER_ARGS) -{ - int error, tries; - u_int generation; - struct sysctl_req req2; - - SYSCTL_RESOLVE_V_ARG1(); - - tries = 0; - req2 = *req; -retry: - generation = curthread->td_generation; - error = SYSCTL_OUT(req, arg1, arg2); - if (error) - return (error); - tries++; - if (generation != curthread->td_generation && tries < 3) { - *req = req2; - goto retry; - } - - error = SYSCTL_IN(req, arg1, arg2); - - return (error); -} -#endif - /* * Transfer functions to/from kernel space. * XXX: rather untested at this point Modified: head/sys/kern/kern_uuid.c ============================================================================== --- head/sys/kern/kern_uuid.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/kern/kern_uuid.c Tue Jul 14 22:48:30 2009 (r195699) @@ -89,7 +89,6 @@ MTX_SYSINIT(uuid_lock, &uuid_mutex, "UUI static void uuid_node(uint16_t *node) { - INIT_VNET_NET(curvnet); struct ifnet *ifp; struct ifaddr *ifa; struct sockaddr_dl *sdl; Modified: head/sys/kern/kern_vimage.c ============================================================================== --- head/sys/kern/kern_vimage.c Tue Jul 14 22:16:32 2009 (r195698) +++ head/sys/kern/kern_vimage.c Tue Jul 14 22:48:30 2009 (r195699) @@ -53,8 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#ifndef VIMAGE_GLOBALS - MALLOC_DEFINE(M_VIMAGE, "vimage", "vimage resource container"); MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); MALLOC_DEFINE(M_VPROCG, "vprocg", "process group control block"); @@ -65,13 +63,11 @@ static void vnet_mod_complete_registrati static int vnet_mod_constructor(struct vnet_modlink *); static int vnet_mod_destructor(struct vnet_modlink *); -#ifdef VIMAGE static struct vimage *vi_alloc(struct vimage *, char *); static int vi_destroy(struct vimage *); static struct vimage *vimage_get_next(struct vimage *, struct vimage *, int); static void vimage_relative_name(struct vimage *, struct vimage *, char *, int); -#endif #define VNET_LIST_WLOCK() \ mtx_lock(&vnet_list_refc_mtx); \ @@ -81,17 +77,11 @@ static void vimage_relative_name(struct #define VNET_LIST_WUNLOCK() \ mtx_unlock(&vnet_list_refc_mtx); -#ifdef VIMAGE struct vimage_list_head vimage_head; struct vnet_list_head vnet_head; struct vprocg_list_head vprocg_head; -#else -#ifndef VIMAGE_GLOBALS struct vprocg vprocg_0; -#endif -#endif -#ifdef VIMAGE struct cv vnet_list_condvar; struct mtx vnet_list_refc_mtx; int vnet_list_refc = 0; @@ -100,9 +90,7 @@ static u_int last_vi_id = 0; static u_int last_vprocg_id = 0; struct vnet *vnet0; -#endif -#ifdef VIMAGE /* * Move an ifnet to or from another vnet, specified by the jail id. If a @@ -396,8 +384,6 @@ vimage_get_next(struct vimage *top, stru return (NULL); } -#endif /* VIMAGE */ /* User interface block */ - /* * Kernel interfaces and handlers. @@ -540,25 +526,11 @@ vnet_mod_constructor(struct vnet_modlink if (vml->vml_iarg) printf("/%s", vml->vml_iname); printf(": "); -#ifdef VIMAGE - if (vmi->vmi_size) - printf("malloc(%zu); ", vmi->vmi_size); -#endif if (vmi->vmi_iattach != NULL) printf("iattach()"); printf("\n"); #endif -#ifdef VIMAGE - if (vmi->vmi_size) { - void *mem = malloc(vmi->vmi_size, M_VNET, - M_NOWAIT | M_ZERO); - if (mem == NULL) /* XXX should return error, not panic. */ - panic("malloc for %s\n", vmi->vmi_name); - curvnet->mod_data[vmi->vmi_id] = mem; - } -#endif - if (vmi->vmi_iattach != NULL) vmi->vmi_iattach(vml->vml_iarg); @@ -577,63 +549,15 @@ vnet_mod_destructor(struct vnet_modlink printf(": "); if (vmi->vmi_idetach != NULL) printf("idetach(); "); -#ifdef VIMAGE - if (vmi->vmi_size) - printf("free()"); -#endif printf("\n"); #endif if (vmi->vmi_idetach) vmi->vmi_idetach(vml->vml_iarg); -#ifdef VIMAGE - if (vmi->vmi_size) { - if (curvnet->mod_data[vmi->vmi_id] == NULL) - panic("vi_destroy: %s\n", vmi->vmi_name); - free(curvnet->mod_data[vmi->vmi_id], M_VNET); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 22:50:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1C41C106564A; Tue, 14 Jul 2009 22:50:42 +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 0A8168FC17; Tue, 14 Jul 2009 22:50:42 +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 n6EMof4e073562; Tue, 14 Jul 2009 22:50:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EMofBo073560; Tue, 14 Jul 2009 22:50:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907142250.n6EMofBo073560@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 14 Jul 2009 22:50: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: r195700 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:50:42 -0000 Author: kib Date: Tue Jul 14 22:50:41 2009 New Revision: 195700 URL: http://svn.freebsd.org/changeset/base/195700 Log: When wakeup(9) is going to notify swapper, assert that wait channel is not equal to &proc0. It shall be not, since proc0 stack is not swappable, and kick_proc0() is wakeup(&proc0). Reviewed by: jhb Approved by: re (kensmith) Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Jul 14 22:48:30 2009 (r195699) +++ head/sys/kern/kern_synch.c Tue Jul 14 22:50:41 2009 (r195700) @@ -347,8 +347,11 @@ wakeup(void *ident) sleepq_lock(ident); wakeup_swapper = sleepq_broadcast(ident, SLEEPQ_SLEEP, 0, 0); sleepq_release(ident); - if (wakeup_swapper) + if (wakeup_swapper) { + KASSERT(ident != &proc0, + ("wakeup and wakeup_swapper and proc0")); kick_proc0(); + } } /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 22:51:31 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B44EC10656AB; Tue, 14 Jul 2009 22:51:31 +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 88BCF8FC21; Tue, 14 Jul 2009 22:51:31 +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 n6EMpV4N073614; Tue, 14 Jul 2009 22:51:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EMpVrt073612; Tue, 14 Jul 2009 22:51:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907142251.n6EMpVrt073612@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 14 Jul 2009 22:51: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: r195701 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:51:32 -0000 Author: kib Date: Tue Jul 14 22:51:31 2009 New Revision: 195701 URL: http://svn.freebsd.org/changeset/base/195701 Log: Move the repeated code to calculate the number of the threads in the process that still need to be suspended or exited from thread_single into the new function calc_remaining(). Tested by: pho Reviewed by: jhb Approved by: re (kensmith) Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Jul 14 22:50:41 2009 (r195700) +++ head/sys/kern/kern_thread.c Tue Jul 14 22:51:31 2009 (r195701) @@ -504,6 +504,22 @@ thread_unlink(struct thread *td) /* Must NOT clear links to proc! */ } +static int +calc_remaining(struct proc *p, int mode) +{ + int remaining; + + if (mode == SINGLE_EXIT) + remaining = p->p_numthreads; + else if (mode == SINGLE_BOUNDARY) + remaining = p->p_numthreads - p->p_boundary_count; + else if (mode == SINGLE_NO_EXIT) + remaining = p->p_numthreads - p->p_suspcount; + else + panic("calc_remaining: wrong mode %d", mode); + return (remaining); +} + /* * Enforce single-threading. * @@ -551,12 +567,7 @@ thread_single(int mode) p->p_flag |= P_STOPPED_SINGLE; PROC_SLOCK(p); p->p_singlethread = td; - if (mode == SINGLE_EXIT) - remaining = p->p_numthreads; - else if (mode == SINGLE_BOUNDARY) - remaining = p->p_numthreads - p->p_boundary_count; - else - remaining = p->p_numthreads - p->p_suspcount; + remaining = calc_remaining(p, mode); while (remaining != 1) { if (P_SHOULDSTOP(p) != P_STOPPED_SINGLE) goto stopme; @@ -611,12 +622,7 @@ thread_single(int mode) } if (wakeup_swapper) kick_proc0(); - if (mode == SINGLE_EXIT) - remaining = p->p_numthreads; - else if (mode == SINGLE_BOUNDARY) - remaining = p->p_numthreads - p->p_boundary_count; - else - remaining = p->p_numthreads - p->p_suspcount; + remaining = calc_remaining(p, mode); /* * Maybe we suspended some threads.. was it enough? @@ -630,12 +636,7 @@ stopme: * In the mean time we suspend as well. */ thread_suspend_switch(td); - if (mode == SINGLE_EXIT) - remaining = p->p_numthreads; - else if (mode == SINGLE_BOUNDARY) - remaining = p->p_numthreads - p->p_boundary_count; - else - remaining = p->p_numthreads - p->p_suspcount; + remaining = calc_remaining(p, mode); } if (mode == SINGLE_EXIT) { /* From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 22:52:47 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 033DB1065679; Tue, 14 Jul 2009 22:52:47 +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 E3E9F8FC16; Tue, 14 Jul 2009 22:52:46 +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 n6EMqkCH073682; Tue, 14 Jul 2009 22:52:46 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EMqkge073671; Tue, 14 Jul 2009 22:52:46 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907142252.n6EMqkge073671@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 14 Jul 2009 22:52: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: r195702 - in head/sys: cddl/compat/opensolaris/sys kern sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:52:47 -0000 Author: kib Date: Tue Jul 14 22:52:46 2009 New Revision: 195702 URL: http://svn.freebsd.org/changeset/base/195702 Log: Add new msleep(9) flag PBDY that shall be specified together with PCATCH, to indicate that thread shall not be stopped upon receipt of SIGSTOP until it reaches the kernel->usermode boundary. Also change thread_single(SINGLE_NO_EXIT) to only stop threads at the user boundary unconditionally. Tested by: pho Reviewed by: jhb Approved by: re (kensmith) Modified: head/sys/cddl/compat/opensolaris/sys/sig.h head/sys/kern/kern_sig.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/subr_sleepqueue.c head/sys/kern/subr_trap.c head/sys/sys/param.h head/sys/sys/proc.h head/sys/sys/signalvar.h head/sys/sys/sleepqueue.h Modified: head/sys/cddl/compat/opensolaris/sys/sig.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/sig.h Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/cddl/compat/opensolaris/sys/sig.h Tue Jul 14 22:52:46 2009 (r195702) @@ -55,7 +55,7 @@ issig(int why) p = td->td_proc; PROC_LOCK(p); mtx_lock(&p->p_sigacts->ps_mtx); - sig = cursig(td); + sig = cursig(td, SIG_STOP_ALLOWED); mtx_unlock(&p->p_sigacts->ps_mtx); PROC_UNLOCK(p); if (sig != 0) Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/kern/kern_sig.c Tue Jul 14 22:52:46 2009 (r195702) @@ -100,7 +100,7 @@ SDT_PROBE_ARGTYPE(proc, kernel, , signal static int coredump(struct thread *); static char *expand_name(const char *, uid_t, pid_t); static int killpg1(struct thread *td, int sig, int pgid, int all); -static int issignal(struct thread *p); +static int issignal(struct thread *td, int stop_allowed); static int sigprop(int sig); static void tdsigwakeup(struct thread *, int, sig_t, int); static void sig_suspend_threads(struct thread *, struct proc *, int); @@ -558,12 +558,14 @@ sigqueue_delete_stopmask_proc(struct pro * action, the process stops in issignal(). */ int -cursig(struct thread *td) +cursig(struct thread *td, int stop_allowed) { PROC_LOCK_ASSERT(td->td_proc, MA_OWNED); + KASSERT(stop_allowed == SIG_STOP_ALLOWED || + stop_allowed == SIG_STOP_NOT_ALLOWED, ("cursig: stop_allowed")); mtx_assert(&td->td_proc->p_sigacts->ps_mtx, MA_OWNED); THREAD_LOCK_ASSERT(td, MA_NOTOWNED); - return (SIGPENDING(td) ? issignal(td) : 0); + return (SIGPENDING(td) ? issignal(td, stop_allowed) : 0); } /* @@ -1191,7 +1193,7 @@ restart: SIG_CANTMASK(td->td_sigmask); SIGDELSET(td->td_sigmask, i); mtx_lock(&ps->ps_mtx); - sig = cursig(td); + sig = cursig(td, SIG_STOP_ALLOWED); mtx_unlock(&ps->ps_mtx); if (sig) goto out; @@ -2310,18 +2312,28 @@ static void sig_suspend_threads(struct thread *td, struct proc *p, int sending) { struct thread *td2; + int wakeup_swapper; PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK_ASSERT(p, MA_OWNED); + wakeup_swapper = 0; FOREACH_THREAD_IN_PROC(p, td2) { thread_lock(td2); td2->td_flags |= TDF_ASTPENDING | TDF_NEEDSUSPCHK; if ((TD_IS_SLEEPING(td2) || TD_IS_SWAPPED(td2)) && - (td2->td_flags & TDF_SINTR) && - !TD_IS_SUSPENDED(td2)) { - thread_suspend_one(td2); - } else { + (td2->td_flags & TDF_SINTR)) { + if (td2->td_flags & TDF_SBDRY) { + if (TD_IS_SUSPENDED(td2)) + wakeup_swapper |= + thread_unsuspend_one(td2); + if (TD_ON_SLEEPQ(td2)) + wakeup_swapper |= + sleepq_abort(td2, ERESTART); + } else if (!TD_IS_SUSPENDED(td2)) { + thread_suspend_one(td2); + } + } else if (!TD_IS_SUSPENDED(td2)) { if (sending || td != td2) td2->td_flags |= TDF_ASTPENDING; #ifdef SMP @@ -2331,6 +2343,8 @@ sig_suspend_threads(struct thread *td, s } thread_unlock(td2); } + if (wakeup_swapper) + kick_proc0(); } int @@ -2387,8 +2401,7 @@ stopme: * postsig(sig); */ static int -issignal(td) - struct thread *td; +issignal(struct thread *td, int stop_allowed) { struct proc *p; struct sigacts *ps; @@ -2506,6 +2519,10 @@ issignal(td) (p->p_pgrp->pg_jobc == 0 && prop & SA_TTYSTOP)) break; /* == ignore */ + + /* Ignore, but do not drop the stop signal. */ + if (stop_allowed != SIG_STOP_ALLOWED) + return (sig); mtx_unlock(&ps->ps_mtx); WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, &p->p_mtx.lock_object, "Catching SIGSTOP"); Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/kern/kern_synch.c Tue Jul 14 22:52:46 2009 (r195702) @@ -188,6 +188,8 @@ _sleep(void *ident, struct lock_object * flags = SLEEPQ_SLEEP; if (catch) flags |= SLEEPQ_INTERRUPTIBLE; + if (priority & PBDRY) + flags |= SLEEPQ_STOP_ON_BDRY; sleepq_lock(ident); CTR5(KTR_PROC, "sleep: thread %ld (pid %ld, %s) on %s (%p)", Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/kern/kern_thread.c Tue Jul 14 22:52:46 2009 (r195702) @@ -598,18 +598,17 @@ thread_single(int mode) wakeup_swapper |= sleepq_abort(td2, ERESTART); break; + case SINGLE_NO_EXIT: + if (TD_IS_SUSPENDED(td2) && + !(td2->td_flags & TDF_BOUNDARY)) + wakeup_swapper |= + thread_unsuspend_one(td2); + if (TD_ON_SLEEPQ(td2) && + (td2->td_flags & TDF_SINTR)) + wakeup_swapper |= + sleepq_abort(td2, ERESTART); + break; default: - if (TD_IS_SUSPENDED(td2)) { - thread_unlock(td2); - continue; - } - /* - * maybe other inhibited states too? - */ - if ((td2->td_flags & TDF_SINTR) && - (td2->td_inhibitors & - (TDI_SLEEPING | TDI_SWAPPED))) - thread_suspend_one(td2); break; } } Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/kern/subr_sleepqueue.c Tue Jul 14 22:52:46 2009 (r195702) @@ -341,6 +341,8 @@ sleepq_add(void *wchan, struct lock_obje if (flags & SLEEPQ_INTERRUPTIBLE) { td->td_flags |= TDF_SINTR; td->td_flags &= ~TDF_SLEEPABORT; + if (flags & SLEEPQ_STOP_ON_BDRY) + td->td_flags |= TDF_SBDRY; } thread_unlock(td); } @@ -378,7 +380,7 @@ sleepq_catch_signals(void *wchan, int pr struct thread *td; struct proc *p; struct sigacts *ps; - int sig, ret; + int sig, ret, stop_allowed; td = curthread; p = curproc; @@ -395,6 +397,8 @@ sleepq_catch_signals(void *wchan, int pr sleepq_switch(wchan, pri); return (0); } + stop_allowed = (td->td_flags & TDF_SBDRY) ? SIG_STOP_NOT_ALLOWED : + SIG_STOP_ALLOWED; thread_unlock(td); mtx_unlock_spin(&sc->sc_lock); CTR3(KTR_PROC, "sleepq catching signals: thread %p (pid %ld, %s)", @@ -402,7 +406,7 @@ sleepq_catch_signals(void *wchan, int pr PROC_LOCK(p); ps = p->p_sigacts; mtx_lock(&ps->ps_mtx); - sig = cursig(td); + sig = cursig(td, stop_allowed); if (sig == 0) { mtx_unlock(&ps->ps_mtx); ret = thread_suspend_check(1); @@ -560,7 +564,7 @@ sleepq_check_signals(void) /* We are no longer in an interruptible sleep. */ if (td->td_flags & TDF_SINTR) - td->td_flags &= ~TDF_SINTR; + td->td_flags &= ~(TDF_SINTR | TDF_SBDRY); if (td->td_flags & TDF_SLEEPABORT) { td->td_flags &= ~TDF_SLEEPABORT; @@ -682,7 +686,7 @@ sleepq_resume_thread(struct sleepqueue * td->td_wmesg = NULL; td->td_wchan = NULL; - td->td_flags &= ~TDF_SINTR; + td->td_flags &= ~(TDF_SINTR | TDF_SBDRY); CTR3(KTR_PROC, "sleepq_wakeup: thread %p (pid %ld, %s)", (void *)td, (long)td->td_proc->p_pid, td->td_name); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/kern/subr_trap.c Tue Jul 14 22:52:46 2009 (r195702) @@ -221,7 +221,7 @@ ast(struct trapframe *framep) if (flags & TDF_NEEDSIGCHK) { PROC_LOCK(p); mtx_lock(&p->p_sigacts->ps_mtx); - while ((sig = cursig(td)) != 0) + while ((sig = cursig(td, SIG_STOP_ALLOWED)) != 0) postsig(sig); mtx_unlock(&p->p_sigacts->ps_mtx); PROC_UNLOCK(p); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/sys/param.h Tue Jul 14 22:52:46 2009 (r195702) @@ -187,6 +187,7 @@ #define PRIMASK 0x0ff #define PCATCH 0x100 /* OR'd with pri for tsleep to check signals */ #define PDROP 0x200 /* OR'd with pri to stop re-entry of interlock mutex */ +#define PBDRY 0x400 /* for PCATCH stop is done on the user boundary */ #define NZERO 0 /* default "nice" */ Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/sys/proc.h Tue Jul 14 22:52:46 2009 (r195702) @@ -320,7 +320,7 @@ do { \ #define TDF_BOUNDARY 0x00000400 /* Thread suspended at user boundary */ #define TDF_ASTPENDING 0x00000800 /* Thread has some asynchronous events. */ #define TDF_TIMOFAIL 0x00001000 /* Timeout from sleep after we were awake. */ -#define TDF_UNUSED2000 0x00002000 /* --available-- */ +#define TDF_SBDRY 0x00002000 /* Stop only on usermode boundary. */ #define TDF_UPIBLOCKED 0x00004000 /* Thread blocked on user PI mutex. */ #define TDF_NEEDSUSPCHK 0x00008000 /* Thread may need to suspend. */ #define TDF_NEEDRESCHED 0x00010000 /* Thread needs to yield. */ Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/sys/signalvar.h Tue Jul 14 22:52:46 2009 (r195702) @@ -311,10 +311,14 @@ extern int kern_logsigexit; /* Sysctl va #define SIGIO_LOCKED() mtx_owned(&sigio_lock) #define SIGIO_ASSERT(type) mtx_assert(&sigio_lock, type) +/* stop_allowed parameter for cursig */ +#define SIG_STOP_ALLOWED 100 +#define SIG_STOP_NOT_ALLOWED 101 + /* * Machine-independent functions: */ -int cursig(struct thread *td); +int cursig(struct thread *td, int stop_allowed); void execsigs(struct proc *p); void gsignal(int pgid, int sig); void killproc(struct proc *p, char *why); Modified: head/sys/sys/sleepqueue.h ============================================================================== --- head/sys/sys/sleepqueue.h Tue Jul 14 22:51:31 2009 (r195701) +++ head/sys/sys/sleepqueue.h Tue Jul 14 22:52:46 2009 (r195702) @@ -93,6 +93,8 @@ struct thread; #define SLEEPQ_SX 0x03 /* Used by an sx lock. */ #define SLEEPQ_LK 0x04 /* Used by a lockmgr. */ #define SLEEPQ_INTERRUPTIBLE 0x100 /* Sleep is interruptible. */ +#define SLEEPQ_STOP_ON_BDRY 0x200 /* Stop sleeping thread on + user mode boundary */ void init_sleepqueues(void); int sleepq_abort(struct thread *td, int intrval); From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 22:54:29 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EACB7106566B; Tue, 14 Jul 2009 22:54: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 D87D48FC0A; Tue, 14 Jul 2009 22:54: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 n6EMsTwn073755; Tue, 14 Jul 2009 22:54:29 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6EMsT1C073749; Tue, 14 Jul 2009 22:54:29 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907142254.n6EMsT1C073749@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 14 Jul 2009 22:54: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: r195703 - in head/sys: nfsclient rpc X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 22:54:30 -0000 Author: kib Date: Tue Jul 14 22:54:29 2009 New Revision: 195703 URL: http://svn.freebsd.org/changeset/base/195703 Log: Use PBDRY flag for msleep(9) in NFS and NLM when sleeping thread owns kernel resources that block other threads, like vnode locks. The SIGSTOP sent to such thread (process, rather) shall not stop it until thread releases the resources. Tested by: pho Reviewed by: jhb Approved by: re (kensmith) Modified: head/sys/nfsclient/nfs_bio.c head/sys/nfsclient/nfs_vnops.c head/sys/nfsclient/nfsmount.h head/sys/rpc/clnt_rc.c head/sys/rpc/clnt_vc.c Modified: head/sys/nfsclient/nfs_bio.c ============================================================================== --- head/sys/nfsclient/nfs_bio.c Tue Jul 14 22:52:46 2009 (r195702) +++ head/sys/nfsclient/nfs_bio.c Tue Jul 14 22:54:29 2009 (r195703) @@ -1254,7 +1254,7 @@ nfs_getcacheblk(struct vnode *vp, daddr_ sigset_t oldset; nfs_set_sigmask(td, &oldset); - bp = getblk(vp, bn, size, PCATCH, 0, 0); + bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); nfs_restore_sigmask(td, &oldset); while (bp == NULL) { if (nfs_sigintr(nmp, td)) @@ -1291,7 +1291,7 @@ nfs_vinvalbuf(struct vnode *vp, int flag if ((nmp->nm_flag & NFSMNT_INT) == 0) intrflg = 0; if (intrflg) { - slpflag = PCATCH; + slpflag = NFS_PCATCH; slptimeo = 2 * hz; } else { slpflag = 0; @@ -1370,7 +1370,7 @@ nfs_asyncio(struct nfsmount *nmp, struct } again: if (nmp->nm_flag & NFSMNT_INT) - slpflag = PCATCH; + slpflag = NFS_PCATCH; gotiod = FALSE; /* @@ -1439,7 +1439,7 @@ again: mtx_unlock(&nfs_iod_mtx); return (error2); } - if (slpflag == PCATCH) { + if (slpflag == NFS_PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Tue Jul 14 22:52:46 2009 (r195702) +++ head/sys/nfsclient/nfs_vnops.c Tue Jul 14 22:54:29 2009 (r195703) @@ -2934,7 +2934,7 @@ nfs_flush(struct vnode *vp, int waitfor, int bvecsize = 0, bveccount; if (nmp->nm_flag & NFSMNT_INT) - slpflag = PCATCH; + slpflag = NFS_PCATCH; if (!commit) passone = 0; bo = &vp->v_bufobj; @@ -3132,7 +3132,7 @@ loop: error = EINTR; goto done; } - if (slpflag == PCATCH) { + if (slpflag & PCATCH) { slpflag = 0; slptimeo = 2 * hz; } @@ -3170,7 +3170,7 @@ loop: error = nfs_sigintr(nmp, td); if (error) goto done; - if (slpflag == PCATCH) { + if (slpflag & PCATCH) { slpflag = 0; slptimeo = 2 * hz; } Modified: head/sys/nfsclient/nfsmount.h ============================================================================== --- head/sys/nfsclient/nfsmount.h Tue Jul 14 22:52:46 2009 (r195702) +++ head/sys/nfsclient/nfsmount.h Tue Jul 14 22:54:29 2009 (r195703) @@ -107,6 +107,8 @@ struct nfsmount { #define NFS_TPRINTF_DELAY 30 #endif +#define NFS_PCATCH (PCATCH | PBDRY) + #endif #endif Modified: head/sys/rpc/clnt_rc.c ============================================================================== --- head/sys/rpc/clnt_rc.c Tue Jul 14 22:52:46 2009 (r195702) +++ head/sys/rpc/clnt_rc.c Tue Jul 14 22:54:29 2009 (r195703) @@ -264,7 +264,8 @@ clnt_reconnect_call( stat = clnt_reconnect_connect(cl); if (stat == RPC_SYSTEMERROR) { error = tsleep(&fake_wchan, - rc->rc_intr ? PCATCH : 0, "rpccon", hz); + rc->rc_intr ? PCATCH | PBDRY : 0, "rpccon", + hz); if (error == EINTR || error == ERESTART) return (RPC_INTR); tries++; Modified: head/sys/rpc/clnt_vc.c ============================================================================== --- head/sys/rpc/clnt_vc.c Tue Jul 14 22:52:46 2009 (r195702) +++ head/sys/rpc/clnt_vc.c Tue Jul 14 22:54:29 2009 (r195703) @@ -196,7 +196,7 @@ clnt_vc_create( while ((so->so_state & SS_ISCONNECTING) && so->so_error == 0) { error = msleep(&so->so_timeo, SOCK_MTX(so), - PSOCK | PCATCH, "connec", 0); + PSOCK | PCATCH | PBDRY, "connec", 0); if (error) { if (error == EINTR || error == ERESTART) interrupted = 1; @@ -477,6 +477,7 @@ call_again: errp->re_errno = error; switch (error) { case EINTR: + case ERESTART: stat = RPC_INTR; break; case EWOULDBLOCK: @@ -709,7 +710,7 @@ clnt_vc_control(CLIENT *cl, u_int reques case CLSET_INTERRUPTIBLE: if (*(int *) info) - ct->ct_waitflag = PCATCH; + ct->ct_waitflag = PCATCH | PBDRY; else ct->ct_waitflag = 0; break; From owner-svn-src-head@FreeBSD.ORG Tue Jul 14 23:10:24 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2648B106566C; Tue, 14 Jul 2009 23:10:24 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 13F988FC08; Tue, 14 Jul 2009 23:10:24 +0000 (UTC) (envelope-from rmacklem@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 n6ENANEL074110; Tue, 14 Jul 2009 23:10:23 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6ENANZS074108; Tue, 14 Jul 2009 23:10:23 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200907142310.n6ENANZS074108@svn.freebsd.org> From: Rick Macklem Date: Tue, 14 Jul 2009 23:10: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: r195704 - head/sys/fs/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Jul 2009 23:10:24 -0000 Author: rmacklem Date: Tue Jul 14 23:10:23 2009 New Revision: 195704 URL: http://svn.freebsd.org/changeset/base/195704 Log: Fix the experimental nfs client so that it does not cause a "share->excl" panic when doing a lookup of dotdot at the root of a server's file system. The patch avoids calling vn_lock() for that case, since nfscl_nget() has already acquired a lock for the vnode. Approved by: re (kensmith), kib (mentor) Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Jul 14 22:54:29 2009 (r195703) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Jul 14 23:10:23 2009 (r195704) @@ -1127,7 +1127,8 @@ nfs_lookup(struct vop_lookup_args *ap) if (error == 0) newvp = NFSTOV(np); vfs_unbusy(mp); - vn_lock(dvp, ltype | LK_RETRY); + if (newvp != dvp) + vn_lock(dvp, ltype | LK_RETRY); if (dvp->v_iflag & VI_DOOMED) { if (error == 0) { if (newvp == dvp) From owner-svn-src-head@FreeBSD.ORG Wed Jul 15 00:56:16 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78511106567E; Wed, 15 Jul 2009 00:56: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 66C168FC13; Wed, 15 Jul 2009 00:56: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 n6F0uGVj076123; Wed, 15 Jul 2009 00:56:16 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6F0uGkv076121; Wed, 15 Jul 2009 00:56:16 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200907150056.n6F0uGkv076121@svn.freebsd.org> From: Robert Watson Date: Wed, 15 Jul 2009 00:56: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: r195705 - head/sys/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 00:56:17 -0000 Author: rwatson Date: Wed Jul 15 00:56:15 2009 New Revision: 195705 URL: http://svn.freebsd.org/changeset/base/195705 Log: Add missing license line for vnet.h, correct white space nit. Approved by: re (kensmith) (implicit) Modified: head/sys/net/vnet.h Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Tue Jul 14 23:10:23 2009 (r195704) +++ head/sys/net/vnet.h Wed Jul 15 00:56:15 2009 (r195705) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2009 Jeffrey Roberson * Copyright (c) 2009 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 @@ -10,7 +11,7 @@ * 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 From owner-svn-src-head@FreeBSD.ORG Wed Jul 15 09:19:01 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E4639106566C; Wed, 15 Jul 2009 09:19: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 D21158FC14; Wed, 15 Jul 2009 09:19: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 n6F9J1f4086595; Wed, 15 Jul 2009 09:19:01 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6F9J1fl086593; Wed, 15 Jul 2009 09:19:01 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200907150919.n6F9J1fl086593@svn.freebsd.org> From: Robert Watson Date: Wed, 15 Jul 2009 09:19: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: r195707 - head/sys/kern X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 09:19:02 -0000 Author: rwatson Date: Wed Jul 15 09:19:01 2009 New Revision: 195707 URL: http://svn.freebsd.org/changeset/base/195707 Log: r195699 introduced an assertion regarding when progbits data in kernel modules was present, which turns out to be false in some situations. Back out the assertion. Reported by: Luiz Otavio O Souza , Florian Smeets Approved by: re (kensmith) (implicit) Modified: head/sys/kern/link_elf_obj.c Modified: head/sys/kern/link_elf_obj.c ============================================================================== --- head/sys/kern/link_elf_obj.c Wed Jul 15 08:32:19 2009 (r195706) +++ head/sys/kern/link_elf_obj.c Wed Jul 15 09:19:01 2009 (r195707) @@ -793,9 +793,6 @@ link_elf_load_file(linker_class_t cls, c vnet_data_copy(ef->progtab[pb].addr, shdr[i].sh_size); #endif - else - panic("link_elf_load_file: unexpected " - "progbits type"); } else bzero(ef->progtab[pb].addr, shdr[i].sh_size); From owner-svn-src-head@FreeBSD.ORG Wed Jul 15 13:50:06 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E96771065678; Wed, 15 Jul 2009 13:50:06 +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 D79BA8FC12; Wed, 15 Jul 2009 13:50: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 n6FDo6eD095097; Wed, 15 Jul 2009 13:50:06 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6FDo6sm095095; Wed, 15 Jul 2009 13:50:06 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907151350.n6FDo6sm095095@svn.freebsd.org> From: Sam Leffler Date: Wed, 15 Jul 2009 13:50: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: r195709 - head/contrib/tcpdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 13:50:07 -0000 Author: sam Date: Wed Jul 15 13:50:06 2009 New Revision: 195709 URL: http://svn.freebsd.org/changeset/base/195709 Log: correct IEEE80211_RADIOTAP_XCHANNEL to match system Submitted by: Guy Harris Approved by: re (kib) Modified: head/contrib/tcpdump/ieee802_11_radio.h Modified: head/contrib/tcpdump/ieee802_11_radio.h ============================================================================== --- head/contrib/tcpdump/ieee802_11_radio.h Wed Jul 15 10:08:19 2009 (r195708) +++ head/contrib/tcpdump/ieee802_11_radio.h Wed Jul 15 13:50:06 2009 (r195709) @@ -193,7 +193,7 @@ enum ieee80211_radiotap_type { IEEE80211_RADIOTAP_ANTENNA = 11, IEEE80211_RADIOTAP_DB_ANTSIGNAL = 12, IEEE80211_RADIOTAP_DB_ANTNOISE = 13, - IEEE80211_RADIOTAP_XCHANNEL = 14, + IEEE80211_RADIOTAP_XCHANNEL = 18, IEEE80211_RADIOTAP_EXT = 31 }; From owner-svn-src-head@FreeBSD.ORG Wed Jul 15 17:07:39 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A07861065670; Wed, 15 Jul 2009 17:07:39 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8E34F8FC15; Wed, 15 Jul 2009 17:07:39 +0000 (UTC) (envelope-from avg@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 n6FH7d4X098951; Wed, 15 Jul 2009 17:07:39 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6FH7dmx098950; Wed, 15 Jul 2009 17:07:39 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <200907151707.n6FH7dmx098950@svn.freebsd.org> From: Andriy Gapon Date: Wed, 15 Jul 2009 17:07: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: r195710 - in head/sys/cddl/dev/dtrace: amd64 i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 17:07:40 -0000 Author: avg Date: Wed Jul 15 17:07:39 2009 New Revision: 195710 URL: http://svn.freebsd.org/changeset/base/195710 Log: dtrace_gethrtime: improve scaling of TSC ticks to nanoseconds Currently dtrace_gethrtime uses formula similar to the following for converting TSC ticks to nanoseconds: rdtsc() * 10^9 / tsc_freq The dividend overflows 64-bit type and wraps-around every 2^64/10^9 = 18446744073 ticks which is just a few seconds on modern machines. Now we instead use precalculated scaling factor of 10^9*2^N/tsc_freq < 2^32 and perform TSC value multiplication separately for each 32-bit half. This allows to avoid overflow of the dividend described above. The idea is taken from OpenSolaris. This has an added feature of always scaling TSC with invariant value regardless of TSC frequency changes. Thus the timestamps will not be accurate if TSC actually changes, but they are always proportional to TSC ticks and thus monotonic. This should be much better than current formula which produces wildly different non-monotonic results on when tsc_freq changes. Also drop write-only 'cp' variable from amd64 dtrace_gethrtime_init() to make it identical to the i386 twin. PR: kern/127441 Tested by: Thomas Backman Reviewed by: jhb Discussed with: current@, bde, gnn Silence from: jb Approved by: re (gnn) MFC after: 1 week Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Modified: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Wed Jul 15 13:50:06 2009 (r195709) +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c Wed Jul 15 17:07:39 2009 (r195710) @@ -366,6 +366,10 @@ dtrace_safe_defer_signal(void) static int64_t tgt_cpu_tsc; static int64_t hst_cpu_tsc; static int64_t tsc_skew[MAXCPU]; +static uint64_t nsec_scale; + +/* See below for the explanation of this macro. */ +#define SCALE_SHIFT 28 static void dtrace_gethrtime_init_sync(void *arg) @@ -401,9 +405,36 @@ dtrace_gethrtime_init_cpu(void *arg) static void dtrace_gethrtime_init(void *arg) { + uint64_t tsc_f; cpumask_t map; int i; - struct pcpu *cp; + + /* + * Get TSC frequency known at this moment. + * This should be constant if TSC is invariant. + * Otherwise tick->time conversion will be inaccurate, but + * will preserve monotonic property of TSC. + */ + tsc_f = tsc_freq; + + /* + * The following line checks that nsec_scale calculated below + * doesn't overflow 32-bit unsigned integer, so that it can multiply + * another 32-bit integer without overflowing 64-bit. + * Thus minimum supported TSC frequency is 62.5MHz. + */ + KASSERT(tsc_f > (NANOSEC >> (32 - SCALE_SHIFT)), ("TSC frequency is too low")); + + /* + * We scale up NANOSEC/tsc_f ratio to preserve as much precision + * as possible. + * 2^28 factor was chosen quite arbitrarily from practical + * considerations: + * - it supports TSC frequencies as low as 62.5MHz (see above); + * - it provides quite good precision (e < 0.01%) up to THz + * (terahertz) values; + */ + nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; /* The current CPU is the reference one. */ tsc_skew[curcpu] = 0; @@ -412,7 +443,7 @@ dtrace_gethrtime_init(void *arg) if (i == curcpu) continue; - if ((cp = pcpu_find(i)) == NULL) + if (pcpu_find(i) == NULL) continue; map = 0; @@ -439,7 +470,21 @@ SYSINIT(dtrace_gethrtime_init, SI_SUB_SM uint64_t dtrace_gethrtime() { - return ((rdtsc() + tsc_skew[curcpu]) * (int64_t) 1000000000 / tsc_freq); + uint64_t tsc; + uint32_t lo; + uint32_t hi; + + /* + * We split TSC value into lower and higher 32-bit halves and separately + * scale them with nsec_scale, then we scale them down by 2^28 + * (see nsec_scale calculations) taking into account 32-bit shift of + * the higher half and finally add. + */ + tsc = rdtsc() + tsc_skew[curcpu]; + lo = tsc; + hi = tsc >> 32; + return (((lo * nsec_scale) >> SCALE_SHIFT) + + ((hi * nsec_scale) << (32 - SCALE_SHIFT))); } uint64_t Modified: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c ============================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Wed Jul 15 13:50:06 2009 (r195709) +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c Wed Jul 15 17:07:39 2009 (r195710) @@ -366,6 +366,10 @@ dtrace_safe_defer_signal(void) static int64_t tgt_cpu_tsc; static int64_t hst_cpu_tsc; static int64_t tsc_skew[MAXCPU]; +static uint64_t nsec_scale; + +/* See below for the explanation of this macro. */ +#define SCALE_SHIFT 28 static void dtrace_gethrtime_init_sync(void *arg) @@ -401,9 +405,37 @@ dtrace_gethrtime_init_cpu(void *arg) static void dtrace_gethrtime_init(void *arg) { + uint64_t tsc_f; cpumask_t map; int i; + /* + * Get TSC frequency known at this moment. + * This should be constant if TSC is invariant. + * Otherwise tick->time conversion will be inaccurate, but + * will preserve monotonic property of TSC. + */ + tsc_f = tsc_freq; + + /* + * The following line checks that nsec_scale calculated below + * doesn't overflow 32-bit unsigned integer, so that it can multiply + * another 32-bit integer without overflowing 64-bit. + * Thus minimum supported TSC frequency is 62.5MHz. + */ + KASSERT(tsc_f > (NANOSEC >> (32 - SCALE_SHIFT)), ("TSC frequency is too low")); + + /* + * We scale up NANOSEC/tsc_f ratio to preserve as much precision + * as possible. + * 2^28 factor was chosen quite arbitrarily from practical + * considerations: + * - it supports TSC frequencies as low as 62.5MHz (see above); + * - it provides quite good precision (e < 0.01%) up to THz + * (terahertz) values; + */ + nsec_scale = ((uint64_t)NANOSEC << SCALE_SHIFT) / tsc_f; + /* The current CPU is the reference one. */ tsc_skew[curcpu] = 0; @@ -438,7 +470,21 @@ SYSINIT(dtrace_gethrtime_init, SI_SUB_SM uint64_t dtrace_gethrtime() { - return ((rdtsc() + tsc_skew[curcpu]) * (int64_t) 1000000000 / tsc_freq); + uint64_t tsc; + uint32_t lo; + uint32_t hi; + + /* + * We split TSC value into lower and higher 32-bit halves and separately + * scale them with nsec_scale, then we scale them down by 2^28 + * (see nsec_scale calculations) taking into account 32-bit shift of + * the higher half and finally add. + */ + tsc = rdtsc() + tsc_skew[curcpu]; + lo = tsc; + hi = tsc >> 32; + return (((lo * nsec_scale) >> SCALE_SHIFT) + + ((hi * nsec_scale) << (32 - SCALE_SHIFT))); } uint64_t From owner-svn-src-head@FreeBSD.ORG Wed Jul 15 17:29:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67691065670; Wed, 15 Jul 2009 17:29:05 +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 7AA2D8FC18; Wed, 15 Jul 2009 17:29:05 +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 n6FHT5up099425; Wed, 15 Jul 2009 17:29:05 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6FHT5DD099423; Wed, 15 Jul 2009 17:29:05 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200907151729.n6FHT5DD099423@svn.freebsd.org> From: Ken Smith Date: Wed, 15 Jul 2009 17:29: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: r195712 - head/sys/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jul 2009 17:29:06 -0000 Author: kensmith Date: Wed Jul 15 17:29:05 2009 New Revision: 195712 URL: http://svn.freebsd.org/changeset/base/195712 Log: Prepare for the 8.0-BETA2 builds. Approved by: re (implicit) Modified: head/sys/conf/newvers.sh Modified: head/sys/conf/newvers.sh ============================================================================== --- head/sys/conf/newvers.sh Wed Jul 15 17:24:03 2009 (r195711) +++ head/sys/conf/newvers.sh Wed Jul 15 17:29:05 2009 (r195712) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.0" -BRANCH="BETA1" +BRANCH="BETA2" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-head@FreeBSD.ORG Thu Jul 16 19:48:40 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AF03106566C; Thu, 16 Jul 2009 19:48:40 +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 080C58FC16; Thu, 16 Jul 2009 19:48:40 +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 n6GJmd5s038392; Thu, 16 Jul 2009 19:48:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6GJmdV5038391; Thu, 16 Jul 2009 19:48:39 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907161948.n6GJmdV5038391@svn.freebsd.org> From: Alexander Motin Date: Thu, 16 Jul 2009 19:48: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: r195724 - head/sys/dev/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 19:48:40 -0000 Author: mav Date: Thu Jul 16 19:48:39 2009 New Revision: 195724 URL: http://svn.freebsd.org/changeset/base/195724 Log: Limit IOCATAREQUEST ioctl data size to controller's maximum I/O size. It fixes kernel panic when requested size is too large (0xffffffff), PR: kern/136726 Approved by: re (kib) MFC after: 2 weeks Modified: head/sys/dev/ata/ata-all.c Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Thu Jul 16 17:31:23 2009 (r195723) +++ head/sys/dev/ata/ata-all.c Thu Jul 16 19:48:39 2009 (r195724) @@ -472,6 +472,7 @@ int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data) { struct ata_device *atadev = device_get_softc(dev); + struct ata_channel *ch = device_get_softc(device_get_parent(dev)); struct ata_ioc_request *ioc_request = (struct ata_ioc_request *)data; struct ata_params *params = (struct ata_params *)data; int *mode = (int *)data; @@ -481,6 +482,10 @@ ata_device_ioctl(device_t dev, u_long cm switch (cmd) { case IOCATAREQUEST: + if (ioc_request->count > + (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { + return (EFBIG); + } if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { return ENOMEM; } From owner-svn-src-head@FreeBSD.ORG Thu Jul 16 20:19:37 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11FE1106564A; Thu, 16 Jul 2009 20:19:37 +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 F3BFA8FC08; Thu, 16 Jul 2009 20:19:36 +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 n6GKJa4P039045; Thu, 16 Jul 2009 20:19:36 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6GKJaEo039043; Thu, 16 Jul 2009 20:19:36 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <200907162019.n6GKJaEo039043@svn.freebsd.org> From: Ken Smith Date: Thu, 16 Jul 2009 20:19: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: r195725 - head/usr.sbin/sysinstall X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 20:19:37 -0000 Author: kensmith Date: Thu Jul 16 20:19:36 2009 New Revision: 195725 URL: http://svn.freebsd.org/changeset/base/195725 Log: Correct the name of the Mongolian Documentation package. Approved by: re (kib) Modified: head/usr.sbin/sysinstall/dist.c Modified: head/usr.sbin/sysinstall/dist.c ============================================================================== --- head/usr.sbin/sysinstall/dist.c Thu Jul 16 19:48:39 2009 (r195724) +++ head/usr.sbin/sysinstall/dist.c Thu Jul 16 20:19:36 2009 (r195725) @@ -143,7 +143,7 @@ static Distribution DocDistTable[] = { DTE_PACKAGE("Hungarian Documentation", &DocDists, DOC_HU, "hu-freebsd-doc"), DTE_PACKAGE("Italian Documentation", &DocDists, DOC_IT, "it-freebsd-doc"), DTE_PACKAGE("Japanese Documentation", &DocDists, DOC_JA, "ja-freebsd-doc"), - DTE_PACKAGE("Mongolian Documentation", &DocDists, DOC_MN, "mn-freebsd-doc-mn"), + DTE_PACKAGE("Mongolian Documentation", &DocDists, DOC_MN, "mn-freebsd-doc"), DTE_PACKAGE("Dutch Documentation", &DocDists, DOC_NL, "nl-freebsd-doc"), DTE_PACKAGE("Polish Documentation", &DocDists, DOC_PL, "pl-freebsd-doc"), DTE_PACKAGE("Portuguese Documentation", &DocDists, DOC_PT, "pt-freebsd-doc"), From owner-svn-src-head@FreeBSD.ORG Thu Jul 16 20:29:38 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFEAA106566C; Thu, 16 Jul 2009 20:29:38 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCD868FC12; Thu, 16 Jul 2009 20:29:38 +0000 (UTC) (envelope-from dougb@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 n6GKTcg8039285; Thu, 16 Jul 2009 20:29:38 GMT (envelope-from dougb@svn.freebsd.org) Received: (from dougb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6GKTa3U039281; Thu, 16 Jul 2009 20:29:36 GMT (envelope-from dougb@svn.freebsd.org) Message-Id: <200907162029.n6GKTa3U039281@svn.freebsd.org> From: Doug Barton Date: Thu, 16 Jul 2009 20:29: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: r195726 - head/games/fortune/datfiles X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 20:29:39 -0000 Author: dougb Date: Thu Jul 16 20:29:36 2009 New Revision: 195726 URL: http://svn.freebsd.org/changeset/base/195726 Log: Fix several instances of spaces before commas, and one of a space before a ). PR: docs/136723 Submitted by: Ulrich Sporlein Approved by: re (kib) Modified: head/games/fortune/datfiles/fortunes head/games/fortune/datfiles/fortunes-o.real Modified: head/games/fortune/datfiles/fortunes ============================================================================== --- head/games/fortune/datfiles/fortunes Thu Jul 16 20:19:36 2009 (r195725) +++ head/games/fortune/datfiles/fortunes Thu Jul 16 20:29:36 2009 (r195726) @@ -12247,7 +12247,7 @@ after they got done, you wanted to be tr "The test or the room?" "The tests or the room? Vell, nah, about them I can't complain." "The nurses? The food?" asked Fats, but Bernard shook his head no. -Fats laughed and said, "Listen , Bernie, you went to the MBH, they did this +Fats laughed and said, "Listen, Bernie, you went to the MBH, they did this great workup, and when I asked you shy you came to the House of God, all you tell me is, 'Nah, I can't complain.' So why did you come here? Why, Bernie, why?" @@ -25030,7 +25030,7 @@ Great song. -- Fred Reuss % I went to a job interview the other day, the guy asked me if I had any -questions , I said yes, just one, if you're in a car traveling at the +questions, I said yes, just one, if you're in a car traveling at the speed of light and you turn your headlights on, does anything happen? He said he couldn't answer that, I told him sorry, but I couldn't work @@ -25555,7 +25555,7 @@ we wouldn't reach a conclusion. If an average person on the subway turns to you, like an ancient mariner, and starts telling you her tale, you turn away or nod and hope she stops, not just because you fear she might be crazy. If she tells her tale on -camera, you might listen. Watching strangers on television , even +camera, you might listen. Watching strangers on television, even responding to them from a studio audience, we're disengaged - voyeurs collaborating with exhibitionists in rituals of sham community. Never have so many known so much about people for whom they cared so little. @@ -26172,9 +26172,9 @@ they'll never hurt you, nine times out o % If practice makes perfect, and nobody's perfect, why practice? % -If preceded by a '-' , the timezone shall be east of the Prime +If preceded by a '-', the timezone shall be east of the Prime Meridian; otherwise, it shall be west (which may be indicated by -an optional preceding '+' ). +an optional preceding '+'). -- POSIX 2001 The "+" or "-" indicates whether the time-of-day is ahead of Modified: head/games/fortune/datfiles/fortunes-o.real ============================================================================== --- head/games/fortune/datfiles/fortunes-o.real Thu Jul 16 20:19:36 2009 (r195725) +++ head/games/fortune/datfiles/fortunes-o.real Thu Jul 16 20:29:36 2009 (r195726) @@ -6576,7 +6576,7 @@ mean. The answer is hot tubs. A hot tu water that you sit in naked with members of the opposite sex, none of whom is necessarily your spouse. After a few hours in their hot tubs, Californians don't give a damn about earthquakes or mass murderers. They don't give a -damn about anything , which is why they are able to produce "Laverne and +damn about anything, which is why they are able to produce "Laverne and Shirley" week after week. -- Dave Barry % From owner-svn-src-head@FreeBSD.ORG Thu Jul 16 21:13:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D13A81065672; Thu, 16 Jul 2009 21:13:05 +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 BC74C8FC16; Thu, 16 Jul 2009 21:13:05 +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 n6GLD543040244; Thu, 16 Jul 2009 21:13:05 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6GLD5Bp040201; Thu, 16 Jul 2009 21:13:05 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200907162113.n6GLD5Bp040201@svn.freebsd.org> From: Robert Watson Date: Thu, 16 Jul 2009 21:13: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: r195727 - in head/sys: net netgraph netinet netinet/ipfw netinet6 netipsec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 21:13:06 -0000 Author: rwatson Date: Thu Jul 16 21:13:04 2009 New Revision: 195727 URL: http://svn.freebsd.org/changeset/base/195727 Log: Remove unused VNET_SET() and related macros; only VNET_GET() is ever actually used. Rename VNET_GET() to VNET() to shorten variable references. Discussed with: bz, julian Reviewed by: bz Approved by: re (kensmith, kib) Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h head/sys/net/if.c head/sys/net/if_clone.c head/sys/net/if_ethersubr.c head/sys/net/if_gif.c head/sys/net/if_gif.h head/sys/net/if_loop.c head/sys/net/if_var.h head/sys/net/raw_cb.h head/sys/net/route.c head/sys/net/vnet.h head/sys/netgraph/ng_base.c head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_iface.c head/sys/netinet/icmp6.h head/sys/netinet/icmp_var.h head/sys/netinet/if_ether.c head/sys/netinet/igmp.c head/sys/netinet/in.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcb.h head/sys/netinet/in_rmx.c head/sys/netinet/in_var.h head/sys/netinet/ip_divert.c head/sys/netinet/ip_fastfwd.c head/sys/netinet/ip_fw.h head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/ip_ipsec.c head/sys/netinet/ip_var.h head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_nat.c head/sys/netinet/raw_ip.c head/sys/netinet/tcp_hostcache.c head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_sack.c head/sys/netinet/tcp_subr.c head/sys/netinet/tcp_syncache.c head/sys/netinet/tcp_timewait.c head/sys/netinet/tcp_var.h head/sys/netinet/udp_usrreq.c head/sys/netinet/udp_var.h head/sys/netinet6/frag6.c head/sys/netinet6/icmp6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_rmx.c head/sys/netinet6/in6_src.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_ipsec.c head/sys/netinet6/ip6_mroute.c head/sys/netinet6/ip6_var.h head/sys/netinet6/mld6.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6.h head/sys/netinet6/nd6_nbr.c head/sys/netinet6/nd6_rtr.c head/sys/netinet6/raw_ip6.c head/sys/netinet6/raw_ip6.h head/sys/netinet6/scope6.c head/sys/netinet6/tcp6_var.h head/sys/netipsec/ah_var.h head/sys/netipsec/esp_var.h head/sys/netipsec/ipcomp_var.h head/sys/netipsec/ipip_var.h head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec6.h head/sys/netipsec/key.c head/sys/netipsec/key_debug.h head/sys/netipsec/keysock.c head/sys/netipsec/keysock.h head/sys/netipsec/xform_esp.c Modified: head/sys/net/flowtable.c ============================================================================== --- head/sys/net/flowtable.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/flowtable.c Thu Jul 16 21:13:04 2009 (r195727) @@ -168,10 +168,10 @@ static VNET_DEFINE(uint32_t, flow_hashji static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); -#define V_flow_list_head VNET_GET(flow_list_head) -#define V_flow_hashjitter VNET_GET(flow_hashjitter) -#define V_flow_ipv4_zone VNET_GET(flow_ipv4_zone) -#define V_flow_ipv6_zone VNET_GET(flow_ipv6_zone) +#define V_flow_list_head VNET(flow_list_head) +#define V_flow_hashjitter VNET(flow_hashjitter) +#define V_flow_ipv4_zone VNET(flow_ipv4_zone) +#define V_flow_ipv6_zone VNET(flow_ipv6_zone) static int flowtable_iattach(const void *); #ifdef VIMAGE @@ -217,19 +217,19 @@ static VNET_DEFINE(int, flowtable_fin_wa static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; static VNET_DEFINE(int, flowtable_nmbflows) = 4096; -#define V_flowtable_enable VNET_GET(flowtable_enable) -#define V_flowtable_hits VNET_GET(flowtable_hits) -#define V_flowtable_lookups VNET_GET(flowtable_lookups) -#define V_flowtable_misses VNET_GET(flowtable_misses) -#define V_flowtable_frees VNET_GET(flowtable_frees) -#define V_flowtable_free_checks VNET_GET(flowtable_free_checks) -#define V_flowtable_max_depth VNET_GET(flowtable_max_depth) -#define V_flowtable_collisions VNET_GET(flowtable_collisions) -#define V_flowtable_syn_expire VNET_GET(flowtable_syn_expire) -#define V_flowtable_udp_expire VNET_GET(flowtable_udp_expire) -#define V_flowtable_fin_wait_expire VNET_GET(flowtable_fin_wait_expire) -#define V_flowtable_tcp_expire VNET_GET(flowtable_tcp_expire) -#define V_flowtable_nmbflows VNET_GET(flowtable_nmbflows) +#define V_flowtable_enable VNET(flowtable_enable) +#define V_flowtable_hits VNET(flowtable_hits) +#define V_flowtable_lookups VNET(flowtable_lookups) +#define V_flowtable_misses VNET(flowtable_misses) +#define V_flowtable_frees VNET(flowtable_frees) +#define V_flowtable_free_checks VNET(flowtable_free_checks) +#define V_flowtable_max_depth VNET(flowtable_max_depth) +#define V_flowtable_collisions VNET(flowtable_collisions) +#define V_flowtable_syn_expire VNET(flowtable_syn_expire) +#define V_flowtable_udp_expire VNET(flowtable_udp_expire) +#define V_flowtable_fin_wait_expire VNET(flowtable_fin_wait_expire) +#define V_flowtable_tcp_expire VNET(flowtable_tcp_expire) +#define V_flowtable_nmbflows VNET(flowtable_nmbflows) SYSCTL_NODE(_net_inet, OID_AUTO, flowtable, CTLFLAG_RD, NULL, "flowtable"); SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, enable, CTLFLAG_RW, Modified: head/sys/net/flowtable.h ============================================================================== --- head/sys/net/flowtable.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/flowtable.h Thu Jul 16 21:13:04 2009 (r195727) @@ -39,7 +39,7 @@ $FreeBSD$ struct flowtable; VNET_DECLARE(struct flowtable *, ip_ft); -#define V_ip_ft VNET_GET(ip_ft) +#define V_ip_ft VNET(ip_ft) struct flowtable *flowtable_alloc(int nentry, int flags); Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if.c Thu Jul 16 21:13:04 2009 (r195727) @@ -163,8 +163,8 @@ static VNET_DEFINE(int, if_indexlim) = 8 /* Table of ifnet by index. Locked with ifnet_lock. */ static VNET_DEFINE(struct ifindex_entry *, ifindex_table); -#define V_if_indexlim VNET_GET(if_indexlim) -#define V_ifindex_table VNET_GET(ifindex_table) +#define V_if_indexlim VNET(if_indexlim) +#define V_ifindex_table VNET(ifindex_table) int ifqmaxlen = IFQ_MAXLEN; struct rwlock ifnet_lock; Modified: head/sys/net/if_clone.c ============================================================================== --- head/sys/net/if_clone.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if_clone.c Thu Jul 16 21:13:04 2009 (r195727) @@ -61,8 +61,8 @@ static struct mtx if_cloners_mtx; static VNET_DEFINE(int, if_cloners_count); VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); -#define V_if_cloners_count VNET_GET(if_cloners_count) -#define V_if_cloners VNET_GET(if_cloners) +#define V_if_cloners_count VNET(if_cloners_count) +#define V_if_cloners VNET(if_cloners) #define IF_CLONERS_LOCK_INIT() \ mtx_init(&if_cloners_mtx, "if_cloners lock", NULL, MTX_DEF) Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if_ethersubr.c Thu Jul 16 21:13:04 2009 (r195727) @@ -149,7 +149,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* int ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); static VNET_DEFINE(int, ether_ipfw); -#define V_ether_ipfw VNET_GET(ether_ipfw) +#define V_ether_ipfw VNET(ether_ipfw) #endif Modified: head/sys/net/if_gif.c ============================================================================== --- head/sys/net/if_gif.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if_gif.c Thu Jul 16 21:13:04 2009 (r195727) @@ -99,17 +99,17 @@ static VNET_DEFINE(LIST_HEAD(, gif_softc static VNET_DEFINE(int, max_gif_nesting); static VNET_DEFINE(int, parallel_tunnels); -#define V_gif_softc_list VNET_GET(gif_softc_list) -#define V_max_gif_nesting VNET_GET(max_gif_nesting) -#define V_parallel_tunnels VNET_GET(parallel_tunnels) +#define V_gif_softc_list VNET(gif_softc_list) +#define V_max_gif_nesting VNET(max_gif_nesting) +#define V_parallel_tunnels VNET(parallel_tunnels) #ifdef INET VNET_DEFINE(int, ip_gif_ttl); -#define V_ip_gif_ttl VNET_GET(ip_gif_ttl) +#define V_ip_gif_ttl VNET(ip_gif_ttl) #endif #ifdef INET6 VNET_DEFINE(int, ip6_gif_hlim); -#define V_ip6_gif_hlim VNET_GET(ip6_gif_hlim) +#define V_ip6_gif_hlim VNET(ip6_gif_hlim) #endif void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); Modified: head/sys/net/if_gif.h ============================================================================== --- head/sys/net/if_gif.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if_gif.h Thu Jul 16 21:13:04 2009 (r195727) @@ -120,7 +120,7 @@ void gif_delete_tunnel(struct ifnet *); int gif_encapcheck(const struct mbuf *, int, int, void *); VNET_DECLARE(int, ip_gif_ttl); -#define V_ip_gif_ttl VNET_GET(ip_gif_ttl) +#define V_ip_gif_ttl VNET(ip_gif_ttl) #endif /* _KERNEL */ Modified: head/sys/net/if_loop.c ============================================================================== --- head/sys/net/if_loop.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if_loop.c Thu Jul 16 21:13:04 2009 (r195727) @@ -113,8 +113,8 @@ VNET_DEFINE(struct ifnet *, loif); /* Us #ifdef VIMAGE static VNET_DEFINE(struct ifc_simple_data *, lo_cloner_data); static VNET_DEFINE(struct if_clone *, lo_cloner); -#define V_lo_cloner_data VNET_GET(lo_cloner_data) -#define V_lo_cloner VNET_GET(lo_cloner) +#define V_lo_cloner_data VNET(lo_cloner_data) +#define V_lo_cloner VNET(lo_cloner) MALLOC_DEFINE(M_LO_CLONER, "lo_cloner", "lo_cloner"); #endif Modified: head/sys/net/if_var.h ============================================================================== --- head/sys/net/if_var.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/if_var.h Thu Jul 16 21:13:04 2009 (r195727) @@ -785,10 +785,10 @@ VNET_DECLARE(struct ifgrouphead, ifg_hea VNET_DECLARE(int, if_index); VNET_DECLARE(struct ifnet *, loif); /* first loopback interface */ -#define V_ifnet VNET_GET(ifnet) -#define V_ifg_head VNET_GET(ifg_head) -#define V_if_index VNET_GET(if_index) -#define V_loif VNET_GET(loif) +#define V_ifnet VNET(ifnet) +#define V_ifg_head VNET(ifg_head) +#define V_if_index VNET(if_index) +#define V_loif VNET(loif) extern int ifqmaxlen; Modified: head/sys/net/raw_cb.h ============================================================================== --- head/sys/net/raw_cb.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/raw_cb.h Thu Jul 16 21:13:04 2009 (r195727) @@ -56,7 +56,7 @@ struct rawcb { #ifdef _KERNEL VNET_DECLARE(LIST_HEAD(rawcb_list_head, rawcb), rawcb_list); -#define V_rawcb_list VNET_GET(rawcb_list) +#define V_rawcb_list VNET(rawcb_list) extern struct mtx rawcb_mtx; Modified: head/sys/net/route.c ============================================================================== --- head/sys/net/route.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/route.c Thu Jul 16 21:13:04 2009 (r195727) @@ -92,10 +92,10 @@ static VNET_DEFINE(uma_zone_t, rtzone); VNET_DEFINE(int, rttrash); /* routes not in table but not freed */ VNET_DEFINE(struct rtstat, rtstat); -#define V_rt_tables VNET_GET(rt_tables) -#define V_rtzone VNET_GET(rtzone) -#define V_rttrash VNET_GET(rttrash) -#define V_rtstat VNET_GET(rtstat) +#define V_rt_tables VNET(rt_tables) +#define V_rtzone VNET(rtzone) +#define V_rttrash VNET(rttrash) +#define V_rtstat VNET(rtstat) static void rt_maskedcopy(struct sockaddr *, struct sockaddr *, struct sockaddr *); Modified: head/sys/net/vnet.h ============================================================================== --- head/sys/net/vnet.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/net/vnet.h Thu Jul 16 21:13:04 2009 (r195727) @@ -53,19 +53,16 @@ __asm__(".previous"); #define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \ ((b) + (uintptr_t)&VNET_NAME(n)) -#define _VNET_GET(b, n) (*_VNET_PTR(b, n)) -#define _VNET_SET(b, n, v) (*_VNET_PTR(b, n) = v) +#define _VNET(b, n) (*_VNET_PTR(b, n)) /* * Virtualized global variable accessor macros. */ #define VNET_VNET_PTR(vnet, n) _VNET_PTR((vnet)->vnet_data_base, n) -#define VNET_VNET_GET(vnet, n) (*VNET_VNET_PTR((vnet), n)) -#define VNET_VNET_SET(vnet, n, v) ((*VNET_VNET_PTR((vnet), n)) = v) +#define VNET_VNET(vnet, n) (*VNET_VNET_PTR((vnet), n)) #define VNET_PTR(n) VNET_VNET_PTR(curvnet, n) -#define VNET_GET(n) VNET_VNET_GET(curvnet, n) -#define VNET_SET(n, v) VNET_VNET_SET(curvnet, n, v) +#define VNET(n) VNET_VNET(curvnet, n) /* * Sysctl variants for vnet-virtualized global variables. Include @@ -143,12 +140,10 @@ void vnet_data_destroy(struct vnet *vne * Virtualized global variable accessor macros. */ #define VNET_VNET_PTR(vnet, n) (&(n)) -#define VNET_VNET_GET(vnet, n) (n) -#define VNET_VNET_SET(vnet, n, v) ((n) = (v)) +#define VNET_VNET(vnet, n) (n) #define VNET_PTR(n) (&(n)) -#define VNET_GET(n) (n) -#define VNET_SET(n, v) ((n) = (v)) +#define VNET(n) (n) #endif /* VIMAGE */ Modified: head/sys/netgraph/ng_base.c ============================================================================== --- head/sys/netgraph/ng_base.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netgraph/ng_base.c Thu Jul 16 21:13:04 2009 (r195727) @@ -177,7 +177,7 @@ static struct mtx ng_typelist_mtx; /* Hash related definitions */ /* XXX Don't need to initialise them because it's a LIST */ static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); -#define V_ng_ID_hash VNET_GET(ng_ID_hash) +#define V_ng_ID_hash VNET(ng_ID_hash) static struct mtx ng_idhash_mtx; /* Method to find a node.. used twice so do it here */ @@ -195,7 +195,7 @@ static struct mtx ng_idhash_mtx; } while (0) static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]); -#define V_ng_name_hash VNET_GET(ng_name_hash) +#define V_ng_name_hash VNET(ng_name_hash) static struct mtx ng_namehash_mtx; #define NG_NAMEHASH(NAME, HASH) \ @@ -365,7 +365,7 @@ ng_alloc_node(void) #endif static VNET_DEFINE(ng_ID_t, nextID) = 1; -#define V_nextID VNET_GET(nextID) +#define V_nextID VNET(nextID) #ifdef INVARIANTS #define CHECK_DATA_MBUF(m) do { \ Modified: head/sys/netgraph/ng_eiface.c ============================================================================== --- head/sys/netgraph/ng_eiface.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netgraph/ng_eiface.c Thu Jul 16 21:13:04 2009 (r195727) @@ -117,7 +117,7 @@ static vnet_attach_fn ng_eiface_iattach; static vnet_detach_fn ng_eiface_idetach; static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); -#define V_ng_eiface_unit VNET_GET(ng_eiface_unit) +#define V_ng_eiface_unit VNET(ng_eiface_unit) #ifdef VIMAGE static vnet_modinfo_t vnet_ng_eiface_modinfo = { Modified: head/sys/netgraph/ng_iface.c ============================================================================== --- head/sys/netgraph/ng_iface.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netgraph/ng_iface.c Thu Jul 16 21:13:04 2009 (r195727) @@ -213,7 +213,7 @@ static vnet_attach_fn ng_iface_iattach; static vnet_detach_fn ng_iface_idetach; static VNET_DEFINE(struct unrhdr *, ng_iface_unit); -#define V_ng_iface_unit VNET_GET(ng_iface_unit) +#define V_ng_iface_unit VNET(ng_iface_unit) #ifdef VIMAGE static vnet_modinfo_t vnet_ng_iface_modinfo = { Modified: head/sys/netinet/icmp6.h ============================================================================== --- head/sys/netinet/icmp6.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/icmp6.h Thu Jul 16 21:13:04 2009 (r195727) @@ -719,8 +719,8 @@ do { \ VNET_DECLARE(int, icmp6_rediraccept); /* accept/process redirects */ VNET_DECLARE(int, icmp6_redirtimeout); /* cache time for redirect routes */ -#define V_icmp6_rediraccept VNET_GET(icmp6_rediraccept) -#define V_icmp6_redirtimeout VNET_GET(icmp6_redirtimeout) +#define V_icmp6_rediraccept VNET(icmp6_rediraccept) +#define V_icmp6_redirtimeout VNET(icmp6_redirtimeout) #define ICMP6_NODEINFO_FQDNOK 0x1 #define ICMP6_NODEINFO_NODEADDROK 0x2 Modified: head/sys/netinet/icmp_var.h ============================================================================== --- head/sys/netinet/icmp_var.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/icmp_var.h Thu Jul 16 21:13:04 2009 (r195727) @@ -81,7 +81,7 @@ struct icmpstat { SYSCTL_DECL(_net_inet_icmp); VNET_DECLARE(struct icmpstat, icmpstat); /* icmp statistics. */ -#define V_icmpstat VNET_GET(icmpstat) +#define V_icmpstat VNET(icmpstat) extern int badport_bandlim(int); #define BANDLIM_UNLIMITED -1 Modified: head/sys/netinet/if_ether.c ============================================================================== --- head/sys/netinet/if_ether.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/if_ether.c Thu Jul 16 21:13:04 2009 (r195727) @@ -89,10 +89,10 @@ static VNET_DEFINE(int, useloopback) = 1 * local traffic */ static VNET_DEFINE(int, arp_proxyall); -#define V_arpt_keep VNET_GET(arpt_keep) -#define V_arp_maxtries VNET_GET(arp_maxtries) -#define V_useloopback VNET_GET(useloopback) -#define V_arp_proxyall VNET_GET(arp_proxyall) +#define V_arpt_keep VNET(arpt_keep) +#define V_arp_maxtries VNET(arp_maxtries) +#define V_useloopback VNET(useloopback) +#define V_arp_proxyall VNET(arp_proxyall) SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW, &VNET_NAME(arpt_keep), 0, Modified: head/sys/netinet/igmp.c ============================================================================== --- head/sys/netinet/igmp.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/igmp.c Thu Jul 16 21:13:04 2009 (r195727) @@ -219,17 +219,17 @@ static VNET_DEFINE(int, current_state_ti * report; IGMPv3 g/sg * query response */ -#define V_interface_timers_running VNET_GET(interface_timers_running) -#define V_state_change_timers_running VNET_GET(state_change_timers_running) -#define V_current_state_timers_running VNET_GET(current_state_timers_running) +#define V_interface_timers_running VNET(interface_timers_running) +#define V_state_change_timers_running VNET(state_change_timers_running) +#define V_current_state_timers_running VNET(current_state_timers_running) static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); static VNET_DEFINE(struct igmpstat, igmpstat); static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; -#define V_igi_head VNET_GET(igi_head) -#define V_igmpstat VNET_GET(igmpstat) -#define V_igmp_gsrdelay VNET_GET(igmp_gsrdelay) +#define V_igi_head VNET(igi_head) +#define V_igmpstat VNET(igmpstat) +#define V_igmp_gsrdelay VNET(igmp_gsrdelay) static VNET_DEFINE(int, igmp_recvifkludge) = 1; static VNET_DEFINE(int, igmp_sendra) = 1; @@ -239,13 +239,13 @@ static VNET_DEFINE(int, igmp_v2enable) = static VNET_DEFINE(int, igmp_legacysupp); static VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; -#define V_igmp_recvifkludge VNET_GET(igmp_recvifkludge) -#define V_igmp_sendra VNET_GET(igmp_sendra) -#define V_igmp_sendlocal VNET_GET(igmp_sendlocal) -#define V_igmp_v1enable VNET_GET(igmp_v1enable) -#define V_igmp_v2enable VNET_GET(igmp_v2enable) -#define V_igmp_legacysupp VNET_GET(igmp_legacysupp) -#define V_igmp_default_version VNET_GET(igmp_default_version) +#define V_igmp_recvifkludge VNET(igmp_recvifkludge) +#define V_igmp_sendra VNET(igmp_sendra) +#define V_igmp_sendlocal VNET(igmp_sendlocal) +#define V_igmp_v1enable VNET(igmp_v1enable) +#define V_igmp_v2enable VNET(igmp_v2enable) +#define V_igmp_legacysupp VNET(igmp_legacysupp) +#define V_igmp_default_version VNET(igmp_default_version) /* * Virtualized sysctls. Modified: head/sys/netinet/in.c ============================================================================== --- head/sys/netinet/in.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/in.c Thu Jul 16 21:13:04 2009 (r195727) @@ -79,9 +79,9 @@ static VNET_DEFINE(int, subnetsarelocal) static VNET_DEFINE(int, sameprefixcarponly); VNET_DECLARE(struct inpcbinfo, ripcbinfo); -#define V_subnetsarelocal VNET_GET(subnetsarelocal) -#define V_sameprefixcarponly VNET_GET(sameprefixcarponly) -#define V_ripcbinfo VNET_GET(ripcbinfo) +#define V_subnetsarelocal VNET(subnetsarelocal) +#define V_sameprefixcarponly VNET(sameprefixcarponly) +#define V_ripcbinfo VNET(ripcbinfo) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &VNET_NAME(subnetsarelocal), 0, Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/in_pcb.c Thu Jul 16 21:13:04 2009 (r195727) @@ -110,7 +110,7 @@ VNET_DEFINE(int, ipport_stoprandom); /* VNET_DEFINE(int, ipport_tcpallocs); static VNET_DEFINE(int, ipport_tcplastcount); -#define V_ipport_tcplastcount VNET_GET(ipport_tcplastcount) +#define V_ipport_tcplastcount VNET(ipport_tcplastcount) #define RANGECHK(var, min, max) \ if ((var) < (min)) { (var) = (min); } \ Modified: head/sys/netinet/in_pcb.h ============================================================================== --- head/sys/netinet/in_pcb.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/in_pcb.h Thu Jul 16 21:13:04 2009 (r195727) @@ -465,19 +465,19 @@ VNET_DECLARE(int, ipport_randomtime); VNET_DECLARE(int, ipport_stoprandom); VNET_DECLARE(int, ipport_tcpallocs); -#define V_ipport_reservedhigh VNET_GET(ipport_reservedhigh) -#define V_ipport_reservedlow VNET_GET(ipport_reservedlow) -#define V_ipport_lowfirstauto VNET_GET(ipport_lowfirstauto) -#define V_ipport_lowlastauto VNET_GET(ipport_lowlastauto) -#define V_ipport_firstauto VNET_GET(ipport_firstauto) -#define V_ipport_lastauto VNET_GET(ipport_lastauto) -#define V_ipport_hifirstauto VNET_GET(ipport_hifirstauto) -#define V_ipport_hilastauto VNET_GET(ipport_hilastauto) -#define V_ipport_randomized VNET_GET(ipport_randomized) -#define V_ipport_randomcps VNET_GET(ipport_randomcps) -#define V_ipport_randomtime VNET_GET(ipport_randomtime) -#define V_ipport_stoprandom VNET_GET(ipport_stoprandom) -#define V_ipport_tcpallocs VNET_GET(ipport_tcpallocs) +#define V_ipport_reservedhigh VNET(ipport_reservedhigh) +#define V_ipport_reservedlow VNET(ipport_reservedlow) +#define V_ipport_lowfirstauto VNET(ipport_lowfirstauto) +#define V_ipport_lowlastauto VNET(ipport_lowlastauto) +#define V_ipport_firstauto VNET(ipport_firstauto) +#define V_ipport_lastauto VNET(ipport_lastauto) +#define V_ipport_hifirstauto VNET(ipport_hifirstauto) +#define V_ipport_hilastauto VNET(ipport_hilastauto) +#define V_ipport_randomized VNET(ipport_randomized) +#define V_ipport_randomcps VNET(ipport_randomcps) +#define V_ipport_randomtime VNET(ipport_randomtime) +#define V_ipport_stoprandom VNET(ipport_stoprandom) +#define V_ipport_tcpallocs VNET(ipport_tcpallocs) extern struct callout ipport_tick_callout; Modified: head/sys/netinet/in_rmx.c ============================================================================== --- head/sys/netinet/in_rmx.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/in_rmx.c Thu Jul 16 21:13:04 2009 (r195727) @@ -135,9 +135,9 @@ static VNET_DEFINE(int, rtq_reallyold); static VNET_DEFINE(int, rtq_minreallyold); static VNET_DEFINE(int, rtq_toomany); -#define V_rtq_reallyold VNET_GET(rtq_reallyold) -#define V_rtq_minreallyold VNET_GET(rtq_minreallyold) -#define V_rtq_toomany VNET_GET(rtq_toomany) +#define V_rtq_reallyold VNET(rtq_reallyold) +#define V_rtq_minreallyold VNET(rtq_minreallyold) +#define V_rtq_toomany VNET(rtq_toomany) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold), 0, @@ -242,8 +242,8 @@ in_rtqkill(struct radix_node *rn, void * static VNET_DEFINE(int, rtq_timeout); static VNET_DEFINE(struct callout, rtq_timer); -#define V_rtq_timeout VNET_GET(rtq_timeout) -#define V_rtq_timer VNET_GET(rtq_timer) +#define V_rtq_timeout VNET(rtq_timeout) +#define V_rtq_timer VNET(rtq_timer) static void in_rtqtimo_one(void *rock); Modified: head/sys/netinet/in_var.h ============================================================================== --- head/sys/netinet/in_var.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/in_var.h Thu Jul 16 21:13:04 2009 (r195727) @@ -107,9 +107,9 @@ VNET_DECLARE(struct in_ifaddrhashhead *, VNET_DECLARE(struct in_ifaddrhead, in_ifaddrhead); VNET_DECLARE(u_long, in_ifaddrhmask); /* mask for hash table */ -#define V_in_ifaddrhashtbl VNET_GET(in_ifaddrhashtbl) -#define V_in_ifaddrhead VNET_GET(in_ifaddrhead) -#define V_in_ifaddrhmask VNET_GET(in_ifaddrhmask) +#define V_in_ifaddrhashtbl VNET(in_ifaddrhashtbl) +#define V_in_ifaddrhead VNET(in_ifaddrhead) +#define V_in_ifaddrhmask VNET(in_ifaddrhmask) #define INADDR_NHASH_LOG2 9 #define INADDR_NHASH (1 << INADDR_NHASH_LOG2) Modified: head/sys/netinet/ip_divert.c ============================================================================== --- head/sys/netinet/ip_divert.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_divert.c Thu Jul 16 21:13:04 2009 (r195727) @@ -119,8 +119,8 @@ __FBSDID("$FreeBSD$"); static VNET_DEFINE(struct inpcbhead, divcb); static VNET_DEFINE(struct inpcbinfo, divcbinfo); -#define V_divcb VNET_GET(divcb) -#define V_divcbinfo VNET_GET(divcbinfo) +#define V_divcb VNET(divcb) +#define V_divcbinfo VNET(divcbinfo) static u_long div_sendspace = DIVSNDQ; /* XXX sysctl ? */ static u_long div_recvspace = DIVRCVQ; /* XXX sysctl ? */ Modified: head/sys/netinet/ip_fastfwd.c ============================================================================== --- head/sys/netinet/ip_fastfwd.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_fastfwd.c Thu Jul 16 21:13:04 2009 (r195727) @@ -107,7 +107,7 @@ __FBSDID("$FreeBSD$"); #include static VNET_DEFINE(int, ipfastforward_active); -#define V_ipfastforward_active VNET_GET(ipfastforward_active) +#define V_ipfastforward_active VNET(ipfastforward_active) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, &VNET_NAME(ipfastforward_active), 0, "Enable fast IP forwarding"); Modified: head/sys/netinet/ip_fw.h ============================================================================== --- head/sys/netinet/ip_fw.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_fw.h Thu Jul 16 21:13:04 2009 (r195727) @@ -653,12 +653,12 @@ void ipfw_nat_destroy(void); VNET_DECLARE(int, fw_one_pass); VNET_DECLARE(int, fw_enable); -#define V_fw_one_pass VNET_GET(fw_one_pass) -#define V_fw_enable VNET_GET(fw_enable) +#define V_fw_one_pass VNET(fw_one_pass) +#define V_fw_enable VNET(fw_enable) #ifdef INET6 VNET_DECLARE(int, fw6_enable); -#define V_fw6_enable VNET_GET(fw6_enable) +#define V_fw6_enable VNET(fw6_enable) #endif struct ip_fw_chain { @@ -695,7 +695,7 @@ typedef int ipfw_nat_cfg_t(struct sockop #endif VNET_DECLARE(struct ip_fw_chain, layer3_chain); -#define V_layer3_chain VNET_GET(layer3_chain) +#define V_layer3_chain VNET(layer3_chain) #endif /* _KERNEL */ #endif /* _IPFW2_H */ Modified: head/sys/netinet/ip_icmp.c ============================================================================== --- head/sys/netinet/ip_icmp.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_icmp.c Thu Jul 16 21:13:04 2009 (r195727) @@ -89,16 +89,16 @@ static VNET_DEFINE(int, icmp_rfi); static VNET_DEFINE(int, icmp_quotelen); static VNET_DEFINE(int, icmpbmcastecho); -#define V_icmpmaskrepl VNET_GET(icmpmaskrepl) -#define V_icmpmaskfake VNET_GET(icmpmaskfake) -#define V_drop_redirect VNET_GET(drop_redirect) -#define V_log_redirect VNET_GET(log_redirect) -#define V_icmplim VNET_GET(icmplim) -#define V_icmplim_output VNET_GET(icmplim_output) -#define V_reply_src VNET_GET(reply_src) -#define V_icmp_rfi VNET_GET(icmp_rfi) -#define V_icmp_quotelen VNET_GET(icmp_quotelen) -#define V_icmpbmcastecho VNET_GET(icmpbmcastecho) +#define V_icmpmaskrepl VNET(icmpmaskrepl) +#define V_icmpmaskfake VNET(icmpmaskfake) +#define V_drop_redirect VNET(drop_redirect) +#define V_log_redirect VNET(log_redirect) +#define V_icmplim VNET(icmplim) +#define V_icmplim_output VNET(icmplim_output) +#define V_reply_src VNET(reply_src) +#define V_icmp_rfi VNET(icmp_rfi) +#define V_icmp_quotelen VNET(icmp_quotelen) +#define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmpstat), icmpstat, ""); Modified: head/sys/netinet/ip_input.c ============================================================================== --- head/sys/netinet/ip_input.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_input.c Thu Jul 16 21:13:04 2009 (r195727) @@ -95,10 +95,10 @@ static VNET_DEFINE(int, ip_checkinterfac static VNET_DEFINE(int, ip_keepfaith); static VNET_DEFINE(int, ip_sendsourcequench); -#define V_ipsendredirects VNET_GET(ipsendredirects) -#define V_ip_checkinterface VNET_GET(ip_checkinterface) -#define V_ip_keepfaith VNET_GET(ip_keepfaith) -#define V_ip_sendsourcequench VNET_GET(ip_sendsourcequench) +#define V_ipsendredirects VNET(ipsendredirects) +#define V_ip_checkinterface VNET(ip_checkinterface) +#define V_ip_keepfaith VNET(ip_keepfaith) +#define V_ip_sendsourcequench VNET(ip_sendsourcequench) VNET_DEFINE(int, ip_defttl) = IPDEFTTL; VNET_DEFINE(int, ip_do_randomid); @@ -113,17 +113,17 @@ static VNET_DEFINE(int, ip_rsvp_on); VNET_DEFINE(struct socket *, ip_rsvpd); VNET_DEFINE(int, rsvp_on); -#define V_ip_rsvp_on VNET_GET(ip_rsvp_on) +#define V_ip_rsvp_on VNET(ip_rsvp_on) static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ static VNET_DEFINE(int, maxfragsperpacket); static VNET_DEFINE(int, nipq); /* Total # of reass queues */ -#define V_ipq VNET_GET(ipq) -#define V_maxnipq VNET_GET(maxnipq) -#define V_maxfragsperpacket VNET_GET(maxfragsperpacket) -#define V_nipq VNET_GET(nipq) +#define V_ipq VNET(ipq) +#define V_maxnipq VNET(maxnipq) +#define V_maxfragsperpacket VNET(maxfragsperpacket) +#define V_nipq VNET(nipq) VNET_DEFINE(int, ipstealth); @@ -189,7 +189,7 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_S "IP statistics (struct ipstat, netinet/ip_var.h)"); static VNET_DEFINE(uma_zone_t, ipq_zone); -#define V_ipq_zone VNET_GET(ipq_zone) +#define V_ipq_zone VNET(ipq_zone) static struct mtx ipqlock; @@ -225,7 +225,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, #ifdef FLOWTABLE static VNET_DEFINE(int, ip_output_flowtable_size) = 2048; VNET_DEFINE(struct flowtable *, ip_ft); -#define V_ip_output_flowtable_size VNET_GET(ip_output_flowtable_size) +#define V_ip_output_flowtable_size VNET(ip_output_flowtable_size) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, output_flowtable_size, CTLFLAG_RDTUN, &VNET_NAME(ip_output_flowtable_size), 2048, Modified: head/sys/netinet/ip_ipsec.c ============================================================================== --- head/sys/netinet/ip_ipsec.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_ipsec.c Thu Jul 16 21:13:04 2009 (r195727) @@ -77,7 +77,7 @@ static VNET_DEFINE(int, ip4_ipsec_filter #else static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0; #endif -#define V_ip4_ipsec_filtertunnel VNET_GET(ip4_ipsec_filtertunnel) +#define V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtertunnel) SYSCTL_DECL(_net_inet_ipsec); SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUTO, filtertunnel, Modified: head/sys/netinet/ip_var.h ============================================================================== --- head/sys/netinet/ip_var.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ip_var.h Thu Jul 16 21:13:04 2009 (r195727) @@ -171,16 +171,16 @@ VNET_DECLARE(int, rsvp_on); VNET_DECLARE(struct socket *, ip_rsvpd); /* reservation protocol daemon*/ VNET_DECLARE(struct socket *, ip_mrouter); /* multicast routing daemon */ -#define V_ipstat VNET_GET(ipstat) -#define V_ip_id VNET_GET(ip_id) -#define V_ip_defttl VNET_GET(ip_defttl) -#define V_ipforwarding VNET_GET(ipforwarding) +#define V_ipstat VNET(ipstat) +#define V_ip_id VNET(ip_id) +#define V_ip_defttl VNET(ip_defttl) +#define V_ipforwarding VNET(ipforwarding) #ifdef IPSTEALTH -#define V_ipstealth VNET_GET(ipstealth) +#define V_ipstealth VNET(ipstealth) #endif -#define V_rsvp_on VNET_GET(rsvp_on) -#define V_ip_rsvpd VNET_GET(ip_rsvpd) -#define V_ip_mrouter VNET_GET(ip_mrouter) +#define V_rsvp_on VNET(rsvp_on) +#define V_ip_rsvpd VNET(ip_rsvpd) +#define V_ip_mrouter VNET(ip_mrouter) extern u_char ip_protox[]; extern int (*legal_vif_num)(int); @@ -243,7 +243,7 @@ extern int (*ip_dn_io_ptr)(struct mbuf * extern void (*ip_dn_ruledel_ptr)(void *); /* in ip_fw2.c */ VNET_DECLARE(int, ip_do_randomid); -#define V_ip_do_randomid VNET_GET(ip_do_randomid) +#define V_ip_do_randomid VNET(ip_do_randomid) #define ip_newid() ((V_ip_do_randomid != 0) ? ip_randomid() : \ htons(V_ip_id++)) Modified: head/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw2.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ipfw/ip_fw2.c Thu Jul 16 21:13:04 2009 (r195727) @@ -116,10 +116,10 @@ static VNET_DEFINE(int, fw_verbose); static VNET_DEFINE(struct callout, ipfw_timeout); static VNET_DEFINE(int, verbose_limit); -#define V_set_disable VNET_GET(set_disable) -#define V_fw_verbose VNET_GET(fw_verbose) -#define V_ipfw_timeout VNET_GET(ipfw_timeout) -#define V_verbose_limit VNET_GET(verbose_limit) +#define V_set_disable VNET(set_disable) +#define V_fw_verbose VNET(fw_verbose) +#define V_ipfw_timeout VNET(ipfw_timeout) +#define V_verbose_limit VNET(verbose_limit) #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT static int default_to_accept = 1; @@ -151,7 +151,7 @@ struct table_entry { }; static VNET_DEFINE(int, autoinc_step); -#define V_autoinc_step VNET_GET(autoinc_step) +#define V_autoinc_step VNET(autoinc_step) extern int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); @@ -220,9 +220,9 @@ static VNET_DEFINE(ipfw_dyn_rule **, ipf static VNET_DEFINE(u_int32_t, dyn_buckets); static VNET_DEFINE(u_int32_t, curr_dyn_buckets); -#define V_ipfw_dyn_v VNET_GET(ipfw_dyn_v) -#define V_dyn_buckets VNET_GET(dyn_buckets) -#define V_curr_dyn_buckets VNET_GET(curr_dyn_buckets) +#define V_ipfw_dyn_v VNET(ipfw_dyn_v) +#define V_dyn_buckets VNET(dyn_buckets) +#define V_curr_dyn_buckets VNET(curr_dyn_buckets) static struct mtx ipfw_dyn_mtx; /* mutex guarding dynamic rules */ #define IPFW_DYN_LOCK_INIT() \ @@ -242,12 +242,12 @@ static VNET_DEFINE(u_int32_t, dyn_rst_li static VNET_DEFINE(u_int32_t, dyn_udp_lifetime); static VNET_DEFINE(u_int32_t, dyn_short_lifetime); -#define V_dyn_ack_lifetime VNET_GET(dyn_ack_lifetime) -#define V_dyn_syn_lifetime VNET_GET(dyn_syn_lifetime) -#define V_dyn_fin_lifetime VNET_GET(dyn_fin_lifetime) -#define V_dyn_rst_lifetime VNET_GET(dyn_rst_lifetime) -#define V_dyn_udp_lifetime VNET_GET(dyn_udp_lifetime) -#define V_dyn_short_lifetime VNET_GET(dyn_short_lifetime) +#define V_dyn_ack_lifetime VNET(dyn_ack_lifetime) +#define V_dyn_syn_lifetime VNET(dyn_syn_lifetime) +#define V_dyn_fin_lifetime VNET(dyn_fin_lifetime) +#define V_dyn_rst_lifetime VNET(dyn_rst_lifetime) +#define V_dyn_udp_lifetime VNET(dyn_udp_lifetime) +#define V_dyn_short_lifetime VNET(dyn_short_lifetime) /* * Keepalives are sent if dyn_keepalive is set. They are sent every @@ -261,19 +261,19 @@ static VNET_DEFINE(u_int32_t, dyn_keepal static VNET_DEFINE(u_int32_t, dyn_keepalive_period); static VNET_DEFINE(u_int32_t, dyn_keepalive); -#define V_dyn_keepalive_interval VNET_GET(dyn_keepalive_interval) -#define V_dyn_keepalive_period VNET_GET(dyn_keepalive_period) -#define V_dyn_keepalive VNET_GET(dyn_keepalive) +#define V_dyn_keepalive_interval VNET(dyn_keepalive_interval) +#define V_dyn_keepalive_period VNET(dyn_keepalive_period) +#define V_dyn_keepalive VNET(dyn_keepalive) static VNET_DEFINE(u_int32_t, static_count); /* # of static rules */ static VNET_DEFINE(u_int32_t, static_len); /* bytes of static rules */ static VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ static VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ -#define V_static_count VNET_GET(static_count) -#define V_static_len VNET_GET(static_len) -#define V_dyn_count VNET_GET(dyn_count) -#define V_dyn_max VNET_GET(dyn_max) +#define V_static_count VNET(static_count) +#define V_static_len VNET(static_len) +#define V_dyn_count VNET(dyn_count) +#define V_dyn_max VNET(dyn_max) #ifdef SYSCTL_NODE SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, @@ -323,7 +323,7 @@ static struct sysctl_oid *ip6_fw_sysctl_ #endif /* INET6 */ static VNET_DEFINE(int, fw_deny_unknown_exthdrs); -#define V_fw_deny_unknown_exthdrs VNET_GET(fw_deny_unknown_exthdrs) +#define V_fw_deny_unknown_exthdrs VNET(fw_deny_unknown_exthdrs) /* * L3HDR maps an ipv4 pointer into a layer3 header pointer of type T @@ -780,7 +780,7 @@ send_reject6(struct ip_fw_args *args, in /* counter for ipfw_log(NULL...) */ static VNET_DEFINE(u_int64_t, norule_counter); -#define V_norule_counter VNET_GET(norule_counter) +#define V_norule_counter VNET(norule_counter) #define SNPARGS(buf, len) buf + len, sizeof(buf) > len ? sizeof(buf) - len : 0 #define SNP(buf) buf, sizeof(buf) Modified: head/sys/netinet/ipfw/ip_fw_nat.c ============================================================================== --- head/sys/netinet/ipfw/ip_fw_nat.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/ipfw/ip_fw_nat.c Thu Jul 16 21:13:04 2009 (r195727) @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_IPFW); static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); -#define V_ifaddr_event_tag VNET_GET(ifaddr_event_tag) +#define V_ifaddr_event_tag VNET(ifaddr_event_tag) extern ipfw_nat_t *ipfw_nat_ptr; extern ipfw_nat_cfg_t *ipfw_nat_cfg_ptr; Modified: head/sys/netinet/raw_ip.c ============================================================================== --- head/sys/netinet/raw_ip.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/raw_ip.c Thu Jul 16 21:13:04 2009 (r195727) @@ -77,8 +77,8 @@ __FBSDID("$FreeBSD$"); VNET_DEFINE(struct inpcbhead, ripcb); VNET_DEFINE(struct inpcbinfo, ripcbinfo); -#define V_ripcb VNET_GET(ripcb) -#define V_ripcbinfo VNET_GET(ripcbinfo) +#define V_ripcb VNET(ripcb) +#define V_ripcbinfo VNET(ripcbinfo) /* * Control and data hooks for ipfw and dummynet. Modified: head/sys/netinet/tcp_hostcache.c ============================================================================== --- head/sys/netinet/tcp_hostcache.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_hostcache.c Thu Jul 16 21:13:04 2009 (r195727) @@ -109,8 +109,8 @@ __FBSDID("$FreeBSD$"); static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); static VNET_DEFINE(struct callout, tcp_hc_callout); -#define V_tcp_hostcache VNET_GET(tcp_hostcache) -#define V_tcp_hc_callout VNET_GET(tcp_hc_callout) +#define V_tcp_hostcache VNET(tcp_hostcache) +#define V_tcp_hc_callout VNET(tcp_hc_callout) static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); static struct hc_metrics *tcp_hc_insert(struct in_conninfo *); Modified: head/sys/netinet/tcp_reass.c ============================================================================== --- head/sys/netinet/tcp_reass.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_reass.c Thu Jul 16 21:13:04 2009 (r195727) @@ -79,9 +79,9 @@ VNET_DEFINE(int, tcp_reass_qsize); static VNET_DEFINE(int, tcp_reass_maxqlen); static VNET_DEFINE(int, tcp_reass_overflows); -#define V_tcp_reass_maxseg VNET_GET(tcp_reass_maxseg) -#define V_tcp_reass_maxqlen VNET_GET(tcp_reass_maxqlen) -#define V_tcp_reass_overflows VNET_GET(tcp_reass_overflows) +#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) +#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) +#define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); Modified: head/sys/netinet/tcp_sack.c ============================================================================== --- head/sys/netinet/tcp_sack.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_sack.c Thu Jul 16 21:13:04 2009 (r195727) @@ -128,11 +128,11 @@ VNET_DEFINE(int, tcp_sack_maxholes); VNET_DEFINE(int, tcp_sack_globalmaxholes); VNET_DEFINE(int, tcp_sack_globalholes); -#define V_sack_hole_zone VNET_GET(sack_hole_zone) -#define V_tcp_do_sack VNET_GET(tcp_do_sack) -#define V_tcp_sack_maxholes VNET_GET(tcp_sack_maxholes) -#define V_tcp_sack_globalmaxholes VNET_GET(tcp_sack_globalmaxholes) -#define V_tcp_sack_globalholes VNET_GET(tcp_sack_globalholes) +#define V_sack_hole_zone VNET(sack_hole_zone) +#define V_tcp_do_sack VNET(tcp_do_sack) +#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) +#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) +#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK"); SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW, Modified: head/sys/netinet/tcp_subr.c ============================================================================== --- head/sys/netinet/tcp_subr.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_subr.c Thu Jul 16 21:13:04 2009 (r195727) @@ -126,13 +126,13 @@ static VNET_DEFINE(int, tcp_inflight_min static VNET_DEFINE(int, tcp_inflight_max); static VNET_DEFINE(int, tcp_inflight_stab); -#define V_icmp_may_rst VNET_GET(icmp_may_rst) -#define V_tcp_isn_reseed_interval VNET_GET(tcp_isn_reseed_interval) -#define V_tcp_inflight_enable VNET_GET(tcp_inflight_enable) -#define V_tcp_inflight_rttthresh VNET_GET(tcp_inflight_rttthresh) -#define V_tcp_inflight_min VNET_GET(tcp_inflight_min) -#define V_tcp_inflight_max VNET_GET(tcp_inflight_max) -#define V_tcp_inflight_stab VNET_GET(tcp_inflight_stab) +#define V_icmp_may_rst VNET(icmp_may_rst) +#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) +#define V_tcp_inflight_enable VNET(tcp_inflight_enable) +#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) +#define V_tcp_inflight_min VNET(tcp_inflight_min) +#define V_tcp_inflight_max VNET(tcp_inflight_max) +#define V_tcp_inflight_stab VNET(tcp_inflight_stab) static int sysctl_net_inet_tcp_mss_check(SYSCTL_HANDLER_ARGS) @@ -252,7 +252,7 @@ SYSCTL_VNET_INT(_net_inet_tcp_inflight, "Inflight Algorithm Stabilization 20 = 2 packets"); VNET_DEFINE(uma_zone_t, sack_hole_zone); -#define V_sack_hole_zone VNET_GET(sack_hole_zone) +#define V_sack_hole_zone VNET(sack_hole_zone) static struct inpcb *tcp_notify(struct inpcb *, int); static void tcp_isn_tick(void *); @@ -279,7 +279,7 @@ struct tcpcb_mem { }; static VNET_DEFINE(uma_zone_t, tcpcb_zone); -#define V_tcpcb_zone VNET_GET(tcpcb_zone) +#define V_tcpcb_zone VNET(tcpcb_zone) MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); struct callout isn_callout; @@ -1514,10 +1514,10 @@ static VNET_DEFINE(int, isn_last_reseed) static VNET_DEFINE(u_int32_t, isn_offset); static VNET_DEFINE(u_int32_t, isn_offset_old); -#define V_isn_secret VNET_GET(isn_secret) -#define V_isn_last_reseed VNET_GET(isn_last_reseed) -#define V_isn_offset VNET_GET(isn_offset) -#define V_isn_offset_old VNET_GET(isn_offset_old) +#define V_isn_secret VNET(isn_secret) +#define V_isn_last_reseed VNET(isn_last_reseed) +#define V_isn_offset VNET(isn_offset) +#define V_isn_offset_old VNET(isn_offset_old) tcp_seq tcp_new_isn(struct tcpcb *tp) Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_syncache.c Thu Jul 16 21:13:04 2009 (r195727) @@ -103,9 +103,9 @@ static VNET_DEFINE(int, tcp_syncookies); static VNET_DEFINE(int, tcp_syncookiesonly); VNET_DEFINE(int, tcp_sc_rst_sock_fail); -#define V_tcp_syncache VNET_GET(tcp_syncache) -#define V_tcp_syncookies VNET_GET(tcp_syncookies) -#define V_tcp_syncookiesonly VNET_GET(tcp_syncookiesonly) +#define V_tcp_syncache VNET(tcp_syncache) +#define V_tcp_syncookies VNET(tcp_syncookies) +#define V_tcp_syncookiesonly VNET(tcp_syncookiesonly) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, &VNET_NAME(tcp_syncookies), 0, Modified: head/sys/netinet/tcp_timewait.c ============================================================================== --- head/sys/netinet/tcp_timewait.c Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_timewait.c Thu Jul 16 21:13:04 2009 (r195727) @@ -104,8 +104,8 @@ static VNET_DEFINE(uma_zone_t, tcptw_zon static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); VNET_DEFINE(int, nolocaltimewait); -#define V_tcptw_zone VNET_GET(tcptw_zone) -#define V_twq_2msl VNET_GET(twq_2msl) +#define V_tcptw_zone VNET(tcptw_zone) +#define V_twq_2msl VNET(twq_2msl) static void tcp_tw_2msl_reset(struct tcptw *, int); static void tcp_tw_2msl_stop(struct tcptw *); Modified: head/sys/netinet/tcp_var.h ============================================================================== --- head/sys/netinet/tcp_var.h Thu Jul 16 20:29:36 2009 (r195726) +++ head/sys/netinet/tcp_var.h Thu Jul 16 21:13:04 2009 (r195727) @@ -44,9 +44,9 @@ VNET_DECLARE(int, tcp_do_rfc1323); VNET_DECLARE(int, tcp_reass_qsize); VNET_DECLARE(struct uma_zone *, tcp_reass_zone); -#define V_tcp_do_rfc1323 VNET_GET(tcp_do_rfc1323) -#define V_tcp_reass_qsize VNET_GET(tcp_reass_qsize) -#define V_tcp_reass_zone VNET_GET(tcp_reass_zone) +#define V_tcp_do_rfc1323 VNET(tcp_do_rfc1323) +#define V_tcp_reass_qsize VNET(tcp_reass_qsize) +#define V_tcp_reass_zone VNET(tcp_reass_zone) #endif /* _KERNEL */ @@ -551,16 +551,16 @@ VNET_DECLARE(int, path_mtu_discovery); VNET_DECLARE(int, ss_fltsz); VNET_DECLARE(int, ss_fltsz_local); -#define V_tcb VNET_GET(tcb) -#define V_tcbinfo VNET_GET(tcbinfo) -#define V_tcpstat VNET_GET(tcpstat) -#define V_tcp_mssdflt VNET_GET(tcp_mssdflt) -#define V_tcp_minmss VNET_GET(tcp_minmss) -#define V_tcp_delack_enabled VNET_GET(tcp_delack_enabled) -#define V_tcp_do_newreno VNET_GET(tcp_do_newreno) -#define V_path_mtu_discovery VNET_GET(path_mtu_discovery) -#define V_ss_fltsz VNET_GET(ss_fltsz) -#define V_ss_fltsz_local VNET_GET(ss_fltsz_local) +#define V_tcb VNET(tcb) +#define V_tcbinfo VNET(tcbinfo) +#define V_tcpstat VNET(tcpstat) +#define V_tcp_mssdflt VNET(tcp_mssdflt) +#define V_tcp_minmss VNET(tcp_minmss) +#define V_tcp_delack_enabled VNET(tcp_delack_enabled) +#define V_tcp_do_newreno VNET(tcp_do_newreno) +#define V_path_mtu_discovery VNET(path_mtu_discovery) +#define V_ss_fltsz VNET(ss_fltsz) +#define V_ss_fltsz_local VNET(ss_fltsz_local) VNET_DECLARE(int, blackhole); VNET_DECLARE(int, drop_synfin); @@ -573,30 +573,30 @@ VNET_DECLARE(int, tcp_autorcvbuf_max); VNET_DECLARE(int, tcp_do_rfc3465); VNET_DECLARE(int, tcp_abc_l_var); -#define V_blackhole VNET_GET(blackhole) -#define V_drop_synfin VNET_GET(drop_synfin) -#define V_tcp_do_rfc3042 VNET_GET(tcp_do_rfc3042) -#define V_tcp_do_rfc3390 VNET_GET(tcp_do_rfc3390) -#define V_tcp_insecure_rst VNET_GET(tcp_insecure_rst) -#define V_tcp_do_autorcvbuf VNET_GET(tcp_do_autorcvbuf) -#define V_tcp_autorcvbuf_inc VNET_GET(tcp_autorcvbuf_inc) -#define V_tcp_autorcvbuf_max VNET_GET(tcp_autorcvbuf_max) -#define V_tcp_do_rfc3465 VNET_GET(tcp_do_rfc3465) -#define V_tcp_abc_l_var VNET_GET(tcp_abc_l_var) +#define V_blackhole VNET(blackhole) +#define V_drop_synfin VNET(drop_synfin) +#define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) +#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) +#define V_tcp_insecure_rst VNET(tcp_insecure_rst) +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) +#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) +#define V_tcp_abc_l_var VNET(tcp_abc_l_var) VNET_DECLARE(int, tcp_do_tso); VNET_DECLARE(int, tcp_do_autosndbuf); VNET_DECLARE(int, tcp_autosndbuf_inc); VNET_DECLARE(int, tcp_autosndbuf_max); -#define V_tcp_do_tso VNET_GET(tcp_do_tso) -#define V_tcp_do_autosndbuf VNET_GET(tcp_do_autosndbuf) -#define V_tcp_autosndbuf_inc VNET_GET(tcp_autosndbuf_inc) -#define V_tcp_autosndbuf_max VNET_GET(tcp_autosndbuf_max) +#define V_tcp_do_tso VNET(tcp_do_tso) +#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) +#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) +#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) VNET_DECLARE(int, nolocaltimewait); -#define V_nolocaltimewait VNET_GET(nolocaltimewait) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 03:03:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8CC1106566B; Fri, 17 Jul 2009 03:03:41 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) Received: from d4407.kankyo-u.ac.jp (unknown [IPv6:2001:3e0:a84:2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 4AFEA8FC17; Fri, 17 Jul 2009 03:03:41 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) Received: from roddy.4407.kankyo-u.ac.jp.kankyo-u.ac.jp (localhost [IPv6:::1]) by d4407.kankyo-u.ac.jp (8.14.3/8.14.3) with ESMTP id n6H2crmZ007802; Fri, 17 Jul 2009 11:39:05 +0900 (JST) (envelope-from nakaji@kankyo-u.ac.jp) Sender: nakaji@kankyo-u.ac.jp From: NAKAJI Hiroyuki To: Ed Schouten References: <200906231410.n5NEAk85078285@svn.freebsd.org> Date: Fri, 17 Jul 2009 11:38:53 +0900 In-Reply-To: <200906231410.n5NEAk85078285@svn.freebsd.org> (Ed Schouten's message of "Tue, 23 Jun 2009 14:10:46 +0000 (UTC)") Message-ID: <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new Cc: svn-src-head@freebsd.org Subject: Re: head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 03:03:42 -0000 Hello Ed, This breaks buildworld. I think it's better to revert the change, because sinclude is not used in other Makefiles. Thanks. ===> lib/libc (cleandir) "/usr/src/lib/libc/stdlib/Makefile.inc", line 19: Need an operator make: fatal errors encountered -- cannot continue *** Error code 1 Stop in /usr/src/lib. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. >>>>> In <200906231410.n5NEAk85078285@svn.freebsd.org> >>>>> Ed Schouten wrote: > Author: ed > Date: Tue Jun 23 14:10:46 2009 > New Revision: 194703 > URL: http://svn.freebsd.org/changeset/base/194703 > Log: > Simplify. We can just use .sinclude here. -- NAKAJI Hiroyuki From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 08:01:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B403D1065673 for ; Fri, 17 Jul 2009 08:01:35 +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 551368FC1A for ; Fri, 17 Jul 2009 08:01:35 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 8E65D1CF29; Fri, 17 Jul 2009 10:01:34 +0200 (CEST) Date: Fri, 17 Jul 2009 10:01:34 +0200 From: Ed Schouten To: NAKAJI Hiroyuki Message-ID: <20090717080134.GM48776@hoeg.nl> References: <200906231410.n5NEAk85078285@svn.freebsd.org> <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="NqG2NmZMe5HOgOsz" Content-Disposition: inline In-Reply-To: <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org Subject: Re: head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 08:01:36 -0000 --NqG2NmZMe5HOgOsz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, * NAKAJI Hiroyuki wrote: > This breaks buildworld. How could this break buildworld? The patch has been sitting in SVN for almost a month. --=20 Ed Schouten WWW: http://80386.nl/ --NqG2NmZMe5HOgOsz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpgL94ACgkQ52SDGA2eCwWfcQCfTQRD20mVu8hw7zJfy3RGRABl /toAn3VVy/pRRWcaSNN9n/gUZfCavPmE =hY5l -----END PGP SIGNATURE----- --NqG2NmZMe5HOgOsz-- From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 09:52:36 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FC4C1065675; Fri, 17 Jul 2009 09:52:36 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 5098A8FC14; Fri, 17 Jul 2009 09:52:36 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from toad.stack.nl (toad.stack.nl [IPv6:2001:610:1108:5010::135]) by mx1.stack.nl (Postfix) with ESMTP id 7B03035995B; Fri, 17 Jul 2009 11:52:35 +0200 (CEST) Received: by toad.stack.nl (Postfix, from userid 1677) id EA13B73FA2; Fri, 17 Jul 2009 11:52:34 +0200 (CEST) Date: Fri, 17 Jul 2009 11:52:34 +0200 From: Jilles Tjoelker To: Tim Kientzle Message-ID: <20090717095234.GA48647@stack.nl> References: <200907081523.n68FNIpi055036@svn.freebsd.org> <20090709173046.GA48155@stack.nl> <4A5CAC1B.4070006@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A5CAC1B.4070006@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: r195458 - in head: include lib/libc/sys sys/bsm sys/compat/freebsd32 sys/compat/svr4 sys/i386/ibcs2 sys/kern sys/sys X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 09:52:37 -0000 On Tue, Jul 14, 2009 at 09:02:35AM -0700, Tim Kientzle wrote: > Another data point: I've started looking at the *at() > functions for libarchive's deep directory handling. The > current code uses chdir() to manipulate files with very long > pathnames, but that causes complications for libarchive > clients that I'd like to eliminate. Using *at() functions > to manage a "virtual current directory" looks a lot more robust. > Unfortunately, there are still a few operations that are > unavailable with this paradigm: > * ACL functions > * extattr functions Right. As with pathconf(), "at" variants with AT_SYMLINK_NOFOLLOW option would be useful here. > * link() > * symlink() linkat() and symlinkat() exist. In addition to providing the "at" functionality, linkat() allows creating hard links to symlinks. -- Jilles Tjoelker From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 10:02:20 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 007E1106564A for ; Fri, 17 Jul 2009 10:02:20 +0000 (UTC) (envelope-from nakaji@jp.FreeBSD.org) Received: from d4407.kankyo-u.ac.jp (unknown [IPv6:2001:3e0:a84:2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 8A1E98FC0C for ; Fri, 17 Jul 2009 10:02:19 +0000 (UTC) (envelope-from nakaji@jp.FreeBSD.org) Received: from roddy.4407.kankyo-u.ac.jp.kankyo-u.ac.jp (localhost [IPv6:::1]) by d4407.kankyo-u.ac.jp (8.14.3/8.14.3) with ESMTP id n6H9RR9W063300; Fri, 17 Jul 2009 18:27:34 +0900 (JST) (envelope-from nakaji@jp.freebsd.org) From: NAKAJI Hiroyuki To: Ed Schouten Organization: Japan FreeBSD User's Group References: <200906231410.n5NEAk85078285@svn.freebsd.org> <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> <20090717080134.GM48776@hoeg.nl> Date: Fri, 17 Jul 2009 18:27:27 +0900 In-Reply-To: <20090717080134.GM48776@hoeg.nl> (Ed Schouten's message of "Fri, 17 Jul 2009 10:01:34 +0200") Message-ID: <87ws67vev4.fsf@roddy.4407.kankyo-u.ac.jp> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new Cc: svn-src-head@freebsd.org Subject: Re: head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 10:02:20 -0000 >>>>> In <20090717080134.GM48776@hoeg.nl> >>>>> Ed Schouten wrote: > * NAKAJI Hiroyuki wrote: > > This breaks buildworld. > How could this break buildworld? The patch has been sitting in SVN for > almost a month. I saw the following error with /usr/bin/make on June 3. Strange. ===> lib/libc (cleandir) "/usr/src/lib/libc/stdlib/Makefile.inc", line 19: Need an operator make: fatal errors encountered -- cannot continue *** Error code 1 Stop in /usr/src/lib. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. -- NAKAJI Hiroyuki From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 10:11:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96DAD106566C for ; Fri, 17 Jul 2009 10:11:05 +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 358978FC24 for ; Fri, 17 Jul 2009 10:11:05 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 545231CF34; Fri, 17 Jul 2009 12:11:04 +0200 (CEST) Date: Fri, 17 Jul 2009 12:11:04 +0200 From: Ed Schouten To: NAKAJI Hiroyuki Message-ID: <20090717101104.GN48776@hoeg.nl> References: <200906231410.n5NEAk85078285@svn.freebsd.org> <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> <20090717080134.GM48776@hoeg.nl> <87ws67vev4.fsf@roddy.4407.kankyo-u.ac.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="D+IeUTYwmnQ4es4F" Content-Disposition: inline In-Reply-To: <87ws67vev4.fsf@roddy.4407.kankyo-u.ac.jp> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org Subject: Re: head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 10:11:06 -0000 --D+IeUTYwmnQ4es4F Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * NAKAJI Hiroyuki wrote: > >>>>> In <20090717080134.GM48776@hoeg.nl>=20 > >>>>> Ed Schouten wrote: >=20 > > * NAKAJI Hiroyuki wrote: > > > This breaks buildworld. >=20 > > How could this break buildworld? The patch has been sitting in SVN for > > almost a month. >=20 > I saw the following error with /usr/bin/make on June 3. Strange. =2Esinclude has been added to make in September 2005 by phk. Can you tell me a little more about your setup? For example: which version of FreeBSD are you using? HEAD from June 3? You just ran `make buildworld'? What are the contents of /etc/make.conf and /etc/src.conf? Yours, --=20 Ed Schouten WWW: http://80386.nl/ --D+IeUTYwmnQ4es4F Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpgTjgACgkQ52SDGA2eCwUKkACeIv8y7xdBSncjrMsjfqdb6m3t GpAAnA5rv781W2LTRS78KkrGuxiwQQU4 =e+Cp -----END PGP SIGNATURE----- --D+IeUTYwmnQ4es4F-- From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 10:43:02 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7010106564A; Fri, 17 Jul 2009 10:43:02 +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 A23B68FC0C; Fri, 17 Jul 2009 10:43:02 +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 AF9246D418; Fri, 17 Jul 2009 12:43:01 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id 85DA4844B4; Fri, 17 Jul 2009 12:43:00 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Peter Jeremy References: <37131.1247214217@critter.freebsd.dk> <4A56FC7C.8060107@samsco.org> <4A5A98FA.3050208@samsco.org> <20090714003030.GE43362@server.vk2pj.dyndns.org> Date: Fri, 17 Jul 2009 12:43:00 +0200 In-Reply-To: <20090714003030.GE43362@server.vk2pj.dyndns.org> (Peter Jeremy's message of "Tue, 14 Jul 2009 10:30:30 +1000") Message-ID: <86my73h9or.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "Carlos A. M. dos Santos" , svn-src-head@freebsd.org, Scott Long , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r195534 - in head: etc/mtree include lib/libcam sbin/camcontrol share/man/man4 sys/cam sys/cam/ata sys/cam/scsi sys/conf sys/dev/advansys sys/dev/ahci sys/dev/aic7xxx sys/dev/amd sys/de... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 10:43:03 -0000 Peter Jeremy writes: > Having removable devices in the same space as fixed devices [...] We already do. Most Linux distros solved this problem years ago by using labels / UUIDs instead of device names in fstab. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 14:02:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7680B1065670; Fri, 17 Jul 2009 14:02:21 +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 60A2E8FC1E; Fri, 17 Jul 2009 14:02: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 n6HE2LPp070944; Fri, 17 Jul 2009 14:02:21 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HE2Lwh070925; Fri, 17 Jul 2009 14:02:21 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200907171402.n6HE2Lwh070925@svn.freebsd.org> From: Robert Watson Date: Fri, 17 Jul 2009 14:02: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: r195740 - in head: contrib/openbsm contrib/openbsm/config contrib/openbsm/etc contrib/openbsm/libauditd contrib/openbsm/libbsm contrib/openbsm/man contrib/openbsm/sys/bsm sys/bsm sys/se... X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 14:02:22 -0000 Author: rwatson Date: Fri Jul 17 14:02:20 2009 New Revision: 195740 URL: http://svn.freebsd.org/changeset/base/195740 Log: Import OpenBSM 1.1p1 from vendor branch to 8-CURRENT, populating contrib/openbsm and a subset also imported into sys/security/audit. This patch release addresses several minor issues: - Fixes to AUT_SOCKUNIX token parsing. - IPv6 support for au_to_me(3). - Improved robustness in the parsing of audit_control, especially long flags/naflags strings and whitespace in all fields. - Add missing conversion of a number of FreeBSD/Mac OS X errnos to/from BSM error number space. MFC after: 3 weeks Obtained from: TrustedBSD Project Sponsored by: Apple, Inc. Approved by: re (kib) Modified: head/contrib/openbsm/ (props changed) head/contrib/openbsm/NEWS head/contrib/openbsm/VERSION head/contrib/openbsm/config/config.h head/contrib/openbsm/configure head/contrib/openbsm/configure.ac head/contrib/openbsm/etc/audit_event head/contrib/openbsm/libauditd/auditd_lib.c head/contrib/openbsm/libbsm/bsm_control.c head/contrib/openbsm/libbsm/bsm_errno.c head/contrib/openbsm/libbsm/bsm_io.c head/contrib/openbsm/libbsm/bsm_token.c head/contrib/openbsm/man/audit_control.5 head/contrib/openbsm/sys/bsm/audit.h head/contrib/openbsm/sys/bsm/audit_kevents.h head/sys/bsm/audit.h head/sys/bsm/audit_kevents.h head/sys/security/audit/audit_bsm_errno.c head/sys/security/audit/audit_bsm_token.c Modified: head/contrib/openbsm/NEWS ============================================================================== --- head/contrib/openbsm/NEWS Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/NEWS Fri Jul 17 14:02:20 2009 (r195740) @@ -1,5 +1,14 @@ OpenBSM Version History +OpenBSM 1.1p1 + +- Fixes to AUT_SOCKUNIX token parsing. +- IPv6 support for au_to_me(3). +- Improved robustness in the parsing of audit_control, especially long + flags/naflags strings and whitespace in all fields. +- Add missing conversion of a number of FreeBSD/Mac OS X errnos to/from BSM + error number space. + OpenBSM 1.1 - Change auditon(2) parameters and data structures to be 32/64-bit architecture @@ -449,4 +458,4 @@ OpenBSM 1.0 alpha 1 to support reloading of kernel event table. - Allow comments in /etc/security configuration files. -$P4: //depot/projects/trustedbsd/openbsm/NEWS#40 $ +$P4: //depot/projects/trustedbsd/openbsm/NEWS#42 $ Modified: head/contrib/openbsm/VERSION ============================================================================== --- head/contrib/openbsm/VERSION Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/VERSION Fri Jul 17 14:02:20 2009 (r195740) @@ -1 +1 @@ -OPENBSM_1_1 +OPENBSM_1_1p1 Modified: head/contrib/openbsm/config/config.h ============================================================================== --- head/contrib/openbsm/config/config.h Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/config/config.h Fri Jul 17 14:02:20 2009 (r195740) @@ -1,15 +1,14 @@ /* config/config.h. Generated from config.h.in by configure. */ /* config/config.h.in. Generated from configure.ac by autoheader. */ -/* $FreeBSD$ */ /* Define to 1 if you have the `alarm' function. */ #define HAVE_ALARM 1 /* Define if audit system calls present */ -#define HAVE_AUDIT_SYSCALLS +#define HAVE_AUDIT_SYSCALLS /**/ /* Define if be32enc is present */ -#define HAVE_BE32ENC +#define HAVE_BE32ENC /**/ /* Define to 1 if you have the `bzero' function. */ #define HAVE_BZERO 1 @@ -33,7 +32,7 @@ #define HAVE_FTRUNCATE 1 /* Define if queue.h includes LIST_FIRST */ -#define HAVE_FULL_QUEUE_H +#define HAVE_FULL_QUEUE_H /**/ /* Define to 1 if you have the `gettimeofday' function. */ #define HAVE_GETTIMEOFDAY 1 @@ -153,7 +152,7 @@ /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ -/* #undef LSTAT_FOLLOWS_SLASHED_SYMLINK */ +#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 /* Name of package */ #define PACKAGE "OpenBSM" @@ -165,13 +164,13 @@ #define PACKAGE_NAME "OpenBSM" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "OpenBSM 1.1beta1" +#define PACKAGE_STRING "OpenBSM 1.1p1" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "openbsm" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.1beta1" +#define PACKAGE_VERSION "1.1p1" /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void @@ -189,10 +188,13 @@ /* #undef USE_MACH_IPC */ /* Define to use native include files */ -#define USE_NATIVE_INCLUDES +#define USE_NATIVE_INCLUDES /**/ /* Version number of package */ -#define VERSION "1.1beta1" +#define VERSION "1.1p1" + +/* Use extended API on platforms that require it */ +#define _GNU_SOURCE /**/ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ Modified: head/contrib/openbsm/configure ============================================================================== --- head/contrib/openbsm/configure Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/configure Fri Jul 17 14:02:20 2009 (r195740) @@ -1,7 +1,7 @@ #! /bin/sh -# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#51 . +# From configure.ac P4: //depot/projects/trustedbsd/openbsm/configure.ac#52 . # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for OpenBSM 1.1. +# Generated by GNU Autoconf 2.62 for OpenBSM 1.1p1. # # Report bugs to . # @@ -751,8 +751,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='OpenBSM' PACKAGE_TARNAME='openbsm' -PACKAGE_VERSION='1.1' -PACKAGE_STRING='OpenBSM 1.1' +PACKAGE_VERSION='1.1p1' +PACKAGE_STRING='OpenBSM 1.1p1' PACKAGE_BUGREPORT='trustedbsd-audit@TrustesdBSD.org' ac_unique_file="bin/auditreduce/auditreduce.c" @@ -1492,7 +1492,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures OpenBSM 1.1 to adapt to many kinds of systems. +\`configure' configures OpenBSM 1.1p1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1562,7 +1562,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of OpenBSM 1.1:";; + short | recursive ) echo "Configuration of OpenBSM 1.1p1:";; esac cat <<\_ACEOF @@ -1671,7 +1671,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -OpenBSM configure 1.1 +OpenBSM configure 1.1p1 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1685,7 +1685,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by OpenBSM $as_me 1.1, which was +It was created by OpenBSM $as_me 1.1p1, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -19662,7 +19662,7 @@ fi # Define the identity of the package. PACKAGE=OpenBSM - VERSION=1.1 + VERSION=1.1p1 cat >>confdefs.h <<_ACEOF @@ -24400,7 +24400,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by OpenBSM $as_me 1.1, which was +This file was extended by OpenBSM $as_me 1.1p1, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -24453,7 +24453,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -OpenBSM config.status 1.1 +OpenBSM config.status 1.1p1 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Modified: head/contrib/openbsm/configure.ac ============================================================================== --- head/contrib/openbsm/configure.ac Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/configure.ac Fri Jul 17 14:02:20 2009 (r195740) @@ -2,8 +2,8 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) -AC_INIT([OpenBSM], [1.1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) -AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#52 $]) +AC_INIT([OpenBSM], [1.1p1], [trustedbsd-audit@TrustesdBSD.org],[openbsm]) +AC_REVISION([$P4: //depot/projects/trustedbsd/openbsm/configure.ac#53 $]) AC_CONFIG_SRCDIR([bin/auditreduce/auditreduce.c]) AC_CONFIG_AUX_DIR(config) AC_CONFIG_HEADER([config/config.h]) Modified: head/contrib/openbsm/etc/audit_event ============================================================================== --- head/contrib/openbsm/etc/audit_event Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/etc/audit_event Fri Jul 17 14:02:20 2009 (r195740) @@ -1,5 +1,5 @@ # -# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#39 $ +# $P4: //depot/projects/trustedbsd/openbsm/etc/audit_event#40 $ # $FreeBSD$ # # The mapping between event identifiers and values is also hard-coded in @@ -556,6 +556,7 @@ 43193:AUE_PWRITE:pwrite(2):no 43194:AUE_FSCTL:fsctl():fm 43195:AUE_FFSCTL:ffsctl():fm +43196:AUE_LPATHCONF:lpathconf(2):fa # # Solaris userspace events. # Modified: head/contrib/openbsm/libauditd/auditd_lib.c ============================================================================== --- head/contrib/openbsm/libauditd/auditd_lib.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/libauditd/auditd_lib.c Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#10 $ + * $P4: //depot/projects/trustedbsd/openbsm/libauditd/auditd_lib.c#11 $ */ #include @@ -130,7 +130,7 @@ static char *auditd_errmsg[] = { #define MAXERRCODE (sizeof(auditd_errmsg) / sizeof(auditd_errmsg[0])) -#define NA_EVENT_STR_SIZE 25 +#define NA_EVENT_STR_SIZE 128 #define POL_STR_SIZE 128 Modified: head/contrib/openbsm/libbsm/bsm_control.c ============================================================================== --- head/contrib/openbsm/libbsm/bsm_control.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/libbsm/bsm_control.c Fri Jul 17 14:02:20 2009 (r195740) @@ -27,7 +27,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#33 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#34 $ */ #include @@ -121,9 +121,13 @@ getstrfromtype_locked(char *name, char * if (linestr[0] == '#') continue; - /* Remove trailing new line character. */ - if ((nl = strrchr(linestr, '\n')) != NULL) + /* Remove trailing new line character and white space. */ + nl = strchr(linestr, '\0') - 1; + while (nl >= linestr && ('\n' == *nl || ' ' == *nl || + '\t' == *nl)) { *nl = '\0'; + nl--; + } tokptr = linestr; if ((type = strtok_r(tokptr, delim, &last)) != NULL) { Modified: head/contrib/openbsm/libbsm/bsm_errno.c ============================================================================== --- head/contrib/openbsm/libbsm/bsm_errno.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/libbsm/bsm_errno.c Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#17 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#19 $ */ #include @@ -453,6 +453,104 @@ static const struct bsm_errno bsm_errnos { BSM_ERRNO_EINPROGRESS, EINPROGRESS, ES("Operation now in progress") }, { BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") }, + { BSM_ERRNO_EPROCLIM, +#ifdef EPROCLIM + EPROCLIM, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Too many processes") }, + { BSM_ERRNO_EBADRPC, +#ifdef EBADRPC + EBADRPC, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC struct is bad") }, + { BSM_ERRNO_ERPCMISMATCH, +#ifdef ERPCMISMATCH + ERPCMISMATCH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC version wrong") }, + { BSM_ERRNO_EPROGUNAVAIL, +#ifdef EPROGUNAVAIL + EPROGUNAVAIL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC prog. not avail") }, + { BSM_ERRNO_EPROGMISMATCH, +#ifdef EPROGMISMATCH + EPROGMISMATCH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC version wrong") }, + { BSM_ERRNO_EPROCUNAVAIL, +#ifdef EPROCUNAVAIL + EPROCUNAVAIL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Bad procedure for program") }, + { BSM_ERRNO_EFTYPE, +#ifdef EFTYPE + EFTYPE, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Inappropriate file type or format") }, + { BSM_ERRNO_EAUTH, +#ifdef EAUTH + EAUTH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Authenticateion error") }, + { BSM_ERRNO_ENEEDAUTH, +#ifdef ENEEDAUTH + ENEEDAUTH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Need authenticator") }, + { BSM_ERRNO_ENOATTR, +#ifdef ENOATTR + ENOATTR, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Attribute not found") }, + { BSM_ERRNO_EDOOFUS, +#ifdef EDOOFUS + EDOOFUS, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Programming error") }, + { BSM_ERRNO_EJUSTRETURN, +#ifdef EJUSTRETURN + EJUSTRETURN, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Just return") }, + { BSM_ERRNO_ENOIOCTL, +#ifdef ENOIOCTL + ENOIOCTL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("ioctl not handled by this layer") }, + { BSM_ERRNO_EDIRIOCTL, +#ifdef EDIRIOCTL + EDIRIOCTL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("do direct ioctl in GEOM") }, { BSM_ERRNO_EPWROFF, #ifdef EPWROFF EPWROFF, Modified: head/contrib/openbsm/libbsm/bsm_io.c ============================================================================== --- head/contrib/openbsm/libbsm/bsm_io.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/libbsm/bsm_io.c Fri Jul 17 14:02:20 2009 (r195740) @@ -32,7 +32,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#62 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_io.c#63 $ */ #include @@ -3176,19 +3176,25 @@ print_sock_inet128_tok(FILE *fp, tokenst /* * socket family 2 bytes - * path 104 bytes + * path (up to) 104 bytes + NULL (NULL terminated string). */ static int fetch_sock_unix_tok(tokenstr_t *tok, u_char *buf, int len) { int err = 0; + u_char *p; + int slen; + READ_TOKEN_U_INT16(buf, len, tok->tt.sockunix.family, tok->len, err); if (err) return (-1); - READ_TOKEN_BYTES(buf, len, tok->tt.sockunix.path, 104, tok->len, - err); + /* slen = strnlen((buf + tok->len), 104) + 1; */ + p = (u_char *)memchr((const void *)(buf + tok->len), '\0', 104); + slen = (p ? (int)(p - (buf + tok->len)) : 104) + 1; + + READ_TOKEN_BYTES(buf, len, tok->tt.sockunix.path, slen, tok->len, err); if (err) return (-1); Modified: head/contrib/openbsm/libbsm/bsm_token.c ============================================================================== --- head/contrib/openbsm/libbsm/bsm_token.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/libbsm/bsm_token.c Fri Jul 17 14:02:20 2009 (r195740) @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#91 $ + * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#93 $ */ #include @@ -996,7 +996,7 @@ au_to_socket_ex(u_short so_domain, u_sho /* * token ID 1 byte * socket family 2 bytes - * path 104 bytes + * path (up to) 104 bytes + NULL (NULL terminated string) */ token_t * au_to_sock_unix(struct sockaddr_un *so) @@ -1270,12 +1270,27 @@ token_t * au_to_me(void) { auditinfo_t auinfo; + auditinfo_addr_t aia; - if (getaudit(&auinfo) != 0) - return (NULL); + /* + * Try to use getaudit_addr(2) first. If this kernel does not support + * it, then fall back on to getaudit(2). + */ + if (getaudit_addr(&aia, sizeof(aia)) != 0) { + if (errno == ENOSYS) { + if (getaudit(&auinfo) != 0) + return (NULL); + return (au_to_subject32(auinfo.ai_auid, geteuid(), + getegid(), getuid(), getgid(), getpid(), + auinfo.ai_asid, &auinfo.ai_termid)); + } else { + /* getaudit_addr(2) failed for some other reason. */ + return (NULL); + } + } - return (au_to_subject32(auinfo.ai_auid, geteuid(), getegid(), - getuid(), getgid(), getpid(), auinfo.ai_asid, &auinfo.ai_termid)); + return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(), + getgid(), getpid(), aia.ai_asid, &aia.ai_termid)); } #endif Modified: head/contrib/openbsm/man/audit_control.5 ============================================================================== --- head/contrib/openbsm/man/audit_control.5 Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/man/audit_control.5 Fri Jul 17 14:02:20 2009 (r195740) @@ -26,9 +26,9 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.\" $P4: //depot/projects/trustedbsd/openbsm/man/audit_control.5#22 $ +.\" $P4: //depot/projects/trustedbsd/openbsm/man/audit_control.5#23 $ .\" -.Dd January 29, 2009 +.Dd May 14, 2009 .Dt AUDIT_CONTROL 5 .Os .Sh NAME @@ -94,7 +94,7 @@ Specifies when audit log files will expi This may be after a time period has passed since the file was last written to or when the aggregate of all the trail files have reached a specified size or a combination of both. -If no expire-after parameter is given then audit log files with not +If no expire-after parameter is given then audit log files will not expire and be removed by the audit control system. See the information below for the format of the expiration specification. @@ -217,7 +217,7 @@ The suffixes on the values are case sens If both an age and disk space value are used they are seperated by AND or OR and both values are used to determine when audit log files expire. -In the case of AND, both the age and disk space conditions must be meet +In the case of AND, both the age and disk space conditions must be met before the log file is removed. In the case of OR, either condition may expire the log file. For example: @@ -233,17 +233,18 @@ The following settings appear in the def file: .Bd -literal -offset indent dir:/var/audit -flags:lo +flags:lo,aa minfree:5 -naflags:lo +naflags:lo,aa policy:cnt,argv -filesz:2097152 +filesz:2M +expire-after:10M .Ed .Pp The .Va flags parameter above specifies the system-wide mask corresponding to login/logout -events. +as well as authentication and authorization events. The .Va policy parameter specifies that the system should neither fail stop nor suspend @@ -253,6 +254,7 @@ be audited for events. The trail file will be automatically rotated by the audit daemon when the file size reaches approximately 2MB. +Trail files will expire when their aggregate size exceeds 10MB. .Sh FILES .Bl -tag -width ".Pa /etc/security/audit_control" -compact .It Pa /etc/security/audit_control Modified: head/contrib/openbsm/sys/bsm/audit.h ============================================================================== --- head/contrib/openbsm/sys/bsm/audit.h Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/sys/bsm/audit.h Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit.h#9 $ + * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit.h#10 $ */ #ifndef _BSM_AUDIT_H @@ -172,6 +172,7 @@ typedef pid_t au_asid_t; typedef u_int16_t au_event_t; typedef u_int16_t au_emod_t; typedef u_int32_t au_class_t; +typedef u_int64_t au_asflgs_t __attribute__ ((aligned (8))); struct au_tid { dev_t port; @@ -205,7 +206,7 @@ struct auditinfo_addr { au_mask_t ai_mask; /* Audit masks. */ au_tid_addr_t ai_termid; /* Terminal ID. */ au_asid_t ai_asid; /* Audit session ID. */ - u_int64_t ai_flags; /* Audit session flags. */ + au_asflgs_t ai_flags; /* Audit session flags. */ }; typedef struct auditinfo_addr auditinfo_addr_t; @@ -224,7 +225,7 @@ struct auditpinfo_addr { au_mask_t ap_mask; /* Audit masks. */ au_tid_addr_t ap_termid; /* Terminal ID. */ au_asid_t ap_asid; /* Audit session ID. */ - u_int64_t ap_flags; /* Audit session flags. */ + au_asflgs_t ap_flags; /* Audit session flags. */ }; typedef struct auditpinfo_addr auditpinfo_addr_t; Modified: head/contrib/openbsm/sys/bsm/audit_kevents.h ============================================================================== --- head/contrib/openbsm/sys/bsm/audit_kevents.h Fri Jul 17 12:36:29 2009 (r195739) +++ head/contrib/openbsm/sys/bsm/audit_kevents.h Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#6 $ + * $P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#8 $ */ #ifndef _BSM_AUDIT_KEVENTS_H_ @@ -596,6 +596,7 @@ #define AUE_PWRITE 43193 /* Darwin/FreeBSD. */ #define AUE_FSCTL 43194 /* Darwin. */ #define AUE_FFSCTL 43195 /* Darwin. */ +#define AUE_LPATHCONF 43196 /* FreeBSD. */ /* * Darwin BSM uses a number of AUE_O_* definitions, which are aliased to the Modified: head/sys/bsm/audit.h ============================================================================== --- head/sys/bsm/audit.h Fri Jul 17 12:36:29 2009 (r195739) +++ head/sys/bsm/audit.h Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit.h#9 + * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit.h#10 * $FreeBSD$ */ @@ -173,6 +173,7 @@ typedef pid_t au_asid_t; typedef u_int16_t au_event_t; typedef u_int16_t au_emod_t; typedef u_int32_t au_class_t; +typedef u_int64_t au_asflgs_t __attribute__ ((aligned (8))); struct au_tid { dev_t port; @@ -206,7 +207,7 @@ struct auditinfo_addr { au_mask_t ai_mask; /* Audit masks. */ au_tid_addr_t ai_termid; /* Terminal ID. */ au_asid_t ai_asid; /* Audit session ID. */ - u_int64_t ai_flags; /* Audit session flags. */ + au_asflgs_t ai_flags; /* Audit session flags. */ }; typedef struct auditinfo_addr auditinfo_addr_t; @@ -225,7 +226,7 @@ struct auditpinfo_addr { au_mask_t ap_mask; /* Audit masks. */ au_tid_addr_t ap_termid; /* Terminal ID. */ au_asid_t ap_asid; /* Audit session ID. */ - u_int64_t ap_flags; /* Audit session flags. */ + au_asflgs_t ap_flags; /* Audit session flags. */ }; typedef struct auditpinfo_addr auditpinfo_addr_t; Modified: head/sys/bsm/audit_kevents.h ============================================================================== --- head/sys/bsm/audit_kevents.h Fri Jul 17 12:36:29 2009 (r195739) +++ head/sys/bsm/audit_kevents.h Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#6 + * P4: //depot/projects/trustedbsd/openbsm/sys/bsm/audit_kevents.h#7 * $FreeBSD$ */ Modified: head/sys/security/audit/audit_bsm_errno.c ============================================================================== --- head/sys/security/audit/audit_bsm_errno.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/sys/security/audit/audit_bsm_errno.c Fri Jul 17 14:02:20 2009 (r195740) @@ -26,7 +26,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#17 + * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_errno.c#18 */ #include @@ -455,6 +455,104 @@ static const struct bsm_errno bsm_errnos { BSM_ERRNO_EINPROGRESS, EINPROGRESS, ES("Operation now in progress") }, { BSM_ERRNO_ESTALE, ESTALE, ES("Stale NFS file handle") }, + { BSM_ERRNO_EPROCLIM, +#ifdef EPROCLIM + EPROCLIM, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Too many processes") }, + { BSM_ERRNO_EBADRPC, +#ifdef EBADRPC + EBADRPC, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC struct is bad") }, + { BSM_ERRNO_ERPCMISMATCH, +#ifdef ERPCMISMATCH + ERPCMISMATCH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC version wrong") }, + { BSM_ERRNO_EPROGUNAVAIL, +#ifdef EPROGUNAVAIL + EPROGUNAVAIL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC prog. not avail") }, + { BSM_ERRNO_EPROGMISMATCH, +#ifdef EPROGMISMATCH + EPROGMISMATCH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("RPC version wrong") }, + { BSM_ERRNO_EPROCUNAVAIL, +#ifdef EPROCUNAVAIL + EPROCUNAVAIL, +#else + ERRNO_NO_LOCAL_MAPPING +#endif + ES("Bad procedure for program") }, + { BSM_ERRNO_EFTYPE, +#ifdef EFTYPE + EFTYPE, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Inappropriate file type or format") }, + { BSM_ERRNO_EAUTH, +#ifdef EAUTH + EAUTH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Authenticateion error") }, + { BSM_ERRNO_ENEEDAUTH, +#ifdef ENEEDAUTH + ENEEDAUTH, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Need authenticator") }, + { BSM_ERRNO_ENOATTR, +#ifdef ENOATTR + ENOATTR, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Attribute not found") }, + { BSM_ERRNO_EDOOFUS, +#ifdef EDOOFUS + EDOOFUS, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Programming error") }, + { BSM_ERRNO_EJUSTRETURN, +#ifdef EJUSTRETURN + EJUSTRETURN, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("Just return") }, + { BSM_ERRNO_ENOIOCTL, +#ifdef ENOIOCTL + ENOIOCTL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("ioctl not handled by this layer") }, + { BSM_ERRNO_EDIRIOCTL, +#ifdef EDIRIOCTL + EDIRIOCTL, +#else + ERRNO_NO_LOCAL_MAPPING, +#endif + ES("do direct ioctl in GEOM") }, { BSM_ERRNO_EPWROFF, #ifdef EPWROFF EPWROFF, Modified: head/sys/security/audit/audit_bsm_token.c ============================================================================== --- head/sys/security/audit/audit_bsm_token.c Fri Jul 17 12:36:29 2009 (r195739) +++ head/sys/security/audit/audit_bsm_token.c Fri Jul 17 14:02:20 2009 (r195740) @@ -30,7 +30,7 @@ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * - * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#91 + * P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_token.c#93 */ #include @@ -930,7 +930,7 @@ kau_to_socket(struct socket_au_info *soi /* * token ID 1 byte * socket family 2 bytes - * path 104 bytes + * path (up to) 104 bytes + NULL (NULL terminated string) */ token_t * au_to_sock_unix(struct sockaddr_un *so) @@ -1188,12 +1188,27 @@ token_t * au_to_me(void) { auditinfo_t auinfo; + auditinfo_addr_t aia; - if (getaudit(&auinfo) != 0) - return (NULL); + /* + * Try to use getaudit_addr(2) first. If this kernel does not support + * it, then fall back on to getaudit(2). + */ + if (getaudit_addr(&aia, sizeof(aia)) != 0) { + if (errno == ENOSYS) { + if (getaudit(&auinfo) != 0) + return (NULL); + return (au_to_subject32(auinfo.ai_auid, geteuid(), + getegid(), getuid(), getgid(), getpid(), + auinfo.ai_asid, &auinfo.ai_termid)); + } else { + /* getaudit_addr(2) failed for some other reason. */ + return (NULL); + } + } - return (au_to_subject32(auinfo.ai_auid, geteuid(), getegid(), - getuid(), getgid(), getpid(), auinfo.ai_asid, &auinfo.ai_termid)); + return (au_to_subject32_ex(aia.ai_auid, geteuid(), getegid(), getuid(), + getgid(), getpid(), aia.ai_asid, &aia.ai_termid)); } #endif From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 14:30:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 660341065670 for ; Fri, 17 Jul 2009 14:30:09 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) Received: from www.heimat.gr.jp (unknown [IPv6:2001:3e0:a84::1]) by mx1.freebsd.org (Postfix) with ESMTP id 266978FC18 for ; Fri, 17 Jul 2009 14:30:08 +0000 (UTC) (envelope-from nakaji@kankyo-u.ac.jp) X-Virus-Scanned: amavisd-new at heimat.gr.jp Received: from ra333.heimat.gr.jp.kankyo-u.ac.jp (ra333.heimat.gr.jp [IPv6:2001:3e0:a84:0:200:4cff:fe17:573c]) by www.heimat.gr.jp (8.14.3/8.14.3) with ESMTP id n6HETlBn063113; Fri, 17 Jul 2009 23:29:48 +0900 (JST) (envelope-from nakaji@kankyo-u.ac.jp) From: NAKAJI Hiroyuki To: Ed Schouten References: <200906231410.n5NEAk85078285@svn.freebsd.org> <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> <20090717080134.GM48776@hoeg.nl> <87ws67vev4.fsf@roddy.4407.kankyo-u.ac.jp> <20090717101104.GN48776@hoeg.nl> Date: Fri, 17 Jul 2009 23:29:47 +0900 In-Reply-To: <20090717101104.GN48776@hoeg.nl> (Ed Schouten's message of "Fri, 17 Jul 2009 12:11:04 +0200") Message-ID: <86d47z9yck.fsf@ra333.heimat.gr.jp> User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Status: No, score=-5.6 required=13.0 tests=BAYES_00, CONTENT_TYPE_PRESENT, FAKEDWORD_BACKQUOTE, NO_RELAYS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on www.heimat.gr.jp Cc: svn-src-head@freebsd.org Subject: Re: head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 14:30:09 -0000 Hello, Ed, I'm using 8.0-CURRENT kernel and userland of Wed Jun 3 12:53:09 JST 2009. $ uname -a FreeBSD roddy.4407.kankyo-u.ac.jp 8.0-CURRENT FreeBSD 8.0-CURRENT #188: Wed Jun 3 12:53:09 JST 2009 root@roddy.4407.kankyo-u.ac.jp:/usr/obj/usr/src/sys/RODDY i386 dmesg: http://d4407.kankyo-u.ac.jp/~nakaji/FreeBSD/dmesg.boot I always run "make buildworld buildkernel" in /usr/src. I have no /etc/src.conf. My /etc/make.conf is at http://d4407.kankyo-u.ac.jp/~nakaji/FreeBSD/make.conf I put the full log of "make -dA buildworld" at http://d4407.kankyo-u.ac.jp/~nakaji/FreeBSD/make.bw.20090717.log "make buildworld __MAKE_CONF=/dev/null" also fails. On RELENG_7, .sinclude does not harm. I'm confused. Thanks. >>>>> In <20090717101104.GN48776@hoeg.nl> >>>>> Ed Schouten wrote: > * NAKAJI Hiroyuki wrote: > > >>>>> In <20090717080134.GM48776@hoeg.nl> > > >>>>> Ed Schouten wrote: > > > > > * NAKAJI Hiroyuki wrote: > > > > This breaks buildworld. > > > > > How could this break buildworld? The patch has been sitting in SVN for > > > almost a month. > > > > I saw the following error with /usr/bin/make on June 3. Strange. > .sinclude has been added to make in September 2005 by phk. Can you tell > me a little more about your setup? For example: which version of FreeBSD > are you using? HEAD from June 3? You just ran `make buildworld'? What > are the contents of /etc/make.conf and /etc/src.conf? -- NAKAJI Hiroyuki From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 14:32:35 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B700106566C for ; Fri, 17 Jul 2009 14:32:35 +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 09F408FC0A for ; Fri, 17 Jul 2009 14:32:35 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id 7727E1CDF0; Fri, 17 Jul 2009 16:32:34 +0200 (CEST) Date: Fri, 17 Jul 2009 16:32:34 +0200 From: Ed Schouten To: NAKAJI Hiroyuki Message-ID: <20090717143234.GO48776@hoeg.nl> References: <200906231410.n5NEAk85078285@svn.freebsd.org> <87ocrkxcci.fsf@roddy.4407.kankyo-u.ac.jp> <20090717080134.GM48776@hoeg.nl> <87ws67vev4.fsf@roddy.4407.kankyo-u.ac.jp> <20090717101104.GN48776@hoeg.nl> <86d47z9yck.fsf@ra333.heimat.gr.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aFgd+QBGdHyBB8DW" Content-Disposition: inline In-Reply-To: <86d47z9yck.fsf@ra333.heimat.gr.jp> User-Agent: Mutt/1.5.19 (2009-01-05) Cc: svn-src-head@freebsd.org Subject: Re: head/lib/libc/stdlib X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 14:32:35 -0000 --aFgd+QBGdHyBB8DW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * NAKAJI Hiroyuki wrote: > Hello, Ed, >=20 > I'm using 8.0-CURRENT kernel and userland of Wed Jun 3 12:53:09 JST > 2009. >=20 > $ uname -a > FreeBSD roddy.4407.kankyo-u.ac.jp 8.0-CURRENT FreeBSD 8.0-CURRENT #188: W= ed Jun 3 12:53:09 JST 2009 root@roddy.4407.kankyo-u.ac.jp:/usr/obj/usr= /src/sys/RODDY i386 >=20 > dmesg: http://d4407.kankyo-u.ac.jp/~nakaji/FreeBSD/dmesg.boot >=20 > I always run "make buildworld buildkernel" in /usr/src. > I have no /etc/src.conf. > My /etc/make.conf is at http://d4407.kankyo-u.ac.jp/~nakaji/FreeBSD/make.= conf >=20 > I put the full log of "make -dA buildworld" at > http://d4407.kankyo-u.ac.jp/~nakaji/FreeBSD/make.bw.20090717.log >=20 > "make buildworld __MAKE_CONF=3D/dev/null" also fails. >=20 > On RELENG_7, .sinclude does not harm. I'm confused. What happens if you rebuild make(1) by hand? Maybe there has been a regression in the mean time. --=20 Ed Schouten WWW: http://80386.nl/ --aFgd+QBGdHyBB8DW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkpgi4IACgkQ52SDGA2eCwVcEACffWHLHB2EZ+/3tLMAPKR0+O4Q RNoAn3TU/0vITNiGck+LC/OQuhackKOy =ldqc -----END PGP SIGNATURE----- --aFgd+QBGdHyBB8DW-- From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 14:48:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E1786106566C; Fri, 17 Jul 2009 14:48:21 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDB7E8FC16; Fri, 17 Jul 2009 14:48:21 +0000 (UTC) (envelope-from jamie@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 n6HEmLN6071928; Fri, 17 Jul 2009 14:48:21 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HEmLJs071914; Fri, 17 Jul 2009 14:48:21 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <200907171448.n6HEmLJs071914@svn.freebsd.org> From: Jamie Gritton Date: Fri, 17 Jul 2009 14:48: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: r195741 - in head: sys/kern sys/net sys/sys tools/tools/vimage X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 14:48:22 -0000 Author: jamie Date: Fri Jul 17 14:48:21 2009 New Revision: 195741 URL: http://svn.freebsd.org/changeset/base/195741 Log: Remove the interim vimage containers, struct vimage and struct procg, and the ioctl-based interface that supported them. Approved by: re (kib), bz (mentor) Modified: head/sys/kern/init_main.c head/sys/kern/kern_exit.c head/sys/kern/kern_fork.c head/sys/kern/kern_jail.c head/sys/kern/kern_linker.c head/sys/kern/kern_prot.c head/sys/kern/kern_vimage.c head/sys/net/if.c head/sys/sys/sockio.h head/sys/sys/ucred.h head/sys/sys/vimage.h head/tools/tools/vimage/Makefile head/tools/tools/vimage/vimage.c Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/init_main.c Fri Jul 17 14:48:21 2009 (r195741) @@ -74,7 +74,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include @@ -454,12 +453,6 @@ proc0_init(void *dummy __unused) p->p_ucred->cr_uidinfo = uifind(0); p->p_ucred->cr_ruidinfo = uifind(0); p->p_ucred->cr_prison = &prison0; -#ifdef VIMAGE - KASSERT(LIST_FIRST(&vimage_head) != NULL, ("vimage_head empty")); - P_TO_VIMAGE(p) = LIST_FIRST(&vimage_head); /* set ucred->cr_vimage */ - refcount_acquire(&P_TO_VIMAGE(p)->vi_ucredrefc); - LIST_FIRST(&vprocg_head)->nprocs++; -#endif #ifdef AUDIT audit_cred_kproc0(p->p_ucred); #endif Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/kern_exit.c Fri Jul 17 14:48:21 2009 (r195741) @@ -69,7 +69,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #ifdef KTRACE #include #endif @@ -687,7 +686,6 @@ static void proc_reap(struct thread *td, struct proc *p, int *status, int options, struct rusage *rusage) { - INIT_VPROCG(P_TO_VPROCG(p)); struct proc *q, *t; sx_assert(&proctree_lock, SA_XLOCKED); @@ -791,9 +789,6 @@ proc_reap(struct thread *td, struct proc uma_zfree(proc_zone, p); sx_xlock(&allproc_lock); nprocs--; -#ifdef VIMAGE - vprocg->nprocs--; -#endif sx_xunlock(&allproc_lock); } Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/kern_fork.c Fri Jul 17 14:48:21 2009 (r195741) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include @@ -363,9 +362,6 @@ norfproc_fail: * are hard-limits as to the number of processes that can run. */ nprocs++; -#ifdef VIMAGE - P_TO_VPROCG(p1)->nprocs++; -#endif /* * Find an unused process ID. We remember a range of unused IDs Modified: head/sys/kern/kern_jail.c ============================================================================== --- head/sys/kern/kern_jail.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/kern_jail.c Fri Jul 17 14:48:21 2009 (r195741) @@ -3243,10 +3243,6 @@ int prison_check(struct ucred *cred1, struct ucred *cred2) { -#ifdef VIMAGE - if (cred2->cr_vimage->v_procg != cred1->cr_vimage->v_procg) - return (ESRCH); -#endif return ((cred1->cr_prison == cred2->cr_prison || prison_ischild(cred1->cr_prison, cred2->cr_prison)) ? 0 : ESRCH); } Modified: head/sys/kern/kern_linker.c ============================================================================== --- head/sys/kern/kern_linker.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/kern_linker.c Fri Jul 17 14:48:21 2009 (r195741) @@ -992,12 +992,6 @@ kern_kldload(struct thread *td, const ch if ((error = priv_check(td, PRIV_KLD_LOAD)) != 0) return (error); -#ifdef VIMAGE - /* Only the default vimage is permitted to kldload modules. */ - if (!IS_DEFAULT_VIMAGE(TD_TO_VIMAGE(td))) - return (EPERM); -#endif - /* * It is possible that kldloaded module will attach a new ifnet, * so vnet context must be set when this ocurs. @@ -1069,12 +1063,6 @@ kern_kldunload(struct thread *td, int fi if ((error = priv_check(td, PRIV_KLD_UNLOAD)) != 0) return (error); -#ifdef VIMAGE - /* Only the default vimage is permitted to kldunload modules. */ - if (!IS_DEFAULT_VIMAGE(TD_TO_VIMAGE(td))) - return (EPERM); -#endif - CURVNET_SET(TD_TO_VNET(td)); KLD_LOCK(); lf = linker_find_file_by_id(fileid); Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/kern_prot.c Fri Jul 17 14:48:21 2009 (r195741) @@ -68,7 +68,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #if defined(INET) || defined(INET6) #include @@ -1762,11 +1761,7 @@ p_canwait(struct thread *td, struct proc KASSERT(td == curthread, ("%s: td not curthread", __func__)); PROC_LOCK_ASSERT(p, MA_OWNED); - if ( -#ifdef VIMAGE /* XXX temporary until struct vimage goes away */ - !vi_child_of(TD_TO_VIMAGE(td), P_TO_VIMAGE(p)) && -#endif - (error = prison_check(td->td_ucred, p->p_ucred))) + if ((error = prison_check(td->td_ucred, p->p_ucred))) return (error); #ifdef MAC if ((error = mac_proc_check_wait(td->td_ucred, p))) @@ -1836,11 +1831,6 @@ crfree(struct ucred *cr) */ if (cr->cr_prison != NULL) prison_free(cr->cr_prison); -#ifdef VIMAGE - /* XXX TODO: find out why and when cr_vimage can be NULL here! */ - if (cr->cr_vimage != NULL) - refcount_release(&cr->cr_vimage->vi_ucredrefc); -#endif #ifdef AUDIT audit_cred_destroy(cr); #endif @@ -1877,10 +1867,6 @@ crcopy(struct ucred *dest, struct ucred uihold(dest->cr_uidinfo); uihold(dest->cr_ruidinfo); prison_hold(dest->cr_prison); -#ifdef VIMAGE - KASSERT(src->cr_vimage != NULL, ("cr_vimage == NULL")); - refcount_acquire(&dest->cr_vimage->vi_ucredrefc); -#endif #ifdef AUDIT audit_cred_copy(src, dest); #endif Modified: head/sys/kern/kern_vimage.c ============================================================================== --- head/sys/kern/kern_vimage.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/kern/kern_vimage.c Fri Jul 17 14:48:21 2009 (r195741) @@ -36,14 +36,11 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #include #include #include #include -#include -#include #include #ifdef DDB #include @@ -53,9 +50,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_VIMAGE, "vimage", "vimage resource container"); MALLOC_DEFINE(M_VNET, "vnet", "network stack control block"); -MALLOC_DEFINE(M_VPROCG, "vprocg", "process group control block"); static TAILQ_HEAD(vnet_modlink_head, vnet_modlink) vnet_modlink_head; static TAILQ_HEAD(vnet_modpending_head, vnet_modlink) vnet_modpending_head; @@ -63,12 +58,6 @@ static void vnet_mod_complete_registrati static int vnet_mod_constructor(struct vnet_modlink *); static int vnet_mod_destructor(struct vnet_modlink *); -static struct vimage *vi_alloc(struct vimage *, char *); -static int vi_destroy(struct vimage *); -static struct vimage *vimage_get_next(struct vimage *, struct vimage *, int); -static void vimage_relative_name(struct vimage *, struct vimage *, - char *, int); - #define VNET_LIST_WLOCK() \ mtx_lock(&vnet_list_refc_mtx); \ while (vnet_list_refc != 0) \ @@ -77,82 +66,45 @@ static void vimage_relative_name(struct #define VNET_LIST_WUNLOCK() \ mtx_unlock(&vnet_list_refc_mtx); -struct vimage_list_head vimage_head; struct vnet_list_head vnet_head; -struct vprocg_list_head vprocg_head; -struct vprocg vprocg_0; struct cv vnet_list_condvar; struct mtx vnet_list_refc_mtx; int vnet_list_refc = 0; -static u_int last_vi_id = 0; -static u_int last_vprocg_id = 0; - struct vnet *vnet0; /* - * Move an ifnet to or from another vnet, specified by the jail id. If a - * vi_req is passed in, it is used to find the interface and a vimage - * containing the vnet (a vimage name of ".." stands for the parent vnet). + * Move an ifnet to or from another vnet, specified by the jail id. */ int -vi_if_move(struct thread *td, struct ifnet *ifp, char *ifname, int jid, - struct vi_req *vi_req) +vi_if_move(struct thread *td, struct ifnet *ifp, char *ifname, int jid) { struct ifnet *t_ifp; struct prison *pr; - struct vimage *new_vip, *my_vip; struct vnet *new_vnet; int error; - if (vi_req != NULL) { - /* SIOCSIFVIMAGE */ - pr = NULL; - /* Check for API / ABI version mismatch. */ - if (vi_req->vi_api_cookie != VI_API_COOKIE) - return (EDOOFUS); - - /* Find the target vnet. */ - my_vip = TD_TO_VIMAGE(td); - if (strcmp(vi_req->vi_name, "..") == 0) { - if (IS_DEFAULT_VIMAGE(my_vip)) - return (ENXIO); - new_vnet = my_vip->vi_parent->v_net; - } else { - new_vip = vimage_by_name(my_vip, vi_req->vi_name); - if (new_vip == NULL) - return (ENXIO); - new_vnet = new_vip->v_net; - } - - /* Try to find the target ifnet by name. */ - ifname = vi_req->vi_if_xname; - ifp = ifunit(ifname); - if (ifp == NULL) - return (ENXIO); + sx_slock(&allprison_lock); + pr = prison_find_child(td->td_ucred->cr_prison, jid); + sx_sunlock(&allprison_lock); + if (pr == NULL) + return (ENXIO); + prison_hold_locked(pr); + mtx_unlock(&pr->pr_mtx); + if (ifp != NULL) { + /* SIOCSIFVNET */ + new_vnet = pr->pr_vnet; } else { - sx_slock(&allprison_lock); - pr = prison_find_child(td->td_ucred->cr_prison, jid); - sx_sunlock(&allprison_lock); - if (pr == NULL) + /* SIOCSIFRVNET */ + new_vnet = TD_TO_VNET(td); + CURVNET_SET(pr->pr_vnet); + ifp = ifunit(ifname); + CURVNET_RESTORE(); + if (ifp == NULL) { + prison_free(pr); return (ENXIO); - prison_hold_locked(pr); - mtx_unlock(&pr->pr_mtx); - if (ifp != NULL) { - /* SIOCSIFVNET */ - new_vnet = pr->pr_vnet; - } else { - /* SIOCSIFRVNET */ - new_vnet = TD_TO_VNET(td); - CURVNET_SET(pr->pr_vnet); - ifp = ifunit(ifname); - CURVNET_RESTORE(); - if (ifp == NULL) { - prison_free(pr); - return (ENXIO); - } } } @@ -175,215 +127,10 @@ vi_if_move(struct thread *td, struct ifn sprintf(ifname, "%s", ifp->if_xname); } } - if (pr != NULL) - prison_free(pr); - return (error); -} - -/* - * Interim userspace interface - will be replaced by jail soon. - */ - -int -vi_td_ioctl(u_long cmd, struct vi_req *vi_req, struct thread *td) -{ - int error = 0; - struct vimage *vip = TD_TO_VIMAGE(td); - struct vimage *vip_r = NULL; - - /* Check for API / ABI version mismatch. */ - if (vi_req->vi_api_cookie != VI_API_COOKIE) - return (EDOOFUS); - - error = priv_check(td, PRIV_REBOOT); /* XXX temp. priv abuse */ - if (error) - return (error); - - vip_r = vimage_by_name(vip, vi_req->vi_name); - if (vip_r == NULL && !(vi_req->vi_req_action & VI_CREATE)) - return (ESRCH); - if (vip_r != NULL && vi_req->vi_req_action & VI_CREATE) - return (EADDRINUSE); - if (vi_req->vi_req_action == VI_GETNEXT) { - vip_r = vimage_get_next(vip, vip_r, 0); - if (vip_r == NULL) - return (ESRCH); - } - if (vi_req->vi_req_action == VI_GETNEXT_RECURSE) { - vip_r = vimage_get_next(vip, vip_r, 1); - if (vip_r == NULL) - return (ESRCH); - } - - if (vip_r && !vi_child_of(vip, vip_r) && /* XXX delete the rest? */ - vi_req->vi_req_action != VI_GET && - vi_req->vi_req_action != VI_GETNEXT) - return (EPERM); - - switch (cmd) { - - case SIOCGPVIMAGE: - vimage_relative_name(vip, vip_r, vi_req->vi_name, - sizeof (vi_req->vi_name)); - vi_req->vi_proc_count = vip_r->v_procg->nprocs; - vi_req->vi_if_count = vip_r->v_net->ifcnt; - vi_req->vi_sock_count = vip_r->v_net->sockcnt; - break; - - case SIOCSPVIMAGE: - if (vi_req->vi_req_action == VI_DESTROY) { - error = vi_destroy(vip_r); - break; - } - - if (vi_req->vi_req_action == VI_SWITCHTO) { - struct proc *p = td->td_proc; - struct ucred *oldcred, *newcred; - - /* - * XXX priv_check()? - * XXX allow only a single td per proc here? - */ - newcred = crget(); - PROC_LOCK(p); - oldcred = p->p_ucred; - setsugid(p); - crcopy(newcred, oldcred); - refcount_release(&newcred->cr_vimage->vi_ucredrefc); - newcred->cr_vimage = vip_r; - refcount_acquire(&newcred->cr_vimage->vi_ucredrefc); - p->p_ucred = newcred; - PROC_UNLOCK(p); - sx_xlock(&allproc_lock); - oldcred->cr_vimage->v_procg->nprocs--; - refcount_release(&oldcred->cr_vimage->vi_ucredrefc); - P_TO_VPROCG(p)->nprocs++; - sx_xunlock(&allproc_lock); - crfree(oldcred); - break; - } - - if (vi_req->vi_req_action & VI_CREATE) { - char *dotpos; - - dotpos = strrchr(vi_req->vi_name, '.'); - if (dotpos != NULL) { - *dotpos = 0; - vip = vimage_by_name(vip, vi_req->vi_name); - if (vip == NULL) - return (ESRCH); - dotpos++; - vip_r = vi_alloc(vip, dotpos); - } else - vip_r = vi_alloc(vip, vi_req->vi_name); - if (vip_r == NULL) - return (ENOMEM); - } - } + prison_free(pr); return (error); } -int -vi_child_of(struct vimage *parent, struct vimage *child) -{ - - if (child == parent) - return (0); - for (; child; child = child->vi_parent) - if (child == parent) - return (1); - return (0); -} - -struct vimage * -vimage_by_name(struct vimage *top, char *name) -{ - struct vimage *vip; - char *next_name; - int namelen; - - next_name = strchr(name, '.'); - if (next_name != NULL) { - namelen = next_name - name; - next_name++; - if (namelen == 0) { - if (strlen(next_name) == 0) - return (top); /* '.' == this vimage */ - else - return (NULL); - } - } else - namelen = strlen(name); - if (namelen == 0) - return (NULL); - LIST_FOREACH(vip, &top->vi_child_head, vi_sibling) { - if (strlen(vip->vi_name) == namelen && - strncmp(name, vip->vi_name, namelen) == 0) { - if (next_name != NULL) - return (vimage_by_name(vip, next_name)); - else - return (vip); - } - } - return (NULL); -} - -static void -vimage_relative_name(struct vimage *top, struct vimage *where, - char *buffer, int bufflen) -{ - int used = 1; - - if (where == top) { - sprintf(buffer, "."); - return; - } else - *buffer = 0; - - do { - int namelen = strlen(where->vi_name); - - if (namelen + used + 1 >= bufflen) - panic("buffer overflow"); - - if (used > 1) { - bcopy(buffer, &buffer[namelen + 1], used); - buffer[namelen] = '.'; - used++; - } else - bcopy(buffer, &buffer[namelen], used); - bcopy(where->vi_name, buffer, namelen); - used += namelen; - where = where->vi_parent; - } while (where != top); -} - -static struct vimage * -vimage_get_next(struct vimage *top, struct vimage *where, int recurse) -{ - struct vimage *next; - - if (recurse) { - /* Try to go deeper in the hierarchy */ - next = LIST_FIRST(&where->vi_child_head); - if (next != NULL) - return (next); - } - - do { - /* Try to find next sibling */ - next = LIST_NEXT(where, vi_sibling); - if (!recurse || next != NULL) - return (next); - - /* Nothing left on this level, go one level up */ - where = where->vi_parent; - } while (where != top->vi_parent); - - /* Nothing left to be visited, we are done */ - return (NULL); -} - /* * Kernel interfaces and handlers. @@ -409,7 +156,7 @@ vnet_mod_register_multi(const struct vne if (vml_iter != NULL) panic("registering an already registered vnet module: %s", vml_iter->vml_modinfo->vmi_name); - vml = malloc(sizeof(struct vnet_modlink), M_VIMAGE, M_NOWAIT); + vml = malloc(sizeof(struct vnet_modlink), M_VNET, M_NOWAIT); /* * XXX we support only statically assigned module IDs at the time. @@ -513,7 +260,7 @@ vnet_mod_deregister_multi(const struct v } TAILQ_REMOVE(&vnet_modlink_head, vml, vml_mod_le); - free(vml, M_VIMAGE); + free(vml, M_VNET); } static int @@ -625,75 +372,6 @@ vnet_foreach(void (*vnet_foreach_fn)(str VNET_LIST_RUNLOCK(); } -static struct vimage * -vi_alloc(struct vimage *parent, char *name) -{ - struct vimage *vip; - struct vprocg *vprocg; - - vip = malloc(sizeof(struct vimage), M_VIMAGE, M_NOWAIT | M_ZERO); - if (vip == NULL) - panic("vi_alloc: malloc failed for vimage \"%s\"\n", name); - vip->vi_id = last_vi_id++; - LIST_INIT(&vip->vi_child_head); - sprintf(vip->vi_name, "%s", name); - vip->vi_parent = parent; - /* XXX locking */ - if (parent != NULL) - LIST_INSERT_HEAD(&parent->vi_child_head, vip, vi_sibling); - else if (!LIST_EMPTY(&vimage_head)) - panic("there can be only one default vimage!"); - LIST_INSERT_HEAD(&vimage_head, vip, vi_le); - - vip->v_net = vnet_alloc(); - - vprocg = malloc(sizeof(struct vprocg), M_VPROCG, M_NOWAIT | M_ZERO); - if (vprocg == NULL) - panic("vi_alloc: malloc failed for vprocg \"%s\"\n", name); - vip->v_procg = vprocg; - vprocg->vprocg_id = last_vprocg_id++; - - /* XXX locking */ - LIST_INSERT_HEAD(&vprocg_head, vprocg, vprocg_le); - - return (vip); -} - -/* - * Destroy a vnet - unlink all linked lists, hashtables etc., free all - * the memory, stop all the timers... - */ -static int -vi_destroy(struct vimage *vip) -{ - struct vprocg *vprocg = vip->v_procg; - - /* XXX Beware of races -> more locking to be done... */ - if (!LIST_EMPTY(&vip->vi_child_head)) - return (EBUSY); - - if (vprocg->nprocs != 0) - return (EBUSY); - -#ifdef INVARIANTS - if (vip->vi_ucredrefc != 0) - printf("vi_destroy: %s ucredrefc %d\n", - vip->vi_name, vip->vi_ucredrefc); -#endif - - /* Point with no return - cleanup MUST succeed! */ - vnet_destroy(vip->v_net); - - LIST_REMOVE(vip, vi_le); - LIST_REMOVE(vip, vi_sibling); - LIST_REMOVE(vprocg, vprocg_le); - - free(vprocg, M_VPROCG); - free(vip, M_VIMAGE); - - return (0); -} - static void vi_init(void *unused) { @@ -701,22 +379,17 @@ vi_init(void *unused) TAILQ_INIT(&vnet_modlink_head); TAILQ_INIT(&vnet_modpending_head); - LIST_INIT(&vimage_head); - LIST_INIT(&vprocg_head); LIST_INIT(&vnet_head); mtx_init(&vnet_list_refc_mtx, "vnet_list_refc_mtx", NULL, MTX_DEF); cv_init(&vnet_list_condvar, "vnet_list_condvar"); - /* Default image has no parent and no name. */ - vi_alloc(NULL, ""); - /* * We MUST clear curvnet in vi_init_done() before going SMP, * otherwise CURVNET_SET() macros would scream about unnecessary * curvnet recursions. */ - curvnet = prison0.pr_vnet = vnet0 = LIST_FIRST(&vnet_head); + curvnet = prison0.pr_vnet = vnet0 = vnet_alloc(); } static void Modified: head/sys/net/if.c ============================================================================== --- head/sys/net/if.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/net/if.c Fri Jul 17 14:48:21 2009 (r195741) @@ -2008,7 +2008,7 @@ ifhwioctl(u_long cmd, struct ifnet *ifp, error = priv_check(td, PRIV_NET_SETIFVNET); if (error) return (error); - error = vi_if_move(td, ifp, ifr->ifr_name, ifr->ifr_jid, NULL); + error = vi_if_move(td, ifp, ifr->ifr_name, ifr->ifr_jid); break; #endif @@ -2202,20 +2202,7 @@ ifioctl(struct socket *so, u_long cmd, c error = priv_check(td, PRIV_NET_SETIFVNET); if (error) return (error); - return (vi_if_move(td, NULL, ifr->ifr_name, ifr->ifr_jid, - NULL)); - /* - * XXX vnet creation will be implemented through the new jail - * framework - this is just a temporary hack for testing the - * vnet create / destroy mechanisms. - */ - case SIOCSIFVIMAGE: - error = vi_if_move(td, NULL, NULL, 0, (struct vi_req *) data); - return (error); - case SIOCSPVIMAGE: - case SIOCGPVIMAGE: - error = vi_td_ioctl(cmd, (struct vi_req *) data, td); - return (error); + return (vi_if_move(td, NULL, ifr->ifr_name, ifr->ifr_jid)); #endif case SIOCIFCREATE: case SIOCIFCREATE2: Modified: head/sys/sys/sockio.h ============================================================================== --- head/sys/sys/sockio.h Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/sys/sockio.h Fri Jul 17 14:48:21 2009 (r195741) @@ -111,10 +111,6 @@ #define SIOCSIFVNET _IOWR('i', 90, struct ifreq) /* move IF jail/vnet */ #define SIOCSIFRVNET _IOWR('i', 91, struct ifreq) /* reclaim vnet IF */ -#define SIOCSPVIMAGE _IOW('i', 101, struct vi_req) /* set proc vimage */ -#define SIOCGPVIMAGE _IOWR('i', 102, struct vi_req) /* get proc vimage */ -#define SIOCSIFVIMAGE _IOWR('i', 103, struct vi_req) /* set ifc vi/net */ - #define SIOCSDRVSPEC _IOW('i', 123, struct ifdrv) /* set driver-specific parameters */ #define SIOCGDRVSPEC _IOWR('i', 123, struct ifdrv) /* get driver-specific Modified: head/sys/sys/ucred.h ============================================================================== --- head/sys/sys/ucred.h Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/sys/ucred.h Fri Jul 17 14:48:21 2009 (r195741) @@ -54,9 +54,9 @@ struct ucred { struct uidinfo *cr_uidinfo; /* per euid resource consumption */ struct uidinfo *cr_ruidinfo; /* per ruid resource consumption */ struct prison *cr_prison; /* jail(2) */ - struct vimage *cr_vimage; /* vimage */ + void *cr_pspare; /* general use */ u_int cr_flags; /* credential flags */ - void *cr_pspare[2]; /* general use 2 */ + void *cr_pspare2[2]; /* general use 2 */ #define cr_endcopy cr_label struct label *cr_label; /* MAC label */ struct auditinfo_addr cr_audit; /* Audit properties. */ Modified: head/sys/sys/vimage.h ============================================================================== --- head/sys/sys/vimage.h Fri Jul 17 14:02:20 2009 (r195740) +++ head/sys/sys/vimage.h Fri Jul 17 14:48:21 2009 (r195741) @@ -36,42 +36,14 @@ #include #include -/* Interim userspace API. */ -struct vi_req { - int vi_api_cookie; /* Catch API mismatch. */ - int vi_req_action; /* What to do with this request? */ - u_short vi_proc_count; /* Current number of processes. */ - int vi_if_count; /* Current number of ifnets. */ - int vi_sock_count; - char vi_name[MAXPATHLEN]; - char vi_if_xname[MAXPATHLEN]; /* XXX should be IFNAMSIZ */ -}; - -#define VI_CREATE 0x00000001 -#define VI_DESTROY 0x00000002 -#define VI_SWITCHTO 0x00000008 -#define VI_IFACE 0x00000010 -#define VI_GET 0x00000100 -#define VI_GETNEXT 0x00000200 -#define VI_GETNEXT_RECURSE 0x00000300 - -#define VI_API_VERSION 1 /* Bump on struct changes. */ - -#define VI_API_COOKIE ((sizeof(struct vi_req) << 16) | VI_API_VERSION) - #ifdef _KERNEL #ifdef INVARIANTS #define VNET_DEBUG #endif -struct vimage; -struct vprocg; struct vnet; -struct vi_req; struct ifnet; -struct kld_sym_lookup; -struct thread; typedef int vnet_attach_fn(const void *); typedef int vnet_detach_fn(const void *); @@ -128,16 +100,7 @@ struct vnet_modlink { #define VNET_MOD_DYNAMIC_START 32 #define VNET_MOD_MAX 64 -/* Major module IDs for vimage sysctl virtualization. */ -#define V_GLOBAL 0 /* global variable - no indirection */ -#define V_NET 1 -#define V_PROCG 2 - -int vi_td_ioctl(u_long, struct vi_req *, struct thread *); -int vi_if_move(struct thread *, struct ifnet *, char *, int, - struct vi_req *); -int vi_child_of(struct vimage *, struct vimage *); -struct vimage *vimage_by_name(struct vimage *, char *); +int vi_if_move(struct thread *, struct ifnet *, char *, int); void vnet_mod_register(const struct vnet_modinfo *); void vnet_mod_register_multi(const struct vnet_modinfo *, void *, char *); void vnet_mod_deregister(const struct vnet_modinfo *); @@ -149,18 +112,6 @@ void vnet_foreach(void (*vnet_foreach_fn #endif /* VIMAGE */ -struct vimage { - LIST_ENTRY(vimage) vi_le; /* all vimage list */ - LIST_ENTRY(vimage) vi_sibling; /* vimages with same parent */ - LIST_HEAD(, vimage) vi_child_head; /* direct offspring list */ - struct vimage *vi_parent; /* ptr to parent vimage */ - u_int vi_id; /* ID num */ - volatile u_int vi_ucredrefc; /* # of ucreds pointing to us */ - char vi_name[MAXHOSTNAMELEN]; - struct vnet *v_net; - struct vprocg *v_procg; -}; - struct vnet { LIST_ENTRY(vnet) vnet_le; /* all vnets list */ u_int vnet_magic_n; @@ -170,19 +121,6 @@ struct vnet { uintptr_t vnet_data_base; }; -struct vprocg { - LIST_ENTRY(vprocg) vprocg_le; - u_int vprocg_id; /* ID num */ - u_int nprocs; -}; - -#ifdef VIMAGE -LIST_HEAD(vimage_list_head, vimage); -extern struct vimage_list_head vimage_head; -#else /* !VIMAGE */ -extern struct vprocg vprocg_0; -#endif /* VIMAGE */ - #define curvnet curthread->td_vnet #define VNET_MAGIC_N 0x3e0d8f29 @@ -249,39 +187,19 @@ extern struct vnet *vnet0; #endif #ifdef VIMAGE -LIST_HEAD(vprocg_list_head, vprocg); -extern struct vprocg_list_head vprocg_head; -#define INIT_VPROCG(arg) struct vprocg *vprocg = (arg); -#else -#define INIT_VPROCG(arg) -#endif - -#ifdef VIMAGE -#define IS_DEFAULT_VIMAGE(arg) ((arg)->vi_id == 0) #define IS_DEFAULT_VNET(arg) ((arg) == vnet0) #else -#define IS_DEFAULT_VIMAGE(arg) 1 #define IS_DEFAULT_VNET(arg) 1 #endif #ifdef VIMAGE -#define CRED_TO_VNET(cr) \ - (IS_DEFAULT_VIMAGE((cr)->cr_vimage) ? (cr)->cr_prison->pr_vnet \ - : (cr)->cr_vimage->v_net) -#define TD_TO_VIMAGE(td) (td)->td_ucred->cr_vimage +#define CRED_TO_VNET(cr) (cr)->cr_prison->pr_vnet #define TD_TO_VNET(td) CRED_TO_VNET((td)->td_ucred) -#define TD_TO_VPROCG(td) (td)->td_ucred->cr_vimage->v_procg -#define P_TO_VIMAGE(p) (p)->p_ucred->cr_vimage #define P_TO_VNET(p) CRED_TO_VNET((p)->p_ucred) -#define P_TO_VPROCG(p) (p)->p_ucred->cr_vimage->v_procg #else /* !VIMAGE */ #define CRED_TO_VNET(cr) NULL -#define TD_TO_VIMAGE(td) NULL #define TD_TO_VNET(td) NULL -#define P_TO_VIMAGE(p) NULL #define P_TO_VNET(p) NULL -#define TD_TO_VPROCG(td) &vprocg_0 -#define P_TO_VPROCG(p) &vprocg_0 #endif /* VIMAGE */ /* Non-VIMAGE null-macros */ Modified: head/tools/tools/vimage/Makefile ============================================================================== --- head/tools/tools/vimage/Makefile Fri Jul 17 14:02:20 2009 (r195740) +++ head/tools/tools/vimage/Makefile Fri Jul 17 14:48:21 2009 (r195741) @@ -1,6 +1,8 @@ # $FreeBSD$ PROG= vimage +LDADD= -ljail +DPADD= ${LIBJAIL} WARNS?= 2 CFLAGS+= -I../../../sys Modified: head/tools/tools/vimage/vimage.c ============================================================================== --- head/tools/tools/vimage/vimage.c Fri Jul 17 14:02:20 2009 (r195740) +++ head/tools/tools/vimage/vimage.c Fri Jul 17 14:48:21 2009 (r195741) @@ -27,122 +27,120 @@ * $FreeBSD$ */ +#include #include #include +#include #include -#include + +#include #include +#include #include #include #include #include -void -vi_print(struct vi_req *vi_req) -{ +#define VI_CREATE 0x00000001 +#define VI_DESTROY 0x00000002 +#define VI_SWITCHTO 0x00000008 +#define VI_IFACE 0x00000010 +#define VI_GET 0x00000100 +#define VI_GETNEXT 0x00000200 - printf("\"%s\":\n", vi_req->vi_name); - printf(" %d sockets, %d ifnets, %d processes\n", - vi_req->vi_sock_count, vi_req->vi_if_count, vi_req->vi_proc_count); -} +static int getjail(char *name, int lastjid, int *vnet); int main(int argc, char **argv) { int s; char *shell; - int cmd = VI_SWITCHTO; - struct vi_req vi_req; + int cmd; + int jid, vnet; + struct ifreq ifreq; + char name[MAXHOSTNAMELEN]; - s = socket(AF_INET, SOCK_DGRAM, 0); - if (s == -1) - goto abort; + switch (argc) { - bzero(&vi_req, sizeof(vi_req)); - strcpy(vi_req.vi_name, "."); /* . = this vimage. */ - - if (argc == 1) - cmd = VI_GET; - - if (argc == 2 && strcmp(argv[1], "-l") == 0) - cmd = VI_GETNEXT; + case 1: + cmd = 0; + break; - if (argc == 2 && strcmp(argv[1], "-lr") == 0) - cmd = VI_GETNEXT_RECURSE; + case 2: + if (strcmp(argv[1], "-l") == 0) + cmd = VI_GETNEXT; + else if (strcmp(argv[1], "-lr") == 0) + cmd = VI_GETNEXT; + else { + strcpy(name, argv[1]); + cmd = VI_SWITCHTO; + } + break; - if (argc == 3) { - strcpy(vi_req.vi_name, argv[2]); + case 3: + strcpy(name, argv[2]); if (strcmp(argv[1], "-l") == 0) cmd = VI_GET; if (strcmp(argv[1], "-c") == 0) cmd = VI_CREATE; if (strcmp(argv[1], "-d") == 0) cmd = VI_DESTROY; - } + break; - if (argc >= 3) { - strcpy(vi_req.vi_name, argv[2]); + default: + strcpy(name, argv[2]); if (strcmp(argv[1], "-c") == 0) cmd = VI_CREATE; if (strcmp(argv[1], "-i") == 0) cmd = VI_IFACE; } - vi_req.vi_api_cookie = VI_API_COOKIE; - vi_req.vi_req_action = cmd; switch (cmd) { case VI_GET: - if (ioctl(s, SIOCGPVIMAGE, (caddr_t)&vi_req) < 0) + jid = getjail(name, -1, &vnet); + if (jid < 0) goto abort; - if (argc == 1) - printf("%s\n", vi_req.vi_name); - else - vi_print(&vi_req); + printf("%d: %s%s\n", jid, name, vnet ? "" : " (no vnet)"); exit(0); case VI_GETNEXT: - case VI_GETNEXT_RECURSE: - vi_req.vi_req_action = VI_GET; - if (ioctl(s, SIOCGPVIMAGE, (caddr_t)&vi_req) < 0) - goto abort; - vi_print(&vi_req); - vi_req.vi_req_action = VI_GETNEXT_RECURSE; - while (ioctl(s, SIOCGPVIMAGE, (caddr_t)&vi_req) == 0) { - vi_print(&vi_req); - vi_req.vi_req_action = cmd; - } + jid = 0; + while ((jid = getjail(name, jid, &vnet)) > 0) + printf("%d: %s%s\n", jid, name, + vnet ? "" : " (no vnet)"); exit(0); case VI_IFACE: - strncpy(vi_req.vi_if_xname, argv[3], - sizeof(vi_req.vi_if_xname)); - if (ioctl(s, SIOCSIFVIMAGE, (caddr_t)&vi_req) < 0) + s = socket(AF_INET, SOCK_DGRAM, 0); + if (s == -1) + goto abort; + jid = jail_getid(name); + if (jid < 0) + goto abort; + ifreq.ifr_jid = jid; + strncpy(ifreq.ifr_name, argv[3], sizeof(ifreq.ifr_name)); + if (ioctl(s, SIOCSIFVNET, (caddr_t)&ifreq) < 0) goto abort; - printf("%s@%s\n", vi_req.vi_if_xname, vi_req.vi_name); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 18:35:45 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 778DB1065672; Fri, 17 Jul 2009 18:35:45 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6636A8FC08; Fri, 17 Jul 2009 18:35:45 +0000 (UTC) (envelope-from rpaulo@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 n6HIZjRh076646; Fri, 17 Jul 2009 18:35:45 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HIZjJt076643; Fri, 17 Jul 2009 18:35:45 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <200907171835.n6HIZjJt076643@svn.freebsd.org> From: Rui Paulo Date: Fri, 17 Jul 2009 18:35: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: r195742 - head/sys/arm/conf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 18:35:45 -0000 Author: rpaulo Date: Fri Jul 17 18:35:45 2009 New Revision: 195742 URL: http://svn.freebsd.org/changeset/base/195742 Log: Add IEEE80211_SUPPORT_MESH, following similar change to nanobsd and other GENERIC kernels. Approved by: re (kib) Modified: head/sys/arm/conf/AVILA head/sys/arm/conf/CAMBRIA Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Fri Jul 17 14:48:21 2009 (r195741) +++ head/sys/arm/conf/AVILA Fri Jul 17 18:35:45 2009 (r195742) @@ -105,6 +105,7 @@ device random # Entropy device device wlan # 802.11 support options IEEE80211_DEBUG options IEEE80211_SUPPORT_TDMA +options IEEE80211_SUPPORT_MESH device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Fri Jul 17 14:48:21 2009 (r195741) +++ head/sys/arm/conf/CAMBRIA Fri Jul 17 18:35:45 2009 (r195742) @@ -108,6 +108,7 @@ device random # Entropy device device wlan # 802.11 support options IEEE80211_DEBUG options IEEE80211_SUPPORT_TDMA +options IEEE80211_SUPPORT_MESH device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 19:32:04 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7A9D106566C; Fri, 17 Jul 2009 19:32:04 +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 D5AD88FC15; Fri, 17 Jul 2009 19:32:04 +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 n6HJW4oZ079919; Fri, 17 Jul 2009 19:32:04 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HJW4Pg079917; Fri, 17 Jul 2009 19:32:04 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907171932.n6HJW4Pg079917@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 17 Jul 2009 19:32: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: r195743 - head/libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 19:32:05 -0000 Author: kib Date: Fri Jul 17 19:32:04 2009 New Revision: 195743 URL: http://svn.freebsd.org/changeset/base/195743 Log: Only perform .bss mapping and cleaning operations when segment file size is not equal to its memory size. This eliminates unneeded clearing of the text segment that often happens due to text end not being page-aligned. For instance, $ readelf -l /lib/libedit.so.6 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000000 0x00000000 0x00000000 0x139e1 0x139e1 R E 0x1000 LOAD 0x014000 0x00014000 0x00014000 0x00f04 0x00f14 RW 0x1000 DYNAMIC 0x014cc4 0x00014cc4 0x00014cc4 0x000d0 0x000d0 RW 0x4 $ procstat -v $$ (for /bin/sh) 68585 0x28097000 0x280aa000 r-x 6 0 21 14 CN vn /lib/libedit.so.6 68585 0x280aa000 0x280ab000 r-x 1 0 1 0 CN vn /lib/libedit.so.6 <== 68585 0x280ab000 0x280ac000 rwx 1 0 1 0 CN vn /lib/libedit.so.6 Note the splitted map entry marked by '<=='. Reviewed by: kan Approved by: re (kensmith) MFC after: 1 month Modified: head/libexec/rtld-elf/map_object.c Modified: head/libexec/rtld-elf/map_object.c ============================================================================== --- head/libexec/rtld-elf/map_object.c Fri Jul 17 18:35:45 2009 (r195742) +++ head/libexec/rtld-elf/map_object.c Fri Jul 17 19:32:04 2009 (r195743) @@ -180,37 +180,43 @@ map_object(int fd, const char *path, con return NULL; } - /* Clear any BSS in the last page of the segment. */ - clear_vaddr = segs[i]->p_vaddr + segs[i]->p_filesz; - clear_addr = mapbase + (clear_vaddr - base_vaddr); - clear_page = mapbase + (trunc_page(clear_vaddr) - base_vaddr); - if ((nclear = data_vlimit - clear_vaddr) > 0) { - /* Make sure the end of the segment is writable */ - if ((data_prot & PROT_WRITE) == 0 && - -1 == mprotect(clear_page, PAGE_SIZE, data_prot|PROT_WRITE)) { + /* Do BSS setup */ + if (segs[i]->p_filesz != segs[i]->p_memsz) { + + /* Clear any BSS in the last page of the segment. */ + clear_vaddr = segs[i]->p_vaddr + segs[i]->p_filesz; + clear_addr = mapbase + (clear_vaddr - base_vaddr); + clear_page = mapbase + (trunc_page(clear_vaddr) - base_vaddr); + + if ((nclear = data_vlimit - clear_vaddr) > 0) { + /* Make sure the end of the segment is writable */ + if ((data_prot & PROT_WRITE) == 0 && -1 == + mprotect(clear_page, PAGE_SIZE, data_prot|PROT_WRITE)) { _rtld_error("%s: mprotect failed: %s", path, strerror(errno)); return NULL; - } + } - memset(clear_addr, 0, nclear); + memset(clear_addr, 0, nclear); - /* Reset the data protection back */ - if ((data_prot & PROT_WRITE) == 0) - mprotect(clear_page, PAGE_SIZE, data_prot); - } + /* Reset the data protection back */ + if ((data_prot & PROT_WRITE) == 0) + mprotect(clear_page, PAGE_SIZE, data_prot); + } - /* Overlay the BSS segment onto the proper region. */ - bss_vaddr = data_vlimit; - bss_vlimit = round_page(segs[i]->p_vaddr + segs[i]->p_memsz); - bss_addr = mapbase + (bss_vaddr - base_vaddr); - if (bss_vlimit > bss_vaddr) { /* There is something to do */ - if (mprotect(bss_addr, bss_vlimit - bss_vaddr, data_prot) == -1) { + /* Overlay the BSS segment onto the proper region. */ + bss_vaddr = data_vlimit; + bss_vlimit = round_page(segs[i]->p_vaddr + segs[i]->p_memsz); + bss_addr = mapbase + (bss_vaddr - base_vaddr); + if (bss_vlimit > bss_vaddr) { /* There is something to do */ + if (mprotect(bss_addr, bss_vlimit - bss_vaddr, data_prot) == -1) { _rtld_error("%s: mprotect of bss failed: %s", path, strerror(errno)); - return NULL; + return NULL; + } } } + if (phdr_vaddr == 0 && data_offset <= hdr->e_phoff && (data_vlimit - data_vaddr + data_offset) >= (hdr->e_phoff + hdr->e_phnum * sizeof (Elf_Phdr))) { From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 19:38:07 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C7FBE1065674; Fri, 17 Jul 2009 19:38:07 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B66378FC15; Fri, 17 Jul 2009 19:38:07 +0000 (UTC) (envelope-from rmacklem@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 n6HJc7Q9080079; Fri, 17 Jul 2009 19:38:07 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HJc7gY080077; Fri, 17 Jul 2009 19:38:07 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <200907171938.n6HJc7gY080077@svn.freebsd.org> From: Rick Macklem Date: Fri, 17 Jul 2009 19:38: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: r195744 - head/sys/nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 19:38:08 -0000 Author: rmacklem Date: Fri Jul 17 19:38:07 2009 New Revision: 195744 URL: http://svn.freebsd.org/changeset/base/195744 Log: Patch the regular nfs client in a manner analagous to r195704 for the experimental client. The patch avoids calling vn_lock() for the case where nfs_nget() has acquired the same vnode as dvp, since nfs_nget() has already locked the vnode. Reviewed by: kib, jhb Approved by: re (kensmith), kib (mentor) Modified: head/sys/nfsclient/nfs_vnops.c Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Fri Jul 17 19:32:04 2009 (r195743) +++ head/sys/nfsclient/nfs_vnops.c Fri Jul 17 19:38:07 2009 (r195744) @@ -1061,7 +1061,8 @@ nfs_lookup(struct vop_lookup_args *ap) if (error == 0) newvp = NFSTOV(np); vfs_unbusy(mp); - vn_lock(dvp, ltype | LK_RETRY); + if (newvp != dvp) + vn_lock(dvp, ltype | LK_RETRY); if (dvp->v_iflag & VI_DOOMED) { if (error == 0) { if (newvp == dvp) From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 19:45:42 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD399106566B; Fri, 17 Jul 2009 19:45:42 +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 CADB08FC08; Fri, 17 Jul 2009 19:45:42 +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 n6HJjgOW080279; Fri, 17 Jul 2009 19:45:42 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HJjg2E080275; Fri, 17 Jul 2009 19:45:42 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200907171945.n6HJjg2E080275@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 17 Jul 2009 19:45:42 +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: r195745 - in head: include lib/libc/gen libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 19:45:43 -0000 Author: kib Date: Fri Jul 17 19:45:42 2009 New Revision: 195745 URL: http://svn.freebsd.org/changeset/base/195745 Log: Implement RTLD_NOLOAD flag for dlopen(3). Requested and tested by: jkim Reviewed by: kan Approved by: re (kensmith) Modified: head/include/dlfcn.h head/lib/libc/gen/dlopen.3 head/libexec/rtld-elf/rtld.c Modified: head/include/dlfcn.h ============================================================================== --- head/include/dlfcn.h Fri Jul 17 19:38:07 2009 (r195744) +++ head/include/dlfcn.h Fri Jul 17 19:45:42 2009 (r195745) @@ -48,6 +48,7 @@ #define RTLD_LOCAL 0 /* Opposite of RTLD_GLOBAL, and the default. */ #define RTLD_TRACE 0x200 /* Trace loaded objects and exit. */ #define RTLD_NODELETE 0x01000 /* Do not remove members. */ +#define RTLD_NOLOAD 0x02000 /* Do not load if not already loaded. */ /* * Request arguments for dlinfo(). Modified: head/lib/libc/gen/dlopen.3 ============================================================================== --- head/lib/libc/gen/dlopen.3 Fri Jul 17 19:38:07 2009 (r195744) +++ head/lib/libc/gen/dlopen.3 Fri Jul 17 19:45:42 2009 (r195745) @@ -32,7 +32,7 @@ .\" @(#) dlopen.3 1.6 90/01/31 SMI .\" $FreeBSD$ .\" -.Dd April 1, 2009 +.Dd July 7, 2009 .Os .Dt DLOPEN 3 .Sh NAME @@ -148,6 +148,13 @@ The same behaviour may be requested by .Fl "z nodelete" option of the static linker .Xr ld 1 . +.It Dv RTLD_NOLOAD +Ony return valid handle for the object if it is already loaded in +the process address space, otherwise +.Dv NULL +is returned. +Other mode flags may be specified, which will be applied for promotion +for the found object. .El .Pp If Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Fri Jul 17 19:38:07 2009 (r195744) +++ head/libexec/rtld-elf/rtld.c Fri Jul 17 19:45:42 2009 (r195745) @@ -105,7 +105,7 @@ static void linkmap_add(Obj_Entry *); static void linkmap_delete(Obj_Entry *); static int load_needed_objects(Obj_Entry *); static int load_preload_objects(void); -static Obj_Entry *load_object(const char *, const Obj_Entry *); +static Obj_Entry *load_object(const char *, const Obj_Entry *, int); static Obj_Entry *obj_from_addr(const void *); static void objlist_call_fini(Objlist *, bool, int *); static void objlist_call_init(Objlist *, int *); @@ -1432,7 +1432,8 @@ load_needed_objects(Obj_Entry *first) Needed_Entry *needed; for (needed = obj->needed; needed != NULL; needed = needed->next) { - obj1 = needed->obj = load_object(obj->strtab + needed->name, obj); + obj1 = needed->obj = load_object(obj->strtab + needed->name, obj, + false); if (obj1 == NULL && !ld_tracing) return -1; if (obj1 != NULL && obj1->z_nodelete && !obj1->ref_nodel) { @@ -1463,7 +1464,7 @@ load_preload_objects(void) savech = p[len]; p[len] = '\0'; - if (load_object(p, NULL) == NULL) + if (load_object(p, NULL, false) == NULL) return -1; /* XXX - cleanup */ p[len] = savech; p += len; @@ -1480,7 +1481,7 @@ load_preload_objects(void) * on failure. */ static Obj_Entry * -load_object(const char *name, const Obj_Entry *refobj) +load_object(const char *name, const Obj_Entry *refobj, int noload) { Obj_Entry *obj; int fd = -1; @@ -1526,6 +1527,8 @@ load_object(const char *name, const Obj_ close(fd); return obj; } + if (noload) + return (NULL); /* First use of this object, so we must map it in */ obj = do_load_object(fd, name, path, &sb); @@ -1982,13 +1985,14 @@ dlopen(const char *name, int mode) Obj_Entry **old_obj_tail; Obj_Entry *obj; Objlist initlist; - int result, lockstate, nodelete; + int result, lockstate, nodelete, noload; LD_UTRACE(UTRACE_DLOPEN_START, NULL, NULL, 0, mode, name); ld_tracing = (mode & RTLD_TRACE) == 0 ? NULL : "1"; if (ld_tracing != NULL) environ = (char **)*get_program_var_addr("environ"); nodelete = mode & RTLD_NODELETE; + noload = mode & RTLD_NOLOAD; objlist_init(&initlist); @@ -2001,7 +2005,7 @@ dlopen(const char *name, int mode) obj = obj_main; obj->refcount++; } else { - obj = load_object(name, obj_main); + obj = load_object(name, obj_main, noload); } if (obj) { From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 20:12:14 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 614771065673; Fri, 17 Jul 2009 20:12:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: src-committers@FreeBSD.org Date: Fri, 17 Jul 2009 16:11:48 -0400 User-Agent: KMail/1.6.2 References: <200907171945.n6HJjg2E080275@svn.freebsd.org> In-Reply-To: <200907171945.n6HJjg2E080275@svn.freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200907171612.01386.jkim@FreeBSD.org> Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, Konstantin Belousov Subject: Re: svn commit: r195745 - in head: include lib/libc/gen libexec/rtld-elf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 20:12:15 -0000 On Friday 17 July 2009 03:45 pm, Konstantin Belousov wrote: > Author: kib > Date: Fri Jul 17 19:45:42 2009 > New Revision: 195745 > URL: http://svn.freebsd.org/changeset/base/195745 > > Log: > Implement RTLD_NOLOAD flag for dlopen(3). There was brief discussion long ago: http://docs.freebsd.org/cgi/mid.cgi?Pine.BSF.4.21.0005262046240.6763-100000 http://docs.freebsd.org/cgi/mid.cgi?200005282207.PAA13158 It was implemented in glibc 2.2 according to the manual page: http://www.linuxhowtos.org/manpages/3p/dlsym.htm This explains what it does: http://stupefydeveloper.blogspot.com/2008/03/dlopen-performance.html FYI... Jung-uk Kim From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 21:11:09 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54869106566C; Fri, 17 Jul 2009 21:11:09 +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 4286D8FC15; Fri, 17 Jul 2009 21:11:09 +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 n6HLB8Sk082141; Fri, 17 Jul 2009 21:11:08 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HLB8Im082138; Fri, 17 Jul 2009 21:11:08 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907172111.n6HLB8Im082138@svn.freebsd.org> From: Sam Leffler Date: Fri, 17 Jul 2009 21:11: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: r195746 - head/usr.sbin/wlandebug X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 21:11:10 -0000 Author: sam Date: Fri Jul 17 21:11:08 2009 New Revision: 195746 URL: http://svn.freebsd.org/changeset/base/195746 Log: add mesh support Submitted by: rpaulo Approved by: re (kib) Modified: head/usr.sbin/wlandebug/wlandebug.8 head/usr.sbin/wlandebug/wlandebug.c Modified: head/usr.sbin/wlandebug/wlandebug.8 ============================================================================== --- head/usr.sbin/wlandebug/wlandebug.8 Fri Jul 17 19:45:42 2009 (r195745) +++ head/usr.sbin/wlandebug/wlandebug.8 Fri Jul 17 21:11:08 2009 (r195746) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 19, 2008 +.Dd July 17, 2009 .Dt WLANDEBUG 8 .Os .Sh NAME @@ -97,11 +97,8 @@ state machine operation. 802.11 power save operation; in hostap mode this enables copious information about buffered frames for stations operating in power save mode. -.It Ar dot1x -802.1x operation; not presently meaningful as 802.1x protocol -support is implemented in user mode by the -.Xr hostapd 8 -program. +.It Ar hwmp +trace operation of Hybrid Wireless Mesh Protocol processing. .It Ar dot1xsm 802.1x state machine operation; not presently meaningful as 802.1x protocol support is implemented in user mode by the @@ -119,13 +116,8 @@ not presently meaningful as 802.1x proto support is implemented in user mode by the .Xr hostapd 8 program. -.It Ar radkeys -include key contents when dumping packets exchanged with the -radius backend for 802.1x operation; -not presently meaningful as 802.1x protocol -support is implemented in user mode by the -.Xr hostapd 8 -program. +.It Ar mesh +trace operation of 802.11s mesh protocol processing. .It Ar wpa trace operation of the WPA protocol; only partly meaningful as WPA protocol Modified: head/usr.sbin/wlandebug/wlandebug.c ============================================================================== --- head/usr.sbin/wlandebug/wlandebug.c Fri Jul 17 19:45:42 2009 (r195745) +++ head/usr.sbin/wlandebug/wlandebug.c Fri Jul 17 21:11:08 2009 (r195746) @@ -61,11 +61,11 @@ const char *progname; #define IEEE80211_MSG_OUTPUT 0x00100000 /* output handling */ #define IEEE80211_MSG_STATE 0x00080000 /* state machine */ #define IEEE80211_MSG_POWER 0x00040000 /* power save handling */ -#define IEEE80211_MSG_DOT1X 0x00020000 /* 802.1x authenticator */ +#define IEEE80211_MSG_HWMP 0x00020000 /* hybrid mesh protocol */ #define IEEE80211_MSG_DOT1XSM 0x00010000 /* 802.1x state machine */ #define IEEE80211_MSG_RADIUS 0x00008000 /* 802.1x radius client */ #define IEEE80211_MSG_RADDUMP 0x00004000 /* dump 802.1x radius packets */ -#define IEEE80211_MSG_RADKEYS 0x00002000 /* dump 802.1x keys */ +#define IEEE80211_MSG_MESH 0x00002000 /* mesh networking */ #define IEEE80211_MSG_WPA 0x00001000 /* WPA/RSN protocol */ #define IEEE80211_MSG_ACL 0x00000800 /* ACL handling */ #define IEEE80211_MSG_WME 0x00000400 /* WME protocol */ @@ -97,11 +97,11 @@ static struct { { "output", IEEE80211_MSG_OUTPUT }, { "state", IEEE80211_MSG_STATE }, { "power", IEEE80211_MSG_POWER }, - { "dot1x", IEEE80211_MSG_DOT1X }, + { "hwmp", IEEE80211_MSG_HWMP }, { "dot1xsm", IEEE80211_MSG_DOT1XSM }, { "radius", IEEE80211_MSG_RADIUS }, { "raddump", IEEE80211_MSG_RADDUMP }, - { "radkeys", IEEE80211_MSG_RADKEYS }, + { "mesh", IEEE80211_MSG_MESH }, { "wpa", IEEE80211_MSG_WPA }, { "acl", IEEE80211_MSG_ACL }, { "wme", IEEE80211_MSG_WME }, From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 21:15:10 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 310831065738; Fri, 17 Jul 2009 21:15:10 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 202218FC14; Fri, 17 Jul 2009 21:15:10 +0000 (UTC) (envelope-from np@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 n6HLFAhN082255; Fri, 17 Jul 2009 21:15:10 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HLFAfa082253; Fri, 17 Jul 2009 21:15:10 GMT (envelope-from np@svn.freebsd.org) Message-Id: <200907172115.n6HLFAfa082253@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 17 Jul 2009 21:15: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: r195747 - head/lib/libdwarf X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 21:15:10 -0000 Author: np Date: Fri Jul 17 21:15:09 2009 New Revision: 195747 URL: http://svn.freebsd.org/changeset/base/195747 Log: Store accurate offset information in CTF data. A large number of structs had incorrect member offsets, limiting dtrace's usefulness when working with them. An example of incorrect info (struct rtentry) from before this fix: <1738> STRUCT rtentry (200 bytes) rt_nodes type=1731 off=0 rt_gateway type=849 off=65280 <== WRONG, should be 8 * 96 rt_flags type=3 off=65344 <== wrong again, and so on.. ... Approved by: re (kib), gnn (mentor) MFC after: 2 weeks Modified: head/lib/libdwarf/dwarf_loc.c Modified: head/lib/libdwarf/dwarf_loc.c ============================================================================== --- head/lib/libdwarf/dwarf_loc.c Fri Jul 17 21:11:08 2009 (r195746) +++ head/lib/libdwarf/dwarf_loc.c Fri Jul 17 21:15:09 2009 (r195747) @@ -236,7 +236,7 @@ dwarf_op_num(uint8_t pointer_size, uint8 case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: - uval = dwarf_decode_sleb128(&p); + uval = dwarf_decode_uleb128(&p); break; /* Operations with a signed LEB128 operand. */ @@ -458,7 +458,7 @@ dwarf_loc_fill(Dwarf_Locdesc *lbuf, uint case DW_OP_plus_uconst: case DW_OP_regx: case DW_OP_piece: - operand1 = dwarf_decode_sleb128(&p); + operand1 = dwarf_decode_uleb128(&p); break; /* Operations with a signed LEB128 operand. */ From owner-svn-src-head@FreeBSD.ORG Fri Jul 17 21:48:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 952031065670; Fri, 17 Jul 2009 21:48:08 +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 83A768FC1B; Fri, 17 Jul 2009 21:48:08 +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 n6HLm8CA083063; Fri, 17 Jul 2009 21:48:08 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6HLm8uT083061; Fri, 17 Jul 2009 21:48:08 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <200907172148.n6HLm8uT083061@svn.freebsd.org> From: Alexander Motin Date: Fri, 17 Jul 2009 21:48: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: r195748 - head/sys/cam/ata X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Jul 2009 21:48:09 -0000 Author: mav Date: Fri Jul 17 21:48:08 2009 New Revision: 195748 URL: http://svn.freebsd.org/changeset/base/195748 Log: Fix copy-paste bug. Use regular non-polled mode for executing FLUSHCACHE command on disk close. Approved by: re (implicitly) Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Fri Jul 17 21:15:09 2009 (r195747) +++ head/sys/cam/ata/ata_da.c Fri Jul 17 21:48:08 2009 (r195748) @@ -275,7 +275,6 @@ adaclose(struct disk *dp) if (softc->flags & ADA_FLAG_CAN_FLUSHCACHE) { ccb = cam_periph_getccb(periph, /*priority*/1); - ccb->ccb_h.ccb_state = ADA_CCB_DUMP; cam_fill_ataio(&ccb->ataio, 1, adadone, @@ -289,7 +288,9 @@ adaclose(struct disk *dp) ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE48, 0, 0, 0); else ata_48bit_cmd(&ccb->ataio, ATA_FLUSHCACHE, 0, 0, 0); - xpt_polled_action(ccb); + cam_periph_runccb(ccb, /*error_routine*/NULL, /*cam_flags*/0, + /*sense_flags*/SF_RETRY_UA, + softc->disk->d_devstat); if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) xpt_print(periph->path, "Synchronize cache failed\n"); From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 01:11:03 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BF0C106564A; Sat, 18 Jul 2009 01:11:03 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: from mail-ew0-f220.google.com (mail-ew0-f220.google.com [209.85.219.220]) by mx1.freebsd.org (Postfix) with ESMTP id A12568FC13; Sat, 18 Jul 2009 01:11:02 +0000 (UTC) (envelope-from rpaulo@gmail.com) Received: by ewy20 with SMTP id 20so1025434ewy.43 for ; Fri, 17 Jul 2009 18:11:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=h/zuRoHu25G0vb5VzdyyHH14mdahHhrrfPKaYNm5nek=; b=wgcPXyfbdYLEwmM95WFNep6Io2HqEhW+R5MyM3PkJcWameUFiAxs64l7ubDTdJxMR9 8JYV3+/VaUVSznp5moHaOAQE6whgMvwkh4f1eJlsDvhbWT6WzPE1HzDnE9jY513kpUuI +qnPa12JRG/r337EL3Sl7QKFuyGJD1TuaB3I8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=O5RIaJvH20USOwl5/+veTYWK118kRVwCZlOcELxaA0XLY1op6fII1tZ73HbHqlEV76 KQMiI5H/CjYo+yX9tCi/w7Don980c0Kz82AIaL8FR+ZI0tKjJwC66qGQSH+cEHgqFXf+ 2D8nw6NyG4o5zCWINzPY556lisP8sTENPdTH8= Received: by 10.210.120.7 with SMTP id s7mr1276106ebc.70.1247879461777; Fri, 17 Jul 2009 18:11:01 -0700 (PDT) Received: from omega.lan (bl6-149-62.dsl.telepac.pt [82.155.149.62]) by mx.google.com with ESMTPS id 28sm20073eye.59.2009.07.17.18.11.00 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 17 Jul 2009 18:11:01 -0700 (PDT) Message-Id: <1077F6A6-4EDE-4FB3-A938-49FE71B1A82F@gmail.com> From: Rui Paulo To: Sam Leffler In-Reply-To: <200907172111.n6HLB8Im082138@svn.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Date: Sat, 18 Jul 2009 02:10:59 +0100 References: <200907172111.n6HLB8Im082138@svn.freebsd.org> X-Mailer: Apple Mail (2.935.3) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r195746 - head/usr.sbin/wlandebug X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 01:11:04 -0000 On 17 Jul 2009, at 22:11, Sam Leffler wrote: > Author: sam > Date: Fri Jul 17 21:11:08 2009 > New Revision: 195746 > URL: http://svn.freebsd.org/changeset/base/195746 > > Log: > add mesh support > > Submitted by: rpaulo > Approved by: re (kib) Thanks! -- Rui Paulo From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 01:50:05 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A75C11065670; Sat, 18 Jul 2009 01:50:05 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94D498FC17; Sat, 18 Jul 2009 01:50:05 +0000 (UTC) (envelope-from alc@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 n6I1o5DK087747; Sat, 18 Jul 2009 01:50:05 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6I1o5i4087743; Sat, 18 Jul 2009 01:50:05 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <200907180150.n6I1o5i4087743@svn.freebsd.org> From: Alan Cox Date: Sat, 18 Jul 2009 01:50: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: r195749 - in head/sys: amd64/amd64 i386/i386 vm X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 01:50:06 -0000 Author: alc Date: Sat Jul 18 01:50:05 2009 New Revision: 195749 URL: http://svn.freebsd.org/changeset/base/195749 Log: An addendum to r195649, "Add support to the virtual memory system for configuring machine-dependent memory attributes...": Don't set the memory attribute for a "real" page that is allocated to a device object in vm_page_alloc(). It is a pointless act, because the device pager replaces this "real" page with a "fake" page and sets the memory attribute on that "fake" page. Eliminate pointless code from pmap_cache_bits() on amd64. Employ the "Self Snoop" feature supported by some x86 processors to avoid cache flushes in the pmap. Approved by: re (kib) Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/pmap.c head/sys/vm/vm_page.c Modified: head/sys/amd64/amd64/pmap.c ============================================================================== --- head/sys/amd64/amd64/pmap.c Fri Jul 17 21:48:08 2009 (r195748) +++ head/sys/amd64/amd64/pmap.c Sat Jul 18 01:50:05 2009 (r195749) @@ -752,21 +752,6 @@ pmap_cache_bits(int mode, boolean_t is_p /* The PAT bit is different for PTE's and PDE's. */ pat_flag = is_pde ? PG_PDE_PAT : PG_PTE_PAT; - /* If we don't support PAT, map extended modes to older ones. */ - if (!(cpu_feature & CPUID_PAT)) { - switch (mode) { - case PAT_UNCACHEABLE: - case PAT_WRITE_THROUGH: - case PAT_WRITE_BACK: - break; - case PAT_UNCACHED: - case PAT_WRITE_COMBINING: - case PAT_WRITE_PROTECTED: - mode = PAT_UNCACHEABLE; - break; - } - } - /* Map the caching mode to a PAT index. */ switch (mode) { case PAT_UNCACHEABLE: @@ -4295,7 +4280,9 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_ pa += PAGE_SIZE; } pmap_invalidate_range(kernel_pmap, va, tmpva); - pmap_invalidate_cache(); + /* If "Self Snoop" is supported, do nothing. */ + if (!(cpu_feature & CPUID_SS)) + pmap_invalidate_cache(); return ((void *)(va + offset)); } @@ -4634,7 +4621,9 @@ pmap_change_attr_locked(vm_offset_t va, */ if (changed) { pmap_invalidate_range(kernel_pmap, base, tmpva); - pmap_invalidate_cache(); + /* If "Self Snoop" is supported, do nothing. */ + if (!(cpu_feature & CPUID_SS)) + pmap_invalidate_cache(); } return (error); } Modified: head/sys/i386/i386/pmap.c ============================================================================== --- head/sys/i386/i386/pmap.c Fri Jul 17 21:48:08 2009 (r195748) +++ head/sys/i386/i386/pmap.c Sat Jul 18 01:50:05 2009 (r195749) @@ -4420,7 +4420,9 @@ pmap_mapdev_attr(vm_paddr_t pa, vm_size_ pa += PAGE_SIZE; } pmap_invalidate_range(kernel_pmap, va, tmpva); - pmap_invalidate_cache(); + /* If "Self Snoop" is supported, do nothing. */ + if (!(cpu_feature & CPUID_SS)) + pmap_invalidate_cache(); return ((void *)(va + offset)); } @@ -4467,7 +4469,9 @@ pmap_page_set_memattr(vm_page_t m, vm_me * Flush CPU caches to make sure any data isn't cached that shouldn't * be, etc. */ - pmap_invalidate_cache(); + /* If "Self Snoop" is supported, do nothing. */ + if (!(cpu_feature & CPUID_SS)) + pmap_invalidate_cache(); } int @@ -4526,7 +4530,9 @@ pmap_change_attr(vm_offset_t va, vm_size * be, etc. */ pmap_invalidate_range(kernel_pmap, base, tmpva); - pmap_invalidate_cache(); + /* If "Self Snoop" is supported, do nothing. */ + if (!(cpu_feature & CPUID_SS)) + pmap_invalidate_cache(); return (0); } Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Fri Jul 17 21:48:08 2009 (r195748) +++ head/sys/vm/vm_page.c Sat Jul 18 01:50:05 2009 (r195749) @@ -1161,7 +1161,9 @@ vm_page_alloc(vm_object_t object, vm_pin mtx_unlock(&vm_page_queue_free_mtx); if (object != NULL) { - if (object->memattr != VM_MEMATTR_DEFAULT) + /* Ignore device objects; the pager sets "memattr" for them. */ + if (object->memattr != VM_MEMATTR_DEFAULT && + object->type != OBJT_DEVICE) pmap_page_set_memattr(m, object->memattr); vm_page_insert(m, object, pindex); } else From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 06:08:21 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 85B3B106566C; Sat, 18 Jul 2009 06:08:21 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5AA728FC12; Sat, 18 Jul 2009 06:08:21 +0000 (UTC) (envelope-from marcus@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 n6I68LlW092871; Sat, 18 Jul 2009 06:08:21 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6I68LVx092870; Sat, 18 Jul 2009 06:08:21 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200907180608.n6I68LVx092870@svn.freebsd.org> From: Joe Marcus Clarke Date: Sat, 18 Jul 2009 06:08: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: r195750 - head/etc/pam.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 06:08:22 -0000 Author: marcus (doc,ports committer) Date: Sat Jul 18 06:08:21 2009 New Revision: 195750 URL: http://svn.freebsd.org/changeset/base/195750 Log: Remove this file. It is no longer needed as x11/gdm provides its own version under /usr/local/etc/pam.d. Approved by: re (kib) Deleted: head/etc/pam.d/gdm From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 08:56:54 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87570106566C; Sat, 18 Jul 2009 08:56:54 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from sakura.ninth-nine.com (unknown [IPv6:2001:2f0:104:80a0:21b:78ff:fe37:f1cf]) by mx1.freebsd.org (Postfix) with ESMTP id 368818FC1A; Sat, 18 Jul 2009 08:56:54 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from nadesico.ninth-nine.com (ns1.ninth-nine.com [219.127.74.121] (may be forged)) (authenticated bits=0) by sakura.ninth-nine.com (8.14.3/8.14.3/NinthNine) with ESMTP id n6I8ulk7025429; Sat, 18 Jul 2009 17:56:52 +0900 (JST) (envelope-from nork@FreeBSD.org) Date: Sat, 18 Jul 2009 17:56:46 +0900 From: Norikatsu Shigemura To: Joe Marcus Clarke Message-Id: <20090718175646.2108bfec.nork@FreeBSD.org> In-Reply-To: <200907180608.n6I68LVx092870@svn.freebsd.org> References: <200907180608.n6I68LVx092870@svn.freebsd.org> X-Mailer: Sylpheed 2.6.0 (GTK+ 2.16.4; i386-portbld-freebsd8.0) 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, Norikatsu Shigemura Subject: Re: svn commit: r195750 - head/etc/pam.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 08:56:55 -0000 Hi marcus. On Sat, 18 Jul 2009 06:08:21 +0000 (UTC) Joe Marcus Clarke wrote: > Author: marcus (doc,ports committer) > Date: Sat Jul 18 06:08:21 2009 > New Revision: 195750 > URL: http://svn.freebsd.org/changeset/base/195750 > Log: > Remove this file. It is no longer needed as x11/gdm provides its own > version under /usr/local/etc/pam.d. > Approved by: re (kib) Please remove 'gdm' from src/etc/pam.d/Makefile, too! From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 10:00:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C05DD106564A; Sat, 18 Jul 2009 10:00:07 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (skuns.zoral.com.ua [91.193.166.194]) by mx1.freebsd.org (Postfix) with ESMTP id 293F78FC14; Sat, 18 Jul 2009 10:00:06 +0000 (UTC) (envelope-from kostikbel@gmail.com) 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 n6IA02EL030796 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 18 Jul 2009 13:00:02 +0300 (EEST) (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 n6IA02lC066572; Sat, 18 Jul 2009 13:00:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id n6IA02PB066571; Sat, 18 Jul 2009 13:00:02 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 18 Jul 2009 13:00:02 +0300 From: Kostik Belousov To: Joe Marcus Clarke Message-ID: <20090718100002.GI55190@deviant.kiev.zoral.com.ua> References: <200907180608.n6I68LVx092870@svn.freebsd.org> <20090718175646.2108bfec.nork@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iu6dh9Tg0OoAnJiR" Content-Disposition: inline In-Reply-To: <20090718175646.2108bfec.nork@FreeBSD.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at 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 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Norikatsu Shigemura Subject: Re: svn commit: r195750 - head/etc/pam.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 10:00:08 -0000 --iu6dh9Tg0OoAnJiR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jul 18, 2009 at 05:56:46PM +0900, Norikatsu Shigemura wrote: > Hi marcus. >=20 > On Sat, 18 Jul 2009 06:08:21 +0000 (UTC) > Joe Marcus Clarke wrote: > > Author: marcus (doc,ports committer) > > Date: Sat Jul 18 06:08:21 2009 > > New Revision: 195750 > > URL: http://svn.freebsd.org/changeset/base/195750 > > Log: > > Remove this file. It is no longer needed as x11/gdm provides its own > > version under /usr/local/etc/pam.d. > > Approved by: re (kib) >=20 > Please remove 'gdm' from src/etc/pam.d/Makefile, too! Hmm, and add it to the ObsoleteFiles.inc. --iu6dh9Tg0OoAnJiR Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEARECAAYFAkphnSIACgkQC3+MBN1Mb4gmCwCgtm0ICwjV6HXbyIoIXTk7O5K9 /WcAoMdZ7RQeGsmKNXBFDFYD8CWRU78x =xENh -----END PGP SIGNATURE----- --iu6dh9Tg0OoAnJiR-- From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 10:36:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CEC0106566C; Sat, 18 Jul 2009 10:36:18 +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 69BC68FC12; Sat, 18 Jul 2009 10:36:18 +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 n6IAaIHt097925; Sat, 18 Jul 2009 10:36:18 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6IAaISk097923; Sat, 18 Jul 2009 10:36:18 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200907181036.n6IAaISk097923@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Sat, 18 Jul 2009 10:36: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: r195751 - head/usr.bin/kdump X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 10:36:19 -0000 Author: bz Date: Sat Jul 18 10:36:18 2009 New Revision: 195751 URL: http://svn.freebsd.org/changeset/base/195751 Log: Remove no longer needed #include after removing the legacy vimage API in r195741. Reviewed by: rwatson Approved by: re (kib) Modified: head/usr.bin/kdump/mkioctls Modified: head/usr.bin/kdump/mkioctls ============================================================================== --- head/usr.bin/kdump/mkioctls Sat Jul 18 06:08:21 2009 (r195750) +++ head/usr.bin/kdump/mkioctls Sat Jul 18 10:36:18 2009 (r195751) @@ -41,7 +41,6 @@ BEGIN { print "#include " print "#include " print "#include " - print "#include " print "#include " print "#include " print "#include " From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 11:12:48 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E364F1065672; Sat, 18 Jul 2009 11:12:48 +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 D14648FC13; Sat, 18 Jul 2009 11:12:48 +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 n6IBCmad000107; Sat, 18 Jul 2009 11:12:48 GMT (envelope-from lulf@svn.freebsd.org) Received: (from lulf@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6IBCmH6000105; Sat, 18 Jul 2009 11:12:48 GMT (envelope-from lulf@svn.freebsd.org) Message-Id: <200907181112.n6IBCmH6000105@svn.freebsd.org> From: Ulf Lilleengen Date: Sat, 18 Jul 2009 11:12: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: r195752 - head/sys/geom/vinum X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 11:12:49 -0000 Author: lulf Date: Sat Jul 18 11:12:48 2009 New Revision: 195752 URL: http://svn.freebsd.org/changeset/base/195752 Log: - Fix the issue with read access count modification on RAID-5 plexes properly. If the access counts were not increased and decreased in equal numbers by gvinum consumers, the read access count would be inconsistent with the write access count. Instead, modify the read access count with the write access count directly to prevent any inconsistencies. Approved by: re (kib) Modified: head/sys/geom/vinum/geom_vinum.c Modified: head/sys/geom/vinum/geom_vinum.c ============================================================================== --- head/sys/geom/vinum/geom_vinum.c Sat Jul 18 10:36:18 2009 (r195751) +++ head/sys/geom/vinum/geom_vinum.c Sat Jul 18 11:12:48 2009 (r195752) @@ -133,10 +133,12 @@ gv_access(struct g_provider *pp, int dr, error = ENXIO; gp = pp->geom; sc = gp->softc; - if (dw > 0 && dr == 0) - dr = 1; - else if (dw < 0 && dr == 0) - dr = -1; + /* + * We want to modify the read count with the write count in case we have + * plexes in a RAID-5 organization. + */ + dr += dw; + LIST_FOREACH(d, &sc->drives, drive) { if (d->consumer == NULL) continue; From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 16:29:41 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BAA51065675; Sat, 18 Jul 2009 16:29:41 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E56AE8FC19; Sat, 18 Jul 2009 16:29:40 +0000 (UTC) (envelope-from marcus@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 n6IGTe0H006105; Sat, 18 Jul 2009 16:29:40 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6IGTesn006103; Sat, 18 Jul 2009 16:29:40 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200907181629.n6IGTesn006103@svn.freebsd.org> From: Joe Marcus Clarke Date: Sat, 18 Jul 2009 16:29: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: r195753 - head/etc/pam.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 16:29:41 -0000 Author: marcus (doc,ports committer) Date: Sat Jul 18 16:29:40 2009 New Revision: 195753 URL: http://svn.freebsd.org/changeset/base/195753 Log: Remove gdm as it is no longer needed. Approved by: re (kib) Reminded by: nork Modified: head/etc/pam.d/Makefile Modified: head/etc/pam.d/Makefile ============================================================================== --- head/etc/pam.d/Makefile Sat Jul 18 11:12:48 2009 (r195752) +++ head/etc/pam.d/Makefile Sat Jul 18 16:29:40 2009 (r195753) @@ -6,7 +6,6 @@ FILES= README \ atrun \ cron \ ftpd \ - gdm \ imap \ kde \ login \ From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 16:33:28 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FE54106566C; Sat, 18 Jul 2009 16:33:28 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA858FC13; Sat, 18 Jul 2009 16:33:28 +0000 (UTC) (envelope-from marcus@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 n6IGXRUp006235; Sat, 18 Jul 2009 16:33:27 GMT (envelope-from marcus@svn.freebsd.org) Received: (from marcus@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6IGXRMJ006233; Sat, 18 Jul 2009 16:33:27 GMT (envelope-from marcus@svn.freebsd.org) Message-Id: <200907181633.n6IGXRMJ006233@svn.freebsd.org> From: Joe Marcus Clarke Date: Sat, 18 Jul 2009 16:33: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: r195754 - head X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 16:33:29 -0000 Author: marcus (doc,ports committer) Date: Sat Jul 18 16:33:27 2009 New Revision: 195754 URL: http://svn.freebsd.org/changeset/base/195754 Log: Add an entry for etc/pam.d/gdm as this file is no longer required. Approved by: re (kib) Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sat Jul 18 16:29:40 2009 (r195753) +++ head/ObsoleteFiles.inc Sat Jul 18 16:33:27 2009 (r195754) @@ -14,6 +14,8 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20090718: the gdm pam.d file is no longer required. +OLD_FILES+=etc/pam.d/gdm # 20090713: vimage container structs removed. OLD_FILES+=usr/include/netinet/vinet.h OLD_FILES+=usr/include/netinet6/vinet6.h From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 16:33:54 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941B61065741; Sat, 18 Jul 2009 16:33:54 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 490868FC0C; Sat, 18 Jul 2009 16:33:54 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.3/8.14.3) with ESMTP id n6IGadhO020862; Sat, 18 Jul 2009 12:36:39 -0400 (EDT) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Norikatsu Shigemura In-Reply-To: <20090718175646.2108bfec.nork@FreeBSD.org> References: <200907180608.n6I68LVx092870@svn.freebsd.org> <20090718175646.2108bfec.nork@FreeBSD.org> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-PYDa+tzStLUZP9qN8wwC" Organization: FreeBSD, Inc. Date: Sat, 18 Jul 2009 12:33:56 -0400 Message-Id: <1247934836.82470.10.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on creme-brulee.marcuscom.com Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r195750 - head/etc/pam.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 16:33:55 -0000 --=-PYDa+tzStLUZP9qN8wwC Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, 2009-07-18 at 17:56 +0900, Norikatsu Shigemura wrote: > Hi marcus. >=20 > On Sat, 18 Jul 2009 06:08:21 +0000 (UTC) > Joe Marcus Clarke wrote: > > Author: marcus (doc,ports committer) > > Date: Sat Jul 18 06:08:21 2009 > > New Revision: 195750 > > URL: http://svn.freebsd.org/changeset/base/195750 > > Log: > > Remove this file. It is no longer needed as x11/gdm provides its own > > version under /usr/local/etc/pam.d. > > Approved by: re (kib) >=20 > Please remove 'gdm' from src/etc/pam.d/Makefile, too! Sorry, fixed. Thanks for the whack upside the head. Joe --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-PYDa+tzStLUZP9qN8wwC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkph+XIACgkQb2iPiv4Uz4cAiACeJuJKg8i0o3bu88KEyLiQTFQr btQAn3NWjAy7ML3d5OCny9JkjoB1JX7k =VeyQ -----END PGP SIGNATURE----- --=-PYDa+tzStLUZP9qN8wwC-- From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 16:34:06 2009 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F8371065741; Sat, 18 Jul 2009 16:34:06 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id 26CBE8FC1B; Sat, 18 Jul 2009 16:34:06 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.3/8.14.3) with ESMTP id n6IGapKb020866; Sat, 18 Jul 2009 12:36:51 -0400 (EDT) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Kostik Belousov In-Reply-To: <20090718100002.GI55190@deviant.kiev.zoral.com.ua> References: <200907180608.n6I68LVx092870@svn.freebsd.org> <20090718175646.2108bfec.nork@FreeBSD.org> <20090718100002.GI55190@deviant.kiev.zoral.com.ua> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-VtMiTIg/g7fPH9QjQ4Ns" Organization: FreeBSD, Inc. Date: Sat, 18 Jul 2009 12:34:07 -0400 Message-Id: <1247934847.82470.11.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.26.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on creme-brulee.marcuscom.com Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Norikatsu Shigemura Subject: Re: svn commit: r195750 - head/etc/pam.d X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 16:34:07 -0000 --=-VtMiTIg/g7fPH9QjQ4Ns Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sat, 2009-07-18 at 13:00 +0300, Kostik Belousov wrote: > On Sat, Jul 18, 2009 at 05:56:46PM +0900, Norikatsu Shigemura wrote: > > Hi marcus. > >=20 > > On Sat, 18 Jul 2009 06:08:21 +0000 (UTC) > > Joe Marcus Clarke wrote: > > > Author: marcus (doc,ports committer) > > > Date: Sat Jul 18 06:08:21 2009 > > > New Revision: 195750 > > > URL: http://svn.freebsd.org/changeset/base/195750 > > > Log: > > > Remove this file. It is no longer needed as x11/gdm provides its o= wn > > > version under /usr/local/etc/pam.d. > > > Approved by: re (kib) > >=20 > > Please remove 'gdm' from src/etc/pam.d/Makefile, too! > Hmm, and add it to the ObsoleteFiles.inc. Done. Thanks for the reminder. Joe --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-VtMiTIg/g7fPH9QjQ4Ns Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iEYEABECAAYFAkph+X4ACgkQb2iPiv4Uz4c5nwCfeQVB0bA6ITJT3maw3sbcFjO5 OtMAn1wpsXvDkik5i0WufkU5rLNLw21c =vuiG -----END PGP SIGNATURE----- --=-VtMiTIg/g7fPH9QjQ4Ns-- From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 17:38:18 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CE8C1065695; Sat, 18 Jul 2009 17:38:18 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5BACE8FC16; Sat, 18 Jul 2009 17:38:18 +0000 (UTC) (envelope-from bms@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 n6IHcIM4007530; Sat, 18 Jul 2009 17:38:18 GMT (envelope-from bms@svn.freebsd.org) Received: (from bms@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6IHcIrs007528; Sat, 18 Jul 2009 17:38:18 GMT (envelope-from bms@svn.freebsd.org) Message-Id: <200907181738.n6IHcIrs007528@svn.freebsd.org> From: Bruce M Simpson Date: Sat, 18 Jul 2009 17:38: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: r195755 - head/sys/netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 17:38:19 -0000 Author: bms Date: Sat Jul 18 17:38:18 2009 New Revision: 195755 URL: http://svn.freebsd.org/changeset/base/195755 Log: Fix a problem, whereby misbehaving IPv6 applications, which don't include a valid zone ID or interface identifier in a v6 multicast leave, would trigger a fairly paranoid KASSERT(). Observed with Boost++ regression tests on ref8.freebsd.org. Approved by: re (kib) Modified: head/sys/netinet6/in6_mcast.c Modified: head/sys/netinet6/in6_mcast.c ============================================================================== --- head/sys/netinet6/in6_mcast.c Sat Jul 18 16:33:27 2009 (r195754) +++ head/sys/netinet6/in6_mcast.c Sat Jul 18 17:38:18 2009 (r195755) @@ -2160,14 +2160,24 @@ in6p_leave_group(struct inpcb *inp, stru if (error) return (EADDRNOTAVAIL); /* + * Some badly behaved applications don't pass an ifindex + * or a scope ID, which is an API violation. In this case, + * perform a lookup as per a v6 join. + * * XXX For now, stomp on zone ID for the corner case. * This is not the 'KAME way', but we need to see the ifp * directly until such time as this implementation is * refactored, assuming the scope IDs are the way to go. */ ifindex = ntohs(gsa->sin6.sin6_addr.s6_addr16[1]); - KASSERT(ifindex != 0, ("%s: bad zone ID", __func__)); - ifp = ifnet_byindex(ifindex); + if (ifindex == 0) { + CTR2(KTR_MLD, "%s: warning: no ifindex, looking up " + "ifp for group %s.", __func__, + ip6_sprintf(ip6tbuf, &gsa->sin6.sin6_addr)); + ifp = in6p_lookup_mcast_ifp(inp, &gsa->sin6); + } else { + ifp = ifnet_byindex(ifindex); + } if (ifp == NULL) return (EADDRNOTAVAIL); } From owner-svn-src-head@FreeBSD.ORG Sat Jul 18 20:19:53 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D96E9106566B; Sat, 18 Jul 2009 20:19:53 +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 C79DB8FC15; Sat, 18 Jul 2009 20:19:53 +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 n6IKJrgU010844; Sat, 18 Jul 2009 20:19:53 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n6IKJrnj010839; Sat, 18 Jul 2009 20:19:53 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200907182019.n6IKJrnj010839@svn.freebsd.org> From: Sam Leffler Date: Sat, 18 Jul 2009 20:19: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: r195757 - head/sys/net80211 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Jul 2009 20:19:54 -0000 Author: sam Date: Sat Jul 18 20:19:53 2009 New Revision: 195757 URL: http://svn.freebsd.org/changeset/base/195757 Log: Move code that does payload realigment to a new routine, ieee80211_realign, so it can be reused. While here rewrite the logic to always use a single mbuf. Reviewed by: rpaulo Approved by: re (kib) Modified: head/sys/net80211/ieee80211_freebsd.c head/sys/net80211/ieee80211_input.c head/sys/net80211/ieee80211_input.h head/sys/net80211/ieee80211_ioctl.h Modified: head/sys/net80211/ieee80211_freebsd.c ============================================================================== --- head/sys/net80211/ieee80211_freebsd.c Sat Jul 18 20:19:25 2009 (r195756) +++ head/sys/net80211/ieee80211_freebsd.c Sat Jul 18 20:19:53 2009 (r195757) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include SYSCTL_NODE(_net, OID_AUTO, wlan, CTLFLAG_RD, 0, "IEEE 80211 parameters"); @@ -408,6 +409,43 @@ ieee80211_getmgtframe(uint8_t **frm, int return m; } +/* + * Re-align the payload in the mbuf. This is mainly used (right now) + * to handle IP header alignment requirements on certain architectures. + */ +struct mbuf * +ieee80211_realign(struct ieee80211vap *vap, struct mbuf *m, size_t align) +{ + int pktlen, space; + struct mbuf *n; + + pktlen = m->m_pkthdr.len; + space = pktlen + align; + if (space < MINCLSIZE) + n = m_gethdr(M_DONTWAIT, MT_DATA); + else { + n = m_getjcl(M_DONTWAIT, MT_DATA, M_PKTHDR, + space <= MCLBYTES ? MCLBYTES : +#if MJUMPAGESIZE != MCLBYTES + space <= MJUMPAGESIZE ? MJUMPAGESIZE : +#endif + space <= MJUM9BYTES ? MJUM9BYTES : MJUM16BYTES); + } + if (__predict_true(n != NULL)) { + m_move_pkthdr(n, m); + n->m_data = (caddr_t)(ALIGN(n->m_data + align) - align); + m_copydata(m, 0, pktlen, mtod(n, caddr_t)); + n->m_len = pktlen; + } else { + IEEE80211_DISCARD(vap, IEEE80211_MSG_ANY, + mtod(m, const struct ieee80211_frame *), NULL, + "%s", "no mbuf to realign"); + vap->iv_stats.is_rx_badalign++; + } + m_freem(m); + return n; +} + int ieee80211_add_callback(struct mbuf *m, void (*func)(struct ieee80211_node *, void *, int), void *arg) Modified: head/sys/net80211/ieee80211_input.c ============================================================================== --- head/sys/net80211/ieee80211_input.c Sat Jul 18 20:19:25 2009 (r195756) +++ head/sys/net80211/ieee80211_input.c Sat Jul 18 20:19:53 2009 (r195757) @@ -285,53 +285,9 @@ ieee80211_decap(struct ieee80211vap *vap } #ifdef ALIGNED_POINTER if (!ALIGNED_POINTER(mtod(m, caddr_t) + sizeof(*eh), uint32_t)) { - struct mbuf *n, *n0, **np; - caddr_t newdata; - int off, pktlen; - - n0 = NULL; - np = &n0; - off = 0; - pktlen = m->m_pkthdr.len; - while (pktlen > off) { - if (n0 == NULL) { - MGETHDR(n, M_DONTWAIT, MT_DATA); - if (n == NULL) { - m_freem(m); - return NULL; - } - M_MOVE_PKTHDR(n, m); - n->m_len = MHLEN; - } else { - MGET(n, M_DONTWAIT, MT_DATA); - if (n == NULL) { - m_freem(m); - m_freem(n0); - return NULL; - } - n->m_len = MLEN; - } - if (pktlen - off >= MINCLSIZE) { - MCLGET(n, M_DONTWAIT); - if (n->m_flags & M_EXT) - n->m_len = n->m_ext.ext_size; - } - if (n0 == NULL) { - newdata = - (caddr_t)ALIGN(n->m_data + sizeof(*eh)) - - sizeof(*eh); - n->m_len -= newdata - n->m_data; - n->m_data = newdata; - } - if (n->m_len > pktlen - off) - n->m_len = pktlen - off; - m_copydata(m, off, n->m_len, mtod(n, caddr_t)); - off += n->m_len; - *np = n; - np = &n->m_next; - } - m_freem(m); - m = n0; + m = ieee80211_realign(vap, m, sizeof(*eh)); + if (m == NULL) + return NULL; } #endif /* ALIGNED_POINTER */ if (llc != NULL) { Modified: head/sys/net80211/ieee80211_input.h ============================================================================== --- head/sys/net80211/ieee80211_input.h Sat Jul 18 20:19:25 2009 (r195756) +++ head/sys/net80211/ieee80211_input.h Sat Jul 18 20:19:53 2009 (r195757) @@ -146,6 +146,7 @@ void ieee80211_deliver_data(struct ieee8 struct ieee80211_node *, struct mbuf *); struct mbuf *ieee80211_defrag(struct ieee80211_node *, struct mbuf *, int); +struct mbuf *ieee80211_realign(struct ieee80211vap *, struct mbuf *, size_t); struct mbuf *ieee80211_decap(struct ieee80211vap *, struct mbuf *, int); struct mbuf *ieee80211_decap1(struct mbuf *, int *); int ieee80211_setup_rates(struct ieee80211_node *ni, Modified: head/sys/net80211/ieee80211_ioctl.h ============================================================================== --- head/sys/net80211/ieee80211_ioctl.h Sat Jul 18 20:19:25 2009 (r195756) +++ head/sys/net80211/ieee80211_ioctl.h Sat Jul 18 20:19:53 2009 (r195757) @@ -235,8 +235,9 @@ struct ieee80211_stats { uint32_t is_hwmp_wrongseq; /* wrong hwmp seq no. */ uint32_t is_hwmp_rootreqs; /* root PREQs sent */ uint32_t is_hwmp_rootrann; /* root RANNs sent */ + uint32_t is_rx_badalign; /* dropped 'cuz misaligned */ - uint32_t is_spare[16]; + uint32_t is_spare[15]; }; /*