]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
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

8 years agoMFC r287692: Better to reset trap and explicitly exit success
dteske [Mon, 2 Nov 2015 22:03:24 +0000 (22:03 +0000)]
MFC r287692: Better to reset trap and explicitly exit success

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

8 years agoMFC r287693: Update copyright
dteske [Mon, 2 Nov 2015 22:02:35 +0000 (22:02 +0000)]
MFC r287693: Update copyright

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

8 years agoMFC r287803: Fix code typo (no functional change)
dteske [Mon, 2 Nov 2015 22:01:19 +0000 (22:01 +0000)]
MFC r287803: Fix code typo (no functional change)

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

8 years agoMFC r287635: Fix argument quoting and remove unnecessary braces
dteske [Mon, 2 Nov 2015 21:58:19 +0000 (21:58 +0000)]
MFC r287635: Fix argument quoting and remove unnecessary braces

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

8 years agoMFC r287696:
dteske [Mon, 2 Nov 2015 21:46:58 +0000 (21:46 +0000)]
MFC r287696:
 The <arch>/mkisoimages.sh script in release knows how to add
 extra bits from an "xtra-bits-dir". This feature is unusable
 from release/Makefile. Add an XTRADIR setting to use it.
MFC r287697: Whitespace alignment

Differential Revision: https://reviews.freebsd.org/D3633
Reviewed by: kmacy
Relnotes: yes

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

8 years agoMFC r289790: dpv(3) merged to stable/10 before release/10.2.0
dteske [Mon, 2 Nov 2015 21:39:46 +0000 (21:39 +0000)]
MFC r289790: dpv(3) merged to stable/10 before release/10.2.0

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

8 years agoMFC r289793: Bump date/copyright after correcting HISTORY
dteske [Mon, 2 Nov 2015 21:34:39 +0000 (21:34 +0000)]
MFC r289793: Bump date/copyright after correcting HISTORY

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

8 years agoMFC r289794: figpar(3) merged to stable/10 before release/10.2.0
dteske [Mon, 2 Nov 2015 21:33:36 +0000 (21:33 +0000)]
MFC r289794: figpar(3) merged to stable/10 before release/10.2.0

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

8 years agoMFC r290163: Ignore per-mdN settings in mdconfig[2] startup
dteske [Mon, 2 Nov 2015 21:26:10 +0000 (21:26 +0000)]
MFC r290163: Ignore per-mdN settings in mdconfig[2] startup

PR: base/189696
Submitted by: ganael.laplanche@martymac.org

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

8 years agoMFC: r290121
jkim [Mon, 2 Nov 2015 17:41:15 +0000 (17:41 +0000)]
MFC: r290121

Define endianness for non-x86 platforms.

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

8 years agoMFC r289496:
kib [Mon, 2 Nov 2015 13:14:27 +0000 (13:14 +0000)]
MFC r289496:
Modify the 'unchanged' calculation bu dereferencing the marker tailq
pointers, which is known to belong to the queue.

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

8 years agoMFC r289229:
ngie [Sun, 1 Nov 2015 22:27:40 +0000 (22:27 +0000)]
MFC r289229:

Replace references to /dev/acd0 with /dev/cd0

atapicd(4) was replaced by cd(4) with the atacam work done by
mav@ and then removed in r249083

X-MFC to: stable/10

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

8 years agoMFC: 289879
bapt [Sat, 31 Oct 2015 09:32:39 +0000 (09:32 +0000)]
MFC: 289879

newsyslog.conf: allow to configure the signal using the signal name.

Submitted by: Alexandre Perrin <alex@kaworu.ch>
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D3961

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

