]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
11 years agoMFC r247396:
tijl [Tue, 5 Mar 2013 16:04:07 +0000 (16:04 +0000)]
MFC r247396:

Map libraries linked with -Ttext-segment=base_addr at base_addr.
Normal libraries have base address 0 and are unaffected by this change.

PR: 176216
Submitted by: Damjan Jovanovic <damjan.jov@gmail.com>
Reviewed by: kib

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

11 years agoMFC r247594:
delphij [Tue, 5 Mar 2013 06:43:54 +0000 (06:43 +0000)]
MFC r247594:

Fix a typo in mfi_stp_cmd() that would give wrong assignment.

Submitted by: Sascha Wildner <saw online de>
Obtained from: DragonFly rev 0dc98fff2206d7bb78ce5e07ac34d6954e4bd96a

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

11 years agoMFC r247443:
delphij [Tue, 5 Mar 2013 06:41:39 +0000 (06:41 +0000)]
MFC r247443:

Refresh vendor driver version which adds ARC-1224 support.

Many thanks to Areca for continuing to support FreeBSD.

Submitted by: 黃清隆 <ching2048 areca com tw>

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

11 years agoMFC r246134 ...
ian [Mon, 4 Mar 2013 16:50:01 +0000 (16:50 +0000)]
MFC r246134 ...

Improve devd startup time, by tweaking some string handling routines that are
heavily used when parsing config files.  Mostly these changes avoid making
temporary copies of the strings, and avoid doing byte at a time append
operations, on the most-used code path.

On a 1.2 GHz ARM processor this reduces the time to parse the config files
from 13 to 6 seconds.

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

11 years agoMFC r246361 ... bump .Dd for content change.
ian [Mon, 4 Mar 2013 16:44:19 +0000 (16:44 +0000)]
MFC r246361 ... bump .Dd for content change.

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

11 years agoMFC r247160
gallatin [Mon, 4 Mar 2013 15:32:38 +0000 (15:32 +0000)]
MFC r247160

  Bump mxge copyright.

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

11 years agoMFC r247159
gallatin [Mon, 4 Mar 2013 15:30:38 +0000 (15:30 +0000)]
MFC r247159
  Improvements for newer mxge nics:

  - Some mxge nics may store the serial number in the SN2 field of the
    EEPROM.  These will also have an SN=0 field, so parse the SN2 field,
    and give it precedence.

  - Skip MXGEFW_CMD_UNALIGNED_TEST on mxge nics which do not require it.
    This saves roughly 10ms per port at device attach time.

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

11 years agoMFC r247780:
dteske [Mon, 4 Mar 2013 11:40:52 +0000 (11:40 +0000)]
MFC r247780:

Fix VERBOSE reporting on results when removing _PATH_LOCALTIME for UTC option.

PR: bin/164976
Submitted by: dteske

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

11 years agoMFC r226775:
hrs [Mon, 4 Mar 2013 05:46:35 +0000 (05:46 +0000)]
MFC r226775:

- Add support for a "!" character in regex matching in devd(8).  It inverts
  the logic (true/false) of the matching.

- Add "!usbus[0-9]+" to IFNET ATTACH notification handler in the default
  devd.conf to prevent rc.d/netif from running when usbus[0-9]+ is attached.

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

11 years agoMFC r230520:
dteske [Sun, 3 Mar 2013 19:31:44 +0000 (19:31 +0000)]
MFC r230520:

Clean up reinstall option and remove duplicate code

- Move the reinstall logic to be before menus are initialised
  (menus are not needed when reinstalling a zonefile).

- Remove unnecessary re-initialization of path_db.

- Update variable name and error message because we now use the
  zone name relative to /usr/share/zoneinfo, not the full path.

PR: bin/164041
Submitted by: dteske

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

11 years agoMFC r230296:
dteske [Sun, 3 Mar 2013 19:26:05 +0000 (19:26 +0000)]
MFC r230296:

Don't write /var/db/zoneinfo when zone is not actually changed.

If the specified zone file does not exist or the -n flag is specified,
do not update /var/db/zoneinfo.

PR: bin/164039
Submitted by: dteske

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

11 years agoMFC r230299:
dteske [Sun, 3 Mar 2013 19:20:30 +0000 (19:20 +0000)]
MFC r230299:

Fix #ifdef VERBOSE for UTC case

Update verbose output to match what actually happens when selecting
the UTC option, and when the -n option is used.

Patch updated slightly for new libdialog.

PR: bin/164042
Submitted by: dteske

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

11 years agoDummy commit to show r247722 was (in addition to being an MFC for r227934), an
dteske [Sun, 3 Mar 2013 19:12:07 +0000 (19:12 +0000)]
Dummy commit to show r247722 was (in addition to being an MFC for r227934), an
MFC for r227947:

calloc +1 DIALOG_LISTITEM to prevent possible wild pointer access
in dlg_default_listitem().

and also for r228176: Sync xdialog_menu() implementation with sade.

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

11 years agoMFC r246978:
markj [Sun, 3 Mar 2013 19:02:23 +0000 (19:02 +0000)]
MFC r246978:
  - Make sure to set an error code when trying to obtain a data descriptor for
    a section of type SHT_NULL.
  - Update the man page to reflect the fact that elf_getdata() and
    elf_rawdata() may return with an error of ELF_E_SECTION.

Approved by: rstone (co-mentor)

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

11 years agoMFC r227934: Port to new libdialog.
dteske [Sun, 3 Mar 2013 18:59:59 +0000 (18:59 +0000)]
MFC r227934: Port to new libdialog.

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

11 years agoMFC r230005:
dteske [Sun, 3 Mar 2013 17:39:29 +0000 (17:39 +0000)]
MFC r230005:

Use a reasonable-sized buffer when formatting error messages about
installing zoneinfo.  While we're in the vicinity, add some missing
error checking to eliminate an unhelpful error message when unlink()
fails.

