]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
9 months agoarm64: zynqmp: Add clock driver
Emmanuel Vadot [Thu, 7 Sep 2023 07:57:03 +0000 (09:57 +0200)]
arm64: zynqmp: Add clock driver

Add clock and reset drivers for the ZynqMP SoC.
The clocks are discovered by talking to the firmware as the topology isn't
fixed on this SoC.

Differential Revision: https://reviews.freebsd.org/D41812
Sponsored by: Beckhoff Automation GmbH & Co. KG

9 months agoarm64: zynqmp: Add firmware driver
Emmanuel Vadot [Thu, 7 Sep 2023 07:56:45 +0000 (09:56 +0200)]
arm64: zynqmp: Add firmware driver

The ZynqMP SoC have a MCU running a firmware to control clocks, resets,
fpga loading etc ...
Add a driver that can be use to communicate with it.
For now only the clock and reset part are implemented.

Differential Revision: https://reviews.freebsd.org/D41811
Sponsored by: Beckhoff Automation GmbH & Co. KG

9 months agosave-entropy: Add manual page
Fernando Apesteguía [Thu, 7 Sep 2023 08:28:43 +0000 (10:28 +0200)]
save-entropy: Add manual page

Succinct manual page for save-entropy(8).

PR: 223998
Reported by: AJ Jordan <alex+freebsd@strugee.net>
Reviewed by: carlavilla@, delphij@, lwhsu@, pauamma_gundo.com
Approved by: delphi, lwhsu (src)
Differential Revision: https://reviews.freebsd.org/D41768

9 months agoFix typo in RELNOTES (objump -> objdump)
Kenta Kubo [Sun, 17 Sep 2023 13:55:16 +0000 (22:55 +0900)]
Fix typo in RELNOTES (objump -> objdump)

Pull Request: https://github.com/freebsd/freebsd-src/pull/847

9 months agofreebsd-update: do not restart sshd when updating jail/basedir
Ed Maste [Sat, 16 Sep 2023 20:46:16 +0000 (21:46 +0100)]
freebsd-update: do not restart sshd when updating jail/basedir

In 6cd1bc531609 for PR 263489 I changed freebsd-update to restart sshd
after upgrade, to avoid an upgrade-related incompatibility that made it
impossible to login.

This is intended to avoid losing access to remote hosts, and ought not
apply to upgrading jails (from outside).

PR: 263489, 272282
Reported by: otis
Reviewed by: otis, kevans
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Fixes: 6cd1bc531609 ("freebsd-update: restart sshd after upgrade")
Differential Revision: https://reviews.freebsd.org/D41890

9 months agoswapon.2: correct FreeBSD release that introduced swapoff
Ed Maste [Mon, 18 Sep 2023 09:01:38 +0000 (10:01 +0100)]
swapon.2: correct FreeBSD release that introduced swapoff

It was introduced in 92da00bb245b, after 5.0 and beforen 5.1.  Reported
in https://github.com/ziglang/zig/issues/16590.

9 months agoMerge bmake-20230909
Simon J. Gerraty [Mon, 18 Sep 2023 01:05:19 +0000 (18:05 -0700)]
Merge bmake-20230909

Merge commit '1012cf15f75d1e9048779abd07270a37cdba590a'

9 months agopowerpc: Implement fpu_kern_enter/fpu_kern_leave
Shawn Anastasio [Sun, 17 Sep 2023 14:40:48 +0000 (10:40 -0400)]
powerpc: Implement fpu_kern_enter/fpu_kern_leave

Summary:
Provide an implementation of fpu_kern_enter/fpu_kern_leave for PPC to
enable FPU, VSX, and Altivec usage in-kernel. The functions currently
only support FPU_KERN_NOCTX, but this is sufficient for ossl(1) and many
other users of the API.

This patchset has been tested on powerpc64le using a modified version of
the in-tree tools/tools/crypto/cryptocheck.c tool to check for FPU/Vec
register clobbering along with a follow-up patch to enable ossl(4) on
powerpc64*.

Reviewed by: jhibbits
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D41540

9 months agoRevert "powerpc: Implement fpu_kern_enter/fpu_kern_leave"
Justin Hibbits [Sun, 17 Sep 2023 17:19:56 +0000 (13:19 -0400)]
Revert "powerpc: Implement fpu_kern_enter/fpu_kern_leave"

This reverts commit 6a47fa697ace42851b44498a53446b29b2593316.

Need to correct authorship.

9 months agoImport bmake-20230909
Simon J. Gerraty [Sun, 17 Sep 2023 17:03:11 +0000 (10:03 -0700)]
Import bmake-20230909

Update import.sh to generate below

ChangeLog since bmake-20230622

2023-09-09  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230909
Merge with NetBSD make, pick up
o main.c: allow -j to compute a multiple of ncpu
If _SC_NPROCESSORS_ONLN is supported; and -j arg is a floating
point number or ends in 'C' compute .MAKE.JOBS as a multiple of
_SC_NPROCESSORS_ONLN
.MAKE.JOBS.C will be "yes" if -jC is supported

2023-08-20  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230820
Merge with NetBSD make, pick up
o make.1: note that :localtime is better for %s
o parse.c: improve error messages for invalid input.
o var.c: fix for %s:L:gmtime - set TZ=UTC and use localtime to get
correct result, it is still better to use %s:L:localtime.

2023-08-18  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230818
Merge with NetBSD make, pick up
o meta.c: meta_ignore - check raw path against metaIgnorePaths
to potentially skip call to realpath.
o var.c: be strict when parsing the argument of the ':mtime' modifier
o unit-tests/varmod-mtime.mk: document why '${%s:L:localtime}'
should be used to get an equivalent value to time(3).

2023-08-16  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230816
Merge with NetBSD make, pick up
o cond.c: clean up multiple-inclusion guards

2023-07-25  Simon J Gerraty  <sjg@beast.crufty.net>

* unit-tests/Makefile: addd varmod-localtime to BROKEN_TESTS
if configure cannot work out how to control TZ.
Remove varmod-localtime from BROKEN_TESTS for IRIX*

2023-07-24  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230723

* configure.in: fix the test for wether TZ=Europe/Berlin works.
Depending on the time of year, if run between 22:00 and 00:00 UTC
the check in configure would fail incorrectly.
Take the day into account as well.

