]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/log
FreeBSD/stable/9.git
8 years agoMerge OpenSSL 0.9.8zh.
jkim [Thu, 3 Dec 2015 21:24:40 +0000 (21:24 +0000)]
Merge OpenSSL 0.9.8zh.

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

8 years agoMFC: r291035
rmacklem [Wed, 2 Dec 2015 21:56:01 +0000 (21:56 +0000)]
MFC: r291035
The problem report was for a crash that happened when smbfs was
trying to do a mount. Given the backtrace,
it appears that the crash occurred when smb_vc_create() failed and then
called smb_vc_put() with vcp->vc_iod == NULL. smb_vc_put() subsequently
called smb_vc_disconnect() with vcp->vc_iod == NULL, causing the crash.
This patch adds a check for vcp->vc_iod != NULL in smb_vc_disconnect() to
avoid the crash. It also fixes the case in smb_vc_create() where
kproc_create() fails so that it destroys the mutexes and sets
vcp->vc_iod == NULL before free()'ing the iod structure.

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

8 years agoUpdate addresses for H root.
erwin [Wed, 2 Dec 2015 11:11:58 +0000 (11:11 +0000)]
Update addresses for H root.

Sponsored by: DK Hostmaster A/S

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

8 years agoMFstable/10 r291572:
ngie [Tue, 1 Dec 2015 07:33:30 +0000 (07:33 +0000)]
MFstable/10 r291572:

MFC r269326:
r269326 (by n_hibma):

Fix the example: free the memory that was allocated by getline().

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

8 years agoMFstable/10 r291336:
ngie [Tue, 1 Dec 2015 06:51:59 +0000 (06:51 +0000)]
MFstable/10 r291336:

MFC r288006,r288031,r288032,r288033:

r288006 (by rodrigc):

Add declarations to eliminate -Wmissing-prototypes warnings

r288031 (by rodrigc):

Remove names from some prototypes

r288032 (by rodrigc):

Remove names from some prototypes

r288033 (by rodrigc):

Use ANSI C prototypes.  Eliminates -Wold-style-definition warnings.

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

8 years agoMFC: r290970
rmacklem [Tue, 1 Dec 2015 02:35:12 +0000 (02:35 +0000)]
MFC: r290970
mnt_stat.f_iosize (which is used to set bo_bsize) must be set to
the largest size of buffer cache block or the mapping of the buffer
is bogus. When a mount with rsize=4096,wsize=4096 was done, f_iosize
would be set to 4096. This resulted in corrupted directory data, since
the buffer cache block size for directories is NFS_DIRBLKSIZ (8192).
This patch fixes the code so that it always sets f_iosize to at least
NFS_DIRBLKSIZ.

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

8 years agoMFC: r290959
rmacklem [Mon, 30 Nov 2015 14:35:35 +0000 (14:35 +0000)]
MFC: r290959
When the smbfs iod thread (smb_iod_thread()) is shutting down, smb_iod_destroy()
would call smb_iod_request(). This call could return as soon as the
wakeup(evp) in smb_iod_main() call is done and then could destroy
the mutexes. This caused a race with the rest of smb_iod_main()s
use of these mutexes.
A crash reported on freebsd-stable@ by Christian Kratzer was
diagnosed as a use of one of these mutexes after it was destroyed.
This patch moves destruction of the mutexes from smb_iod_destroy()
to the end of smb_iod_thread(), so that they aren't destroyed before
the thread is done with them. Christian comfirmed that the patch
stopped the crashes from happening.

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

8 years agoMFC r283679
arybchik [Mon, 30 Nov 2015 13:20:49 +0000 (13:20 +0000)]
MFC r283679

sfxge: do not use DEBUG_FLAGS to enable extra debug checks

DEBUG_FLAGS are set to DEBUG option value when kernel is built.
For example, it is -g in GENERIC config to have debug symbols.
Also DEBUG_FLAGS are used to determine if ctfconvert should keep
debug symbols.
Since we redefined DEBUG_FLAGS, debug symbols were always missing.
ctfconvert complains about it during kernel build.
It is incorrect to append DEBUG_FLAGS, since if DEBUG has no -g (or
similar), we'll have no debug symbols and ctfconvert will complain.
If it incorrect to always have -g in our DEBUG_FLAGS, since debug
symbols presence should be controllable by kernel config.
So, just add disabled by default addition of -DDEBUG=1 to CFLAGS.

