]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/log
FreeBSD/stable/10.git
8 years agoMFC r297820:
ae [Tue, 26 Apr 2016 11:55:28 +0000 (11:55 +0000)]
MFC r297820:
  Fix the problem, when gpart(8) can't write both bootcode and partcode
  in one command due to wrong file size limit. Do not use bootcode size
  to calculate partsize limit.
  Also add report message about successful partcode writing.

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

8 years agoMFC r297846: [amd64] dtrace_invop handler is to be called only for
avg [Tue, 26 Apr 2016 07:47:01 +0000 (07:47 +0000)]
MFC r297846: [amd64] dtrace_invop handler is to be called only for
kernel exceptions

Fix up r298621.

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

8 years agoMFC r297846: [amd64] dtrace_invop handler is to be called only for
avg [Tue, 26 Apr 2016 07:40:07 +0000 (07:40 +0000)]
MFC r297846: [amd64] dtrace_invop handler is to be called only for
kernel exceptions

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

8 years agoMFC r298173:
markj [Mon, 25 Apr 2016 18:13:21 +0000 (18:13 +0000)]
MFC r298173:
Use a loop instead of a goto in sysctl_kern_proc_kstack().

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

8 years agoMFC r298176:
wblock [Mon, 25 Apr 2016 12:25:30 +0000 (12:25 +0000)]
MFC r298176:

Add the kern.vt.enable_bell sysctl, which was not documented previously.
Minor additional punctuation and wording changes.

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

8 years agoMFC r297796:
pfg [Mon, 25 Apr 2016 00:51:13 +0000 (00:51 +0000)]
MFC r297796:
ext2fs: replace 0 with NULL for pointers.

While here do late initialization of ebap, similar as was
done in UFS.

Found with devel/coccinelle.

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

8 years agoMFC r297513: remove emulation of VFS_HOLD and VFS_RELE from opensolaris compat
avg [Sun, 24 Apr 2016 08:39:55 +0000 (08:39 +0000)]
MFC r297513: remove emulation of VFS_HOLD and VFS_RELE from opensolaris compat

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

8 years agoMFC r298156:
wblock [Sun, 24 Apr 2016 03:15:10 +0000 (03:15 +0000)]
MFC r298156:

Fix markup on "\n" in printf so it renders correctly.

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

8 years agoMFC r297791:
pfg [Sun, 24 Apr 2016 03:11:52 +0000 (03:11 +0000)]
MFC r297791:
UFS: replace 0 with NULL for pointers.

While here also do late initialization of the variables we are
changing.

Found with devel/coccinelle.

Reviewed by: mckusick

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

8 years agoMFC: 298112
bapt [Sat, 23 Apr 2016 10:10:29 +0000 (10:10 +0000)]
MFC: 298112

Directly set the O_CLOEXEC flags via the open(2) attributes

Sponsored by: Essen Hackathon

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

8 years agoMFC: r298111 r298114
bapt [Sat, 23 Apr 2016 10:06:57 +0000 (10:06 +0000)]
MFC: r298111 r298114

Directly set the O_CLOEXEC flags via the open(2) attributes
  Use the SOCK_CLOEXEC flags in the socket(2) 'type' attribute instead of
calling fcntl(2)

Sponsored by: Essen Hackathon

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

8 years agoMFC r298101:
kib [Sat, 23 Apr 2016 07:36:13 +0000 (07:36 +0000)]
MFC r298101:
Add x86 CPU features definitions published in the Intel SDM rev. 58.

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

8 years agoMFC r297282,r297456,r298012,r298013,r298014:
ngie [Sat, 23 Apr 2016 07:09:23 +0000 (07:09 +0000)]
MFC r297282,r297456,r298012,r298013,r298014:

r297282 (by bdrewery):

We don't have a CPPFLAGS, COPTS or CPUFLAGS.

r297456 (by bdrewery):

We don't support DPLIBS.

r298012:

Add DEBUG_FLAGS to PROG_VARS and STRIP to PROG_OVERRIDE_VARS

This will allow the variables [*] to be overridden on a per-PROG basis,
which is useful when controlling "stripping" behavior for some tests
that require debug symbols or to be unstripped

DEBUG_FLAGS (similar to CFLAGS) supports appending, whereas STRIP is
an override

