]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agox86: Speed up clock calibration
Colin Percival [Mon, 10 Jan 2022 01:22:20 +0000 (17:22 -0800)]
x86: Speed up clock calibration

Prior to this commit, the TSC and local APIC frequencies were calibrated
at boot time by measuring the clocks before and after a one-second sleep.
This was simple and effective, but had the disadvantage of *requiring a
one-second sleep*.

Rather than making two clock measurements (before and after sleeping) we
now perform many measurements; and rather than simply subtracting the
starting count from the ending count, we calculate a best-fit regression
between the target clock and the reference clock (for which the current
best available timecounter is used). While we do this, we keep track
of an estimate of the uncertainty in the regression slope (aka. the ratio
of clock speeds), and stop measuring when we believe the uncertainty is
less than 1 PPM.

In order to avoid the risk of aliasing resulting from the data-gathering
loop synchronizing with (a multiple of) the frequency of the reference
clock, we add some additional spinning depending upon the iteration number.

For numerical stability and simplicity of implementation, we make use of
floating-point arithmetic for the statistical calculations.

On the author's Dell laptop, this reduces the time spent in calibration
from 2000 ms to 29 ms; on an EC2 c5.xlarge instance, it is reduced from
2000 ms to 2.5 ms.

Reviewed by: bde (previous version), kib
MFC after: 1 month
Sponsored by: https://www.patreon.com/cperciva
Differential Revision: https://reviews.freebsd.org/D33802

2 years agotruss(1): detach more carefully
Konstantin Belousov [Wed, 12 Jan 2022 08:21:19 +0000 (10:21 +0200)]
truss(1): detach more carefully

When detaching, truss(1) sends SIGSTOP to the traced process to ensure
that it is detaching in the steady state.  But it is possible, for
multithreaded process, that wait() call returns event other than our
SIGSTOP notification.  As result, SIGSTOP might sit in some thread'
sigqueue, which makes SIGCONT a nop.  Then, the process is stopped when
the queued SIGSTOP is acted upon.

To handle this, loop until we drain everything before SIGSTOP,
and see that the process is stopped.

Note that the earlier fix makes it safe to have some more debugging
events longering after SIGSTOP is acted upon.  They will be ignored
after PT_DETACH.

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

2 years agotruss: remove write-only variable
Konstantin Belousov [Wed, 12 Jan 2022 08:20:51 +0000 (10:20 +0200)]
truss: remove write-only variable

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

2 years agovm_reserv: use enhanced bitstring for popmaps
Doug Moore [Wed, 12 Jan 2022 17:03:53 +0000 (11:03 -0600)]
vm_reserv: use enhanced bitstring for popmaps

vm_reserv.c uses its own bitstring implemenation for popmaps. Using
the bitstring_t type from a standard header eliminates the code
duplication, allows some bit-at-a-time operations to be replaced with
more efficient bitstring range operations, and, in
vm_reserv_test_contig, allows bit_ffc_area_at to more efficiently
search for a big-enough set of consecutive zero-bits.

Make bitstring changes improve the vm_reserv code.  Define a bit_ntest
method to test whether a range of bits is all set, or all clear.
Define bit_ff_at and bit_ff_area_at to implement the ffs and ffc
versions with a parameter to choose between set- and clear- bits.
Improve the area_at implementation.  Modify the bit_nset and
bit_nclear implementations to allow code optimization in the cases
when start or end are multiples of _BITSTR_BITS.

Add a few new cases to bitstring_test.

Discussed with: alc
Reviewed by: markj
Tested by: pho (earlier version)
Differential Revision: https://reviews.freebsd.org/D33312

2 years agoAdd arm64 pointer authentication support
Andrew Turner [Thu, 8 Jul 2021 13:15:55 +0000 (13:15 +0000)]
Add arm64 pointer authentication support

Pointer authentication allows userspace to add instructions to insert
a Pointer Authentication Code (PAC) into a register based on an address
and modifier and check if the PAC is correct. If the check fails it will
either return an invalid address or fault to the kernel.

As many of these instructions are a NOP when disabled and in earlier
revisions of the architecture this can be used, for example, to sign
the return address before pushing it to the stack making Return-oriented
programming (ROP) attack more difficult on hardware that supports them.

The kernel manages five 128 bit signing keys: 2 instruction keys, 2 data
keys, and a generic key. The instructions then use one of these when
signing the registers. Instructions that use the first four store the
PAC in the register being signed, however the instructions that use the
generic key store the PAC in a separate register.

Currently all userspace threads share all the keys within a process
with a new set of userspace keys being generated when executing a new
process. This means a forked child will share its keys with its parent
until it calls an appropriate exec system call.

In the kernel we allow the use of one of the instruction keys, the ia
key. This will be used to sign return addresses in function calls.
Unlike userspace each kernel thread has its own randomly generated.

Thread0 has a static key as does the early code on secondary CPUs.
This should be safe as there is minimal user interaction with these
threads, however we could generate random keys when the Armv8.5
Random number generation instructions are present.

Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31261

2 years agoFix undefined behaviour in the USB controllers
Andrew Turner [Wed, 29 Dec 2021 12:10:49 +0000 (12:10 +0000)]
Fix undefined behaviour in the USB controllers

The USB controller drivers assume they can cast a NULL pointer to a
struct and find the address of a member. KUBSan complains about this so
replace with the __offsetof and __containerof macros that use either a
builtin function where available, or the same NULL pointer on older
compilers without the builtin.

Reviewers: hselasky

Subscribers: imp

Reviewed by: hselasky
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33865

