]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
3 years agoTeach DTrace that unaligned accesses are OK on aarch64, not just x86.
Robert Watson [Mon, 22 Mar 2021 01:50:00 +0000 (01:50 +0000)]
Teach DTrace that unaligned accesses are OK on aarch64, not just x86.

MFC after: 3 days
Reviewed: andrew
Differential Revision: https://reviews.freebsd.org/D29369

3 years agoTune DTrace 'aframes' for the FBT and profile providers on arm64.
Robert Watson [Sun, 21 Mar 2021 00:01:54 +0000 (00:01 +0000)]
Tune DTrace 'aframes' for the FBT and profile providers on arm64.
In both cases, too few frames were trimmed, leading to exception handling
or DTrace internals being exposed in stack traces exposed by D's stack()
primitive.

MFC after: 3 days
Reviewed by: emaste, andrew

3 years agoBump documentation date after recent updates to bsdinstall.8.
Nathan Whitehorn [Mon, 22 Mar 2021 23:41:49 +0000 (19:41 -0400)]
Bump documentation date after recent updates to bsdinstall.8.

3 years agoInclude examples of how to build script-install media.
Nathan Whitehorn [Mon, 22 Mar 2021 14:20:29 +0000 (10:20 -0400)]
Include examples of how to build script-install media.

3 years agoImprove example install scripts, making them simpler and more robust.
Nathan Whitehorn [Mon, 22 Mar 2021 14:08:55 +0000 (10:08 -0400)]
Improve example install scripts, making them simpler and more robust.

In particular:
- There is no need to do anything with gpart (the installer does that
  for you).
- There is no need to specify the network interface, since we have
  an option for defaults.

3 years agoretire obsolete mn(4) sync serial driver
Ed Maste [Mon, 22 Mar 2021 19:06:51 +0000 (15:06 -0400)]
retire obsolete mn(4) sync serial driver

Approved by: phk
Relnotes: yes

3 years agorsu: add KASSERT to document maximum mbuf size in rsu_tx_start
Ed Maste [Mon, 22 Mar 2021 18:34:31 +0000 (14:34 -0400)]
rsu: add KASSERT to document maximum mbuf size in rsu_tx_start

PR: 254479
Reviewed by: markj
Sponsored by: The FreeBSD Foundation

3 years agoSilence unused parameter warnings in the RISC-V fenv.h
Alex Richardson [Mon, 22 Mar 2021 17:47:50 +0000 (17:47 +0000)]
Silence unused parameter warnings in the RISC-V fenv.h

After increasing the lib/msun/tests WARNS to 6, this triggers a
compilation error for RISC-V.

Fixes: 87d65c747a43 ("lib/msun: Allow building tests with WARNS=6")
Reported by: Jenkins

3 years agoCorrect "Fondation" typo (missing "u")
Ed Maste [Mon, 22 Mar 2021 17:06:03 +0000 (13:06 -0400)]
Correct "Fondation" typo (missing "u")

3 years agocxgbei: Enter network epoch and set vnet around t4_push_pdus().
John Baldwin [Mon, 22 Mar 2021 16:59:16 +0000 (09:59 -0700)]
cxgbei: Enter network epoch and set vnet around t4_push_pdus().

Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29302

3 years agocxgbe ddp: Use CPL_COOKIE_DDP* instead of DDP_BUF*_INVALIDATED.
John Baldwin [Mon, 22 Mar 2021 16:59:09 +0000 (09:59 -0700)]
cxgbe ddp: Use CPL_COOKIE_DDP* instead of DDP_BUF*_INVALIDATED.

This avoids mixing the use of two different enums which modern C
compilers warn about.

Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29301

3 years agocxgbei: Pass ULP submode directly to set_ulp_mode_iscsi().
John Baldwin [Mon, 22 Mar 2021 16:59:02 +0000 (09:59 -0700)]
cxgbei: Pass ULP submode directly to set_ulp_mode_iscsi().

Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29300

3 years agocxgbei: Move some function prototypes to cxgbei.h.
John Baldwin [Mon, 22 Mar 2021 16:58:54 +0000 (09:58 -0700)]
cxgbei: Move some function prototypes to cxgbei.h.

Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29299

3 years agocxgbei: Set vnet around tcp_drop() in do_rx_iscsi_ddp().
John Baldwin [Mon, 22 Mar 2021 16:58:28 +0000 (09:58 -0700)]
cxgbei: Set vnet around tcp_drop() in do_rx_iscsi_ddp().

Reviewed by: np
MFC after: 2 weeks
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D29298

3 years agolib/msun/tests: Drop WARNS=6
Alex Richardson [Mon, 22 Mar 2021 16:56:10 +0000 (16:56 +0000)]
lib/msun/tests: Drop WARNS=6

This is the default already, so there is no need to override it.

Reported by: kevans

3 years agolib/msun/tests: Re-enable csqrt_test on AArch64
Alex Richardson [Mon, 22 Mar 2021 16:54:38 +0000 (16:54 +0000)]
lib/msun/tests: Re-enable csqrt_test on AArch64

The LLVM bug was fixed a long time ago and with D29076 this test actually
passes now.

Reviewed By: andrew
Differential Revision: https://reviews.freebsd.org/D29092

3 years agoFix lib/msun/tests/csqrt_test on platforms with 128-bit long double
Alex Richardson [Mon, 22 Mar 2021 16:54:02 +0000 (16:54 +0000)]
Fix lib/msun/tests/csqrt_test on platforms with 128-bit long double

If long double has more than 64 mantissa bits, using uint64_t to hold the
mantissa bits will truncate the value and result in test failures. To fix
this problem use __uint128_t since all platforms that have
__LDBL_MANT_DIG__ > 64 also have compiler support for 128-bit integers.

Reviewed By: rlibby
Differential Revision: https://reviews.freebsd.org/D29076

3 years agoxnb: Don't pass SIOC{ADD,DEL}MULTI to ifmedia_ioctl().
John Baldwin [Mon, 22 Mar 2021 16:55:49 +0000 (09:55 -0700)]
xnb: Don't pass SIOC{ADD,DEL}MULTI to ifmedia_ioctl().

ifmedia_ioctl() doesn't handle these requests, and this matches what
xn does.

Reviewed by: royger
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D29296