PR:             163775
Sponsored by:   Solarflare Communications, Inc.

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

8 years agoMFC r290855: Increase reset assertion time from 10 to 100us.
mav [Sun, 29 Nov 2015 17:14:46 +0000 (17:14 +0000)]
MFC r290855: Increase reset assertion time from 10 to 100us.

On my own tests I see no effect from this change, but I also can't
reproduce the reported problem in general.

PR:             127391
PR:             204554
Submitted by:   satz@iranger.com

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

8 years agoMFC r291061: Improve locking of sg_threadcount.
mav [Fri, 27 Nov 2015 14:40:59 +0000 (14:40 +0000)]
MFC r291061: Improve locking of sg_threadcount.

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

8 years agoMFstable/10 r291294:
ngie [Wed, 25 Nov 2015 09:19:32 +0000 (09:19 +0000)]
MFstable/10 r291294:

MFC r258245:
r258245 (by eadler):

Add missing include files for the printf_l and scanf_l man pages.

Reported by: swildner@dragonflybsd.org

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

8 years agoMFC r291146:
hselasky [Tue, 24 Nov 2015 12:30:21 +0000 (12:30 +0000)]
MFC r291146:
Add support for Kana and Eisu keys to the USB keyboard driver.

PR: 204709

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

8 years agoMFC r290326:
hselasky [Tue, 24 Nov 2015 12:19:20 +0000 (12:19 +0000)]
MFC r290326:
Relax the BUS_DMA_KEEP_PG_OFFSET requirement to allow optimising
allocation of DMA bounce buffers.

Discussed with: ian @

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

8 years agoMFC r277974:
hselasky [Mon, 23 Nov 2015 13:48:28 +0000 (13:48 +0000)]
MFC r277974:
Fix a bunch of -Wcast-qual warnings in sys/dev/usb/input/uhid.c, by
using __DECONST.  No functional change.

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

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

8 years agoMFC r284722 and r284724:
hselasky [Mon, 23 Nov 2015 13:38:46 +0000 (13:38 +0000)]
MFC r284722 and r284724:
Fix endless recursion in ti(4)'s ti_ifmedia_upd(), found by clang 3.7.0.

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

8 years agoMFstable/10 r291185:
ngie [Mon, 23 Nov 2015 09:36:25 +0000 (09:36 +0000)]
MFstable/10 r291185:

MFC r291047:

Don't leak work if __mlx4_register_vlan(..) fails in
mlx4_master_immediate_activate_vlan_qos(..)

Differential Revision: https://reviews.freebsd.org/D4203
Submitted by: Miles Olrich <miles.olrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC 290416:
jhb [Thu, 19 Nov 2015 19:40:30 +0000 (19:40 +0000)]
MFC 290416:
Chelsio T5 chips do not properly echo the No Snoop and Relaxed Ordering
attributes when replying to a TLP from a Root Port.  As a workaround,
disable No Snoop and Relaxed Ordering in the Root Port of each T5 adapter
during attach so that CPU-initiated requests do not contain these flags.

Note that this affects CPU-initiated requests to all devices under this
root port.

Sponsored by: Chelsio

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

8 years agoMFC r290639:
hselasky [Thu, 19 Nov 2015 10:01:50 +0000 (10:01 +0000)]
MFC r290639:
Update the wsp driver to support newer touch pads, like found in
MacBookPro11,4 and MacBook12,1. This update adds support for the
force touch parameter.

PR: 204420

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

8 years agoMFC r290489:
hselasky [Thu, 19 Nov 2015 09:54:28 +0000 (09:54 +0000)]
MFC r290489:
Add helper function to check if a USB page cache buffer is properly
aligned to reduce the use of bounce buffers in PIO mode.

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

8 years agoMFstable/10 r290899:
ngie [Thu, 19 Nov 2015 03:53:31 +0000 (03:53 +0000)]
MFstable/10 r290899:

MFC r290253:

Remove unnecessary `if (x)` tests before calling `free(x)`; free(3)
already employs this check

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r291042:
ngie [Thu, 19 Nov 2015 00:19:09 +0000 (00:19 +0000)]
MFstable/10 r291042:

MFC r290645:

Fix some trivial warnings with bootparamd/main.c

- Convert K&R to something a bit less ancient
- Remove an incorrect, duplicate prototype for bootparamprog_1(..)

PR: 71667
Submitted by: bcran
Sponsored by: EMC / Isilon Storage Division

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

