]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r289527:
mav [Fri, 13 Nov 2015 09:45:33 +0000 (09:45 +0000)]
MFC r289527:
5561 support root pools on EFI/GPT partitioned disks
5125 update zpool/libzfs to manage bootable whole disk pools (EFI/GPT labeled disks)

Reviewed by: Jean McCormack <jean.mccormack@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Hans Rosenfeld <hans.rosenfeld@nexenta.com>

illumos/illumos-gate@1a902ef8628b0dffd6df5442354ab59bb8530962

This is NOP changes for FreeBSD.

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

8 years agoMFC r289500: 6298 zfs_create_008_neg and zpool_create_023_neg need to be
mav [Fri, 13 Nov 2015 09:42:59 +0000 (09:42 +0000)]
MFC r289500: 6298 zfs_create_008_neg and zpool_create_023_neg need to be
updated for large block support.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@e9316f7696401f3e5e263a5939031cb8d5641a88

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

8 years agoMFC r289499: Update vendor/illumos/dist and vendor-sys/illumos/dist
mav [Fri, 13 Nov 2015 09:41:34 +0000 (09:41 +0000)]
MFC r289499: Update vendor/illumos/dist and vendor-sys/illumos/dist
to illumos-gate 13967:92bec6d87f59

Illumos ZFS issues:
  3557 dumpvp_size is not updated correctly when a dump zvol's size is
       changed
  3558 setting the volsize on a dump device does not return back ENOSPC
  3559 setting a volsize larger than the space available sometimes succeeds

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

8 years agoMFC r289497: 5745 zfs set allows only one dataset property to be set at a time
mav [Fri, 13 Nov 2015 09:39:55 +0000 (09:39 +0000)]
MFC r289497: 5745 zfs set allows only one dataset property to be set at a time

Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Reviewed by: Richard PALO <richard@NetBSD.org>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Approved by: Rich Lowe <richlowe@richlowe.net>
Author: Chris Williamson <chris.williamson@delphix.com>

illumos/illumos-gate@30925561c223021e91d15899cbe75f80e54d8889

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

8 years agoMFC r289422:
mav [Fri, 13 Nov 2015 09:32:04 +0000 (09:32 +0000)]
MFC r289422:
4185 add new cryptographic checksums to ZFS: SHA-512, Skein, Edon-R

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Saso Kiselkov <saso.kiselkov@nexenta.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@45818ee124adeaaf947698996b4f4c722afc6d1f

This is only a partial merge of respective ZFS infrastructure changes.
At this moment FreeBSD kernel has no those crypto algorithms, so the
parts of the code to enable them are commented out.  When they are
implemented, it will be trivial to plug them in.

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

8 years agoMFC r289362, r289445: 2605 want to resume interrupted zfs send
mav [Fri, 13 Nov 2015 09:30:17 +0000 (09:30 +0000)]
MFC r289362, r289445: 2605 want to resume interrupted zfs send

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@9c3fd1216fa7fb02cfbc78a2518a686d54b48ab8

For more info, see:
 - slides http://www.slideshare.net/MatthewAhrens/openzfs-send-and-receive
 - video https://www.youtube.com/watch?v=iY44jPMvxog
 - manpage changes (for zfs resume -s and zfs send -t)
 - upcoming talk at the OpenZFS Developer Summit

The TL;DR is:
Use "zfs receive -s" to save the partially received state on failure.
On failure, get the receive token with "zfs get receive_resume_token <fs>"
Resume the send with "zfs send -t <token_value>"

Relnotes:       yes

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

8 years agoMFC r289313: 5764 "zfs send -nv" directs output to stderr
mav [Fri, 13 Nov 2015 09:25:47 +0000 (09:25 +0000)]
MFC r289313: 5764 "zfs send -nv" directs output to stderr

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <paul.dagnelie@delphix.com>
Reviewed by: Basil Crow <basil.crow@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Dan McDonald <danmcd@omniti.com>
Author: Manoj Joseph <manoj.joseph@delphix.com>

illumos/illumos-gate@dc5f28a3c341db7c241bba77ddc109c141072f27

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

8 years agoMFC r289309: 6267 dn_bonus evicted too early
mav [Fri, 13 Nov 2015 09:23:48 +0000 (09:23 +0000)]
MFC r289309: 6267 dn_bonus evicted too early

Reviewed by: Richard Yao <ryao@gentoo.org>
Reviewed by: Xin LI <delphij@freebsd.org>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Justin T. Gibbs <gibbs@FreeBSD.org>

illumos/illumos-gate@d2058105c61ec61df3a2dd3f839fed8c3fe7bfd6

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

8 years agoMFC r289307: 6295 metaslab_condense's dbgmsg should include vdev id
mav [Fri, 13 Nov 2015 09:22:53 +0000 (09:22 +0000)]
MFC r289307: 6295 metaslab_condense's dbgmsg should include vdev id

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Andriy Gapon <avg@freebsd.org>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Joe Stein <joe.stein@delphix.com>

illumos/illumos-gate@daec38ecb4fb5e73e4ca9e99be84f6b8c50c02fa

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

8 years agoMFC r289305: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()
mav [Fri, 13 Nov 2015 09:21:31 +0000 (09:21 +0000)]
MFC r289305: 6293 ztest failure: error == 28 (0xc == 0x1c) in ztest_tx_assign()

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Richard Lowe <richlowe@richlowe.net>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@8fe00bfb8790ad51653f67b01d5ac14256cbb404

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

