]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoUPDATING: Add entry for commit a599f9f7620b
Rick Macklem [Sun, 3 Oct 2021 22:54:33 +0000 (15:54 -0700)]
UPDATING: Add entry for commit a599f9f7620b

2 years agoparam.h: Bump __FreeBSD_version for commit a599f9f7620b
Rick Macklem [Sun, 3 Oct 2021 22:50:46 +0000 (15:50 -0700)]
param.h: Bump __FreeBSD_version for commit a599f9f7620b

Commit a599f9f7620b deleted the variable called nfs_maxcopyrange
from nfscommon.ko, since it no longer needs to be global.  As such,
the other nfs modules must be rebuilt from up to date sources.
Bump __FreeBSD_version to 1300516.

2 years agonfscl: Make vfs.nfs.maxcopyrange larger by default
Rick Macklem [Sat, 11 Sep 2021 22:36:32 +0000 (15:36 -0700)]
nfscl: Make vfs.nfs.maxcopyrange larger by default

As of commit 103b207536f9, the NFSv4.2 server will limit the size
of a Copy operation based upon a 1 second timeout.  The Linux 5.2
kernel server also limits Copy operation size to 4Mbytes.
As such, the NFSv4.2 client can attempt a large Copy without
resulting in a long RPC RTT for these servers.

This patch changes vfs.nfs.maxcopyrange to 64bits and sets
the default to the maximum possible size of SSIZE_MAX, since
a larger size makes the Copy operation more efficient and
allows for copying to complete with fewer RPCs.
The sysctl may be need to be made smaller for other non-FreeBSD
NFSv4.2 servers.

(cherry picked from commit 55089ef4f8bb7c4d18ee964b4214024e35ae4b0e)

2 years agocmp: add -b, --print-bytes
Kyle Evans [Thu, 23 Sep 2021 05:46:30 +0000 (00:46 -0500)]
cmp: add -b, --print-bytes

This is compatible with GNU cmp.

Reviewed by: bapt, markj (earlier version)
Sponsored by: Klara, Inc.

(cherry picked from commit f66b9b40f403f7c30fec3c4ceed93c6e8fafa8ac)

2 years agocmp: add -i, --ignore-initial, an alternative to skip1/skip2 args
Kyle Evans [Thu, 23 Sep 2021 05:43:32 +0000 (00:43 -0500)]
cmp: add -i, --ignore-initial, an alternative to skip1/skip2 args

This is compatible with GNU cmp.

Reviewed by: markj
Sponsored by: Klara, Inc.

(cherry picked from commit 8d546b6832eea031f95f30eaec3232ec1256a281)

2 years agocmp: add -n, --bytes to limit number of bytes to compare
Kyle Evans [Thu, 23 Sep 2021 05:26:52 +0000 (00:26 -0500)]
cmp: add -n, --bytes to limit number of bytes to compare

This is compatible with GNU cmp.

Reviewed by: markj
Sponsored by: Klara, Inc.

(cherry picked from commit 4e380e8474609875c4cf5277b3755ac29079a8b5)

2 years agocmp: accept SI suffixes for skip1 and skip2
Kyle Evans [Thu, 23 Sep 2021 05:17:07 +0000 (00:17 -0500)]
cmp: accept SI suffixes for skip1 and skip2

This is compatible with GNU cmp.

Reviewed by: bapt (earlier version), markj, imp
Sponsored by: Klara, Inc.

(cherry picked from commit f6787614fd4db2a9d5e649af0e819852ebd5a19d)

2 years agohostname: avoid strcpy() overlap in -d flag handling
Kyle Evans [Sat, 25 Sep 2021 05:00:31 +0000 (00:00 -0500)]
hostname: avoid strcpy() overlap in -d flag handling

We don't need the strcpy() anyways, just use a pointer to the hostname
buffer and move it forward for `hostname -d`.

Sponsored by: Klara, Inc.

(cherry picked from commit 33c1e7271ac21a626829289780b88071ae46ec65)

2 years agomakesyscalls: sprinkle some assert() on standard function calls
Kyle Evans [Wed, 27 Jan 2021 18:12:33 +0000 (12:12 -0600)]
makesyscalls: sprinkle some assert() on standard function calls

Improves our error reporting, ensuring that we aren't just ignoring
errors in the common case.

Note specifically the boundary where we have to change up our error
handling approach.  It's fine to error() out up until we create the
tempdir, then the rest should try to handle it gracefully and abort().
A future change will clean this up further by pcall'ing all of the bits
that cannot currently error() without cleaning up.

(cherry picked from commit 6687410af7dba54e19b773684a969e9c590999e4)

2 years agomakesyscalls: stop trying to remove . and .. in cleanup
Kyle Evans [Wed, 27 Jan 2021 17:46:15 +0000 (11:46 -0600)]
makesyscalls: stop trying to remove . and .. in cleanup

lfs.dir() will include these entries, but os.remove() cannot remove them
for obvious reasons.

(cherry picked from commit 340e009ecc00e5e74d58920ca909968dc7e88af1)

2 years agoman: reset OPTIND before parsing args
Kyle Evans [Wed, 22 Sep 2021 19:58:19 +0000 (14:58 -0500)]
man: reset OPTIND before parsing args

From jilles: POSIX requires that a script set `OPTIND=1` before using
different sets of parameters with `getopts`, or the results will be
unspecified.

The specific problem observed here is that we would execute `man -f` or
`man -k` without cleaning up state from man_parse_args()' `getopts`
loop.  FreeBSD's /bin/sh seems to reset OPTIND to 1 after we hit the
second getopts loop, rendering the following shift harmless; other
/bin/sh implementations will leave it at what we came into the loop at
(e.g., bash as /bin/sh), shifting off any keywords that we had.

Input from: jilles
Reviewed by: allanjude, bapt, imp
Sponsored by: Klara, Inc.

(cherry picked from commit f555b39e6bb7cbfbe1905e90f64c4dfc4456fabb)

2 years agoixgbe: whitespace cleanup pass
Kevin Bowling [Sun, 26 Sep 2021 18:29:00 +0000 (11:29 -0700)]
ixgbe: whitespace cleanup pass

Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D32131

(cherry picked from commit 15d077995bd2c56b7b1742ea2d4e9070ff7e9427)

