From owner-svn-src-stable-8@FreeBSD.ORG Wed Aug 12 21:06:37 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED1521065674; Wed, 12 Aug 2009 21:06:37 +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 DA7568FC4B; Wed, 12 Aug 2009 21:06:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CL6bsp076718; Wed, 12 Aug 2009 21:06:37 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CL6b0b076713; Wed, 12 Aug 2009 21:06:37 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122106.n7CL6b0b076713@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: svn commit: r196157 - stable/8/share/man/man9 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8q-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:06:38 -0000 Author: sam Date: Wed Aug 12 21:06:37 2009 New Revision: 196157 URL: http://svn.freebsd.org/changeset/base/196157 Log: MFC 196155: First (early) draft of net80211 documentation. Note this is focused on driver writers (as opposed to folks adding to net80211). Reviewed by: wkoszek Approved by: re (rwatson) Added: stable/8/share/man/man9/ieee80211_amrr.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_amrr.9 stable/8/share/man/man9/ieee80211_beacon.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_beacon.9 stable/8/share/man/man9/ieee80211_bmiss.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_bmiss.9 stable/8/share/man/man9/ieee80211_ddb.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_ddb.9 stable/8/share/man/man9/ieee80211_regdomain.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_regdomain.9 stable/8/share/man/man9/ieee80211_scan.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_scan.9 stable/8/share/man/man9/ieee80211_vap.9 - copied unchanged from r196155, head/share/man/man9/ieee80211_vap.9 Deleted: stable/8/share/man/man9/ieee80211_ioctl.9 Modified: stable/8/share/man/man9/ (props changed) stable/8/share/man/man9/Makefile stable/8/share/man/man9/ieee80211.9 stable/8/share/man/man9/ieee80211_crypto.9 stable/8/share/man/man9/ieee80211_input.9 stable/8/share/man/man9/ieee80211_node.9 stable/8/share/man/man9/ieee80211_output.9 stable/8/share/man/man9/ieee80211_proto.9 stable/8/share/man/man9/ieee80211_radiotap.9 Modified: stable/8/share/man/man9/Makefile ============================================================================== --- stable/8/share/man/man9/Makefile Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/Makefile Wed Aug 12 21:06:37 2009 (r196157) @@ -121,13 +121,19 @@ MAN= accept_filter.9 \ hashinit.9 \ hexdump.9 \ ieee80211.9 \ + ieee80211_amrr.9 \ + ieee80211_beacon.9 \ + ieee80211_bmiss.9 \ ieee80211_crypto.9 \ + ieee80211_ddb.9 \ ieee80211_input.9 \ - ieee80211_ioctl.9 \ ieee80211_node.9 \ ieee80211_output.9 \ ieee80211_proto.9 \ ieee80211_radiotap.9 \ + ieee80211_regdomain.9 \ + ieee80211_scan.9 \ + ieee80211_vap.9 \ ifnet.9 \ inittodr.9 \ insmntque.9 \ @@ -627,52 +633,62 @@ MLINKS+=hash.9 hash32.9 \ MLINKS+=hashinit.9 hashdestroy.9 \ hashinit.9 hashinit_flags.9 \ hashinit.9 phashinit.9 -MLINKS+=ieee80211.9 ieee80211_attach.9 \ - ieee80211.9 ieee80211_chan2ieee.9 \ - ieee80211.9 ieee80211_chan2mode.9 \ - ieee80211.9 ieee80211_ieee2mhz.9 \ - ieee80211.9 ieee80211_ifattach.9 \ - ieee80211.9 ieee80211_ifdetach.9 \ - ieee80211.9 ieee80211_media2rate.9 \ - ieee80211.9 ieee80211_media_change.9 \ - ieee80211.9 ieee80211_media_init.9 \ - ieee80211.9 ieee80211_media_status.9 \ - ieee80211.9 ieee80211_mhz2ieee.9 \ - ieee80211.9 ieee80211_rate2media.9 \ - ieee80211.9 ieee80211_setmode.9 \ - ieee80211.9 ieee80211_watchdog.9 -MLINKS+=ieee80211_crypto.9 ieee80211_crypto_attach.9 \ - ieee80211_crypto.9 ieee80211_crypto_detach.9 \ - ieee80211_crypto.9 ieee80211_wep_crypt.9 -MLINKS+=ieee80211_input.9 ieee80211_decap.9 \ - ieee80211_input.9 ieee80211_recv_mgmt.9 -MLINKS+=ieee80211_ioctl.9 ieee80211_cfgget.9 \ - ieee80211_ioctl.9 ieee80211_cfgset.9 -MLINKS+=ieee80211_node.9 ieee80211_alloc_node.9 \ - ieee80211_node.9 ieee80211_begin_scan.9 \ - ieee80211_node.9 ieee80211_create_ibss.9 \ - ieee80211_node.9 ieee80211_dup_bss.9 \ - ieee80211_node.9 ieee80211_end_scan.9 \ - ieee80211_node.9 ieee80211_find_node.9 \ - ieee80211_node.9 ieee80211_free_allnodes.9 \ +MLINKS+=ieee80211.9 ieee80211_ifattach.9 \ + ieee80211.9 ieee80211_ifdetach.9 +MLINKS+=ieee80211_amrr.9 ieee80211_amrr_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_cleanup.9 \ + ieee80211_amrr.9 ieee80211_amrr_setinterval.9 \ + ieee80211_amrr.9 ieee80211_amrr_node_init.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_complete.9 \ + ieee80211_amrr.9 ieee80211_amrr_tx_update.9 +MLINKS+=ieee80211_beacon.9 ieee80211_beacon_alloc.9 \ + ieee80211_beacon.9 ieee80211_beacon_update.9 \ + ieee80211_beacon.9 ieee80211_beacon_notify.9 +MLINKS+=ieee80211_bmiss.9 ieee80211_beacon_miss.9 +MLINKS+=ieee80211_crypto.9 ieee80211_key_update_begin.9 \ + ieee80211_crypto.9 ieee80211_key_update_end.9 \ + ieee80211_crypto.9 ieee80211_crypto_newkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_setkey.9 \ + ieee80211_crypto.9 ieee80211_crypto_delglobalkeys.9 \ + ieee80211_crypto.9 ieee80211_crypto_reload_keys.9 \ + ieee80211_crypto.9 ieee80211_crypto_decap.9 \ + ieee80211_crypto.9 ieee80211_crypto_encap.9 \ + ieee80211_crypto.9 ieee80211_crypto_demic.9 \ + ieee80211_crypto.9 ieee80211_crypto_enmic.9 \ + ieee80211_crypto.9 ieee80211_notify_michael_failure.9 \ + ieee80211_crypto.9 ieee80211_notify_replay_failure.9 \ + ieee80211_crypto.9 ieee80211_crypto_register.9 \ + ieee80211_crypto.9 ieee80211_crypto_unregister.9 \ + ieee80211_crypto.9 ieee80211_crypto_available.9 +MLINKS+=ieee80211_input.9 ieee80211_input_all.9 +MLINKS+=ieee80211_node.9 ieee80211_find_rxnode.9 \ + ieee80211_node.9 ieee80211_find_rxnode_withkey.9 \ + ieee80211_node.9 ieee80211_ref_node.9 \ + ieee80211_node.9 ieee80211_unref_node.9 \ ieee80211_node.9 ieee80211_free_node.9 \ ieee80211_node.9 ieee80211_iterate_nodes.9 \ - ieee80211_node.9 ieee80211_lookup_node.9 \ - ieee80211_node.9 ieee80211_next_scan.9 \ - ieee80211_node.9 ieee80211_node_attach.9 \ - ieee80211_node.9 ieee80211_node_detach.9 \ - ieee80211_node.9 ieee80211_node_lateattach.9 \ - ieee80211_node.9 ieee80211_timeout_nodes.9 -MLINKS+=ieee80211_output.9 ieee80211_add_rates.9 \ - ieee80211_output.9 ieee80211_add_xrates.9 \ - ieee80211_output.9 ieee80211_encap.9 \ - ieee80211_output.9 ieee80211_send_mgmt.9 -MLINKS+=ieee80211_proto.9 ieee80211_dump_pkt.9 \ - ieee80211_proto.9 ieee80211_fix_rate.9 \ - ieee80211_proto.9 ieee80211_print_essid.9 \ - ieee80211_proto.9 ieee80211_proto_attach.9 \ - ieee80211_proto.9 ieee80211_proto_detach.9 -MLINKS+=ieee80211_radiotap.9 radiotap.9 + ieee80211_node.9 ieee80211_dump_node.9 \ + ieee80211_node.9 ieee80211_dump_nodes.9 +MLINKS+=ieee80211_output.9 M_WME_GETAC.9 \ + ieee80211_output.9 M_SEQNO_GET.9 \ + ieee80211_output.9 ieee80211_process_callback.9 +MLINKS+=ieee80211_proto.9 ieee80211_new_state.9 \ + ieee80211_proto.9 ieee80211_start_all.9 \ + ieee80211_proto.9 ieee80211_stop_all.9 \ + ieee80211_proto.9 ieee80211_suspend_all.9 \ + ieee80211_proto.9 ieee80211_resume_all.9 \ + ieee80211_proto.9 ieee80211_waitfor_parent.9 +MLINKS+=ieee80211_radiotap.9 radiotap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_attach.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active_vap.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_active.9 \ + ieee80211_radiotap.9 ieee80211_radiotap_tx.9 +MLINKS+=ieee80211_regdomain.9 ieee80211_init_channels.9 \ + ieee80211_regdomain.9 ieee80211_sort_channels.9 \ + ieee80211_regdomain.9 ieee80211_alloc_countryie.9 +MLINKS+=ieee80211_vap.9 ieee80211_vap_setup.9 \ + ieee80211_vap.9 ieee80211_vap_attach.9 \ + ieee80211_vap.9 ieee80211_vap_detach.9 MLINKS+=ifnet.9 ifaddr.9 \ ifnet.9 if_data.9 \ ifnet.9 ifqueue.9 Modified: stable/8/share/man/man9/ieee80211.9 ============================================================================== --- stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:05:58 2009 (r196156) +++ stable/8/share/man/man9/ieee80211.9 Wed Aug 12 21:06:37 2009 (r196157) @@ -1,6 +1,5 @@ .\" -.\" Copyright (c) 2004 Bruce M. Simpson -.\" Copyright (c) 2004 Darron Broad +.\" Copyright (c) 2009 Sam Leffler, Errno Consulting .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,236 +24,538 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.\" $Id: ieee80211.9,v 1.5 2004/03/04 12:33:27 bruce Exp $ .\" -.Dd March 2, 2004 -.Dt IEEE80211 9 +.Dd August 4, 2009 +.Dt NET80211 9 .Os .Sh NAME -.Nm ieee80211_ifattach , ieee80211_ifdetach , -.Nm ieee80211_mhz2ieee , ieee80211_chan2ieee , ieee80211_ieee2mhz , -.Nm ieee80211_media_init , ieee80211_media_change , ieee80211_media_status , -.Nm ieee80211_watchdog , -.Nm ieee80211_setmode , ieee80211_chan2mode , -.Nm ieee80211_rate2media , ieee80211_media2rate -.Nd core 802.11 network stack functions +.Nm net80211 +.Nd 802.11 network layer .Sh SYNOPSIS .In net80211/ieee80211_var.h -.In net80211/ieee80211_proto.h .Ft void -.Fn ieee80211_ifattach "struct ifnet *ifp" +.Fn ieee80211_ifattach "struct ieee80211com *ic" "const uint8_t macaddr[IEEE80211_ADDR_LEN]" .Ft void -.Fn ieee80211_ifdetach "struct ifnet *ifp" -.Ft u_int -.Fn ieee80211_mhz2ieee "u_int freq" "u_int flags" -.Ft u_int -.Fn ieee80211_chan2ieee "struct ieee80211com *ic" "struct ieee80211_channel *c" -.Ft u_int -.Fn ieee80211_ieee2mhz "u_int chan" "u_int flags" -.Ft void -.Fo ieee80211_media_init -.Fa "struct ifnet *ifp" "ifm_change_cb_t media_change" -.Fa "ifm_stat_cb_t media_stat" -.Fc -.Fa int -.Fn ieee80211_media_change "struct ifnet *ifp" -.Fa void -.Fn ieee80211_media_status "struct ifnet *ifp" "struct ifmediareq *imr" -.Ft void -.Fn ieee80211_watchdog "struct ifnet *ifp" -.Ft int -.Fn ieee80211_setmode "struct ieee80211com *ic" "enum ieee80211_phymode mode" -.Ft enum ieee80211_phymode -.Fo ieee80211_chan2mode -.Fa "struct ieee80211com *ic" "struct ieee80211_channel *chan" -.Fc -.Ft int -.Fo ieee80211_rate2media -.Fa "struct ieee80211com *ic" "int rate" "enum ieee80211_phymode mode" -.Fc -.Ft int -.Fn ieee80211_media2rate "int mword" +.Fn ieee80211_ifdetach "struct ieee80211com *ic" .Sh DESCRIPTION -The -.Nm ieee80211 -collection of functions are used to manage wireless network interfaces in the -system which use the system's software 802.11 network stack. -Most of these functions require that attachment to the stack is performed -before calling. -Several utility functions are also provided; these are safe to call from -any driver without prior initialization. +IEEE 802.11 device drivers are written to use the infrastructure provided +by the +.Nm +software layer. +This software provides a support framework for drivers that includes +ifnet cloning, state management, and a user management API by which +applications interact with 802.11 devices. +Most drivers depend on the +.Nm +layer for protocol services but devices that off-load functionality +may bypass the layer to connect directly to the device +(e.g. the +.Xr ndis 4 +emulation support does this). +.Pp +A +.Nm +device driver implements a virtual radio API that is exported to +users through network interfaces (aka vaps) that are cloned from the +underlying device. +These interfaces have an operating mode +(station, adhoc, hostap, wds, monitor, etc.) +that is fixed for the lifetime of the interface. +Devices that can support multiple concurrent interfaces allow +multiple vaps to be cloned. +This enables construction of interesting applications such as +an AP vap and one or more WDS vaps +or multiple AP vaps, each with a different security model. +The +.Nm +layer virtualizes most 802.11 state +and coordinates vap state changes including scheduling multiple vaps. +State that is not virtualized includes the current channel and +WME/WMM parameters. +Protocol processing is typically handled entirely in the +.Nm +layer with drivers responsible purely for moving data between the host +and device. +Similarly, +.Nm +handles most +.Xr ioctl 2 +requests without entering the driver; +instead drivers are notified of state changes that +require their involvement. +.Pp +The virtual radio interface defined by the +.Nm +layer means that drivers must be structured to follow specific rules. +Drivers that support only a single interface at any time must still +follow these rules. +.Sh DATA STRUCTURES +The virtual radio architecture splits state between a single per-device +.Vt ieee80211com +structure and one or more +.Vt ieee80211vap +structures. +Drivers are expected to setup various shared state in these structures +at device attach and during vap creation but otherwise should treat them +as read-only. +The +.Vt ieee80211com +structure is allocated by the +.Nm +layer as adjunct data to a device's +.Vt ifnet ; +it is accessed through the +.Vt if_l2com +structure member. +The +.Vt ieee80211vap +structure is allocated by the driver in the +.Dq vap create +method +and should be extended with any driver-private state. +This technique of giving the driver control to allocate data structures +is used for other +.Nm +data structures and should be exploited to maintain driver-private state +together with public +.Nm +state. +.Pp +The other main data structures are the station, or node, table +that tracks peers in the local BSS, and the channel table that defines +the current set of available radio channels. +Both tables are bound to the +.Vt ieee80211com +structure and shared by all vaps. +Long-lasting references to a node are counted to guard against +premature reclamation. +In particular every packet sent/received holds a node reference +(either explicitly for transmit or implicitly on receive). .Pp -.\" -The -.Fn ieee80211_ifattach -function attaches the network interface -.Fa ifp -to the 802.11 network stack layer. -This function must be called before using any of the -.Nm ieee80211 -functions which need to store driver state across invocations; The -.Vt struct ifnet -instance pointed to by -.Fa ifp -MUST be an instance of -.Vt struct ieee80211com , -with various fields initialized to tell -.Nm ieee80211 -about its capabilities. -This function performs Ethernet and BPF attachment (by calling -.Fn ether_ifattach +.Vt ieee80211com and -.Fn bpfattach2 ) -on behalf of the caller. -It also implements the -.Vt ifmedia -interface. +.Vt ieee80211vap +structures also hold a collection of method pointers that drivers +fill-in and/or override to take control of certain operations. +These methods are the primary way drivers are bound to the +.Nm +layer and are described below. +.Sh DRIVER ATTACH/DETACH +Drivers attach to the +.Nm +layer with the +.Fn ieee80211_ifattach +function. +The driver is expected to allocate and setup any device-private +data structures before passing control. +The +.Vt ieee80211com +structure must be pre-initialized with state required to setup the +.Nm +layer: +.Bl -tag -width ic_channels +.It Dv ic_ifp +Backpointer to the physical device's ifnet. +.It Dv ic_caps +Device/driver capabilities; see below for a complete description. +.It Dv ic_channels +Table of channels the device is capable of operating on. +This is initially provided by the driver but may be changed +through calls that change the regulatory state. +.It Dv ic_nchan +Number of entries in +.Dv ic_channels . +.El .Pp -.\" -The +On return from +.Fn ieee80211_ifattach +the driver is expected to override default callback functions in the +.Vt ieee80211com +structure to register it's private routines. +Methods marked with a +.Dq * +must be provided by the driver. +.Bl -tag -width ic_channels +.It Dv ic_vap_create* +Create a vap instance of the specified type (operating mode). +Any fixed BSSID and/or MAC address is provided. +Drivers that support multi-bssid operation may honor the requested BSSID +or assign their own. +.It Dv ic_vap_delete* +Destroy a vap instance created with +.Dv ic_vap_create . +.It Dv ic_getradiocaps +Return the list of calibrated channels for the radio. +The default method returns the current list of channels +(space permitting). +.It Dv ic_setregdomain +Process a request to change regulatory state. +The routine may reject a request or constrain changes (e.g. reduce +transmit power caps). +The default method accepts all proposed changes. +.It Dv ic_send_mgmt +Send an 802.11 management frame. +The default method fabricates the frame using +.Nm +state and passes it to the driver through the +.Dv ic_raw_xmit +method. +.It Dv ic_raw_xmit +Transmit a raw 802.11 frame. +The default method drops the frame and generates a message on the console. +.It Dv ic_updateslot +Update hardware state after an 802.11 IFS slot time change, +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_update_mcast +Update hardware for a change in the multicast packet filter, +The default method prints a console message. +.It Dv ic_update_promisc +Update hardware for a change in the promiscuous mode setting. +The default method prints a console message. +.It Dv ic_newassoc +Update driver/device state for association to a new AP (in station mode) +or when a new station associates (e.g. in AP mode). +There is no default method; the pointer may be NULL in which case +it will not be used. +.It Dv ic_node_alloc +Allocate and initialize a +.Vt ieee80211_node +structure. +This method cannot sleep. +The default method allocates zero'd memory using +.Xr malloc 9. +Drivers should override this method to allocate extended storage +for their own needs. +Memory allocated by the driver must be tagged with +.Dv M_80211_NODE +to balance the memory allocation statistics. +.It Dv ic_node_free +Reclaim storage of a node allocated by +.Dv ic_node_alloc . +Drivers are expected to +.Em interpose +their own method to cleanup private state but must call through +this method to allow +.Nm +to reclaim it's private state. +.It Dv ic_node_cleanup +Cleanup state in a +.Vt ieee80211_node +created by +.Dv ic_node_alloc . +This operation is distinguished from +.Dv ic_node_free +in that it may be called long before the node is actually reclaimed +to cleanup adjunct state. +This can happen, for example, when a node must not be reclaimed +due to references held by packets in the transmit queue. +Drivers typically interpose +.Dv ic_node_cleanup +instead of +.Dv ic_node_free . +.It Dv ic_node_age +Age, and potentially reclaim, resources associated with a node. +The default method ages frames on the power-save queue (in AP mode) +and pending frames in the receive reorder queues (for stations using A-MPDU). +.It Dv ic_node_drain +Reclaim all optional resources associated with a node. +This call is used to free up resources when they are in short supply, +.It Dv ic_node_getrssi +Return the Receive Signal Strength Indication (RSSI) in .5 dBm units for +the specified node. +This interface returns a subset of the information +returned by +.Dv ic_node_getsignal , +The default method calculates a filtered average over the last ten +samples passed in to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getsignal +Return the RSSI and noise floor (in .5 dBm units) for a station. +The default method calculates RSSI as described above; +the noise floor returned is the last value supplied to +.Xr ieee80211_input 9 +or +.Xr ieee80211_input_all 9 . +.It Dv ic_node_getmimoinfo +Return MIMO radio state for a station in support of the +.Dv IEEE80211_IOC_STA_INFO +ioctl request. +The default method returns nothing. +.It Dv ic_scan_start* +Prepare driver/hardware state for scanning. +This callback is done in a sleepable context. +.It Dv ic_scan_end* +Restore driver/hardware state after scanning completes. +This callback is done in a sleepable context. +.It Dv ic_set_channel* +Set the current radio channel using +.Vt ic_curchan . +This callback is done in a sleepable context. +.It Dv ic_scan_curchan +Start scanning on a channel. +This method is called immediately after each channel change +and must initiate the work to scan a channel and schedule a timer +to advance to the next channel in the scan list. +This callback is done in a sleepable context. +The default method handles active scan work (e.g. sending ProbRequest +frames), and schedules a call to +.Xr ieee80211_scan_next 9 +according to the maximum dwell time for the channel. +Drivers that off-load scan work to firmware typically use this method +to trigger per-channel scan activity. +.It Dv ic_scan_mindwell +Handle reaching the minimum dwell time on a channel when scanning. +This event is triggered when one or more stations have been found on +a channel and the minimum dwell time has been reached. +This callback is done in a sleepable context. +The default method signals the scan machinery to advance +to the next channel as soon as possible. +Drivers can use this method to preempt further work (e.g. if scanning +is handled by firmware) or ignore the request to force maximum dwell time +on a channel. +.It Dv ic_recv_action +Process a received Action frame. +The default method points to +.Xr ieee80211_recv_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_send_action +Transmit an Action frame. +The default method points to +.Xr ieee80211_send_action 9 +which provides a mechanism for setting up handlers for each Action frame class. +.It Dv ic_ampdu_enable +Check if transmit A-MPDU should be enabled for the specified station and AC. +The default method checks a per-AC traffic rate against a per-vap +threshold to decide if A-MPDU should be enabled. +This method also rate-limits ADDBA requests so that requests are not +made too frequently when a receiver has limited resources. +.It Dv ic_addba_request +Request A-MPDU transmit aggregation. +The default method sets up local state and issues an +ADDBA Request Action frame. +Drivers may interpose this method if they need to setup private state +for handling transmit A-MPDU. +.It Dv ic_addb_response +Process a received ADDBA Response Action frame and setup resources as +needed for doing transmit A-MPDU, +.It Dv ic_addb_stop +Shutdown an A-MPDU transmit stream for the specified station and AC. +The default method reclaims local state after sending a DelBA Action frame. +.It Dv ic_bar_response +Process a response to a transmitted BAR control frame. +.It Dv ic_ampdu_rx_start +Prepare to receive A-MPDU data from the specified station for the TID. +.It Dv ic_ampdu_rx_stop +Terminate receipt of A-MPDU data from the specified station for the TID. +.El +.Pp +Once the +.Nm +layer is attached to a driver there are two more steps typically done +to complete the work: +.Bl -enum +.It +Setup +.Dq radiotap support +for capturing raw 802.11 packets that pass through the device. +This is done with a call to +.Xr ieee80211_radiotap_attach 9 . +.It +Do any final device setup like enabling interrupts. +.El +.Pp +State is torn down and reclaimed with a call to +.Fn ieee80211_ifdetach . +Note this call may result in multiple callbacks into the driver +so it should be done before any critical driver state is reclaimed. +On return from .Fn ieee80211_ifdetach -function frees any -.Nm ieee80211 -structures associated with the driver, and performs Ethernet and BPF -detachment on behalf of the caller. -.Pp -.\" -The -.Fn ieee80211_mhz2ieee -utility function converts the frequency -.Fa freq -(specified in MHz) to an IEEE 802.11 channel number. -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_chan2ieee -function converts the channel specified in -.Fa *c -to an IEEE channel number for the driver -.Fa ic . -If the conversion would be invalid, an error message is printed to the -system console. -This function REQUIRES that the driver is hooked up to the -.Nm ieee80211 -subsystem. -.Pp -.\" -The -.Fn ieee80211_ieee2mhz -utility function converts the IEEE channel number -.Ft chan -to a frequency (in MHz). -The -.Fa flags -argument is a hint which specifies whether the frequency is in -the 2GHz ISM band -.Pq Vt IEEE80211_CHAN_2GHZ -or the 5GHz band -.Pq Vt IEEE80211_CHAN_5GHZ ; -appropriate clipping of the result is then performed. -.Pp -.\" -The -.Fn ieee80211_media_init -function initializes media data structures used by the -.Vt ifmedia -interface, for the driver -.Fa ifp . -It must be called by the driver after calling -.Fn ieee80211_attach -and before calling most -.Nm ieee80211 -functions. -The -.Fa media_change -and -.Fa media_stat -arguments specify helper functions which will be invoked by the -.Vt ifmedia -framework when the user changes or queries media options, -using a command such as -.Xr ifconfig 8 . -.Pp -.\" -The -.Fn ieee80211_media_status +all associated vaps and ifnet structures are reclaimed or inaccessible +to user applications so it is safe to teardown driver state without +worry about being re-entered. +The driver is responsible for calling +.Xr if_free 9 +on the ifnet it allocated for the physical device. +.Sh DRIVER CAPABILITIES +Driver/device capabilities are specified using several sets of flags +in the +.Vt ieee80211com +structure. +General capabilities are specified by +.Vt ic_caps . +Hardware cryptographic capabilities are specified by +.Vt ic_cryptocaps . +802.11n capabilities, if any, are specified by +.Vt ic_htcaps . +The +.Nm +layer propagates a subset of these capabilities to each vap through +the equivalent fields: +.Vt iv_caps , +.Vt iv_cryptocaps , and -.Fn ieee80211_media_change -functions are device-independent handlers for -.Vt ifmedia -commands and are not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_watchdog -function is intended to be called from a driver's -.Va if_watchdog -routine. -It is used to perform periodic cleanup of state within the software 802.11 -stack, as well as timing out scans. -.Pp -.\" -The -.Fn ieee80211_setmode -function is called from within the 802.11 stack to change the mode -of the driver's PHY; it is not intended to be called directly. -.Pp -.\" -The -.Fn ieee80211_chan2mode -function returns the PHY mode required for use with the channel -.Fa chan -on the device -.Fa ic . -This is typically used when selecting a rate set, to be advertised in -beacons, for example. -.Pp -.\" -The -.Fn ieee80211_rate2media -function converts the bit rate -.Fa rate -(measured in units of 0.5Mbps) to an -.Vt ifmedia -sub-type, for the device -.Fa ic -running in PHY mode -.Fa mode . -The -.Fn ieee80211_media2rate -performs the reverse of this conversion, returning the bit rate (in 0.5Mbps -units) corresponding to an -.Vt ifmedia -sub-type. -.\" +.Vt iv_htcaps . +The following general capabilities are defined: +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_C_STA +Device is capable of operating in station (aka Infrastructure) mode. +.It Dv IEEE80211_C_8023ENCAP +Device requires 802.3-encapsulated frames be passed for transmit. +By default +.Nm +will encapsulate all outbound frames as 802.11 frames (without a PLCP header). +.It Dv IEEE80211_C_FF +Device supports Atheros Fast-Frames. +.It Dv IEEE80211_C_TURBOP +Device supports Atheros Dynamic Turbo mode. +.It Dv IEEE80211_C_IBSS +Device is capable of operating in adhoc/IBSS mode. +.It Dv IEEE80211_C_PMGT +Device supports dynamic power-management (aka power save) in station mode. +.It Dv IEEE80211_C_HOSTAP +Device is capable of operating as an Access Point in Infrastructure mode. +.It Dv IEEE80211_C_AHDEMO +Device is capable of operating in Adhoc Demo mode. +In this mode the device is used purely to send/receive raw 802.11 frames. +.It Dv IEEE80211_C_SWRETRY +Device supports software retry of transmitted frames. +.It Dv IEEE80211_C_TXPMGT +Device support dynamic transmit power changes on transmitted frames; +also known as Transmit Power Control (TPC). +.It Dv IEEE80211_C_SHSLOT +Device supports short slot time operation (for 802.11g). +.It Dv IEEE80211_C_SHPREAMBLE +Device supports short preamble operation (for 802.11g). +.It Dv IEEE80211_C_MONITOR +Device is capable of operating in monitor mode. +.It Dv IEEE80211_C_DFS +Device supports radar detection and/or DFS. +DFS protocol support can be handled by +.Nm +but the device must be capable of detecting radar events. +.It Dv IEEE80211_C_MBSS +Device is capable of operating in MeshBSS (MBSS) mode +(as defined by 802.11s Draft 3.0). +.It Dv IEEE80211_C_WPA1 +Device supports WPA1 operation. +.It Dv IEEE80211_C_WPA2 +Device supports WPA2/802.11i operation. +.It Dv IEEE80211_C_BURST +Device supports frame bursting. +.It Dv IEEE80211_C_WME +Device supports WME/WMM operation +(at the moment this is mostly support for sending and receiving +QoS frames with EDCF). +.It Dv IEEE80211_C_WDS +Device supports transmit/receive of 4-address frames. +.It Dv IEEE80211_C_BGSCAN +Device supports background scanning. +.It Dv IEEE80211_C_TXFRAG +Device supports transmit of fragmented 802.11 frames. +.It Dv IEEE80211_C_TDMA +Device is capable of operating in TDMA mode. +.El +.Pp +The follow general crypto capabilities are defined. +In general +.Nm +will fall-back to software support when a device is not capable +of hardware acceleration of a cipher. +This can be done on a per-key basis. +.Nm +can also handle software +.Dv Michael +calculation combined with hardware +.Dv AES +acceleration. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_CRYPTO_WEP +Device supports hardware WEP cipher. +.It Dv IEEE80211_CRYPTO_TKIP +Device supports hardware TKIP cipher. +.It Dv IEEE80211_CRYPTO_AES_OCB +Device supports hardware AES-OCB cipher. +.It Dv IEEE80211_CRYPTO_AES_CCM +Device supports hardware AES-CCM cipher. +.It Dv IEEE80211_CRYPTO_TKIPMIC +Device supports hardware Michael for use with TKIP. +.It Dv IEEE80211_CRYPTO_CKIP +Devices supports hardware CKIP cipher. +.El +.Pp +The follow general 802.11n capabilities are defined. +The first capabilities are defined exactly as they appear in the +802.11n specification. +Capabilities beginning with IEEE80211_HTC_AMPDU are used soley by the +.Nm +layer. +.Bl -tag -width IEEE80211_C_8023ENCAP +.It Dv IEEE80211_HTCAP_CHWIDTH40 +Device supports 20/40 channel width operation. +.It Dv IEEE80211_HTCAP_SMPS_DYNAMIC +Device supports dynamic SM power save operation. +.It Dv IEEE80211_HTCAP_SMPS_ENA +Device supports static SM power save operation. +.It Dv IEEE80211_HTCAP_GREENFIELD +Device supports Greenfield preamble. +.It Dv IEEE80211_HTCAP_SHORTGI20 +Device supports Short Guard Interval on 20MHz channels. +.It Dv IEEE80211_HTCAP_SHORTGI40 +Device supports Short Guard Interval on 40MHz channels. +.It Dv IEEE80211_HTCAP_TXSTBC +Device supports Space Time Block Convolution (STBC) for transmit. +.It Dv IEEE80211_HTCAP_RXSTBC_1STREAM +Device supports 1 spatial stream for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_2STREAM +Device supports 1-2 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_RXSTBC_3STREAM +Device supports 1-3 spatial streams for STBC receive. +.It Dv IEEE80211_HTCAP_MAXAMSDU_7935 +Device supports A-MSDU frames up to 7935 octets. +.It Dv IEEE80211_HTCAP_MAXAMSDU_3839 +Device supports A-MSDU frames up to 3839 octets. +.It Dv IEEE80211_HTCAP_DSSSCCK40 +Device supports use of DSSS/CCK on 40MHz channels. +.It Dv IEEE80211_HTCAP_PSMP +Device supports PSMP. +.It Dv IEEE80211_HTCAP_40INTOLERANT +Device is intolerant of 40MHz wide channel use. +.It Dv IEEE80211_HTCAP_LSIGTXOPPROT +Device supports L-SIG TXOP protection. +.It Dv IEEE80211_HTC_AMPDU +Device supports A-MPDU aggregation. +Note that any 802.11n compliant device must support A-MPDU receive +so this implicitly means support for +.Em transmit +of A-MPDU frames. +.It Dv IEEE80211_HTC_AMSDU +Device supports A-MSDU aggregation. +Note that any 802.11n compliant device must support A-MSDU receive +so this implicitly means support for +.Em transmit +of A-MSDU frames. +.It Dv IEEE80211_HTC_HT +Device supports High Throughput (HT) operation. +This capability must be set to enable 802.11n functionality +in +.Nm . +.It Dv IEEE80211_HTC_SMPS +Device supports MIMO Power Save operation. +.It Dv IEEE80211_HTC_RIFS +Device supports Reduced Inter Frame Spacing (RIFS). +.El .Sh SEE ALSO -.Xr ieee80211_crypto 9 , +.Xr ioctl 2 , +.Xr ndis 4 , .Xr ieee80211_input 9 , -.Xr ieee80211_ioctl 9 , -.Xr ieee80211_node 9 , -.Xr ieee80211_output 9 , -.Xr ieee80211_proto 9 , -.Xr ieee80211_radiotap 9 , -.Xr ifnet 9 -.Sh HISTORY -The -.Nm ieee80211 -series of functions first appeared in -.Nx 1.5 , -and were later ported to -.Fx 4.6 . -.Sh AUTHORS -.An -nosplit -This manual page was written by -.An Bruce M. Simpson Aq bms@FreeBSD.org -and -.An Darron Broad Aq darron@kewl.org . +.Xr ieee80211_input_all 9 , +.Xr ieee80211_scan_next 9 , +.Xr ieee80211_recv_action 9 , +.Xr ieee80211_send_action 9 , +.Xr ieee80211_radiotap_attach 9 , +.Xr ifnet 9 , +.Xr malloc 9 . Copied: stable/8/share/man/man9/ieee80211_amrr.9 (from r196155, head/share/man/man9/ieee80211_amrr.9) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/share/man/man9/ieee80211_amrr.9 Wed Aug 12 21:06:37 2009 (r196157, copy of r196155, head/share/man/man9/ieee80211_amrr.9) @@ -0,0 +1,194 @@ +.\" +.\" 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. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 4, 2009 +.Dt IEEE8021_AMRR 9 +.Os +.Sh NAME +.Nm ieee80211_amrr +.Nd 802.11 network driver transmit rate control support +.Sh SYNOPSIS +.In net80211/ieee80211_amrr.h +.Ft void +.Fo ieee80211_amrr_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211vap *" +.Fa "int amin" +.Fa "int amax" +.Fa "int interval" +.Fc +.\" +.Ft void +.Fn ieee80211_amrr_cleanup "struct ieee80211_amrr *" +.\" +.Ft void +.Fn ieee80211_amrr_setinterval "struct ieee80211_amrr *" "int interval" +.\" +.Ft void +.Fo ieee80211_amrr_node_init +.Fa "struct ieee80211_amrr *" +.Fa "struct ieee80211_amrr_node *" +.Fa "struct ieee80211_node *" +.Fc +.\" +.Ft int +.Fo ieee80211_amrr_choose +.Fa "struct ieee80211_node *" +.Fa "struct ieee80211_amrr_node *" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_complete +.Fa "struct ieee80211_amrr_node *" +.Fa "int ok" +.Fa "int retries" +.Fc +.\" +.Ft void +.Fo ieee80211_amrr_tx_update +.Fa "struct ieee80211_amrr_node *" +.Fa "int txnct" +.Fa "int success" +.Fa "int retrycnt" +.Fc +.Sh DESCRIPTION +.Nm +is an implementation of the AMRR transmit rate control algorithm +for drivers that use the +.Nm net80211 +software layer. +A rate control algorithm is responsible for choosing the transmit +rate for each frame. +To maximize throughput algorithms try to use the highest rate that +is appropriate for the operating conditions. +The rate will vary as conditions change; the distance between two stations +may change, transient noise may be present that affects signal quality, +etc. +.Nm +uses very simple information from a driver to do it's job: +whether a frame was successfully delivered and how many transmit +attempts were made. +While this enables its use with virtually any wireless device it +limits it's effectiveness--do not expect it to function well in +difficult environments and/or respond quickly to changing conditions. +.Pp +.Nm +requires per-vap state and per-node state for each station it is to +select rates for. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-stable-8@FreeBSD.ORG Wed Aug 12 21:23:41 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1EB21065670; Wed, 12 Aug 2009 21:23:41 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 86F258FC3E; Wed, 12 Aug 2009 21:23:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CLNfgZ077260; Wed, 12 Aug 2009 21:23:41 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CLNf5J077259; Wed, 12 Aug 2009 21:23:41 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <200908122123.n7CLNf5J077259@svn.freebsd.org> From: "Simon L. Nielsen" Date: Wed, 12 Aug 2009 21:23:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: svn commit: r196160 - in stable/8/crypto/openssl: . apps test X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:23:42 -0000 Author: simon Date: Wed Aug 12 21:23:41 2009 New Revision: 196160 URL: http://svn.freebsd.org/changeset/base/196160 Log: MFC 196133: Remove symlinks in OpenSSL's testing framework. These are not required for normal build, and doesn't export well to CVS. If they are needed later a script will be added to recreate the symlinks when needed at build time. Approved by: re (rwatson) Deleted: stable/8/crypto/openssl/apps/md4.c stable/8/crypto/openssl/test/bftest.c stable/8/crypto/openssl/test/bntest.c stable/8/crypto/openssl/test/casttest.c stable/8/crypto/openssl/test/destest.c stable/8/crypto/openssl/test/dhtest.c stable/8/crypto/openssl/test/dsatest.c stable/8/crypto/openssl/test/ecdhtest.c stable/8/crypto/openssl/test/ecdsatest.c stable/8/crypto/openssl/test/ectest.c stable/8/crypto/openssl/test/enginetest.c stable/8/crypto/openssl/test/evp_test.c stable/8/crypto/openssl/test/exptest.c stable/8/crypto/openssl/test/fips_aesavs.c stable/8/crypto/openssl/test/fips_desmovs.c stable/8/crypto/openssl/test/fips_dsatest.c stable/8/crypto/openssl/test/fips_dssvs.c stable/8/crypto/openssl/test/fips_hmactest.c stable/8/crypto/openssl/test/fips_randtest.c stable/8/crypto/openssl/test/fips_rngvs.c stable/8/crypto/openssl/test/fips_rsagtest.c stable/8/crypto/openssl/test/fips_rsastest.c stable/8/crypto/openssl/test/fips_rsavtest.c stable/8/crypto/openssl/test/fips_shatest.c stable/8/crypto/openssl/test/fips_test_suite.c stable/8/crypto/openssl/test/hmactest.c stable/8/crypto/openssl/test/ideatest.c stable/8/crypto/openssl/test/jpaketest.c stable/8/crypto/openssl/test/md2test.c stable/8/crypto/openssl/test/md4test.c stable/8/crypto/openssl/test/md5test.c stable/8/crypto/openssl/test/mdc2test.c stable/8/crypto/openssl/test/randtest.c stable/8/crypto/openssl/test/rc2test.c stable/8/crypto/openssl/test/rc4test.c stable/8/crypto/openssl/test/rc5test.c stable/8/crypto/openssl/test/rmdtest.c stable/8/crypto/openssl/test/rsa_test.c stable/8/crypto/openssl/test/sha1test.c stable/8/crypto/openssl/test/sha256t.c stable/8/crypto/openssl/test/sha512t.c stable/8/crypto/openssl/test/shatest.c stable/8/crypto/openssl/test/ssltest.c Modified: stable/8/crypto/openssl/ (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Wed Aug 12 21:34:57 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DAA09106566C; Wed, 12 Aug 2009 21:34:57 +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 C67328FC44; Wed, 12 Aug 2009 21:34:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7CLYvbW077613; Wed, 12 Aug 2009 21:34:57 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7CLYvPX077611; Wed, 12 Aug 2009 21:34:57 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200908122134.n7CLYvPX077611@svn.freebsd.org> From: Sam Leffler Date: Wed, 12 Aug 2009 21:34:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: svn commit: r196161 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Aug 2009 21:34:58 -0000 Author: sam Date: Wed Aug 12 21:34:57 2009 New Revision: 196161 URL: http://svn.freebsd.org/changeset/base/196161 Log: MFC r196159: Drain link state event changes posted during vap destroy. This is a band-aid for the general problem that if_link_state_change can be called between if_detach and if_free leaving a task queued that has been free'd. Reviewed by: rwatson Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net80211/ieee80211.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net80211/ieee80211.c ============================================================================== --- stable/8/sys/net80211/ieee80211.c Wed Aug 12 21:23:41 2009 (r196160) +++ stable/8/sys/net80211/ieee80211.c Wed Aug 12 21:34:57 2009 (r196161) @@ -573,11 +573,13 @@ ieee80211_vap_detach(struct ieee80211vap /* * Flush any deferred vap tasks. - * NB: must be before ether_ifdetach() and removal from ic_vaps list */ ieee80211_draintask(ic, &vap->iv_nstate_task); ieee80211_draintask(ic, &vap->iv_swbmiss_task); + /* XXX band-aid until ifnet handles this for us */ + taskqueue_drain(taskqueue_swi, &ifp->if_linktask); + IEEE80211_LOCK(ic); KASSERT(vap->iv_state == IEEE80211_S_INIT , ("vap still running")); TAILQ_REMOVE(&ic->ic_vaps, vap, iv_next); From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 01:45:27 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0832E1065670; Thu, 13 Aug 2009 01:45:27 +0000 (UTC) (envelope-from mjacob@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E976B8FC44; Thu, 13 Aug 2009 01:45:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7D1jQ41082801; Thu, 13 Aug 2009 01:45:26 GMT (envelope-from mjacob@svn.freebsd.org) Received: (from mjacob@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D1jQd7082799; Thu, 13 Aug 2009 01:45:26 GMT (envelope-from mjacob@svn.freebsd.org) Message-Id: <200908130145.n7D1jQd7082799@svn.freebsd.org> From: Matt Jacob Date: Thu, 13 Aug 2009 01:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196163 - stable/8/sys/dev/isp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 01:45:27 -0000 Author: mjacob Date: Thu Aug 13 01:45:26 2009 New Revision: 196163 URL: http://svn.freebsd.org/changeset/base/196163 Log: MFC 196162: Have at least a fallback WWN so cards on sun branded FC cards can configure. Approved by: re Modified: stable/8/sys/dev/isp/isp_freebsd.c Modified: stable/8/sys/dev/isp/isp_freebsd.c ============================================================================== --- stable/8/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:17:26 2009 (r196162) +++ stable/8/sys/dev/isp/isp_freebsd.c Thu Aug 13 01:45:26 2009 (r196163) @@ -5280,6 +5280,10 @@ isp_default_wwn(ispsoftc_t * isp, int ch return (seed); } seed = iswwnn ? FCPARAM(isp, chan)->isp_wwnn_nvram : FCPARAM(isp, chan)->isp_wwpn_nvram; + if (seed) { + return (seed); + } + return (0x400000007F000009ull); } else { seed = iswwnn ? fc->def_wwnn : fc->def_wwpn; } From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 06:13:46 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D3C5106566B; Thu, 13 Aug 2009 06:13:46 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E565B8FC3F; Thu, 13 Aug 2009 06:13:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7D6DjRr089491; Thu, 13 Aug 2009 06:13:45 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D6Dje1089486; Thu, 13 Aug 2009 06:13:45 GMT (envelope-from des@svn.freebsd.org) Message-Id: <200908130613.n7D6Dje1089486@svn.freebsd.org> From: Dag-Erling Smorgrav Date: Thu, 13 Aug 2009 06:13:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196165 - in stable/8: contrib/bzip2 contrib/netcat contrib/openpam crypto/openssh X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 06:13:46 -0000 Author: des Date: Thu Aug 13 06:13:45 2009 New Revision: 196165 URL: http://svn.freebsd.org/changeset/base/196165 Log: merge r196164: update & remove CVS-specific items. Approved by: re (kib) Modified: stable/8/contrib/bzip2/ (props changed) stable/8/contrib/bzip2/FREEBSD-vendor stable/8/contrib/netcat/ (props changed) stable/8/contrib/netcat/FREEBSD-vendor stable/8/contrib/openpam/ (props changed) stable/8/contrib/openpam/FREEBSD-vendor stable/8/crypto/openssh/ (props changed) stable/8/crypto/openssh/FREEBSD-vendor Modified: stable/8/contrib/bzip2/FREEBSD-vendor ============================================================================== --- stable/8/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/bzip2/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,6 +2,4 @@ Project: bzip2 ProjectURL: http://www.bzip.org/ Version: 1.0.5 -VendorTag: BZIP2 -VersionTag: v1_0_5 License: BSD Modified: stable/8/contrib/netcat/FREEBSD-vendor ============================================================================== --- stable/8/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/netcat/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,6 +2,4 @@ Project: netcat (aka src/usr.bin/nc in OpenBSD) ProjectURL: http://www.openbsd.org/ Version: 4.4 -VendorTag: OPENBSD -VersionTag: OPENBSD_4_4 License: BSD Modified: stable/8/contrib/openpam/FREEBSD-vendor ============================================================================== --- stable/8/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/contrib/openpam/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -2,7 +2,5 @@ Project: OpenPAM ProjectURL: http://www.openpam.org/ Version: Hydrangea (20071221) -VendorTag: OPENPAM -VersionTag: OPENPAM_HYDRANGEA License: BSD Maintainer: des Modified: stable/8/crypto/openssh/FREEBSD-vendor ============================================================================== --- stable/8/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:07:38 2009 (r196164) +++ stable/8/crypto/openssh/FREEBSD-vendor Thu Aug 13 06:13:45 2009 (r196165) @@ -1,8 +1,6 @@ # $FreeBSD$ Project: Portable OpenSSH ProjectURL: http://www.openssh.com/portable.html -Version: 5.1p1 -VendorTag: OPENSSH -VersionTag: OpenSSH_5_1p1 +Version: 5.2p1 License: BSD Maintainer: des From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 09:17:08 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 48D25106564A; Thu, 13 Aug 2009 09:17:08 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2CF748FC1F; Thu, 13 Aug 2009 09:17:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7D9H81e094961; Thu, 13 Aug 2009 09:17:08 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D9H85Q094956; Thu, 13 Aug 2009 09:17:08 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908130917.n7D9H85Q094956@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 09:17:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196173 - stable/8/tools/regression/priv X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 09:17:08 -0000 Author: bz Date: Thu Aug 13 09:17:07 2009 New Revision: 196173 URL: http://svn.freebsd.org/changeset/base/196173 Log: MFC r196172: Start respecting WITHOUT_INET6. Make regression/priv compile again after the multi-IP jail changes. Note that we are still using the legacy jail(2) rather than the jail_set(2)/jail(3) syscall. Add an IPv4, and an IPv6 loopback address in case we compile with INET6 enabled. Make the priv_vfs_extattr_system compile on amd64 as well using the proper length modifier to printf(3) for ssize_t. Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/tools/regression/priv/ (props changed) stable/8/tools/regression/priv/Makefile stable/8/tools/regression/priv/main.c stable/8/tools/regression/priv/priv_netinet_ipsec.c stable/8/tools/regression/priv/priv_vfs_extattr_system.c Modified: stable/8/tools/regression/priv/Makefile ============================================================================== --- stable/8/tools/regression/priv/Makefile Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/Makefile Thu Aug 13 09:17:07 2009 (r196173) @@ -2,6 +2,8 @@ # $FreeBSD$ # +.include + PROG= priv SRCS= main.c \ priv_acct.c \ @@ -49,4 +51,8 @@ WARNS= 3 DPADD+= ${LIBIPSEC} LDADD+= -lipsec +.if ${MK_INET6_SUPPORT} != "no" +CFLAGS+= -DINET6 +.endif + .include Modified: stable/8/tools/regression/priv/main.c ============================================================================== --- stable/8/tools/regression/priv/main.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/main.c Thu Aug 13 09:17:07 2009 (r196173) @@ -142,20 +142,24 @@ static struct test tests[] = { priv_netinet_ipsec_policy4_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_bypass", priv_netinet_ipsec_policy6_bypass_setup, priv_netinet_ipsec_policy6_bypass, priv_netinet_ipsec_policy_bypass_cleanup }, +#endif { "priv_netinet_ipsec_policy4_entrust", priv_netinet_ipsec_policy4_entrust_setup, priv_netinet_ipsec_policy4_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#ifdef INET6 { "priv_netinet_ipsec_policy6_entrust", priv_netinet_ipsec_policy6_entrust_setup, priv_netinet_ipsec_policy6_entrust, priv_netinet_ipsec_policy_entrust_cleanup }, +#endif { "priv_netinet_raw", priv_netinet_raw_setup, priv_netinet_raw, priv_netinet_raw_cleanup }, @@ -420,12 +424,23 @@ static void enter_jail(const char *test) { struct jail j; + struct in_addr ia4; +#ifdef INET6 + struct in6_addr ia6 = IN6ADDR_LOOPBACK_INIT; +#endif bzero(&j, sizeof(j)); - j.version = 0; + j.version = JAIL_API_VERSION; j.path = "/"; j.hostname = "test"; - j.ip_number = htonl(INADDR_LOOPBACK); + j.jailname = "regressions/priv"; + ia4.s_addr = htonl(INADDR_LOOPBACK); + j.ip4s = 1; + j.ip4 = &ia4; +#ifdef INET6 + j.ip6s = 1; + j.ip6 = &ia6; +#endif if (jail(&j) < 0) err(-1, "test %s: jail", test); } Modified: stable/8/tools/regression/priv/priv_netinet_ipsec.c ============================================================================== --- stable/8/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/priv_netinet_ipsec.c Thu Aug 13 09:17:07 2009 (r196173) @@ -69,6 +69,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -76,6 +77,7 @@ priv_netinet_ipsec_policy_bypass_setup_a return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -92,6 +94,7 @@ priv_netinet_ipsec_policy4_bypass_setup( AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_bypass_setup(int asroot, int injail, struct test *test) @@ -100,7 +103,7 @@ priv_netinet_ipsec_policy6_bypass_setup( return (priv_netinet_ipsec_policy_bypass_setup_af(asroot, injail, test, AF_INET6)); } - +#endif static int @@ -121,6 +124,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#ifdef INET6 case AF_INET6: sd = socket(AF_INET6, SOCK_DGRAM, 0); if (sd < 0) { @@ -128,6 +132,7 @@ priv_netinet_ipsec_policy_entrust_setup_ return (-1); } break; +#endif default: warnx("%s: unexpected address family", __func__); return (-1); @@ -144,6 +149,7 @@ priv_netinet_ipsec_policy4_entrust_setup AF_INET)); } +#ifdef INET6 int priv_netinet_ipsec_policy6_entrust_setup(int asroot, int injail, struct test *test) @@ -152,7 +158,7 @@ priv_netinet_ipsec_policy6_entrust_setup return (priv_netinet_ipsec_policy_entrust_setup_af(asroot, injail, test, AF_INET6)); } - +#endif void priv_netinet_ipsec_pfkey(int asroot, int injail, struct test *test) @@ -196,10 +202,12 @@ priv_netinet_ipsec_policy_bypass_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -227,13 +235,14 @@ priv_netinet_ipsec_policy4_bypass(int as priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_bypass(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_bypass_af(asroot, injail, test, AF_INET6); } - +#endif static void priv_netinet_ipsec_policy_entrust_af(int asroot, int injail, struct test *test, @@ -246,10 +255,12 @@ priv_netinet_ipsec_policy_entrust_af(int level = IPPROTO_IP; optname = IP_IPSEC_POLICY; break; +#ifdef INET6 case AF_INET6: level = IPPROTO_IPV6; optname = IPV6_IPSEC_POLICY; break; +#endif default: warnx("%s: unexpected address family", __func__); return; @@ -277,13 +288,14 @@ priv_netinet_ipsec_policy4_entrust(int a priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET); } +#ifdef INET6 void priv_netinet_ipsec_policy6_entrust(int asroot, int injail, struct test *test) { priv_netinet_ipsec_policy_entrust_af(asroot, injail, test, AF_INET6); } - +#endif void priv_netinet_ipsec_policy_bypass_cleanup(int asroot, int injail, Modified: stable/8/tools/regression/priv/priv_vfs_extattr_system.c ============================================================================== --- stable/8/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:11:47 2009 (r196172) +++ stable/8/tools/regression/priv/priv_vfs_extattr_system.c Thu Aug 13 09:17:07 2009 (r196173) @@ -80,7 +80,7 @@ priv_vfs_extattr_system(int asroot, int else if (ret == EA_SIZE) error = 0; else - err(-1, "priv_vfs_extattr_system: set returned %d", ret); + err(-1, "priv_vfs_extattr_system: set returned %zd", ret); if (asroot && injail) expect("priv_vfs_extattr_system(asroot, injail)", error, -1, EPERM); From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 09:32:16 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75D95106564A; Thu, 13 Aug 2009 09:32:16 +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 610E48FC4E; Thu, 13 Aug 2009 09:32:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7D9WGVU095404; Thu, 13 Aug 2009 09:32:16 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7D9WGbX095402; Thu, 13 Aug 2009 09:32:16 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908130932.n7D9WGbX095402@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 09:32:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196175 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 09:32:17 -0000 Author: bz Date: Thu Aug 13 09:32:15 2009 New Revision: 196175 URL: http://svn.freebsd.org/changeset/base/196175 Log: MFC r196174: Put multiple instructions into a block when iterating; unbreaks NET_RT_DUMP, which otherwise only returned information of AF_MAX. This was broken in r193232 (save your time - my bug, my fix). Reported by: Larry Baird (lab gta.com) Tested by: Larry Baird (lab gta.com) Reviewed by: zec, lstewart, qing PR: kern/137700 Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/rtsock.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/rtsock.c ============================================================================== --- stable/8/sys/net/rtsock.c Thu Aug 13 09:29:52 2009 (r196174) +++ stable/8/sys/net/rtsock.c Thu Aug 13 09:32:15 2009 (r196175) @@ -1473,7 +1473,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) /* * take care of routing entries */ - for (error = 0; error == 0 && i <= lim; i++) + for (error = 0; error == 0 && i <= lim; i++) { rnh = rt_tables_get_rnh(req->td->td_proc->p_fibnum, i); if (rnh != NULL) { RADIX_NODE_HEAD_LOCK(rnh); @@ -1482,6 +1482,7 @@ sysctl_rtsock(SYSCTL_HANDLER_ARGS) RADIX_NODE_HEAD_UNLOCK(rnh); } else if (af != 0) error = EAFNOSUPPORT; + } break; case NET_RT_IFLIST: From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 10:31:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7407D106564A; Thu, 13 Aug 2009 10:31:03 +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 5EC828FC51; Thu, 13 Aug 2009 10:31:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DAV3eN097860; Thu, 13 Aug 2009 10:31:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DAV3WZ097854; Thu, 13 Aug 2009 10:31:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131031.n7DAV3WZ097854@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 10:31:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196178 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 10:31:04 -0000 Author: bz Date: Thu Aug 13 10:31:02 2009 New Revision: 196178 URL: http://svn.freebsd.org/changeset/base/196178 Log: MFC r196176: Make it possible to change the vnet sysctl variables on jails with their own virtual network stack. Jails only inheriting a network stack cannot change anything that cannot be changed from within a prison. Reviewed by: rwatson, zec Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_jail.c stable/8/sys/kern/kern_sysctl.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/jail.h stable/8/sys/sys/sysctl.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_jail.c ============================================================================== --- stable/8/sys/kern/kern_jail.c Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/kern/kern_jail.c Thu Aug 13 10:31:02 2009 (r196178) @@ -88,7 +88,11 @@ struct prison prison0 = { .pr_childmax = JAIL_MAX, .pr_hostuuid = DEFAULT_HOSTUUID, .pr_children = LIST_HEAD_INITIALIZER(&prison0.pr_children), +#ifdef VIMAGE + .pr_flags = PR_HOST|PR_VNET, +#else .pr_flags = PR_HOST, +#endif .pr_allow = PR_ALLOW_ALL, }; MTX_SYSINIT(prison0, &prison0.pr_mtx, "jail mutex", MTX_DEF); @@ -3308,6 +3312,25 @@ getcredhostid(struct ucred *cred, unsign mtx_unlock(&cred->cr_prison->pr_mtx); } +#ifdef VIMAGE +/* + * Determine whether the prison represented by cred owns + * its vnet rather than having it inherited. + * + * Returns 1 in case the prison owns the vnet, 0 otherwise. + */ +int +prison_owns_vnet(struct ucred *cred) +{ + + /* + * vnets cannot be added/removed after jail creation, + * so no need to lock here. + */ + return (cred->cr_prison->pr_flags & PR_VNET ? 1 : 0); +} +#endif + /* * Determine whether the subject represented by cred can "see" * status of a mount point. Modified: stable/8/sys/kern/kern_sysctl.c ============================================================================== --- stable/8/sys/kern/kern_sysctl.c Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/kern/kern_sysctl.c Thu Aug 13 10:31:02 2009 (r196178) @@ -1381,10 +1381,18 @@ sysctl_root(SYSCTL_HANDLER_ARGS) /* Is this sysctl writable by only privileged users? */ if (req->newptr && !(oid->oid_kind & CTLFLAG_ANYBODY)) { + int priv; + if (oid->oid_kind & CTLFLAG_PRISON) - error = priv_check(req->td, PRIV_SYSCTL_WRITEJAIL); + priv = PRIV_SYSCTL_WRITEJAIL; +#ifdef VIMAGE + else if ((oid->oid_kind & CTLFLAG_VNET) && + prison_owns_vnet(req->td->td_ucred)) + priv = PRIV_SYSCTL_WRITEJAIL; +#endif else - error = priv_check(req->td, PRIV_SYSCTL_WRITE); + priv = PRIV_SYSCTL_WRITE; + error = priv_check(req->td, priv); if (error) return (error); } Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/net/vnet.h Thu Aug 13 10:31:02 2009 (r196178) @@ -232,21 +232,25 @@ int vnet_sysctl_handle_string(SYSCTL_HAN int vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); #define SYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_INT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_int, "I", descr) #define SYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ - SYSCTL_OID(parent, nbr, name, access, ptr, arg, handler, fmt, \ - descr) + SYSCTL_OID(parent, nbr, name, CTLFLAG_VNET|(access), ptr, arg, \ + handler, fmt, descr) #define SYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_STRING|(access), arg, \ - len, vnet_sysctl_handle_string, "A", descr) + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_STRING|CTLFLAG_VNET|(access), \ + arg, len, vnet_sysctl_handle_string, "A", descr) #define SYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_OPAQUE|(access), ptr, \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ sizeof(struct type), vnet_sysctl_handle_opaque, "S," #type, \ descr) #define SYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ - SYSCTL_OID(parent, nbr, name, CTLTYPE_UINT|CTLFLAG_MPSAFE|(access), \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ ptr, val, vnet_sysctl_handle_uint, "IU", descr) #define VNET_SYSCTL_ARG(req, arg1) do { \ if (arg1 != NULL) \ Modified: stable/8/sys/sys/jail.h ============================================================================== --- stable/8/sys/sys/jail.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/sys/jail.h Thu Aug 13 10:31:02 2009 (r196178) @@ -341,6 +341,7 @@ void getcredhostuuid(struct ucred *, cha void getcredhostid(struct ucred *, unsigned long *); int prison_allow(struct ucred *, unsigned); int prison_check(struct ucred *cred1, struct ucred *cred2); +int prison_owns_vnet(struct ucred *); int prison_canseemount(struct ucred *cred, struct mount *mp); void prison_enforce_statfs(struct ucred *cred, struct mount *mp, struct statfs *sp); Modified: stable/8/sys/sys/sysctl.h ============================================================================== --- stable/8/sys/sys/sysctl.h Thu Aug 13 10:27:22 2009 (r196177) +++ stable/8/sys/sys/sysctl.h Thu Aug 13 10:31:02 2009 (r196178) @@ -85,6 +85,7 @@ struct ctlname { #define CTLMASK_SECURE 0x00F00000 /* Secure level */ #define CTLFLAG_TUN 0x00080000 /* Tunable variable */ #define CTLFLAG_MPSAFE 0x00040000 /* Handler is MP safe */ +#define CTLFLAG_VNET 0x00020000 /* Prisons with vnet can fiddle */ #define CTLFLAG_RDTUN (CTLFLAG_RD|CTLFLAG_TUN) /* From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 13:56:06 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3FB41065680; Thu, 13 Aug 2009 13:56:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DDB298FC57; Thu, 13 Aug 2009 13:56:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DDu5Np002640; Thu, 13 Aug 2009 13:56:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DDu5T0002638; Thu, 13 Aug 2009 13:56:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908131356.n7DDu5T0002638@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 13 Aug 2009 13:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196181 - in stable/8/sys: . amd64/include/xen cddl/compat/opensolaris/kern cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/control... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 13:56:06 -0000 Author: trasz Date: Thu Aug 13 13:56:05 2009 New Revision: 196181 URL: http://svn.freebsd.org/changeset/base/196181 Log: InstaMFC 196179: Remove CDDL warning. Approved by: re (kib), core Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c ============================================================================== --- stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 13:17:50 2009 (r196180) +++ stable/8/sys/cddl/compat/opensolaris/kern/opensolaris.c Thu Aug 13 13:56:05 2009 (r196181) @@ -49,10 +49,6 @@ opensolaris_load(void *dummy) { int i; - printf("This module (opensolaris) contains code covered by the\n"); - printf("Common Development and Distribution License (CDDL)\n"); - printf("see http://opensolaris.org/os/licensing/opensolaris_license/\n"); - /* * "Enable" all CPUs even though they may not exist just so * that the asserts work. On FreeBSD, if a CPU exists, it is From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 14:38:10 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 421B4106566C; Thu, 13 Aug 2009 14:38:10 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB388FC43; Thu, 13 Aug 2009 14:38:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DEcAD9003656; Thu, 13 Aug 2009 14:38:10 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DEcAK2003654; Thu, 13 Aug 2009 14:38:10 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131438.n7DEcAK2003654@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 14:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196182 - stable/8/usr.bin/procstat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 14:38:10 -0000 Author: rwatson Date: Thu Aug 13 14:38:09 2009 New Revision: 196182 URL: http://svn.freebsd.org/changeset/base/196182 Log: Merge r196120 from head to stable/8: Update procstat(1) for the fact that devfs paths are no longer unsupported. Approved by: re (kib) Modified: stable/8/usr.bin/procstat/ (props changed) stable/8/usr.bin/procstat/procstat.1 Modified: stable/8/usr.bin/procstat/procstat.1 ============================================================================== --- stable/8/usr.bin/procstat/procstat.1 Thu Aug 13 13:56:05 2009 (r196181) +++ stable/8/usr.bin/procstat/procstat.1 Thu Aug 13 14:38:09 2009 (r196182) @@ -351,10 +351,8 @@ may be mechanically parsed. .Pp The display of open file or memory mapping pathnames is implemented using the kernel's name cache. -It therefore does not work for file systems -that do not use the name cache, such as -.Xr devfs 4 , -or if the name is not present in the cache due to removal. +If a file system does not use the name cache, or the path to a file is not in +the cache, a path will not be displayed. .Pp .Nm currently supports extracting data only from a live kernel, and not from From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 14:50:40 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F1721065690; Thu, 13 Aug 2009 14:50:40 +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 082178FC4A; Thu, 13 Aug 2009 14:50:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DEod6n004046; Thu, 13 Aug 2009 14:50:39 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DEodDD004044; Thu, 13 Aug 2009 14:50:39 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131450.n7DEodDD004044@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 14:50:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196184 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 14:50:41 -0000 Author: rwatson Date: Thu Aug 13 14:50:39 2009 New Revision: 196184 URL: http://svn.freebsd.org/changeset/base/196184 Log: Merge r196121 from head to stable/8: Reverse misordered unlock and lock in at_control for netatalk phase I addresses. Submitted by: Russell Cattelan Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netatalk/at_control.c stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netatalk/at_control.c ============================================================================== --- stable/8/sys/netatalk/at_control.c Thu Aug 13 14:46:32 2009 (r196183) +++ stable/8/sys/netatalk/at_control.c Thu Aug 13 14:50:39 2009 (r196184) @@ -276,7 +276,7 @@ at_control(struct socket *so, u_long cmd * If the request is specifying phase 1, then * only look at a phase one address */ - AT_IFADDR_RUNLOCK(); + AT_IFADDR_RLOCK(); for (oaa = aa; aa; aa = TAILQ_NEXT(aa, aa_link)) { if (aa->aa_ifp == ifp && (aa->aa_flags & AFA_PHASE2) == 0) @@ -286,7 +286,7 @@ at_control(struct socket *so, u_long cmd ifa_free(&oaa->aa_ifa); if (aa != NULL && oaa != aa) ifa_ref(&aa->aa_ifa); - AT_IFADDR_RLOCK(); + AT_IFADDR_RUNLOCK(); } else { struct at_ifaddr *oaa; From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 15:01:50 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C84F0106566C; Thu, 13 Aug 2009 15:01:50 +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 B1E538FC4A; Thu, 13 Aug 2009 15:01:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DF1otg004480; Thu, 13 Aug 2009 15:01:50 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF1o0b004478; Thu, 13 Aug 2009 15:01:50 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131501.n7DF1o0b004478@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 15:01:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196187 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 15:01:51 -0000 Author: rwatson Date: Thu Aug 13 15:01:50 2009 New Revision: 196187 URL: http://svn.freebsd.org/changeset/base/196187 Log: Merge r196122 from head to stable/8: Correctly audit real gids following changes to the audit record argument interface. Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/security/audit/audit.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/security/audit/audit.h ============================================================================== --- stable/8/sys/security/audit/audit.h Thu Aug 13 15:00:18 2009 (r196186) +++ stable/8/sys/security/audit/audit.h Thu Aug 13 15:01:50 2009 (r196187) @@ -232,7 +232,7 @@ void audit_thread_free(struct thread *t #define AUDIT_ARG_RGID(rgid) do { \ if (AUDITING_TD(curthread)) \ - audit_arg_gid((rgid)); \ + audit_arg_rgid((rgid)); \ } while (0) #define AUDIT_ARG_RUID(ruid) do { \ From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 15:02:03 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4CA521065674; Thu, 13 Aug 2009 15:02:03 +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 3A74E8FC4D; Thu, 13 Aug 2009 15:02:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DF23oa004521; Thu, 13 Aug 2009 15:02:03 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF23FU004519; Thu, 13 Aug 2009 15:02:03 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908131502.n7DF23FU004519@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Thu, 13 Aug 2009 15:02:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196188 - stable/8/lib/libkvm X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 15:02:04 -0000 Author: bz Date: Thu Aug 13 15:02:02 2009 New Revision: 196188 URL: http://svn.freebsd.org/changeset/base/196188 Log: MFC r196185: Rather than replicating the maths from the kernel, use the value the kernel calculated directly as we already read it with struct vnet. This will make kvm_vnet.c more resilent in case of possible kernel changes. Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/lib/libkvm/ (props changed) stable/8/lib/libkvm/kvm_vnet.c Modified: stable/8/lib/libkvm/kvm_vnet.c ============================================================================== --- stable/8/lib/libkvm/kvm_vnet.c Thu Aug 13 15:01:50 2009 (r196187) +++ stable/8/lib/libkvm/kvm_vnet.c Thu Aug 13 15:02:02 2009 (r196188) @@ -195,7 +195,7 @@ _kvm_vnet_selectpid(kvm_t *kd, pid_t pid kd->vnet_start = nl[NLIST_START_VNET].n_value; kd->vnet_stop = nl[NLIST_STOP_VNET].n_value; kd->vnet_current = (uintptr_t)prison.pr_vnet; - kd->vnet_base = (uintptr_t)vnet.vnet_data_mem - kd->vnet_start; + kd->vnet_base = vnet.vnet_data_base; return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 15:08:05 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A1B8410656D7; Thu, 13 Aug 2009 15:08: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 8C7C58FC69; Thu, 13 Aug 2009 15:08:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DF856M004751; Thu, 13 Aug 2009 15:08:05 GMT (envelope-from rwatson@svn.freebsd.org) Received: (from rwatson@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DF859n004743; Thu, 13 Aug 2009 15:08:05 GMT (envelope-from rwatson@svn.freebsd.org) Message-Id: <200908131508.n7DF859n004743@svn.freebsd.org> From: Robert Watson Date: Thu, 13 Aug 2009 15:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196190 - in stable/8/lib/libc: . posix1e stdio stdtime string X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 15:08:07 -0000 Author: rwatson Date: Thu Aug 13 15:08:05 2009 New Revision: 196190 URL: http://svn.freebsd.org/changeset/base/196190 Log: Merge r196123 from head to stable/8: Update posix1e-related man pages, especially as relates to MAC, to more accurately reflect the last ten years of work. Approved by: re (kib) Modified: stable/8/lib/libc/ (props changed) stable/8/lib/libc/posix1e/Makefile.inc stable/8/lib/libc/posix1e/mac.3 stable/8/lib/libc/posix1e/mac_free.3 stable/8/lib/libc/posix1e/mac_get.3 stable/8/lib/libc/posix1e/mac_set.3 stable/8/lib/libc/posix1e/mac_text.3 stable/8/lib/libc/posix1e/posix1e.3 stable/8/lib/libc/stdio/asprintf.c (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/string/ffsll.c (props changed) stable/8/lib/libc/string/flsll.c (props changed) stable/8/lib/libc/string/wcpcpy.c (props changed) stable/8/lib/libc/string/wcpncpy.c (props changed) Modified: stable/8/lib/libc/posix1e/Makefile.inc ============================================================================== --- stable/8/lib/libc/posix1e/Makefile.inc Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/Makefile.inc Thu Aug 13 15:08:05 2009 (r196190) @@ -106,14 +106,16 @@ MLINKS+=acl_create_entry.3 acl_create_en mac_get.3 mac_get_fd.3 \ mac_get.3 mac_get_file.3 \ mac_get.3 mac_get_link.3 \ + mac_get.3 mac_get_peer.3 \ mac_get.3 mac_get_pid.3 \ mac_get.3 mac_get_proc.3 \ mac_prepare.3 mac_prepare_file_label.3 \ mac_prepare.3 mac_prepare_ifnet_label.3 \ mac_prepare.3 mac_prepare_process_label.3 \ - mac_set.3 mac_set_link.3 \ + mac_prepare.3 mac_prepare_type.3 \ mac_set.3 mac_set_fd.3 \ mac_set.3 mac_set_file.3 \ + mac_set.3 mac_set_link.3 \ mac_set.3 mac_set_proc.3 \ mac_text.3 mac_from_text.3 \ mac_text.3 mac_to_text.3 Modified: stable/8/lib/libc/posix1e/mac.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -1,4 +1,5 @@ .\" Copyright (c) 2001, 2003 Networks Associates Technology, Inc. +.\" Copyright (c) 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" This software was developed for the FreeBSD Project by Chris @@ -30,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 19, 2003 +.Dd August 7, 2009 .Dt MAC 3 .Os .Sh NAME @@ -44,81 +45,82 @@ In the kernel configuration file: .Cd "options MAC" .Sh DESCRIPTION -.Fx -permits administrators to define Mandatory Access Control labels -defining levels for the privacy and integrity of data, -overriding discretionary policies -for those objects. -Not all objects currently provide support for MAC labels, -and MAC support must be explicitly enabled by the administrator. -The library calls include routines to retrieve, duplicate, -and set MAC labels associated with files and processes. -.Pp -POSIX.1e describes a set of MAC manipulation routines -to manage the contents of MAC labels, -as well as their relationships with -files and processes; -almost all of these support routines -are implemented in -.Fx . +Mandatory Access Control labels describe confidentiality, integrity, and +other security attributes of operating system objects, overriding +discretionary access control. +Not all system objects support MAC labeling, and MAC policies must be +explicitly enabled by the administrator. +This API, based on POSIX.1e, includes routines to retrieve, manipulate, set, +and convert to and from text the MAC labels on files and processes. +.Pp +MAC labels consist of a set of (name, value) tuples, representing security +attributes from MAC policies. +For example, this label contains security labels defined by two policies, +.Xr mac_biba 4 +and +.Xr mac_mls 4 : +.Bd -literal -offset indent +biba/low,mls/low +.Ed +.Pp +Further syntax and semantics of MAC labels may be found in +.Xr maclabel 7 . +.Pp +Applications operate on labels stored in +.Vt mac_t , +but can convert between this internal format and a text format for the +purposes of presentation to uses or external storage. +When querying a label on an object, a +.Vt mac_t +must first be prepared using the interfaces described in +.Xr mac_prepare 3 , +allowing the application to declare which policies it wishes to interogate. +The application writer can also rely on default label names declared in +.Xr mac.conf 5 . +.Pp +When finished with a +.Vt mac_t , +the application must call +.Xr mac_free 3 +to release its storage. .Pp -Available functions, sorted by behavior, include: +The following functions are defined: .Bl -tag -width indent -.It Fn mac_get_fd -This function is described in +.It Fn mac_is_present +This function, described in +.Xr mac_is_present 3 , +allows applications to test whether MAC is configured, as well as whether +specific policies are configured. +.It Fn mac_get_fd , Fn mac_get_file , Fn mac_get_link , Fn mac_get_peer +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a specific file descriptor. -.It Fn mac_get_file -This function is described in +retrieve the MAC labels associated with file descriptors, files, and socket +peers. +.It Fn mac_get_pid , Fn mac_get_proc +These functions, described in .Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -a named file. -.It Fn mac_get_proc -This function is described in -.Xr mac_get 3 , -and may be used to retrieve the -MAC label associated with -the calling process. -.It Fn mac_set_fd -This function is described in -.Xr mac_set 3 , -and may be used to set the -MAC label associated with -a specific file descriptor. -.It Fn mac_set_file -This function is described in +retrieve the MAC labels associated with processes. +.It Fn mac_set_fd , Fn mac_set_file , Fn mac_set_link +These functions, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -a named file. +set the MAC labels associated with file descriptors and files. .It Fn mac_set_proc -This function is described in +This function, described in .Xr mac_set 3 , -and may be used to set the -MAC label associated with -the calling process. +sets the MAC label associated with the current process. .It Fn mac_free -This function is described in +This function, desribed in .Xr mac_free 3 , -and may be used to free -userland working MAC label storage. +frees working MAC label storage. .It Fn mac_from_text -This function is described in +This function, described in .Xr mac_text 3 , -and may be used to convert -a text-form MAC label -into a working +converts a text-form MAC label into working MAC label storage, .Vt mac_t . -.It Fn mac_prepare -.It Fn mac_prepare_file_label -.It Fn mac_prepare_ifnet_label -.It Fn mac_prepare_process_label -These functions are described in +.It Fn mac_prepare , Fn mac_prepare_file_label , Fn mac_prepare_ifnet_label , Fn mac_prepare_process_label , Fn mac_prepare_type +These functions, described in .Xr mac_prepare 3 , -and may be used to preallocate storage for MAC label retrieval. +allocate working storage for MAC label operations. .Xr mac_prepare 3 prepares a label based on caller-specified label names; the other calls rely on the default configuration specified in @@ -130,15 +132,6 @@ and may be used to convert a .Vt mac_t into a text-form MAC label. .El -The behavior of some of these calls is influenced by the configuration -settings found in -.Xr mac.conf 5 , -the MAC library run-time configuration file. -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features -is -.Ud . .Sh FILES .Bl -tag -width ".Pa /etc/mac.conf" -compact .It Pa /etc/mac.conf @@ -150,24 +143,20 @@ system objects, but without policy-speci .Sh SEE ALSO .Xr mac_free 3 , .Xr mac_get 3 , +.Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac.conf 5 , .Xr mac 9 .Sh STANDARDS -These APIs are loosely based on the APIs described in POSIX.1e. -POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft -continues on the cross-platform POSIX.1e implementation mailing list. -To join this list, see the -.Fx -POSIX.1e implementation page -for more information. -However, the resemblance of these APIs to the POSIX APIs is only loose, -as the POSIX APIs were unable to express many notions required for -flexible and extensible access control. +These APIs are loosely based on the APIs described in POSIX.1e, as described +in IEEE POSIX.1e draft 17. +However, the resemblence of these APIS to the POSIX APIs is loose, as the +PSOXI APIS were unable to express some notinos required for flexible and +extensible access control. .Sh HISTORY Support for Mandatory Access Control was introduced in .Fx 5.0 Modified: stable/8/lib/libc/posix1e/mac_free.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_free.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_free.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -64,6 +64,7 @@ function. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS @@ -91,8 +92,8 @@ is a complex structure in the .Tn TrustedBSD implementation, .Fn mac_free -is specific to that type, and must not be used to free the character -strings returned from +is specific to +.Vt mac_3 , +and must not be used to free the character strings returned from .Fn mac_to_text . -Doing so may result in undefined behavior, -including application failure. +Doing so may result in undefined behavior. Modified: stable/8/lib/libc/posix1e/mac_get.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_get.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_get.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -133,6 +133,7 @@ is not a directory. .Xr mac_prepare 3 , .Xr mac_set 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh STANDARDS Modified: stable/8/lib/libc/posix1e/mac_set.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_set.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_set.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -138,6 +138,7 @@ is not a directory. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_text 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr mac 9 .Sh HISTORY Modified: stable/8/lib/libc/posix1e/mac_text.3 ============================================================================== --- stable/8/lib/libc/posix1e/mac_text.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/mac_text.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -98,6 +98,7 @@ to allocate internal storage. .Xr mac_is_present 3 , .Xr mac_prepare 3 , .Xr mac_set 3 , +.Xr posix1e 3 , .Xr mac 4 , .Xr maclabel 7 .Sh STANDARDS Modified: stable/8/lib/libc/posix1e/posix1e.3 ============================================================================== --- stable/8/lib/libc/posix1e/posix1e.3 Thu Aug 13 15:06:08 2009 (r196189) +++ stable/8/lib/libc/posix1e/posix1e.3 Thu Aug 13 15:08:05 2009 (r196190) @@ -1,5 +1,5 @@ .\"- -.\" Copyright (c) 2000 Robert N. M. Watson +.\" Copyright (c) 2000, 2009 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 20, 2009 +.Dd August 7, 2009 .Dt POSIX1E 3 .Os .Sh NAME @@ -36,99 +36,77 @@ .Sh SYNOPSIS .In sys/types.h .In sys/acl.h -.\" .In sys/capability.h .In sys/mac.h .Sh DESCRIPTION -The IEEE POSIX.1e specification never left draft form, but the interfaces -it describes are now widely used despite inherent limitations. -Currently, only a few of the interfaces and features are implemented in -.Fx , -although efforts are underway to complete the integration at this time. +POSIX.1e describes five security extensions to the POSIX.1 API: Access +Control Lists (ACLs), Auditing, Capabilities, Mandatory Access Control, and +Information Flow Labels. +While IEEE POSIX.1e D17 specification has not been standardized, several of +its interfaces are widely used. .Pp -POSIX.1e describes five security extensions to the base POSIX.1 API: -Access Control Lists (ACLs), Auditing, Capabilities, Mandatory Access -Control, and Information Flow Labels. .Fx -supports POSIX.1e ACL interfaces, as well as POSIX.1e-like MAC -interfaces. -The TrustedBSD Project has produced but not integrated an implementation -of POSIX.1e Capabilities. -.Pp -POSIX.1e defines both syntax and semantics for these features, but fairly -substantial changes are required to implement these features in the -operating system. -.Pp -As shipped, -.Fx 4.0 -provides API and VFS support for ACLs, but not an implementation on any -native file system. -.Fx 5.0 -includes support for ACLs as part of UFS1 and UFS2, as well as necessary -VFS support for additional file systems to export ACLs as appropriate. -Available API calls relating to ACLs are described in detail in -.Xr acl 3 . -.Pp -As shipped, -.Fx 5.0 -includes support for Mandatory Access Control as well as POSIX.1e-like -APIs for label management. -More information on API calls relating to MAC is available in -.Xr mac 3 . +implements POSIX.1e interface for access control lists, described in +.Xr acl 3 , +and supports ACLs on the +.Xr ffs 7 +file system; ACLs must be administratively enabled using +.Xr tunefs 8 . .Pp -Additional patches supporting POSIX.1e features are provided by the -TrustedBSD project: +.Fx +implements a POSIX.1e-like mandatory access control interface, described in +.Xr mac 3 , +although with a number of extensions and important semantic differences. .Pp -http://www.TrustedBSD.org/ -.Sh IMPLEMENTATION NOTES -.Fx Ns 's -support for POSIX.1e interfaces and features is still under -development at this time, and many of these features are considered new -or experimental. +.Fx +does not implement the POSIX.1e audit, privilege (capability), or information +flow label APIs. +However, +.Fx +does implement the +.Xr libbsm +audit API. .Sh ENVIRONMENT -POSIX.1e assigns security labels to all objects, extending the security +POSIX.1e assigns security attributes to all objects, extending the security functionality described in POSIX.1. -These additional labels provide -fine-grained discretionary access control, fine-grained capabilities, -and labels necessary for mandatory access control. -POSIX.2c describes -a set of userland utilities for manipulating these labels. +These additional attributes store fine-grained discretionary access control +information and mandatory access control labels; for files, they are stored +in extended attributes, described in +.Xr extattr 3 . .Pp -Many of these services are supported by extended attributes, documented -in -.Xr extattr 2 +POSIX.2c describes +a set of userland utilities for manipulating these attributes, including +.Xr getfacl 1 +and +.Xr setfacl 1 +for access control lists, and +.Xr getfmac 8 and -.Xr extattr 9 . -While these APIs are not documented in POSIX.1e, they are similar in -structure. +.Xr setfmac 8 +for mandatory access control labels. .Sh SEE ALSO +.Xr getfacl 1 , +.Xr setfacl 1 , .Xr extattr 2 , .Xr acl 3 , +.Xr extattr 3 , .Xr libbsm 3 , .Xr mac 3 , +.Xr ffs 7 , +.Xr getfmac 8 , +.Xr setfmac 8 , +.Xr tunefs 8 , .Xr acl 9 , .Xr extattr 9 , .Xr mac 9 .Sh STANDARDS POSIX.1e is described in IEEE POSIX.1e draft 17. -Discussion of the draft continues -on the cross-platform POSIX.1e implementation -mailing list. -To join this list, see the -.Fx -POSIX.1e implementation -page for more information. .Sh HISTORY POSIX.1e support was introduced in .Fx 4.0 ; -most of the features are available as of +most features were available as of .Fx 5.0 . -Development continues. .Sh AUTHORS .An Robert N M Watson .An Chris D. Faulhaber .An Thomas Moestl .An Ilmar S Habibulin -.Sh BUGS -Many of these features are considered new or experimental in -.Fx 5.0 -and should be deployed with appropriate caution. From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 16:01:19 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88D6C106564A; Thu, 13 Aug 2009 16:01:19 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 72C0C8FC41; Thu, 13 Aug 2009 16:01:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DG1JNC006134; Thu, 13 Aug 2009 16:01:19 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DG1Jtc006132; Thu, 13 Aug 2009 16:01:19 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <200908131601.n7DG1Jtc006132@svn.freebsd.org> From: Rafal Jaworowski Date: Thu, 13 Aug 2009 16:01:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196194 - in stable/8/sys: . amd64/include/xen arm/arm cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 16:01:20 -0000 Author: raj Date: Thu Aug 13 16:01:19 2009 New Revision: 196194 URL: http://svn.freebsd.org/changeset/base/196194 Log: MFC r196193: Use correct wbinv operation in pmap_l2cache_wbinv_range(). Submitted by: Michal Hajduk Reviewed by: stas Approved by: re (kib) Obtained from: Semihalf Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/arm/pmap.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/arm/arm/pmap.c ============================================================================== --- stable/8/sys/arm/arm/pmap.c Thu Aug 13 15:56:09 2009 (r196193) +++ stable/8/sys/arm/arm/pmap.c Thu Aug 13 16:01:19 2009 (r196194) @@ -1212,7 +1212,7 @@ pmap_l2cache_wbinv_range(pmap_t pm, vm_o CTR4(KTR_PMAP, "pmap_l2cache_wbinv_range: pmap %p is_kernel %d " "va 0x%08x len 0x%x ", pm, pm == pmap_kernel(), va, rest); if (pmap_get_pde_pte(pm, va, &pde, &ptep) && l2pte_valid(*ptep)) - cpu_l2cache_wb_range(va, rest); + cpu_l2cache_wbinv_range(va, rest); len -= rest; va += rest; From owner-svn-src-stable-8@FreeBSD.ORG Thu Aug 13 17:54:12 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 938781065673; Thu, 13 Aug 2009 17:54:12 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7E40D8FC55; Thu, 13 Aug 2009 17:54:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7DHsCP0008734; Thu, 13 Aug 2009 17:54:12 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7DHsCvJ008700; Thu, 13 Aug 2009 17:54:12 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908131754.n7DHsCvJ008700@svn.freebsd.org> From: Attilio Rao Date: Thu, 13 Aug 2009 17:54:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196198 - in stable/8: . sys/amd64/amd64 sys/amd64/conf sys/amd64/include sys/conf sys/i386/conf sys/i386/i386 sys/i386/include sys/i386/xen sys/ia64/ia64 sys/ia64/include sys/kern sys/... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Aug 2009 17:54:13 -0000 Author: attilio Date: Thu Aug 13 17:54:11 2009 New Revision: 196198 URL: http://svn.freebsd.org/changeset/base/196198 Log: MFC r196196: * Completely remove the option STOP_NMI from the kernel. This option has proven to have a good effect when entering KDB by using a NMI, but it completely violates all the good rules about interrupts disabled while holding a spinlock in other occasions. This can be the cause of deadlocks on events where a normal IPI_STOP is expected. * Add an new IPI called IPI_STOP_HARD on all the supported architectures. This IPI is responsible for sending a stop message among CPUs using a privileged channel when disponible. In other cases it just does match a normal IPI_STOP. Right now the IPI_STOP_HARD functionality uses a NMI on ia32 and amd64 architectures, while on the other has a normal IPI_STOP effect. It is responsibility of maintainers to eventually implement an hard stop when necessary and possible. * Use the new IPI facility in order to implement a new userend SMP kernel function called stop_cpus_hard(). That is specular to stop_cpu() but it does use the privileged channel for the stopping facility. * Let KDB use the newly introduced function stop_cpus_hard() and leave stop_cpus() for all the other cases * Disable interrupts on CPU0 when starting the process of APs suspension. * Style cleanup and comments adding This patch should fix the reboot/shutdown deadlocks many users are constantly reporting on mailing lists. Please don't forget to update your config file with the STOP_NMI option removal Reviewed by: jhb Tested by: pho, bz, rink Approved by: re (kib) Modified: stable/8/UPDATING (contents, props changed) stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/amd64/mp_machdep.c stable/8/sys/amd64/amd64/trap.c stable/8/sys/amd64/conf/GENERIC stable/8/sys/amd64/conf/NOTES stable/8/sys/amd64/conf/XENHVM stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/include/smp.h stable/8/sys/conf/options.amd64 stable/8/sys/conf/options.i386 stable/8/sys/conf/options.pc98 stable/8/sys/i386/conf/GENERIC stable/8/sys/i386/conf/NOTES stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/i386/mp_machdep.c stable/8/sys/i386/i386/trap.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/include/smp.h stable/8/sys/i386/xen/mp_machdep.c stable/8/sys/ia64/ia64/interrupt.c stable/8/sys/ia64/include/smp.h stable/8/sys/kern/kern_shutdown.c stable/8/sys/kern/subr_kdb.c stable/8/sys/kern/subr_smp.c stable/8/sys/mips/include/smp.h stable/8/sys/mips/mips/mp_machdep.c stable/8/sys/pc98/conf/NOTES stable/8/sys/powerpc/include/smp.h stable/8/sys/powerpc/powerpc/mp_machdep.c stable/8/sys/sparc64/include/smp.h stable/8/sys/sun4v/include/smp.h stable/8/sys/sys/smp.h Modified: stable/8/UPDATING ============================================================================== --- stable/8/UPDATING Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/UPDATING Thu Aug 13 17:54:11 2009 (r196198) @@ -22,6 +22,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. to maximize performance. (To disable malloc debugging, run ln -s aj /etc/malloc.conf.) +20090813: + Remove the option STOP_NMI. The default action is now to use NMI + only for KDB via the newly introduced function stop_cpus_hard() + and maintain stop_cpus() to just use a normal IPI_STOP on ia32 + and amd64. + 20090803: RELENG_8 branched. Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/local_apic.c Thu Aug 13 17:54:11 2009 (r196198) @@ -1238,8 +1238,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: stable/8/sys/amd64/amd64/mp_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -114,31 +114,12 @@ volatile int smp_tlb_wait; extern inthand_t IDTVEC(fast_syscall), IDTVEC(fast_syscall32); -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - /* * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1158,12 +1139,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1194,64 +1177,43 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); -} -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -static void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); + lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: stable/8/sys/amd64/amd64/trap.c ============================================================================== --- stable/8/sys/amd64/amd64/trap.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/amd64/trap.c Thu Aug 13 17:54:11 2009 (r196198) @@ -239,13 +239,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: stable/8/sys/amd64/conf/GENERIC ============================================================================== --- stable/8/sys/amd64/conf/GENERIC Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/GENERIC Thu Aug 13 17:54:11 2009 (r196198) @@ -69,7 +69,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -30,11 +30,6 @@ device mptable # Optional MPSPEC mpta # options MP_WATCHDOG -# -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: stable/8/sys/amd64/conf/XENHVM ============================================================================== --- stable/8/sys/amd64/conf/XENHVM Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/conf/XENHVM Thu Aug 13 17:54:11 2009 (r196198) @@ -68,7 +68,6 @@ options SYSVMSG # SYSV-style message options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing #options KDTRACE_FRAME # Ensure frames are compiled in Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/include/apicvar.h Thu Aug 13 17:54:11 2009 (r196198) @@ -102,11 +102,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ #define IPI_SUSPEND (APIC_IPI_INTS + 8) /* Suspend CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 9) /* Stop CPU with a NMI. */ /* * The spurious interrupt can share the priority class with the IPIs since Modified: stable/8/sys/amd64/include/smp.h ============================================================================== --- stable/8/sys/amd64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/amd64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -52,6 +52,7 @@ void cpu_add(u_int apic_id, char boot_cp void cpustop_handler(void); void cpususpend_handler(void); void init_secondary(void); +int ipi_nmi_handler(void); void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); @@ -66,10 +67,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif - #endif /* !LOCORE */ #endif /* SMP */ Modified: stable/8/sys/conf/options.amd64 ============================================================================== --- stable/8/sys/conf/options.amd64 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.amd64 Thu Aug 13 17:54:11 2009 (r196198) @@ -52,7 +52,6 @@ PSM_DEBUG opt_psm.h DEV_ATPIC opt_atpic.h # Debugging -STOP_NMI opt_cpu.h KDTRACE_FRAME opt_kdtrace.h # BPF just-in-time compiler Modified: stable/8/sys/conf/options.i386 ============================================================================== --- stable/8/sys/conf/options.i386 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.i386 Thu Aug 13 17:54:11 2009 (r196198) @@ -110,7 +110,6 @@ ASR_COMPAT opt_asr.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h # BPF just-in-time compiler BPF_JITTER opt_bpf.h Modified: stable/8/sys/conf/options.pc98 ============================================================================== --- stable/8/sys/conf/options.pc98 Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/conf/options.pc98 Thu Aug 13 17:54:11 2009 (r196198) @@ -95,7 +95,6 @@ DEV_NPX opt_npx.h # Debugging NPX_DEBUG opt_npx.h -STOP_NMI opt_cpu.h AGP_DEBUG opt_agp.h # BPF just-in-time compiler Modified: stable/8/sys/i386/conf/GENERIC ============================================================================== --- stable/8/sys/i386/conf/GENERIC Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/conf/GENERIC Thu Aug 13 17:54:11 2009 (r196198) @@ -70,7 +70,6 @@ options P1003_1B_SEMAPHORES # POSIX-sty options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options PRINTF_BUFR_SIZE=128 # Prevent printf output being interspersed. options KBD_INSTALL_CDEV # install a CDEV entry in /dev -options STOP_NMI # Stop CPUS using NMI instead of IPI options HWPMC_HOOKS # Necessary kernel hooks for hwpmc(4) options AUDIT # Security event auditing options MAC # TrustedBSD MAC Framework Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -49,7 +49,6 @@ options MP_WATCHDOG # Debugging options. # -options STOP_NMI # Stop CPUS using NMI instead of IPI options COUNT_XINVLTLB_HITS # Counters for TLB events options COUNT_IPIS # Per-CPU IPI interrupt counters Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/local_apic.c Thu Aug 13 17:54:11 2009 (r196198) @@ -1248,8 +1248,17 @@ lapic_ipi_vectored(u_int vector, int des KASSERT((vector & ~APIC_VECTOR_MASK) == 0, ("%s: invalid vector %d", __func__, vector)); - icrlo = vector | APIC_DELMODE_FIXED | APIC_DESTMODE_PHY | - APIC_LEVEL_DEASSERT | APIC_TRIGMOD_EDGE; + icrlo = APIC_DESTMODE_PHY | APIC_TRIGMOD_EDGE; + + /* + * IPI_STOP_HARD is just a "fake" vector used to send a NMI. + * Use special rules regard NMI if passed, otherwise specify + * the vector. + */ + if (vector == IPI_STOP_HARD) + icrlo |= APIC_DELMODE_NMI | APIC_LEVEL_ASSERT; + else + icrlo |= vector | APIC_DELMODE_FIXED | APIC_LEVEL_DEASSERT; destfield = 0; switch (dest) { case APIC_IPI_DEST_SELF: Modified: stable/8/sys/i386/i386/mp_machdep.c ============================================================================== --- stable/8/sys/i386/i386/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -155,12 +155,6 @@ vm_offset_t smp_tlb_addr1; vm_offset_t smp_tlb_addr2; volatile int smp_tlb_wait; -#ifdef STOP_NMI -static volatile cpumask_t ipi_nmi_pending; - -static void ipi_nmi_selected(cpumask_t cpus); -#endif - #ifdef COUNT_IPIS /* Interrupt counts. */ static u_long *ipi_preempt_counts[MAXCPU]; @@ -177,21 +171,8 @@ u_long *ipi_lazypmap_counts[MAXCPU]; * Local data and functions. */ -#ifdef STOP_NMI -/* - * Provide an alternate method of stopping other CPUs. If another CPU has - * disabled interrupts the conventional STOP IPI will be blocked. This - * NMI-based stop should get through in that case. - */ -static int stop_cpus_with_nmi = 1; -SYSCTL_INT(_debug, OID_AUTO, stop_cpus_with_nmi, CTLTYPE_INT | CTLFLAG_RW, - &stop_cpus_with_nmi, 0, ""); -TUNABLE_INT("debug.stop_cpus_with_nmi", &stop_cpus_with_nmi); -#else -#define stop_cpus_with_nmi 0 -#endif - static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1318,12 +1299,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } -#ifdef STOP_NMI - if (ipi == IPI_STOP && stop_cpus_with_nmi) { - ipi_nmi_selected(cpus); - return; - } -#endif + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1354,64 +1337,42 @@ void ipi_all_but_self(u_int ipi) { - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { + if (IPI_IS_BITMAPED(ipi)) { ipi_selected(PCPU_GET(other_cpus), ipi); return; } + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -#ifdef STOP_NMI -/* - * send NMI IPI to selected CPUs - */ - -#define BEFORE_SPIN 1000000 - -void -ipi_nmi_selected(cpumask_t cpus) -{ - int cpu; - register_t icrlo; - - icrlo = APIC_DELMODE_NMI | APIC_DESTMODE_PHY | APIC_LEVEL_ASSERT - | APIC_TRIGMOD_EDGE; - - CTR2(KTR_SMP, "%s: cpus: %x nmi", __func__, cpus); - - atomic_set_int(&ipi_nmi_pending, cpus); - - while ((cpu = ffs(cpus)) != 0) { - cpu--; - cpus &= ~(1 << cpu); - - KASSERT(cpu_apic_ids[cpu] != -1, - ("IPI NMI to non-existent CPU %d", cpu)); - - /* Wait for an earlier IPI to finish. */ - if (!lapic_ipi_wait(BEFORE_SPIN)) - panic("ipi_nmi_selected: previous IPI has not cleared"); - - lapic_ipi_raw(icrlo, cpu_apic_ids[cpu]); - } -} - int -ipi_nmi_handler(void) +ipi_nmi_handler() { - int cpumask = PCPU_GET(cpumask); + cpumask_t cpumask; - if (!(ipi_nmi_pending & cpumask)) - return 1; + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); atomic_clear_int(&ipi_nmi_pending, cpumask); cpustop_handler(); - return 0; + return (0); } -#endif /* STOP_NMI */ - /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. Modified: stable/8/sys/i386/i386/trap.c ============================================================================== --- stable/8/sys/i386/i386/trap.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/i386/trap.c Thu Aug 13 17:54:11 2009 (r196198) @@ -211,13 +211,11 @@ trap(struct trapframe *frame) type = frame->tf_trapno; #ifdef SMP -#ifdef STOP_NMI /* Handler for NMI IPIs used for stopping CPUs. */ if (type == T_NMI) { if (ipi_nmi_handler() == 0) goto out; } -#endif /* STOP_NMI */ #endif /* SMP */ #ifdef KDB Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/include/apicvar.h Thu Aug 13 17:54:11 2009 (r196198) @@ -100,11 +100,6 @@ * smp_ipi_mtx and waits for the completion of the IPI (Only one IPI user * at a time) The second group uses a single interrupt and a bitmap to avoid * redundant IPI interrupts. - * - * Right now IPI_STOP used by kdb shares the interrupt priority class with - * the two IPI groups mentioned above. As such IPI_STOP may cause a deadlock. - * Eventually IPI_STOP should use NMI IPIs - this would eliminate this and - * other deadlocks caused by IPI_STOP. */ /* Interrupts for local APIC LVT entries other than the timer. */ @@ -134,6 +129,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #else /* XEN */ /* These are the normal i386 APIC definitions */ @@ -161,6 +157,7 @@ #define IPI_IS_BITMAPED(x) ((x) <= IPI_BITMAP_LAST) #define IPI_STOP (APIC_IPI_INTS + 7) /* Stop CPU until restarted. */ +#define IPI_STOP_HARD (APIC_IPI_INTS + 8) /* Stop CPU with a NMI. */ #endif /* XEN */ /* Modified: stable/8/sys/i386/include/smp.h ============================================================================== --- stable/8/sys/i386/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -60,7 +60,8 @@ inthand_t void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); -void ipi_selected(u_int cpus, u_int ipi); +int ipi_nmi_handler(void); +void ipi_selected(cpumask_t cpus, u_int ipi); void ipi_all_but_self(u_int ipi); #ifndef XEN void ipi_bitmap_handler(struct trapframe frame); @@ -76,9 +77,6 @@ void smp_masked_invlpg_range(cpumask_t m void smp_invltlb(void); void smp_masked_invltlb(cpumask_t mask); -#ifdef STOP_NMI -int ipi_nmi_handler(void); -#endif #ifdef XEN void ipi_to_irq_init(void); Modified: stable/8/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/8/sys/i386/xen/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/i386/xen/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -90,8 +90,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define stop_cpus_with_nmi 0 - int mp_naps; /* # of Applications processors */ int boot_cpu_id = -1; /* designated BSP */ Modified: stable/8/sys/ia64/ia64/interrupt.c ============================================================================== --- stable/8/sys/ia64/ia64/interrupt.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/ia64/ia64/interrupt.c Thu Aug 13 17:54:11 2009 (r196198) @@ -145,6 +145,8 @@ interrupt(struct trapframe *tf) /* * Handle ExtINT interrupts by generating an INTA cycle to * read the vector. + * IPI_STOP_HARD is mapped to IPI_STOP so it is not necessary + * to add it to this switch-like construct. */ if (vector == 0) { inta = ib->ib_inta; Modified: stable/8/sys/ia64/include/smp.h ============================================================================== --- stable/8/sys/ia64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/ia64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -21,6 +21,7 @@ #define IPI_AST 4 #define IPI_RENDEZVOUS 5 #define IPI_STOP 6 +#define IPI_STOP_HARD 6 #define IPI_PREEMPT 7 #define IPI_COUNT 8 Modified: stable/8/sys/kern/kern_shutdown.c ============================================================================== --- stable/8/sys/kern/kern_shutdown.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/kern_shutdown.c Thu Aug 13 17:54:11 2009 (r196198) @@ -412,9 +412,6 @@ boot(int howto) */ EVENTHANDLER_INVOKE(shutdown_post_sync, howto); - /* XXX This doesn't disable interrupts any more. Reconsider? */ - splhigh(); - if ((howto & (RB_HALT|RB_DUMP)) == RB_DUMP && !cold && !dumping) doadump(); @@ -488,6 +485,13 @@ static void shutdown_reset(void *junk, int howto) { + /* + * Disable interrupts on CPU0 in order to avoid fast handlers + * to preempt the stopping process and to deadlock against other + * CPUs. + */ + spinlock_enter(); + printf("Rebooting...\n"); DELAY(1000000); /* wait 1 sec for printf's to complete and be read */ /* cpu_boot(howto); */ /* doesn't do anything at the moment */ Modified: stable/8/sys/kern/subr_kdb.c ============================================================================== --- stable/8/sys/kern/subr_kdb.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/subr_kdb.c Thu Aug 13 17:54:11 2009 (r196198) @@ -88,7 +88,8 @@ SYSCTL_PROC(_debug_kdb, OID_AUTO, trap_c * Flag indicating whether or not to IPI the other CPUs to stop them on * entering the debugger. Sometimes, this will result in a deadlock as * stop_cpus() waits for the other cpus to stop, so we allow it to be - * disabled. + * disabled. In order to maximize the chances of success, use a hard + * stop for that. */ #ifdef SMP static int kdb_stop_cpus = 1; @@ -226,7 +227,7 @@ kdb_panic(const char *msg) { #ifdef SMP - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif printf("KDB: panic\n"); panic(msg); @@ -518,7 +519,7 @@ kdb_trap(int type, int code, struct trap #ifdef SMP if ((did_stop_cpus = kdb_stop_cpus) != 0) - stop_cpus(PCPU_GET(other_cpus)); + stop_cpus_hard(PCPU_GET(other_cpus)); #endif kdb_active++; Modified: stable/8/sys/kern/subr_smp.c ============================================================================== --- stable/8/sys/kern/subr_smp.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/kern/subr_smp.c Thu Aug 13 17:54:11 2009 (r196198) @@ -233,18 +233,21 @@ forward_roundrobin(void) * XXX FIXME: this is not MP-safe, needs a lock to prevent multiple CPUs * from executing at same time. */ -int -stop_cpus(cpumask_t map) +static int +generic_stop_cpus(cpumask_t map, u_int type) { int i; + KASSERT(type == IPI_STOP || type == IPI_STOP_HARD, + ("%s: invalid stop type", __func__)); + if (!smp_started) return 0; - CTR1(KTR_SMP, "stop_cpus(%x)", map); + CTR2(KTR_SMP, "stop_cpus(%x) with %u type", map, type); /* send the stop IPI to all CPUs in map */ - ipi_selected(map, IPI_STOP); + ipi_selected(map, type); i = 0; while ((stopped_cpus & map) != map) { @@ -262,6 +265,20 @@ stop_cpus(cpumask_t map) return 1; } +int +stop_cpus(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP)); +} + +int +stop_cpus_hard(cpumask_t map) +{ + + return (generic_stop_cpus(map, IPI_STOP_HARD)); +} + #if defined(__amd64__) /* * When called the executing CPU will send an IPI to all other CPUs Modified: stable/8/sys/mips/include/smp.h ============================================================================== --- stable/8/sys/mips/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/mips/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -24,6 +24,7 @@ #define IPI_RENDEZVOUS 0x0002 #define IPI_AST 0x0004 #define IPI_STOP 0x0008 +#define IPI_STOP_HARD 0x0008 #ifndef LOCORE Modified: stable/8/sys/mips/mips/mp_machdep.c ============================================================================== --- stable/8/sys/mips/mips/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/mips/mips/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -129,7 +129,12 @@ smp_handle_ipi(struct trapframe *frame) break; case IPI_STOP: - CTR0(KTR_SMP, "IPI_STOP"); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add it in the switch. + */ + CTR0(KTR_SMP, "IPI_STOP or IPI_STOP_HARD"); atomic_set_int(&stopped_cpus, cpumask); while ((started_cpus & cpumask) == 0) Modified: stable/8/sys/pc98/conf/NOTES ============================================================================== --- stable/8/sys/pc98/conf/NOTES Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/pc98/conf/NOTES Thu Aug 13 17:54:11 2009 (r196198) @@ -29,10 +29,6 @@ device apic # I/O apic # options MP_WATCHDOG -# Debugging options. -# -options STOP_NMI # Stop CPUS using NMI instead of IPI - ##################################################################### Modified: stable/8/sys/powerpc/include/smp.h ============================================================================== --- stable/8/sys/powerpc/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/powerpc/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -35,6 +35,7 @@ #define IPI_PREEMPT 1 #define IPI_RENDEZVOUS 2 #define IPI_STOP 3 +#define IPI_STOP_HARD 3 #ifndef LOCORE Modified: stable/8/sys/powerpc/powerpc/mp_machdep.c ============================================================================== --- stable/8/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/powerpc/powerpc/mp_machdep.c Thu Aug 13 17:54:11 2009 (r196198) @@ -281,7 +281,13 @@ powerpc_ipi_handler(void *arg) smp_rendezvous_action(); break; case IPI_STOP: - CTR1(KTR_SMP, "%s: IPI_STOP (stop)", __func__); + + /* + * IPI_STOP_HARD is mapped to IPI_STOP so it is not + * necessary to add such case in the switch. + */ + CTR1(KTR_SMP, "%s: IPI_STOP or IPI_STOP_HARD (stop)", + __func__); self = PCPU_GET(cpumask); savectx(PCPU_GET(curpcb)); atomic_set_int(&stopped_cpus, self); Modified: stable/8/sys/sparc64/include/smp.h ============================================================================== --- stable/8/sys/sparc64/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sparc64/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -56,6 +56,7 @@ #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_PREEMPT PIL_PREEMPT #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_RETRIES 5000 Modified: stable/8/sys/sun4v/include/smp.h ============================================================================== --- stable/8/sys/sun4v/include/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sun4v/include/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -44,6 +44,7 @@ #define IPI_AST PIL_AST #define IPI_RENDEZVOUS PIL_RENDEZVOUS #define IPI_STOP PIL_STOP +#define IPI_STOP_HARD PIL_STOP #define IPI_PREEMPT PIL_PREEMPT Modified: stable/8/sys/sys/smp.h ============================================================================== --- stable/8/sys/sys/smp.h Thu Aug 13 17:51:26 2009 (r196197) +++ stable/8/sys/sys/smp.h Thu Aug 13 17:54:11 2009 (r196198) @@ -123,6 +123,7 @@ void forward_signal(struct thread *); void forward_roundrobin(void); int restart_cpus(cpumask_t); int stop_cpus(cpumask_t); +int stop_cpus_hard(cpumask_t); #if defined(__amd64__) int suspend_cpus(cpumask_t); #endif From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 10:25:15 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25B56106568B; Fri, 14 Aug 2009 10:25:15 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0FFAD8FC65; Fri, 14 Aug 2009 10:25:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EAPESQ028939; Fri, 14 Aug 2009 10:25:14 GMT (envelope-from julian@svn.freebsd.org) Received: (from julian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EAPE4m028937; Fri, 14 Aug 2009 10:25:14 GMT (envelope-from julian@svn.freebsd.org) Message-Id: <200908141025.n7EAPE4m028937@svn.freebsd.org> From: Julian Elischer Date: Fri, 14 Aug 2009 10:25:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196202 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 10:25:15 -0000 Author: julian Date: Fri Aug 14 10:25:14 2009 New Revision: 196202 URL: http://svn.freebsd.org/changeset/base/196202 Log: MFC of r196201 URL: http://svn.freebsd.org/changeset/base/196201 Fix ipfw crash on uid or gid check. Receiving any ip packet for which there is no existing socket will crash if ipfw has a uid or gid test rule, as the uid/gid of the non existent owner of said non existent socket is tested. Brooks introduced this error as part of his >16 gids patch. It appears to be a cut-n-paste error from similar code a few lines before. The old code used the 'pcb' variable here, but in the new code that switched the 'inp' variable, which is often NULL and what is tested in the code further up. The rest of the multi-gid patch for ipfw seems solid (and cleaner than previous code). p.s. What's up with all the properties changing? It is a fresh checkout. Reviewed by: brooks Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (contents, props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/ipfw/ip_fw2.c ============================================================================== --- stable/8/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:09:45 2009 (r196201) +++ stable/8/sys/netinet/ipfw/ip_fw2.c Fri Aug 14 10:25:14 2009 (r196202) @@ -2057,7 +2057,7 @@ check_uidgid(ipfw_insn_u32 *insn, int pr dst_ip, htons(dst_port), wildcard, NULL); if (pcb != NULL) { - *uc = crhold(inp->inp_cred); + *uc = crhold(pcb->inp_cred); *ugid_lookupp = 1; } INP_INFO_RUNLOCK(pi); From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 11:06:58 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC18C1065691; Fri, 14 Aug 2009 11:06:58 +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 B663C8FC61; Fri, 14 Aug 2009 11:06:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EB6wxw032266; Fri, 14 Aug 2009 11:06:58 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EB6wCv032264; Fri, 14 Aug 2009 11:06:58 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141106.n7EB6wCv032264@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:06:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196207 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 11:06:58 -0000 Author: kib Date: Fri Aug 14 11:06:58 2009 New Revision: 196207 URL: http://svn.freebsd.org/changeset/base/196207 Log: MFC r196203: Correctly handle unlock for !MAKEENTRY case. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/vfs_cache.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/vfs_cache.c ============================================================================== --- stable/8/sys/kern/vfs_cache.c Fri Aug 14 11:00:38 2009 (r196206) +++ stable/8/sys/kern/vfs_cache.c Fri Aug 14 11:06:58 2009 (r196207) @@ -416,7 +416,8 @@ retry_wlocked: if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) cache_zap(dvp->v_cache_dd); dvp->v_cache_dd = NULL; - goto unlock; + CACHE_WUNLOCK(); + return (0); } if (dvp->v_cache_dd->nc_flag & NCF_ISDOTDOT) *vpp = dvp->v_cache_dd->nc_vp; From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 11:13:06 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8BB3D106568E; Fri, 14 Aug 2009 11:13:06 +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 761B88FC45; Fri, 14 Aug 2009 11:13:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EBD6H9032436; Fri, 14 Aug 2009 11:13:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EBD61g032434; Fri, 14 Aug 2009 11:13:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141113.n7EBD61g032434@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:13:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196208 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 11:13:06 -0000 Author: kib Date: Fri Aug 14 11:13:06 2009 New Revision: 196208 URL: http://svn.freebsd.org/changeset/base/196208 Log: MFC r196204: Add the address of the lock to the KTR_LOCK trace. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/lock.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/sys/lock.h ============================================================================== --- stable/8/sys/sys/lock.h Fri Aug 14 11:06:58 2009 (r196207) +++ stable/8/sys/sys/lock.h Fri Aug 14 11:13:06 2009 (r196208) @@ -155,16 +155,16 @@ struct lock_class { #define LOCK_LOG_LOCK(opname, lo, flags, recurse, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, opname " (%s) %s r = %d at %s:%d", \ + CTR6(KTR_LOCK, opname " (%s) %s %p r = %d at %s:%d", \ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(recurse), (file), (line)); \ + (lo), (u_int)(recurse), (file), (line)); \ } while (0) #define LOCK_LOG_TRY(opname, lo, flags, result, file, line) do { \ if (LOCK_LOG_TEST((lo), (flags))) \ - CTR5(KTR_LOCK, "TRY_" opname " (%s) %s result=%d at %s:%d",\ + CTR6(KTR_LOCK, "TRY_" opname " (%s) %s %p result=%d at %s:%d",\ LOCK_CLASS(lo)->lc_name, (lo)->lo_name, \ - (u_int)(result), (file), (line)); \ + (lo), (u_int)(result), (file), (line)); \ } while (0) #define LOCK_LOG_INIT(lo, flags) do { \ From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 11:17:34 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2FB7106568D; Fri, 14 Aug 2009 11:17:34 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AD1A08FC15; Fri, 14 Aug 2009 11:17:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EBHY5w032560; Fri, 14 Aug 2009 11:17:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EBHYqu032558; Fri, 14 Aug 2009 11:17:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141117.n7EBHYqu032558@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:17:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196209 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 11:17:35 -0000 Author: kib Date: Fri Aug 14 11:17:34 2009 New Revision: 196209 URL: http://svn.freebsd.org/changeset/base/196209 Log: MFC r196205: In nfs_upgrade_vnlock(), assert that the vnode is locked. When downgrading, pass LK_RETRY to the vn_lock(), since otherwise vn_lock() unlocks the doomed vnode, causing extra unlock. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/nfsclient/nfs_subs.c stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/nfsclient/nfs_subs.c ============================================================================== --- stable/8/sys/nfsclient/nfs_subs.c Fri Aug 14 11:13:06 2009 (r196208) +++ stable/8/sys/nfsclient/nfs_subs.c Fri Aug 14 11:17:34 2009 (r196209) @@ -409,28 +409,25 @@ int nfs_upgrade_vnlock(struct vnode *vp) { int old_lock; - - if ((old_lock = VOP_ISLOCKED(vp)) != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Upgrade to exclusive lock, this might block */ - vn_lock(vp, LK_UPGRADE | LK_RETRY); - } else { - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - } + + ASSERT_VOP_LOCKED(vp, "nfs_upgrade_vnlock"); + old_lock = VOP_ISLOCKED(vp); + if (old_lock != LK_EXCLUSIVE) { + KASSERT(old_lock == LK_SHARED, + ("nfs_upgrade_vnlock: wrong old_lock %d", old_lock)); + /* Upgrade to exclusive lock, this might block */ + vn_lock(vp, LK_UPGRADE | LK_RETRY); } - return old_lock; + return (old_lock); } void nfs_downgrade_vnlock(struct vnode *vp, int old_lock) { if (old_lock != LK_EXCLUSIVE) { - if (old_lock == LK_SHARED) { - /* Downgrade from exclusive lock, this might block */ - vn_lock(vp, LK_DOWNGRADE); - } else { - VOP_UNLOCK(vp, 0); - } + KASSERT(old_lock == LK_SHARED, ("wrong old_lock %d", old_lock)); + /* Downgrade from exclusive lock. */ + vn_lock(vp, LK_DOWNGRADE | LK_RETRY); } } From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 11:22:10 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 210CF1065690; Fri, 14 Aug 2009 11:22:10 +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 0B5AE8FC3D; Fri, 14 Aug 2009 11:22:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EBM9wx032714; Fri, 14 Aug 2009 11:22:09 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EBM9ml032712; Fri, 14 Aug 2009 11:22:09 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <200908141122.n7EBM9ml032712@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 14 Aug 2009 11:22:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196210 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/mis... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 11:22:10 -0000 Author: kib Date: Fri Aug 14 11:22:09 2009 New Revision: 196210 URL: http://svn.freebsd.org/changeset/base/196210 Log: MFC r196206: Take the number of allocated freeblks into consideration for softdep_slowdown(), to prevent kernel memory exhaustioni on mass-truncation. Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/ufs/ffs/ffs_softdep.c stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- stable/8/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 11:17:34 2009 (r196209) +++ stable/8/sys/ufs/ffs/ffs_softdep.c Fri Aug 14 11:22:09 2009 (r196210) @@ -663,6 +663,8 @@ static int req_clear_inodedeps; /* synce static int req_clear_remove; /* syncer process flush some freeblks */ #define FLUSH_REMOVE 2 #define FLUSH_REMOVE_WAIT 3 +static long num_freeblkdep; /* number of freeblks workitems allocated */ + /* * runtime statistics */ @@ -2223,6 +2225,9 @@ softdep_setup_freeblocks(ip, length, fla freeblks->fb_uid = ip->i_uid; freeblks->fb_previousinum = ip->i_number; freeblks->fb_devvp = ip->i_devvp; + ACQUIRE_LOCK(&lk); + num_freeblkdep++; + FREE_LOCK(&lk); extblocks = 0; if (fs->fs_magic == FS_UFS2_MAGIC) extblocks = btodb(fragroundup(fs, ip->i_din2->di_extsize)); @@ -2815,6 +2820,7 @@ handle_workitem_freeblocks(freeblks, fla ACQUIRE_LOCK(&lk); WORKITEM_FREE(freeblks, D_FREEBLKS); + num_freeblkdep--; FREE_LOCK(&lk); } @@ -5768,7 +5774,8 @@ softdep_slowdown(vp) max_softdeps_hard = max_softdeps * 11 / 10; if (num_dirrem < max_softdeps_hard / 2 && num_inodedep < max_softdeps_hard && - VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps) { + VFSTOUFS(vp->v_mount)->um_numindirdeps < maxindirdeps && + num_freeblkdep < max_softdeps_hard) { FREE_LOCK(&lk); return (0); } From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 13:26:50 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80B75106568B; Fri, 14 Aug 2009 13:26:50 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6E9148FC4D; Fri, 14 Aug 2009 13:26:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EDQoh8035357; Fri, 14 Aug 2009 13:26:50 GMT (envelope-from cperciva@svn.freebsd.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EDQoSC035355; Fri, 14 Aug 2009 13:26:50 GMT (envelope-from cperciva@svn.freebsd.org) Message-Id: <200908141326.n7EDQoSC035355@svn.freebsd.org> From: Colin Percival Date: Fri, 14 Aug 2009 13:26:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196214 - stable/8/usr.sbin/sysinstall X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 13:26:50 -0000 Author: cperciva Date: Fri Aug 14 13:26:50 2009 New Revision: 196214 URL: http://svn.freebsd.org/changeset/base/196214 Log: Merge r196213 to stable/8. Approved by: re (rwatson) Modified: stable/8/usr.sbin/sysinstall/ (props changed) stable/8/usr.sbin/sysinstall/devices.c Modified: stable/8/usr.sbin/sysinstall/devices.c ============================================================================== --- stable/8/usr.sbin/sysinstall/devices.c Fri Aug 14 13:24:44 2009 (r196213) +++ stable/8/usr.sbin/sysinstall/devices.c Fri Aug 14 13:26:50 2009 (r196214) @@ -80,6 +80,7 @@ static struct _devname { CDROM("acd%d", "ATAPI/IDE CDROM", 4), DISK("da%d", "SCSI disk device", 16), DISK("ad%d", "ATA/IDE disk device", 16), + DISK("ada%d", "SATA disk device", 16), DISK("ar%d", "ATA/IDE RAID device", 16), DISK("afd%d", "ATAPI/IDE floppy device", 4), DISK("mlxd%d", "Mylex RAID disk", 4), From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 19:30:59 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8357106568B; Fri, 14 Aug 2009 19:30:59 +0000 (UTC) (envelope-from remko@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C6FCB8FC3D; Fri, 14 Aug 2009 19:30:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EJUxO9045350; Fri, 14 Aug 2009 19:30:59 GMT (envelope-from remko@svn.freebsd.org) Received: (from remko@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EJUxCf045348; Fri, 14 Aug 2009 19:30:59 GMT (envelope-from remko@svn.freebsd.org) Message-Id: <200908141930.n7EJUxCf045348@svn.freebsd.org> From: Remko Lodder Date: Fri, 14 Aug 2009 19:30:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196217 - stable/8/usr.sbin/arp X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 19:31:00 -0000 Author: remko Date: Fri Aug 14 19:30:59 2009 New Revision: 196217 URL: http://svn.freebsd.org/changeset/base/196217 Log: Remove bogus char cast. PR: 118014 Submitted by: Gardner Bell Approved by: re (rwatson), imp (mentor, implicit) MFC after: immediate Approved by: re (rwatson), imp (mentor, implicit) Modified: stable/8/usr.sbin/arp/ (props changed) stable/8/usr.sbin/arp/arp.c Modified: stable/8/usr.sbin/arp/arp.c ============================================================================== --- stable/8/usr.sbin/arp/arp.c Fri Aug 14 18:18:51 2009 (r196216) +++ stable/8/usr.sbin/arp/arp.c Fri Aug 14 19:30:59 2009 (r196217) @@ -120,7 +120,7 @@ main(int argc, char *argv[]) int aflag = 0; /* do it for all entries */ while ((ch = getopt(argc, argv, "andfsSi:")) != -1) - switch((char)ch) { + switch(ch) { case 'a': aflag = 1; break; From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 20:09:32 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D60E106568B; Fri, 14 Aug 2009 20:09:32 +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 48D6E8FC65; Fri, 14 Aug 2009 20:09:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EK9Wan046244; Fri, 14 Aug 2009 20:09:32 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EK9Wac046243; Fri, 14 Aug 2009 20:09:32 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142009.n7EK9Wac046243@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:09:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196220 - in stable/8/sys: dev/ata dev/sound/usb dev/usb dev/usb/controller dev/usb/input dev/usb/misc dev/usb/net dev/usb/quirk dev/usb/serial dev/usb/storage dev/usb/template dev/usb/... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 20:09:32 -0000 Author: jhb Date: Fri Aug 14 20:09:31 2009 New Revision: 196220 URL: http://svn.freebsd.org/changeset/base/196220 Log: MFC: Purge mergeinfo from files that were temporarily renamed while USB2 was imported into the tree alongside USB. Approved by: re (mergeinfo blanket) Modified: stable/8/sys/dev/ata/ata-usb.c (props changed) stable/8/sys/dev/sound/usb/uaudio.c (props changed) stable/8/sys/dev/sound/usb/uaudio.h (props changed) stable/8/sys/dev/sound/usb/uaudio_pcm.c (props changed) stable/8/sys/dev/sound/usb/uaudioreg.h (props changed) stable/8/sys/dev/usb/controller/at91dci.c (props changed) stable/8/sys/dev/usb/controller/at91dci.h (props changed) stable/8/sys/dev/usb/controller/at91dci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.c (props changed) stable/8/sys/dev/usb/controller/atmegadci.h (props changed) stable/8/sys/dev/usb/controller/atmegadci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ehci.c (props changed) stable/8/sys/dev/usb/controller/ehci.h (props changed) stable/8/sys/dev/usb/controller/ehci_ixp4xx.c (props changed) stable/8/sys/dev/usb/controller/ehci_mbus.c (props changed) stable/8/sys/dev/usb/controller/ehci_pci.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.c (props changed) stable/8/sys/dev/usb/controller/musb_otg.h (props changed) stable/8/sys/dev/usb/controller/musb_otg_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci.c (props changed) stable/8/sys/dev/usb/controller/ohci.h (props changed) stable/8/sys/dev/usb/controller/ohci_atmelarm.c (props changed) stable/8/sys/dev/usb/controller/ohci_pci.c (props changed) stable/8/sys/dev/usb/controller/uhci.c (props changed) stable/8/sys/dev/usb/controller/uhci.h (props changed) stable/8/sys/dev/usb/controller/uhci_pci.c (props changed) stable/8/sys/dev/usb/controller/usb_controller.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.c (props changed) stable/8/sys/dev/usb/controller/uss820dci.h (props changed) stable/8/sys/dev/usb/controller/uss820dci_atmelarm.c (props changed) stable/8/sys/dev/usb/input/uhid.c (props changed) stable/8/sys/dev/usb/input/ukbd.c (props changed) stable/8/sys/dev/usb/input/ums.c (props changed) stable/8/sys/dev/usb/input/usb_rdesc.h (props changed) stable/8/sys/dev/usb/misc/udbp.c (props changed) stable/8/sys/dev/usb/misc/udbp.h (props changed) stable/8/sys/dev/usb/misc/ufm.c (props changed) stable/8/sys/dev/usb/net/if_aue.c (props changed) stable/8/sys/dev/usb/net/if_auereg.h (props changed) stable/8/sys/dev/usb/net/if_axe.c (props changed) stable/8/sys/dev/usb/net/if_axereg.h (props changed) stable/8/sys/dev/usb/net/if_cdce.c (props changed) stable/8/sys/dev/usb/net/if_cdcereg.h (props changed) stable/8/sys/dev/usb/net/if_cue.c (props changed) stable/8/sys/dev/usb/net/if_cuereg.h (props changed) stable/8/sys/dev/usb/net/if_kue.c (props changed) stable/8/sys/dev/usb/net/if_kuefw.h (props changed) stable/8/sys/dev/usb/net/if_kuereg.h (props changed) stable/8/sys/dev/usb/net/if_rue.c (props changed) stable/8/sys/dev/usb/net/if_ruereg.h (props changed) stable/8/sys/dev/usb/net/if_udav.c (props changed) stable/8/sys/dev/usb/net/if_udavreg.h (props changed) stable/8/sys/dev/usb/net/usb_ethernet.c (props changed) stable/8/sys/dev/usb/net/usb_ethernet.h (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.c (props changed) stable/8/sys/dev/usb/quirk/usb_quirk.h (props changed) stable/8/sys/dev/usb/serial/u3g.c (props changed) stable/8/sys/dev/usb/serial/uark.c (props changed) stable/8/sys/dev/usb/serial/ubsa.c (props changed) stable/8/sys/dev/usb/serial/ubser.c (props changed) stable/8/sys/dev/usb/serial/uchcom.c (props changed) stable/8/sys/dev/usb/serial/ucycom.c (props changed) stable/8/sys/dev/usb/serial/ufoma.c (props changed) stable/8/sys/dev/usb/serial/uftdi.c (props changed) stable/8/sys/dev/usb/serial/uftdi_reg.h (props changed) stable/8/sys/dev/usb/serial/ugensa.c (props changed) stable/8/sys/dev/usb/serial/uipaq.c (props changed) stable/8/sys/dev/usb/serial/ulpt.c (props changed) stable/8/sys/dev/usb/serial/umct.c (props changed) stable/8/sys/dev/usb/serial/umodem.c (props changed) stable/8/sys/dev/usb/serial/umoscom.c (props changed) stable/8/sys/dev/usb/serial/uplcom.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.c (props changed) stable/8/sys/dev/usb/serial/usb_serial.h (props changed) stable/8/sys/dev/usb/serial/uslcom.c (props changed) stable/8/sys/dev/usb/serial/uvisor.c (props changed) stable/8/sys/dev/usb/serial/uvscom.c (props changed) stable/8/sys/dev/usb/storage/rio500_usb.h (props changed) stable/8/sys/dev/usb/storage/umass.c (props changed) stable/8/sys/dev/usb/storage/urio.c (props changed) stable/8/sys/dev/usb/storage/ustorage_fs.c (props changed) stable/8/sys/dev/usb/template/usb_template.c (props changed) stable/8/sys/dev/usb/template/usb_template.h (props changed) stable/8/sys/dev/usb/template/usb_template_cdce.c (props changed) stable/8/sys/dev/usb/template/usb_template_msc.c (props changed) stable/8/sys/dev/usb/template/usb_template_mtp.c (props changed) stable/8/sys/dev/usb/ufm_ioctl.h (props changed) stable/8/sys/dev/usb/usb.h (props changed) stable/8/sys/dev/usb/usb_bus.h (props changed) stable/8/sys/dev/usb/usb_busdma.c (props changed) stable/8/sys/dev/usb/usb_busdma.h (props changed) stable/8/sys/dev/usb/usb_cdc.h (props changed) stable/8/sys/dev/usb/usb_compat_linux.c (props changed) stable/8/sys/dev/usb/usb_compat_linux.h (props changed) stable/8/sys/dev/usb/usb_controller.h (props changed) stable/8/sys/dev/usb/usb_core.c (props changed) stable/8/sys/dev/usb/usb_core.h (props changed) stable/8/sys/dev/usb/usb_debug.c (props changed) stable/8/sys/dev/usb/usb_debug.h (props changed) stable/8/sys/dev/usb/usb_dev.c (props changed) stable/8/sys/dev/usb/usb_dev.h (props changed) stable/8/sys/dev/usb/usb_device.c (props changed) stable/8/sys/dev/usb/usb_device.h (props changed) stable/8/sys/dev/usb/usb_dynamic.c (props changed) stable/8/sys/dev/usb/usb_dynamic.h (props changed) stable/8/sys/dev/usb/usb_endian.h (props changed) stable/8/sys/dev/usb/usb_error.c (props changed) stable/8/sys/dev/usb/usb_generic.c (props changed) stable/8/sys/dev/usb/usb_generic.h (props changed) stable/8/sys/dev/usb/usb_handle_request.c (props changed) stable/8/sys/dev/usb/usb_hid.c (props changed) stable/8/sys/dev/usb/usb_hub.c (props changed) stable/8/sys/dev/usb/usb_hub.h (props changed) stable/8/sys/dev/usb/usb_if.m (props changed) stable/8/sys/dev/usb/usb_ioctl.h (props changed) stable/8/sys/dev/usb/usb_lookup.c (props changed) stable/8/sys/dev/usb/usb_mbuf.c (props changed) stable/8/sys/dev/usb/usb_mbuf.h (props changed) stable/8/sys/dev/usb/usb_msctest.c (props changed) stable/8/sys/dev/usb/usb_msctest.h (props changed) stable/8/sys/dev/usb/usb_parse.c (props changed) stable/8/sys/dev/usb/usb_pci.h (props changed) stable/8/sys/dev/usb/usb_process.c (props changed) stable/8/sys/dev/usb/usb_process.h (props changed) stable/8/sys/dev/usb/usb_request.c (props changed) stable/8/sys/dev/usb/usb_request.h (props changed) stable/8/sys/dev/usb/usb_transfer.c (props changed) stable/8/sys/dev/usb/usb_transfer.h (props changed) stable/8/sys/dev/usb/usb_util.c (props changed) stable/8/sys/dev/usb/usb_util.h (props changed) stable/8/sys/dev/usb/usbdevs (props changed) stable/8/sys/dev/usb/usbhid.h (props changed) stable/8/sys/dev/usb/wlan/if_rum.c (props changed) stable/8/sys/dev/usb/wlan/if_rumfw.h (props changed) stable/8/sys/dev/usb/wlan/if_rumreg.h (props changed) stable/8/sys/dev/usb/wlan/if_rumvar.h (props changed) stable/8/sys/dev/usb/wlan/if_ural.c (props changed) stable/8/sys/dev/usb/wlan/if_uralreg.h (props changed) stable/8/sys/dev/usb/wlan/if_uralvar.h (props changed) stable/8/sys/dev/usb/wlan/if_zyd.c (props changed) stable/8/sys/dev/usb/wlan/if_zydfw.h (props changed) stable/8/sys/dev/usb/wlan/if_zydreg.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt_var.h (props changed) stable/8/sys/netgraph/bluetooth/drivers/ubtbcmfw/ubtbcmfw.c (props changed) From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 20:42:41 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55B461065690; Fri, 14 Aug 2009 20:42:41 +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 4439D8FC52; Fri, 14 Aug 2009 20:42:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EKgfl9047072; Fri, 14 Aug 2009 20:42:41 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EKgft4047069; Fri, 14 Aug 2009 20:42:41 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142042.n7EKgft4047069@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196222 - stable/8/release X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 20:42:41 -0000 Author: jhb Date: Fri Aug 14 20:42:40 2009 New Revision: 196222 URL: http://svn.freebsd.org/changeset/base/196222 Log: MFC 196221: Add the ability to build a release from an SVN checkout instead of a CVS checkout. If SVNROOT is specified, then the source tree will be checked out from that SVN repository instead of using CVS. ports and docs still use CVS. If SVNROOT is not specified, then the source tree will be checked out using CVS. An explicit SVN branch can be specified using SVNBRANCH (e.g. SVNBRANCH=stable/8). If SVNBRANCH is not set but RELEASETAG is set to a CVS branch (such as RELENG_8) the appropriate SVN branch will be inferred from the CVS branch using svnbranch.awk. Note that there are still several open questions about using SVN instead of CVS in the release process. However, this does enable one to build a release from an SVN repository if needed. Approved by: re (kensmith) Added: stable/8/release/svnbranch.awk - copied unchanged from r196221, head/release/svnbranch.awk Modified: stable/8/release/ (props changed) stable/8/release/Makefile Modified: stable/8/release/Makefile ============================================================================== --- stable/8/release/Makefile Fri Aug 14 20:35:42 2009 (r196221) +++ stable/8/release/Makefile Fri Aug 14 20:42:40 2009 (r196222) @@ -1,7 +1,8 @@ # $FreeBSD$ # # make release [BUILDNAME=somename] CHROOTDIR=/some/dir CVSROOT=/cvs/dir \ -# [RELEASETAG=tag] +# [RELEASETAG=tag] [SVNROOT=svn://svn.freebsd.org/base] \ +# [SVNBRANCH=some/branch] # # Where "/some/dir" is the pathname of a directory on a some filesystem with # at least 1000MB of free space, "somename" is what you want the release to @@ -9,6 +10,11 @@ # which CVS "tag" name should be used when checking out the sources to build # the release (default is HEAD). # +# Please note the support for building from SVN is preliminary and there +# are still questions about things like how to handle updates of +# /usr/src on production systems (csup(1) replacement). It is a work +# in progress and may change as the other issues get worked out. +# # Please note: the md(4) driver must be present in the kernel # (either by being compiled in or available as a kld(4) module), # otherwise the target 'release.8' and possibly others will fail. @@ -49,12 +55,25 @@ BUILDNAME?=${BASE}-${DATE}-SNAP # To add other options to the CVS command, set #CVSARGS="-lfq" # -# To prefix the cvs command +# To prefix the CVS command #CVSPREFIX="/usr/bin/time" # # Where the CVS repository is #CVSROOT="/home/ncvs" # +# To add other options to the Subversion subcommands (co,up), set +#SVNCMDARGS="-r '{ 01/01/2002 00:00:00 UTC }'" +# +# To prefix the Subversion command +#SVNPREFIX="/usr/bin/time" +# +# Where the Subversion repository is +#SVNROOT=svn://svn.freebsd.org/base +# +# Subversion branch to build for src. If this is not set then it is +# automatically computed from RELEASETAG. +#SVNBRANCH=stable/7 +# # Non-zero if ${RELEASETAG} is in the form "RELENG_ver_RELEASE"; we # are building an official release. Otherwise, we are building for # a branch. @@ -68,6 +87,16 @@ PORTSRELEASETAG?= ${AUXRELEASETAG} .endif .endif +# Determine the Subversion source branch that corresponds to the requested +# RELEASETAG. +.if !defined(SVNBRANCH) +.if defined(RELEASETAG) +SVNBRANCH!= echo "${RELEASETAG}" | awk -f ${.CURDIR}/svnbranch.awk +.else +SVNBRANCH= head +.endif +.endif + # If you want to pass flags to the world build such as -j X, use # WORLD_FLAGS. Similarly, you can specify make flags for kernel # builds via KERNEL_FLAGS. @@ -341,8 +370,17 @@ CVS_PORTSARGS+= -r ${PORTSRELEASETAG} WORLDDIR?= ${.CURDIR}/.. release rerelease: -.if !defined(CHROOTDIR) || !defined(BUILDNAME) || !defined(CVSROOT) - @echo "To make a release you must set CHROOTDIR, BUILDNAME and CVSROOT" && false +.if !defined(CHROOTDIR) || !defined(BUILDNAME) + @echo "To make a release you must set CHROOTDIR and BUILDNAME" && false +.endif +.if !defined(NOPORTSATALL) && !defined(EXTPORTSDIR) && !defined(CVSROOT) + @echo "Building ports requires CVSROOT or EXTPORTSDIR" && false +.endif +.if !defined(NODOC) && !defined(EXTDOCDIR) && !defined(CVSROOT) + @echo "Building docs requires CVSROOT or EXTDOCDIR" && false +.endif +.if !defined(EXTSRCDIR) && !defined(CVSROOT) && !defined(SVNROOT) + @echo "The source tree requires SVNROOT, CVSROOT, or EXTSRCDIR" && false .endif .if defined(NOPORTSATALL) && !defined(NODOC) @echo "Ports are required for building the release docs. Either set NODOC or" @@ -387,6 +425,10 @@ release rerelease: .if defined(EXTSRCDIR) cd ${CHROOTDIR}/usr && \ cp -R -H ${EXTSRCDIR} src +.elif defined(SVNROOT) + cd ${CHROOTDIR}/usr && \ + ${SVNPREFIX} svn co ${SVNCMDARGS} ${SVNROOT}/${SVNBRANCH} \ + ${RELEASESRCMODULE} .else cd ${CHROOTDIR}/usr && \ ${CVSPREFIX} cvs -R ${CVSARGS} -d ${CVSROOT} \ @@ -432,7 +474,10 @@ release rerelease: .endif .if make(rerelease) .if !defined(RELEASENOUPDATE) && !defined(EXTSRCDIR) -.if !defined(RELEASETAG) +.if defined(SVNROOT) + cd ${CHROOTDIR}/usr/src && ${SVNPREFIX} svn switch ${SVNCMDARGS} \ + ${SVNROOT}/${SVNBRANCH} +.elif !defined(RELEASETAG) cd ${CHROOTDIR}/usr/src && ${CVSPREFIX} cvs -R ${CVSARGS} -q \ update ${CVSCMDARGS} -P -d -A .else Copied: stable/8/release/svnbranch.awk (from r196221, head/release/svnbranch.awk) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/8/release/svnbranch.awk Fri Aug 14 20:42:40 2009 (r196222, copy of r196221, head/release/svnbranch.awk) @@ -0,0 +1,28 @@ +# $FreeBSD$ + +BEGIN { + FS = "_" +} + +/RELENG_.*_RELEASE/ { + if (NF == 5) { + printf "release/%s.%s.%s", $2, $3, $4 + exit + } +} + +/RELENG_.*/ { + if (NF == 3) { + printf "releng/%s.%s", $2, $3 + exit + } + + if (NF == 2) { + printf "stable/%s", $2 + exit + } +} + +// { + printf "unknown_branch" +} From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 20:57:22 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CEED106568B; Fri, 14 Aug 2009 20:57:22 +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 19F598FC4B; Fri, 14 Aug 2009 20:57:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EKvMHM047412; Fri, 14 Aug 2009 20:57:22 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EKvLuf047405; Fri, 14 Aug 2009 20:57:22 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200908142057.n7EKvLuf047405@svn.freebsd.org> From: John Baldwin Date: Fri, 14 Aug 2009 20:57:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196223 - in stable/8/sys: amd64/amd64 amd64/include dev/hwpmc i386/i386 i386/include X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 20:57:22 -0000 Author: jhb Date: Fri Aug 14 20:57:21 2009 New Revision: 196223 URL: http://svn.freebsd.org/changeset/base/196223 Log: Adjust the handling of the local APIC PMC interrupt vector: - Provide lapic_disable_pmc(), lapic_enable_pmc(), and lapic_reenable_pmc() routines in the local APIC code that the hwpmc(4) driver can use to manage the local APIC PMC interrupt vector. - Do not enable the local APIC PMC interrupt vector by default when HWPMC_HOOKS is enabled. Instead, the hwpmc(4) driver explicitly enables the interrupt when it is succesfully initialized and disables the interrupt when it is unloaded. This avoids enabling the interrupt on unsupported CPUs which may result in spurious NMIs. Reported by: rnoland Reviewed by: jkoshy Approved by: re (kib) MFC after: 2 weeks Modified: stable/8/sys/amd64/amd64/local_apic.c stable/8/sys/amd64/include/apicvar.h stable/8/sys/amd64/include/pmc_mdep.h stable/8/sys/dev/hwpmc/hwpmc_core.c stable/8/sys/dev/hwpmc/hwpmc_piv.c stable/8/sys/dev/hwpmc/hwpmc_ppro.c stable/8/sys/dev/hwpmc/hwpmc_x86.c stable/8/sys/i386/i386/local_apic.c stable/8/sys/i386/include/apicvar.h stable/8/sys/i386/include/pmc_mdep.h Modified: stable/8/sys/amd64/amd64/local_apic.c ============================================================================== --- stable/8/sys/amd64/amd64/local_apic.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/amd64/amd64/local_apic.c Fri Aug 14 20:57:21 2009 (r196223) @@ -123,7 +123,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ - { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ + { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -305,11 +305,9 @@ lapic_setup(int boot) lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); -#ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); -#endif /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); @@ -332,6 +330,88 @@ lapic_setup(int boot) intr_restore(eflags); } +void +lapic_reenable_pmc(void) +{ +#ifdef HWPMC_HOOKS + uint32_t value; + + value = lapic->lvt_pcint; + value &= ~APIC_LVT_M; + lapic->lvt_pcint = value; +#endif +} + +#ifdef HWPMC_HOOKS +static void +lapic_update_pmc(void *dummy) +{ + struct lapic *la; + + la = &lapics[lapic_id()]; + lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); +} +#endif + +int +lapic_enable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return (0); + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return (0); + + lvts[LVT_PMC].lvt_masked = 0; + +#ifdef SMP + /* + * If hwpmc was loaded at boot time then the APs may not be + * started yet. In that case, don't forward the request to + * them as they will program the lvt when they start. + */ + if (smp_started) + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); + else +#endif + lapic_update_pmc(NULL); + return (1); +#else + return (0); +#endif +} + +void +lapic_disable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return; + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return; + + lvts[LVT_PMC].lvt_masked = 1; + +#ifdef SMP + /* The APs should always be started when hwpmc is unloaded. */ + KASSERT(mp_ncpus == 1 || smp_started, ("hwpmc unloaded too early")); +#endif + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); +#endif +} + /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function Modified: stable/8/sys/amd64/include/apicvar.h ============================================================================== --- stable/8/sys/amd64/include/apicvar.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/amd64/include/apicvar.h Fri Aug 14 20:57:21 2009 (r196223) @@ -201,7 +201,9 @@ int ioapic_set_triggermode(void *cookie, int ioapic_set_smi(void *cookie, u_int pin); void lapic_create(u_int apic_id, int boot_cpu); void lapic_disable(void); +void lapic_disable_pmc(void); void lapic_dump(const char *str); +int lapic_enable_pmc(void); void lapic_eoi(void); u_int lapic_error(void); int lapic_id(void); @@ -212,6 +214,7 @@ void lapic_ipi_vectored(u_int vector, in int lapic_ipi_wait(int delay); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +void lapic_reenable_pmc(void); void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id); int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked); int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode); Modified: stable/8/sys/amd64/include/pmc_mdep.h ============================================================================== --- stable/8/sys/amd64/include/pmc_mdep.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/amd64/include/pmc_mdep.h Fri Aug 14 20:57:21 2009 (r196223) @@ -115,7 +115,6 @@ union pmc_md_pmc { */ void start_exceptions(void), end_exceptions(void); -void pmc_x86_lapic_enable_pmc_interrupt(void); struct pmc_mdep *pmc_amd_initialize(void); void pmc_amd_finalize(struct pmc_mdep *_md); Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Fri Aug 14 20:57:21 2009 (r196223) @@ -32,10 +32,13 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include +#include +#include #include #include #include @@ -1771,7 +1774,7 @@ core_intr(int cpu, struct trapframe *tf) } if (found_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(found_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); @@ -1895,7 +1898,7 @@ core2_intr(int cpu, struct trapframe *tf (uintmax_t) rdmsr(IA_GLOBAL_OVF_CTRL)); if (found_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(found_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: stable/8/sys/dev/hwpmc/hwpmc_piv.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_piv.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_piv.c Fri Aug 14 20:57:21 2009 (r196223) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -39,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -1537,7 +1540,7 @@ p4_intr(int cpu, struct trapframe *tf) */ if (did_interrupt) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(did_interrupt ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: stable/8/sys/dev/hwpmc/hwpmc_ppro.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_ppro.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_ppro.c Fri Aug 14 20:57:21 2009 (r196223) @@ -32,6 +32,7 @@ __FBSDID("$FreeBSD$"); #include +#include #include #include #include @@ -39,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include +#include #include #include #include @@ -718,7 +721,7 @@ p6_intr(int cpu, struct trapframe *tf) * unmasked after a PMC interrupt. */ if (retval) - pmc_x86_lapic_enable_pmc_interrupt(); + lapic_reenable_pmc(); atomic_add_int(retval ? &pmc_stats.pm_intr_processed : &pmc_stats.pm_intr_ignored, 1); Modified: stable/8/sys/dev/hwpmc/hwpmc_x86.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_x86.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/dev/hwpmc/hwpmc_x86.c Fri Aug 14 20:57:21 2009 (r196223) @@ -39,7 +39,8 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include +#include #include #include @@ -47,18 +48,6 @@ __FBSDID("$FreeBSD$"); #include #include -extern volatile lapic_t *lapic; - -void -pmc_x86_lapic_enable_pmc_interrupt(void) -{ - uint32_t value; - - value = lapic->lvt_pcint; - value &= ~APIC_LVT_M; - lapic->lvt_pcint = value; -} - /* * Attempt to walk a user call stack using a too-simple algorithm. * In the general case we need unwind information associated with @@ -252,16 +241,15 @@ pmc_md_initialize() struct pmc_mdep *md; /* determine the CPU kind */ - md = NULL; if (cpu_vendor_id == CPU_VENDOR_AMD) md = pmc_amd_initialize(); else if (cpu_vendor_id == CPU_VENDOR_INTEL) md = pmc_intel_initialize(); else - KASSERT(0, ("[x86,%d] Unknown vendor", __LINE__)); + return (NULL); /* disallow sampling if we do not have an LAPIC */ - if (md != NULL && lapic == NULL) + if (!lapic_enable_pmc()) for (i = 1; i < md->pmd_nclass; i++) md->pmd_classdep[i].pcd_caps &= ~PMC_CAP_INTERRUPT; @@ -271,6 +259,8 @@ pmc_md_initialize() void pmc_md_finalize(struct pmc_mdep *md) { + + lapic_disable_pmc(); if (cpu_vendor_id == CPU_VENDOR_AMD) pmc_amd_finalize(md); else if (cpu_vendor_id == CPU_VENDOR_INTEL) Modified: stable/8/sys/i386/i386/local_apic.c ============================================================================== --- stable/8/sys/i386/i386/local_apic.c Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/i386/i386/local_apic.c Fri Aug 14 20:57:21 2009 (r196223) @@ -123,7 +123,7 @@ static struct lvt lvts[LVT_MAX + 1] = { { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* LINT1: NMI */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_TIMER_INT }, /* Timer */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_ERROR_INT }, /* Error */ - { 1, 1, 0, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ + { 1, 1, 1, 1, APIC_LVT_DM_NMI, 0 }, /* PMC */ { 1, 1, 1, 1, APIC_LVT_DM_FIXED, APIC_THERMAL_INT }, /* Thermal */ }; @@ -307,11 +307,9 @@ lapic_setup(int boot) lapic->lvt_lint0 = lvt_mode(la, LVT_LINT0, lapic->lvt_lint0); lapic->lvt_lint1 = lvt_mode(la, LVT_LINT1, lapic->lvt_lint1); -#ifdef HWPMC_HOOKS /* Program the PMC LVT entry if present. */ if (maxlvt >= LVT_PMC) lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); -#endif /* Program timer LVT and setup handler. */ lapic->lvt_timer = lvt_mode(la, LVT_TIMER, lapic->lvt_timer); @@ -334,6 +332,88 @@ lapic_setup(int boot) intr_restore(eflags); } +void +lapic_reenable_pmc(void) +{ +#ifdef HWPMC_HOOKS + uint32_t value; + + value = lapic->lvt_pcint; + value &= ~APIC_LVT_M; + lapic->lvt_pcint = value; +#endif +} + +#ifdef HWPMC_HOOKS +static void +lapic_update_pmc(void *dummy) +{ + struct lapic *la; + + la = &lapics[lapic_id()]; + lapic->lvt_pcint = lvt_mode(la, LVT_PMC, lapic->lvt_pcint); +} +#endif + +int +lapic_enable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return (0); + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return (0); + + lvts[LVT_PMC].lvt_masked = 0; + +#ifdef SMP + /* + * If hwpmc was loaded at boot time then the APs may not be + * started yet. In that case, don't forward the request to + * them as they will program the lvt when they start. + */ + if (smp_started) + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); + else +#endif + lapic_update_pmc(NULL); + return (1); +#else + return (0); +#endif +} + +void +lapic_disable_pmc(void) +{ +#ifdef HWPMC_HOOKS + u_int32_t maxlvt; + + /* Fail if the local APIC is not present. */ + if (lapic == NULL) + return; + + /* Fail if the PMC LVT is not present. */ + maxlvt = (lapic->version & APIC_VER_MAXLVT) >> MAXLVTSHIFT; + if (maxlvt < LVT_PMC) + return; + + lvts[LVT_PMC].lvt_masked = 1; + +#ifdef SMP + /* The APs should always be started when hwpmc is unloaded. */ + KASSERT(mp_ncpus == 1 || smp_started, ("hwpmc unloaded too early")); +#endif + smp_rendezvous(NULL, lapic_update_pmc, NULL, NULL); +#endif +} + /* * Called by cpu_initclocks() on the BSP to setup the local APIC timer so * that it can drive hardclock, statclock, and profclock. This function Modified: stable/8/sys/i386/include/apicvar.h ============================================================================== --- stable/8/sys/i386/include/apicvar.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/i386/include/apicvar.h Fri Aug 14 20:57:21 2009 (r196223) @@ -230,7 +230,9 @@ int ioapic_set_triggermode(void *cookie, int ioapic_set_smi(void *cookie, u_int pin); void lapic_create(u_int apic_id, int boot_cpu); void lapic_disable(void); +void lapic_disable_pmc(void); void lapic_dump(const char *str); +int lapic_enable_pmc(void); void lapic_eoi(void); u_int lapic_error(void); int lapic_id(void); @@ -241,6 +243,7 @@ void lapic_ipi_vectored(u_int vector, in int lapic_ipi_wait(int delay); void lapic_handle_intr(int vector, struct trapframe *frame); void lapic_handle_timer(struct trapframe *frame); +void lapic_reenable_pmc(void); void lapic_set_logical_id(u_int apic_id, u_int cluster, u_int cluster_id); int lapic_set_lvt_mask(u_int apic_id, u_int lvt, u_char masked); int lapic_set_lvt_mode(u_int apic_id, u_int lvt, u_int32_t mode); Modified: stable/8/sys/i386/include/pmc_mdep.h ============================================================================== --- stable/8/sys/i386/include/pmc_mdep.h Fri Aug 14 20:42:40 2009 (r196222) +++ stable/8/sys/i386/include/pmc_mdep.h Fri Aug 14 20:57:21 2009 (r196223) @@ -150,7 +150,6 @@ struct pmc_mdep; */ void start_exceptions(void), end_exceptions(void); -void pmc_x86_lapic_enable_pmc_interrupt(void); struct pmc_mdep *pmc_amd_initialize(void); void pmc_amd_finalize(struct pmc_mdep *_md); From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 21:50:48 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D918106568D; Fri, 14 Aug 2009 21:50:48 +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 29CAD8FC6B; Fri, 14 Aug 2009 21:50:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7ELombX048919; Fri, 14 Aug 2009 21:50:48 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7ELomPp048914; Fri, 14 Aug 2009 21:50:48 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <200908142150.n7ELomPp048914@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Fri, 14 Aug 2009 21:50:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196227 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci kern modules/dtrace/dtnfsclient mo... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 21:50:48 -0000 Author: bz Date: Fri Aug 14 21:50:47 2009 New Revision: 196227 URL: http://svn.freebsd.org/changeset/base/196227 Log: MFC r196226: Add a new macro to test that a variable could be loaded atomically. Check that the given variable is at most uintptr_t in size and that it is aligned. Note: ASSERT_ATOMIC_LOAD() uses ALIGN() to check for adequate alignment -- however, the function of ALIGN() is to guarantee alignment, and therefore may lead to stronger alignment enforcement than necessary for types that are smaller than sizeof(uintptr_t). Add checks to mtx, rw and sx locks init functions to detect possible breakage. This was used during debugging of the problem fixed with r196118 where a pointer was on an un-aligned address in the dpcpu area. In collaboration with: rwatson Reviewed by: rwatson Approved by: re (kib) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/kern/kern_mutex.c stable/8/sys/kern/kern_rwlock.c stable/8/sys/kern/kern_sx.c stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/sys/systm.h stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/kern/kern_mutex.c ============================================================================== --- stable/8/sys/kern/kern_mutex.c Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/kern/kern_mutex.c Fri Aug 14 21:50:47 2009 (r196227) @@ -783,6 +783,8 @@ mtx_init(struct mtx *m, const char *name MPASS((opts & ~(MTX_SPIN | MTX_QUIET | MTX_RECURSE | MTX_NOWITNESS | MTX_DUPOK | MTX_NOPROFILE)) == 0); + ASSERT_ATOMIC_LOAD(m->mtx_lock, ("%s: mtx_lock not aligned for %s: %p", + __func__, name, &m->mtx_lock)); #ifdef MUTEX_DEBUG /* Diagnostic and error correction */ Modified: stable/8/sys/kern/kern_rwlock.c ============================================================================== --- stable/8/sys/kern/kern_rwlock.c Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/kern/kern_rwlock.c Fri Aug 14 21:50:47 2009 (r196227) @@ -174,6 +174,8 @@ rw_init_flags(struct rwlock *rw, const c MPASS((opts & ~(RW_DUPOK | RW_NOPROFILE | RW_NOWITNESS | RW_QUIET | RW_RECURSE)) == 0); + ASSERT_ATOMIC_LOAD(rw->rw_lock, ("%s: rw_lock not aligned for %s: %p", + __func__, name, &rw->rw_lock)); flags = LO_UPGRADABLE; if (opts & RW_DUPOK) Modified: stable/8/sys/kern/kern_sx.c ============================================================================== --- stable/8/sys/kern/kern_sx.c Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/kern/kern_sx.c Fri Aug 14 21:50:47 2009 (r196227) @@ -205,6 +205,8 @@ sx_init_flags(struct sx *sx, const char MPASS((opts & ~(SX_QUIET | SX_RECURSE | SX_NOWITNESS | SX_DUPOK | SX_NOPROFILE | SX_NOADAPTIVE)) == 0); + ASSERT_ATOMIC_LOAD(sx->sx_lock, ("%s: sx_lock not aligned for %s: %p", + __func__, description, &sx->sx_lock)); flags = LO_SLEEPABLE | LO_UPGRADABLE; if (opts & SX_DUPOK) Modified: stable/8/sys/sys/systm.h ============================================================================== --- stable/8/sys/sys/systm.h Fri Aug 14 21:46:54 2009 (r196226) +++ stable/8/sys/sys/systm.h Fri Aug 14 21:50:47 2009 (r196227) @@ -89,6 +89,10 @@ extern int maxusers; /* system tune hin #define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] #endif +#define ASSERT_ATOMIC_LOAD(var,msg) \ + KASSERT(sizeof(var) <= sizeof(uintptr_t) && \ + ALIGN(&(var)) == (uintptr_t)&(var), msg) + /* * XXX the hints declarations are even more misplaced than most declarations * in this file, since they are needed in one file (per arch) and only used From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 22:55:55 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65651106564A; Fri, 14 Aug 2009 22:55:55 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 380C88FC45; Fri, 14 Aug 2009 22:55:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EMttxk050558; Fri, 14 Aug 2009 22:55:55 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EMttK0050555; Fri, 14 Aug 2009 22:55:55 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142255.n7EMttK0050555@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 22:55:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196231 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris conf contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient mo... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 22:55:55 -0000 Author: zec Date: Fri Aug 14 22:55:54 2009 New Revision: 196231 URL: http://svn.freebsd.org/changeset/base/196231 Log: MFC r196228: Make VNET_DEBUG a standalone compile-time option, i.e. decouple it from INVARIANTS. Reviewed by: bz Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/conf/options stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/vnet.h stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/conf/options ============================================================================== --- stable/8/sys/conf/options Fri Aug 14 22:46:45 2009 (r196230) +++ stable/8/sys/conf/options Fri Aug 14 22:55:54 2009 (r196231) @@ -821,8 +821,9 @@ TDMA_TXRATE_QUARTER_DEFAULT opt_tdma.h TDMA_TXRATE_11NA_DEFAULT opt_tdma.h TDMA_TXRATE_11NG_DEFAULT opt_tdma.h -# Virtualize the network stack +# Network stack virtualization options VIMAGE opt_global.h +VNET_DEBUG opt_global.h # Common Flash Interface (CFI) options CFI_SUPPORT_STRATAFLASH opt_cfi.h Modified: stable/8/sys/net/vnet.h ============================================================================== --- stable/8/sys/net/vnet.h Fri Aug 14 22:46:45 2009 (r196230) +++ stable/8/sys/net/vnet.h Fri Aug 14 22:55:54 2009 (r196231) @@ -107,9 +107,6 @@ void vnet_destroy(struct vnet *vnet); * Various macros -- get and set the current network stack, but also * assertions. */ -#ifdef INVARIANTS -#define VNET_DEBUG -#endif #ifdef VNET_DEBUG #define VNET_ASSERT(condition) \ if (!(condition)) { \ From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 23:01:21 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD8E51065672; Fri, 14 Aug 2009 23:01:21 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A043C8FC16; Fri, 14 Aug 2009 23:01:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EN1LDv050805; Fri, 14 Aug 2009 23:01:21 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EN1Lnm050803; Fri, 14 Aug 2009 23:01:21 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142301.n7EN1Lnm050803@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 23:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196232 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient modules... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 23:01:21 -0000 Author: zec Date: Fri Aug 14 23:01:21 2009 New Revision: 196232 URL: http://svn.freebsd.org/changeset/base/196232 Log: MFC r196229: SCTP is not yet compatible with options VIMAGE kernels although it compiles with VIMAGE defined, so explicitly disallow building such kernels. Reviewed by: rrs Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netinet/sctp_os_bsd.h stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/sctp_os_bsd.h ============================================================================== --- stable/8/sys/netinet/sctp_os_bsd.h Fri Aug 14 22:55:54 2009 (r196231) +++ stable/8/sys/netinet/sctp_os_bsd.h Fri Aug 14 23:01:21 2009 (r196232) @@ -78,6 +78,10 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef VIMAGE +#error "SCTP is not yet compatible with VIMAGE." +#endif + #ifdef IPSEC #include #include From owner-svn-src-stable-8@FreeBSD.ORG Fri Aug 14 23:05:10 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6CF5B106568D; Fri, 14 Aug 2009 23:05:10 +0000 (UTC) (envelope-from zec@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5974F8FC43; Fri, 14 Aug 2009 23:05:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7EN5A1g051007; Fri, 14 Aug 2009 23:05:10 GMT (envelope-from zec@svn.freebsd.org) Received: (from zec@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7EN5Arc051005; Fri, 14 Aug 2009 23:05:10 GMT (envelope-from zec@svn.freebsd.org) Message-Id: <200908142305.n7EN5Arc051005@svn.freebsd.org> From: Marko Zec Date: Fri, 14 Aug 2009 23:05:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196233 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient modules... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Aug 2009 23:05:10 -0000 Author: zec Date: Fri Aug 14 23:05:10 2009 New Revision: 196233 URL: http://svn.freebsd.org/changeset/base/196233 Log: MFC r196230: Appease VNET_DEBUG - in if_vmove we temporarily switch i.e. recurse from one vnet to another which is OK, so no need to flood the console with warnings here. Approved by: re (rwatson), julian (mentor) Approved by: re (rwatson) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/net/if.c stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Fri Aug 14 23:01:21 2009 (r196232) +++ stable/8/sys/net/if.c Fri Aug 14 23:05:10 2009 (r196233) @@ -920,7 +920,7 @@ if_vmove_loan(struct thread *td, struct /* Make sure the named iface does not exists in the dst. prison/vnet. */ /* XXX Lock interfaces to avoid races. */ - CURVNET_SET(pr->pr_vnet); + CURVNET_SET_QUIET(pr->pr_vnet); difp = ifunit(ifname); CURVNET_RESTORE(); if (difp != NULL) { From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 00:04:13 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2A412106568B; Sat, 15 Aug 2009 00:04:13 +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 F07738FC3F; Sat, 15 Aug 2009 00:04:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7F04C3B052229; Sat, 15 Aug 2009 00:04:12 GMT (envelope-from qingli@svn.freebsd.org) Received: (from qingli@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7F04CxT052227; Sat, 15 Aug 2009 00:04:12 GMT (envelope-from qingli@svn.freebsd.org) Message-Id: <200908150004.n7F04CxT052227@svn.freebsd.org> From: Qing Li Date: Sat, 15 Aug 2009 00:04:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196235 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient modules... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 00:04:13 -0000 Author: qingli Date: Sat Aug 15 00:04:12 2009 New Revision: 196235 URL: http://svn.freebsd.org/changeset/base/196235 Log: MFC 196234 In function ip_output(), the cached route is flushed when there is a mismatch between the cached entry and the intended destination. The cached rtentry{} is flushed but the associated llentry{} is not. This causes the wrong destination MAC address being used in the output packets. The fix is to flush the llentry{} when rtentry{} is cleared. Reviewed by: kmacy, rwatson Approved by: re Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ip_output.c stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/ip_output.c ============================================================================== --- stable/8/sys/netinet/ip_output.c Fri Aug 14 23:44:59 2009 (r196234) +++ stable/8/sys/netinet/ip_output.c Sat Aug 15 00:04:12 2009 (r196235) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -201,9 +202,12 @@ again: if (ro->ro_rt && ((ro->ro_rt->rt_flags & RTF_UP) == 0 || dst->sin_family != AF_INET || dst->sin_addr.s_addr != ip->ip_dst.s_addr)) { - if (!nortfree) + if (!nortfree) { RTFREE(ro->ro_rt); + LLE_FREE(ro->ro_lle); + } ro->ro_rt = (struct rtentry *)NULL; + ro->ro_lle = (struct llentry *)NULL; } #ifdef IPFIREWALL_FORWARD if (ro->ro_rt == NULL && fwd_tag == NULL) { From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 11:52:41 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0ACAB106568E; Sat, 15 Aug 2009 11:52:41 +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 ECDA48FC65; Sat, 15 Aug 2009 11:52:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FBqeOL069436; Sat, 15 Aug 2009 11:52:40 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FBqeQA069432; Sat, 15 Aug 2009 11:52:40 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200908151152.n7FBqeQA069432@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 15 Aug 2009 11:52:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196243 - stable/8/share/man/man4 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 11:52:41 -0000 Author: trasz Date: Sat Aug 15 11:52:40 2009 New Revision: 196243 URL: http://svn.freebsd.org/changeset/base/196243 Log: MFC c196242: Add mptutil(8) and mfiutil(1) to 'SEE ALSO' sections in mpt(4) and mfi(4). Approved by: re (rwatson) Modified: stable/8/share/man/man4/ (props changed) stable/8/share/man/man4/mfi.4 stable/8/share/man/man4/mpt.4 Modified: stable/8/share/man/man4/mfi.4 ============================================================================== --- stable/8/share/man/man4/mfi.4 Sat Aug 15 11:47:05 2009 (r196242) +++ stable/8/share/man/man4/mfi.4 Sat Aug 15 11:52:40 2009 (r196243) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 17, 2008 +.Dd August 15, 2009 .Dt MFI 4 .Os .Sh NAME @@ -102,6 +102,7 @@ management interface An attempt was made to remove a mounted volume. .El .Sh SEE ALSO +.Xr mfiutil 1 , .Xr amr 4 , .Xr pci 4 .Sh HISTORY Modified: stable/8/share/man/man4/mpt.4 ============================================================================== --- stable/8/share/man/man4/mpt.4 Sat Aug 15 11:47:05 2009 (r196242) +++ stable/8/share/man/man4/mpt.4 Sat Aug 15 11:52:40 2009 (r196243) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 6, 2007 +.Dd August 15, 2009 .Dt MPT 4 .Os .Sh NAME @@ -155,6 +155,7 @@ can take on - no separate compilation is .Xr sa 4 , .Xr scsi 4 , .Xr targ 4 , +.Xr mptutil 8 , .Xr gmultipath 8 .Rs .%T "LSI Logic Website" From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 15:12:46 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6D7BC106568D; Sat, 15 Aug 2009 15:12:46 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B3278FC5B; Sat, 15 Aug 2009 15:12:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FFCkIa074508; Sat, 15 Aug 2009 15:12:46 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFCkPM074506; Sat, 15 Aug 2009 15:12:46 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151512.n7FFCkPM074506@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:12:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196245 - stable/8/usr.sbin/pstat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 15:12:46 -0000 Author: stas Date: Sat Aug 15 15:12:46 2009 New Revision: 196245 URL: http://svn.freebsd.org/changeset/base/196245 Log: - Merge r196244: Avoid overflowing the swap size counters in human-readable mode by introducing the new CONVERT_BLOCKS macro which operates on sizes already converted to number of blocks. With this macro it is not longer needed to perform needless multiplica Approved by: re (kib) Modified: stable/8/usr.sbin/pstat/ (props changed) stable/8/usr.sbin/pstat/pstat.c Modified: stable/8/usr.sbin/pstat/pstat.c ============================================================================== --- stable/8/usr.sbin/pstat/pstat.c Sat Aug 15 14:39:33 2009 (r196244) +++ stable/8/usr.sbin/pstat/pstat.c Sat Aug 15 15:12:46 2009 (r196245) @@ -460,6 +460,7 @@ getfiles(struct xfile **abuf, size_t *al */ #define CONVERT(v) ((int64_t)(v) * pagesize / blocksize) +#define CONVERT_BLOCKS(v) ((int64_t)(v) * pagesize) static struct kvm_swap swtot; static int nswdev; @@ -492,10 +493,10 @@ print_swap_line(const char *swdevname, i printf("%-15s %*jd ", swdevname, hlen, CONVERT(nblks)); if (humanflag) { humanize_number(usedbuf, sizeof(usedbuf), - CONVERT(blocksize * bused), "", + CONVERT_BLOCKS(bused), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); humanize_number(availbuf, sizeof(availbuf), - CONVERT(blocksize * bavail), "", + CONVERT_BLOCKS(bavail), "", HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL); printf("%8s %8s %5.0f%%\n", usedbuf, availbuf, bpercent); } else { From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 15:18:29 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E2DC7106568C; Sat, 15 Aug 2009 15:18:29 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B469F8FC67; Sat, 15 Aug 2009 15:18:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FFITtT074830; Sat, 15 Aug 2009 15:18:29 GMT (envelope-from stas@svn.freebsd.org) Received: (from stas@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FFITAG074828; Sat, 15 Aug 2009 15:18:29 GMT (envelope-from stas@svn.freebsd.org) Message-Id: <200908151518.n7FFITAG074828@svn.freebsd.org> From: Stanislav Sedov Date: Sat, 15 Aug 2009 15:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196247 - in stable/8/sys: . amd64/include/xen arm/at91 cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclien... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 15:18:30 -0000 Author: stas Date: Sat Aug 15 15:18:29 2009 New Revision: 196247 URL: http://svn.freebsd.org/changeset/base/196247 Log: - Merge r196246: Proprely intialize UART parameters at probe stage, so uart(4) will initialize the FIFO memory correctly on attach. Before that this values was intialized in only in at91_usart_bus_attach which is called after the uart(4) memory allocation happens. Approved by: re (kib) MFC after: 1 week Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/arm/at91/uart_dev_at91usart.c stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- stable/8/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:15:20 2009 (r196246) +++ stable/8/sys/arm/at91/uart_dev_at91usart.c Sat Aug 15 15:18:29 2009 (r196247) @@ -307,6 +307,10 @@ static kobj_method_t at91_usart_methods[ int at91_usart_bus_probe(struct uart_softc *sc) { + + sc->sc_txfifosz = USART_BUFFER_SIZE; + sc->sc_rxfifosz = USART_BUFFER_SIZE; + sc->sc_hwiflow = 0; return (0); } @@ -344,10 +348,6 @@ at91_usart_bus_attach(struct uart_softc atsc->flags |= HAS_TIMEOUT; WR4(&sc->sc_bas, USART_IDR, 0xffffffff); - sc->sc_txfifosz = USART_BUFFER_SIZE; - sc->sc_rxfifosz = USART_BUFFER_SIZE; - sc->sc_hwiflow = 0; - #ifndef SKYEYE_WORKAROUNDS /* * Allocate DMA tags and maps From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 16:04:37 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3422E1065695; Sat, 15 Aug 2009 16:04:37 +0000 (UTC) (envelope-from fluffy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 225CC8FC60; Sat, 15 Aug 2009 16:04:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FG4bCC076984; Sat, 15 Aug 2009 16:04:37 GMT (envelope-from fluffy@svn.freebsd.org) Received: (from fluffy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FG4bVD076982; Sat, 15 Aug 2009 16:04:37 GMT (envelope-from fluffy@svn.freebsd.org) Message-Id: <200908151604.n7FG4bVD076982@svn.freebsd.org> From: Dima Panov Date: Sat, 15 Aug 2009 16:04:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196252 - stable/8/usr.bin/calendar/calendars X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 16:04:37 -0000 Author: fluffy (ports committer) Date: Sat Aug 15 16:04:36 2009 New Revision: 196252 URL: http://svn.freebsd.org/changeset/base/196252 Log: MFC calendar.freebsd Approved by: re (rwatson) miwi (mentor) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd (contents, props changed) Modified: stable/8/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- stable/8/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 15 15:52:20 2009 (r196251) +++ stable/8/usr.bin/calendar/calendars/calendar.freebsd Sat Aug 15 16:04:36 2009 (r196252) @@ -244,6 +244,7 @@ 09/10 Wesley R. Peters born in Hartford, Alabama, United States, 1961 09/12 Weongyo Jeong born in Haman, Korea, 1980 09/12 William C. Fumerola II born in Detroit, Michigan, United States, 1981 +09/15 Dima Panov born in Khabarovsk, Russian Federation, 1978 09/17 Maxim Bolotin born in Rostov-on-Don, Russian Federation, 1976 09/20 Kevin Lo born in Taipei, Taiwan, Republic of China, 1972 09/27 Neil Blakey-Milner born in Port Elizabeth, South Africa, 1978 From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 18:03:35 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 386681065691; Sat, 15 Aug 2009 18:03:35 +0000 (UTC) (envelope-from keramida@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0D4B88FC15; Sat, 15 Aug 2009 18:03:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FI3Y6g081172; Sat, 15 Aug 2009 18:03:34 GMT (envelope-from keramida@svn.freebsd.org) Received: (from keramida@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FI3Y1N081170; Sat, 15 Aug 2009 18:03:34 GMT (envelope-from keramida@svn.freebsd.org) Message-Id: <200908151803.n7FI3Y1N081170@svn.freebsd.org> From: Giorgos Keramidas Date: Sat, 15 Aug 2009 18:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196255 - stable/8/usr.sbin/iostat X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 18:03:35 -0000 Author: keramida (doc committer) Date: Sat Aug 15 18:03:34 2009 New Revision: 196255 URL: http://svn.freebsd.org/changeset/base/196255 Log: MFC 196254 - iostat: add a bit of space between tty in/out columns The columns for tty input and output may bump against each other if the tty output needs more than 5 columns. Add a bit of space that pushes everything 1 column to the right, but also avoids the problem. Approved by: re (rwatson) Modified: stable/8/usr.sbin/iostat/ (props changed) stable/8/usr.sbin/iostat/iostat.c Modified: stable/8/usr.sbin/iostat/iostat.c ============================================================================== --- stable/8/usr.sbin/iostat/iostat.c Sat Aug 15 17:57:21 2009 (r196254) +++ stable/8/usr.sbin/iostat/iostat.c Sat Aug 15 18:03:34 2009 (r196255) @@ -586,7 +586,7 @@ main(int argc, char **argv) } if (xflag == 0 && Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); devstats(hflag, etime, havelast); @@ -674,7 +674,7 @@ phdr(void) return; if (Tflag > 0) - (void)printf(" tty"); + (void)printf(" tty"); for (i = 0, printed=0;(i < num_devices) && (printed < maxshowdevs);i++){ int di; if ((dev_select[i].selected != 0) @@ -696,7 +696,7 @@ phdr(void) (void)printf("\n"); if (Tflag > 0) - (void)printf(" tin tout"); + (void)printf(" tin tout"); for (i=0, printed = 0;(i < num_devices) && (printed < maxshowdevs);i++){ if ((dev_select[i].selected != 0) @@ -741,7 +741,7 @@ devstats(int perf_select, long double et if (xflag > 0) { printf(" extended device statistics "); if (Tflag > 0) - printf(" tty "); + printf(" tty "); if (Cflag > 0) printf(" cpu "); printf("\n"); @@ -754,7 +754,7 @@ devstats(int perf_select, long double et "device r/i w/i kr/i kw/i wait svc_t %%b " ); if (Tflag > 0) - printf("tin tout "); + printf("tin tout "); if (Cflag > 0) printf("us ni sy in id "); printf("\n"); @@ -895,7 +895,7 @@ devstats(int perf_select, long double et */ printf("%52s",""); if (Tflag > 0) - printf("%4.0Lf%5.0Lf", cur.tk_nin / etime, + printf("%4.0Lf %5.0Lf", cur.tk_nin / etime, cur.tk_nout / etime); if (Cflag > 0) cpustats(); From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 18:56:57 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3C403106568E; Sat, 15 Aug 2009 18:56:57 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 116E18FC51; Sat, 15 Aug 2009 18:56:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FIuuNp082699; Sat, 15 Aug 2009 18:56:56 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FIuusc082697; Sat, 15 Aug 2009 18:56:56 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <200908151856.n7FIuusc082697@svn.freebsd.org> From: Attilio Rao Date: Sat, 15 Aug 2009 18:56:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196257 - stable/8/sys/i386/xen X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 18:56:57 -0000 Author: attilio Date: Sat Aug 15 18:56:56 2009 New Revision: 196257 URL: http://svn.freebsd.org/changeset/base/196257 Log: MFC r196256: Fixup the Xen support in order to match newly introduced enhacements for IPIs. Approved by: re (kib) Modified: stable/8/sys/i386/xen/mp_machdep.c Modified: stable/8/sys/i386/xen/mp_machdep.c ============================================================================== --- stable/8/sys/i386/xen/mp_machdep.c Sat Aug 15 18:37:06 2009 (r196256) +++ stable/8/sys/i386/xen/mp_machdep.c Sat Aug 15 18:56:56 2009 (r196257) @@ -118,6 +118,7 @@ volatile int smp_tlb_wait; typedef void call_data_func_t(uintptr_t , uintptr_t); static u_int logical_cpus; +static volatile cpumask_t ipi_nmi_pending; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -1109,6 +1110,14 @@ ipi_selected(cpumask_t cpus, u_int ipi) ipi = IPI_BITMAP_VECTOR; } + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, cpus); + CTR3(KTR_SMP, "%s: cpus: %x ipi: %x", __func__, cpus, ipi); while ((cpu = ffs(cpus)) != 0) { cpu--; @@ -1140,10 +1149,39 @@ ipi_selected(cpumask_t cpus, u_int ipi) void ipi_all_but_self(u_int ipi) { + + /* + * IPI_STOP_HARD maps to a NMI and the trap handler needs a bit + * of help in order to understand what is the source. + * Set the mask of receiving CPUs for this purpose. + */ + if (ipi == IPI_STOP_HARD) + atomic_set_int(&ipi_nmi_pending, PCPU_GET(other_cpus)); + CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); ipi_selected(PCPU_GET(other_cpus), ipi); } +int +ipi_nmi_handler() +{ + cpumask_t cpumask; + + /* + * As long as there is not a simple way to know about a NMI's + * source, if the bitmask for the current CPU is present in + * the global pending bitword an IPI_STOP_HARD has been issued + * and should be handled. + */ + cpumask = PCPU_GET(cpumask); + if ((ipi_nmi_pending & cpumask) == 0) + return (1); + + atomic_clear_int(&ipi_nmi_pending, cpumask); + cpustop_handler(); + return (0); +} + /* * Handle an IPI_STOP by saving our current context and spinning until we * are resumed. From owner-svn-src-stable-8@FreeBSD.ORG Sat Aug 15 21:37:16 2009 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED47B106568C; Sat, 15 Aug 2009 21:37:16 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D870E8FC3D; Sat, 15 Aug 2009 21:37:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n7FLbGdh089497; Sat, 15 Aug 2009 21:37:16 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n7FLbGD6089489; Sat, 15 Aug 2009 21:37:16 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <200908152137.n7FLbGD6089489@svn.freebsd.org> From: Michael Tuexen Date: Sat, 15 Aug 2009 21:37:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r196261 - in stable/8/sys: . amd64/include/xen cddl/contrib/opensolaris contrib/dev/acpica contrib/pf dev/ata dev/cxgb dev/xen/netfront dev/xen/xenpci modules/dtrace/dtnfsclient modules... X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2009 21:37:17 -0000 Author: tuexen Date: Sat Aug 15 21:37:16 2009 New Revision: 196261 URL: http://svn.freebsd.org/changeset/base/196261 Log: MFC r196260. * Fix a bug where PR-SCTP settings are ignore when using implicit association setup. * Fix a bug where message with illegal stream ids are not deleted. * Fix a crash when reporting back unsent messages from the send_queue. * Fix a bug related to INIT retransmission when the socket is already closed. * Fix a bug where associations were stalled when partial delivery API was enabled. * Fix a bug where the receive buffer size was smaller than the partial_delivery_point. Approved by: re, rrs (mentor) Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/ata/ (props changed) stable/8/sys/dev/cxgb/ (props changed) stable/8/sys/dev/xen/netfront/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) stable/8/sys/modules/dtrace/dtnfsclient/ (props changed) stable/8/sys/modules/ip6_mroute_mod/ (props changed) stable/8/sys/modules/ipmi/ipmi_linux/ (props changed) stable/8/sys/netinet/ipfw/ip_dummynet.c (props changed) stable/8/sys/netinet/ipfw/ip_fw2.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_nat.c (props changed) stable/8/sys/netinet/ipfw/ip_fw_pfil.c (props changed) stable/8/sys/netinet/sctp_indata.c stable/8/sys/netinet/sctp_input.c stable/8/sys/netinet/sctp_output.c stable/8/sys/netinet/sctp_pcb.c stable/8/sys/netinet/sctp_timer.c stable/8/sys/netinet/sctputil.c stable/8/sys/netinet/sctputil.h stable/8/sys/netipx/spx_reass.c (props changed) stable/8/sys/xen/evtchn.h (props changed) stable/8/sys/xen/hypervisor.h (props changed) stable/8/sys/xen/xen_intr.h (props changed) Modified: stable/8/sys/netinet/sctp_indata.c ============================================================================== --- stable/8/sys/netinet/sctp_indata.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_indata.c Sat Aug 15 21:37:16 2009 (r196261) @@ -900,7 +900,7 @@ sctp_deliver_reasm_check(struct sctp_tcb { struct sctp_tmit_chunk *chk; uint16_t nxt_todel; - uint32_t tsize; + uint32_t tsize, pd_point; doit_again: chk = TAILQ_FIRST(&asoc->reasmqueue); @@ -920,8 +920,13 @@ doit_again: * Yep the first one is here and its ok to deliver * but should we? */ - if ((sctp_is_all_msg_on_reasm(asoc, &tsize) || - (tsize >= stcb->sctp_ep->partial_delivery_point))) { + if (stcb->sctp_socket) { + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, + stcb->sctp_ep->partial_delivery_point); + } else { + pd_point = stcb->sctp_ep->partial_delivery_point; + } + if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { /* * Yes, we setup to start reception, by @@ -2824,7 +2829,7 @@ void sctp_service_queues(struct sctp_tcb *stcb, struct sctp_association *asoc) { struct sctp_tmit_chunk *chk; - uint32_t tsize; + uint32_t tsize, pd_point; uint16_t nxt_todel; if (asoc->fragmented_delivery_inprogress) { @@ -2860,8 +2865,13 @@ doit_again: * be here or 1/4 the socket buffer max or nothing on the * delivery queue and something can be delivered. */ - if ((sctp_is_all_msg_on_reasm(asoc, &tsize) || - (tsize >= stcb->sctp_ep->partial_delivery_point))) { + if (stcb->sctp_socket) { + pd_point = min(SCTP_SB_LIMIT_RCV(stcb->sctp_socket) >> SCTP_PARTIAL_DELIVERY_SHIFT, + stcb->sctp_ep->partial_delivery_point); + } else { + pd_point = stcb->sctp_ep->partial_delivery_point; + } + if (sctp_is_all_msg_on_reasm(asoc, &tsize) || (tsize >= pd_point)) { asoc->fragmented_delivery_inprogress = 1; asoc->tsn_last_delivered = chk->rec.data.TSN_seq - 1; asoc->str_of_pdapi = chk->rec.data.stream_number; @@ -5192,7 +5202,7 @@ skip_segments: /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); - if (PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -6289,10 +6299,11 @@ sctp_handle_forward_tsn(struct sctp_tcb ctl->pdapi_aborted = 1; sv = stcb->asoc.control_pdapi; stcb->asoc.control_pdapi = ctl; - sctp_notify_partial_delivery_indication(stcb, + sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, + stcb, SCTP_PARTIAL_DELIVERY_ABORTED, - SCTP_HOLDS_LOCK, - str_seq); + (void *)&str_seq, + SCTP_SO_NOT_LOCKED); stcb->asoc.control_pdapi = sv; break; } else if ((ctl->sinfo_stream == stseq->stream) && @@ -7786,7 +7797,7 @@ skip_segments: /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, tp1, 1); sctp_m_freem(tp1->data); - if (PR_SCTP_BUF_ENABLED(tp1->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(tp1->flags)) { asoc->sent_queue_cnt_removeable--; } } Modified: stable/8/sys/netinet/sctp_input.c ============================================================================== --- stable/8/sys/netinet/sctp_input.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_input.c Sat Aug 15 21:37:16 2009 (r196261) @@ -278,18 +278,38 @@ sctp_process_init(struct sctp_init_chunk unsigned int newcnt; struct sctp_stream_out *outs; struct sctp_stream_queue_pending *sp; + struct sctp_tmit_chunk *chk, *chk_next; - /* cut back on number of streams */ + /* abandon the upper streams */ newcnt = ntohs(init->num_inbound_streams); - /* This if is probably not needed but I am cautious */ + if (!TAILQ_EMPTY(&asoc->send_queue)) { + chk = TAILQ_FIRST(&asoc->send_queue); + while (chk) { + chk_next = TAILQ_NEXT(chk, sctp_next); + if (chk->rec.data.stream_number >= newcnt) { + TAILQ_REMOVE(&asoc->send_queue, chk, sctp_next); + asoc->send_queue_cnt--; + if (chk->data != NULL) { + sctp_free_bufspace(stcb, asoc, chk, 1); + sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, + SCTP_NOTIFY_DATAGRAM_UNSENT, chk, SCTP_SO_NOT_LOCKED); + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } + } + sctp_free_a_chunk(stcb, chk); + /* sa_ignore FREED_MEMORY */ + } + chk = chk_next; + } + } if (asoc->strmout) { - /* First make sure no data chunks are trapped */ for (i = newcnt; i < asoc->pre_open_streams; i++) { outs = &asoc->strmout[i]; sp = TAILQ_FIRST(&outs->outqueue); while (sp) { - TAILQ_REMOVE(&outs->outqueue, sp, - next); + TAILQ_REMOVE(&outs->outqueue, sp, next); asoc->stream_queue_cnt--; sctp_ulp_notify(SCTP_NOTIFY_SPECIAL_SP_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, @@ -301,16 +321,13 @@ sctp_process_init(struct sctp_init_chunk sctp_free_remote_addr(sp->net); sp->net = NULL; /* Free the chunk */ - SCTP_PRINTF("sp:%p tcb:%p weird free case\n", - sp, stcb); - sctp_free_a_strmoq(stcb, sp); /* sa_ignore FREED_MEMORY */ sp = TAILQ_FIRST(&outs->outqueue); } } } - /* cut back the count and abandon the upper streams */ + /* cut back the count */ asoc->pre_open_streams = newcnt; } SCTP_TCB_SEND_UNLOCK(stcb); Modified: stable/8/sys/netinet/sctp_output.c ============================================================================== --- stable/8/sys/netinet/sctp_output.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_output.c Sat Aug 15 21:37:16 2009 (r196261) @@ -4200,7 +4200,7 @@ sctp_send_initiate(struct sctp_inpcb *in /* place in my tag */ init->init.initiate_tag = htonl(stcb->asoc.my_vtag); /* set up some of the credits. */ - init->init.a_rwnd = htonl(max(SCTP_SB_LIMIT_RCV(inp->sctp_socket), + init->init.a_rwnd = htonl(max(inp->sctp_socket ? SCTP_SB_LIMIT_RCV(inp->sctp_socket) : 0, SCTP_MINIMAL_RWND)); init->init.num_outbound_streams = htons(stcb->asoc.pre_open_streams); @@ -4411,7 +4411,6 @@ sctp_send_initiate(struct sctp_inpcb *in net->port, so_locked, NULL); SCTPDBG(SCTP_DEBUG_OUTPUT4, "lowlevel_output - %d\n", ret); SCTP_STAT_INCR_COUNTER64(sctps_outcontrolchunks); - sctp_timer_start(SCTP_TIMER_TYPE_INIT, inp, stcb, net); (void)SCTP_GETTIME_TIMEVAL(&net->last_sent_time); } @@ -5786,61 +5785,58 @@ sctp_get_frag_point(struct sctp_tcb *stc } static void -sctp_set_prsctp_policy(struct sctp_tcb *stcb, - struct sctp_stream_queue_pending *sp) +sctp_set_prsctp_policy(struct sctp_stream_queue_pending *sp) { sp->pr_sctp_on = 0; - if (stcb->asoc.peer_supports_prsctp) { + /* + * We assume that the user wants PR_SCTP_TTL if the user provides a + * positive lifetime but does not specify any PR_SCTP policy. This + * is a BAD assumption and causes problems at least with the + * U-Vancovers MPI folks. I will change this to be no policy means + * NO PR-SCTP. + */ + if (PR_SCTP_ENABLED(sp->sinfo_flags)) { + sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); + sp->pr_sctp_on = 1; + } else { + return; + } + switch (PR_SCTP_POLICY(sp->sinfo_flags)) { + case CHUNK_FLAGS_PR_SCTP_BUF: /* - * We assume that the user wants PR_SCTP_TTL if the user - * provides a positive lifetime but does not specify any - * PR_SCTP policy. This is a BAD assumption and causes - * problems at least with the U-Vancovers MPI folks. I will - * change this to be no policy means NO PR-SCTP. - */ - if (PR_SCTP_ENABLED(sp->sinfo_flags)) { - sp->act_flags |= PR_SCTP_POLICY(sp->sinfo_flags); - sp->pr_sctp_on = 1; - } else { - return; - } - switch (PR_SCTP_POLICY(sp->sinfo_flags)) { - case CHUNK_FLAGS_PR_SCTP_BUF: - /* - * Time to live is a priority stored in tv_sec when - * doing the buffer drop thing. - */ - sp->ts.tv_sec = sp->timetolive; - sp->ts.tv_usec = 0; - break; - case CHUNK_FLAGS_PR_SCTP_TTL: - { - struct timeval tv; - - (void)SCTP_GETTIME_TIMEVAL(&sp->ts); - tv.tv_sec = sp->timetolive / 1000; - tv.tv_usec = (sp->timetolive * 1000) % 1000000; - /* - * TODO sctp_constants.h needs alternative - * time macros when _KERNEL is undefined. - */ - timevaladd(&sp->ts, &tv); - } - break; - case CHUNK_FLAGS_PR_SCTP_RTX: + * Time to live is a priority stored in tv_sec when doing + * the buffer drop thing. + */ + sp->ts.tv_sec = sp->timetolive; + sp->ts.tv_usec = 0; + break; + case CHUNK_FLAGS_PR_SCTP_TTL: + { + struct timeval tv; + + (void)SCTP_GETTIME_TIMEVAL(&sp->ts); + tv.tv_sec = sp->timetolive / 1000; + tv.tv_usec = (sp->timetolive * 1000) % 1000000; /* - * Time to live is a the number or retransmissions - * stored in tv_sec. + * TODO sctp_constants.h needs alternative time + * macros when _KERNEL is undefined. */ - sp->ts.tv_sec = sp->timetolive; - sp->ts.tv_usec = 0; - break; - default: - SCTPDBG(SCTP_DEBUG_USRREQ1, - "Unknown PR_SCTP policy %u.\n", - PR_SCTP_POLICY(sp->sinfo_flags)); - break; + timevaladd(&sp->ts, &tv); } + break; + case CHUNK_FLAGS_PR_SCTP_RTX: + /* + * Time to live is a the number or retransmissions stored in + * tv_sec. + */ + sp->ts.tv_sec = sp->timetolive; + sp->ts.tv_usec = 0; + break; + default: + SCTPDBG(SCTP_DEBUG_USRREQ1, + "Unknown PR_SCTP policy %u.\n", + PR_SCTP_POLICY(sp->sinfo_flags)); + break; } } @@ -5911,7 +5907,7 @@ sctp_msg_append(struct sctp_tcb *stcb, sp->tail_mbuf = NULL; sp->length = 0; at = m; - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); /* * We could in theory (for sendall) sifa the length in, but we would * still have to hunt through the chain since we need to setup the @@ -7138,7 +7134,7 @@ dont_do_it: } /* We only re-set the policy if it is on */ if (sp->pr_sctp_on) { - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); asoc->pr_sctp_cnt++; chk->pr_sctp_on = 1; } else { @@ -12285,7 +12281,7 @@ skip_copy: sp->addr_over = 0; } atomic_add_int(&sp->net->ref_count, 1); - sctp_set_prsctp_policy(stcb, sp); + sctp_set_prsctp_policy(sp); } out_now: return (sp); Modified: stable/8/sys/netinet/sctp_pcb.c ============================================================================== --- stable/8/sys/netinet/sctp_pcb.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_pcb.c Sat Aug 15 21:37:16 2009 (r196261) @@ -4547,8 +4547,11 @@ sctp_free_assoc(struct sctp_inpcb *inp, stcb->asoc.control_pdapi = sq; strseq = (sq->sinfo_stream << 16) | sq->sinfo_ssn; - sctp_notify_partial_delivery_indication(stcb, - SCTP_PARTIAL_DELIVERY_ABORTED, 1, strseq); + sctp_ulp_notify(SCTP_NOTIFY_PARTIAL_DELVIERY_INDICATION, + stcb, + SCTP_PARTIAL_DELIVERY_ABORTED, + (void *)&strseq, + SCTP_SO_LOCKED); stcb->asoc.control_pdapi = NULL; } } Modified: stable/8/sys/netinet/sctp_timer.c ============================================================================== --- stable/8/sys/netinet/sctp_timer.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctp_timer.c Sat Aug 15 21:37:16 2009 (r196261) @@ -588,7 +588,7 @@ sctp_recover_sent_list(struct sctp_tcb * /* sa_ignore NO_NULL_CHK */ sctp_free_bufspace(stcb, asoc, chk, 1); sctp_m_freem(chk->data); - if (PR_SCTP_BUF_ENABLED(chk->flags)) { + if (asoc->peer_supports_prsctp && PR_SCTP_BUF_ENABLED(chk->flags)) { asoc->sent_queue_cnt_removeable--; } } @@ -757,7 +757,7 @@ start_again: continue; } } - if (PR_SCTP_TTL_ENABLED(chk->flags)) { + if (stcb->asoc.peer_supports_prsctp && PR_SCTP_TTL_ENABLED(chk->flags)) { /* Is it expired? */ if ((now.tv_sec > chk->rec.data.timetodrop.tv_sec) || ((chk->rec.data.timetodrop.tv_sec == now.tv_sec) && @@ -772,7 +772,7 @@ start_again: continue; } } - if (PR_SCTP_RTX_ENABLED(chk->flags)) { + if (stcb->asoc.peer_supports_prsctp && PR_SCTP_RTX_ENABLED(chk->flags)) { /* Has it been retransmitted tv_sec times? */ if (chk->snd_count > chk->rec.data.timetodrop.tv_sec) { if (chk->data) { Modified: stable/8/sys/netinet/sctputil.c ============================================================================== --- stable/8/sys/netinet/sctputil.c Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctputil.c Sat Aug 15 21:37:16 2009 (r196261) @@ -1484,6 +1484,7 @@ sctp_timeout_handler(void *t) SCTP_INP_INCR_REF(inp); if ((inp->sctp_socket == 0) && ((tmr->type != SCTP_TIMER_TYPE_INPKILL) && + (tmr->type != SCTP_TIMER_TYPE_INIT) && (tmr->type != SCTP_TIMER_TYPE_SEND) && (tmr->type != SCTP_TIMER_TYPE_RECV) && (tmr->type != SCTP_TIMER_TYPE_HEARTBEAT) && @@ -2984,8 +2985,6 @@ sctp_notify_send_failed(struct sctp_tcb ssf->ssf_info.sinfo_assoc_id = sctp_get_associd(stcb); ssf->ssf_assoc_id = sctp_get_associd(stcb); - SCTP_BUF_NEXT(m_notify) = chk->data; - SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); if (chk->data) { /* * trim off the sctp chunk header(it should be there) @@ -2996,6 +2995,8 @@ sctp_notify_send_failed(struct sctp_tcb chk->send_size -= sizeof(struct sctp_data_chunk); } } + SCTP_BUF_NEXT(m_notify) = chk->data; + SCTP_BUF_LEN(m_notify) = sizeof(struct sctp_send_failed); /* Steal off the mbuf */ chk->data = NULL; /* @@ -3146,9 +3147,13 @@ sctp_notify_adaptation_layer(struct sctp } /* This always must be called with the read-queue LOCKED in the INP */ -void +static void sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, uint32_t error, - int nolock, uint32_t val) + uint32_t val, int so_locked +#if !defined(__APPLE__) && !defined(SCTP_SO_LOCK_TESTING) + SCTP_UNUSED +#endif +) { struct mbuf *m_notify; struct sctp_pdapi_event *pdapi; @@ -3189,9 +3194,6 @@ sctp_notify_partial_delivery_indication( control->tail_mbuf = m_notify; control->held_length = 0; control->length = 0; - if (nolock == 0) { - SCTP_INP_READ_LOCK(stcb->sctp_ep); - } sb = &stcb->sctp_socket->so_rcv; if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_SB_LOGGING_ENABLE) { sctp_sblog(sb, control->do_not_ref_stcb ? NULL : stcb, SCTP_LOG_SBALLOC, SCTP_BUF_LEN(m_notify)); @@ -3208,12 +3210,30 @@ sctp_notify_partial_delivery_indication( /* we really should not see this case */ TAILQ_INSERT_TAIL(&stcb->sctp_ep->read_queue, control, next); } - if (nolock == 0) { - SCTP_INP_READ_UNLOCK(stcb->sctp_ep); - } if (stcb->sctp_ep && stcb->sctp_socket) { /* This should always be the case */ +#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + struct socket *so; + + so = SCTP_INP_SO(stcb->sctp_ep); + if (!so_locked) { + atomic_add_int(&stcb->asoc.refcnt, 1); + SCTP_TCB_UNLOCK(stcb); + SCTP_SOCKET_LOCK(so, 1); + SCTP_TCB_LOCK(stcb); + atomic_subtract_int(&stcb->asoc.refcnt, 1); + if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_SOCKET_GONE) { + SCTP_SOCKET_UNLOCK(so, 1); + return; + } + } +#endif sctp_sorwakeup(stcb->sctp_ep, stcb->sctp_socket); +#if defined (__APPLE__) || defined(SCTP_SO_LOCK_TESTING) + if (!so_locked) { + SCTP_SOCKET_UNLOCK(so, 1); + } +#endif } } @@ -3540,9 +3560,9 @@ sctp_ulp_notify(uint32_t notification, s val = *((uint32_t *) data); - sctp_notify_partial_delivery_indication(stcb, error, 0, val); + sctp_notify_partial_delivery_indication(stcb, error, val, so_locked); + break; } - break; case SCTP_NOTIFY_STRDATA_ERR: break; case SCTP_NOTIFY_ASSOC_ABORTED: @@ -3585,11 +3605,9 @@ sctp_ulp_notify(uint32_t notification, s case SCTP_NOTIFY_STR_RESET_FAILED_OUT: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), (SCTP_STRRESET_OUTBOUND_STR | SCTP_STRRESET_FAILED)); break; - case SCTP_NOTIFY_STR_RESET_FAILED_IN: sctp_notify_stream_reset(stcb, error, ((uint16_t *) data), (SCTP_STRRESET_INBOUND_STR | SCTP_STRRESET_FAILED)); break; - case SCTP_NOTIFY_ASCONF_ADD_IP: sctp_notify_peer_addr_change(stcb, SCTP_ADDR_ADDED, data, error); @@ -3671,8 +3689,10 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_SENT, chk, so_locked); - sctp_m_freem(chk->data); - chk->data = NULL; + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ @@ -3689,8 +3709,10 @@ sctp_report_all_outbound(struct sctp_tcb sctp_free_bufspace(stcb, asoc, chk, 1); sctp_ulp_notify(SCTP_NOTIFY_DG_FAIL, stcb, SCTP_NOTIFY_DATAGRAM_UNSENT, chk, so_locked); - sctp_m_freem(chk->data); - chk->data = NULL; + if (chk->data) { + sctp_m_freem(chk->data); + chk->data = NULL; + } } sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ @@ -5346,6 +5368,38 @@ restart_nosblocks: } goto restart; } + if ((control->length == 0) && + (control->end_added == 1)) { + /* + * Do we also need to check for (control->pdapi_aborted == + * 1)? + */ + if (hold_rlock == 0) { + hold_rlock = 1; + SCTP_INP_READ_LOCK(inp); + } + TAILQ_REMOVE(&inp->read_queue, control, next); + if (control->data) { +#ifdef INVARIANTS + panic("control->data not null but control->length == 0"); +#else + SCTP_PRINTF("Strange, data left in the control buffer. Cleaning up.\n"); + sctp_m_freem(control->data); + control->data = NULL; +#endif + } + if (control->aux_data) { + sctp_m_free(control->aux_data); + control->aux_data = NULL; + } + sctp_free_remote_addr(control->whoFrom); + sctp_free_a_readq(stcb, control); + if (hold_rlock) { + hold_rlock = 0; + SCTP_INP_READ_UNLOCK(inp); + } + goto restart; + } if (control->length == 0) { if ((sctp_is_feature_on(inp, SCTP_PCB_FLAGS_FRAG_INTERLEAVE)) && (filling_sinfo)) { Modified: stable/8/sys/netinet/sctputil.h ============================================================================== --- stable/8/sys/netinet/sctputil.h Sat Aug 15 21:10:52 2009 (r196260) +++ stable/8/sys/netinet/sctputil.h Sat Aug 15 21:37:16 2009 (r196261) @@ -234,10 +234,6 @@ int sctp_cmpaddr(struct sockaddr *, stru void sctp_print_address(struct sockaddr *); void sctp_print_address_pkt(struct ip *, struct sctphdr *); -void -sctp_notify_partial_delivery_indication(struct sctp_tcb *stcb, - uint32_t error, int no_lock, uint32_t strseq); - int sctp_release_pr_sctp_chunk(struct sctp_tcb *, struct sctp_tmit_chunk *, int, int