]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFC r339957:
Mateusz Piotrowski [Fri, 13 Mar 2020 09:07:02 +0000 (09:07 +0000)]
MFC r339957:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24052

ps(1): Add a standard exit status section

Reviewed by: bcr, eadler
Approved by: krion (mentor)
Differential Revision: https://reviews.freebsd.org/D17146

4 years agoMFC r358838:
Hans Petter Selasky [Fri, 13 Mar 2020 08:56:10 +0000 (08:56 +0000)]
MFC r358838:
Add support for the device statistics IOCTL, needed by the coming
linux_libusb upgrade.

Sponsored by: Mellanox Technologies

4 years agoMFC r358695:
Hans Petter Selasky [Fri, 13 Mar 2020 08:52:50 +0000 (08:52 +0000)]
MFC r358695:
Define more subsystem orders.
Intended for use with module_init_order() in the LinuxKPI.

Sponsored by: Mellanox Technologies

4 years agoMFC r358694:
Hans Petter Selasky [Fri, 13 Mar 2020 08:49:06 +0000 (08:49 +0000)]
MFC r358694:
Fix some whitespace issues in ipoib.

Sponsored by: Mellanox Technologies

4 years agoMFC r339962:
Mateusz Piotrowski [Fri, 13 Mar 2020 08:41:28 +0000 (08:41 +0000)]
MFC r339962:

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24047

ps(1): Pet mandoc and igor

- Use Xr to reference other manual pages.
- Reference execve(2) instead of exec(2) as exec(2) does not exist.
- Remove the deprecated "Tn" macro.
- Improve the formatting of the etime description.

Reviewed by: bcr
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17780

4 years agoMFC r358533:
Martin Matuska [Fri, 13 Mar 2020 01:05:40 +0000 (01:05 +0000)]
MFC r358533:
Sync libarchive with vendor.

Relevant vendor changes:
  Issue #1257: Add testcase for ZIPX files with LZMA_STREAM_END marker
  PR #1331: cpio.5: fix hard link description
  Issue #1335: archive_read.c: fix UBSan warning about undefined behavior
  Issue #1338: XAR reader: fix UBSan warning about undefined behavior
  Issue #1339: bsdcpio_test: fix datatype in from_hex()
  Issue #1341: Safe writes: delete temporary file if rename fails.
  Issue #1341: Safe writes: improve error handling

4 years agoFix sample check in hwpmc
Matt Macy [Thu, 12 Mar 2020 20:59:00 +0000 (20:59 +0000)]
Fix sample check in hwpmc

Don't drop samples with callchain pending

Tested by: mjg@

MFC of r353483

4 years agoMFC 339729:
Mateusz Piotrowski [Thu, 12 Mar 2020 20:51:04 +0000 (20:51 +0000)]
MFC 339729:

efivar(3): Fix some typos and improve style

- Fix some typos.
- Remove redundant semicolons from the synopsis section.
- Stylize variable names and types with Vt and Va respectively.
- Use a list to present non-implemented functions.
- Sort the order of the sections.
- Add a history section.
- Use Nm when "libefivar" is mentioned.

PR: 232626
Reported by: Tiwei Bie <btw@mail.ustc.edu.cn>
Reviewed by: bcr, imp
Approved by: krion (mentor, implicit), mat (mentor, implicit)
Differential Revision: https://reviews.freebsd.org/D17686

Approved by: bcr (mentor)
Differential Revision: https://reviews.freebsd.org/D24044

4 years agoMFC r358852:
Li-Wen Hsu [Thu, 12 Mar 2020 19:10:53 +0000 (19:10 +0000)]
MFC r358852:

Skip sys.netpfil.pf.nat.exhaust on amd64 in CI as it sometimes panics kernel

PR: 244703
Sponsored by: The FreeBSD Foundation

4 years agoMFC r339990:
Mateusz Piotrowski [Thu, 12 Mar 2020 19:00:28 +0000 (19:00 +0000)]
MFC r339990:

mount_smbfs(8): Add the STANDARDS and HISTORY sections

- Document that mount_smbfs(8) only supports SMB1 and that SMB2 and SMB3
  are not supported at the moment. Suggest users to browse ports for
  software compatible with newer versions of the protocol.
- Copy supported servers list from README.
- Add a SEE ALSO section and reference the chapter about Samba in the
  FreeBSD Handbook.
- Add a HISTORY section.
- Style changes:
  - Use Dq instead of Em in the EXAMPLES section.
  - Mark command modifiers with Cm.

Reviewed by:    bcr
Approved by:    bcr (mentor)
Approved by:    krion (mentor, implicit), mat (mentor, implicit)
Sponsored by:   Bally Wulff Games & Entertainment GmbH
Differential Revision:  https://reviews.freebsd.org/D17798

4 years agoMFC r358676:
Konstantin Belousov [Thu, 12 Mar 2020 16:09:41 +0000 (16:09 +0000)]
MFC r358676:
buffer pager: deref ucred immediately after read.

4 years agoMFC r358826:
Konstantin Belousov [Thu, 12 Mar 2020 16:07:41 +0000 (16:07 +0000)]
MFC r358826:
posixshmcontrol: add an undocumented alias 'list' for the 'ls' command.

4 years agoMFC r358683: Remove vfs.zfs.top_maxinflight tunable/sysctl.
Alexander Motin [Thu, 12 Mar 2020 03:59:51 +0000 (03:59 +0000)]
MFC r358683: Remove vfs.zfs.top_maxinflight tunable/sysctl.

It is dead since sorted scrub import at r334844.

4 years agoMFC r358463:
Li-Wen Hsu [Wed, 11 Mar 2020 13:45:53 +0000 (13:45 +0000)]
MFC r358463:

Fix test cases after r358448 (r358870 in stable/12)

sbin.pfctl.pfctl_test.pf0087
sbin.pfctl.pfctl_test.selfpf0087

Sponsored by: The FreeBSD Foundation

4 years agoMFC r358624:
Konstantin Belousov [Wed, 11 Mar 2020 08:51:19 +0000 (08:51 +0000)]
MFC r358624:
mlx5en: Support 50GBase-KR4 media type in mlx5en driver.

Sponsored by: Mellanox Technologies

4 years agoMFC r358537:
Hans Petter Selasky [Wed, 11 Mar 2020 08:32:15 +0000 (08:32 +0000)]
MFC r358537:
Expose the ACPI power button, sleep button and LID state as evdev's.