*: Due to how STRIP is defined in bsd.own.mk (in addition to
bsd.lib.mk and bsd.prog.mk), and the fact that bsd.test.mk pulls in
bsd.own.mk first, overriding STRIP doesn't work today.

A follow up commit is pending to "rectify" this after additional
testing is done.

Discussed with: bdrewery

r298013:

Commit documentation change for r298012

Requested by: bdrewery

r298014:

Regenerate the list of bsd.progs.mk supported variables

Prefix with dashes (unordered list) and put one variable on each
line (to avoid future conflicts)

Done via the following one-liner:

> sh -c 'for i in $(make -C tests/sys/aio PROG=foo -VPROG_VARS:O); do printf "\t\t- $i\n"; done'

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

8 years agoMFC r288490: Add debug file extension to kldxref(8)
emaste [Fri, 22 Apr 2016 21:43:44 +0000 (21:43 +0000)]
MFC r288490: Add debug file extension to kldxref(8)

  After r288176 [in head] kernel debug files have the extension .debug.
  They also moved [in head] to /usr/lib/debug/boot/kernel by default so
  in the normal case kldxref does not encounter them.  A src.conf(5)
  setting may be used to continue installing them in /boot/kernel
  though, so have kldxref skip .debug files in addition to .symbols
  files.

Merged this change to avoid warnings when a stable/10 kldxref runs
against a head install, perhaps on an upgrade to 11-CURRENT.  The change
to kernel debug files will not be merged to stable/10.

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

8 years agoMFC r277205 (imp):
emaste [Fri, 22 Apr 2016 21:38:37 +0000 (21:38 +0000)]
MFC r277205 (imp):

  Reserve and ignore the a new module metadata type MDT_PNP_INFO for
  associating an optional PNP hint table with this module. In the
  future, when these are added, these changes will silently ignore the
  new type they would otherwise warn about. It will always be safe to
  ignore this data. Get this into the builds today for some future
  proofing.

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

8 years agoMFC r275940 (imp): Bump the largest record we can cope with from 1k to 8k.
emaste [Fri, 22 Apr 2016 21:33:11 +0000 (21:33 +0000)]
MFC r275940 (imp): Bump the largest record we can cope with from 1k to 8k.

Other users of the hints file don't have any real limits, and longer
records will need to be written shortly.

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

8 years agoMFC r297836:
ngie [Fri, 22 Apr 2016 21:32:01 +0000 (21:32 +0000)]
MFC r297836:

Fix appending -O0 to CFLAGS

The previous method would completely nerf CFLAGS once bsd.progs.mk had
recursed into the per-PROG logic and make the CFLAGS for tap testcases
to -O0, instead of appending to CFLAGS for all of the tap testcases.

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

8 years agoMFC r298024,r298196:
ngie [Fri, 22 Apr 2016 21:30:42 +0000 (21:30 +0000)]
MFC r298024,r298196:

r298024:

Set test_argv to NULL, not 0, if not executing a specific test

r298196:

Minor cosmetic cleanup

- Remove spurious trailing whitespace in licensing header
- Remove unnecessary semi-colon after comment

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

8 years agoMFC r298303:
ngie [Fri, 22 Apr 2016 21:26:15 +0000 (21:26 +0000)]
MFC r298303:

Remove trailing whitespace and use `nitems(mib)` instead of `2` when
calling sysctl(3)

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