2023-07-18  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230711
Merge with NetBSD make, pick up
o make.1: clean up wording, clarify scope of '!' in conditions

2023-07-15  Simon J Gerraty  <sjg@beast.crufty.net>

* make-bootstrap.sh.in: set prefix
If configure is run using ksh we get unexpanded ${prefix} in
DEFAULT_SYS_PATH, by ensuring prefix is set we should still get
correct result.

2023-07-13  Simon J Gerraty  <sjg@beast.crufty.net>

* VERSION (_MAKE_VERSION): 20230711
bump version for IRIX tweaks

* make.h: undef OP_NONE if defined

* unit-tests/Makefile: set BROKEN_TESTS for IRIX

* configure.in: override INSTALL on IRIX

2023-06-27  Simon J Gerraty  <sjg@beast.crufty.net>

* boot-strap op_test: ensure we set TEST_MAKE as we want it.

mk/ChangeLog since bmake-20230622

2023-09-09  Simon J Gerraty  <sjg@beast.crufty.net>

* jobs.mk (JOB_MAX): use -jC if we can
we actually use JOB_MAX_C which defaults to 1.33C

2023-08-18  Simon J Gerraty  <sjg@beast.crufty.net>

* now_utc: %s only works with :localtime

2023-07-14  Simon J Gerraty  <sjg@beast.crufty.net>

* install-sh: ignore -c as claimed and only insist on
a directory for destination when more than one file to copy.

* sys.mk: when looking for SYS_OS_MK try ${.MAKE.OS} and
${.MAKE.OS:S,64,,} early (so we find sys/IRIX.mk for IRIX64)

2023-07-13  Simon J Gerraty  <sjg@beast.crufty.net>

* install-mk (MK_VERSION): 20230711

* sys.mk: set SYS_MK and INSTALL_SH for systems with incompatible
install(1)

* sys/IRIX.mk:  when setting ROOT_GROUP only match the first :0:
set INSTALL to install-sh rather than pathname that may not exist
(yet).

2023-07-07  Simon J Gerraty  <sjg@beast.crufty.net>

* dirdeps.mk: pass DIRDEP_TARGETS to DIRDEP_MAKE
normally this is empty - for the default target, but there are
use-cases where we might set it to something else.

2023-07-04  Simon J Gerraty  <sjg@beast.crufty.net>

* install-mk (MK_VERSION): 20230704

* dirdeps.mk: apply DEBUG_DIRDEPS_LIST_FILTER to lists we output
when DEBUG_DIRDEPS is in effect.
Eg. DEBUG_DIRDEPS_LIST_FILTER=ts\n
can greatly improve readability.

9 months agopowerpc: Implement fpu_kern_enter/fpu_kern_leave
Justin Hibbits [Sun, 17 Sep 2023 14:40:48 +0000 (10:40 -0400)]
powerpc: Implement fpu_kern_enter/fpu_kern_leave

Summary:
Provide an implementation of fpu_kern_enter/fpu_kern_leave for PPC to
enable FPU, VSX, and Altivec usage in-kernel. The functions currently
only support FPU_KERN_NOCTX, but this is sufficient for ossl(1) and many
other users of the API.

This patchset has been tested on powerpc64le using a modified version of
the in-tree tools/tools/crypto/cryptocheck.c tool to check for FPU/Vec
register clobbering along with a follow-up patch to enable ossl(4) on
powerpc64*.

Reviewed by: jhibbits
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D41540

9 months agocam(4): Remove redundant words
Tom Hukins [Sun, 17 Sep 2023 15:12:22 +0000 (09:12 -0600)]
cam(4): Remove redundant words

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

9 months agocam(4): Fix device hints documentation
Tom Hukins [Sun, 17 Sep 2023 15:12:22 +0000 (09:12 -0600)]
cam(4): Fix device hints documentation

The code in sys/cam/cam_periph.c that calls resource_int_value(9) looks
for "lun" not "unit".

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

9 months agoRestrict the glibc compat cookie open functions to __BSD_VISIBLE
Warner Losh [Fri, 15 Sep 2023 16:13:11 +0000 (10:13 -0600)]
Restrict the glibc compat cookie open functions to __BSD_VISIBLE

Sponsored by: Netflix

9 months agonvme: Give up when we've failed
Warner Losh [Fri, 15 Sep 2023 16:02:32 +0000 (10:02 -0600)]
nvme: Give up when we've failed

Normally, we poll the device every so often to see if commands have
timed out. However, we'll go into the recovery state as part of failing
the drive. To account for all possibilties, if we're failed when we get
into the polling function, just stop polling: Party is over.

Sponsored by: Netflix

9 months agopkgbase: Add instructions for upgrading past 78847e1
Doug Rabson [Sun, 17 Sep 2023 10:06:01 +0000 (11:06 +0100)]
pkgbase: Add instructions for upgrading past 78847e1

The pkg solver gets confused by the file moves and refuses to upgrade
without manually upgrading FreeBSD-utilities and FreeBSD-utilities-dev
first.

PR:             254173, 273859
MFC after: 1 week
Reviewed by: Mina Galić <freebsd@igalic.co>
Differential Revision: https://reviews.freebsd.org/D41892

9 months agoFix geom build with clang 17 and KTR enabled
Dimitry Andric [Tue, 12 Sep 2023 06:52:31 +0000 (08:52 +0200)]
Fix geom build with clang 17 and KTR enabled

