]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoAdd sched_getcpu()
Konstantin Belousov [Fri, 22 Oct 2021 15:35:53 +0000 (18:35 +0300)]
Add sched_getcpu()

for compatibility with Linux.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32901

2 years agoAdd sched_get/setaffinity(3)
Konstantin Belousov [Fri, 22 Oct 2021 15:21:33 +0000 (18:21 +0300)]
Add sched_get/setaffinity(3)

for compatibility with Linux.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32901

2 years agoAdd real sched.h
Konstantin Belousov [Fri, 22 Oct 2021 15:17:21 +0000 (18:17 +0300)]
Add real sched.h

It is required by IEEE Std 1003.1-2008 AKA POSIX.

Put some Linux compatibility stuff under BSD_VISIBLE namespace, in
particular, sys/cpuset.h definitions.  Also, if user really want
Linux compatibility, she can request cpu_set_t typedef with
_WITH_CPU_SET_T define.

Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D32901

2 years agoRemove arm/linux from sysent toplevel target
Konstantin Belousov [Wed, 10 Nov 2021 17:54:06 +0000 (19:54 +0200)]
Remove arm/linux from sysent toplevel target

Sponsored by: The FreeBSD Foundation
Fixes: 65e485014b0dcf53e0

2 years agoifconfig(8): Don't set network interface capabilities when there is no change.
Hans Petter Selasky [Tue, 9 Nov 2021 21:07:43 +0000 (22:07 +0100)]
ifconfig(8): Don't set network interface capabilities when there is no change.

A quick grep through the kernel code shows network drivers compute the
changed bits of network capabilities after a SIOCSIFCAP IOCTL(2) by
using the bitwise exclusive or operation. When the set capabilities
are equal to the already read capabilities, no action will be taken.

Let ifconfig(8) predict this case and skip the SIOCSIFCAP IOCTL(2)
system call.

Discussed with: kib@ (revert change in case of issues)
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agozfs: merge openzfs/zfs@6c8f03232 (master) into main
Martin Matuska [Wed, 10 Nov 2021 12:41:17 +0000 (13:41 +0100)]
zfs: merge openzfs/zfs@6c8f03232 (master) into main

Notable upstream pull request merges:
  #12333: Creating gang ABDs for Raidz optional IOs
  #12668: FreeBSD: Catch up with recent VFS changes
  #12687: Skip spacemaps reading in case of pool readonly import
  #12704: Fix some FreeBSD VOPs to synchronize properly with teardown
  #12724: Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

Obtained from: OpenZFS
OpenZFS commit: 6c8f03232aa98e950bfe187f9ff53d3541687b50

2 years agopf tests: Test PR259689
Kristof Provost [Mon, 8 Nov 2021 12:28:43 +0000 (13:28 +0100)]
pf tests: Test PR259689

We didn't populate dyncnt/tblcnt, so `pfctl -sr -vv` might not have the
table element count.

PR: 259689
MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32893

2 years agopf: ensure we populate dyncnt/tblcnt in struct pf_addr_wrap
Kristof Provost [Mon, 8 Nov 2021 12:25:20 +0000 (13:25 +0100)]
pf: ensure we populate dyncnt/tblcnt in struct pf_addr_wrap

PR: 259689
MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32892

2 years agoUSB dwc3 controller: add quirk snps,dis_rxdet_inp3_quirk
Bjoern A. Zeeb [Wed, 10 Nov 2021 00:22:20 +0000 (00:22 +0000)]
USB dwc3 controller: add quirk snps,dis_rxdet_inp3_quirk

Add support for the "snps,dis_rxdet_inp3_quirk" quirk needed
at least on SolidRun's HoneyComb.

Reviewed by: manu, mw
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D32921

2 years agoarm64/gicv3: improve a panic message
Bjoern A. Zeeb [Tue, 9 Nov 2021 22:11:15 +0000 (22:11 +0000)]
arm64/gicv3: improve a panic message

Print the device/unit in the panic message for which we cannot get
the MSI device ID to have a clue where to start looking.
While here use __func__ instead of hardcoding the function name.

Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D32917

2 years agostress2: Added a new zfs test scenario
Peter Holm [Wed, 10 Nov 2021 09:27:44 +0000 (10:27 +0100)]
stress2: Added a new zfs test scenario

2 years agoUpgrade to libabigail 2.0.0
Dimitri John Ledkov [Mon, 8 Nov 2021 15:44:04 +0000 (15:44 +0000)]
Upgrade to libabigail 2.0.0

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Dimitri John Ledkov <dimitri.ledkov@canonical.com>
Closes #12722
Closes #12739

2 years agozed: Control NVMe fault LEDs
Tony Hutter [Wed, 10 Nov 2021 00:50:18 +0000 (16:50 -0800)]
zed: Control NVMe fault LEDs

The ZED code currently can only turn on the fault LED for
a faulted disk in a JBOD enclosure.  This extends support
for faulted NVMe disks as well.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #12648
Closes #12695

2 years agoSkip spacemaps reading in case of pool readonly import
Fedor Uporov [Tue, 9 Nov 2021 20:50:39 +0000 (12:50 -0800)]
Skip spacemaps reading in case of pool readonly import

The only zdb utility require to read metaslab-related data during
read-only pool import because of spacemaps validation. Add global
variable which will allow zdb read spacemaps in case of readonly
import mode.

Reviewed-by: Serapheim Dimitropoulos <serapheim@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Fedor Uporov <fuporov.vstack@gmail.com>
Closes #9095
Closes #12687

2 years agoSingle IO issue for raidz writes with skip sector
Brian Atkinson [Tue, 9 Nov 2021 19:51:33 +0000 (12:51 -0700)]
Single IO issue for raidz writes with skip sector

In order to reduce contention on the vq_lock, optional skip sectors
for Raidz writes can be placed into a single IO request. This is done by
padding out the linear ABD for a parity column to contain the skip
sector and by creating gang ABD to contain the data and skip sector for
data columns.

