]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoRemove (harmless) duplicate entry for VersionAddendum.
des [Fri, 29 Mar 2013 21:08:20 +0000 (21:08 +0000)]
Remove (harmless) duplicate entry for VersionAddendum.

Noticed by: dim@
MFC after: 1 week

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

11 years agoMerge 248070.
melifaro [Fri, 29 Mar 2013 16:24:20 +0000 (16:24 +0000)]
Merge 248070.

Fix long-standing issue with interface routes being unprotected:
Use RTM_PINNED flag to mark route as immutable.
Forbid deleting immutable routes without special rtrequest1_fib() flag.
Adding interface address with prefix already in route table is handled
by atomically deleting old prefix and adding interface one.

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

11 years agoMFC r248857:
gjb [Fri, 29 Mar 2013 14:18:49 +0000 (14:18 +0000)]
MFC r248857:
 - Update hardware notes to reflect that amd64 is no longer "young"
 - Bump copyright year

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

11 years agoMFC r248325:
kib [Fri, 29 Mar 2013 13:24:19 +0000 (13:24 +0000)]
MFC r248325:
Add my copyright for the 2012 year work, in particular vn_io_fault()
and f_offset locking.  Add required Foundation notice for r248319.

MFC r248329:
Separate the copyright lines and the informational block by a blank line.

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

11 years agoMFC r248319:
kib [Fri, 29 Mar 2013 13:17:34 +0000 (13:17 +0000)]
MFC r248319:
Merge vn_io_fault_pgmove().

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

11 years agoMFC r248226:
yongari [Fri, 29 Mar 2013 00:21:36 +0000 (00:21 +0000)]
MFC r248226:
  r241438 broke IPMI access on Sun Fire X2200 M2(BCM5715).
  Fix the IPMI regression by sending BGE_FW_DRV_STATE_UNLOAD to
  ASF/IPMI firmware in driver attach phase.  Sending heartheat to
  ASF/IPMI is enabled only after upping interface so
  setting driver state to BGE_FW_DRV_STATE_START in attach phase
  broke IPMI access.
  While I'm here, add NVRAM arbitration lock before performing
  controller reset. ASF/IPMI firmware may be able to access the NVRAM
  while controller reset is in progress.  Without the arbitration
  lock before resetting the controller, ASF/IPMI may not initialize
  properly.

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