2 years agoixgbe: Rename 'struct adapter' to 'struct ixgbe_softc'
Kevin Bowling [Sat, 25 Sep 2021 23:12:23 +0000 (16:12 -0700)]
ixgbe: Rename 'struct adapter' to 'struct ixgbe_softc'

Rename the 'struct adapter' to 'struct ixgbe_softc' to avoid type
ambiguity in things like kgdb.

Reviewed by: markj
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D32131

(cherry picked from commit b1d5caf3c7504a1ece0498ec3f7360ac760577f7)

2 years agocam: Avoiding waking up doneq threads if we're dumping
Mark Johnston [Sat, 25 Sep 2021 14:13:56 +0000 (10:13 -0400)]
cam: Avoiding waking up doneq threads if we're dumping

Depending on the state of the target doneq thread at the time of the
panic, the wakeup can hang indefinitely in thread_lock_block_wait().
That function should likely be modified to return immediately if the
scheduler is stopped, but it is also preferable to avoid wakeups in
general after a panic.

Reported by: pho
Reviewed by: mav, imp
Sponsored by: The FreeBSD Foundation

(cherry picked from commit ed8ef7ae8b05d9f73db2182b5e24b0b76b0783a2)

2 years agounzip: sync with NetBSD upstream to add passphrase support
Yoshihiro Takahashi [Sat, 25 Sep 2021 16:32:42 +0000 (01:32 +0900)]
unzip: sync with NetBSD upstream to add passphrase support

- Add support for password protected zip archives.
  We use memset_s() rather than explicit_bzero() for more portable
  (See PR).
- Use success/failure macro in exit()
- Mention ZIPX format in unzip(1)

Submitted by: Mingye Wang and Alex Kozlov (ak@)
PR: 244181
Reviewed by: mizhka
Obtained from: NetBSD
Differential Revision: https://reviews.freebsd.org/D28892

(cherry picked from commit a4724ff48108840416c83f10e15d666ac8d78937)

2 years agong_ether: Create netgraph nodes for bridge interfaces.
Yoshihiro Takahashi [Sat, 25 Sep 2021 16:24:33 +0000 (01:24 +0900)]
ng_ether: Create netgraph nodes for bridge interfaces.

Create netgraph nodes for bridge interfaces when the ng_ether module
is loaded.  If a bridge interface is created after loading the ng_ether
module, a netgraph node is created via ether_ifattach().

(cherry picked from commit d653b188e89b5e44b2708342c7d3b789398f9cde)

2 years agoubsan: Fix a typo in an error message
Gordon Bergling [Sat, 25 Sep 2021 09:47:24 +0000 (11:47 +0200)]
ubsan: Fix a typo in an error message

- s/asumption/assumption/

Obtained from: NetBSD

(cherry picked from commit 2aad906266d67eea6ad11d8e0c6fe9263077ee99)

2 years agoopencrypto: Disallow requests which pass VERIFY_DIGEST without a MAC
Mark Johnston [Fri, 24 Sep 2021 19:04:45 +0000 (15:04 -0400)]
opencrypto: Disallow requests which pass VERIFY_DIGEST without a MAC

Otherwise we can end up comparing the computed digest with an
uninitialized kernel buffer.

In cryptoaead_op() we already unconditionally fail the request if a
pointer to a digest buffer is not specified.

Based on a patch by Simran Kathpalia.

Reported by: syzkaller
Reviewed by: jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/529

(cherry picked from commit 7c2f227a17ded0934c5941c7911797edb7d770a2)

2 years agotests/sys/sys: Raise WARNS
Mark Johnston [Fri, 24 Sep 2021 15:31:53 +0000 (11:31 -0400)]
tests/sys/sys: Raise WARNS

Sponsored by: The FreeBSD Foundation

(cherry picked from commit d7cf1b262f9ff5e799446f0cbbd007905ab4ae24)

2 years agoloader: dev_net.c should use __func__ with printf
Toomas Soome [Fri, 24 Sep 2021 14:07:20 +0000 (17:07 +0300)]
loader: dev_net.c should use __func__ with printf

We have printf calls with function name hardwired to string,
sometimes wrong name. Use __func__ instead.

(cherry picked from commit 1a25c51e38a7c9f46ec195836233636616741f06)

2 years agoamd64 UEFI loader: enable automatic disable of staging area copying
Konstantin Belousov [Tue, 10 Aug 2021 01:38:55 +0000 (04:38 +0300)]
amd64 UEFI loader: enable automatic disable of staging area copying

(cherry picked from commit 6032b6ba9596927aba15a8004ade521a593a7d58)

2 years agox86 bounce_bus_dmamem_alloc(): use malloc_aligned() only when possible
Konstantin Belousov [Fri, 24 Sep 2021 17:46:47 +0000 (20:46 +0300)]
x86 bounce_bus_dmamem_alloc(): use malloc_aligned() only when possible

(cherry picked from commit 24a3897c2c3205c2ec0cf323c555c403d3171e2c)

2 years agomalloc_aligned(9): allow zero size and alignment
Konstantin Belousov [Fri, 24 Sep 2021 19:38:53 +0000 (22:38 +0300)]
malloc_aligned(9): allow zero size and alignment

(cherry picked from commit 71d31f1cf6012b143fd676f099430818ae949c3f)

2 years agopidfile test: guarantee nul termination of the read pid string
Konstantin Belousov [Fri, 24 Sep 2021 03:12:20 +0000 (06:12 +0300)]
pidfile test: guarantee nul termination of the read pid string

PR: 258701

(cherry picked from commit 364790beafec707ca3e334683e4030684d829be2)

2 years agoaio_aqueue(): avoid ucred leak on failure path
Konstantin Belousov [Fri, 24 Sep 2021 00:14:56 +0000 (03:14 +0300)]
aio_aqueue(): avoid ucred leak on failure path

PR: 258698

(cherry picked from commit 45c2c7c484de7747014492b17ff89e323ee66496)

2 years agopf: fix pagefault in pf_getstatus()
Kristof Provost [Thu, 23 Sep 2021 08:39:49 +0000 (10:39 +0200)]
pf: fix pagefault in pf_getstatus()

We can't copyout() while holding a lock, in case it triggers a page
fault.
Release the lock before copyout, which is safe because we've already
copied all the data into the nvlist.