8 years agoDocument EN-15:19.kqueue, EN-15:20.vm, SA-15:25.ntp
gjb [Tue, 17 Nov 2015 18:22:56 +0000 (18:22 +0000)]
Document EN-15:19.kqueue, EN-15:20.vm, SA-15:25.ntp

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r290452: zfsboottest: catch up with r241289, call zfs_spa_init() for
avg [Tue, 17 Nov 2015 15:18:59 +0000 (15:18 +0000)]
MFC r290452: zfsboottest: catch up with r241289, call zfs_spa_init() for
all found pools

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

8 years agoMFC r290451: zfsboottest: build as a 32 bit application
avg [Tue, 17 Nov 2015 15:14:16 +0000 (15:14 +0000)]
MFC r290451: zfsboottest: build as a 32 bit application

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

8 years agoMFC r290191: l2arc: do not call trim_map_free() for blocks with zero b_asize
avg [Tue, 17 Nov 2015 15:10:24 +0000 (15:10 +0000)]
MFC r290191: l2arc: do not call trim_map_free() for blocks with zero b_asize

The code in this branch has become quite outdated, so the change had to be
applied by hand.

PR: 203473

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

8 years agoMFstable/10 r290890:
ngie [Sun, 15 Nov 2015 21:58:04 +0000 (21:58 +0000)]
MFstable/10 r290890:

MFC r283245:

r283245 (by imp):

Remove stray DEBUG_FLAGS=-g that snuck in with r184761.

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

8 years agoMFstable/10 r290882,r290884,r290885:
ngie [Sun, 15 Nov 2015 21:44:10 +0000 (21:44 +0000)]
MFstable/10 r290882,r290884,r290885:

r290882:

MFC r290260,r290262:

r290260:

Document undocumented long options for -t cd9660

Note which options have been implemented and which options haven't
been implemented

Submitted as the following NetBSD PRs: bin/50390 and bin/50392

Sponsored by: EMC / Isilon Storage Division

r290262:

Fix spelling of `isolevel` cd9660 option

Sponsored by: EMC / Isilon Storage Division

r290884:

MFC r290259,r290601:

r290259:

Sync makefs(8) content a bit with src/usr.sbin/makefs/makefs.8@1.53

Sections involving unimplemented filesystems (chfs, msdosfs, udf, v7fs) and
options have been omitted.

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

r290601:

Follow up to r290259 dealing with makefs(8)

- Don't use contractions (don't -> do not)
- Change "throw away" to "discard" when describing the -o keep-bad-images option
- Revert author e-mail split I brought over from NetBSD, effectively reverting
  the change bapt made in r267668

Submitted by: bjk
Sponsored by: EMC / Isilon Storage Division

r290885:

Bump .Dd

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

8 years agoMFstable/10 r249373:
ngie [Sun, 15 Nov 2015 21:41:51 +0000 (21:41 +0000)]
MFstable/10 r249373:

r249373 (by joel):

Remove contractions.

Command used:
$ svn merge --accept mine-full -c r249373 ^/stable/10

Conflicts:
share/man/man9/locking.9
share/man/man9/zone.9
usr.bin/patch

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

8 years agoMFstable/10 r231564:
ngie [Sun, 15 Nov 2015 21:27:50 +0000 (21:27 +0000)]
MFstable/10 r231564:
r231564 (by ed):

Globally replace u_int*_t from (non-contributed) man pages.

The reasoning behind this, is that if we are consistent in our
documentation about the uint*_t stuff, people will be less tempted to
write new code that uses the non-standard types.

I am not going to bump the man page dates, as these changes can be
considered style nits. The meaning of the man pages is unaffected.

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

8 years agoMFstable/10 r233422:
ngie [Sun, 15 Nov 2015 21:16:13 +0000 (21:16 +0000)]
MFstable/10 r233422:

r233422 (by joel):

Remove superfluous paragraph macro.

Command used:
$ svn merge --accept mine-conflict -c 233422 ^/stable/10

