]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
12 months agozfs: merge openzfs/zfs@a9d6b0690
Martin Matuska [Wed, 28 Jun 2023 23:39:19 +0000 (01:39 +0200)]
zfs: merge openzfs/zfs@a9d6b0690

Notable upstream pull request merges:
  #14925 Another set of vdev queue optimizations
  #14964 Use big transactions for small recordsize writes
  #14999 ZIL: Fix another use-after-free

Obtained from: OpenZFS
OpenZFS commit: a9d6b0690b1863f39a7efce08b1227f2e9e26abb

12 months agonewfs: nextnum should be a u_int32_t, not an int
Alfonso Gregory [Wed, 28 Jun 2023 22:20:33 +0000 (16:20 -0600)]
newfs: nextnum should be a u_int32_t, not an int

The function that uses nextnum expects to return a u_int32_t, not a mere
int, so let's make nextnum a u_int32_t instead.

Note: retained current u_int32_t style, since the rest of the file uses
it.

Reviewed by: imp, mckusick
Pull Request: https://github.com/freebsd/freebsd-src/pull/734

12 months agonewfs: prefer unsigned index over signed
Alfonso Gregory [Wed, 28 Jun 2023 22:14:07 +0000 (16:14 -0600)]
newfs: prefer unsigned index over signed

We can just use a for loop starting at 0 instead of a while loop
starting at -1.

Reviewed by: imp, mckusick
Pull Request: https://github.com/freebsd/freebsd-src/pull/733

12 months agoatkbdc: Minor style nits
Warner Losh [Wed, 28 Jun 2023 18:00:46 +0000 (12:00 -0600)]
atkbdc: Minor style nits

'char* ' -> 'char *', per style(9)

Sponsored by: Netflix

12 months agoarm64: Make register definitions const
Mark Johnston [Wed, 28 Jun 2023 20:13:37 +0000 (16:13 -0400)]
arm64: Make register definitions const

No functional change intended.

Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc. (hardware)
Differential Revision: https://reviews.freebsd.org/D40502

12 months agoarm64: Add a masked get_kernel_reg()
Mark Johnston [Wed, 28 Jun 2023 20:12:47 +0000 (16:12 -0400)]
arm64: Add a masked get_kernel_reg()

This lets consumers fetch the value of a system register and apply a
mask over individual fields.  That is, each field in the returned value
will be the "smaller" of the two provided by "mask" and the value saved
in kern_cpu_desc.  This will be used by vmm to sanitize host system
register fields.

Reviewed by: andrew
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Sponsored by: Klara, Inc. (hardware)
Differential Revision: https://reviews.freebsd.org/D40500

12 months agoctfconvert: Integer encoding types are unsigned
Mark Johnston [Tue, 6 Jun 2023 17:28:02 +0000 (13:28 -0400)]
ctfconvert: Integer encoding types are unsigned

Before this change, encodings in the user-defined range were being
sign-extended.

MFC after: 1 week
Sponsored by: Innovate UK

12 months agobhyve: Rename a pci_cfgrw() parameter
Mark Johnston [Wed, 28 Jun 2023 20:06:37 +0000 (16:06 -0400)]
bhyve: Rename a pci_cfgrw() parameter

pci_cfgrw() may be called via a write to the extended config space,
which is memory-mapped.  In this case, the name "eax" is misleading.
Give it a more generic name.  No functional change intended.

Reviewed by: corvink, jhb
MFC after: 1 week
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40732

12 months agobhyve: Stop calling pci_lintr_request() in the NVMe device model
Mark Johnston [Wed, 28 Jun 2023 20:06:21 +0000 (16:06 -0400)]
bhyve: Stop calling pci_lintr_request() in the NVMe device model

The device model effectively assumes that MSI-X is enabled (it never
asserts the legacy interrupt), so any guest which relies on being able
to use the legacy PCI interrupt will fail.

The WIP arm64 port does not implement legacy PCI interrupts, but NVMe
emulation is potentially useful there.  Simply remove the call.

Reviewed by: corvink, chuck, jhb
Tested by: chuck
MFC after: 1 month
Sponsored by: Innovate UK
Differential Revision: https://reviews.freebsd.org/D40731

12 months agobsd.sys.mk: Re-enable -Wunused-but-set-variable for clang 13+.
John Baldwin [Wed, 28 Jun 2023 19:27:43 +0000 (12:27 -0700)]
bsd.sys.mk: Re-enable -Wunused-but-set-variable for clang 13+.

Reviewed by: dim, emaste
Differential Revision: https://reviews.freebsd.org/D40674

12 months agologin.conf: document how to specify env var values with commas
Ed Maste [Wed, 28 Jun 2023 18:50:49 +0000 (14:50 -0400)]
login.conf: document how to specify env var values with commas

As of f32db406504e quotes may be used to specify login class
capabilities that include commas.  This is true in general but is
particularly relevant for setenv, a comma-separated list of environment
variables and values, so mention it there.

PR: 236204
Sponsored by: The FreeBSD Foundation

12 months agobsd.sys.mk: Stop muting -Wunused-but-set-variable for GCC.
John Baldwin [Wed, 28 Jun 2023 18:13:58 +0000 (11:13 -0700)]
bsd.sys.mk: Stop muting -Wunused-but-set-variable for GCC.

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

12 months agocamdd: Remove some dead code but also make -E functional.
John Baldwin [Wed, 28 Jun 2023 18:12:50 +0000 (11:12 -0700)]
camdd: Remove some dead code but also make -E functional.

- Pass down the top-level arglist from main down to camdd_rw and use
  it in place of the hardcoded CAMDD_ARG_ERR_RECOVER when calling
  camdd_probe_pass.  This now disables error recovery by default
  unless -E is specified.

