]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
6 years agoMFC r329846:
pfg [Wed, 28 Feb 2018 02:37:59 +0000 (02:37 +0000)]
MFC r329846:
getpeereid(3): Fix behavior on failure to match documentation.

According to the getpeereid(3) documentation, on failure the value -1 is
returned and the global variable errno is set to indicate the error. We
were returning the error instead.

Obtained from: Apple's Libc-1244.30.3

6 years agoMFC r329682:
rpokala [Wed, 28 Feb 2018 00:29:52 +0000 (00:29 +0000)]
MFC r329682:

mountd: Return proper errno values in a few error paths

When attempting to mount a non-directory which exists, return ENOTDIR
instead of ENOENT. If stat() or statfs() failed, don't pass part of the
invalid (struct statfs) to ex_search(). In that same case, preserve the
value of "bad" rather than overwriting with EACCES.

6 years agoMFC r318304: getusershell: don't write paste end of buffer reading shells
kevans [Tue, 27 Feb 2018 19:24:06 +0000 (19:24 +0000)]
MFC r318304: getusershell: don't write paste end of buffer reading shells

_local_initshells did not reset cp to the beginning of the line buffer for
every iteration that it called fgets(3), leading to writing past the end of
line with fairly long /etc/shells or excessively long line lengths. Correct
this by properly resetting cp.

PR: 192528

6 years agoMFC r329556,r329820 remove an assert in zfsctl_snapdir_lookup to match r323578
avg [Tue, 27 Feb 2018 14:50:19 +0000 (14:50 +0000)]
MFC r329556,r329820 remove an assert in zfsctl_snapdir_lookup to match r323578

6 years agoMFC r329364: move vintr_intercept_enabled under INVARIANTS
avg [Tue, 27 Feb 2018 14:47:17 +0000 (14:47 +0000)]
MFC r329364: move vintr_intercept_enabled under INVARIANTS

6 years agoMFC r328996: exec_map_first_page: fix an inverse condition introduced in r254138
avg [Tue, 27 Feb 2018 14:45:10 +0000 (14:45 +0000)]
MFC r328996: exec_map_first_page: fix an inverse condition introduced in r254138

6 years agoMFC r329016: remove a duplicate assignment
avg [Tue, 27 Feb 2018 14:42:40 +0000 (14:42 +0000)]
MFC r329016: remove a duplicate assignment

6 years agoMFC r328881: zfs: move a utility function, ioflags, closer to its consumers
avg [Tue, 27 Feb 2018 14:39:35 +0000 (14:39 +0000)]
MFC r328881: zfs: move a utility function, ioflags, closer to its consumers

6 years agoMFC r328776: ZFS ARC: restore illumos uses of 'needfree' that were removed in r325851
avg [Tue, 27 Feb 2018 14:32:33 +0000 (14:32 +0000)]
MFC r328776: ZFS ARC: restore illumos uses of 'needfree' that were removed in r325851

6 years agoMFC r328626: zfs_rezget: drop cached pages before doing anything else
avg [Tue, 27 Feb 2018 14:29:20 +0000 (14:29 +0000)]
MFC r328626: zfs_rezget: drop cached pages before doing anything else

6 years agoMFC r328217: zfs: no need to check that size of zfs_cmd_t is not greater than IOCPARM_MAX
avg [Tue, 27 Feb 2018 14:17:12 +0000 (14:17 +0000)]
MFC r328217: zfs: no need to check that size of zfs_cmd_t is not greater than IOCPARM_MAX

6 years agoMFC 328134: Update various statements in vmstat(8) to match reality.
jhb [Tue, 27 Feb 2018 01:28:19 +0000 (01:28 +0000)]
MFC 328134: Update various statements in vmstat(8) to match reality.

- The process stats are actually thread counts rather than process
  counts.
- Simplify various descriptions to remove mention of stats that are
  updated every 5 seconds (all VM related stats are now "instant",
  only the load average is updated every 5 seconds).
- Don't make any mention of special treatment for processes that have
  been active in the last 20 seconds.  We don't track that stat.
- Rework the description of active virtual memory.  Call it mapped
  virtual memory and explicitly point out it is not the same as the
  active page queue (which corresponds to "Active" in top(1)), and
  also hint at the possible bogusness of the value (e.g. if a process
  maps a single page out of a multiple GB file, the entire file's size
  is considered mapped).
- Simplify a few descriptions that implied their output was a value
  per interval.  All of the "rate" values are per-second rates scaled
  across the interval.
- Update a few comments for 'struct vmtotal' along similar lines.

6 years agoMFC r328514: Assume Always Running APIC Timer for AMD CPU families >= 0x12.
mav [Tue, 27 Feb 2018 00:31:49 +0000 (00:31 +0000)]
MFC r328514: Assume Always Running APIC Timer for AMD CPU families >= 0x12.

Fallback to HPET may cause locks congestions on many-core systems.
This change replicates Linux behavior.

6 years agoMFC r329563:
ae [Mon, 26 Feb 2018 12:01:42 +0000 (12:01 +0000)]
MFC r329563:
  Remove unused variables and sysctl declaration.

6 years agoMFC r329198:
hselasky [Mon, 26 Feb 2018 08:00:01 +0000 (08:00 +0000)]
MFC r329198:
Fix for incorrect PnP information used by devmatch(8).

Sponsored by: Mellanox Technologies

6 years agoMFC r329195:
hselasky [Mon, 26 Feb 2018 07:57:11 +0000 (07:57 +0000)]
MFC r329195:
Add new USB quirk.

PR: 225844
Sponsored by: Mellanox Technologies

6 years agoMFC r329362:
silby [Mon, 26 Feb 2018 02:12:09 +0000 (02:12 +0000)]
MFC r329362:
Prevent savecore from reading bounds from the current directory.