2 years agommc_da: remove write-only local variables
Andriy Gapon [Wed, 12 Jan 2022 07:17:35 +0000 (09:17 +0200)]
mmc_da: remove write-only local variables

MFC after: 1 week

2 years agommc_da: use MMC_SECTOR_SIZE constant in place of literals
Andriy Gapon [Wed, 12 Jan 2022 07:14:36 +0000 (09:14 +0200)]
mmc_da: use MMC_SECTOR_SIZE constant in place of literals

Suggested by: manu
MFC after: 2 weeks

2 years agommc_da: implement d_dump method, sddadump
Andriy Gapon [Wed, 12 Jan 2022 07:01:29 +0000 (09:01 +0200)]
mmc_da: implement d_dump method, sddadump

sddadump has been derived from sddastart.

mmc_sim interface has grown a new method, cam_poll, to support polled
operation.

mmc_sim code has been changed to provide a sim_poll hook only if the
controller implements the new method.  The hooks is implemented in terms
of the new mmc_sim_cam_poll method.
Additionally, in-progress CCB-s now have CAM_REQ_INPROG status to
satisfy xpt_pollwait().

mmc_sim_cam_poll method has been implemented in dwmmc host controller.

Reviewed by: manu, mav, imp
MFC after: 2 weeks
Relnotes: perhaps
Differential Revision: https://reviews.freebsd.org/D33843

2 years agofsck(8): Fix typo
Li-Wen Hsu [Wed, 12 Jan 2022 05:52:23 +0000 (13:52 +0800)]
fsck(8): Fix typo

PR: 260949
Reported by: Graham Perrin <grahamperrin@gmail.com>
MFC after: 3 days

2 years agoIgnore debugger-injected signals left after detaching
Konstantin Belousov [Sat, 8 Jan 2022 09:46:45 +0000 (11:46 +0200)]
Ignore debugger-injected signals left after detaching

PR: 261010
Reported by: Martin Simmons <martin@lispworks.com>
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33787

2 years agounionfs: add stress2 scenarios for write references
Jason A. Harmening [Mon, 3 Jan 2022 15:00:55 +0000 (07:00 -0800)]
unionfs: add stress2 scenarios for write references

Add some test cases, based on the existing nullfs10 scenario, to
ensure that unionfs write references are propagated between the
unionfs and underlying vnodes, including unionfs copy-on-write
operations

Reviewed by: kib (prior version), markj, pho
Differential Revision: https://reviews.freebsd.org/D33729

2 years agounionfs: allow vnode lock to be held shared during VOP_OPEN
Jason A. Harmening [Mon, 3 Jan 2022 14:47:02 +0000 (06:47 -0800)]
unionfs: allow vnode lock to be held shared during VOP_OPEN

do_execve() will hold the vnode lock shared when it calls VOP_OPEN(),
but unionfs_open() requires the lock to be held exclusive to
correctly synchronize node status updates.  This requirement is
asserted in unionfs_get_node_status().

Change unionfs_open() to temporarily upgrade the lock as is already
done in unionfs_close().  Related to this, fix various cases throughout
unionfs in which vnodes are not checked for reclamation following lock
upgrades that may have temporarily dropped the lock.  Also fix another
related issue in which unionfs_lock() can incorrectly add LK_NOWAIT
during a downgrade operation, which trips a lockmgr assertion.

Reviewed by: kib (prior version), markj, pho
Reported by: pho
Differential Revision: https://reviews.freebsd.org/D33729

2 years agostand: Fix KASSERT use
Warner Losh [Tue, 11 Jan 2022 23:43:18 +0000 (16:43 -0700)]
stand: Fix KASSERT use

Explicitly include sys/systm.h to pull in KASSERT.

Sponsored by: Netflix
Reviewed by: jhb
Differential Revision: https://reviews.freebsd.org/D33855

2 years agocryptosoft: Use multi-block encrypt/decrypt for ChaCha20-Poly1305.
John Baldwin [Tue, 11 Jan 2022 22:21:31 +0000 (14:21 -0800)]
cryptosoft: Use multi-block encrypt/decrypt for ChaCha20-Poly1305.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33758

2 years agocryptosoft: Use multi-block encrypt/decrypt for AES-CCM.
John Baldwin [Tue, 11 Jan 2022 22:21:00 +0000 (14:21 -0800)]
cryptosoft: Use multi-block encrypt/decrypt for AES-CCM.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33757

2 years agocryptosoft: Use multi-block encrypt/decrypt for AES-GCM.
John Baldwin [Tue, 11 Jan 2022 22:20:32 +0000 (14:20 -0800)]
cryptosoft: Use multi-block encrypt/decrypt for AES-GCM.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33756

2 years agoswcr_encdec: Rename blks to blksz.
John Baldwin [Tue, 11 Jan 2022 22:20:10 +0000 (14:20 -0800)]
swcr_encdec: Rename blks to blksz.

This better reflects the variables purpose and matches other functions
in this file.

Requested by: markj
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33755

2 years agocryptosoft: Use multi-block encrypt/decrypt for non-AEAD ciphers.
John Baldwin [Tue, 11 Jan 2022 22:18:57 +0000 (14:18 -0800)]
cryptosoft: Use multi-block encrypt/decrypt for non-AEAD ciphers.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33531

2 years agogeliboot: Use the multi-block functions for AES-XTS.
John Baldwin [Tue, 11 Jan 2022 22:18:12 +0000 (14:18 -0800)]
geliboot: Use the multi-block functions for AES-XTS.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33530

2 years agocrypto: Re-add encrypt/decrypt_multi hooks to enc_xform.
John Baldwin [Tue, 11 Jan 2022 22:17:41 +0000 (14:17 -0800)]
crypto: Re-add encrypt/decrypt_multi hooks to enc_xform.

