]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
2 years agomvneta: Fix MTU update sequence
Kornel Duleba [Tue, 31 Aug 2021 06:22:29 +0000 (08:22 +0200)]
mvneta: Fix MTU update sequence

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

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

2 years agoffs_update(): Do not assume that EBUSY can only come LK_NOWAIT trylock
Konstantin Belousov [Thu, 26 Aug 2021 16:17:39 +0000 (19:17 +0300)]
ffs_update(): Do not assume that EBUSY can only come LK_NOWAIT trylock

Instead do protective check for the local flags and do not interpret
EBUSY specially if we did not request trylock mode for bread().

Reviewed by: mckusick
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 years agoffs_update(): recalculate flags after relocking the vnode
Konstantin Belousov [Thu, 26 Aug 2021 16:12:58 +0000 (19:12 +0300)]
ffs_update(): recalculate flags after relocking the vnode

Inode type could migrate between snapshot and regular types while the
vnode is unlocked.  Recalculate flags specific for snapshot after relock.

Reviewed by: mckusick
Reported and tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 years agopci_host_generic_fdt: set domain number
Bartlomiej Grzesik [Tue, 31 Aug 2021 04:25:05 +0000 (06:25 +0200)]
pci_host_generic_fdt: set domain number

Set domain number to device unit.

Some boards have multiple RCs handled by different drivers,
this ensures that there are no collisions with ofw_pcib.

Obtained from: Semihalf
Reviewed by: wma
Differential revision: https://reviews.freebsd.org/D31508

2 years agoqoriq_dw_pci: Fix typo in link status checking code
Bartlomiej Grzesik [Tue, 31 Aug 2021 04:22:33 +0000 (06:22 +0200)]
qoriq_dw_pci: Fix typo in link status checking code

On some DesignWare PCIe controllers accessing config registers of slots
whose link is down triggers a SError. Because of that we need to check the
link status before any acceses config space.
Due to a typo link was always reported up.
This fixes a SError that occured during boot on LS1028A-RDB.

Obtained from: Semihalf
Reviewed by: wma
Differential revision: https://reviews.freebsd.org/D31509

2 years agoFix an early return in ctld UCL parser
Ryan Stone [Wed, 7 Jul 2021 20:04:10 +0000 (16:04 -0400)]
Fix an early return in ctld UCL parser

If the UCL ctld parser encountered a port that used the CTL
ioctl device, it fell into a special case that had an erroneous
early return.  This caused all configuration in the target
following the port attribute to be skipped.  Fix this by replacing
the return with a continue so that the rest of the config is
parsed correctly.

Sponsored by: Dell EMC Isilon
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D31703
Reviewed by: bapt

2 years agoamd64: correctly calculate KVA of the preloaded ucode blob
Konstantin Belousov [Mon, 30 Aug 2021 20:25:31 +0000 (23:25 +0300)]
amd64: correctly calculate KVA of the preloaded ucode blob

when kernphys != 2M

Reported and tested by: kbowling
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agoCirrus-CI: reduce VM memory to 8G
Ed Maste [Tue, 31 Aug 2021 00:50:34 +0000 (20:50 -0400)]
Cirrus-CI: reduce VM memory to 8G

Cirrus-CI now provides a task memory use graph, and it is clear we do
not need to provision the VM with 24GB.

Sponsored by: The FreeBSD Foundation

2 years agonvme(4): Do not panic on admin queue construct error.
Alexander Motin [Tue, 31 Aug 2021 00:36:22 +0000 (20:36 -0400)]
nvme(4): Do not panic on admin queue construct error.

MFC after: 1 week

2 years agocxgbei: Add sysctls to report the maximum data segment lengths.
John Baldwin [Mon, 30 Aug 2021 22:55:40 +0000 (15:55 -0700)]
cxgbei: Add sysctls to report the maximum data segment lengths.

These sysctls report the maximum data segment lengths supported by an
adapter.  These are the values advertised to the remote end during the
login phase.

Sponsored by: Chelsio Communications

2 years agomx25l: Add support for Integrated Silicon Solution is25wp256
Thomas Skibo [Mon, 30 Aug 2021 20:39:20 +0000 (21:39 +0100)]
mx25l: Add support for Integrated Silicon Solution is25wp256

This is used for the on-board flash on the HiFive Unmatched board.

Reviewed by: #riscv, jrtc27
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31562

2 years agosifive_spi: Add missing case for SPIBUS_MODE_NONE
Thomas Skibo [Mon, 30 Aug 2021 20:39:20 +0000 (21:39 +0100)]
sifive_spi: Add missing case for SPIBUS_MODE_NONE

Otherwise sckmode is left uninitialised, not zero. This mode is used for
the on-board flash on the HiFive Unmatched board. Whilst here, catch
unknown modes and return an error rather than silently continuing.

Reviewed by: #riscv, jrtc27
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31562

2 years agocxgbei: Limit T5 transmit data segments to 15k.
John Baldwin [Mon, 30 Aug 2021 22:27:08 +0000 (15:27 -0700)]
cxgbei: Limit T5 transmit data segments to 15k.

This avoids exceeding a limit in the firmware when using ISO with
jumbo frames.

Reported by: Jithesh Arakkan @ Chelsio
Sponsored by: Chelsio Communications

2 years agorouting: Fix newly-added rt_get_inet[6]_parent() api.
Alexander V. Chernikov [Mon, 30 Aug 2021 21:10:37 +0000 (21:10 +0000)]
routing: Fix newly-added rt_get_inet[6]_parent() api.

Correctly handle the case when no default route is present.

Reported by: Konrad <konrad.kreciwilk at korbank.pl>

2 years agoktls: Support asynchronous dispatch of AEAD ciphers.
John Baldwin [Mon, 30 Aug 2021 20:11:52 +0000 (13:11 -0700)]
ktls: Support asynchronous dispatch of AEAD ciphers.