8 years agoMFC r297709: zio write issue threads should have lower (numerically
avg [Fri, 22 Apr 2016 12:48:53 +0000 (12:48 +0000)]
MFC r297709: zio write issue threads should have lower (numerically
greater) priority

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

8 years agoMFC r298043:
kib [Fri, 22 Apr 2016 08:49:50 +0000 (08:49 +0000)]
MFC r298043:
Avoid NULL pointer dereference.

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

8 years agoMFC r297685: Add option to specify built-in keymap for kbdmux
emaste [Thu, 21 Apr 2016 19:25:33 +0000 (19:25 +0000)]
MFC r297685: Add option to specify built-in keymap for kbdmux

PR: 153459
Submitted by: swell.k@gmail.com

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

8 years agoFix compiled-in keymap generation for sc/vt consoles
emaste [Thu, 21 Apr 2016 19:24:36 +0000 (19:24 +0000)]
Fix compiled-in keymap generation for sc/vt consoles

In r298297 kbdcontrol's -P <path> option was MFC'd to stable/10, which
enables this change for a simplified compile-time default keymap build
process.

PR: 193865
MFC of: r296899, r296914, r297363, r298402

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

8 years agoMFC 295930:
jhb [Thu, 21 Apr 2016 18:44:53 +0000 (18:44 +0000)]
MFC 295930:
Add support for displaying thread IDs to truss(1).

- Consolidate duplicate code for printing the metadata at the start of
  each line into a shared function.
- Add an -H option which will log the thread ID of the relevant thread
  for each event.

While here, remove some extraneous calls to clock_gettime() in
print_syscall() and print_syscall_ret().  The caller of print_syscall_ret()
always updates the current thread's "after" time before it is called.

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

8 years agoMFC 295677,295678:
jhb [Thu, 21 Apr 2016 15:25:17 +0000 (15:25 +0000)]
MFC 295677,295678:
Fetch the current thread and it's syscall state from the trussinfo object
instead of passing some of that state as arguments to print_syscall() and
print_syscallret().  This just makes the calls of these functions shorter
and easier to read.

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

8 years agoMFC r297527, r297688:
pfg [Thu, 21 Apr 2016 14:57:44 +0000 (14:57 +0000)]
MFC r297527, r297688:
chdone(): Prevent returning uninitialized scalar value.

Instead of attempting to initialize all the possible cases, just
move the check nearer to the case where it makes sense.

CID: 1006486
Reviewed by: ken

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

8 years agoMFC r298005:
wblock [Thu, 21 Apr 2016 14:25:45 +0000 (14:25 +0000)]
MFC r298005:

Remove a link to the CTM section of the Handbook, which no longer exists.

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

8 years agoMFC 297942:
pfg [Wed, 20 Apr 2016 00:49:37 +0000 (00:49 +0000)]
MFC 297942:
libgssapi: avoid NULL pointer dereferences.

While here also use NULL instead of zero for pointers.

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

8 years agoMFC r297618:
pfg [Wed, 20 Apr 2016 00:44:13 +0000 (00:44 +0000)]
MFC r297618:
fsck_msdosfs(8): Optimimize memsets

Obtained from: NetBSD (bin/50908)

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

8 years agoBump __FreeBSD_version for kbdcontrol's -P option
emaste [Tue, 19 Apr 2016 21:06:39 +0000 (21:06 +0000)]
Bump __FreeBSD_version for kbdcontrol's -P option

MFC'd in r298297

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

8 years agoMFC r296926: kbdcontrol: add -P path option to add keymap search paths
emaste [Tue, 19 Apr 2016 20:56:02 +0000 (20:56 +0000)]
MFC r296926: kbdcontrol: add -P path option to add keymap search paths

PR: 193865
Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r297884
davidcs [Tue, 19 Apr 2016 18:47:34 +0000 (18:47 +0000)]
MFC r297884
Add support for Flash Update

Submitted by:nrapendra.singh@qlogic.com;vaishali.kulkarni@qlogic.com;davidcs@freebsd.org

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

8 years agoMFC r297873
davidcs [Tue, 19 Apr 2016 18:33:36 +0000 (18:33 +0000)]
MFC r297873
1. Process tx completions in bxe_periodic_callout_func() and restart
     transmissions if possible.
2. For SIOCSIFFLAGS call bxe_init_locked() only if !BXE_STATE_DISABLED
3. remove code not needed in bxe_init_internal_common()

Submitted by:vaishali.kulkarni@qlogic.com;venkata.bhavaraju@qlogic.com

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

8 years agoMFC r297521: fix zfs set canmount=off on an unmounted filesystem
avg [Tue, 19 Apr 2016 12:20:28 +0000 (12:20 +0000)]
MFC r297521: fix zfs set canmount=off on an unmounted filesystem

No MFC to stable/9 because of a non-trivial merge conflict and no
way to test the edited code.

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

8 years agoMFC r297520: zfs receive: -u can be ignored sometimes
avg [Tue, 19 Apr 2016 12:14:15 +0000 (12:14 +0000)]
MFC r297520: zfs receive: -u can be ignored sometimes

PR: 204705

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

8 years agoMFC r295749:
thomas [Tue, 19 Apr 2016 07:34:31 +0000 (07:34 +0000)]
MFC r295749:

Reorganize the handling all-zeroes terminal block in sparse mode

PR: 189284
(original PR whose fix introduced this bug)

PR: 207092

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

8 years agoMerge r298008
scottl [Sun, 17 Apr 2016 01:38:37 +0000 (01:38 +0000)]
Merge r298008

 Update the devd.conf man page to describe the new CAM/periph system/subsystem.

Sponsored by: Netflix

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

8 years agoMFC r298004:
scottl [Sun, 17 Apr 2016 01:35:57 +0000 (01:35 +0000)]
MFC r298004:

Add a devctl/devd notification conduit for CAM errors that happen at the
periph level.

Due to not merging the changes to ata_res_sbuf(), this version is a little
messy.

Sponsored by: Netflix

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

8 years agoMFC r287009, r287120 and r298131:
loos [Sat, 16 Apr 2016 22:02:32 +0000 (22:02 +0000)]
MFC r287009, r287120 and r298131:

Add ALTQ(9) support for the CoDel algorithm.

CoDel is a parameterless queue discipline that handles variable bandwidth
and RTT.

It can be used as the single queue discipline on an interface or as a sub
discipline of existing queue disciplines such as PRIQ, CBQ, HFSC, FAIRQ.

Obtained from: pfSense
Sponsored by: Rubicon Communications (Netgate)

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

8 years agoFix the build.
loos [Sat, 16 Apr 2016 13:41:10 +0000 (13:41 +0000)]
Fix the build.

pointy hat to: loos
Reported by: gjb, Herbert J. Skuhra

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

8 years agoPartial MFC of r297933
scottl [Sat, 16 Apr 2016 05:14:55 +0000 (05:14 +0000)]
Partial MFC of r297933

Add sbuf variants ata_cmd_sbuf()

Sponsored by: Netflix

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

8 years agoMFC r297925, r297926:
scottl [Sat, 16 Apr 2016 02:47:46 +0000 (02:47 +0000)]
MFC r297925, r297926:

 Add scsi_cdb_sbuf() for handling CDB strings.  Reimplement scsi_cdb_string()
 in terms of it.

 Use scsi_cdb_sbuf() inside of scsi_command_string now that the temporary
 string storage is no longer needed.

Sponsored by: Netflix

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

8 years agoMFC r284777, r284814, r284863 and r298088:
loos [Sat, 16 Apr 2016 02:11:04 +0000 (02:11 +0000)]
MFC r284777, r284814, r284863 and r298088:

ALTQ FAIRQ discipline import from DragonFLY.

Differential Revision: https://reviews.freebsd.org/D2847
Obtained from: pfSense
Sponsored by: Rubicon Communications (Netgate)

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

8 years agoMFC r297637:
ngie [Fri, 15 Apr 2016 01:20:14 +0000 (01:20 +0000)]
MFC r297637:

Disable the NetBSD-specific EFAULT requirements test in gettimeofday_err

FreeBSD doesn't specifically list this as a supported error, and in some
configurations/versions of FreeBSD, this test will segfault as the memory
address might be evaluated in userspace, instead of in kernel space like
in NetBSD.

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

8 years agoMFC r295012
vangyzen [Thu, 14 Apr 2016 17:14:11 +0000 (17:14 +0000)]
MFC r295012

kqueue EVFILT_PROC: avoid collision between NOTE_CHILD and NOTE_EXIT

NOTE_CHILD and NOTE_EXIT return something in kevent.data: the parent
pid (ppid) for NOTE_CHILD and the exit status for NOTE_EXIT.
Do not let the two events be combined, since one would overwrite
the other's data.

PR: 180385
Submitted by: David A. Bright <david_a_bright@dell.com>
Sponsored by: Dell Inc.

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

8 years agoMFC 297838
asomers [Thu, 14 Apr 2016 15:24:45 +0000 (15:24 +0000)]
MFC 297838

Fix an intermittent bug in sbin/devd/client_test.stream

In case where the two events were being received in separate reads, the
event buffer was being null-terminated at the wrong offset.

Also, factored out some common code between the tests, and fixed a comment.

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

8 years agoMFC 297678: Enhance uuencode with a -r option to produce raw output.
gahr [Thu, 14 Apr 2016 11:45:52 +0000 (11:45 +0000)]
MFC 297678: Enhance uuencode with a -r option to produce raw output.

This matches with uudecode's -r option to decode raw data without initial and
final framing lines.

$ echo Test | uuencode -mr - | uudecode -mr
Test

Approved by: cognet

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

8 years agoMFC r297672: Alike to r293708 relax pool check in vdev_geom_open_by_path().
mav [Thu, 14 Apr 2016 09:10:09 +0000 (09:10 +0000)]
MFC r297672: Alike to r293708 relax pool check in vdev_geom_open_by_path().

This made impossible spare disk open by known path, which kind of worked
only because the same fix was applied to vdev_geom_attach_by_guids() in
r293708.

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

8 years agoMFC r297827:
markj [Thu, 14 Apr 2016 04:54:47 +0000 (04:54 +0000)]
MFC r297827:
libdtrace: Add a missing unlock to an error handler.

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

8 years agoMFC r297479, r297695:
kevlo [Thu, 14 Apr 2016 01:24:00 +0000 (01:24 +0000)]
MFC r297479, r297695:

Update comment: Linux does set a randomized generation number of an inode
on ext2/3/4.  While here use arc4random() instead of random().

Reviewed by: pfg

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

8 years agoMFC r297571:
wblock [Wed, 13 Apr 2016 20:12:02 +0000 (20:12 +0000)]
MFC r297571:

Add another real-life example of setting a quirk for a USB gaming
keyboard.  From forum thread: https://forums.freebsd.org/threads/55717/

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

8 years agoMFC r297476:
brooks [Wed, 13 Apr 2016 16:47:14 +0000 (16:47 +0000)]
MFC r297476:

Add a cross reference to ktrace(2).

Obtained from: CheriBSD (9cb420d6b7f04c1b7d2006180b80932e5d3fe50e)
Sponsored by: DARPA, AFRL

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

8 years agoMFC r297475:
brooks [Wed, 13 Apr 2016 16:45:17 +0000 (16:45 +0000)]
MFC r297475:

Document KTRFAC_FAULT and KTRFAC_FAULTEND.

Obtained from: CheriBSD (9d70f563f1b033e6a9b51eaf3b145a8cbbc6617c)
Sponsored by: DARPA, AFRL

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

8 years agoMFC r297626:
bdrewery [Wed, 13 Apr 2016 01:54:36 +0000 (01:54 +0000)]
MFC r297626:

  Follow-up r295924: Only sync hash-based db files open for writing when
  closing.

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

8 years agoMFC r297387: Add some device IDs found on AMD FCH shipsets.
mav [Tue, 12 Apr 2016 07:54:55 +0000 (07:54 +0000)]
MFC r297387: Add some device IDs found on AMD FCH shipsets.

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

8 years agoMFC r297386: Add support for AMD FCH watchdog timers.
mav [Tue, 12 Apr 2016 07:54:03 +0000 (07:54 +0000)]
MFC r297386: Add support for AMD FCH watchdog timers.

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

8 years agoMerge r285713 (by zec@) from head:
glebius [Mon, 11 Apr 2016 17:23:47 +0000 (17:23 +0000)]
Merge r285713 (by zec@) from head:
  Prevent null-pointer dereferencing.

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

8 years agoMFC r296685: libelf: correct byte count in cross-endian note translation
emaste [Mon, 11 Apr 2016 14:45:36 +0000 (14:45 +0000)]
MFC r296685: libelf: correct byte count in cross-endian note translation

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r275430: libelf: Fix cross-endian ELF note file / memory conversion
emaste [Mon, 11 Apr 2016 14:44:18 +0000 (14:44 +0000)]
MFC r275430: libelf: Fix cross-endian ELF note file / memory conversion

The namesz and descsz variables need to be used in native endianness.
The sizes are in native order after swapping in the file to memory case,
and before swapping in the memory to file case.

This change is not identical to r275430 because r273443 was never merged
to stable/10, and libelf moved from lib/ to contrib/elftoolchain/.

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

8 years agoMFC r296769: boot/efi: Prefer nm to objdump
emaste [Mon, 11 Apr 2016 14:26:02 +0000 (14:26 +0000)]
MFC r296769: boot/efi: Prefer nm to objdump

  Both objdump and nm are equally capable of reporting undefined symbols.

  This gets us a step closer to building without binutils as we have an nm
  implementation from ELF Tool Chain.

Sponsored by: The FreeBSD Foundation

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

8 years agoMFC r297535:
kib [Mon, 11 Apr 2016 09:29:08 +0000 (09:29 +0000)]
MFC r297535:
Remove unused variable.

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

8 years agoMFC 297358
gnn [Mon, 11 Apr 2016 02:42:04 +0000 (02:42 +0000)]
MFC 297358
Add ethertype reserved for network testing

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

8 years agoMFC r297557:
ache [Mon, 11 Apr 2016 02:21:42 +0000 (02:21 +0000)]
MFC r297557:
SJIS encoding don't have single byte characters >= 224

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

8 years agoMFC 297673:
mp [Sun, 10 Apr 2016 18:12:04 +0000 (18:12 +0000)]
MFC 297673:

Revert r296969 by removing SAVESIGVEC and switching to fork instead. This
fixes usage with system libraries which maintain their own signal state.

PR: 208132

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

8 years agoMFC r297311:
kib [Sun, 10 Apr 2016 16:32:21 +0000 (16:32 +0000)]
MFC r297311:
Ensure that TRIMs are finished before unmount destroys ufsmount.

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

8 years agoMFC r297308:
kib [Sun, 10 Apr 2016 16:27:46 +0000 (16:27 +0000)]
MFC r297308:
Style: wrap long lines.

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

8 years agoMFC r278817: touch: Fix some subtle bugs related to NULL times fallback:
jilles [Sun, 10 Apr 2016 15:24:07 +0000 (15:24 +0000)]
MFC r278817: touch: Fix some subtle bugs related to NULL times fallback:

* Do not subvert vfs.timestamp_precision by reading the time and passing
  that to utimensat(). Instead, pass UTIME_NOW. A fallback to a NULL times
  pointer is no longer used.

* Do not ignore -a/-m if the user has write access but does not own the
  file. Leave timestamps unchanged using UTIME_OMIT and do not fall back to
  a NULL times pointer (which would set both timestamps) if that fails.

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

8 years agoMFC r277645: cp,mv,touch: Set timestamps with nanosecond precision.
jilles [Sun, 10 Apr 2016 15:02:29 +0000 (15:02 +0000)]
MFC r277645: cp,mv,touch: Set timestamps with nanosecond precision.

This uses utimensat().

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

8 years agoMFCR r297519, r297525 (by pfg@):
dchagin [Sun, 10 Apr 2016 06:36:58 +0000 (06:36 +0000)]
MFCR r297519, r297525 (by pfg@):

Move Linux specific times tests up to guarantee the values are defined.

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

8 years agoMFC r259017: test: Avoid looking up again the type of a known binary
jilles [Sat, 9 Apr 2016 21:55:58 +0000 (21:55 +0000)]
MFC r259017: test: Avoid looking up again the type of a known binary
operator.

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

8 years agoMFC r258799: test: Simplify the code by unifying op_num and op_type.
jilles [Sat, 9 Apr 2016 21:49:57 +0000 (21:49 +0000)]
MFC r258799: test: Simplify the code by unifying op_num and op_type.

The global variable t_wp_op is no longer needed.

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

8 years agoMFC r281086: utimensat: Correct Capsicum required capability rights.
jilles [Sat, 9 Apr 2016 21:04:51 +0000 (21:04 +0000)]
MFC r281086: utimensat: Correct Capsicum required capability rights.

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

8 years agoMFC r287753: setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD).
jilles [Sat, 9 Apr 2016 19:29:39 +0000 (19:29 +0000)]
MFC r287753: setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD).

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

