]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r294565: sem: Don't free nameinfo that is still in list when open()
jilles [Wed, 27 Jan 2016 22:56:04 +0000 (22:56 +0000)]
MFC r294565: sem: Don't free nameinfo that is still in list when open()
fails.

This bug could be reproduced easily by calling sem_open() with O_CREAT |
O_EXCL on a semaphore that is already open in the process. The struct
sem_nameinfo would be freed while still in sem_list and later calls to
sem_open() or sem_close() could access freed memory.

PR: 206396

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

8 years ago- Add an entry for the SIIG Cyber 2SP1 PCIe adapter, which is based
marius [Wed, 27 Jan 2016 22:50:04 +0000 (22:50 +0000)]
- Add an entry for the SIIG Cyber 2SP1 PCIe adapter, which is based
  on an Oxford Semiconductor OX16PCI954 but uses only two ports and
  a non-default clock rate. [1]
- Add entries for the more prominent members of the Digi International
  Neo series, which are based on Exar PCI chips.
  Tested by: Patrick Powell
- Mark some unused parameters as such.
- Fix style/whitespace

PR: 176407 [1]

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

8 years agoMFC: r294362, r294414, r294753
marius [Wed, 27 Jan 2016 22:48:04 +0000 (22:48 +0000)]
MFC: r294362, r294414, r294753

- Fix tty_drain() and, thus, TIOCDRAIN of the current tty(4) incarnation
  to actually wait until the TX FIFOs of UARTs have be drained before
  returning. This is done by bringing the equivalent of the TS_BUSY flag
  found in the previous implementation back in an ABI-preserving way.
  Reported and tested by: Patrick Powell
- Make the code consistent with itself style-wise and bring it closer
  to style(9).
- Mark unused arguments as such.
- Make the ttystates table const.

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

8 years agoSync the e1000 drivers with what's in head as of r294327, modulo parts
marius [Wed, 27 Jan 2016 22:31:08 +0000 (22:31 +0000)]
Sync the e1000 drivers with what's in head as of r294327, modulo parts
that don't apply to stable/10 (driver API, if_inc_counter(), RSS changes
etc.) and modulo r287465 (which reportedly breaks igb(4)), i. e. assorted
fixes and improvements only:

o MFC r267385 (partial):
  - Don't compare bus_dma map pointers for static DMA allocations against
    NULL to determine if bus_dmamap_unload() or bus_dmamem_free() should be
    called. Instead, check the associated bus and virtual addresses.
  - Don't clear static DMA maps to NULL.
o MFC r284933:
  Delete the refernce to VLAN handling being disabled by default. This is
  no longer the case. [1]
o MFC r285639:
  Add an adapter CORE lock in the DDB hook em_dump_queue to avoid WITNESS
  panic in em_init_locked() while debugging.
o MFC r285879:
  - Remove unused txd_saved.
  - Intialize txd_upper, txd_lower and txd_used at declaration.
o MFC r286162:
  Free mbufs when busdma loading fails.
o MFC r286829:
  Add capability to disable CRC stripping as it breaks IPMI/BMC capabilities
  on certain adatpers. [2]
o MFC r286831: [3]
  - Increase EM_MAX_SCATTER to 64 such that the size of em_xmit()::
    segs[EM_MAX_SCATTER] doesn't get overrun by things like NFS that can
    and do shove more than 32 segs when being used with em(4) and TSO4.
  - Update tso handling code in em_xmit() with update from jhb@
  - Set if_hw_tsomax, if_hw_tsomaxsegcount and if_hw_tsomaxsegsize to
    appropriate values.
  - Define a TSO workaround "magic" number of 4 that is used to avoid an
    alignment issue in hardware.
  - Change a couple of integer values that were used as booleans to actual
    bool types.
  - Ensure that em_enable_intr() enables the appropriate mask of interrupts
    and not just a hardcoded define of values.
o MFC r286832:
  e1000/if_lem.c bump to 1.1.0
o MFC r286833:
  Bump all copywrite dates to 2015.
o MFC r287112:
  Style/whitespace cleanup in shared/common code.
o MFC r293331:
  - Switch em(4) to the extended RX descriptor format.
  - Split rxbuffer and txbuffer apart to support the new RX descriptor
    format structures. Move rxbuffer manipulation to em_setup_rxdesc() to
    unify the new behavior changes.
  - Add a RSSKEYLEN macro for help in generating the RSSKEY data structures
    in the card.
  - Change em_receive_checksum() to process the new rxdescriptor format
    status bit.
o MFC r293332:
  Disable the reuse of checksum offload context descriptors in the case
  of multiple queues in em(4). Document errata in the code.
o MFC r293854:
  Given that em(4), lem(4) and igb(4) hardware doesn't require the
  alignment guarantees provided by m_defrag(9), use m_collapse(9)
  instead for performance reasons.
  While at it, sanitize the statistics softc members, i. e. retire
  unused ones and add SYSCTL nodes missing for actually used ones.

PR: 118693 [1], 161277 [2], 195078 [3], 199174 [3], 200221 [3]

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

8 years agoMFC 283933: Add comments
dteske [Wed, 27 Jan 2016 15:19:48 +0000 (15:19 +0000)]
MFC 283933: Add comments

r283933: Indicate where the flag for later abort" originates.

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

8 years agoMFC r294319:
hselasky [Wed, 27 Jan 2016 15:01:08 +0000 (15:01 +0000)]
MFC r294319:
Fix an issue where the network adapter could be left in down state
after changing the HW LRO sysctl when previously in up state.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4941

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

8 years agoMFC r294318:
hselasky [Wed, 27 Jan 2016 14:59:22 +0000 (14:59 +0000)]
MFC r294318:
Add clarifying comment about CQE zipping.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4940

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

8 years agoMFC r294317:
hselasky [Wed, 27 Jan 2016 14:57:37 +0000 (14:57 +0000)]
MFC r294317:
Declare local variables at top of function.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4939

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