3 years agosctp: fix handling of RTO.initial of 1 ms
Michael Tuexen [Mon, 22 Mar 2021 15:40:41 +0000 (16:40 +0100)]
sctp: fix handling of RTO.initial of 1 ms

MFC after: 3 days
Reported by: syzbot+5eb0e009147050056ce9@syzkaller.appspotmail.com

3 years agoFix build post a0409676120c1e558d0ade943019934e0f15118d.
Cy Schubert [Mon, 22 Mar 2021 15:42:18 +0000 (08:42 -0700)]
Fix build post a0409676120c1e558d0ade943019934e0f15118d.

3 years agotcp: improve handling of SYN segments in SYN-SENT state
Michael Tuexen [Mon, 22 Mar 2021 14:58:49 +0000 (15:58 +0100)]
tcp: improve handling of SYN segments in SYN-SENT state

Ensure that the stack does not generate a DSACK block for user
data received on a SYN segment in SYN-SENT state.

Reviewed by: rscheff
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29376
Sponsored by: Netflix, Inc.

3 years agolibedit: vendor import snapshot 2020-07-10
Baptiste Daroussin [Mon, 22 Mar 2021 14:34:14 +0000 (15:34 +0100)]
libedit: vendor import snapshot 2020-07-10

3 years agolibedit: vendor import snapshot 20200710
Baptiste Daroussin [Mon, 22 Mar 2021 14:29:33 +0000 (15:29 +0100)]
libedit: vendor import snapshot 20200710

3 years agolibucl: vendor import snapshort 20210314
Baptiste Daroussin [Mon, 22 Mar 2021 14:13:02 +0000 (15:13 +0100)]
libucl: vendor import snapshort 20210314

3 years agolibucl: import latest snapshot from 2021-03-14
Baptiste Daroussin [Mon, 22 Mar 2021 14:07:18 +0000 (15:07 +0100)]
libucl: import latest snapshot from 2021-03-14

3 years agoDTrace: remove sparc64 remnants in non-contrib code
Ed Maste [Sun, 21 Mar 2021 01:19:35 +0000 (21:19 -0400)]
DTrace: remove sparc64 remnants in non-contrib code

Sponsored by: The FreeBSD Foundation

3 years agoFix unused functions in invtrig_test.c
Alex Richardson [Mon, 22 Mar 2021 13:05:28 +0000 (13:05 +0000)]
Fix unused functions in invtrig_test.c

I only tested the WARNS=6 change on AArch64 and AMD64, but this file has
unused functions for architectures with LDBL_PREC == 53.

While touching this file change the LDBL_PREC == 53 checks to i386 checks.
The long double tests should only be disabled for i386 (due to the rather
odd rounding mode that it uses) not all architectures where long double
is the same as double.

PR: 205449
Fixes: 87d65c747a43 ("lib/msun: Allow building tests with WARNS=6")
Reported by: Jenkins

3 years agoDon't add -Winline for WARNS=6
Alex Richardson [Mon, 22 Mar 2021 11:55:45 +0000 (11:55 +0000)]
Don't add -Winline for WARNS=6

This warning is very rarely useful (inline is a hint and not mandatory).
This flag results in many warnings being printed when compiling C++
code that uses the standard library with GCC.

