]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agoroute(8): Remove obsolete information
Warner Losh [Wed, 15 Dec 2021 23:06:19 +0000 (16:06 -0700)]
route(8): Remove obsolete information

xns and osi are no longer relevant (or supported) so remove their
vestiges.

Noticed by: phk
Sponsored by: Netflix

2 years agotest-includes: Build a library instead of a binary
Warner Losh [Wed, 15 Dec 2021 22:34:47 +0000 (15:34 -0700)]
test-includes: Build a library instead of a binary

We need to build the .o's, but don't need to link. Build a static
library instead of a binary to accmoplish this. This removes the need to
have all the libc and crt stuff built, which is required for a
binary. In addition, trying to build a non-standard binary runs into
trouble with undefined symbols on arm related to EABI, even when using a
simplified startup with -nostdlib -e start.

Turn back on testing includes, now that it works.

Sponsored by: Netflix
Reviewed by: brooks, markj (prior version)
Differential Revision: https://reviews.freebsd.org/D33452

2 years agoipfilter: ipf_dstlist is a kernel source file
Cy Schubert [Wed, 15 Dec 2021 21:50:38 +0000 (13:50 -0800)]
ipfilter: ipf_dstlist is a kernel source file

Remove duplicate ipf_dstlist.* files. They live in sys/.

MFC after: 1 week

2 years agocryptosoft: Don't treat CRYPTO_NULL_HMAC as an hmac algorithm.
John Baldwin [Wed, 15 Dec 2021 21:28:30 +0000 (13:28 -0800)]
cryptosoft: Don't treat CRYPTO_NULL_HMAC as an hmac algorithm.

Despite it's name, CRYPTO_NULL_HMAC is actually an unkeyed digest
similar to plain SHA-1 rather than a keyed HMAC algorithm.

Reported by: syzbot+17d7c656f1a797b0faae@syzkaller.appspotmail.com
Discussed with: markj
Fixes: 6113a08b98e4 cryptosoft: Fully support per-operation keys for auth algorithms.
Sponsored by: The FreeBSD Foundation

2 years agoApply fix for clang incorrectly optimizing part of dns/bind916
Dimitry Andric [Wed, 15 Dec 2021 19:56:12 +0000 (20:56 +0100)]
Apply fix for clang incorrectly optimizing part of dns/bind916

Merge commit e5a8af7a90c6 from llvm git (by Gulfem Savrun Yeniceri):

  [Passes] Fix relative lookup table converter pass

  This patch fixes the relative table converter pass for the lookup table
  accesses that are resulted in an instruction sequence, where gep is not
  immediately followed by a load, such as gep being hoisted outside the loop
  or another instruction is inserted in between them. The fix inserts the
  call to load.relative.instrinsic in the original place of load instead of gep.
  Issue is reported by FreeBSD via https://bugs.freebsd.org/259921.

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

PR: 259921
Reported by: O. Hartmann <freebsd@walstatt-de.de>
MFC after: 3 days

2 years agorelease: riscv64 - increase GENERICSD image size
Glen Barber [Wed, 15 Dec 2021 20:26:22 +0000 (15:26 -0500)]
release: riscv64 - increase GENERICSD image size

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agocross-build: Add comment missing from 9e5b0d9eac5b
Jessica Clarke [Wed, 15 Dec 2021 19:45:31 +0000 (19:45 +0000)]
cross-build: Add comment missing from 9e5b0d9eac5b

Whilst the commit message documented some of the details, I had intended
to include this comment in the actual header, but failed to amend the
commit properly.

Fixes: 9e5b0d9eac5b ("cross-build: Fix bmake bootstrap with glibc 2.34")
MFC after: 1 week

2 years ago* lib/msun/Makefile b/lib/msun/Makefile:
Mark Murray [Tue, 14 Dec 2021 09:08:57 +0000 (09:08 +0000)]
* lib/msun/Makefile b/lib/msun/Makefile:
  . Disconnect imprecise.c from the build.  This file can be deleted.
  . Add b_tgammal.c to the build for ld80 and ld128 targets.  The ld128
    is a 'git mv' of imprecise.c to ld128/b_tgammal.c.

* lib/msun/ld80/b_expl.c:
  . New file.  Implement __exp__D for ld80 targets.  This is based on
    bsdsrc/b_exp.c.

* lib/msun/ld80/b_logl.c:
  . New file.  Implement __log__D for ld80 targets.  This is based on
    bsdsrc/b_log.c.

* lib/msun/ld80/b_tgammal.c b/lib/msun/ld80/b_tgammal.c
  . New file.  Implement tgammal(x) for ld80 targets.

Submitted by:           Steve Kargl
Differential Revision:  https://reviews.freebsd.org/D33444
Reviewed by:            pfg

2 years ago* lib/msun/Makefile:
Mark Murray [Tue, 14 Dec 2021 09:02:45 +0000 (09:02 +0000)]
* lib/msun/Makefile:
  . Disconnect b_exp.c and b_log.c from the build.

* lib/msun/bsdsrc/b_exp.c:
  . Replace scalb() usage with C99's ldexp().
  . Replace finite(x) usage with C99's isfinite().
  . Whitespace changes towards style(9).
  . Remove include of "mathimpl.h".  It is no longer needed.
  . Remove #if 0 ... #endif code, which has been present since svn r93211
    (2002-03-26).
  . New minimax polynomial coefficients.
  . Add comments to explain origins of some constants.
  . Use ansi-C prototype.  Remove K&R prototype.  Add static to prototype.