8 years agoLong-overdue MFC of r280930:
wollman [Fri, 30 Oct 2015 19:26:55 +0000 (19:26 +0000)]
Long-overdue MFC of r280930:

  Fix overflow bugs in and remove obsolete limit from kernel RPC
  implementation.

  The kernel RPC code, which is responsible for the low-level scheduling
  of incoming NFS requests, contains a throttling mechanism that
  prevents too much kernel memory from being tied up by NFS requests
  that are being serviced.  When the throttle is engaged, the RPC layer
  stops servicing incoming NFS sockets, resulting ultimately in
  backpressure on the clients (if they're using TCP).  However, this is
  a very heavy-handed mechanism as it prevents all clients from making
  any requests, regardless of how heavy or light they are.  (Thus, when
  engaged, the throttle often prevents clients from even mounting the
  filesystem.)  The throttle mechanism applies specifically to requests
  that have been received by the RPC layer (from a TCP or UDP socket)
  and are queued waiting to be serviced by one of the nfsd threads; it
  does not limit the amount of backlog in the socket buffers.

  The original implementation limited the total bytes of queued requests
  to the minimum of a quarter of (nmbclusters * MCLBYTES) and 45 MiB.
  The former limit seems reasonable, since requests queued in the socket
  buffers and replies being constructed to the requests in progress will
  all require some amount of network memory, but the 45 MiB limit is
  plainly ridiculous for modern memory sizes: when running 256 service
  threads on a busy server, 45 MiB would result in just a single
  maximum-sized NFS3PROC_WRITE queued per thread before throttling.

  Removing this limit exposed integer-overflow bugs in the original
  computation, and related bugs in the routines that actually account
  for the amount of traffic enqueued for service threads.  The old
  implementation also attempted to reduce accounting overhead by
  batching updates until each queue is fully drained, but this is prone
  to livelock, resulting in repeated accumulate-throttle-drain cycles on
  a busy server.  Various data types are changed to long or unsigned
  long; explicit 64-bit types are not used due to the unavailability of
  64-bit atomics on many 32-bit platforms, but those platforms also
  cannot support nmbclusters large enough to cause overflow.

  This code (in a 10.1 kernel) is presently running on production NFS
  servers at CSAIL.

  Summary of this revision:
  * Removes 45 MiB limit on requests queued for nfsd service threads
  * Fixes integer-overflow and signedness bugs
  * Avoids unnecessary throttling by not deferring accounting for
    completed requests

Differential Revision: https://reviews.freebsd.org/D2165
Reviewed by: rmacklem, mav
Relnotes: yes
Sponsored by: MIT Computer Science & Artificial Intelligence Laboratory

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

8 years agoMFC r289824:
kib [Fri, 30 Oct 2015 10:02:57 +0000 (10:02 +0000)]
MFC r289824:
Add CLFLUSHOPT instruction wrappers.

MFC r290188:
Fix prefix on i386.

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

8 years agoMFC r289823:
kib [Fri, 30 Oct 2015 09:24:16 +0000 (09:24 +0000)]
MFC r289823:
Decode new values for CPUID leaf 2 cache and TLB descriptors, from the
Intel SDM revision 56.

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

8 years agoMFC r289819: Fix LUN disable in CAM broken at r285155.
mav [Fri, 30 Oct 2015 00:30:00 +0000 (00:30 +0000)]
MFC r289819: Fix LUN disable in CAM broken at r285155.

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

8 years agoMFC r287453,287454,288143:
delphij [Thu, 29 Oct 2015 17:51:48 +0000 (17:51 +0000)]
MFC r287453,287454,288143:

file 5.25.

Relnotes: yes

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

8 years agoMFC r289038,r289041:
delphij [Thu, 29 Oct 2015 17:00:51 +0000 (17:00 +0000)]
MFC r289038,r289041:

Add encoding for mime-types.

Fix short month names and replace %b with %_m in date_fmt for Chinese
locales.

When using a Chinese locale, such as zh_TW.UTF-8 or zh_CN.UTF-8,
nl_langinfo(ABMON_*) only returned numbers.  For instance,
nl_langinfo(ABMON_1) returns 1, nl_langinfo(ABMON_2) returns 2, and
so on.

This causes problems in applications that put the short month name
and the day of the month together.  For example, 'Apr 14' in English
becomes '414æ—¥' in Chinese on the top bar of GNOME Shell.

This problem may be resolved by appending '月' to all short month
names and replacing %b with %_m in date_fmt. ja_JP.UTF-8 already
does this, and this matches the en_US.ISO8859-1 behavior, which
returns 'Oct'.  The GNU C Library also returns values with '月'
appended.

PR: 199441
Submitted by: Ting-Wei Lan <lantw44 gmail com>

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

8 years agoMFC r288963:
delphij [Thu, 29 Oct 2015 16:53:34 +0000 (16:53 +0000)]
MFC r288963:

Now that we own the code, use arc4random(3) unconditionally
and remove the corresponding HAVE_ARC4RANDOM conditions.

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

8 years agoMFC r288960:
delphij [Thu, 29 Oct 2015 16:45:06 +0000 (16:45 +0000)]
MFC r288960:

Use strlcpy() when the string is expected to be nul-terminated.

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

8 years agoMFC r288959:
delphij [Thu, 29 Oct 2015 16:34:55 +0000 (16:34 +0000)]
MFC r288959:

Remove a few unused headers.

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

8 years agoMFC r290004: Don't try to replicate mode pages not present on this device.
mav [Thu, 29 Oct 2015 09:08:04 +0000 (09:08 +0000)]
MFC r290004: Don't try to replicate mode pages not present on this device.

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

8 years agoMFC r289293
hiren [Thu, 29 Oct 2015 00:36:10 +0000 (00:36 +0000)]
MFC r289293

Fix an unnecessarily aggressive behavior where mtu clamping begins on first
retransmission timeout (rto) when blackhole detection is enabled.  Make
sure it only happens when the second attempt to send the same segment also fails
with rto.

Also make sure that each mtu probing stage (usually 1448 -> 1188 -> 524) follows
the same pattern and gets 2 chances (rto) before further clamping down.

Note: RFC4821 doesn't specify implementation details on how this situation
should be handled.

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

8 years agoMFC 278582:
jhb [Thu, 29 Oct 2015 00:18:03 +0000 (00:18 +0000)]
MFC 278582:
MFi386:
When building some of the boot loaders with clang, and DEBUG_FLAGS or
CFLAGS having '-g' in it, clang outputs several assembly directives that
are too new for our version of binutils.

Therefore, assemble the resulting .s files with clang instead.  A more
general solution can be implemented when a GNU as-compatible driver for
clang's integrated assembler appears.

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

8 years agoMFC r262957, r267591, r289634:
gjb [Wed, 28 Oct 2015 13:30:14 +0000 (13:30 +0000)]
MFC r262957, r267591, r289634:

 r262957 (marcel):
  Change the terminal type/class for enabled serial lines to 3wire. This
  allows us to change the uart(4) driver to not hardcode specific line
  settings for the serial console.

  A terminal type of 3wire makes sure the console still works when no DCD
  signal is present, which preserves behviour. When it is known that the
  terminal server (or DCE in general) provides DCD, a terminal type/class
  of std can be used. This has the effect of being logged out when one
  disconnects from the console -- improving security overall.

 r267591 (grehan):
  Convert the potential console port over to using 3wire, for i386/amd64.

 r289634:
  Enable all callin ttys if the tty is an available console.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r289324:
kib [Wed, 28 Oct 2015 11:32:39 +0000 (11:32 +0000)]
MFC r289324:
Allow PT_NOTES segments to be located anywhere in the executable
image.

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

8 years agoMFC r289322:
kib [Wed, 28 Oct 2015 11:29:54 +0000 (11:29 +0000)]
MFC r289322:
Allow PT_INTERP and PT_NOTES segments to be located anywhere in the
executable image.

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

8 years agoMFC r284157 (by emaste):
kib [Wed, 28 Oct 2015 11:22:30 +0000 (11:22 +0000)]
MFC r284157 (by emaste):
Add user facing errors for exceeding process memory limits.

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

8 years agoMFC 283645:
jhb [Tue, 27 Oct 2015 22:57:58 +0000 (22:57 +0000)]
MFC 283645:
Similarly to other architecture, add the include for cpufunc.h which is
needed for pte.h by vmstat to resolve MIPS_CCA_UNCACHED.

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

8 years agoMFC r286163: rc.subr: Allow rc.conf.d with multi-directory local_startup.
jilles [Tue, 27 Oct 2015 20:58:14 +0000 (20:58 +0000)]
MFC r286163: rc.subr: Allow rc.conf.d with multi-directory local_startup.

I also changed ${...%*/rc.d} to ${...%/rc.d} since the shortest match always
has an empty string for the asterisk.

PR: 201641
Submitted by: Jamie Landeg-Jones (original version)

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

8 years agoMFC 271389,286330,286331,286358,286378,286380,286381,286383,286388,286848,
jhb [Tue, 27 Oct 2015 17:00:04 +0000 (17:00 +0000)]
MFC 271389,286330,286331,286358,286378,286380,286381,286383,286388,286848,
286849,286857,286860,286913,286914,286937-286940,286962,286963,288405,
288406,288424,288454-288456,288625,288626,288832,288834,288950,288997,
289080:
Merge most of the recent changes to truss in HEAD.  The largest effects
are that fork following now uses a single truss process (and thus truss -c
reports counts for the entire tree of processes instead of separate dumps
for each process).  truss -c also reports counts for all system calls
instead of only a subset.  More system call arguments are also decoded.
System calls should now report the correct number of arguments (instead
of 6), and some platforms that did not properly decode arguments might
now do so (e.g. mips64).

Changes relative to the equivalent commits to HEAD include:
- The ia64 backend was refactored similar to the other backends.
- _umtx_lock/_umtx_unlock entries were updated similar to other system
  call entries.
- 10 does not have futimens(), utimensat(), EVFILT_PROCDESC, EVFILT_SENDFILE,
  RLIMIT_KQUEUES, O_VERIFY, NOTE_FILE_POLL, or EV_FORCEONESHOT.

271389:
Stop accessing the saved stack pointer by looking past the end of the
array of registers.

286330:
Whitespace fix: remove some spurious spaces before commas.

286331:
Rework get_string() to make it more robust when fetching strings of unknown
length.  In particular, instead of blinding fetching 1k blocks, do an initial
fetch up to the end of the current page followed by page-sized fetches up to
the maximum size.  Previously if the 1k buffer crossed a page boundary and
the second page was not valid, the entire operation would fail.

286358:
Add recently added values of various flags and enumerations including
kevent filters, kevent flags, flags to mmap, seek locations, fcntl
operations, file flags, socket domains, open flags, resource limits, and
pathconf values.

286378:
Don't mark the fcntl flag argument as an output parameter so that it is
always decoded.  Previously the argument was not decoded if fcntl() failed.

286380:
Decode the arguments to mkfifo() and fix an off-by-one error in the arguments
to mknod().

286381:
Decode the arguments passed to the *at() family of system calls.  This is
especially useful now that libc's open() always calls openat().  While here,
fix a few other things:
- Decode the mode argument passed to access(), eaccess(), and faccessat().
- Decode the atfd paramete to pretty-print AT_FDCWD.
- Decode the special AT_* flags used with some of the *at() system calls.
- Decode arguments for fchmod(), lchmod(), fchown(), lchown(), eaccess(),
  and futimens().
- Decode both of the timeval structures passed to futimes() instead of just
  the first one.

286383:
Whitespace fixes to consistently use spaces before }'s and
wrap long lines.