This flag was originally added in back in r94332 but the flag is a no-op
in Clang ("This diagnostic flag exists for GCC compatibility, and has no
effect in Clang"). Removing it should make the GCC build output slightly
more readable.

Reviewed By: jrtc27, imp
Differential Revision: https://reviews.freebsd.org/D29235

3 years agolib/msun/tests: Add more debug output to fenv_test.c
Alex Richardson [Thu, 4 Mar 2021 18:41:06 +0000 (18:41 +0000)]
lib/msun/tests: Add more debug output to fenv_test.c

Output a hex dump of the current fenv and the expected value to allow
comparing them without having to resort to interactive use of GDB.

3 years agotools/build/make.py: Avoid calling brew --prefix on macOS unnecessarily
Alex Richardson [Fri, 5 Mar 2021 10:21:12 +0000 (10:21 +0000)]
tools/build/make.py: Avoid calling brew --prefix on macOS unnecessarily

If all the require variables (XCC/XCXX/XCPP/XLD) are already set in the
environment, we don't have to infer a default value for the cross toolchain
path. This avoids an additional `brew --prefix` call when building with
cheribuild (since it already sets all these variables).

3 years agolib/msun/tests: Skip fenv_test:masking if exceptions can't be trapped
Alex Richardson [Mon, 22 Mar 2021 11:53:40 +0000 (11:53 +0000)]
lib/msun/tests: Skip fenv_test:masking if exceptions can't be trapped

Some CPUs (e.g. AArch64 QEMU) cannot trap on floating point exceptions and
therefore ignore the writes to the floating point control register inside
feenableexcept(). If no exceptions are enabled after
feenableexcept(FE_ALL_EXCEPT), we can assume that the CPU does not
support exceptions and we can then skip the test.

Reviewed By: dim
Differential Revision: https://reviews.freebsd.org/D29095

3 years agolib/msun: Allow building tests with WARNS=6
Alex Richardson [Thu, 25 Feb 2021 14:28:17 +0000 (14:28 +0000)]
lib/msun: Allow building tests with WARNS=6

The only change needed is to mark a few variables as static.

3 years agoImprove test messages for msun tests
Alex Richardson [Mon, 22 Mar 2021 11:42:07 +0000 (11:42 +0000)]
Improve test messages for msun tests

Also print the mismatched values when numbers compare not equal.

Reviewed By: dim
Differential Revision: https://reviews.freebsd.org/D29091

3 years agoRemove XFAILs from fmaxmin test
Alex Richardson [Mon, 22 Mar 2021 11:40:17 +0000 (11:40 +0000)]
Remove XFAILs from fmaxmin test

These appears to have been resolved by compiling the test with -fno-builtin
and/or using a newer compiler.

PR: 208703
Reviewed By: ngie
Differential Revision: https://reviews.freebsd.org/D28884

3 years agoConvert the msun tests to ATF
Alex Richardson [Mon, 22 Mar 2021 11:15:13 +0000 (11:15 +0000)]
Convert the msun tests to ATF

This provides better error messages that just an assertion failure and
also makes it easier to mark individual tests as XFAIL.
It was also helpful when coming up with D28786 and D28787.

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

3 years agotests/sys/net/if_lagg_test: Fix syntax error
Alex Richardson [Mon, 22 Mar 2021 10:30:41 +0000 (10:30 +0000)]
tests/sys/net/if_lagg_test: Fix syntax error

Fixes: ee231b27ff ("Also skip sys/net/if_lagg_test:witness on non-i386")

3 years agostress2: Updated the exclude list
Peter Holm [Mon, 22 Mar 2021 10:32:05 +0000 (11:32 +0100)]
stress2:  Updated the exclude list

3 years agostress2: Added two syzkaller reproducers.
Peter Holm [Mon, 22 Mar 2021 10:26:39 +0000 (11:26 +0100)]
stress2:  Added two syzkaller reproducers.

3 years agoAMD-vi: Fix IOMMU device interrupts being overridden
Ka Ho Ng [Mon, 22 Mar 2021 09:33:43 +0000 (17:33 +0800)]
AMD-vi: Fix IOMMU device interrupts being overridden

Currently, AMD-vi PCI-e passthrough will lead to the following lines in
dmesg:
"kernel: CPU0: local APIC error 0x40
ivhd0: Error: completion failed tail:0x720, head:0x0."

After some tracing, the problem is due to the interaction with
amdvi_alloc_intr_resources() and pci_driver_added(). In ivrs_drv, the
identification of AMD-vi IVHD is done by walking over the ACPI IVRS
table and ivhdX device_ts are added under the acpi bus, while there are
no driver handling the corresponding IOMMU PCI function. In
amdvi_alloc_intr_resources(), the MSI intr are allocated with the ivhdX
device_t instead of the IOMMU PCI function device_t. bus_setup_intr() is
called on ivhdX. the IOMMU pci function device_t is only used for
pci_enable_msi(). Since bus_setup_intr() is not called on IOMMU pci
function, the IOMMU PCI function device_t's dinfo->cfg.msi is never
updated to reflect the supposed msi_data and msi_addr. So the msi_data
and msi_addr stay in the value 0. When pci_driver_added() tried to loop
over the children of a pci bus, and do pci_cfg_restore() on each of
them, msi_addr and msi_data with value 0 will be written to the MSI
capability of the IOMMU pci function, thus explaining the errors in
dmesg.

This change includes an amdiommu driver which currently does attaching,
detaching and providing DEVMETHODs for setting up and tearing down
interrupt. The purpose of the driver is to prevent pci_driver_added()
from calling pci_cfg_restore() on the IOMMU PCI function device_t.
The introduction of the amdiommu driver handles allocation of an IRQ
resource within the IOMMU PCI function, so that the dinfo->cfg.msi is
populated.

This has been tested on EPYC Rome 7282 with Radeon 5700XT GPU.

Sponsored by: The FreeBSD Foundation
Reviewed by: jhb
Approved by: philip (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D28984

3 years agoivrs_drv: Fix IVHDs with duplicated BaseAddress
Ka Ho Ng [Mon, 22 Mar 2021 09:33:43 +0000 (17:33 +0800)]
ivrs_drv: Fix IVHDs with duplicated BaseAddress

Reviewed by: jhb
Approved by: philip (mentor)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D28945

3 years agoAdd device and ifnet logging methods, similar to device_printf / if_printf
Adrian Chadd [Sun, 21 Mar 2021 18:49:05 +0000 (18:49 +0000)]
Add device and ifnet logging methods, similar to device_printf / if_printf

* device_printf() is effectively a printf
* if_printf() is effectively a LOG_INFO

This allows subsystems to log device/netif stuff using different log levels,
rather than having to invent their own way to prefix unit/netif  names.

Differential Revision: https://reviews.freebsd.org/D29320
Reviewed by: imp

3 years agosys/ck.h: Add an include guard
Kevin Bowling [Sun, 21 Mar 2021 18:50:30 +0000 (11:50 -0700)]
sys/ck.h: Add an include guard

Approved by: cognet
MFC after: 1 week
Sponsored by: BBOX.io
Differential Revision: https://reviews.freebsd.org/D29357

3 years agortsold: Fix validation of RDNSS options
Mark Johnston [Sun, 21 Mar 2021 18:18:10 +0000 (14:18 -0400)]
rtsold: Fix validation of RDNSS options

The header specifies the size of the option in multiples of eight bytes.
The option consists of an eight-byte header followed by one or more IPv6
addresses, so the option is invalid if the size is not equal to 1+2n for
some n>0.  Check this.

The bug can cause random stack data to be formatted as an IPv6 address
and passed to resolvconf(8), but a host able to trigger the bug may also
specify arbitrary addresses this way.

Reported by: Q C <cq674350529@gmail.com>
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

3 years agoFix kassert panic when inserting multipath routes from multiple threads.
Alexander V. Chernikov [Sun, 21 Mar 2021 18:15:29 +0000 (18:15 +0000)]
Fix kassert panic when inserting multipath routes from multiple threads.

Reported by: Marco Zec <zec at fer.hr>
MFC after: immediately

3 years agousr.sbin/services_mkdb: diff reduction against NetBSD.
Xin LI [Sun, 21 Mar 2021 17:22:50 +0000 (10:22 -0700)]
usr.sbin/services_mkdb: diff reduction against NetBSD.

MFC after: 1 month

3 years agousr.sbin/uefisign: prevent specifying certificate, key or output
Xin LI [Sun, 21 Mar 2021 17:12:34 +0000 (10:12 -0700)]
usr.sbin/uefisign: prevent specifying certificate, key or output
multiple times.

MFC after: 1 month

3 years agoRemove PCPU_INC
Jason A. Harmening [Wed, 10 Mar 2021 04:43:01 +0000 (20:43 -0800)]
Remove PCPU_INC

e4b8deb22227 removed the last in-tree uses of PCPU_INC().  Its
potential benefit is also practically nonexistent.  Non-x86
platforms already implement it as PCPU_ADD(..., 1), and according
to [0] there are no recent x86 processors for which the 'inc'
instruction provides a performance benefit over the equivalent
memory-operand form of the 'add' instruction.  The only remaining
benefit of 'inc' is smaller instruction size, which in this case
is inconsequential given the limited number of per-CPU data consumers.

[0]: https://www.agner.org/optimize/instruction_tables.pdf

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

3 years agozfs: merge OpenZFS master-891568c99
Martin Matuska [Sun, 21 Mar 2021 00:46:08 +0000 (01:46 +0100)]
zfs: merge OpenZFS master-891568c99

Notable upstream pull request merges:
  #11652 Split dmu_zfetch() speculation and execution parts
  #11682 Fix zfs_get_data access to files with wrong generation
  #11735 Clean up RAIDZ/DRAID ereport code
  #11737 Initialize metaslab range trees in metaslab_init
  #11739 FreeBSD: make seqc asserts conditional on replay
  #11763 Allow setting bootfs property on pools with indirect vdevs
  #11767 FreeBSD: Fix memory leaks in kstats

Obtained from: OpenZFS
MFC after: 2 weeks

3 years agoUpdate vendor/openzfs to master-891568c99
Martin Matuska [Sun, 21 Mar 2021 00:39:51 +0000 (01:39 +0100)]
Update vendor/openzfs to master-891568c99

Notable upstream pull request merges:
  #11652 Split dmu_zfetch() speculation and execution parts
  #11682 Fix zfs_get_data access to files with wrong generation
  #11735 Clean up RAIDZ/DRAID ereport code
  #11737 Initialize metaslab range trees in metaslab_init
  #11739 FreeBSD: make seqc asserts conditional on replay
  #11763 Allow setting bootfs property on pools with indirect vdevs
  #11767 FreeBSD: Fix memory leaks in kstats

3 years agorc.conf(5): Remove left-over variables
Tobias Rehbein [Sun, 21 Mar 2021 00:01:31 +0000 (01:01 +0100)]
rc.conf(5): Remove left-over variables

ipv6_ipfilter_rules was obsoleted because of ipfilter was updated, and
rc_parallel_start was reverted to undergo further refinement.

PR: 254398
Fixes: e2ad10e84792f61831d2e8bd

3 years agoMove GH_BC ObsoleteFiles.inc section to OptionalObsoleteFiles.inc
Dimitry Andric [Sat, 20 Mar 2021 22:15:01 +0000 (23:15 +0100)]
Move GH_BC ObsoleteFiles.inc section to OptionalObsoleteFiles.inc

Optional features belong in the latter file, and should be tested using:

.if ${MK_FEATURE} == no
[...]
.endif

3 years agoelftoolchain: Support building on Arm-based Macs
Jessica Clarke [Sat, 20 Mar 2021 17:58:10 +0000 (17:58 +0000)]
elftoolchain: Support building on Arm-based Macs

Currently macOS and DragonFlyBSD get their own special case and only
handle x86. Since all the FreeBSD cases should be general enough for
macOS and DragonFlyBSD (and the x86 ones are identical to the existing
ones) we can just delete the special cases and reuse the FreeBSD ones.

Note that upstream has since removed all the architecture-specific
checks in this file, with the only code relevant to us being an
endianness check that uses the generic compiler-provided macros. Thus
this patch will not be upstreamed, and will be dropped in a future
vendor import.

Reviewed by: dim
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29352

3 years agonetmap: fix issues in nm_os_extmem_create()
Vincenzo Maffione [Sat, 20 Mar 2021 17:15:50 +0000 (17:15 +0000)]
netmap: fix issues in nm_os_extmem_create()

- Call vm_object_reference() before vm_map_lookup_done().
- Use vm_mmap_to_errno() to convert vm_map_* return values to errno.
- Fix memory leak of e->obj.

Reported by: markj
Reviewed by: markj
MFC after: 1 week

3 years agotools/build: Improve host-symlinks failure mode
Jessica Clarke [Sat, 20 Mar 2021 13:00:34 +0000 (13:00 +0000)]
tools/build: Improve host-symlinks failure mode

Since set -e is enabled by sys.mk, if the tool cannot be found in PATH
then the entire shell command line fails, causing us to not print the
error message below and instead silently (due to the @) fail, only
getting the usual "Error code 1" print from bmake. Thus, provide a dummy
default that will never exist (the same as is used by meta2deps.sh) if
which fails so that we get the error message as intended.

MFC after: 1 week

3 years agovirtio_pci_legacy: Allow memory space for configuration
Ka Ho Ng [Sat, 20 Mar 2021 07:40:55 +0000 (15:40 +0800)]
virtio_pci_legacy: Allow memory space for configuration

For guests running under some kind of VMMs, configuration structure is
available in memory space but not I/O space.

Reported by: Yuan Rui <number201724@me.com>
MFC after: 2 weeks
Reviewed by: rpokala, bryanv, jhb
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D28818

3 years agovirtio_pci_legacy: Use the table BAR and PBA BAR from MSI-X cap
Ka Ho Ng [Sat, 20 Mar 2021 07:40:52 +0000 (15:40 +0800)]
virtio_pci_legacy: Use the table BAR and PBA BAR from MSI-X cap

The MSI-X resource shouldn't be assumed to be always on BAR1.
The Virtio v1.1 Spec did not specify that MSI-X table and PBA BAR has to
be BAR1 either.

Reported by: Yuan Rui <number201724@me.com>
MFC after: 2 weeks
Reviewed by: bryanv, jhb
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D28817

3 years agofusefs: fix a dead store in fuse_vnop_advlock
Alan Somers [Sat, 20 Mar 2021 01:38:57 +0000 (19:38 -0600)]
fusefs: fix a dead store in fuse_vnop_advlock

kevans actually caught this in the original review and I fixed it, but
then I committed an older copy of the branch.  Whoops.

Reported by: kevans
MFC after: 13 days
MFC with: 929acdb19acb67cc0e6ee5439df98e28a84d4772
Differential Revision: https://reviews.freebsd.org/D29031

3 years agoOnly symlink cryptodev.h into /usr/include/crypto/
John Baldwin [Fri, 19 Mar 2021 23:59:44 +0000 (16:59 -0700)]
Only symlink cryptodev.h into /usr/include/crypto/

I missed updating the symlink side in the earlier commit.

Fixes: 283352dd4f6a3bb2f3c7cb45ce5dca3d86f5e3f4
MFC after: 1 week

3 years agoRemove /usr/include/crypto/rijndael.h as well.
John Baldwin [Fri, 19 Mar 2021 23:31:53 +0000 (16:31 -0700)]
Remove /usr/include/crypto/rijndael.h as well.

I missed this in the earlier commit.

MFC after: 1 week
Fixes: 283352dd4f6a3bb2f3c7cb45ce5dca3d86f5e3f4

3 years agonfsv4 client: fix forced dismount when sleeping on nfsv4lck
Rick Macklem [Fri, 19 Mar 2021 21:09:33 +0000 (14:09 -0700)]
nfsv4 client: fix forced dismount when sleeping on nfsv4lck

During a recent NFSv4 testing event a test server caused a hang
where "umount -N" failed.  The renew thread was sleeping on "nfsv4lck"
and the "umount" was sleeping, waiting for the renew thread to
terminate.

This is the first of two patches that is hoped to fix the renew thread
so that it will terminate when "umount -N" is done on the mount.

nfsv4_lock() checks for forced dismount, but only after it wakes up
from msleep().  Without this patch, a wakeup() call was required.
This patch adds a 1second timeout on the msleep(), so that it will
wake up and see the forced dismount flag.  Normally a wakeup()
will occur in less than 1second, but if a premature return from
msleep() does occur, it will simply loop around and msleep() again.

While here, replace the nfsmsleep() wrapper that was used for portability
with the actual msleep() call and make the same change for nfsv4_getref().

MFC after: 2 weeks

3 years agocxgbe(4): create a separate helper routine to write the global RSS key.
Navdeep Parhar [Fri, 19 Mar 2021 20:28:11 +0000 (13:28 -0700)]
cxgbe(4): create a separate helper routine to write the global RSS key.

While here, make sure only the PF driver attempts to program the global
RSS key (with options RSS).  The VF driver doesn't have access to those
device registers.

MFC after: 1 week
Sponsored by: Chelsio Communications

3 years agox86: consolidate hw watchpoint logic into new file
Mitchell Horne [Fri, 19 Mar 2021 19:39:12 +0000 (16:39 -0300)]
x86: consolidate hw watchpoint logic into new file

This is a prerequisite to using these functions outside of ddb, but also
provides some cleanup and minor refactoring. This code is almost
entirely duplicated between the two implementations, the only
significant difference being the lack of dbreg synchronization on i386.

Cleanups are:
 - demote some internal functions to static
 - use the constant NDBREGS instead of a '4' literal
 - remove K&R definitions
 - some added comments

Reviewed by: kib, jhb
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29153

3 years agocxgbe(4): make it safe to call setup_memwin repeatedly.
Navdeep Parhar [Fri, 19 Mar 2021 19:30:57 +0000 (12:30 -0700)]
cxgbe(4): make it safe to call setup_memwin repeatedly.

A repeat call will recreate the memory windows in the hardware and move
them to their last-known positions without repeating any of the software
initialization.

MFC after: 1 week
Sponsored by: Chelsio Communications

3 years agoAlso skip sys/net/if_lagg_test:witness on non-i386
Alex Richardson [Fri, 19 Mar 2021 18:35:04 +0000 (18:35 +0000)]
Also skip sys/net/if_lagg_test:witness on non-i386

The LOR also happens on amd64 and other architectures. Ideally we would
fix this. However, in order to get Jenkins green again to catch real
regressions, we should skip this test for now.

PR: 251726
Reviewed By: lwhsu
Differential Revision: https://reviews.freebsd.org/D29341

3 years agotests/sys/netgraph: Further CI fixes
Alex Richardson [Fri, 19 Mar 2021 18:34:29 +0000 (18:34 +0000)]
tests/sys/netgraph: Further CI fixes

I was trying to debug why this test is working locally but failing in CI.
While doing so I made some small changes to allow running it with set -e.

It turns out the problem is that find_iface does not return anything in
Jenkins, so all following tests fail with obscure error messages.
To handle this case exit early if $eth is empty.

Reviewed By: lwhsu
Differential Revision: https://reviews.freebsd.org/D29340

3 years agopfilctl: improve formatting of "hooks" and "heads" command output.
Gleb Smirnoff [Fri, 19 Mar 2021 18:18:05 +0000 (11:18 -0700)]
pfilctl: improve formatting of "hooks" and "heads" command output.

In "heads" output just improve the header to describe all of the columns.
In "hooks" print filter name and hook name delimited with colon, so that
it matches "heads" output and also can be copy-and-pasted straight into
the command line for future "link" command.

3 years agocxgbe(4): use standard sysctl routines to deal with 16b values.
Navdeep Parhar [Fri, 19 Mar 2021 17:56:24 +0000 (10:56 -0700)]
cxgbe(4): use standard sysctl routines to deal with 16b values.

These routines to handle 8b and 16b types were added in r289773 5+ years
ago.

MFC after: 2 weeks
Sponsored by: Chelsio Communications

3 years agoarmv8crypto: note derivation in armv8_crypto_wrap.c
Mitchell Horne [Mon, 15 Mar 2021 13:46:03 +0000 (10:46 -0300)]
armv8crypto: note derivation in armv8_crypto_wrap.c

This file inherits some boilerplate and structure from the analogous
file in aesni(4), aesni_wrap.c. Note the derivation and the copyright
holders of that file.

For example, the AES-XTS bits added in 4979620ece984 were ported from
aesni(4).

Requested by: jmg
Reviewed by: imp, gnn
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29268

3 years agoClarify that scripted installations don't require specification of boot
Nathan Whitehorn [Fri, 19 Mar 2021 13:44:30 +0000 (09:44 -0400)]
Clarify that scripted installations don't require specification of boot
partitions, as there seems to be widespread confusion on this point.

MFC after: 1 day

3 years agodevelopment(7): mention the Git mirror list in the manual page
Evgeniy Khramtsov [Fri, 19 Mar 2021 12:52:21 +0000 (20:52 +0800)]
development(7): mention the Git mirror list in the manual page

MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D29234

3 years agobc: upgrade to version 3.3.4
Stefan Eßer [Fri, 19 Mar 2021 08:46:12 +0000 (09:46 +0100)]
bc: upgrade to version 3.3.4

This upgrade performs an implicit flush of the output if the script
funcion read() is called, to make sure a prompt that does not end in a
new-line is correctly displayed in line-buffered output mode.

Merge commit '893ecb52db5ed47d6c1e8698334d34e0df651612'

3 years agoVendor import of bc 3.3.4
Stefan Eßer [Fri, 19 Mar 2021 08:39:56 +0000 (09:39 +0100)]
Vendor import of bc 3.3.4

3 years agorc.conf(5): Bump date on .Dd
Daniel Ebdrup Jensen [Fri, 19 Mar 2021 03:52:26 +0000 (04:52 +0100)]
rc.conf(5): Bump date on .Dd

Pointy hat to: me
Reported by: lwhsu

3 years agobhyve: support relocating fbuf and passthru data BARs
D Scott Phillips [Thu, 18 Mar 2021 16:08:52 +0000 (00:08 +0800)]
bhyve: support relocating fbuf and passthru data BARs

We want to allow the UEFI firmware to enumerate and assign
addresses to PCI devices so we can boot from NVMe[1]. Address
assignment of PCI BARs is properly handled by the PCI emulation
code in general, but a few specific cases need additional support.
fbuf and passthru map additional objects into the guest physical
address space and so need to handle address updates. Here we add a
callback to emulated PCI devices to inform them of a BAR
configuration change. fbuf and passthru then watch for these BAR
changes and relocate the frame buffer memory segment and passthru
device mmio area respectively.

We also add new VM_MUNMAP_MEMSEG and VM_UNMAP_PPTDEV_MMIO ioctls
to vmm(4) to facilitate the unmapping needed for addres updates.

[1]: https://github.com/freebsd/uefi-edk2/pull/9/

Originally by: scottph
MFC After: 1 week
Sponsored by: Intel Corporation
Reviewed by: grehan
Approved by: philip (mentor)
Differential Revision: https://reviews.freebsd.org/D24066

3 years agoRefactor configuration management in bhyve.
John Baldwin [Wed, 26 Jun 2019 20:30:41 +0000 (13:30 -0700)]
Refactor configuration management in bhyve.

Replace the existing ad-hoc configuration via various global variables
with a small database of key-value pairs.  The database supports
heirarchical keys using a MIB-like syntax to name the path to a given
key.  Values are always stored as strings.  The API used to manage
configuation values does include wrappers to handling boolean values.
Other values use non-string types require parsing by consumers.

The configuration values are stored in a tree using nvlists.  Leaf
nodes hold string values.  Configuration values are permitted to
reference other configuration values using '%(name)'.  This permits
constructing template configurations.

All existing command line arguments now set configuration values.  For
devices, the "-s" option parses its option argument to generate a list
of key-value pairs for the given device.

A new '-o' command line option permits setting an individual
configuration variable.  The key name is always given as a full path
of dot-separated components.

A new '-k' command line option parses a simple configuration file.
This configuration file holds a flat list of 'key=value' lines where
the 'key' is the full path of a configuration variable.  Lines
starting with a '#' are comments.

In general, bhyve starts by parsing command line options in sequence
and applying those settings to configuration values.  Once this is
complete, bhyve then begins initializing its state based on the
configuration values.  This means that subsequent configuration
options or files may override or supplement previously given settings.

A special 'config.dump' configuration value can be set to true to help
debug configuration issues.  When this value is set, bhyve will print
out the configuration variables as a flat list of 'key=value' lines.

Most command line argments map to a single configuration variable,
e.g.  '-w' sets the 'x86.strictmsr' value to false.  A few command
line arguments have less obvious effects:

- Multiple '-p' options append their values (as a comma-seperated
  list) to "vcpu.N.cpuset" values (where N is a decimal vcpu number).

- For '-s' options, a pci.<bus>.<slot>.<function> node is created.
  The first argument to '-s' (the device type) is used as the value of
  a "device" variable.  Additional comma-separated arguments are then
  parsed into 'key=value' pairs and used to set additional variables
  under the device node.  A PCI device emulation driver can provide
  its own hook to override the parsing of the additonal '-s' arguments
  after the device type.

  After the configuration phase as completed, the init_pci hook
  then walks the "pci.<bus>.<slot>.<func>" nodes.  It uses the
  "device" value to find the device model to use.  The device
  model's init routine is passed a reference to its nvlist node
  in the configuration tree which it can query for specific
  variables.

  The result is that a lot of the string parsing is removed from
  the device models and centralized.  In addition, adding a new
  variable just requires teaching the model to look for the new
  variable.

- For '-l' options, a similar model is used where the string is
  parsed into values that are later read during initialization.
  One key note here is that the serial ports use the commonly
  used lowercase names from existing documentation and examples
  (e.g. "lpc.com1") instead of the uppercase names previously
  used internally in bhyve.

Reviewed by: grehan
MFC after: 3 months
Differential Revision: https://reviews.freebsd.org/D26035

3 years agofusefs: fix two bugs regarding fcntl file locks
Alan Somers [Thu, 18 Mar 2021 20:27:27 +0000 (14:27 -0600)]
fusefs: fix two bugs regarding fcntl file locks

1) F_SETLKW (blocking) operations would be sent to the FUSE server as
   F_SETLK (non-blocking).

2) Release operations, F_SETLK with lk_type = F_UNLCK, would simply
   return EINVAL.