8 years agoMFC r294314:
hselasky [Wed, 27 Jan 2016 14:55:41 +0000 (14:55 +0000)]
MFC r294314:
Allow RX and TX pause frames to be set through ifconfig.

Sponsored by: Mellanox Technologies
Differential Revision: https://reviews.freebsd.org/D4817

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

8 years agoDocument SA-16:08, SA-16:09, SA-16:10.
gjb [Wed, 27 Jan 2016 14:12:10 +0000 (14:12 +0000)]
Document SA-16:08, SA-16:09, SA-16:10.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r294694:
tuexen [Wed, 27 Jan 2016 14:01:21 +0000 (14:01 +0000)]
MFC r294694:
sctp_sendx() needs to provide the assoc_id back.

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

8 years agoMFC r294688:
tuexen [Wed, 27 Jan 2016 13:59:27 +0000 (13:59 +0000)]
MFC r294688:
sctp_sendv() needs to fill in the association id on return.

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

8 years agoMFC r294900:
delphij [Wed, 27 Jan 2016 07:28:55 +0000 (07:28 +0000)]
MFC r294900:

Implement AT_SECURE properly.

AT_SECURE auxv entry has been added to the Linux 2.5 kernel to pass a
boolean flag indicating whether secure mode should be enabled. 1 means
that the program has changes its credentials during the execution.
Being exported AT_SECURE used by glibc issetugid() call.

Submitted by: imp, dchagin
Security: FreeBSD-SA-16:10.linux
Security: CVE-2016-1883

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

8 years agoMFC 293617,294669: Minor fixes
dteske [Wed, 27 Jan 2016 06:38:03 +0000 (06:38 +0000)]
MFC 293617,294669: Minor fixes

r293617: Fix improper duration for f_dialog_pause() API
r294669: Fix a typo in a comment

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

8 years agoMFC r289797: dpv(1) merged to stable/10 before release/10.2.0
dteske [Wed, 27 Jan 2016 06:30:23 +0000 (06:30 +0000)]
MFC r289797: dpv(1) merged to stable/10 before release/10.2.0

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

8 years agoMFC r293868: Default to en_US.ISO8859-1 if no locale
dteske [Wed, 27 Jan 2016 06:25:59 +0000 (06:25 +0000)]
MFC r293868: Default to en_US.ISO8859-1 if no locale

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

8 years agoMFC r294557:
sephe [Wed, 27 Jan 2016 05:19:05 +0000 (05:19 +0000)]
MFC r294557:

hyperv/stor: Verify returned inquiry data before further dispatching

Windows 10 and Window 2016 will return all zero inquiry data for
non-existing slots.  If we dispatched them, then a lot of useless
(0 sized) disks would be created.  So we verify the returned inquiry
data (valid type, non-empty vendor/product/revision etc.), before
further dispatching.

Minor white space cleanup and wording fix.

Submitted by:           Hongjiang Zhang <honzhan microsoft com>
Reviewed by:            adrian, sephe, Jun Su <junsu microsoft com>
Approved by:            adrian (mentor)
Modified by:            sephe
Sponsored by:           Microsoft OSTC
Differential Revision:  https://reviews.freebsd.org/D4928

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

8 years agoMFC 294548-294549,294556,294684: Add watch scripts
dteske [Wed, 27 Jan 2016 05:04:17 +0000 (05:04 +0000)]
MFC 294548-294549,294556,294684: Add watch scripts

r294548: Add scripts for watching common entry points.
r294549: Fix bad title on script (caused by copy/paste).
r294556: fbt -> syscall; fbt names changed to be sys_*
r294684: Bump copyright for change from fbt to syscall

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

8 years agoMFC r294200: [PR 206224] bv_cnt is sometimes examined without holding the
rpokala [Tue, 26 Jan 2016 22:14:55 +0000 (22:14 +0000)]
MFC r294200: [PR 206224] bv_cnt is sometimes examined without holding the
bufobj lock

Add locking around access to bv_cnt which is currently being done unlocked

Approved by: jhb
Sponsored by: Panasas, Inc.

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

8 years agoMFC: r256940
jkim [Tue, 26 Jan 2016 21:35:47 +0000 (21:35 +0000)]
MFC: r256940

Allow users to set UUID in network byte order regardless of SMBIOS version.

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

8 years agoMFC r294347
asomers [Tue, 26 Jan 2016 20:45:41 +0000 (20:45 +0000)]
MFC r294347

Fix usr.bin.truncate.truncate_test.bad_truncate with ZFS /tmp.

The bad_truncate test sets the uimmutable flag to produce an error in
truncate, but that flag isn't supported by ZFS.  If /tmp is on a ZFS
filesystem, the test will fail.  Change it to use readonly permissions and
an unpriveleged user instead.

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

8 years agoMFC r292066, r292069, r293708, r294027, and r294358, mostly to vdev_geom.c
asomers [Tue, 26 Jan 2016 17:00:31 +0000 (17:00 +0000)]
MFC r292066, r292069, r293708, r294027, and r294358, mostly to vdev_geom.c

r292066 | asomers | 2015-12-10 14:46:21 -0700 (Thu, 10 Dec 2015) | 25 lines

During vdev_geom_open, require that the vdev guids match the device's label
except during split, add, or create operations. This fixes a bug where the
wrong disk could be returned, and higher layers of ZFS would immediately
eject it again.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c:
        o When opening by GUID, require both the pool and vdev GUIDs to
          match.  While it is highly unlikely for two vdevs to have the same
          vdev GUIDs, the ZFS storage pool allocator only guarantees they
          are unique within a pool.

        o Modify the open behavior to:
          - If we are opening a vdev that hasn't previously been opened,
            open by path without checking GUIDs.
          - Otherwise, open by path and verify GUIDs.
          - If that fails, search all geom providers for a device with
            matching GUIDs.
          - If that fails, return ENOENT.

r292069 | asomers | 2015-12-10 17:04:13 -0700 (Thu, 10 Dec 2015) | 6 lines

Change an important error message from ZFS_LOG to printf

r293708 | asomers | 2016-01-11 15:15:46 -0700 (Mon, 11 Jan 2016) | 16 lines