This allows libinput to disable touchpads when the lid is closed and
various desktop environments can show power-off dialogs when the power
button is pressed. While the latter is doable with devd a
cross-platform solution is nicer.

Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D23863
Sponsored by: Mellanox Technologies

4 years agoMFC r358586:
Hans Petter Selasky [Wed, 11 Mar 2020 08:28:12 +0000 (08:28 +0000)]
MFC r358586:
When closing a LinuxKPI file always use the real release function to avoid
resource leakage when destroying a LinuxKPI character device.

Submitted by: Andrew Boyer <aboyer@pensando.io>
Reviewed by: kib@
PR: 244572
Sponsored by: Mellanox Technologies

4 years agoMFC r358629:
Hans Petter Selasky [Wed, 11 Mar 2020 08:24:50 +0000 (08:24 +0000)]
MFC r358629:
Implement a detaching flag for the sound(4) subsystem to take
appropriate actions when we are trying to detach an audio device,
but cannot because someone is using it.

This avoids applications having to wait for the DSP read data
timeout before they receive any error indication.
Tested with virtual_oss(8).

Remove some unused definitions while at it.

PR: 194727
Sponsored by: Mellanox Technologies

4 years agoMFC r358738:
Hans Petter Selasky [Wed, 11 Mar 2020 08:20:14 +0000 (08:20 +0000)]
MFC r358738:
Remove the power bit from the super speed root hub port status register
because it clobbers the super speed link status when a device is in super
speed mode. Currently the power bit is not needed for anything in the USB
hub driver.

This fixes USB warm reset for super speed devices.

Tested by: Shichun.Ma@dell.com
Sponsored by: Mellanox Technologies

4 years agoMFC r358154 (by delphij)
Pedro F. Giffuni [Wed, 11 Mar 2020 05:45:33 +0000 (05:45 +0000)]
MFC r358154 (by delphij)
Bump PROTOMAX: this matches the value on NetBSD and will be necessary for
future updates.

MFC r r358448;
/etc/services: attempt to bring the database to this century.

This is the result of splitting r358153 in two, in order to avoid a build
system bug and being able to merge the change to previous releases..

Document better this file, updating the URL to the IANA registry and closely
match the official services.

For system ports (0 to 1023) we now try to follow the registry closely, noting
some historical differences where applicable.

As a side effect: drop references to unofficial Kerberos IV which was EOL'ed
on Oct 2006[1]. While it is conceivable some people may still use it in some
very old FreeBSD machines that can't be replaced easily, the use of it is
considered a security risk. Also drop the unofficial netatalk, which we
supported long ago in the kernel but was dropped long ago.

Leave for now smtps, even though it conflicts with IANA's submissions.
The change should have very little visibility, if any, but should be a
step closer to the current IANA database.

[1] https://web.mit.edu/kerberos/krb4-end-of-life.html

4 years agoMFC r358580: Increase number of write completion threads, matching ZoL.
Alexander Motin [Tue, 10 Mar 2020 15:18:53 +0000 (15:18 +0000)]
MFC r358580: Increase number of write completion threads, matching ZoL.

Our iSCSI benchmarks on a large 80-core system show that previous limit
of 8 threads can be a bottleneck.  At some points this change increases
write IOPS by as much as 50%.  I am still not sure that so many threads
is really required, but we tested lower amounts and got no significant
benefits, while latencies were a bit worse, so decided to not diverge.

4 years agoMFC r358352:
Sergio Carlavilla Delgado [Mon, 9 Mar 2020 19:55:13 +0000 (19:55 +0000)]
MFC r358352:
Add HISTORY sections to tree(3), stdarg(3) and sigevent(3)

Submitted by: gbergling@gmail.com
Approved by: bcr@(mentor)

4 years agoMFC r346299: iflibtxrx.9: update function descriptions to match implementation
Ed Maste [Mon, 9 Mar 2020 15:28:52 +0000 (15:28 +0000)]
MFC r346299: iflibtxrx.9: update function descriptions to match implementation

isc_rxd_refill, isc_rxd_flush return nothing, not void *.

isc_txd_credits_update, isc_rxd_available return int, not int *.

isc_txd_credits_update has a bool as final argument, not a uint32_t.
Prior to r315217 it took four arguments; the final two were
uint32_t, bool.

Reported by: Gerald Aryeetey <aryeeteygerald_rogers.com>
Sponsored by: The FreeBSD Foundation

4 years agoMFC r358299: muge: fix rxcsum enable test
Ed Maste [Mon, 9 Mar 2020 14:13:40 +0000 (14:13 +0000)]
MFC r358299: muge: fix rxcsum enable test

if_capabilities indicates capabilities supported by the hardware;
if_capenable which are enabled.  Note that rx checksum is still disabled
in the driver at compile time.

Submitted by: Johannes <iz-rpi04@hs-karlsruhe.de>

4 years agomake sysent after r358805, readlinkat return type MFC
Ed Maste [Mon, 9 Mar 2020 13:35:07 +0000 (13:35 +0000)]
make sysent after r358805, readlinkat return type MFC

4 years agoMFC r346273: correct readlinkat(2) return type
Ed Maste [Mon, 9 Mar 2020 13:33:58 +0000 (13:33 +0000)]
MFC r346273: correct readlinkat(2) return type

r176215 corrected readlink(2)'s return type and the type of the last
argument.  readlink(2) was introduced in r177788 after being developed
as part of Google Summer of Code 2007; it appears to have inherited the
wrong return type.

Man pages and header files were already ssize_t; update syscalls.master
to match.

PR: 197915
Submitted by: Henning Petersen <henning.petersen@t-online.de>

4 years agoMFC r358554: Add deprecation notices to ctau and cx drivers
Ed Maste [Mon, 9 Mar 2020 13:04:47 +0000 (13:04 +0000)]
MFC r358554: Add deprecation notices to ctau and cx drivers

These support outdated or obsolete ISA WAN (T1/E1) sync serial cards,
and these drivers haven't really been touched (other than in tree-wide
sweeps to keep them building) for 15+ years.

Related PCI devices ce and cp are still in the tree.

Relnotes: Yes
Sponsored by: The FreeBSD Foundation

4 years agoMFC r358711:
Dimitry Andric [Mon, 9 Mar 2020 07:12:02 +0000 (07:12 +0000)]
MFC r358711:

Merge commit f75939599 from llvm git (by Erich Keane):

  Reland r374450 with Richard Smith's comments and test fixed.

  The behavior from the original patch has changed, since we're no
  longer allowing LLVM to just ignore the alignment.  Instead, we're
  just assuming the maximum possible alignment.

  Differential Revision: https://reviews.llvm.org/D68824

  llvm-svn: 374562

This fixes 'Assertion failed: (Alignment != 0 && "Invalid Alignment"),
function CreateAlignmentAssumption', when building recent versions of
v8, which invoke __builtin_assume_aligned() with its alignment argument
set to 4GiB or more.

Clang will now report a warning, and show the maximum possible alignment
instead, e.g.:

huge-align.cpp:1:27: warning: requested alignment must be 536870912 bytes or smaller; maximum alignment assumed [-Wbuiltin-assume-aligned-alignment]
void *f(void *g) { return __builtin_assume_aligned(g, 4294967296); }
                          ^                           ~~~~~~~~~~

Upstream PR: https://bugs.llvm.org/show_bug.cgi?id=43839
Reported by: cem

4 years agoMFC r355594: remove again nonexistent from-* entries from vt INDEX.keymaps
Ed Maste [Sun, 8 Mar 2020 23:31:03 +0000 (23:31 +0000)]
MFC r355594: remove again nonexistent from-* entries from vt INDEX.keymaps

PR: 235564, 235853

4 years agoMFC r355592: Add Danish translation for vt font and keymap INDEX files
Ed Maste [Sun, 8 Mar 2020 23:26:21 +0000 (23:26 +0000)]
MFC r355592: Add Danish translation for vt font and keymap INDEX files

Also sort some entries into the correct location, correct MacBook
capitalization, etc.

PR: 235853
Submitted by: scootergrisen gmail com

4 years agoMFC r350468: pf: zero (another) output buffer in pfioctl
Ed Maste [Sun, 8 Mar 2020 23:22:18 +0000 (23:22 +0000)]
MFC r350468: pf: zero (another) output buffer in pfioctl

Avoid potential structure padding leak.  r350294 identified a leak via
static analysis; although there's no report of a leak with the
DIOCGETSRCNODES ioctl it's a good practice to zero the memory.

Suggested by: kp
Sponsored by: The FreeBSD Foundation

4 years agoMFC r350294: pf: zero output buffer in pfioctl
Ed Maste [Sun, 8 Mar 2020 23:20:24 +0000 (23:20 +0000)]
MFC r350294: pf: zero output buffer in pfioctl

Avoid potential structure padding leak.

Reported by: Vlad Tsyrklevich <vlad@tsyrklevich.net>
Security: Potential kernel memory disclosure
Sponsored by: The FreeBSD Foundation

4 years agoMFC r349697: correct pmap_ts_referenced return type
Ed Maste [Sun, 8 Mar 2020 23:19:09 +0000 (23:19 +0000)]
MFC r349697: correct pmap_ts_referenced return type

pmap_ts_referenced returns a count, not a boolean, and is supposed to
have int as the return type not boolean_t.

This worked previously because boolean_t is an int typedef.

Sponsored by: The FreeBSD Foundation

4 years agoMFC r354468: arch.7: claim 12.x as the last architecture with sparc64 support
Ed Maste [Sun, 8 Mar 2020 21:21:47 +0000 (21:21 +0000)]
MFC r354468: arch.7: claim 12.x as the last architecture with sparc64 support

PR: 228919, 233405, 236839, 239851

4 years agoMFC r339647: arch.7: update final ia64 release to 10.4
Ed Maste [Sun, 8 Mar 2020 21:19:46 +0000 (21:19 +0000)]
MFC r339647: arch.7: update final ia64 release to 10.4

10.4 is the final release from stable/10.

4 years agoMFC r339608: arch.7: first appeared in FreeBSD 11.1
Ed Maste [Sun, 8 Mar 2020 21:15:59 +0000 (21:15 +0000)]
MFC r339608: arch.7: first appeared in FreeBSD 11.1

4 years agoMFC r351121: arch.7: arm (i.e., v5) removed before 13.0
Ed Maste [Sun, 8 Mar 2020 21:14:41 +0000 (21:14 +0000)]
MFC r351121: arch.7: arm (i.e., v5) removed before 13.0

4 years agoMFC r340169 (brooks): elfdump: Add -E to test if a file is an ELF binary.
Ed Maste [Sun, 8 Mar 2020 21:11:49 +0000 (21:11 +0000)]
MFC r340169 (brooks): elfdump: Add -E to test if a file is an ELF binary.

This is intended to replace potentially unreliable checks like:

    file -b $1 | grep -q '^ELF ..-bit .SB executable'

4 years agoMFC r343610: elfdump: include note type names
Ed Maste [Sun, 8 Mar 2020 21:10:16 +0000 (21:10 +0000)]
MFC r343610: elfdump: include note type names

Based on a patch submitted by Dan McGregor.
-
MFC r343611: elfdump: fix build after r343610
-
MFC r343613: elfdump: use designated array initialization for note types

This ensures the note type name is in the correct slot.

Submitted by: kib
-
PR: 228290
Sponsored by: The FreeBSD Foundation

4 years agoMFC r343609: elfdump: whitespace fixup in advance of other changes
Ed Maste [Sun, 8 Mar 2020 21:07:21 +0000 (21:07 +0000)]
MFC r343609: elfdump: whitespace fixup in advance of other changes

4 years agoAdd tool to modify ELF binary feature control bits
Ed Maste [Sun, 8 Mar 2020 21:02:35 +0000 (21:02 +0000)]
Add tool to modify ELF binary feature control bits

MFC r352797: Add tool to modify ELF binary feature control bits

This will allow feature control bits (e.g. for ASLR, PROT_MAX) to be
inspected or modified.

Some clean-up and additional work is likely still required, but we can
iterate on this in the tree.

Submitted by: Bora Ã–zarslan <borako.ozarslan@gmail.com>

MFC r352799: controlelf: clean up warnings

- use explicit ELF note name when not found
- no trailing . on warnings
- no \n

MFC r352801: controlelf: install standard BSD 2 clause license

MFC r352803: controlelf: some style(9) cleanup

MFC r352805: controlelf: add protmax control

MFC r352806: controlelf: tidy up option parsing

MFC r352808: controlelf: simplify feature string parsing