PR: 253500
Reported by: John Millikin <jmillikin@gmail.com>
MFC after: 2 weeks

3 years agoUnbreak MSG_CMSG_CLOEXEC
Alex Richardson [Thu, 18 Mar 2021 20:52:20 +0000 (20:52 +0000)]
Unbreak MSG_CMSG_CLOEXEC

MSG_CMSG_CLOEXEC has not been working since 2015 (SVN r284380) because
_finstall expects O_CLOEXEC and not UF_EXCLOSE as the flags argument.
This was probably not noticed because we don't have a test for this flag
so this commit adds one. I found this problem because one of the
libwayland tests was failing.

Fixes: ea31808c3b07 ("fd: move out actual fp installation to _finstall")
MFC after: 3 days
Reviewed By: mjg, kib
Differential Revision: https://reviews.freebsd.org/D29328

3 years agoAdd Chacha20+Poly1035 to the list of AEAD algorithms.
John Baldwin [Thu, 18 Mar 2021 20:31:39 +0000 (13:31 -0700)]
Add Chacha20+Poly1035 to the list of AEAD algorithms.

Sponsored by: Netflix

3 years agovtnet: fix TSO for TCP/IPv6
Michael Tuexen [Thu, 18 Mar 2021 20:25:47 +0000 (21:25 +0100)]
vtnet: fix TSO for TCP/IPv6