Fix importing l2arc device by guid

After r292066, vdev_geom verifies both the vdev and pool guids of device
labels during open. However, spare and l2arc devices don't have pool guids,
so opening them by guid will fail (opening by path, when the pathname is
known, still succeeds). This change allows a vdev to be opened by guid if
the label contains no pool_guid, which is the case for inactive spares and
l2arc devices.

r294027 | asomers | 2016-01-14 11:19:05 -0700 (Thu, 14 Jan 2016) | 14 lines

Fix race condition involving ZFS remove events

When a ZFS drive disappears, ZFS sends a resource.fs.zfs.removed event to
userland. A userland program like zfsd(8) can use that event, for example to
activate a hotspare. The current code contains a race condition: vdev_geom
will sent the sysevent _before_ spa.c would update the vdev's status,
causing userland processes to see pool state that does not reflect the
device removal. This change moves the sysevent to spa.c, closing the race.

r294358 | asomers | 2016-01-19 16:16:24 -0700 (Tue, 19 Jan 2016) | 10 lines

Quell harmless CID about unchecked return value in nvlist_get_guids.

The return value doesn't need to be checked, because nvlist_get_guid's
callers check the returned values of the guids.

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

8 years agoMFH: r293745
brueffer [Tue, 26 Jan 2016 09:50:36 +0000 (09:50 +0000)]
MFH: r293745

Add a basic bhyvectl manpage.

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

8 years agoMFH (r275765): add a vigr(8) tool to mirror vipw(8)
des [Tue, 26 Jan 2016 09:09:20 +0000 (09:09 +0000)]
MFH (r275765): add a vigr(8) tool to mirror vipw(8)

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

8 years agoMFH (r277706): allow the user to specify the location of control.conf
des [Tue, 26 Jan 2016 09:02:23 +0000 (09:02 +0000)]
MFH (r277706): allow the user to specify the location of control.conf

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

8 years agoMFH (r290008): load_rc_config no longer requires a service name
des [Tue, 26 Jan 2016 08:58:59 +0000 (08:58 +0000)]
MFH (r290008): load_rc_config no longer requires a service name

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

8 years agoMFH (r290006): loading rc.subr and rc.conf has no effect here
des [Tue, 26 Jan 2016 08:57:45 +0000 (08:57 +0000)]
MFH (r290006): loading rc.subr and rc.conf has no effect here

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

8 years agoMFH (r293034, r29304): plasma screensaver
des [Tue, 26 Jan 2016 08:55:31 +0000 (08:55 +0000)]
MFH (r293034, r29304): plasma screensaver

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

8 years agoMFH (r293033): ignore unload unless loaded + add a reload target
des [Tue, 26 Jan 2016 08:49:44 +0000 (08:49 +0000)]
MFH (r293033): ignore unload unless loaded + add a reload target

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

8 years agoMFH (r291197): markup fixes
des [Tue, 26 Jan 2016 08:46:02 +0000 (08:46 +0000)]
MFH (r291197): markup fixes

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

8 years agoMFH (r290743): support an exclusion regex, like security/200.chkmounts
des [Tue, 26 Jan 2016 08:45:19 +0000 (08:45 +0000)]
MFH (r290743): support an exclusion regex, like security/200.chkmounts

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

8 years agoMFH (r290742): don't index /var/db/freebsd-update
des [Tue, 26 Jan 2016 08:44:01 +0000 (08:44 +0000)]
MFH (r290742): don't index /var/db/freebsd-update

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

8 years agoMFC r286652:
ngie [Tue, 26 Jan 2016 07:06:38 +0000 (07:06 +0000)]
MFC r286652:
r286652 (by jmmv):

Mark usr/include/c++/v1/tr1 as obsolete

The directory usr/include/c++/v1 was marked as obsolete but its tr1 subdir
was not, resulting in a removal error in delete-old.

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

8 years agoMFC r278047:
ngie [Tue, 26 Jan 2016 06:37:21 +0000 (06:37 +0000)]
MFC r278047:

PR: 206622
Sponsored by: EMC / Isilon Storage Division

r278047 (by amdmi3):

- Remove more files when MK_BSNMP == no

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

8 years agoMFC r294620:
dchagin [Tue, 26 Jan 2016 06:05:55 +0000 (06:05 +0000)]
MFC r294620:

  Fix a typo.

MFC r294621:

  Remove obsolete comment.

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

8 years agoRevert r279010:
pfg [Tue, 26 Jan 2016 04:51:44 +0000 (04:51 +0000)]
Revert r279010:
tdelete(3): don't delete the node we are about to return.

The original change, from NetBSD, was bogus; introduced a memory
leak and and broke POSIX. By reverting we actually match NetBSD's
latest revision.

This is a direct commit to 10 since this function was rewritten
in 11-current.

Reported by: Markiyan Kushnir
Obtained from: NetBSD (CVS rev. 1.7, 1.8)

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

8 years agoMFC r293458:
markj [Tue, 26 Jan 2016 00:22:02 +0000 (00:22 +0000)]
MFC r293458:
Prevent cv_waiters wraparound.

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

8 years agoMFC r294370:
bdrewery [Mon, 25 Jan 2016 17:38:20 +0000 (17:38 +0000)]
MFC r294370:

  mkdep: Fix -include not being added for .depend tracking.

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

8 years agoMFC r293460:
smh [Mon, 25 Jan 2016 13:35:28 +0000 (13:35 +0000)]
MFC r293460:

Switch EFT boot1 to use libstand

This includes a change to the Makefile comment to correct it due to the
lack of arm and i386 support in 10.x.

Sponsored by: Multiplay

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

8 years agoMFC r293422 (partial):
smh [Mon, 25 Jan 2016 13:27:49 +0000 (13:27 +0000)]
MFC r293422 (partial):

Update generated EFI boot image templates.

This is a partial MFC as stable/10 only has EFI boot support for amd64,
and there are no plans to change this, so the other platform images
aren't included.

Sponsored by: Multiplay

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

