]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r290548:
trasz [Tue, 12 Jan 2016 10:14:57 +0000 (10:14 +0000)]
MFC r290548:

Userspace part of reroot support. This makes it possible to change
the root filesystem without full reboot, using "reboot -r". This can
be used to to eg. boot from a temporary md_image preloaded by loader(8),
setup an iSCSI session, and continue booting from rootfs mounted over
iSCSI.

Relnotes: yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3693

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

8 years agoMFC r287964:
trasz [Tue, 12 Jan 2016 10:11:29 +0000 (10:11 +0000)]
MFC r287964:

Kernel part of reroot support - a way to change rootfs without reboot.

Note that the mountlist manipulations are somewhat fragile, and not very
pretty.  The reason for this is to avoid changing vfs_mountroot(), which
is (obviously) rather mission-critical, but not very well documented,
and thus hard to test properly.  It might be possible to rework it to use
its own simple root mount mechanism instead of vfs_mountroot().

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D2698

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

8 years agoMFC r287107:
trasz [Tue, 12 Jan 2016 10:09:03 +0000 (10:09 +0000)]
MFC r287107:

Make vfs_unmountall() unmount /dev after /, not before.  The only
reason this didn't result in an unclean shutdown is that devfs ignores
MNT_FORCE flag.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3467

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

8 years agoMFC r285240:
trasz [Tue, 12 Jan 2016 09:58:00 +0000 (09:58 +0000)]
MFC r285240:

Remove reboot.S (part of libc).  It's not needed and was actually
broken - returning 0 from reboot(2) resulted in SIGBUS.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r289110:
trasz [Tue, 12 Jan 2016 09:27:01 +0000 (09:27 +0000)]
MFC r289110:

Make geom_nop(4) collect statistics on all types of BIOs, not just
reads and writes.

PR: kern/198405
Submitted by: Matthew D. Fuller <fullermd at over-yonder dot net>
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3679

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

8 years agoMFC r292989:
hselasky [Tue, 12 Jan 2016 09:00:19 +0000 (09:00 +0000)]
MFC r292989:
Handle when filedescriptors are closed before initialized. An early
fdclose() call can cause fget_unlocked() to fail.

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

8 years agoMFC r293192:
hselasky [Tue, 12 Jan 2016 08:49:40 +0000 (08:49 +0000)]
MFC r293192:
Fix for directly connected FULL or LOW speed USB devices.

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

8 years agoMFC: r287842
allanjude [Tue, 12 Jan 2016 05:56:49 +0000 (05:56 +0000)]
MFC: r287842
  Make ifconfig always exit with an error code if an important ioctl fails

PR: 203062

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