/me is embarrassed by the quality of his 16-year-old code.
The whole thing is awful and could stand a complete rewrite.

PR: 164038
Submitted by: Devin Teske (but implemented differently)

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

11 years agoMFC r246921:
kib [Sun, 3 Mar 2013 07:09:25 +0000 (07:09 +0000)]
MFC r246921:
Do not update the fsinfo block on each update of any fat block.
Postpone the flush to VFS_SYNC().

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

11 years agoMFC r247441:
gjb [Sun, 3 Mar 2013 00:37:34 +0000 (00:37 +0000)]
MFC r247441:
Properly handle '-h' argument.

PR: 176332

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

11 years agoMFC: r242854 (by rdivacky)
flo [Sat, 2 Mar 2013 17:51:22 +0000 (17:51 +0000)]
MFC: r242854 (by rdivacky)

Initialize hdrlen to 0 to avoid clang warning in NOINET case.

This fixes the kernel build for INET6 only kernels.

Approved by: cognet

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

11 years agoMFC: r246689, r246696
marius [Sat, 2 Mar 2013 17:39:11 +0000 (17:39 +0000)]
MFC: r246689, r246696

Make SYSCTL_{LONG,QUAD,ULONG,UQUAD}(9) work as advertised and also handle
constant values.

Reviewed by: kib

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

11 years agoMFC: r246300
marius [Sat, 2 Mar 2013 17:36:29 +0000 (17:36 +0000)]
MFC: r246300

- Make pci_ns8250_ids[] const.
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

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

11 years agoMFC: r246257
marius [Sat, 2 Mar 2013 17:32:15 +0000 (17:32 +0000)]
MFC: r246257