The vdev_raidz_map_alloc() function now contains specific functions for
both reads and write to allocate the ABD's that will be issued down to
the VDEV chldren.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-By: Mark Maybee <mark.maybee@delphix.com>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Closes #12333

2 years agoLinux 5.16 compat: submit_bio()
Brian Behlendorf [Sat, 6 Nov 2021 00:17:03 +0000 (17:17 -0700)]
Linux 5.16 compat: submit_bio()

The submit_bio() prototype has changed again.  The version is 5.16
still only expects a single argument but the return type has changed
to void.  Since we never used the returned value before update the
configure check to detect both single arg versions.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Alexander Lobakin <alobakin@pm.me>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12725

2 years agoLinux 5.16 compat: linux/elevator.h
Brian Behlendorf [Fri, 5 Nov 2021 00:03:50 +0000 (17:03 -0700)]
Linux 5.16 compat: linux/elevator.h

Commit https://github.com/torvalds/linux/commit/2e9bc346 moved
the elevator.h header under the block/ directory as part of some
refactoring.  This turns out not to be a problem since there's
no longer anything we need from the header.  This has been the
case for some time, this change removes the elevator.h include
and replaces it with a major.h include.

Reviewed-by: Alexander Lobakin <alobakin@pm.me>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #12725

2 years agoRemove unfinished ARM Linuxulator support
Edward Tomasz Napierala [Tue, 9 Nov 2021 14:39:35 +0000 (14:39 +0000)]
Remove unfinished ARM Linuxulator support

This was never made to work, and given that 32-bit ARM support
is quickly becoming irrelevant, there is no point in keeping it
in the tree.

Sponsored By: EPSRC
Reviewed By: emaste
Differential Revision: https://reviews.freebsd.org/D32918

2 years agoUPDATING: Change update procedure to use etcupdate(8) over mergemaster(8)
Dries Michiels [Sun, 7 Feb 2021 19:25:31 +0000 (20:25 +0100)]
UPDATING: Change update procedure to use etcupdate(8) over mergemaster(8)

This commit aligns the steps in UPDATING with the steps from the
handbook which already prefers etcupdate(8). While here also remove a
dubious comment.

PR: 252417
Reviewed by: ceri
Approved by: philip (mentor), imp
Differential Revision: https://reviews.freebsd.org/D28062

2 years agogrep: fix/remove references to -P
Kyle Evans [Wed, 10 Nov 2021 06:42:42 +0000 (00:42 -0600)]
grep: fix/remove references to -P

-P in gnugrepland means PCRE, which we do not support.  We may eventually
support it if onigmo ends up getting imported as a more performant regex
implementation, and we can re-add it properly in these places (and more)
when that time comes.

The optstr change is a functional nop; the case was not explicitly handled,
thus ending in usage() anyways.

Reported by: Vladimir Misev (via twitter)

2 years agocxgbe(4): sysctl to track the last L1_CFG32 requested by the driver.
Navdeep Parhar [Wed, 3 Nov 2021 18:00:44 +0000 (11:00 -0700)]
cxgbe(4): sysctl to track the last L1_CFG32 requested by the driver.

dev.<port>.<inst>.rcaps

 # sysctl dev.cc | grep rcaps
 dev.cc.1.rcaps: 581107776
 dev.cc.0.rcaps: 582156414

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agoVOP_ALLOCATE: Update man page for Commit f0c9847a6c47
Rick Macklem [Tue, 9 Nov 2021 23:13:15 +0000 (15:13 -0800)]
VOP_ALLOCATE: Update man page for Commit f0c9847a6c47

Commit f0c9847a6c47 added the ioflag and cred arguments to
VOP_ALLOCATE() for NFSv4.2 server support. This patch updates
the man page for these arguments.

Reviewed by: khng, gbe
Differential Revision: https://reviews.freebsd.org/D32898

2 years agomii: update URL for OUIs
Bjoern A. Zeeb [Tue, 9 Nov 2021 21:35:45 +0000 (21:35 +0000)]
mii: update URL for OUIs

Update the URL for OUIs as the old one is 404 not even 301 anymore.

2 years agoservice(8): Bump date after commit 66d795ec191b994f317b0ad812bb6e7943347c1f .
Hans Petter Selasky [Tue, 9 Nov 2021 21:32:16 +0000 (22:32 +0100)]
service(8): Bump date after commit 66d795ec191b994f317b0ad812bb6e7943347c1f .

Differential revision:  https://reviews.freebsd.org/D32582
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoservice(8): Fix typo in man page.
Hans Petter Selasky [Tue, 9 Nov 2021 21:09:57 +0000 (22:09 +0100)]
service(8): Fix typo in man page.

Differential revision:  https://reviews.freebsd.org/D32582
Submitted by:   christos@
MFC after:      1 week
Sponsored by:   NVIDIA Networking

2 years agokldstat(8): Fix indentation, whitespace to tabs.
Hans Petter Selasky [Tue, 9 Nov 2021 21:09:54 +0000 (22:09 +0100)]
kldstat(8): Fix indentation, whitespace to tabs.

No functional change intended.

Differential revision:  https://reviews.freebsd.org/D32502
Submitted by:   christos@
MFC after:      1 week
Sponsored by:   NVIDIA Networking

2 years agoecho(1): Replace errexit() with err(3)
Hans Petter Selasky [Tue, 9 Nov 2021 21:09:46 +0000 (22:09 +0100)]
echo(1): Replace errexit() with err(3)

Differential revision: https://reviews.freebsd.org/D32501
Submitted by: christos@
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agosnd_uaudio(4): Fix string index computations for iFeature.
Hans Petter Selasky [Tue, 9 Nov 2021 21:07:36 +0000 (22:07 +0100)]
snd_uaudio(4): Fix string index computations for iFeature.