- Use the return value of parse_btl to determine if an explicit LUN
  was specified.

- Remove most CAMDD_ARG_* flags that are only set and never checked.
  CAMDD_ARG_VERBOSE remains, but could perhaps be removed (and possibly
  -v should be removed as well since it is currently a no-op).

Reported by: clang -Wunused-but-set-variable (arglist in main)
Differential Revision: https://reviews.freebsd.org/D40666

12 months agobsdinstall: Handle errors from geom_gettree.
John Baldwin [Wed, 28 Jun 2023 18:11:00 +0000 (11:11 -0700)]
bsdinstall: Handle errors from geom_gettree.

geom_gettree probably never fails, and if it does there isn't much of
a fallback other than aborting partitioning.  However, a few places
were checking the return value and not doing anything with it
triggering a unused-but-set-variable warning.  Checking the errors
resolves the warning.

While here, check for errors in other places that weren't checking for
them at all, remove a spurious double call (the second call overwrote
the mesh structure leaking all the pointers from the first), and close
a few resource leaks on error paths.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D40779

12 months agomrsas: Use mrsas_sge64 instead of iovec for the S/G list for passthru.
John Baldwin [Wed, 28 Jun 2023 18:10:05 +0000 (11:10 -0700)]
mrsas: Use mrsas_sge64 instead of iovec for the S/G list for passthru.

The DMA scatter/gather list for mrsas passthrough ioctl commands is
stored in a SGL at the end of the DCMD frame.  Given the SGL member at
the end of the DCMD frame it seems likely this S/G list is formatted
as a fixed-width structure such as the type mrsas_sge64 and not as a
iovec which contains a kernel pointer and length that vary with the
native architecture size.

Reviewed by: imp
Obtained from: CheriBSD
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D40727

12 months agoarm64 pmap: Tidy up pmap_promote_l2() calls
Alan Cox [Wed, 28 Jun 2023 07:08:02 +0000 (02:08 -0500)]
arm64 pmap: Tidy up pmap_promote_l2() calls

Since pmap_ps_enabled() is true by default, check it inside of
pmap_promote_l2() instead of at every call site.

Modify pmap_promote_l2() to return true if the promotion succeeded and
false otherwise.

(A similar change was applied to the amd64 pmap in 0d2f98c2f092.)

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D40781

12 months agoAdds support for Purism coreboot keyboards
Jon Hopper [Wed, 28 Jun 2023 17:04:46 +0000 (11:04 -0600)]
Adds support for Purism coreboot keyboards

On Purism coreboot systems the quirks mode in atkbdc prevents built in
Keyboard from being used. Add quirk to prevent that.

MFC After: 2 weeks
PR: 271737
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D40405

12 months agoContinue searching for an irq map from the start
Andrew Turner [Tue, 27 Jun 2023 08:32:12 +0000 (09:32 +0100)]
Continue searching for an irq map from the start

When searching for a free irq map location continue the search from the
beginning of the list. There may be holes in the map before
irq_map_first_free_idx, e.g. when removing an entries in order will
increase the index past the current free entry.

PR: 271990
Reviewed by: mhorne
Sponsored by: Arm Ltd

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

12 months agoHide irq_next_free, it's not used out of this file
Andrew Turner [Tue, 27 Jun 2023 08:31:34 +0000 (09:31 +0100)]
Hide irq_next_free, it's not used out of this file

 Reviewed by: mhorne
Sponsored by: Arm Ltd
Differential Revision: https://reviews.freebsd.org/D40767

12 months agoAdd quotes around variables and replace backticks with $()
Benedict Reuschling [Wed, 28 Jun 2023 16:48:39 +0000 (16:48 +0000)]
Add quotes around variables and replace backticks with $()

The quotes are added to prevent word splits and globbing. Some
whitespaces were also removed after variables.

Approved by: imp
Differential Revision: https://reviews.freebsd.org/D40726

12 months agohier(7): tweak /media description
Mitchell Horne [Wed, 28 Jun 2023 16:21:28 +0000 (13:21 -0300)]
hier(7): tweak /media description

It comes as an empty directory by default. While here, use a serial
(Oxford) comma, per the FDP Primer.

PR: 261349
Reported by: karels
Reviewed by: grahamperrin, karels
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40774

12 months agotcp: With the right options in the kernel cc_cubic stays in slowstart always.
Randall Stewart [Wed, 28 Jun 2023 15:18:47 +0000 (11:18 -0400)]
tcp: With the right options in the kernel cc_cubic stays in slowstart always.

So this is a subtle bug I have found in cubic. If you compile a number of options into the kernel (accounting and tracking) then
all of the kernel code "knows" the proper offset of t_rttupdatecnt however cubic does not see the options (and htcp too) and thus
will look for the count in the wrong place seeing 0. Which then means it never builds an MIN RTT which then means it
always hangs in slowstart.

The solution is to put all options that effect tcpcb size into the opt_global.h so that the kernel
has a consistent view of the tcpcb size.

Reviewed by: tuexen, rscheff
Sponsored by: Netflix Inc
Differential Revision:https://reviews.freebsd.org/D40761

12 months agocarp: use nd6log() macro to log debug messages
Andrey V. Elsukov [Wed, 28 Jun 2023 10:27:37 +0000 (13:27 +0300)]
carp: use nd6log() macro to log debug messages

Obtained from: Yandex LLC
Sponsored by: Yandex LLC

12 months agobectl(8): clarifications, expansion
Graham Perrin [Wed, 28 Jun 2023 02:05:26 +0000 (03:05 +0100)]
bectl(8): clarifications, expansion

Reviewed-by: imp
Pull-request: https://github.com/freebsd/freebsd-src/pull/728