The decision whether a TCP packet is sent over IPv4 or IPv6 was
based on ethertype, which works correctly. In D27926 the criteria
was changed to checking if the CSUM_IP_TSO flag is set in the
csum-flags and then considering it to be TCP/IPv4.
However, the TCP stack sets the flag to CSUM_TSO for IPv4 and IPv6,
where CSUM_TSO is defined as CSUM_IP_TSO|CSUM_IP6_TSO.
Therefore TCP/IPv6 packets gets mis-classified as TCP/IPv4,
which breaks TSO for TCP/IPv6.
This patch bases the check again on the ethertype.
This fix will be MFC instantly as discussed with re(gjb).

MFC after: instantly
PR: 254366
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D29331

3 years agoFix the 'linux' rc script on aarch64.
Edward Tomasz Napierala [Tue, 16 Mar 2021 16:48:13 +0000 (16:48 +0000)]
Fix the 'linux' rc script on aarch64.

Previously it would try to load linux.ko instead of linux64.ko
and fail.  While here, don't try to match 'linuxaout'; even if
implemented, it's the same module as `linuxelf`.

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

3 years agonfsv4 pnfs client: fix updating of the layout stateid.seqid
Rick Macklem [Thu, 18 Mar 2021 19:20:25 +0000 (12:20 -0700)]
nfsv4 pnfs client: fix updating of the layout stateid.seqid