8 years agoMFC r293461:
smh [Mon, 25 Jan 2016 10:55:52 +0000 (10:55 +0000)]
MFC r293461:

Remove hidden "Not ufs" printfs from boot code

Sponsored by: Multiplay

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

8 years agoMFC r293274:
smh [Mon, 25 Jan 2016 10:50:11 +0000 (10:50 +0000)]
MFC r293274:

style(9) fixes for EFI boot

Sponsored by: Multiplay

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

8 years agoMFC r281059 (by rpaulo):
smh [Mon, 25 Jan 2016 10:48:58 +0000 (10:48 +0000)]
MFC r281059 (by rpaulo):

boot1 EFI: reset the screen and select the best mode.

Sponsored by: Multiplay

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

8 years agoMFC r293271:
smh [Mon, 25 Jan 2016 10:45:18 +0000 (10:45 +0000)]
MFC r293271:

Fix const conversion warning in lz4_decompress

Sponsored by: Multiplay

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

8 years agoMFC r293269:
smh [Mon, 25 Jan 2016 10:43:44 +0000 (10:43 +0000)]
MFC r293269:

Fix return from zfs_probe_dev

Sponsored by: Multiplay

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

8 years agoMFC r293268:
smh [Mon, 25 Jan 2016 10:41:23 +0000 (10:41 +0000)]
MFC r293268:

Fix _MSC_EXTENSIONS checks

Sponsored by: Multiplay

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

8 years agoMFC r292074:
smh [Mon, 25 Jan 2016 09:40:25 +0000 (09:40 +0000)]
MFC r292074:

Limit stripesize reported from nvd(4) to 4K

Sponsored by: Multiplay

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

8 years agoMFC r292289:
smh [Mon, 25 Jan 2016 09:29:29 +0000 (09:29 +0000)]
MFC r292289:

Prevent g_access calls to bad multipath members

Sponsored by: Multiplay

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

8 years agoMFC r291911, r293659:
smh [Mon, 25 Jan 2016 09:26:23 +0000 (09:26 +0000)]
MFC r291911, r293659:

Fix panic on shutdown due to iscsi event priority.

Close iSCSI sessions on shutdown.

Sponsored by: Multiplay

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

8 years agoMFH (r291198, r291260, r291261, r291375, r294325, r294335, r294563)
des [Sun, 24 Jan 2016 22:28:18 +0000 (22:28 +0000)]
MFH (r291198, r291260, r291261, r291375, r294325, r294335, r294563)

Remove the HPN and None cipher patches.

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

8 years agoMFC r289477:
ian [Sun, 24 Jan 2016 22:17:05 +0000 (22:17 +0000)]
MFC r289477:

  Fix a strange macro re-definition compile error.  If the VM_MAXUSER_ADDRESS
  value is defined as a config option the definition is emitted into
  opt_global.h which is force-included into everything.  In addition, the
  symbol is emitted by the genassym mechanism, but that by its nature reduces
  the value to a 0xnnnnnnnn number.  When compiling a .S file you end up
  with two different definitions of the macro (they evaluate to the same
  number, but the text is different, upsetting the compiler).

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

8 years agoMFC r293105:
ian [Sun, 24 Jan 2016 22:14:37 +0000 (22:14 +0000)]
MFC r293105:

  Eliminate code for walking through the early static env data.  This code
  is called from a device attach routine, and thus cannot be called before
  the cutover from static to dynamic kernel env.

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

8 years agoMFC r294032:
ian [Sun, 24 Jan 2016 22:06:56 +0000 (22:06 +0000)]
MFC r294032:

  Fix the handling of the "PDC write transfer length" erratum for at91.  The
  problem affects revision 1xx hardware as well as later versions.  Also, the
  recommended workaround is to set the PDC count register for a 12-byte
  transfer when the actual size is less than that, but there is no need to
  extend or zero-out the data buffer, because the blklen register contains
  the real transfer size and only that many bytes will be transferred.

  Also add a sysctl to turn debugging printfs on or off on the fly.

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

8 years agoMFC r293830:
ian [Sun, 24 Jan 2016 22:05:21 +0000 (22:05 +0000)]
MFC r293830:

  Fix the spelling of fueword* to eliminate compile warnings about mismatched
  begin/end symbols when the warning level is turned up.

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

8 years agoMFC r293053, r293061, r293063, r293064, r293065, r293775, r293792:
ian [Sun, 24 Jan 2016 22:00:36 +0000 (22:00 +0000)]
MFC r293053, r293061, r293063, r293064, r293065, r293775, r293792:

  Use 64-bit math when finding a block of ram to hold the kernel.  This fixes
  a problem on 32-bit systems which have ram occupying the end of the physical
  address space -- for example, a block of ram at 0x80000000 with a size of
  0x80000000 was overflowing 32 bit math and ending up with a calculated size
  of zero.

  Use 64-bit math when processing the lists of physical and excluded memory
  to generate the phys_avail and dump_avail arrays.

  Work around problems that happen when there is ram at the end of the
  physical address space.

  Cast pointer through uintptr_t on the way to uint64_t to squelch a warning.

  Reword the comment to better describe what I found while researching the
  problem that led to this temporary workaround (and also so I can properly
  cite the PR in the commit this time).

  Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
  because rounding down cannot increase the number of bits needed to express
  the result.

  Go back to using uintptr_t, because code that actually compiles is
  infinitely less buggy than code that is theoretically correct in some
  alternate universe.

PR:           201614

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