6 years agoBump the FreeBSD version to conclude the recent LinuxKPI related updates.
hselasky [Sun, 25 Feb 2018 10:52:46 +0000 (10:52 +0000)]
Bump the FreeBSD version to conclude the recent LinuxKPI related updates.

This is a direct commit.

Sponsored by:   Mellanox Technologies

6 years agoMFC r329471:
hselasky [Sun, 25 Feb 2018 10:51:39 +0000 (10:51 +0000)]
MFC r329471:
Implement BUILD_BUG_ON_INVALID() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329703:
hselasky [Sun, 25 Feb 2018 10:48:52 +0000 (10:48 +0000)]
MFC r329703:
Allow LinuxKPI character devices to receive mmap() calls from the Linux
binary mode user-space emulation layer. This is a regression issue after
r328436, when LinuxKPI character devices started to use DTYPE_DEV in
the "f_type" field of the associated file structure(s).

Found by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329472:
hselasky [Sun, 25 Feb 2018 10:47:33 +0000 (10:47 +0000)]
MFC r329472:
Allow the put_user() function macro to put constant values by using the
existing __put_user() macro.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329509:
hselasky [Sun, 25 Feb 2018 10:44:47 +0000 (10:44 +0000)]
MFC r329509:
Update the ktime type in the LinuxKPI to be a signed 64-bit integer similarly
to Linux, to avoid compilation issues. Implement ktime_get_real_seconds().

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329825:
hselasky [Sun, 25 Feb 2018 10:40:41 +0000 (10:40 +0000)]
MFC r329825:
Return correct error code to user-space when a system call receives a
signal in the LinuxKPI.

The read(), write() and mmap() system calls can return either EINTR or
ERESTART upon receiving a signal. Add code to figure out the correct
return value by temporarily storing the return code from the relevant
FreeBSD kernel APIs in the Linux task structure.

Sponsored by: Mellanox Technologies

6 years agoMFC r329584:
hselasky [Sun, 25 Feb 2018 10:39:39 +0000 (10:39 +0000)]
MFC r329584:
Implement list_safe_reset_next() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329523 and r329524:
hselasky [Sun, 25 Feb 2018 10:38:42 +0000 (10:38 +0000)]
MFC r329523 and r329524:
Fix implementation of xchg() function macro in the LinuxKPI.
The exchange operation must be atomic.

Sponsored by: Mellanox Technologies

6 years agoMFC r329519:
hselasky [Sun, 25 Feb 2018 10:37:07 +0000 (10:37 +0000)]
MFC r329519:
Implement support for radix_tree_for_each_slot() and radix_tree_exception()
in the LinuxKPI and use unsigned long type for the radix tree index.

Sponsored by: Mellanox Technologies

6 years agoMFC r329516:
hselasky [Sun, 25 Feb 2018 10:35:28 +0000 (10:35 +0000)]
MFC r329516:
Implement the KMEM_CACHE() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329515:
hselasky [Sun, 25 Feb 2018 10:34:47 +0000 (10:34 +0000)]
MFC r329515:
Make the vm_fault structure in the LinuxKPI compatible with
newer versions of the Linux kernel. No functional change.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329514:
hselasky [Sun, 25 Feb 2018 10:33:55 +0000 (10:33 +0000)]
MFC r329514:
Implement the rcu_dereference_raw() function macro.
Make sure all RCU dereferencing use the READ_ONCE() function macro.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329513:
hselasky [Sun, 25 Feb 2018 10:33:12 +0000 (10:33 +0000)]
MFC r329513:
Implement __GFP_BITS_SHIFT and __GFP_BITS_MASK macros in the LinuxKPI.
Add compile time asserts to catch conflicts with native defines.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329512:
hselasky [Sun, 25 Feb 2018 10:32:26 +0000 (10:32 +0000)]
MFC r329512:
Implement __list_del_entry() helper functions in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329511:
hselasky [Sun, 25 Feb 2018 10:31:27 +0000 (10:31 +0000)]
MFC r329511:
Implement file_inode() and call_mmap() helper functions in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329510:
hselasky [Sun, 25 Feb 2018 10:30:36 +0000 (10:30 +0000)]
MFC r329510:
Refactor dentry structure into its own header file in the LinuxKPI similary
to Linux. No functional change. Implement d_inode() helper function.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies
Sponsored by: Limelight Networks

6 years agoMFC r329477:
hselasky [Sun, 25 Feb 2018 10:29:43 +0000 (10:29 +0000)]
MFC r329477:
Implement spin_trylock_irq() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329476:
hselasky [Sun, 25 Feb 2018 10:28:52 +0000 (10:28 +0000)]
MFC r329476:
Stub more lockdep function macros in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329475:
hselasky [Sun, 25 Feb 2018 10:28:06 +0000 (10:28 +0000)]
MFC r329475:
Implement get_task_pid() function macro in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329470:
hselasky [Sun, 25 Feb 2018 10:26:44 +0000 (10:26 +0000)]
MFC r329470:
Add support for printk_ratelimit() function macro and improve the existing
printk_ratelimited() function macro to return a boolean stating if there
was a printout, true, or not, false.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329468:
hselasky [Sun, 25 Feb 2018 10:25:47 +0000 (10:25 +0000)]
MFC r329468:
Add support for kref_read() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329467:
hselasky [Sun, 25 Feb 2018 10:24:59 +0000 (10:24 +0000)]
MFC r329467:
Add support for mmgrab() function in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329466:
hselasky [Sun, 25 Feb 2018 10:24:08 +0000 (10:24 +0000)]
MFC r329466:
Add support for __percpu and __weak macros in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329465:
hselasky [Sun, 25 Feb 2018 10:23:23 +0000 (10:23 +0000)]
MFC r329465:
Move the IRQ_RETVAL() and irqreturn definitions to irqreturn.h in the
LinuxKPI to be compatible with Linux. No functional change.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329464:
hselasky [Sun, 25 Feb 2018 10:22:27 +0000 (10:22 +0000)]
MFC r329464:
Add checks for valid IRQ tag before setting up or tearing down an interrupt
handler in the LinuxKPI. This is needed when the interrupt handler is disabled
before freeing the interrupt.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329447:
hselasky [Sun, 25 Feb 2018 10:21:31 +0000 (10:21 +0000)]
MFC r329447:
Compile in the LinuxKPI.