8 years agoMFC r289299: 6286 ZFS internal error when set large block on bootfs
mav [Fri, 13 Nov 2015 09:20:46 +0000 (09:20 +0000)]
MFC r289299: 6286 ZFS internal error when set large block on bootfs

Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Andriy Gapon <avg@FreeBSD.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@6de9bb5603e65b16816b7ab29e39bac820e2da2b

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

8 years agoMFC r289297: 6288 dmu_buf_will_dirty could be faster
mav [Fri, 13 Nov 2015 09:18:33 +0000 (09:18 +0000)]
MFC r289297: 6288 dmu_buf_will_dirty could be faster

Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Matthew Ahrens <mahrens@delphix.com>

illumos/illumos-gate@0f2e7d03b8f588387cb8dd8dd500cbe5ff4484e0

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

8 years agoMFC r289295: 5219 l2arc_write_buffers() may write beyond target_sz
mav [Fri, 13 Nov 2015 09:17:48 +0000 (09:17 +0000)]
MFC r289295: 5219 l2arc_write_buffers() may write beyond target_sz

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Saso Kiselkov <skiselkov@gmail.com>
Reviewed by: George Wilson <george@delphix.com>
Reviewed by: Steven Hartland <steven.hartland@multiplay.co.uk>
Reviewed by: Justin Gibbs <gibbs@FreeBSD.org>
Approved by: Matthew Ahrens <mahrens@delphix.com>
Author: Andriy Gapon <avg@freebsd.org>

illumos/illumos-gate@d7d9a6d919f92d74ea0510a53f8441396048e800

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

8 years agoMFC r289192: 6281 prefetching should apply to 1MB reads
mav [Fri, 13 Nov 2015 09:16:56 +0000 (09:16 +0000)]
MFC r289192: 6281 prefetching should apply to 1MB reads

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Alexander Motin <mav@freebsd.org>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Justin Gibbs <gibbs@scsiguy.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Gordon Ross <gordon.ross@nexenta.com>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@632802744ef6d17e06d6980a95f631615c3b060f

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

8 years agoMFC r289191, r289194: 6251 add tunable to disable free_bpobj processing
mav [Fri, 13 Nov 2015 09:16:07 +0000 (09:16 +0000)]
MFC r289191, r289194: 6251 add tunable to disable free_bpobj processing

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Simon Klinkert <simon.klinkert@gmail.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@139510fb6efa97dbe5f5479594b308d940cab8d1

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

8 years agoMFC r289190: 6250 zvol_dump_init() can hold txg open
mav [Fri, 13 Nov 2015 09:14:30 +0000 (09:14 +0000)]
MFC r289190: 6250 zvol_dump_init() can hold txg open

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Prakash Surya <prakash.surya@delphix.com>
Reviewed by: Albert Lee <trisk@omniti.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Approved by: Garrett D'Amore <garrett@damore.org>
Author: George Wilson <george.wilson@delphix.com>

illumos/illumos-gate@b10bba72460aeaa53119c76ff5e647fd5585bece

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

8 years agoMFC r287745: 5997 FRU field not set during pool creation and never
mav [Fri, 13 Nov 2015 09:08:59 +0000 (09:08 +0000)]
MFC r287745: 5997 FRU field not set during pool creation and never
updated

ZFS already supports storing the vdev FRU in a vdev property.  There
is code in libzfs to work with this property, and there is code in
the zfs-retire FMA module that looks for that information.  But there
is no code actually setting or updating the FRU.

To address this, ZFS is changed to send a handful of new events
whenever a vdev is added, attached, cleared, or onlined, as well
as when a pool is created or imported.

Note that syseventd is not currently available on FreeBSD and thus
some work is needed to actually support the new ZFS events (e.g. in
zfsd) to actually use this capability, this changeset is mostly a
diff reduction from upstream.

illumos/illumos-gate@1437283407f89cab03860accf49408f94559bc34

Illumos issues:

    5997 FRU field not set during pool creation and never updated
    https://www.illumos.org/issues/5997

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

8 years agoMFC r287235:
markj [Fri, 13 Nov 2015 02:16:08 +0000 (02:16 +0000)]
MFC r287235:
Remove weighted page handling from vm_page_advise().

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

8 years agoMFC r289867:
markj [Fri, 13 Nov 2015 01:37:08 +0000 (01:37 +0000)]
MFC r289867:
Remove an erroneous semicolon.

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

8 years agoMFC r289866:
markj [Fri, 13 Nov 2015 01:27:20 +0000 (01:27 +0000)]
MFC r289866:
DWARF emitted by clang 3.7 encodes array sizes using the DW_AT_count
attribute rather than DW_AT_upper_bound. Teach ctfconvert about this so that
array type sizes are encoded correctly.

PR:           203772

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

8 years agoMFC r290320:
markj [Fri, 13 Nov 2015 01:25:02 +0000 (01:25 +0000)]
MFC r290320:
Have elf_lookup() return an error if the specified non-weak symbol could
not be found. Otherwise, relocations against such symbols will be silently
ignored instead of causing an error to be raised.

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

8 years agoMFC r290450:
smh [Fri, 13 Nov 2015 01:03:59 +0000 (01:03 +0000)]
MFC r290450:

Add sysctl to control LACP strict compliance default

Sponsored by: Multiplay

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

8 years agoMFC r290440:
smh [Fri, 13 Nov 2015 01:01:16 +0000 (01:01 +0000)]
MFC r290440:

Correct posix_openpt reference in pty(3)

Sponsored by: Multiplay

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

8 years agoMFC 284325:
jhb [Fri, 13 Nov 2015 00:50:34 +0000 (00:50 +0000)]
MFC 284325:
Report the values of x86 segment registers to remote debuggers.

While here, also report %eflags from the i386 trapframe.

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