8 years agoMFC r293045, r293046:
ian [Sun, 24 Jan 2016 21:04:06 +0000 (21:04 +0000)]
MFC r293045, r293046:

  Make the 'env' directive described in config(5) work on all architectures,
  providing compiled-in static environment data that is used instead of any
  data passed in from a boot loader.

  Previously 'env' worked only on i386 and arm xscale systems, because it
  required the MD startup code to examine the global envmode variable and
  decide whether to use static_env or an environment obtained from the boot
  loader, and set the global kern_envp accordingly.  Most startup code wasn't
  doing so.  Making things even more complex, some mips startup code uses an
  alternate scheme that involves calling init_static_kenv() to pass an empty
  buffer and its size, then uses a series of kern_setenv() calls to populate
  that buffer.

  Now all MD startup code calls init_static_kenv(), and that routine provides
  a single point where envmode is checked and the decision is made whether to
  use the compiled-in static_kenv or the values provided by the MD code.

  The routine also continues to serve its original purpose for mips; if a
  non-zero buffer size is passed the routine installs the empty buffer ready
  to accept kern_setenv() values.  Now if the size is zero, the provided buffer
  full of existing env data is installed.  A NULL pointer can be passed if the
  boot loader provides no env data; this allows the static env to be installed
  if envmode is set to do so.

  Most of the work here is a near-mechanical change to call the init function
  instead of directly setting kern_envp.  A notable exception is in xen/pv.c;
  that code was originally installing a buffer full of preformatted env data
  along with its non-zero size (like mips code does), which would have allowed
  kern_setenv() calls to wipe out the preformatted data.  Now it passes a zero
  for the size so that the buffer of data it installs is treated as
  non-writeable.

  Also, revert accidental change that snuck into r293045.

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

8 years agoMFC r290647, r292523, r292891:
ian [Sun, 24 Jan 2016 20:15:52 +0000 (20:15 +0000)]
MFC r290647, r292523, r292891:

  ARM: Improve robustness of locore_v6.S and fix errors.
  - boot page table is not allocated in data section, so must be
    cleared before use
  - map only one section (1 MB) for SOCDEV mapping (*)
  - DSB must be used for ensuring of finishing TLB operations
  - Invalidate BTB when appropriate

  Allow armv4/5 kernels to be loaded on any 2MB boundary, like armv6/7.

  This eliminates the reliance on PHYSADDR and KERNPHYSADDR compile-time
  symbols (except when the rom-copy code is enabled) by using the current
  PC and the assumption that the entry-point routine is in the first 1MB
  section of the text segment.

  Other cleanups done:

   - Reduce the initarm() stack size back to 2K.  It got increased to
     4 * 2K when this file was supporting multicore armv6, but that
     support is now in locore-v6.S.

   - When building the temporary startup page tables, map the entire
     4GB address space as VA=PA before mapping the kernel at its loaded
     location.  This allows access to boot parameters stored somewhere
     in ram by the bootloader, regardless of where that may be.

   - When building the page table entry for supporting EARLY_PRINTF, map
     the section as uncached unbuffered, since it is presumably device
     registers.

  Note that this restores the ability to use loader(8)/ubldr on armv4/5
  kernels.  That was broken in r283035, the point at which ubldr started
  loading an arm kernel at any 2MB boundary.

  Also note that after this, there is no reason to set KERNVIRTADDR to
  anything other than 0xc0000000, and no need for PHYSADDR or KERNPHYSADDR
  symbols at all.

  Bring some of the recent locore-v4.S improvements into locore-V6...

   - Map all 4GB as VA=PA so that args passed in from a bootloader can
     be accessed regardless of where they are.
   - Figure out the kernel load address by directly masking the PC rather
     then by doing pc-relative math on the _start symbol.
   - For EARLY_PRINTF support, map device memory as uncacheable (no-op for
     ARM_NEW_PMAP because all TEX types resolve to uncacheable).

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

8 years agoMFC r277416, r282023, r282024, r282025, r284264:
ian [Sun, 24 Jan 2016 19:58:58 +0000 (19:58 +0000)]
MFC r277416, r282023, r282024, r282025, r284264:

  Remove the SMP code from locore-v4. These will never use the SMP code as
  there is no multi-core hardware prior to ARMv6.

  Remove the armv6 code from locore-v4.S, it's not needed there.

  Fix the style of locore-v4.S and locore-v6.S to help find any common code.

  Cleanup a little more:
   - Remove whitespace at the end of lines
   - Use a tab after instructions, not spaces

  Fix the spelling of __ARM_ARCH >= 6 in sys/arm/arm.

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

8 years agoMFC r292752:
ian [Sun, 24 Jan 2016 19:41:31 +0000 (19:41 +0000)]
MFC r292752:

  Enhance rc.d/netwait script to wait for late-attaching interfaces such as
  USB NICs.

  USB network hardware may not be enumerated and available when the rc.d
  networking scripts run. Eventually the USB attachment completes and devd
  events cause the network initialization to happen, but by then other rc.d
  scripts have already failed, because services which depend on NETWORKING
  (such as mountcritremote) may end up running before the network is actually
  ready.

  There is an existing netwait script, but because it is dependent on
  NETWORKING it runs too late to prevent failure of some other rc
  scripts. This change flips the order so that NETWORKING depends on netwait,
  and netwait now depends on devd and routing (the former is needed to make
  interfaces appear, and the latter is needed to run the ping tests in
  netwait).

  The netwait script used to be oriented primarily towards "as soon as any
  host is reachable the network is fully functional", so you gave it a list of
  IPs to try and you could optionally name an interface and it would wait for
  carrier on that interface. That functionality still works the same, but now
  you can provide a list of interfaces to wait for and it waits until each one
  of them is available. The ping logic still completes as soon as the first IP
  on the list responds.

  These changes were submitted by Brenden Molloy <brendan+freebsd@bbqsrc.net>
  in PR 205186, and lightly modified by me to allow a list of interfaces
  instead of just one.

PR:           205186
Relnotes: yes

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

8 years agoMFC r292419, r294237:
ian [Sun, 24 Jan 2016 19:36:49 +0000 (19:36 +0000)]
MFC r292419, r294237:

  Fix the clock divisor calc for imx6 sdcard bus speed.

  Quick exit after setting the clock control register.

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