Flexible array members are not allowed in a union.
Use a zero length array instead.

Reported by: jbeich@
Sponsored by: Mellanox Technologies

6 years agoMFC r329378:
hselasky [Sun, 25 Feb 2018 10:19:44 +0000 (10:19 +0000)]
MFC r329378:
Implement mutex_trylock_recursive() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329377:
hselasky [Sun, 25 Feb 2018 10:18:49 +0000 (10:18 +0000)]
MFC r329377:
Implement memdup_user_nul() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329376:
hselasky [Sun, 25 Feb 2018 10:18:02 +0000 (10:18 +0000)]
MFC r329376:
Implement tasklet_enable() and tasklet_disable() in the LinuxKPI.

Requested by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329372:
hselasky [Sun, 25 Feb 2018 10:15:52 +0000 (10:15 +0000)]
MFC r329372:
Implement enable_irq() and disable_irq() in the LinuxKPI.

Submitted by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329371:
hselasky [Sun, 25 Feb 2018 10:14:35 +0000 (10:14 +0000)]
MFC r329371:
Allow the cmpxchg() macro in the LinuxKPI to work on pointers without
generating compiler warnings, -Wint-conversion .

Requested by: Johannes Lundberg <johalun0@gmail.com>
Sponsored by: Mellanox Technologies

6 years agoMFC r329521:
markj [Sun, 25 Feb 2018 00:32:42 +0000 (00:32 +0000)]
MFC r329521:
Don't include DMAR map entry zone items in kernel dumps.

6 years agoMFC r329361:
cy [Sat, 24 Feb 2018 18:16:28 +0000 (18:16 +0000)]
MFC r329361:

Document memset_s(3). memset_s(3) is defined in
C11 standard (ISO/IEC 9899:2011) K.3.7.4.1 The memset_s function
(p: 621-622)

Fix memset(3) portion of the man page by replacing the first argument
(destination) "b" with "dest", which is more descriptive than "b".
This also makes it consistent with the term used in the memset_s()
portion of the man page.

See also http://en.cppreference.com/w/c/string/byte/memset.

Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D13682

6 years agoMFC r329561:
ae [Sat, 24 Feb 2018 13:04:02 +0000 (13:04 +0000)]
MFC r329561:
  Check packet length to do not make out of bounds access. Also save ah_nxt
  value to use it later, since ah pointer can become invalid.

  Reported by: Maxime Villard <max at m00nbsd dot net>

6 years agoMFC 327803: Flesh out static dtrace probes for /dev/crypto ioctl errors.
jhb [Fri, 23 Feb 2018 23:56:33 +0000 (23:56 +0000)]
MFC 327803: Flesh out static dtrace probes for /dev/crypto ioctl errors.

In particular, no probes were present for AEAD requests, but also for
some other error cases in other ioctl requests.

Sponsored by: Chelsio Communications

6 years agoMFC of 329749.
mckusick [Fri, 23 Feb 2018 22:23:28 +0000 (22:23 +0000)]
MFC of 329749.

Fix a read past the end of a buffer in fsck.

6 years agoMFC r323508:
rpokala [Fri, 23 Feb 2018 16:45:59 +0000 (16:45 +0000)]
MFC r323508:

When doing a non-interactive installation, don't display an interactive
warning about a filesystem which doesn't have a mountpoint. Presumably, the
person who wrote the install script knew what they were doing.

6 years agoMFC r329416:
kib [Fri, 23 Feb 2018 11:17:16 +0000 (11:17 +0000)]
MFC r329416:
Remove unused symbols.

6 years agoMFC r329091: Add sysctls for dnode block and indirect block shifts.
mav [Fri, 23 Feb 2018 00:38:42 +0000 (00:38 +0000)]
MFC r329091: Add sysctls for dnode block and indirect block shifts.

6 years agoMFC r329295:
rpokala [Thu, 22 Feb 2018 19:39:44 +0000 (19:39 +0000)]
MFC r329295:

Panasas discovered that ioctl(SIOCGLAGGPORT) returns ENOTTY for mxge(4) when
the NIC is not a member of a lagg. This came as a surprise, because the
SIOCGLAGGPORT handler in if_lagg.c only returns ENOENT (if run against the
laggX interface, rather than a physical port) or EINVAL (if run against a
non-member physical port). This behavior was not seen with other drivers,
such as bge(4), igb(4), and cxl(4). When I compared their respective ioctl
handlers, I found that they all called ether_ioctl() for the default (i.e.
unhandled) case; by contrast, mxge(4) only calls ether_ioctl() for two
specific cases, and returns ENOTTY for the default case.

Remove the two cases which explicitly call ether_ioctl(), and let the
default case call it instead. This matches what the vast majority of the NIC
drivers do.

6 years agoMFC r326633 r327282 r328085 r329311:
eadler [Thu, 22 Feb 2018 02:39:33 +0000 (02:39 +0000)]
MFC r326633 r327282 r328085 r329311:

share: update pci_vendors to 2018.02.15

