]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/log
FreeBSD/FreeBSD.git
8 months agolocal-unbound: remove stray config.h.in backup
Mina Galic [Wed, 20 Sep 2023 14:39:37 +0000 (07:39 -0700)]
local-unbound: remove stray config.h.in backup

despite being ignored in our main .gitignore, such files can still be
merged from vendor branches.

Reviewed by: cy
Fixes: 8f76bb7dad (unbound: Vendor import 1.18.0)
MFC after: 2 weeks
X-MFC with: 8f76bb7dad
Differential Revision: https://reviews.freebsd.org/D41920

8 months agomakefs: remove ISO9660 Archimedes extension support
Ed Maste [Thu, 30 Mar 2023 16:30:44 +0000 (12:30 -0400)]
makefs: remove ISO9660 Archimedes extension support

We have no need to create ISO images with RISC OS specific metadata.

Reviewed by: imp
Relnotes: yes
Obtained from: OpenBSD a435da44c07f
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39344

8 months agoAdd deprecation notices to publickey(5) tools
Ed Maste [Wed, 20 Sep 2023 11:31:14 +0000 (07:31 -0400)]
Add deprecation notices to publickey(5) tools

Reviewed by: imp, manu
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40144

8 months agorelease: stop generating mergemaster databases
Ed Maste [Sat, 9 Sep 2023 13:19:11 +0000 (09:19 -0400)]
release: stop generating mergemaster databases

mergemaster was deprecated some time ago and will be removed from
FreeBSD 15.

Reviewed by: imp
Relnotes: Yes
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D41797

8 months agoroute(8): fix `route not found` exit code and warn with netlink
R. Christian McDonald [Tue, 19 Sep 2023 16:46:49 +0000 (18:46 +0200)]
route(8): fix `route not found` exit code and warn with netlink

Fix route(8) incorrectly returning a zero exit code even when unable to
find the specified route with route -n get <route>.

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

8 months agolibfido2: update to 1.13.0
Ed Maste [Tue, 19 Sep 2023 17:06:12 +0000 (13:06 -0400)]
libfido2: update to 1.13.0

Some highlights from NEWS entries:

 ** Improved OpenSSL 3.0 compatibility.
 ** Support for hidraw(4) on FreeBSD; gh#597.
 ** Improved support for FIDO 2.1 authenticators.

PR: 273596
Relnotes: Yes
Sponsored by: The FreeBSD Foundation

8 months agolibfido2: backport hidraw(4) support
Ed Maste [Tue, 19 Sep 2023 16:50:13 +0000 (12:50 -0400)]
libfido2: backport hidraw(4) support

PR: 273596
Submitted by: David Horn
Obtained from: libfido2 2c9dfaae2a56930160388700

8 months agopsm: recognize post-IBM trackpoints on Thinkpads
Gleb Smirnoff [Tue, 19 Sep 2023 16:41:04 +0000 (09:41 -0700)]
psm: recognize post-IBM trackpoints on Thinkpads

Newer Thinkpads come with trackpoints from different vendors.  They
are mostly compatible with the original one.  Not sure all features
are going to work, but at least this fixes resume operation.

Tested on: Thinkpad X1 Carbon 7th Gen
Reviewed by: wulf, imp
Diffrential Revision: https://reviews.FreeBSD.org/D41871

8 months agosqlite3: Vendor import of sqlite3 3.43.1
Cy Schubert [Tue, 19 Sep 2023 15:06:50 +0000 (08:06 -0700)]
sqlite3: Vendor import of sqlite3 3.43.1

Release notes at https://www.sqlite.org/releaselog/3_43_1.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz

MFC after:      2 weeks

Merge commit 'fa2bb1440e13602676feec708ac7a9a3bb5ce5c8' into main

8 months agoCleanup pthread locks in ofed RDMA verbs
Sean Lim [Mon, 18 Sep 2023 23:56:30 +0000 (18:56 -0500)]
Cleanup pthread locks in ofed RDMA verbs

On FreeBSD, pthread mutex, cond, and spinlocks allocate memory.  On
Linux-based systems, these calls do not allocate memory.  So there was a
safe assumption that the ofed RDMA verb calls do not need to explicitly
destroy the pthread locks.  This assumption is false on FreeBSD.  So let
us rearrange the code to cleanup the pthread locks.

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

8 months agosqlite3: Vendor import of sqlite3 3.43.1
Cy Schubert [Tue, 19 Sep 2023 13:43:12 +0000 (06:43 -0700)]
sqlite3: Vendor import of sqlite3 3.43.1

Release notes at https://www.sqlite.org/releaselog/3_43_1.html.

Obtained from:  https://www.sqlite.org/2023/sqlite-autoconf-3430100.tar.gz