This allows the iFeature strings to be properly read by the snd_uaudio(4) driver,
when parsing the audio feature unit descriptors.

Submitted by: Zhichao1.Li@dell.com
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoshare/misc: update portmgr membership
Rene Ladan [Tue, 9 Nov 2021 20:25:14 +0000 (21:25 +0100)]
share/misc: update portmgr membership

After five years of service, adamw steps down from portmgr.
Also please welcome tcberner to portmgr.

2 years agocrypto: Don't assert on valid IV length for Chacha20-Poly1305.
John Baldwin [Tue, 9 Nov 2021 18:52:30 +0000 (10:52 -0800)]
crypto: Don't assert on valid IV length for Chacha20-Poly1305.

The assertion checking for valid IV lengths added in 1833d6042c9a
was not properly updated to permit an IV length of 8 in commit
42dcd39528c6.

Reported by: syzbot+f0c0559b8be1d6eb28c7@syzkaller.appspotmail.com
Reviewed by: markj
Fixes: 42dcd39528c6 crypto: Support Chacha20-Poly1305 with a nonce size of 8 bytes.
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32860

2 years agoDon't require the socket lock for sorele().
John Baldwin [Tue, 9 Nov 2021 18:50:12 +0000 (10:50 -0800)]
Don't require the socket lock for sorele().

Previously, sorele() always required the socket lock and dropped the
lock if the released reference was not the last reference.  Many
callers locked the socket lock just before calling sorele() resulting
in a wasted lock/unlock when not dropping the last reference.

Move the previous implementation of sorele() into a new
sorele_locked() function and use it instead of sorele() for various
places in uipc_socket.c that called sorele() while already holding the
socket lock.

The sorele() macro now uses refcount_release_if_not_last() try to drop
the socket reference without locking the socket.  If that shortcut
fails, it locks the socket and calls sorele_locked().

Reviewed by: kib, markj
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D32741

2 years agotests: do not build ktls_test if WITHOUT_OPENSSL
Ed Maste [Mon, 8 Nov 2021 17:08:34 +0000 (12:08 -0500)]
tests: do not build ktls_test if WITHOUT_OPENSSL

ktls_test requires libcrypto to build, and fails if it is not available
(which is the case when building WITHOUT_OPENSSL).

Reported by: Michael Dexter, Build Option Survey
Reviewed by: jhb
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32895

2 years agopci: Implement pci_bar_enabled() for SR-IOV VFs
Mark Johnston [Tue, 9 Nov 2021 18:07:57 +0000 (13:07 -0500)]
pci: Implement pci_bar_enabled() for SR-IOV VFs

In a VF's configuration space, "memory space enable" is hard-wired to 0,
so the existing implementation always returns false.  We need to read
the SR-IOV control register from the PF device to get the value of the
MSE bit.

Fix pci_bar_enabled() to read this register instead for VFs.  I don't
see any way to access the PF's config space without a backpointer in the
pci device ivars, so I added one.