Also add error handling on failure to seek/write updated value.

MFC r352809: controlelf: exit with error if file endianness does not match host

We need to add support for cross-endian operation, but until that's done
just exit with an error rather than misbehaving.

MFC r352815: controlelf: update man page

Some minor corrections, clarifications or rewording.

Sponsored by: The FreeBSD Foundation

4 years agoMFC r355413: Update ELF Tool Chain to upstream r3769
Ed Maste [Sun, 8 Mar 2020 20:40:38 +0000 (20:40 +0000)]
MFC r355413: Update ELF Tool Chain to upstream r3769

This contains many small bugfixes and documentation improvements.

Sponsored by: The FreeBSD Foundation

4 years agoreadelf: hoist file opening out of dump_object
Ed Maste [Sun, 8 Mar 2020 20:35:00 +0000 (20:35 +0000)]
readelf: hoist file opening out of dump_object

Diff reduction with HEAD to facilitate other MFCs.

4 years agoMFC r340746, r340750 (oshogbo): strings: fix style nits
Ed Maste [Sun, 8 Mar 2020 20:09:19 +0000 (20:09 +0000)]
MFC r340746, r340750 (oshogbo): strings: fix style nits

4 years agoMFC r348347 (jhibbits): libdwarf: add missing powerpc64 relocation support
Ed Maste [Sun, 8 Mar 2020 20:05:34 +0000 (20:05 +0000)]
MFC r348347 (jhibbits): libdwarf: add missing powerpc64 relocation support

Due to missing relocation support in libdwarf for powerpc64, handling of
dwarf info on unlinked objects was bogus.

Examining raw dwarf data on objects compiled on ppc64 with a modern compiler
(in-tree gcc tends to hide the issue, since it only rarely generates
relocations in .debug_info and uses DW_FORM_str instead of DW_FORM_strp for
everything), you will find that the dwarf data appears corrupt, with
repeated references to the compiler version where things like types and
function names should appear.

This happens because the 0 offset of .debug_str contains the compiler
version, and without applying the relocations, *all* indirect strings in
.dwarf_info will end up pointing to it.

This corruption then propogates to the CTF data, as ctfconvert relies on
libdwarf to read the dwarf info, for every compiled object (when building a
kernel.)

However, if you examine the dwarf data on a compiled executable, it will
appear correct, because during final link the relocations get applied and
baked in by the linker.

Submitted by: Brandon Bergren

4 years agoMFC r354842 (jhibbits): readelf: add PowerPC VMX and VSX note decode
Ed Maste [Sun, 8 Mar 2020 20:03:17 +0000 (20:03 +0000)]
MFC r354842 (jhibbits): readelf: add PowerPC VMX and VSX note decode

4 years agoMFC r341653: hier.7: add /lib/casper directory
Ed Maste [Sun, 8 Mar 2020 19:57:01 +0000 (19:57 +0000)]
MFC r341653: hier.7: add /lib/casper directory

Reported by: imp
Sponsored by: The FreeBSD Foundation

4 years agoMFC r345579 by des: Add workaround for a QoS-related bug in VMWare Workstation
Ed Maste [Sun, 8 Mar 2020 19:49:17 +0000 (19:49 +0000)]
MFC r345579 by des: Add workaround for a QoS-related bug in VMWare Workstation

Submitted by: yuripv

4 years agoMFC r351040: compiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V
Ed Maste [Sun, 8 Mar 2020 18:23:41 +0000 (18:23 +0000)]
MFC r351040: compiler-rt: enable __bswapsi2/__bswapdi2 for RISC-V

As with other archs the compiler may emit calls to the byte swap routines
under certain conditions.

Sponsored by: The FreeBSD Foundation

4 years agoMFC r349602: if_muge: set IFCAP_VLAN_MTU to maintain 1500 MTU with vlan use
Ed Maste [Sun, 8 Mar 2020 18:22:36 +0000 (18:22 +0000)]
MFC r349602: if_muge: set IFCAP_VLAN_MTU to maintain 1500 MTU with vlan use

PR: 238665
Submitted by: Ralf <iz-rpi03@hs-karlsruhe.de>

4 years agoMFC r349751: Update Linux compat version to 2.6.36
Ed Maste [Sun, 8 Mar 2020 18:21:04 +0000 (18:21 +0000)]
MFC r349751: Update Linux compat version to 2.6.36

New system calls between 2.6.32 and 2.6.26 are already implemented.

This should be mostly NFC as far as contemporary Linux applications are
concerned though, as Linux kernel 3.2 is the oldest supported by a
number of popular distros today; work is in progress by others to enable
support for those applications.

4 years agoMFC r355583: strip trailing whitespace from font and keymap INDEX files
Ed Maste [Sun, 8 Mar 2020 18:15:34 +0000 (18:15 +0000)]
MFC r355583: strip trailing whitespace from font and keymap INDEX files

PR: 235853
Submitted by: scootergrisen gmail com

4 years agoMFC r355585: remove nonexistent from-* entries from vt INDEX.keymaps
Ed Maste [Sun, 8 Mar 2020 18:14:45 +0000 (18:14 +0000)]
MFC r355585: remove nonexistent from-* entries from vt INDEX.keymaps

A number of entries of the form "de.kbd.from-cp850" existed in vt's
INDEX.keymaps, added in r270114, but these files do not exist.

PR: 235564
Submitted by: scootergrisen gmail com

4 years agoMFC r355614: kbdmap: allow INDEX.keymaps to provide the dialog title
Ed Maste [Sun, 8 Mar 2020 18:13:16 +0000 (18:13 +0000)]
MFC r355614: kbdmap: allow INDEX.keymaps to provide the dialog title