8 months agodummynet: fix comment typo
Igor Ostapenko [Tue, 19 Sep 2023 11:18:36 +0000 (14:18 +0300)]
dummynet: fix comment typo

Signed-off-by: Igor Ostapenko <pm@igoro.pro>
Pull-request: https://github.com/freebsd/freebsd-src/pull/848

8 months agoObsoleteFiles: cleanup more old libclang_rt files for powerpc64le
Dimitry Andric [Tue, 19 Sep 2023 11:45:57 +0000 (13:45 +0200)]
ObsoleteFiles: cleanup more old libclang_rt files for powerpc64le

PR: 273776
MFC after: 3 days

8 months agoping: The -C option is also supported for IPv6.
Dag-Erling Smørgrav [Tue, 19 Sep 2023 08:47:11 +0000 (10:47 +0200)]
ping: The -C option is also supported for IPv6.

MFC after: 3 days
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Reviewed by: rscheff, allanjude
Differential Revision: https://reviews.freebsd.org/D41881

8 months agounbound: Vendor import 1.18.0
Cy Schubert [Tue, 19 Sep 2023 04:17:09 +0000 (21:17 -0700)]
unbound: Vendor import 1.18.0

Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/

MFC after:      2 weeks

Merge commit '401770e05c71ecb5ae61a59d316069b4b78bf622' into main

8 months agotmpfs.5: Document option export
Mateusz Piotrowski [Mon, 18 Sep 2023 21:58:08 +0000 (23:58 +0200)]
tmpfs.5: Document option export

This is a no-op option supported for the sake of NFS.

MFC after: 7 days

8 months agotmpfs.5: Document option union
Mateusz Piotrowski [Mon, 18 Sep 2023 20:29:09 +0000 (21:29 +0100)]
tmpfs.5: Document option union

As noted in 59169d915600333b7d9187097f157865ba642256,
tmpfs(5) supports the union option just fine.

MFC after: 7 days

8 months agotmpfs.5: Document option nomtime
Mateusz Piotrowski [Mon, 18 Sep 2023 19:51:50 +0000 (20:51 +0100)]
tmpfs.5: Document option nomtime

Fixes: c1e84733ac7e tmpfs: add nomtime mount option,
MFC after: 7 days

8 months agotmpfs.5: Document option nosymfollow
Mateusz Piotrowski [Mon, 18 Sep 2023 19:43:15 +0000 (20:43 +0100)]
tmpfs.5: Document option nosymfollow

Fixes: 15df90218bb6 tmpfs: support the nosymfollow mount option
MFC after: 7 days

8 months agotmpfs.5: Document option pgread
Mateusz Piotrowski [Mon, 18 Sep 2023 19:38:53 +0000 (20:38 +0100)]
tmpfs.5: Document option pgread

Fixes: 765ad5b28d3f tmpfs: add the "pgread" mount option
MFC after: 7 days

8 months agotmpfs.5: Sort option descriptions
Mateusz Piotrowski [Mon, 18 Sep 2023 19:31:24 +0000 (20:31 +0100)]
tmpfs.5: Sort option descriptions

MFC after:  3 days

8 months agotmpfs.5: Keep the style of option descriptions consistent
Mateusz Piotrowski [Mon, 18 Sep 2023 19:29:42 +0000 (20:29 +0100)]
tmpfs.5: Keep the style of option descriptions consistent

MFC after: 3 days

8 months agotmpfs.5: Fix the use of Bl
Mateusz Piotrowski [Mon, 18 Sep 2023 19:24:22 +0000 (20:24 +0100)]
tmpfs.5: Fix the use of Bl

MFC after: 3 days

8 months agoat.man: Move examples to the EXAMPLES section
Mateusz Piotrowski [Mon, 18 Sep 2023 19:17:52 +0000 (20:17 +0100)]
at.man: Move examples to the EXAMPLES section

MFC after: 3 days

8 months agoat.man: Fix mdoc(7) macro usage
Mateusz Piotrowski [Mon, 18 Sep 2023 19:12:31 +0000 (20:12 +0100)]
at.man: Fix mdoc(7) macro usage

MFC after: 3 days

8 months agorc.conf.5: Document <name>_setup
Mateusz Piotrowski [Mon, 18 Sep 2023 18:53:45 +0000 (19:53 +0100)]
rc.conf.5: Document <name>_setup

Fixes: c9be47b34dd8 rc: add ${name}_setup script support
MFC after: 3 days

8 months agorc.conf.5: Pet mdoc linters
Mateusz Piotrowski [Mon, 18 Sep 2023 18:47:10 +0000 (19:47 +0100)]
rc.conf.5: Pet mdoc linters