This fixes a regression where bhyve(8) fails to map the MSI-X table
after commit 7fa233534736 ("bhyve: Map the MSI-X table unconditionally
for passthrough") when a VF is passed through, since with that commit we
use PCIOCBARMMAP to map the table and that ioctl always fails for VFs
without this change.  As a bonus, pciconf(8) now correctly reports the
enablement of BARs for VFs.

Reported and tested by: Raúl Muñoz <raul.munoz@custos.es>
Reviewed by: rstone, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32839

2 years agovfs: Consistently validate AT_* flags in kern_* functions.
John Baldwin [Tue, 9 Nov 2021 17:42:12 +0000 (09:42 -0800)]
vfs: Consistently validate AT_* flags in kern_* functions.

Some syscalls checked for invalid AT_* flags in sys_* and others in
kern_*.

Reviewed by: kib
Obtained from: CheriBSD
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D32864

2 years agokern_utimensat: Update name of last arg in prototype.
John Baldwin [Thu, 4 Nov 2021 18:02:55 +0000 (11:02 -0700)]
kern_utimensat: Update name of last arg in prototype.

The last argument is a mask of AT_* flags, not a namei cnp flag as
'int follow' implies in other kern_* functions.

Obtained from: CheriBSD
Sponsored by: The University of Cambridge, Google Inc.

2 years agosystat: clean up code assuming network classes
Mike Karels [Thu, 28 Oct 2021 23:39:43 +0000 (18:39 -0500)]
systat: clean up code assuming network classes

Similar to netstat, clean up code that uses inet_lnaof() to check for
binding to "host 0" (lowest host on network) as a "network" bind.
Such things don't happen, and current networks are seldom if ever
found in /etc/networks.

MFC after: 1 month
Reviewers: tuexen
Differential Revision: https://reviews.freebsd.org/D32720

2 years agosockstat: change check for wildcard sockets to avoid historical classes
Mike Karels [Wed, 27 Oct 2021 03:12:24 +0000 (22:12 -0500)]
sockstat: change check for wildcard sockets to avoid historical classes

sockstat was checking whether a bound address was "host 0", the lowest
host on a network, using inet_lnaof().  This only works for class A/B/C.
However, it isn't useful to bind such an address unless it is really
the unspecified address INADDR_ANY.  Change the check to to use that.

MFC after: 1 month
Reviewd by: tuexen
Differential Revision: https://reviews.freebsd.org/D32715

2 years agonetstat: reduce use of historical Internet classes
Mike Karels [Wed, 27 Oct 2021 03:39:10 +0000 (22:39 -0500)]
netstat: reduce use of historical Internet classes

When attempting to characterize bound addresses, netstat was checking
for host 0 on a (historical) net using inet_lnaof().  Such addresses
are not normally bound, as they would not work, with the exception
of the unspecified address, INADDR_ANY.  Check for that explicitly.
Similarly, don't check bound addresses for a match to a network name.

MFC after: 1 month
Reviewed by: tuexen
Differential Revision: https://reviews.freebsd.org/D32714

2 years agomountd: deprecate exports to a network without mask
Mike Karels [Wed, 27 Oct 2021 03:48:23 +0000 (22:48 -0500)]
mountd: deprecate exports to a network without mask

The exports file format allows export to a network using an explicit
mask or prefix length (CIDR).  It also allows a network with just
a dotted address, in which case the historical mask was used.
Deprecate this usage, and warn when it is used.  Document that this
is deprecated.

MFC after: 1 month
Reviewed by: rmacklem, bcr, #manpages
Differential Revision: https://reviews.freebsd.org/D32713

2 years agores_init: remove unused inet_makeaddr with IN_LOOPBACKNET
Mike Karels [Wed, 27 Oct 2021 03:33:36 +0000 (22:33 -0500)]
res_init: remove unused inet_makeaddr with IN_LOOPBACKNET

Remove code that is ifdefed out on USELOOPBACK, which uses historical
class.  No functional change intended.

MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D32712

2 years agoman pages: deprecate Internet Class A/B/C
Mike Karels [Wed, 27 Oct 2021 03:25:09 +0000 (22:25 -0500)]
man pages: deprecate Internet Class A/B/C

Mark functions inet_netof(), inet_lnaof(), and inet_makeaddr() as
deprecated, as they assume Class A/B/C.  inet_makeaddr() mostly works
when networks are a multiple of 8 bits, but warn for anything other
than historical classes.  Reduce other mentions of network classes.

MFC after: 1 month
Reviewed by: bcr, #manpages
Differential Revision: https://reviews.freebsd.org/D32711

2 years agoifconfig: warn if setting an Internet address without mask
Mike Karels [Thu, 28 Oct 2021 14:32:31 +0000 (09:32 -0500)]
ifconfig: warn if setting an Internet address without mask

Add a postproc function for af_inet, and add interface flags as a
parameter.  Check there if setting an address without a mask unless
the interface is loopback or point-to-point, where mask is not really
meaningful; warn if so.  This will hopefully be an error in the future.

MFC after: 1 month
Reviewd by: bz
Differential Revision: https://reviews.freebsd.org/D32709

2 years agokernel: deprecate Internet Class A/B/C
Mike Karels [Wed, 27 Oct 2021 03:01:09 +0000 (22:01 -0500)]
kernel: deprecate Internet Class A/B/C

Hide historical Class A/B/C macros unless IN_HISTORICAL_NETS is defined;
define it for user level.  Define IN_MULTICAST separately from IN_CLASSD,
and use it in pf instead of IN_CLASSD.  Stop using class for setting
default masks when not specified; instead, define new default mask
(24 bits).  Warn when an Internet address is set without a mask.

MFC after: 1 month
Reviewed by: cy
Differential Revision: https://reviews.freebsd.org/D32708

2 years agoetherswitch/felix: remove unused function
Bjoern A. Zeeb [Tue, 9 Nov 2021 15:01:46 +0000 (15:01 +0000)]
etherswitch/felix: remove unused function

Remove unused file-local static function felix_phyforport()
which was missed in 29cf6a79acb7 to avoid compile time warning.

Reviewed by: Kornel Duleba (mindal semihalf.com)
Differential Revision: https://reviews.freebsd.org/D32906

2 years agolinux: Replace ifdefs in ptrace with per-architecture callbacks
Edward Tomasz Napierala [Tue, 9 Nov 2021 11:54:06 +0000 (11:54 +0000)]
linux: Replace ifdefs in ptrace with per-architecture callbacks

It's a cleanup; no (intended) functional changes.

Sponsored By: EPSRC
Reviewed By: kib
Differential Revision: https://reviews.freebsd.org/D32888

2 years agonet tests: basic if_stf test
Kristof Provost [Fri, 5 Nov 2021 14:20:19 +0000 (15:20 +0100)]
net tests: basic if_stf test

Test the 6to4 code.

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32850

2 years agoif_stf: enable use in vnet jails
Kristof Provost [Fri, 5 Nov 2021 11:01:37 +0000 (12:01 +0100)]
if_stf: enable use in vnet jails

The cloner must be per-vnet so that cloned interfaces get destroyed when
the vnet goes away. Otherwise we fail assertions in vnet_if_uninit():

panic: vnet_if_uninit:475 tailq &V_ifnet=0xfffffe01665fe070 not empty
cpuid = 19
time = 1636107064
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe015d0cac60
vpanic() at vpanic+0x187/frame 0xfffffe015d0cacc0
panic() at panic+0x43/frame 0xfffffe015d0cad20
vnet_if_uninit() at vnet_if_uninit+0x7b/frame 0xfffffe015d0cad30
vnet_destroy() at vnet_destroy+0x170/frame 0xfffffe015d0cad60
prison_deref() at prison_deref+0x9b0/frame 0xfffffe015d0cadd0
sys_jail_remove() at sys_jail_remove+0x119/frame 0xfffffe015d0cae00
amd64_syscall() at amd64_syscall+0x12e/frame 0xfffffe015d0caf30
fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe015d0caf30
--- syscall (508, FreeBSD ELF64, sys_jail_remove), rip = 0x8011e920a, rsp = 0x7fffffffe788, rbp = 0x7fffffffe810 ---
KDB: enter: panic

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32849

2 years agoif_stf: style(9) pass
Kristof Provost [Fri, 5 Nov 2021 10:20:16 +0000 (11:20 +0100)]
if_stf: style(9) pass

As stated in style(9): "Values in return statements should be enclosed
in parentheses."

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32848

2 years agostress2: Exclude the files in .git. Simplify test by using timeout(1)
Peter Holm [Tue, 9 Nov 2021 08:28:12 +0000 (08:28 +0000)]
stress2: Exclude the files in .git.  Simplify test by using timeout(1)

2 years agoExclude zvol_misc_volmode for now
Rich Ercolani [Tue, 9 Nov 2021 02:01:19 +0000 (21:01 -0500)]
Exclude zvol_misc_volmode for now

It keeps failing, on changes which aren't related at all.

So until someone runs down why, I'd like it to stop being the
sole reason for CI failures.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #12733

2 years agonfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError
Rick Macklem [Mon, 8 Nov 2021 23:58:00 +0000 (15:58 -0800)]
nfsd: Fix the NFSv4.2 pNFS MDS server for NFSERR_NOSPC via LayoutError

If a pNFS server's DS runs out of disk space, it replies
NFSERR_NOSPC to the client doing writing.  For the Linux
client, it then sends a LayoutError RPC to the MDS server to
tell it about the error and keeps retrying, doing repeated
LayoutGets to the MDS and Write RPCs to the DS.  The Linux client is
"stuck" until disk space on the DS is free'd up unless
a subsequent LayoutGet request is sent a NFSERR_NOSPC
reply.
The looping problem still occurs for NFSv4.1 mounts, but no
fix for this is known at this time.

This patch changes the pNFS MDS server to reply to LayoutGet
operations with NFSERR_NOSPC once a LayoutError reports the
problem, until the DS has available space.  This keeps the Linux
NFSv4.2 from looping.

Found during recent testing because of issues w.r.t. a DS
being out of space found during a recent IEFT NFSv4 working
group testing event.

MFC after: 2 weeks

2 years agocam_iosched: Fix a comment
Warner Losh [Mon, 8 Nov 2021 21:20:41 +0000 (14:20 -0700)]
cam_iosched: Fix a comment

Array elements were added, but this comment wasn't updated.

Sponsored by: Netflix

2 years agonfsd: Fix f_bavail and f_ffree for NFSv4 when negative
Rick Macklem [Mon, 8 Nov 2021 20:59:31 +0000 (12:59 -0800)]
nfsd: Fix f_bavail and f_ffree for NFSv4 when negative

Since the NFS Space_available and Files_available are unsigned,
the NFSv3 server sets them to 0 when negative, so that they
do not appear to be large positive values for non-FreeBSD clients.
This patch fixes the NFSv4 server to do the same.

Found during a recent IEFT NFSv4 working group testing event.

MFC after: 2 weeks

2 years agohwpmc: initialize arm64 counter/interrupt state
Mitchell Horne [Mon, 8 Nov 2021 19:33:25 +0000 (15:33 -0400)]
hwpmc: initialize arm64 counter/interrupt state

Performance counters and overflow interrupts are assumed to be disabled
by default, but this is not guaranteed. Ensure we disable both during
per-cpu initialization, before enabling the PMU. Otherwise, some systems
(such as the Ampere eMAG) would experience an interrupt storm upon
loading the hwpmc module.

Reviewed by: br
MFC after: 5 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32854

2 years agotcp: Printf should be removed.
Randall Stewart [Mon, 8 Nov 2021 16:49:34 +0000 (11:49 -0500)]
tcp: Printf should be removed.

There is a printf when a socket option down to the CC module fails, this really
should not be a printf. In fact this whole option needs to be re-thought in coordination
with some other changes in the CC modules (its just not right but its ok what it
does here if it fails since it will just use the ECN beta).

Reviewed by: Michael Tuexen
Sponsored by: Netflix Inc.
Differential Revision: https://reviews.freebsd.org/D32894

2 years agoComplete steps 5 and 9 for new committers (driesm)
Dries Michiels [Mon, 8 Nov 2021 13:18:29 +0000 (14:18 +0100)]
Complete steps 5 and 9 for new committers (driesm)

Reviewed by: 0mp (mentor)
Approved by: 0mp (mentor)
Differential Revision: https://reviews.freebsd.org/D32890

2 years agolibc: fix the test
Mariusz Zaborski [Mon, 8 Nov 2021 11:30:51 +0000 (12:30 +0100)]
libc: fix the test

Currently after cleaning the variables the environment will be always
set to the intEnviron as documented in __rebuild_environ.

Reported by: lwhsu@, jenkins

2 years agoigc: Use hardware routine for PHY reset
Peter Grehan [Mon, 1 Nov 2021 13:35:43 +0000 (23:35 +1000)]
igc: Use hardware routine for PHY reset

Summary:
The previously used software reset routine wasn't sufficient
to reset the PHY if the bootloader hadn't left the device in
an initialized state. This was seen with the onboard igc port
on an 11th-gen Intel NUC.

The software reset isn't used in the Linux driver so all related
code has been removed.

Tested on: Netgate 6100 onboard ports, a discrete PCIe I225-LM card,
and an 11th-gen Intel NUC.

Reported by: woodsb02
Tested by: woodsb02 (NUC)
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D32772

2 years agonet tests: basic if_gif(4) test case
Kristof Provost [Thu, 4 Nov 2021 16:15:19 +0000 (17:15 +0100)]
net tests: basic if_gif(4) test case

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32836

2 years agoif_gif: fix vnet shutdown panic
Kristof Provost [Thu, 4 Nov 2021 17:05:58 +0000 (18:05 +0100)]
if_gif: fix vnet shutdown panic

If an if_gif exists and has an address assigned inside a vnet when the
vnet is shut down we failed to clean up the address, leading to a panic
when we ip_destroy() and the V_in_ifaddrhashtbl is not empty.

This happens because of the VNET_SYS(UN)INIT order, which means we
destroy the if_gif interface before the addresses can be purged (and
if_detach() does not remove addresses, it assumes this will be done by
the stack teardown code).

Set subsystem SI_SUB_PSEUDO just like if_bridge so the cleanup
operations happen in the correct order.

MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D32835

2 years agoifconfig.8: Add the missing option -vlanhwcsum
Zhenlei Huang [Mon, 8 Nov 2021 10:10:11 +0000 (11:10 +0100)]
ifconfig.8: Add the missing option -vlanhwcsum

Commit 9b776960c3276c47528435f343b3b6d0143113a8 documented a new option
vlanhwcsum but missed the opposite one -vlanhwcsum.

Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D32887

2 years agoossl: Add support for ETA mode
Kornel Duleba [Tue, 2 Nov 2021 11:57:20 +0000 (12:57 +0100)]
ossl: Add support for ETA mode

Now that the AES-CBC is supported we can handle ETA requests.

Sponsored by: Stormshield
Obtained from: Semihalf
Reviewed by: jhb
Differential revision: https://reviews.freebsd.org/D32100

2 years agoossl: Add support for AES-CBC cipher
Kornel Duleba [Tue, 2 Nov 2021 11:53:22 +0000 (12:53 +0100)]
ossl: Add support for AES-CBC cipher

AES-CBC OpenSSL assembly is used underneath.
The glue layer(ossl_aes.c) is based on CHACHA20 implementation.
Contrary to the SHA and CHACHA20, AES OpenSSL assembly logic
does not have a fallback implementation in case CPU doesn't
support required instructions.
Because of that CPU caps are checked during initialization and AES
support is advertised only if available.
The feature is available on all architectures that ossl supports:
i386, amd64, arm64.

The biggest advantage of this patch over existing solutions
(aesni(4) and armv8crypto(4)) is that it supports SHA,
allowing for ETA operations.

Sponsored by: Stormshield
Obtained from: Semihalf
Reviewed by: jhb (previous version)
Differential revision: https://reviews.freebsd.org/D32099

2 years agofind(1): Update date format reference and remove cvs(1) references
Felix Johnson [Mon, 8 Nov 2021 06:14:58 +0000 (01:14 -0500)]
find(1): Update date format reference and remove cvs(1) references

cvs(1) is not installed by default. Change the date format reference to
note that find(1) understands ISO8601 and RFC822 date formats. Also
remove references to cvs(1).

PR: 254894
MFC after: 3 days
Reported by: danielsh@apache.org

2 years agoFix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency
Brian Behlendorf [Sun, 7 Nov 2021 21:27:44 +0000 (13:27 -0800)]
Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency

When using lseek(2) to report data/holes memory mapped regions of
the file were ignored.  This could result in incorrect results.
To handle this zfs_holey_common() was updated to asynchronously
writeback any dirty mmap(2) regions prior to reporting holes.

Additionally, while not strictly required, the dn_struct_rwlock is
now held over the dirty check to prevent the dnode structure from
changing.  This ensures that a clean dnode can't be dirtied before
the data/hole is located.  The range lock is now also taken to
ensure the call cannot race with zfs_write().

Furthermore, the code was refactored to provide a dnode_is_dirty()
helper function which checks the dnode for any dirty records to
determine its dirtiness.

Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #11900
Closes #12724

2 years agonfsd: Fix the NFSv4 pNFS MDS server for DS NFSERR_NOSPC
Rick Macklem [Sun, 7 Nov 2021 19:43:03 +0000 (11:43 -0800)]
nfsd: Fix the NFSv4 pNFS MDS server for DS NFSERR_NOSPC

If a pNFS server's DS runs out of disk space, it replies
NFSERR_NOSPC to the client doing writing.  For the Linux
client, it then sends a LayoutError RPC to the server to
tell it about the error and keeps retrying, doing repeated
LayoutGet and Write RPCs to the DS.  The Linux client is
"stuck" until disk space on the DS is free'd up.
For a mirrored server configuration, the first mirror that
ran out of space was taken offline.  This does not make
much sense, since the other mirror(s) will run out of space
soon and the fix is a manual cleanup up disk space.

This patch changes the pNFS server to not disable a mirror
for the mirrored case when this occurs.

Further work is needed, since the Linux client expects the
MDS to reply NFSERR_NOSPC to LayoutGets once the DS is out
of space.  Without this further change, the above mentioned
looping occurs.

Found during a recent IEFT NFSv4 working group testing event.

MFC after: 2 weeks

2 years agolibc: add clearenv function
Mariusz Zaborski [Sun, 7 Nov 2021 15:15:28 +0000 (16:15 +0100)]
libc: add clearenv function

The clearenv(3) function allows us to clear all environment
variable in one shot. This may be useful for security programs that
want to control the environment or what variables are passed to new
spawned programs.

Reviewed by: scf, markj (secteam), 0mp (manpages)
Differential Revision: https://reviews.freebsd.org/D28223

2 years agoe1000: Fix a typo in a source code comment
Gordon Bergling [Sun, 7 Nov 2021 13:12:23 +0000 (14:12 +0100)]
e1000: Fix a typo in a source code comment

- s/overwritting/overwriting/

MFC after: 3 days

2 years agoefi(8): Fix a typo in a source code comment
Gordon Bergling [Sun, 7 Nov 2021 13:07:24 +0000 (14:07 +0100)]
efi(8): Fix a typo in a source code comment

- s/writting/writing/

MFC after: 3 days

2 years agousb_audio: Fix a typo in a source code comment
Gordon Bergling [Sun, 7 Nov 2021 13:04:26 +0000 (14:04 +0100)]
usb_audio: Fix a typo in a source code comment

- s/maxium/maximum/

MFC after: 3 days

2 years agolinux: Add ptrace(2) support on arm64
Edward Tomasz Napierala [Sun, 7 Nov 2021 08:22:41 +0000 (08:22 +0000)]
linux: Add ptrace(2) support on arm64

This moves linux_ptrace.c from sys/amd64/linux/ to sys/compat/linux/,
making it possible to use it on architectures other than amd64.
It also enables Linux ptrace(2) on arm64.

Relnotes: yes
Sponsored By: EPSRC
Differential Revision: https://reviews.freebsd.org/D32868

2 years agopowerd(8): Add rc.conf(5) to see also
Felix Johnson [Sun, 7 Nov 2021 02:39:23 +0000 (22:39 -0400)]
powerd(8): Add rc.conf(5) to see also

powerd_flags is mentioned in rc.conf(5) and can be set there and pass to
powerd.

PR: 258320
MFC after: 3 days
Reported by: Michael <michael.hmich@gmail.com>

2 years agoAwk: Add error file
Warner Losh [Sat, 6 Nov 2021 22:24:36 +0000 (16:24 -0600)]
Awk: Add error file

Add the expected output on stderr file.

Sponsored by: Netflix

2 years agoUPDATING: Add entry for commit f0c9847a6c47
Rick Macklem [Sat, 6 Nov 2021 20:40:50 +0000 (13:40 -0700)]
UPDATING: Add entry for commit f0c9847a6c47

2 years agoparam.h: Bump __FreeBSD_version for commit f0c9847a6c47
Rick Macklem [Sat, 6 Nov 2021 20:34:56 +0000 (13:34 -0700)]
param.h: Bump __FreeBSD_version for commit f0c9847a6c47

Commit f0c9847a6c47 changed the arguments for VOP_ALLOCATE.
Bump __FreeBSD_version to 1400041.

2 years agovfs: Add "ioflag" and "cred" arguments to VOP_ALLOCATE
Rick Macklem [Sat, 6 Nov 2021 20:26:43 +0000 (13:26 -0700)]
vfs: Add "ioflag" and "cred" arguments to VOP_ALLOCATE

When the NFSv4.2 server does a VOP_ALLOCATE(), it needs
the operation to be done for the RPC's credential and not
td_ucred. It also needs the writing to be done synchronously.

This patch adds "ioflag" and "cred" arguments to VOP_ALLOCATE()
and modifies vop_stdallocate() to use these arguments.

The VOP_ALLOCATE.9 man page will be patched separately.

Reviewed by: khng, kib
Differential Revision: https://reviews.freebsd.org/D32865

2 years agork805: add system poweroff support
Andriy Gapon [Sat, 6 Nov 2021 17:58:43 +0000 (19:58 +0200)]
rk805: add system poweroff support

On my Rock64 neither EFI nor PSCI shutdown actually power off the board.
RK805 does the job.

Reviewed by: manu, peterj
Differential Revision: https://reviews.freebsd.org/D30786

2 years agork3328_codec: set output gain to the value found in linux
Andriy Gapon [Wed, 9 Jun 2021 08:50:55 +0000 (11:50 +0300)]
rk3328_codec: set output gain to the value found in linux

According to Linux code the new value should correspond to 0dB gain
while the original value corresponded to 6dB gain which may be
uncomfortable for some output types.

MFC after: 1 month

2 years agork3328_codec: add delays between register writes in the initial setup
Andriy Gapon [Wed, 9 Jun 2021 09:10:50 +0000 (12:10 +0300)]
rk3328_codec: add delays between register writes in the initial setup

MFC after: 1 month

2 years agork3328_codec: bump delays in set_power and set_mute
Andriy Gapon [Wed, 9 Jun 2021 08:58:42 +0000 (11:58 +0300)]
rk3328_codec: bump delays in set_power and set_mute

According to Linux they should be 10 ms, not 10 us.
Also, add a read before the second write in set_power.

MFC after: 1 month

2 years agork_i2s: modify GRF_SOC_CON8 only for rk3399
Andriy Gapon [Wed, 9 Jun 2021 08:02:36 +0000 (11:02 +0300)]
rk_i2s: modify GRF_SOC_CON8 only for rk3399

The register definition has nothing to do with, e.g., rk3328.

MFC after: 1 month

2 years agork3328_codec: fix a problem with the enable value
Andriy Gapon [Wed, 9 Jun 2021 07:51:00 +0000 (10:51 +0300)]
rk3328_codec: fix a problem with the enable value

The previous value contained only the mask bit ("twice"),
but not the value bit.

While here, make a couple of lines a little bit prettier.

MFC after: 1 month

2 years agoadd rk3328_codec and rk_i2s from gonzoua/socaudio
Oleksandr Tymoshenko [Fri, 4 Jun 2021 12:18:06 +0000 (15:18 +0300)]
add rk3328_codec and rk_i2s from gonzoua/socaudio

Not sure why these haven't been committed with the rest of the SoC Audio
project.  They work sufficiently well for me.

Discussed with: manu
MFC after: 1 month

2 years agofiles.arm64: fix sort order for aw_i2s.c
Andriy Gapon [Fri, 24 Sep 2021 17:26:07 +0000 (20:26 +0300)]
files.arm64: fix sort order for aw_i2s.c

2 years agohtu21: don't needlessly bother hardware when measurements are not needed
Andriy Gapon [Sat, 6 Nov 2021 16:47:32 +0000 (18:47 +0200)]
htu21: don't needlessly bother hardware when measurements are not needed

sysctl(8) first queries a sysctl to get a size of its value even if the
sysctl is of a fixed size, e.g. it has an integer type.
Only after that sysctl(8) queries an actual value of the sysctl.

Previosuly the driver would needlessly read a sensor in the first step.

MFC after: 1 week

2 years agocamcontrol: dump received data for MMC command even if it is unknown
Andriy Gapon [Sat, 6 Nov 2021 10:23:55 +0000 (12:23 +0200)]
camcontrol: dump received data for MMC command even if it is unknown

For example, EXT_CSD can be read like this:
    # camcontrol mmcsdcmd 2:0:0 -c 8 -a 0 -f 0x35 -l 512
    CMD 8 arg 0 flags 35
    MMCIO: error 0, 00000900 00000000 00000000 00000000
    No command-specific decoder for CMD 8
    0000   00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
    0010   39 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |9...............|
    ...
    0100   00 00 00 00 00 00 00 00 01 08 00 01 02 02 00 00  |................|
    ...
    01e0   00 00 00 00 00 00 00 00 00 81 c7 00 00 01 03 07  |................|
    01f0   05 00 03 01 3f 3f 01 01 01 00 00 00 00 00 00 00  |....??..........|

MFC after: 2 weeks

2 years agohtu21: allow configuration via hints on FDT-based systems
Andriy Gapon [Thu, 4 Nov 2021 11:56:12 +0000 (13:56 +0200)]
htu21: allow configuration via hints on FDT-based systems

On-board devices should be configured via the FDT and overlays.
Hints are primarily useful for external and temporarily attached devices.
Adding hints is much easier and faster than writing and compiling
an overlay.

MFC after: 1 week

2 years agopcf8574: driver for 8-pin quasi-bidirectional GPIO over I2C
Andriy Gapon [Thu, 1 Oct 2020 09:48:56 +0000 (12:48 +0300)]
pcf8574: driver for 8-pin quasi-bidirectional GPIO over I2C

MFC after: 2 weeks

2 years agogpioled: allow the driver to be disabled via fdt
Andriy Gapon [Fri, 25 Sep 2020 07:32:47 +0000 (10:32 +0300)]
gpioled: allow the driver to be disabled via fdt

2 years agodriver for MAX44009 I2C illuminance sensor
Andriy Gapon [Thu, 20 Aug 2020 08:11:31 +0000 (11:11 +0300)]
driver for MAX44009 I2C illuminance sensor

2 years agopcf8591: driver for adc/dac with i2c interface
Andriy Gapon [Mon, 17 Aug 2020 10:05:11 +0000 (13:05 +0300)]
pcf8591: driver for adc/dac with i2c interface

2 years agoRevert "ossl: Add support for AES-CBC cipher"
Wojciech Macek [Sat, 6 Nov 2021 16:46:01 +0000 (17:46 +0100)]
Revert "ossl: Add support for AES-CBC cipher"

This reverts commit 849faf4e0ba9a8b8f24ff34da93a0fd46c14eda9.

2 years agoRevert "ossl: Add support for ETA mode"
Wojciech Macek [Sat, 6 Nov 2021 16:45:50 +0000 (17:45 +0100)]
Revert "ossl: Add support for ETA mode"

This reverts commit 048a71b46e816de8fb95b553a8ad0e98c0d51e12.

2 years agounionfs: Improve vnode validation
Jason A. Harmening [Thu, 28 Oct 2021 05:37:48 +0000 (22:37 -0700)]
unionfs: Improve vnode validation

Instead of validating that a vnode belongs to unionfs only when the
caller attempts to extract the upper or lower vnode pointers, do this
validation any time the caller tries to extract a unionfs_node from
the vnode private data.

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

2 years agounionfs: replace zero-length read check with KASSERT
Jason A. Harmening [Thu, 28 Oct 2021 05:31:52 +0000 (22:31 -0700)]
unionfs: replace zero-length read check with KASSERT

The lower FS VOP_READDIR() shouldn't return an empty read without
setting EOF; don't try to handle this case only for non-DIAGNOSTIC
builds.

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

2 years agounionfs: Improve locking assertions
Jason A. Harmening [Thu, 28 Oct 2021 05:31:16 +0000 (22:31 -0700)]
unionfs: Improve locking assertions

Add an assertion to unionfs_node_update() that the upper vnode is
exclusively locked; we already make the same assertion for the lower
vnode.
Also, assert in unionfs_noderem() that the vnode lock is not recursed
and acquire v_lock with LK_NOWAIT.  Since v_lock is not the active
lock for the vnode at this point, it should not be contended.
Finally, remove VDIR assertions from unionfs_get_cached_vnode().
lvp/uvp will be referenced but not locked at this point, so v_type
may concurrently change due to vgonel().  The cached unionfs node,
if one exists, would only have made it into the cache if lvp/uvp
were of type VDIR at the time of insertion; the corresponding
VDIR assert in unionfs_ins_cached_vnode() should be safe because
lvp/uvp will be locked by that time and will not be used if either
is doomed.

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

2 years agounionfs: assorted style fixes
Jason A. Harmening [Sun, 24 Oct 2021 20:26:49 +0000 (13:26 -0700)]
unionfs: assorted style fixes

No functional change intended, beyond slightly different panic strings

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

2 years agounionfs: various locking fixes
Jason A. Harmening [Sun, 24 Oct 2021 17:24:18 +0000 (10:24 -0700)]
unionfs: various locking fixes

--Clearing cached subdirectories in unionfs_noderem() should be done
  under the vnode interlock

--When preparing to switch the vnode lock in both unionfs_node_update()
  and unionfs_noderem(), the incoming lock should be acquired before
  updating the v_vnlock field to point to it.  Otherwise we effectively
  break the locking contract for a brief window.

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

2 years agolagg: update capabilites on SIOCSIFMTU
Wojciech Macek [Sat, 6 Nov 2021 09:41:43 +0000 (10:41 +0100)]
lagg: update capabilites on SIOCSIFMTU

Some NICs might have limited capabilities when Jumbo frames are used.
For exampe some neta interfaces only support TX csum offload when the
packet size is lower than a value specified in DT.
Fix it by re-reading capabilities of children interfaces after MTU
has been successfully changed.

Found by: Jerome Tomczyk <jerome.tomczyk@stormshield.eu>
Reviewed by: jhb
Obtained from: Semihalf
Sponsored by: Stormshield
Differential revision: https://reviews.freebsd.org/D32724

2 years agolinux: Implement linux_to_bsd_regset() on arm64
Edward Tomasz Napierala [Sat, 6 Nov 2021 08:35:04 +0000 (08:35 +0000)]
linux: Implement linux_to_bsd_regset() on arm64

This will be used by ptrace.

Sponsored By: EPSRC