KTLS OCF support was originally targeted at software backends that
used host CPU cycles to encrypt TLS records.  As a result, each KTLS
worker thread queued a single TLS record at a time and waited for it
to be encrypted before processing another TLS record.  This works well
for software backends but limits throughput on OCF drivers for
coprocessors that support asynchronous operation such as qat(4) or
ccr(4).  This change uses an alternate function (ktls_encrypt_async)
when encrypt TLS records via a coprocessor.  This function queues TLS
records for encryption and returns.  It defers the work done after a
TLS record has been encrypted (such as marking the mbufs ready) to a
callback invoked asynchronously by the coprocessor driver when a
record has been encrypted.

- Add a struct ktls_ocf_state that holds the per-request state stored
  on the stack for synchronous requests.  Asynchronous requests malloc
  this structure while synchronous requests continue to allocate this
  structure on the stack.

- Add a ktls_encrypt_async() variant of ktls_encrypt() which does not
  perform request completion after dispatching a request to OCF.
  Instead, the ktls_ocf backends invoke ktls_encrypt_cb() when a TLS
  record request completes for an asynchronous request.

- Flag AEAD software TLS sessions as async if the backend driver
  selected by OCF is an async driver.

- Pull code to create and dispatch an OCF request out of
  ktls_encrypt() into a new ktls_encrypt_one() function used by both
  ktls_encrypt() and ktls_encrypt_async().

- Pull code to "finish" the VM page shuffling for a file-backed TLS
  record into a helper function ktls_finish_noanon() used by both
  ktls_encrypt() and ktls_encrypt_cb().

Reviewed by: markj
Tested on: ccr(4) (jhb), qat(4) (markj)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D31665

2 years agoopenssh: add information about a local change
Ed Maste [Mon, 30 Aug 2021 19:28:38 +0000 (15:28 -0400)]
openssh: add information about a local change

2 years agoFix acpica macros that subtract null pointers
Dimitry Andric [Sun, 29 Aug 2021 11:15:23 +0000 (13:15 +0200)]
Fix acpica macros that subtract null pointers

Clang 13.0.0 produces a new -Werror warning about the ACPI_TO_INTEGER(p)
and ACPI_OFFSET(d, f) macros in acpica's actypes.h:

    sys/contrib/dev/acpica/components/dispatcher/dsopcode.c:708:31: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
        ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/acpica/include/actypes.h:664:41: note: expanded from macro 'ACPI_PTR_TO_PHYSADDR'
    #define ACPI_PTR_TO_PHYSADDR(i)         ACPI_TO_INTEGER(i)
                                            ^~~~~~~~~~~~~~~~~~
    sys/contrib/dev/acpica/include/actypes.h:661:41: note: expanded from macro 'ACPI_TO_INTEGER'
    #define ACPI_TO_INTEGER(p)              ACPI_PTR_DIFF (p, (void *) 0)
                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    sys/contrib/dev/acpica/include/actypes.h:656:82: note: expanded from macro 'ACPI_PTR_DIFF'
    #define ACPI_PTR_DIFF(a, b)             ((ACPI_SIZE) (ACPI_CAST_PTR (UINT8, (a)) - ACPI_CAST_PTR (UINT8, (b))))
                                                                                     ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

This problem of undefined behavior was also reported to acpica by @cem
in 2018: https://github.com/acpica/acpica/issues/407, but it seems there
was never any fix committed for it upstream.

Instead fix these locally, for ACPI_TO_INTEGER by simply casting the
incoming pointer to ACPI_SIZE (which corresponds roughly to uintptr_t
and size_t), and for ACPI_OFFSET by reusing our __offsetof definition
from sys/cdefs.h.

Reviewed by: emaste, kib, imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D31710

2 years agohwpmc: don't validate capabilities in allocation method
Mitchell Horne [Mon, 30 Aug 2021 17:03:18 +0000 (14:03 -0300)]
hwpmc: don't validate capabilities in allocation method

These checks were inconsistently applied across the various hwpmc
classes. The condition is already checked by the generic code in
hwpmc_mod.c, so remove them.

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

2 years agohwpmc: consistently validate PMC class in allocation method
Mitchell Horne [Mon, 30 Aug 2021 17:02:23 +0000 (14:02 -0300)]
hwpmc: consistently validate PMC class in allocation method

It is always a good idea. In one case, attempting to allocate N+1 PMCs
from a class with N hardware counters would incorrectly attempt to
allocate from the next class in the list. Without this validation, this
can lead to all kinds of strange behaviour.

Since powerpc_allocate_pmc() is used by both the mpc7xxx and ppc970
classes, add a new global to track which is active (it will never be
both).

Reviewed by: luporl, ray
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31387

2 years agoaesni: Avoid a potential out-of-bounds load in aes_encrypt_icm()
Mark Johnston [Mon, 30 Aug 2021 18:22:20 +0000 (14:22 -0400)]
aesni: Avoid a potential out-of-bounds load in aes_encrypt_icm()

Given a partial block at the end of a payload, aes_encrypt_icm() would
perform a 16-byte load of the residual into a temporary variable.  This
is unsafe in principle since the full block may cross a page boundary.
Fix the problem by copying the residual into a stack buffer first.

Reported by: syzbot+b7e44cde9e2e89f0f6c9@syzkaller.appspotmail.com
Reported by: syzbot+4b5eaf123a99456b5160@syzkaller.appspotmail.com
Reported by: syzbot+70c74c1aa232633355ca@syzkaller.appspotmail.com
Reported by: syzbot+2c663776a52828373d41@syzkaller.appspotmail.com
Reviewed by: cem, jhb
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31730

2 years agongatm: remove one of doubled semicolons
Ed Maste [Mon, 30 Aug 2021 15:38:51 +0000 (11:38 -0400)]
ngatm: remove one of doubled semicolons