8 years agoMFC r291149, r291367:
ian [Sun, 24 Jan 2016 19:34:05 +0000 (19:34 +0000)]
MFC r291149, r291367:

  Update the imx5/imx6 cpu_reset() implementation based on a new understanding
  of the SRS (software reset) bit in the watchdog control register.  Despite
  what the manual seems to imply, this bit DOES trigger an immediate reset, as
  opposed to simply flagging the type of reset as software-triggered.

  Rename sysctl node hw.imx6 to hw.imx.  Move its definition to imx_machdep.c
  so that code shared between imx5 and imx6 can work with OIDs under that node.

  Add last_reset_status (integer) and last_reset_reason (string) OIDs that
  provide info about the last chip reset (power-on, software reset, watchdog
  timeout).

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

8 years agoMFC r289618, r290316:
ian [Sun, 24 Jan 2016 19:21:53 +0000 (19:21 +0000)]
MFC r289618, r290316:

  Fix printf format to allow for bus_size_t not being u_long on all platforms.

  Fix an alignment check that is wrong in half the busdma implementations.
  This will enable the elimination of a workaround in the USB driver that
  artifically allocates buffers twice as big as they need to be (which
  actually saves memory for very small buffers on the buggy platforms).

  When deciding how to allocate a dma buffer, armv4, armv6, mips, and
  x86/iommu all correctly check for the tag alignment <= maxsize as enabling
  simple uma/malloc based allocation.  Powerpc, sparc64, x86/bounce, and
  arm64/bounce were all checking for alignment < maxsize; on those platforms
  when alignment was equal to the max size it would fall back to page-based
  allocators even for very small buffers.

  This change makes all platforms use the <= check.  It should be noted that
  on all platforms other than arm[v6] and mips, this check is relying on
  undocumented behavior in malloc(9) that if you allocate a block of a given
  size it will be aligned to the next larger power-of-2 boundary.  There is
  nothing in the malloc(9) man page that makes that explicit promise (but the
  busdma code has been relying on this behavior all along so I guess it works).

  Arm and mips code uses the allocator in kern/subr_busdma_buffalloc.c, which
  does explicitly implement this promise about size and alignment.  Other
  platforms probably should switch to the aligned allocator.

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

8 years agoMFC r289727:
ian [Sun, 24 Jan 2016 18:54:55 +0000 (18:54 +0000)]
MFC r289727:

  Add FDT compatibility to the icee driver.

  The FDT bindings for eeprom parts don't include any metadata about the
  device other than the part name encoded in the compatible property.
  Instead, a driver is required to have a compiled-in table of information
  about the various parts (page size, device capacity, addressing scheme).  So
  much for FDT being an abstract description of hardware characteristics, huh?

  In addition to the FDT-specific changes, this also switches to using the
  newer iicbus_transfer_excl() mechanism which holds bus ownership for the
  duration of the transfer.  Previously this code held the bus across all
  the transfers needed to complete the user's IO request, which could be
  up to 128KB of data which might occupy the bus for 10-20 seconds.  Now the
  bus will be released and re-aquired between every page-sized (8-256 byte)
  transfer, making this driver a much nicer citizen on the i2c bus.

  The hint-based configuration mechanism is still in place for non-FDT systems.

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

8 years agoMFC r289726:
ian [Sun, 24 Jan 2016 18:54:11 +0000 (18:54 +0000)]
MFC r289726:

  Add iicbus_transfer_excl(), a helper routine to do an i2c bus transaction
  while holding exclusive ownership of the bus.  This is the routine most
  slave drivers should use unless they have a need to acquire and hold the
  bus across a series of related operations that involves multiple transfers.

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

8 years agoMFC r289704:
ian [Sun, 24 Jan 2016 18:50:37 +0000 (18:50 +0000)]
MFC r289704:

  Fix parsing of I2C addresses properties in fdt data.  I2C address is
  represented in 7-bits format in DT files, but system expect it in 8-bit
  format.  Also, fix two drivers that locally hack around this bug.

  This includes a direct-commit change to the beaglebone dts data in the
  10-stable branch to adjust the i2c slave addresses directly.  In -current
  the equivelent change happened with a switch from homegrown to standard
  fdt data.

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

8 years agoMFC r289619:
ian [Sun, 24 Jan 2016 18:25:37 +0000 (18:25 +0000)]
MFC r289619:

  Follow the advice of the misplaced comment and don't access the map struct
  after freeing it.  Remove the comment whose uselessness has been revealed.

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