* lib/msun/bsdsrc/b_log.c:
  . Remove include of "mathimpl.h".  It is no longer needed.
  . Fix comments to actually describe the code.
  . Reduce minimax polynomial from degree 4 to degree 3.
    This uses newly computed coefficients.
  . Use ansi-C prototype.  Remove K&R prototype.  Add static to prototype.
  . Remove volatile in declaration of u1.
  . Alphabetize decalaration list.
  . Whitespace changes towards style(9).
  . In argument reduction of x to g and m, replace use of logb() and
    ldexp() with a single call to frexp().  Add code to get 1 <= g < 2.
  . Remove #if 0 ... #endif code, which has been present since svn r93211
    (2002-03-26).
  . The special case m == -1022, replace logb() with ilogb().

* lib/msun/bsdsrc/b_tgamma.c:
  . Update comments.  Fix comments where needed.
  . Add float.h to get LDBL_MANT_DIG for weak reference of tgammal to tgamma.
  . Remove include of "mathimpl.h".  It is no longer needed.
  . Use "math.h" instead of <math.h>.
  . Add '#include math_private.h"
  . Add struct Double from mathimpl.h and include b_log.c and b_exp.c.
  . Remove forward declarations of neg_gam(), small_gam(), smaller_gam,
    large_gam() and ratfun_gam() by re-arranging the code to move these
    function above their first reference.
  . New minimax coefficients for polynomial in large_gam().
  . New splitting of a0 into a0hi nd a0lo, which include additional
    bits of precision.
  . Use ansi-C prototype.  Remove K&R prototype.
  . Replace the TRUNC() macro with a simple cast of a double entities
    to float before assignment (functional changes).
  . Replace sin(M_PI*z) with sinpi(z) and cos(M_PI*(0.5-z)) with cospi(0.5-z).

Submitted by: Steve Kargl
Differential Revision: https://reviews.freebsd.org/D33444
Reviewed by: pfg

2 years agoamd64: Do not build sconfig
Emmanuel Vadot [Wed, 15 Dec 2021 16:38:33 +0000 (17:38 +0100)]
amd64: Do not build sconfig

We do not build the drivers for this arch so no need to build the
configuration tools.

MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG

2 years agonfscl: Change IO_APPEND writes to direct I/O
Rick Macklem [Wed, 15 Dec 2021 16:35:48 +0000 (08:35 -0800)]
nfscl: Change IO_APPEND writes to direct I/O

IO_APPEND writes have always been very slow over NFS, due to
the need to acquire an up to date file size after flushing
all writes to the NFS server.

This patch switches the IO_APPEND writes to use direct I/O,
bypassing the buffer cache.  As such, flushing of writes
normally only occurs when the open(..O_APPEND..) is done.
It does imply that all writes must be done synchronously
and must be committed to stable storage on the file server
(NFSWRITE_FILESYNC).

For a simple test program that does 10,000 IO_APPEND writes
in a loop, performance improved significantly with this patch.

For a UFS exported file system, the test ran 12x faster.
This drops to 3x faster when the open(2)/close(2) are done
for each loop iteration.
For a ZFS exported file system, the test ran 40% faster.

The much smaller improvement may have been because the ZFS
file system I tested against does not have a ZIL log and
does have "sync" enabled.

Note that IO_APPEND write performance is still much slower
than when done on local file systems.

Although this is a simple patch, it does result in a
significant semantics change, so I have given it a
large MFC time.

Tested by: otis
MFC after: 3 months

2 years agoipfilter fil.c: Fix two typos in comments
Cy Schubert [Wed, 15 Dec 2021 03:44:58 +0000 (19:44 -0800)]
ipfilter fil.c: Fix two typos in comments

MFC after: 3 days

2 years agotcp: Rack in a rare case we can get stuck sending a very small amount.
Randall Stewart [Wed, 15 Dec 2021 14:41:33 +0000 (09:41 -0500)]
tcp: Rack in a rare case we can get stuck sending a very small amount.

If a tlp sending new data fails, and then the peer starts
talking to us again, we can be in a situation where the
tlp_new_data count is set, we are not in recovery and
we always send one packet every RTT. The failure
has to occur when we send the TLP initially from the ip_output()
which is rare. But if it occurs you are basically stuck.

This fixes it so we use the new_data count and clear it so
we know it will be cleared. If a failure occurs the tlp timer
will regenerate a new amount anyway so it is un-needed to
carry the value on.

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

2 years agobsdinstall: zfsboot: Prompt user for zpool name if the pool already exists
Emmanuel Vadot [Wed, 8 Dec 2021 10:37:50 +0000 (11:37 +0100)]
bsdinstall: zfsboot: Prompt user for zpool name if the pool already exists

If one install FreeBSD on multiple disks (say 13 and CURRENT) the first created
pool will always be used.
Prompt the user for a new pool name if we detect that the default or supplied one
already exists.

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

2 years agobsdinstall: bootconfig: Try to clean old efi boot entries
Emmanuel Vadot [Wed, 8 Dec 2021 09:37:54 +0000 (10:37 +0100)]
bsdinstall: bootconfig: Try to clean old efi boot entries

If one install FreeBSD on the same machine multiple times in a row or
on different harddrive they have a lot of 'FreeBSD' efi boot entries added.
With this patch we now do :
- If there is no 'FreeBSD' entry we add one like before
- If there is one or more entries we ask the user if they want to delete
  them all and add a new one
  - If they say yes we do that
  - If they say no we prompt them an inputbox so they can enter a different
    entry name if they want, it defaults to 'FreeBSD'

Reviewed by: bapt, imp
MFC after: 2 weeks
Sponsored by: Beckhoff Automation GmbH & Co. KG
Differential Revision: https://reviews.freebsd.org/D33330

2 years agoxen: plug some of set-but-not-used vars
Mateusz Guzik [Wed, 15 Dec 2021 13:45:04 +0000 (13:45 +0000)]
xen: plug some of set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoMake hwpmc work for userspace binaries again
Andrew Gallatin [Wed, 15 Dec 2021 13:38:36 +0000 (08:38 -0500)]
Make hwpmc work for userspace binaries again

