]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r260913,266895:
nwhitehorn [Sun, 8 Jun 2014 17:50:07 +0000 (17:50 +0000)]
MFC r260913,266895:
Add a new flag to /etc/ttys: onifconsole. This is equivalent to "on" if the
device is an active kernel console and "off" otherwise. This is designed to
allow serial-booting x86 systems to provide a login prompt on the serial line
by default without providing one on all systems by default. Set this flag
on x86 systems for ttyu0.

Comments and suggestions by: grehan, dteske, jilles

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

9 years agoMFC r267078, r267079:
emaste [Sun, 8 Jun 2014 14:02:25 +0000 (14:02 +0000)]
MFC r267078, r267079:

   Update vt(4) console font author's email address
   Remove extra copy of old email address.

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

9 years agoMFC: r266931
brueffer [Sat, 7 Jun 2014 19:12:43 +0000 (19:12 +0000)]
MFC: r266931

Grammar cleanup; sort SEE ALSO.

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

9 years agoMFC r267067:
kib [Sat, 7 Jun 2014 02:49:39 +0000 (02:49 +0000)]
MFC r267067:
Cross-reference jot(1) and seq(1).

MFC r267098 (by pluknet):
mdoc: drop the trailing dot from the xref list.

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

9 years agoMFC r266609:
kib [Sat, 7 Jun 2014 02:45:24 +0000 (02:45 +0000)]
MFC r266609:
Change the _rtld_atfork() to lock the bind lock in write mode.

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

9 years agoMFC changes related to PR kern/189089. Unlike CURRENT, stable/10 does not
asomers [Fri, 6 Jun 2014 22:14:25 +0000 (22:14 +0000)]
MFC changes related to PR kern/189089.  Unlike CURRENT, stable/10 does not
panic when you attempt to remove the IP address.  But it still fails to
remove the address.

MFC r265094

Add regression test for PR kern/189088.

MFC r265092

Fix a panic when removing an IP address from an interface, if the same
address exists on another interface.  The panic was introduced by change
264887, which changed the fibnum parameter in the call to rtalloc1_fib() in
ifa_switch_loopback_route() from RT_DEFAULT_FIB to RT_ALL_FIBS.  The
solution is to use the interface fib in that call.  For the majority of
users, that will be equivalent to the legacy behavior.

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

9 years agoMFC r264887
asomers [Fri, 6 Jun 2014 21:45:14 +0000 (21:45 +0000)]
MFC r264887

Fix host and network routes for new interfaces when net.add_addr_allfibs=0

sys/net/route.c
        In rtinit1, use the interface fib instead of the process fib.  The
        latter wasn't very useful because ifconfig(8) is usually invoked
        with the default process fib.  Changing ifconfig(8) to use setfib(2)
        would be redundant, because it already sets the interface fib.

tests/sys/netinet/fibs_test.sh
        Clear the expected ATF failure

sys/net/if.c
        Pass the interface fib in calls to rtrequest1_fib and rtalloc1_fib

sys/netinet/in.c
sys/net/if_var.h
        Add a fibnum argument to ifa_switch_loopback_route, a subroutine of
        in_scrubprefix.  Pass it the interface fib.

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

9 years agoMFC changes relating to running multiple interfaces on different fibs but
asomers [Fri, 6 Jun 2014 20:35:40 +0000 (20:35 +0000)]
MFC changes relating to running multiple interfaces on different fibs but
with addresses on the same subnet.

MFC r266860

Fix unintended KBI change from r264905.  Add _fib versions of
ifa_ifwithnet() and ifa_ifwithdstaddr()  The legacy functions will call the
_fib() versions with RT_ALL_FIBS, preserving legacy behavior.

sys/net/if_var.h
sys/net/if.c
        Add legacy-compatible functions as described above.  Ensure legacy
        behavior when RT_ALL_FIBS is passed as fibnum.

sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/net/route.c
sys/net/rtsock.c
sys/netinet6/nd6.c
        Call with _fib() functions if we must use a specific fib, or the
        legacy functions otherwise.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
        Improve the udp_dontroute test.  The bug that this test exercises is
        that ifa_ifwithnet() will return the wrong address, if multiple
        interfaces have addresses on the same subnet but with different
        fibs.  The previous version of the test only considered one possible
        failure mode: that ifa_ifwithnet_fib() might fail to find any
        suitable address at all.  The new version also checks whether
        ifa_ifwithnet_fib() finds the correct address by checking where the
        ARP request goes.

MFC r264917

Style fixes, mostly trailing whitespace elimination.  No functional change.

MFC r264905

Fix subnet and default routes on different FIBs on the same subnet.

These two bugs are closely related.  The root cause is that ifa_ifwithnet
does not consider FIBs when searching for an interface address.

sys/net/if_var.h
sys/net/if.c
        Add a fib argument to ifa_ifwithnet and ifa_ifwithdstadddr.  Those
        functions will only return an address whose interface fib equals the
        argument.

sys/net/route.c
        Update calls to ifa_ifwithnet and ifa_ifwithdstaddr with fib
        arguments.

sys/netinet/in.c
        Update in_addprefix to consider the interface fib when adding
        prefixes.  This will prevent it from not adding a subnet route when
        one already exists on a different fib.

sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/ip_output.c
sys/netinet/ip_options.c
sys/netinet6/nd6.c
        Add RT_DEFAULT_FIB arguments to ifa_ifwithdstaddr and ifa_ifwithnet.
        In some cases it there wasn't a clear specific fib number to use.
        In others, I was unable to test those functions so I chose
        RT_DEFAULT_FIB to minimize divergence from current behavior.  I will
        fix some of the latter changes along with PR kern/187553.

tests/sys/netinet/fibs_test.sh
tests/sys/netinet/udp_dontroute.c
tests/sys/netinet/Makefile
        Revert r263738.  The udp_dontroute test was right all along.
        However, bugs kern/187550 and kern/187553 cancelled each other out
        when it came to this test.  Because of kern/187553, ifa_ifwithnet
        searched the default fib instead of the requested one, but because
        of kern/187550, there was an applicable subnet route on the default
        fib.  The new test added in r263738 doesn't work right, however.  I
        can verify with dtrace that ifa_ifwithnet returned the wrong address
        before I applied this commit, but route(8) miraculously found the
        correct interface to use anyway.  I don't know how.

        Clear expected failure messages for kern/187550 and kern/187552.

MFC r263738

tests/sys/netinet/Makefile
tests/sys/netinet/fibs.sh
        Replace fibs:udp_dontroute with fibs:src_addr_selection_by_subnet.
        The original test was poorly written; it was actually testing
        kern/167947 instead of the desired kern/187553.  The root cause of the
        bug is that ifa_ifwithnet did not have a fib argument.  The new test
        more directly targets that behavior.

tests/sys/netinet/udp_dontroute.c
        Delete the auxilliary binary used by the old test

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

9 years agoMFC r263779
asomers [Fri, 6 Jun 2014 17:42:55 +0000 (17:42 +0000)]
MFC r263779

Correct ARP update handling when the routes for network interfaces are
restricted to a single FIB in a multifib system.

Restricting an interface's routes to the FIB to which it is assigned (by
setting net.add_addr_allfibs=0) causes ARP updates to fail with "arpresolve:
can't allocate llinfo for x.x.x.x".  This is due to the ARP update code hard
coding it's lookup for existing routing entries to FIB 0.

sys/netinet/in.c:
When dealing with RTM_ADD (add route) requests for an interface, use
the interface's assigned FIB instead of the default (FIB 0).

sys/netinet/if_ether.c:
In arpresolve(), enhance error message generated when an
lla_lookup() fails so that the interface causing the error is
visible in logs.

tests/sys/netinet/fibs_test.sh
Clear ATF expected error.

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

9 years agoMFC r264417: realpath(): Properly fail "." or ".." components after
jilles [Fri, 6 Jun 2014 13:37:40 +0000 (13:37 +0000)]
MFC r264417: realpath(): Properly fail "." or ".." components after
non-directories.

If realpath() is called on pathnames like "/dev/null/." or "/dev/null/..",
it should fail with [ENOTDIR]. Pathnames like "/dev/null/" already failed as
they should.

Also, put the check for non-directories after lstatting the previous
component instead of when the empty component (consecutive or trailing
slashes) is detected, saving an lstat() call and some lines of code.

PR: 82980

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

9 years agoMFC r266880:
ae [Fri, 6 Jun 2014 12:37:56 +0000 (12:37 +0000)]
MFC r266880:
  Use g_conf_printf_escaped() to escape symbols, which can break
  an XML tree.

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

9 years agoMFC r266903: Update default callchain depth to 16 to match kernel
emaste [Fri, 6 Jun 2014 01:35:52 +0000 (01:35 +0000)]
MFC r266903: Update default callchain depth to 16 to match kernel

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

9 years agoMFC r266915: MFV 266913+266914:
delphij [Fri, 6 Jun 2014 00:13:38 +0000 (00:13 +0000)]
MFC r266915: MFV 266913+266914:

3897 zfs filesystem and snapshot limits (fix leak)
4901 zfs filesystem/snapshot limit leaks

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