PR: 258601
Reviewed by: mjg
MFC after: 1 week
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D32076

(cherry picked from commit cb13059663e455b3fc69c293dadec53c164490dc)

2 years agopowerpc64: change CAS to support Radix MMU
Leandro Lupori [Wed, 15 Sep 2021 18:12:37 +0000 (15:12 -0300)]
powerpc64: change CAS to support Radix MMU

Use radix_mmu environment variable to select between Hash or Radix
MMU, when performing the CAS method call. This matches kernel's
behavior, by selecting Hash MMU by default and Radix if radix_mmu
is not zero, to make sure that both loader and kernel always select
the same MMU.

The device tree is queried to detect Radix/GTSE support and to
find out if CAS is supported, making the old CPU version and HV
bit checks unnecessary now.

Reviewed by: jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D31951

(cherry picked from commit a58abcde2c83b71e5bf19575750564f7bff78833)

2 years agoEliminate an unnecessary rerun request in fsck_ffs.
Kirk McKusick [Wed, 22 Sep 2021 23:16:39 +0000 (16:16 -0700)]
Eliminate an unnecessary rerun request in fsck_ffs.

(cherry picked from commit b31c5a25321363ab95c1642dffc6e92319dc42ce)

2 years agogmultipath failloop test: Add a checker for dtrace executes successfully or not
Li-Wen Hsu [Tue, 28 Sep 2021 18:02:27 +0000 (02:02 +0800)]
gmultipath failloop test: Add a checker for dtrace executes successfully or not

To provide a more informative error message.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 819961c5808b053c626648e202dec42a19ebe7a6)
(cherry picked from commit 38dac71d0a95ab2cf2cdfa1232cc556008b7ac94)
(cherry picked from commit b9b5a4dd590e1b30d92dc73b3d1f22d3303e7e41)

2 years agoe1000: fix K1 configuration
Wenzhuo Lu [Fri, 16 Oct 2015 02:51:09 +0000 (10:51 +0800)]
e1000: fix K1 configuration

This patch is for the following updates to the K1 configurations:
Tx idle period for entering K1 should be 128 ns.
Minimum Tx idle period in K1 should be 256 ns.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
PR: 258153
Reviewed by: erj
Tested by: iron.udjin@gmail.com
Approved by: imp
Obtained from: DPDK (6f934fa24dfd437c90ead96bc7598ee77a117ede)
MFC after: 1 week

(cherry picked from commit d5ad2f2a67df54ac40148cca21e726bc61a48982)

2 years ago[fib_algo][dxr] Split unused range chunk list in multiple buckets
Marko Zec [Sat, 25 Sep 2021 04:29:48 +0000 (06:29 +0200)]
[fib_algo][dxr] Split unused range chunk list in multiple buckets

Traversing a single list of unused range chunks in search for a block
of optimal size was suboptimal.

The experience with real-world BGP workloads has shown that on average
unused range chunks are tiny, mostly in length from 1 to 4 or 5, when
DXR is configured with K = 20 which is the current default (D16X4R).

Therefore, introduce a limited amount of buckets to accomodate descriptors
of empty blocks of fixed (small) size, so that those can be found in O(1)
time.  If no empty chunks of the requested size can be found in fixed-size
buckets, the search continues in an unsorted list of empty chunks of
variable lengths, which should only happen infrequently.

This change should permit us to manage significantly more empty range
chunks without sacrifying the speed of incremental range table updating.

MFC after: 3 days

2 years ago[fib_algo][dxr] Merge adjacent empty range table chunks.
Marko Zec [Mon, 20 Sep 2021 04:30:45 +0000 (06:30 +0200)]
[fib_algo][dxr] Merge adjacent empty range table chunks.

MFC after: 3 days

2 years agoTemporarily skip flaky tset cases under sys.aio.aio_test in CI
Li-Wen Hsu [Tue, 28 Sep 2021 19:32:47 +0000 (03:32 +0800)]
Temporarily skip flaky tset cases under sys.aio.aio_test in CI

- sys.aio.aio_test.vectored_unaligned
- sys.aio.aio_test.vectored_zvol_poll

PR: 258766
Sponsored by: The FreeBSD Foundation

(cherry picked from commit 0b159faaca08e6cc89abcd29b4b1360f97e18245)

2 years agonfsclient: Fix a typo in a comment
Gordon Bergling [Sun, 26 Sep 2021 13:17:00 +0000 (15:17 +0200)]
nfsclient: Fix a typo in a comment

- s/derefernce/dereference/

(cherry picked from commit 90d60ca8b7f2483cdc162633f7ea4738dad8fa0e)

2 years agopcm(4): Fix a common typo in source code comments
Gordon Bergling [Sun, 26 Sep 2021 09:21:16 +0000 (11:21 +0200)]
pcm(4): Fix a common typo in source code comments

- s/prefered/preferred/

(cherry picked from commit 513ee901eec639da45796d563168f0af966705e6)

2 years agosctp: Fix a typo in a comment
Gordon Bergling [Sun, 26 Sep 2021 13:15:39 +0000 (15:15 +0200)]
sctp: Fix a typo in a comment

- s/assue/assume/

(cherry picked from commit d2e616147db7b688f2b6fa8ec6d545bc4253de92)

2 years agojail(9): Fix a typo in a comment
Gordon Bergling [Sun, 26 Sep 2021 13:17:41 +0000 (15:17 +0200)]
jail(9): Fix a typo in a comment

- s/erorr/error/

(cherry picked from commit 8771ff75384dec8c9f95ce25b6ca9a639c4b208c)

2 years agocontrib/tzdata: correct DST in Jordan and Samoa
Philip Paeps [Wed, 29 Sep 2021 04:43:58 +0000 (12:43 +0800)]
contrib/tzdata: correct DST in Jordan and Samoa

Direct commit to stable/13.

The recent tzdata 2021b release includes several controversial changes
under active debate on the tz mailing list.  Pending consensus, and
hopefully a 2021c release reflecting it, only merge the DST changes for
Jordan and Samoa.  This corrects present and future timestamps in those
regions.

2 years agoFix false device_set_unit() error.
Alexander Motin [Wed, 22 Sep 2021 12:42:36 +0000 (08:42 -0400)]
Fix false device_set_unit() error.

It should silently succeed if the current unit number is the same as
requested, not fail immediately.