Discussed with: harti

2 years agoxinstall: fix invocation of llvm-strip
Mitchell Horne [Wed, 2 Jun 2021 15:00:56 +0000 (12:00 -0300)]
xinstall: fix invocation of llvm-strip

When executing strip(1), '--' is passed as an argument to explicitly
terminate the getopt(3) loop. The option parsing in llvm-strip doesn't
support this however, so setting XSTRIPBIN=llvm-strip results in an
unsupported argument error. llvm-strip(1) is otherwise
commandline-compatible with FreeBSD's strip(1), so just use the
documented argument format that is common to both.

Special care needs to be taken for filenames beginning with a '-'.

Reviewed by: arichardson, eugen (earlier version, both)
Discussed with: jilles
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D30614

2 years agowpa: Enclose FreeBSD specific defines
Cy Schubert [Thu, 26 Aug 2021 23:28:40 +0000 (16:28 -0700)]
wpa: Enclose FreeBSD specific defines

FreeBSD only defines are specific only to FreeBSD. Document them as such.
It is our intention to push this change to w1.fi.

MFC after: 1 week

2 years agowpa: Include all wpa include file search directories
Cy Schubert [Thu, 26 Aug 2021 23:17:11 +0000 (16:17 -0700)]
wpa: Include all wpa include file search directories

Though not all include file search directories are presently needed,
add them to the search list. This is required for the next update to
wpa.

No functional change intended.

MFC after: 1 week

2 years agowpa: Correctly build the hostapd BSD driver
Cy Schubert [Thu, 26 Aug 2021 22:59:03 +0000 (15:59 -0700)]
wpa: Correctly build the hostapd BSD driver

driver.bsd.c initializes itself differently when built for
hostapd than it does when built for wpa_supplicant.

MFC after: 1 week

2 years agoCreate sys/reg.h for the common code previously in machine/reg.h
Andrew Turner [Fri, 27 Aug 2021 09:38:40 +0000 (09:38 +0000)]
Create sys/reg.h for the common code previously in machine/reg.h

Move the common kernel function signatures from machine/reg.h to a new
sys/reg.h. This is in preperation for adding PT_GETREGSET to ptrace(2).

Reviewed by: imp, markj
Sponsored by: DARPA, AFRL (original work)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D19830

2 years agoRevert "Disable the accelerated arm64 sha25 in static libraries"
Andrew Turner [Mon, 30 Aug 2021 09:34:30 +0000 (10:34 +0100)]
Revert "Disable the accelerated arm64 sha25 in static libraries"

This is now unneeded as arm64 can now resolve ifuncs in static binaries

This reverts commit c81ea895b563c4d1e39468a8525284b7474fe850.

Sponsored by: The FreeBSD Foundation

2 years agobhyve: Nuke double-semicolons
Elliott Mitchell [Mon, 30 Aug 2021 07:26:45 +0000 (15:26 +0800)]
bhyve: Nuke double-semicolons

A distinct number of double-semicolons ended up in bhyve. Take a pass at
getting rid of many of these harmless typos.

MFC after: 3 days

2 years agonfsd: Make loop calling VOP_ALLOCATE() iterate until done
Rick Macklem [Sun, 29 Aug 2021 23:46:27 +0000 (16:46 -0700)]
nfsd: Make loop calling VOP_ALLOCATE() iterate until done

The NFSv4.2 Deallocate operation loops on VOP_DEALLOCATE()
while progress is being made (remaining length decreasing).
This patch changes the loop on VOP_ALLOCATE() for the NFSv4.2
Allocate operation do the same, instead of stopping after
an arbitrary 20 iterations.

MFC after: 2 weeks

2 years agorouting: Bring back the ability to specify transmit interface via its name.
Alexander V. Chernikov [Sun, 29 Aug 2021 19:51:28 +0000 (19:51 +0000)]
routing: Bring back the ability to specify transmit interface via its name.

Some software references outgoing interfaces by specifying name instead of
 index.

Use rti_ifp from rt_addrinfo if provided instead of always using
 address interface when constructing nexthop.

PR:  255678
Reported by: martin.larsson2 at gmail.com
MFC after: 1 week

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

This change was missed in r333509 (e6b475e0af).

Differential Revision: https://reviews.freebsd.org/D31704
Reviewed by: mjg

2 years agoxen: Fix warning by adding KERNBASE to modlist_paddr before casting
Dimitry Andric [Sun, 29 Aug 2021 14:02:31 +0000 (16:02 +0200)]
xen: Fix warning by adding KERNBASE to modlist_paddr before casting

Clang 13 produces the following warning for hammer_time_xen():

sys/x86/xen/pv.c:183:19: error: the pointer incremented by -2147483648 refers past the last possible element for an array in 64-bit address space containing 256-bit (32-byte) elements (max possible 576460752303423488 elements) [-Werror,-Warray-bounds]
                    (vm_paddr_t)start_info->modlist_paddr + KERNBASE;
                                ^                               ~~~~~~~~
sys/xen/interface/arch-x86/hvm/start_info.h:131:5: note: array 'modlist_paddr' declared here
    uint64_t modlist_paddr;         /* Physical address of an array of           */
    ^

This is because the expression first casts start_info->modlist_paddr to
struct hvm_modlist_entry * (via vmpaddr_t), and *then* adds KERNBASE,
which is then interpreted as KERNBASE * sizeof(struct
hvm_modlist_entry).

Instead, parenthesize the addition to get the intended result, and cast
it to struct hvm_modlist_entry * afterwards. Also remove the cast to
vmpaddr_t since it is not necessary.

Reviewed by: royger
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D31711

2 years agoFix -Wformat errors in pfctl on 32-bit architectures
Dimitry Andric [Sun, 29 Aug 2021 15:31:28 +0000 (17:31 +0200)]
Fix -Wformat errors in pfctl on 32-bit architectures