12 months agoLinuxKPI: list.h add list_count_nodes()
Bjoern A. Zeeb [Mon, 26 Jun 2023 08:45:17 +0000 (08:45 +0000)]
LinuxKPI: list.h add list_count_nodes()

Implement list_count_nodes() using a simple loop.  This is needed by
an updated wireless driver.

Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D40757

12 months agoZIL: Fix another use-after-free.
Alexander Motin [Wed, 28 Jun 2023 00:03:37 +0000 (20:03 -0400)]
ZIL: Fix another use-after-free.

lwb->lwb_issued_txg can not be accessed after lwb_state is set to
LWB_STATE_FLUSH_DONE and zl_lock is dropped, since the lwb may be
freed by zil_sync().  We must save the txg number before that.

This is similar to the 55b1842f92, but as I see the bug is not new.
It existed for quite a while, just was not triggered due to smaller
race window.

Reviewed-by: Allan Jude <allan@klarasystems.com>
Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14988
Closes #14999

12 months agoUse big transactions for small recordsize writes.
Alexander Motin [Wed, 28 Jun 2023 00:00:30 +0000 (20:00 -0400)]
Use big transactions for small recordsize writes.

When ZFS appends files in chunks bigger than recordsize, it borrows
buffer from ARC and fills it before opening transaction.  This
supposed to help in case of page faults to not hold transaction open
indefinitely.  The problem appears when recordsize is set lower than
default 128KB. Since each block is committed in separate transaction,
per-transaction overhead becomes significant, and what is even worse,
active use of of per-dataset and per-pool locks to protect space use
accounting for each transaction badly hurts the code SMP scalability.
The same transaction size limitation applies in case of file rewrite,
but without even excuse of buffer borrowing.

To address the issue, disable the borrowing mechanism if recordsize
is smaller than default and the write request is 4x bigger than it.
In such case writes up to 32MB are executed in single transaction,
that dramatically reduces overhead and lock contention.  Since the
borrowing mechanism is not used for file rewrites, and it was never
used by zvols, which seem to work fine, I don't think this change
should create significant problems, partially because in addition to
the borrowing mechanism there are also used pre-faults.

My tests with 4/8 threads writing several files same time on datasets
with 32KB recordsize in 1MB requests show reduction of CPU usage by
the user threads by 25-35%.  I would measure it in GB/s, but at that
block size we are now limited by the lock contention of single write
issue taskqueue, which is a separate problem we are going to work on.

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14964

12 months agoRemove unnecessary commas in zpool-create.8
Laevos [Tue, 27 Jun 2023 23:58:32 +0000 (16:58 -0700)]
Remove unnecessary commas in zpool-create.8

Reviewed-by: Brian Atkinson <batkinson@lanl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Laevos <5572812+Laevos@users.noreply.github.com>
Closes #15011

12 months agoGeneralise libcompat to be a list rather than a single option
Jessica Clarke [Tue, 27 Jun 2023 23:10:49 +0000 (00:10 +0100)]
Generalise libcompat to be a list rather than a single option

Whilst the kernel can support any number of COMPAT_FOO, world can only
build a single libfoo. Upstream this isn't such an issue, since the only
option is lib32 anyway, but downstreams, such as CheriBSD, may wish to
support multiple at the same time. Thus, adjust the top-level Makefiles
to turn _LIBCOMPAT into a _LIBCOMPATS list that gets iterated over, and
adjust bsd.compat.mk to support this use-case.

For the normal NEED_COMPAT/WANT_COMPAT case, LIBCOMPATFOO remain set and
refer to the requested compat's, preserving the current interface. For
the top-level Makefiles those variables are no longer set (since there
is no longer "the" compat) and only the per-compat ones are available.

Reviewed by: brooks, jhb, imp
Differential Revision: https://reviews.freebsd.org/D40571

12 months agoMakefile.libcompat: Handle MK_FOO varying for native and compat arches
Jessica Clarke [Tue, 27 Jun 2023 23:10:30 +0000 (00:10 +0100)]
Makefile.libcompat: Handle MK_FOO varying for native and compat arches

Currently Makefile.libcompat queries a few MK_FOO variables to determine
what is being built. However, it is plausible (and indeed, downstream
in CheriBSD, this is the case) that these may vary between the native
and the compat architecture. In order to correctly determine their
values for the compat architecture, we need to defer their evaluation
until we are in the compat sub-make where src.opts.mk will give us the
right value for the compat MACHINE_ARCH.

Reviewed by: brooks, jhb, imp
Obtained from: CheriBSD
Differential Revision: https://reviews.freebsd.org/D40570

12 months agoMakefile.libcompat: Remove unused _LC_INCDIRS
Jessica Clarke [Tue, 27 Jun 2023 23:09:44 +0000 (00:09 +0100)]
Makefile.libcompat: Remove unused _LC_INCDIRS