Previously kbdmap had a localized menu heading ("Choose your keyboard
layout") but not the dialog title ("Keyboard Menu").

Sponsored by: The FreeBSD Foundation

4 years agoMFC r355943: add LDNS build knob dependency on OPENSSL
Ed Maste [Sun, 8 Mar 2020 18:12:07 +0000 (18:12 +0000)]
MFC r355943: add LDNS build knob dependency on OPENSSL

Sponsored by: The FreeBSD Foundation

4 years agoMFC r357056: add MIPS-specific PT header ELF definitions
Ed Maste [Sun, 8 Mar 2020 18:10:41 +0000 (18:10 +0000)]
MFC r357056: add MIPS-specific PT header ELF definitions

Submitted by: David Carlier

4 years agoMFC r355914: localeconv: correct grouping and mon_grouping per C/POSIX
Ed Maste [Sun, 8 Mar 2020 18:09:41 +0000 (18:09 +0000)]
MFC r355914: localeconv: correct grouping and mon_grouping per C/POSIX

grouping and mon_grouping should be "" in the C locale.

PR: 172215
Sponsored by: The FreeBSD Foundation

4 years agoMFC r357579: libfetch: disallow invalid escape sequences
Ed Maste [Sun, 8 Mar 2020 18:08:45 +0000 (18:08 +0000)]
MFC r357579: libfetch: disallow invalid escape sequences

Per RFC1738 escape is "% hex hex"; other sequences do not form a valid URL.

Suggested by: Matthew Dillon
Reviewed by: Matthew Dillon
Sponsored by: The FreeBSD Foundation

4 years agoregen src.conf.5 after BINUTILS option description MFCs
Ed Maste [Sun, 8 Mar 2020 18:07:33 +0000 (18:07 +0000)]
regen src.conf.5 after BINUTILS option description MFCs

Sponsored by: The FreeBSD Foundation

4 years agoMFC r356759, r356890, r357617: BINUTILS option description updates
Ed Maste [Sun, 8 Mar 2020 18:05:17 +0000 (18:05 +0000)]
MFC r356759, r356890, r357617: BINUTILS option description updates

Sponsored by: The FreeBSD Foundation

4 years agoregen sysent after capability mode change MFCs
Ed Maste [Sun, 8 Mar 2020 17:59:46 +0000 (17:59 +0000)]
regen sysent after capability mode change MFCs

Capability mode changes allowing fdatasync and getloginclass.

Sponsored by: The FreeBSD Foundation

4 years agoMFC r357838: Allow getloginclass in capability mode
Ed Maste [Sun, 8 Mar 2020 17:58:36 +0000 (17:58 +0000)]
MFC r357838: Allow getloginclass in capability mode

As with e.g. getgroups and getlogin it allows querying current process
credential state.

Reported by: sigsys@gmail.com via kevans
Sponsored by: The FreeBSD Foundation

4 years agoMFC r357831: Allow fdatasync in capability mode
Ed Maste [Sun, 8 Mar 2020 17:56:44 +0000 (17:56 +0000)]
MFC r357831: Allow fdatasync in capability mode

fdatasync is essentially a subset of fsync (and may be exactly fsync,
depending on filesystem and development effort) and operates only on
a provided fd.

Sponsored by: The FreeBSD Foundation

4 years agoumtx_op.2: correct typo
Ed Maste [Sun, 8 Mar 2020 16:54:55 +0000 (16:54 +0000)]
umtx_op.2: correct typo

PR: 244611

4 years agoMFC r358614:
Michael Tuexen [Sun, 8 Mar 2020 14:48:21 +0000 (14:48 +0000)]
MFC r358614:

Don't send an uninitialised traffic class in the IPv6 header, when
sending a TCP segment from the TCP SYN cache (like a SYN-ACK).
This fix initialises it to zero. This is correct for the ECN bits,
but is does not honor the DSCP what an application might have set via
the IPPROTO_IPV6 level socket options IPV6_TCLASS. That will be
fixed separately.

Reviewed by: Richard Scheffenegger
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D23900

4 years agoMFC r358595,r358619:
Justin Hibbits [Fri, 6 Mar 2020 16:52:20 +0000 (16:52 +0000)]
MFC r358595,r358619:

Add Atom C3000 (Denverton) SMT PCI ID.

Update ismt(4) man page.

Sponsored by: Juniper Networks, Inc

4 years agoAdjust r358702 by dropping type asserts.
Konstantin Belousov [Fri, 6 Mar 2020 15:57:21 +0000 (15:57 +0000)]
Adjust r358702 by dropping type asserts.

They depend on the C11 Generic feature that is not supported by gcc 4.2.1
used on stable/12 for some arches.

This is a direct commit to the branch.

Reported by: gjb
Sponsored by: The FreeBSD Foundation

4 years agoMFC r358435:
Mark Johnston [Fri, 6 Mar 2020 14:56:47 +0000 (14:56 +0000)]
MFC r358435:
Do not load dtraceall.ko if dtrace.ko is already loaded.

4 years agoMFC r358433:
Mark Johnston [Fri, 6 Mar 2020 14:56:02 +0000 (14:56 +0000)]
MFC r358433:
Clear systrace_args_func when systrace probes are disabled.

4 years agoMFC r357948:
Konstantin Belousov [Fri, 6 Mar 2020 14:43:13 +0000 (14:43 +0000)]
MFC r357948:
Consolidate read code for timecounters and fix possible overflow in
bintime()/binuptime().

4 years agoMFC r355626 (manu):
Glen Barber [Fri, 6 Mar 2020 14:24:10 +0000 (14:24 +0000)]
MFC r355626 (manu):
 arm64: rockchip: Add a module for rk_dwmmc

 This is mostly needed for dev/debug as most users will have their root
 on the sdcard or emmc.

* This should fix the stable/12 aarch64 build after r358648.

Sponsored by: Rubicon Communications, LLC (netgate.com)

4 years agoMFC r358387:
Hans Petter Selasky [Fri, 6 Mar 2020 13:57:00 +0000 (13:57 +0000)]
MFC r358387:
Extend the range of the return value from nsecs_to_jiffies64() to support
Mesa's drm_syncobj usage, in the LinuxKPI.

While at it optimise the jiffies conversion functions to avoid repeated
and constant calculations.

Submitted by: Greg V <greg@unrelenting.technology>
Differential Revision: https://reviews.freebsd.org/D23846
Sponsored by: Mellanox Technologies

4 years agoMFC r358609:
Hans Petter Selasky [Fri, 6 Mar 2020 12:01:58 +0000 (12:01 +0000)]
MFC r358609:
Restart the USB keyboard repeat timer at every valid key-press.

This fixes a regression issue after r357861.

Reported by: James Wright <james.wright@jigsawdezign.com>
PR: 224592
PR: 233884
Sponsored by: Mellanox Technologies

4 years agoMFC r346022:
Warner Losh [Thu, 5 Mar 2020 14:05:22 +0000 (14:05 +0000)]
MFC r346022:

r346022 | imp | 2019-04-07 15:01:02 -0600 (Sun, 07 Apr 2019) | 23 lines

Make RELDATE be on a single line.

All variable assignments that start in column 1 have to be on a single
line for amd to build due to as weird dependency there (most likely it
can be fixed to use the new VARS_ONLY feature, but it isn't
today). usr.sbin/amd/include/Makefile calls
usr.sbin/amd/include/newvers.sh which does:
eval `LC_ALL=C egrep '^[A-Z]+=' $1 | grep -v COPYRIGHT`
which is where that requirement comes from. It handles COPYRIGHT since
that's an exception. Rather than add additional exceptions, cope with
the long line in newvers.sh instead. Note: it no longer needs to
filter COPYRIGHT because the assignment doesn't start in column 1
anymore.

I had done a universe when I had an earlier version of r346018 that
had it as one line. When I changed it to multi-line as suggested in
the review, I only built kernels on a couple of architectures to make
sure it didn't break anything.

Add comment to newvers.sh noting this.

Obviously, this unbreaks the amd build.

4 years agoMFC r358560:
Cy Schubert [Thu, 5 Mar 2020 06:38:03 +0000 (06:38 +0000)]
MFC r358560:

Retire macros:

BSD_GE_YEAR
BSD_GT_YEAR
BSD_LT_YEAR

4 years agoMFC r358559:
Cy Schubert [Thu, 5 Mar 2020 06:36:23 +0000 (06:36 +0000)]
MFC r358559:

Remove the now unused FREEBSD_GE_REV, FREEBSD_GT_REV, and FREEBSD_LT_REV
macros.

4 years agoMFC r358558:
Cy Schubert [Thu, 5 Mar 2020 06:35:05 +0000 (06:35 +0000)]
MFC r358558:

Continuing the effort started in r343701, #ifdef cleanup, checking for
__FreeBSD_version > 3.0 and 5.0 is redundant.

4 years agoMFC:
Warner Losh [Thu, 5 Mar 2020 06:19:21 +0000 (06:19 +0000)]
MFC:

r346018 | imp | 2019-04-07 12:39:55 -0600 (Sun, 07 Apr 2019) | 6 lines

Use default shell assignment rather more complicated if then
construct.

Discussed with: emaste@, allanjude@ (changes (or not) based on their feedback)
Differential Revision: https://reviews.freebsd.org/D19797

4 years agoMFC r358652:
Cy Schubert [Wed, 4 Mar 2020 23:54:13 +0000 (23:54 +0000)]
MFC r358652:

MFV r358616:

Update ntp-4.2.8p13 --> 4.2.8p14.

The advisory can be found at:
http://support.ntp.org/bin/view/Main/SecurityNotice#\
March_2020_ntp_4_2_8p14_NTP_Rele

No CVEs have been documented yet.

Security: http://support.ntp.org/bin/view/Main/NtpBug3610
http://support.ntp.org/bin/view/Main/NtpBug3596
http://support.ntp.org/bin/view/Main/NtpBug3592

4 years agoMFC r348885, r351543, r356806-r356807
Emmanuel Vadot [Wed, 4 Mar 2020 21:53:54 +0000 (21:53 +0000)]
MFC r348885, r351543, r356806-r356807

r348885 by bz:
A bit of code hygiene (no functional changes).

Hide unused code under #ifdef notyet (in one case the only caller is under
that same ifdef), or if it is arm (not arm64) specific code under the
__arm__ ifdef to not yield -Wunused-function warnings during the arm64
kernel compile.

