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

8 years agoMFC r297179: Optimize IPMI watchdog patting.
mav [Tue, 5 Apr 2016 06:37:58 +0000 (06:37 +0000)]
MFC r297179: Optimize IPMI watchdog patting.

Set watchdog timer parameters only when they really need to be changed.
In other cases just restart the timer with single Reset command instead
of two (Set and Reset).

From one side this visually reduces amount of CPU time burned in tight
loop waiting while some slow BMC configures its watchdog hardware, that
seems to be much more complicated task then just resetting the timer.

From another side on some BMCs those slow Set commands sometimes tend to
timeout, that leads to noisy log messages and even more CPU time burned,
so avoiding them can provide even bigger bonuses.

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

8 years agoMFC r297364:
wblock [Mon, 4 Apr 2016 16:41:35 +0000 (16:41 +0000)]
MFC r297364:

Fix two more unhappy instances of "user land".

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

8 years agoMFC r297330:
wblock [Mon, 4 Apr 2016 16:20:46 +0000 (16:20 +0000)]
MFC r297330:

Adjust misleading wording of the -G option and simplify a few
surrounding sentences.  From a discussion on -ports.

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

8 years agoMFC: r292563
marius [Mon, 4 Apr 2016 12:21:04 +0000 (12:21 +0000)]
MFC: r292563

loader.efi: strip trailing whitespace

MFC: r293244 (remainder missing in r294275)

Introduce and use new EFI_ERROR_CODE macro for EFI errors

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

8 years agoNow that 10.3-RELEASE is out, move stable/10 back to STABLE.
marius [Mon, 4 Apr 2016 12:15:06 +0000 (12:15 +0000)]
Now that 10.3-RELEASE is out, move stable/10 back to STABLE.

Approved by: re (implicit)

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

8 years agoMFC r297421: Plug open count leak on zvol rename.
mav [Mon, 4 Apr 2016 09:50:28 +0000 (09:50 +0000)]
MFC r297421: Plug open count leak on zvol rename.

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

8 years agoMFC r297420: Switch from using make_dev_p() to make_dev_s() to close races.
mav [Mon, 4 Apr 2016 09:49:45 +0000 (09:49 +0000)]
MFC r297420: Switch from using make_dev_p() to make_dev_s() to close races.

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

8 years agoMFC r297337: Pass through error code from make_dev_p().
mav [Mon, 4 Apr 2016 09:48:58 +0000 (09:48 +0000)]
MFC r297337: Pass through error code from make_dev_p().

ENAMETOOLONG is much more informative in logs then ENXIO.

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

8 years agoMFC r297232: Unify ignoring EEXIST from zvol_create_minor().
mav [Mon, 4 Apr 2016 09:47:39 +0000 (09:47 +0000)]
MFC r297232: Unify ignoring EEXIST from zvol_create_minor().

This fixes creation of zvol devices for snapshots during zfs receive,
that previously failed with "ZFS WARNING: Unable to create ZVOL" message.
This solution is not perfect, but IMHO better then it was before.

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

8 years agoMFC r277504 (by will): Remove commented log messages.
mav [Mon, 4 Apr 2016 09:36:56 +0000 (09:36 +0000)]
MFC r277504 (by will): Remove commented log messages.

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

8 years agoMFC r277450 (by will):
mav [Mon, 4 Apr 2016 09:35:36 +0000 (09:35 +0000)]
MFC r277450 (by will):
Use the "zfs_gfs" tag for GFS vnodes to make them easier to identify.

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

8 years agoMFC r270382 (by delphij): MFV r270197:
mav [Mon, 4 Apr 2016 09:30:57 +0000 (09:30 +0000)]
MFC r270382 (by delphij): MFV r270197:

Illumos issue:
    5066 remove support for non-ANSI compilation
    5068 Remove SCCSID() macro from <macros.h>

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

8 years agoMFC r297139:
kib [Mon, 4 Apr 2016 06:49:20 +0000 (06:49 +0000)]
MFC r297139:
From libthr, remove special and strange code to set up session and
control terminal, activated when running with pid 1.

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

8 years agoMFC r287109 (by trasz): Make it possible to forcibly unmount devfs.
mav [Sun, 3 Apr 2016 14:38:02 +0000 (14:38 +0000)]
MFC r287109 (by trasz): Make it possible to forcibly unmount devfs.

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

8 years agoMFC r297309:
dchagin [Sun, 3 Apr 2016 06:22:36 +0000 (06:22 +0000)]
MFC r297309:

Whitespaces and style(9) fix. No functional changes.

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

8 years agoMFC r297297:
dchagin [Sat, 2 Apr 2016 06:18:19 +0000 (06:18 +0000)]
MFC r297297:

When write(2) on eventfd object fails with the error EAGAIN do not return the number of bytes written.

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

8 years agoMFC r297296:
dchagin [Sat, 2 Apr 2016 06:15:14 +0000 (06:15 +0000)]
MFC r297296:

Implement O_NONBLOCK flag via fcntl(F_SETFL) for eventfd object.

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

8 years agoMFC r297335:
kevlo [Fri, 1 Apr 2016 03:46:16 +0000 (03:46 +0000)]
MFC r297335:

Update superblock and inode structs for ext4.

Reviewed by: pfg

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

8 years agoMFC r297298:
np [Fri, 1 Apr 2016 01:39:44 +0000 (01:39 +0000)]
MFC r297298:
Plug leak in m_unshare.