During a recent NFSv4 testing event a test server was replying
NFSERR_OLDSTATEID for layout stateids presented to the server
for LayoutReturn operations.  Upon rereading RFC5661, it was
apparent that the FreeBSD NFSv4.1/4.2 pNFS client did not
maintain the seqid field of the layout stateid correctly.

This patch is believed to correct the problem.  Tested against
a FreeBSD pNFS server with diagnostics added to check the stateid's
seqid did not indicate problems.  Unfortunately, testing aginst
this server will not happen in the near future, so the fix may
not be correct yet.

MFC after: 2 weeks

3 years agoRename linux_set_upcall_kse() to linux_set_upcall().
John Baldwin [Thu, 18 Mar 2021 19:14:34 +0000 (12:14 -0700)]
Rename linux_set_upcall_kse() to linux_set_upcall().

This matches the rename of cpu_set_upcall_kse() in
5c2cf818454375536fda522ba83cf67c50929e6b.

Reviewed by: kib, emaste
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D29295

3 years agox86: Reduce code duplication in cpu_fork() and cpu_copy_thread().
John Baldwin [Thu, 18 Mar 2021 19:13:17 +0000 (12:13 -0700)]
x86: Reduce code duplication in cpu_fork() and cpu_copy_thread().

Add copy_thread() to hold shared code.

