202014 Commits

Author SHA1 Message Date
kib
811669954b MFC r297311:
Ensure that TRIMs are finished before unmount destroys ufsmount.
2016-04-10 16:32:21 +00:00
kib
27423b3aa6 MFC r297308:
Style: wrap long lines.
2016-04-10 16:27:46 +00:00
jilles
2ee68855a4 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.
2016-04-10 15:24:07 +00:00
jilles
4c6d087886 MFC r277645: cp,mv,touch: Set timestamps with nanosecond precision.
This uses utimensat().
2016-04-10 15:02:29 +00:00
dchagin
e29b7097a2 MFCR r297519, r297525 (by pfg@):
Move Linux specific times tests up to guarantee the values are defined.
2016-04-10 06:36:58 +00:00
jilles
8699198909 MFC r259017: test: Avoid looking up again the type of a known binary
operator.
2016-04-09 21:55:58 +00:00
jilles
f631ef3d78 MFC r258799: test: Simplify the code by unifying op_num and op_type.
The global variable t_wp_op is no longer needed.
2016-04-09 21:49:57 +00:00
jilles
e010ff64d6 MFC r281086: utimensat: Correct Capsicum required capability rights. 2016-04-09 21:04:51 +00:00
jilles
f563d215af MFC r287753: setuid(2): Suggest O_CLOEXEC instead of fcntl(F_SETFD). 2016-04-09 19:29:39 +00:00
jilles
0b7191c4ed MFC r297360: sh: Fix use-after-free if a trap replaces itself.
The mergeinfo for this commit was accidentally added to the previous commit.
2016-04-09 14:24:17 +00:00
jilles
1a49b5f5b0 MFC r278818: sh: Add stsavestr(), like savestr() but allocates using
stalloc().
2016-04-09 14:09:14 +00:00
jilles
15cca94824 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
2016-04-09 13:32:42 +00:00
asomers
336b1f7bb6 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.
2016-04-08 21:42:35 +00:00
asomers
1e918163f5 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.
2016-04-08 20:43:50 +00:00
jilles
04a8be1cdc MFC r295384: semget(2): Add missing [EINVAL] conditions.
PR:		206927
2016-04-08 15:43:49 +00:00
sbruno
44786516a4 Revert svn 297681 as it has been deprecated by svn 297575.
Submitted by:	Tomoaki AOKI <junchoon@dec.dakura.ne.jp>
2016-04-08 13:43:39 +00:00
mav
aec435c55b 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.
2016-04-08 10:00:07 +00:00
sbruno
dde534d3bd MFC r297237
Add 4k enabled cam quirks for Samsung SM863 Series SSDs
2016-04-07 18:03:42 +00:00
mav
8f57ccd875 MFC r297255: Unify ichwd(4) attachment messages in dmesg. 2016-04-07 08:32:37 +00:00
mav
4dd915bf8d MFC r286890 (by fabient):
Add ichwd TCO version 3 support (Bay Trail / Rangeley...)
2016-04-07 08:31:52 +00:00
hselasky
6df5b27586 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
2016-04-07 07:52:09 +00:00
hselasky
206a1c6d98 MFC r297444:
Fix bugs in currently unused bit searching loop.

Sponsored by:	Mellanox Technologies
2016-04-07 07:44:01 +00:00
hselasky
9706ffd556 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
2016-04-07 07:41:06 +00:00
hselasky
1c1fa6f80e MFC r296987:
Add missing curly brackets in for loop.

Sponsored by:	Mellanox Technologies
2016-04-07 07:36:54 +00:00
hselasky
09c7580f48 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
2016-04-07 07:35:02 +00:00
hselasky
0e933cfd2b 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
2016-04-07 07:29:57 +00:00
hselasky
28b34f7466 MFC r294526:
Add missing atomic wrapper macro.

Reviewed by:	alfred @
Sponsored by:	Mellanox Technologies
2016-04-07 07:21:27 +00:00
hselasky
d0a1b2369f 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.
2016-04-07 07:17:23 +00:00
hselasky
58bfc3556c 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
2016-04-07 07:12:14 +00:00
jhibbits
ee60d67180 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
2016-04-07 00:37:46 +00:00
davidcs
7b1674768e MFC r297155
Modifications to achieve a common source base from FreeBSD7.x thru 10.x
2016-04-06 21:04:39 +00:00
ngie
e7dde2ad9c 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
2016-04-06 06:37:36 +00:00
sbruno
48324f1236 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
2016-04-05 20:34:20 +00:00
sbruno
ec0d763b35 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
2016-04-05 18:27:47 +00:00
ume
ed9af0cb98 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.
2016-04-05 14:41:34 +00:00
dumbbell
16a32ce204 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
2016-04-05 08:37:21 +00:00
mav
2b329a8e38 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.
2016-04-05 06:37:58 +00:00
wblock
b113fbf045 MFC r297364:
Fix two more unhappy instances of "user land".
2016-04-04 16:41:35 +00:00
wblock
1a029dfe24 MFC r297330:
Adjust misleading wording of the -G option and simplify a few
surrounding sentences.  From a discussion on -ports.
2016-04-04 16:20:46 +00:00
marius
25f9e31d12 MFC: r292563
loader.efi: strip trailing whitespace

MFC: r293244 (remainder missing in r294275)

Introduce and use new EFI_ERROR_CODE macro for EFI errors
2016-04-04 12:21:04 +00:00
marius
83ca45c9a8 Now that 10.3-RELEASE is out, move stable/10 back to STABLE.
Approved by:	re (implicit)
2016-04-04 12:15:06 +00:00
mav
281ccdd8d1 MFC r297421: Plug open count leak on zvol rename. 2016-04-04 09:50:28 +00:00
mav
2bf9d9f911 MFC r297420: Switch from using make_dev_p() to make_dev_s() to close races. 2016-04-04 09:49:45 +00:00
mav
2eb569b386 MFC r297337: Pass through error code from make_dev_p().
ENAMETOOLONG is much more informative in logs then ENXIO.
2016-04-04 09:48:58 +00:00
mav
be0c6e50d7 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.
2016-04-04 09:47:39 +00:00
mav
2dae0103a3 MFC r277504 (by will): Remove commented log messages. 2016-04-04 09:36:56 +00:00
mav
3edfb33a29 MFC r277450 (by will):
Use the "zfs_gfs" tag for GFS vnodes to make them easier to identify.
2016-04-04 09:35:36 +00:00
mav
e049017c9a MFC r270382 (by delphij): MFV r270197:
Illumos issue:
    5066 remove support for non-ANSI compilation
    5068 Remove SCCSID() macro from <macros.h>
2016-04-04 09:30:57 +00:00
kib
dd5102e0a5 MFC r297139:
From libthr, remove special and strange code to set up session and
control terminal, activated when running with pid 1.
2016-04-04 06:49:20 +00:00
mav
9e293a9e32 MFC r287109 (by trasz): Make it possible to forcibly unmount devfs. 2016-04-03 14:38:02 +00:00