MFC after: 1 week

(cherry picked from commit 884f38590c3cc0b1a2c00904c1f1f6c791376308)

2 years agoipmi(4): Limit maximum watchdog pre-timeout interval.
Alexander Motin [Wed, 15 Sep 2021 01:06:39 +0000 (21:06 -0400)]
ipmi(4): Limit maximum watchdog pre-timeout interval.

Previous code by default setting pre-timeout interval to 120 seconds
made impossible to set timeout interval below that, resulting in error
0xcc (Invalid data field in Request) at least on Supermicro boards.

To fix that limit maximum pre-timeout interval to ~1/4 of the timeout
interval, that sounds like a reasonable default: not too short to fire
too late, but also not too long to give many false reports.

MFC after: 2 weeks

(cherry picked from commit 6c2d4404161aa2bac1c7992afbf5a763f1a6f66e)

2 years agoe1000: Fix tabstop width in if_em.h
Kevin Bowling [Sun, 26 Sep 2021 16:24:53 +0000 (09:24 -0700)]
e1000: Fix tabstop width in if_em.h

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

(cherry picked from commit 21ab8c75c940dd15343b4af28b18a66f377e670a)

2 years agouart: Add PCI ID for intel 100 Series/C230 Series AMT
Sean Bruno [Sat, 25 Sep 2021 22:23:08 +0000 (15:23 -0700)]
uart: Add PCI ID for intel 100 Series/C230 Series AMT

Reviewed by: kib
Tested by: kbowling
Differential Revision: https://reviews.freebsd.org/D32146

(cherry picked from commit fb640be4e9443f1890680c27b213825300bc65f4)

2 years agoe1000: Re-arm link changes
Kevin Bowling [Mon, 27 Sep 2021 16:17:48 +0000 (09:17 -0700)]
e1000: Re-arm link changes

A change to MSI-X link handler was somehow causing issues on
MSI-based em(4) NICs.

Revert the change based on user reports and testing.

PR: 258551
Reported by: Franco Fichtner <franco@opnsense.org>, t_uemura@macome.co.jp
Reviewed by: markj, Franco Fichtner <franco@opnsense.org>
Tested by: t_uemura@macome.co.jp
MFC after: 1 day

(cherry picked from commit 450c3f8b3d259c7eb82488319aff45f1f6554aaf)

2 years agoe1000: Rename 'struct adapter' to 'struct e1000_sc'
Kevin Bowling [Sat, 25 Sep 2021 00:09:43 +0000 (17:09 -0700)]
e1000: Rename 'struct adapter' to 'struct e1000_sc'

Rename the 'struct adapter' to 'struct e1000_sc' to avoid type ambiguity
in things like kgdb.

Reviewed by: jhb, markj
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D32129

(cherry picked from commit dc9260515449cde9a4b26b5448f7386388c55bbd)

2 years agoe1000: Consistently use FALLTHROUGH
Kevin Bowling [Fri, 17 Sep 2021 03:13:26 +0000 (20:13 -0700)]
e1000: Consistently use FALLTHROUGH

Approved by: imp
MFC after: 1 week

(cherry picked from commit e05d9788b7e90ffd6405dc59656b52a63ba7ff3e)

2 years agoe1000: Use C99 bool types
Kevin Bowling [Fri, 17 Sep 2021 03:08:08 +0000 (20:08 -0700)]
e1000: Use C99 bool types

Approved by: imp
MFC after: 1 week

(cherry picked from commit 1bbdc25fc1edb43562bf2a5f30df7381078991d4)

2 years agoe1000: Fix up HW vlan ops
Kevin Bowling [Wed, 15 Sep 2021 14:47:19 +0000 (07:47 -0700)]
e1000: Fix up HW vlan ops

