]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
4 years agoMFC r345970: network.subr: improve configuration of cloned gif(4) interfaces
Eugene Grosbein [Thu, 4 Jul 2019 13:20:32 +0000 (13:20 +0000)]
MFC r345970: network.subr: improve configuration of cloned gif(4) interfaces

ifconfig(8) syntax allows to specify only single address_family,
so we need additional invocation of ifconfig to support configuration
of cloned gif interface that may use different address families
for its internal and external addresses.

Also, ifconfig(8) does not allow to omit "inet6" keyword for address family
specifying IPv6 addresses as outer addresses of the interface.

Also, address_family is not "parameter" and it has to go before parameters
including "tunnel" keyword, so "ifconfig gif0 tunnel inet6 $oip1 $oip2" would be
wrong syntax and only "ifconfig gif0 inet6 tunnel $oip1 $oip2" is right.

With this change, the following works:

gifconfig_gif0="inet6 2a00::1 2a01::1"
ifconfig_gif0="inet 10.0.0.1 10.0.0.2 netmask 255.255.255.252"

4 years agoMFC r349188
Leandro Lupori [Thu, 4 Jul 2019 12:40:38 +0000 (12:40 +0000)]
MFC r349188

[PPC] Fix loader input with newer QEMU versions

At least since version 4.0.0, QEMU became bug-compatible with PowerVM's
vty, by inserting a \0 after every \r. As this confuses loader's
interpreter and as a \0 coming from the console doesn't seem reasonable,
it's now being filtered at OFW console input.

Reviewed by: jhibbits
Differential Revision: https://reviews.freebsd.org/D20676

4 years agoMFC r349548:
Tijl Coosemans [Thu, 4 Jul 2019 10:16:44 +0000 (10:16 +0000)]
MFC r349548:

Build lib32 libl.  The library is built from usr.bin/lex/lib.  It would be
better to move this directory to lib/libl, but this requires more extensive
changes to Makefile.inc1.  This simple fix can be MFCed quickly.

PR: 238874
Reviewed by: imp

4 years agoMFC r349505: Upgrade to Bzip2 version 1.0.7.
Xin LI [Thu, 4 Jul 2019 07:29:18 +0000 (07:29 +0000)]
MFC r349505: Upgrade to Bzip2 version 1.0.7.

4 years agoMFC r349450-349451:
Cy Schubert [Thu, 4 Jul 2019 03:08:14 +0000 (03:08 +0000)]
MFC r349450-349451:

Update usage() to refect the current state of ipmon.

PR: 238816

4 years agoMFC r349449, r349452:
Cy Schubert [Thu, 4 Jul 2019 03:04:41 +0000 (03:04 +0000)]
MFC r349449, r349452:

Add the ipmon.5 man page and link ipmon.conf.5 to it.

PR/238816 initially addressed updates to usage() however the PR has
morphed into a shopping list of updates to usage() and man pages.

PR: 238816

4 years agoMFC r348299
Justin Hibbits [Wed, 3 Jul 2019 21:30:18 +0000 (21:30 +0000)]
MFC r348299

kern/CTF: link_elf_ctf_get() on big endian platforms

Check the CTF magic number in big endian platforms.  This lets DTrace FBT
handle types correctly on these platforms.

4 years agoMFC r349424:
Mark Johnston [Wed, 3 Jul 2019 20:55:08 +0000 (20:55 +0000)]
MFC r349424:
libdwarf: Use the cached strtab pointer when reading string attributes.

4 years agoMFC r349422:
Mark Johnston [Wed, 3 Jul 2019 20:54:52 +0000 (20:54 +0000)]
MFC r349422:
libelftc: Fix the documented prototype for elftc_string_table_destroy().

4 years agoMFC r349421:
Mark Johnston [Wed, 3 Jul 2019 20:54:36 +0000 (20:54 +0000)]
MFC r349421:
libelftc: Consistently use size_t for string table offsets and sizes.

4 years agoMFC r349420
Mark Johnston [Wed, 3 Jul 2019 20:53:05 +0000 (20:53 +0000)]
MFC r349420
libelftc: Micro-optimize string table insertion.

4 years agoMFC r349423
Mark Johnston [Wed, 3 Jul 2019 20:52:07 +0000 (20:52 +0000)]
MFC r349423
elfcopy: Provide a size hint when creating the section string table.

4 years agoMFC r349218:
Mark Johnston [Wed, 3 Jul 2019 20:18:49 +0000 (20:18 +0000)]
MFC r349218:
Group vm_page_activate()'s definition with other related functions.

4 years agoMFC r349432:
Mark Johnston [Wed, 3 Jul 2019 20:17:26 +0000 (20:17 +0000)]
MFC r349432:
Add a return value to vm_page_remove().

4 years agoMFC r349419:
Mark Johnston [Wed, 3 Jul 2019 20:15:09 +0000 (20:15 +0000)]
MFC r349419:
Remove references to splbio in ffs_softdep.c.

4 years agoMFC r349334:
Mark Johnston [Wed, 3 Jul 2019 20:14:43 +0000 (20:14 +0000)]
MFC r349334:
Remove a lingering use of splbio().

4 years agoMFC r349175
Vincenzo Maffione [Wed, 3 Jul 2019 19:59:48 +0000 (19:59 +0000)]
MFC r349175

bhyve: vtnet: fix locking on receive

The vsc_rx_ready and the RX virtqueue is protected by the rx_mtx lock.
However, pci_vtnet_ping_rxq() (currently called only once after each
device reset) accesses those without acquiring the lock.

Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D20609

4 years agoMFC r349019
Vincenzo Maffione [Wed, 3 Jul 2019 19:57:23 +0000 (19:57 +0000)]
MFC r349019

bhyve: move common code to net_utils.c

Both virtio_net and e82545 network frontends have code to validate and
generate MAC addresses. These functionalities are replicated in the two
files, so we move them in a separate compilation unit.

Reviewed by:    rgrimes, bryanv, imp, kevans
Differential Revision:  https://reviews.freebsd.org/D20626

4 years agoMFC r348929
Vincenzo Maffione [Wed, 3 Jul 2019 19:56:05 +0000 (19:56 +0000)]
MFC r348929

bhyve: virtio: introduce vq_kick_enable() and vq_kick_disable()

The VirtIO standard supports two schemes for notification suppression:
a notification enable bit and a more sophisticated one (event_idx) that
also supports delayed notifications. Currently bhyve fully supports
only the first scheme. This patch hides the notification suppression
internals by means of two inline routines, vq_kick_enable() and
vq_kick_disable(), and makes the code more readable.
Moreover, further improve readability by replacing the call to mb()
with a call to atomic_thread_fence_seq_cst(), which is already used
in virtio.c