These callbacks allow multiple contiguous blocks to be manipulated in
a single call.  Note that any trailing partial block for a stream
cipher must still be passed to encrypt/decrypt_last.

While here, document the setkey and reinit hooks and reorder the hooks
in 'struct enc_xform' to better reflect the life cycle.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33529

2 years agocrypto: Add support for the XChaCha20-Poly1305 AEAD cipher.
John Baldwin [Tue, 11 Jan 2022 22:16:05 +0000 (14:16 -0800)]
crypto: Add support for the XChaCha20-Poly1305 AEAD cipher.

This cipher is a wrapper around the ChaCha20-Poly1305 AEAD cipher
which accepts a larger nonce.  Part of the nonce is used along with
the key as an input to HChaCha20 to generate a derived key used for
ChaCha20-Poly1305.

This cipher is used by WireGuard.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33523

2 years agocrypto.ko: Add hchacha20 from libsodium.
John Baldwin [Tue, 11 Jan 2022 22:15:51 +0000 (14:15 -0800)]
crypto.ko: Add hchacha20 from libsodium.

This was added to 'device crypto' in the kernel in
bbb7a2c7c329494e0148026f8568c0da4d8db085 but was missing from the
module.

Reviewed by: markj
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33522

2 years agortwn(4): Add new USB ID.
Hans Petter Selasky [Tue, 11 Jan 2022 20:18:50 +0000 (21:18 +0100)]
rtwn(4): Add new USB ID.

Submitted by: Wensi <supdrewin@outlook.com>
PR: 261098
MFC after: 1 week
Sponsored by: NVIDIA Networking

2 years agoRemove redundant OLD_FILES entries for debug symbols.
John Baldwin [Tue, 11 Jan 2022 19:38:45 +0000 (11:38 -0800)]
Remove redundant OLD_FILES entries for debug symbols.

Entries for foo.debug files matching an existing entry in OLD_FILES or
OLD_LIBS are unnecessary as they are auto-generated.

Reviewed by: imp, emaste
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D33777

2 years agoAdd list-old-{dirs,files,libs} targets.
John Baldwin [Tue, 11 Jan 2022 19:38:11 +0000 (11:38 -0800)]
Add list-old-{dirs,files,libs} targets.

These targets generate a raw list of the candidate old files roughly
corresponding to the values of OLD_DIRS, OLD_FILES, and OLD_LIBS.
Currently list-old-files also includes uncompressed manpages in
addition to compressed manpages.

Use these targets in the implementation of check-old-* and
delete-old-* to replace duplicated logic.

Reviewed by: imp, emaste
Sponsored by: The University of Cambridge, Google Inc.
Differential Revision: https://reviews.freebsd.org/D33327

2 years agonfsd: Do not accept audit/alarm ACEs for the NFSv4 server
Rick Macklem [Tue, 11 Jan 2022 17:40:07 +0000 (09:40 -0800)]
nfsd: Do not accept audit/alarm ACEs for the NFSv4 server

The UFS and ZFS file systems only support Allow/Deny ACEs
in the NFSv4 ACLs.  This patch does not allow the server
to parse Audit/Alarm ACEs.  The NFSv4 client is still
allowed to pase Audit/Alarm ACEs, since non-FreeBSD NFSv4
servers may use them.

This patch should not have a significant effect, since the
UFS and ZFS file systems will not handle these ACEs anyhow.
It simply serves as an additional "safety belt" for the
NFSv4 server.

MFC after: 2 weeks

2 years agoUse ${MACHINE} for the kernel modeule ldscript
Andrew Turner [Tue, 11 Jan 2022 11:55:32 +0000 (11:55 +0000)]
Use ${MACHINE} for the kernel modeule ldscript

For consistancy with the kernel linker script also use ${MACHINE} for
finding the kernel module linker script. As we currently only use this
for amd64 and i386 this is a no-op, but I'm planning on using this with
arm64 where ${MACHINE} != ${MACHINE_ARCH}.

Reviewed by: markj, kib, imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33841

2 years agoRevert "nfscommon: Add arguments for support of the dacl attribute"
Rick Macklem [Tue, 11 Jan 2022 16:30:50 +0000 (08:30 -0800)]
Revert "nfscommon: Add arguments for support of the dacl attribute"

This reverts commit 0fa074b53e7c22157dcb41aaa25a33abc8118f26.

I now see that the implementation of the "dacl" operation
requires that the NFSv4 server to "automatic inheritance"
and I do not plan on doing this.  As such, this patch is
harmless, but unneeded.

2 years agoRevert "nfscommon: Return NFSERR_ATTRNOTSUPP for AUDIT/ALARM ACEs"
Rick Macklem [Tue, 11 Jan 2022 16:26:42 +0000 (08:26 -0800)]
Revert "nfscommon: Return NFSERR_ATTRNOTSUPP for AUDIT/ALARM ACEs"

This reverts commit f10dc28ec21db60cf1faa3c4b445c4065e760dba.

The client should still be able to getfacl
audit and alarm ACEs, for non-FreeBSD NFSv4 servers.

A patch that only disables audit/alarm for the server
side will be committed to replace this patch.

2 years agomount_nfs: Add a "bgnow" NFS mount option
Rick Macklem [Tue, 11 Jan 2022 16:20:01 +0000 (08:20 -0800)]
mount_nfs: Add a "bgnow" NFS mount option

The "bg" option does not go background until the initial mount
attempt fails, which can take 60+ seconds.

This new "bgnow" option goes background immediately, avoiding
the 60+ second delay, if the NFS server is not yet available.