8 years agoMFC r297360: sh: Fix use-after-free if a trap replaces itself.
jilles [Sat, 9 Apr 2016 14:24:17 +0000 (14:24 +0000)]
MFC r297360: sh: Fix use-after-free if a trap replaces itself.

The mergeinfo for this commit was accidentally added to the previous commit.

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

8 years agoMFC r278818: sh: Add stsavestr(), like savestr() but allocates using
jilles [Sat, 9 Apr 2016 14:09:14 +0000 (14:09 +0000)]
MFC r278818: sh: Add stsavestr(), like savestr() but allocates using
stalloc().

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

8 years agoMFC r295385: semget(): Check for [EEXIST] error first.
jilles [Sat, 9 Apr 2016 13:32:42 +0000 (13:32 +0000)]
MFC r295385: semget(): Check for [EEXIST] error first.

Although POSIX literally permits failing with [EINVAL] if IPC_CREAT and
IPC_EXCL were both passed, the semaphore set already exists and has fewer
semaphores than nsems, this does not allow an application to retry safely:
if the [EINVAL] is actually because of the semmsl limit, an infinite loop
would result.

PR: 206927

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

8 years agoMFC r294924
asomers [Fri, 8 Apr 2016 21:42:35 +0000 (21:42 +0000)]
MFC r294924