8 years agoMFC 285783:
jhb [Thu, 12 Nov 2015 23:49:47 +0000 (23:49 +0000)]
MFC 285783:
Various changes to the registers displayed in DDB for x86.
- Fix segment registers to only display the low 16 bits.
- Remove unused handlers and entries for the debug registers.
- Display xcr0 (if valid) in 'show sysregs'.
- Add '0x' prefix to MSR values to match other values in 'show sysregs'.
- MFamd64: Display various MSRs in 'show sysregs'.
- Add a 'show dbregs' to display the value of debug registers.
- Dynamically size the column width for register values to properly
  align columns on 64-bit platforms.
- Display %gs for i386 in 'show registers'.

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

8 years agoMFC 285773,285775,285776:
jhb [Thu, 12 Nov 2015 22:45:51 +0000 (22:45 +0000)]
MFC 285773,285775,285776:
Various fixes for stack unwinding in DDB on x86.

285773:
Remove some dead code from DDB's amd64 stack unwinder.

The amd64 port copied some code from i386 to fetch function arguments and
display them in backtraces. However, it was commented out and can't easily
be implemented since the function arguments are passed in
registers rather than on the stack in amd64. Remove it in preparation for
some bug fixes in this area.

285775:
Improve stack unwinding on i386 and amd64 after an IP fault.

If we can't find a symbol corresponding to the faulting instruction, assume
that the previously-executed function is a call and attempt to find the
calling function using the return address on the stack. Otherwise we end
up associating the last stack frame with the current call, which is
incorrect and causes the unwinder to skip printing of the calling function,
resulting in a confusing backtrace.

285776:
Let the unwinder handle faults during function prologues or epilogues.

The i386 and amd64 DDB stack unwinders contain code to detect and handle
the case where the first frame is not completely set up or torn down. This
code was accidentally unused however, since db_backtrace() was never called
with a non-NULL trap frame. This change fixes that.

Also remove get_rsp() from the amd64 code. It appears to have come from
i386, which needs to take into account whether the exception triggered a
CPL switch, since SS:ESP is only pushed onto the stack if so. On amd64,
SS:RSP is pushed regardless, so get_rsp() was doing the wrong thing for
kernel-mode exceptions. As a result, we can also remove custom print
functions for these registers.

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

8 years agoMFC r290401 & r290466
smh [Thu, 12 Nov 2015 10:20:36 +0000 (10:20 +0000)]
MFC r290401 & r290466

Provide information about bad DVA

Sponsored by: Multiplay

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

8 years agoMFC r290399:
smh [Thu, 12 Nov 2015 10:16:35 +0000 (10:16 +0000)]
MFC r290399:

Allow zfs_recover to be changed at runtime

Sponsored by: Multiplay

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

8 years agoMFC r290140:
hselasky [Thu, 12 Nov 2015 08:47:10 +0000 (08:47 +0000)]
MFC r290140:
Add missing NULL check in physio().

When destroying a character device the si_devsw field is set to NULL
before all references are gone, to indicate the character device is
going away. This can cause a NULL-dereference fault inside physio().

The callers of physio() should own a thread reference on the cdev and
if si_devsw is seen as non-NULL, it is usable during the execution of
the function. Else an ENXIO error code is returned.

Reviewed by: kib

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

8 years agoMFC of 290697,tzdata10:
edwin [Thu, 12 Nov 2015 03:26:05 +0000 (03:26 +0000)]
MFC of 290697,tzdata10:

Update to tzdata2015g:

Turkey's 2015 fall-back transition is scheduled for Nov. 8, not Oct. 25.

Norfolk moves from +1130 to +1100 on 2015-10-04 at 02:00 local time.

Fiji's 2016 fall-back transition is scheduled for January 17, not 24.

Fort Nelson, British Columbia will not fall back on 2015-11-01.  It has
effectively been on MST (-0700) since it advanced its clocks on 2015-03-08.
New zone America/Fort_Nelson.

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

8 years agoRemove empty directories leftover from r255974.
bdrewery [Thu, 12 Nov 2015 01:21:22 +0000 (01:21 +0000)]
Remove empty directories leftover from r255974.

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

8 years agoMFC r290161:
kp [Wed, 11 Nov 2015 12:36:42 +0000 (12:36 +0000)]
MFC r290161:

pf: Fix IPv6 checksums with route-to.

When using route-to (or reply-to) pf sends the packet directly to the output
interface. If that interface doesn't support checksum offloading the checksum
has to be calculated in software.
That was already done in the IPv4 case, but not for the IPv6 case. As a result
we'd emit packets with pseudo-header checksums (i.e. incorrect checksums).

This issue was exposed by the changes in r289316 when pf stopped performing full
checksum calculations for all packets.

Submitted by:       Luoqi Chen

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

8 years agoMFC 284324,290164:
jhb [Wed, 11 Nov 2015 01:32:35 +0000 (01:32 +0000)]
MFC 284324,290164:
Workaround debuggers that try to read the full 32-bit words holding
selectors in trapframes.

284324:
Ensure that the upper 16 bits of segment registers manually saved in
trapframes are cleared by explicitly pushing a zero and then moving
the segment register into the low 16 bits.  Certain Intel processors
treat a push of a segment register as a move of the segment register
into the low 16 bits leaving the upper 16 bits of the word in the
stack unchanged.

290164:
Use movw instead of movl (or plain mov) when moving segment registers
into memory.  This is a nop on clang's assembler, but some assemblers
complain if the size suffix is incorrect.

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

