]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/log
FreeBSD/stable/8.git
12 years agoMFC r230512: sockstat: Also show sockets not associated with a descriptor.
jilles [Wed, 15 Feb 2012 22:35:30 +0000 (22:35 +0000)]
MFC r230512: sockstat: Also show sockets not associated with a descriptor.

Sockets not associated with a file descriptor include TCP TIME_WAIT states
and sockets created via the socket(9) API such as from rpc.lockd and the NFS
client.

PR: bin/164081

git-svn-id: svn://svn.freebsd.org/base/stable/8@231789 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229363
alc [Wed, 15 Feb 2012 18:18:29 +0000 (18:18 +0000)]
MFC r229363
  Don't pass VM_ALLOC_ZERO to vm_page_grab() in tmpfs_mappedwrite() and
  tmpfs_nocacheread().  It is both unnecessary and a pessimization.  It
  results in either the page being zeroed twice or zeroed first and then
  overwritten by an I/O operation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231776 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218949
alc [Wed, 15 Feb 2012 18:07:24 +0000 (18:07 +0000)]
MFC r218949
  Eliminate two dubious attempts at optimizing the implementation of a
  file's last accessed, modified, and changed times.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231774 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoPartial merge of r218345:
alc [Wed, 15 Feb 2012 17:09:26 +0000 (17:09 +0000)]
Partial merge of r218345:
  Unless "cnt" exceeded MAX_COMMIT_COUNT, nfsrv_commit() and nfsvno_fsync()
  were incorrectly calling vm_object_page_clean().  They were passing the
  length of the range rather than the ending offset of the range.

Reviewed by: kib

git-svn-id: svn://svn.freebsd.org/base/stable/8@231771 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231505,231520:
bz [Wed, 15 Feb 2012 16:58:08 +0000 (16:58 +0000)]
MFC r231505,231520:

 Introduce a new NET_RT_IFLISTL API to query the address list.  It works
 on extended and extensible structs if_msghdrl and ifa_msghdrl.  This
 will allow us to extend both the msghdrl structs and eventually if_data
 in the future without breaking the ABI.

 The MFC is just to provide the new API to old stable branches to make
 updating and if needed downgrading a lot easier for updates to 10.

 Bump __FreeBSD_version to allow ports to more easily detect the new API.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231769 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231762:
mav [Wed, 15 Feb 2012 14:31:45 +0000 (14:31 +0000)]
MFC r231762:
Do not handle MOD_SHUTDOWN equally to MOD_UNLOAD in sound kernel module.
MOD_SHUTDOWN is not an end of existence, and there is a life after it.
In particular, code previously called on MOD_SHUTDOWN grabbed lock and
deallocated unit numbering. That caused infinite wait loop if snd_uaudio
tried to destroy its PCM device after that point.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231763 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r215818, r216405, r216437, r216448, r216956, r221827, r222975, r223059,
ken [Wed, 15 Feb 2012 14:23:01 +0000 (14:23 +0000)]
MFC r215818, r216405, r216437, r216448, r216956, r221827, r222975, r223059,
r225343, r225704, r225705, r225706, r225707, r225709, r226029, r220647,
r230183, r230587, r230916, r228526, r230879:

Bring Xen support in stable/8 up to parity with head.  Almost all
outstanding Xen support differences between head and stable/8 are included,
except for the just added r231743.

  r215818 | cperciva | 2010-11-25 08:05:21 -0700 (Thu, 25 Nov 2010) | 5 lines

  Rename HYPERVISOR_multicall (which performs the multicall hypercall) to
  _HYPERVISOR_multicall, and create a new HYPERVISOR_multicall function which
  invokes _HYPERVISOR_multicall and checks that the individual hypercalls all
  succeeded.

  r216405 | rwatson | 2010-12-13 05:15:46 -0700 (Mon, 13 Dec 2010) | 7 lines

  Add options NO_ADAPTIVE_SX to the XENHVM kernel configuration, matching
  its similar disabling of adaptive mutexes and rwlocks.  The existing
  comment on why this is the case also applies to sx locks.

  MFC after: 3 days
  Discussed with: attilio

  r216437 | gibbs | 2010-12-14 10:23:49 -0700 (Tue, 14 Dec 2010) | 2 lines

  Remove spurious printf left over from debugging our XenStore support.

  r216448 | gibbs | 2010-12-14 13:57:40 -0700 (Tue, 14 Dec 2010) | 4 lines

  Fix a typo in a comment.

  Noticed by: Attila Nagy <bra@fsn.hu>

  r216956 | rwatson | 2011-01-04 07:49:54 -0700 (Tue, 04 Jan 2011) | 8 lines

  Make "options XENHVM" compile for i386, not just amd64 -- a largely
  mechanical change.  This opens the door for using PV device drivers
  under Xen HVM on i386, as well as more general harmonisation of i386
  and amd64 Xen support in FreeBSD.

  Reviewed by: cperciva
  MFC after: 3 weeks

  r221827 | mav | 2011-05-12 21:40:16 -0600 (Thu, 12 May 2011) | 2 lines

  Fix msleep() usage in Xen balloon driver to not wake up on every HZ tick.

  r222975 | gibbs | 2011-06-10 22:59:01 -0600 (Fri, 10 Jun 2011) | 63 lines

  Monitor and emit events for XenStore changes to XenBus trees
  of the devices we manage.  These changes can be due to writes
  we make ourselves or due to changes made by the control domain.
  The goal of these changes is to insure that all state transitions
  can be detected regardless of their source and to allow common
  device policies (e.g. "onlined" backend devices) to be centralized
  in the XenBus bus code.

  sys/xen/xenbus/xenbusvar.h:
  sys/xen/xenbus/xenbus.c:
  sys/xen/xenbus/xenbus_if.m:
   Add a new method for XenBus drivers "localend_changed".
   This method is invoked whenever a write is detected to
   a device's XenBus tree.  The default implementation of
   this method is a no-op.

  sys/xen/xenbus/xenbus_if.m:
  sys/dev/xen/netfront/netfront.c:
  sys/dev/xen/blkfront/blkfront.c:
  sys/dev/xen/blkback/blkback.c:
   Change the signature of the "otherend_changed" method.
   This notification cannot fail, so it should return void.

  sys/xen/xenbus/xenbusb_back.c:
   Add "online" device handling to the XenBus Back Bus
   support code.  An online backend device remains active
   after a front-end detaches as a reconnect is expected
   to occur in the near future.

  sys/xen/interface/io/xenbus.h:
   Add comment block further explaining the meaning and
   driver responsibilities associated with the XenBus
   Closed state.

  sys/xen/xenbus/xenbusb.c:
  sys/xen/xenbus/xenbusb.h:
  sys/xen/xenbus/xenbusb_back.c:
  sys/xen/xenbus/xenbusb_front.c:
  sys/xen/xenbus/xenbusb_if.m:
   o Register a XenStore watch against the local XenBus tree
     for all devices.
   o Cache the string length of the path to our local tree.
   o Allow the xenbus front and back drivers to hook/filter both
     local and otherend watch processing.
   o Update the device ivar version of "state" when we detect
     a XenStore update of that node.

  sys/dev/xen/control/control.c:
  sys/xen/xenbus/xenbus.c:
  sys/xen/xenbus/xenbusb.c:
  sys/xen/xenbus/xenbusb.h:
  sys/xen/xenbus/xenbusvar.h:
  sys/xen/xenstore/xenstorevar.h:
   Allow clients of the XenStore watch mechanism to attach
   a single uintptr_t worth of client data to the watch.
   This removes the need to carefully place client watch
   data within enclosing objects so that a cast or offsetof
   calculation can be used to convert from watch to enclosing
   object.

  Sponsored by: Spectra Logic Corporation
  MFC after: 1 week

  r223059 | gibbs | 2011-06-13 14:36:29 -0600 (Mon, 13 Jun 2011) | 36 lines

  Several enhancements to the Xen block back driver.

  sys/dev/xen/blkback/blkback.c:
   o Implement front-end request coalescing.  This greatly improves the
     performance of front-end clients that are unaware of the dynamic
     request-size/number of requests negotiation available in the
     FreeBSD backend driver.  This required a large restructuring
     in how this driver records in-flight transactions and how those
     transactions are mapped into kernel KVA.  For example, the driver
     now includes a mini "KVA manager" that allocates ranges of
     contiguous KVA to patches of requests that are physically
     contiguous in the backing store so that a single bio or UIO
     segment can be used to represent the I/O.

   o Refuse to open any backend files or devices if the system
     has yet to mount root.  This avoids a panic.

   o Properly handle "onlined" devices.  An "onlined" backend
     device stays attached to its backing store across front-end
     disconnections.  This feature is intended to reduce latency
     when a front-end does a hand-off to another driver (e.g.
     PV aware bootloader to OS kernel) or during a VM reboot.

   o Harden the driver against a pathological/buggy front-end
     by carefully vetting front-end XenStore data such as the
     front-end state.

   o Add sysctls that report the negotiated number of
     segments per-request and the number of requests that
     can be concurrently in flight.

  Submitted by: kdm
  Reviewed by: gibbs
  Sponsored by: Spectra Logic Corporation
  MFC after: 1 week

  r225343 | rwatson | 2011-09-02 11:36:01 -0600 (Fri, 02 Sep 2011) | 7 lines

  Add support for alternative break-to-debugger support on the Xen console.
  This should help debug boot-time hangs experienced in 9.0-BETA.

  MFC after: 3 weeks
  Tested by: sbruno
  Approved by: re (kib)

  r225704 | gibbs | 2011-09-20 17:44:34 -0600 (Tue, 20 Sep 2011) | 29 lines

  Properly handle suspend/resume events in the Xen device framework.

  Sponsored by: BQ Internet

  sys/xen/xenbus/xenbusb.c:
   o In xenbusb_resume(), publish the state transition of the
     resuming device into XenbusStateIntiailising so that the
     remote peer can see it.  Recording the state locally is
     not sufficient to trigger a re-connect sequence.
   o In xenbusb_resume(), defer new-bus resume processing until
     after the remote peer's XenStore address has been updated.
     The drivers may need to refer to this information during
     resume processing.

  sys/xen/xenbus/xenbusb_back.c:
  sys/xen/xenbus/xenbusb_front.c:
   Register xenbusb_resume() rather than bus_generic_resume()
   as the handler for device_resume events.

  sys/xen/xenstore/xenstore.c:
   o Fix grammer in a comment.
   o In xs_suspend(), pass suspend events on to the child
     devices (e.g. xenbusb_front/back, that are attached
     to the XenStore.

  Approved by: re
  MFC after: 1 week

  r225705 | gibbs | 2011-09-20 18:02:44 -0600 (Tue, 20 Sep 2011) | 35 lines

  Add suspend/resume support to the Xen blkfront driver.

  Sponsored by: BQ Internet

  sys/dev/xen/blkfront/block.h:
  sys/dev/xen/blkfront/blkfront.c:
   Remove now unused blkif_vdev_t from the blkfront soft.

  sys/dev/xen/blkfront/blkfront.c:
   o In blkfront_suspend(), indicate the desire to suspend
     by changing the softc connected state to SUSPENDED, and
     then wait for any I/O pending on the remote peer to
     drain.  Cancel suspend processing if I/O does not
     drain within 30 seconds.
   o Enable and update blkfront_resume().  Since I/O is
     drained prior to the suspension of the VM, the complicated
     recovery process performed by other Xen blkfront
     implementations is avoided.  We simply tear down the
     connection to our old peer, and then re-connect.
   o In blkif_initialize(), fix a resource leak and botched
     return if we cannot allocate shadow memory for our
     requests.
   o In blkfront_backend_changed(), correct our response to
     the XenbusStateInitialised state.  This state indicates
     that our backend peer has published sufficient data for
     blkfront to publish ring information and other XenStore
     data, not that a connection can occur.  Blkfront now
     will only perform connection processing in response to
     the XenbusStateConnected state.  This corrects an issue
     where blkfront connected before the backend was ready
     during resume processing.

  Approved by: re
  MFC after: 1 week

  r225706 | gibbs | 2011-09-20 18:06:02 -0600 (Tue, 20 Sep 2011) | 11 lines

  [ Forced commit.  Actual changes accidentally included in r225704 ]

  sys/dev/xen/control/control.c:
   Fix locking violations in Xen HVM suspend processing
   and have it perform similar actions to those performed
   during an ACPI triggered suspend.

  Sponsored by: BQ Internet
  Approved by: re
  MFC after: 1 week

  r225707 | gibbs | 2011-09-20 18:08:25 -0600 (Tue, 20 Sep 2011) | 21 lines

  Correct suspend/resume support in the Netfront driver.

  Sponsored by: BQ Internet

  sys/dev/xen/netfront/netfront.c:
   o Implement netfront_suspend(), a specialized suspend
     handler for the netfront driver.  This routine simply
     disables the carrier so the driver is idle during
     system suspend processing.
   o Fix a leak when re-initializing LRO during a link reset.
   o In netif_release_tx_bufs(), when cleaning up the grant
     references for our TX ring, use gnttab_end_foreign_access_ref
     instead of attempting to grant the page again.
   o In netif_release_tx_bufs(), we do not track mbufs associated
     with mbuf chains, but instead just free each mbuf directly.
     Use m_free(), not m_freem(), to avoid double frees of mbufs.
   o Refactor some code to enhance clarity.

  Approved by: re
  MFC after: 1 week

  r225709 | gibbs | 2011-09-20 18:15:29 -0600 (Tue, 20 Sep 2011) | 19 lines

  Update netfront so that it queries and honors published
  back-end features.

  sys/dev/xen/netfront/netfront.c:
   o Add xn_query_features() which reads the XenStore and
     records the TSO, LRO, and chained ring-request support
     of the backend.
   o Rename xn_configure_lro() to xn_configure_features() and
     use this routine to manage the setup of TSO, LRO, and
     checksum offload.
   o In create_netdev(), initialize if_capabilities and
     if_hwassist to the capabilities found on all backends.
     Delegate configuration of if_capenable and the TSO flag
     if if_hwassist to xn_configure_features().

  Reported by: Hugo Silva (fix inspired by patch provided)
  Approved by: re
  MFC after: 1 week

  r226029 | jkim | 2011-10-04 17:53:47 -0600 (Tue, 04 Oct 2011) | 2 lines

  Add strnlen() to libkern.

  r220647 | jkim | 2011-04-14 16:17:39 -0600 (Thu, 14 Apr 2011) | 4 lines

  Add event handlers for (ACPI) suspend/resume events.  Suspend event handlers
  are invoked right before device drivers go into sleep state and resume event
  handlers are invoked right after all device drivers are waken up.

  r230183 | cperciva | 2012-01-15 19:38:45 -0700 (Sun, 15 Jan 2012) | 3 lines

  Make XENHVM work on i386.  The __ffs() function counts bits starting from
  zero, unlike ffs(3), which starts counting from 1.

  r230587 | ken | 2012-01-26 09:35:09 -0700 (Thu, 26 Jan 2012) | 38 lines

  Xen netback driver rewrite.

  share/man/man4/Makefile,
  share/man/man4/xnb.4,
  sys/dev/xen/netback/netback.c,
  sys/dev/xen/netback/netback_unit_tests.c:

   Rewrote the netback driver for xen to attach properly via newbus
   and work properly in both HVM and PVM mode (only HVM is tested).
   Works with the in-tree FreeBSD netfront driver or the Windows
   netfront driver from SuSE.  Has not been extensively tested with
   a Linux netfront driver.  Does not implement LRO, TSO, or
   polling.  Includes unit tests that may be run through sysctl
   after compiling with XNB_DEBUG defined.

  sys/dev/xen/blkback/blkback.c,
  sys/xen/interface/io/netif.h:

   Comment elaboration.

  sys/kern/uipc_mbuf.c:

   Fix page fault in kernel mode when calling m_print() on a
   null mbuf.  Since m_print() is only used for debugging, there
   are no performance concerns for extra error checking code.

  sys/kern/subr_scanf.c:

   Add the "hh" and "ll" width specifiers from C99 to scanf().
   A few callers were already using "ll" even though scanf()
   was handling it as "l".

  Submitted by: Alan Somers <alans@spectralogic.com>
  Submitted by: John Suykerbuyk <johns@spectralogic.com>
  Sponsored by: Spectra Logic
  MFC after: 1 week
  Reviewed by: ken

  r230916 | ken | 2012-02-02 10:54:35 -0700 (Thu, 02 Feb 2012) | 13 lines

  Fix the netback driver build for i386.

  netback.c: Add missing VM includes.

  xen/xenvar.h,
  xen/xenpmap.h: Move some XENHVM macros from <machine/xen/xenpmap.h> to
   <machine/xen/xenvar.h> on i386 to match the amd64 headers.

  conf/files: Add netback to the build.

  Submitted by: jhb
  MFC after: 3 days

  r228526 | kevlo | 2011-12-14 23:29:13 -0700 (Wed, 14 Dec 2011) | 2 lines

  s/timout/timeout

  r230879 | ken | 2012-02-01 13:19:33 -0700 (Wed, 01 Feb 2012) | 4 lines

  Add the GSO prefix descriptor define.

  MFC after: 3 days

git-svn-id: svn://svn.freebsd.org/base/stable/8@231759 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r231273
nyan [Wed, 15 Feb 2012 13:36:06 +0000 (13:36 +0000)]
MFC: r231273

  - Disable the olpt driver.   Because it conflicts with the ppc/lpt driver.
  - Remove obsolete comment.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231757 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231543:
fjoe [Wed, 15 Feb 2012 10:15:15 +0000 (10:15 +0000)]
MFC r231543:

- Use fixed-width integer types.
- Prefer to use C99 stdint types.

This fixes ng_cisco on 64-bit architectures.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231753 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231563: start watchdogd before most of other daemons/servers
avg [Wed, 15 Feb 2012 09:53:20 +0000 (09:53 +0000)]
MFC r231563: start watchdogd before most of other daemons/servers

git-svn-id: svn://svn.freebsd.org/base/stable/8@231750 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231515:
bz [Wed, 15 Feb 2012 09:32:40 +0000 (09:32 +0000)]
MFC r231515:

 Use the correct constant (with same value) for comparying the SA type.

PR: kern/142741
Submitted by: Matthijs Kooiman (matthijs stdin.nl)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231747 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agouse 4096 instead of PAGE_SIZE to determine the initial size
luigi [Wed, 15 Feb 2012 06:16:52 +0000 (06:16 +0000)]
use 4096 instead of PAGE_SIZE to determine the initial size
of the memory allocated for netmap. Apparently the previous
value fails with an integer overflow on stable/8-IA64
(4M pages ? curious that it does not fail on stable/9 and head)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231742 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224747:
kevlo [Wed, 15 Feb 2012 05:37:41 +0000 (05:37 +0000)]
MFC r224747:

If RTF_HOST flag is specified, then we are interested in destination
address.

PR: kern/159600
Submitted by: Svatopluk Kraus <onwahe at gmail dot com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231741 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r224703:
kevlo [Wed, 15 Feb 2012 05:35:37 +0000 (05:35 +0000)]
MFC r224703:

In rtinit1(), before rtrequest1_fib() is called, info.rti_flags is
initialized by flags (function argument) or-ed with ifa->ifa_flags.
If both NIC has a loopback route to itself, so IFA_RTSELF is set on ifa(s).
As IFA_RTSELF is defined by RTF_HOST, rtrequest1_fib() is called with
RTF_HOST flag even if netmask is not NULL. Consequently, netmask is set
to zero in rtrequest1_fib(), and request to add network route is changed
under hands to request to add host route.

Tested by: Andrew Boyer <aboyer at averesystems.com>
Submitted by: Svatopluk Kraus <onwahe at gmail dot com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231740 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230288,230339:
yongari [Wed, 15 Feb 2012 04:09:23 +0000 (04:09 +0000)]
MFC r230288,230339:
r230288:
  Document dev.bge.%d.msi_disable tunable.

r230339:
  Reflect tunable name change made in r230337.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231738 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230286,230337-230338,231159:
yongari [Wed, 15 Feb 2012 04:03:41 +0000 (04:03 +0000)]
MFC r230286,230337-230338,231159:
r230286:
  Introduce a tunable that disables use of MSI.
  Non-zero value will use INTx.

r230337-230338:
  Rename dev.bge.%d.msi_disable to dev.bge.%d.msi which matches
  enable/disable and default it to on.

r231159:
  Call bge_add_sysctls() early and especially before bge_can_use_msi() so
  r230337 actually has a chance of working and doesn't always unconditionally
  disable the use of MSIs.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231735 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230336:
yongari [Wed, 15 Feb 2012 03:49:50 +0000 (03:49 +0000)]
MFC r230336:
  Fix a logic error which resulted in putting PHY into sleep when WOL
  is active.  If WOL is active driver should not put PHY into sleep.
  This change makes WOL work on RTL8168E.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231732 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230575-230576:
yongari [Wed, 15 Feb 2012 03:43:03 +0000 (03:43 +0000)]
MFC r230575-230576:
r230275:
  Use a RX DMA tag to free loaded RX DMA maps.
  Previously it used a TX DMA tag.

r230276:
  Free allocated jumbo buffers when controller is stopped.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231729 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229940:
yongari [Wed, 15 Feb 2012 03:34:44 +0000 (03:34 +0000)]
MFC r229940:
  style. No functional changes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231726 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231171:
gjb [Wed, 15 Feb 2012 01:53:46 +0000 (01:53 +0000)]
MFC r231171:
 -  Add an option to 404.status-zfs (enabled by default) to list all
   zfs pools on the system.

 -  While here, document daily_status_zfs_enable in periodic.conf(5).

Approved by: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/8@231722 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231244:
gjb [Wed, 15 Feb 2012 01:40:14 +0000 (01:40 +0000)]
MFC r231244:
- Fix some Xr references:

- - ada(4): ad(4) - removed, ada(4) would be a self-referencing entry
- - cd(4): ad(4) -> ada(4)
- - da(4): ad(4) -> ada(4)
- - DEVICE_PROBE(9):  ugen(5) -> ugen(4)
- - lmc(4): Netgraph(4) -> netgraph(4)
- - security(7): rc.conf(8) -> rc.conf(5)
- - sbp(4): sysctl(1) -> sysctl(8)
- - portindex(5): build(1) -> build(7)
- - u3g(4): usbconfig(5) -> usbconfig(8)
- - usb_quirk(4): usbconfig(5) -> usbconfig(8)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231719 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: bring in the core netmap code (disconnected
luigi [Tue, 14 Feb 2012 22:49:34 +0000 (22:49 +0000)]
MFC: bring in the core netmap code (disconnected
from the build). As usual, device driver patches
will come separately.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231717 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221598:
kaiw [Tue, 14 Feb 2012 19:50:41 +0000 (19:50 +0000)]
MFC r221598:

Document the behavior of `elf_getdata()` and `elf_rawdata()` with
zero-sized ELF sections.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231706 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231118:
dim [Tue, 14 Feb 2012 19:49:06 +0000 (19:49 +0000)]
MFC r231118:

Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor
set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231704 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r221595:
kaiw [Tue, 14 Feb 2012 19:48:57 +0000 (19:48 +0000)]
MFC r221595:

For zero-sized sections, set the `d_buf` field of the `Elf_Data`
descriptor returned by `elf_rawdata()` to NULL.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231703 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231525 (pjd):
trociny [Tue, 14 Feb 2012 19:09:01 +0000 (19:09 +0000)]
MFC r231525 (pjd):

Nice range comparison.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231701 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMerge netgraph related fixes and enhancements from head/. Revisions
glebius [Tue, 14 Feb 2012 17:35:44 +0000 (17:35 +0000)]
Merge netgraph related fixes and enhancements from head/. Revisions
merged: r223754,224031,226829,229003,230213,230480, 230486-230487,231585.

r223754 to ng_base:
  - Use refcount(9) API to manage node and hook refcounting.

r224031 to ng_socket:
  In ng_attach_cntl() first allocate things that may fail, and then
  do the rest of initialization. This simplifies code and fixes
  a double free in failure scenario.

r226829 to ng_base:
  - If KDB & NETGRAPH_DEBUG are on, print traces on discovered failed
    invariants.
  - Reduce tautology in NETGRAPH_DEBUG output.

r229003 to ng_base:
  style(9), whitespace and spelling nits.

r230213 to ng_socket:
  Remove some disabled NOTYET code. Probability of enabling it is low,
  if anyone wants, he/she can take it from svn.

r230480 to ng_base:
  Convert locks that protect name hash, ID hash and typelist from
  mutex(9) to rwlock(9) based locks.

  While here remove dropping lock when processing NGM_LISTNODES,
  and NGM_LISTTYPES generic commands. We don't need to drop it
  since memory allocation is done with M_NOWAIT.

r230486 to hashinit(9):
  Convert panic()s to KASSERT()s. This is an optimisation for
  hashdestroy() since in absence of INVARIANTS a compiler
  will drop the entire for() cycle.

r230487,r231585 to ng_socket:
  Provide a findhook method for ng_socket(4). The node stores a
  hash with names of its hooks. It starts with size of 16, and
  grows when number of hooks reaches twice the current size. A
  failure to grow (memory is allocated with M_NOWAIT) isn't
  fatal, however.

Tested by: Eugene Grosbein, Mike Tancsa

git-svn-id: svn://svn.freebsd.org/base/stable/8@231696 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231615, r231693
jimharris [Tue, 14 Feb 2012 17:16:45 +0000 (17:16 +0000)]
MFC r231615, r231693

r231615: Minor cleanup and added missing svn keywords (from brueffer@)
r231693: Update HISTORY for isci.4 man page.

Sponsored by: Intel
Approved by: scottl

git-svn-id: svn://svn.freebsd.org/base/stable/8@231694 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 231485
ken [Tue, 14 Feb 2012 16:47:52 +0000 (16:47 +0000)]
MFC 231485

Return BUS_PROBE_DEFAULT instead of BUS_PROBE_VENDOR from the mps driver
probe routine.

This will allow LSI to ship drivers that return BUS_PROBE_VENDOR to
override the in-tree version of the driver.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231691 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230843, r231134, r231136, r231137, r231296
jimharris [Tue, 14 Feb 2012 15:56:01 +0000 (15:56 +0000)]
MFC r230843, r231134, r231136, r231137, r231296

Add isci(4) driver for amd64 and i386 targets.

The isci driver is for the integrated SAS controller in the Intel C600
(Patsburg) chipset.  Source files in sys/dev/isci directory are
FreeBSD-specific, and sys/dev/isci/scil subdirectory contains
an OS-agnostic library (SCIL) published by Intel to control the SAS
controller.  This library is used primarily as-is in this driver, with
some post-processing to better integrate into the kernel build
environment.

isci.4 and a README in the sys/dev/isci directory contain a few
additional details.

This driver is only built for amd64 and i386 targets.

Sponsored by: Intel
Reviewed by: scottl
Approved by: scottl

git-svn-id: svn://svn.freebsd.org/base/stable/8@231688 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 229547:
bz [Tue, 14 Feb 2012 15:17:58 +0000 (15:17 +0000)]
MFC 229547:

 Mark a couple of file local functions static and stop exporting them.

Discussed with: rwatson

git-svn-id: svn://svn.freebsd.org/base/stable/8@231685 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: bring in the "oce" driver for Emulex OneConnect 10 Gbit adapters.
luigi [Tue, 14 Feb 2012 14:19:53 +0000 (14:19 +0000)]
MFC: bring in the "oce" driver for Emulex OneConnect 10 Gbit adapters.
Same code as in HEAD and stable/9

git-svn-id: svn://svn.freebsd.org/base/stable/8@231681 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 231240
ken [Tue, 14 Feb 2012 14:18:28 +0000 (14:18 +0000)]
MFC 231240

Bring in a number of mps(4) driver fixes from LSI:

1.  Fixed timeout specification for the msleep in mps_wait_command().
    Added 30 second timeout for mps_wait_command() calls in mps_user.c.

2.  Make sure we call mps_detach_user() from the kldunload path.

3.  Raid Hotplug behavior change.

    The driver now removes a volume when it goes to a failed state,
    so we also need to add volume back to the OS when it goes to
    opitimal/degraded/online from failed/missing.

    Handle raid volume add and remove from the IR_Volume event.
4.  Added some more debugging information.

5.  Replace xpt_async(AC_LOST_DEVICE, path, NULL) with
    mpssas_rescan_target().

    This is to work around a panic in CAM that shows up when adding a
    drive with a rescan and removing another device from the driver thread
    with an AC_LOST_DEVICE async notification.

    This problem was encountered in testing with the LSI sas2ircu utility,
    which was used to create a RAID volume from physical disks.  The driver
    has to create the RAID volume target and remove the physical disk
    targets, and triggered a panic in the process.

    The CAM issue needs to be fully diagnosed and fixed, but this works
    around the issue for now.

6.  Fix some memory initialization issues in mps_free_command().

7.  Resolve the "devq freeze forever" issue.  This was caused by the
    internal read capacity command issued in the non-head version of the
    driver.  When the command completed with an error, the driver wasn't
    unfreezing thd device queue.

    The version in head uses the CAM infrastructure for getting the read
    capacity information, and therefore doesn't have the same issue.

8.  Bump the version to 13.00.00.00-fbsd. (this is very close to LSI's
    internal stable driver 13.00.00.00)

Submitted by: Kashyap Desai <Kashyap.Desai@lsi.com>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231680 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFH r230007, r230388: document quiet*, fix devd/dhclient interaction.
des [Tue, 14 Feb 2012 12:47:57 +0000 (12:47 +0000)]
MFH r230007, r230388: document quiet*, fix devd/dhclient interaction.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231677 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231507:
dougb [Tue, 14 Feb 2012 10:34:15 +0000 (10:34 +0000)]
MFC r231507:

Move addswap to run right after kld (aka early in the second stage),
as it did previously.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231665 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231194:
dougb [Tue, 14 Feb 2012 10:29:48 +0000 (10:29 +0000)]
MFC r231194:

Add a knob to always load the default rulesets. While I'm here document
the other devfs_ knobs in rc.conf.5.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231661 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230374:
dougb [Tue, 14 Feb 2012 10:19:27 +0000 (10:19 +0000)]
MFC r230374:

If we're booting there is no need to waste time determining if the service
is running or not.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231658 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230099:
dougb [Tue, 14 Feb 2012 10:17:14 +0000 (10:17 +0000)]
MFC r230099:

Change rcvar= assignments to the literal values set_rcvar
would have returned. This will slightly reduce boot time,
and help in diff reduction to HEAD.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231655 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: reserve an IFCAP bit for netmap, instruct ifconfig to parse
luigi [Tue, 14 Feb 2012 09:36:02 +0000 (09:36 +0000)]
MFC: reserve an IFCAP bit for netmap, instruct ifconfig to parse
the information (just a change on the format string suffices),
and put a comment on if_var.h to tell that
if_pspare[0] may be used to point to the netmap structure.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231649 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231367:
ae [Tue, 14 Feb 2012 07:24:44 +0000 (07:24 +0000)]
MFC r231367:
  Add alias for the partition with type 0x42 to the MBR scheme.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231644 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231349:
ae [Tue, 14 Feb 2012 07:13:09 +0000 (07:13 +0000)]
MFC r231349:
  Let's be more realistic and limit maximum number of partition to 4k.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231641 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231575:
hselasky [Tue, 14 Feb 2012 06:42:43 +0000 (06:42 +0000)]
MFC r231575:
Update /etc/devd/usb.conf

git-svn-id: svn://svn.freebsd.org/base/stable/8@231639 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r230803
rmacklem [Tue, 14 Feb 2012 05:12:52 +0000 (05:12 +0000)]
MFC: r230803
When a "mount -u" switches an NFS mount point from TCP to UDP,
any thread doing an I/O RPC with a transfer size greater than
NFS_UDPMAXDATA will be hung indefinitely, retrying the RPC.
After a discussion on freebsd-fs@, I decided to add a warning
message for this case, as suggested by Jeremy Chadwick.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231637 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r231228
marius [Tue, 14 Feb 2012 01:15:26 +0000 (01:15 +0000)]
MFC: r231228

Remove extra newlines from panic messages.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231630 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoForced commit to denote that the commit message of r231624 actually
marius [Tue, 14 Feb 2012 01:08:16 +0000 (01:08 +0000)]
Forced commit to denote that the commit message of r231624 actually
should have read:
MFC: r231518

Flesh out support for SAS1078 and SAS1078DE (which are said to actually
be the same chip):
- The I/O port resource may not be available with these. However, given
  that we actually only need this resource for some controllers that
  require their firmware to be up- and downloaded (which excludes the
  SAS1078{,DE}) just handle failure to allocate this resource gracefully
  when possible. While at it, generally put non-fatal resource allocation
  failures under bootverbose.
- SAS1078{,DE} use a different hard reset protocol.
- Add workarounds for the 36GB physical address limitation of scatter/
  gather elements of these controllers.

Tested by: Slawa Olhovchenkov

PR: 149220 (remaining part)

git-svn-id: svn://svn.freebsd.org/base/stable/8@231627 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r231518
marius [Tue, 14 Feb 2012 00:54:59 +0000 (00:54 +0000)]
MFC: r231518

Remove extra newlines from panic messages.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231624 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231079:
dim [Mon, 13 Feb 2012 20:59:58 +0000 (20:59 +0000)]
MFC r231079:

  Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
  preprocessor to run.  Previously, it always ran /usr/bin/cpp, unless you
  used the -Y option, and even then you could not set the basename.  It
  also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this
  is obsolete, and has been removed.

  Note that setting RPCGEN_CPP to a command with arguments is supported,
  though the command line parsing is simplistic.  However, setting it to
  e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc
  and clang in -E mode will consider files with unknown extensions (such
  as .x) as object files, and attempt to link them.

  This could be worked around by also adding "-x c", but it is much safer
  to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead.

MFC r231080:

  Amend r231079 by properly shifting up the existing arguments in
  rpc_main.c's insarg() function.  I had forgotten to put this in my patch
  queue, sorry.

  Pointy hat to: me

MFC r231101:

  In usr.bin/rpcgen/rpc_main.c, use execvp(3) instead of execv(3), so
  rpcgen will search the current PATH for the preprocessor.  This makes it
  possible to run a preprocessor built during the cross-tools stage of
  buildworld.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231613 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 230340:
jhb [Mon, 13 Feb 2012 19:52:18 +0000 (19:52 +0000)]
MFC 230340:
Properly return success once a matching VPD entry is found in
pci_get_vpd_readonly_method().  Previously the loop was always running
to completion and falling through to failing with ENXIO.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231611 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 230332:
jhb [Mon, 13 Feb 2012 19:49:45 +0000 (19:49 +0000)]
MFC 230332:
Add support for the Em command.  This restores a missing 'not' in the
description of snd_emu10kx(4).

git-svn-id: svn://svn.freebsd.org/base/stable/8@231609 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231592:
np [Mon, 13 Feb 2012 19:41:31 +0000 (19:41 +0000)]
MFC r231592:
Use the non-sleeping variang of t4_wr_mbox in code that can be called
with locks held.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231175:
np [Mon, 13 Feb 2012 19:36:00 +0000 (19:36 +0000)]
MFC r231175:
Allocate the BAR for userspace doorbells after the is_offload check
is functional.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231605 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231172:
np [Mon, 13 Feb 2012 19:31:32 +0000 (19:31 +0000)]
MFC r231172:
Program the MAC exact match table in batches of 7 addresses at
a time when possible.  This is more efficient than one at a time.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231602 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231120:
np [Mon, 13 Feb 2012 19:25:58 +0000 (19:25 +0000)]
MFC r231120:
Acquire the adapter lock before updating fields of the filter structure.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231116:
np [Mon, 13 Feb 2012 19:18:08 +0000 (19:18 +0000)]
MFC r231116:
Remove if_start from cxgb and cxgbe.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231598 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r223596:
se [Mon, 13 Feb 2012 18:57:36 +0000 (18:57 +0000)]
MFC r223596:

Add macros to specify owner, group and mode of config files for installation.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231595 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: cross-arch support for picobsd
luigi [Mon, 13 Feb 2012 18:10:13 +0000 (18:10 +0000)]
MFC: cross-arch support for picobsd

git-svn-id: svn://svn.freebsd.org/base/stable/8@231590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: sha256 ($5$) and sha512 ($6$) crypt(3) types.
markm [Mon, 13 Feb 2012 16:43:29 +0000 (16:43 +0000)]
MFC: sha256 ($5$) and sha512 ($6$) crypt(3) types.

PR: misc/124164
Delayed by: markm

git-svn-id: svn://svn.freebsd.org/base/stable/8@231588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228636:
tijl [Mon, 13 Feb 2012 10:24:22 +0000 (10:24 +0000)]
MFC r228636:

Correct a logic error in usr.bin/hexdump/conv.c, found by clang.

Whenever the conv_c() function encounters an incomplete multibyte char,
it peeks ahead.  It also sets p to peekbuf, to indicate it is still
processing the incomplete character.

However, on the next retry, it compares buf against peekbuf, which
always returns false, since both buf and peekbuf are local char arrays,
whose addresses are never the same.

Fix this by comparing against p instead, which was the intention.  Also
turn peekbuf into an array of u_char, to prevent conversion warnings.

MFC r229794:

- Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

MFC r230649:

Fix decoding of escape sequences in format strings:
- Zero-terminate the resulting string by letting the for-loop copy the
  terminating zero.
- Exit the for-loop after handling a backslash at the end of the format
  string to fix a buffer overrun.
- Remove some unnecessary comments and blank lines.

PR: bin/144722

git-svn-id: svn://svn.freebsd.org/base/stable/8@231577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 231196:
brooks [Sun, 12 Feb 2012 23:12:47 +0000 (23:12 +0000)]
MFC 231196:
  eui64_aton and eui64_ntoa are actually the equivalent of ether_aton_r and
  ether_nota_r and do not use static variables so remove the note copied
  from ethers.3 saying they do.

Reported by: bms

git-svn-id: svn://svn.freebsd.org/base/stable/8@231567 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231054:
dim [Sun, 12 Feb 2012 14:56:40 +0000 (14:56 +0000)]
MFC r231054:

In usr.bin/rpcgen/rpc_main.c, properly check the return value of
strlcpy(), in addition to checking that of strlcat().

git-svn-id: svn://svn.freebsd.org/base/stable/8@231561 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231015, r231016:
trociny [Sun, 12 Feb 2012 07:59:25 +0000 (07:59 +0000)]
MFC r231015, r231016:

r231015:

Fix the regression introduced in r226859: if the local component is
out of date BIO_READ requests got lost instead of being sent to the
remote component.

Reviewed by: pjd

r231016:

If a local write request is from the synchronization thread, when it
is synchronizing data that is out of date on the local component, we
should not send G_GATE_CMD_DONE acknowledge to the kernel.

This fixes the issue, observed in async mode, when on synchronization
from the remote component the worker terminated with "G_GATE_CMD_DONE
failed" error.

Reported by: Artem Kajalainen <artem kayalaynen ru>
Reviewed by: pjd

git-svn-id: svn://svn.freebsd.org/base/stable/8@231557 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230874:
trociny [Sun, 12 Feb 2012 07:56:07 +0000 (07:56 +0000)]
MFC r230874:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check sockstat gets stuck in loop leaking the
memory if the returned ENOMEM was due the exceeded memorylocked
limit. This is easily can be observed running `limits -l 1k sockstat'.

Submitted by: Andrey Zonov <andrey zonov org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231554 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230873:
trociny [Sun, 12 Feb 2012 07:53:02 +0000 (07:53 +0000)]
MFC r230873:

Try to avoid ambiguity when sysctl returns ENOMEM additionally
checking the returned oldlen: when ENOMEM is due to the supplied
buffer being too short the return oldlen is equal to buffer size.

Without this additional check kvm_getprocs() gets stuck in loop if the
returned ENOMEM was due the exceeded memorylocked limit. This is
easily can be observed running `limits -l 1k top'.

Submitted by: Andrey Zonov <andrey zonov org>

git-svn-id: svn://svn.freebsd.org/base/stable/8@231551 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC: r231133
rmacklem [Sun, 12 Feb 2012 06:41:29 +0000 (06:41 +0000)]
MFC: r231133
r228827 fixed a problem where copying of NFSv4 open credentials into
a credential structure would corrupt it. This happened when the
p argument was != NULL. However, I now realize that the copying of
open credentials should only happen for p == NULL, since that indicates
that it is a read-ahead or write-behind. This patch fixes this.
After this commit, r228827 could be reverted, but I think the code is
clearer and safer with the patch, so I am going to leave it in.
Without this patch, it was possible that a NFSv4 VOP_SETATTR() could have
changed the credentials of the caller. This would have happened if
the process doing the VOP_SETATTR() did not have the file open, but
some other process running as a different uid had the file open for writing
at the same time.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231547 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r215615, r215642:
mckay [Sun, 12 Feb 2012 05:01:49 +0000 (05:01 +0000)]
MFC r215615, r215642:

Fix several misbehaviours by making xargs keep track of its child processes.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231542 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 203377-231538. This records mergeinfo for already merged
rodrigc [Sat, 11 Feb 2012 23:39:53 +0000 (23:39 +0000)]
MFC 203377-231538.  This records mergeinfo for already merged
changesets, but brings in the following changes:

MFC 222326
    - Fix tftp_log() usage

MFC 223137
    - Man page updates

MFC 223487
    - Bring back syncnet() implementation from older tftp implementation.

MFC 229780
    - Spelling fixes for libexec/

MFC 229904
    - Fix warning when compiling with gcc46:
          error: variable 'bp' set but not used

git-svn-id: svn://svn.freebsd.org/base/stable/8@231539 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC 196045 through 231537
rodrigc [Sat, 11 Feb 2012 23:15:14 +0000 (23:15 +0000)]
MFC 196045 through 231537
   - this records svn:mergeinfo for previously merged changesets

This pulls in changes such as:

MFC 216370
  - Remove adertising clause from UCB copyrighted files in usr.bin

MFC 222534
  - Fix a couple of spelling errors.

MFC 223493
  - Remove duplicated header files

MFC 223135 - 223491
  - man page updates

MFC 229403
  - Replace index() and rindex() calls with strchr() and strrchr().

MFC 230044
  - fgets(3) returns a pointer, so compare against NULL, not integer 0.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231538 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231001: sh: Fix swapped INTON/INTOFF.
jilles [Sat, 11 Feb 2012 20:37:08 +0000 (20:37 +0000)]
MFC r231001: sh: Fix swapped INTON/INTOFF.

A possible consequence of this bug was a memory leak if SIGINT arrived
during a 'set' command (listing variables).

git-svn-id: svn://svn.freebsd.org/base/stable/8@231531 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230157: dadump: don't leak the periph lock on i/o error
avg [Sat, 11 Feb 2012 14:58:46 +0000 (14:58 +0000)]
MFC r230157: dadump: don't leak the periph lock on i/o error

git-svn-id: svn://svn.freebsd.org/base/stable/8@231523 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r218264:
tuexen [Sat, 11 Feb 2012 08:58:12 +0000 (08:58 +0000)]
MFC r218264:
Fix typo (Tuneable -> Tunable).
From brucec@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231513 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r231074:
tuexen [Sat, 11 Feb 2012 01:17:27 +0000 (01:17 +0000)]
MFC r231074:
Fix a typo which was already fixed by eadler in r227489. We missed
to integrate this fix in our code base, so it was removed in r227755.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231502 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230555:
tuexen [Sat, 11 Feb 2012 01:15:02 +0000 (01:15 +0000)]
MFC r230555:
Don't print a warning when using netstat to print
SCTP statistics when there is not SCTP in the kernel.
This problem was reported by Sean Mahood.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231501 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230379:
tuexen [Sat, 11 Feb 2012 01:13:35 +0000 (01:13 +0000)]
MFC r230379:
Fix a problem when using the CBAPI.
While there, remove an old comment which does not apply anymore.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231500 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230138:
tuexen [Sat, 11 Feb 2012 01:11:37 +0000 (01:11 +0000)]
MFC r230138:
Small cleanup, no functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231499 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230136:
tuexen [Sat, 11 Feb 2012 01:09:46 +0000 (01:09 +0000)]
MFC r230136:
Two cleanups. No functional change.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231498 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r230104:
tuexen [Sat, 11 Feb 2012 01:07:51 +0000 (01:07 +0000)]
MFC r230104:
Fix two bugs, which result in a panic when calling getsockopt()
using SCTP_RECVINFO or SCTP_NXTINFO.
Reported by Clement Lecigne and forwarded to us by zi@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231497 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229805:
tuexen [Sat, 11 Feb 2012 01:05:41 +0000 (01:05 +0000)]
MFC r229805:
Add an SCTP sysctl "blackhole", similar to the one for TCP.
If set to 1, no ABORT is sent back in response to an incoming
INIT. If set to 2, no ABORT is sent back in response to
an out of the blue packet. If set to 0 (the default), ABORTs
are sent.
Discussed with rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231496 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229775:
tuexen [Sat, 11 Feb 2012 01:03:17 +0000 (01:03 +0000)]
MFC r229775:
Retire the SCTP sysctl "strict_init". We always perform the validation
and there is no reason to make is configuarable.
Discussed with rrs@.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231495 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229774:
tuexen [Sat, 11 Feb 2012 01:01:07 +0000 (01:01 +0000)]
MFC r229774:
Improve the handling of received INITs. Send an ABORT when
not accepting the connection. Also fix a crash, which
could happen when the user closed the socket.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231494 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r229729:
tuexen [Sat, 11 Feb 2012 00:59:22 +0000 (00:59 +0000)]
MFC r229729:
Use NULL instead of 0.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231493 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228907:
tuexen [Sat, 11 Feb 2012 00:57:08 +0000 (00:57 +0000)]
MFC r228907:
Address issues found by clang. While there, fix also some style
issues.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231492 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228653:
tuexen [Sat, 11 Feb 2012 00:54:24 +0000 (00:54 +0000)]
MFC r228653:
Fix unused parameter warnings.
While there, fix some whitespace issues.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231490 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228630:
tuexen [Sat, 11 Feb 2012 00:51:26 +0000 (00:51 +0000)]
MFC r228630:
Address warnings found by clang.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231489 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228531:
tuexen [Sat, 11 Feb 2012 00:49:54 +0000 (00:49 +0000)]
MFC r228531:
Fix a bug where sctp_sendmdg() uses uninitialized memory.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231488 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228391:
tuexen [Sat, 11 Feb 2012 00:48:22 +0000 (00:48 +0000)]
MFC r228391:
Fix a bug reported by Irene Ruengeler which resulted in not sending
out HEARTBEATs when requested by the user. The HEARTBEATs were only
queued, but not actually sent out.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231487 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228102:
tuexen [Sat, 11 Feb 2012 00:46:06 +0000 (00:46 +0000)]
MFC r228102:
Remove debug code.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231486 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r228031:
tuexen [Fri, 10 Feb 2012 23:55:40 +0000 (23:55 +0000)]
MFC r228031:
Fix a warning reported by arundel@.
Fix a bug where the parameter length of a supported address types
parameter is set to a wrong value if the kernel is built with
with either INET or INET6, but not both.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231483 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227931:
tuexen [Fri, 10 Feb 2012 23:53:06 +0000 (23:53 +0000)]
MFC r227931:
Move up the address to the top of the sctp_udencaps structure
like in all other structures. This avoids alignment problems.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231482 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227930:
tuexen [Fri, 10 Feb 2012 23:51:23 +0000 (23:51 +0000)]
MFC r227930:
Move up the address to the top of the sctp_paddrthlds structure
like in all other structures. This avoids alignment problems.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231481 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227755:
tuexen [Fri, 10 Feb 2012 23:49:04 +0000 (23:49 +0000)]
MFC r227755:
Add support for the SCTP_REMOTE_UDP_ENCAPS_PORT socket option.
Retire the the now unused sctp_udp_tunneling_for_client_enable
sysctl variable.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231480 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227655:
tuexen [Fri, 10 Feb 2012 23:41:37 +0000 (23:41 +0000)]
MFC r227655:
Cleanup comparison of interface names.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231479 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227540:
tuexen [Fri, 10 Feb 2012 23:38:38 +0000 (23:38 +0000)]
MFC r227540:
Set the MTU of an path to an approriate value if the interface MTU
can't be determined.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231478 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227486:
tuexen [Fri, 10 Feb 2012 23:36:33 +0000 (23:36 +0000)]
MFC r227486:
Don't copy uninitialized memory. Also simplify the comparison
of interface names.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231477 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227320:
tuexen [Fri, 10 Feb 2012 23:34:07 +0000 (23:34 +0000)]
MFC r227320:
When loading addresses from INITs, always use the correct
local address.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231476 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r227266:
tuexen [Fri, 10 Feb 2012 23:32:04 +0000 (23:32 +0000)]
MFC r227266:
Initialize all components of the sent COOKIE.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231475 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226869:
tuexen [Fri, 10 Feb 2012 23:29:08 +0000 (23:29 +0000)]
MFC r226869:
When add a new remote address using sctp_add_remote_addr(),
return the correct net if requested.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231473 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226868:
tuexen [Fri, 10 Feb 2012 23:26:43 +0000 (23:26 +0000)]
MFC r226868:
Send out control chunks which have no specific destination.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231472 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226252:
tuexen [Fri, 10 Feb 2012 23:24:34 +0000 (23:24 +0000)]
MFC r226252:
Use the most significant 6 bits of the dscp instead of the least
significant ones.
This has changed in the latest version of the socket API ID and
provides backwards compatibility and gets it in syn with the
usage of the IP_TOS socket option.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231471 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226203:
tuexen [Fri, 10 Feb 2012 23:19:33 +0000 (23:19 +0000)]
MFC r226203:
When moving an stcb to a new inp and we copy over the list of
bound addresses, update the last used address pointer.
If not, it might result in a crash if the old inp goes away.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231469 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

12 years agoMFC r226168:
tuexen [Fri, 10 Feb 2012 23:17:33 +0000 (23:17 +0000)]
MFC r226168:
Update the inp stored in a HB-timer when moving an stcb to a new inp.
Use only this stored inp when processing a HB timeout.
This fixes a bug which results in a crash.

git-svn-id: svn://svn.freebsd.org/base/stable/8@231468 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f