2796f7ca:
* Don't reset the entire adapter for vlan changes, fix up the problems
* Add some functions for vlan filter (vfta) manipulation
* Don't muck with the vfta if we aren't doing HW vlan filtering
* Disable interrupts when manipulating vfta on lem(4)-class NICs
* On the I350 there is a specification update (2.4.20) in which the
suggested workaround is to write to the vfta 10 times (if at first you
don't succeed, try, try again). Our shared code has the goods, use it
* Increase a VF's frame receive size in the case of vlans

From the referenced PR, this reduced vlan configuration from minutes
to seconds with hundreds or thousands of vlans and prevents wedging the
adapter with needless adapter reinitialization for each vlan ID.

PR: 230996
Reviewed by: markj
Tested by: Ozkan KIRIK <ozkan.kirik@gmail.com>
Differential Revision: https://reviews.freebsd.org/D30002

22b20b45:
e1000: Fix variable typo

Forgot to git add this in last commit

Reported by: jenkins
Fixes: 2796f7cab107

(cherry picked from commit 2796f7cab10785ef40efbba97ef67ab319c96e9c)
(cherry picked from commit 22b20b45c9118bf6ef313c074cdb107a1eaca78e)

2 years agobcm2835_sdhci: don't use DMA for kernel dumps
Mitchell Horne [Thu, 9 Sep 2021 18:07:06 +0000 (15:07 -0300)]
bcm2835_sdhci: don't use DMA for kernel dumps

When handling a data irq, the sdhci driver calls the
sdhci_platform_will_handle() method, to determine if it should allow the
platform driver to handle the transfer or fall back to programmed I/O.
While dumping, the data irq path may be invoked directly (not from an
interrupt context), which the bcm2835_sdhci DMA code is not prepared to
handle. Return early in this case, to force the fallback to PIO.

Otherwise, the KASSERT that follows will be triggered, and the dump will
fail. On non-INVARIANTS kernels, the system will hang, waiting for a DMA
interrupt that will never arrive.

Reviewed by: kevans
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31893

(cherry picked from commit 806ebc9eba2a45638d63ae8a2ed20e6fb44dd06e)

2 years agosyslog.conf.5: Fix the message priority order
Felix Guest [Tue, 21 Sep 2021 15:29:39 +0000 (11:29 -0400)]
syslog.conf.5: Fix the message priority order

PR: 219942

(cherry picked from commit 8678140127296c15894094087b81f71fe79a21d9)

2 years agomvneta: Fix MTU update sequence
Kornel Duleba [Tue, 31 Aug 2021 06:22:29 +0000 (08:22 +0200)]
mvneta: Fix MTU update sequence

After MTU is updated we might start using allocating RX buffers from different pool. (MJUM9BYTES vs MCLBYTES)
Because of that we need to update the RX buffer size in hardware.
Previously it was done only when the interface was up, which is incorrect since MTU can be changed at any time.

Differential revision: https://reviews.freebsd.org/D31724
Sponsored by: Stormshield
Obtained from: Semihalf
MFC after: 2 weeks
Reviewed by: wma

(cherry picked from commit 5438ef47e377d659acf7f97a66fe418223f2c847)

2 years agoif_cdce: Add support for setting RX filtering
Kornel Duleba [Tue, 31 Aug 2021 12:22:30 +0000 (14:22 +0200)]
if_cdce: Add support for setting RX filtering

We can now set promisc and allmulti modes.
Filtering of given multicast addresses is not supported.
Changing the mode is done by sending a command described in:
"USB CDC Subclass Specification for Ethernet Devices v1.2, section 6.2.4".
This means that at least in theory this feature should work with all
modems that are using this driver.

This fixes Huawei E3372h-320 running new firmware in "HiLink" mode.
Previously it would reset a few seconds after its mode was changed
with "usb_modeswitch".
Setting RX filter to default value at the end of attach function
fixed that.

Sponsored by: Stormshield
Obtained from: Semihalf
Differential revision: https://reviews.freebsd.org/D31766
MFC after: 2 weeks
Reviewed by: hps

(cherry picked from commit f0c393f781f01ffa727f90a8593e26a20869438b)

2 years agoued may be NULL here which will cause a panic... reproducable by
John-Mark Gurney [Tue, 29 Jun 2021 01:09:14 +0000 (18:09 -0700)]
ued may be NULL here which will cause a panic... reproducable by
simply doing a usbconfig reset on a device which doesn't reset itself
properly...

(cherry picked from commit 3d5104182c2eb4336905e89aa0d089b67aa746e3)

2 years agoAdd support for link status, media and VLAN MTU (if supported) to if_cdce...
John-Mark Gurney [Sat, 26 Jun 2021 00:47:02 +0000 (17:47 -0700)]
Add support for link status, media and VLAN MTU (if supported) to if_cdce...

This makes it more usable in that dhclient will autolaunch from devd
now when cdce devices are plugged in..  It also sets the baudrate, but
this isn't exported via tools, and CDCE doesn't have a good way to
specify the media type, so there isn't a good way to tell userland
what the speed is currently...

Reviewed by: hps
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D30625

(cherry picked from commit b43d600c839a9a4d66139c93506e26128370ed7c)

2 years agoumodem: Add Huawei E3372h-320 device id
Kornel Duleba [Tue, 31 Aug 2021 06:44:36 +0000 (08:44 +0200)]
umodem: Add Huawei E3372h-320 device id

After switching the dongle to the Huawei alternate mode(modem mode)
with usb_modeswitch the serial interfaces had all of their ids set to
0xFF.
After modifying umodem to work with that it attached successfully and
I've managed to configure device with standard AT commands to get
internet connection.

(cherry picked from commit 28d549826844b89224f0335b6318eb277031ea78)

2 years agoEliminate snaplk / bufwait LOR when creating UFS snapshots
Kirk McKusick [Sat, 18 Sep 2021 23:51:07 +0000 (16:51 -0700)]
Eliminate snaplk / bufwait LOR when creating UFS snapshots

(cherry picked from commit d7770a5495b19a987dddc77cabcdeadf18413b4d)

2 years agoAllow setting NFS server scope and owner.
Alexander Motin [Tue, 14 Sep 2021 18:14:30 +0000 (14:14 -0400)]
Allow setting NFS server scope and owner.

By default NFS server reports as scope and owner major the host UUID
value and zero for owner minor.  It works good in case of standalone
server.  But in case of CARP-based HA cluster failover the values
should remain persistent, otherwise some clients like VMware ESXi
get confused by the change and fail to reconnect automatically.

The patch makes server scope, major owner and minor owner values
configurable via sysctls.  If not set (by default) the host UUID
value is still used.

Reviewed by: rmacklem
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31952

(cherry picked from commit 272c4a4dc5fbe3d82d735c5b9a3b6faab052808b)

2 years agoRestrict spsr updated in the arm64 set_regs*
Andrew Turner [Mon, 13 Sep 2021 15:24:34 +0000 (15:24 +0000)]
Restrict spsr updated in the arm64 set_regs*

When using ptrace(2) on arm64 to set registers in a 32-bit program we
need to take care to only set some of the fields. Follow the existing
arm64 path and only let the user set the flags fields. This is also the
case in the arm kernel so fixes a change in behaviour between the two.

While here update set_regs to only set spsr and elr once.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit b029ef7fe618c6fa0482958422cc362905c15376)

2 years agoAdd arm64 ifunc support in static binaries
Andrew Turner [Fri, 20 Aug 2021 08:22:48 +0000 (09:22 +0100)]
Add arm64 ifunc support in static binaries

Add support for the R_AARCH64_IRELATIVE relocation type in static
binaries on arm64. This is based on the powerpc code, updating it to
use the arm64 resolver ABI, and use the arm64 relocation type.

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

(cherry picked from commit bc5304a006238115291e7568583632889dffbab9)

2 years agoEnable arm64 SError exceptions in the kernel
Andrew Turner [Mon, 9 Aug 2021 16:30:44 +0000 (16:30 +0000)]
Enable arm64 SError exceptions in the kernel

These are needed to signal to the kernel when a Reliability,
Availability, and Serviceability (RAS) exception has triggered.

Reviewed by: mhorne
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31477

(cherry picked from commit 17b6ee96138220a164d632f0be69d3df77bdd61a)

2 years agoAdd the Apple arm64 implementer ID
Andrew Turner [Wed, 11 Aug 2021 15:30:44 +0000 (16:30 +0100)]
Add the Apple arm64 implementer ID

Sponsored by: The FreeBSD Foundation

(cherry picked from commit a7fcda1b8c21a47ac8cdd2e7cfae298d67467e3b)

2 years agoSort the arm64 cpu_implementers list by name
Andrew Turner [Wed, 11 Aug 2021 15:29:09 +0000 (16:29 +0100)]
Sort the arm64 cpu_implementers list by name

