]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
9 years agoMFC r271493,271688-271689,271696,271854,272139-272143:
delphij [Tue, 30 Sep 2014 17:54:57 +0000 (17:54 +0000)]
MFC r271493,271688-271689,271696,271854,272139-272143:

Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

Approved by: re (gjb)

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

9 years agoMFC 271745,271834,271899,271900,271913,272022,272023:
bz [Tue, 30 Sep 2014 16:55:19 +0000 (16:55 +0000)]
MFC 271745,271834,271899,271900,271913,272022,272023:

  Revert changes to shared code of the ixl and ixlv drivers to allow
  for easier long-term maintainability.

  Restrict the drivers to building on amd64 for now as it is
  only tested on that 64bit architecture.

  Just depend on PCI and neither INET nor INET6; also make sure we
  can build individual drivers and they do not depend on each other
  anymore.

  Reviewed by: gnn, eric.joyner intel.com
PR: 193824
Approved by: re (gjb)

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

9 years agoMFC r271549 (nwhitehorn):
emaste [Tue, 30 Sep 2014 16:36:50 +0000 (16:36 +0000)]
MFC r271549 (nwhitehorn):

    Create /tmp/bsdinstall_etc even if we aren't starting the installer
    so that dhclient can write resolv.conf when used from the live
    environment.

PR: 176078
Approved by: re

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

9 years agoMFC r271875, r272046, r272049, r272056
rodrigc [Tue, 30 Sep 2014 16:14:02 +0000 (16:14 +0000)]
MFC r271875, r272046, r272049, r272056
 -> Reference the test case "packs" to fix warnings
 -> Delete mentions to removed manpages
 -> Minor fixes to docs

Approved by: re (gjb)

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

9 years agoMFC r272105: Remove duplicated header content
emaste [Tue, 30 Sep 2014 13:56:32 +0000 (13:56 +0000)]
MFC r272105: Remove duplicated header content

Approved by: re (gjb, kib)

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

9 years agoMFC r272137:
wblock [Sun, 28 Sep 2014 23:15:18 +0000 (23:15 +0000)]
MFC r272137:

Revised to better point to release notes and errata, security
advisories, and be more specific about the -questions list.

Approved by: re (gjb)

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

9 years agoMFC r272132:
kib [Sun, 28 Sep 2014 11:08:32 +0000 (11:08 +0000)]
MFC r272132:
Fix fcntl(2) compat32 after r270691.

Approved by: re (glebius)

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