8 years agoMFC r290047:
kib [Tue, 10 Nov 2015 08:39:07 +0000 (08:39 +0000)]
MFC r290047:
Do not perform read-ahead for BA_CLRBUF request when we are low on
memory or when dirty buffer queue is too large.

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

8 years agoMFC r290480
bapt [Tue, 10 Nov 2015 07:17:38 +0000 (07:17 +0000)]
MFC r290480

Protecting against rm -rf / is now POSIXLY_CORRECT per posix 1003.1
edition 2013. No need anymore to disable the protection if one set
the POXILY_CORRECT environment variable.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D4092

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

8 years agoMFC r290441:
hselasky [Mon, 9 Nov 2015 11:24:59 +0000 (11:24 +0000)]
MFC r290441:
Fix for unaligned IP-header.

The mbuf length fields must be set before m_adj() is called else
m_adj() will not always adjust the mbuf and an unaligned read
exception can trigger inside the network stack. This can happen on
platforms where unaligned reads are not supported. Adjust a length
check to include the 2-byte ethernet alignment while at it.

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

8 years agoMFC r266930,r289225:
ngie [Mon, 9 Nov 2015 09:28:34 +0000 (09:28 +0000)]
MFC r266930,r289225:

r266930 (by jmg):

convert to using the _daddr_t types like newfs was...

Put the superblock in the correct possition for UFS2... There is a bug
in FFS that if we don't put it here (for UFS2), it will forcefully
relocate the superblock, and I believe cause data loss..

I have a fix for that, but w/ how many releases are broken, we won't be
able to switch to the better _FLOPPY (block 0) for this for a while..

r289225 (by sbruno):

makefs(8) leaves sblock.fs_providersize uninitialized (zero) that can be easily
checked with dumpfs(8). This may lead to other problems, f.e. geom_label kernel
module sanity checks do not like zero fs_old_size value and skips such UFS1
file system while tasting (fs_old_size derives from sblock.fs_providersize).

PR: 203704
Submitted by: eugen@grosbein.net
Reviewed by: marcel

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

8 years agoMFC r290268:
ngie [Mon, 9 Nov 2015 09:23:35 +0000 (09:23 +0000)]
MFC r290268:

Sync minor whitespace / type changes in ffs_csum_swap and ffs_sb_swap with
src/sys/ufs/ffs/ffs_bswap.c@1.39

Obtained from: NetBSD
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290264:
ngie [Mon, 9 Nov 2015 09:22:11 +0000 (09:22 +0000)]
MFC r290264:

Limit isoLevel to 1 and 2 to avoid segfaulting when isoLevel is set to 3 by
dereferencing a NULL function pointer

Add some asserts to ensure that isolevel is always either 1 or 2.

PR: 203645
Reported by: Thomas Schmitt <scdbackup@gmx.net>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290265,r290267,r290270:
ngie [Mon, 9 Nov 2015 09:20:01 +0000 (09:20 +0000)]
MFC r290265,r290267,r290270:

r290265:

Add testcases for -t cd9660 -o isolevel=[1-3]

-- -o isolevel=1 currently fails because of path comparison issues,
   so mark it as an expected failure.
-- -o isolevel=3 is not implemented, so expect it to fail as an out
   of bounds value [*].

PR: 203645
Sponsored by: EMC / Isilon Storage Division

r290267:

Clean up mtree keyword support a slight bit and add a few more default keywords

- Parameterize the mtree keywords as $DEFAULT_MTREE_KEYWORDS
- Test with the extra mtree keywords, `mode,gid,uid`.
- Add a note about mtrees with time support not working with makefs right now

Sponsored by: EMC / Isilon Storage Division

r290270:

Add testcases for -t ffs -o version=[12]

Verify the filesystem type using dumpfs. Add preliminary support
for NetBSD (needs to be validated)

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289902:
ngie [Mon, 9 Nov 2015 09:04:11 +0000 (09:04 +0000)]
MFC r289902:

Add a regression test for r289899 to validate rockridge encoding
of device types

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289899:
ngie [Mon, 9 Nov 2015 09:03:24 +0000 (09:03 +0000)]
MFC r289899:

Import the fix from NetBSD kern/48852 (sic) to fix rockridge encoding of
device nodes

In particular, use st_rdev (the device type), not st_dev (the device inode),
and fix the comparison to be correct with the st_rdev field

Bug 203648
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 1008927
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289203,r290180:
ngie [Mon, 9 Nov 2015 08:59:55 +0000 (08:59 +0000)]
MFC r289203,r290180:

r289203 (by adrian):

makefs: introduce a new option to specify what to round the resulting
image up to.

From ticket:

While trying to run FreeBSD/mips on some device having very small flash media,
one is forced to compress file system with mkulzma(8) utility. It is desirable
to specify small UFS block/fragment sizes like 4096/512 bytes for makefs(8)
and big compression block size like 65535 bytes to mkulzma at the same time.
Then one obtains very good comression ratios (like 75% and more) but faces
the following problem.

geom_uncompress kernel module reports GEOM provider size rounded up to its
compression block size. Generally, this changes original media size and now
it fails to match the size of embedded UFS file system that leads to other
problems, f.e. geom_label kernel module does not like this and skips the
file system while tasting the GEOM and looking for UFS label.

This makes it impossible to refer to the file system using known UFS label
instead of something like /dev/map/rootfs.uncompress.

The following patch introduces new command line option "-r roundup" for makefs
that makes it round up the image to specified block size. Hence, geom_uncompress
does not change GEOM media size for images rounded that way and geom_label
accepts such GEOMs just fine.

With the patch applied, one can use following commands:

$ makefs -t ffs -r 65536 -o bsize=4096,fsize=512,label=flash optimization=space fs.img fs
$ mkulzma -s 65536 -o fs.img.ulzma fs.img