We perform a linear search, so make it easier to add new entries in the
correct place.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 29b25b13c777a682e33edc9e2d05e87339b03cc3)

2 years agoRead the arm64 midr register earlier
Andrew Turner [Wed, 11 Aug 2021 15:01:25 +0000 (16:01 +0100)]
Read the arm64 midr register earlier

We use the midr_el1 register to decode which CPU type we are booting
from. Read it on the secondary CPUs before waiting for the boot CPU
to release us as it will need to use it before the release.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6b22840ed0e8f9ceb34465987b8469a43ebb4582)

2 years agoOnly use byte register access in legacy virtio pci
Andrew Turner [Thu, 5 Aug 2021 14:36:07 +0000 (14:36 +0000)]
Only use byte register access in legacy virtio pci

Some simulators don't implement arbitrary sized memory access to the
virtio PCI registers. Follow Linux and use single byte accesses to read
and write to these registers.

Reviewed by: bryanv, emaste (previous version)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31424

(cherry picked from commit 89c085b8993d7d1e7b137f99fa6df94c37c3a68a)

2 years agoRemove an unused arm64 panic string
Andrew Turner [Sun, 8 Aug 2021 21:28:25 +0000 (21:28 +0000)]
Remove an unused arm64 panic string

This was added early in the development of the arm64 port when
cpu_switch was just a stub. It should have been removed when cpu_switch
was implemented, however this didn't seem to be the case, and the '%p'
was added.

As this hasn't been needed in 7 years we can remove it.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 267d55fa2a74a6e04eb760e4cbb07c7f66729ac9)

2 years agoAdd macros for the arm64 daifset/daifclr flags
Andrew Turner [Tue, 3 Aug 2021 13:18:07 +0000 (13:18 +0000)]
Add macros for the arm64 daifset/daifclr flags

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 337eb2ab9549b230926ab52857d1ef86ba121366)

2 years agoClean up the arm64 fork_trampoline
Andrew Turner [Mon, 9 Aug 2021 10:03:57 +0000 (10:03 +0000)]
Clean up the arm64 fork_trampoline

When exiting to userspace the code is similar to the restore_registers
macro in exception.S. Rework it to remove most of the non-style
differences.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 1791a628a13e0d6f69bc0b52934b05f09c986507)

2 years agoFix data race in scsi cd driver.
Alexander Motin [Mon, 13 Sep 2021 12:59:51 +0000 (08:59 -0400)]
Fix data race in scsi cd driver.

There is a data race between cdsysctlinit and cdcheckmedia.  Both
functions change softc->flags without synchronization.

Submitted by: Arseny Smalyuk <smalukav@gmail.com>
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31726

(cherry picked from commit e76786909ce0195855196305a04d86b40f138894)

2 years agoopencrypto: Allow kern.crypto.allow_soft to be specified as a tunable
Mark Johnston [Mon, 20 Sep 2021 16:07:29 +0000 (12:07 -0400)]
opencrypto: Allow kern.crypto.allow_soft to be specified as a tunable

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 9e0c051249e3832e0f6a0067058ff9735677f3d5)

2 years agoaio_fsync_vnode: handle ERELOOKUP after VOP_FSYNC()
Konstantin Belousov [Mon, 20 Sep 2021 09:32:28 +0000 (12:32 +0300)]
aio_fsync_vnode: handle ERELOOKUP after VOP_FSYNC()

(cherry picked from commit 2933a7ca03f16ba7b048a9bd2b3df1fc3cf9c344)

2 years agoaio_fsync_vnode: use for(;;) loop instead of label
Konstantin Belousov [Mon, 20 Sep 2021 09:30:54 +0000 (12:30 +0300)]
aio_fsync_vnode: use for(;;) loop instead of label

(cherry picked from commit 922bee44e400321ac98b3b371cde3f0ff6137dd0)

2 years agofreebsd32: Fix a double copyin in sendmsg() and recvmsg()
Mark Johnston [Sun, 19 Sep 2021 17:45:09 +0000 (13:45 -0400)]
freebsd32: Fix a double copyin in sendmsg() and recvmsg()

freebsd32_sendmsg() and freebsd32_recvmsg() both copyin the message
header twice, once directly and once in freebsd32_copyinmsghdr().  The
iovec length from the former is used when copying in msg_iov, but the
rest of the kernel uses the iovec length from the latter.  When
kern_sendit() and kern_recvit() iterate over the iovec to compute the
residual for I/O, they can therefore end up walking past the end of the
copied in iovec, either resulting in a system call error, userspace
memory corruption from uiomove() with invalid iovecs, or a kernel page
fault if the copied-in iovec is followed by an unmapped KVA region.

Reported by: syzbot+7cc64cd0c49605acd421@syzkaller.appspotmail.com
Reviewed by: kib, emaste
Sponsored by: The FreeBSD Foundation

(cherry picked from commit fea1a98ead918b39280b586773a923e76194400b)

2 years agofreebsd32: Provide an ANSI definition for freebsd32_recvmsg()
Mark Johnston [Sun, 19 Sep 2021 17:41:43 +0000 (13:41 -0400)]
freebsd32: Provide an ANSI definition for freebsd32_recvmsg()

Fix style in the freebsd32_sendmsg() definition.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 4bda16ff184bfca5ee4bf9709a06323d9cf5945b)

2 years agolibnetmap: reset errno in nmreq_register_decode()
Vincenzo Maffione [Fri, 2 Apr 2021 14:31:57 +0000 (14:31 +0000)]
libnetmap: reset errno in nmreq_register_decode()

The reset is necessary at the beginning of the function, because of
the errno logic in the error path (set errno to EINVAL if not set).
If errno is already set when calling the function, and the function
fails, the previous errno value will be inherited.

(cherry picked from commit ab639bb2873034786cd2ec4d2d9c4489fbf6f424)

2 years agonetmap: monitor: add a flag to distinguish packet direction
Vincenzo Maffione [Mon, 29 Mar 2021 16:32:54 +0000 (16:32 +0000)]
netmap: monitor: add a flag to distinguish packet direction

The netmap monitor intercepts any TX/RX packets on the monitored
port. However, before this change there was no way to tell
whether an intercepted packet was being transmitted or received
on the monitored port.
A TXMON flag in the netmap slot has been added for this purpose.