r351543 by mmel:
Add support for RK3288 into existing RockChip drivers.
This patch ensures only minimal level of compatibility necessary to boot
on RK3288 based boards. GPIO and pinctrl interaction, missing in current
implementation, will be improved by own patch in the near future.

MFC with: r351452

r356806:
fdt_pinctrl: Add new methods for gpios

Most of the gpio controller cannot configure or get the configuration
of the pin muxing as it's usually handled in the pinctrl driver.
But they can know what is the pinmuxing driver either because they are
child of it or via the gpio-range property.
Add some new methods to fdt_pinctrl that a pin controller can implement.
Some methods are :
fdt_pinctrl_is_gpio: Use to know if the pin in the gpio mode
fdt_pinctrl_set_flags: Set the flags of the pin (pullup/pulldown etc ...)
fdt_pinctrl_get_flags: Get the flags of the pin (pullup/pulldown etc ...)

The defaults method returns EOPNOTSUPP.

Reviewed by: ian, bcr (manpages)
Differential Revision: https://reviews.freebsd.org/D23093

r356807:
arm64: rockchip: Add new interface for rk_pinctrl

The gpio controller in rockchips SoC in a child of the pinctrl driver
and cannot control pullups and pulldowns.
Use the new fdt_pinctrl interface for accessing pin capabilities and
setting them.
We can now report that every pins is capable of being IN or OUT function
and PULLUP PULLDOWN.
If the pin isn't in gpio mode no changes will be allowed.

Reviewed by: ganbold (previous version)
Differential Revision: https://reviews.freebsd.org/D22849

4 years agoMFC r356808:
Emmanuel Vadot [Wed, 4 Mar 2020 21:30:55 +0000 (21:30 +0000)]
MFC r356808:

arm64: rockchip: Add RK3399 PWM driver

Add a driver for the pwm controller in the RK3399 SoC

Submitted by: bdragon (original version)
Reviewed by: ganbold (previous version)
Differential Revision: https://reviews.freebsd.org/D19046

4 years agoMFC r356485-r356486, r356893, r358278-r358279
Emmanuel Vadot [Wed, 4 Mar 2020 21:25:48 +0000 (21:25 +0000)]
MFC r356485-r356486, r356893, r358278-r358279

r356485:
rk808: Add min/max for the switch regulators

The two switch regulator are always 3.0V.
Add a special case in get_voltage that if min=max we directly
return the value without calculating it.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D23004

r356486:
rk805: Add regnode_status method

This allow consumers to check if the regulator is enable or not.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D23005

r356893:
rk805: Add a regnode_init method

This method will set the desired voltaged based on values in the DTS.
It will not enable the regulator, this is the job of either a consumer
or regnode_set_constraint SYSINIT if the regulator is boot_on or always_on.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D23216

r358278:
arm64: rockchip: rk_i2c: Bump to DELAY to 1000

In polling mode with use DELAY to wait for interrupts. The value was
too low for RK3328.

r358279:
arm64: rockchip: rk808: Only init regulator not enabled