6 years agoMFC r328605:
asomers [Thu, 22 Feb 2018 02:16:44 +0000 (02:16 +0000)]
MFC r328605:

zfsd: Don't spare a vdev that's being replaced

If a zfs pool contains a replacing vdev (either created manually by "zpool
replace" or by zfsd(8) via autoreplace by physical path) and then new spares
get added to the pool, zfsd shouldn't use one to replace the drive that is
already being replaced.  That's a waste of resources that just slows down
the rebuild.

PR: 225547
Sponsored by: Spectra Logic Corp

6 years agoMFC r328296:
asomers [Thu, 22 Feb 2018 02:15:45 +0000 (02:15 +0000)]
MFC r328296:

sys/netinet6: fix typos in comments.  No functional change.

Sponsored by: Spectra Logic Corp

6 years agoMFC r328266:
asomers [Thu, 22 Feb 2018 02:14:43 +0000 (02:14 +0000)]
MFC r328266:

mlock(2): correct documentation for error conditions.

The man page is years out of date regarding errors. Our implementation _does_
allow unaligned addresses, and it _does_not_ check for negative lengths,
because the length is unsigned. It checks for overflow instead.

Update the tests accordingly.

Reviewed by: bcr
Differential Revision: https://reviews.freebsd.org/D13826

6 years agoMFC r328108:
asomers [Thu, 22 Feb 2018 02:12:47 +0000 (02:12 +0000)]
MFC r328108:

gnop(8): add the ability to set a nop provider's physical path

While I'm here, expand the existing tests a bit.

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

6 years agoMFC r326399:
asomers [Thu, 22 Feb 2018 01:25:28 +0000 (01:25 +0000)]
MFC r326399:

Fix assertion when ZFS fails to open certain devices

"panic: vdev_geom_close_locked: cp->private is NULL"
This panic will result if ZFS fails to open a device due to either of the
following reasons:

1) The device's sector size is greater than 8KB.
2) ZFS wants to open the device RW, but it can't be opened for writing.

The solution is to change the initialization order to ensure that the
assertion will be satisfied.

PR: 221066
Reported by: David NewHamlet <wheelcomplex@gmail.com>
Reviewed by: avg
Sponsored by: Spectra Logic Corp
Differential Revision: https://reviews.freebsd.org/D13278

6 years agoMFC 323889: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.
jhb [Thu, 22 Feb 2018 00:53:05 +0000 (00:53 +0000)]
MFC 323889: Place the AAD before the plaintext/ciphertext for CIOCRYPTAEAD.

Software crypto implementations don't care how the buffer is laid out,
but hardware implementations may assume that the AAD is always before
the plain/cipher text and that the hash/tag is immediately after the end
of the plain/cipher text.

In particular, this arrangement matches the layout of both IPSec packets
and TLS frames.  Linux's crypto framework also assumes this layout for
AEAD requests.

Sponsored by: Chelsio Communications

6 years agoMFC r323067, r323184, r323185, r323195, r323196 (by cem)
truckman [Thu, 22 Feb 2018 00:36:12 +0000 (00:36 +0000)]
MFC r323067, r323184, r323185, r323195, r323196 (by cem)

------------------------------------------------------------------------
r323067 | cem | 2017-08-31 11:39:18 -0700 (Thu, 31 Aug 2017) | 4 lines

amdtemp.4: Update BKDG URL to current location

Sponsored by: Dell EMC Isilon

------------------------------------------------------------------------
r323184 | cem | 2017-09-05 08:13:41 -0700 (Tue, 05 Sep 2017) | 10 lines

Add smn(4) driver for AMD System Management Network

AMD Family 17h CPUs have an internal network used to communicate between
the host CPU and the PSP and SMU coprocessors.  It exposes a simple
32-bit register space.

Reviewed by: avg (no +1), mjoras, truckman
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12217

------------------------------------------------------------------------
r323185 | cem | 2017-09-05 08:19:14 -0700 (Tue, 05 Sep 2017) | 13 lines

amdtemp(4): Add support for Family 17h temperature sensor

The sensor value is formatted similarly to previous models (same
bitfield sizes, same units), but must be read off of the internal
System Management Network (SMN) from the System Management Unit (SMU)
co-processor.

PR: 218264
Reported and tested by: Nils Beyer <nbe AT renzel.net>
Reviewed by: avg (no +1), mjoras, truckman
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12217

------------------------------------------------------------------------
r323195 | cem | 2017-09-05 13:35:25 -0700 (Tue, 05 Sep 2017) | 8 lines

amdtemp(4): Do not probe not matching hostbridges

Some systems have hostbs that do not match our PCI device id criteria.
Detect and ignore these devices in probe.

PR: 218264
Sponsored by: Dell EMC Isilon

------------------------------------------------------------------------
r323196 | cem | 2017-09-05 14:00:33 -0700 (Tue, 05 Sep 2017) | 8 lines

amdsmn(4): Do not probe not matching hostbridges

Similar to r323195, but for amdsmn(4) driver (which borrowed some design).

Ignore hostbs that do not match our PCI device id criteria.

Sponsored by: Dell EMC Isilon

PR: 218264
Differential Revision: https://reviews.freebsd.org/D12217

6 years agoMFC r329525:
brooks [Wed, 21 Feb 2018 18:31:21 +0000 (18:31 +0000)]
MFC r329525:

Correct/improve the descriptions if kern.ipc.(shmsegs,sema,msqids).

The description of kern.ipc.shmsegs was wrong since 2005.  I updated the
others (which were more correct) to match.

PR: 225933
Reviewed by: cem
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D14391

6 years agoMFC r329256:
kib [Wed, 21 Feb 2018 11:29:07 +0000 (11:29 +0000)]
MFC r329256:
Cleanup unused page argument for vm_reserv_break().