9 years agoMFC revisions 268999, 269027, 269351-269352, 269354, 269460, 270283,
dteske [Sat, 27 Sep 2014 23:57:21 +0000 (23:57 +0000)]
MFC revisions 268999, 269027, 269351-269352, 269354, 269460, 270283,
270505, 270954, and 270989:
r268999: Add new bsdconfig example scripts; remove obsolete ones
r269027: Update bsdconfig dot module; fixes and enhancements
r269351: Add setvar() for non-FreeBSD platforms using bash as /bin/sh
r269352: Fix syntax error when run under bash
r269354: Update setvar() function introduced in r269351
r269460: Update f_xdialog_info() in bsdconfig's dialog.subr include
r270283: Add `-A' flag to pkg-install(8) when installing dependencies
r270505: Optimize f_which() to be slightly faster still (common.subr)
r270954: Update f_dialog_init() for safer getopts usage (dialog.subr)
r270989: Fix for previously mentioned r270954

Approved by: re (gjb)

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

9 years agoMFC r272071:
smh [Sat, 27 Sep 2014 18:20:45 +0000 (18:20 +0000)]
MFC r272071:
Fix ticks wrap issue of lowmem test in vm_pageout_scan

Approved by: re (kib)
Sponsored by: Multiplay

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

9 years agoMFC r271874:
hselasky [Sat, 27 Sep 2014 18:08:39 +0000 (18:08 +0000)]
MFC r271874:
Add new USB IDs.

PR: 193775
Approved by: re, gjb

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

9 years agoMFC r272059:
mav [Sat, 27 Sep 2014 08:33:50 +0000 (08:33 +0000)]
MFC r272059:
Remake Linux' SOUND_MIXER_INFO IOCTL as a wrapper around new FreeBSD's one.

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

Approved by: re (kib)

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

9 years agoMFC r272040:
mav [Sat, 27 Sep 2014 08:14:15 +0000 (08:14 +0000)]
MFC r272040:
When reporting some major UNIT ATTENTION condition, like POWER ON OCCURRED
or I_T NEXUS LOSS, clear all minor UAs for the LUN, redundant in this case.

All SAM specifications tell that target MAY do it, but libiscsi initiator
seems require it to be done, terminating connection with error if some more
UAs happen to be reported during iSCSI connection.

Approved by: re (gjb)

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

9 years agoMFC r272036:
kib [Sat, 27 Sep 2014 07:54:27 +0000 (07:54 +0000)]
MFC r272036:
Avoid calling vm_map_pmap_enter() for the MADV_WILLNEED on the wired
entry, the pages must be already mapped.

Approved by: re (gjb)

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

9 years agoMFC revisions 271553, 271567:
dteske [Sat, 27 Sep 2014 01:50:03 +0000 (01:50 +0000)]
MFC revisions 271553, 271567:
r271553: Rename choices in partitioning method dialog (nwhitehorn)
r271567: ZFS support isn't actually experimental anymore (nwhitehorn)

Approved by: re (gjb)

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

9 years agoMFC revisions 262864-262865, 263114, 267970:
dteske [Fri, 26 Sep 2014 23:01:27 +0000 (23:01 +0000)]
MFC revisions 262864-262865, 263114, 267970:
r262864: Stop pw(8) from segfaulting when given certain input (julian)
r262865: Part 2 of bug 187310 (julian)
r263114: Fix pw(8) edge-case deletion of group "username" on userdel
r267970: Fix infinite-loop during deletion of users from groups

PR: 187310, 169471, 191427
Submitted by: Voradesh Yenbut, Alexander Pyhalov, Kim Shrier
Obtained from: bug
Approved by: re (gjb)

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

9 years agoMFC revisions 268860, 268863:
dteske [Fri, 26 Sep 2014 22:54:10 +0000 (22:54 +0000)]
MFC revisions 268860, 268863:
r268860: Minor enhancements, bug fixes, and man-page adjustments.
r268863: Bump .Dd in manual

Reported by: lme
Approved by: re (gjb)

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

9 years agoMFC r270993:
mjg [Fri, 26 Sep 2014 20:05:28 +0000 (20:05 +0000)]
MFC r270993:

Fix up proc_realparent to always return correct process.

Prior to the change it would always return initproc for non-traced processes.

This fixes a regression in inferior().

Approved by: re (marius)

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

9 years agoForced commit to mark the real 10.1-BETA3 point, after
gjb [Fri, 26 Sep 2014 09:52:39 +0000 (09:52 +0000)]
Forced commit to mark the real 10.1-BETA3 point, after
r272152.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoProperly revert r272128.
gjb [Fri, 26 Sep 2014 03:03:58 +0000 (03:03 +0000)]
Properly revert r272128.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoRevert r272149, which introduces obscure vestiges from the
gjb [Fri, 26 Sep 2014 02:30:47 +0000 (02:30 +0000)]
Revert r272149, which introduces obscure vestiges from the
r272128 reversal.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoForced commit to reflect the real 10.1-BETA3 point.
gjb [Fri, 26 Sep 2014 01:14:11 +0000 (01:14 +0000)]
Forced commit to reflect the real 10.1-BETA3 point.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoRevert r272128:
gjb [Fri, 26 Sep 2014 01:08:31 +0000 (01:08 +0000)]
Revert r272128:
  Though this passes the buildworld test, this fails during
  installworld with:

  make[3]: "/releng/scripts-release/chroots/10/i386/release/etc/devd/Makefile"
  line 13: Malformed conditional (${MK_HYPERV} != "no")

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoUpdate stable/10 to -BETA3 as part of the 10.1-RELEASE
gjb [Fri, 26 Sep 2014 00:00:13 +0000 (00:00 +0000)]
Update stable/10 to -BETA3 as part of the 10.1-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r272007
grehan [Thu, 25 Sep 2014 23:09:35 +0000 (23:09 +0000)]
MFC r272007

Correct display of bhyve SMBIOS UUIDs with dmidecode by bumping the version.

The mixed little/big-endianness of SMBIOS UUIDs was clarified in v2.6
of the SMBIOS spec. dmidecode uses the reported version of SMBIOS to
determine the layout and what to byte-swap.

bhyve's SMBIOS reported as 2.4 though it implemented the 2.6-style of
memory layout. This resulted in dmidecode reporting a different
UUID than one passed in via the -U option.

Fix by exporting a version of 2.6.

Approved by: re (gjb)

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

9 years agoMFC r271227: MFV r271225:
delphij [Thu, 25 Sep 2014 21:45:07 +0000 (21:45 +0000)]
MFC r271227: MFV r271225:

Iterate through all the children instead of returning error when we hit
the first error.  This makes the error message give more information
rather than just the first device that causes problem.

Illumos issue:
    5118 When verifying or creating a storage pool, error messages only
       show one device

Approved by: re (gjb)

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

9 years agoMFC r271536: MFV r271518:
delphij [Thu, 25 Sep 2014 21:28:19 +0000 (21:28 +0000)]
MFC r271536: MFV r271518:

Correctly report hole at end of file.

When asked to find a hole, the DMU sees that there are no holes in the
object, and returns ESRCH.  The ZPL interprets this as "no holes before
the end of the file", and therefore inserts the "virtual hole" at the
end of the file.  Because DMU and ZPL have different ideas of where the
end of an object/file is, we will end up returning the end of file,
which is generally larger, instead of returning the end of object.

The fix is to handle the "virtual hole" in the DMU. If no hole is found,
the DMU will return a hole at the end of the file, rather than an error.

Illumos issue:
    5139 SEEK_HOLE failed to report a hole at end of file

Approved by: re (gjb)

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

9 years agoMFC r271534: MFV r271517:
delphij [Thu, 25 Sep 2014 21:07:30 +0000 (21:07 +0000)]
MFC r271534: MFV r271517:

In zil_claim, don't issue warning if we get EBUSY (inconsistent) when
opening an objset, instead, ignore it silently.

Illumos issue:

    5140 message about "%recv could not be opened" is printed when
         booting after crash

Approved by: re (gjb)

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

9 years agoRegen.
delphij [Thu, 25 Sep 2014 20:56:05 +0000 (20:56 +0000)]
Regen.

This is a direct commit to stable/10 instead of a MFC of
r271494.

Approved by: re (gjb)

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

9 years agoMFC r271493,271688,271689,271696,271854:
delphij [Thu, 25 Sep 2014 20:34:13 +0000 (20:34 +0000)]
MFC r271493,271688,271689,271696,271854:

Import HyperV Key-Value Pair (KVP) driver and daemon code by Microsoft,
many thanks for their continued support of FreeBSD.

While I'm there, also implement a new build knob, WITHOUT_HYPERV to
disable building and installing of the HyperV utilities when necessary.

The HyperV utilities are only built for i386 and amd64 targets.

Approved by: re (gjb)

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

9 years agoMFC r271259:
trasz [Thu, 25 Sep 2014 17:59:00 +0000 (17:59 +0000)]
MFC r271259:

Make it possible to use empty user name ("-U ''") for mount_smbfs(8).
It's just like "-U guest", except that it actually works, at least
with Samba 4, which seems to return authentication failure for "-U guest".

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271258:
trasz [Thu, 25 Sep 2014 17:47:26 +0000 (17:47 +0000)]
MFC r271258:

Make mount_smbfs(8) preserve the "automounted" mount flag.

The issue here is that we have to pass this flag as a string,
in iov, because it doesn't fit in mntflags, which is an int.

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r272037:
trasz [Thu, 25 Sep 2014 17:38:42 +0000 (17:38 +0000)]
MFC r272037:

Fix thinko that, with two map entries like shown below, in that order,
made automountd(8) mix them up: trying to access the second one would
trigger mount for the first one.

foo             host:/foo
foobar          host:/foobar

PR: 193584
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r272025:
trasz [Thu, 25 Sep 2014 17:28:29 +0000 (17:28 +0000)]
MFC r272025:

Fix thinko that, with two map entries like shown below, in that order,
made autofs mix them up: the second one wasn't visible in ls(1) output,
and trying to access it would trigger mount for the first one.

foobar          host:/foobar
foo             host:/foo

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r271947, OpenPAM updated to Ourouparia (20140912).
gjb [Thu, 25 Sep 2014 16:48:23 +0000 (16:48 +0000)]
Document r271947, OpenPAM updated to Ourouparia (20140912).

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r271943, Latest/pkg.txz symlink included on the DVD to
gjb [Thu, 25 Sep 2014 16:48:21 +0000 (16:48 +0000)]
Document r271943, Latest/pkg.txz symlink included on the DVD to
make bootstrapping pkg(8) easier.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r271880, serial and null console support added to UEFI
gjb [Thu, 25 Sep 2014 16:48:19 +0000 (16:48 +0000)]
Document r271880, serial and null console support added to UEFI
boot loader.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271958:
se [Thu, 25 Sep 2014 16:35:19 +0000 (16:35 +0000)]
MFC r271958:

Permit use of "no" as specification of a Norwegian keymap file.
Only "keymap=NO" (the default in defaults/rc.conf) or "keymap="
(an empty value) will prevent loading of a keymap file.

Approved by: re (gjb)

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

9 years agoMFC r268981
ray [Thu, 25 Sep 2014 13:08:31 +0000 (13:08 +0000)]
MFC r268981
Remove #ifdef-s to reduce difference to upstream.

Pointed by:     kib
Approved by:    re (glebius)

Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271957: Fix read overrun handling, broken by using wrong variable.
mav [Thu, 25 Sep 2014 09:12:11 +0000 (09:12 +0000)]
MFC r271957:  Fix read overrun handling, broken by using wrong variable.

Approved by: re (marius)

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

9 years agoMFC r271949:
mav [Thu, 25 Sep 2014 09:11:01 +0000 (09:11 +0000)]
MFC r271949:
Fix UNMAP stuck if the last block descriptor in the list is empty.

Approved by: re (glebius)

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

9 years agoMFC r271953:
hselasky [Thu, 25 Sep 2014 07:37:41 +0000 (07:37 +0000)]
MFC r271953:
Some XHCI hardware requires dropping the endpoint context before
adding it again.

Approved by: re, glebius

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

9 years agoMFC r269392: Add /usr/lib32/compat to the default ld-elf32.so.1 path.
peter [Wed, 24 Sep 2014 19:30:36 +0000 (19:30 +0000)]
MFC r269392: Add /usr/lib32/compat to the default ld-elf32.so.1 path.

Approved by: re (gjb, delphij)

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

9 years agoMFC r271934:
smh [Wed, 24 Sep 2014 09:59:48 +0000 (09:59 +0000)]
MFC r271934:
Output boot code warning when zpool upgrade -a is used to add features.

PR: 188328
Approved by: re (marius)
Sponsored by: Multiplay

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

9 years agoMFC r271447, r271496
rodrigc [Wed, 24 Sep 2014 07:29:07 +0000 (07:29 +0000)]
MFC r271447, r271496
 - Attach the ISO to an ahci-cd emulated device
 - Propagate the error status of /usr/sbin/bhyve

Approved by:re (delphij)

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

9 years agoMFC r271429, r271882:
smh [Tue, 23 Sep 2014 21:38:05 +0000 (21:38 +0000)]
MFC r271429, r271882:
Add support for controlling mfi(4) controller properties

Approved by: re (glebius)
Sponsored by: Multiplay

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

9 years agoMFC 271881: Fix partition alignment and image rounding when any of
marcel [Tue, 23 Sep 2014 16:05:23 +0000 (16:05 +0000)]
MFC 271881: Fix partition alignment and image rounding when any of
-P (block size),  -T (track size) or -H (number of heads) is given.

Approved by: re@ (gjb)

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

9 years agoThis is a direct commit rather than an MFC of r271744.
bz [Tue, 23 Sep 2014 07:53:32 +0000 (07:53 +0000)]
This is a direct commit rather than an MFC of r271744.

  Re-gen after r272020 (r271743 in head) implementing most of
  timer_{create,settime,gettime,getoverrun,delete}.

Approved by: re (gjb)
Sponsored by: DARPA/AFRL

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

9 years agoMFC r271743:
bz [Tue, 23 Sep 2014 07:50:04 +0000 (07:50 +0000)]
MFC r271743:

  Implement most of timer_{create,settime,gettime,getoverrun,delete}
  for amd64/linux32.  Fix the entirely bogus (untested) version from
  r161310 for i386/linux using the same shared code in compat/linux.

  It is unclear to me if we could support more clock mappings but
  the current set allows me to successfully run commercial
  32bit linux software under linuxolator on amd64.

  Reviewed by: jhb
  Differential Revision: D784
Sponsored by: DARPA, AFRL
Approved by: re (gjb)

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

9 years agoDocument r272006, GEOM_ELI passphrase caching on boot with multiple
gjb [Tue, 23 Sep 2014 01:18:18 +0000 (01:18 +0000)]
Document r272006, GEOM_ELI passphrase caching on boot with multiple
providers.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r271967, mkimg(1) empty partition support.
gjb [Tue, 23 Sep 2014 01:18:16 +0000 (01:18 +0000)]
Document r271967, mkimg(1) empty partition support.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoAdd sponsor attribution for r271470
gjb [Tue, 23 Sep 2014 01:18:13 +0000 (01:18 +0000)]
Add sponsor attribution for r271470

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r271816, drm/i915 HW context support.
gjb [Tue, 23 Sep 2014 01:18:11 +0000 (01:18 +0000)]
Document r271816, drm/i915 HW context support.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoDocument r271470, addition of BIOS- and UEFI-capable CDROM images.
gjb [Tue, 23 Sep 2014 01:18:09 +0000 (01:18 +0000)]
Document r271470, addition of BIOS- and UEFI-capable CDROM images.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271664:
cperciva [Tue, 23 Sep 2014 00:43:18 +0000 (00:43 +0000)]
MFC r271664:
  Cache GELI passphrases entered at the console during the boot process,
  in order to improve user-friendliness when a system has multiple disks
  encrypted using the same passphrase.

Relnotes: yes
Approved by: re (gjb)

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

9 years agoMFC r271728
davidcs [Mon, 22 Sep 2014 21:12:30 +0000 (21:12 +0000)]
MFC r271728
For ECORE_DBG_BREAK_IF() ECORE_BUG() ECORE_BUG_ON() check bxe_debug flag before printing error message.

Approved by: re(gjb)

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

9 years agoMFC r271727
davidcs [Mon, 22 Sep 2014 20:53:17 +0000 (20:53 +0000)]
MFC r271727
remove clean option from Makefile

Approved by: re(gjb)

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

9 years agoMFC 270850,271053,271192,271717:
jhb [Mon, 22 Sep 2014 20:34:36 +0000 (20:34 +0000)]
MFC 270850,271053,271192,271717:
Save and restore FPU state across suspend and resume on i386.
- Create a separate structure for per-CPU state saved across suspend and
  resume that is a superset of a pcb.
- Store the FPU state for suspend and resume in the new structure
  (for amd64, this moves it out of the PCB)
- On both i386 and amd64, all of the FPU suspend/resume handling is now
  done in C.

Approved by: re (hrs)

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

9 years agoMake sure all memory updates are made visible before we let go
marcel [Mon, 22 Sep 2014 20:10:45 +0000 (20:10 +0000)]
Make sure all memory updates are made visible before we let go
of the thread in cpu_switch(). It's otherwise possible that on
another CPU the thread continues from stale context data.

Note that this is prominent on newer CPUs, like the Montecito,
that really take advantage of the weak memory ordering. First
generation Itanium 2 is not that aggressive and does not need
this.

This is a direct commit to stable/10.

Approved by: re@ (gjb)

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

9 years agoSpelling, grammar and punctuation fixes.
brueffer [Mon, 22 Sep 2014 20:04:59 +0000 (20:04 +0000)]
Spelling, grammar and punctuation fixes.

Approved by: re (gjb)

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

9 years agoMFC r271762: Switch to text mode in UEFI boot
emaste [Mon, 22 Sep 2014 19:56:21 +0000 (19:56 +0000)]
MFC r271762: Switch to text mode in UEFI boot

    The loader previously failed to display on MacBooks and other
    systems where the UEFI firmware remained in graphics mode.

    Submitted by:       Rafael Espindola

Approved by: re

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

9 years agoMFC r271726
davidcs [Mon, 22 Sep 2014 19:00:30 +0000 (19:00 +0000)]
MFC r271726
remove clean option from Makefile

Approved by: re(gjb)

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

9 years agovt(4): Merge several bug fixes and improvements
dumbbell [Mon, 22 Sep 2014 16:13:33 +0000 (16:13 +0000)]
vt(4): Merge several bug fixes and improvements

SVN revisions in this MFC:
  271756 271758 271868 271871 271872 271899

Detailed commit list:

r271756:
  vt(4): Fix out-of-bounds array access in VT_ACTIVATE ioctl handling

  CID: 1229964

r271758
  vt(4): Use strncpy() to copy into a fixed-size buffer

  CID: 1230007

r271868:
  vt(4): Remove vt_buf->vb_dirtymask

  This structure and the associated functions were unused since the
  implementation of vd_bitblt_text_t callbacks.

r271871:
  vt(4): Rewrite history scrolling

  It's now possible to scroll up the 500 hard-coded lines of history, not
  just a fraction of them. For instance, one can reach the top of the boot
  process.

  Sometimes, when scrolling or when changing the screen size (by changing
  the font or loading a KMS driver for instance), one could see the
  history cycling (old content appeared below latest lines). This is
  fixed.

  Now, when the resolution changes are more lines can be shown, the
  displayed area is adjusted so that, if the screen was filled with
  content before, it's filled with content after as well: more history
  is visible, instead of having blank lines below the previously visible
  content.

r271872:
  vt(4): Remove superfluous word in comment

  Submitted by: brueffer@

r271899:
  Make gcc happy by initialising the variable only set in a couple of
  case statements without a default.

Approved by: re (marius)

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

9 years agoMFC r271679:
bz [Mon, 22 Sep 2014 15:32:31 +0000 (15:32 +0000)]
MFC r271679:

  Merge atse(4) interrupt handling and race condition fixes from
  cheribsd.

  Obtained from: cheribsd
  Submitted by: rwatson, emaste
Sponsored by: DARPA/AFRL
Approved by: re (delphij)

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

9 years agoMFC 271482: Add support for adding empty partition entries.
marcel [Mon, 22 Sep 2014 15:22:57 +0000 (15:22 +0000)]
MFC 271482: Add support for adding empty partition entries.

Relnotes: yes
Approved by: re@ (gjb)

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

9 years agoMFC r271711:
gjb [Mon, 22 Sep 2014 14:54:12 +0000 (14:54 +0000)]
MFC r271711:
  Update the bhyve(8) manual to reflect that it is no
  longer considered 'experimental.'

Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271459:
trasz [Mon, 22 Sep 2014 13:07:55 +0000 (13:07 +0000)]
MFC r271459:

Fix ACL tests to correctly work with ZFS; previous version used wrong
paths.

PR: 191545
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271450:
np [Mon, 22 Sep 2014 13:07:03 +0000 (13:07 +0000)]
MFC r271450:
cxgbe(4): knobs to enable/disable PAUSE frame based flow control.

Approved by: re (glebius)

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

9 years agoMFC 271381-271382,271385,271463-271466,271485,271506
ray [Mon, 22 Sep 2014 10:21:08 +0000 (10:21 +0000)]
MFC 271381-271382,271385,271463-271466,271485,271506

o Add sysctls to enable/disable potentially dengerous key combinations, like
        reboot/halt/debug.
o Add support for most key combinations supported by syscons(4).
o Some spelling fixes
o Remove stray whitespaces.
o Switch vt(4) to traditional behaviour with copy-paste same as syscons(4) do.
o Fix stray char on paste.
o Fix 'function declaration isn't a prototype' warning.
o vt(4): Enclose vt_mouse_paste() prototype inside #ifndef SC_NO_CUTPASTE/#endif

Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFH (r271624): Upgrade to OpenPAM Ourouparia.
des [Mon, 22 Sep 2014 08:29:48 +0000 (08:29 +0000)]
MFH (r271624): Upgrade to OpenPAM Ourouparia.

Approved by: re (gjb)

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

9 years agoMFC r271876:
gjb [Mon, 22 Sep 2014 05:00:55 +0000 (05:00 +0000)]
MFC r271876:
  When populating the dvd/packages/ directory, create
  a symlink to All/pkg-*.txz in the Latest/ directory.

  This allows 'pkg bootstrap' to work out-of-box if
  the REPOS_DIR environment is properly set.

Approved by: re (delphij)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271797: Make kernel to update LUN size from the backing storage
mav [Sun, 21 Sep 2014 13:09:05 +0000 (13:09 +0000)]
MFC r271797:  Make kernel to update LUN size from the backing storage
on configuration reload also if that size was not specified in the new
configuration.

Previously it happened only if size was explicitly changed in config.

Approved by: re (delphij)

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

9 years agoMFC r271794: When updating device media size use cached cdevsw pointer.
mav [Sun, 21 Sep 2014 12:07:22 +0000 (12:07 +0000)]
MFC r271794: When updating device media size use cached cdevsw pointer.

Using pointer from the cdev directly is dangerous since we have no
reference on it, and it may change any time.  That caused panic if
device has gone.

While there, report capacity change only if it really changed.

Approved by: re (dephij)

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

9 years agoMFC r271586:
kib [Sun, 21 Sep 2014 09:09:37 +0000 (09:09 +0000)]
MFC r271586:
Fix mis-spelling of bits and types names in the vnode_pager_putpages().

Approved by: re (delphij)

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

9 years agoMFC r271716:
kib [Sat, 20 Sep 2014 14:24:48 +0000 (14:24 +0000)]
MFC r271716:
Presence of any VM_PROT bits in the permission argument on x86 implies
that the entry is readable and valid.

Approved by: re (gjb)

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

9 years agoMFC r271702:
mav [Sat, 20 Sep 2014 13:48:52 +0000 (13:48 +0000)]
MFC r271702:
Fix tpc_create_token() introduced in r269497 to encode CREATOR LOGICAL
UNIT DESCRIPTOR field as Identification Descriptor CSCD descriptor, not
just as Identification Descriptor.

Approved by: re (gjb)

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

9 years agoMFC r271700: Fix typo in defined ROD types in r269497.
mav [Sat, 20 Sep 2014 13:46:16 +0000 (13:46 +0000)]
MFC r271700: Fix typo in defined ROD types in r269497.

Approved by: re (gjb)

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

9 years agoMFC r271492:
hselasky [Sat, 20 Sep 2014 07:59:34 +0000 (07:59 +0000)]
MFC r271492:
Workaround for receiving Voice Calls using the E1750 dongle from
Huawei. It might appear as if the firmware is allocating memory blocks
according to the USB transfer size and if there is initially a lot of
data, like at the answering machine prompt, it simply dies without any
apparent reason. The simple workaround for this is to force a zero
length packet at hardware level after every 512 bytes of data. This
will force the other side to use smaller memory blocks aswell.

Approved by:    re, gjb

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

9 years agoMFC r271475 by ambrisko:
emaste [Fri, 19 Sep 2014 21:30:45 +0000 (21:30 +0000)]
MFC r271475 by ambrisko:

    Add support for serial and null console to UEFI boot loader.

Approved by: re

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

9 years agoUpdate stable/10 to -BETA2 as part of the 10.1-RELEASE
gjb [Fri, 19 Sep 2014 00:03:25 +0000 (00:03 +0000)]
Update stable/10 to -BETA2 as part of the 10.1-RELEASE
cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

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

9 years agoBe compatible with boot code that starts right after the disk label in
marcel [Thu, 18 Sep 2014 22:27:02 +0000 (22:27 +0000)]
Be compatible with boot code that starts right after the disk label in
the second sector by only clearing the amount of bytes needed for the
disklabel in the second sector. Previously we were clearing exactly 1
sector worth of bytes and as such writing over boot code that may have
been there.
Since we do support more than 8 partitions, make sure to set all fields
in d_partitions. For the first 8 partitions this is unneeded, but for
partitioons 9 and up this compensates for the fact that we don't clear
an entire sector anymore.
Obviously, one cannot use more than 8 partitions when using boot code
that starts right after the disk label.

Relevant GRNs:
107879 - Employ unused bytes after the disklabel in the second sector.
189500 - Revert the part of change 107879 that employs the unused bytes
 after the disklabel in the 2nd sector for boot code.

Obtained from: Juniper Networks, Inc.

Approved by: re@ (gjb)

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

9 years agoMFC r271577:
pjd [Thu, 18 Sep 2014 22:17:46 +0000 (22:17 +0000)]
MFC r271577:

Fix descriptors leak.

PR: bin/191002
Reported by: Ryan Steinmetz
Submitted by: mjg
Approved by: re (gjb)

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

9 years agoFix checksum calculation:
marcel [Thu, 18 Sep 2014 22:16:20 +0000 (22:16 +0000)]
Fix checksum calculation:
1.  Iterate over all partitions counted in the label, which can be more
   than the number of partitions given to mkimg(1).
2.  Start the checksum from the beginning of the label; not the beginning
   of the bootarea.

Tested with bsdlabel(8).

Approved by: re@ (rodrigc)

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

9 years agodrm/i915: Add HW context support
dumbbell [Thu, 18 Sep 2014 20:32:40 +0000 (20:32 +0000)]
drm/i915: Add HW context support

This feature is required by Mesa 9.2+. Without this, a GL application
crashes with the following message:
    # glxinfo
    name of display: :0.0
    Gen6+ requires Kernel 3.6 or later.
    Assertion failed: (ctx->Version > 0), function handle_first_current,
      file ../../src/mesa/main/context.c, line 1498.
    Abort (core dumped)

Now, Mesa 10.2.4 and 10.3-rc3 works fine:
    # glxinfo
    name of display: :0
    display: :0  screen: 0
    direct rendering: Yes
    ...
    OpenGL renderer string: Mesa DRI Intel(R) 965GM
    OpenGL version string: 2.1 Mesa 10.2.4
    ...

The code was imported from Linux 3.8.13.

This an MFC of r271705.

Approved by: re (glebius)
Reviewed by: kib@
Tested by: kwm@, danfe@, Henry Hu,
Lundberg, Johannes <johannes@brilliantservice.co.jp>,
Johannes Dieterich <dieterich.joh@gmail.com>,
Lutz Bichler <lutz.bichler@gmail.com>,
Relnotes: yes

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

9 years agoMFC nmdm driver changes, r259550 and r271350
grehan [Thu, 18 Sep 2014 19:20:08 +0000 (19:20 +0000)]
MFC nmdm driver changes, r259550 and r271350

r259550 (glebius):
 Make nmdm(4) destroy devices when both sides of a pair are disconnected.
 This makes it possible to kldunload nmdm.ko when there are no users of it.

r271350:
 Fix issue with nmdm and leading zeros in device name.

 The nmdm code enforces a number between the 'nmdm' and 'A|B' portions
 of the device name. This is then used as a unit number, and sprintf'd
 back into the tty name. If leading zeros were used in the name,
 the created device name is different than the string used for the
 clone-open (e.g. /dev/nmdm0001A will result in /dev/nmdm1A).

 Since unit numbers are no longer required with the updated tty
 code, there seems to be no reason to force the string to be a
 number. The fix is to allow an arbitrary string between
 'nmdm' and 'A|B', within the constraints of devfs names. This allows
 all existing user of numeric strings to continue to work, and also
 allows more meaningful names to be used, such as bhyve VM names.

PR: 192281
Approved by: re (glebius)

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

9 years agoMFC r271676, r271677, r271678:
gjb [Thu, 18 Sep 2014 17:15:38 +0000 (17:15 +0000)]
MFC r271676, r271677, r271678:

r271676:
  Catch up with Crochet changes to fix the BEAGLEBONE
  build.

r271677:
  Catch up with Crochet changes to fix the WANDBOARD-QUAD
  build.

r271678:
  Set a static revision of the Crochet checkout to avoid
  surprise build failures.

Approved by: re (marius)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271563:
allanjude [Thu, 18 Sep 2014 17:03:52 +0000 (17:03 +0000)]
MFC r271563:
Make the root-on-zfs part of the installer warn a user who booted the
installer via UEFI that we do not support booting ZFS via UEFI yet

PR: 193595
Approved by: re (gjb), nwhitehorn
Sponsored by: ScaleEngine Inc.

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

9 years agoMFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
tijl [Thu, 18 Sep 2014 15:10:22 +0000 (15:10 +0000)]
MFC r257770 r257818 r257823 r260066 r260067 r260089 r260145 r268587 r268588
    r268589 r268590 r268593 r268597 r269758 r270845 r270847 r270893 r270932
    r270947 r271147

Merge libm work by kargl, bde and das from the past few months.
Besides optimisations and small bug fixes this includes new implementations
for C99 functions expl, coshl, sinhl, tanhl, erfl and erfcl.

Approved by: re (kib)

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

9 years agoMFC r271552:
nwhitehorn [Thu, 18 Sep 2014 14:53:30 +0000 (14:53 +0000)]
MFC r271552:

Make the default choice for the chroot shell at the end be "No". This allows
just pressing enter repeatedly to successfully install a reasonable system.

Approved by: re (gjb)

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

9 years agoMFC r271429:
smh [Thu, 18 Sep 2014 14:50:50 +0000 (14:50 +0000)]
MFC r271429:
Persist vdev_resilver_txg changes to avoid panic caused by validation
vs a vdev_resilver_txg value from a previous resilver.

Approved by: re (glebius)
Sponsored by: Multiplay

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

9 years agoMFC tty fixes, r259549 and r259663
grehan [Thu, 18 Sep 2014 14:44:47 +0000 (14:44 +0000)]
MFC tty fixes, r259549 and r259663

Keep tty_makedev as a function to preserve the KBI on 10-stable
(it is a macro in CURRENT). The changes for this are direct
commits to 10-stable.

r259549 (glebius):
  - Rename tty_makedev() into tty_makedevf() and make it capable
    to fail and return error.
  - Use make_dev_p() in tty_makedevf() instead of make_dev_cred().
  - Always pass MAKEDEV_CHECKNAME flag.
  - Optionally pass MAKEDEV_REF flag.
  - Provide macro for compatibility with old API.

  This fixes races with simultaneous creation and desctruction of
  ttys, and makes it possible to call tty_makedevf() from device
  cloners.

  A race in tty_watermarks() still exist, since the latter drops
  lock for M_WAITOK allocation. This will be addressed in separate
  commit.

r259663 (glebius):
  Move list of ttys handling from the allocating procedures, to the
  device creation stage. A device creation can fail, and in that case
  an entry already on the list will be freed.

KBI issue pointed out by:       kib
Reviewed by:    kib (KBI addition)
Approved by:    re (kib)

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

9 years agovt(4): Merge several bug fixes and improvements
dumbbell [Thu, 18 Sep 2014 14:38:18 +0000 (14:38 +0000)]
vt(4): Merge several bug fixes and improvements

SVN revisions in this MFC:
  269779 270705 270706 271180 271250 271253 271682 271684

Detailed commit list:

r269779:
  fbd: Fix a bug where vt_fb_attach() success would be considered a failure

  vt_fb_attach() currently always returns 0, but it could return a code
  defined in errno.h. However, it doesn't return a CN_* code. So checking
  its return value against CN_DEAD (which is 0) is incorrect, and in this
  case, a success becomes a failure.

  The consequence was unimportant, because the caller (drm_fb_helper.c)
  would only log an error message in this case. The console would still
  work.

  Approved by: nwhitehorn

r270705:
  vt(4): Add cngrab() and cnungrab() callbacks

  They are used when a panic occurs or when entering a DDB session for
  instance.

  cngrab() forces a vt-switch to the console window, no matter if the
  original window is another terminal or an X session. However, cnungrab()
  doesn't vt-switch back to the original window currently.

r270706:
  drm: Don't "taskqueue" vt-switch if under DDB/panic situation

  If DDB is active, we can't use a taskqueue thread to switch away from
  the X window, because this thread can't run.

  Reviewed by: ray@
  Approved by: ray@

r271180:
  vt_vga: vd_setpixel_t and vd_drawrect_t are noop in text mode

r271250:
  vt(4): Change the terminal and buffer sizes, even without a font

  This fixes a bug where scroll lock would not work for tty #0 when using
  vt_vga's textmode. The reason was that this window is created with a
  static 256x100 buffer, larger than the real size of 80x25.

  Now, in vt_change_font() and vt_compute_drawable_area(), we still
  perform operations even of the window has no font loaded (this is the
  case in textmode here vw->vw_font == NULL). One of these operation
  resizes the buffer accordingly.

  In vt_compute_drawable_area(), we take the terminal size as is (ie.
  80x25) for the drawable area.

  The font argument to vt_set_border() is removed (it was never used) and
  the code now uses the computed drawable area instead of re-doing its own
  calculation.

  Reported by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>
  Tested by: Harald Schmalzbauer <h.schmalzbauer_omnilan.de>

r271253:
  pause_sbt(): Take the cold path (ie. use DELAY()) if KDB is active

  This fixes a panic in the i915 driver when one uses debug.kdb.enter=1
  under vt(4).

  PR: 193269
  Reported by: emaste@
  Submitted by: avg@

r271682:
  vt(4): Fix a LOR which occurs during a call to vt_upgrade()

  Reported by: kib@
  Review: https://reviews.freebsd.org/D785
  Reviewed by: ray@
  Approved by: ray@

r271684:
  vt(4): Use vt_fb_drawrect() and vt_fb_setpixel() in all vt_fb-derivative

  Review: https://reviews.freebsd.org/D789
  Reviewed by: nwhitehorn
  Approved by: nwhitehorn

Approved by: re (gjb)

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

9 years agoMFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset.
des [Thu, 18 Sep 2014 14:27:37 +0000 (14:27 +0000)]
MFH (r271256, r271617): avoid segfault if PAM_RHOST nor PAM_TTY are unset.

Approved by: re (gjb)
PR: 83099

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

9 years agoMFH (r271255): fix parsing of ipv6 nameserver lines
des [Thu, 18 Sep 2014 13:53:39 +0000 (13:53 +0000)]
MFH (r271255): fix parsing of ipv6 nameserver lines

Approved by: re (kib)

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

9 years agoMFC r271571:
trasz [Thu, 18 Sep 2014 11:52:28 +0000 (11:52 +0000)]
MFC r271571:

Fix two small nits in ctl.conf(5).

Approved by: re (glebius)
Sponsored by: The FreeBSD Foundation

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

9 years agoMFC r271643:
tuexen [Thu, 18 Sep 2014 09:49:49 +0000 (09:49 +0000)]
MFC r271643:
Chunk IDs are 8 bit entities, not 16 bit.
Thanks to Peter Kasting from Google for drawing
my attention to it.

MFC r271665:
The MTU is handled as a 32-bit entity within the SCTP stack.
This was reported by Peter Kasting from Google.

MFC r271670:
Make a type conversion explicit. When compiling this code on
Windows as part of the SCTP userland stack, this fixes a
warning reported by Peter Kasting from Google.

MFC r271672:
Small cleanup which addresses a warning regaring the truncation
of a 64-bit entity to a 32-bit entity. This issue was reported by
Peter Kasting from Google.

MFC r271673:
Use a consistent type for the number of HMAC algorithms.
This fixes a bug which resulted in a warning on the userland
stack, when compiled on Windows.
Thanks to Peter Kasting from Google for reporting the issue and
provinding a potential fix.

MFC r271674:
Add a explict cast to silence a warning when building
the userland stack on Windows.
This issue was reported by Peter Kasting from Google.

Approved by: re (kib)

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

9 years agoMFC r271644:
mav [Thu, 18 Sep 2014 09:21:29 +0000 (09:21 +0000)]
MFC r271644:
Add quirks to disable READ CAPACITY (16) for PNY USB 3.0 Flash Drives.

Submitted by: Sean Fagan <sef@ixsystems.com>
Approved by: re (kib)

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

9 years agoMFC r270673:
tuexen [Thu, 18 Sep 2014 08:58:22 +0000 (08:58 +0000)]
MFC r270673:
Announce SCTP support in the kern.features sysctl variables.

MFC r270859:
Enable SCTP support. It runs perfectly fine on a Wandboard quad.

MFC r271204 with manual intervention:
Fix the handling of sysctl variables when used with VIMAGE.
While there do some cleanup of the code.

MFC r271209:
Fix a leak of an address, if the address is scheduled for removal
and the stack is torn down.
Thanks to Peter Bostroem and Jiayang Liu from Google for reporting the
issue.

MFC r271219:
Use SYSCTL_PROC instead of SYSCTL_VNET_PROC.
Suggested by: glebius@

MFC r271221:
Use union sctp_sockstore instead of struct sockaddr_storage. This
eliminates some warnings when building in userland.
Thanks to Patrick Laimbock for reporting this issue.
Remove also some unnecessary casts.
There should be no functional change.

MFC r271228:
Address another warnings reported by Patrick Laimbock when compiling
in userspace. While there, improve consistency.

MFC r271230:
Address warnings generated by the clang analyzer.

Approved by: re (kib)

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

9 years agoMFC r271597:
dim [Thu, 18 Sep 2014 06:34:27 +0000 (06:34 +0000)]
MFC r271597:

Pull in r217410 from upstream llvm trunk (by Bob Wilson):

  Set trunc store action to Expand for all X86 targets.

  When compiling without SSE2, isTruncStoreLegal(F64, F32) would return
  Legal, whereas with SSE2 it would return Expand. And since the Target
  doesn't seem to actually handle a truncstore for double -> float, it
  would just output a store of a full double in the space for a float
  hence overwriting other bits on the stack.

  Patch by Luqman Aden!

This should fix clang -O0 on i386 assigning garbage to floats, in
certain scenarios.

PR: 187437
Submitted by: cebd@gmail.com
Approved by: re (marius)
Obtained from: http://llvm.org/viewvc/llvm-project?rev=217410&view=rev

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

9 years agoMFC r271445,r271446,r271560:
allanjude [Thu, 18 Sep 2014 03:02:00 +0000 (03:02 +0000)]
MFC r271445,r271446,r271560:
Improve markup and language throughout the ctl.conf man page

MFC r271543:
Add the new iscsi(4) man page
Cross reference it from iscsid(8) and iscsictl(8)

Approved by: re (gjb), bcr (mentor)

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

9 years agoMFC Clang debuginfo crash fix
emaste [Thu, 18 Sep 2014 01:24:40 +0000 (01:24 +0000)]
MFC Clang debuginfo crash fix

r271432: Merge upstream Clang rev 205331 debuginfo crash fix:

      Debug info: fix a crash when emitting IndirectFieldDecls, which were
      previously not handled at all.
      rdar://problem/16348575

r271433: Add clang patch corresponding to r271432

Approved by: re
Sponsored by: DARPA, AFRL

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