Reviewed by:    pmooney_pfmooney.com, bryanv
Differential Revision:  https://reviews.freebsd.org/D20581

4 years agoMFC r348834
Vincenzo Maffione [Wed, 3 Jul 2019 19:54:37 +0000 (19:54 +0000)]
MFC r348834

bhyve: vtnet: simplify thread synchronization

On vtnet device reset it is necessary to wait for threads to stop TX and
RX processing. However, the rx_in_progress variable (used for to wait for
RX processing to stop) is actually useless, and can be removed. Acquiring
and releasing the RX lock is enough to synchronize correctly. Moreover,
it is possible to reset the device while holding both TX and RX locks, so
that the "resetting" variable becomes unnecessary for the RX thread, and
can be protected by the TX lock (instead of being volatile).

Reviewed by:    jhb, markj
Differential Revision:  https://reviews.freebsd.org/D20543

4 years agoMFC r349285
Eric van Gyzen [Wed, 3 Jul 2019 19:52:24 +0000 (19:52 +0000)]
MFC r349285

VirtIO SCSI:  validate seg_max on attach

Until head r349278 (stable/12 r349690), bhyve presented a seg_max
to the guest that was too large.  Detect this case and clamp it to
the virtqueue size.  Otherwise, we would fail the "too many segments
to enqueue" assertion in virtqueue_enqueue().

I hit this by running a guest with a MAXPHYS of 256 KB.

Reviewed by: bryanv cem
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D20703

4 years agoMFC r349278
Eric van Gyzen [Wed, 3 Jul 2019 19:50:22 +0000 (19:50 +0000)]
MFC r349278

bhyve: Fix vtscsi maximum segment config

The seg_max value reported to the guest should be two less than the
host's maximum, in order to leave room for the request and the
response.  This is analogous to r347033 for virtio_block.

We hit the "too many segments to enqueue" assertion on OneFS because
we increase MAXPHYS to 256 KB.

Reviewed by: bryanv
Discussed with: cem jhb rgrimes
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D20529

4 years agoMFC r349320, r349324:
Konstantin Belousov [Wed, 3 Jul 2019 19:34:17 +0000 (19:34 +0000)]
MFC r349320, r349324:
coredump: avoid writing to core files not owned by the effective user.

PR: 68905
admbugs: 358

4 years agoMFC r346777:
Justin Hibbits [Wed, 3 Jul 2019 19:32:25 +0000 (19:32 +0000)]
MFC r346777:

powerpc: Add POWER8NVL definition

The POWER8NVL (POWER8 NVLink) architecturally behaves identically to the
POWER8, with a different PVR identifier.  Mark it as such, so it shows up
appropriately to the user.

Reported by: Alexey Kardashevskiy

4 years agoMFC r349519:
Konstantin Belousov [Wed, 3 Jul 2019 19:31:11 +0000 (19:31 +0000)]
MFC r349519:
Style.

4 years agoMFC r349512:
Konstantin Belousov [Wed, 3 Jul 2019 19:29:53 +0000 (19:29 +0000)]
MFC r349512:
Mention proccontrol(1) -m kpti.

4 years agoMFC r349511:
Konstantin Belousov [Wed, 3 Jul 2019 19:28:47 +0000 (19:28 +0000)]
MFC r349511:
Typo.

4 years agoMFC r349427:
Konstantin Belousov [Wed, 3 Jul 2019 19:27:34 +0000 (19:27 +0000)]
MFC r349427:
amd64 pmap: Fix pkru handling in pmap_remove().

4 years agoMFC r347167,r348079
Justin Hibbits [Wed, 3 Jul 2019 19:25:57 +0000 (19:25 +0000)]
MFC r347167,r348079

Book-E pmap

r347167: powerpc/booke: Use #ifdef __powerpc64__ instead of hw_direct_map in
places
r348079: powerpc/booke: Use wrtee instead of msr to restore EE bit

4 years agoMFC r349299:
Konstantin Belousov [Wed, 3 Jul 2019 19:24:50 +0000 (19:24 +0000)]
MFC r349299:
Add libc stub for pthread_getthreadid_np(3).

PR: 238650

4 years agoMFC r349297:
Konstantin Belousov [Wed, 3 Jul 2019 19:22:25 +0000 (19:22 +0000)]
MFC r349297:
Remove redundand 'else' and 'return'.

4 years agoMFC r346173,r347943
Justin Hibbits [Wed, 3 Jul 2019 19:21:03 +0000 (19:21 +0000)]
MFC r346173,r347943

r346173: powerpc/dtrace: Fix dtrace powerpc asm, and simplify stack walking
r347943: powerpc/dtrace: Actually fix stack traces

4 years agoMFC r344915:
Justin Hibbits [Wed, 3 Jul 2019 19:07:42 +0000 (19:07 +0000)]
MFC r344915:

powerpc: Fix cpufreq statement scoping