PR: bin/203707
Submitted by: <eugen@grosbein.net>

r290180:

Follow up to roundup feature addition in r289203

- Rename -r to -R to avoid the clash with makefs -r in NetBSD
- Note that -R is an FFS-specific option because it's not implemented
  in cd9660 today
- Rename the roundup variable to "roundup-size" in the manpage and help
  text for consistency with other variables.
- Bump .Dd (missed in r289203)

PR: 203707
Differential Revision: https://reviews.freebsd.org/D3959
Reviewed by: adrian (earlier patch), emaste
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289687,r289693:
ngie [Mon, 9 Nov 2015 08:03:15 +0000 (08:03 +0000)]
MFC r289687,r289693:

r289687:

Free buffer before returning from cd9660_write_path_table to avoid
leaking it after returning from the function

PR: 203647
Submitted by: Thomas Schmitt <scdbackup@gmx.net>
Coverity CID: 978431
Sponsored by: EMC / Isilon Storage Division

r289693:

Unbreak makefs -t cd9660 after r289687

buffer_head needs to be freed -- not buffer

Detected by jemalloc, i.e. running makefs failed the arena assert
because my copy of malloc on CURRENT is compiled with the default
!MALLOC_PRODUCTION asserts on

Pointyhat to: ngie
PR: 203647
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289739,r289743,r289897,r289901:
ngie [Mon, 9 Nov 2015 07:56:06 +0000 (07:56 +0000)]
MFC r289739,r289743,r289897,r289901:

r289739:

Correctly reintroduce the rudimentary smoke tests I botched up
in r289684

Sponsored by: EMC / Isilon Storage Division

r289743:

Revise "create_test_inputs" to simplify the file structure as
these testcases don't need to be nested as much as bin/ls/ls_tests.sh
do when verifying ls -a, ls -A, etc. This allows the tests to make
all paths relative to the top of the temporary directory instead of
always tacking on $ATF_TMPDIR, thus complicating things unnecessarily

Create non-empty files in create_test_inputs as well now, similar to
create_test_inputs2 in bin/ls/ls_tests.sh

Compare the input files to the output file contents using diff where
possible:
- Skip over the fifo comparison for now because it always fails
- Skip over the symlink comparison on cd9660 because it always fails
  today

Sponsored by: EMC / Isilon Storage Division

r289897:

Add more cd9660/FFS makefs testcases

General changes:
- Parameterize out the mount command.
- Use mtree to verify the contents of an image (check_image_contents) instead
  of using diff (diff verifies content, but not file metadata).
- Move common logic out to functions (common_cleanup, mount_image,
  check_image_contents)