(cherry picked from commit 660a47cb991d5a7ca69cd8dd9c09a5288d49e405)

2 years agonfsd: Fix build after commit 103b207536f9 for 32bit arches
Rick Macklem [Thu, 9 Sep 2021 01:55:06 +0000 (18:55 -0700)]
nfsd: Fix build after commit 103b207536f9 for 32bit arches

(cherry picked from commit f1c8811d2d250aac5a59bb2109d905139c119925)

2 years agonfsd: Use the COPY_FILE_RANGE_TIMEO1SEC flag
Rick Macklem [Wed, 8 Sep 2021 21:29:20 +0000 (14:29 -0700)]
nfsd: Use the COPY_FILE_RANGE_TIMEO1SEC flag

Although it is not specified in the RFCs, the concept that
the NFSv4 server should reply to an RPC request within a
reasonable time is accepted practice within the NFSv4 community.

Without this patch, the NFSv4.2 server attempts to reply to
a Copy operation within 1 second by limiting the copy to
vfs.nfs.maxcopyrange bytes (default 10Mbytes). This is crude at
best, given the large variation in I/O subsystem performance.

This patch uses the COPY_FILE_RANGE_TIMEO1SEC flag added by
commit c5128c48df3c to limit the reply time for a Copy
operation to approximately 1 second.

(cherry picked from commit 103b207536f976cb350558769f5f428e05ec61dc)

2 years agovt: bound buffer access in redraw optimization
Ed Maste [Wed, 22 Sep 2021 18:41:00 +0000 (14:41 -0400)]
vt: bound buffer access in redraw optimization

PR: 248628
Reported by: oleg
Reviewed by: cem, oleg (both earlier)
Fixes: ee97b2336aa4 ("Speed up vt(4) by keeping...")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D32059

(cherry picked from commit dbc7ca59451561a179f9852642e13ef024169d84)

2 years agoEC2: Default to UEFI booting
Colin Percival [Thu, 16 Sep 2021 16:22:42 +0000 (09:22 -0700)]
EC2: Default to UEFI booting

This reduces the FreeBSD boot time by approximately 5 seconds,
roughly equally divided betwenn two factors:
* Disk I/O is faster in the EFI loader since it can perform larger
I/Os.  (The BIOS loader is limited due to the use of bounce buffers
in sub-1M memory.)
* The EFI console is much faster than the VGA console.