The man page update is a content change.

Tested by: jwb
Reviewed by: debdrup, emaste
PR: 260764
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33733

2 years agosqlite3: Vendor import of sqlite3 3.37.2
Cy Schubert [Tue, 11 Jan 2022 01:21:17 +0000 (17:21 -0800)]
sqlite3: Vendor import of sqlite3 3.37.2

Changes at https://www.sqlite.org/releaselog/3_37_2.html.

MFC after: 1 month

2 years agovmm: vlapic resume can eat 100% CPU by vlapic_callout_handler
Vitaliy Gusev [Tue, 11 Jan 2022 14:24:41 +0000 (09:24 -0500)]
vmm: vlapic resume can eat 100% CPU by vlapic_callout_handler

Suspend/Resume of Win10 leads that CPU0 is busy on handling interrupts.

Win10 does not use LAPIC timer to often and in most cases, and I see it
is disabled by writing 0 to Initial Count Register (for Timer).

During resume, restart timer only for enabled LAPIC and enabled timer
for that LAPIC.

Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33448

2 years agovm_pageout: Group sysctl variables together with sysctl definitions
Mark Johnston [Tue, 11 Jan 2022 14:22:44 +0000 (09:22 -0500)]
vm_pageout: Group sysctl variables together with sysctl definitions

Fix some style bugs while here.  No functional change intended.

Reviewed by: alc, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33811

2 years agoswap_pager: uma_zcreate() doesn't fail
Mark Johnston [Tue, 11 Jan 2022 14:22:32 +0000 (09:22 -0500)]
swap_pager: uma_zcreate() doesn't fail

Remove always-false checks for UMA zone creation failure.  No functional
change intended.

Reviewed by: alc, kib
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33809

2 years agork805 / rk808: re-add system poweroff support
Andriy Gapon [Tue, 11 Jan 2022 14:22:36 +0000 (16:22 +0200)]
rk805 / rk808: re-add system poweroff support

This was lost by accident in 98c60dc31f.

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

2 years agodwwdt: make it actually useful
Andriy Gapon [Tue, 11 Jan 2022 13:56:07 +0000 (15:56 +0200)]
dwwdt: make it actually useful

Flip dwwdt_prevent_restart to false.  What's the use of a watchdog if it
does not restart a hung system?

Add a knob for panic-ing on the first timeout, resetting on the second
one.  This can be useful if interrupts can still work, otherwise a reset
recovers a system without any aid for debugging the hang.

The change also doubles the timeout that's programmed into the hardware.
The previous version of the code always had the interrupt on the first
timeout enabled, but it took no action on it.  Only the second timeout
could be configured to reset the system.  So, the hardware timeout was
set to a half of the user requested timeout.  But now,we can take a
corrective action on the first timeout, so we use the user requested
timeout.

While here, define boolean sysctl-s as such.

Reviewed by: manu
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D33534

2 years agodtrace: add a knob to control maximum size of principal buffers
Andriy Gapon [Tue, 11 Jan 2022 13:44:46 +0000 (15:44 +0200)]
dtrace: add a knob to control maximum size of principal buffers

We had a hardcoded limit of 1/128-th of physical memory that was further
subdivided between all CPUs as principal buffers are allocated on the
per-CPU basis.  Actually, the buffers could use up 1/64-th of the
memmory because with the default switch policy there are two buffers per
CPU.

This commit allows to change that limit.

Note that the discussed limit is per dtrace command invocation.
The idea is to limit the size of a single malloc(9) call, not the total
memory size used by DTrace buffers.

Reviewed by: markj
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D33648

2 years agodt_unring_buf: set dtbd_oldest to the start of the first record
Andriy Gapon [Tue, 11 Jan 2022 13:44:04 +0000 (15:44 +0200)]
dt_unring_buf: set dtbd_oldest to the start of the first record

It was set to the start of the buffer and that can be different from the
start of teh first record because of a misalignment.

This change follows the example of dt_realloc_buf().

Reviewed by: tsoome, markj
MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D33649

2 years agoadd and use defintions for ATA power modes
Andriy Gapon [Tue, 11 Jan 2022 13:41:38 +0000 (15:41 +0200)]
add and use defintions for ATA power modes

Those can be returned by CHECK POWER MODE command (0xe5).
Note that some of the definitions duplicate definitions for Extended
Power Conditions.

MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33646

2 years agoschedgraph.py: port to Python 3
Andriy Gapon [Tue, 11 Jan 2022 13:31:45 +0000 (15:31 +0200)]
schedgraph.py: port to Python 3

The change does not preserve compatibility with Python 2.7.

MFC after: 4 weeks
Differential Revision: https://reviews.freebsd.org/D33626

2 years agoip_mroute: remove unused variables
Wojciech Macek [Tue, 11 Jan 2022 11:50:38 +0000 (12:50 +0100)]
ip_mroute: remove unused variables

Sponsored by: Stormshield
Obtained from: Semihalf

2 years agoRemove Arm barriers for pre-armv6 CPUs
Andrew Turner [Mon, 10 Jan 2022 15:25:18 +0000 (15:25 +0000)]
Remove Arm barriers for pre-armv6 CPUs

Remove the macros that define the Arm barriers on Armv5 and earlier. We
don't support these CPUs.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33807

2 years agoRemove old arm CPU macros
Andrew Turner [Mon, 10 Jan 2022 15:22:46 +0000 (15:22 +0000)]
Remove old arm CPU macros

The _ARM_ARCH_* and _HAVE_ARMv*_INSTRUCTIONS macros are FreeBSD
specific. Remove them as they are unused in the base system.