Improve r238673 (MFC'ed to stable/9 in r239494) to additionally allow
for odd-aligned buffers as passed in by smartd of smartmontools.
While at it, hint the compiler that 32-bit PIO is the most likely
case (idea from Linux) and use bus_{read,write}_stream_2(9) instead
of bus_{read,write}_multi_stream_2(9) for single count reads/writes.

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

11 years agoMFC: r235857
marius [Sat, 2 Mar 2013 17:25:41 +0000 (17:25 +0000)]
MFC: r235857

mdoc: Only use macros inside a reference block.

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

11 years agoMFC: r246106, r246139
marius [Sat, 2 Mar 2013 17:14:51 +0000 (17:14 +0000)]
MFC: r246106, r246139

Mark tftp_log() as __printflike() and deal with the fallout.

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

11 years agoMFC: r229780 (partial)
marius [Sat, 2 Mar 2013 16:45:58 +0000 (16:45 +0000)]
MFC: r229780 (partial)

Spelling fixes for libexec/

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

11 years agoMFC: r241720 (partial)
marius [Sat, 2 Mar 2013 16:38:58 +0000 (16:38 +0000)]
MFC: r241720 (partial)

Fix warnings found by -Wmising-variable-declarations.

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

11 years agoMFC: r235643
marius [Sat, 2 Mar 2013 16:33:43 +0000 (16:33 +0000)]
MFC: r235643

Properly use LDADD & DPADD to link against libwrap.

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

11 years agoUpdate FTP directories to include new layout. Previously discussed with
dteske [Sat, 2 Mar 2013 16:18:40 +0000 (16:18 +0000)]
Update FTP directories to include new layout. Previously discussed with
kensmith and others as this alleviates the need for the symbolic link upkeep
which is currently manually maintained.

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

11 years agoMerge
melifaro [Sat, 2 Mar 2013 15:11:20 +0000 (15:11 +0000)]
Merge
* r233937 - Improve BPF locking model
* r233938 - Improve performace for writer-only BPF users
* r233946 - Fix build
* r235744 - Fix (new) panic on attaching to non-existent interface
* r235745 - Fix old panic when BPF consumer attaches to destroying interface
* r235746 - Call bpf_jitter() before acquiring BPF global lock
* r235747 - Make most BPF ioctls() SMP-safe.
* r236231 - Fix BPF_JITTER code broken by r235746.
* r236251 - Fix shim for BIOCSETF to drop all packets buffered on the descriptor.
* r236261 - Save the previous filter right before we set new one.
* r236262 - Fix style(9) nits, reduce unnecessary type castings.
* r236559 - Fix panic introduced by r235745
* r236806 - Fix typo introduced in r236559.

r233937
  - Improve BPF locking model.

  Interface locks and descriptor locks are converted from mutex(9) to rwlock(9).
  This greately improves performance: in most common case we need to acquire 1
  reader lock instead of 2 mutexes.

  - Remove filter(descriptor) (reader) lock in bpf_mtap[2]
  This was suggested by glebius@. We protect filter by requesting interface
  writer lock on filter change.

  - Cover struct bpf_if under BPF_INTERNAL define. This permits including bpf.h
  without including rwlock stuff. However, this is is temporary solution,
  struct bpf_if should be made opaque for any external caller.

r233938
  - Improve performace for writer-only BPF users.

  Linux and Solaris (at least OpenSolaris) has PF_PACKET socket families to send
  raw ethernet frames. The only FreeBSD interface that can be used to send raw
  frames is BPF. As a result, many programs like cdpd, lldpd, various dhcp stuff
  uses BPF only to send data. This leads us to the situation when software like
  cdpd, being run on high-traffic-volume interface significantly reduces overall
  performance since we have to acquire additional locks for every packet.

  Here we add sysctl that changes BPF behavior in the following way:
  If program came and opens BPF socket without explicitly specifyin read filter
  we assume it to be write-only and add it to special writer-only per-interface
  list. This makes bpf_peers_present() return 0, so no additional overhead is
  introduced. After filter is supplied, descriptor is added to original
  per-interface list permitting packets to be captured.

  Unfortunately, pcap_open_live() sets catch-all filter itself for the purpose
  of setting snap length.

  Fortunately, most programs explicitly sets (event catch-all) filter after
  that. tcpdump(1) is a good example.

  So a bit hackis approach is taken: we upgrade description only after second
  BIOCSETF is received.

  Sysctl is named net.bpf.optimize_writers and is turned off by default.

  - While here, document all sysctl variables in bpf.4

r233946
  Fix build broken by r233938.

r235744
  Fix panic on attaching to non-existent interface
(introduced by r233937, pointed by hrs@)
  Fix panic on tcpdump being attached to interface being removed
(introduced by r233937, pointed by hrs@ and adrian@)
  Protect most of bpf_setf() by BPF global lock

  Add several forgotten assertions (thanks to adrian@)

  Document current locking model inside bpf.c
  Document EVENTHANDLER(9) usage inside BPF.

r235745
  Fix old panic when BPF consumer attaches to destroying interface.
  'flags' field is added to the end of bpf_if structure. Currently the only
  flag is BPFIF_FLAG_DYING which is set on bpf detach and checked by bpf_attachd()
  Problem can be easily triggered on SMP stable/[89] by the following command
  (sort of):
  'while true; do ifconfig vlan222 create vlan 222 vlandev em0 up ; \
    tcpdump -pi vlan222 & ; ifconfig vlan222 destroy ; done'

  Fix possible use-after-free when BPF detaches itself from interface, freeing
  bpf_bif memory, while interface is still UP and there can be routes via this
  interface. Freeing is now delayed till ifnet_departure_event is received via
  eventhandler(9) api.

  Convert bpfd rwlock back to mutex due lack of performance gain
  (currently checking if packet matches filter is done without holding bpfd
   lock and we have to acquire write lock if packet matches)

r235746
  Call bpf_jitter() before acquiring BPF global lock due to malloc() being
  used inside bpf_jitter.

  Eliminate bpf_buffer_alloc() and allocate BPF buffers on descriptor creation
   and BIOCSBLEN ioctl. This permits us not to allocate buffers inside
   bpf_attachd() which is protected by global lock.

r235747
  Make most BPF ioctls() SMP-safe.

r236559
  Fix panic introduced by r235745. Panic occurs after first packet traverse
  renamed interface.
  Add several comments on locking

r236231
  Fix BPF_JITTER code broken by r235746.

r236251
  Fix 32-bit shim for BIOCSETF to drop all packets buffered on the descriptor
  and reset statistics as it should.

r236261
  - Save the previous filter right before we set new one.
  - Reduce duplicate code and make it little easier to read.

r236262
  Fix style(9) nits, reduce unnecessary type castings, etc., for bpf_setf().

r236806
  Fix typo introduced in r236559.

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

11 years agoMFC r247205:
dim [Sat, 2 Mar 2013 14:39:48 +0000 (14:39 +0000)]
MFC r247205:

Pull in r175962 from upstream llvm trunk:

  X86: Disable cmov-memory patterns on subtargets without cmov.

  Fixes PR15115.

For the i386 arch, this should enable cmov instructions only on
-march=pentiumpro and higher.  Since our default CPU is i486, cmov
instructions will now be disabled by default.

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

11 years agoMFC r247422:
delphij [Sat, 2 Mar 2013 01:04:02 +0000 (01:04 +0000)]
MFC r247422:

Add a reminder that the user should update boot block if they are upgrading
their existing system and use LZ4 compression for ZFS.

Suggested by: mm

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

11 years agoMFC r246562:
pfg [Fri, 1 Mar 2013 22:03:57 +0000 (22:03 +0000)]
MFC r246562:

Remove unused MAXSYMLINKLEN macro.

Reviewed by: mckusick
PR: kern/175794

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

11 years agoMFC r246121 ...
ian [Fri, 1 Mar 2013 20:48:53 +0000 (20:48 +0000)]
MFC r246121 ...

Fix a descriptor leak in devd.  Clients reading /var/run/devd.pipe can close
their socket connection any time, and devd only notices that when it gets an
error trying to write an event to the client.  On a system with no device
change activity, clients could connect and disappear repeatedly without devd
noticing, leading to an ever-growing list of open socket descriptors in devd.

Now devd uses poll(2) looking for POLLHUP on all existing clients every time
a new client connection is established, and also periodically (once a minute)
to proactively find zombie clients and reap the socket descriptors.  It also
now has a connection limit, configurable with a new -l <num> command line arg.
When the maximum number of connections is reached it stops accepting new
connections until some current clients drop off.

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

11 years agoMFC 246799:
jpaetzel [Fri, 1 Mar 2013 20:33:35 +0000 (20:33 +0000)]
MFC 246799:

Resolve issue that caused WITNESS to report LORs.

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

11 years agoPull in OpenPAM Micrampelis from head. Also merge a few minor module
des [Fri, 1 Mar 2013 19:42:50 +0000 (19:42 +0000)]
Pull in OpenPAM Micrampelis from head.  Also merge a few minor module
changes, most importantly support for ECDSA keys in pam_ssh.

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

11 years agoMFC 246367:
jhb [Fri, 1 Mar 2013 19:39:54 +0000 (19:39 +0000)]
MFC 246367:
Install <dev/agp/agpreg.h> and <dev/pci/pcireg.h> as userland headers
in /usr/include.

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

11 years agoMFC 246129:
jhb [Fri, 1 Mar 2013 19:01:40 +0000 (19:01 +0000)]
MFC 246129:
Allow the address and ports to be separated by a colon or period rather
than a space to permit directly pasting the output of commands such as
netstat and sockstat on the command line.

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

11 years agoMFC 245849:
jhb [Fri, 1 Mar 2013 18:39:46 +0000 (18:39 +0000)]
MFC 245849:
Don't assume that all Linux TCP-level socket options are identical to
FreeBSD TCP-level socket options (only the first two are).  Instead,
using a mapping function and fail unsupported options as we do for other
socket option levels.

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

11 years agoMFC r247166:
dim [Fri, 1 Mar 2013 17:37:57 +0000 (17:37 +0000)]
MFC r247166:

Pull in r172354 from upstream clang trunk:

  Refactor the x86 CPU name logic in the driver and pass -march and -mcpu
  flag information down from the Clang driver into the Gold linker plugin
  for LTO. This allows specifying -march on the linker commandline and
  should hopefully have it pass all the way through to the LTO optimizer.

  Fixes PR14697.

Pull in r175919 from upstream clang trunk:

  Driver: Pass down the -march setting down to -cc1as on x86 too.

  The assembler historically didn't make use of any target features, but this has
  changed when support for old CPUs that don't support long nops was added.

This should fix the long nops that still occurred in crt*.o, and
possibly other object files, if the system was compiled for a CPU that
does not support those, such as Geode.

Note that gcc on i386 also does not pass through any -march, -mcpu or
-mtune setting to gas, but this has not caused any trouble yet, because
gas defaults to i386.

Reported by: lev

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

11 years agoMFC 246037:
jhb [Fri, 1 Mar 2013 17:10:43 +0000 (17:10 +0000)]
MFC 246037:
Mark 'ticks', 'time_second', and 'time_uptime' as volatile to prevent the
compiler from caching their values in tight loops.

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

11 years agoMFC 246035:
jhb [Fri, 1 Mar 2013 16:18:40 +0000 (16:18 +0000)]
MFC 246035:
- Compute the correct size to reallocate when doubling the size of the
  array of loaded objects to avoid a buffer overrun.
- Use reallocf() to avoid leaking memory if the realloc() fails.

PR: kern/175648

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

11 years agoMFC 245577,245640:
jhb [Fri, 1 Mar 2013 14:54:26 +0000 (14:54 +0000)]
MFC 245577,245640:
Don't attempt to use clflush on the local APIC register window.  Various
CPUs exhibit bad behavior if this is done (Intel Errata AAJ3, hangs on
Pentium-M, and trashing of the local APIC registers on a VIA C7).  The
local APIC is implicitly mapped UC already via MTRRs, so the clflush isn't
necessary anyway.

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

11 years agoMFH (r246328): sort knobs
des [Fri, 1 Mar 2013 10:33:31 +0000 (10:33 +0000)]
MFH (r246328): sort knobs

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

11 years agoMFH (r240278): document -quit
des [Fri, 1 Mar 2013 09:49:55 +0000 (09:49 +0000)]
MFH (r240278): document -quit

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

11 years agoMFH (r238602): add -g (gigabyte) flag
des [Fri, 1 Mar 2013 09:39:53 +0000 (09:39 +0000)]
MFH (r238602): add -g (gigabyte) flag

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

11 years agoMFC 245823,245824,246210
jhb [Fri, 1 Mar 2013 03:04:57 +0000 (03:04 +0000)]
MFC 245823,245824,246210
- Use decimal values for UDP, TCP, and UNIX domain socket options rather
  than hex to avoid implying that these constants should be treated as bit
  masks.
- Add placeholder constants to reserve a portion of the socket option
  name space for use by downstream vendors to add custom options.

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

11 years agoRegenerate
des [Fri, 1 Mar 2013 01:03:27 +0000 (01:03 +0000)]
Regenerate

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

11 years agoMFC 245610,245633,245635:
jhb [Fri, 1 Mar 2013 01:02:28 +0000 (01:02 +0000)]
MFC 245610,245633,245635:
Include the thread name along with the command name when displaying the
command name of a thread from a multi-threaded process that doesn't have
an available argument list (such as kernel processes) and threads display
is enabled via -H.

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

11 years agoMFH (r245527): add OPENSSH_NONE_CIPHER build option
des [Fri, 1 Mar 2013 01:02:26 +0000 (01:02 +0000)]
MFH (r245527): add OPENSSH_NONE_CIPHER build option

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

11 years agoMFC r247296: libexpat 2.1.0.
delphij [Fri, 1 Mar 2013 00:56:57 +0000 (00:56 +0000)]
MFC r247296: libexpat 2.1.0.

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

11 years agoMFH (r240107,240111,240361): warn against using weak PRNGs
des [Fri, 1 Mar 2013 00:52:57 +0000 (00:52 +0000)]
MFH (r240107,240111,240361): warn against using weak PRNGs

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

11 years agoMFC r247334:
delphij [Fri, 1 Mar 2013 00:46:41 +0000 (00:46 +0000)]
MFC r247334:

Correct a typo introduced in r153575, which gives inverted logic when
handling blocking semantics when seeding.

PR: kern/143298
Submitted by: James Juran <james juran baesystems com>
Reviewed by: markm

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

11 years agoMFC 245508,245566,245568,245611,245909:
jhb [Thu, 28 Feb 2013 21:57:38 +0000 (21:57 +0000)]
MFC 245508,245566,245568,245611,245909:
Various fixes to timestamps in NFS:
- Use the VA_UTIMES_NULL flag to detect when NULL was passed to utimes()
  instead of comparing the desired time against the current time as a
  heuristic.
- Remove unused nfs_curusec().
- Use vfs_timestamp() to set file timestamps rather than invoking
  getmicrotime() or getnanotime() directly in NFS.
- Use NFSD_MONOSEC (which maps to time_uptime) instead of the seconds
  portion of wall-time stamps to manage timeouts on events.
- Remove unused nd_starttime from the per-request structure in the new
  NFS server.
- Use nanotime() for the modification time on a delegation to get as
  precise a time as possible.
- Use time_second instead of extracting the second from a call to
  getmicrotime().

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

11 years agoMFC 245238:
jhb [Thu, 28 Feb 2013 21:24:10 +0000 (21:24 +0000)]
MFC 245238:
Add an option to not drop options from the third retransmitted SYN.  If the
SYNs (or SYN/ACK replies) are dropped due to network congestion, then the
remote end of the connection may act as if options such as window scaling
are enabled but the local end will think they are not.  This can result in
very slow data transfers in the case of window scaling disagreements.

Note that the unlike HEAD the existing behavior is preserved by default,
but it can be disabled by setting the
net.inet.tcp.rexmit_drop_options sysctl to zero.

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

11 years agoMFC 245476:
jhb [Thu, 28 Feb 2013 19:00:57 +0000 (19:00 +0000)]
MFC 245476:
- More properly handle interrupted NFS requests on an interruptible mount
  by returning an error of EINTR rather than EACCES.
- While here, bring back some (but not all) of the NFS RPC statistics lost
  when krpc was committed.

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

11 years agoMFC 245471:
jhb [Thu, 28 Feb 2013 18:58:37 +0000 (18:58 +0000)]
MFC 245471:
Do not require a filter-only interrupt handler for puc ports that are not
serial devices (such as printer ports).  This allows ppc devices attached
to puc to correctly setup an interrupt handler and work.

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

11 years agoMFC 241748:
jhb [Thu, 28 Feb 2013 18:49:31 +0000 (18:49 +0000)]
MFC 241748:
When checking to see if a video output's _ADR matches an entry in the
parent adapter's _DOD list, only check the low 16 bits of both _ADR and
_DOD.  The language in the ACPI spec seems to indicate that the _ADR values
should exactly match the entries in _DOD.  However, I assume that the
masking added to _DOD values was added to work around some known busted
machines (the commit history doesn't indicate either way), and the ACPI
spec does require that the low 16 bits are unique for all video outputs,
so only checking the low 16 bits should be fine.

This fixes recognition of video outputs that use the new standardized
device ID scheme in ACPI 3.0 that set bit 31 such as certain Dell laptops.

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

11 years agoMFC r247071:
jamie [Thu, 28 Feb 2013 18:46:56 +0000 (18:46 +0000)]
MFC r247071:

  Don't worry if a module is already loaded when looking for a fstype to mount
  (possible in a race condition).

Reviewed by: kib

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

11 years agoPull in OpenSSH 6.1 from head.
des [Thu, 28 Feb 2013 18:43:50 +0000 (18:43 +0000)]
Pull in OpenSSH 6.1 from head.

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

11 years agoMFC 241730: Correct the order of the MFU and MRU labels.
jhb [Thu, 28 Feb 2013 18:24:07 +0000 (18:24 +0000)]
MFC 241730: Correct the order of the MFU and MRU labels.

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

11 years agoMFC 241027:
jhb [Thu, 28 Feb 2013 18:22:41 +0000 (18:22 +0000)]
MFC 241027:
- Re-shuffle the <machine/pc/bios.h> headers to move all kernel-specific
  bits under #ifdef _KERNEL but leave definitions for various structures
  defined by standards ($PIR table, SMAP entries, etc.) available to
  userland.
- Consolidate duplicate SMBIOS table structure definitions in ipmi(4)
  and smbios(4) in <machine/pc/bios.h> and make them available to
  userland.

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

11 years agoMFC 241198:
jhb [Thu, 28 Feb 2013 18:12:56 +0000 (18:12 +0000)]
MFC 241198:
Display the matrix of inter-domain distances in the SLIT table.  This is
used to complement the SRAT table on NUMA machines.

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

11 years agoMFC 240968:
jhb [Thu, 28 Feb 2013 18:10:20 +0000 (18:10 +0000)]
MFC 240968:
Merge similar fixes from 223198 from igb to ixgbe:
- Use a dedicated task to handle deferred transmits from the if_transmit
  method instead of reusing the existing per-queue interrupt task.
  Reusing the per-queue interrupt task could result in both an interrupt
  thread and the taskqueue thread trying to handle received packets on a
  single queue resulting in out-of-order packet processing and lock
  contention.
- Don't define ixgbe_start() at all when if_transmit is used.

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

11 years agoMFC r246789:
hselasky [Thu, 28 Feb 2013 16:56:08 +0000 (16:56 +0000)]
MFC r246789:
Add USB API to read power draw on USB devices.
Update usbconfig to print power draw on USB devices.

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

11 years agoMFC r246753:
hselasky [Thu, 28 Feb 2013 16:43:41 +0000 (16:43 +0000)]
MFC r246753:
Add new USB ID to FTDI driver.

PR: kern/175893

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

11 years agoMFC r246944:
hselasky [Thu, 28 Feb 2013 16:39:44 +0000 (16:39 +0000)]
MFC r246944:
Fix bad EEPROM parsing code.

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

11 years agoMFC r247133 and associated fixes (r247151, r247152):
gallatin [Thu, 28 Feb 2013 16:38:28 +0000 (16:38 +0000)]
MFC r247133 and associated fixes (r247151, r247152):

r247133:
  Improve mxge's receive performance for IPv6:

  - Add support for IPv6 rx csum offload
  - Finally switch mxge from using its own driver lro, to
   using tcp_lro

r247151:
  Fix build.

r247152:
  Try harder to make mxge safe for all combinations of INET and INET6

  - Re-fix build by restoring local removed in r247151, but protected
    by #if defined(INET) || defined(INET6) so that the compile
    succeeds in the !(INET||INET6) case.

  - Protect call to in_pseudo() with an #ifdef INET, to allow
    a kernel to link with mxge when INET is not compiled in.

  - Also remove an errant (improperly commented) obsolete debugging printf

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

11 years agoMFC r247104:
gallatin [Thu, 28 Feb 2013 16:32:36 +0000 (16:32 +0000)]
MFC r247104:
  Fix tcp_lro_rx_ipv4() for drivers that do not set CSUM_IP_CHECKED.
  Specifcially, in_cksum_hdr() returns 0 (not 0xffff) when the IPv4
  checksum is correct. Without this fix, the tcp_lro code will reject
  good IPv4 traffic from drivers that do not implement IPv4 header
  harder csum offload.

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

11 years agoMFC r246809:
zeising [Thu, 28 Feb 2013 15:17:24 +0000 (15:17 +0000)]
MFC r246809:

Change examples to be consistent with what style(9) says.

Approved by: joel (mentor)

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

11 years agoMFH (r240109): add a configtest command
des [Thu, 28 Feb 2013 12:03:17 +0000 (12:03 +0000)]
MFH (r240109): add a configtest command

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

11 years agoWhen getting the MIB, remove largest suffix instead of smallest suffix of
delphij [Thu, 28 Feb 2013 08:06:43 +0000 (08:06 +0000)]
When getting the MIB, remove largest suffix instead of smallest suffix of
=.  This makes the following syntax work:

dev.hdaa.4.nid25_config=as=1,seq=15

This is a direct commit to RELENG_9 as this file have been replaced in
-HEAD.

Submitted by: Andreas Nilsson <andrnils gmail com>

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

11 years agoMFC r245243, r245274, r245276, r245434, r245441, r245448, r245467,
np [Thu, 28 Feb 2013 00:44:54 +0000 (00:44 +0000)]
MFC r245243, r245274, r245276, r245434, r245441, r245448, r245467,
r245468, r245517, r245518, r245520, r245567, r245933, r245935, r245936,
r245937, r246093, r246385, r246575, r247062, r247122, r247289, r247291,
r247347, r247355, and r241733.

Note that TCP_OFFLOAD is not enabled in 9 yet and so some of these MFCs
don't really affect functionality.  But they do help future MFCs
(related to TCP_OFFLOAD or not) by minimizing diffs with the driver in
head.

r245243:
cxgbe(4): updates to the configuration file that controls how hardware
resources are partitioned.

- Reduce the number of virtual interfaces reserved for PF4.  This leaves
  spare room in the source MAC table and allows the driver to setup
  filters that rewrite the source MAC address.

- Reduce the number of filters and use the freed up space for the CLIP
  (Compressed Local IPv6 addresses) table.  This is a prerequisite for
  IPv6 TOE support which will follow separately in a series of commits.

r245274:
cxgbe(4): Add functions to help synchronize "slow" operations (those not
on the fast data path) and use them instead of frobbing the adapter lock
and busy flag directly.

Other changes made while reworking all slow operations:
- Wait for the reply to a filter request (add/delete).  This guarantees
  that the operation is complete by the time the ioctl returns.
- Tidy up the tid_info structure.
- Do not allow the tx queue size to be set to something that's not a
  power of 2.

r245276:
Overhaul the stid allocator so that it can be used for IPv6 servers
too.  The entry for an IPv6 server in the TCAM takes up the equivalent
of two ordinary stids and must be properly aligned too.

r245434:
cxgbe(4): Updates to the hardware L2 table management code.

- Add full support for IPv6 addresses.

- Read the size of the L2 table during attach.  Do not assume that PCIe
  physical function 4 of the card has all of the table to itself.

- Use FNV instead of Jenkins to hash L3 addresses and drop the private
  copy of jhash.h from the driver.

r245441:
cxgbe/tom: Miscellaneous updates for TOE+IPv6 support (more to follow).

- Teach find_best_mtu_idx() to deal with IPv6 endpoints.

- Install correct protosw in offloaded TCP/IPv6 sockets when DDP is
  enabled.

- Move set_tcp_ddp_ulp_mode to t4_tom.c so that t4_tom.h can be included
  without having to drag in t4_msg.h too.  This was bothering the iWARP
  driver for some reason.

r245448:
cxgbe/tom: Basic CLIP table management.

This is the Compressed Local IPv6 table on the chip.  To save space, the
chip uses an index into this table instead of a full IPv6 address in
some of its hardware data structures.

For now the driver fills this table with all the local IPv6 addresses
that it sees at the time the table is initialized.  I'll improve this
later so that the table is updated whenever new IPv6 addresses are
configured or existing ones deleted.

r245467:
cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (active open).

r245468:
cxgbe/tom: Add support for fully offloaded TCP/IPv6 connections (passive open).

r245517:
cxgbe: Fix the for_each_foo macros -- the last argument should not share
its name with any member of struct sge.

r245518:
cxgbe:  Do a more thorough job in the CLEAR_STATS ioctl.

r245520:
Allow "ivlan" (inner VLAN) to be used as an alias for "vlan" when
specifying match criteria.  "vlan" continues to be valid here, and it
continues to be valid when deleting, rewriting, inserting, or stacking
an 802.1q tag to a matching packet.

r245567:
cxgbe: Make the for_each macros safer to use by turning them
into a single statement each.

r245933:
cxgbe/tom: List IFCAP_TOE6 as supported now that all the required pieces
are in place.  You still have to enable it explicitly, after loading the
t4_tom KLD.

r245935:
Add a couple of missing error codes.  Treat CPL_ERR_KEEPALV_NEG_ADVICE as
negative advice and not a fatal error.

r245936:
Force the 404-BT card (4 x 1G) to use the "uwire" configuration file.

r245937:
Install an extra hold on the newly allocated synq entry so that it
cannot be freed while do_pass_accept_req is running.  This closes a race
where do_pass_establish on another CPU (the driver chose a different
queue for the new tid) expands the synq entry into a full PCB and then
releases the only hold on it, all while do_pass_accept_req is still
running.

r246093:
Provide a statistic to track the number of drops in each of the port's
txq's buf_ring.  The aggregate for all the queues of a port is already
provided in ifnet->if_snd.ifq_drops.

r246385:
Busy-wait when cold.

r246575:
Do not hold locks around hardware context reads.

r247062:
cxgbe(4): Assume that CSUM_TSO in the transmit path implies CSUM_IP and
CSUM_TCP too.  They are all set explicitly by the kernel usually.

r247122:
cxgbe(4): Add sysctls to extract debug information from the chip:

dev.t4nex.X.misc.cim_la         logic analyzer dump
dev.t4nex.X.misc.cim_qcfg       queue configuration
dev.t4nex.X.misc.cim_ibq_xxx    inbound queues
dev.t4nex.X.misc.cim_obq_xxx    outbound queues

r247289:
cxgbe(4): Update firmware to 1.8.4.0.

r247291:
cxgbe(4): Ask the card's firmware to pad up tiny CPLs by encapsulating
them in a firmware message if it is able to do so.  This works out
better for one of the FIFOs in the chip.

r247347:
cxgbe(4): Consider all the API versions of the interfaces exported by
the firmware (instead of just the main firmware version) when evaluating
firmware compatibility.  Document the new "hw.cxgbe.fw_install" knob
being introduced here.

This should fix kern/173584 too.  Setting hw.cxgbe.fw_install=2 will
mostly do what was requested in the PR but it's a bit more intelligent
in that it won't reinstall the same firmware repeatedly if the knob is
left set.

r247355:
cxgbe(4): Report unusual out of band errors from the firmware.

r241733 (by ed@):
Prefer __containerof() over __member2struct().

The former works better with qualifiers, but also properly type checks
the input pointer.

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

11 years agoMFC 241130:
jhb [Wed, 27 Feb 2013 22:08:18 +0000 (22:08 +0000)]
MFC 241130:
Rename the module for 'device enc' to "if_enc" to avoid conflicting with
the CAM "enc" peripheral (part of ses(4)).  Previously the two modules
used the same name, so only one was included in a linked kernel causing
enc0 to not be created if you added IPSEC to GENERIC.  The new module
name follows the pattern of other network interfaces (e.g. "if_loop").

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

11 years agoMFC 240921:
jhb [Wed, 27 Feb 2013 22:02:40 +0000 (22:02 +0000)]
MFC 240921:
Add optional entropy harvesting for software interrupts in swi_sched()
as controlled by kern.random.sys.harvest.swi.  SWI harvesting feeds into
the interrupt FIFO and each event is estimated as providing a single bit of
entropy.

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

11 years agoMFC 240692,241228:
jhb [Wed, 27 Feb 2013 21:03:09 +0000 (21:03 +0000)]
MFC 240692,241228:
Adjust the ioctl workaround from r234501:
- Ensure the native ioctl path always allocates a 4kb buffer if a request
  uses a buffer size of 0.
- Rounding all small requests up to 32k swamped the controller causing
  firmware hangs.  Instead, round requests smaller than 64k up to the next
  power of 2 as a general rule.  To handle the one known special case of a
  command that accepts a 12k buffer returning a 24k-ish reply, round
  requests between 8k and 16k up to 32k rather than 16k.  The result is
  that commands less than 8k should now be rounded up to a smaller size
  (either 4k or 8k) rather than 32k.

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

11 years agoMFC 240474:
jhb [Wed, 27 Feb 2013 19:38:25 +0000 (19:38 +0000)]
MFC 240474:
- Denote PCI-e endpoints that support FLR.
- Make parsing of PCI-e extended capabilities assume that future version
  numbers are backwards compatible.
- Add new AER error descriptions.
- Add descriptions for more PCI-e extended capabilities.

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

11 years agoMFC r246631,246651,246666,246675,246678,246688:
mm [Wed, 27 Feb 2013 19:20:50 +0000 (19:20 +0000)]
MFC r246631,246651,246666,246675,246678,246688:
Merge various ZFS bugfixes

MFC r246631:
Import vendor bugfixes

Illumos ZFS issues:
  3422 zpool create/syseventd race yield non-importable pool
  3425 first write to a new zvol can fail with EFBIG

MFC r246651:
Import minor type change in refcount.h header from vendor (illumos).

MFC r246666:
Import vendor ZFS bugfix fixing a problem in arc_read().

Illumos ZFS issues:
  3498 panic in arc_read(): !refcount_is_zero(&pbuf->b_hdr->b_refcnt)

MFC r246675:
Add tunable to allow block allocation on degraded vdevs.

Illumos ZFS issues:
  3507 Tunable to allow block allocation even on degraded vdevs

MFC r246678:
Import vendor bugfixes regarding SA rounding, header size and layout.
This was already partially fixed by avg.

Illumos ZFS issues:
  3512 rounding discrepancy in sa_find_sizes()
  3513 mismatch between SA header size and layout

MFC r246688 [1]:
Merge zfs_ioctl.c code that should have been merged together with ZFS v28.
Fixes several problems if working with read-only pools.

Changed code originaly introduced in onnv-gate 13061:bda0decf867b
Contains changes up to illumos-gate 13700:4bc0783f6064

PR: kern/175897 [1]
Suggested by: avg [1]

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

11 years agoMFC r247034:
pluknet [Wed, 27 Feb 2013 08:55:26 +0000 (08:55 +0000)]
MFC r247034:
  Check if the -sec option is given without an argument.

PR: bin/170413
Submitted by: Andrey Simonenko <simon@comsys.ntu-kpi.kiev.ua>

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

11 years agoFix the build.
gallatin [Wed, 27 Feb 2013 00:14:12 +0000 (00:14 +0000)]
Fix the build.

Back out mis-guided compat shim that should not have been MFC'ed

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

11 years agoMFC 240473:
jhb [Tue, 26 Feb 2013 22:07:59 +0000 (22:07 +0000)]
MFC 240473:
Add some registers defined in PCI 3.0 including new AER bits.

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

11 years agoMFC 240467:
jhb [Tue, 26 Feb 2013 21:04:58 +0000 (21:04 +0000)]
MFC 240467:
Ignore stop and continue signals sent to an exiting process.  Stop signals
set p_xstat to the signal that triggered the stop, but p_xstat is also
used to hold the exit status of an exiting process.  Without this change,
a stop signal that arrived after a process was marked P_WEXIT but before
it was marked a zombie would overwrite the exit status with the stop signal
number.

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

11 years agoMFC 239512:
jhb [Tue, 26 Feb 2013 20:19:19 +0000 (20:19 +0000)]
MFC 239512:
Add a BUS_CHILD_DELETED() method that a bus can hook to allow it to cleanup
any bus-specific state (such as ivars) when a child device is deleted.

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

11 years agoMFC 239356,239564:
jhb [Tue, 26 Feb 2013 19:14:05 +0000 (19:14 +0000)]
MFC 239356,239564:
Teach dhclient to track changes in link state and to enter the reboot
state when the link on an interface goes up causing dhclient to attempt
to renew its existing lease.

PR: bin/166656

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

11 years agoMFC r246880:
dim [Tue, 26 Feb 2013 18:31:03 +0000 (18:31 +0000)]
MFC r246880:

Since clang 3.2 now has an option to suppress warnings about implicitly
promoted K&R parameters, remove the workarounds added for sendmail
components in r228558.

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

11 years agoMFC 239244,240137,240209:
jhb [Tue, 26 Feb 2013 18:19:51 +0000 (18:19 +0000)]
MFC 239244,240137,240209:
Add locking to the twe(4) driver and make it MPSAFE.

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

11 years agoMFC 234927:
jhb [Tue, 26 Feb 2013 16:55:44 +0000 (16:55 +0000)]
MFC 234927:
- Don't log messages saying that accounting is being disabled and enabled
  if the accounting log file is atomically replaced with a new file
  (such as during log rotation).
- Simplify accounting log rotation a bit.  There is no need to re-run
  accton(8) after renaming the new log file to it's real name.

PR: kern/167321

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

11 years agoMFC r247011:
gallatin [Tue, 26 Feb 2013 15:51:46 +0000 (15:51 +0000)]
MFC r247011:

Add support to mxge for IPv6 TX csum offload & IPv6 TSO.

Sponsored by: Myricom, Inc.

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

11 years agoMFC r246586,246587,246619,246624,246768,246808:
delphij [Tue, 26 Feb 2013 05:58:05 +0000 (05:58 +0000)]
MFC r246586,246587,246619,246624,246768,246808:

LZ4 compression support in ZFS.

(Note: sys/conf/files change omitted from this changeset).

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

11 years agoComplete MFC of r245362
bryanv [Tue, 26 Feb 2013 05:27:02 +0000 (05:27 +0000)]
Complete MFC of r245362

    Add VirtIO to i386 and amd64 GENERIC

This completes the MFC of r245362 not was not done
in r246885. 9-STABLE VirtIO should now match HEAD.

Approved by: grehan

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

11 years agoMFC part of r241470 missed in r246582
bryanv [Tue, 26 Feb 2013 05:12:25 +0000 (05:12 +0000)]
MFC part of r241470 missed in r246582

Add the VirtIO SCSI Makefile. I was in one directory too
deep when I did the previous commit.

Approved by: grehan

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

11 years agoMFC r246882:
marcel [Tue, 26 Feb 2013 03:46:35 +0000 (03:46 +0000)]
MFC r246882:
Return EFAULT when the address is not a kernel virtual address.

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

11 years agoMFC r239379:
marcel [Tue, 26 Feb 2013 03:39:15 +0000 (03:39 +0000)]
MFC r239379:
Use pmap_kextract(x) rather than pmap_extract(kernel_pmap, x).

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

11 years agoMFC r246917:
markj [Tue, 26 Feb 2013 00:44:54 +0000 (00:44 +0000)]
MFC r246917:
  Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is a
  valid index into the input buffer.

Approved by: rstone (co-mentor)

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

11 years agoMFH r247014, r247050 and r247051.
keramida [Mon, 25 Feb 2013 19:08:46 +0000 (19:08 +0000)]
MFH r247014, r247050 and r247051.

Add a sample program that shows how a custom comparison function and
qsort(3) can work together to sort an array of integers.

PR:             docs/176197
Submitted by:   Fernando, fapesteguia at opensistemas.com
Christoph Mallon, christoph.mallon at gmx.de
Approved by:    gjb (mentor), remko (mentor)

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

11 years agoMFC r241010: libc/fts: Use O_CLOEXEC for internal file descriptors.
jilles [Mon, 25 Feb 2013 18:07:20 +0000 (18:07 +0000)]
MFC r241010: libc/fts: Use O_CLOEXEC for internal file descriptors.

Because fts keeps internal file descriptors open across calls, making such
descriptors close-on-exec helps not only multi-threaded applications but
also single-threaded applications.

In particular, this prevents passing a temporary file descriptor for saving
the current directory to processes created via find -exec.

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

11 years agoOops, r55392 (over 13 years ago) forgot to classify the new HTTP Proxy for the
dteske [Mon, 25 Feb 2013 16:13:21 +0000 (16:13 +0000)]
Oops, r55392 (over 13 years ago) forgot to classify the new HTTP Proxy for the
options dialog (causing "<unknown>" to be displayed for the HTTP media type).
Direct commit to stable/9 (no sysinstall in head).

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

11 years agoMFC r246329:
delphij [Mon, 25 Feb 2013 08:14:07 +0000 (08:14 +0000)]
MFC r246329:

Use stripesize as smallest block size if it's available.

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

11 years agoOops, r215291 (over 2 years ago) forgot to remove mention of "medium" from the
dteske [Sun, 24 Feb 2013 21:42:39 +0000 (21:42 +0000)]
Oops, r215291 (over 2 years ago) forgot to remove mention of "medium" from the
F1 Help file.  Direct commit to stable/9 (no sysinstall in head).

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

11 years agoOops, r186202 (over 4 years ago) forgot to remove Tape from the F1 Help file.
dteske [Sun, 24 Feb 2013 21:36:54 +0000 (21:36 +0000)]
Oops, r186202 (over 4 years ago) forgot to remove Tape from the F1 Help file.
Direct commit to stable/9 (no sysinstall in head).

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

11 years agoMFC r246617: sigqueue(2): Fix typo (EEPERM -> EPERM).
jilles [Sun, 24 Feb 2013 21:00:37 +0000 (21:00 +0000)]
MFC r246617: sigqueue(2): Fix typo (EEPERM -> EPERM).

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