This is no longer referenced as of commit 724123b9f4d3 ("libcompat: Use
WORLDTMP sysroot").

Reviewed by: brooks, jhb, imp
Differential Revision: https://reviews.freebsd.org/D40569

12 months agousb: Fixed botched spacing
Jessica Clarke [Tue, 27 Jun 2023 23:07:54 +0000 (00:07 +0100)]
usb: Fixed botched spacing

Fixes: d3a83456e1e3 ("Add vendor id for Quectel USB modem and align with quectel marketing names.")

12 months agoAdd vendor id for Quectel USB modem and align with quectel marketing names.
Gabriele Laganà [Tue, 27 Jun 2023 22:35:18 +0000 (16:35 -0600)]
Add vendor id for Quectel USB modem and align with quectel marketing names.

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

12 months agovfs: bring vfs_lookup() description comment up to date
Igor Ostapenko [Tue, 27 Jun 2023 22:31:50 +0000 (16:31 -0600)]
vfs: bring vfs_lookup() description comment up to date

Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/737

12 months agovfs: fix description comment of vfs_lookup()
Igor Ostapenko [Tue, 27 Jun 2023 22:31:50 +0000 (16:31 -0600)]
vfs: fix description comment of vfs_lookup()

Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Reviewed by: imp, mhorne
Pull Request: https://github.com/freebsd/freebsd-src/pull/737

12 months agoifconfig: skip calling fnmatch once the result no longer matters
Alfonso Gregory [Tue, 27 Jun 2023 22:18:55 +0000 (16:18 -0600)]
ifconfig: skip calling fnmatch once the result no longer matters

Because fnmatch has no side effects, we can safely avoid calling fnmatch
if the end result does not matter anyway (the compiler cannot see this,
so it calls fnmatch in the event it has side-effects).

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

12 months agovm_fault: move FAULT_* return codes out of range for Mach errors
Konstantin Belousov [Tue, 27 Jun 2023 11:41:14 +0000 (14:41 +0300)]
vm_fault: move FAULT_* return codes out of range for Mach errors

This way a possible clash between FAULT_* and KERN_* numbering is
avoided, and panics checks for fault_status confusion become more
efficient.

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

12 months agoMerge bmake-20230622
Simon J. Gerraty [Tue, 27 Jun 2023 20:38:02 +0000 (13:38 -0700)]
Merge bmake-20230622

Merge commit '3e39ce563b9ba25883e5aa37d9799eda9e57c1e0'

12 months agoImport bmake-20230622
Simon J. Gerraty [Tue, 27 Jun 2023 20:29:43 +0000 (13:29 -0700)]
Import bmake-20230622

Relevant/interesting changes:

o optimize string matching for ':M' and ':N'
o warn about malformed patterns in ':M', ':N' and '.if make(...)'
o allow guards to be targets as well as variables
The guard targets may include variable references like
__${.PARSEDIR:tA}/${.PARSEFILE}__
o optimization for makefiles protected from multiple-inclusion
skip even opening the file after first include.
o var.c: do not allow delete of readOnly variable
o parse.c: .break takes no args

12 months agohier(7): fix inline markup for a variable
Graham Perrin [Tue, 27 Jun 2023 19:22:32 +0000 (20:22 +0100)]
hier(7): fix inline markup for a variable

I mistakenly preceded macro  Va  with macro  It  in
https://github.com/freebsd/freebsd-src/pull/763/commits/8ff26f2cb5c0d69cce319e1ac1f792ea4245445a

https://bugs.freebsd.org/261349

PR:                      261349
Approved by:             emaste, imp, mhorne
Fixes: 6469f9c hier(7): improvement, modernisation
12 months agosystat: Chase 70ea484e3ec5, removing vdev_cache
Cy Schubert [Fri, 23 Jun 2023 05:01:25 +0000 (22:01 -0700)]
systat: Chase 70ea484e3ec5, removing vdev_cache

As of 70ea484e3ec5 vdev_cache has been removed. Stop reporting on it.
Without this systat reports:

sysctl(kstat.zfs.misc.vdev_cache_stats.misses...) failed:
No such file or directory

Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D40742

12 months agoradix_trie: pass fewer params to node_get
Doug Moore [Tue, 27 Jun 2023 17:21:11 +0000 (12:21 -0500)]
radix_trie: pass fewer params to node_get

Let node_get calculate it's own owner value. Don't pass the count
parameter, since it's always 2. Save 16 bytes in insert(). Move,
without modifying, slot and trimkey to handle use-before-declaration
problem.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D40723

12 months agoldns: Remove a set but unused variable.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
ldns: Remove a set but unused variable.

Reviewed by: des
Differential Revision: https://reviews.freebsd.org/D40695

12 months agoefi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
efi loader: Move 'module' variable under #ifdef MODINFOMD_MODULEP.

This quiets a set but unused warning on platforms without this module
info such as aarch64.

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

12 months agolibbsnmptools: Fully comment out set but unused count variable.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
libbsnmptools: Fully comment out set but unused count variable.

These functions all end with 'return (2/* count */);'.

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

12 months agoxo: Disable -Wunused-but-set-variable.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
xo: Disable -Wunused-but-set-variable.

Presumably these warnings will be fixed upstream at some point.

contrib/libxo/xo/xo.c:99:9: error: variable 'hflag' set but not used [-Werror,-Wunused-but-set-variable]
    int hflag = 0, jflag = 0, tflag = 0,
        ^
contrib/libxo/xo/xo.c:99:20: error: variable 'jflag' set but not used [-Werror,-Wunused-but-set-variable]
    int hflag = 0, jflag = 0, tflag = 0,
                   ^
contrib/libxo/xo/xo.c:99:31: error: variable 'tflag' set but not used [-Werror,-Wunused-but-set-variable]
    int hflag = 0, jflag = 0, tflag = 0,
                              ^
contrib/libxo/xo/xo.c:100:2: error: variable 'zflag' set but not used [-Werror,-Wunused-but-set-variable]
        zflag = 0, qflag = 0, star1 = 0, star2 = 0;
        ^
contrib/libxo/xo/xo.c:100:13: error: variable 'qflag' set but not used [-Werror,-Wunused-but-set-variable]
        zflag = 0, qflag = 0, star1 = 0, star2 = 0;
                   ^

Reviewed by: sjg
Differential Revision: https://reviews.freebsd.org/D40668

12 months agoipf: Remove set but unused variables.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
ipf: Remove set but unused variables.

Reported by: clang
Differential Revision: https://reviews.freebsd.org/D40667

12 months agoncurses: Silence -Wunused-but-set-variable for various files.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
ncurses: Silence -Wunused-but-set-variable for various files.

Presumably these will be fixed upstream eventually.

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

12 months agohyperv/kvp: Remove set but unused variables.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
hyperv/kvp: Remove set but unused variables.

Reported by: GCC
Reviewed by: Souradeep Chakrabarti <schakrabarti@microsoft.com>
Differential Revision: https://reviews.freebsd.org/D40660

12 months agobsdinstall: Replace correct, but fragile, string builder with open_memstream.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
bsdinstall: Replace correct, but fragile, string builder with open_memstream.

The old one triggered a false positive -Warray-bounds from GCC (the
compiler assumed len was always 0), but it was also fragile with
manually computed lengths paired with strcat vs using a string
builder.

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

12 months agoipfw: Remove set but unused variables.
John Baldwin [Tue, 27 Jun 2023 17:19:32 +0000 (10:19 -0700)]
ipfw: Remove set but unused variables.

Reported by: GCC
Differential Revision: https://reviews.freebsd.org/D40654

12 months agolibipf: Remove set but unused variable from printfraginfo().
John Baldwin [Tue, 27 Jun 2023 17:19:31 +0000 (10:19 -0700)]
libipf: Remove set but unused variable from printfraginfo().

Reported by: GCC
Differential Revision: https://reviews.freebsd.org/D40652

12 months agolibefivar: Use a void cast in unimplemented stubs.
John Baldwin [Tue, 27 Jun 2023 17:19:31 +0000 (10:19 -0700)]
libefivar: Use a void cast in unimplemented stubs.

This "consumes" an otherwise unused argument.

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

12 months agoriscv: Remove MACHINE_ARCH-specific remnants of riscv64sf.
John Baldwin [Tue, 27 Jun 2023 17:19:31 +0000 (10:19 -0700)]
riscv: Remove MACHINE_ARCH-specific remnants of riscv64sf.

- Remove now unnecessary MACHINE_ARCHES definition.  The default logic
  in kern_mib.c works fine now for RISC-V.

- Remove custom sv_machine_arch hook from sysentvec.

Fixes: 1ca12bd927d7 Remove the riscv64sf architecture.
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D40648

12 months agoopenzfs: Remove broken symlinks
Warner Losh [Tue, 27 Jun 2023 17:11:03 +0000 (11:11 -0600)]
openzfs: Remove broken symlinks

These symlinks are broken. They point to files that don't exist, and
rely on having them be built using a 'in-tree' build that FreeBSD
doesn't use. They also show up as errors on grep -r. Since they are
broken and can't possibly work, remove them for now since non-functional
symlinks matching an upstrem repo that can't work in our repo aren't
worth the error messages.

Though one could argue the whole debian directory should be removed, I
did the minimal change necessary. These can return when the fundamental
issue is fixed and the contrib/debian tree is useful on FreeBSD systems.

12 months agonvme: Fix typo in "Command Aborted by Host" constant name.
John Baldwin [Tue, 27 Jun 2023 17:06:22 +0000 (10:06 -0700)]
nvme: Fix typo in "Command Aborted by Host" constant name.

Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D40763

12 months agoUpgrade to OpenPAM Ximenia.
Dag-Erling Smørgrav [Tue, 27 Jun 2023 17:03:17 +0000 (19:03 +0200)]
Upgrade to OpenPAM Ximenia.

Merge commit '5894a4142a9d5ae5f7f6bee1f46237a3d20d0b5b'

12 months agoVendor import of OpenPAM Ximenia.
Dag-Erling Smørgrav [Tue, 27 Jun 2023 17:01:49 +0000 (19:01 +0200)]
Vendor import of OpenPAM Ximenia.

12 months agoradix_trie: clean up overlong lines
Doug Moore [Tue, 27 Jun 2023 16:59:12 +0000 (11:59 -0500)]
radix_trie: clean up overlong lines

This is purely a cosmetic change. vm_radix.c has lines that reach past
column 80 and this change cleans that up. The associated changes to
subr_pctrie.c are just to keep mirroring vm_radix.c.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D40764

12 months agounzip(1): Comma after e.g.
Warner Losh [Tue, 27 Jun 2023 16:58:40 +0000 (10:58 -0600)]
unzip(1): Comma after e.g.

Add comma after e.g. to make igor happy (oh, and I suppose to conform to
normal English grammar rules).

Sponsored by: Netflix

12 months agounzip: add -O/-I encoding support
Mingye Wang [Tue, 27 Jun 2023 16:54:12 +0000 (10:54 -0600)]
unzip: add -O/-I encoding support

These are for compatibility with the info-zip version of unzip.

PR: 271657
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/752

12 months agoAnother set of vdev queue optimizations.
Alexander Motin [Tue, 27 Jun 2023 16:09:48 +0000 (12:09 -0400)]
Another set of vdev queue optimizations.

Switch FIFO queues (SYNC/TRIM) and active queue of vdev queue from
time-sorted AVL-trees to simple lists.  AVL-trees are too expensive
for such a simple task.  To change I/O priority without searching
through the trees, add io_queue_state field to struct zio.

To not check number of queued I/Os for each priority add vq_cqueued
bitmap to struct vdev_queue.  Update it when adding/removing I/Os.
Make vq_cactive a separate array instead of struct vdev_queue_class
member.  Together those allow to avoid lots of cache misses when
looking for work in vdev_queue_class_to_issue().

Introduce deadline of ~0.5s for LBA-sorted queues.  Before this I
saw some I/Os waiting in a queue for up to 8 seconds and possibly
more due to starvation.  With this change I no longer see it.  I
had to slightly more complicate the comparison function, but since
it uses all the same cache lines the difference is minimal.  For a
sequential I/Os the new code in vdev_queue_io_to_issue() actually
often uses more simple avl_first(), falling back to avl_find() and
avl_nearest() only when needed.

Arrange members in struct zio to access only one cache line when
searching through vdev queues.  While there, remove io_alloc_node,
reusing the io_queue_node instead.  Those two are never used same
time.

Remove zfs_vdev_aggregate_trim parameter.  It was disabled for 4
years since implemented, while still wasted time maintaining the
offset-sorted tree of TRIM requests.  Just remove the tree.

Remove locking from txg_all_lists_empty().  It is racy by design,
while 2 pair of locks/unlocks take noticeable time under the vdev
queue lock.

With these changes in my tests with volblocksize=4KB I measure vdev
queue lock spin time reduction by 50% on read and 75% on write.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored by: iXsystems, Inc.
Closes #14925

12 months agoman(1): Support custom sections
Mohamed Akram [Tue, 27 Jun 2023 13:51:24 +0000 (07:51 -0600)]
man(1): Support custom sections

PR: 271830
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/764

12 months agolibpthread: allocate rwlocks and spinlocks in dedicated cachelines
Greg Becker [Tue, 27 Jun 2023 01:08:29 +0000 (20:08 -0500)]
libpthread: allocate rwlocks and spinlocks in dedicated cachelines

Reduces severe performance degradation due to false-sharing. Note that this
does not account for hardware which can perform adjacent cacheline prefetch.

[mjg: massaged the commit message and the patch to use aligned_alloc
instead of malloc]

PR: 272238
MFC after: 1 week

12 months agoVFS: Remove VV_READLINK flag
Konstantin Belousov [Wed, 21 Jun 2023 16:37:30 +0000 (19:37 +0300)]
VFS: Remove VV_READLINK flag

since its only reason to exist is removed.

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

12 months agofdescfs: improve linrdlnk mount option
Konstantin Belousov [Thu, 22 Jun 2023 13:30:59 +0000 (16:30 +0300)]
fdescfs: improve linrdlnk mount option

Instead of using VV_READLINK vnode flag and checking it in one place,
just assign VLNK type to the Fdesc vnodes for linrdlnk mounts.  Then all
places where symlinks needs to be followed, e.g. lookup(), are handled.

PR: 272127
Reported by: Peter Eriksson <pen@lysator.liu.se>
Reviewed by: markj
Tested by: pho
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D40700

12 months agorelease/azure: Update reference URL
Li-Wen Hsu [Tue, 27 Jun 2023 07:58:55 +0000 (15:58 +0800)]
release/azure: Update reference URL

Sponsored by: The FreeBSD Foundation

12 months agoradix_trie: skip compare in lookup_le, lookup_ge
Doug Moore [Tue, 27 Jun 2023 05:42:41 +0000 (00:42 -0500)]
radix_trie: skip compare in lookup_le, lookup_ge

In _lookup_ge, where a loop "looks for an available edge or val within
the current bisection node" (to quote the code comment), the value of
index has already been modified to guarantee that it is the least
value than can be found in the non-NULL child node being
examined. Therefore, if the non-NULL child is a leaf, there's no need
to compare 'index' to anything, and the value can just be returned.

The same is true for _lookup_le with 'most' replacing 'least'.
Reviewed by: alc
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D40746

12 months agovm: Fix anonymous memory clustering under ASLR
Alan Cox [Fri, 23 Jun 2023 17:00:32 +0000 (12:00 -0500)]
vm: Fix anonymous memory clustering under ASLR

By default, our ASLR implementation is supposed to cluster anonymous
memory allocations, unless the application's mmap(..., MAP_ANON, ...)
call included a non-zero address hint.  Unfortunately, clustering
never occurred because kern_mmap() always replaced the given address
hint when it was zero.  So, the ASLR implementation always believed
that a non-zero hint had been provided and randomized the mapping's
location in the address space.  To fix this problem, I'm pushing down
the point at which we convert a hint of zero to the minimum allocatable
address from kern_mmap() to vm_map_find_min().

Reviewed by: kib
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D40743

12 months agonvme_xpt: Tidy nvme_announce_periph for fabrics support.
John Baldwin [Tue, 27 Jun 2023 03:37:43 +0000 (20:37 -0700)]
nvme_xpt: Tidy nvme_announce_periph for fabrics support.

- Read the version from cts.protocol_version.

- Only check xport_specific.nvme for PCI-e info for XPORT_NVME.

Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D40618

12 months agocam_xpt: Properly fail if a sim uses an unsupported transport.
John Baldwin [Tue, 27 Jun 2023 03:33:25 +0000 (20:33 -0700)]
cam_xpt: Properly fail if a sim uses an unsupported transport.

The default xport ops for a new bus is xport_default, not NULL, so
check for that when determining if a bus failed to find a suitable
transport.  In addition, the path needs to be freed with xpt_free_path
instead of a plain free so that the path's reference on the sim is
dropped; otherwise, cam_sim_free in the caller after xpt_bus_register
returns failure will hang forever.

Note that we have to exempt the xpt bus from this check as it uses
xport_default on purpose.

Reviewed by: mav, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D40617

12 months agonvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS.
John Baldwin [Tue, 27 Jun 2023 03:32:29 +0000 (20:32 -0700)]
nvme: Tidy up transfer rate settings in XPT_GET_TRAN_SETTINGS.

- Replace a magic number with CTS_NVME_VALID_SPEC.

- Set the transport and protocol versions the same as for XPT_PATH_INQ.

Probably we shouldn't bother with setting the version in the 'spec'
member of ccb_trans_settings_nvme at all and use the transport
and/or protocol version field instead.

Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D40616

12 months agonvme: Don't install nvme_private.h in /usr/include.
John Baldwin [Tue, 27 Jun 2023 03:30:45 +0000 (20:30 -0700)]
nvme: Don't install nvme_private.h in /usr/include.

Reviewed by: chuck, imp
Sponsored by: Chelsio Communications
Differential Revision: https://reviews.freebsd.org/D40394

12 months agonetstat(1): Use simpler language
Tom Hukins [Mon, 26 Jun 2023 23:02:36 +0000 (17:02 -0600)]
netstat(1): Use simpler language

Reviewed by: imp, Mina Galić
Pull Request: https://github.com/freebsd/freebsd-src/pull/771

12 months agoloader.efi: Remove redundant error message
VexedUXR [Mon, 26 Jun 2023 22:57:28 +0000 (16:57 -0600)]
loader.efi: Remove redundant error message

efi_copy_init already prints an error message (with more information) if it fails.

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

12 months agonohup(1): link to a related manual page
Tom Hukins [Mon, 26 Jun 2023 22:34:03 +0000 (16:34 -0600)]
nohup(1): link to a related manual page

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

12 months agotimeout(1): link to related manual pages
Tom Hukins [Mon, 26 Jun 2023 22:34:03 +0000 (16:34 -0600)]
timeout(1): link to related manual pages

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

12 months agoAdd a delay to tearing down threads.
Rich Ercolani [Mon, 26 Jun 2023 20:57:12 +0000 (16:57 -0400)]
Add a delay to tearing down threads.

It's been observed that in certain workloads (zvol-related being a
big one), ZFS will end up spending a large amount of time spinning
up taskqs only to tear them down again almost immediately, then
spin them up again...