If a regulator is already enabled, do not set its value to the minimum
supported on the board.
This fixes booting on rock64 where we set some regulator to the minimal value
while the IPs needs more based on what the bootloader configured.

4 years agoMFC r356148-r356149, r356277
Emmanuel Vadot [Wed, 4 Mar 2020 21:20:15 +0000 (21:20 +0000)]
MFC r356148-r356149, r356277

r356148:
arm64: rockchip: rk808: Add remaining regulators

The RK808 driver was missing the LDO and switch regulators.
Add support for them.

Reviewed by: mmel
Differential Revision: https://reviews.freebsd.org/D22852

r356149:
arm64: rockchip: Add driver for the io domain

This driver configure the registers in the GRF according to the value
of the regulators for the platform.
Some IP can run with either 3.0V or 1.8V, if we don't configure them
correctly according to the external voltage used they will not work.
It's only done at boot time for now and might be needed at runtime for
IP like sdmmc.

Reviewed by: mmel
Tested On: RockPro64, Firefly-RK3399 (gonzo), AIO-3288 (mmel)
Differential Revision: https://reviews.freebsd.org/D22854

r356277:
arm64: rockchip: Add a module for rk_spi

The spi node doesn't lives under a simple-bus compatible node so we need
OFWBUS_PNP_INFO instead of SIMPLEBUS_PNP_INFO.

4 years agoMFC r355624, r355852-r355853
Emmanuel Vadot [Wed, 4 Mar 2020 21:12:08 +0000 (21:12 +0000)]
MFC r355624, r355852-r355853

r355624:
arm64: rk3328: Add the *clk_peri_niu clocks

Those clocks are always enable by default and are not really explained
in the TRM but the reason we had them is that they have the periph clock
as a parent and those parent should never be disable which can happen
if we disable all the childs. The current childs are the sd/emmc/sdio clocks
so the board will hang if we disable them.

r355852:
arm64: rockchip: rk_pinctrl: Fix clear bits in SYSCON_MODIFY

r351187 change the SYSCON_WRITE to SYSCON_MODIFY but didn't changed the
mask variable that used to hold the bitmask in the upper 16 bits of the
register that control which bits are changed. So we ended up clearing
bit from the upper 16bits half which are always 0 after a read.
Use the correct bit mask for bits that we want to clear.

r355853:
arm64: rockchip: rk_gpio: Fix pin number

The maxpin counter starts at 0, fix one by one error.
This is still not totally correct for some banks in some SoC that have
fewer pins but this will be dealt with in another commit.

4 years agoMFC r355356:
Emmanuel Vadot [Wed, 4 Mar 2020 21:06:29 +0000 (21:06 +0000)]
MFC r355356:

arm64: rockchip: rl3399: Remove the ability to put the PLL in normal mode at boot

RK3399 PLLs have three modes :
 - Normal, where they behave normally and their freq is calculated based on
   the registers values.
 - Slow, where the PLL freq is 24Mhz (well, the external oscillator).
 - Deep Slow, used for suspend where the freq is 32Khz.

We used to put every CPU related PLL in normal mode but it can cause problem
if the firmware didn't setup the clocks register correctly.
And even if it did but left the pll in slow or deep slow mode that might be
because the PMIC suppling voltage for the CPU haven't been configured yet
and we cannot do that at this point.
So remove the ability to set PLLs to normal mode at boot to avoid any problems.

4 years agoMFC r355173, r355190-r355191
Emmanuel Vadot [Wed, 4 Mar 2020 21:04:57 +0000 (21:04 +0000)]
MFC r355173, r355190-r355191

r355173 by mmel:
Add driver for temperature sensors found in RK32898, RK3328 and RK3399 SoC's.

Reviewed by: manu
Differential Revision:  https://reviews.freebsd.org/D22442

r355190:
arm64: rockchip: tsadc: Do not free the sysctl context is it wasn't created

X-MFC-With: r355173

r355191:
arm64: rockchip: rk3328: Add TSADC clocks

Add the clocks so we can use the rk_tsadc driver to monitor
the cpu temperature.

4 years agoMFC r354554-r354558, r355115
Emmanuel Vadot [Wed, 4 Mar 2020 21:01:25 +0000 (21:01 +0000)]
MFC r354554-r354558, r355115

r354554 by mmel:
Implement support for (soft)linked clocks.
This kind of clock nodes represent temporary placeholder for clocks
defined later in boot process. Also, these are necessary to break
circular dependencies occasionally occurring in complex clock graphs.

r354555 by mmel:
Cleanup Rockchip clocks implementation.
- style
- unify dprinf defines
- make dprinf's 32-bit compatible
Not a functional change.

Reviewed by: manu, imp
Differential Revision:  https://reviews.freebsd.org/D22281

r354556 by mmel:
Enhance Rockchip clocks implementation.
- add support for fractional dividers
- allow to declare fixed and linked clock

Reviewed by: manu
Differential Revision:  https://reviews.freebsd.org/D22282

r354557 by mmel:
Tidy up Rockchip composite clock.
- add support for log2 based dividers
- use proper write mask when writing to divider register

Reviewed by: manu
Differential Revision:  https://reviews.freebsd.org/D22283

r354558 by mmel:
Remove explicit declaration of rk_clk_fract_set_freq() function
forgotten in r354556.

MFC with: r354556
Noticed by: manu

r355115 by mmel:
Finish implementation of RK3299 clocks.
- implement of all but mmc clocks. MMC clocks will be added later by own commit.
- use 'link' clock type for external clocks.
- use macros for initialization of structure's named members.

Reviewed by: manu
Differential Revision:  https://reviews.freebsd.org/D22441

4 years agoMFC r354088:
Emmanuel Vadot [Wed, 4 Mar 2020 20:52:59 +0000 (20:52 +0000)]
MFC r354088:

arm64: rockchip: Add rk_dwc3 driver

This is a simplebus like driver that attaches the dwc3 child node and
enable the clocks needed for the module.

4 years agoMFC r354087, r354089, r354094, r354100, r354103, r354152
Emmanuel Vadot [Wed, 4 Mar 2020 20:48:29 +0000 (20:48 +0000)]
MFC r354087, r354089, r354094, r354100, r354103, r354152

r354087:
arm64: rk3399: Add clock and gate for usb3 clocks

r354089:
arm64: rockchip: Add RK3399 TypeC phy driver