The second statements on the lines are not guarded by the `if' condition.
This triggers a warning with newer gcc.  It's relatively harmless given the
usage, but incorrect.  Instead, wrap the statements so they're properly
guarded.

4 years agoMFC r345829,345831,349402
Justin Hibbits [Wed, 3 Jul 2019 19:01:41 +0000 (19:01 +0000)]
MFC r345829,345831,349402

r345829: powerpc: Apply r178139 from sparc64 to powerpc's fpu_sqrt
r345831: powerpc: Allow emulating optional FPU instructions on CPUs with an FPU
r349402: powerpc/booke: Handle misaligned floating point loads/stores as on AIM

4 years agoMFC r344958,r344960,r344961
Justin Hibbits [Wed, 3 Jul 2019 18:53:04 +0000 (18:53 +0000)]
MFC r344958,r344960,r344961

r344958: powerpc: Print data address register on alignment exceptions
r344960: powerpc: Print trap frame address for fatal traps
r344961: powerpc: Print trap frame address in ddb backtraces

4 years agoMFC r349522:
Hans Petter Selasky [Wed, 3 Jul 2019 18:29:18 +0000 (18:29 +0000)]
MFC r349522:
Need to apply the PCIM_BAR_MEM_BASE mask to the physical memory
address before returning it to the user. Some of the least significant
bits have special meaning and should be masked away.

Discussed with: kib@
Sponsored by: Mellanox Technologies

4 years agoMFC r349409 and r349410:
Hans Petter Selasky [Wed, 3 Jul 2019 18:23:36 +0000 (18:23 +0000)]
MFC r349409 and r349410:
Fix support for LIBUSB_HOTPLUG_ENUMERATE in libusb. Currently all
devices are enumerated regardless of of the LIBUSB_HOTPLUG_ENUMERATE
flag. Make sure when the flag is not specified no arrival events are
generated for currently enumerated devices.

Sponsored by: Mellanox Technologies

4 years agoMFC r349370:
Hans Petter Selasky [Wed, 3 Jul 2019 18:18:05 +0000 (18:18 +0000)]
MFC r349370:
Fix parsing of corrupt data in usbdump(8). Check that the transfer
type array lookup is within bounds to avoid segfault.

PR: 238801
Sponsored by: Mellanox Technologies

4 years agoMFC r349368:
Hans Petter Selasky [Wed, 3 Jul 2019 18:16:10 +0000 (18:16 +0000)]
MFC r349368:
Free all allocated unit IDs in cuse(3) after the client character
devices have been destroyed to avoid creating character devices with
identical name.

Sponsored by: Mellanox Technologies

4 years agoMFC r349367:
Hans Petter Selasky [Wed, 3 Jul 2019 18:14:00 +0000 (18:14 +0000)]
MFC r349367:
Fix for deadlock situation in cuse(3)

The final server unref should be done by the server thread to prevent
deadlock in the client cdevpriv destructor, which cannot destroy
itself.

Sponsored by: Mellanox Technologies

4 years agoMFC r349448:
Cy Schubert [Wed, 3 Jul 2019 18:11:22 +0000 (18:11 +0000)]
MFC r349448:

Fix a typo.

PR/238816 initially addressed updates to usage() however it has now
become a shopping list of fixes to ipmon man pages and usage().

PR: 238816

4 years agoMFC r349268: nandsim: correct test to avoid out-of-bounds access
Ed Maste [Wed, 3 Jul 2019 17:34:26 +0000 (17:34 +0000)]
MFC r349268: nandsim: correct test to avoid out-of-bounds access

Previously nandsim_chip_status returned EINVAL iff both of user-provided
chip->ctrl_num and chip->num were out of bounds.  If only one failed the
bounds check arbitrary memory would be read and returned.

The NAND framework is not built by default, nandsim is not intended for
production use (it is a simulator), and the nandsim device has root-only
permissions.

admbugs: 827
Reported by: Daniel Hodson of elttam
Security: kernel information leak or DoS
Sponsored by: The FreeBSD Foundation

4 years agoMFC r349401:
Cy Schubert [Wed, 3 Jul 2019 17:09:41 +0000 (17:09 +0000)]
MFC r349401:

While working on PR/238796 I discovered an unused variable in frdest,
the next hop structure. It is likely this contributes to PR/238796
though other factors remain to be investigated.

PR: 238796

4 years agoMFC r349399-349400,349567-349568:
Cy Schubert [Wed, 3 Jul 2019 17:04:44 +0000 (17:04 +0000)]
MFC r349399-349400,349567-349568:

Prompted by r349366, ipfilter is also does not conform to RFC 3128
by dropping TCP fragments with offset = 1.

In addition to dropping these fragments, add a DTrace probe to allow
for more detailed monitoring and diagnosis if required.

4 years agoMFC r349362:
Cy Schubert [Wed, 3 Jul 2019 16:53:59 +0000 (16:53 +0000)]
MFC r349362:

The definition of icmptypes in ip_compt.h is dead code as it already
use the icmptypes in ip_icmp.h.

4 years agoMFC r349331:
Cy Schubert [Wed, 3 Jul 2019 16:48:46 +0000 (16:48 +0000)]
MFC r349331:

Clean out duplicate definitions of TCP macros also found in netinet/tcp.h.

4 years agoMFC r349153:
Cy Schubert [Wed, 3 Jul 2019 16:43:40 +0000 (16:43 +0000)]
MFC r349153:

Allow the hostapd program to be specified. This allows users to use
hostapd from ports instead of the one in base. The default is the hostapd
in base.

PR: 238571

4 years agoMFC r342972:
Cy Schubert [Wed, 3 Jul 2019 16:23:06 +0000 (16:23 +0000)]
MFC r342972:

Disable FTS3, FTS4, and RTREE in bundled and private sqlite3.

Suggested by: delphij@
Reviewed by: delphij@ (for secteam@)
Differential Revision: https://reviews.freebsd.org/D18786

4 years agoMFC r349366:
Andrey V. Elsukov [Wed, 3 Jul 2019 09:46:30 +0000 (09:46 +0000)]
MFC r349366:
  Follow the RFC 3128 and drop short TCP fragments with offset = 1.

4 years agoMFC r349365:
Andrey V. Elsukov [Wed, 3 Jul 2019 09:45:02 +0000 (09:45 +0000)]
MFC r349365:
  Mark default rule with IPFW_RULE_NOOPT flag, so it can be showed in
  compact form.

4 years agoMFC r349364:
Andrey V. Elsukov [Wed, 3 Jul 2019 09:43:26 +0000 (09:43 +0000)]
MFC r349364:
  Restore ipfw(8)'s compact output support broken after r331668.

  Also modify it a bit. Now -c option omits only 'from any to any' part
  and works for different protocols (not just for ip).

  Reported by: Dmitry Selivanov <dseliv at gmail>

4 years agoMFC r349439:
Mark Johnston [Wed, 3 Jul 2019 00:36:00 +0000 (00:36 +0000)]
MFC r349439:
Free DHCP options with length zero.

4 years agoMFC r349438:
Mark Johnston [Wed, 3 Jul 2019 00:32:42 +0000 (00:32 +0000)]
MFC r349438:
Avoid a divide-by-zero when bad checksum counters overflow.

4 years agoMFC r349627:
Mark Johnston [Wed, 3 Jul 2019 00:11:31 +0000 (00:11 +0000)]
MFC r349627:
Remove the CDIOCREADSUBCHANNEL_SYSSPACE ioctl.

admbugs: 768
Reported by: Alex Fortune
Approved by: so
Security: CVE-2019-5602
Security: FreeBSD-SA-19:11.cd_ioctl

4 years agoMFC r349619: libc: correct iconv buffer overflow
Ed Maste [Wed, 3 Jul 2019 00:01:38 +0000 (00:01 +0000)]
MFC r349619: libc: correct iconv buffer overflow

admbugs: 920
Submitted by: Andrea Venturoli, gabor
Reported by: Andrea Venturoli <security@netfence.it>, NetFence
Approved by: so
Security: CVE-2019-5600
Security: FreeBSD-SA-19:09.iconv

4 years agoMFC 349133 349146 349150: document PCIOCATTACHED
Niclas Zeising [Tue, 2 Jul 2019 17:23:37 +0000 (17:23 +0000)]
MFC 349133 349146 349150: document PCIOCATTACHED

r349133:

pci(4): Document PCIOCATTACHED

Document the PCIOCATTACHED ioctl(2) in the pci(4) manual.
PCIOCATTACHED is used to query if a driver has attached to a PCI.

Reviewed by: bcr, imp
Differential Revision: https://reviews.freebsd.org/D20652

r349146:

pci.4: wordsmith and add missing words

Add missing words after PCI in the description of the PCIOCWRITE and
PCIOCATTACHED ioctls.
Use singular in PCIOCREAD, we only read one register at the time.

Reviewed by: bcr, bjk, rgrimes, cem
Differential Revision: https://reviews.freebsd.org/D20671

r349150:

pci.4: Use plural configuration registers

It is customary to use plural when talking about PCI configure registers.

Reported by: scottl

4 years agoMFC r349600.
Warren Block [Tue, 2 Jul 2019 16:54:46 +0000 (16:54 +0000)]
MFC r349600.

Correct name of vmm(4) pptdevs variable.

4 years agoMFC r349592: Import tzdata 2019b
Philip Paeps [Tue, 2 Jul 2019 12:22:27 +0000 (12:22 +0000)]
MFC r349592: Import tzdata 2019b

4 years agoMFC r349267:
Andrey V. Elsukov [Mon, 1 Jul 2019 10:01:08 +0000 (10:01 +0000)]
MFC r349267:
  Add "tcpmss" opcode to match the TCP MSS value.

  With this opcode it is possible to match TCP packets with specified
  MSS option, whose value corresponds to configured in opcode value.
  It is allowed to specify single value, range of values, or array of
  specific values or ranges. E.g.

   # ipfw add deny log tcp from any to any tcpmss 0-500

4 years agoMFC r346455-r346458, r348520, r348529, r348817, r348818
Vladimir Kondratyev [Sat, 29 Jun 2019 12:49:52 +0000 (12:49 +0000)]
MFC r346455-r346458, r348520, r348529, r348817, r348818

r346455:
psm(4): Add support for 4 and 5 finger touches in synaptics driver

While 4-th and 5-th finger positions are not exported through PS/2
interface, total number of touches is reported by MT trackpads.

r346456:
psm(4): do not process gestures when palm is present

Ignoring of gesture processing when the palm is detected helps to reduce
some of the erratic pointer behavior.

This fixes regression introduced in r317814

Reported by: Ben LeMasurier <ben@crypt.ly>

r346457:
psm(4): respect tap_disabled configuration with enabled Extended support

This fixes a bug where, even when hw.psm.tap_enabled=0, touchpad taps
were processed.
tap_enabled has three states: unconfigured, disabled, and enabled (-1, 0, 1).
To respect PR kern/139272, taps are ignored only when explicity disabled.

Submitted by: Ben LeMasurier <ben@crypt.ly> (initial version)

r346458:
psm(4): give names to synaptics commands

Submitted by: Ben LeMasurier <ben@crypt.ly>

r348520:
psm(4): Add Elantech touchpad IC type 15 found on Thinkpad L480 laptops

PR: 238291
Submitted by: Andrey Kosachenko <andrey.kosachenko@gmail.com>

r348529:
psm(4): Add natural scrolling support to sysmouse protocol

This change enables natural scrolling with two finger scroll enabled
and when user is using a trackpad (mouse and trackpoint are not affected).
Depending on trackpad model it can be activated with setting of
hw.psm.synaptics.natural_scroll or hw.psm.elantech.natural_scroll sysctl
values to 1.

Evdev protocol is not affected by this change too. Tune userland client
e.g. libinput to enable natural scrolling in that case.

Submitted by: nyan_myuji.xyz
Reviewed by: wulf
Differential Revision: https://reviews.freebsd.org/D20447

r348817:
psm(4): Fix Elantech trackpoint support.

Sign bits for X and Y motion data were taken from wrong places.

PR: 238291
Reported by: Andrey Kosachenko <andrey.kosachenko@gmail.com>
Tested by: Andrey Kosachenko <andrey.kosachenko@gmail.com>

r348818:
psm(4): Add extra sanity checks to Elantech trackpoint packet parser.

Add strict checks for unused bit states in Elantech trackpoint packet
parser to filter out spurious events produces by some hardware which
are detected as trackpoint packets. See comment on r328191 for example.

Tested by: Andrey Kosachenko <andrey.kosachenko@gmail.com>

4 years agoMFC r348993,349135:
Martin Matuska [Fri, 28 Jun 2019 22:31:53 +0000 (22:31 +0000)]
MFC r348993,349135:
Sync libarchive with vendor including security fixes

r348993:
  - version bumped to 3.4.0
  - check_symlinks_fsobj() without chdir() and fchdir()
  - bsdtar.1 manpage fixes
  - patches from OpenBSD to libarchive_fe/passphrase.c

r349135:
  PR #1212: RAR5 reader - window_mask was not updated correctly
            (OSS-Fuzz 15278)
  OSS-Fuzz 15120: RAR reader - extend use after free bugfix

4 years agoMFC r349372:
Glen Barber [Fri, 28 Jun 2019 20:28:20 +0000 (20:28 +0000)]
MFC r349372:
 Include files containing metadata specific to the branch in the
 directory where the individual distribution sets exist.

 The new metadata files include the build date, svn branch, and
 revision of the build.

Sponsored by: Rubicon Communications, LLC (Netgate)

4 years agoMFC r348887:
Mitchell Horne [Fri, 28 Jun 2019 01:03:55 +0000 (01:03 +0000)]
MFC r348887:
procstat: Recognize HWCAP and HWCAP2 with auxv command

Approved by: markj (mentor, implicit)

4 years agoMFC r348886:
Mitchell Horne [Fri, 28 Jun 2019 01:01:54 +0000 (01:01 +0000)]
MFC r348886:
RISC-V: expose extension bits in AT_HWCAP

Approved by: markj (mentor, implicit)

4 years agoMFC r348840:
Mitchell Horne [Fri, 28 Jun 2019 00:58:54 +0000 (00:58 +0000)]
MFC r348840:
Remove unused mcall_trap() function

Approved by: markj (mentor, implicit)

4 years agoMFC r348839:
Mitchell Horne [Fri, 28 Jun 2019 00:56:26 +0000 (00:56 +0000)]
MFC r348839:
Clean up some GENERIC options

Approved by: markj (mentor)

4 years agoMFC r348838:
Mitchell Horne [Fri, 28 Jun 2019 00:53:27 +0000 (00:53 +0000)]
MFC r348838:
Announce real and available memory at boot

Approved by: markj (mentor, implicit)

4 years agoMFC r348837:
Mitchell Horne [Fri, 28 Jun 2019 00:50:00 +0000 (00:50 +0000)]
MFC r348837:
Add TSLOG events to initriscv()

Approved by: markj (mentor, implicit)

4 years agoMFC 348835-348836:
Mitchell Horne [Fri, 28 Jun 2019 00:43:38 +0000 (00:43 +0000)]
MFC 348835-348836:
Fix global pointer relaxations in the RISC-V kernel

The gp register is intended to used by the linker as another means of
performing relaxations, and should point to the small data section (.sdata).

Currently gp is being used as the pcpu pointer within the kernel, but the more
appropriate choice for this is the tp register, which is unused.

Swap existing usage of gp with tp within the kernel, and set up gp properly
at boot with the value of __global_pointer$ for all harts.

Approved by: markj (mentor, implicit)

4 years agoMFC r346021:
Mitchell Horne [Fri, 28 Jun 2019 00:36:26 +0000 (00:36 +0000)]
MFC r346021:
RISC-V: initialize pcpu slightly earlier

In certain scenarios, it is possible for PCPU data to be
accessed before it has been initialized (e.g. during printf
if the kernel was built with the TSLOG option).

Initialize the PCPU pointer for hart 0 at the beginning of
initriscv() rather than near the end.

Approved by: markj (mentor)

4 years agoMFC r344827-344830, r344845:
Mark Johnston [Thu, 27 Jun 2019 16:48:24 +0000 (16:48 +0000)]
MFC r344827-344830, r344845:
Implement minidump support for RISC-V.

4 years agoMFC r349376: Fix strsep_quote() on strings without quotes.
Alexander Motin [Thu, 27 Jun 2019 14:10:58 +0000 (14:10 +0000)]
MFC r349376: Fix strsep_quote() on strings without quotes.

For strings without quotes and escapes dstptr and srcptr are equal, so
zeroing *dstptr before checking *srcptr is not a good idea.  In practice
it means that in -maproot=65534:65533 everything after the colon is lost.

The problem was there since r293305, but before r346976 it was covered by
improper strsep_quote() usage.

PR: 238725

4 years agoMFC: r347065 (by jhb) Emulate the "ADD reg, r/m" instruction (opcode 03H).
Rodney W. Grimes [Wed, 26 Jun 2019 21:59:43 +0000 (21:59 +0000)]
MFC: r347065 (by jhb) Emulate the "ADD reg, r/m" instruction (opcode 03H).

OVMF's flash variable storage is using add instructions when indexing
the variable store bootrom location.

4 years agoMFC r349196:
Mark Johnston [Wed, 26 Jun 2019 17:41:38 +0000 (17:41 +0000)]
MFC r349196:
Make zlib encoding messages idempotent.

PR: 238333

4 years agoMFC r343826, r346698, r349057-r349060, r349073-r349077, r349080-r349086, r349088,
Ian Lepore [Wed, 26 Jun 2019 17:28:55 +0000 (17:28 +0000)]
MFC r343826, r346698, r349057-r349060, r349073-r349077, r349080-r349086, r349088,
    r349091-r349097, r349115, r349119, r349130-r349132, r349143-r349145,
    r349164-r349168, r349174, r349269-r349273

r343826 by yuripv:
pwm.8: fix markup in synopsis, add -f description

r346698 by manu:
arm: allwinner: aw_pwm: compile it as module too

r349057:
Allow pwm(9) components to be selected individually, while 'device pwm'
still includes it all.

r349058:
In detach(), check for failure of bus_generic_detach(), only release
resources if they got allocated (because detach() gets called from attach()
to handle various failures), and delete the pwmbus child if it got created.

r349059:
Don't call pwmbus_attach_bus(), because it may not be present if this
driver is compiled into the kernel but pwmbus will be loaded as a module
when needed (and because of that, pwmbus_attach_bus() is going away in
the near future).  Instead, just directly do what that function did:
register the fdt xfef handle, and attach the pwmbus.

r349060:
Handle failure to enable the clock or obtain its frequency.

r349073:
Do not include pwm.h here, it is purely a userland interface file containing
ioctl defintions for the pwmc driver. It is not part of the pwmbus interface.

r349074:
Move/rename the sys/pwm.h header file to dev/pwm/pwmc.h.  The file contains
ioctl definitions and related datatypes that allow userland control of pwm
hardware via the pwmc device.  The new name and location better reflects its
assocation with a single device driver.

r349075:
Remove pwmbus_attach_bus(), it no longer has any callers.  Also remove a
couple prototypes for functions that never existed (and never will).

r349076:
Use device_delete_children() instead of a locally-rolled copy of it that
leaks the device-list memory.

r349077:
Add a missing #include.  I suspect this used to get included via some header
pollution that was cleaned up recently, and this file got missed in the
cleanup because it's not attached to the build unless you specifically
request this device in a custom kernel config.

r349080:
Make pwmbus driver and devclass vars static; they're not mentioned in any
header file, so they can't be used outside this file anyway.

r349081:
Unwrap prototype lines so that return type and function name are on the
same line.  No functional changes.

r349082:
Spell unsigned int as u_int and channel as chan; eliminates the need to wrap
some long lines.

r349083:
Give the aw_pwm driver a module version.

r349084:
Rename the channel_max method to channel_count, because that's what it's
returning.  (If the channel count is 2, then the max channel number is 1.)

r349085:
Destroy the cdev on device detach.  Also, make the driver and devclass
static, because nothing outside this file needs them.

r349086:
Restructure the pwm device hirearchy and interfaces.

The pwm and pwmbus interfaces were nearly identical, this merges them into a
single pwmbus interface.  The pwmbus driver now implements the pwmbus
interface by simply passing all calls through to its parent (the hardware
driver).  The channel_count method moves from pwm to pwmbus, and the
get_bus method is deleted (just no longer needed).

The net effect is that the interface for doing pwm stuff is now the same
regardless of whether you're a child of pwmbus, or some random driver
elsewhere in the hierarchy that is bypassing the pwmbus layer and is talking
directly to the hardware driver via cross-hierarchy connections established
using fdt data.

The pwmc driver is now a child of pwmbus, instead of being its sibling
(that's why the get_bus method is no longer needed; pwmc now gets the
device_t of the bus using device_get_parent()).

r349088:
Make pwm channel numbers unsigned.

r349091:
The pwm interface was replaced with pwmbus, include the right header file.

r349092:
Make channel number unsigned, and spell unsigned int u_int.  This should
have been part of r349088.

r349093:
This code no longer uses fdt/ofw stuff, no need to include ofw headers.

r349094:
Add module makefiles for pwm.

r349095:
Split the dtb MODULES_EXTRA line to a series of += lines, making it easier
to maintain and keep in alphabetical order, and paving the way for adding
some other modules that aren't dtb-related.

r349096:
Add module makefiles for Texas Instruments ARM SoCs.

The natural place to look for them based on how other SoCs are organized
would be sys/modules/ti, but that's already taken.  Drop a clue into
modules/ti/Makefile directing people to modules/arm_ti if they're looking
for ARM modules.

r349097:
Build SoC-specific modules with GENERIC for the SoCs that have them.

r349115:
Rename pwmbus.h to ofw_pwm.h, because after all the recent changes, there
is nothing left in the file that related to pwmbus at all.  It just contains
prototypes for the functions implemented in dev/pwm.ofw_pwm.c, so name it
accordingly and fix the include protect wrappers to match.

A new pwmbus.h will be coming along in a future commit.

r349119:
Rework pwmbus and pwmc so that each child will handle a single PWM channel.

Previously, there was a pwmc instance for each instance of pwm hardware
regardless of how many pwm channels that hardware supported.  Now there
will be a pwmc instance for each channel when the hardware supports
multiple channels.  With a separate instance for each channel, we can have
"named channels" in userland by making devfs alias entries in /dev/pwm.

These changes add support for ivars to pwmbus, and use an ivar to track the
channel number for each child.  It also adds support for hinted children.

In pwmc, the driver checks for a label hint, and if present, it's used to
create an alias for the cdev in /dev/pwm.  It's not anticipated that hints
will be heavily used, but it's easy to do and allows quick ad-hoc creation
of named channels from userland by using kenv to create hint.pwmc.N.label=
hints.  Upcoming changes will add FDT support, and most labels will
probably be specified that way.

r349130:
Add ofw_pwmbus to enumerate pwmbus devices on systems configured with fdt
data.  Also, add fdt support to pwmc.

r349131:
Implement the ofw_bus_get_node method in aw_pwm(4) so that ofw_pwmbus can
find its metadata for instantiating children.

r349132:
Add back a const qualifier I somehow fumbled away between test-building
and committing recent changes.

r349143:
Put the pwmc cdev filenames under the pwm directory along with any label
names.  I.e., everything related to pwm now goes in /dev/pwm.  This will
make it easier for userland tools to turn an unqualified name into a fully
qualified pathname, whether it's the base pwmcX.Y name or a label name.

r349144:
Follow changes in the pwmc(4) driver in relation to device filenames.

The driver now names its cdev nodes pwmcX.Y where X is unit number and
Y is the channel within that unit.  Change the default device name from
pwmc0 to pwmc0.0.  The driver now puts cdev files and label aliases in
the /dev/pwm directory, so allow the user to provide unqualified names
with -f and automatically prepend the /dev/pwm part for them.

Update the examples in the manpage to show the new device name format
and location within /dev/pwm.

r349145:
Put periods at the ends of argument descriptions.  Explain the relationship
between the period and duty arguments.

r349164:
Remove everything related to channels from the pwmc public interface, now
that there is a pwmc(4) instance per channel and the channel number is
maintained as a driver ivar rather than being passed in from userland.

r349165:
Explain the relationship between PWM hardware channels being controlled and
pwmc(4) device filenames.  Also, use uppercase PWM when the term is being
used as an acronym, and expand the acronym where it's first used.

r349166:
Rearrange the argument checking and processing so that enable and disable
can be combined with configuring the period and duty cycle (the same ioctl
sets all 3 values at once, so there's no reason to require the user to run
the program twice to get all 3 things set).

r349167:
Oops, it seems I left out the word 'cycle', fix it.

r349168:
Add a pwmc(4) manpage.

r349174:
Handle labels specified with hints even on FDT systems.  Hints are the
easiest thing for a user to control (via loader.conf or kenv+kldload), so
handle them in addition to any label specified via the FDT data.

r349269:
Some mundane tweaks and cleanups to help de-clutter the diffs of some
upcoming functional changes.

Add an ofw_compat_data table for probing compat strings, and use it to add
PNP data.  Remove some stray semicolons at the end of macro definitions,
and add a PWM_LOCK_ASSERT macro to round out the usual suite.  Move the
device_t and driver_methods structs to the end of the file.  Tweak comments.

r349270:
Add support for the PWM(9) API.  This allows configuring the pwm output using
pwm(9), but also maintains the historical sysctl config interface for
compatiblity with existing apps.  The two config systems are not compatible
with each other; if you use both interfaces to change configurations you're
likely to end up with incorrect output or none at all.

r349271:
Catch up with recent changes in pwmbus(9).  The pwm(9) and pwmbus(9)
interfaces were unified into pwmbus(9), and the PWMBUS_CHANNEL_MAX method
was renamed PWMBUS_CHANNEL_COUNT.  The pwmbus_attach_bus() function just
went away completely.  Also, fix a few typos such as s/is/if/.

r349272:
Do some general cleanup and light wordsmithing.

Sort methods alphabetically.  Wrap long lines.  Start sentences on a new
line.  Remove contractions (not because it's a good idea, just to silence
igor).  Add some explanation of the units for the period and duty arguments
and the convention for channel numbers.

r349273:
Add pwm to the armv7 GENERIC kernel, it's now used by TI and Allwinner.

4 years agoMFC r340130, r340134:
Ian Lepore [Wed, 26 Jun 2019 16:38:46 +0000 (16:38 +0000)]
MFC r340130, r340134:

r340130: (by oshogbo)

libcapsicum: Introduce caph_{rights,ioctls,fcntls}_limit

The idea behind those functions is not to force consumers to remember that there
is a need to check errno on failure. We already have a caph_enter(3) function
which does the same for cap_enter(2).

r340134: (by oshogbo)

Fix a recusive call introduce in the r340130.

4 years agoMFC r341268, r342003-r342007, r342087-r342088, r342091
Ian Lepore [Wed, 26 Jun 2019 15:34:35 +0000 (15:34 +0000)]
MFC r341268, r342003-r342007, r342087-r342088, r342091

r341268 by manu:
arm64: allwinner: Add a dtbo to have cpu operating points

This enables cpufreq on A64 boards.

r342003 by manu:
Add a pwm subsystem so we can configure pwm controller from kernel and userland.

The pwm subsystem consist of API for PWM controllers, pwmbus to register them
and a pwm(8) utility to talk to them from userland.

Reviewed by: oshgobo (capsicum), bcr (manpage), 0mp (manpage)
Differential Revision: https://reviews.freebsd.org/D17938

r342004 by manu:
arm64: allwinner: Add pwm driver

Add a pwm driver for Allwinner PWM
Add pwm and aw_pwm to the GENERIC kernel

r342005 by manu:
arm64: allwinner: Add DTSO for pwm and r_pwm

Those are both dtso (overlays) for the two pwm controllers found on the A64.

r342006 by manu:
arm64: allwinner: Fix pwm dtso

Double patched files ended up in the tree

Reported by: kevans

r342007 by manu:
pwm: Fix some arches by using %ju and casting to uintmax_t

Reported by: ci.freebsd.org

r342087 by manu:
pwm: Convert period and duty to unsigned int

We don't need a 64 bits value to store nanoseconds

Discused with: ian, jhibbits

r342088 by manu:
pwm(8): Add percentage value support for duty cycle

r342091 by manu:
allwinner: aw_pwm: Read value at attach

The booloaded might have configured the pwm controller so read the values.

4 years agoMFC r348740-r348741, r348995
Ian Lepore [Sun, 23 Jun 2019 16:59:06 +0000 (16:59 +0000)]
MFC r348740-r348741, r348995

r348740:
Don't refer to the cpu variable in a KASSERT before initializing it.

r348741:
For armv6 and armv7, build hwpmc_armv7.c as well as the base hwpmc_arm.c.

Submitted by: Arnaud YSMAL <arnaud.ysmal@stormshield.eu>

r348995:
Don't attempt to include hwpmc support for armv6, we're missing some of the
necessary support functions in cpu-v6.h, and it may be that the only armv6
platform we support (RPi, the bcm2835 SOC) is incapable of supporting hwpmc.

Reported by: dim@

4 years agoMFC r348169-r348170, r348172-r348173, r348183-r348184
Ian Lepore [Sun, 23 Jun 2019 16:16:55 +0000 (16:16 +0000)]
MFC r348169-r348170, r348172-r348173, r348183-r348184

r348169:
Define macros making it easier to define bus-specific pnpinfo for FDT systems.

Pnpinfo is bus-specific and requires the bus name. The FDTCOMPAT_PNP_INFO()
macro makes it easier to define new FDT-based pnpinfo for busses other than
simplebus.

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

r348170:
Add pnpinfo for icee(4) on fdt systems.

r348172:
Use the new FDTCOMPAT_PNP_INFO() macro to define SPIBUS_FDT_PNP_INFO().
Also rename SPIBUS_PNP_INFO -> SPIBUS_FDT_PNP_INFO because there could be
other kinds of pnpinfo for other (non-fdt) bus attachments.

r348173:
Rename IICBUS_FDT_PNPINFO -> IICBUS_FDT_PNP_INFO because all the other
existing pnpinfo-related macros right now use PNP_INFO, not PNPINFO.

r348183:
Add pnpinfo.

r348184:
Add pnpinfo to all i2c drivers that have FDT compat data.

4 years agoMFC r341386 (by manu):
Ian Lepore [Sun, 23 Jun 2019 16:05:53 +0000 (16:05 +0000)]
MFC r341386 (by manu):

Add Silergy SYR827 PMIC driver

SYR827 is a PMIC that can output a voltage from 0.7125V to 1.5V in 12.5mV steps
It's controlled via I2C.

4 years agoMFC r348141, r348143
Ian Lepore [Sun, 23 Jun 2019 16:00:29 +0000 (16:00 +0000)]
MFC r348141, r348143

r348141:
Handle the driftfile option correctly when ntpd_flags is empty.

The logic I originally wrote to detect whether a driftfile option was in the
set of flags was based on the result of removing the pattern *flag* being an
empty string.  That didn't handle the case where the string was empty to
begin with.  Doh!  So now it also specifically checks for an empty string.

The result of the bad check was that ntpd would run without a driftfile, but
it would do so only if it was running as root instead of the non-priveleged
ntpd user, which isn't a typical case.  Ntpd runs fine without a driftfile,
although it does take it longer to stabilize the clock frequency at startup.

Reported by: avg@
Pointy hat: ian@

r348143:
Remove accidentally-added blank line; the style throughout this file
is to use no whitespace between a comment block and the code it describes.

4 years agoMFC r348123, r348164, r348166
Ian Lepore [Sun, 23 Jun 2019 15:58:46 +0000 (15:58 +0000)]
MFC r348123, r348164, r348166

r348123:
Add pnp info to the imx_i2c driver.

r348164:
Mark i2c slave devices busy while they own the bus.

Many i2c slave drivers are in modules that can be unloaded.  If they detach
while IO is in progress the bus would be hung forever.  Conversely,
lower-layer drivers (iicbus and the hardware driver) also live in modules
and other kinds of bad things happen if they get detached while IO is in
progress.  Because device_busy() propagates up to parents, marking the slave
device busy while it owns the bus solves both kinds of problems that come
with detaching i2c devices while IO is in progress.

r348166:
Release the bus-recovery gpio pins in detach(), so that unload then
reload of the module works without "pin already allocated" errors.

4 years agoMFC r348120:
Ian Lepore [Sun, 23 Jun 2019 15:55:41 +0000 (15:55 +0000)]
MFC r348120:

Add a new 'tr' (transfer) mode to i2c(8) to support more i2c controllers.

Some i2c controller hardware does not provide a way to do individual START,
REPEAT-START and STOP actions on the i2c bus.  Instead, they can only do
a complete transfer as a single operation.  Typically they can do either
START-data-STOP or START-data-REPEATSTART-data-STOP.  In the i2c driver
framework, this corresponds to the iicbus_transfer method.  In the userland
interface they are initiated with the I2CRDWR ioctl command.

These changes add a new 'tr' mode which can be specified with the '-m'
command line option.  This mode should work on all hardware; when an i2c
controller driver doesn't directly support the iicbus_transfer method,
code in the i2c driver framework uses the lower-level START/REPEAT/STOP
methods to implement the transfer.  After this new mode has gotten some
testing on various hardware, the 'tr' mode should probably become the
new default mode.

PR: 189914

4 years agoMFC r348737:
Alan Somers [Sun, 23 Jun 2019 13:44:06 +0000 (13:44 +0000)]
MFC r348737:

Add a testing facility to manually reclaim a vnode

Add the debug.try_reclaim_vnode sysctl. When a pathname is written to it, it
will be reclaimed, as long as it isn't already or doomed. The purpose is to
gain test coverage for vnode reclamation, which is otherwise hard to
achieve.

Add the debug.ftry_reclaim_vnode sysctl.  It does the same thing, except
that its argument is a file descriptor instead of a pathname.

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20519

4 years agoMFC r348316:
Alan Somers [Sun, 23 Jun 2019 13:40:56 +0000 (13:40 +0000)]
MFC r348316:

VOP_ADVLOCK.9: fix description of flags

* F_RDLCK, F_UNLCK, and F_WRLCK aren't flags.  They're stored in the
  fl.l_type field.
* Add F_REMOTE, added in r177633
* Add F_NOINTR, added in r180025

Sponsored by: The FreeBSD Foundation

4 years agoMFC r348251:
Alan Somers [Sun, 23 Jun 2019 13:35:01 +0000 (13:35 +0000)]
MFC r348251:

Remove "struct ucred*" argument from vtruncbuf

vtruncbuf takes a "struct ucred*" argument. AFAICT, it's been unused ever
since that function was first added in r34611. Remove it.  Also, remove some
"struct ucred" arguments from fuse and nfs functions that were only used by
vtruncbuf.

Reviewed by: cem
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D20377

4 years agoMFC r348802:
Konstantin Belousov [Sun, 23 Jun 2019 11:09:08 +0000 (11:09 +0000)]
MFC r348802:
Remove lazy FPU switch support from amd64.

For the merge, the hw.lazy_fpu_switch sysctl was kept but made read-only
with the value of 0.

4 years agoMFC r348799:
Konstantin Belousov [Sun, 23 Jun 2019 11:02:31 +0000 (11:02 +0000)]
MFC r348799:
i386 trap.c: Remove unused MAX_TRAP_MSG define.

4 years agoMFC r348813:
Konstantin Belousov [Sun, 23 Jun 2019 11:01:09 +0000 (11:01 +0000)]
MFC r348813:
Make trap_msg array constant as well.

4 years agoMFC r348798:
Konstantin Belousov [Sun, 23 Jun 2019 10:59:53 +0000 (10:59 +0000)]
MFC r348798:
amd64 trap.c: Modernize syntax around trap_msg[].

4 years agoMFC r349160:
Glen Barber [Thu, 20 Jun 2019 14:34:45 +0000 (14:34 +0000)]
MFC r349160:
 Fix passing ${CONF_FILES} (which contains MAKE_CONF and
 SRC_CONF, __MAKE_CONF and SRCCONF, respectively) through
 to arm_install_base() and chroot_arm_build_release().
 This prevents failures when the target image is intended
 to be build with make.conf(5) and src.conf(5) overrides,
 which are correctly handled for non-embedded image builds.

PR: 238615
Sponsored by: The FreeBSD Foundation

4 years agoMFC r348728:
Michael Tuexen [Thu, 20 Jun 2019 07:50:38 +0000 (07:50 +0000)]
MFC r348728:

r347382 added receiver side DSACK support for the TCP base stack.
The corresponding changes for the RACK stack where missed and are added
by this commit.

4 years agodrm2/intel_iic: stop using iicbus_set_nostop
Andriy Gapon [Thu, 20 Jun 2019 06:53:59 +0000 (06:53 +0000)]
drm2/intel_iic: stop using iicbus_set_nostop

The desired mode of transmitting messages is implemented by subclassing
iicbb driver and overriding its iicbus_transfer method with an almost
identical copy that issues the stop condition only at the very end.

iicbus_set_nostop is very broken and is set to be removed from the KPI.

This is a direct commit as in head the drm drivers have been moved out
of the tree.
The same change has been committed to FreeBSDDesktop/drm-legacy.

4 years agoMFC r349152:
Cy Schubert [Thu, 20 Jun 2019 05:01:35 +0000 (05:01 +0000)]
MFC r349152:

Make ipf_objbytes a constant. ipf_objbytes is a table of internal data
structures that are saved across reboots by ipfs(8). The table is not
changed at runtime.

4 years agoMFC r348764: Allow UMA hash tables to expand faster then 2x in 20 seconds.
Alexander Motin [Thu, 20 Jun 2019 01:18:15 +0000 (01:18 +0000)]
MFC r348764: Allow UMA hash tables to expand faster then 2x in 20 seconds.

ZFS ABD allocates tons of 4KB chunks via UMA, requiring huge hash tables.
With initial hash table size of only 32 elements it takes ~20 expansions
or ~400 seconds to adapt to handling 220GB ZFS ARC.  During that time not
only the hash table is highly inefficient, but also each of those expan-
sions takes significant time with the lock held, blocking operation.

On my test system with 256GB of RAM and ZFS pool of 28 HDDs this change
reduces time needed to first time read 240GB from ~300-400s, during which
system is quite busy and unresponsive, to only ~150s with light CPU load
and just 5 sub-second CPU spikes to expand the hash table.

4 years agoMFC r349148:
Mark Johnston [Thu, 20 Jun 2019 00:23:51 +0000 (00:23 +0000)]
MFC r349148:
Add some missing MLINKs for tree(3).

4 years agoMFC r348772: Restore ARC MFU/MRU pressure
Andriy Gapon [Wed, 19 Jun 2019 20:27:31 +0000 (20:27 +0000)]
MFC r348772: Restore ARC MFU/MRU pressure

Submitted by: Slawa Olhovchenkov <slw@zxy.spb.ru>
Sponsored by: Integros [integros.com]

4 years agoMFC r348228: amdgpio: fix reading status of input pins
Andriy Gapon [Wed, 19 Jun 2019 20:20:02 +0000 (20:20 +0000)]
MFC r348228: amdgpio: fix reading status of input pins

4 years agoMFC r348227: amdgpio: remove new line symbols from pin names
Andriy Gapon [Wed, 19 Jun 2019 20:18:34 +0000 (20:18 +0000)]
MFC r348227: amdgpio: remove new line symbols from pin names

4 years agoMFC r348159: add mrsas_shutdown method
Andriy Gapon [Wed, 19 Jun 2019 20:15:53 +0000 (20:15 +0000)]
MFC r348159: add mrsas_shutdown method

Sponsored by: Panzura