I noticed this when I looked at what my mostly-idle system was doing
and wondered how on earth taskq creation/destroy was a bunch of time...

So I added a configurable delay to avoid it tearing down tasks the
first time it notices them idle, and the total number of threads at
steady state went up, but the amount of time being burned just
tearing down/turning up new ones almost vanished.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
Closes #14938

12 months agorc.d/routing: Correct setting default gateway for each FIB
Andrew Fengler [Mon, 26 Jun 2023 18:40:21 +0000 (18:40 +0000)]
rc.d/routing: Correct setting default gateway for each FIB

There was a mistake in the previous commit, it used the incorrect
spelling of the FIB variable name and was not functional

Also corrects an issue with the IPv6 default route variable name.

Fixes: 30659d1dcbcc ("Add support for adding default routes for other FIBs")
Sponsored-by: ScaleEngine Inc.
Differential Revision: https://reviews.freebsd.org/D37685

12 months agosys/dev/ichsmb: Silence unhandled SMBALERT device_printfs
Reid Linnemann [Mon, 26 Jun 2023 08:25:26 +0000 (10:25 +0200)]
sys/dev/ichsmb: Silence unhandled SMBALERT device_printfs

The ichsmb driver does not actually handle SMBALERT, other than by logging the
first 16 occurences of the ICH_HST_STA_SMBALERT_STS_SMBALERT status
flag. Because the SMBALERT is not acknowledged by the host, clearing it in the
host status register does not appear to work as long as some slave device is
pulling the SMBALERT line low, at least for C2000 chips. As a result, if a slave
device does pull SMBALERT low the interrupt handler will always loop its maximum
of 16 times attempting to clear all status register flags and device_printf the
status register. The result is the kernel message buffer is littered with these
device_printfs at every interrupt.