- Add stub testcases for makefs -D (crashes with SIGBUS, similar to bug # 192839)
- Add a note about the ISO-9660 and rockridge specs
- Add testcases that exercise:
-- Creating disk images from an mtree and multiple directories.
-- -F flag use (not really an extensive testcase right now)

cd9660-specific test changes:

- Remove an XXX comment about symlinks; I forgot that non-rockridge images turn
  symlinks into hardlinks.
- Add testcases that exercise:
-- -o allow-deep-trees
-- -o allow-max-name stub testcase (doesn't seem to be implemented in makefs)
-- -o preparer (existence in image; not conformance to spec)
-- -o publisher (existence in image; not conformance to spec)
-- -o rockridge (basic)

Sponsored by: EMC / Isilon Storage Division

r289901:

Remove an ls -l I was using for debugging

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289441:
ngie [Mon, 9 Nov 2015 07:49:39 +0000 (07:49 +0000)]
MFC r289441:

Integrate tools/test/posixshm and tools/regression/posixshm into the FreeBSD
test suite as tests/sys/posixshm

Some other highlights:
- Convert the testcases over to ATF
- Don't use hardcoded paths to /tmp (which violate the ATF/kyua samdbox); use
  mkstemp to generate temporary paths for non-SHM_ANON shm objects.

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290177:
ngie [Mon, 9 Nov 2015 07:41:28 +0000 (07:41 +0000)]
MFC r290177:

Integrate contrib/netbsd-tests/lib/libc/rpc into the FreeBSD test suite
as lib/libc/rpc

This testcase requires rpcbind be up in running; otherwise the testcases
will time out and be skipped

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290179:
ngie [Mon, 9 Nov 2015 07:34:30 +0000 (07:34 +0000)]
MFC r290179:

Remove a set but unused variable in __getgroupmembership to fix a gcc 4.9+ warning

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290190,r290251:
ngie [Mon, 9 Nov 2015 07:26:34 +0000 (07:26 +0000)]
MFC r290190,r290251:

r290190:

Fix compiler warnings with open_to_operation.c

Other sidenotes:
- Remove unused variables with main(..)
- Convert errx/exit with -1 to errx/exit with 1
- Fix a bogus test in try_directory_open
  (expected_errno == expected_errno -> errno == expected_errno) [*]
- Fix some warnings related to discarded qualifiers
- Remove a bogus else-statement at the end of check_mmap_exec(..) in the
  successful case. mmap(2), POSIX, Linux, etc all don't state what the
  behavior is when mixing O_WRONLY + PROT_EXEC, so assume success for now to
  get the test program to pass again.

PR: 201286 [*]
Submitted by: David Binderman <dcb314@hotmail.com>
Sponsored by: EMC / Isilon Storage Division

r290251:

Use nitems(x) instead of sizeof(x)/sizeof(x[0])

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289903:
ngie [Mon, 9 Nov 2015 07:18:09 +0000 (07:18 +0000)]
MFC r289903:

Add libvmmapi to OptionalObsoleteFiles.inc when MK_BHYVE == no

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290184:
ngie [Mon, 9 Nov 2015 07:16:17 +0000 (07:16 +0000)]
MFC r290184:

Fix a set but not used variable warning flagged by gcc 4.9 with
lib/libc/ssp/h_readlink

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290182:
ngie [Mon, 9 Nov 2015 07:07:25 +0000 (07:07 +0000)]
MFC r290182:

Fix rtsold's usage message

- Remove -a from the usage message example dealing with specific
  interfaces. -a only makes sense when not specifying an interface,
  such that it's to be run on all interfaces
- Fix the pidfile option (it's -p, not -P)
- Change `interfaces` to `interface` to match the manpage

PR: 173744
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290178:
ngie [Mon, 9 Nov 2015 06:55:04 +0000 (06:55 +0000)]
MFC r290178:

Fix GOST engine cipher linkage by adding e_gost_err.c to SRCS so it
picks up undefined symbols, like "ERR_load_GOST_strings"

PR: 184805
Submitted by: Ivan IvanZhdanov <ivan.zhdanov@gmail.com>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289487:
ngie [Mon, 9 Nov 2015 06:50:42 +0000 (06:50 +0000)]
MFC r289487:

Integrate contrib/netbsd-tests/bin/dd into the FreeBSD test suite as
bin/dd/tests

Ensure fdescfs is mounted on /dev/fd/ for the length testcase as it's used
in validating the characters read from /dev/zero

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290024,290073:
delphij [Mon, 9 Nov 2015 01:53:54 +0000 (01:53 +0000)]
MFC r290024,290073:

In gunzip(1), treat trailing garbage as a warning and not an error.  This
allows scripts to distinguish it between real fatal errors, for instance a
CRC mismatch.

Update manual page for the behavior change.

PR: bin/203873
Submitted by: Eugene Grosbein <eugen grosbein net>

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

8 years agoMFC: r290329,r290336
ache [Sun, 8 Nov 2015 14:22:57 +0000 (14:22 +0000)]
MFC: r290329,r290336
PR: 204230

r290329:

Use meaningful errno for ssize_t overflow in read().
Catch size_t overflow in malloc().

r290336:

Check for (old|new)size + 1 overflows off_t.

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

8 years agoMFC: r289863,r289931,r290110,r290230,r290231,r290232
ache [Sun, 8 Nov 2015 13:37:16 +0000 (13:37 +0000)]
MFC:  r289863,r289931,r290110,r290230,r290231,r290232

r290232:

Microoptimize.

r290231:

Addition to prev. commit.
In some edge cases fp->_p can be changed in _sseek(), recalculate.

r290230:

Don't seek to the end if write buffer is empty (in append modes).
PR:     204156

r290110:

Add _flags2 per jhb@ suggestion since no room left in _flags.
Rewrite O_APPEND flag checking using new __S2OAP flag.

r289931:

According to POSIX, a write operation shall start at the current size of
the stream (if mode had 'a' as the first character).

r289863:

Since no room left in the _flags, reuse __SALC for O_APPEND.
It helps to remove _fcntl() call from _ftello() and optimize seek position
calculation in _swrite().

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

8 years agoMFC 289636:
jhb [Fri, 6 Nov 2015 20:10:54 +0000 (20:10 +0000)]
MFC 289636:
Switch pl_child_pid from int to pid_t.

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

8 years agoMFC 288902:
jhb [Fri, 6 Nov 2015 16:57:23 +0000 (16:57 +0000)]
MFC 288902:
Include additional info in ptrace(2) KTR traces:
- The new PC value and signal passed to PT_CONTINUE, PT_DETACH, PT_SYSCALL,
  and PT_TO_SC[EX].
- The system call code returned via PT_LWPINFO.

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

8 years agoMFC 288452,289719:
jhb [Fri, 6 Nov 2015 16:48:33 +0000 (16:48 +0000)]
MFC 288452,289719:

288452:
Most error cases in i915_gem_do_execbuffer() jump to one of two labels to
release resources (such as unholding pages) when errors occur.  Some
recently added error checks return immediately instead of jumping to a
label resulting in leaks.  Fix these to jump to a label to do cleanup
instead.

Note that stable/9 does not have the "recently added" error checks, but
it does have some older error checks (that were are no longer present
in stable/10 and head) that have the same bug and this fixes those
instead.

289719:
i915_gem_do_execbuffer() holds the pages backing each relocation region for
various reasons while executing user commands.  After these commands are
completed, the pages backing the relocation regions are unheld.

Since relocation regions do not have to be page aligned, the code in
validate_exec_list() allocates 2 extra page pointers in the array of
held pages populated by vm_fault_quick_hold_pages().  However, the cleanup
code that unheld the pages always assumed that only the buffer size /
PAGE_SIZE pages were used.  This meant that non-page aligned buffers would
not unheld the last 1 or 2 pages in the list.  Fix this by saving the
number of held pages returned by vm_fault_quick_hold_pages() for each
relocation region and using this count during cleanup.

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

8 years agoMFC r290195:
hselasky [Fri, 6 Nov 2015 13:34:55 +0000 (13:34 +0000)]
MFC r290195:
Reduce the DWC OTG interrupt load by not reading all the host channel
status registers for every interrupt. Check a common host channel
status interrupt register first, then conditionally read the
individual host channel status registers.

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

8 years agoMFC 288371:
jhb [Thu, 5 Nov 2015 21:22:23 +0000 (21:22 +0000)]
MFC 288371:
When XSAVE support was added on amd64, the FPU save area was moved
out of 'struct pcb' and into a variable-sized region after the
structure.  The kgdb code currently only reads the pcb.  It does not
read in the FPU save area but instead passes stack garbage as the
FPU's saved context.  Fixing this would mean determining the proper
size of the area and fetching it.  However, this state is not saved
for running CPUs in stoppcbs[], so the callback would also have to
know to ignore those pcbs.  Instead, just remove the call since it is
of limited usefulness.  It results in kgdb reporting the state of the
FPU/SIMD registers in userland, not their current values in the kernel.
In particular, it does not report the correct state for any code in
the kernel which does use the FPU and would report incorrect values
in that case.

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

8 years agoMFC 288372:
jhb [Thu, 5 Nov 2015 20:21:43 +0000 (20:21 +0000)]
MFC 288372:
Use EFI page size constants instead of hardcoding 4096.

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

8 years agoMFC 287934:
jhb [Thu, 5 Nov 2015 19:55:45 +0000 (19:55 +0000)]
MFC 287934:
The EFI boot loader allocates a single chunk of contiguous memory to
hold the kernel, modules, and any other loaded data.  This memory block
is relocated to the kernel's expected location during the transfer of
control from the loader to the kernel.

The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko
no longer fits in the default staging size.  Bump the default size from
32MB to 48MB to provide more breathing room.

PR: 201679

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

8 years agoMFC r276450
smh [Thu, 5 Nov 2015 17:19:08 +0000 (17:19 +0000)]
MFC r276450

Correct zpool list displaying invalid EXPANDSZ for unavailable pool vdevs

Sponsored by: Multiplay

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

8 years agoMFC r273118 (by mjg)
smh [Thu, 5 Nov 2015 16:50:09 +0000 (16:50 +0000)]
MFC r273118 (by mjg)

Don't take devmtx unnecessarily in vn_isdisk.

Sponsored by: Multiplay

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

8 years agoMFC r289637
emax [Thu, 5 Nov 2015 16:08:38 +0000 (16:08 +0000)]
MFC r289637

check boundaries while parsing SDP responses

Reported by: hps
Reviewed by: hps

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

8 years agoMFC r289746:
ngie [Thu, 5 Nov 2015 08:27:45 +0000 (08:27 +0000)]
MFC r289746:

Exit with a user-friendly message instead of tripping an assert
if vm_activate_cpu(..) fails when called from fbsdrun_addcpu(..)

PR: 203884
Reviewed by: grehan
Submitted by: William Orr <will@worrbase.com>

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

8 years agoMFC r289913,r289916:
ngie [Thu, 5 Nov 2015 07:48:48 +0000 (07:48 +0000)]
MFC r289913,r289916:

r289913:

Use 't' (bits) not 'i' (bytes) for describing MRIE (aka
"Method of Reporting Informational Exceptions") in the SCSI mode database as
the field described in X3T10/94-190 (revision 4; page 2, table 1) [1.] is
4 bits wide, not 4 bytes wide

1. http://ftp.t10.org/ftp/t10/document.94/94-190r4.pdf

Bug 200619
Reported by: Michael Baptist <mbaptist@isilon.com>
Submitted by: Lars Skodje <lskodje@isilon.com>
Sponsored by: EMC / Isilon Storage Division

r289916:

Limit RESOLUTION_MAX to INT_MAX, not UINT_MAX (all spelled out) so the
mode value isn't always clipped to -1 when (resolution * size) == 32, which
would have been the case with values => {4i,32b,32t}.

This seems to have been broken in r64382.

PR: 200619
Reported by: Michael Baptist
Submitted by: Lars Skodje
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290116:
ae [Wed, 4 Nov 2015 10:42:51 +0000 (10:42 +0000)]
MFC r290116:
  Check the size of data available in mbuf before using it.

  PR: 202667

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

8 years agoMFC r288600:
hrs [Wed, 4 Nov 2015 01:00:42 +0000 (01:00 +0000)]
MFC r288600:

  - Schedule DAD for IN6_IFF_TENTATIVE addresses in nd6_timer().  This
    catches cases that DAD probes cannot be sent because of
    IFF_UP && !IFF_DRV_RUNNING.

  - nd6_dad_starttimer() now calls nd6_dad_ns_output(), instead of
    calling it before nd6_dad_starttimer().

  - Do not release an entry in dadq when a duplicate entry is being
    added.

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

8 years agoMFC r288575:
hrs [Wed, 4 Nov 2015 00:21:02 +0000 (00:21 +0000)]
MFC r288575:

 Add IFCAP_LINKSTATE support.

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

8 years agoMFC r285914, r289029 and r289560:
hselasky [Tue, 3 Nov 2015 10:24:54 +0000 (10:24 +0000)]
MFC r285914, r289029 and r289560:
- Move the remainder of host controller capability registers reading from
  xhci_start_controller() to xhci_init(). These values don't change at run-
  time so there's no point of acquiring them on every USB_HW_POWER_RESUME
  instead of only once during initialization. In r276717, reading the first
  couple of registers in question already had been moved as a prerequisite
  for the changes in that revision.
- Identify ASMedia ASM1042A controllers.
- Use NULL instead of 0 for pointers.
- Add quirks for USB 3.0 PCI devices.

PR: 203650

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

8 years agoMFC r289661:
kib [Tue, 3 Nov 2015 08:33:24 +0000 (08:33 +0000)]
MFC r289661:
Mark struct thread zone as type-stable, to prevent dereference of the
freed memory in the locks spin loops.

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

8 years agoMFC r289660,r289664:
kib [Tue, 3 Nov 2015 08:31:01 +0000 (08:31 +0000)]
MFC r289660,r289664:
Do not allow to execute ptrace(PT_TRACE_ME) when the process is
already traced or when there is no parent which can trace the process.

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

8 years agoMFC r289658:
kib [Tue, 3 Nov 2015 08:28:47 +0000 (08:28 +0000)]
MFC r289658:
No need to dereference struct proc to pids when comparing processes
for equality.

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

8 years agoMFC r287413: Minor code cleanups (no functional changes).
dteske [Mon, 2 Nov 2015 22:56:10 +0000 (22:56 +0000)]
MFC r287413: Minor code cleanups (no functional changes).

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

8 years agoMFC r287390: Bump version for altered long-opts processing
dteske [Mon, 2 Nov 2015 22:55:25 +0000 (22:55 +0000)]
MFC r287390: Bump version for altered long-opts processing

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

8 years agoMFC r287389: Simplify long-option processing
dteske [Mon, 2 Nov 2015 22:54:45 +0000 (22:54 +0000)]
MFC r287389: Simplify long-option processing

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

8 years agoMFC r287385: Bump version for prior fix (SVN r287381)
dteske [Mon, 2 Nov 2015 22:42:07 +0000 (22:42 +0000)]
MFC r287385: Bump version for prior fix (SVN r287381)

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

8 years agoMFC r287384:
dteske [Mon, 2 Nov 2015 22:37:56 +0000 (22:37 +0000)]
MFC r287384:
 Style: Remove whitespace around brackets from function syntax options

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

8 years agoMFC r287383: Comment for escape() function.
dteske [Mon, 2 Nov 2015 22:35:48 +0000 (22:35 +0000)]
MFC r287383: Comment for escape() function.

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

8 years agoMFC r287382: Comment
dteske [Mon, 2 Nov 2015 22:33:34 +0000 (22:33 +0000)]
MFC r287382: Comment

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

8 years agoMFC r287381: Properly escape arguments when moving into jail or chroot
dteske [Mon, 2 Nov 2015 22:32:59 +0000 (22:32 +0000)]
MFC r287381: Properly escape arguments when moving into jail or chroot

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

8 years agoMFC r287380: Style: comments
dteske [Mon, 2 Nov 2015 22:32:13 +0000 (22:32 +0000)]
MFC r287380: Style: comments

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

8 years agoMFC r287379: Style consistency: add single space before each `;;' case entry
dteske [Mon, 2 Nov 2015 22:31:32 +0000 (22:31 +0000)]
MFC r287379: Style consistency: add single space before each `;;' case entry

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

8 years agoMFC r287378:
dteske [Mon, 2 Nov 2015 22:30:55 +0000 (22:30 +0000)]
MFC r287378:
 Remove `SYSRC_' prefix from $SYSRC_VERBOSE (prefix unnecessary since
 this is a non-inheritable attribute; was previously).

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

8 years agoMFC r287421: Fix mandoc(1) "WARNING: end of line whitespace"
dteske [Mon, 2 Nov 2015 22:24:57 +0000 (22:24 +0000)]
MFC r287421: Fix mandoc(1) "WARNING: end of line whitespace"

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

8 years agoSnap to breuffer's r286660 (incorrectly merged)
dteske [Mon, 2 Nov 2015 22:22:48 +0000 (22:22 +0000)]
Snap to breuffer's r286660 (incorrectly merged)

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

8 years agoMFC r287420: Remove non-functional examples.
dteske [Mon, 2 Nov 2015 22:12:51 +0000 (22:12 +0000)]
MFC r287420: Remove non-functional examples.

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

8 years agoMFC r287683: Ignore error results from newaliases(1)
dteske [Mon, 2 Nov 2015 22:11:19 +0000 (22:11 +0000)]
MFC r287683: Ignore error results from newaliases(1)

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

8 years agoMFC r287685: Remove use of return outside of function
dteske [Mon, 2 Nov 2015 22:10:39 +0000 (22:10 +0000)]
MFC r287685: Remove use of return outside of function

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

8 years agoMFC r287686: Produce meaningful exit code
dteske [Mon, 2 Nov 2015 22:09:43 +0000 (22:09 +0000)]
MFC r287686: Produce meaningful exit code

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

8 years agoMFC r287687: Update copyrights
dteske [Mon, 2 Nov 2015 22:08:59 +0000 (22:08 +0000)]
MFC r287687: Update copyrights

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

8 years agoMFC r287688: Explicitly exit with success
dteske [Mon, 2 Nov 2015 22:08:11 +0000 (22:08 +0000)]
MFC r287688: Explicitly exit with success

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

8 years agoMFC r287689: Explicitly exit with success
dteske [Mon, 2 Nov 2015 22:07:25 +0000 (22:07 +0000)]
MFC r287689: Explicitly exit with success

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

8 years agoMFC r287690: Produce meaningful exit code
dteske [Mon, 2 Nov 2015 22:06:44 +0000 (22:06 +0000)]
MFC r287690: Produce meaningful exit code

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

8 years agoMFC r287691: Remove trailing newline at EOF
dteske [Mon, 2 Nov 2015 22:05:41 +0000 (22:05 +0000)]
MFC r287691: Remove trailing newline at EOF

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

8 years agoMFC r287694: Use a variable for readability
dteske [Mon, 2 Nov 2015 22:05:04 +0000 (22:05 +0000)]
MFC r287694: Use a variable for readability

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

8 years agoMFC r287695: Replace `return' outside of function with exit
dteske [Mon, 2 Nov 2015 22:04:22 +0000 (22:04 +0000)]
MFC r287695: Replace `return' outside of function with exit

Pointy hat to: me

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