286388:
Consistently use both leading and trailing spaces inside of the {}'s
when pretty-printing structures.  Most structures used both spaces,
but some only used a trailing space and some used neither.

286848:
- Decode the arguments for several signal-related system calls: sigpending,
  sigqueue, sigreturn, sigsuspend, sigtimedwait, sigwait, sigwaitinfo, and
  thr_kill.
- Print signal sets as a structure (with {}'s) and in particular use this to
  differentiate empty sets from a NULL pointer.
- Decode arguments for some other system calls: issetugid, pipe2, sysarch
  (operations are only decoded for amd64 and i386), and thr_self.

286849:
Decode the optional SOCK_NONBLOCK and SOCK_CLOEXEC flags passed in a
socket type.

286857:
Tidy the linux_socketcall decoding:
- Don't exit if get_struct() fails, instead print the raw pointer value to
  match all other argument decoding cases.
- Use an xlat table instead of a home-rolled switch for the operation name.
- Display the nested socketcall args structure as a structure instead of as
  two inline arguments.

286860:
Use an xlat table and xlookup() instead of a home-rolled version for the
sigprocmask operation type.

286913:
Change the argument formatting function to use a stdio FILE object opened
with open_memstream() to build the string for each argument.  This allows
for more complicated argument building without resorting to intermediate
malloc's, etc.

Related, the strsig*() functions no longer return allocated strings but
use a static global buffer instead.

286914:
Expand the decoding of kevent structures.
- Print the ident value as decimal instead of hexadecimal for filter types
  that use "small" values such as file descriptors and PIDs.
- Decode NOTE_* flags in the fflags field of kevents for several system
  filter types.

286937:
Use nitems().

286938:
Various style and whitespace fixes.

287939:
Always use %j with an intmax_t cast to print time_t values.  time_t is
longer than long on 32-bit platforms with a 64-bit time_t.

286940:
ino_t is unsigned, so use uintmax_t instead of intmax_t when printing it.

286962:
Rework the argv and env string fetching for execve to be more robust.
Before truss would fetch 100 string pointers and happily walk off the end
of the array if it never found a NULL.  This also means for a short argv
list it could fail entirely if the 100 string pointers spanned into an
unmapped page.

Instead, fetch page-aligned blocks of string pointers in a loop fetching
each string until a NULL is found.

While here, make use of the open memstream file descriptor instead of
allocating a temporary array.  This allows us to fetch each string once
instead of twice.

286963:
Handle the conditional decoding of execve() argument and environment
arrays generically rather than duplicating a hack in all of the backends.
- Add two new system call argument types and use them instead of StringArray
  for the argument and environment arguments execve and linux_execve.
- Honor the -a/-e flags in the handling of these new types.
- Instead of printing "<missing argument>" when the decoding is disabled,
  print the raw pointer value.

288405:
Decode recently added procctl(2) operations.

288406:
Trim trailing whitespace.

288424:
Several changes to truss.
- Refactor the interface between the ABI-independent code and the
  ABI-specific backends.  The backends now provide smaller hooks to
  fetch system call arguments and return values.  The rest of the
  system call entry and exit handling that was previously duplicated
  among all the backends has been moved to one place.
- Merge the loop when waiting for an event with the loop for handling stops.
  This also means not emulating a procfs-like interface on top of ptrace().
  Instead, use a single event loop that fetches process events via waitid().
  Among other things this allows us to report the full 32-bit exit value.
- Use PT_FOLLOW_FORK to follow new child processes instead of forking a new
  truss process for each new child.  This allows one truss process to monitor
  a tree of processes and truss -c should now display one total for the
  entire tree instead of separate summaries per process.
- Use the recently added fields to ptrace_lwpinfo to determine the current
  system call number and argument count.  The latter is especially useful
  and fixes a regression since the conversion from procfs.  truss now
  generally prints the correct number of arguments for most system calls
  rather than printing extra arguments for any call not listed in the
  table in syscalls.c.
- Actually check the new ABI when processes call exec.  The comments claimed
  that this happened but it was not being done (perhaps this was another
  regression in the conversion to ptrace()).  If the new ABI after exec
  is not supported, truss detaches from the process.  If truss does not
  support the ABI for a newly executed process the process is killed
  before it returns from exec.
- Along with the refactor, teach the various ABI-specific backends to
  fetch both return values, not just the first.  Use this to properly
  report the full 64-bit return value from lseek().  In addition, the
  handler for "pipe" now pulls the pair of descriptors out of the
  return values (which is the true kernel system call interface) but
  displays them as an argument (which matches the interface exported by
  libc).
- Each ABI handler adds entries to a linker set rather than requiring
  a statically defined table of handlers in main.c.
- The arm and mips system call fetching code was changed to follow the
  same pattern as amd64 (and the in-kernel handler) of fetching register
  arguments first and then reading any remaining arguments from the
  stack.  This should fix indirect system call arguments on at least
  arm.
- The mipsn32 and n64 ABIs will now look for arguments in A4 through A7.
- Use register %ebp for the 6th system call argument for Linux/i386 ABIs
  to match the in-kernel argument fetch code.
- For powerpc binaries on a powerpc64 system, fetch the extra arguments
  on the stack as 32-bit values that are then copied into the 64-bit
  argument array instead of reading the 32-bit values directly into the
  64-bit array.

288454:
- Remove extra integer argument from truncate() and ftruncate().  This is
  probably fallout from the removal of the extra padding argument before
  off_t in 7.  However, that padding still exists for 32-bit powerpc, so
  use QUAD_ALIGN.
- Fix QUAD_ALIGN to be zero for powerpc64.  It should only be set to 1
  for 32-bit platforms that add padding to align 64-bit arguments.

288455:
The id_t type used to pass IDs to wait6(2) and procctl(6) is a 64-bit
integer.  Fix the argument decoding to treat this as a quad instead of an
int.  This includes using QUAD_ALIGN and QUAD_SLOTS as necessary.  To
continue printing IDs in decimal, add a new QuadHex argument type that
prints a 64-bit integer in hex, use QuadHex for the existing off_t arguments,
repurpose Quad to print a 64-bit integer in decimal, and use Quad for id_t
arguments.

This fixes the decoding of wait6(2) and procctl(2) on 32-bit platforms.

288456:
Rather than groveling around in a socket address structure for a socket
address's length (and then overriding it if it "looks wrong"), use the
next argument to the system call to determine the length.  This is more
reliable since this is what the kernel depends on anyway and is also
simpler.

288625:
Add decoding for struct statfs.

288626:
Style fix.

288832:
Fix tracking of unknown syscalls for 'truss -c'.

This is done by changing get_syscall() to either lookup the known syscall
or add it into the list with the default handlers for printing.

This also simplifies some code to not have to check if the syscall variable
is set or NULL.

288834:
Add decoding for modfind(2)

288950:
Group the decoded system calls by ABI and sort the calls within each ABI.

288997:
Correct a comment.

289080:
Let -c imply -S (hide signal output).

Without this, the signals are shown seemingly randomly in the output before
the final summary is shown.  This is especially noticeable when there is
not much output from the application being traced.

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

8 years agoMFC: r289878
bapt [Tue, 27 Oct 2015 07:08:47 +0000 (07:08 +0000)]
MFC: r289878

timeout(1): fix the acceptable range values for parse_signal()

Before both 0 and sys_nsig would be successfully returned by parse_signal()
although being invalid signal numbers.

Submitted by: Alexandre Perrin <alex@kaworu.ch>

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

8 years agoFix indentation in etc/rc.d/fsck.
vangyzen [Tue, 27 Oct 2015 02:52:05 +0000 (02:52 +0000)]
Fix indentation in etc/rc.d/fsck.

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

8 years agoRevert the merge of r289269 for now as it may break non-root installs.
delphij [Tue, 27 Oct 2015 01:28:11 +0000 (01:28 +0000)]
Revert the merge of r289269 for now as it may break non-root installs.

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

8 years agoMFC r289269:
delphij [Tue, 27 Oct 2015 00:37:19 +0000 (00:37 +0000)]
MFC r289269:

Use chroot(2) instead of using prefixes for files.

Previously, the code prefixes the chroot path to actual file paths to
simulate the effect.  This, however, will not work for tzset(3) which
expects the current system have a working set of timezone data files,
and that is not always the case.

This changeset simplifies the handling of paths and use an actual
chroot(2) call to implement the effect.

PR: bin/197313

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

8 years agoMFC r289407:
bdrewery [Mon, 26 Oct 2015 17:49:13 +0000 (17:49 +0000)]
MFC r289407:

  Fix delete-old and check-old-files not removing old debug symbols.

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

8 years agoMFC: r288419
brueffer [Mon, 26 Oct 2015 17:45:37 +0000 (17:45 +0000)]
MFC: r288419

Join excessive split lines.

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

8 years agoDisable SSE in libthr
vangyzen [Mon, 26 Oct 2015 16:21:56 +0000 (16:21 +0000)]
Disable SSE in libthr

Clang emits SSE instructions on amd64 in the common path of
pthread_mutex_unlock.  If the thread does not otherwise use SSE,
this usage incurs a context-switch of the FPU/SSE state, which
reduces the performance of multiple real-world applications by a
non-trivial amount (3-5% in one application).

Instead of this change, I experimented with eagerly switching the
FPU state at context-switch time.  This did not help.  Most of the
cost seems to be in the read/write of memory--as kib@ stated--and
not in the #NM handling.  I tested on machines with and without
XSAVEOPT.

One counter-argument to this change is that most applications already
use SIMD, and the number of applications and amount of SIMD usage
are only increasing.  This is absolutely true.  I agree that--in
general and in principle--this change is in the wrong direction.
However, there are applications that do not use enough SSE to offset
the extra context-switch cost.  SSE does not provide a clear benefit
in the current libthr code with the current compiler, but it does
provide a clear loss in some cases.  Therefore, disabling SSE in
libthr is a non-loss for most, and a gain for some.

I refrained from disabling SSE in libc--as was suggested--because
I can't make the above argument for libc.  It provides a wide variety
of code; each case should be analyzed separately.

https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055193.html

Suggestions from:   dim, jmg, rpaulo
Sponsored by:   Dell Inc.

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

8 years agoMFH (r275359, r290007): make load_rc_config's name argument optional
des [Mon, 26 Oct 2015 15:20:45 +0000 (15:20 +0000)]
MFH (r275359, r290007): make load_rc_config's name argument optional

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

8 years agoUpgrade NTP to 4.2.8p4.
glebius [Mon, 26 Oct 2015 11:35:40 +0000 (11:35 +0000)]
Upgrade NTP to 4.2.8p4.

Security: FreeBSD-SA-15:25.ntp
Security: CVE-2015-7871
Security: CVE-2015-7855
Security: CVE-2015-7854
Security: CVE-2015-7853
Security: CVE-2015-7852
Security: CVE-2015-7851
Security: CVE-2015-7850
Security: CVE-2015-7849
Security: CVE-2015-7848
Security: CVE-2015-7701
Security: CVE-2015-7703
Security: CVE-2015-7704, CVE-2015-7705
Security: CVE-2015-7691, CVE-2015-7692, CVE-2015-7702

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

8 years agoMFC r289601:
ngie [Mon, 26 Oct 2015 03:53:48 +0000 (03:53 +0000)]
MFC r289601:

Don't check if `val` is NULL before calling free; free(3) already
handles this

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

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

8 years agoMFC r288305:
ngie [Mon, 26 Oct 2015 03:43:28 +0000 (03:43 +0000)]
MFC r288305:

Replace N #defines with nitems to simplify ifconfig code slightly

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

8 years agoMFC r289300:
ngie [Mon, 26 Oct 2015 03:37:01 +0000 (03:37 +0000)]
MFC r289300:

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

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r264965:
ngie [Mon, 26 Oct 2015 03:33:40 +0000 (03:33 +0000)]
MFC r264965:
r264965 (by des):

Note that the bug was fixed, and when.

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

8 years agoMFC r282339,r282341:
ngie [Mon, 26 Oct 2015 03:15:06 +0000 (03:15 +0000)]
MFC r282339,r282341:

r282339 (by bapt):

Add regression test about reverse line feed to col(1)

r282341 (by bapt):

Actually push the right tests

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

8 years agoMFC r289600:
ngie [Mon, 26 Oct 2015 00:28:05 +0000 (00:28 +0000)]
MFC r289600:

Initialize `quiet` to false so `pw groupnext` again prints out the next gid
by default

Reported by: Florian Degner <f.degner@gmx.de>
PR: 203876
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r288304:
ngie [Mon, 26 Oct 2015 00:13:49 +0000 (00:13 +0000)]
MFC r288304:

Enable parallel subdirectory building with sys/modules/netgraph

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

8 years agoMFC r289451:
ngie [Mon, 26 Oct 2015 00:11:07 +0000 (00:11 +0000)]
MFC r289451:

Install share/zoneinfo in a deterministic way by sorting the results from find

This helps produce deterministic METALOG output

PR: 200674
Submitted by: Fabian Keil <fk@fabiankeil.de>
Reviewed by: emaste
Obtained from: ElectroBSD

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

8 years agoMFC r289450:
ngie [Mon, 26 Oct 2015 00:08:40 +0000 (00:08 +0000)]
MFC r289450:

Set dev->fd to -1 when calling cam_close_spec_device with a valid dev->fd
descriptor to avoid trashing valid file descriptors that access dev->fd at a
later point in time

PR: 192671
Submitted by: Scott Ferris <scott.ferris@isilon.com>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r289332:
ngie [Mon, 26 Oct 2015 00:06:04 +0000 (00:06 +0000)]
MFC r289332:

Fix test-fenv:test_dfl_env when run on some amd64 CPUs

Compare the fields that the AMD [1] and Intel [2] specs say will be
set once fnstenv returns.

Not all amd64 capable processors zero out the env.__x87.__other field
(example: AMD Opteron 6308). The AMD64/x64 specs aren't explicit on what the
env.__x87.__other field will contain after fnstenv is executed, so the values
in env.__x87.__other could be filled with arbitrary data depending on how the
CPU-specific implementation of fnstenv.

1. http://support.amd.com/TechDocs/26569_APM_v5.pdf
2. http://www.intel.com/Assets/en_US/PDF/manual/253666.pdf

Discussed with: kib, Anton Rang <anton.rang@isilon.com>
Reviewed by: Daniel O'Connor <darius@dons.net.au> (earlier patch; pre-generalization)
Sponsored by: EMC / Isilon Storage Division
Reported by: Bill Morchin <wmorchin@isilon.com>

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

8 years agoMFC r289488:
ngie [Mon, 26 Oct 2015 00:05:02 +0000 (00:05 +0000)]
MFC r289488:

Clean up trailing whitespace

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

8 years agoMFC r288330,r288423,r288678,r288905,r288906,r288907,r289102:
ngie [Sun, 25 Oct 2015 23:03:04 +0000 (23:03 +0000)]
MFC r288330,r288423,r288678,r288905,r288906,r288907,r289102:

r288330:

Add initial testcases for bin/ls

Sponsored by: EMC / Isilon Storage Division

r288423:

Skip the B_flag testcase to stop blowing up freebsd-current@ with
"test failure emails" because kyua report-jenkins doesn't properly
escape non-printable chars

r288678:

Merge additional testcases and improvements to bin/ls/ls_tests from
^/user/ngie/more-tests.

- Additional testcases added:
-- ls -D
-- ls -F
-- ls -H
-- ls -L
-- ls -R
-- ls -S
-- ls -T
-- ls -b
-- ls -d
-- ls -f
-- ls -g
-- ls -h
-- ls -i
-- ls -k
-- ls -l
-- ls -m
-- ls -n
-- ls -o
-- ls -p
-- ls -q/ls -w
-- ls -r
-- ls -s
-- ls -t
-- ls -u
-- ls -y
- Socket file creation is limited to the ls -F testcase, greatly speeding up
  the test process
- The ls -C testcase was made more robust by limiting the number of columns
  via COLUMNS and by dynamically formulating the columns/lines.
- Add `atf_test_case` before all testcase `head` functions.

Sponsored by: EMC / Isilon Storage Division

r288905:

Add some more syncs to quiesce the filesystem after creating the
files to see if this fixes deterministic Jenkin failures

r288906:

Explicitly set BLOCKSIZE to 512 in the environment

r288907:

Call sync consistently using atf_check

Remove superfluous sync's

r289102:

Remove all of the syncs

They're unnecessary as shown by further testing on my VM

Requested by: jhb

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