hwpmc has been utterly broken for userspace binaries, and has been
labeling all samples from userspace binaries as dubious frames. The
issues are that:

-The check for ph.p_offset & (-ph.p_align) == 0 was mostly bogus. The
 intent was to ignore all executable segments other than the first,
 which when using BFD appeared in the first page, but with current LLD
 a read-only data segment appears before the executable segment,
 pushing the latter into the second page or later. This meant no
 executable segment was ever found, and thus pi_vaddr remained
 0. Instead of relying on BFD's layout, track whether we've seen an
 executable segment explicitly with a local bool.

-Shared libraries were not parsing the segments to calculate pi_vaddr,
 resulting in it always being 0. Again, when using BFD, the executable
 segment started at the first page, and so pi_vaddr was genuinely
 meant to be 0, but not with LLD's current layout. This meant that
 pmcstat_image_link's offset calculation gave the base address of the
 segment in memory, rather than the base address of the whole library
 in memory, and so when adding that to pi_start/pi_end to get the
 range of the executable sections in memory it double-counted the
 offset of the first executable segment within the library. Thus we
 need to do the exact same parsing for ET_DYN as we do for ET_EXEC,
 which is simpler to write as special-casing ET_REL to not look for
 segments. Note that, whilst PT_INTERP isn't needed for shared
 libraries, it will be for PIEs, which pmcstat still fails to handle
 due to not knowing the base address of the PIE; we get the base
 address for libraries by MAP_IN events, and for rtld by virtue of the
 process's entry address being rtld's, but have no equivalent for the
 executable.

Fixes courtesy of jrtc27@.

Reviewed by: jrtc27, jhb (earlier version)
Differential Revision: https://reviews.freebsd.org/D33055
Sponsored by: Netflix

2 years agomwl: plug some of set-but-not-used vars
Mateusz Guzik [Wed, 15 Dec 2021 12:35:38 +0000 (12:35 +0000)]
mwl: plug some of set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agong_pppoe: plug set-but-not-used vars
Mateusz Guzik [Wed, 15 Dec 2021 12:32:40 +0000 (12:32 +0000)]
ng_pppoe: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agopowerpc64: fix the calculation of Maxmem
Leandro Lupori [Wed, 15 Dec 2021 11:49:47 +0000 (08:49 -0300)]
powerpc64: fix the calculation of Maxmem

The calculation of Maxmem was skipping the last phys_avail segment,
because of a wrong stop condition.

This was detected when using QEMU/PowerNV with Radix MMU and low
memory (2G). In this case opal_pci would allocate a DMA window that
was too small to cover all physical memory, resulting in reading all
zeroes from disk when using memory that was not inside the allocated
window.

Reviewed by: jhibbits
Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision: https://reviews.freebsd.org/D33449
MFC after: 2 weeks

2 years agommc_sim: fix setting of the mutex name
Andriy Gapon [Wed, 15 Dec 2021 11:37:59 +0000 (13:37 +0200)]
mmc_sim: fix setting of the mutex name

To quote the manual:
 The pointer passed in as name and type is saved rather than the data
 it points to.  The data pointed to must remain stable until the mutex
 is destroyed.

It seems that the type is actually copied, but the name is stored as
a pointer indeed.
mmc_cam_sim_alloc used a name stored on stack.
So, a corrupt mutex name would be reported.
For example:
  lock order reversal: (sleepable after non-sleepable)
  1st 0xd7285b20 <8A><C0><C0>P@<C1><D0>P@<C1>^D^A (aw_mmc_sim, sleep mutex) @ sys/cam/cam_xpt.c:2804

This change moves the name to struct mmc_sim.
Also, that name is used as the sim name as well.
Unused mtx_name variable is removed too.
The name buffer is reduced to 16 characters.

Reviewed by: manu, bz
MFC after: 10 days
Differential Revision: https://reviews.freebsd.org/D33412

2 years agosys/queue.h: move trashing from SLIST_REMOVE to REMOVE_AFTER, REMOVE_HEAD
Andriy Gapon [Wed, 15 Dec 2021 11:27:49 +0000 (13:27 +0200)]
sys/queue.h: move trashing from SLIST_REMOVE to REMOVE_AFTER, REMOVE_HEAD

SLIST_REMOVE calls either REMOVE_AFTER or REMOVE_HEAD to do the job.
But those two macros can be used independently as well.

MFC after: 2 weeks

2 years agork_i2c_fill_tx: fixup previous commit
Andriy Gapon [Wed, 15 Dec 2021 11:20:08 +0000 (13:20 +0200)]
rk_i2c_fill_tx: fixup previous commit

I forgot to amend the previous commit where i was uninitialized.

Fixes: c6635459510c rk_i2c_fill_tx: fix a number of issues
MFC after: 1 week

2 years agork_i2c_fill_tx: fix a number of issues
Andriy Gapon [Wed, 15 Dec 2021 11:00:45 +0000 (13:00 +0200)]
rk_i2c_fill_tx: fix a number of issues

- maximum number of bytes that can be sent is 32, not 8;
- previous interface required callers to bump sc->msg->len in addition
  to setting sc->tx_slave_addr;
- because of the above there was an issue with writing one too many bytes
  because sc->cnt is not advanced when the slave address is written;
- the inetraction between outer and inner loops was confusing as the former
  was bounded on the number of bytes to write and the counter was
  incremented by one, but the inner loop advanced four bytes at a time;
- the return value was incorrect in the tx_slave_addr case; one call place
  had to use its own (and incorrect in some cases) notion of the write
  lenth.

All of the above issues should be fixed.
Some sanity asserts are added.
All callers use the return value to program RK_I2C_MTXCNT.
iic_msg::len no longer needs to be hacked.
A constant is added to reflect the maximum number of octets that can be
sent or received in one go (they are the same).

MFC after: 1 week