syslogd: Enable repeated line compression for lines of any length.

Enable repeated line compression for lines of any length, instead of only short
lines. AFAICT repeated line compression was limited to short lines as a RAM
optimization, which made sense when karels added it in 1988, but no longer.
The penalty is a paltry 904B of RAM per file logged.

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

8 years agoMFC 270231
asomers [Fri, 8 Apr 2016 20:43:50 +0000 (20:43 +0000)]
MFC 270231

Misc fixes suggested by Coverity.

sbin/devd/tests/client_test.c
* In the event that popen fails, don't dereference its return value.
* Fix array overwrite in the stream and seqpacket tests.
* Close sockets at the end of successful ATF tests.

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

8 years agoMFC r295384: semget(2): Add missing [EINVAL] conditions.
jilles [Fri, 8 Apr 2016 15:43:49 +0000 (15:43 +0000)]
MFC r295384: semget(2): Add missing [EINVAL] conditions.

PR: 206927

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

8 years agoRevert svn 297681 as it has been deprecated by svn 297575.
sbruno [Fri, 8 Apr 2016 13:43:39 +0000 (13:43 +0000)]
Revert svn 297681 as it has been deprecated by svn 297575.

Submitted by: Tomoaki AOKI <junchoon@dec.dakura.ne.jp>

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