6 years agoMFC r329254:
kib [Wed, 21 Feb 2018 11:28:05 +0000 (11:28 +0000)]
MFC r329254:
Ensure memory consistency on COW.

6 years agoMFC r329252:
kib [Wed, 21 Feb 2018 11:26:59 +0000 (11:26 +0000)]
MFC r329252:
Do not call pmap_enter() with invalid protection mode.

6 years agoMerge rev. 329197 from HEAD:
n_hibma [Tue, 20 Feb 2018 19:33:33 +0000 (19:33 +0000)]
Merge rev. 329197 from HEAD:

 DSCP values passed to setdscp need to be lowercase.

6 years agoMFC r325410:
gonzo [Tue, 20 Feb 2018 18:12:07 +0000 (18:12 +0000)]
MFC r325410:

Increase TX_MAX_SEGS from 10 to 20 for the if_awg.c driver

Under certain traffic pattern awg driver does not recover from TX queue
full condition. The actual source of the problem is not identified yet
but jmcneill@ agreed that bumping TX_MAX_SEGS to 20 is OK as a workaround
for the problem (NetBSD has it set to 128).

Also add some diagnostic printfs to prevent silent failure of bus_dma
functions in the future

PR will be kept open until root cause of the issue is identified and fixed

PR: 219927
Submitted by: Tom Vijlbrief <tvijlbrief@gmail.com>
Approved by: jmcneill

6 years agoMFC r329216:
kib [Tue, 20 Feb 2018 10:35:13 +0000 (10:35 +0000)]
MFC r329216:
linuxkpi: Do not leak pages on put.

6 years agoMFC r329215:
kib [Tue, 20 Feb 2018 10:34:15 +0000 (10:34 +0000)]
MFC r329215:
Do not leak rv->psind in some specific situations.

6 years agoMFC r328938:
markj [Tue, 20 Feb 2018 00:34:42 +0000 (00:34 +0000)]
MFC r328938:
Simplify synchronization read error handling.

6 years agoMFC r327502:
gonzo [Mon, 19 Feb 2018 19:55:29 +0000 (19:55 +0000)]
MFC r327502:

nctgpio: add new device id for the GPIO chip in PCEngines APU3

PR: 224512
Submitted by: mike@sentex.net

6 years agoMFC r329374:
markj [Mon, 19 Feb 2018 17:03:50 +0000 (17:03 +0000)]
MFC r329374:
Use the conventional name for an array of pages.

6 years agoMFC r329181
vangyzen [Mon, 19 Feb 2018 15:56:33 +0000 (15:56 +0000)]
MFC r329181

Update the MTU in affected routes when IPv6 RA changes the MTU

ip6_calcmtu() only looks at the interface MTU if neither the TCP hostcache
nor the route provides an MTU.  Update the routes so they do not provide
stale MTUs.

This fixes UNH IPv6 conformance test cases v6LC_4_1_08 and v6LC_4_1_09,
which use a RA to reduce the link MTU from 1500 to 1280.

Reported and tested by: Farrell Woods <Farrell_Woods@Dell.com>
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14257

6 years agoMFC r329053
vangyzen [Mon, 19 Feb 2018 15:54:26 +0000 (15:54 +0000)]
MFC r329053

Fix ICMPv6 redirects

icmp6_redirect_input() validates that a redirect packet came from the
current gateway for the respective destination.  To do this, it compares
the source address, which has an embedded scope zone id, to the next-hop
address, which does not.  If the address is link-local, which should be
the case, the comparison fails and the redirect is ignored.

Insert the scope zone id into the next-hop address so the comparison
is accurate.

Unsurprisingly, this fixes 35 UNH IPv6 conformance test cases.

Submitted by: Farrell Woods <Farrell_Woods@Dell.com> (initial revision)
Reviewed by: ae melifaro dab
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14254

6 years agoMFC r329347:
kib [Mon, 19 Feb 2018 10:59:19 +0000 (10:59 +0000)]
MFC r329347:
Note that on amd64 pmap_enter(psind = 1) works.

6 years agoMFC r328541:
ae [Mon, 19 Feb 2018 10:34:30 +0000 (10:34 +0000)]
MFC r328541:
  Do not skip scope zone violation check, when mbuf has M_FASTFWD_OURS flag.

  When mbuf has M_FASTFWD_OURS flag, this means that a destination address
  is our local, but we still need to pass scope zone violation check,
  because protocol level expects that IPv6 link-local addresses have
  embedded scope zone indexes. This should fix the problem, when ipfw is
  used to forward packets to local address and source address of a packet
  is IPv6 LLA.

  Reported by: asomers@

6 years agoMFC r328540:
ae [Mon, 19 Feb 2018 10:30:34 +0000 (10:30 +0000)]
MFC r328540:
  Assign IPv6 link-local address to loopback interfaces whith unit > 0.

  When an interface has IFF_LOOPBACK flag in6_ifattach() tries to assing
  IPv6 loopback address to this interface. It uses in6ifa_ifpwithaddr()
  to check, that interface doesn't already have given address and then
  uses in6_ifattach_loopback(). If in6_ifattach_loopback() fails, it just
  exits and thus skips assignment of IPv6 LLA.
  Fix this using in6ifa_ifwithaddr() function. If IPv6 loopback address is
  already assigned in the system, do not call in6_ifattach_loopback().

  PR: 138678

6 years agoMFC r328864:
wulf [Sun, 18 Feb 2018 22:04:42 +0000 (22:04 +0000)]
MFC r328864:

psm(4): Fix panic occuring soon after PS/2 packet has been rejected by
synaptics or elantech sanity checker.