11 years agoMFC r244183 by glebius:
emaste [Thu, 28 Mar 2013 20:48:40 +0000 (20:48 +0000)]
MFC r244183 by glebius:

  Fix problem in r238990 (MFC'd in r240313).  The LLE_LINKED flag should be
  tested prior to entering llentry_free(), and in case if we lose the race,
  we should simply perform LLE_FREE_LOCKED().  Otherwise, if the race is
  lost by the thread performing arptimer(), it will remove two references
  from the lle instead of one.

  Reported by: Ian FREISLICH <ianf clue.co.za>

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

11 years agoMFC 247266
mjacob [Thu, 28 Mar 2013 14:25:09 +0000 (14:25 +0000)]
MFC 247266

Don't try and negotiate sync mode if either period or offset are zero.

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

11 years agoMFC r248280:
kib [Thu, 28 Mar 2013 06:31:04 +0000 (06:31 +0000)]
MFC r248280:
Add pmap function pmap_copy_pages().

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

11 years agoMFC r248277:
kib [Thu, 28 Mar 2013 06:22:43 +0000 (06:22 +0000)]
MFC r248277:
Remove excessive and inconsistent initializers for the various kernel
maps and submaps.

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

11 years agoMFC r248276:
kib [Thu, 28 Mar 2013 06:20:13 +0000 (06:20 +0000)]
MFC r248276:
Rewrite the vfs_bio_clrbuf(9) to not access the b_data for B_VMIO
buffers directly, use pmap_zero_page_area(9) for each zeroing page
region instead.

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

11 years agoMFC r248788 (erwin):
delphij [Thu, 28 Mar 2013 05:39:45 +0000 (05:39 +0000)]
MFC r248788 (erwin):

Update BIND to 9.8.4-P2

Removed the check for regex.h in configure in order
to disable regex syntax checking, as it exposes
BIND to a critical flaw in libregex on some
platforms. [RT #32688]

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

11 years agoMFC r245266:
mav [Wed, 27 Mar 2013 14:23:50 +0000 (14:23 +0000)]
MFC r245266:
Remove not very useful printf, that can be too chatty.

ASUS P8Z77-V board reports _AC2, _AC3 and _AC4 setpoints as 0C.  With active
cooling already automatically set to _AC2, that still caused driver to print
two useless lines about temperature above _AC3 and _AC4 every ten seconds.
Three setponts of 0C is probably a board bug, but the same spam could happen
also in correct case if system is runnign not with the lowest cooling level.

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

11 years agoMFC r248672:
dim [Wed, 27 Mar 2013 07:58:29 +0000 (07:58 +0000)]
MFC r248672:

Compile contrib/tzcode/stdtime/localtime.c with -fwrapv, since it relies
on signed integer overflow wrapping.  Otherwise mktime(3) and timegm(3)
can hang, in case the timestamp passed in struct tm is not representable
in a time_t.  Specifically, any timestamp after 2038-01-19 03:14:07, in
combination with a 32-bit time_t.

Note that it would be better to change the code to not rely on undefined
behaviour, but it is contributed code, and it is not entirely trivial to
fix the issue properly.

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

11 years agoPermit changing MTU in 6to4 relay.
melifaro [Tue, 26 Mar 2013 18:57:25 +0000 (18:57 +0000)]
Permit changing MTU in 6to4 relay.

This behavior is recommended by RFC 4213 clause 3.2.

Sometimes fragmentation is the least evil.
For example, some Linux IPVS kernels forwards
ICMPv6 checksums to real servers incorrectly.

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

11 years agoMFC r248446: find: Include nanoseconds when comparing timestamps of files.
jilles [Sun, 24 Mar 2013 12:35:12 +0000 (12:35 +0000)]
MFC r248446: find: Include nanoseconds when comparing timestamps of files.

When comparing to the timestamp of a given file using -newer, -Xnewer and
-newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the
comparison.

The primaries that compare a timestamp of a file to a given value (-Xmin,
-Xtime, -newerXt) continue to compare times in whole seconds.

Note that the default value 0 of vfs.timestamp_precision almost always
causes the nanoseconds part to be 0. However, touch -d can set a timestamp
to the microsecond regardless of that sysctl.

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

11 years agoMFC r248422:
kib [Sun, 24 Mar 2013 07:41:36 +0000 (07:41 +0000)]
MFC r248422:
Remove negative name cache entry pointing to the target name, which
could be instantiated while tdvp was unlocked.

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

11 years agoMFC r247387:
kib [Sat, 23 Mar 2013 22:41:48 +0000 (22:41 +0000)]
MFC r247387:
Inode block must not be read or written while cg block buffer is owned.

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

11 years agoMFC of 246876 and 246877
mckusick [Sat, 23 Mar 2013 21:56:19 +0000 (21:56 +0000)]
MFC of 246876 and 246877

MFC: 246876:

Add barrier write capability to the VFS buffer interface. A barrier
write is a disk write request that tells the disk that the buffer
being written must be committed to the media along with any writes
that preceeded it before any future blocks may be written to the drive.

Barrier writes are provided by adding the functions bbarrierwrite
(bwrite with barrier) and babarrierwrite (bawrite with barrier).

Following a bbarrierwrite the client knows that the requested buffer
is on the media. It does not ensure that buffers written before that
buffer are on the media. It only ensure that buffers written before
that buffer will get to the media before any buffers written after
that buffer. A flush command must be sent to the disk to ensure that
all earlier written buffers are on the media.

Reviewed by: kib
Tested by:   Peter Holm

MFC 246877:

The UFS2 filesystem allocates new blocks of inodes as they are needed.
When a cylinder group runs short of inodes, a new block for inodes is
allocated, zero'ed, and written to the disk. The zero'ed inodes must
be on the disk before the cylinder group can be updated to claim them.
If the cylinder group claiming the new inodes were written before the
zero'ed block of inodes, the system could crash with the filesystem in
an unrecoverable state.

Rather than adding a soft updates dependency to ensure that the new
inode block is written before it is claimed by the cylinder group
map, we just do a barrier write of the zero'ed inode block to ensure
that it will get written before the updated cylinder group map can
be written. This change should only slow down bulk loading of newly
created filesystems since that is the primary time that new inode
blocks need to be created.

Reported by: Robert Watson
Reviewed by: kib
Tested by:   Peter Holm

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

11 years agoMFC r246824,r246952: setbuf(3): Bring BUGS section up to date.
jilles [Sat, 23 Mar 2013 16:06:20 +0000 (16:06 +0000)]
MFC r246824,r246952: setbuf(3): Bring BUGS section up to date.

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

11 years agoMFC r248252: libc: Avoid SIGPIPE when nscd closes the connection
jilles [Sat, 23 Mar 2013 16:02:49 +0000 (16:02 +0000)]
MFC r248252: libc: Avoid SIGPIPE when nscd closes the connection
unexpectedly.

It is almost always a bug if nscd closes the connection unexpectedly but
programs should not be killed with SIGPIPE for it.

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

11 years agoMFC r246641: fts: Use O_DIRECTORY when opening name that might be changed by
jilles [Sat, 23 Mar 2013 15:50:34 +0000 (15:50 +0000)]
MFC r246641: fts: Use O_DIRECTORY when opening name that might be changed by
attacker.

There are uncommon cases where fts_safe_changedir() may be called with a
non-NULL name that is not "..". Do not block or worse if an attacker put (a
symlink to) a fifo or device where a directory used to be.

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

11 years agoMFC r246823:
pluknet [Sat, 23 Mar 2013 03:28:20 +0000 (03:28 +0000)]
MFC r246823:

Remove write only assignments and thus fix the build after struct bufarea
TAILQ conversion (r246812).

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

11 years agoMFS of 246812:
mckusick [Fri, 22 Mar 2013 22:50:48 +0000 (22:50 +0000)]
MFS of 246812:

Update fsck_ffs buffer cache manager to use TAILQ macros.
No functional changes.

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

11 years agoMFS of 246289:
mckusick [Fri, 22 Mar 2013 22:40:16 +0000 (22:40 +0000)]
MFS of 246289:

For UFS2 i_blocks is unsigned. The current "sanity" check that it
has gone below zero after the blocks in its inode are freed is a
no-op which the compiler fails to warn about because of the use of
the DIP macro. Change the sanity check to compare the number of
blocks being freed against the value i_blocks. If the number of
blocks being freed exceeds i_blocks, just set i_blocks to zero.

Reported by: Pedro Giffuni (pfg@)

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

11 years agoMFC r240870 (pjd):
mm [Fri, 22 Mar 2013 07:57:28 +0000 (07:57 +0000)]
MFC r240870 (pjd):
It is possible to recursively destroy snapshots even if the snapshot
doesn't exist on a dataset we are starting from. For example if we
have the following configuration:

tank
tank/foo
tank/foo@snap
tank/bar
tank/bar@snap

We can execute:

# zfs destroy -t tank@snap

eventhough tank@snap doesn't exit.

Unfortunately it is not possible to do the same with recursive rename:

# zfs rename -r tank@snap tank@pans
cannot open 'tank@snap': dataset does not exist

...until now. This change allows to recursively rename snapshots even if
snapshot doesn't exist on the starting dataset.

Sponsored by: rsync.net

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

11 years agoMFC r248493:
mm [Fri, 22 Mar 2013 07:30:36 +0000 (07:30 +0000)]
MFC r248493:
Plug memory leak in dsl_check_snap_cb()
This was unnoticed because the function is very rarely used.

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

11 years agoMFV r248595:
delphij [Thu, 21 Mar 2013 23:37:35 +0000 (23:37 +0000)]
MFV r248595:

 - Integrate OpenSSL revisions
   fb092ef4fca897344daf7189526f5f26be6487ce,
   a93cc7c57333f4538cbcdedd2e961a5a38caa52d, and
   76c61a5d1adb92388f39e585e4af860a20feb9bb.

   This removes the newly added orig_len field of SSL3_RECORD and
   restored ABI.

Approved by: benl

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

11 years ago- Fix two possible overflows when testing if ELF program headers are on
tijl [Thu, 21 Mar 2013 16:15:34 +0000 (16:15 +0000)]
- Fix two possible overflows when testing if ELF program headers are on
  the first page:
  1. Cast uint16_t operands in a multiplication to unsigned int because
     otherwise the implicit promotion to int results in a signed
     multiplication that can overflow and the behaviour on integer
     overflow is undefined.
  2. Replace (offset + size > PAGE_SIZE) with (size > PAGE_SIZE - offset)
     because the sum may overflow.
- Use the same tests to see if the path to the interpreter is on the first
  page. There's no overflow here because size is already limited by
  MAXPATHLEN, but the compiler optimises the new tests better. Also fix an
  off-by-one error.
- Simplify tests to see if an ELF note program header is on the first page.
  This also fixes an off-by-one error.

Reviewed by: kib

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

11 years agoMFC r248180:
ae [Wed, 20 Mar 2013 09:12:28 +0000 (09:12 +0000)]
MFC r248180:
  Take the inpcb rlock before calculating checksum, it was accidentally
  moved in r191672.

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

11 years agoMFC r242845, r247592:
mm [Wed, 20 Mar 2013 08:26:16 +0000 (08:26 +0000)]
MFC r242845, r247592:

MFC r242845 (delphij):
  Illumos r13840:97fd5cdf328a:
    3145 single-copy arc
    3212 ztest: race condition between vdev_online() and spa_vdev_remove()

  Illumos r13849:3468a95b27cd:
    3258 ztest's use of file descriptors is unstable

MFC r247592 (delphij):
  Import a fix tighten assertion on SPA versions from vendor (Illumos).

  Illumos ZFS issue:
    3543 Feature flags causes assertion in spa.c to miss certain cases

Approved by: delphij

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

11 years agoMerge r247842.
melifaro [Wed, 20 Mar 2013 07:20:00 +0000 (07:20 +0000)]
Merge r247842.

Write lock is not required for find&compare operation.

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

11 years agoMFC 247870:
bryanv [Wed, 20 Mar 2013 05:49:09 +0000 (05:49 +0000)]
MFC 247870:

    Remove the virtio dependency entry for the VirtIO device drivers. This
    will prevent the kernel from linking if the device driver are included
    without the virtio module. Remove pci and scbus for the same reason.

    Also explain the relationship and necessity of the virtio and virtio_pci
    modules. Currently in FreeBSD, we only support VirtIO PCI, but it could
    be replaced with a different interface (like MMIO) and the device
    (network, block, etc) will still function.

Approved by: grehan (mentor)

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

11 years agoRegen for r248532.
jkim [Tue, 19 Mar 2013 20:20:00 +0000 (20:20 +0000)]
Regen for r248532.

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

11 years agoMFC: r234352
jkim [Tue, 19 Mar 2013 20:18:30 +0000 (20:18 +0000)]
MFC: r234352

Implement pipe2 syscall for Linuxulator.

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

11 years agoRevert r248352:
brooks [Tue, 19 Mar 2013 20:00:34 +0000 (20:00 +0000)]
Revert r248352:

>   Replace all known uses of ln in the build process with appropriate
>   install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
>   variables.

This breaks the assumption mergemaster and etcupdate that no new
features of tools will be required to run "make distribution" or it's
prerequisites.

Plotting a way forward will take some time and nothing in 9-STABLE
depends on INSTALL_LINK and INSTALL_SYMLINK yet so backing this out seem
like the right short-term approach.

PR: misc/177055

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

11 years agoMerge r248112.
melifaro [Tue, 19 Mar 2013 13:36:19 +0000 (13:36 +0000)]
Merge r248112.

Document netstat -Q flags meaning.

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

11 years agoMerge r247666, r247712, r247811.
melifaro [Tue, 19 Mar 2013 13:29:01 +0000 (13:29 +0000)]
Merge r247666, r247712, r247811.

Fix ipfw table argument parsing/printing.
Fix style.

PR: kern/175909
Submitted by: Daniel Hagerty <hag@linnaean.org>

Implement buffer size checking in ipfw(8) add cmd.

PR: bin/65961
Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru>

Do not suddenly fail on some rulesets if -n (syntax check only) is specified
and ipfw(4) module is not loaded.

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

11 years agoMFC r247626.
melifaro [Tue, 19 Mar 2013 12:42:14 +0000 (12:42 +0000)]
MFC r247626.

Fix callout expiring dynamic rules.

PR: kern/175530
Submitted by: Vladimir Spiridenkov <vs@gtn.ru>

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

11 years agoMFC r247279
sbruno [Tue, 19 Mar 2013 11:07:12 +0000 (11:07 +0000)]
MFC r247279

The 5300 series ciss(4) board does not work in performant mode with our
currnet initialization sequence.  Set it to simple mode only so that
systems can be updated from stable/7 to newer installations.

At some point, we should figure out why we cannot initialize performant
mode on this board.

PR: kern/153361
Reviewed by: scottl
Obtained from: Yahoo! Inc.

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

11 years agoMFC r248279:
delphij [Mon, 18 Mar 2013 20:36:25 +0000 (20:36 +0000)]
MFC r248279:

Correct type for DIOCGSTRIPESIZE.  Without this there
would be a stack overflow which will crash the program
later.

PR: bin/176953
Submitted by: r4721 tormail org

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

11 years agoMFH (r248465): revert upstream decommissioning of authorized_keys2
des [Mon, 18 Mar 2013 15:27:59 +0000 (15:27 +0000)]
MFH (r248465): revert upstream decommissioning of authorized_keys2

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

11 years agoMFC r247187,247265,247348,247398,247540,247585,247852,248265,248267
mm [Sat, 16 Mar 2013 08:16:11 +0000 (08:16 +0000)]
MFC r247187,247265,247348,247398,247540,247585,247852,248265,248267
Merge various ZFS improvements and bugfixes

MFC r247187:
  Import vendor change to avoid "unitialized variable" warnings.

  Illumos ZFS issues:
  3522 zfs module should not allow uninitialized variables

MFC r247265:
  Merge the ZFS I/O deadman thread from vendor (illumos).
  This feature panics the system on hanging ZFS I/O, helps debugging
  and resumes failed service.

  The panic behavior can be controlled with the loader-only tunables:
  vfs.zfs.deadman_enabled (enable or disable panic on stalled ZFS I/O)
  vfs.zfs.deadman_synctime (expiration time for stalled ZFS I/O)

  By default, ZFS I/O deadman is enabled by default on amd64 and i386
  excluding virtual guest machines.

MFC r247348:
  Be more verbose on ZFS deadman I/O panic
  Patch suggested upstream.

MFC r247398:
  Import metaslab_sync() speedup from vendor (illumos).

  Illumos ZFS issues:
  3552 condensing one space map burns 3 seconds of CPU in spa_sync() thread
  3564 spa_sync() spends 5-10% of its time in metaslab_sync() (when not
   condensing)
  3578 transferring the freed map to the defer map should be constant time
  3579 ztest trips assertion in metaslab_weight()

MFC r247540:
  Fix the zfs_ioctl compat layer to support zfs_cmd size change introduced
  in r247265 (ZFS deadman thread). Both new utilities now support the old
  kernel and new kernel properly detects old utilities.

  For future backwards compatibility, the vfs.zfs.version.ioctl read-only
  sysctl has been introduced. With this sysctl zfs utilities will be able
  to detect the ioctl interface version of the currently loaded zfs module.

MFC r247585:
  Merge new read-only zfs properties from vendor (illumos)

  Illumos ZFS issues:
  3588 provide zfs properties for logical (uncompressed) space used and
       referenced

MFC r247852:
  Import ZFS bpobj bugfix from vendor.

  Illumos ZFS issues:
  3603 panic from bpobj_enqueue_subobj()
  3604 zdb should print bpobjs more verbosely

MFC r248265:
  Update zfs.8 manpage date (missing in r247585)

MFC r248267:
  Import minor ZFS changes from vendor

  Illumos ZFS issues:
  3604 zdb should print bpobjs more verbosely (fix zdb hang)
  3606 zpool status -x shouldn't warn about old on-disk format

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

11 years agoMFC r245887
brooks [Fri, 15 Mar 2013 22:31:51 +0000 (22:31 +0000)]
MFC r245887

Only install manpages and html documentation in the ncurses/*w (wchar)
builds so that it is only installed once.  This is consistent with the
existing decision to only install headers in the that case.

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

11 years agoMFC r245886,245911
brooks [Fri, 15 Mar 2013 22:26:19 +0000 (22:26 +0000)]
MFC r245886,245911

Don't install telnet.h if it will be installed by libtelnet.

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

11 years agoMFC: 242030
alfred [Fri, 15 Mar 2013 22:24:34 +0000 (22:24 +0000)]
MFC: 242030

Show how many times we are blocked waiting for mbufs.

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

11 years agoMFC r245882,245898
brooks [Fri, 15 Mar 2013 22:20:45 +0000 (22:20 +0000)]
MFC r245882,245898

Reorder so that NO_MAN is declared before bsd.own.mk is included and thus
has an effect (not installed a g++.1 manpage over the g++.1(.gz) link
created in ../cc).

bsd.own.mk needs to be included before Makefil.inc so MK_ARM_EABI is defined

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

11 years agoMFC r245853:
brooks [Fri, 15 Mar 2013 22:14:41 +0000 (22:14 +0000)]
MFC r245853:

manctl is conditionally added to SUBDIRS later on.  Don't unconditionally
include in the main list.

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

11 years agoMFC r245753:
brooks [Fri, 15 Mar 2013 21:45:49 +0000 (21:45 +0000)]
MFC r245753:

Install the template info directory with mode 644 instead of 444 to
allow it to be updated by its owner without resorting to privilege.

This is required by upcoming changes to allow installworld to work as
a non-root user.

Sponsored by:   DARPA, AFRL

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

11 years agoMFC r245752,246913,247162
brooks [Fri, 15 Mar 2013 21:32:40 +0000 (21:32 +0000)]
MFC r245752,246913,247162

Replace all known uses of ln in the build process with appropriate
install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK
variables.

Sponsored by: DARPA, AFRL

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

11 years agoMFC r245571,245580:
brooks [Fri, 15 Mar 2013 20:52:00 +0000 (20:52 +0000)]
MFC r245571,245580:

In preparation for logging metadata about each filesystem object,
refactor the link section of distrib-dirs to alwasy install to a full
path (the link contents remain relative as they should).

Eliminate the use of the "rm -r[f] <foo>; ln -s <bar> <foo>" pattern in
favor of "ln -sfh <bar> <foo>".  None of these links could be directories
on a system installed in the last decade.

Sponsored by:   DARPA, AFRL

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

11 years agoMFC r245561,245885:
brooks [Fri, 15 Mar 2013 20:34:10 +0000 (20:34 +0000)]
MFC r245561,245885:

Add a new LIBRARIES_ONLY make variable to disable the build and install
of files other than the actual libraries.

Use LIBRARIES_ONLY to supress the inclusion of files in the lib32
distribution that are duplicates of files in base.

Sponsored by: DARPA, AFRL
Reviewed by: emaste

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

11 years agoMFC r241311:
brooks [Fri, 15 Mar 2013 20:26:51 +0000 (20:26 +0000)]
MFC r241311:

Change 32-bit library builds by removing use of make -E and passing AS,
CC, CXX and LD on the commandline of the sub-make instead of in the
environment of the sub-make.

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

11 years agoMFC r245513,245514,245515:
brooks [Fri, 15 Mar 2013 19:50:21 +0000 (19:50 +0000)]
MFC r245513,245514,245515:

The last section 1aout manpage was installed no later than July 2002.
Remove all support for them.

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

11 years agoBump __FreeBSD_version for install -l, -M, -N and related flags as well
brooks [Fri, 15 Mar 2013 19:32:37 +0000 (19:32 +0000)]
Bump __FreeBSD_version for install -l, -M, -N and related flags as well
as cat -l.

This is a notional MFC of r245313,246084.

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

11 years agoMFC all features as of r248336:
brooks [Fri, 15 Mar 2013 19:27:27 +0000 (19:27 +0000)]
MFC all features as of r248336:

The user visable feature is from r246083:

Add -l option to cat(1). This option causes cat(1) to use fcntl(2) to
set an exclusive advisory lock on stdout.  This will be used to guarantee
orderly writing to METALOG.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD (mason)

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

11 years agoMFC r245265,245271,245309:
brooks [Fri, 15 Mar 2013 19:16:35 +0000 (19:16 +0000)]
MFC r245265,245271,245309:

Rather than using zic to both compile and install zoneinfo files,
generate the files during the build and install them with install(1).
This was the one place in installworld where files (vs links) were
installed by a tool other than install.

Reviewed by: edwin, jilles

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

11 years agoMFC:
brooks [Fri, 15 Mar 2013 18:49:39 +0000 (18:49 +0000)]
MFC:
r241684,245316,245318,245440,245563,245565,245622,245754,246092,246096,246602

r241684:
Allow LOCAL_DIRS to install files in directories not found in the
system mtree files via a LOCAL_MTREE variable which contains a list of
mtree files to be applyed along with the base mtree files to the tmp
root and DESTDIR.

r245440:
Add an option DB_FROM_SRC to use src/etc's user/group databases when
installing.  This allows things like running installworld for 10-CURRENT
on a 9.0-RELEASE system without adding extra users and groups to the
passwd and group files.

To prevent potentially risky uid/gid mismatches on systems with
non-standard local values, require that DESTDIR be set if DB_FROM_SRC is
set.

Sponsored by:   DARPA, AFRL
Reviewed by:    peter

r245565:
Rework the mtree portion of etc/Makefile's distrib-dirs target to run
mtree in a shell loop so there is only one mtree commandline.  Move the
implementation of LOCAL_MTREE into etc/Makefile.

Sponsored by:   DARPA, AFRL

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

11 years agoRedo r241528:
delphij [Fri, 15 Mar 2013 18:10:38 +0000 (18:10 +0000)]
Redo r241528:

MFC r240339: openssl: change SHLIB_VERSION_NUMBER to reflect the reality.

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

11 years agoMFC the second half of r246784:
brooks [Fri, 15 Mar 2013 15:34:09 +0000 (15:34 +0000)]
MFC the second half of r246784:

- Fix libmd dependency.  It is needed in the bootstrap library list because
  usr.bin/xinstall depends on it.

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

11 years agoMFC r245751,245893:
brooks [Fri, 15 Mar 2013 15:21:34 +0000 (15:21 +0000)]
MFC r245751,245893:

r245751:
Implement the -l option using ln(1) to facilitate boostrapping.

Ignore the new options -D, -h, -T, and -U.  Adjust -M support to ignore
an argument.

Sponsored by: DARPA, AFRL
Reviewed by: ian, ray, rpaulo

r245893:
Use = not == in test arguments.

Submitted by: Christoph Mallon <christoph.mallon@gmx.de>

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

11 years agoMFC all changes to install(1) through r246784. Notable functional
brooks [Fri, 15 Mar 2013 15:19:33 +0000 (15:19 +0000)]
MFC all changes to install(1) through r246784.  Notable functional
changes are:

r245617:
Introduce six new options from NetBSD:
 * -M <metalog>   Log metadata in mtree format.
 * -D <destdir>   Log paths relative to <destdir>.
 * -h <hash>      Log digest of type <hash>.
 * -T <tags>      Specify which mtree tags to log.
 * -l <linkflag>  Create hard or symbolic links (allows logging).
 * -U             Install without root privileges (owner, group, mode,
                  and flags can be logged via -M

NOTE: In the interest of compatibility with NetBSD and because it is the
obvious letter, the nearly useless -M option (disable mmap) has been
repurposed.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD
Reviewed by: bz

r245312:
Implement the -N <dbdir> option which allows an alternate passwd and
group file to be used.  This is useful for installing on systems where
a user or group does not currently exist.

Sponsored by: DARPA, AFRL
Obtained from: NetBSD

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

11 years agoMFC r245311:
brooks [Fri, 15 Mar 2013 14:53:29 +0000 (14:53 +0000)]
MFC r245311:

Add pwcache(3) and vis(3) to libegacy as install(1) is about to grow a
dependency on them.

Sponsored by: DARPA, AFRL

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

11 years agoAdd support for installation directly via HTTP.
dteske [Fri, 15 Mar 2013 05:00:51 +0000 (05:00 +0000)]
Add support for installation directly via HTTP.

Submitted by: Rick Miller <vmiller@hostileadmin.com>
Reviewed by: jkh

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

11 years agoMerge of current of tzdata2013b
edwin [Fri, 15 Mar 2013 01:02:35 +0000 (01:02 +0000)]
Merge of current of tzdata2013b

Lots of historical data added.

Morocco: add DST rules for the coming years
Cuba: Doing DST in 2013.
Chili: Will do DST in 2013 as it seems

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

11 years agoMFC all change to makefs through r247052. Key functional changes
brooks [Thu, 14 Mar 2013 22:57:27 +0000 (22:57 +0000)]
MFC all change to makefs through r247052.  Key functional changes
include:

r239562:
Add -p flag to create the image as a sparse file.

r242501:
If no contents keyword is specified, the default for files is
the named file.

r247041:
Add a -D flag that causes duplicate entries in an mtree manifest to be
treated as warnings rather than errors.

r247042:
Fix the -N option in manifest mode by using pwcache(3).  This also
speeds up image creation appreciably.

r247043:
Allow '.' components in manifest paths.  They are always the first
component of mtree -C and install -M output and are easily skipped.

r247052:
Support hardlinks in manifest files by the same logic as the treewalk
code.

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

11 years agoMFC of the E1000 drivers including revisions:
jfv [Thu, 14 Mar 2013 22:55:59 +0000 (22:55 +0000)]
MFC of the E1000 drivers including revisions:
------------------------------------------------------------------------
r238765 | luigi | 2012-07-25 04:28:15 -0700 (Wed, 25 Jul 2012) | 7 lines
Use legacy interrupts as a default. This gives up to 10% speedup
when used in qemu (and this driver is for non-PCIe cards,
so probably its largest use is in virtualized environments).
------------------------------------------------------------------------
r238770 | luigi | 2012-07-25 05:51:33 -0700 (Wed, 25 Jul 2012) | 4 lines
remove some extra testing code that slipped into the previous commit
------------------------------------------------------------------------
r238953 | jfv | 2012-07-31 11:44:10 -0700 (Tue, 31 Jul 2012) | 6 lines
Clean up some unused leftover code from em
Make IRQ style a tuneable
Fix lock handling in the interrupt handler
------------------------------------------------------------------------
r238981 | sbruno | 2012-08-01 17:00:34 -0700 (Wed, 01 Aug 2012) | 9 lines
CPU_NEXT() already handles wrapping around to the beginning.  Also, in a
system with sparse CPU IDs, you can have a valid CPU ID > mp_ncpus (e.g. if
you have two CPUs 0 and 4, with mp_maxid == 4 and mp_ncpus == 2).
------------------------------------------------------------------------
r239105 | jfv | 2012-08-06 13:44:05 -0700 (Mon, 06 Aug 2012) | 5 lines
Correct the mq_start routine to avoid out-of-order
packet delivery, always enqueue when possible. Also
correct the DEPLETED test as multiple bits might be
set.  Thanks to Randall Stewart for the changes!
------------------------------------------------------------------------
r239109 | jfv | 2012-08-06 15:43:49 -0700 (Mon, 06 Aug 2012) | 6 lines
Make the polling interface in igb able to handle
multiqueue, and correct the rxdone handling. Update
the polling man page to include igb as well.
------------------------------------------------------------------------
r239304 | jfv | 2012-08-15 10:12:40 -0700 (Wed, 15 Aug 2012) | 10 lines
Customer report of a panic on boot due to the old
"m_getjcl:invalid cluster type" that occurred some
time back with the igb driver. This happens often when
booting over the net. I believe the NIC hardware is left
in a warm state when handed over to the driver, and a stray
RX interrupt happens earlier than the code is prepared for
it to happen. This change was verified to fix the problem,
its kind of a bandaid... but it is similar to what was done
in the igb code.
------------------------------------------------------------------------
r240693 | gavin | 2012-09-19 05:27:23 -0700 (Wed, 19 Sep 2012) | 5 lines
Switch some PCI register reads from using magic numbers to using the names
defined in pcireg.h
------------------------------------------------------------------------
r241856 | eadler | 2012-10-21 20:41:14 -0700 (Sun, 21 Oct 2012) | 7 lines
Now that device disabling is generic, remove extraneous code from the
device drivers that used to provide this feature.
------------------------------------------------------------------------
r241885 | eadler | 2012-10-22 06:06:09 -0700 (Mon, 22 Oct 2012) | 7 lines
This isn't functionally identical.  In some cases a hint to disable
unit 0 would in fact disable all units.  This reverts r241856
------------------------------------------------------------------------
r243570 | glebius | 2012-11-26 12:03:57 -0800 (Mon, 26 Nov 2012) | 14 lines
  drbr_enqueue() awlays consumes mbuf, no matter did it
fail or not. The mbuf pointer is no longer valid, so
can't be reused after.
  Fix igb_mq_start() where mbuf pointer was used after
drbr_enqueue().
  This eventually leads us to all invocations of
igb_mq_start_locked() called with third argument as NULL.
This allows us to simplify this function.
------------------------------------------------------------------------
r245334 | smh | 2013-01-12 08:05:55 -0800 (Sat, 12 Jan 2013) | 9 lines
Fixed mbuf free when receive structures fail to allocate.
This prevents quad igb card on high core machines, without any nmbcluster or
igb queue tuning wedging the boot process if all nics are configured.
------------------------------------------------------------------------
r246128 | sbz | 2013-01-30 10:01:20 -0800 (Wed, 30 Jan 2013) | 5 lines
Use DEVMETHOD_END macro defined in sys/bus.h instead of {0, 0} sentinel on device_method_t arrays
------------------------------------------------------------------------
r246482 | rrs | 2013-02-07 07:20:54 -0800 (Thu, 07 Feb 2013) | 30 lines
This fixes a out-of-order problem with several
of the newer drivers. The basic problem was
that the driver was pulling the mbuf off the
drbr ring and then when sending with xmit(), encounting
a full transmit ring. Thus the lower layer
xmit() function would return an error, and the
drivers would then append the data back on to the ring.
For TCP this is a horrible scenario sure to bring
on a fast-retransmit.

The fix is to use drbr_peek() to pull the data pointer
but not remove it from the ring. If it fails then
we either call the new drbr_putback or drbr_advance
method. Advance moves it forward (we do this sometimes
when the xmit() function frees the mbuf). When
we succeed we always call advance. The
putback will always copy the mbuf back to the top
of the ring. Note that the putback *cannot* be used
with a drbr_dequeue() only with drbr_peek(). We most
of the time, in putback, would not need to copy it
back since most likey the mbuf is still the same, but
sometimes xmit() functions will change the mbuf via
a pullup or other call. So the optimial case for
the single consumer is to always copy it back. If
we ever do a multiple_consumer (for lagg?) we
will  need a test and atomic in the put back possibly
a seperate putback_mc() in the ring buf.
------------------------------------------------------------------------
r247064 | jfv | 2013-02-20 16:25:45 -0800 (Wed, 20 Feb 2013) | 19 lines
Refresh on the shared code for the E1000 drivers.
  - bear with me, there are lots of white space changes, I would not
    do them, but I am a mere consumer of this stuff and if these drivers
    are to stay in shape they need to be taken.

em driver changes: support for the new i217/i218 interfaces

igb driver changes:
  - TX mq start has a quick turnaround to the stack
  - Link/media handling improvement
  - When link status changes happen the current flow control state
    will now be displayed.
  - A few white space/style changes.

lem driver changes:
  - the shared code uncovered a bogus write to the RLPML register
    (which does not exist in this hardware) in the vlan code,this
    is removed.
------------------------------------------------------------------------

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

11 years agoMFC of the ixgbe driver including the follow revisions:
jfv [Thu, 14 Mar 2013 21:39:39 +0000 (21:39 +0000)]
MFC of the ixgbe driver including the follow revisions:

235547,235964,241616,241646,241856,241885,242403,
242421,243714,243716,243718,243721,243724,243725,
243728,243729,243733,243735,243736,243741,243833,
244514,246128,246482,247035,247056,247822,247823

Note: 246482 includes only the changes in the ixgbe driver
      and the buf_ring supporting code in if_var.h and buf_ring.h
      igb and em will be seperate commits, and non-Intel drivers
      can commit the changes at will.

Reviewed by:rss, jhb

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

11 years agoMFC r247960:
dim [Thu, 14 Mar 2013 21:18:19 +0000 (21:18 +0000)]
MFC r247960:

  Make ctfconvert work correctly on clang-compiled object files.  Clang
  puts the full original source filename in the STT_FILE entry of the ELF
  symbol table, while gcc saves only the basename.

  Since the DWARF DW_AT_name attribute contains the full source filename,
  both for clang and gcc, ctfconvert takes just the basename of it, for
  matching with the STT_FILE entry.  So when attempting to match with such
  an entry, use its basename, if necessary.

  Reported by: avg

MFC r247962:

  Fix error in r247960: actually assign the basename to match.iim_file.

  Pointed out by: avg
  Pointy hat to: dim

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

11 years agoMerge OpenSSL 0.9.8y. This is a direct commit to stable/9 as HEAD is on a
delphij [Thu, 14 Mar 2013 17:48:07 +0000 (17:48 +0000)]
Merge OpenSSL 0.9.8y.  This is a direct commit to stable/9 as HEAD is on a
different release now.

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

11 years agoMFC r247918:
mav [Thu, 14 Mar 2013 05:24:25 +0000 (05:24 +0000)]
MFC r247918:
Fix panic when Secondary_Element_Count == 1 and Secondary_Element_Seq
is not set (255).

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

11 years agoMFC r247048.
gibbs [Wed, 13 Mar 2013 17:37:13 +0000 (17:37 +0000)]
MFC r247048.

Orphaned processes that are being traced are killed by the
kernel.  Properly restore, continue, and detach from processes
being DTraced when DTrace exits with an error so the program
being inspected is not terminated.

cddl/contrib/opensolaris/cmd/dtrace/dtrace.c:
In fatal(), the generic error handler, close the DTrace
handle as is done in the "probe/script" error handler
dfatal().  fatal() can be invoked after DTrace attaches
to processes (e.g. a script specified by command line
argument can't be found) and closing the handle will
release them.

Submitted by: Spectra Logic Corporation
Reviewed by: rpaulo, gnn

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

11 years agoMFC kernel fixes to userland dtrace support.
gibbs [Wed, 13 Mar 2013 17:34:42 +0000 (17:34 +0000)]
MFC kernel fixes to userland dtrace support.

r247049
-------
Avoid panic when tearing down the DTrace pid provider for a
process that has crashed.

sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c:
In fasttrap_pid_disable(), we cannot PHOLD the proc
structure for a process that no longer exists, but
we still have other, fasttrap specific, state that
must be cleaned up for probes that existed in the
dead process.  Instead of returning early if the
process related to our probes isn't found,
conditionalize the locking and carry on with a NULL
proc pointer.  The rest of the fasttrap code already
understands that a NULL proc is possible and does
the right things in this case.

r247820
-------
Fix assertion failure when using userland DTrace probes from
the pid provider on a kernel compiled with INVARIANTS.

sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c:
In fasttrap_probe_pid(), attempts to write to the
address space of the thread that fired the probe
must be performed with the process of the thread
held.  Use _PHOLD() to ensure this is the case.

In fasttrap_probe_pid(), use proc_write_regs() instead
of calling set_regs() directly.  proc_write_regs()
performs invariant checks to verify the calling
environment of set_regs().  PROC_LOCK()/UNLOCK() around
the call to proc_write_regs() so that it's invariants
are satisfied.

Sponsored by: Spectra Logic Corporation

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

11 years agoMFC r245742:
nwhitehorn [Wed, 13 Mar 2013 14:01:58 +0000 (14:01 +0000)]
MFC r245742:

Fix typo and simplify condition.

Submitted by: Christoph Mallon <christoph dot mallon at gmx dot de>
Missed MFC pointed out by: Garrett Cooper

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

11 years agoMFC r245700,245701,245702,245706,245707,245758,245759,245760,245792,245796,
nwhitehorn [Wed, 13 Mar 2013 13:50:50 +0000 (13:50 +0000)]
MFC r245700,245701,245702,245706,245707,245758,245759,245760,245792,245796,
245980,246013:

Automated installation support for bsdinstall.

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

11 years agoMFC r245680:
nwhitehorn [Wed, 13 Mar 2013 13:45:47 +0000 (13:45 +0000)]
MFC r245680:

Make "Finish" the default choice in the partition editor. This lets you
successfully complete an installation with all defaults by pressing
Enter repeatedly until your machine reboots.

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

11 years agoRecord merge of r228048.
nwhitehorn [Wed, 13 Mar 2013 13:44:08 +0000 (13:44 +0000)]
Record merge of r228048.

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

11 years agoMFC miscellaneous bug fixes (r228042,228192,230522,232531,233473,233904,
nwhitehorn [Wed, 13 Mar 2013 13:41:28 +0000 (13:41 +0000)]
MFC miscellaneous bug fixes (r228042,228192,230522,232531,233473,233904,
235228,239500,241902,242188,243832,243854,244858,245333). This is mostly
documentation fixes and updates to the default FTP list that got left
behind in -CURRENT.

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

11 years agoMFC r244209:
ae [Wed, 13 Mar 2013 10:45:36 +0000 (10:45 +0000)]
MFC r244209:
  Add an #include guard to the sys/fnv_hash.h.

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

11 years agoMFC r247389:
kib [Wed, 13 Mar 2013 10:04:47 +0000 (10:04 +0000)]
MFC r247389:
Make recursive getblk() slightly more useful.

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

11 years agoMFC r247388:
kib [Wed, 13 Mar 2013 10:01:05 +0000 (10:01 +0000)]
MFC r247388:
Work around the hold of references to the struct dquot by the freeblk
workitems for some time at unmount.

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

11 years agoMFC r233463 (by trasz):
kib [Wed, 13 Mar 2013 09:54:11 +0000 (09:54 +0000)]
MFC r233463 (by trasz):
Remove unused define.

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

11 years agoMFC r248214:
markj [Tue, 12 Mar 2013 19:28:41 +0000 (19:28 +0000)]
MFC r248214:
  Revert r246917, as it is causing incorrect behaviour as reported on
  freebsd-current.

Approved by: emaste (co-mentor)

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

11 years agoMFC r247815:
mav [Mon, 11 Mar 2013 07:53:51 +0000 (07:53 +0000)]
MFC r247815:
Add quirk to enable headphones redirection on Lenovo X220.

PR: kern/174876

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

11 years agoMFC r247906:
lstewart [Mon, 11 Mar 2013 06:09:08 +0000 (06:09 +0000)]
MFC r247906:

The hashmask returned by hashinit() is a valid index in the returned hash array.
Fix a siftr(4) potential memory leak and INVARIANTS triggered kernel panic in
hashdestroy() by ensuring the last array index in the flow counter hash table is
flushed of entries.

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

11 years agoMFC r247534 (by ru): Fixed documented prototype of kinfo_getproc(3).
pluknet [Sun, 10 Mar 2013 17:50:19 +0000 (17:50 +0000)]
MFC r247534 (by ru): Fixed documented prototype of kinfo_getproc(3).

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

11 years agoMFC r247953:
dim [Sun, 10 Mar 2013 15:02:30 +0000 (15:02 +0000)]
MFC r247953:

Make c99(1) invoke /usr/bin/cc with argv[0] set to "/usr/bin/cc" instead
of just "cc", since there is no reason to cause additional path searches
in this case.

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

11 years agoMFC r247951:
dim [Sun, 10 Mar 2013 15:01:06 +0000 (15:01 +0000)]
MFC r247951:

Make c89(1) invoke /usr/bin/cc with argv[0] also set to /usr/bin/cc,
similar to what c99(1) does, to prevent "c89: illegal option -- 1"
messages, when clang is /usr/bin/cc.

Reported by: tijl

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

11 years agoMFC r247725:
mav [Sun, 10 Mar 2013 13:52:19 +0000 (13:52 +0000)]
MFC r247725:
Fix typos in hint names.

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

11 years agoUpdate ports count and size in sysinstall(8).
gjb [Sat, 9 Mar 2013 21:21:30 +0000 (21:21 +0000)]
Update ports count and size in sysinstall(8).
This is a direct commit to stable/9.

Submitted by: ryusuke
Approved by: kib (implicit)

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

11 years agoMFC: r227309 (partial)
marius [Sat, 9 Mar 2013 02:36:32 +0000 (02:36 +0000)]
MFC: r227309 (partial)

Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.

The SYSCTL_NODE macro defines a list that stores all child-elements of
that node. If there's no SYSCTL_DECL macro anywhere else, there's no
reason why it shouldn't be static.

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

11 years agoMFC: r243857 (partial)
marius [Sat, 9 Mar 2013 00:39:54 +0000 (00:39 +0000)]
MFC: r243857 (partial)

Mechanically substitute flags from historic mbuf allocator with
malloc(9) flags in sys/dev.

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

11 years agoMFC r244631
rstone [Fri, 8 Mar 2013 21:07:01 +0000 (21:07 +0000)]
MFC r244631
  Correct a series of errors in the hand-rolled locking for drace_debug.c:

  - Use spinlock_enter()/spinlock_exit() to prevent a thread holding a
    debug lock from being preempted to prevent other threads waiting
    on that lock from starvation.

  - Handle the possibility of CPU migration in between the fetch of curcpu
    and the call to spinlock_enter() by saving curcpu in a local variable.

  - Use memory barriers to prevent reordering of loads and stores of the
    data protected by the lock outside of the critical section

  - Eliminate false sharing of the locks by moving them into the structures
    that they protect and aligning them to a cacheline boundary.

  - Record the owning thread in the lock to make debugging future problems
    easier.

  Reviewed by:  rpaulo (initial version)

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

11 years agoMFC r226452 (by marcel@)
rstone [Fri, 8 Mar 2013 21:03:35 +0000 (21:03 +0000)]
MFC r226452 (by marcel@)

  Define dtrace_cmpset_long in terms of atomic_cmpset_long
  and not by virtue of inline assembly. Now this file
  compiles on all supported architectures.

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

11 years agoMFC r241009
rstone [Fri, 8 Mar 2013 19:36:36 +0000 (19:36 +0000)]
MFC r241009
  Ensure that all cases that enqueue a netgraph item for delivery by a
  ngthread properly set the item's depth to 1.  In particular, prior to this
  change if ng_snd_item failed to acquire a lock on a node, the item's depth
  would not be set at all.  This fix ensures that the error code from rcvmsg/
  rcvdata is properly passed back to the apply callback.  For example, this
  fixes a bug where an error from rcvmsg/rcvdata would not previously
  propagate back to a libnetgraph consumer when the message was queued.

  Reviewed by:  mav
  MFC after:    1 month
  Sponsored by: Sandvine Incorporated

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

11 years agoMFC r240923
rstone [Fri, 8 Mar 2013 19:01:26 +0000 (19:01 +0000)]
MFC r240923

  Some aac(4) adapters will always report that a direct access device is
  offline in response to a INQUIRY command that does not retreive vital
  product data(I personally have observed the behaviour on an Adaptec 2405
  and a 5805).  Force the peripheral qualifier to "connected" so that upper
  layers correctly recognize that a disk is present.

  This bug was uncovered by r216236.  Prior to that fix, aac(4) was
  accidentally clearing the peripheral qualifier for all inquiry commands.

  This fixes an issue where passthrough devices were not created for
  disks behind aac(4) controllers suffering from the bug.  I have
  verified that if a disk is not present that we still properly detect
  that and not create the passthrough device.

  Sponsored by: Sandvine Incorporated
  MFC after:    1 week

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

11 years agoMFC r231879,246799,247880,248059:
delphij [Fri, 8 Mar 2013 18:46:21 +0000 (18:46 +0000)]
MFC r231879,246799,247880,248059:

Update driver to version 4.6.95.0.

Submitted by: "Duvvuru,Venkat Kumar" <VenkatKumar.Duvvuru Emulex.Com>

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

11 years agoMFC: r247632
marius [Fri, 8 Mar 2013 12:57:58 +0000 (12:57 +0000)]
MFC: r247632

- Complete r231621 (MFC'ed to stable/9 in r232092) by also blacklisting the
  bridge used by VMware for PCIe devices. While at it, update the comment
  now that we know that MSI-X doesn't work with ESXi 5.1 for Intel 82576
  either and the underlying issue is a bug in the MSI-X allocation code of
  the hypervisor.
  Reported by: Harald Schmalzbauer
- Make the nomatch table const.

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

11 years agoMFC: r247601, r247621
marius [Fri, 8 Mar 2013 12:52:52 +0000 (12:52 +0000)]
MFC: r247601, r247621

- Correct an incorrect argument to shutdown_nice(9).
- Mark unused parameters as such.
- Use NULL instead of 0 for pointers.

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

11 years agoMFC: r247600, r247620
marius [Fri, 8 Mar 2013 12:50:29 +0000 (12:50 +0000)]
MFC: r247600, r247620

- While Netra X1 generally show no ill effects when registering a power
  fail interrupt handler, there seems to be either a broken batch of them
  or a tendency to develop a defect which causes this interrupt to fire
  inadvertedly. Given that apart from this problem these machines work
  just fine, add a tunable allowing the setup of the power fail interrupt
  to be disabled.
  While at it, remove the DEBUGGER_ON_POWERFAIL compile time option and
  make that behavior also selectable via the newly added tunable.
- Correct an incorrect argument to shutdown_nice(9).
- Mark unused parameters as such.
- Use NULL instead of 0 for pointers.

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