8 years agoMFC r266615: Increase taskqueue thread priority from idle to PRIBIO.
mav [Fri, 8 Apr 2016 10:00:07 +0000 (10:00 +0000)]
MFC r266615: Increase taskqueue thread priority from idle to PRIBIO.

Idle priority is not even time-share, so if system is busy in any way,
those events may never be executed.  Since in some cases system waits
for events processed by that thread, that may cause deadlocks.

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

8 years agoMFC r297237
sbruno [Thu, 7 Apr 2016 18:03:42 +0000 (18:03 +0000)]
MFC r297237

Add 4k enabled cam quirks for Samsung SM863 Series SSDs

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

8 years agoMFC r297255: Unify ichwd(4) attachment messages in dmesg.
mav [Thu, 7 Apr 2016 08:32:37 +0000 (08:32 +0000)]
MFC r297255: Unify ichwd(4) attachment messages in dmesg.

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

8 years agoMFC r286890 (by fabient):
mav [Thu, 7 Apr 2016 08:31:52 +0000 (08:31 +0000)]
MFC r286890 (by fabient):
Add ichwd TCO version 3 support (Bay Trail / Rangeley...)

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

8 years agoMFC r294520:
hselasky [Thu, 7 Apr 2016 07:52:09 +0000 (07:52 +0000)]
MFC r294520:
LinuxKPI atomic fixes:
- Fix implementation of atomic_add_unless(). The atomic_cmpset_int()
  function returns a boolean and not the previous value of the atomic
  variable.