After packet has been rejected contents of packet buffer is not cleared
with setting of inputbytes counter to 0. So when this packet buffer is
filled again being an element of circular queue, new data appends to old
data rather than overwrites it. This leads to packet buffer overflow
after 10 rounds.

Fix it with setting of packet's inputbytes counter to 0 after rejection.

While here add extra logging of rejected packets.

PR: 222667 (for reference)
Reported by: Neel Chauhan <neel@neelc.org>
Tested by: Neel Chauhan <neel@neelc.org>

6 years agoMFC r329092:
brooks [Sun, 18 Feb 2018 20:49:43 +0000 (20:49 +0000)]
MFC r329092:

Add a deprecation warning when using the feature which mounts devices
to see how much space it on them.

Adjust MOUNT_CHAR_DEVS to allow the free space of already mounted
devices to be displayed and report an appropriate error if the
device isn't mounted.

Reviewed by: cem
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D8801

6 years agoMFC r320851:
markj [Sun, 18 Feb 2018 19:46:57 +0000 (19:46 +0000)]
MFC r320851:
Add a helper function to agp(4) which installs a single GTT entry.

6 years agoMFC r329101:
ae [Sun, 18 Feb 2018 11:36:46 +0000 (11:36 +0000)]
MFC r329101:
  Reinitialize IP header length after checksum calculation. It is used
  later by TCP-MD5 code.

  This fixes the problem with broken TCP-MD5 over IPv4 when NIC has
  disabled TCP checksum offloading.

  PR: 223835

6 years agoMFC r328256:
mav [Sun, 18 Feb 2018 00:27:35 +0000 (00:27 +0000)]
MFC r328256:
MFV r328255: 8972 zfs holds: In scripted mode, do not pad columns with spaces

illumos/illumos-gate@e9b7d6e7f7a6477679a35b73eb3934b096b3dd39

https://www.illumos.org/issues/8972:
'zfs holds -H' does not properly output content in scripted mode. It uses a
tab instead of two spaces, but it still pads column widths with spaces when
it should not.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Allan Jude <allanjude@freebsd.org>

6 years agoMFC r328254:
mav [Sun, 18 Feb 2018 00:26:34 +0000 (00:26 +0000)]
MFC r328254:
MFV r328253: 8835 Speculative prefetch in ZFS not working for misaligned reads

illumos/illumos-gate@5cb8d943bc8513c6230589aad5a409d58b0297cb

https://www.illumos.org/issues/8835:
Sequential reads not aligned to block size are not detected by ZFS
prefetcher as sequential, killing prefetch and severely hurting
performance.  It is caused by dmu_zfetch() in case of misaligned
sequential accesses being called with overlap of one block.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Allan Jude <allanjude@freebsd.org>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Alexander Motin <mav@FreeBSD.org>

6 years agoMFC r328252: MFV r328251: 8652 Tautological comparisons with ZPROP_INVAL
mav [Sun, 18 Feb 2018 00:26:00 +0000 (00:26 +0000)]
MFC r328252: MFV r328251: 8652 Tautological comparisons with ZPROP_INVAL

illumos/illumos-gate@4ae5f5f06c6c2d1db8167480f7d9e3b5378ba2f2

https://www.illumos.org/issues/8652:
Clang and GCC prefer to use unsigned ints to store enums. With Clang, that
causes tautological comparison warnings when comparing a zfs_prop_t or
zpool_prop_t variable to the macro ZPROP_INVAL. It's likely that error
handling code is being silently removed as a result.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Alan Somers <asomers@gmail.com>

6 years agoMFC r328250: MFV r328249:
mav [Sun, 18 Feb 2018 00:25:21 +0000 (00:25 +0000)]
MFC r328250: MFV r328249:
8641 "zpool clear" and "zinject" don't work on "spare" or "replacing" vdevs

illumos/illumos-gate@2ba5f978a4f9b02da9db1b8cdd9ea5498eb00ad9

https://www.illumos.org/issues/8641:
"zpool clear" and "zinject -d" can both operate on specific vdevs, either
leaf or interior. However, due to an oversight, neither works on a "spare"
or "replacing" vdev. For example:

sudo zpool create foo raidz1 c1t5000CCA000081D61d0 c1t5000CCA000186235d0 spare c
1t5000CCA000094115d0
sudo zpool replace foo c1t5000CCA000186235d0 c1t5000CCA000094115d0
$ zpool status foo pool: foo
state: ONLINE
scan: resilvered 81.5K in 0h0m with 0 errors on Fri Sep 8 10:53:03 2017
config:

NAME                         STATE     READ WRITE CKSUM
        foo                          ONLINE       0     0     0
          raidz1-0                   ONLINE       0     0     0
            c1t5000CCA000081D61d0    ONLINE       0     0     0
            spare-1                  ONLINE       0     0     0
              c1t5000CCA000186235d0  ONLINE       0     0     0
              c1t5000CCA000094115d0  ONLINE       0     0     0
        spares
          c1t5000CCA000094115d0      INUSE     currently in use
$ sudo zinject -d spare-1 -A degrade foo
cannot find device 'spare-1' in pool 'foo'
$ sudo zpool clear foo spare-1
cannot clear errors for spare-1: no such device in pool

Even though there was nothing to clear, those commands shouldn't have
reported an error. by contrast, trying to clear "raidz1-0" works just fine:
$ sudo zpool clear foo raidz1-0

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Alan Somers <asomers@gmail.com>

6 years agoMFC r328248: MFV r328247:
mav [Sun, 18 Feb 2018 00:24:31 +0000 (00:24 +0000)]
MFC r328248: MFV r328247:
8959 Add notifications when a scrub is paused or resumed

illumos/illumos-gate@301fd1d6f25595cd8c6d6795f39c72d97aff8cd9