Note however that not all EC2 instance types support UEFI; as a
general rule the newer instances (based on Amazon's "Nitro" platform)
support UEFI but the older instances (based on Xen) do not.

Discussed with: re@, freebsd-cloud@, Amazon
Relnotes: yes
Sponsored by: https://www.patreon.com/cperciva

(cherry picked from commit b43d7aa09b3c91fb6b652306db2ac13e1459c497)

2 years agoEC2: Allow AMI boot mode to be specified
Colin Percival [Thu, 16 Sep 2021 02:15:44 +0000 (19:15 -0700)]
EC2: Allow AMI boot mode to be specified

The default boot method for amd64 AMIs is BIOS, but at AMI creation
time a flag can be set to specify that UEFI should be used instead.
This commit adds a variable AMIBOOTMETHOD which, if set to "UEFI",
causes the appropriate flag to be set during AMI creation.

The only boot method supported by EC2 for arm64 is UEFI.

The names of AMIs are also amended to include the boot method; they
now look like "FreeBSD 14.0-CURRENT-amd64-20210915 UEFI".

Sponsored by: https://www.patreon.com/cperciva

(cherry picked from commit 0aa2a94ea6359fb2587af81841fbf8eb30ab36b0)

2 years agodiff3: document and test -T
Piotr Pawel Stefaniak [Mon, 23 Aug 2021 19:33:27 +0000 (21:33 +0200)]
diff3: document and test -T

(cherry picked from commit 9f7a81b133c715f649136dcd0ad004e4180c56c9)

2 years agodiff3: implement --strip-trailing-cr
Piotr Pawel Stefaniak [Sat, 21 Aug 2021 00:28:58 +0000 (02:28 +0200)]
diff3: implement --strip-trailing-cr

(cherry picked from commit 54a3415cb69e1ea0e6533ca3fc168deba64f249f)

2 years agodiff3.1: update manual page to match code
Piotr Pawel Stefaniak [Fri, 20 Aug 2021 22:50:05 +0000 (00:50 +0200)]
diff3.1: update manual page to match code

(cherry picked from commit e8ff95356ceaaa941251056e9d0a4211bf428e06)

2 years agodiff3: improve style
Piotr Pawel Stefaniak [Fri, 20 Aug 2021 21:50:20 +0000 (23:50 +0200)]
diff3: improve style

(cherry picked from commit 702dda4368dc2d07e8898fcfdddb12d730e6c174)

2 years agodiff3: sync with upstream
Piotr Pawel Stefaniak [Fri, 20 Aug 2021 21:35:24 +0000 (23:35 +0200)]
diff3: sync with upstream

 * replace realloc calls with reallocarray calls
 * fix merging of files that lack newlines

Obtained from: OpenBSD

(cherry picked from commit 7f7b03f3897f0196e3cc7a3b71c7359cc206ba61)

2 years agoRegister /usr/tests/usr.bin/diff3
Piotr Pawel Stefaniak [Sun, 22 Aug 2021 10:08:39 +0000 (12:08 +0200)]
Register /usr/tests/usr.bin/diff3

I wasn't able to make check to run diff3 tests, but kevans figured out
that I was missing diff3 in mtree.

(cherry picked from commit f8e50dd2c67baea2bbd75f94218911d5a4d39597)

2 years agodiff: read whole files to determine if they are ASCII text
Piotr Pawel Stefaniak [Sun, 22 Aug 2021 19:57:13 +0000 (21:57 +0200)]
diff: read whole files to determine if they are ASCII text

Before this change, only the first BUFSIZE bytes were checked.

(cherry picked from commit 3cbf98e2bee91db9ed9118ff557e02cdd449f49a)

2 years agodiff: don't output carriage returns that were stripped on input
Piotr Pawel Stefaniak [Sun, 22 Aug 2021 16:05:59 +0000 (18:05 +0200)]
diff: don't output carriage returns that were stripped on input

--strip-trailing-cr worked as intended for comparison between files,
but the characters were still present in final output.

(cherry picked from commit af2f0164318455433db95adce07af829285b78ad)

2 years agosh: improve command completion
Piotr Pawel Stefaniak [Wed, 22 Sep 2021 16:23:29 +0000 (18:23 +0200)]
sh: improve command completion

When there are many matches, find the longest common substring starting
from the beginning of each command and use that to replace input.

As an example: on my system, llv<tab> will be autocompleted to llvm-
and another <tab> will print all matching llvm commands.

(cherry picked from commit c866d0c798a20b8f0a92df524f4ddd0d81511c88)

2 years agosh: reset sh bindings on bind -e, bind -v
Piotr Pawel Stefaniak [Sun, 19 Sep 2021 20:17:01 +0000 (22:17 +0200)]
sh: reset sh bindings on bind -e, bind -v

Until this change, any bindings set in histedit() were lost on calls to
bindcmd().

Only bind -e and bind -v call libedit's keymacro_reset(). Currently you
cannot fool libedit/map.c:map_bind() by trying something like bind -le
as when p[0] == '-', it does a switch statement on p[1].

(cherry picked from commit 9413dfd331e705a1d7909fe41f06a30e43c442f7)

2 years agosh: improve command completion
Piotr Pawel Stefaniak [Sat, 18 Sep 2021 11:26:51 +0000 (13:26 +0200)]
sh: improve command completion

When multiple matches are found, we keep the provided string on the
input line and print unique matches as suggestions.

But the multiple matches might be the same command found in different
directories, so we should deduplicate the matches first and then decide
whether to autocomplete the command or not, based on the number of
unique matches.

(cherry picked from commit b8ff849cbddfee3404d6550cf98f53d6bb617707)

2 years agofstyp: bump WARNS to default and work around warnings
Piotr Pawel Stefaniak [Tue, 17 Aug 2021 15:46:08 +0000 (17:46 +0200)]
fstyp: bump WARNS to default and work around warnings

(cherry picked from commit da0c0e0121574a1d82f417cc7e245ecd5506325c)

2 years agoUpdate a sysctl name to nbuffers_pcpu in hwpmc.4 and pmcstat.c
Piotr Pawel Stefaniak [Sat, 28 Aug 2021 08:01:19 +0000 (10:01 +0200)]
Update a sysctl name to nbuffers_pcpu in hwpmc.4 and pmcstat.c

This change was missed in r333509 (e6b475e0af).

(cherry picked from commit 0939f965d80d00e783b3319a57e7d71e0b3f202e)

2 years agoUpdate leap-seconds to leap-seconds.3676924800.
Xin LI [Mon, 20 Sep 2021 05:26:22 +0000 (22:26 -0700)]
Update leap-seconds to leap-seconds.3676924800.

Obtained from: ftp://ftp.nist.gov/pub/time/leap-seconds.3676924800.
MFC after: 3 days

(cherry picked from commit 7ba7bf48d5bd6ca89f4e81579456b74ee7aa9e4f)

2 years agounix: Fix a use-after-free in unp_drop()
Mark Johnston [Sat, 18 Sep 2021 14:38:39 +0000 (10:38 -0400)]
unix: Fix a use-after-free in unp_drop()

We need to load the socket pointer after locking the PCB, otherwise
the socket may have been detached and freed by the time that unp_drop()
sets so_error.

This previously went unnoticed as the socket zone was _NOFREE.

Reported by: pho

(cherry picked from commit 50b07c1f7131fd535bbe1b53a3a2e4dfcdcc2e51)

2 years agosocket: Add assertions around naked refcount decrements
Mark Johnston [Fri, 17 Sep 2021 16:26:56 +0000 (12:26 -0400)]
socket: Add assertions around naked refcount decrements

Sockets in a listen queue hold a reference to the parent listening
socket.  Several code paths release this reference manually when moving
a child socket out of the queue.

Replace comments about the expected post-decrement refcount value with
assertions.  Use refcount_load() instead of a plain load.  No functional
change intended.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 6b288408ca32e68c74f6ab12324448ab4862a045)

2 years agosocket: Fix a use-after-free in soclose()
Mark Johnston [Fri, 17 Sep 2021 16:26:06 +0000 (12:26 -0400)]
socket: Fix a use-after-free in soclose()

After releasing the fd reference to a socket "so", we should avoid
testing SOLISTENING(so) since the socket may have been freed.  Instead,
directly test whether the list of unaccepted sockets is empty.

Fixes: f4bb1869ddd2 ("Consistently use the SOLISTENING() macro")
Pointy hat: markj
Sponsored by: The FreeBSD Foundation

(cherry picked from commit dfcef8771484271f2bccdb1dbc088a838441c5a7)

2 years agouma: Show the count of free slabs in each per-domain keg's sysctl tree
Mark Johnston [Fri, 17 Sep 2021 16:13:47 +0000 (12:13 -0400)]
uma: Show the count of free slabs in each per-domain keg's sysctl tree

This is useful for measuring the number of pages that could be freed
from a NOFREE zone under memory pressure.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit d6e77cda9be1509ea170142cca3ff0d3b9f12e35)

2 years agorpc: Convert an SOLISTENING check to an assertion
Mark Johnston [Fri, 17 Sep 2021 16:13:02 +0000 (12:13 -0400)]
rpc: Convert an SOLISTENING check to an assertion

Per the comment, this socket should always be a listening socket.

Sponsored by: The FreeBSD Foundation

(cherry picked from commit 7fabaac2211e7ed1cec9650e46f4e03428411dcf)

2 years agoefi loader: Typo
Mark Johnston [Tue, 21 Sep 2021 16:09:55 +0000 (12:09 -0400)]
efi loader: Typo

(cherry picked from commit 0e3ce6d082b34154e41e220757c03d66d881a47b)

2 years agoe1000: Catch up commit with DPDK
Kevin Bowling [Fri, 17 Sep 2021 02:30:49 +0000 (19:30 -0700)]
e1000: Catch up commit with DPDK

Various syncs with the e1000 shared code from DPDK:
"cid-gigabit.2020.06.05.tar.gz released by ND"

Approved by: imp
Obtained from: DPDK
MFC after: 1 week

(cherry picked from commit 984d1616be883bc2c351aff9aa69b1abd7d1214c)