8 years agoMFC: r287576
allanjude [Tue, 12 Jan 2016 05:55:28 +0000 (05:55 +0000)]
MFC: r287576
  service(8) -e does not respect /etc/rc.conf.d/* entries

PR: 173454
Submitted by: giantlock@gmail.com (original patch)

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

8 years agoMFC: r287528
allanjude [Tue, 12 Jan 2016 05:53:53 +0000 (05:53 +0000)]
MFC: r287528
  Document the sctp blackhole sysctl MIB

PR: 184110
Submitted by: Marie Helene Kvello-Aune <marieheleneka@gmail.com>

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

8 years agoMFC: r285552
allanjude [Tue, 12 Jan 2016 05:51:12 +0000 (05:51 +0000)]
MFC: r285552
  Use strtonum(3) instead of atoi(3)

MFC: r286289
  Introduce -P0, creating as many concurrent processes as possible

Relnotes: yes

MFC: r286461
  Fix regression in xargs -Px, add more regression tests

MFC: r287004
MFC: r287005
  Fix the racy xargs -P0 -n2 test added in r286289

PR: 199976
Submitted by: Nikolai Lifanov <lifanov@mail.lifanov.com>

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

8 years agoMFC r293188:
gjb [Tue, 12 Jan 2016 02:12:40 +0000 (02:12 +0000)]
MFC r293188:
 Prevent memstick installation medium from attempting to mount
 the root filesystem read-write.  This causes problems booting
 the memstick installation medium from write-protected USB flash
 drives.

PR: 187161, 205886
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC: r292011
hiren [Mon, 11 Jan 2016 23:37:31 +0000 (23:37 +0000)]
MFC: r292011
MFC: r292012

Add an option to use rfc6675 based pipe/inflight bytes calculation in cubic and
newreno.

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

8 years agoMFC: r292003
hiren [Mon, 11 Jan 2016 23:34:29 +0000 (23:34 +0000)]
MFC: r292003
Improve tcp duplicate ack processing when SACK is present.

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

8 years agoMFC: r290122
hiren [Mon, 11 Jan 2016 23:31:13 +0000 (23:31 +0000)]
MFC: r290122
Calculate the correct amount of bytes that are in-flight for a connection as
suggested by RFC 6675.

MFC: r292046
r290122 added 4 bytes and removed 8 in struct sackhint. Add a pad entry of 4
bytes to restore the size.

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

8 years agoMerge from head r292743, r293627 by dchagin:
glebius [Mon, 11 Jan 2016 21:46:37 +0000 (21:46 +0000)]
Merge from head r292743, r293627 by dchagin:
------------------------------------------------------------------------
r292743 | dchagin | 2015-12-26 01:04:47 -0800 (сб, 26 дек. 2015) | 5 lines

Do not allow access to emuldata for non Linux processes.

------------------------------------------------------------------------
r293627 | dchagin | 2016-01-09 23:36:43 -0800 (сб, 09 янв. 2016) | 6 lines

Unlock process lock when return error from getrobustlist call and add
an forgotten dtrace probe when return the same error.

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

8 years agoMFC r292218
asomers [Mon, 11 Jan 2016 21:12:49 +0000 (21:12 +0000)]
MFC r292218

Don't retry SAS commands in response to protocol errors

  sys/dev/mpr/mpr_sas_lsi.c
  sys/dev/mps/mps_sas_lsi.c
        When mp[rs]sas_get_sata_identify returns
        MPI2_IOCSTATUS_SCSI_PROTOCOL_ERROR, don't bother retrying. Protocol
        errors aren't likely to be fixed by sleeping.

        Without this change, a system that generated may protocol errors due
        to signal integrity issues was taking more than an hour to boot, due
        to all the retries.

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

8 years agoMFC r293440:
bdrewery [Mon, 11 Jan 2016 20:55:52 +0000 (20:55 +0000)]
MFC r293440:

  Fix upgrading from OSVERSION 1000002-1000032 after r288829.

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

8 years agoMFC r292019
asomers [Mon, 11 Jan 2016 20:25:41 +0000 (20:25 +0000)]
MFC r292019

When iostat(8) receives SIGINT while running with "-w" or "-c", it will now
print statistics one more time before exiting. Also, it now implements the
wait using setitimer instead of sleep, so the waits will be more consistent
when the system is heavily loaded.

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

8 years agoMFC r292020
asomers [Mon, 11 Jan 2016 20:24:56 +0000 (20:24 +0000)]
MFC r292020

Increase devd's client socket buffer size to 256KB. This is not as large as
it looks, because we'll hit the sockbuf's mbuf limit long before hitting its
data limit. A 256KB data limit allows creating a ZFS pool on about 450
drives without overflowing the client socket buffers.

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

8 years agoMFC r289060:
trasz [Mon, 11 Jan 2016 20:13:45 +0000 (20:13 +0000)]
MFC r289060:

Document iSCSI and autofs(5) variables in rc.conf(5).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r287429:
trasz [Mon, 11 Jan 2016 20:11:41 +0000 (20:11 +0000)]
MFC r287429:

The dumpfs(8) utility doesn't actually use disktab(5); remove it
from "SEE ALSO".

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r287396:
trasz [Mon, 11 Jan 2016 20:10:14 +0000 (20:10 +0000)]
MFC r287396:

It's 2015, and some people are still trying to use fdisk and then
go asking what debug flags to set for GEOM to make it work.  Advice
them to use gpart(8) instead.

Something similar should probably done with disklabel,
but I need to rewrite the disklabel examples first.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r287704:
trasz [Mon, 11 Jan 2016 20:03:58 +0000 (20:03 +0000)]
MFC r287704:

Point potential geom_fox(4) users to gmultipath(8).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC 289113:
trasz [Mon, 11 Jan 2016 20:01:50 +0000 (20:01 +0000)]
MFC 289113:

Add 'p' postfix to mdconfig(8).

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r289111:
trasz [Mon, 11 Jan 2016 19:59:56 +0000 (19:59 +0000)]
MFC r289111:

Provide better debug message on kernel module name clash.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r290408:
trasz [Mon, 11 Jan 2016 19:32:07 +0000 (19:32 +0000)]
MFC r290408:

Make rctl(8) use more reasonable buffer size for retrieving the rules.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC: r290153 (by bdrewery)
bapt [Mon, 11 Jan 2016 19:26:18 +0000 (19:26 +0000)]
MFC: r290153 (by bdrewery)

Fix unlikely memory leak.

It is unlikely since the first check in the function is that dir[0] is '/',
but later code changes may make it real.

Coverity CID: 1332104

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

8 years agoMFC: 278899
bapt [Mon, 11 Jan 2016 19:22:58 +0000 (19:22 +0000)]
MFC: 278899

Regression: fix usershow -7

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

8 years agoMFC r290404:
trasz [Mon, 11 Jan 2016 19:21:20 +0000 (19:21 +0000)]
MFC r290404:

Fix markup in rctl(8) - the 'rule' or 'filter' arguments are not optional.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r293369:
jimharris [Mon, 11 Jan 2016 17:54:23 +0000 (17:54 +0000)]
MFC r293369:

  ismt: fix ISMT_DESC_ADDR_RW macro

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

8 years agoMFC r266474:
jimharris [Mon, 11 Jan 2016 17:53:24 +0000 (17:53 +0000)]
MFC r266474:

  Add ismt(4) driver.

  ismt(4) supports the SMBus Message Transport controller found on Intel
  C2000 series (Avoton) and S1200 series (Briarwood) Atom SoCs.

Relnotes: Yes

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

8 years agoMFC r293354:
jimharris [Mon, 11 Jan 2016 17:33:51 +0000 (17:33 +0000)]
MFC r293354:

  nvme: replace NVME_CEILING macro with howmany()

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

8 years agoMFC r293352:
jimharris [Mon, 11 Jan 2016 17:32:56 +0000 (17:32 +0000)]
MFC r293352:

  nvme: add hw.nvme.min_cpus_per_ioq tunable

  Due to FreeBSD system-wide limits on number of MSI-X vectors
  (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199321),
  it may be desirable to allocate fewer than the maximum number
  of vectors for an NVMe device, in order to save vectors for
  other devices (usually Ethernet) that can take better
  advantage of them and may be probed after NVMe.

  This tunable is expressed in terms of minimum number of CPUs
  per I/O queue instead of max number of queues per controller,
  to allow for a more even distribution of CPUs per queue.  This
  avoids cases where some number of CPUs have a dedicated queue,
  but other CPUs need to share queues.  Ideally the PR referenced
  above will eventually be fixed and the mechanism implemented
  here becomes obsolete anyways.

  While here, fix a bug in the CPUs per I/O queue calculation to
  properly account for the admin queue's MSI-X vector.

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

8 years agoMFC r293328:
jimharris [Mon, 11 Jan 2016 17:31:18 +0000 (17:31 +0000)]
MFC r293328:

  nvme: do not revert to single I/O queue when per-CPU queues not available

  Previously nvme(4) would revert to a single I/O queue if it could not
  allocate enought interrupt vectors or NVMe submission/completion queues
  to have one I/O queue per core.  This patch determines how to utilize a
  smaller number of available interrupt vectors, and assigns (as closely
  as possible) an equal number of cores to each associated I/O queue.

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

8 years agoMFC r293327:
jimharris [Mon, 11 Jan 2016 17:29:42 +0000 (17:29 +0000)]
MFC r293327:

  nvme: break out interrupt setup code into a separate function

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

8 years agoMFC r293326:
jimharris [Mon, 11 Jan 2016 17:28:47 +0000 (17:28 +0000)]
MFC r293326:

  nvme: do not pre-allocate MSI-X IRQ resources

  The issue referenced here was resolved by other changes
  in recent commits, so this code is no longer needed.

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

8 years agoMFC r293325:
jimharris [Mon, 11 Jan 2016 17:27:20 +0000 (17:27 +0000)]
MFC r293325:

  nvme: remove per_cpu_io_queues from struct nvme_controller

  Instead just use num_io_queues to make this determination.

  This prepares for some future changes enabling use of multiple
  queues when we do not have enough queues or MSI-X vectors
  for one queue per CPU.

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

8 years agoMFC r293324:
jimharris [Mon, 11 Jan 2016 17:26:06 +0000 (17:26 +0000)]
MFC r293324:

  nvme: simplify some of the nested ifs in interrupt setup code

  This prepares for some follow-up commits which do more work in
  this area.

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

8 years agoMFC r293323:
jimharris [Mon, 11 Jan 2016 17:24:18 +0000 (17:24 +0000)]
MFC r293323:

  nvd: submit bios directly when BIO_ORDERED not set or in flight

  This significantly improves parallelism in the most common case.
  The taskqueue is still used whenever BIO_ORDERED bios are in flight.

  This patch is based heavily on a patch from gallatin@.

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

8 years agoMFC r293322:
jimharris [Mon, 11 Jan 2016 17:22:57 +0000 (17:22 +0000)]
MFC r293322:

  nvd: break out submission logic into separate function

  This enables a future patch using this same logic to submit
  I/O directly bypassing the taskqueue.

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

8 years agoMFC r293321:
jimharris [Mon, 11 Jan 2016 17:21:38 +0000 (17:21 +0000)]
MFC r293321:

  nvd: skip BIO_ORDERED logic when bio fails submission

  This ensures the bio flags are not read after biodone().
  The ordering will still be enforced, after the bio is
  submitted successfully.

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

8 years agoMFC r293320:
jimharris [Mon, 11 Jan 2016 17:20:30 +0000 (17:20 +0000)]
MFC r293320:

  nvd: do not wait for previous bios before submitting ordered bio

  Still wait until all in-flight bios (including the ordered bio)
  complete before processing more bios from the queue.

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

8 years agoMFC r293319:
jimharris [Mon, 11 Jan 2016 17:19:11 +0000 (17:19 +0000)]
MFC r293319:

  nvd: set DISKFLAG_DIRECT_COMPLETION

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

8 years agoMFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clang
emaste [Mon, 11 Jan 2016 15:30:19 +0000 (15:30 +0000)]
MFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clang

The flags -mno-aes -mno-avx only exist for clang, not [base] gcc, so
add them only to the clang CFLAGS.

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

8 years agoMove -msoft-float compiler flag into x86/i386 cases to fix ia64
emaste [Mon, 11 Jan 2016 04:25:03 +0000 (04:25 +0000)]
Move -msoft-float compiler flag into x86/i386 cases to fix ia64

Direct commit to stable/10 as ia64 support does not exist in HEAD.

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

8 years agoMerge r293423, r293469:
glebius [Mon, 11 Jan 2016 01:09:50 +0000 (01:09 +0000)]
Merge r293423, r293469:

  ntp 4.2.8p5

Relnotes: yes

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

8 years agoMFC r281027: Clean up more x86 only options in the efi code.
emaste [Mon, 11 Jan 2016 00:43:50 +0000 (00:43 +0000)]
MFC r281027: Clean up more x86 only options in the efi code.

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

8 years agoMFC r293370:
pfg [Sun, 10 Jan 2016 22:30:39 +0000 (22:30 +0000)]
MFC r293370:
ext2fs: reading mmaped file in Ext4 causes panic

Always call brelse(path.ep_bp), fixing reading EXT4 files using mmap().

Patch by Damjan Jovanovic.

PR: 205938

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

8 years agoRecord only mergeinfo for r283371, r283376, r283380, r283393, r283395,
dchagin [Sun, 10 Jan 2016 21:40:31 +0000 (21:40 +0000)]
Record only mergeinfo for r283371, r283376, r283380, r283393, r283395,
r283397, r283400, r283402, r283405, r283425, r283429, r283442, r283445,
r283452, r283466, r283468, r283482, r283486, r283489, r283493.

regen syscall tables.

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

8 years agoUnbreak stable/10 buildworlds on arm/arm, mips/mips, mips/mips64, mips/mipsel,
ngie [Sun, 10 Jan 2016 17:39:49 +0000 (17:39 +0000)]
Unbreak stable/10 buildworlds on arm/arm, mips/mips, mips/mips64, mips/mipsel,
mips/mipsn32, powerpc/powerpc, powerpc/powerpc64, sparc64/sparc64 with gcc
after r293307 (some of the BURN_BRIDGES code)

MFC after: 3 days
Pointyhat to: markj
Sponsored by: EMC / Isilon Storage Division

MFC r279017:

r279017 (by glebius):

Burn bridges to FreeBSD 7.x IGMP stats.

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

8 years agoMFC r292057:
ae [Sun, 10 Jan 2016 13:53:57 +0000 (13:53 +0000)]
MFC r292057:
  Make detection of GPT a bit more reliable.

  When we are detecting a partition table and didn't find PMBR, try to
  read backup GPT header from the last sector and if it is correct,
  assume that we have GPT.

  Differential Revision: https://reviews.freebsd.org/D4282

MFC r292058:
  Remove a note about damaged PMBR. Now GPT will be detected automatically
  with such corruption.

Relnotes: yes

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

8 years agoMFC SVN revisions 293340, 293379
dteske [Sat, 9 Jan 2016 23:44:41 +0000 (23:44 +0000)]
MFC SVN revisions 293340, 293379

r293340: Increase maximum buffer size for `-x cmd' value
r293379: Bump copyright

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

8 years agoMFC r290275: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi)
dteske [Sat, 9 Jan 2016 23:33:44 +0000 (23:33 +0000)]
MFC r290275: Make figpar(3) types/macros [more] unique (s/fp_/figpar_/gi)

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

8 years agoBump __FreeBSD_version after Linux changes merge.
dchagin [Sat, 9 Jan 2016 18:40:20 +0000 (18:40 +0000)]
Bump __FreeBSD_version after Linux changes merge.

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

8 years agoMFC r289055 (by mjg@):
dchagin [Sat, 9 Jan 2016 18:32:52 +0000 (18:32 +0000)]
MFC r289055 (by mjg@):

 linux: fix handling of out-of-bounds syscall attempts

 Due to an off by one the code would read an entry past the table, as
 opposed to the last entry which contains the nosys handler.

 This fixes my fault.

MFC r289058 (by cem@):

 Fix missing semi-colon from r289055.

MFC r289768 (by jhb@):

 Merge r289055 to amd64/linux32:

 linux: fix handling of out-of-bounds syscall attempts

 Due to an off by one the code would read an entry past the table, as
 opposed to the last entry which contains the nosys handler.

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

8 years agoMFC r288994 (by bdrewery):
dchagin [Sat, 9 Jan 2016 18:28:15 +0000 (18:28 +0000)]
MFC r288994 (by bdrewery):

Remove redundant RFFPWAIT/vfork(2) handling in Linux fork(2) and clone(2) wrappers.

r161611 added some of the code from sys_vfork() directly into the Linux
module wrappers since they use RFSTOPPED.  In r232240, the RFFPWAIT handling
was moved to syscallret(), thus this code in the Linux module is no longer
needed as it will be called later.

This also allows the Linux wrappers to benefit from the fix in r275616 for
threads not getting suspended if their vforked child is stopped while they
wait on them.

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

8 years agoMFC r287395 (by trasz):
dchagin [Sat, 9 Jan 2016 18:24:53 +0000 (18:24 +0000)]
MFC r287395 (by trasz):

Fixes a panic triggered by threaded Linux applications when running
with RACCT/RCTL enabled.

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

8 years agoMFC r284626:
dchagin [Sat, 9 Jan 2016 18:23:34 +0000 (18:23 +0000)]
MFC r284626:

Add EPOLLRDHUP support.

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

8 years agoMFC r284166 (by jkim):
dchagin [Sat, 9 Jan 2016 18:22:09 +0000 (18:22 +0000)]
MFC r284166 (by jkim):

Properly initialize flags for accept4(2) not to return spurious EINVAL.
Note this fixes a Linuxulator regression introduced in r283490.

PR:             200662

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

8 years agoMFC r284159:
dchagin [Sat, 9 Jan 2016 18:19:18 +0000 (18:19 +0000)]
MFC r284159:

Futex is an aligned 32-bit integer. Use the proper instruction and
operand when dereferencing futex pointer.

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

8 years agoMFC r284051:
dchagin [Sat, 9 Jan 2016 18:17:58 +0000 (18:17 +0000)]
MFC r284051:

Finish r283544. In exec case properly detach threads from user space
before suicide.

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

8 years agoMFC r283680, r283681:
dchagin [Sat, 9 Jan 2016 18:16:36 +0000 (18:16 +0000)]
MFC r283680, r283681:

Move linux64 and linux_common to it's right place and make them not
depend on bhyve.

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

8 years agoMFC r283569 (by nyan):
dchagin [Sat, 9 Jan 2016 18:09:07 +0000 (18:09 +0000)]
MFC r283569 (by nyan):

MFi386: r283407
  Implement vdso - virtual dynamic shared object.

MFi386: r283474
  Rework signal code to allow using it by other modules, like linprocfs.

MFi386: r283506
  For objcopy, use --input-target and --output-target.

This fixes pc98 build.

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

8 years agoMFC r283544:
dchagin [Sat, 9 Jan 2016 18:07:48 +0000 (18:07 +0000)]
MFC r283544:

When I merged the lemul branch I missied kib@'s r282708 commit.
This is not the final fix as I need properly cleanup thread resources
before other threads suicide.

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

8 years agoMFC r283506 (by rodrigc):
dchagin [Sat, 9 Jan 2016 18:06:38 +0000 (18:06 +0000)]
MFC r283506 (by rodrigc):

For objcopy, use --input-target and --output-target

When building with gcc 4.9 and binutils 2.25,
using '--input' and '--output' returns an error
message:
   objcopy: option `--input' is ambiguous

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

8 years agoMFC r283498:
dchagin [Sat, 9 Jan 2016 18:05:04 +0000 (18:05 +0000)]
MFC r283498:

Linux nanosleep() and clock_nanosleep() system calls always
writes the remaining time into the structure pointed to by rmtp
unless rmtp is NULL. The value of *rmtp can then be used to call
nanosleep() again and complete the specified pause if the previous
call was interrupted.

Note. clock_nanosleep() with an absolute time value does not write
the remaining time.

While here fix whitespaces and typo in SDT_PROBE.

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

8 years agoMFC r283497:
dchagin [Sat, 9 Jan 2016 18:04:10 +0000 (18:04 +0000)]
MFC r283497:

Convert SCM_TIMESTAMP in recvmsg().

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

8 years agoMFC r283496:
dchagin [Sat, 9 Jan 2016 18:03:09 +0000 (18:03 +0000)]
MFC r283496:

The latest cp tool is trying to use the btrfs clone operation that is
implemented via ioctl interface. First of all return ENOTSUP for this
operation as a cp fallback to usual method in that case. Secondly, do
not print out the message about unimplemented operation.

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

8 years agoMFC r283495:
dchagin [Sat, 9 Jan 2016 18:02:08 +0000 (18:02 +0000)]
MFC r283495:

Hide vfs.pfs.trace variable if it is not used.

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

8 years agoMFC r283494:
dchagin [Sat, 9 Jan 2016 18:00:51 +0000 (18:00 +0000)]
MFC r283494:

Fix an mbuf(9) leak in sendmsg() under failure condition and
remove unneeded check for failed M_WAITOK allocation.

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

8 years agoRegen for r293592.
dchagin [Sat, 9 Jan 2016 17:56:04 +0000 (17:56 +0000)]
Regen for r293592.

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

8 years agoMFC r283492:
dchagin [Sat, 9 Jan 2016 17:54:37 +0000 (17:54 +0000)]
MFC r283492:

Implement Linux specific syncfs() system call.

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

8 years agoMFC r283491:
dchagin [Sat, 9 Jan 2016 17:53:32 +0000 (17:53 +0000)]
MFC r283491:

Properly check tv_nsec value. The tv_nsec field can also be one
of the special value UTIME_NOW or UTIME_OMIT.

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

8 years agoMFC r283490:
dchagin [Sat, 9 Jan 2016 17:52:27 +0000 (17:52 +0000)]
MFC r283490:

Since FreeBSD supports SOCK_CLOEXEC & SOCK_NONBLOCK options
remove its emulation via fcntl call from Linuxulator.

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

8 years agoRegen for r293588.
dchagin [Sat, 9 Jan 2016 17:51:17 +0000 (17:51 +0000)]
Regen for r293588.

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

8 years agoMFC r283488:
dchagin [Sat, 9 Jan 2016 17:50:13 +0000 (17:50 +0000)]
MFC r283488:

Implement recvmmsg() and sendmmsg() system calls.

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

8 years agoMFC r283487:
dchagin [Sat, 9 Jan 2016 17:49:05 +0000 (17:49 +0000)]
MFC r283487:

Reduce duplication between MD Linux code by moving msg related
struct definitions out into the compat/linux/linux_socket.h

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

8 years agoRegen for r293585.
dchagin [Sat, 9 Jan 2016 17:47:57 +0000 (17:47 +0000)]
Regen for r293585.

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

8 years agoMFC r283484:
dchagin [Sat, 9 Jan 2016 17:45:02 +0000 (17:45 +0000)]
MFC r283484:

Implement epoll_pwait() system call.

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

8 years agoMFC r283483:
dchagin [Sat, 9 Jan 2016 17:44:08 +0000 (17:44 +0000)]
MFC r283483:

Convert signal number to native for VT_SETMODE ioctl and remove
strange and invalid ISSIGVALID macro.
The code has not been tested right way but it was originally broken.

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

8 years agoRegen for r293582.
dchagin [Sat, 9 Jan 2016 17:42:25 +0000 (17:42 +0000)]
Regen for r293582.

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

8 years agoMFC r283480:
dchagin [Sat, 9 Jan 2016 17:41:00 +0000 (17:41 +0000)]
MFC r283480:

Add utimensat() system call.

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

8 years agoMFC r283479:
dchagin [Sat, 9 Jan 2016 17:39:41 +0000 (17:39 +0000)]
MFC r283479:

The kernel sends signals to the processes via ABI specific sv_sendsig method.
Native ABI do not need signal conversion, only emulators may want this. Usually
emulators implements its own sv_sendsig method. For now only ibcs2 emulator does
not have own sv_sendsig implementation and depends on native sendsig() method.
So, remove any extra attempts to convert signal numbers from native sendsig()
methods except from i386 where ibsc2 is living.

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

8 years agoMFC r283478:
dchagin [Sat, 9 Jan 2016 17:35:09 +0000 (17:35 +0000)]
MFC r283478:

Simplify linprocfs_doprocenviron(). Remove extra proc visibility checks
and initialize pn_vis by well known procfs_candebug().

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

8 years agoMFC r283476:
dchagin [Sat, 9 Jan 2016 17:31:20 +0000 (17:31 +0000)]
MFC r283476:

Convert Linux signal number to the FreeBSD.

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

8 years agoMFC r283475:
dchagin [Sat, 9 Jan 2016 17:30:10 +0000 (17:30 +0000)]
MFC r283475:

Convert Linux sigsets before showing.
Linux kernel displays sigset always as 16x4 bit mask.

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

8 years agoMFC r283474:
dchagin [Sat, 9 Jan 2016 17:29:08 +0000 (17:29 +0000)]
MFC r283474:

Rework signal code to allow using it by other modules, like linprocfs:

1. Linux sigset always 64 bit on all platforms. In order to move Linux
sigset code to the linux_common module define it as 64 bit int. Move
Linux sigset manipulation routines to the MI path.

2. Move Linux signal number definitions to the MI path. In general, they
are the same on all platforms except for a few signals.

3. Map Linux RT signals to the FreeBSD RT signals and hide signal conversion
tables to avoid conversion errors.

4. Emulate Linux SIGPWR signal via FreeBSD SIGRTMIN signal which is outside
of allowed on Linux signal numbers.

PR:             197216

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

8 years agoMFC r283473:
dchagin [Sat, 9 Jan 2016 17:27:36 +0000 (17:27 +0000)]
MFC r283473:

Add support for /proc/<pid>/auxv.

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

8 years agoMFC r283472:
dchagin [Sat, 9 Jan 2016 17:23:57 +0000 (17:23 +0000)]
MFC r283472:

Add vdso and stack names to the /proc/self/maps.

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

8 years agoMFC r283471:
dchagin [Sat, 9 Jan 2016 17:22:51 +0000 (17:22 +0000)]
MFC r283471:

According to Linux man sigaltstack(3) shall return EINVAL if the ss
argument is not a null pointer, and the ss_flags member pointed to by ss
contains flags other than SS_DISABLE. However, in fact, Linux also
allows SS_ONSTACK flag which is simply ignored.

For buggy apps (at least mono) ignore other than SS_DISABLE
flags as a Linux do.

While here move MI part of sigaltstack code to the appropriate place.

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

8 years agoMFC r283470:
dchagin [Sat, 9 Jan 2016 17:21:28 +0000 (17:21 +0000)]
MFC r283470:

Add EPOLLERR flag handling to epoll.

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

8 years agoRegen for r293569.
dchagin [Sat, 9 Jan 2016 17:20:19 +0000 (17:20 +0000)]
Regen for r293569.

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

8 years agoMFC r283467:
dchagin [Sat, 9 Jan 2016 17:18:03 +0000 (17:18 +0000)]
MFC r283467:

Call nosys in case when the incorrect syscall number is specified.

Its my fault, fixed by mjg@ at r289055.

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

8 years agoRegen for r293567.
dchagin [Sat, 9 Jan 2016 17:15:03 +0000 (17:15 +0000)]
Regen for r293567.

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

8 years agoMFC r283465:
dchagin [Sat, 9 Jan 2016 17:13:43 +0000 (17:13 +0000)]
MFC r283465:

Add preliminary fallocate system call implementation
to emulate posix_fallocate() function.

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

8 years agoMFC r283464:
dchagin [Sat, 9 Jan 2016 17:12:45 +0000 (17:12 +0000)]
MFC r283464:

Delete the duplicate of linux_to_native_clockid() function.

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

8 years agoMFC r283463:
dchagin [Sat, 9 Jan 2016 17:11:25 +0000 (17:11 +0000)]
MFC r283463:

Do not use struct l_timespec without conversion. While here move
args->timeout handling before acquiring the futex key at FUTEX_WAIT path.

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

8 years agoMFC r283462:
dchagin [Sat, 9 Jan 2016 17:10:22 +0000 (17:10 +0000)]
MFC r283462:

Add prototypes for static futex functions.

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

8 years agoMFC r283461:
dchagin [Sat, 9 Jan 2016 17:08:33 +0000 (17:08 +0000)]
MFC r283461:

As for now our tmpfs is no longer being considered
"highly experimental" remove /dev/shm magic commited
in r218497 and convert tmpfs type to an expected magic number.

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