Use PRIu64 to printf(3) uint64_t quantities, otherwise this will result
in "error: format specifies type 'unsigned long' but the argument has
type 'uint64_t' (aka 'unsigned long long') [-Werror,-Wformat]" on 32-bit
architectures.

Fixes: 80078d9d38fd
MFC after: 1 week

2 years agoDon't error out on unused but set variables with clang 13
Dimitry Andric [Sun, 29 Aug 2021 13:53:40 +0000 (15:53 +0200)]
Don't error out on unused but set variables with clang 13

Clang 13.0.0 now has a -Wunused-but-set-variable warning similar to the
one gcc has had for quite a while. Since this triggers *very* often for
our kernel builds, don't make it a hard error, but leave the warning
visible so is some incentive to fix the instances.

MFC after: 3 days

2 years agoRemove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13
Dimitry Andric [Sun, 29 Aug 2021 13:39:16 +0000 (15:39 +0200)]
Remove -simplifycfg-dup-ret from CLANG_OPT_SMALL flags for clang 13

After llvm/clang 13.0.0, the -simplifycfg-dup-ret backend flag is no
longer supported. This was part of CLANG_OPT_SMALL, which is only still
used for stand/i386/boot2 and stand/i386/isoboot, to achieve the very
small binary size required. Luckily clang 13.0.0 does not need any
additional flags for this (I get 240 bytes available when building
boot2).

MFC after: 3 days

2 years agopfctl: use libpfctl to retrieve pf status
Kristof Provost [Thu, 26 Aug 2021 15:09:48 +0000 (17:09 +0200)]
pfctl: use libpfctl to retrieve pf status

Rather than call DIOCGETSTATUS ourselves use the new libpfctl functions.

MFC after: 1 week
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D31697

2 years agolibpfctl: Implement DIOCGETSTATUS wrappers
Kristof Provost [Thu, 26 Aug 2021 15:06:15 +0000 (17:06 +0200)]
libpfctl: Implement DIOCGETSTATUS wrappers

MFC after: 1 week
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D31696

2 years agolibpfctl: fix double free
Kristof Provost [Sun, 22 Aug 2021 14:20:15 +0000 (16:20 +0200)]
libpfctl: fix double free

Reviewed by: donner
MFC after: 1 week
Sponsored by: Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D31695

2 years agopf: Introduce nvlist variant of DIOCGETSTATUS
Kristof Provost [Mon, 16 Aug 2021 19:55:27 +0000 (21:55 +0200)]
pf: Introduce nvlist variant of DIOCGETSTATUS

Make it possible to extend the GETSTATUS call (e.g. when we want to add
new counters, such as for syncookie support) by introducing an
nvlist-based alternative.

MFC after: 1 week
Sponsored by:   Modirum MDPay
Differential Revision: https://reviews.freebsd.org/D31694

2 years agoFix a common typo in source code comments
Gordon Bergling [Sun, 29 Aug 2021 09:45:09 +0000 (11:45 +0200)]
Fix a common typo in source code comments

- s/concurently/concurrently/

MFC after: 3 days

2 years agovfs: yield in vn_deallocate_impl() loop
Ka Ho Ng [Sun, 29 Aug 2021 08:26:00 +0000 (16:26 +0800)]
vfs: yield in vn_deallocate_impl() loop

Yield at the end of each loop iteration if there are remaining works as
indicated by the value of *len updated by VOP_DEALLOCATE. Without this,
when calling vop_stddeallocate to zero a large region, the
implementation only zerofills a relatively small chunk and returns.

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

2 years agolibsa: Fix a typo in source code comments
Gordon Bergling [Sun, 29 Aug 2021 08:09:58 +0000 (10:09 +0200)]
libsa: Fix a typo in source code comments

- s/mininum/minimum/

MFC after: 3 days

2 years agoisci(4): Fix a common typo in src comments
Gordon Bergling [Sun, 29 Aug 2021 07:55:10 +0000 (09:55 +0200)]
isci(4): Fix a common typo in src comments

- s/exlusive/exclusive/

MFC after: 3 days

2 years agostress2: Added new msdosfs rename() tests
Peter Holm [Sun, 29 Aug 2021 06:37:54 +0000 (08:37 +0200)]
stress2: Added new msdosfs rename() tests

2 years agoldd: Remove non-functional -v option
Konstantin Belousov [Sat, 28 Aug 2021 17:28:54 +0000 (20:28 +0300)]
ldd: Remove non-functional -v option

It seems -v only worked for a.out.  Remove it, not even keeping the current
nop for compat.  Also remove more mentions of a.out format from the man
page.

Reviewed by: dim, emaste
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31708

2 years agoStyle
Konstantin Belousov [Fri, 27 Aug 2021 14:28:19 +0000 (17:28 +0300)]
Style

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

2 years agofsetown: Avoid process group lock recursion
Mark Johnston [Sat, 28 Aug 2021 19:50:44 +0000 (15:50 -0400)]
fsetown: Avoid process group lock recursion

Restore the pre-1d874ba4f8ba behaviour of disassociating the current
SIGIO recipient before looking up the specified process or process
group.  This avoids a lock recursion in the scenario where a process
group is configured to receive SIGIO for an fd when it has already been
so configured.

Reported by: pho
Tested by: pho
Reviewed by: kib
MFC after: 3 days

2 years agoExplicitly link zfsd with libspl to avoid undefined references
Dimitry Andric [Sat, 28 Aug 2021 18:23:15 +0000 (20:23 +0200)]
Explicitly link zfsd with libspl to avoid undefined references

Because lld 13.0.0 is more strict about undefined references when
linking to shared libraries, it produces the following errors for zfsd:

ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libzfs_core.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined]
ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libnvpair.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined]
ld: error: /home/dim/obj/home/dim/src/llvm-13-update/amd64.amd64/tmp/usr/lib/libavl.so: undefined reference to libspl_assertf [--no-allow-shlib-undefined]
*** [zfsd.full] Error code 1