8 years agoMFH (r263234, r263691, r266465, r290671, r290672, r290673, r290674,
des [Sun, 24 Jan 2016 15:44:57 +0000 (15:44 +0000)]
MFH (r263234, r263691, r266465, r290671, r290672, r290673, r290674,
  r294320, r294322, r294324, r294330, r294469, r294494, r294466)

Reduce diffs to head in preparation for removing HPN and None.

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

8 years agoMFC r293073:
ngie [Sun, 24 Jan 2016 06:19:49 +0000 (06:19 +0000)]
MFC r293073:

- Use attach_md instead of hardcoding md(4) provider unit numbers
- Implement a gmirror_test_cleanup function, which in turn calls
  geom_test_cleanup to clean up all md(4) providers allocated in the test
  run.
- Remove duplicate logic in test scripts for removing md(4) providers.
- Don't create files in /tmp (outside the kyua sandbox); use the current
  directory instead

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

8 years agoMFC r293860
vangyzen [Sun, 24 Jan 2016 02:10:05 +0000 (02:10 +0000)]
MFC r293860

bsdinstall: Suggest the GPT+Active workaround on Dell T5810

The Dell Precision Tower 5810 fails to boot from GPT in Legacy/BIOS mode
without the Active flag in the Protective MBR.  Suggest the workaround
during installation.

Since an increasing number of Dell systems exhibit this behavior,
I imagine all Dells past a certain date will do so.  I would like
to suggest the workaround for all Dells with a BIOS date of, say,
2014 or later, but I would need to test a variety of systems before
committing such a change.

Relnotes:   We should probably suggest using GPT+Active on "recent" Dells.
Sponsored by:   Dell Inc.

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

8 years agoMFC: r285732
allanjude [Sat, 23 Jan 2016 22:13:31 +0000 (22:13 +0000)]
MFC: r285732
  Add the Dell E7240 laptop and Intel DP965LT motherboard to the list for the GPT active workaround

MFC: r287843
  Add the HP ProBook 4330s, Intel DP965LT, D510MO, and Acer Veriton M6630G to the GPT workaround list

Sponsored by: ScaleEngine Inc.

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

8 years agoMFC r294125:
ngie [Sat, 23 Jan 2016 21:04:34 +0000 (21:04 +0000)]
MFC r294125:

Test for EPROTOTYPE not EPROTONOSUPPORT

- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
  the prototype is invalid (this isn't explicitly documented anywhere I could
  find)

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

8 years agoMFC r293858
vangyzen [Sat, 23 Jan 2016 20:49:52 +0000 (20:49 +0000)]
MFC r293858

libthr: const-ify two variables

Make the default umutex and urwlock initializers const,
because they can be, and as a microoptimization.

Sponsored by: Dell Inc.

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

8 years agoMFC r294235:
ian [Sat, 23 Jan 2016 19:13:48 +0000 (19:13 +0000)]
MFC r294235:

  Make PPS ASSERT/CLEAR events match the RS-232 signal levels as per RFC 2783.
  Previously the polarity was for TTL levels, which are the reverse of RS-232.

  Also add handling of the UART_PPS_INVERT_PULSE option bit in the sysctl
  value, the same as was recently added to uart(4), so that people using TTL
  level connections can request a logical inverting of the signal.

  Use the named constants from the new dev/uart/uart_ppstypes.h for the pps
  capture modes and option bits.

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

8 years agoMFC 294366:
jhb [Sat, 23 Jan 2016 17:08:17 +0000 (17:08 +0000)]
MFC 294366:
Initialize vm_page_prot to VM_MEMATTR_DEFAULT instead of 0.

If a driver's Linux mmap callback passed vm_page_prot through unchanged,
then linux_dev_mmap_single() would try to apply whatever VM_MEMATTR_xxx
value 0 is to the mapping.  On x86, VM_MEMATTR_DEFAULT is the PAT value
for write-back (WB) which is 6, while 0 maps to the PAT value for
uncacheable (UC).  Thus, any mmap request that did not explicitly set
page_prot was tried to map memory as UC triggering the warning in
sg_pager_getpages().

Sponsored by: Chelsio Communications

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

8 years agoMFC r289453:
trasz [Sat, 23 Jan 2016 15:48:14 +0000 (15:48 +0000)]
MFC r289453:

Add -w flag to iscsictl(8) utility, to make it wait for successfull
session establishment.  Scripting is kind of hard without it.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r294137:
kib [Sat, 23 Jan 2016 07:35:29 +0000 (07:35 +0000)]
MFC r294137:
Do not panic when the filesystem which carries the audit files, is unmounted
and audit is active.  Do not write to the suspended fs.

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

8 years agoMFC r293059:
kib [Sat, 23 Jan 2016 07:33:02 +0000 (07:33 +0000)]
MFC r293059:
Hide transient EBADF errors caused by the parallel revoke(2) or forced
unmount of devfs mounts, by restarting the failed syscall.

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

8 years agoMFC 292892:
jhb [Sat, 23 Jan 2016 01:21:11 +0000 (01:21 +0000)]
MFC 292892:
Call kern_thr_exit() instead of duplicating it.

This code is missing the racct_subr() call from kern_thr_exit() and would
require further code duplication in future changes.

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

8 years agoMFC 286974,291653:
jhb [Sat, 23 Jan 2016 01:02:28 +0000 (01:02 +0000)]
MFC 286974,291653:

286974:
Remove reference to non-existent kern_openat(9).

291653:
The cdevpriv_dtr_t typedef was not able to be used in a function prototype
like the various d_*_t typedefs since it declared a function pointer rather
than a function.  Add a new d_priv_dtor_t typedef that declares the function
and can be used as a function prototype.  The previous typedef wasn't
useful outside of the cdevpriv implementation, so retire it.

The name d_priv_dtor_t was chosen to be more consistent with cdev methods
since it is commonly used in place of d_close_t even though it is not a
direct pointer in struct cdevsw.

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

8 years agoMake it possible to override NO_INSTALLEXTRAKERNELS.
glebius [Fri, 22 Jan 2016 18:38:52 +0000 (18:38 +0000)]
Make it possible to override NO_INSTALLEXTRAKERNELS.

Submitted by: ngie

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

8 years agoMFC r294554: MFV r294491: ntp 4.2.8p6.
delphij [Fri, 22 Jan 2016 15:55:21 +0000 (15:55 +0000)]
MFC r294554: MFV r294491: ntp 4.2.8p6.

Security: CVE-2015-7973, CVE-2015-7974, CVE-2015-7975
Security: CVE-2015-7976, CVE-2015-7977, CVE-2015-7978
Security: CVE-2015-7979, CVE-2015-8138, CVE-2015-8139
Security: CVE-2015-8140, CVE-2015-8158
With hat: so

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

8 years agoMFC r293048,r293444:
ngie [Fri, 22 Jan 2016 07:23:50 +0000 (07:23 +0000)]
MFC r293048,r293444:

r293048:

- Use a temporary file for the temporary md(4) devices instead of
  hardcoding it
- Remove the temporary file in the cleanup routine

r293444:

- Move functions that might be used in class-specific cleanup functions
  (geom_test_cleanup, etc) down so the testcases don't emit noise when
  bailing
- Conform to the TAP protocol better when dealing with classes that can't
  be loaded and with temporary files that can't be allocated for tracking
  md(4) devices.

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

8 years agoRevert r294271:
pfg [Fri, 22 Jan 2016 03:25:06 +0000 (03:25 +0000)]
Revert r294271:
ext4: add support for reading sparse files

Our older GCC can't handle anonymous unions, so
ia64 and powerpc LINT kernels are now failing.

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

8 years agoMFC r294234: utimensat(2): Correct description of [EINVAL] error.
jilles [Thu, 21 Jan 2016 21:16:57 +0000 (21:16 +0000)]
MFC r294234: utimensat(2): Correct description of [EINVAL] error.

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

8 years agoMFC 294233:
dchagin [Thu, 21 Jan 2016 19:19:24 +0000 (19:19 +0000)]
MFC 294233:

Prevent double free of control in common sendmsg path as sosend
already freeing it.

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

8 years agoMFC 292953:
bz [Thu, 21 Jan 2016 14:11:01 +0000 (14:11 +0000)]
MFC 292953:

 This code is not in modules that need KPI stability so no need to use
 the wrapper functions as used in r252511 (head).  We can directly use
 the locking macros.

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

8 years agoMFC r292604:
bz [Thu, 21 Jan 2016 14:08:40 +0000 (14:08 +0000)]
MFC r292604:

 If vnets are torn down while ifconfig runs an ioctl to say, destroy an
 epair(4), we may hit if_detach_internal() without holding a lock and by
 the time we aquire it the interface might be gone.
 We should not panic() in this case as it is our fault for not holding
 the lock all the way. It is not ideal to return silently without error
 to user space, but other callers will all ignore the return values so
 do not change the entire KPI for little benefit for now.
 The ifp will be dealt with one way or another still.

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

8 years agoMFC r292603:
bz [Thu, 21 Jan 2016 14:06:16 +0000 (14:06 +0000)]
MFC r292603:

 If bootverbose is enabled every vnet startup and virtual interface
 creation will print extra lines on the console. We are generally not
 interested in this (repeated) information for each VNET. Thus only
 print it for the default VNET. Virtual interfaces on the base system
 will remain printing information, but e.g. each loopback in each vnet
 will no longer cause a "bpf attached" line.

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

8 years agoMFC r292602:
bz [Thu, 21 Jan 2016 14:04:02 +0000 (14:04 +0000)]
MFC r292602:

 Simplify bringup order by removing a SYSINIT making it a static list
 initialization.

Obtained from: p4 @180384,180385

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

8 years agoiicbus: Use device_delete_children() instead of explicit child removal
dumbbell [Thu, 21 Jan 2016 08:32:11 +0000 (08:32 +0000)]
iicbus: Use device_delete_children() instead of explicit child removal

If the bus is detached and deleted by a call to device_delete_child() or
device_delete_children() on a device higher in the tree, I²C children
were already detached and deleted. So the device_t pointer stored in sc
points to freed memory: we must not try to delete it again.

By using device_delete_children(), we let subr_bus.c figure out if there
are children to take care of.

While here, make sure iicbus_detach() and iicoc_detach() call
device_delete_children() too, to be safe.

Reviewed by: jhb, imp
Approved by: jhb, imp
Differential Revision: https://reviews.freebsd.org/D3926

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

8 years agoiicbus: Remove trailing whitespaces
dumbbell [Thu, 21 Jan 2016 08:24:54 +0000 (08:24 +0000)]
iicbus: Remove trailing whitespaces

MFC of: r289656

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

8 years agoMFC r294126:
ngie [Thu, 21 Jan 2016 05:59:33 +0000 (05:59 +0000)]
MFC r294126:

Fix warnings with gcc 5.0

reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
  warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
  mute a warning from gcc 5.0 about a -Wunused-but-set variable

sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)

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