Reviewed by: Alek Pinchuk <pinchuk.alek@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Sean Eric Fagan <sef@ixsystems.com>

6 years agoMFC r328246:
mav [Sun, 18 Feb 2018 00:23:51 +0000 (00:23 +0000)]
MFC r328246:
MFV r328245: 8856 arc_cksum_is_equal() doesn't take into account ABD-logic

illumos/illumos-gate@01a059ee0cdece49f47fd4d70086dd5bc7d0b0ff

https://www.illumos.org/issues/8856:
arc_cksum_is_equal() calls zio_push_transform() that requires abd_t*
(second arg), but a void* is passed.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Roman Strashkin <roman.strashkin@nexenta.com>

6 years agoMFC r328234: MFV r328233:
mav [Sun, 18 Feb 2018 00:23:12 +0000 (00:23 +0000)]
MFC r328234: MFV r328233:
8898 creating fs with checksum=skein on the boot pools fails ungracefully

illumos/illumos-gate@9fa2266d9a78b8366e1cd2d5f050e8b5e37d558c

https://www.illumos.org/issues/8898:
# zfs create -o checksum=skein rpool/test
internal error: Result too large
Abort (core dumped)

Not a big deal per se, but should be handled correctly.

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Andy Stormont <astormont@racktopsystems.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

PR:             222199

6 years agoMFC r328232:
mav [Sun, 18 Feb 2018 00:21:42 +0000 (00:21 +0000)]
MFC r328232:
MFV r328231: 8897 zpool online -e fails assertion when run on non-leaf vdevs

illumos/illumos-gate@9a551dd645b478816cb11251b19f5034d885bf01

https://www.illumos.org/issues/8897:
# zpool online -e test mirror-1
Assertion failed: nvlist_lookup_string(tgt, "path", &pathname) == 0, file ../common/libzfs_pool.c, line 2558, function zpool_vdev_online
Abort (core dumped)

Not a big deal per se, but should be handled gracefully, same way as 'offline' and 'online' without '-e'.

Also reported as: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221408

Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Yuri Pankov <yuri.pankov@nexenta.com>

6 years agoMFC r328230: MFV r328229:
mav [Sun, 18 Feb 2018 00:20:46 +0000 (00:20 +0000)]
MFC r328230: MFV r328229:
8930 zfs_zinactive: do not remove the node if the filesystem is readonly

illumos/illumos-gate@93c618e0f4932dc0bb9a9c90d8c4a5d029de5797

https://www.illumos.org/issues/8930:
We normally remove an unlinked node when its last user goes away and the
node becomes inactive. However, we should not do that if the filesystem
is mounted read-only including the case where it has its readonly
property set. The node will remain on the unlinked queue, so it will
not be leaked.

One particular scenario is when we receive an incremental stream into a
mounted read-only filesystem and that stream contains an unlinked file
(still on the unlinked queue). If that file is opened before the
receive and some time later after the receive it becomes inactive we
would remove it and, thus, modify the read-only filesystem. As a
result, the filesystem would diverge from its source and further
incremental receives would not be possible (without forcing a rollback).

Another related scenario, that may or may not be possible depending on an
OS / VFS policy, is when an open file is unlinked, then the filesystem is
remounted read-only, and then the file is closed.

Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Gordon Ross <gwr@nexenta.com>
Author: Andriy Gapon <avg@FreeBSD.org>

6 years agoMFC r328228: MFV r328227: 8909 8585 can cause a use-after-free kernel panic
mav [Sun, 18 Feb 2018 00:20:06 +0000 (00:20 +0000)]
MFC r328228: MFV r328227: 8909 8585 can cause a use-after-free kernel panic

illumos/illumos-gate@94ddd0900a8838f62bba15e270649a42f4ef9f81

https://www.illumos.org/issues/8909:
There's a race condition that exists if `zil_free_lwb` races with either
`zil_commit_waiter_timeout` and/or `zil_lwb_flush_vdevs_done`.

Here's an example panic due to this bug:

> ::status
    debugging crash dump vmcore.0 (64-bit) from ip-10-110-205-40
    operating system: 5.11 dlpx-5.2.2.0_2017-12-04-17-28-32b6ba51fb (i86pc)
    image uuid: 4af0edfb-e58e-6ed8-cafc-d3e9167c7513
    panic message:
    BAD TRAP: type=e (#pf Page fault) rp=ffffff0010555970 addr=60 occurred in mo
dule "zfs" due to a NULL pointer dereference
    dump content: kernel pages only

> $c
    zio_shrink+0x12()
    zil_lwb_write_issue+0x30d(ffffff03dcd15cc0ffffff03e0730e20)
    zil_commit_waiter_timeout+0xa2(ffffff03dcd15cc0ffffff03d97ffcf8)
    zil_commit_waiter+0xf3(ffffff03dcd15cc0ffffff03d97ffcf8)
    zil_commit+0x80(ffffff03dcd15cc0, 9a9)
    zfs_write+0xc34(ffffff03dc38b140ffffff0010555e60, 40, ffffff03e00fb758, 0)
    fop_write+0x5b(ffffff03dc38b140ffffff0010555e60, 40, ffffff03e00fb758, 0)
    write+0x250(42, fffffd7ff4832000, 2000)
    sys_syscall+0x177()

If there's an outstanding lwb that's in `zil_commit_waiter_timeout`
waiting to timeout, waiting on it's waiter's CV, we must be sure not to
call `zil_free_lwb`. If we end up calling `zil_free_lwb`, then that LWB
may be freed and can result in a use-after-free situation where the
stale lwb pointer stored in the `zil_commit_waiter_t` structure of the
thread waiting on the waiter's CV is used.

A similar situation can occur if an lwb is issued to disk, and thus in
the `LWB_STATE_ISSUED` state, and `zil_free_lwb` is called while the
disk is servicing that lwb. In this situation, the lwb will be freed by
`zil_free_lwb`, which will result in a use-after-free situation when the
lwb's zio completes, and `zil_lwb_flush_vdevs_done` is called.

This race condition is prevented in `zil_close` by calling `zil_commit`
before `zil_free_lwb` is called, which will ensure all outstanding (i.e.
all lwb's in the `LWB_STATE_OPEN` and/or `LWB_STATE_ISSUED` states)
reach the `LWB_STATE_DONE` state before the lwb's are freed
(`zil_commit` will not return untill all the lwb's are
`LWB_STATE_DONE`).

Further, this race condition is prevented in `zil_sync` by only calling
`zil_free_lwb` for lwb's that do not have their `lwb_buf` pointer set.
All lwb's not in the `LWB_STATE_DONE` state will have a non-null value
for this pointer; the pointer is only cleared in
`zil_lwb_flush_vdevs_done`, at which point the lwb's state will be
changed to `LWB_STATE_DONE`.

This race is present in `zil_suspend`, leading to this bug.

At first glance, it would appear as though this would not be true
because `zil_suspend` will call `zil_commit`, just like `zil_close`, but
the problem is that `zil_suspend` will set the zilog's `zl_suspend`
field prior to calling `zil_commit`. Further, in `zil_commit`, if
`zl_suspend` is set, `zil_commit` will take a special branch of logic
and use `txg_wait_synced` instead of performing the normal `zil_commit`
logic.

This call to `txg_wait_synced` might be good enough for the data to
reach disk safely before it returns, but it does not ensure that all
outstanding lwb's reach the `LWB_STATE_DONE` state before it returns.
This is because, if there's an lwb "stuck" in
`zil_commit_waiter_timeout`, waiting for it's lwb to timeout, it will
maintain a non-null value for it's `lwb_buf` field and thus `zil_sync`
will not free that lwb. Thus, even though the lwb's data is already on
disk, the lwb will be left lingering, waiting on the CV, and will
eventually timeout and be issued to disk even though the write is
unnesseary.

So, after `zil_commit` is called from `zil_suspend`, we incorrectly
assume that there are not outstanding lwb's, and proceed to free all
lwb's found on the zilog's lwb list. As a result, we free the lwb that
will later be used `zil_commit_waiter_timeout`.

Reviewed by: John Kennedy <jwk404@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Brad Lewis <brad.lewis@delphix.com>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

6 years agoMFC r328226: MFV r328225:
mav [Sun, 18 Feb 2018 00:19:03 +0000 (00:19 +0000)]
MFC r328226: MFV r328225:
8603 rename zilog's "zl_writer_lock" to "zl_issuer_lock"

illumos/illumos-gate@cf07d3da9915c0d22da8f59e991639f819463cef

https://www.illumos.org/issues/8603:
  To help make the ZIL's code more understandable, it was suggested that
  the zilog_t's "zl_writer_lock" field should be renamed to "zl_issuer_lock".

Reviewed by: C Fraire <cfraire@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
Author: Prakash Surya <prakash.surya@delphix.com>

6 years agoMFC r328224: MFV r328220: 8677 Open-Context Channel Programs
mav [Sun, 18 Feb 2018 00:17:37 +0000 (00:17 +0000)]
MFC r328224: MFV r328220: 8677 Open-Context Channel Programs

illumos/illumos-gate@a3b2868063897ff0083dea538f55f9873eec981f

https://www.illumos.org/issues/8677
  We want to be able to run channel programs outside of synching context.
  This would greatly improve performance of channel program that just gather
  information, as we won't have to wait for synching context anymore.

  This feature should introduce the following:
  - A new command line flag in "zfs program" to specify our intention to
  run in open context.
  - A new flag/option within the channel program ioctl which selects the
  context.
  - Appropriate error handling whenever we try a channel program in
  open-context that contains zfs.sync* expressions.
  - Documentation for the new feature in the manual pages.

Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: Chris Williamson <chris.williamson@delphix.com>
Reviewed by: Pavel Zakharov <pavel.zakharov@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Serapheim Dimitropoulos <serapheim@delphix.com>

6 years agoMFC r323002 (by emaste): zfs: do not advertise edonr which is not yet supported
mav [Sat, 17 Feb 2018 23:54:59 +0000 (23:54 +0000)]
MFC r323002 (by emaste): zfs: do not advertise edonr which is not yet supported

illumos 4185 ("add new cryptographic checksums to ZFS: SHA-512,
Skein, Edon-R") was intentionally merged only partially in r289422,
without adding support for skein, sha512 and edonr on FreeBSD.

Support for skein and sha512 was added later on, but edonr is still not
implemented in FreeBSD.

Prior to this commit zfs(8) correctly rejected edonr, but with an error
message that claimed support:

fk@r500 ~ $zfs set checksum=edonr tank
cannot set property for 'tank': 'checksum' must be one of 'on | off | fletcher2 | fletcher4 | sha256 | sha512 | skein | edonr'

6 years agoMFC r321104 (by jhibbits): Make ZFS not crash on mount on 32-bit systems
mav [Sat, 17 Feb 2018 23:51:15 +0000 (23:51 +0000)]
MFC r321104 (by jhibbits): Make ZFS not crash on mount on 32-bit systems

ZPL_VERSION is unsigned long long, not an int.  With this change, a zpool
can be created on a 32-bit system (tested on powerpcspe) and mounted
correctly.

6 years agoMFC r319671:
mav [Sat, 17 Feb 2018 23:05:19 +0000 (23:05 +0000)]
MFC r319671:
SHA-512 and Skein have been supported by the boot loader for some time.