To remedy the problem, the ICH_HST_STA_SMBALERT_STS flag is zeroed in the read
host status register value, just as with ICH_HST_STA_INUSE_STS and
ICH_HST_STA_HOST_BUSY. This allows the loop to break when no other flags that
must be handled are set in the host status register. Additionally, because the
SMBALERT is not actually handled the SMBALERT logging is omitted as it has no
actual function at this time.

Reviewed by: imp
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D39966

12 months agoLinuxKPI: cast jiffies_to_msecs() result
Bjoern A. Zeeb [Sat, 10 Jun 2023 22:57:27 +0000 (22:57 +0000)]
LinuxKPI: cast jiffies_to_msecs() result

jiffies_to_msecs() is expected to return an uint_t.  In order to avoid
changing printf format strings, properly cast the result to the
expected type.

Sponsored by: The FreeBSD Foundation
MFC after: 10 days
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D40486

12 months agoAssemble .s to .o using cc, not as
Ed Maste [Tue, 19 Jul 2022 19:36:09 +0000 (15:36 -0400)]
Assemble .s to .o using cc, not as

As of commit fd71da37d478 we no longer have an `as` in the default
toolchain.  Although we do not make use of this rule in the base system
some ports or downstream projects might.  Use `cc -x assembler` instead
of as.