Conflicts:
share/man/man4/netmap.4
share/man/man9/locking.9 (

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

8 years agoMFstable/10 r290879:
ngie [Sun, 15 Nov 2015 20:25:26 +0000 (20:25 +0000)]
MFstable/10 r290879:

MFC r290659,r290660:

r290659:

- Move ng_bluetooth.4 under MK_BLUETOOTH != no
- Move all section 5 bluetooth manpages under MK_BLUETOOTH != no

PR: 193260
Reported by: Philippe Michel <philippe.michel7@sfr.fr>
Sponsored by: EMC / Isilon Storage Division

r290660:

Move the MK_BLUETOOTH block down below the architecture specific sections by the
other generic options

PR: 193260
Sponsored by: EMC / Isilon Storage Divisions

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

8 years agoMFstable/10 r290877:
ngie [Sun, 15 Nov 2015 20:20:03 +0000 (20:20 +0000)]
MFstable/10 r290877:

MFC r289896:

Make vers.c creation atomic by using a temporary file, then moving
the temporary file to vers.c at the end of the script

The previous logic wrote out to vers.c multiple times, so the file
could be incorrectly interpreted as being completely written out
after one of the echo calls with recursive make, when in reality it
was only partially written.

Also, in the event the build was interrupted when creating vers.c
(small race window), it would have a leftover file that needed to
be cleaned up before resuming the build.

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFC r290428:
bdrewery [Sat, 14 Nov 2015 17:32:38 +0000 (17:32 +0000)]
MFC r290428:

  remove \, it confuses things.

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

8 years agoMFC 290414,290415:
jhb [Sat, 14 Nov 2015 01:06:45 +0000 (01:06 +0000)]
MFC 290414,290415:
Additional PCI helper functions.

290414:
Add helper routines for PCI device drivers to read, write, and modify
PCI-Express capability registers (that is, PCI config registers in the
standard PCI config space belonging to the PCI-Express capability
register set).

Note that all of the current PCI-e registers are either 16 or 32-bits,
so only widths of 2 or 4 bytes are supported.

290415:
Add a new helper function for PCI devices to locate the upstream
PCI-express root port of a given PCI device.

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

8 years agoMFC 232472 (partial):
jhb [Sat, 14 Nov 2015 00:04:42 +0000 (00:04 +0000)]
MFC 232472 (partial):
Cache the starting location of the PCI-express capability for PCI-express
devices in PCI device ivars.

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

8 years agoMFC 290412:
jhb [Fri, 13 Nov 2015 22:33:51 +0000 (22:33 +0000)]
MFC 290412:
Note if relaxed ordering or no snoop is enabled for each PCI-express device.

git-svn-id: svn://svn.freebsd.org/base/stable/9@290804 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/9@290734 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoFix i386 build. stable/9 does not have XSAVE support.
jhb [Fri, 13 Nov 2015 00:47:44 +0000 (00:47 +0000)]
Fix i386 build.  stable/9 does not have XSAVE support.

Pointy hat to: jhb

git-svn-id: svn://svn.freebsd.org/base/stable/9@290733 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/9@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/9@290730 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC of 290697,tzdata9:
edwin [Thu, 12 Nov 2015 03:28:32 +0000 (03:28 +0000)]
MFC of 290697,tzdata9:

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/9@290699 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/9@290668 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r290441:
hselasky [Mon, 9 Nov 2015 11:27:31 +0000 (11:27 +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/9@290608 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290599:
ngie [Mon, 9 Nov 2015 09:29:38 +0000 (09:29 +0000)]
MFstable/10 r290599:

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/9@290600 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290597:
ngie [Mon, 9 Nov 2015 09:24:28 +0000 (09:24 +0000)]
MFstable/10 r290597:

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/9@290598 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290595:
ngie [Mon, 9 Nov 2015 09:23:13 +0000 (09:23 +0000)]
MFstable/10 r290595:

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/9@290596 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290591:
ngie [Mon, 9 Nov 2015 09:05:09 +0000 (09:05 +0000)]
MFstable/10 r290591:

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/9@290593 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290589:
ngie [Mon, 9 Nov 2015 09:02:30 +0000 (09:02 +0000)]
MFstable/10 r290589:

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/9@290590 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290587:
ngie [Mon, 9 Nov 2015 08:05:15 +0000 (08:05 +0000)]
MFstable/10 r290587:

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/9@290588 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290582:
ngie [Mon, 9 Nov 2015 07:36:55 +0000 (07:36 +0000)]
MFstable/10 r290582:

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/9@290583 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290580:
ngie [Mon, 9 Nov 2015 07:28:17 +0000 (07:28 +0000)]
MFstable/10 r290580:

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/9@290581 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290576:
ngie [Mon, 9 Nov 2015 07:10:32 +0000 (07:10 +0000)]
MFstable/10 r290576:

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/9@290577 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r290385:
ngie [Sun, 8 Nov 2015 00:50:46 +0000 (00:50 +0000)]
MFstable/10 r290385:

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/9@290527 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/9@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/9@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/9@290454 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/9@290413 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r285914, r289029, r289030 and r289560:
hselasky [Tue, 3 Nov 2015 10:32:27 +0000 (10:32 +0000)]
MFC r285914, r289029, r289030 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/9@290333 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r290163: Ignore per-mdN settings in mdconfig[2] startup
dteske [Mon, 2 Nov 2015 21:30:52 +0000 (21:30 +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/9@290278 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/9@290274 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoRestore RAWDCF support, that was lost during 4.2.8p4 upgrade.
glebius [Mon, 2 Nov 2015 10:39:26 +0000 (10:39 +0000)]
Restore RAWDCF support, that was lost during 4.2.8p4 upgrade.

PR: 204203

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

8 years agoMFstable/10 r290246:
ngie [Sun, 1 Nov 2015 22:30:23 +0000 (22:30 +0000)]
MFstable/10 r290246:

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/9@290247 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFC r287591 by kib:
glebius [Fri, 30 Oct 2015 13:05:39 +0000 (13:05 +0000)]
MFC r287591 by kib:
There is no reason in the current kernel to disallow write access to
the COW wired entry if the entry permissions allow it.  Remove the check.

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

8 years agoMFC r289038,r289041:
delphij [Thu, 29 Oct 2015 17:04:43 +0000 (17:04 +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/9@290151 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoLink ntpdc with pthread.
glebius [Tue, 27 Oct 2015 12:42:27 +0000 (12:42 +0000)]
Link ntpdc with pthread.

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

8 years agoLink ntpq with pthread.
glebius [Tue, 27 Oct 2015 12:03:14 +0000 (12:03 +0000)]
Link ntpq with pthread.

PR: 204046
Submitted by: truckman

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

8 years agoMFC r250667:
ngie [Tue, 27 Oct 2015 07:23:40 +0000 (07:23 +0000)]
MFC r250667:
r250667 (by jh):

Rename O_DIRECTORY to O_TMP_DIRECTORY to avoid shadowing the fcntl.h
O_DIRECTORY flag.

PR: bin/173924
Obtained from: git://repo.or.cz/nvi.git

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

8 years agoMFC r289186: Fix indentation in etc/rc.d/fsck.
vangyzen [Tue, 27 Oct 2015 03:02:48 +0000 (03:02 +0000)]
MFC r289186: Fix indentation in etc/rc.d/fsck.

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

8 years agoUpgrade NTP to 4.2.8p4.
glebius [Mon, 26 Oct 2015 11:36:40 +0000 (11:36 +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/9@289998 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r286636:
ngie [Mon, 26 Oct 2015 07:19:03 +0000 (07:19 +0000)]
MFstable/10 r286636:
r286636 (by garga):

MFC 256710:

Add lot of missed files and dirs

Approved by: loos
Sponsored by: Netgate

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

8 years agoMFstable/10 r289989:
ngie [Mon, 26 Oct 2015 03:55:13 +0000 (03:55 +0000)]
MFstable/10 r289989:

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/9@289990 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r289986:
ngie [Mon, 26 Oct 2015 03:48:14 +0000 (03:48 +0000)]
MFstable/10 r289986:

MFC r288305:

Replace N #defines with nitems to simplify ifconfig code slightly

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

8 years agoMFstable/10 r289976:
ngie [Mon, 26 Oct 2015 00:15:02 +0000 (00:15 +0000)]
MFstable/10 r289976:

MFC r288304:

Enable parallel subdirectory building with sys/modules/netgraph

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

8 years agoMFstable/10 r289974:
ngie [Mon, 26 Oct 2015 00:12:00 +0000 (00:12 +0000)]
MFstable/10 r289974:

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/9@289975 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r289972:
ngie [Mon, 26 Oct 2015 00:09:30 +0000 (00:09 +0000)]
MFstable/10 r289972:

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/9@289973 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r289970:
ngie [Mon, 26 Oct 2015 00:07:11 +0000 (00:07 +0000)]
MFstable/10 r289970:

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/9@289971 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f

8 years agoMFstable/10 r276311:
ngie [Sun, 25 Oct 2015 23:59:41 +0000 (23:59 +0000)]
MFstable/10 r276311:

MFC r275867:

  Fix sporadic build failures due to race when running make installworld
  when strip gets replaced at install time by adding it to ITOOLS for the
  default usr.bin/xinstall STRIP_CMD

  This will fix the failure noted in this Jenkins build step:
  https://jenkins.freebsd.org/job/Build-UFS-image/688/

  This will also fix the issue reported by alfred@ dealing with installing on
  targets that differ from build hosts (e.g. installing on i386/i386 when built
  on amd64/amd64)

  Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r289963:
ngie [Sun, 25 Oct 2015 22:57:05 +0000 (22:57 +0000)]
MFstable/10 r289963:

MFC r288295,r288298:

r288295:

Posthumously remove all references to MFREE(9)

The macro was removed in r90227

Sponsored by: EMC / Isilon Storage Division

r288298:

Remove MLINKS to more non-existent mbuf(9) macros

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r289956:
ngie [Sun, 25 Oct 2015 22:35:43 +0000 (22:35 +0000)]
MFstable/10 r289956:

MFC r283144:

Articulate dependencies for cddl/lib/libdtrace and cddl/lib/libzfs

Parallelize the build in this subdirectory

Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r289954:
ngie [Sun, 25 Oct 2015 22:33:04 +0000 (22:33 +0000)]
MFstable/10 r289954:

MFC r282072,r283018:

r282072:

- Fix compilation (MAP_INHERIT's dead)
- Fix warnings
- Use mkstemp instead of tmpnam

r283018:

Fix more warnings related to missing headers

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

8 years agoMFstable/10 r289949:
ngie [Sun, 25 Oct 2015 22:19:11 +0000 (22:19 +0000)]
MFstable/10 r289949:

MFC r286304:

Set f_file to -1/F_UNUSED when after closing when possible

This will help ensure we don't trash file descriptors that get used later on
in the daemon

Found via internal Coverity scan

Discussed with: cem, ed, markj
Differential Revision: https://reviews.freebsd.org/D3081
Submitted by: Miles Ohlrich <miles.ohlrich@isilon.com>
Sponsored by: EMC / Isilon Storage Division

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

8 years agoMFstable/10 r286637 (made some minor adjustments due to other commits not MFCed):
ngie [Sun, 25 Oct 2015 22:05:26 +0000 (22:05 +0000)]
MFstable/10 r286637 (made some minor adjustments due to other commits not MFCed):

r286637 (by garga):

MFC r257077:

Cleanup empty directories

PR: 167133
Approved by: loos
Sponsored by: Netgate

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

8 years agoMFC r243617 (to fix a longstanding bug):
ngie [Sun, 25 Oct 2015 21:48:45 +0000 (21:48 +0000)]
MFC r243617 (to fix a longstanding bug):

PR: 171779

r243617 (by pjd):

Respect NO_FSCHG and don't set 'schg' flag on passwd/yppasswd is defined.

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

8 years agoPartial MFC r253719: add flsll to libkern
avg [Fri, 23 Oct 2015 15:14:37 +0000 (15:14 +0000)]
Partial MFC r253719: add flsll to libkern

Original commit description:
  Fix watchdog pretimeout.
  ...

Only flsll bits of that commit are needed.
This should fix the build broken in r289820 for !amd64.

Pointyhat to: avg

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

8 years agoMFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
avg [Fri, 23 Oct 2015 10:48:29 +0000 (10:48 +0000)]
MFC r261891: provide fast versions of ffsl and flsl for i386; ffsll and
flsll for amd64

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

8 years agoMFC r284591: illums compat: use flsl/flsll for highbit/highbit64
avg [Fri, 23 Oct 2015 08:38:10 +0000 (08:38 +0000)]
MFC r284591: illums compat: use flsl/flsll for highbit/highbit64

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

8 years agoMFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)
avg [Fri, 23 Oct 2015 08:35:39 +0000 (08:35 +0000)]
MFC r288339: remove unused sgsmsg utility (originally imported from opensolaris)

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

8 years agoMFC r288363: std: it is important that func name is never an empty string
avg [Fri, 23 Oct 2015 08:16:10 +0000 (08:16 +0000)]
MFC r288363: std: it is important that func name is never an empty string

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

8 years agoMFC r284409: Fix circular dependency between libzfs and libzfs_core
avg [Fri, 23 Oct 2015 08:12:43 +0000 (08:12 +0000)]
MFC r284409: Fix circular dependency between libzfs and libzfs_core

By bapt.

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

8 years agoMFC r288340: define aok in libnvpair which is linked to all zfs
avg [Fri, 23 Oct 2015 08:04:59 +0000 (08:04 +0000)]
MFC r288340: define aok in libnvpair which is linked to all zfs
libraries that need aok

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

8 years agoMFC r288362: sdt: start checking version field when parsing probe definitions
avg [Fri, 23 Oct 2015 07:57:33 +0000 (07:57 +0000)]
MFC r288362: sdt: start checking version field when parsing probe definitions

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

8 years agoMFC r288337: remove an extra copy of avl.c from illumos contrib code
avg [Fri, 23 Oct 2015 07:48:40 +0000 (07:48 +0000)]
MFC r288337: remove an extra copy of avl.c from illumos contrib code

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

8 years agoMFC r288336: save some bytes by using more concise SDT_PROBE<n>
avg [Fri, 23 Oct 2015 07:44:03 +0000 (07:44 +0000)]
MFC r288336: save some bytes by using more concise SDT_PROBE<n>

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

8 years agoMFC r288366: sdt.h: no need for argtype_list_head
avg [Fri, 23 Oct 2015 07:37:54 +0000 (07:37 +0000)]
MFC r288366: sdt.h: no need for argtype_list_head

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

8 years agoMFC r288365: sdt: static-ize couple of variables
avg [Fri, 23 Oct 2015 07:35:48 +0000 (07:35 +0000)]
MFC r288365: sdt: static-ize couple of variables

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

8 years agoMFC r288364: sdt module does not seem to actually use any symbol from
avg [Fri, 23 Oct 2015 07:33:55 +0000 (07:33 +0000)]
MFC r288364: sdt module does not seem to actually use any symbol from
opensolaris module

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

8 years agoMFC r288361: dtrace_getarg: remove stray return statement on amd64
avg [Fri, 23 Oct 2015 07:32:15 +0000 (07:32 +0000)]
MFC r288361: dtrace_getarg: remove stray return statement on amd64

Note: no dtrace/powerpc in stable/9.

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

8 years agoMFC r287673: radeon_suspend_kms: don't mess with pci state
avg [Fri, 23 Oct 2015 07:29:37 +0000 (07:29 +0000)]
MFC r287673: radeon_suspend_kms: don't mess with pci state

Patch adjusted for FREEBSD_WIP vs DUMBBELL_WIP.

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

8 years agoMFC 287386,288949,288993:
jhb [Fri, 23 Oct 2015 01:27:44 +0000 (01:27 +0000)]
MFC 287386,288949,288993:
Export current system call code and argument count for system call entry
and exit events.  To preserve the ABI, the new fields are moved to the
end of struct thread in these branches (unlike HEAD) and explicitly copied
when new threads are created.  In addition, the new tests are only added
in 10.

r287386:
Export current system call code and argument count for system call entry
and exit events. procfs stop events for system call tracing report these
values (argument count for system call entry and code for system call exit),
but ptrace() does not provide this information. (Note that while the system
call code can be determined in an ABI-specific manner during system call
entry, it is not generally available during system call exit.)

The values are exported via new fields at the end of struct ptrace_lwpinfo
available via PT_LWPINFO.

r288949:
Fix various edge cases related to system call tracing.
- Always set td_dbg_sc_* when P_TRACED is set on system call entry
  even if the debugger is not tracing system call entries.  This
  ensures the fields are valid when reporting other stops that
  occur at system call boundaries such as for PT_FOLLOW_FORKS or
  when only tracing system call exits.
- Set TDB_SCX when reporting the stop for a new child process in
  fork_return().  This causes the event to be reported as a system
  call exit.
- Report a system call exit event in fork_return() for new threads in
  a traced process.
- Copy td_dbg_sc_* to new threads instead of zeroing.  This ensures
  that td_dbg_sc_code in particular will report the system call that
  created the new thread or process when it reports a system call
  exit event in fork_return().
- Add new ptrace tests to verify that new child processes and threads
  report system call exit events with a valid pl_syscall_code via
  PT_LWPINFO.

r288993:
Document the recently added pl_syscall_* fields in struct ptrace_lwpinfo.

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

8 years agoMFC r288994:
bdrewery [Wed, 21 Oct 2015 01:45:18 +0000 (01:45 +0000)]
MFC r288994:

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

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