Fix this by adding libspl (where libspl_assertf lives) to zfsd's LIBADD.

MFC after: 3 days

2 years agoFix a common typo in man pages and src comments
Gordon Bergling [Sat, 28 Aug 2021 17:24:27 +0000 (19:24 +0200)]
Fix a common typo in man pages and src comments

- s/desciptor/descriptor/

MFC after: 5 days

2 years agoFix some common typos in source code comments
Gordon Bergling [Sat, 28 Aug 2021 16:57:23 +0000 (18:57 +0200)]
Fix some common typos in source code comments

- s/priviledged/privileged/
- s/funtion/function/
- s/doens't/doesn't/
- s/sychronization/synchronization/

MFC after: 3 days

2 years agoinet6(4): Fix a few common typos in source code comments
Gordon Bergling [Sat, 28 Aug 2021 16:53:59 +0000 (18:53 +0200)]
inet6(4): Fix a few common typos in source code comments

- s/reshedule/reschedule/

MFC after: 3 days

2 years agoinet(3): Fix a few common typos in source code comments
Gordon Bergling [Sat, 28 Aug 2021 16:53:02 +0000 (18:53 +0200)]
inet(3): Fix a few common typos in source code comments

- s/funtion/function/

MFC after: 3 days

2 years agoocs_fs(4): Fix some common typos in source code comments
Gordon Bergling [Sat, 28 Aug 2021 16:24:08 +0000 (18:24 +0200)]
ocs_fs(4): Fix some common typos in source code comments

- s/transfered/transferred/
- s/associted/associated/

MFC after: 3 days

2 years agosh: improve emacs mode
Baptiste Daroussin [Sat, 28 Aug 2021 12:59:53 +0000 (14:59 +0200)]
sh: improve emacs mode

in emacs mode ^W should delete the previous word by default
Note that upstreaming this change directly into libedit is in process.

Reported by: manu
Reviewed by: jills, pstef, manu
Differential Revision: https://reviews.freebsd.org/D29493

2 years agoSilence unused parameter warnings in fspacectl(2) bootstrap stub
Dimitry Andric [Sat, 28 Aug 2021 13:37:24 +0000 (15:37 +0200)]
Silence unused parameter warnings in fspacectl(2) bootstrap stub

While here, replace spaces with tabs and add a newline at EOF.

Fixes: 5425ba8332571e57f9fe623346cb9d83293264d4
MFC after: 3 days

2 years agonfscl: Add a VOP_DEALLOCATE() for the NFSv4.2 client
Rick Macklem [Sat, 28 Aug 2021 01:31:36 +0000 (18:31 -0700)]
nfscl: Add a VOP_DEALLOCATE() for the NFSv4.2 client

This patch adds a VOP_DEALLOCATE() to the NFS client.
For NFSv4.2 servers that support the Deallocate operation,
it is used. Otherwise, it falls back on calling
vop_stddeallocate().

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

2 years agovfs_default: Change vop_stddeallocate() from static to global
Rick Macklem [Sat, 28 Aug 2021 01:25:44 +0000 (18:25 -0700)]
vfs_default: Change vop_stddeallocate() from static to global

A future commit to the NFS client uses vop_stddeallocate() for
cases where the NFS server does not support a Deallocate operation.
Change vop_stddeallocate() from static to global so that it can
be called by the NFS client.

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

2 years agoSilence more gtest warnings, now in fusefs tests
Dimitry Andric [Fri, 27 Aug 2021 21:39:23 +0000 (23:39 +0200)]
Silence more gtest warnings, now in fusefs tests

Follow-up d396c67f26b0 by also silencing warnings about deprecated
implicit copy constructors in the fusefs tests, which use googletest.

Fixes: d396c67f26b0
MFC after: 3 days

2 years agoAdd a regression test for ggatec remote code execution
Alan Somers [Fri, 27 Aug 2021 20:40:05 +0000 (14:40 -0600)]
Add a regression test for ggatec remote code execution

Tests that ggatec appropriately handles unsupported BIO operations,
rather than overflowing a buffer.

Submitted by: Johannes Bruelltuete <johannes@jo-t.de>
PR: 213479
Reviewed by: asomers
Differential Revision: https://reviews.freebsd.org/D31318

2 years agoFix null pointer subtraction in mergesort()
Dimitry Andric [Fri, 27 Aug 2021 17:45:43 +0000 (19:45 +0200)]
Fix null pointer subtraction in mergesort()

Clang 13 produces the following warning for this function:

lib/libc/stdlib/merge.c:137:41: error: performing pointer subtraction with a null pointer has undefined behavior [-Werror,-Wnull-pointer-subtraction]
        if (!(size % ISIZE) && !(((char *)base - (char *)0) % ISIZE))
                                               ^ ~~~~~~~~~

This is meant to check whether the size and base parameters are aligned
to the size of an int, so use our __is_aligned() macro instead.

Also remove the comment that indicated this "stupid subtraction" was
done to pacify some ancient and unknown Cray compiler, and which has
been there since the BSD 4.4 Lite Lib Sources were imported.

MFC after: 3 days

2 years agoAdd SDT probes virtqueue::enqueue_segments:{entry,return}
Stephen J. Kiernan [Fri, 27 Aug 2021 17:08:59 +0000 (13:08 -0400)]
Add SDT probes virtqueue::enqueue_segments:{entry,return}

This allows one to be able to map the sglist entries passed into the
vq_ring_enqueue_segments() function to the segment indexes used in
the virtqueue.

This function normally gets inlined and may not available via FBT
probes.

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

2 years agoefi loader: disallow user to configure staging area size less than default
Konstantin Belousov [Thu, 26 Aug 2021 21:46:48 +0000 (00:46 +0300)]
efi loader: disallow user to configure staging area size less than default