- The atomic counters should be signed according to Linux.
- Some minor cosmetics and styling while at it.

Reviewed by: alfred @
Sponsored by: Mellanox Technologies

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

8 years agoMFC r297444:
hselasky [Thu, 7 Apr 2016 07:44:01 +0000 (07:44 +0000)]
MFC r297444:
Fix bugs in currently unused bit searching loop.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r296934:
hselasky [Thu, 7 Apr 2016 07:41:06 +0000 (07:41 +0000)]
MFC r296934:
Fix crash in krping when run as a client due to NULL pointer access.
Initialize pointer in question which is used only when fast registers
mode is selected.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r296987:
hselasky [Thu, 7 Apr 2016 07:36:54 +0000 (07:36 +0000)]
MFC r296987:
Add missing curly brackets in for loop.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r296910:
hselasky [Thu, 7 Apr 2016 07:35:02 +0000 (07:35 +0000)]
MFC r296910:
Use hardware computed Toeplitz hash for incoming flowids

Use the Toeplitz hash value as source for the flowid. This makes the
hash value more suitable for so-called hash bucket algorithms which
are used in the FreeBSD's TCP/IP stack when RSS is enabled.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r296909:
hselasky [Thu, 7 Apr 2016 07:29:57 +0000 (07:29 +0000)]
MFC r296909:
Fix witness panic in the ipoib_ioctl() function when unloading the
ipoib module.