This is a driver for the USB3 PHY present in the RK3399.
While the phy support DP (Display Port) the driver doesn't has we have
no driver to test this with for now.
All the lane and pll configuration is just magic values from rockchip.
While the manual have some info on those registers it's really hard to
understand how to calculate those values (if there is a way).

r354094 by peterj:
Fix use of uninitialised variable.

The RK805 regs array was being allocated before it's required size was
known, causing the driver to use memory it didn't own.  That memory
was subsequently allocated and used elsewhere causing later fatal data
aborts in rk805_map().

Whilst I'm here, add a sanity check to catch unsupported PMICs (this
shouldn't ever get hit because the probe should have failed).

Reviewed by: manu
Sponsored by: Google

r354100 by gonzo:
arm64: rk3399: Add clock and gate for SPI clocks

r354103 by gonzo:
arm64: rk3399: add SPI driver and include it in GENERIC config

SPI driver for Rockchip's RK3399 SoC. Implements PIO mode, CS selection,
SPI mode and frequency configuration.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D22148

r354152:
arm64: rockchip: typec_phy: Rename timeout to retry

Declare retry in the function scope.
Rename it to retry as there is a timeout function which was
causing to code to compile.

Reported by: jhibbits
X-MFC-WITH: r354089

4 years agoMFC r349638, r350161, r351186
Emmanuel Vadot [Wed, 4 Mar 2020 20:43:29 +0000 (20:43 +0000)]
MFC r349638, r350161, r351186

r349638 by ganbold:
Subclass Rockchip's General Register Files driver from Simple MFD driver.

r350161 by ganbold:
Add driver for Rockchip RK3399 eMMC PHY.
Tested on NanoPC-T4 board.

Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D20840

r351186 by mmel:
Improve rk_i2c driver:
- Properly handle IIC_M_NOSTOP and IIC_M_NOSTART flags.
- add polling mode, so driver can be used even if interrupts are not
  enabled (this is necessary for proper support of PMICs).
- add support for RK3288

4 years agoMFC r355360-r355361
Emmanuel Vadot [Wed, 4 Mar 2020 20:30:11 +0000 (20:30 +0000)]
MFC r355360-r355361

r355360:
cpufreq_dt: Do not attach the device if the cpu isn't present

If we boot with hw.ncpu=X (available on arm and arm64 at least) we
shouldn't attach the cpufreq driver as cf_set_method will try to get
the cpuid and it doesn't exists.
This solves cpufreq panicing on RockChip RK3399 when booting with
hw.ncpu=4

r355361:
cpufreq_dt: Do not fetch again hw.ncpu

MD code already set the global variable mp_ncpus according to
the tunable hw.ncpu so use the global variable directly.

Reported by: ian

4 years agoMFC r355187:
Emmanuel Vadot [Wed, 4 Mar 2020 20:22:02 +0000 (20:22 +0000)]
MFC r355187:

Import DTS files from Linux 5.4

4 years agoMFC r357765:
Konstantin Belousov [Wed, 4 Mar 2020 17:21:49 +0000 (17:21 +0000)]
MFC r357765:
if_media.h: Add 50G KR4 ethernet media type.

4 years agoMFC r357764:
Konstantin Belousov [Wed, 4 Mar 2020 17:19:25 +0000 (17:19 +0000)]
MFC r357764:
if_media.c: staticize and constify ifmedia description structures used under IFMEDIA_DEBUG.

4 years agoMFC r357763:
Konstantin Belousov [Wed, 4 Mar 2020 17:17:37 +0000 (17:17 +0000)]
MFC r357763:
if_media.c: use __FBSDID().

Sponsored by: Mellanox Technologies

4 years agoMFC r358378:
Baptiste Daroussin [Wed, 4 Mar 2020 11:30:08 +0000 (11:30 +0000)]
MFC r358378:

Update pci_vendors to 2020.02.22

4 years agoMFC r357648:
Baptiste Daroussin [Wed, 4 Mar 2020 11:28:49 +0000 (11:28 +0000)]
MFC r357648:

diff: implement -y (--side-by-side) along with -W and --suppress-common-lines

PR: 219933
Submitted by: fehmi noyan isi <fnoyanisi@yahoo.com>

4 years agoMFC r358357: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration
Alexander Motin [Wed, 4 Mar 2020 04:44:08 +0000 (04:44 +0000)]
MFC r358357: MFZoL: Relax restriction on zfs_ioc_next_obj() iteration

Per the documentation for dnode_next_offset in dnode.c, the "txg"
parameter specifies a lower bound on which transaction the dnode can
be found in. We are interested in all dnodes that are removed between
the first and last transaction in the snapshot. It doesn't need to be
created in that snapshot to correspond to a removed file.

In fact, the behavior of zfs diff in the test case exactly matches
this: the transaction that created the data that was deleted in snapshot
"2" was produced before, in snapshot "1", definitely predating the first
transaction in snapshot "2".

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tim Chase <Tim Chase <tim@onlight.com>
Closes #2081
zfsonlinux/zfs@7290cd3c4ed19fb3f75b8133db2e36afcdd24beb

4 years agoMFC r358342: MFZoL: Fix resilver writes in vdev_indirect_io_start
Alexander Motin [Wed, 4 Mar 2020 04:42:56 +0000 (04:42 +0000)]
MFC r358342: MFZoL: Fix resilver writes in vdev_indirect_io_start

This patch addresses an issue found in ztest where resilver
write zios that were passed to an indirect vdev would end up
being handled as though they were resilver read zios. This
caused issues where the zio->io_abd would be both read to
and written from at the same time, causing asserts to fail.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8193
zfsonlinux/zfs@5aa95ba0d3502779695341b5f55fa5ba1d3330ff

4 years agoMFC r358339: MFZoL: Fix issue with scanning dedup blocks as scan ends
Alexander Motin [Wed, 4 Mar 2020 04:41:49 +0000 (04:41 +0000)]
MFC r358339: MFZoL: Fix issue with scanning dedup blocks as scan ends

This patch fixes an issue discovered by ztest where
dsl_scan_ddt_entry() could add I/Os to the dsl scan queues
between when the scan had finished all required work and
when the scan was marked as complete. This caused the scan
to spin indefinitely without ending.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Serapheim Dimitropoulos <serapheim.dimitro@delphix.com>
Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #8010
zfsonlinux/zfs@5e0bd0ae056e26de36dee3c199c6fcff8f14ee15