We need to round it up to 2M, for instance.  Having staging area too small
might cause the first resize to use negative size for memmove()/memcpy(),
which kills loader.

Tested by: Harry Schmalzbauer <freebsd@omnilan.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 years agoRestore the definition of EFI_STAGING_SIZE
Konstantin Belousov [Thu, 26 Aug 2021 19:32:42 +0000 (22:32 +0300)]
Restore the definition of EFI_STAGING_SIZE

The definition can be overridden by users, and before f75caed644a5c it
was in MBs.  Make the symbol' unit MB, to be compatible with users
customizations.

Reported and tested by: Harry Schmalzbauer <freebsd@omnilan.de>
Sponsored by: The FreeBSD Foundation
MFC after: 1 week

2 years agovfs_hash_rehash(): require the vnode to be exclusively locked
Konstantin Belousov [Wed, 18 Aug 2021 11:14:42 +0000 (14:14 +0300)]
vfs_hash_rehash(): require the vnode to be exclusively locked

Rehash updates v_hash.  Also, rehash moves the vnode to different hash
bucket, which should be noticed in vfs_hash_get() after sleeping for
the vnode lock.

Reviewed by: mckusick, rmacklem
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agovfs_hash_insert: ensure that predicate is true
Konstantin Belousov [Tue, 17 Aug 2021 13:47:25 +0000 (16:47 +0300)]
vfs_hash_insert: ensure that predicate is true

After vnode lock, recheck v_hash. When vfs_hash_insert() is used with
a predicate, recheck it after the selected vnode is locked. Since
vfs_hash_lock is dropped, vnode could be rehashed during the sleep for
the vnode lock, which could go unnoticed there.

Reported and tested by: pho
Reviewed by: mckusick, rmacklem
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agomsdosfs: drop now unused DE_RENAME
Konstantin Belousov [Sat, 7 Aug 2021 20:21:27 +0000 (23:21 +0300)]
msdosfs: drop now unused DE_RENAME

Submitted by: trasz
Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agomsdosfs: add doscheckpath lock
Konstantin Belousov [Sat, 7 Aug 2021 20:18:26 +0000 (23:18 +0300)]
msdosfs: add doscheckpath lock

Similar to the UFS revision 8df4bc48c89a130207

Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agomsdosfs: fix rename
Konstantin Belousov [Sun, 1 Aug 2021 17:46:59 +0000 (20:46 +0300)]
msdosfs: fix rename

Use the same locking algorithm for msdosfs_rename() as used by ufs_rename().
Convert doscheckpath() to non-sleeping version.

Reported by: trasz
PR: 257522
In collaboration with: pho
Reviewed by: mckusick
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agomsdosfs deget(): add locking flags argument
Konstantin Belousov [Sun, 1 Aug 2021 17:53:12 +0000 (20:53 +0300)]
msdosfs deget(): add locking flags argument

LK_EXCLUSIVE must be passed always, some consumers need the ability to
specify LK_NOWAIT

Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agomsdosfs: unstaticise msdosfs_lookup_
Konstantin Belousov [Sun, 1 Aug 2021 17:11:40 +0000 (20:11 +0300)]
msdosfs: unstaticise msdosfs_lookup_

and rename it to msdosfs_lookup_ino(), similarly to UFS

Reviewed by: mckusick
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D31464

2 years agopmap_extract.9: Fix pmap_extract_and_hold()'s function type
Ka Ho Ng [Fri, 27 Aug 2021 13:42:49 +0000 (21:42 +0800)]
pmap_extract.9: Fix pmap_extract_and_hold()'s function type

pmap_extract_and_hold() returns a vm_page_t instead of a physical page
address.

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

2 years agoconnect: Use soconnectat() unconditionally in kern_connect()
Mark Johnston [Fri, 27 Aug 2021 12:32:07 +0000 (08:32 -0400)]
connect: Use soconnectat() unconditionally in kern_connect()

soconnect(...) is equivalent to soconnectat(AT_FDCWD, ...), so rely on
this to save a branch.  No functional change intended.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation

2 years agotcp: Remove unused v6 state definitions
Mark Johnston [Fri, 27 Aug 2021 12:31:32 +0000 (08:31 -0400)]
tcp: Remove unused v6 state definitions

These are supposedly for compatibility with KAME, but they are
completely unused in our tree and don't exist in OpenBSD or NetBSD.

Reviewed by: kbowling, bz, gnn
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D31700

2 years agollvm/powerpc64*: fix broken binaries generated by clang12
Alfredo Dal'Ava Junior [Fri, 27 Aug 2021 14:47:11 +0000 (11:47 -0300)]
llvm/powerpc64*: fix broken binaries generated by clang12

Amends LLVM commit 2518433f861fcb877d0a7bdd9aec1aec1f77505a that
was pointed as the source of regression on LLVM12.

This affects powerpc64*, making binaries crash with segmentation fault
due to bad code generation around "__stack_chk_guard"

Root cause and/or proper fix is under investigation by:
    https://bugs.llvm.org/show_bug.cgi?id=51590

Reviewed by:    dim
MFC after:      2 days
Sponsored by:   Instituto de Pesquisas Eldorado (eldorado.org.br)
Differential Revision:  https://reviews.freebsd.org/D31698

2 years agolibarchive: import bugfix from upstream
Martin Matuska [Fri, 27 Aug 2021 10:51:01 +0000 (12:51 +0200)]
libarchive: import bugfix from upstream

Reworked bugfix for upstream issue #1566:
  Do not follow symlinks when processing the fixup list

MFC after: 2 weeks

2 years agovendor/libarchive: cherry-pick 8a1bd5c18 from upstream
Martin Matuska [Fri, 27 Aug 2021 10:36:49 +0000 (12:36 +0200)]
vendor/libarchive: cherry-pick 8a1bd5c18 from upstream