8 years agoMFC r294127:
ngie [Thu, 21 Jan 2016 05:57:32 +0000 (05:57 +0000)]
MFC r294127:

Fix warnings with clang/gcc

- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
  return code of -1 is implementation dependent
- Bump WARNS to 6

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

8 years agoMFC r294183:
jamie [Thu, 21 Jan 2016 04:37:16 +0000 (04:37 +0000)]
MFC r294183:

  Clear errno before calling getpw*.

MFC r294196:

  Don't bother checking an ip[46].addr netmask/prefixlen.  This is already
  handled by ifconfig, and it was doing it wrong when the paramater included
  extra ifconfig options.

PR: 205926

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

8 years agoMFC r294042: Add rotationrate to geom disk dumpconf
rpokala [Thu, 21 Jan 2016 03:05:03 +0000 (03:05 +0000)]
MFC r294042: Add rotationrate to geom disk dumpconf

Parse and report the nominal rotation rate reported by the drive.

Approved by: jhb

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

8 years agoMFC 292682:
jhb [Thu, 21 Jan 2016 01:25:28 +0000 (01:25 +0000)]
MFC 292682:
Fix remaining direct tests of the carry flag in the v86 %eflags via a
magic number to use V86_CY() instead.  These should have been fixed as
part of the cleanup in r226746 but were missed.

The md5 sums of the object files were unchanged, so there should be no
functional change.

PR: 205424
Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com>

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

8 years agoMFC: r294191
allanjude [Thu, 21 Jan 2016 01:15:40 +0000 (01:15 +0000)]
MFC: r294191
  Never 4k align the MBR bootpool because zfsldr can not deal with a gap

Sponsored by: ScaleEngine Inc.

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

8 years agoAdd strlcat and strlcpy to libstand on ia64. This is conceptually part
ian [Wed, 20 Jan 2016 22:05:49 +0000 (22:05 +0000)]
Add strlcat and strlcpy to libstand on ia64.  This is conceptually part
of the MFC done in r294342, but since ia64 is gone in -current this is a
direct commit to 10-stable to add the functions.

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

8 years agoLeave temporary ia64 loader.sym behind if the build fails
emaste [Wed, 20 Jan 2016 21:22:06 +0000 (21:22 +0000)]
Leave temporary ia64 loader.sym behind if the build fails

This facilitates investigation of the build failure, and is the same way
it's done for other architectures using EFI.

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

8 years agoMFC r276539: Update ELF headers to include additional defines
emaste [Wed, 20 Jan 2016 21:06:24 +0000 (21:06 +0000)]
MFC r276539: Update ELF headers to include additional defines

The elftoolchain project includes these additional defines for various
userland programs. Given that arch-specific defines are still interesting
in the context of userland programs reading or writing ELF metadata, they
should be included in top-level ELF headers.

Remove duplicate defines from ARM and MIPS elf headers.

Submitted by: will (initial version)
Sponsored by: The FreeBSD Foundation

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