2 years agork_i2c_transfer: minor improvement to bit twiddling
Andriy Gapon [Wed, 15 Dec 2021 09:11:15 +0000 (11:11 +0200)]
rk_i2c_transfer: minor improvement to bit twiddling

No need to mask a uint8_t with 0xff, the mask covers the whole type.
Explcitly cast to uint32_t before bit shifting instead of relying on
the implicit promotion to signed int.

MFC after: 1 week

2 years agork_i2c: do not hide NACK condition from consumers
Andriy Gapon [Wed, 15 Dec 2021 08:59:22 +0000 (10:59 +0200)]
rk_i2c: do not hide NACK condition from consumers

Previously the driver would happily talk to addresses with no device
returning some garbage for reads and sending bits into the void for writes.

MFC after: 1 week

2 years agork_i2c: keep sending bytes until all bytes are sent
Andriy Gapon [Wed, 15 Dec 2021 08:51:24 +0000 (10:51 +0200)]
rk_i2c: keep sending bytes until all bytes are sent

Previously the code would decalre the transfer complete after sending
first 31 bytes (plus the slave address) of a larger I2C write transfer.

That was tested using a large write to an EEPROM with 32-byte write page
size and a 2-byte address type.  Such a transaction needed to send 34
bytes, 2 bytes for an offset and 32 bytes of actual data.

MFC after: 1 week

2 years agork_i2c_transfer: fix off-by-one in check for last message
Andriy Gapon [Wed, 15 Dec 2021 08:44:43 +0000 (10:44 +0200)]
rk_i2c_transfer: fix off-by-one in check for last message

This also fixes an access beyond msgs array.

MFC after: 1 week

2 years agork_i2c_drain_rx: remove useless arithmetic manipulations
Andriy Gapon [Wed, 15 Dec 2021 08:42:23 +0000 (10:42 +0200)]
rk_i2c_drain_rx: remove useless arithmetic manipulations

When i % 4 == 0 the result of (i / 4) * 4 is always i.

MFC after: 1 week

2 years agork_i2c: consistently treat booleans as such
Andriy Gapon [Wed, 15 Dec 2021 08:40:22 +0000 (10:40 +0200)]
rk_i2c: consistently treat booleans as such

MFC after: 1 week

2 years agork_i2c_transfer: use iicbus error codes instead of generic ones
Andriy Gapon [Wed, 15 Dec 2021 08:38:24 +0000 (10:38 +0200)]
rk_i2c_transfer: use iicbus error codes instead of generic ones

MFC after: 1 week

2 years agork_i2c: remove write-only softc field
Andriy Gapon [Wed, 15 Dec 2021 08:37:04 +0000 (10:37 +0200)]
rk_i2c: remove write-only softc field

MFC after: 1 week

2 years agostress2: Added new tests
Peter Holm [Wed, 15 Dec 2021 08:57:15 +0000 (08:57 +0000)]
stress2: Added new tests

2 years agocross-build: Fix bmake bootstrap with glibc 2.34
Jessica Clarke [Wed, 15 Dec 2021 05:52:13 +0000 (05:52 +0000)]
cross-build: Fix bmake bootstrap with glibc 2.34

As of glibc 2.34, our unistd.h wrapper's inclusion of stdlib.h exposes
fragility in glibc's sys/wait.h and corresponding part of stdlib.h,
leading to "error: use of undeclared identifier 'WNOHANG'" and similar
errors when bootstrapping bmake.

Work around this by wrapping sys/wait.h to force stdlib.h's inclusion
first before it's implicitly included during the problematic window in
sys/wait.h.

MFC after: 1 week

2 years agoRemove test-includes build
Warner Losh [Wed, 15 Dec 2021 04:40:01 +0000 (21:40 -0700)]
Remove test-includes build

This is making the CI red. I believe this is because we do a clean build
w/o metamode in the tinderbox, so none of the artifacts needed to build
a binary are present. However, I've not recreated the problem locally
yet to confirm. Remove this while I investigate. This partially reverts
dd55767b86bc. The rest of the commit causes no harm w/o the explicit
test here.

Sponsored by: Netflix

2 years agocross-build: Add __weak_symbol definition for libdwarf bootstrap
Jessica Clarke [Wed, 15 Dec 2021 04:36:11 +0000 (04:36 +0000)]
cross-build: Add __weak_symbol definition for libdwarf bootstrap

Fixes: 3aa0bc89c6a1 ("libdwarf: Add a weak uncompress() symbol")
MFC after: 1 week

2 years agostand/uboot: reorg
Warner Losh [Wed, 15 Dec 2021 04:09:53 +0000 (21:09 -0700)]
stand/uboot: reorg

Build uboot ubldr and friends like we build efi binaries
o move everything to be under stand/uboot
o md code goes in arch/$ARCH
o move everything over from the library
  - Had to rename console.c, disk.c and module.c due to conflicts
o update version to 1.5 to reflect the new way of building

This results in a more consistent build system and should represent no
functional change, apart from powerpc version getting new help
file. Also, moved to exlcuding uboot on powerpc64le by using
BROKEN_OPTION instead of the incidental exclusion we had before due to
Makefile reorgs.

Sponsored by: Netflix
Feedback by: stevek, jrtc27
Differential Revision: https://reviews.freebsd.org/D33362

2 years agotest-includes: add missing file
Warner Losh [Wed, 15 Dec 2021 04:05:27 +0000 (21:05 -0700)]
test-includes: add missing file

Fixes: dd55767b86bc
Sponsored by: Netflix

2 years agoTest various header files to ensure they can be included by themselves.
Warner Losh [Tue, 14 Dec 2021 23:55:20 +0000 (16:55 -0700)]
Test various header files to ensure they can be included by themselves.