The bpfdetach() function is trying to turn off promiscious mode on the
network interface it is attached to while holding a mutex. The fix
consists of ignoring any further calls to the ipoib_ioctl() function
when the network interface is going to be detached. The ipoib_ioctl()
function might sleep.

Sponsored by: Mellanox Technologies

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

8 years agoMFC r294526:
hselasky [Thu, 7 Apr 2016 07:21:27 +0000 (07:21 +0000)]
MFC r294526:
Add missing atomic wrapper macro.

Reviewed by: alfred @
Sponsored by: Mellanox Technologies

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

8 years agoMFC r296342:
hselasky [Thu, 7 Apr 2016 07:17:23 +0000 (07:17 +0000)]
MFC r296342:
Allow for overlapping quirk device ranges. Prior to this patch only
the first device entry matching the USB vendor, product and revision
would be searched for quirks. After this patch all device entries will
be searched for quirks.

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

8 years agoMFC r296902:
hselasky [Thu, 7 Apr 2016 07:12:14 +0000 (07:12 +0000)]
MFC r296902:
Improve detection of extended QSFP diagnostics.

The standards in the QSFP diagnostics area are not clear when the
additional measurements are present or not. Use a valid temperature
reading as an indicator for the presence of voltage and TX/RX power
measurements.

Sponsored by: Mellanox Technologies
Tested by: Netflix
Differential Revision: https://reviews.freebsd.org/D5391
Reviewed by: gallatin

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

8 years agoMFC r295186
jhibbits [Thu, 7 Apr 2016 00:37:46 +0000 (00:37 +0000)]
MFC r295186

Align signal stack pointer to 16 bytes.

The stack must be aligned to 16 bytes at all times.  Clang 3.8 is especially
adamant about this, and causes strange behavior and segmentation faults if it is
not the case.

PR:             kern/206810

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

8 years agoMFC r297155
davidcs [Wed, 6 Apr 2016 21:04:39 +0000 (21:04 +0000)]
MFC r297155
Modifications to achieve a common source base from FreeBSD7.x thru 10.x

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

8 years agoMFC r297183:
ngie [Wed, 6 Apr 2016 06:37:36 +0000 (06:37 +0000)]
MFC r297183:

Use a SKIP testplan instead of bailing out if/when the tester isn't
root, or the geom class can't be loaded cleanly [*]

This makes sure that scenarios that are easy to hit aren't counted
as false positives with kyua test

PR: 208101

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

8 years agoMFC 290102
sbruno [Tue, 5 Apr 2016 20:34:20 +0000 (20:34 +0000)]
MFC 290102

- Include usr.sbin/mpsutil for management of mps(4) and mpr(4) utilities.

- Thanks to scottl and bapt for making this happen.

Submitted by: bapt scottl
Reviewed by: kbowling
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D5529

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

8 years agoMFC r297488
sbruno [Tue, 5 Apr 2016 18:27:47 +0000 (18:27 +0000)]
MFC r297488

Repair an overflow condition where a user could submit a string that was
not getting a proper bounds check.

PR: 206761
Submitted by: sson
Reviewed by: cturt@hardenedbsd.org

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

8 years agoMFC r295147:
ume [Tue, 5 Apr 2016 14:41:34 +0000 (14:41 +0000)]
MFC r295147:
  Make dynamic link of libiconv from ports work again.
  The symbols of libiconv from ports were changed to
  have prefixed.
  Since we have iconv in our libc these days, we don't
  need it on 10.X and later.  However, 9.X still need
  this.

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

8 years agoCAM: Generalize 4k quirk to all Samsung MZ7* SSDs
dumbbell [Tue, 5 Apr 2016 08:37:21 +0000 (08:37 +0000)]
CAM: Generalize 4k quirk to all Samsung MZ7* SSDs

This adds Samsung PM851 to the list. It can be found in Lenovo Thinkpad
T440 for instance.

MFC of: r297370
Reviewed by: Kevin Bowling <kevin.bowling@kev009.com>,
Jason Wolfe <j@nitrology.com>
Approved by: Kevin Bowling <kevin.bowling@kev009.com>,
Jason Wolfe <j@nitrology.com>
Differential Revision: https://reviews.freebsd.org/D5753

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