m_unshare passes on the source mbuf's flags as-is to m_getcl and this
results in a leak if the flags include M_NOFREE.  The fix is to clear
the bits not listed in M_COPYALL before calling m_getcl.  M_RDONLY
should probably be filtered out too but that's outside the scope of this
fix.

Add assertions in the zone_mbuf and zone_pack ctors to catch similar
bugs.

Update netmap_get_mbuf to not pass M_NOFREE to m_getcl.  It's not clear
what the original code was trying to do but it's likely incorrect.
Updated code is no different functionally but it avoids the newly added
assertions.

Sponsored by: Chelsio Communications

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

8 years agoMFC r296984:
ae [Thu, 31 Mar 2016 09:55:21 +0000 (09:55 +0000)]
MFC r296984:
  Change in6_selectsrc() to allow usage of non-local IPv6 addresses in
  IPV6_PKTINFO ancillary data when IPV6_BINDANY socket option is set.

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

8 years agoMFC r296278:
pfg [Thu, 31 Mar 2016 01:36:50 +0000 (01:36 +0000)]
MFC r296278:
mbtowc(3): set errno to EILSEQ if an incomplete character is passed.

According to POSIX, The mbtowc() function shall fail if:
[EILSEQ] An invalid character sequence is detected.

Reviewed by: bapt
Differential Revision: https://reviews.freebsd.org/D5496

Obtained from: OpenBSD (Ingo Schwarze)

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

8 years agoMFC r297212:
dim [Wed, 30 Mar 2016 22:12:07 +0000 (22:12 +0000)]
MFC r297212:

For C++, expose long long types and functions (lldiv_t, llabs, lldiv,
etc) in stdlib.h.  These will be needed for newer versions of libc++,
which uses them for defining overloaded versions of abs() and div().

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

8 years agoMFC 296932:
kp [Wed, 30 Mar 2016 18:45:18 +0000 (18:45 +0000)]
MFC 296932:
pf: Improve forwarding detection

When we guess the nature of the outbound packet (output vs. forwarding) we need
to take bridges into account. When bridging the input interface does not match
the output interface, but we're not forwarding. Similarly, it's possible for the
interface to actually be the bridge interface itself (and not a member interface).

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

8 years agor297229 (by hselasky): Add more UHCI PCI IDs.
mav [Tue, 29 Mar 2016 09:14:28 +0000 (09:14 +0000)]
r297229 (by hselasky): Add more UHCI PCI IDs.

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

8 years agoMFC r296585:
bdrewery [Mon, 28 Mar 2016 16:25:07 +0000 (16:25 +0000)]
MFC r296585:

  These group names may be used as a cookie, so replace any non-fs-safe
  characters.

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

8 years agoMFC r296526:
bdrewery [Mon, 28 Mar 2016 16:21:45 +0000 (16:21 +0000)]
MFC r296526:

  Record command exit status in the typescript file when running simple
  commands.

Relnotes: yes

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

8 years agoMFC r296656:
mav [Mon, 28 Mar 2016 09:36:52 +0000 (09:36 +0000)]
MFC r296656:
Don't bother to invoke gmirror or zpool if the module is not loaded.

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

8 years agoMFC r296655, r296673, r296776: Unify and improve metadata wiping.
mav [Mon, 28 Mar 2016 09:35:29 +0000 (09:35 +0000)]
MFC r296655, r296673, r296776: Unify and improve metadata wiping.

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

8 years agoMFC r296654: Use `geom disk list` instead `camcontrol identify`.
mav [Mon, 28 Mar 2016 09:34:14 +0000 (09:34 +0000)]
MFC r296654: Use `geom disk list` instead `camcontrol identify`.

The new way works for almost any disk, while the old only for ATA.

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

8 years agoMFC r297051: Fix incorrect (fortunately bigger) malloc size.
mav [Mon, 28 Mar 2016 09:28:01 +0000 (09:28 +0000)]
MFC r297051: Fix incorrect (fortunately bigger) malloc size.

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

8 years agoMFC r297049: Add IDs for Intel Wellsburg USB controllers.
mav [Mon, 28 Mar 2016 09:26:44 +0000 (09:26 +0000)]
MFC r297049: Add IDs for Intel Wellsburg USB controllers.

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

8 years agoMFC r295463 (by hselasky): Correct PCI device description.
mav [Mon, 28 Mar 2016 09:26:00 +0000 (09:26 +0000)]
MFC r295463 (by hselasky): Correct PCI device description.

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

8 years agoMFC r275137 (by adrian): Add PCI ID for Intel Lynx Point LP controller.
mav [Mon, 28 Mar 2016 09:24:47 +0000 (09:24 +0000)]
MFC r275137 (by adrian):  Add PCI ID for Intel Lynx Point LP controller.

PR: kern/195398

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

8 years agoMFC r296449: Update meaning of -n argument.
mav [Mon, 28 Mar 2016 09:18:18 +0000 (09:18 +0000)]
MFC r296449: Update meaning of -n argument.

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

8 years agoMFC r296095:
pfg [Sun, 27 Mar 2016 19:42:42 +0000 (19:42 +0000)]
MFC r296095:
rpc: fix failure to clear string by passing the wrong size to memset.

Noted by NetBSD's PR/21014

Obtained from: NetBSD (CVS Rev. 1.24, 1.25)

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