A number of header files in sys/* have, going back to 7th Edition Unix
in 1979, reqiured other files (like sys/types.h) to compile. Likewise
the 4BSD networking code has had prerequisites. However, going back to
around the turn of the 21st century, other systems have made them be
independently include-able (wide-spread header include protection
post-dates 7th edition Unix by maybe 3 or so years judging from USENET
source postings). Start down the path of making them all independently
include-able by creating this test that fails buildworld when they are
not.

The file 'badfiles.inc' contains a list of the currently broken files
that cannot be included w/o any prerequisites. As files are fixed, 'make
badfiles.inc' should be re-run to remove them from the list. Note: All
files that start with an underscore are considered internal and not
tested.

Please note: once a file is removed from badfiles.inc, it must pass on
all architectures. Buildworld through at least the _includes target is
needed to ensure its working (though a buildkernel should also be done
on all architectures as well).

Sponsored by: Netflix
Reviewed by: brooks, markj
Differential Revision: https://reviews.freebsd.org/D32498

2 years agoUPDATING: Add warning about NO_CLEAN build after turning off llvm mips target
Warner Losh [Wed, 15 Dec 2021 02:32:12 +0000 (19:32 -0700)]
UPDATING: Add warning about NO_CLEAN build after turning off llvm mips target

Due to the way that we configure llvm, there's a problem with NO_CLEAN
builds. The *.def files listed in the commit change their behavior based
on command line arguments. Since my flipping the default of the mips
target, this meant there were .o files that were now inconsistent with
how we'll now compile things, leading to errors. By touching the *.def
files list, one can workaround this problem.

Noticed by: jhb
Sponsored by: Netflix

2 years agoata-promise: kill lenght, it's set but never used
Warner Losh [Tue, 14 Dec 2021 23:49:38 +0000 (16:49 -0700)]
ata-promise: kill lenght, it's set but never used

Sponsored by: Netflix

2 years agohyperv: scanning locking is using the bus mtx
Warner Losh [Tue, 14 Dec 2021 23:45:18 +0000 (16:45 -0700)]
hyperv: scanning locking is using the bus mtx

The scanning code uses Giant to coordinate its accesses to newbus as
well as to synchronize a little state within hyperv's vmbus. Switch to
the new bus_topo_* functions instead of referring to Giant explicitly.

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

2 years agobhyve nvme: Inform guests of namespace resize
Chuck Tuffli [Wed, 15 Dec 2021 07:17:55 +0000 (23:17 -0800)]
bhyve nvme: Inform guests of namespace resize

Register a "block resize" callback to be notified of changes to the
backing storage for the Namespace. Use this to generate an Asynchronous
Event Notification, Namespace Attributes Changed when the guest OS
provides an Asynchronous Event Request.

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

2 years agobhyve nvme: Add AEN support to NVMe emulation
Chuck Tuffli [Wed, 15 Dec 2021 07:16:49 +0000 (23:16 -0800)]
bhyve nvme: Add AEN support to NVMe emulation

Add Asynchronous Event Notification infrastructure to the NVMe
emulation.

Reviewed by: imp, grehan
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D32952

2 years agopccard: Remove more of the PC Card infrastructure
Warner Losh [Tue, 14 Dec 2021 22:16:42 +0000 (15:16 -0700)]
pccard: Remove more of the PC Card infrastructure

Remove more of the pccard infrasturcture. CardBus Yenta driver (cbb)
still references the remaining bits. It needs some additiona work to
remove 16-bit support still, so it remains.

Sponsored by: Netflix

2 years agoRemove references to PCMCIA
Warner Losh [Tue, 14 Dec 2021 22:07:39 +0000 (15:07 -0700)]
Remove references to PCMCIA

Remove more references to PCMCIA in kernel config files. We no longer
support PC Card devices.

Sponsored by: Netflix

2 years agortsold: Note network interfaces changing index when removed/inserted
Warner Losh [Tue, 14 Dec 2021 21:54:10 +0000 (14:54 -0700)]
rtsold: Note network interfaces changing index when removed/inserted

Remove reference to PCMCIA. The issue is more generic than that. Also,
it does apply to FreeBSD, so no need to hedge about some OSes. The index
won't change if no other interfaces are created after the card is
removed, so note that it may change, not will change.

Suggested by: phk
Reviewed by: gleb
Sponsored by: Netflix

2 years agoloader: move all gfx_fb.c stubs to common/gfx_fb_stub.c
Warner Losh [Tue, 14 Dec 2021 21:39:12 +0000 (14:39 -0700)]
loader: move all gfx_fb.c stubs to common/gfx_fb_stub.c

All these files are the same, modulo one comment. Move them all into
common/gfx_fb_stub.c and adjust Makefiles accordingly.

Sponsored by: Netflix
Reviewed by: manu
Differential Revision: https://reviews.freebsd.org/D33428

2 years agoloader: narrow the scope of gfx frame buffer wrt tg supported kernels
Warner Losh [Tue, 14 Dec 2021 21:38:43 +0000 (14:38 -0700)]
loader: narrow the scope of gfx frame buffer wrt tg supported kernels

Store whether or not we found a vbefb module (eg, a tg supported kernel)
in the preloaded_file structure. This automatically resets on reload and
eliminates load_elf knowing about any gfx_* interface. Restrict this to
i386, which is the only place it's used. Update libi386 to check in the
preloaded_file struct. Eliminate this from the teken_gfx
structure. Rewrite the parsing code to be more inline. Check this from
the same place we check for a relocatable amd64 kernel.

Sponsored by: Netflix
Reviewed by: manu, tsoome
Differential Revision: https://reviews.freebsd.org/D33427

2 years agoThread creation privilege for realtime group
Florian Walpen [Tue, 14 Dec 2021 21:55:51 +0000 (23:55 +0200)]
Thread creation privilege for realtime group

With the mac_priority(4) realtime policy active, users and processes in
the realtime group may promote existing threads and processes to
realtime scheduling priority. Extend the privileges granted to
PRIV_SCHED_SETPOLICY which allows explicit creation of new realtime
threads.

One use case of this is when the pthread scheduling policy is set to
SCHED_RR or SCHED_FIFO via pthread_attr_setschedpolicy(...) before
calling pthread_create(...). I ran into this when testing audio software
with realtime threads, particularly audio/ardour6.

MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33393

2 years agoREADME.md: correct GPL expansion
Fabian Keil [Tue, 14 Dec 2021 21:49:44 +0000 (16:49 -0500)]
README.md: correct GPL expansion

PR: 260404
MFC after: 3 days

2 years agoRemove set-but-unused variable from s_sincosl.c
Dimitry Andric [Tue, 14 Dec 2021 21:41:49 +0000 (22:41 +0100)]
Remove set-but-unused variable from s_sincosl.c

This look like a copy and paste leftover.

Reported by: enh@google.com (via freebsd-numerics@)
Reviewed by: Steve Kargl <sgk@troutmask.apl.washington.edu>
MFC after: 3 days

2 years agoimgact_elf: Disable the stack gap for now
Mark Johnston [Tue, 14 Dec 2021 21:15:06 +0000 (16:15 -0500)]
imgact_elf: Disable the stack gap for now

The integration with RLIMIT_STACK is still causing problems for some
programs such as lang/sdcc and syzkaller's executor.  Until this is
resolved by some work currently in progress, disable the stack gap by
default.

PR: 260303
Reviewed by: kib, emaste
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33438

2 years agoOpenSSL: Merge OpenSSL 1.1.1m
Jung-uk Kim [Tue, 14 Dec 2021 21:01:07 +0000 (16:01 -0500)]
OpenSSL: Merge OpenSSL 1.1.1m

2 years agoOpenSSL: Merge OpenSSL 1.1.1m
Jung-uk Kim [Tue, 14 Dec 2021 19:04:30 +0000 (14:04 -0500)]
OpenSSL: Merge OpenSSL 1.1.1m

Merge commit '56eae1b760adf10835560a9ee595549a1f10410f'

2 years agopowerpc: kernel config style
Alfredo Dal'Ava Junior [Tue, 14 Dec 2021 23:42:00 +0000 (20:42 -0300)]
powerpc: kernel config style

Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
Reviewed by: imp

2 years agovm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE
Mark Johnston [Tue, 14 Dec 2021 20:10:46 +0000 (15:10 -0500)]
vm_fault: Fix vm_fault_populate()'s handling of VM_FAULT_WIRE

vm_map_wire() works by calling vm_fault(VM_FAULT_WIRE) on each page in
the rage.  (For largepage mappings, it calls vm_fault() once per large
page.)

A pager's populate method may return more than one page to be mapped.
If VM_FAULT_WIRE is also specified, we'd wire each page in the run, not
just the fault page.  Consider an object with two pages mapped in a
vm_map_entry, and suppose vm_map_wire() is called on the entry.  Then,
the first vm_fault() would allocate and wire both pages, and the second
would encounter a valid page upon lookup and wire it again in the
regular fault handler.  So the second page is wired twice and will be
leaked when the object is destroyed.

Fix the problem by modify vm_fault_populate() to wire only the fault
page.  Also modify the error handler for pmap_enter(psind=1) to not test
fs->wired, since it must be false.

PR: 260347
Reviewed by: alc, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33416

2 years agoipsec: fix a logic error in key_do_getnewspi
Wenfeng Liu [Wed, 24 Nov 2021 09:34:32 +0000 (17:34 +0800)]
ipsec: fix a logic error in key_do_getnewspi

2 years agoRELNOTES: Note support for KTLS RX for TLS 1.3.
John Baldwin [Tue, 14 Dec 2021 19:02:45 +0000 (11:02 -0800)]
RELNOTES: Note support for KTLS RX for TLS 1.3.

Sponsored by: Netflix

2 years agoktls: Update documentation for software backends.
John Baldwin [Tue, 14 Dec 2021 19:01:05 +0000 (11:01 -0800)]
ktls: Update documentation for software backends.

KTLS no longer supports multiple software backends.  Instead, it
always uses OCF for software crypto.  In particular, the ktls_ocf.ko
module no longer exists.  The OCF bits for KTLS are compiled into th
kernel instead.

Sponsored by: Netflix

2 years agoktls: Support for TLS 1.3 receive offload.
John Baldwin [Tue, 14 Dec 2021 19:01:05 +0000 (11:01 -0800)]
ktls: Support for TLS 1.3 receive offload.

Note that support for TLS 1.3 receive offload in OpenSSL is still an
open pull request in active development.  However, potential changes
to that pull request should not affect the kernel interface.

Reviewed by: hselasky
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D33007

2 years agoisp(4): Allow more than 2 ports to read WWNs from NVRAM.
Alexander Motin [Tue, 14 Dec 2021 18:20:14 +0000 (13:20 -0500)]
isp(4): Allow more than 2 ports to read WWNs from NVRAM.

It appears at least on QLE2694L cards 3rd and 4th ports follow the
same NVRAM addressing logic as the first two.  In lack of proper
documentation this guess is as good as it can be.

MFC after: 1 week
Sponsored by: iXsystems, Inc.

2 years agoSSL_sendfile: Replace ERR_raise_data with SYSerr.
John Baldwin [Tue, 14 Dec 2021 18:07:38 +0000 (10:07 -0800)]
SSL_sendfile: Replace ERR_raise_data with SYSerr.

ERR_raise_data is only present in OpenSSL 3.0 and later.

Reviewed by: jkim
Obtained from: CheriBSD
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D33363

2 years agocpufreq: Support operating-mode-v2 tables with no voltages
Adrian Chadd [Tue, 23 Nov 2021 05:43:25 +0000 (21:43 -0800)]
cpufreq: Support operating-mode-v2 tables with no voltages

Summary:

The linux device tree documentation for this states that
for v1 voltages are required, but for v2 voltages are optional.

So, handle that here - if there's no regulator/supply provided
for a v1 opmode then error out; but keep it optional for v2.
Then just don't both doing any regulator calls if it's not configured.

This isn't the best/final solution - mmel@ has suggested that
this should be flipped around a bit and print warnings if
we get an opp-microvolt property but we don't have a regulator.

Subscribers: imp
Reviewed by: mmel, jrtc27, manu

Test Plan: * IPQ4018, with no voltage tables; the freq set is called appropriately.

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

2 years agoinpcb: use locked variant of prison_check_ip*()
Gleb Smirnoff [Tue, 14 Dec 2021 17:38:52 +0000 (09:38 -0800)]
inpcb: use locked variant of prison_check_ip*()

The pcb lookup always happens in the network epoch and in SMR section.
We can't block on a mutex due to the latter.  Right now this patch opens
up a race.  But soon that will be addressed by D33339.

Reviewed by: markj, jamie
Differential revision: https://reviews.freebsd.org/D33340
Fixes: de2d47842e8

2 years agox86: add a comment providing source for numbers in legacy XSAVE area layout
Konstantin Belousov [Mon, 13 Dec 2021 23:25:36 +0000 (01:25 +0200)]
x86: add a comment providing source for numbers in legacy XSAVE area layout

Suggested by: Michael Pratt <mpratt@google.com>
Reviewed by: Michael Pratt <mpratt@google.com>, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential revision: https://reviews.freebsd.org/D33423

2 years agosocket: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 17:12:53 +0000 (17:12 +0000)]
socket: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoiwm: plug some of set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 17:06:56 +0000 (17:06 +0000)]
iwm: plug some of set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoFix dtrace fbt return probes on arm64
Andrew Turner [Tue, 14 Dec 2021 15:49:07 +0000 (15:49 +0000)]
Fix dtrace fbt return probes on arm64

As with arm and riscv fix return fbt probes on arm64. arg0 should be
the offset within the function of the return instruction and arg1
should be the return value.

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

2 years agobhnd: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:59:09 +0000 (14:59 +0000)]
bhnd: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agombuf: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:54:02 +0000 (14:54 +0000)]
mbuf: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agokobj: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:52:25 +0000 (14:52 +0000)]
kobj: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoktls: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:44:37 +0000 (14:44 +0000)]
ktls: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agovirtio: plug some of set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:38:42 +0000 (14:38 +0000)]
virtio: plug some of set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agosis: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:31:10 +0000 (14:31 +0000)]
sis: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoral: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:23:16 +0000 (14:23 +0000)]
ral: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoipfilter userland: Replace sprintf with range checking version (snprintf)
Cy Schubert [Mon, 13 Dec 2021 22:54:38 +0000 (14:54 -0800)]
ipfilter userland: Replace sprintf with range checking version (snprintf)

MFC after: 1 week

2 years agoipfilter: radix_ipf is a kernel source file
Cy Schubert [Mon, 13 Dec 2021 21:35:43 +0000 (13:35 -0800)]
ipfilter: radix_ipf is a kernel source file

Remove duplicate radix_ipf.* files. They live in sys/.

MFC after: 1 week

2 years agoipfilter: Replace sprintf with range checking version (snprintf)
Cy Schubert [Mon, 13 Dec 2021 21:24:17 +0000 (13:24 -0800)]
ipfilter: Replace sprintf with range checking version (snprintf)

MFC after: 1 week

2 years agoipfilter radix_ipf: name is only valid with RDX_DEBUG
Cy Schubert [Mon, 13 Dec 2021 21:18:04 +0000 (13:18 -0800)]
ipfilter radix_ipf: name is only valid with RDX_DEBUG

ipf_rdx_node.name is only vaild when RDX_DEBUG is defined.

MFC after: 1 week

2 years agoipfilter: The SNPRINTF macro doesn't exist, remove it
Cy Schubert [Mon, 13 Dec 2021 21:04:34 +0000 (13:04 -0800)]
ipfilter: The SNPRINTF macro doesn't exist, remove it

MFC after: 1 week

2 years agohostapd: Fix wlan interfaces not UP/RUNNING
Cy Schubert [Mon, 13 Dec 2021 23:47:51 +0000 (15:47 -0800)]
hostapd: Fix wlan interfaces not UP/RUNNING

Like wpa_supplicant, hostapd does not automatically UP the interface
when configured. The fix is similar to 5fcdc19a8111.

Reported by: avg
Tested by: avg
MFC after: 1 week

2 years agovirtio console: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:14:34 +0000 (14:14 +0000)]
virtio console: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agovmx: plug set-but-not-used var
Mateusz Guzik [Tue, 14 Dec 2021 14:12:35 +0000 (14:12 +0000)]
vmx: plug set-but-not-used var

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agosdhci: plug set-but-not-unused vars
Mateusz Guzik [Tue, 14 Dec 2021 14:07:37 +0000 (14:07 +0000)]
sdhci: plug set-but-not-unused vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agovtnet: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:04:36 +0000 (14:04 +0000)]
vtnet: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agosk: plug set-but-not-used vars
Mateusz Guzik [Tue, 14 Dec 2021 14:03:56 +0000 (14:03 +0000)]
sk: plug set-but-not-used vars

Sponsored by: Rubicon Communications, LLC ("Netgate")

2 years agoAdd genet.4 for RPi 4 Ethernet
Mike Karels [Thu, 9 Dec 2021 14:06:15 +0000 (08:06 -0600)]
Add genet.4 for RPi 4 Ethernet

Add new man page for genet(4) Ethernet on Raspberry Pi 4B, based on
several other Ethernet man pages.  Hook into build.

Note, this could potentially be added as an aarch64 man page; not
sure if that matters now.  Include if_genet(4) link as for other
network devices.

Copyright notice cloned from a recent FreeBSD Foundation copyright.

MFC after: 3 days
Reviewed by: imp bcr #manpages
Differential Revision: https://reviews.freebsd.org/D33360

2 years agodummynet: drop unused definitions
Franco Fichtner [Tue, 14 Dec 2021 12:00:06 +0000 (13:00 +0100)]
dummynet: drop unused definitions

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

2 years agocap_net: fix verification of bind permission
Mariusz Zaborski [Tue, 14 Dec 2021 11:01:10 +0000 (12:01 +0100)]
cap_net: fix verification of bind permission

MFC after: 5 days

2 years agocap_net: plug memory leak
Mariusz Zaborski [Tue, 14 Dec 2021 10:57:36 +0000 (11:57 +0100)]
cap_net: plug memory leak

MFC after: 5 days

2 years agoOnly change DMAP props on DMAP covered memory
Andrew Turner [Tue, 14 Dec 2021 10:05:15 +0000 (10:05 +0000)]
Only change DMAP props on DMAP covered memory

When changing memory properties in the arm64 pmap we need to keep both
the kernel address and DMAP mappings in sync.

To keep the kernel and DMAP memory in sync we recurse when updating the
former to also update the latter. There was insuffucuent checking around
this recursion. It would check if the virtual address is not within the
DMAP region, but not if the physical address is covered.

Add the missing check as without it the recursion may return an error.

Sponsored by: The FreeBSD Foundation

2 years agoloader/kboot: minor style nit
Warner Losh [Mon, 13 Dec 2021 23:53:04 +0000 (16:53 -0700)]
loader/kboot: minor style nit

Kill trailing white space.

Sponsored by: Netflix

2 years agolibdwarf: Add a weak uncompress() symbol
Mark Johnston [Mon, 13 Dec 2021 23:44:13 +0000 (18:44 -0500)]
libdwarf: Add a weak uncompress() symbol

This works around brokenness in buildworld's bootstrapping logic: it
uses the source tree's metadata to collect dependency info (such as,
"libdwarf depends on libz") but links against static host libraries.
If these two are out of sync, as is the case if one builds a commit
prior to the introduction of the libz dependency, then the build fails
when trying to statically link nm(1).

Mitigate the problem by defining a weak uncompress() symbol which simply
returns an error.  This ensures that the build won't fail when
statically linking libdwarf without zlib.  The downside is that any
tools using libdwarf without zlib will now hit a runtime error if they
attempt to decode compressed sections, but at least they'll fail
deterministically, and compressed debug info is only enabled by default
in main.

In particular, this fixes building of branches lacking commit
dbf05458e3bd, such as releng branches, stable/12 and 13 and old
revisions of main.  Previously the nm(1) build would fail with:

ld: error: undefined symbol: uncompress
>>> referenced by libdwarf_elf_init.c:233
>>> (/usr/src/contrib/elftoolchain/libdwarf/libdwarf_elf_init.c:233)
>>>               libdwarf_elf_init.o:(_dwarf_elf_init) in archive
>>> /usr/lib/libdwarf.a

Reported by: dim, ler, krion
Reviewed by: imp, emaste
Fixes: dbf05458e3bd ("libdwarf: Support consumption of compressed ELF sections")
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D33419

2 years agolibdwarf: Fix error handling in _dwarf_elf_init()
Mark Johnston [Mon, 13 Dec 2021 23:45:24 +0000 (18:45 -0500)]
libdwarf: Fix error handling in _dwarf_elf_init()

We were not setting "ret" before jumping to the error path, so the
function returned success even when it had failed.

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

2 years agonfscl: add a filesize limit check to nfs_allocate()
Rick Macklem [Mon, 13 Dec 2021 23:32:19 +0000 (15:32 -0800)]
nfscl: add a filesize limit check to nfs_allocate()

As reported in PR#260343, nfs_allocate() did not check
the filesize rlimit. This patch adds that check.

PR: 260343
Reviewed by: asomers
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D33422

2 years agonfsd: Limit parsing of layout errors to maxcnt bytes
Rick Macklem [Mon, 13 Dec 2021 23:21:31 +0000 (15:21 -0800)]
nfsd: Limit parsing of layout errors to maxcnt bytes

This patch decrements maxcnt by the appropriate
number of bytes during parsing and checks to see
if there is data remaining.  If not, it just returns
from nfsrv_flexlayouterr() without further processing.
This prevents the tl pointer from running off the end
of the error data pointed at by layp, if there are
flaws in the data.

Reported by: rtm@lcs.mit.edu
Tested by: rtm@lcs.mit.edu
PR: 260293
MFC after: 2 weeks

2 years agorc: network.subr improve network6_getladdr()
Bjoern A. Zeeb [Mon, 13 Dec 2021 22:10:25 +0000 (22:10 +0000)]
rc: network.subr improve network6_getladdr()

In network6_getladdr() we are iterating over inet6 lines and are not
interested in any others.  So tell ifconfig to limit output to "inet6"
as much as possible.
This is probably a micro-optimisation but was noticed while looking
at other IPv6-related boot-time improvements.

MFC after: 1 week

2 years agoloader:prefix is only used for LOADER_VERIEXEC
Warner Losh [Mon, 13 Dec 2021 19:02:16 +0000 (12:02 -0700)]
loader:prefix is only used for LOADER_VERIEXEC

Only define and set prefix when LOADER_VERIEXEC is defined. It's only
used by the LOADER_VERIEXEC code.

Sponsored by: Netflix

2 years agondp tests: fix cleanup
Kristof Provost [Mon, 13 Dec 2021 17:13:42 +0000 (18:13 +0100)]
ndp tests: fix cleanup

Fix the cleanup function name so we actually remove our test jail and
interfaces.

Sponsored by: Rubicon Communications, LLC ("Netgate")