9 years agoDocument r267113, newsyslog.conf(5) includes in conf.d.
gjb [Thu, 5 Jun 2014 23:56:06 +0000 (23:56 +0000)]
Document r267113, newsyslog.conf(5) includes in conf.d.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r266463:
bdrewery [Thu, 5 Jun 2014 15:21:25 +0000 (15:21 +0000)]
MFC r266463:

  - Include /etc/newsyslog.conf.d/* and /usr/local/etc/newsyslog.conf.d/* by
    default for newsyslog(8).

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

9 years agoMFH r266813: Don't break the legacy applications which set
ume [Thu, 5 Jun 2014 15:16:44 +0000 (15:16 +0000)]
MFH r266813: Don't break the legacy applications which set
just 2 bytes to salt.

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

9 years agoFix mismerge in r267049 and put makeoptions DEBUG=-gdwarf-2 instead of
marius [Thu, 5 Jun 2014 13:08:08 +0000 (13:08 +0000)]
Fix mismerge in r267049 and put makeoptions DEBUG=-gdwarf-2 instead of
DEBUG=-g back.
Still, the original comment should be restored in head and then be MFCed
along with r263749.

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

9 years agoFix OpenSSL multiple vulnerabilities.
delphij [Thu, 5 Jun 2014 12:32:38 +0000 (12:32 +0000)]
Fix OpenSSL multiple vulnerabilities.

Security: CVE-2014-0195, CVE-2014-0221, CVE-2014-0224,
CVE-2014-3470
Security: SA-14:14.openssl

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

9 years agoMFC r266859:
marck [Thu, 5 Jun 2014 11:48:36 +0000 (11:48 +0000)]
MFC r266859:

  Change examples to have master skew above 0 to have ability to overwrite this
  from the slave (for example, when master is failing on disk IO and could not be
  logged into or execute cronjob).

  Commented out examples changed too to simplify future merging.

  Idea by:        kaa@zvuki.ru
  Discussed with: glebius

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

9 years agoMFC r266538:
mav [Thu, 5 Jun 2014 05:36:55 +0000 (05:36 +0000)]
MFC r266538:
Make ng_mppc to not disable the node in case of multiple packet loss.
Quite often it can be just packet reorder, and killing link in such case
is inconvenient.  Add few sysctl's to control that behavior.

PR: kern/182212
Submitted by: Eugene Grosbein <egrosbein@rdtc.ru>

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

9 years agoMFC r266828:
wblock [Thu, 5 Jun 2014 01:20:25 +0000 (01:20 +0000)]
MFC r266828:

Correct the description of characters allowed.  Based on pw_checkname in
usr.sbin/pw/pw_user.c.  Modified version of patch submitted by
venture37.

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

9 years agoMFC r266848:
kib [Thu, 5 Jun 2014 00:43:32 +0000 (00:43 +0000)]
MFC r266848:
Add support for the unmapped i/o to mfi(4).

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

9 years agoMFC r266846:
kib [Thu, 5 Jun 2014 00:40:48 +0000 (00:40 +0000)]
MFC r266846:
When usermode loaded non-default segment selector into the %gs,
correctly prepare KGSBASE msr to restore the user descriptor base on
the last swapgs during return to usermode.

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

9 years agoMFC 266281:
jhb [Wed, 4 Jun 2014 18:21:33 +0000 (18:21 +0000)]
MFC 266281:
Clear the data buffer length field when freeing a command structure so that
it doesn't leak through when the command structure is reused for a user
command without a data buffer.

PR: 189668

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

9 years agoMFC 260999:
jhb [Wed, 4 Jun 2014 18:08:08 +0000 (18:08 +0000)]
MFC 260999:
Increase the block-layer backend maximum number of requests to match
the AHCI command queue depth.

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

9 years agoMFC 260972:
jhb [Wed, 4 Jun 2014 17:57:48 +0000 (17:57 +0000)]
MFC 260972:
There is no need to initialize the IOMMU if no passthru devices have been
configured for bhyve to use.

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

9 years agoMFC 263772: Fix build without SMP.
jhb [Wed, 4 Jun 2014 17:50:47 +0000 (17:50 +0000)]
MFC 263772: Fix build without SMP.

PR: 187854

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

9 years agoFix syntax error thrown at the point of creating the root pool, caused by
roberto [Wed, 4 Jun 2014 15:31:57 +0000 (15:31 +0000)]
Fix syntax error thrown at the point of creating the root pool, caused by
an embedded newline appearing within the options string surrounded by
double-quotes. Rework the logic that goes into setting dataset options on
the root pool dataset while we're here -- added two new variables (which
can be altered via scripting) ZFSBOOT_POOL_CREATE_OPTIONS and also
ZFSBOOT_BOOT_POOL_CREATE_OPTIONS for setting pool/dataset attributes at
the time of pool creation. The former is for setting options on the root
pool (zroot) and the latter is for setting options on the optional separate
boot pool (bootpool) implicitly enabled when using either GELI or MBR. The
default value for the root pool variable (ZFSBOOT_POOL_CREATE_OPTIONS) is
"-O compress=lz4 -O atime=off" and the default value for separate boot pool
variable (ZFSBOOT_BOOT_POOL_CREATE_OPTIONS) is NULL (no additional options
for the separate boot pool dataset).

Reviewed by: allanjude

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

9 years agoMFC r266780:
kib [Wed, 4 Jun 2014 15:18:46 +0000 (15:18 +0000)]
MFC r266780:
Remove the assert which can be triggered by the userspace.

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

9 years agoMFC r266107,r266108,r266109:
roberto [Wed, 4 Jun 2014 14:58:51 +0000 (14:58 +0000)]
MFC r266107,r266108,r266109:

Here is a patch for the bsdinstall root-on-zfs stuff that adds optional
encryption for swap, and optional gmirror for swap (which can be combined)

Updates to the datasets created by zfsboot.

Set compress=lz4 for the entire pool, removing it from the individual
datasets

Remove exec=no from /usr/src, breaks the test suite.

Fix the "disks" variable reuse.

It starts off being used to track the grammar for the number of disks
(singular vs plural) and then it is reused as the list of available disks.

Replace the variable with disks_grammar and move 'disk' and 'disks' to
msg_ vars so they can be translated in the future.

Submitted by: Allan Jude <freebsd@allanjude.com>
Reviewed by: roberto
Sponsored by: ScaleEngine Inc.

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

9 years agoMFC: r266821 (partial)
marius [Wed, 4 Jun 2014 12:03:51 +0000 (12:03 +0000)]
MFC: r266821 (partial)

- Actually, modules are built correctly when compiled along the kernel as
  they then pick up an opt_global.h from KERNBUILDDIR having PAE defined.
  Thus, build all modules by default except those which still really are
  defective as of r267043.
- Minor style cleanup.

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

9 years agoMFC: r266820 (partial)
marius [Wed, 4 Jun 2014 11:06:38 +0000 (11:06 +0000)]
MFC: r266820 (partial)

- Shrink the list of excluded modules to what actually still doesn't build
  as of r267043.
- Some style cleanups.

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

9 years agoMFC r266664:
hselasky [Wed, 4 Jun 2014 10:40:43 +0000 (10:40 +0000)]
MFC r266664:
Add empty LIBUSB_CALL macro, to be compatible to the libusb 1.0-API
from sourceforge.

PR: usb/190204

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

9 years agoMFC r266798 and r266803:
hselasky [Wed, 4 Jun 2014 10:33:30 +0000 (10:33 +0000)]
MFC r266798 and r266803:
Fix for big-endian architectures.

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

9 years agoMFC: r266793, r266799, r266808
marius [Wed, 4 Jun 2014 09:54:01 +0000 (09:54 +0000)]
MFC: r266793, r266799, r266808

- Fix compilation with PAE support enabled by merging r233362 and, thus,
  doing away with the unnecessary uint8_t pointer casting.
  physical addresses.
- Nuke the unused softc of emujoy(4).
- Use DEVMETHOD_END.
- Use NULL instead of 0 for pointers.

Sponsored by: Bally Wulff Games & Entertainment GmbH

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

9 years agoMFC: r266792
marius [Wed, 4 Jun 2014 09:44:05 +0000 (09:44 +0000)]
MFC: r266792

Fix DMA handling in radeon_dummy_page_init():
- Based on actual usage and on what Linux does, dummy_page.addr should
  contain the physical bus address of the dummy page rather than its
  virtual one. As a side-effect, correcting this bug fixes compilation
  with PAE support enabled by getting rid of an inappropriate cast.
- Also based on actual usage of dummy_page.addr, theoretically Radeon
  devices could do a maximum of 44-bit DMA. In reality, though, it is
  more likely that they only support 32-bit DMA, at least that is what
  radeon_gart_table_ram_alloc() sets up for, too. However, passing ~0
  to drm_pci_alloc() as maxaddr parameter translates to 64-bit DMA on
  amd64/64-bit machines. Thus, use BUS_SPACE_MAXSIZE_32BIT instead,
  which the existing 32-bit DMA limits within the drm2 code spelled as
  0xFFFFFFFF should also be changed to.

Reviewed by: dumbbell
Sponsored by: Bally Wulff Games & Entertainment GmbH

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

9 years agoMFC r266778:
nwhitehorn [Wed, 4 Jun 2014 06:21:54 +0000 (06:21 +0000)]
MFC r266778:
Repair nested signal handling on PowerPC. The signal trampoline code
was not allocating space for the parameter save area in the stack frame.
If the compiler chose to save the argument to the signal handler on the
stack, it would overwrite the first 32 bits of the sigaction struct with
it, corrupting it for a subsequent invocation.

PR: powerpc/183040

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

9 years agoMFC r266833:
hselasky [Wed, 4 Jun 2014 06:15:45 +0000 (06:15 +0000)]
MFC r266833:
Add some more spinlocks to protect the state of the USB transfer
queue. Rename some functions to indicate locking requirements.

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

9 years agoMFC r266335:
lwhsu [Wed, 4 Jun 2014 03:03:34 +0000 (03:03 +0000)]
MFC r266335:

Add axge(4) to LINT

Approved by: kevlo

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

9 years agoMFC: r266709
brueffer [Tue, 3 Jun 2014 19:25:39 +0000 (19:25 +0000)]
MFC: r266709

Language cleanup.

Reviewed by: mav, bcr, wblock

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

9 years agoMFC r266605.
cy [Tue, 3 Jun 2014 19:06:47 +0000 (19:06 +0000)]
MFC r266605.

Move mutex creation from ipf_log_soft_init() to ipf_log_soft_create()
to be consistent with mutex destruction in ipf_log_soft_destroy(). As a
result mutex destruction in ipf_log_soft_fini() is redundant.

Approved by: glebius (mentor)

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

9 years agoFix incorrect error handling in PAM policy parser. [SA-14:13]
delphij [Tue, 3 Jun 2014 19:02:18 +0000 (19:02 +0000)]
Fix incorrect error handling in PAM policy parser. [SA-14:13]

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

9 years agoMFC r266938:
rodrigc [Tue, 3 Jun 2014 14:50:51 +0000 (14:50 +0000)]
MFC r266938:

Allow customization of the brand displayed in the boot menu.
If the user specifies in /boot/loader.conf:

    loader_brand="mycustom-brand"

Then "mycustom-brand" will be executed instead of "fbsd-logo".

Submitted by:    alfred
Obtained from:   FreeNAS

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

9 years agoMFC r266468:
mav [Tue, 3 Jun 2014 06:48:35 +0000 (06:48 +0000)]
MFC r266468:
Add IOMMU PCI subclass, found on Tyan S8236 motherboard.

Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>

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

9 years agoMFC r266925:
dchagin [Tue, 3 Jun 2014 04:31:42 +0000 (04:31 +0000)]
MFC r266925:

To allow to run the interpreter itself add a new ELF branding type.
Allow Linux ABI to run ELF interpreter.

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

9 years agoMFC r266924:
dchagin [Tue, 3 Jun 2014 04:29:26 +0000 (04:29 +0000)]
MFC r266924:

Glibc was switched to the FUTEX_WAIT_BITSET op and CLOCK_REALTIME
flag has been added instead of FUTEX_WAIT to replace the FUTEX_WAIT
logic which needs to do gettimeofday() calls before the futex syscall
to convert the absolute timeout to a relative timeout.
Before this the CLOCK_MONOTONIC used by the FUTEX_WAIT_BITSET op.

When the FUTEX_CLOCK_REALTIME is specified the timeout is an absolute
time, not a relative time. Rework futex_wait to handle this.
On the side fix the futex leak in error case and remove useless
parentheses.

Properly calculate the timeout for the CLOCK_MONOTONIC case.

Tested by: Hans Petter Selasky

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

9 years agoMFC r266490, r266738:
kevlo [Tue, 3 Jun 2014 01:39:55 +0000 (01:39 +0000)]
MFC r266490, r266738:

- Configure Rx bulk
- Announce flow control capability to PHY drivers
- Improve performance by fixing incorrect Rx/Tx handling
- Rename definition of AXGE_* to reflect reality
- Add new USB IDs

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

9 years agoMFC r266444:
ae [Mon, 2 Jun 2014 10:14:03 +0000 (10:14 +0000)]
MFC r266444:
  We have two functions from where a geom orphan method could be called:
  g_orphan_register and g_resize_provider_event. Both are called from the
  event queue. Also we have GEOM_DEV class, which does deferred destroy
  for its consumers via g_dev_destroy (also called from the event queue).
  So it is possible, that for some consumers an orphan method will be
  called twice. This triggers panic in g_dev_orphan.
  Check that consumer isn't already orphaned before call orphan method.

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

9 years agoMFC r266908:
np [Mon, 2 Jun 2014 05:01:08 +0000 (05:01 +0000)]
MFC r266908:

cxgbe(4): Fix a NULL dereference when the very first call to
get_scatter_segment() in get_fl_payload() fails.  While here,
fix the code to adjust fl_bufs_used when a failure occurs for
any other scatter segment.

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

9 years agoMFC r264480: mergemaster: Avoid "/var/tmp/temproot disappeared" if there is
jilles [Sun, 1 Jun 2014 18:52:21 +0000 (18:52 +0000)]
MFC r264480: mergemaster: Avoid "/var/tmp/temproot disappeared" if there is
nothing to compare.

Because of the change to find in SVN r253886, the entire temproot would be
deleted if it became empty, leading to a confusing message "*** FATAL ERROR:
The temproot directory ${TEMPROOT} has disappeared!"

Note that mergemaster does not do anything useful in this situation anyway
(e.g. put IGNORE_FILES="/etc/group /etc/master.passwd" in
/etc/mergemaster.rc and run mergemaster -p).

As noted in that commit, add -mindepth 1.

PR: bin/188485
Submitted by: David Boyd

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

9 years agoMFC r266285,266866:
bjk [Sun, 1 Jun 2014 18:41:33 +0000 (18:41 +0000)]
MFC r266285,266866:

    ------------------------------------------------------------------------
    r266285 | bjk | 2014-05-16 23:05:52 -0400 (Fri, 16 May 2014) | 9 lines

    Correct documentation of the limit on how much memory can be mlock()ed

    vm.max_wired is a system-wide limit, not per-process.  Reword the
    section to make this more clear.

    PR:             docs/189214
    Submitted by:   Lawrence Chen (original text)
    Approved by:    hrs (mentor)

    ------------------------------------------------------------------------
    r266866 | bjk | 2014-05-29 22:16:28 -0400 (Thu, 29 May 2014) | 5 lines

    Minor mdoc fix

    Submitted by:   hrs
    Approved by:    hrs (mentor, implicit)

    ------------------------------------------------------------------------

PR: docs/189214
Approved by: hrs (mentor)

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

9 years agoMFC: r266270
brueffer [Sat, 31 May 2014 11:08:22 +0000 (11:08 +0000)]
MFC: r266270

Remove some unused variables.

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

9 years agoMFC r266782:
dchagin [Sat, 31 May 2014 05:59:55 +0000 (05:59 +0000)]
MFC r266782:

In r218101 I have not changed properly the futex syscall definition.
Some Linux futex ops atomically verifies that the futex address uaddr
(uval) contains the value val. Comparing signed uval and unsigned val
may lead to an unexpected result, mostly to a deadlock.

So copyin uaddr to an unsigned int to compare the parameters correctly.

While here change ktr records to print parameters in more readable format.

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

9 years agoMFC r263446
hiren [Sat, 31 May 2014 00:40:13 +0000 (00:40 +0000)]
MFC r263446

Update hwpmc to support core events for Atom Silvermont microarchitecture.
(Model 0x4D as per Intel document 330061-001 01/2014)

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

9 years agoMFC: 266209
gnn [Fri, 30 May 2014 15:02:29 +0000 (15:02 +0000)]
MFC: 266209

Add a command line argument (-l) to end event collection after some
number of seconds.  The number of seconds may be a fraction.

Submitted by: Julien Charbon <jcharbon@versign.com>
Relnotes: yes

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

9 years agoMFC: 266166
gnn [Fri, 30 May 2014 15:00:50 +0000 (15:00 +0000)]
MFC: 266166

Extend the size of the function or symbol that can be annotated.

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

9 years agoMFC: 266171, 266174
gnn [Fri, 30 May 2014 14:58:06 +0000 (14:58 +0000)]
MFC: 266171, 266174

Extend the size of the function or symbol that can be annotated.

Update the amount of data we can collect for hwpmc(4) by default
to work with modern processors and available memory.

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

9 years agoMFC r264235:
cy [Thu, 29 May 2014 02:55:07 +0000 (02:55 +0000)]
MFC r264235:

Implement the final missing sysctls by moving ipf_auth_softc_t from
ip_auth.c to ip_auth.h. ip_frag_soft_t moves from ip_frag.c to
ip_frag.h. mlfk_ipl.c creates sysctl MIBs that reference control blocks
that are dynamically created when IP Filter is loaded. This necessitated
creating them on-the-fly rather than statically at compile time.

Approved by: glebius (mentor)

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

9 years agoMFC r265995:
delphij [Wed, 28 May 2014 18:51:49 +0000 (18:51 +0000)]
MFC r265995:

Switch using the new $2b$ format by default, when bcrypt is used.

Relnotes: default Blowfish crypt(3) format have been changed to $2b$.

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

9 years agoMFC: r266483
marck [Wed, 28 May 2014 15:02:42 +0000 (15:02 +0000)]
MFC: r266483

Document VMware-related filesystems additions.

Reviewed by: jmg

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

9 years agoMFC: r264177
marius [Wed, 28 May 2014 09:06:36 +0000 (09:06 +0000)]
MFC: r264177

Make some unwise casts. On i386 these casts wind up being safe. Rather
than disturb the API, go with these casts to shut gcc up.

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

9 years agoMFC r266674:
dim [Wed, 28 May 2014 06:38:42 +0000 (06:38 +0000)]
MFC r266674:

Pull in r209489 from upstream clang trunk (by Akira Hatanaka):

  Fix a bug in xmmintrin.h.

  The last step of _mm_cvtps_pi16 should use _mm_packs_pi32, which is a function
  that reads two __m64 values and packs four 32-bit values into four 16-bit
  values.

  <rdar://problem/16873717>

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

9 years agoMFC r266520:
delphij [Tue, 27 May 2014 18:22:52 +0000 (18:22 +0000)]
MFC r266520:

Explicitly link libzfs against libavl as it is done in OpenSolaris
(4543:12bb2876a62e).  Without this, some third party applications
may break because the lack of AVL related symbols.

FreeBSD base system are not affected because the FreeBSD ZFS command
line tools were all linked against libavl and thus hide the underlying
issue.

PR: bin/183081

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

9 years agoMFC 266621: Eliminte spurious interrupts caused by ARM weak memory ordering.
ian [Tue, 27 May 2014 16:17:25 +0000 (16:17 +0000)]
MFC 266621: Eliminte spurious interrupts caused by ARM weak memory ordering.

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

9 years agoMFC r264096, r264097, r264099 r264100, r264101, r264102, r264119:
ian [Tue, 27 May 2014 15:30:24 +0000 (15:30 +0000)]
MFC r264096, r264097, r264099 r264100, r264101, r264102, r264119:

Fixes to the ti_sdhci and sdhci drivers (fix clock divisor calcs).

Use the ti_sdhci driver instead of ti_mmchs for Pandaboard.

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

9 years agoMFC: r259428
marius [Tue, 27 May 2014 14:55:09 +0000 (14:55 +0000)]
MFC: r259428

Clear content of keyfiles loaded by the loader after processing them.

MFC: r259429

Clear some more places with potentially sensitive data.

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

9 years agoMFC 266721:
kevlo [Tue, 27 May 2014 01:58:05 +0000 (01:58 +0000)]
MFC 266721:
Remove r264317 by accident.

Spotted by: Kuan-Chung Chiu

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

9 years agoMFC r264885
smh [Mon, 26 May 2014 23:47:57 +0000 (23:47 +0000)]
MFC r264885

Eliminate duplicate checks in vdev_geom_io_intr error handling

Sponsored by: Multiplay

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

9 years agoMFC r264881
smh [Mon, 26 May 2014 23:44:09 +0000 (23:44 +0000)]
MFC r264881

Add Linux socket call decoding to truss

Sponsored by: Multiplay

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

9 years agoMFC r264879
smh [Mon, 26 May 2014 22:54:15 +0000 (22:54 +0000)]
MFC r264879

Fix jailed raw sockets not setting the correct source address by
calling in_pcbladdr instead of prison_get_ip4.

Sponsored by: Multiplay

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

9 years agoMFC 263949, 265063: Add library dependencies for a couple bootstrap libs
ian [Mon, 26 May 2014 22:27:14 +0000 (22:27 +0000)]
MFC 263949, 265063: Add library dependencies for a couple bootstrap libs
to fix build failures for high -jN values when building with gcc.

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

9 years agoRemove vt.4.gz from ObsoleteFiles.inc that happily removes our shiny new
wblock [Mon, 26 May 2014 21:09:34 +0000 (21:09 +0000)]
Remove vt.4.gz from ObsoleteFiles.inc that happily removes our shiny new
vt.4 man page.  It was in there from the removal of pcvt eight years
ago.

Approved by: emaste
MFC after: 3 days

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

9 years agoMFC r265925:
dim [Mon, 26 May 2014 20:45:44 +0000 (20:45 +0000)]
MFC r265925:

Upgrade our copy of llvm/clang to 3.4.1 release.  This release contains
mostly fixes, for the following upstream bugs:

http://llvm.org/PR16365 http://llvm.org/PR17473 http://llvm.org/PR18000
http://llvm.org/PR18068 http://llvm.org/PR18102 http://llvm.org/PR18165
http://llvm.org/PR18260 http://llvm.org/PR18290 http://llvm.org/PR18316
http://llvm.org/PR18460 http://llvm.org/PR18473 http://llvm.org/PR18515
http://llvm.org/PR18526 http://llvm.org/PR18600 http://llvm.org/PR18762
http://llvm.org/PR18773 http://llvm.org/PR18860 http://llvm.org/PR18994
http://llvm.org/PR19007 http://llvm.org/PR19010 http://llvm.org/PR19033
http://llvm.org/PR19059 http://llvm.org/PR19144 http://llvm.org/PR19326

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

9 years agoNote merge for sendmail 8.14.9.
gshapiro [Mon, 26 May 2014 15:53:24 +0000 (15:53 +0000)]
Note merge for sendmail 8.14.9.

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

9 years agoMFC: Minor changes to force commit these files so new freebsd*.cf files are
gshapiro [Mon, 26 May 2014 15:42:39 +0000 (15:42 +0000)]
MFC: Minor changes to force commit these files so new freebsd*.cf files are
     built to use the new sendmail-8.14.9/cf tree.

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

9 years agoMFC: Update for sendmail 8.14.9 import
gshapiro [Mon, 26 May 2014 15:35:11 +0000 (15:35 +0000)]
MFC: Update for sendmail 8.14.9 import

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

9 years agoMFC: Merge sendmail 8.14.9 to HEAD
gshapiro [Mon, 26 May 2014 15:28:28 +0000 (15:28 +0000)]
MFC: Merge sendmail 8.14.9 to HEAD

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

9 years agoCatch up supported hardware obmitted in r265269, now that this branch has support
brueffer [Mon, 26 May 2014 11:16:28 +0000 (11:16 +0000)]
Catch up supported hardware obmitted in r265269, now that this branch has support
for it.

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

9 years agoMFC r266445:
ae [Mon, 26 May 2014 07:04:30 +0000 (07:04 +0000)]
MFC r266445:
  Add a topology trace to the g_spoil_event.

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

9 years agoMFC r266399:
ae [Mon, 26 May 2014 07:02:03 +0000 (07:02 +0000)]
MFC r266399:
  Since ipfw nat configures all options in one step, we should set all bits
  in the mask when calling LibAliasSetMode() to properly clear unneeded
  options.

  PR: 189655

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

9 years agoMFC r265900:
nwhitehorn [Mon, 26 May 2014 01:37:43 +0000 (01:37 +0000)]
MFC r265900:

Repair some races in IPI handling:
1. Make sure IPI mask is set before sending the IPI
2. Operate atomically on PS3 PIC outstanding interrupt list
3. Make sure IPIs are EOI'ed before, not after, processing. Without this,
   a second IPI could be sent partway through processing the first one,
   get erroneously acknowledge by the EOI to the first, and be lost. In
   particular in the case of smp_rendezvous(), this can be fatal.

In combination, this makes the PS3 boot SMP again. It probably also fixes
some latent bugs elsewhere.

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

9 years agoMFC r266541:
hselasky [Sun, 25 May 2014 18:24:40 +0000 (18:24 +0000)]
MFC r266541:

- Fix a bug where the TLBPC value was forced to being odd for IN
direction isochronous transfers.
- Remove setting of fields which does not belong to the respective
TRBs. These fields are currently set as zero and this is more a
cosmetic change.

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

9 years agoMFC r262329:
markj [Sun, 25 May 2014 18:19:57 +0000 (18:19 +0000)]
MFC r262329:
Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in some
upstream DTrace code.

MFC r262330:
1452 DTrace buffer autoscaling should be less violent

illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706

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

9 years agoMFC r265798, r265815, r266091
wblock [Sun, 25 May 2014 17:52:34 +0000 (17:52 +0000)]
MFC r265798, r265815, r266091

Add a man page for the new vt.4 device.

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

9 years agoMFC r266553, r266554:
gjb [Sun, 25 May 2014 17:00:22 +0000 (17:00 +0000)]
MFC r266553, r266554:

r266553:
  Add forward-compatibility glue with pkg-1.3:
   - Use ASSUME_ALWAYS_YES=YES instead of ASSUME_ALWAYS_YES=1
     since pkg-1.3 expects "yes" or "true" values.
   - Before exporting PKG_ABI, strip extra characters from what
     is parsed from 'pkg -vv'.  This causes problems further down
     when creating the packages directory for inclusion on the
     dvd1.iso.  Previously PKG_ABI would be 'freebsd:9:x86:64',
     but now is '"freebsd:9:x86:64";' in pkg-1.3.

r266554:
  Disable the main FreeBSD pkg(7) repositories in the dvd
  repository configuration to avoid fetching from upstream
  in case there may be conflicts.

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r266411:
kib [Sun, 25 May 2014 00:57:07 +0000 (00:57 +0000)]
MFC r266411:
Fix LD_LIBMAP.

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

9 years agoMFH (r266291): look for root certs in /usr/local first
des [Sat, 24 May 2014 22:50:58 +0000 (22:50 +0000)]
MFH (r266291): look for root certs in /usr/local first

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

9 years agoMFC r265689:
mav [Sat, 24 May 2014 10:44:40 +0000 (10:44 +0000)]
MFC r265689:
Import adapted OpenSolaris' thread pool API implementation.

The thread pool is used by libzfs to implement parallel disk scanning.
Without this change our dummy wrapper made `zpool import ZZZ` command to
scan all disks sequentially from the single thread when searching for pools.
This change makes it use two threads per CPU, same as in OpenSolaris.

On system with 200 HDDs this change reduces ZFS pool import time from 35
to 22 seconds.

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

9 years agoMFC r265821:
mav [Sat, 24 May 2014 10:41:37 +0000 (10:41 +0000)]
MFC r265821:
Comment out some pointless device open/close around reading device IDs.

FreeBSD ZFS port unlike OpenSolaris does not use device IDs, and does not
implement respective devid_*() fuctions.  It is pointless to open devices
just to close them back immediately.

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

9 years agoMFC r266320:
mav [Sat, 24 May 2014 10:37:56 +0000 (10:37 +0000)]
MFC r266320:
Add -o option to gstat to display "other" operatins (e.g. BIO_FLUSH).

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

9 years agoMFC r266319:
mav [Sat, 24 May 2014 10:20:56 +0000 (10:20 +0000)]
MFC r266319:
Make GEOM DISK to account also BIO_FLUSH operations.

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

9 years agoMFC r266491:
kib [Sat, 24 May 2014 09:50:10 +0000 (09:50 +0000)]
MFC r266491:
Remove redundand loop.

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

9 years agodrm/radeon: Add 32bit ioctls support
dumbbell [Fri, 23 May 2014 19:43:20 +0000 (19:43 +0000)]
drm/radeon: Add 32bit ioctls support

This allows to run 32bit applications on a 64bit host. This was tested
successfully with Wine (emulators/i386-wine-devel) and StarCraft II.

Submitted by: Jan Kokemüller <jan.kokemueller@gmail.com>

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

9 years agoMFC 260802,260836,260863,261001,261074,261617:
jhb [Fri, 23 May 2014 19:39:58 +0000 (19:39 +0000)]
MFC 260802,260836,260863,261001,261074,261617:
Various fixes for NMI and interrupt injection.
- If a VM-exit happens during an NMI injection then clear the "NMI Blocking"
  bit in the Guest Interruptibility-state VMCS field.
- If the guest exits due to a fault while it is executing IRET then restore
  the state of "Virtual NMI blocking" in the guest's interruptibility-state
  field before resuming the guest.
- Inject a pending NMI only if NMI_BLOCKING, MOVSS_BLOCKING, STI_BLOCKING
  are all clear. If any of these bits are set then enable "NMI window
  exiting" and inject the NMI in the VM-exit handler.
- Handle a VM-exit due to a NMI properly by vectoring to the host's NMI
  handler via a software interrupt.
- Set "Interrupt Window Exiting" in the case where there is a vector to be
  injected into the vcpu but the VM-entry interruption information field
  already has the valid bit set.
- For VM-exits due to an NMI, handle the NMI with interrupts disabled in
  addition to "blocking by NMI" already established by the VM-exit.

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

9 years agoMFC 260469:
jhb [Fri, 23 May 2014 19:06:35 +0000 (19:06 +0000)]
MFC 260469:
Fix issue with the virtio descriptor region being truncated
if it was above 4GB.

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

9 years agoMFC r259107
alc [Fri, 23 May 2014 17:47:49 +0000 (17:47 +0000)]
MFC r259107
  Eliminate a redundant parameter to vm_radix_replace().

  Improve the wording of the comment describing vm_radix_replace().

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

9 years agoMFC r266208: Speed up pmcstat by improving string hash
emaste [Fri, 23 May 2014 17:46:00 +0000 (17:46 +0000)]
MFC r266208: Speed up pmcstat by improving string hash

  In one case generating callgraph output from a 24MB system-wide sampling
  data file took 17.4 seconds on average.  Profiling showed pmcstat
  spending a lot of time in strcmp, due to hash collisions.

  Replacing the XOR-only hash with FNV-1a reduces the run time for my
  test by 40%.

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

9 years agoMFC r265886, r265948
alc [Fri, 23 May 2014 16:46:50 +0000 (16:46 +0000)]
MFC r265886, r265948
  With the new-and-improved vm_fault_copy_entry() (r265843), we can always
  avoid soft page faults when adding write access to user wired entries in
  vm_map_protect().  Previously, we only avoided the soft page fault when
  the underlying pages were copy-on-write.  In other words, we avoided the
  pages faults that might sleep on page allocation, but not the trivial
  page faults to update the physical map.

  On a fork allow read-only wired pages to be copy-on-write shared between
  the parent and child processes.  Previously, we copied these pages even
  though they are read only.  However, the reason for copying them is
  historical and no longer exists.  In recent times, vm_map_protect() has
  developed the ability to copy pages when write access is added to wired
  copy-on-write pages.  So, in this case, copy-on-write sharing of wired
  pages is not to be feared.  It is not going to lead to copy-on-write
  faults on wired memory.

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

9 years agoMFC r266464:
kib [Fri, 23 May 2014 09:29:04 +0000 (09:29 +0000)]
MFC r266464:
In execve(2), postpone the free of old vmspace until the threads are resumed
and exited.

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

9 years agoMFC r257543, r264912, r264972, r264982 and r266472:
hselasky [Fri, 23 May 2014 06:47:47 +0000 (06:47 +0000)]
MFC r257543, r264912, r264972, r264982 and r266472:
- Add preliminary support for the Realtek RTL8188EUS and RTL8188ETV chipsets.
- Add device ID for 'Sanoxy 802.11N' USB
- Initialize rssi variable.
- Fix gcc build, initialize off variable.
- The DELAY() should not be used in USB drivers.
- The usb_pause_mtx() function takes ticks and not milliseconds as last argument.

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