Reviewed by: imp
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33806

2 years agoip_mroute: do not call epoch_waitwhen lock is taken
Wojciech Macek [Tue, 11 Jan 2022 10:08:35 +0000 (11:08 +0100)]
ip_mroute: do not call epoch_waitwhen lock is taken

mrouter_done is called with RAW IP lock taken. Some annoying
printfs are visible on the console if INVARIANTS option is enabled.

Provide atomic-based mechanism which counts enters and exits from/to
critical section in ip_input and ip_output.
Before de-initialization of function pointers ensure (with busy-wait)
that mrouter de-initialization is visible to all readers and that we don't
remove pointers (like ip_mforward etc.) in the middle of packet processing.

2 years agoip_mroute: do not sleep when lock is taken
Wojciech Macek [Mon, 10 Jan 2022 07:09:16 +0000 (08:09 +0100)]
ip_mroute: do not sleep when lock is taken

Kthread initialization calls uma_alloc which can sleep.
Modify the code to use deferred work instead.

2 years agopf: postpone clearing of struct pf_pdesc
Kristof Provost [Mon, 10 Jan 2022 17:43:35 +0000 (18:43 +0100)]
pf: postpone clearing of struct pf_pdesc

Postpone zeroing out pd until after the PFI_IFLAG_SKIP/M_SKIP_FIREWALL
checks. We don't need it until then, and it saves us a few CPU cycles in
some cases.
This isn't expected to make a measurable performance change though.

Reviewed by: mjg, glebius
Pointed out by: markj
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D33815

2 years agopf: remove PF_TAG_GENERATED
Kristof Provost [Mon, 10 Jan 2022 17:40:55 +0000 (18:40 +0100)]
pf: remove PF_TAG_GENERATED

It's never set, so we can remove both the check for it and the
definition.

Reviewed by: mjg, glebius
Pointed out by: markj
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D33814

2 years agoloader: tslog: Add more log for module loading
Emmanuel Vadot [Thu, 30 Dec 2021 14:49:24 +0000 (15:49 +0100)]
loader: tslog: Add more log for module loading

This helps mesuring what's happening when we load the kernel/modules/mfsroot.

This also adds TSENTER2 which uses the third argument of TSRAW, same
as in the kernel.

MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33699

2 years agoBump __FreeBSD_version for LinuxKPI changes
Vladimir Kondratyev [Tue, 11 Jan 2022 07:36:14 +0000 (10:36 +0300)]
Bump __FreeBSD_version for LinuxKPI changes

2 years agosqlite3: Vendor import of sqlite3 3.37.2
Cy Schubert [Tue, 11 Jan 2022 01:15:54 +0000 (17:15 -0800)]
sqlite3: Vendor import of sqlite3 3.37.2

Changes at https://www.sqlite.org/releaselog/3_37_2.html.

2 years agoLinuxKPI: 802.11 fix locking in lkpi_stop_hw_scan()
Bjoern A. Zeeb [Mon, 10 Jan 2022 22:12:53 +0000 (22:12 +0000)]
LinuxKPI: 802.11 fix locking in lkpi_stop_hw_scan()

In lkpi_stop_hw_scan() we have to unlock around cancelling the
hardware scan and an msleep to wait for the confirmation that the
scan ended.  Otherwise we are sleeping with the non-sleepable
net80211 com lock held.  At the same time we need to hold the lhw
lock for the msleep().
This lock change got lost in the refactoring of lkpi_iv_newstate().

Reported by: ambrisko, delphij
PR: 261075
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 years agocxgbe(4): Fix regression in previous attempt to fix FEC selection.
Navdeep Parhar [Mon, 10 Jan 2022 21:54:06 +0000 (13:54 -0800)]
cxgbe(4): Fix regression in previous attempt to fix FEC selection.

Fixes: f3c2987f2f5c91f0801fa8bbf9e1bc09d91aeb46
MFC after: 3 days
Sponsored by: Chelsio Communications

2 years agocxgbe(4): Do not ignore the return value of ifmedia_ioctl.
Navdeep Parhar [Mon, 10 Jan 2022 21:01:51 +0000 (13:01 -0800)]
cxgbe(4): Do not ignore the return value of ifmedia_ioctl.

This ensures that the driver reports an error instead of failing
silently when an invalid media is requested.

Reported by: Suhas Lokesha @ Chelsio
MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agocxgbe(4): Fix build warning for LINT-NOIP.
Navdeep Parhar [Mon, 10 Jan 2022 20:32:39 +0000 (12:32 -0800)]
cxgbe(4): Fix build warning for LINT-NOIP.

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agocxgbe(4): Fix "set but not used [-Wunused-but-set-variable]" warnings.
Navdeep Parhar [Wed, 5 Jan 2022 20:23:06 +0000 (12:23 -0800)]
cxgbe(4): Fix "set but not used [-Wunused-but-set-variable]" warnings.

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agocxgb(4): Fix "set but not used [-Wunused-but-set-variable]" warnings.
Navdeep Parhar [Mon, 10 Jan 2022 19:18:38 +0000 (11:18 -0800)]
cxgb(4): Fix "set but not used [-Wunused-but-set-variable]" warnings.

MFC after: 1 week
Sponsored by: Chelsio Communications

2 years agoLinuxKPI: Add sort() wrapper.
Vladimir Kondratyev [Sat, 25 Dec 2021 09:15:07 +0000 (12:15 +0300)]
LinuxKPI: Add sort() wrapper.

swap parameter is not supported as it is rarely used in Linux kernel
and its implementation will add some preprocessor spaghetti to qsort.

Required by drm-kmod.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33675