Reviewed by: kib
MFC after: 1 week
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D29228

3 years agorc.conf(5): Document the 'workstation' firewall_type
Tobias Rehbein [Thu, 18 Mar 2021 17:01:09 +0000 (18:01 +0100)]
rc.conf(5): Document the 'workstation' firewall_type

Document the workstation ACL ruleset, which uses stateful rules.

While here, add a note about where some of the undocumented variables
can be found. This is not a perfect solution for bug 127359, but it at
at least gives a place to go look, and can be used as a reference for
when bug 127359 gets fixed properly.

PR: 254358, 127359

3 years agoRevert "bootstrap: add tic to the bootstrap tools"
Baptiste Daroussin [Thu, 18 Mar 2021 15:01:11 +0000 (16:01 +0100)]
Revert "bootstrap: add tic to the bootstrap tools"
Since we don't build and install the terminfo db anymore this is not
needed

This reverts commit b6a51d39e3a2e2f75d5b42a8c17a531063258a15.
This reverts commit e5e4845959ac60110677df302a68c220dff75abe.
This reverts commit 0af562d7e1850bbef230d30805c101b26588a3ed.

3 years agovfs: fix vnlru marker handling for filtered/unfiltered cases
Mateusz Guzik [Wed, 17 Mar 2021 21:33:47 +0000 (22:33 +0100)]
vfs: fix vnlru marker handling for filtered/unfiltered cases

The global list has a marker with an invariant that free vnodes are
placed somewhere past that. A caller which performs filtering (like ZFS)
can move said marker all the way to the end, across free vnodes which
don't match. Then a caller which does not perform filtering will fail to
find them. This makes vn_alloc_hard sleep for 1 second instead of
reclaiming, resulting in significant stalls.

Fix the problem by requiring an explicit marker by callers which do
filtering.

As a temporary measure extend vnlru_free to restart if it fails to
reclaim anything.

Big thanks go to the reporter for testing several iterations of the
patch.

Reported by: Yamagi <lists yamagi.org>
Tested by: Yamagi <lists yamagi.org>
Reviewed by: kib
Differential Revision: https://reviews.freebsd.org/D29324

3 years agoinetd.conf: Wordsmith recommendation
Daniel Ebdrup Jensen [Thu, 18 Mar 2021 14:17:32 +0000 (15:17 +0100)]
inetd.conf: Wordsmith recommendation

Rather than recommend specific VTIs, it's better to give a general
recommendation for where current and future suitable VTIs can be found.

3 years agolib80211: Start adding 11ac ETSI bits to regdomain.xml
Bjoern A. Zeeb [Thu, 18 Mar 2021 11:08:47 +0000 (11:08 +0000)]
lib80211: Start adding 11ac ETSI bits to regdomain.xml

Summary:
This change currently (partially) duplicates AC1 freqbands as AC2
as they are not fully overlapping.
It then adds the 11ac netband to the "etsi" domain including
"indoor" and "dfs" flags, which we can deal with, as well as
appropriate (round down) maxpower values.
Comments are left for the actual frequency bands as we do use the
centerfreq for the first/last (chansep sized) channel in the
freqband and their "id" name, which can be confusing.