Reworked fix for upstream issue #1566:
  Processing fixup entries may follow symbolic links

Obtained from: libarchive
Libarchive commit: 8a1bd5c18e896f0411a991240ce0d772bb02c840

2 years agolibc/posix1e: Add acl_extended_file_np() function.
Gleb Popov [Fri, 12 Mar 2021 08:52:58 +0000 (11:52 +0300)]
libc/posix1e: Add acl_extended_file_np() function.

Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255

2 years agotests/sys/acl: Add ATF C test for newly added acl_* functions.
Gleb Popov [Sat, 23 Jan 2021 10:00:47 +0000 (14:00 +0400)]
tests/sys/acl: Add ATF C test for newly added acl_* functions.

Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255

2 years agoFix build of bin/getfacl after libc changes.
Gleb Popov [Wed, 20 Jan 2021 09:47:44 +0000 (13:47 +0400)]
Fix build of bin/getfacl after libc changes.

Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255

2 years agolibc/posix1e: Add acl_equiv_mode_np() function.
Gleb Popov [Tue, 19 Jan 2021 18:05:57 +0000 (22:05 +0400)]
libc/posix1e: Add acl_equiv_mode_np() function.

Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255

2 years agolibc/posix1e: Add acl_cmp_np() function.
Gleb Popov [Tue, 19 Jan 2021 15:26:19 +0000 (19:26 +0400)]
libc/posix1e: Add acl_cmp_np() function.

Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255

2 years agolibc/posix1e: Add acl_from_mode_np() function.
Gleb Popov [Tue, 19 Jan 2021 15:25:07 +0000 (19:25 +0400)]
libc/posix1e: Add acl_from_mode_np() function.

Reviewed by: kib, debdrup, gbe
Approved by: kib
Differential Revision: https://reviews.freebsd.org/D28255

2 years agoinet6(4): add a missing IPPROTO_ETHERIP entry
Hiroki Sato [Fri, 27 Aug 2021 08:14:35 +0000 (17:14 +0900)]
inet6(4): add a missing IPPROTO_ETHERIP entry

bridge(4) + gif(4) did not work when the outer protocol was IPv6.

Submitted by: Masahiro Kozuka
PR: 256820
MFC after: 3 days

2 years agonfsd: Add support for the NFSv4.2 Deallocate operation
Rick Macklem [Fri, 27 Aug 2021 01:14:11 +0000 (18:14 -0700)]
nfsd: Add support for the NFSv4.2 Deallocate operation

The recently added VOP_DEALLOCATE(9) VOP call allows
implementation of the Deallocate NFSv4.2 operation.

Since the Deallocate operation is a single succeed/fail
operation, the call to VOP_DEALLOCATE(9) loops so long
as progress is being made.  It calls maybe_yield()
between loop iterations to allow other processes
to preempt it.

Where RFC 7862 underspecifies behaviour, the code
is written to be Linux NFSv4.2 server compatible.

Reviewed by: khng
Differential Revision: https://reviews.freebsd.org/D31624

2 years agoAdd support for recording EC2 AMI Ids in SSM
Colin Percival [Fri, 27 Aug 2021 00:54:53 +0000 (17:54 -0700)]
Add support for recording EC2 AMI Ids in SSM

If SSMPREFIX is specified, AMI Ids will be recorded in the SSM
Parameter Store under the name
  ${SSMPREFIX}/${ARCH}/${FLAVOUR}/${ROOTFS}/${REVISION}/${BRANCH}
where ARCH is "amd64" or "arm64", FLAVOUR is "base" (but may have
other options in the future), ROOTFS is "ufs" (but may have other
options in the future), and REVISION and BRANCH have their normal
meanings.

FreeBSD will be using the public prefix "/aws/service/freebsd",
resulting in SSM Parameter names which look like
  /aws/service/freebsd/amd64/base/ufs/14.0/CURRENT

Relnotes: yes
Sponsored by: https://patreon.com/cperciva
MFC after: 2 weeks

2 years agopcib(4): Write window registers after resource adjustment
Alexander Motin [Fri, 27 Aug 2021 00:21:56 +0000 (20:21 -0400)]
pcib(4): Write window registers after resource adjustment

When adjusting resources we should write updated window base/limit into
the registers.  Without this newly added address range won't be routed
through the bridge properly.

Use MIN()/MAX() against current window base/limit to not shrink it on
the other side if the window is shared by several resources.

Align passed resource start/end to the set window granularity to keep
it properly aligned.  Currently this is mostly called by other bridges
having the same window alignment, but it may be change one day.

Reviewed by: jrtc27, jhb
MFC after: 1 week
Sponsored by: iXsystems, Inc.
Differential Revision:  https://reviews.freebsd.org/D31693

2 years agogoogletest: Silence warnings about deprecated implicit copy constructors
Dimitry Andric [Thu, 26 Aug 2021 20:06:49 +0000 (22:06 +0200)]
googletest: Silence warnings about deprecated implicit copy constructors

Our copy of googletest is rather stale, and causes a number of -Werror
warnings about implicit copy constructor definitions being deprecated,
because several classes have user-declared copy assignment operators.
Silence the warnings until we either upgrade or remove googletest.

MFC after: 3 days

2 years agoCleanup compiler warning flags in lib/libefivar/Makefile
Dimitry Andric [Thu, 26 Aug 2021 18:53:18 +0000 (20:53 +0200)]
Cleanup compiler warning flags in lib/libefivar/Makefile

There is no need to set -Wno-unused-parameter twice, and instead of
appending to CFLAGS, append to CWARNFLAGS instead. While here, add
-Wno-unused-but-set-variable for the sake of clang 13.0.0.

MFC after: 3 days

2 years agovfs: drop dedicated sysinit for mountlist_mtx
Mateusz Guzik [Thu, 26 Aug 2021 12:53:10 +0000 (14:53 +0200)]
vfs: drop dedicated sysinit for mountlist_mtx

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