2 years agoLinuxKPI: Use negative bit field size to trigger BUILD_BUG_ON_ZERO
Vladimir Kondratyev [Sat, 25 Dec 2021 18:42:15 +0000 (21:42 +0300)]
LinuxKPI: Use negative bit field size to trigger BUILD_BUG_ON_ZERO

compile time assertion on non-NULL pointers. Tests conducted show that
_Static_assert, negative array size method and current code does not
handle pointers well enough. Bit field method solves this problem.

This change is derrived from Linux implementation of BUILD_BUG_ON_ZERO.

MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33674

2 years agoLinuxKPI: Constantly use _LINUXKPI_ prefix in include guards
Vladimir Kondratyev [Sun, 19 Dec 2021 10:42:42 +0000 (13:42 +0300)]
LinuxKPI: Constantly use _LINUXKPI_ prefix in include guards

MFC after: 1 week
Reviewed by: bz, emaste, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33562

2 years agoLinuxKPI: Import MTRR support functions from drm-kmod
Vladimir Kondratyev [Wed, 8 Dec 2021 21:12:51 +0000 (00:12 +0300)]
LinuxKPI: Import MTRR support functions from drm-kmod

They are superseded by PAT and mostly useless nowadays but still can be
used on Pentium III/IV era processors. Unlike drm-kmod version, this one
ignores MTRR if PAT is available that fixes confusing "Failed to add WC
MTRR for [0xXXXX-0xYYYY]: 22; performance may suffer" message often
appearing during drm-kmod initialization process.

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33561

2 years agoLinuxKPI: Import linux/ratelimit.h
Vladimir Kondratyev [Wed, 8 Dec 2021 21:05:56 +0000 (00:05 +0300)]
LinuxKPI: Import linux/ratelimit.h

Required by drm-kmod.

Obtained from: OpenBSD
MFC after: 1 week
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33560

2 years agoLinuxKPI: Add linux/capability.h header
Vladimir Kondratyev [Wed, 8 Dec 2021 21:04:31 +0000 (00:04 +0300)]
LinuxKPI: Add linux/capability.h header

Required by drm-kmod.

Obtained from: DragonflyBSD
MFC after: 1 week
Reviewed by: hselasky, manu

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

2 years agoLinuxKPI: Add readx_poll_timeout wrapper
Vladimir Kondratyev [Mon, 6 Dec 2021 20:32:51 +0000 (23:32 +0300)]
LinuxKPI: Add readx_poll_timeout wrapper

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D33307

2 years agoLinuxKPI: Add static_cpu_has() implementation
Vladimir Kondratyev [Mon, 6 Dec 2021 10:18:03 +0000 (13:18 +0300)]
LinuxKPI: Add static_cpu_has() implementation

static_cpu_has returns true if CPU supports requested feature.

Obtained from: OpenBSD
MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33301

2 years agoLinuxKPI: Implement efi_enabled(EFI_BOOT)
Vladimir Kondratyev [Mon, 6 Dec 2021 10:14:36 +0000 (13:14 +0300)]
LinuxKPI: Implement efi_enabled(EFI_BOOT)

efi_enabled(EFI_BOOT) returns true if machine was booted from EFI
Used by drm-kmod and some unported drm drivers like hyperv

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33300

2 years agoLinuxKPI: Import linux/jump_label.h
Vladimir Kondratyev [Mon, 6 Dec 2021 07:59:49 +0000 (10:59 +0300)]
LinuxKPI: Import linux/jump_label.h

Required by drm-kmod

Obtained from: DragonflyBSD
Differential Revision: https://reviews.freebsd.org/D33299

2 years agoLinuxKPI: Move kfree_async() functionality in to kfree()
Vladimir Kondratyev [Mon, 15 Nov 2021 13:53:02 +0000 (16:53 +0300)]
LinuxKPI: Move kfree_async() functionality in to kfree()

Obsolete it usage but keep for a while for drm-kmod 5.4 compatibility

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33298

2 years agoLinuxKPI: Add stdarg.h proxy header
Vladimir Kondratyev [Sat, 4 Dec 2021 10:00:53 +0000 (13:00 +0300)]
LinuxKPI: Add stdarg.h proxy header

To reduce amount of drm-kmod patching

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33297

2 years agoLinuxKPI: Add some typical header pollution
Vladimir Kondratyev [Sat, 4 Dec 2021 10:00:53 +0000 (13:00 +0300)]
LinuxKPI: Add some typical header pollution

To reduce amount of drm-kmod patching

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33297

2 years agoLinuxKPI: Implement smp_*mb barriers with atomic_thread_fence_*
Vladimir Kondratyev [Sun, 4 Jul 2021 14:13:09 +0000 (17:13 +0300)]
LinuxKPI: Implement smp_*mb barriers with atomic_thread_fence_*

for x86 and move them to asm/barrier.h

MFC after: 1 week
Reviewed by: bz, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33296

2 years agoLinuxKPI: Make lockdep*_pin_lock macros useable for drm-kmod
Vladimir Kondratyev [Fri, 3 Dec 2021 13:38:19 +0000 (16:38 +0300)]
LinuxKPI: Make lockdep*_pin_lock macros useable for drm-kmod

Summary:
- Add dummy struct pin_cookie definition;
- Convert lockdep_pin_lock macro to function;
- Fix 'unused variable' compile-time errors;

MFC after: 1 week
Reviewers: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33295

2 years agoLinuxKPI: Convert schedule() to inlined function
Vladimir Kondratyev [Fri, 3 Dec 2021 15:12:50 +0000 (18:12 +0300)]
LinuxKPI: Convert schedule() to inlined function

to prevent name clashing with drm-kmod

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33294