MFC after: 3 days

8 months agodaemon.8: Document -u sets HOME, USER, and SHELL
Mateusz Piotrowski [Mon, 18 Sep 2023 18:17:55 +0000 (19:17 +0100)]
daemon.8: Document -u sets HOME, USER, and SHELL

Fixes: 6b3ad1d73732 When -u option is used also set USER, HOME and SHELL
MFC after: 3 days

8 months agodaemon.8: Sort options in DESCRIPTION
Mateusz Piotrowski [Mon, 18 Sep 2023 18:40:23 +0000 (19:40 +0100)]
daemon.8: Sort options in DESCRIPTION

MFC after: 3 days

8 months agodaemon.8: Use Cm where appropriate
Mateusz Piotrowski [Mon, 18 Sep 2023 18:36:33 +0000 (19:36 +0100)]
daemon.8: Use Cm where appropriate

MFC after: 3 days

8 months agodaemon.8: Use Dv for signal names
Mateusz Piotrowski [Mon, 18 Sep 2023 18:28:27 +0000 (19:28 +0100)]
daemon.8: Use Dv for signal names

MFC after: 3 days

8 months agobsdinstall.8: Document BSDINSTALL_SKIP_* variables
Mateusz Piotrowski [Mon, 18 Sep 2023 18:11:30 +0000 (19:11 +0100)]
bsdinstall.8: Document BSDINSTALL_SKIP_* variables

Fixes: 17f4ded55180 bsdinstall: add variables to allow skipping
MFC after: 3 days

8 months agobsdinstall.8: Set Bl's -width correctly
Mateusz Piotrowski [Mon, 18 Sep 2023 17:49:57 +0000 (18:49 +0100)]
bsdinstall.8: Set Bl's -width correctly

MFC after: 3 days

8 months agodrm2: whack set-but-not-used warns
Mateusz Guzik [Mon, 18 Sep 2023 21:11:26 +0000 (21:11 +0000)]
drm2: whack set-but-not-used warns

8 months agovirtio: remove virtio_alloc_virtqueues' flags arg
Mina Galić [Mon, 18 Sep 2023 20:02:42 +0000 (22:02 +0200)]
virtio: remove virtio_alloc_virtqueues' flags arg

Summary:
the flags argument is unused.
Its initial design idea has been superceded by the addition of
virtio_setup_intr and related APIs.

Sponsored by: The FreeBSD Foundation

Reviewers: bryanv

Reviewed By: bryanv

Subscribers: cognet, imp

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

8 months agovirtio: use bool for boolean functions
Mina Galić [Mon, 18 Sep 2023 20:02:37 +0000 (22:02 +0200)]
virtio: use bool for boolean functions

Summary:
these static functions:
- vq_ring_use_indirect

and these public functions:
- virtio_bus_is_modern
- virtio_with_feature
- virtqueue_empty
- virtqueue_full

exclusively return a boolean value.
Change their return values to bool.

Sponsored by: The FreeBSD Foundation

Reviewers: bryanv

Reviewed By: bryanv

Subscribers: cognet, imp

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

8 months agounbound: Vendor import 1.18.0
Cy Schubert [Mon, 18 Sep 2023 19:59:52 +0000 (12:59 -0700)]
unbound: Vendor import 1.18.0

Release notes at
    https://www.nlnetlabs.nl/news/2023/Aug/30/unbound-1.18.0-released/

8 months agoUpdate jobs.mk to leverage -jC
Simon J. Gerraty [Mon, 18 Sep 2023 18:40:07 +0000 (11:40 -0700)]
Update jobs.mk to leverage -jC

With bmake-20230909 we can use -j1.5C to use 1.5*ncpu
bmake will set .MAKE.JOBS.C=yes if this is supported,
and in that case jobs.mk will use JOB_MAX_C as default for JOB_MAX.

Remove logic from local.sys.mk which is now handled by jobs.mk

Also use latest dirdeps-targets.mk and meta.{autodep,subdir}.mk

8 months agondp: cope with unresolved neighbours
Kristof Provost [Mon, 18 Sep 2023 17:01:17 +0000 (19:01 +0200)]
ndp: cope with unresolved neighbours

If we've not (yet) resolved a neighbour nda_lladdr will be NULL, and
NLA_DATA_LEN(neigh->nda_lladdr) will dereference a NULL pointer.

Avoid that by checking nda_lladdr first, and only dereferencing if it's
not NULL.

Test case:
ping6 -c 1 <non-existant neighbour>
ndp -a

Reviewed by: melifaro
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D41903