Reviewed by: arichardson
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D35859

12 months agoseq: combine asprintf return value checks
Ed Maste [Mon, 19 Jun 2023 02:10:32 +0000 (22:10 -0400)]
seq: combine asprintf return value checks

Error handling is identical for all of these failure cases.

Sponsored by: The FreeBSD Foundation

12 months agocaroot: add new certs
Kyle Evans [Sun, 25 Jun 2023 23:47:49 +0000 (18:47 -0500)]
caroot: add new certs

Based on dates, these were likely just missed in the last update... add
them now.

- Twenty (20) new

12 months agoifconfig: consistently sort set/clear commands
Ed Maste [Mon, 19 Jun 2023 17:42:46 +0000 (13:42 -0400)]
ifconfig: consistently sort set/clear commands

Sponsored by: The FreeBSD Foundation

12 months agolibc.a: implement _rtld_addr_phdr()
Konstantin Belousov [Sat, 24 Jun 2023 10:59:56 +0000 (13:59 +0300)]
libc.a: implement _rtld_addr_phdr()

to make __cxa_thread_call_dtors() operational for statically linked
binaries.

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

12 months agoradix_trie: simplify trimkey functions
Doug Moore [Sun, 25 Jun 2023 17:49:15 +0000 (12:49 -0500)]
radix_trie: simplify trimkey functions