2 years agoLinuxKPI: Add support for XA_FLAGS_ALLOC1 xarray flag
Vladimir Kondratyev [Wed, 24 Nov 2021 00:05:40 +0000 (03:05 +0300)]
LinuxKPI: Add support for XA_FLAGS_ALLOC1 xarray flag

XA_FLAGS_ALLOC1 causes allocation of xarray entries starting at 1

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33293

2 years agoLinuxKPI: Implement default sysfs kobject attribute operations
Vladimir Kondratyev [Tue, 23 Nov 2021 09:09:42 +0000 (12:09 +0300)]
LinuxKPI: Implement default sysfs kobject attribute operations

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D33292

2 years agoLinuxKPI: Implement kstrtoull
Vladimir Kondratyev [Tue, 23 Nov 2021 08:32:38 +0000 (11:32 +0300)]
LinuxKPI: Implement kstrtoull

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33291

2 years agoLinuxKPI: Implement dev_driver_string()
Vladimir Kondratyev [Mon, 15 Nov 2021 15:09:14 +0000 (18:09 +0300)]
LinuxKPI: Implement dev_driver_string()

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: bz, hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33290

2 years agoLinuxKPI: Implement clflush_cache_range()
Vladimir Kondratyev [Mon, 15 Nov 2021 15:06:50 +0000 (18:06 +0300)]
LinuxKPI: Implement clflush_cache_range()

Required by drm-kmod 5.7

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D33289

2 years agoLinuxKPI: Add clflush argument type conversion wrapper
Vladimir Kondratyev [Mon, 15 Nov 2021 14:48:17 +0000 (17:48 +0300)]
LinuxKPI: Add clflush argument type conversion wrapper

to reduce amount of source patching in drm-kmod.

MFC after: 1 week
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33288

2 years agoLinuxKPI: Implement interval_tree
Vladimir Kondratyev [Sat, 6 Nov 2021 10:07:02 +0000 (13:07 +0300)]
LinuxKPI: Implement interval_tree

Required by drm-kmod

MFC after: 1 week
Reviewed by: hselasky, manu
Differential Revision: https://reviews.freebsd.org/D32869

2 years agoLinuxKPI: Import some linux/rbtree.h functions from OpenBSD
Vladimir Kondratyev [Fri, 5 Nov 2021 11:43:31 +0000 (14:43 +0300)]
LinuxKPI: Import some linux/rbtree.h functions from OpenBSD

Required by drm-kmod

Obtained from: OpenBSD
MFC after: 1 week

2 years agoLinuxKPI: 802.11 correctly spell queues
Ruslan Makhmatkhanov [Mon, 10 Jan 2022 18:08:17 +0000 (18:08 +0000)]
LinuxKPI: 802.11 correctly spell queues

PR: 261078
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

2 years agoriscv: gdb(4) support
Mitchell Horne [Fri, 11 Sep 2020 17:02:17 +0000 (14:02 -0300)]
riscv: gdb(4) support

Add the MD portion required for the gdb stub.

Reviewed by: jhb (earlier version)
Discussed with: jrtc27
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33734

2 years agolibc: Teak comment about mips
Warner Losh [Mon, 10 Jan 2022 17:14:12 +0000 (10:14 -0700)]
libc: Teak comment about mips

Remove mips from the list of machines using TLS variant I and reformat
paragraph. No functional change intended.

Sponsored by: Netflix

2 years agolinux: Improve debugging by recognizing TIOCGPTPEER
Edward Tomasz Napierala [Thu, 29 Apr 2021 20:26:46 +0000 (21:26 +0100)]
linux: Improve debugging by recognizing TIOCGPTPEER

Sponsored By: EPSRC

2 years agoscript(1): work around slow reading child
Konstantin Belousov [Sat, 8 Jan 2022 13:19:14 +0000 (15:19 +0200)]
script(1): work around slow reading child

If child is slow reading from its input, or even completely stops doing
the read, script(1) hangs in write(2) to the pts master waiting until
there is a space in the terminal discipline buffer.  This also stops
handling any outer io, as well as child output.

Work around the problem by making pts master fd non-blocking, and be
prepared for short writes to it.  The data to be written to master is
buffered in the tailq which is processed when select(2) detects that
master is ready for write.

PR: 260938
Reported by: наб <nabijaczleweli@nabijaczleweli.xyz>
See also: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1003095
Reviewed by: markj
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33789

2 years agogpart(8): add minimal reference to glabel(8) to manual page
Eugene Grosbein [Mon, 10 Jan 2022 15:00:30 +0000 (22:00 +0700)]
gpart(8): add minimal reference to glabel(8) to manual page

MFC after: 1 week

2 years agoRevert "iflib: Relax timer period from 0.5 to 0.5-0.75s."
Alexander Motin [Mon, 10 Jan 2022 14:35:01 +0000 (09:35 -0500)]
Revert "iflib: Relax timer period from 0.5 to 0.5-0.75s."

I've noticed relations between iflib_timer() vs ixl_admin_timer().
Both scheduled at the same 2Hz rate, but the second is rescheduling
the first each time, so if the first get any slower, it won't be
executed at all.  Revert this until deeper investigation.

This reverts commit 90bc1cf65778aafb1f226c8fe08218cfed5e40b2.

2 years agohwpmc: Fix amd/arm64/armv7/uncore sampling overflow race
Jessica Clarke [Mon, 10 Jan 2022 14:30:05 +0000 (14:30 +0000)]
hwpmc: Fix amd/arm64/armv7/uncore sampling overflow race