Sponsored-by: Rubicon Communications, LLC ("Netgate")
Reviewed-by: philip, adrian
MFC-after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D25999

3 years agonet80211: split up ieee80211_probereq()
Bjoern A. Zeeb [Sat, 6 Mar 2021 21:05:43 +0000 (21:05 +0000)]
net80211: split up ieee80211_probereq()

Factor out ieee80211_probereq_ie() and ieee80211_probereq_ie_len()
and make the length dynamic rather than static max.  The latter is
needed as our current fixed length was longer than some "hw scan",
e.g. that of ath10k, will take.  This way we can pass what we have.
Should this not be sufficient in the future we might have to deal
with filtering and much more error handling.

This also removes a duplicate calculation for ieee80211_ie_wpa [1].

Repoprted-by: Martin Husemann <martin NetBSD.org> [1]
Sponsored-by: Rubicon Communications, LLC ("Netgate")
Sponsored-by: The FreeBSD Foundation (update for alloc)
Reviewed-by: adrian, martin NetBSD.org (earlier version)
Reviewed-by: philip
MFC-after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D26545

3 years agoLinuxKPI: add support for crc32_le()
Bjoern A. Zeeb [Wed, 10 Mar 2021 15:01:10 +0000 (15:01 +0000)]
LinuxKPI: add support for crc32_le()

Add support for crc32_le() as a wrapper around crc32_raw().

Sponsored-by: The FreeBSD Foundation
Obtained-from: bz_iwlwifi
MFC-after: 2 weeks
Reviewed-by: hselasky
Differential Revision: https://reviews.freebsd.org/D29187

3 years agotermios: add more speeds
Bjoern A. Zeeb [Wed, 10 Mar 2021 22:17:07 +0000 (22:17 +0000)]
termios: add more speeds

A lot of small arm64 gadgets are using 1500000 as console speed.
While cu can perfectly deal with this some 3rd party software, e.g.,
comms/conserver-con add speeds based on B<n> being defined.
Having it defined here simplifies enhancing other software.

Obtained-from: NetBSD sys/sys/termios.h 1.36
MFC-after: 2 weeks
Reviewed-by: philip (,okayed by imp)
Differential Revision: https://reviews.freebsd.org/D29209

3 years agoterminfo db: add entries for the terminfo database removal
Baptiste Daroussin [Thu, 18 Mar 2021 10:04:32 +0000 (11:04 +0100)]
terminfo db: add entries for the terminfo database removal

3 years agoRevert "terminfo: add terminfo database"
Baptiste Daroussin [Thu, 18 Mar 2021 09:57:23 +0000 (10:57 +0100)]
Revert "terminfo: add terminfo database"

This reverts commit 2a50a9de8340f08bd876e9e5993332ae14376f80.

3 years agoterminfo: add more path to lookup for the database
Baptiste Daroussin [Thu, 18 Mar 2021 08:46:15 +0000 (09:46 +0100)]
terminfo: add more path to lookup for the database

In preparation for the move of the database out of base, add one more
path to lookup
Now the default lookup path is

1. base
2. localbase
3. localbase special site for custom terminfo (for ports adding custom
terminfo and avoid potential collision with the general db)
4. termcap

The plan is to allow the terminfo-db to be installed by end users via
a package for people willing to have the support for features from
this database provides. And keep the fallback on termcap for people who
don't want to hear about the terminfo db or how to configure the terminal
if it uses by default the features proposed in the definitions
of the terminfo db.

the first look up path is a window open for a proposal made by glebius@
consisting on creating a tool where the user at install time will select
the feature it want for a given terminal and generate its configurations
based on that. I won't work on it, but it is now posssible and there is
a path where to store those definitions

3 years agoClarify that the new STABLE branch is branched off CURRENT, not renamed
Li-Wen Hsu [Thu, 18 Mar 2021 09:16:16 +0000 (17:16 +0800)]
Clarify that the new STABLE branch is branched off CURRENT, not renamed

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

3 years agogenet: Fix problem with forwarding some TCP/IPv6 packets
Mike Karels [Thu, 18 Mar 2021 00:19:24 +0000 (19:19 -0500)]
genet: Fix problem with forwarding some TCP/IPv6 packets

TCP/IPv6 packets to be forwarded can be laid out with only the Ethernet
header in the first mbuf, and these packets are lost.  There was a
previous hack to pullup ICMPv6 packets with such a layout for the
same reason.  Generalize, and pullup any IPv6 packets with only the
Ethernet header in the first mbuf.  Possibly this should also include
IPv4, but that situation has not been observed to fail.

PR: 254060
Reported by: denis at h3q.com
MFC after: 3 days

3 years agoRemove unused obj variable missed in r354870.
Bryan Drewery [Wed, 17 Mar 2021 22:01:19 +0000 (15:01 -0700)]
Remove unused obj variable missed in r354870.

Sponsored by: Dell EMC

3 years agoarm64: implement COMPAT_FREEBSD32 fill/set dbregs/fpregs
Ed Maste [Wed, 17 Mar 2021 14:10:41 +0000 (10:10 -0400)]
arm64: implement COMPAT_FREEBSD32 fill/set dbregs/fpregs

On FreeBSD/arm fill_fpregs, fill_dbregs are stubs that zero the reg
struct and return success. set_fpregs and set_dbregs do nothing and
return success.

Provide the same implementation for arm64 COMPAT_FREEBSD32.

Reviewed by: andrew
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D29314

3 years agoaarch64: Clear TLS registers during exec().
John Baldwin [Wed, 17 Mar 2021 20:19:04 +0000 (13:19 -0700)]
aarch64: Clear TLS registers during exec().

These are not stored in the trapframe so must be cleared explicitly.

This is similar to one of the MIPS changes in 822d2d6ac94f.

Reviewed by: andrew
Obtained from: CheriBSD
MFC after: 1 week
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D28711

3 years agopf tests: pfsync bulk update test
Kristof Provost [Mon, 15 Mar 2021 13:10:55 +0000 (14:10 +0100)]
pf tests: pfsync bulk update test

Test that pfsync works as expected with bulk updates. That is, create
some state before setting up the second firewall. Let that firewall
request a bulk update so it can catch up, and check that it got the
state which was created before it enable pfsync.

PR: 254236
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D29272