Replacing a branch and two shifts with a single masking operation saves 64 bytes the pair of functions lookup_le and lookup_ge on amd64.  Refresh the associated comments.
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D40722

12 months agolibcrypto: build nistp* on all little-endian 64-bit targets
Ed Maste [Sat, 24 Jun 2023 17:52:08 +0000 (13:52 -0400)]
libcrypto: build nistp* on all little-endian 64-bit targets

libcrypto intends to provide these routines on little-endian 64-bit
targets.  This was previously done by including them in the ASM_aarch64
and ASM_amd64 blocks in the Makefile, but this excluded powerpc64le and
riscv64.

Reported by: ci.freebsd.org
Reviewed by: jrtc27
Fixes: b077aed33b7b ("Merge OpenSSL 3.0.9")
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40749

12 months agozfs: merge openzfs/zfs@8e8acabdc
Martin Matuska [Sun, 25 Jun 2023 08:31:19 +0000 (10:31 +0200)]
zfs: merge openzfs/zfs@8e8acabdc

Notable upstream pull request merges:
  #14987 Fix memory leak in zil_parse()

Obtained from: OpenZFS
OpenZFS commit: 8e8acabdcaeb831c777f71361722f4235b698a8d

12 months agodepend-cleanup: apply big hammer for OpenSSL 3.0 update
Ed Maste [Sat, 24 Jun 2023 18:12:06 +0000 (14:12 -0400)]
depend-cleanup: apply big hammer for OpenSSL 3.0 update

If we find an object corresponding to a source file that existed in
OpenSSL 1.1.1 but not in 3.0 just remove all of the OpenSSL objdirs.

Reviewed by: dhw
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40750

12 months agoshare/mk/bsd.cpu.mk: drop -mno-powerpc64
Piotr Kubaj [Sat, 24 Jun 2023 20:01:47 +0000 (22:01 +0200)]
share/mk/bsd.cpu.mk: drop -mno-powerpc64

Clang doesn't have -mno-powerpc64.

Differential revision: https://reviews.freebsd.org/D40589
Approved by: jhibbits

12 months agopmc: clean up remaining Pentium man page references
Mitchell Horne [Sat, 24 Jun 2023 17:09:00 +0000 (14:09 -0300)]
pmc: clean up remaining Pentium man page references

These have been removed.

Fixes: d78896e46f1d ("pmc(3): remove Pentium-related man pages...")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation

12 months agohwpmc: add 'flags' local to pmc_op_do_pmcallocate()
Mitchell Horne [Mon, 19 Jun 2023 18:54:31 +0000 (15:54 -0300)]
hwpmc: add 'flags' local to pmc_op_do_pmcallocate()

Similar to the other allocation parameters. No functional change.

MFC after: 3 days
Sponsored by: The FreeBSD Foundation

12 months agoamd64 pmap: Tidy up pmap_promote_pde() calls
Alan Cox [Sat, 17 Jun 2023 17:18:33 +0000 (12:18 -0500)]
amd64 pmap: Tidy up pmap_promote_pde() calls

Since pmap_ps_enabled() is true by default, check it inside of
pmap_promote_pde() instead of at every call site.

Modify pmap_promote_pde() to return true if the promotion succeeded and
false otherwise.  Use this return value in a couple places.

Reviewed by: kib, markj
Differential Revision: https://reviews.freebsd.org/D40744

12 months agoUPDATING: Add OpenSSL 3.0 update
Ed Maste [Sat, 24 Jun 2023 12:13:19 +0000 (08:13 -0400)]
UPDATING: Add OpenSSL 3.0 update

12 months agoarm64: improve KTR_TRAP trace entries
Christos Margiolis [Sat, 24 Jun 2023 05:23:14 +0000 (08:23 +0300)]
arm64: improve KTR_TRAP trace entries

Follow-up of 7756232199ad ("riscv: improve KTR_TRAP trace entries").

Reviewed by: markj
Approved by:    markj (mentor)
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40696

12 months agoDo not expose architecture specific symbols
Enji Cooper [Sat, 24 Jun 2023 09:13:31 +0000 (02:13 -0700)]
Do not expose architecture specific symbols

The following methods have existed since 1.0.2, however, they are
deprecated and are not available on all architectures.

- EC_GFp_nistp224_method
- EC_GFp_nistp256_method
- EC_GFp_nistp521_method

Do not expose them via libcrypto.

Discussed with: emaste

12 months agoBump __FreeBSD_version for OpenSSL 3.0 update
Ed Maste [Sat, 24 Jun 2023 02:15:39 +0000 (22:15 -0400)]
Bump __FreeBSD_version for OpenSSL 3.0 update

Reported by: bofh
Sponsored by: The FreeBSD Foundation

12 months agolibfetch: remove all old OpenSSL support
Enji Cooper [Thu, 22 Jun 2023 03:53:54 +0000 (20:53 -0700)]
libfetch: remove all old OpenSSL support

This change removes pre-OpenSSL 1.1 supporting code and removes/adjusted
preprocessor conditionals which were tautilogically true as FreeBSD main
has shipped with OpenSSL 1.1+ for some time.

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

12 months agoradix_trie: avoid reloading radix node
Doug Moore [Fri, 23 Jun 2023 23:47:23 +0000 (18:47 -0500)]
radix_trie: avoid reloading radix node

In the vm_radix:remove loop that searches for the last child, load
that child once, without loading it again after the search is over.
Change KASSERTS from index check to NULL node check.
Reviewed by: alc
Differential Revision: https://reviews.freebsd.org/D40721