If a counter more than overflows just as we read it on switch out then,
if using sampling mode, we will negate this small value to give a huge
reload count, and if we later switch back in that context we will
validate that value against pm_reloadcount and panic an INVARIANTS
kernel with:

  panic: [pmc,1470] pmcval outside of expected range cpu=2 ri=16 pmcval=fffff292 pm_reloadcount=10000

or similar. Presumably in a non-INVARIANTS kernel we will instead just
use the provided value as the reload count, which would lead to the
overflow not happing for a very long time (e.g. 78 minutes for a 48-bit
counter incrementing at an averate rate of 1GHz).

Instead, clamp the reload count to 0 (which corresponds precisely to the
value we would compute if it had just overflowed and no more), which
will result in hwpmc using the full original reload count again. This is
the approach used by core for Intel (for both fixed and programmable
counters).

As part of this, armv7 and arm64 are made conceptually simpler; rather
than skipping modifying the overflow count for sampling mode counters so
it's always kept as ~0, those special cases are removed so it's always
applicable and the concatentation of it and the hardware counter can
always be viewed as a 64-bit counter, which also makes them look more
like other architectures.

Whilst here, fix an instance of UB (shifting a 1 into the sign bit) for
amd in its sign-extension code.

Reviewed by: andrew, mhorne, kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33654

2 years agoFix a typo in an arm64 comment
Andrew Turner [Mon, 10 Jan 2022 13:55:22 +0000 (13:55 +0000)]
Fix a typo in an arm64 comment

This was pointed out by markj in the review, but I missed it and forgot
to fix before pushing.

Reported by: markj
Sponsored by: The FreeBSD Foundation

2 years agoMana: report OS info to PF driver
Wei Hu [Fri, 7 Jan 2022 13:12:31 +0000 (05:12 -0800)]
Mana: report OS info to PF driver

The PF driver might use the OS info for statistical purposes.

MFC after: 2 weeks
Sponsored by: Microsoft

2 years agoMove instructions into the arm64 exception vectors
Andrew Turner [Wed, 5 Jan 2022 15:12:01 +0000 (15:12 +0000)]
Move instructions into the arm64 exception vectors

We have 32 instructions in each exception vector on arm64. Previously
only one was used to branch to the handler function. We can split the
start of these functions and move some of the instructions into the
vectors.

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

2 years agovm_addr_ok: add power2 invariant check
Doug Moore [Mon, 10 Jan 2022 07:17:25 +0000 (01:17 -0600)]
vm_addr_ok: add power2 invariant check

With INVARIANTS defined, have vm_addr_align_ok and vm_addr_bound_ok
panic when passed an alignment/boundary parameter that is not a power
of two.

Reviewed by: alc
Suggested by: kib, se
Differential Revision: https://reviews.freebsd.org/D33725

2 years agoiflib: Relax timer period from 0.5 to 0.5-0.75s.
Alexander Motin [Mon, 10 Jan 2022 01:32:50 +0000 (20:32 -0500)]
iflib: Relax timer period from 0.5 to 0.5-0.75s.

While there switch it from hardclock ticks to milliseconds.

MFC after: 2 weeks

2 years agoReduce minimum idle hardclock rate from 2Hz to 1Hz.
Alexander Motin [Mon, 10 Jan 2022 00:17:43 +0000 (19:17 -0500)]
Reduce minimum idle hardclock rate from 2Hz to 1Hz.

On idle 80-thread system it allows to improve package-level idle state
residency and so power consumption by several percent.

MFC after: 2 weeks

2 years agoAvoid unnecessary setting of UFS flag requesting fsck(8) be run.
Kirk McKusick [Mon, 10 Jan 2022 00:17:13 +0000 (16:17 -0800)]
Avoid unnecessary setting of UFS flag requesting fsck(8) be run.

When the kernel is requested to mount a filesystem with a bad superblock
check hash, it would set the flag in the superblock requesting that the
fsck(8) program be run. The flag is only written to disk as part of a
superblock update. Since the superblock always has its check hash updated
when it is written to disk, the problem for which the flag has been set
will no longer exist. Hence, it is counter-productive to set the flag
as it will just cause an unnecessary run of fsck if it ever gets written.

Sponsored by: Netflix

2 years agotws: fix "set but not used" in the tws driver
Robert Wing [Sun, 9 Jan 2022 23:28:08 +0000 (14:28 -0900)]
tws: fix "set but not used" in the tws driver

With __diagused, these warnings were still emitted since INVARIANTS was
defined but TWS_DEBUG was not.

Fixes: a21f086a3316 ("Fix "set but not used" in the tws driver")
Differential Revision: https://reviews.freebsd.org/D33784

2 years agonfsd: Reduce callouts rate.
Alexander Motin [Sun, 9 Jan 2022 18:09:29 +0000 (13:09 -0500)]
nfsd: Reduce callouts rate.

Before this callouts were scheduled twice a seconds even if nfsd was
never used.  This reduces the rate to ~1Hz and only after nfsd first
started.

MFC after: 2 weeks

2 years agoLinuxKPI: 802.11 update compat code for driver updates
Bjoern A. Zeeb [Sun, 9 Jan 2022 18:08:47 +0000 (18:08 +0000)]
LinuxKPI: 802.11 update compat code for driver updates

Add more (dummy in case of HE) defines, structs, functions and another
mac80211 function pointer needed to update and support recent drivers.

MFC after: 3 days

2 years agodevd: correct wifi regexp
Warner Losh [Sun, 9 Jan 2022 17:16:31 +0000 (10:16 -0700)]
devd: correct wifi regexp

Correct the wifi regexp to include iwlwifi and remove wi driver that was
has been retired.

Sponsored by: Netflix