8 months agolinux(4): On Linux SIGKILL can not be reset to default
Dmitry Chagin [Mon, 18 Sep 2023 14:53:01 +0000 (17:53 +0300)]
linux(4): On Linux SIGKILL can not be reset to default

MFC after: 1 week

8 months agolinux(4): Staticize lsiginfo_to_siginfo
Dmitry Chagin [Mon, 18 Sep 2023 14:52:43 +0000 (17:52 +0300)]
linux(4): Staticize lsiginfo_to_siginfo

It's not used outside of linux_signal.c
While here fix the indentation.

MFC after: 1 week

8 months agoif_cgem: Rewrite clock part
Emmanuel Vadot [Thu, 14 Sep 2023 08:57:19 +0000 (10:57 +0200)]
if_cgem: Rewrite clock part

 - pclk and hclk are mandatory so always try to get them.
   Don't make it fatal if it fails as some platform (like Zynq) don't
   have a proper clock driver.
 - Always use pclk for the reference clock.
 - Try to get all the possible clocks and enable them.

Reviewed-by: mhorne
Tested-by: Milan Obuch <bsd@dino.sk>
Differential Revision: https://reviews.freebsd.org/D41857
Sponsored by: Beckhoff Automation GmbH & Co. KG

8 months agoif_cgem: Cleanup compatible and add new ones
Emmanuel Vadot [Tue, 12 Sep 2023 14:49:37 +0000 (16:49 +0200)]
if_cgem: Cleanup compatible and add new ones

- Remove cdns,gem, it's the generic binding but for all platform that include
  this one we need specific drivers setup so remove it.
- Remove cdns,macb, it's the generic binding for Atmel AT91 which we don't suport
- Remove cadence,gem, it's not an official binding and seems to be only used in some
  obscure ARM11 SoC.
- Note that the cdns,zynq* are deprecated
- Add the new Xilinx compatible for zynq and zynqmp

Reviewed-by: mhorne
Tested-by: skibo, Milan Obuch <bsd@dino.sk>
Differential Revision: https://reviews.freebsd.org/D41856
Sponsored by: Beckhoff Automation GmbH & Co. KG

8 months agosdhci: fdt: Correctly export clock per the binding
Emmanuel Vadot [Wed, 6 Sep 2023 15:54:47 +0000 (17:54 +0200)]
sdhci: fdt: Correctly export clock per the binding

The binding says that we can have one or two clocks to export.
The first one is the actual sdclock while the second is the sample clock.
Both have the same parent, clk_xin.
Correctly export the clocks for RK3399 and ZynqMP.
No need to use a high ID as before, we have our own clock domain so use
ids starting at 1 as all exported clocks should be.

Reviewed-by: bz
Differential Revision: https://reviews.freebsd.org/D41810
Sponsored by: Beckhoff Automation GmbH & Co. KG

8 months agosdhci: fdt: Always try to get the phy and the syscon
Emmanuel Vadot [Wed, 6 Sep 2023 09:28:11 +0000 (11:28 +0200)]
sdhci: fdt: Always try to get the phy and the syscon

Per the bindings the phy and the syscon can always be present not just
for RK3399.

Reviewed-by: bz
Differiential Revision: https://reviews.freebsd.org/D41809
Sponsored by: Beckhoff Automation GmbH & Co. KG

8 months agosdhci: fdt: Always enable clock for ZynqMP and RK3399
Emmanuel Vadot [Wed, 6 Sep 2023 09:07:00 +0000 (11:07 +0200)]
sdhci: fdt: Always enable clock for ZynqMP and RK3399

Those two (in fact all of the supported one in this driver except RK3568) always
needs the clocks to be enabled.

Reviewed-by: bz
Differential Revision: https://reviews.freebsd.org/D41808
Sponsored by: Beckhoff Automation GmbH & Co. KG

8 months agosdhci: fdt: Remove sdhci_generic compatible string
Emmanuel Vadot [Wed, 6 Sep 2023 08:59:18 +0000 (10:59 +0200)]
sdhci: fdt: Remove sdhci_generic compatible string

This was used when we had our own DTS, it's not used anymore.

Reviewed-by: bz
Differential Revision: https://reviews.freebsd.org/D41807
Sponsored by: Beckhoff Automation GmbH & Co. KG

8 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

8 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

8 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

8 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

8 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

8 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.

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

Merge commit '1012cf15f75d1e9048779abd07270a37cdba590a'

8 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

8 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.

8 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.

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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

8 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.

8 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

8 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

8 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

8 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

8 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

8 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/

8 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

8 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

8 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.

8 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

8 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

8 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

8 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

8 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.

8 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.

8 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

8 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

8 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

8 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

8 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

8 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.

8 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

8 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.

8 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

8 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

8 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

8 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

8 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.

8 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