2 years agonetinet: prevent NULL pointer dereference in in_aifaddr_ioctl()
Artem Khramov [Tue, 24 Aug 2021 14:26:35 +0000 (17:26 +0300)]
netinet: prevent NULL pointer dereference in in_aifaddr_ioctl()

It appears that maliciously crafted ifaliasreq can lead to NULL
pointer dereference in in_aifaddr_ioctl(). In order to replicate
that, one needs to

1. Ensure that carp(4) is not loaded

2. Issue SIOCAIFADDR call setting ifra_vhid field of the request
   to a negative value.

A repro code would look like this.

int main() {
    struct ifaliasreq req;
    struct sockaddr_in sin, mask;
    int fd, error;

    bzero(&sin, sizeof(struct sockaddr_in));
    bzero(&mask, sizeof(struct sockaddr_in));

    sin.sin_len = sizeof(struct sockaddr_in);
    sin.sin_family = AF_INET;
    sin.sin_addr.s_addr = inet_addr("192.168.88.2");

    mask.sin_len = sizeof(struct sockaddr_in);
    mask.sin_family = AF_INET;
    mask.sin_addr.s_addr = inet_addr("255.255.255.0");

    fd = socket(AF_INET, SOCK_DGRAM, 0);
    if (fd < 0)
        return (-1);

    memset(&req, 0, sizeof(struct ifaliasreq));
    strlcpy(req.ifra_name, "lo0", sizeof(req.ifra_name));
    memcpy(&req.ifra_addr, &sin, sin.sin_len);
    memcpy(&req.ifra_mask, &mask, mask.sin_len);
    req.ifra_vhid = -1;

    return ioctl(fd, SIOCAIFADDR, (char *)&req);
}

To fix, discard both positive and negative vhid values in
in_aifaddr_ioctl, if carp(4) is not loaded. This prevents NULL pointer
dereference and kernel panic.

Reviewed by: imp@
Pull Request: https://github.com/freebsd/freebsd-src/pull/530

2 years agoHyper-V: hn: Enter network epoch when required
Michael Tuexen [Thu, 26 Aug 2021 17:27:04 +0000 (19:27 +0200)]
Hyper-V: hn: Enter network epoch when required

PR: 254695

2 years agoamd64: remove lfence after swapgs on syscall entry
Konstantin Belousov [Wed, 25 Aug 2021 19:28:57 +0000 (22:28 +0300)]
amd64: remove lfence after swapgs on syscall entry

According to the description of SBSS issue at
https://software.intel.com/content/www/us/en/develop/articles/software-security-guidance/technical-documentation/speculative-behavior-swapgs-and-segment-registers.html
lfence after swapgs is needed only for the case when swapgs could be
speculatively executed.  Since syscall entry, unlike exception and
interrupt entries, executes swapgs unconditionally, there is no
opportunity for speculation.

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

2 years agosound(4): Fix some common typos in comments
Gordon Bergling [Thu, 26 Aug 2021 15:15:55 +0000 (17:15 +0200)]
sound(4): Fix some common typos in comments

- s/doens't/doesn't/
- s/apropriate/appropriate/
- s/intepretation/interpretation/

MFC after: 5 days

2 years agovfs: refactor kern_unmount
Mateusz Guzik [Thu, 26 Aug 2021 11:49:41 +0000 (13:49 +0200)]
vfs: refactor kern_unmount

Split unmounting by path and id in preparation for other changes.

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

2 years agovfs: stop open-coding vfs_getvfs in kern_unmount
Mateusz Guzik [Thu, 26 Aug 2021 08:29:47 +0000 (10:29 +0200)]
vfs: stop open-coding vfs_getvfs in kern_unmount

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

2 years agoipfw_nat64: fix direct output mode
Andrey V. Elsukov [Thu, 26 Aug 2021 10:48:23 +0000 (13:48 +0300)]
ipfw_nat64: fix direct output mode

In nat64_find_route[46] handle NHF_GATEWAY flag and use destination
address from next hop to do link layer address lookup.

PR: 255928
Reviewed by: melifaro
Obtained from: Yandex LLC
MFC after: 1 week
Sponsored by: Yandex LLC
Differential Revision: https://reviews.freebsd.org/D31680

2 years agoichwd: add Lewisburg Super SKUs, Cannon and Comet Lake support
Paweł Anikiel [Fri, 30 Jul 2021 08:57:28 +0000 (10:57 +0200)]
ichwd: add Lewisburg Super SKUs, Cannon and Comet Lake support

Cannon and Comet Lake PCHs have their PMC hidden, so when reading
the ACPI Base Address fails, we assume a default value.

Obtained from: Semihalf
Sponsored by: Stormshield

2 years agopf tests: Test ALTQ on top of if_bridge
Kristof Provost [Wed, 25 Aug 2021 09:08:38 +0000 (11:08 +0200)]
pf tests: Test ALTQ on top of if_bridge

Reviewed by: donner
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31676

2 years agoif_bridge: add ALTQ support
Luiz Otavio O Souza [Wed, 25 Aug 2021 09:07:44 +0000 (11:07 +0200)]
if_bridge: add ALTQ support

Similar to the recent addition of ALTQ support to if_vlan.

Reviewed by: donner
Obtained from: pfsense
MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D31675

2 years agopf tests: ALTQ priority test
Kristof Provost [Thu, 26 Aug 2021 08:25:57 +0000 (10:25 +0200)]
pf tests: ALTQ priority test

Test that ALTQ can prioritise one type of traffic over another. Do this
by establishing a slow link and saturating it with ICMP echos.
When prioritised TCP connections reliably go through. When not
prioritised TCP connections reliably fail.

MFC after: 1 week
Sponsored by: Rubicon Communications, LLC ("Netgate")