When building a kernel with clang 17 and KTR enabled, such as with the
LINT configurations, a -Werror warning is emitted:

    sys/geom/geom_io.c:145:31: error: use of logical '&&' with constant operand [-Werror,-Wconstant-logical-operand]
      145 |         if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
          |             ~~~~~~~~~~~~~~~~~~~~~~~~ ^
    sys/geom/geom_io.c:145:31: note: use '&' for a bitwise operation
      145 |         if ((KTR_COMPILE & KTR_GEOM) && (ktr_mask & KTR_GEOM)) {
          |                                      ^~
          |                                      &
    sys/geom/geom_io.c:145:31: note: remove constant to silence this warning

Replace the multiple uses of the expression with one macro, and in this
macro use "!= 0" to get a logical operand instead of a bitwise one.

Reviewed by: jhb
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41823

9 months agoamd64: Convert a cheap DIAGNOSTIC check to a KASSERT
Mark Johnston [Fri, 11 Aug 2023 15:54:34 +0000 (11:54 -0400)]
amd64: Convert a cheap DIAGNOSTIC check to a KASSERT

MFC after: 1 week

9 months agomlock tests: Add a regression test
Mark Johnston [Fri, 15 Sep 2023 16:28:42 +0000 (12:28 -0400)]
mlock tests: Add a regression test

The test tries to trigger creation of a superpage mapping in an
mlock()ed region.

MFC after: 2 weeks

9 months agoamd64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping
Bojan Novković [Fri, 15 Sep 2023 10:41:10 +0000 (12:41 +0200)]
amd64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping

This patch reverts the changes made in D19670 and fixes the original
issue by allocating and prepopulating a leaf page table page for wired
userspace 2M pages.

The original issue is an edge case that creates an unmapped, wired
region in userspace. Subsequent faults on this region can trigger wired
superpage creation, which leads to a panic in pmap_demote_pde_locked()
as the pmap does not create a leaf page table page for the wired
superpage. D19670 fixed this by disallowing preemptive creation of
wired superpage mappings, but that fix is currently interfering with an
ongoing effort of speeding up vm_map_wire for large, contiguous entries
(e.g. bhyve wiring guest memory).

Reviewed by: alc, markj
Sponsored by: Google, Inc. (GSoC 2023)
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D41132

9 months agolib/libc/tests/string/strcspn_test.c: extend tests to catch previous bug
Robert Clausecker [Tue, 12 Sep 2023 02:48:58 +0000 (22:48 -0400)]
lib/libc/tests/string/strcspn_test.c: extend tests to catch previous bug

This extends the strcspn() unit tests to catch mistakes in the
implementation that only appear when a mismatch occurs in a certain
position of the string against a certain position of the set.

See also: 52d4a4d4e0dedc72bc33082a3f84c2d0fd6f2cbb
Sponsored by: The FreeBSD Foundation
Approved by: imp
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D41821

9 months agovfs: count how many times vnlru got woken up due to vnode shortage
Mateusz Guzik [Sat, 16 Sep 2023 17:26:39 +0000 (17:26 +0000)]
vfs: count how many times vnlru got woken up due to vnode shortage

9 months agolibcrypto: link engines and the legacy provider to libcrypto
Pierre Pronchery [Fri, 15 Sep 2023 15:14:16 +0000 (17:14 +0200)]
libcrypto: link engines and the legacy provider to libcrypto

OpenSSL's legacy provider module and engines need to link to
libcrypto.so, as it provides some of the actual implementations of
legacy routines.

This is a little tricky due to build order issues.  Introduce a small
hack (LIBCRYPTO_WITHOUT_SUBDIRS) that builds libcrypto.so in its usual
early phase without any OpenSSL provider modules or engines.  This is
intended to restore the test suite; a future change should remove the
hack and replace it with a better approach.

PR: 254853, 273528
Discussed with: Folks at EuroBSDCon in Coimbra
Sponsored by: The FreeBSD Foundation

9 months agovfs: stabilize freevnodes_old
Mateusz Guzik [Sat, 16 Sep 2023 15:41:12 +0000 (15:41 +0000)]
vfs: stabilize freevnodes_old

In face of parallel callers.

9 months agoAdd WITHOUT_MANSPLITPKG description
Ed Maste [Sat, 16 Sep 2023 15:28:28 +0000 (16:28 +0100)]
Add WITHOUT_MANSPLITPKG description

Fixes: 74da9c39c346 ("pkgbase: Split out manpages by default")
Sponsored by: The FreeBSD Foundation

9 months agozfs: retire z_nr_znodes
Mateusz Guzik [Sat, 16 Sep 2023 14:18:05 +0000 (14:18 +0000)]
zfs: retire z_nr_znodes

It is not needed and is going away soon(tm), facilitating other changes.

See https://github.com/openzfs/zfs/pull/15274

9 months agounix tests: Use the right type for sendmsg(2) return values
Mark Johnston [Fri, 15 Sep 2023 08:59:08 +0000 (04:59 -0400)]
unix tests: Use the right type for sendmsg(2) return values

MFC after: 1 week

9 months agosocket tests: Add a regression test for MSG_WAITALL
Mark Johnston [Thu, 31 Aug 2023 17:29:29 +0000 (13:29 -0400)]
socket tests: Add a regression test for MSG_WAITALL

PR: 212716
MFC after: 1 week
Sponsored by: The FreeBSD Foundation

9 months agosockets: re-check socket state after call to pr_rcvd()
Greg Becker [Sat, 9 Sep 2023 23:38:24 +0000 (18:38 -0500)]
sockets: re-check socket state after call to pr_rcvd()

Socket state may have changed after dropping the receive
buffer lock in order to call pr_rcvd().  If the buffer is
empty, re-check the state after reaquiring the lock and
skip calling sbwait() if the socket is in error or the
peer has closed.

PR: 212716
Reviewed by: markj, glebius
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41783

9 months agovfs: s/u_long vstir/bool vstir/
Mateusz Guzik [Sat, 16 Sep 2023 08:19:24 +0000 (08:19 +0000)]
vfs: s/u_long vstir/bool vstir/

9 months agoObsoleteFiles: cleanup old libclang_rt files for powerpc64le
Dimitry Andric [Sat, 16 Sep 2023 07:47:19 +0000 (09:47 +0200)]
ObsoleteFiles: cleanup old libclang_rt files for powerpc64le

PR: 273776
MFC after: 3 days

9 months agovfs: group vnode-related sysctls under vfs.vnode
Mateusz Guzik [Fri, 15 Sep 2023 21:08:38 +0000 (21:08 +0000)]
vfs: group vnode-related sysctls under vfs.vnode

Instead of having things scattered through vfs, debug and kern trees.

Old names remain for compatibility.

Sample output of "sysctl vfs.vnode":
vfs.vnode.vnlru.failed_runs: 0
vfs.vnode.vnlru.recycles_free: 0
vfs.vnode.vnlru.recycles: 0
vfs.vnode.stats.alloc_sleeps: 0
vfs.vnode.stats.free: 1310
vfs.vnode.stats.skipped_requeues: 0
vfs.vnode.stats.created: 1686
vfs.vnode.stats.count: 1641
vfs.vnode.param.wantfree: 2097152
vfs.vnode.param.limit: 8388608

9 months agovfs: retire kern.minvnodes
Mateusz Guzik [Sat, 16 Sep 2023 07:33:36 +0000 (07:33 +0000)]
vfs: retire kern.minvnodes

It was marked as legacy in 2005.

9 months agolib/libc/amd64/string/memcmp.S: harden against phony buffer lengths
Robert Clausecker [Thu, 14 Sep 2023 05:19:01 +0000 (01:19 -0400)]
lib/libc/amd64/string/memcmp.S: harden against phony buffer lengths

When memcmp(a, b, len) (or equally, bcmp) is called with a phony length
such that a + len < a, the code would malfunction and not compare the
two buffers correctly.  While such arguments are illegal (buffers do not
wrap around the end of the address space), it is neverthless conceivable
that people try things like memcmp(a, b, SIZE_MAX) to compare a and b
until the first mismatch, in the knowledge that such a mismatch exists,
expecting memcmp() to stop comparing somewhere around the mismatch.
While memcmp() is usually written to confirm to this assumption, no
version of ISO/IEC 9899 guarantees this behaviour (in contrast to
memchr() for which it is).

Neverthless it appears sensible to at least not grossly misbehave on
phony lengths.  This change hardens memcmp() against this case by
comparing at least until the end of the address space if a + len
overflows a 64 bit integer.

Sponsored by: The FreeBSD Foundation
Approved by: mjg (blanket, via IRC)
See also: b2618b651b28fd29e62a4e285f5be09ea30a85d4
MFC after: 1 week

9 months agotcpdump: Initialize tzcode early.
Dag-Erling Smørgrav [Fri, 15 Sep 2023 21:36:41 +0000 (23:36 +0200)]
tcpdump: Initialize tzcode early.

An explicit tzset() call is usually not needed as it happens implicitly
the first time we call localtime() or mktime(), but in some cases
(sandboxing, chroot) this may be too late.

PR: 273807
MFC after: 3 days
Reviewed by: jrm
Differential Revision: https://reviews.freebsd.org/D41880

9 months agortld: output rtld errors into the dbg channel
Konstantin Belousov [Fri, 15 Sep 2023 19:26:50 +0000 (22:26 +0300)]
rtld: output rtld errors into the dbg channel

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

9 months agokinst: do not look for a function epilogue
Christos Margiolis [Fri, 15 Sep 2023 15:33:41 +0000 (16:33 +0100)]
kinst: do not look for a function epilogue

kinst currently only traces functions that start and end with the usual
function prologue and epilogue respectively. Ignoring functions that do
not have an epilogue however, makes the filtering too strict, as this
means that we can not trace functions that never return (e.g
vnlru_proc()). This patch relaxes the filtering and only checks whether
the function pushes the frame pointer.

Reviewed by: markj
Approved by: markj
Differential Revision: https://reviews.freebsd.org/D41876

9 months agovfs: use vnlru_read_freevnodes for the freevnodes sysctl
Mateusz Guzik [Thu, 14 Sep 2023 23:53:11 +0000 (23:53 +0000)]
vfs: use vnlru_read_freevnodes for the freevnodes sysctl

For a more accurate result.

9 months agovfs: retire vnlru_under_unlocked
Mateusz Guzik [Thu, 14 Sep 2023 23:05:51 +0000 (23:05 +0000)]
vfs: retire vnlru_under_unlocked

It only looks at the centralized value which in corner cases can end up
being negative.

9 months agoLinuxKPI: 802.11: fix counting the number of supbands
Bjoern A. Zeeb [Thu, 14 Sep 2023 17:57:53 +0000 (17:57 +0000)]
LinuxKPI: 802.11: fix counting the number of supbands

While the main purpose was to assign an(y) early chandef with the
loop, later additions made use of it to also count supbands as well
as to initialise max_rates.
Due to the main goal we can exit the loop early and not properly
count and initialise supbands and max_rates.
Move the terminating condition into the loop and make it a continue
rather than ending the loop.

Fixes: d9945d7821b9b ("improve hw_scan")
Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 months agoLinuxKPI: 802.11: make sure bssid for scans (probe_req) is set
Bjoern A. Zeeb [Thu, 14 Sep 2023 17:48:19 +0000 (17:48 +0000)]
LinuxKPI: 802.11: make sure bssid for scans (probe_req) is set

In b0f73768220e9 we added bssid[] to struct cfg80211_scan_request
likely while working on mt76 and did not need it (yet) back then.
iwlwifi started to use the field in Linux f1fec51cda70f (April 2023).
Without it set firmware crashes when trying to send probe requests
((empty) SSID also given to hw_scan).
For now always set the field to the wildcard BSSID.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 months agonet80211: improve scan debugging
Bjoern A. Zeeb [Thu, 14 Sep 2023 17:36:29 +0000 (17:36 +0000)]
net80211: improve scan debugging

While debugging other problems I ran into the case where net80211
was thinking a scan was ongoing and new scans could not be started
but given other logging there was clearly no more scan running.
It was hard after the fact to quickly determine enough state to
reconstruct or validate assumptions.

Improve a MSG_SCAN debug logging and implement _db_show_scan() ddb
output which can be printed along with show com /S or /a.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 months agonet80211: mark argument to scan_curchan_task() __unused
Bjoern A. Zeeb [Thu, 14 Sep 2023 17:34:01 +0000 (17:34 +0000)]
net80211: mark argument to scan_curchan_task() __unused

Mostly as documentation mark an unused argument to scan_curchan_task()
as __unused.  We may possibly want to check all callers in the future
and see if the argument was supposed to be useful or should be entirely
removed.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 months agoiwlwifi: fix a bug in iwl_ssid_exist()
Bjoern A. Zeeb [Thu, 14 Sep 2023 17:22:04 +0000 (17:22 +0000)]
iwlwifi: fix a bug in iwl_ssid_exist()

Rather than always comparing a given SSID to the first SSID of the
IE list, compare it to the the iterator one.  That way duplicates can
be found.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 months agovfs cache: garbage collect the fullpathfail2 counter
Mateusz Guzik [Thu, 14 Sep 2023 20:25:54 +0000 (20:25 +0000)]
vfs cache: garbage collect the fullpathfail2 counter

The conditions it checks cannot legally be true (modulo races against
forced unmount), so assert on it instead.

9 months agovfs: fix stale comment about freevnodes management
Mateusz Guzik [Thu, 14 Sep 2023 17:28:32 +0000 (17:28 +0000)]
vfs: fix stale comment about freevnodes management

9 months agovfs: don't kick vnlru if it is already running
Mateusz Guzik [Thu, 14 Sep 2023 16:27:47 +0000 (16:27 +0000)]
vfs: don't kick vnlru if it is already running

Further shaves some lock trips.

9 months agoObsoleteFiles: cleanup old libclang_rt files for powerpc64
Dimitry Andric [Thu, 14 Sep 2023 16:39:31 +0000 (18:39 +0200)]
ObsoleteFiles: cleanup old libclang_rt files for powerpc64

PR:             273776
MFC after:      3 days

9 months agoFix typo in VERIEXEC_VERIFIED_FILE
Simon J. Gerraty [Thu, 14 Sep 2023 16:31:31 +0000 (09:31 -0700)]
Fix typo in VERIEXEC_VERIFIED_FILE

Reviewed by: stevek

9 months agopkgbase: Split out manpages by default
Doug Rabson [Thu, 14 Sep 2023 14:38:07 +0000 (15:38 +0100)]
pkgbase: Split out manpages by default

This helps with building small container images using pkgbase.

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

9 months agox86: Add defines for workaround bits in AMD's MSR "Decode Configuration"
Olivier Certner [Mon, 11 Sep 2023 13:10:35 +0000 (15:10 +0200)]
x86: Add defines for workaround bits in AMD's MSR "Decode Configuration"

They are a bit more informative than raw hexadecimal values.

While here, sort existing defines of bits for AMD MSRs to match the address
order.

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

9 months agovfs: drop one vnode list lock trip during vnlru free recycle
Mateusz Guzik [Thu, 14 Sep 2023 14:35:40 +0000 (14:35 +0000)]
vfs: drop one vnode list lock trip during vnlru free recycle

vnlru_free_impl would take the lock prior to returning even though most
frequent caller does not need it.

Unsurprisingly vnode_list mtx is the primary bottleneck when recycling
and avoiding the useless lock trip helps.

Setting maxvnodes to 400000 and running 20 parallel finds each with a
dedicated directory tree of 1 million vnodes in total:
before: 4.50s user 1225.71s system 1979% cpu 1:02.14 total
after: 4.20s user 806.23s system 1973% cpu 41.059 total

That's 34% reduction in total real time.

With this the block *remains* the primary bottleneck when running on
ZFS.

9 months agomana: add lro and tso stat counters
Wei Hu [Thu, 14 Sep 2023 11:56:20 +0000 (11:56 +0000)]
mana: add lro and tso stat counters

Add a few stat counters for tso and lro.

MFC after: 3 days
Sponsored by: Microsoft

9 months agoarp(8): fix by-interface and by-host filtering when using netlink
R. Christian McDonald [Thu, 14 Sep 2023 07:07:24 +0000 (09:07 +0200)]
arp(8): fix by-interface and by-host filtering when using netlink

arp(8) has traditionally supported filtering by interface via -i and
by hostname. However, this functionality was omitted from the initial
netlink-ification of arp. This patch re-introduces this filtering
functionality.

This patch also improves by-interface filtering by storing and using the
ifindex of the requested interface for filtering instead of comparing
interface name strings

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

9 months agocorrect FreeBSD release
Wolfram Schneider [Thu, 14 Sep 2023 10:10:35 +0000 (10:10 +0000)]
correct FreeBSD release

PR: 273690

9 months agopkgbase: put library links and symlinks in the -dev package
Doug Rabson [Wed, 13 Sep 2023 10:18:09 +0000 (11:18 +0100)]
pkgbase: put library links and symlinks in the -dev package

Some libraries (e.g. ncurses) install links to the main library for
backwards compatibilty. This change ensures that those links are in the
dev package since the files being linked to are in that package.

PR: 249143
MFC after: 1 week
Reviewed by: emaste, manu
Differential Revision: https://reviews.freebsd.org/D41841

9 months agoupdate homepage for FreeBSD Manual Pages
Wolfram Schneider [Thu, 14 Sep 2023 08:40:47 +0000 (08:40 +0000)]
update homepage for FreeBSD Manual Pages

9 months agoAvoid IPv6 source address selection on accepting TCP connections
Andrey V. Elsukov [Thu, 14 Sep 2023 08:39:06 +0000 (11:39 +0300)]
Avoid IPv6 source address selection on accepting TCP connections

When an application listens IPv6 TCP socket, due to ipfw
forwarding tag it may handle connections for addresses that do not
belongs to the jail or even current host (transparent proxy).
Syncache code can successfully handle TCP handshake for such connections.
When syncache finally accepts connection it uses in6_pcbconnect() to
properly initlize new connection info.

For IPv4 this scenario just works, but for IPv6 it fails when
local address doesn't belongs to the jail. This check occurs when
in6_pcbladdr() applies IPv6 SAS algorithm.
We need IPv6 SAS when we are connection initiator, but in the above
case connection is already established and both source and destination
addresses are known.

Use unused argument to notify in6_pcbconnect() when we don't need
source address selection. This will fix `ipfw fwd` to jailed IPv6
address.

When we are connection initiator, we stil use IPv6 SAS algorithm and
apply all related restrictions.

MFC after:              1 month
Sponsored by:           Yandex LLC
Differential Revision:  https://reviews.freebsd.org/D41685

9 months agocorrect FreeBSD release
Wolfram Schneider [Thu, 14 Sep 2023 08:03:05 +0000 (08:03 +0000)]
correct FreeBSD release
PR: 273690

9 months agoHyper-V: vmbus: implementat bus_get_dma_tag in vmbus
Souradeep Chakrabarti [Thu, 14 Sep 2023 07:11:25 +0000 (07:11 +0000)]
Hyper-V: vmbus: implementat bus_get_dma_tag in vmbus

In ARM64 Hyper-V UFS filesystem is getting corruption and those
corruptions are consistently happening just after hitting a page
boundary. It is unable to correctly read disk blocks into buffers
that are not aligned to 512-byte boundaries.

It happens because storvsc needs physically contiguous memory which
may not be the case when bus_dma needs to create a bounce buffer.
This can happen when the destination is not cache-line aligned.

Hyper-V VMs have VMbus synthetic devices and PCI pass-thru devices
that are added dynamically via the VMbus protocol and are not
represented in the ACPI DSDT. Only the top level VMbus node exists
in the DSDT. As such, on ARM64 these devices don't pick up coherence
information and default to not hardware coherent.

PR: 267654, 272666
Reviewed by: andrew, whu
Tested by: lwhsu
MFC after: 3 days
Sponsored by: Microsoft
Differential Revision: https://reviews.freebsd.org/D41728

9 months agoice(4): Update to 1.38.16-k
Eric Joyner [Thu, 24 Aug 2023 23:26:13 +0000 (16:26 -0700)]
ice(4): Update to 1.38.16-k

New features
- Add sysctl "link_active_on_if_down" (defaults to 1 to match previous
behavior): set this to 0 to have the driver bring the physical link down when
the interface is brought administratively down
- Add sysctl "temp" to read chip temperature on E810 devices; this requires a
4.30 or newer NVM (see package sysutils/intel-nvmupdate-100g)

Bug fixes and general changes
- (linked to irdma) properly propagate PF reset request from irdma driver
- (linked to irdma) properly notify irdma of an impending PF reset
- (linked to irdma) move Protocol Engine error handling to irdma
- Print log message when using a DDP that doesn't support the "TX balancing"
mode
- Block LLDP agent configuration when DSCP QoS mode is enabled
- Fix kernel panic when updating NVM when adapter is in the "TX balancing" mode
- Remove ice_sbq_cmd.h since it's unused
- Fix LLDP RX filter to still allow LLDP frames to be received by SW after a PF
reset in SW LLDP mode
- Add ice_if_needs_restart handler in order to fix a bad VLAN and link down
interaction
- Issue PF reset during unload
- nvmupdate process fixes
- Use pci_msix_table_bar() to get MSI-X bar index at runtime instead of hardcoding it

Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: anzhu@netapp.com
MFC after: 3 days
Sponsored by: Intel Corporation, NetApp
Differential Revision: https://reviews.freebsd.org/D41655

9 months agoirdma(4): remove artificial completion generator
Bartosz Sobczak [Tue, 12 Sep 2023 21:35:06 +0000 (14:35 -0700)]
irdma(4): remove artificial completion generator

Removing artificial completion generator as there had been no indication
of the code being required for E810 cards.  Further more it was found
that the code may have unpleasant side effects on user experience when
using ucmatose tool.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
MFC after: 1 day
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41593

9 months agoirdma(4): use related vnet for searching netdev
Bartosz Sobczak [Tue, 12 Sep 2023 21:31:39 +0000 (14:31 -0700)]
irdma(4): use related vnet for searching netdev

It was found through testing that when ULP uses individual vnet, the
search for the correct vlan_id may failing because of no proper
interface with given address.

The solution is to use vnet associated to the connection whenever
possible.

Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
Signed-off-by: Eric Joyner <erj@FreeBSD.org>
Reviewed by: erj@
MFC after: 1 day
Sponsored by: Intel Corporation
Differential Revision: https://reviews.freebsd.org/D41592

9 months agoftpd: correct deprecation notice markup
Ed Maste [Wed, 13 Sep 2023 21:13:42 +0000 (22:13 +0100)]
ftpd: correct deprecation notice markup

Also bump .Dd for the original change.

Reported by: karels
Fixes: 98b98ec1bc7e ("ftpd: add deprecation notice")
Sponsored by: The FreeBSD Foundation

9 months agopowerpc pmap: initialize kernel pmap radix trie
Doug Moore [Wed, 13 Sep 2023 18:17:57 +0000 (13:17 -0500)]
powerpc pmap: initialize kernel pmap radix trie

Commit 2d2bcba7ba70141388729ed49674b36fd01146c5 changed radix trie
implementation and made it necessary that radix tries be initialized
with vm_radix_init. @dbaio reports that in some configurations, there
is a powerpc boot panic and that this commit introduced the
problem. In powerpc/aim/mmu_radix.c, the radix trie in kernel_pmap is
initialized by zeroing all its fields.

Add a call to vm_radix_init to properly initialize
kernel_pmap->pm_radix.

Reported by: dbaio
Reviewed by: alc, jhibbits
Fixes: 2d2bcba7ba drop NULL check from radix trie search
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41846

9 months agonewvers.sh: Avoid picking up stray envars.
Dag-Erling Smørgrav [Wed, 13 Sep 2023 18:10:46 +0000 (18:10 +0000)]
newvers.sh: Avoid picking up stray envars.

89f361f742ae added a mechanism to allow arbitrary overrides from the
command line.  Unfortunately, it also had the (likely unintended)
effect of allowing RELEASE and VERSION to be passed in from the
environment, and Makefile.inc1 happens to define VERSION for the
benefit of pkgbase.  To restore the status quo, unset RELEASE and
VERSION at the top of the script.

Fixes: 89f361f742ae
MFC after: 3 days
Reviewed by: gallatin, sjg, emaste
Differential Revision: https://reviews.freebsd.org/D41845

9 months agoaxge: Skip dummy packet headers
Damien Broka [Wed, 13 Sep 2023 08:23:47 +0000 (09:23 +0100)]
axge: Skip dummy packet headers

Newer versions of the AX88179 interweave dummies alongside valid
packet headers in bulk IN transfer data. This was probably done for
backward compatibility with existing drivers.

However current driver records these dummy headers as dropped frames,
leading to stats misreporting one Ierr per Ipkt.

This skips those dummy headers silently, thereby not generating Ierrs
for them.

Reviewed by: emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/842

9 months agosctp: further improve shutting down the read side of a socket
Michael Tuexen [Wed, 13 Sep 2023 11:02:51 +0000 (13:02 +0200)]
sctp: further improve shutting down the read side of a socket

Deal with the case that the association is already gone.

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

9 months agoBelatedly document OPIE removal in RELNOTES and UPDATING.
Dag-Erling Smørgrav [Wed, 13 Sep 2023 11:43:34 +0000 (11:43 +0000)]
Belatedly document OPIE removal in RELNOTES and UPDATING.

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

9 months agopf tests: pfsync:defer requires scapy
Kristof Provost [Wed, 13 Sep 2023 09:11:02 +0000 (11:11 +0200)]
pf tests: pfsync:defer requires scapy

Add the kyua hint so we skip the test if it's not installed.

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

9 months agomana: add ioctl to support toggling offloading features
Wei Hu [Wed, 13 Sep 2023 10:48:02 +0000 (10:48 +0000)]
mana: add ioctl to support toggling offloading features

With this support, users can enable or disable offloading features
such as txcsum, rxcsum, tso and software lro through ifconfig.

To enable or disable tx features, do it on mana interface first,
then hn/netvsc to sync it up with mana. For example:

ifconfig mana0 -txcsum
ifconfig hn0 -tscsum

To enable or disable rx features, just applying on mana interface
would be sufficient.

Disabling txcsum imples disabling tso. Enabling tso when txcsum
is disabled will result in an error message in dmesg requesting
to enable txcsum first.

Above applies to ipv6 offloading features as well.

Tested by: whu
MFC after: 3 days
Sponsored by: Microsoft

9 months agoipfilter: Avoid allocating a new ipf token when not needed
Cy Schubert [Tue, 12 Sep 2023 20:29:29 +0000 (13:29 -0700)]
ipfilter: Avoid allocating a new ipf token when not needed

Only allocate a new ipftoken_t if one cannot be found. This eliminates
allocating unnecessary token structures that will never be used when
performing simple lookups for existing token structures.

MFC after: 2 weeks

9 months agosctp: improve shutting down the read side of a socket
Michael Tuexen [Tue, 12 Sep 2023 23:33:54 +0000 (01:33 +0200)]
sctp: improve shutting down the read side of a socket

When shutdown(..., SHUT_RD) or shutdown(..., SHUT_RDWR) is called,
really clean up the read queue and issue an ungraceful shutdown if
user messages are affected.

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

9 months agoncurses: avoid hardcoded assumptions about the layout of .OBJDIR
Kyle Evans [Tue, 12 Sep 2023 21:00:45 +0000 (16:00 -0500)]
ncurses: avoid hardcoded assumptions about the layout of .OBJDIR

Abstract out the details of the FreeBSD build into a $TINFO_OBJDIR that
external builds can override if they orchestrate the build a bit
differently and have a different objdir layout as a result.  This makes
the ncurses build a little bit more flexible without requiring weird
backflips.

Reviewed by: bapt, sjg
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D41834

9 months agopowerpc_mmu_radix: include vm_radix.h file
Doug Moore [Tue, 12 Sep 2023 19:35:48 +0000 (14:35 -0500)]
powerpc_mmu_radix: include vm_radix.h file

Replacing _vm_radix.h with vm_radix.h in one header file leaves one
source file short of function definitions.  Include vm_radix.h in that
source file.

Fixes a problem rooted in change 429c871ddddac4bbf6abf1eb9e2e6603f87c2ef5.

9 months agotslog.4: fix typo
Piotr Pawel Stefaniak [Tue, 12 Sep 2023 19:10:08 +0000 (21:10 +0200)]
tslog.4: fix typo

9 months agosh: also auto-complete functions
Piotr Pawel Stefaniak [Sun, 30 Apr 2023 16:31:52 +0000 (18:31 +0200)]
sh: also auto-complete functions

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

9 months agosh: introduce a function to iterate over all hashed commands
Piotr Pawel Stefaniak [Sun, 30 Apr 2023 16:30:56 +0000 (18:30 +0200)]
sh: introduce a function to iterate over all hashed commands

While aliases and built-ins are opportunistically stored in cmdtable, each
function will be added to it immediately on definition.

Factor out the hashing function, write the iterator function and make it use
the hashing function.

Add the cmdname pointer to struct cmdentry so that the command name can be
exposed that way.

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

9 months agosh: tab-complete aliases
Piotr Pawel Stefaniak [Sat, 29 Apr 2023 20:38:50 +0000 (22:38 +0200)]
sh: tab-complete aliases

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

9 months agosh: introduce a function to iterate over all aliases
Piotr Pawel Stefaniak [Sat, 29 Apr 2023 20:23:59 +0000 (22:23 +0200)]
sh: introduce a function to iterate over all aliases

Currently the data structure holding alias information is opaque for
consumers outside alias.c and there is no way to iterate over all
aliases, which will become needed by a future commit.

The new function "iteralias" takes a null pointer to return the first
alias or an existing alias to return the next one, unless there is
no alias to return, in which case it returns a null pointer.

I slightly changed the static function hashalias so that it returns the
index into the array holding link heads, and not the link head directly.
In this form it's easier to use by iteralias and the slight adjustment
in the three existing callers doesn't look too bad.

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

9 months agosh: reindent a for loop in parser.c
Piotr Pawel Stefaniak [Sun, 1 Jan 2023 19:22:28 +0000 (20:22 +0100)]
sh: reindent a for loop in parser.c

Reduce indentation level before a commit that will add new code here.

Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D37926

9 months agoFix zfsd with the device_removal pool feature.
Alan Somers [Tue, 12 Sep 2023 01:20:39 +0000 (19:20 -0600)]
Fix zfsd with the device_removal pool feature.

Previously zfsd would crash in the presence of a pool with a
top-level-vdev that had previously been removed.  The crash happened
because the configuration nvlist of such a TLV contains an empty
ZPOOL_CONFIG_CHILDREN array, which led to a pop_front from an empty
list, which has undefined behavior.

The crash only happened in stable/14 and later, probably do to
differences in libcxx, but the change should be MFCed anyway.

PR: 273663
Reported by: Marek Zarychta <zarychtam@plan-b.pwste.edu.pl>
MFC after: 1 week
Sponsored by: Axcient
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D41818

9 months agosysctl(9): Fix typo translatation -> translation
Damien Broka [Mon, 11 Sep 2023 11:15:18 +0000 (12:15 +0100)]
sysctl(9): Fix typo translatation -> translation

MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/839

9 months agousbdi(9): Fix typo to simply -> to simplify
Damien Broka [Mon, 11 Sep 2023 11:12:27 +0000 (12:12 +0100)]
usbdi(9): Fix typo to simply -> to simplify

MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/839

9 months agopowerpc_pmap: include proper vm_radix file
Doug Moore [Tue, 12 Sep 2023 13:10:15 +0000 (08:10 -0500)]
powerpc_pmap: include proper vm_radix file

Like the pmap.h files for amd64, arm64, i386 and riscv, the one for powerpc
should #include vm/_vm_radix.h, not vm/vm_radix.h, to get a definition for
struct vm_radix.

Fixes a problem introduced with 429c871ddddac4bbf6abf1eb9e2e6603f87c2ef5.

9 months agopkgbase: Move headers and libs out of runtime and utilities
Doug Rabson [Mon, 11 Sep 2023 08:38:46 +0000 (09:38 +0100)]
pkgbase: Move headers and libs out of runtime and utilities

Headers from src/include were in the runtime-dev package but
subdirectories of src/include ended up in utilities-dev by default.
Neither package is a good choice - the headers in src/include are not
useful without the libraries contained in clibs-dev.

This moves the standard C headers to clibs-dev (C++ headers are already
in this package). While working on this, I found that various clang
libraries and headers were also bundled into utilities-dev by default
so these are also moved to clang-dev.

I also added a FreeBSD-build-essential meta package to make it simple to
install all the toolchain parts.

PR: 254173
Reviewed byb: manu
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D41815

9 months agolinux(4): Cleanup dummy syscall list on arm64
Dmitry Chagin [Tue, 12 Sep 2023 10:37:45 +0000 (13:37 +0300)]
linux(4): Cleanup dummy syscall list on arm64

These syscalls do not exist on arm64 Linux.

MFC after: 1 week

9 months agovm_radix: add a missing paren
Doug Moore [Tue, 12 Sep 2023 09:19:51 +0000 (04:19 -0500)]
vm_radix: add a missing paren

429c871ddddac4bbf6abf1eb9e2e6603f87c2ef5 left parens unbalanced in a
powerpc case that my testing missed.  Restore balance.

Reported by: jenkins

9 months agoradix_trie: have vm_radix use pctrie code
Doug Moore [Tue, 12 Sep 2023 07:42:38 +0000 (02:42 -0500)]
radix_trie: have vm_radix use pctrie code

Implement everything currently in vm_radix.c with calls to functions
in subr_pctrie.c, asccessed via the interface provided by the
DEFINE_PCTRIE_SMR macro.

Add back some #includes removed in the first attempt, and avoid the
use of a discontinued type in a bit of conditionally compiled code.

Reviewed by: alc, markj
Tested by: pho
Differential Revision: https://reviews.freebsd.org/D41344

9 months agono trailing dot (".") for FreeBSD releases
Wolfram Schneider [Tue, 12 Sep 2023 06:42:47 +0000 (06:42 +0000)]
no trailing dot (".") for FreeBSD releases
PR: 273690

9 months agoDisable byteswap.h for now.
Xin LI [Tue, 12 Sep 2023 06:24:08 +0000 (23:24 -0700)]
Disable byteswap.h for now.

Ideally we should be testing __FreeBSD_version (1400079) and/or
BOOTSTRAPPING from an older version, but restore compatibility to
older FreeBSD versions and macOS while we find out a better way to
fix it.

9 months agolib/libc/amd64/string/strcspn.S: fix behaviour with sets of 17--32
Robert Clausecker [Mon, 11 Sep 2023 23:56:30 +0000 (19:56 -0400)]
lib/libc/amd64/string/strcspn.S: fix behaviour with sets of 17--32

When a string is matched against a set of 17--32 characters, each chunk
of the string is matched first against the first 16 characters of the
set and then against the remaining characters.  We also check at the
same time if the string has a nul byte in the current chunk, terminating
the search if it does.

Due to misconceived logic, the order of checks was "first half of set,
nul byte, second half of set", meaning that a match with the second half
of the set was ignored when the string ended in the same 16 bytes.
Reverse the order of checks to fix this problem.

Sponsored by: The FreeBSD Foundation
Approved by: mjg (blanket, via IRC)
MFC after: 1 week
MFC to: stable/14

9 months agosiftr: flush pkt_nodes to the log file in batch
Cheng Cui [Tue, 25 Jul 2023 13:53:55 +0000 (09:53 -0400)]
siftr: flush pkt_nodes to the log file in batch

Reviewed by: rscheff, tuexen
Differential Revision: https://reviews.freebsd.org/D41175

9 months agolinux(4): Cleanup includes under amd64/linux32
Dmitry Chagin [Mon, 11 Sep 2023 18:29:40 +0000 (21:29 +0300)]
linux(4): Cleanup includes under amd64/linux32

No functional changes.

MFC after: 1 week

9 months agolinux(4): Cleanup includes under amd64/linux
Dmitry Chagin [Mon, 11 Sep 2023 18:29:34 +0000 (21:29 +0300)]
linux(4): Cleanup includes under amd64/linux

No functional changes.

MFC after: 1 week

9 months agolinux(4): Cleanup includes under arm64
Dmitry Chagin [Mon, 11 Sep 2023 18:29:28 +0000 (21:29 +0300)]
linux(4): Cleanup includes under arm64

No functional changes.

MFC after: 1 week

9 months agostand/loader.efi: fix regression with ignoring nvstore
Gleb Smirnoff [Mon, 11 Sep 2023 18:04:48 +0000 (11:04 -0700)]
stand/loader.efi: fix regression with ignoring nvstore

To read/update the boot loader nvstore, we always need to call
zfs_attach_nvstore() regardless of whether we use bootonce key
in nvstore or the bootfs property of the pool.  The call was
unintentionally left in the block of code that is processed
only when bootonce key is present.

In particular this fixes broken 'nextboot -k'.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D41795
Fixes: e3e2681d0ec28d6661fef6da76c9479049e2761c

9 months agopkg: use https by default
Baptiste Daroussin [Thu, 8 Jun 2023 21:37:58 +0000 (23:37 +0200)]
pkg: use https by default

Switch the repository to use https by default, base is providing a CA
root bundle suitable to validate the certificates used by the project.
This can now be activated without requiring another packages to be installed

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

9 months agoLinuxKPI: skbuff: remove assumption about mac_header
Bjoern A. Zeeb [Fri, 8 Sep 2023 12:47:03 +0000 (12:47 +0000)]
LinuxKPI: skbuff: remove assumption about mac_header

It seems the mac_header can be set to offset 0 for frames received.
Remove the warning splattering messages to the console for each packet.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

9 months agotools/wlanstats: fix -Wunused-but-set-variable
Bjoern A. Zeeb [Mon, 11 Sep 2023 14:11:52 +0000 (14:11 +0000)]
tools/wlanstats: fix -Wunused-but-set-variable

The "allnodes" code is currently #if 0 so also #if 0 the setting of the
command line option and variable in order to keep wlanstats compiling.

Sponsored by: The FreeBSD Foundation
MFC after: 10 days