Commit Graph

285651 Commits

Author SHA1 Message Date
Glen Barber
136fc49561 release: update main to ALPHA1
Update CURRENT to ALPHA1 as part of the 14.0-RELEASE cycle.

Approved by:	re (implicit)
Sponsored by:	GoFundMe https://www.gofundme.com/f/gjbbsd
Sponsored by:	PayPal https://paypal.me/gjbbsd
2023-08-10 20:02:11 -04:00
Jessica Clarke
8aaa123089 Makefile.libcompat: Fix DTRACE variable
Back when Makefile.lib32 was turned into Makefile.libcompat, a typo was
introduced; it should have been LIBCOMPATDTRACE, but instead gained a
dollar sign in it as LIB$COMPATDTRACE (and with COMPATDTRACE not being
defined, was equivalent to ${LIB:U${DTRACE}}). This then meant it was
not converted to LIB${_LIBCOMPAT}DTRACE in 91d7edd549 ("Generalise
libcompat to be a list rather than a single option") and instead left
broken. Belatedly fix this long-standing seemingly-inconsequential bug.

Fixes:	dba75e9fa5 ("Move Makefile.lib32 to Makefile.libcompat and generalize it.")
2023-08-11 00:48:01 +01:00
Enji Cooper
c45e66dca3 Unbreak usr.bin/dc with OpenSSL 3
OpenSSL's BN_zero API has had a void return value since 1.1.x: chase the
change to unbreak the build on OpenSSL 3.x with MK_GH_BC == no.

MFC after:	2 weeks
Reviewed by:	emaste, kevans
Differential Revision:	https://reviews.freebsd.org/D41410
2023-08-10 23:33:44 -07:00
Rick Macklem
2409231121 mountd: Fix type of signal variable
Without this patch got_sighup(), which is the SIGHUP handler,
would set a variable of type int.

This would appear to be incorrect, although it has worked reliably.
This patch changes the type to "_Atomic(int)", which appears
to be all that is needed to correct it.

Reported by:	pen@lysator.lui.se
Reviewed by:	theraven, karels (prev version), kevans (prev version)
Differential Revision:	https://reviews.freebsd.org/D41265
2023-08-10 12:50:35 -07:00
John Baldwin
9795f14ec4 netlink: Align allocations on __max_align_t, not uint64_t.
uint64_t is not sufficient alignment for allocators on all platforms.
On a CHERI platform pointers require 16 byte alignment, but also if a
type contained a uint128_t or long double it would not be aligned
correctly either.  C11 added max_align_t precisely to provide a
portable type for allocators to use.

Reviewed by:	melifaro
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D41301
2023-08-10 11:12:52 -07:00
Kyle Evans
2bd446d7f1 kern: osd: avoid dereferencing freed slots
If a slot is freed that isn't the last one, we'll set its destructor to
NULL to indicate that it's been freed and leave a hole in the slot map.
Check osd_destructors in osd_call() to avoid dereferencing a method that
is potentially from a module that's been unloaded.

This scenario would most commonly surface when two modules are loaded
that osd_register(), then the earlier one deregisters and an osd_call()
is made after the fact.  In the specific report that triggered the
investigation, kldload if_wg -> kldload linux* -> kldunload if_wg ->
destroy a jail -> panic.

Noted in the review, but left for follow-up work, is that the realloc
that may happen in osd_deregister() should likely go away and the
assumption that reallocating to a smaller size cannot fail is actually
not correct.

Reported by:	dim
Reviewed by:	markj, jamie
Differential Revision:	https://reviews.freebsd.org/D41404
2023-08-10 12:33:26 -05:00
Chuck Silvers
60a41168d1 UFS: panic rather than forcibly unmount the root fs
If the root fs is forcibly unmounted then basically every process
will die with a SEGV as soon as it tries to run again because libc.so
is gone, which leaves the system basically hung.  It seems better
to just panic instead, so let's do that.

Requested-by:	karels
Reviewed-by:	imp, mckusick, karels
Sponsored-by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D41387
2023-08-10 09:59:06 -07:00
Ed Maste
78f30535bc Vendor import of OpenSSH 9.4p1 2023-08-10 12:16:53 -04:00
Pierre Pronchery
aa79573457 OpenSSL: update to 3.0.10
OpenSSL 3.0.10 addresses:
- CVE-2023-3817
- CVE-2023-3446
- CVE-2023-2975

(Note that the vendor branch commit incorrectly referenced 3.0.9.)

Relnotes:	Yes
Pull request:	https://github.com/freebsd/freebsd-src/pull/808
Sponsored by:	The FreeBSD Foundation
2023-08-10 12:07:32 -04:00
Alan Somers
ec54a31423 ixl.4: update link to intel-nvmupdate ports
MFC after:	2 weeks
Sponsored by:	Axcient
Reviewed by:	pkubaj
Differential Revision: https://reviews.freebsd.org/D41288
2023-08-10 08:59:19 -06:00
Poul-Henning Kamp
4ff782c06a tcopy: Pick up max blocksize from sysctl kern.maxphys 2023-08-10 14:58:18 +00:00
Kevin Bowling
0eb8cd1de2 igc: sync srrctl buffer sizing with e1000
Approved by:	grehan
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31493
2023-08-10 07:43:16 -07:00
Piotr Pietruszewski
73fa89e041 ix: Fix accessing wrong register
Use IXGBE_GRC_BY_MAC(hw) macro instead of IXGBE_GRC as IXGBE_GRC's
address is different on Denverton platform.

This patch is part of change made in NetBSD kernel
by Masanobu Saitoh, NetBSD maintainer.

Differential Revision:	https://reviews.freebsd.org/D19175
Approved by:	erj
2023-08-10 15:43:21 +02:00
Martin Matuska
28d2e3b5de zfs: cherry-pick fix from openzfs
Vendor PR:
  #15103 Remove zl_issuer_lock from zil_suspend()

Obtained from:	OpenZFS
OpenZFS commit:	2848de11e516a2ef2e6baa574a60d77a6fb47023

Note: full vendor imports will continue when stable/14 has been branched
2023-08-10 10:11:52 +02:00
Martin Matuska
cd25b0f740 zfs: cherry-pick fix from openzfs
Vendor PR:
  #15080 ZIL: Fix config lock deadlock

Obtained from:	OpenZFS
OpenZFS commit:	2cb992a99ccadb78d97049b40bd442eb4fdc549d

Note: full vendor imports will continue when stable/14 has been branched
2023-08-10 09:56:53 +02:00
Corvin Köhne
29200a8133
bhyve: emulate TPM passthru by accessing /dev/tpmX
To send commands to the TPM device, bhyve can use the host TPM driver by
reading and writing from /dev/tpmX. Using this approach, only the host
TPM driver has to detect and interact with the physical TPM interface.
This simplifies bhyve's code much. As the host TPM driver has to
interact with the TPM regardless of bhyve making use of it or not, makes
it a good approach.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40460
2023-08-10 09:23:42 +02:00
Corvin Köhne
28dc1aa733
bhyve: add emulation for CRB register of TPM devices
Trap accesses to the CRB MMIO range and emulate them properly.

Reviewed by:		markj
MFC after:		1 week
Sponsored by:		Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D40459
2023-08-10 09:23:33 +02:00
Emmanuel Vadot
e758ed2dd5 sdhci: Add support for disable-wp
Some platform needs it when the WP pin is broken.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
2023-08-10 09:21:55 +02:00
Emmanuel Vadot
b426119a45 sdhci: xilinx: Add compatible and quirks for ZynqMP
Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
2023-08-10 09:21:55 +02:00
Emmanuel Vadot
c15106da82 arm64: xilinx: gpio: Add support for ZynqMP SoC
Add support for the gpio controller found in the ZynqMP SoC.
The registers are the same as the Zynq 7000, just the number of
banks/pins per banks differs.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
2023-08-10 09:21:55 +02:00
Emmanuel Vadot
b07fed8180 arm: xilinx: gpio: Make the driver more generic
All other Zynq SoCs have the same GPIO controller, the only difference
is the number of banks/pins so make this driver more generic to add
other SoCs more easily.
No functional changes intended.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
MFC after:	2 weeks
2023-08-10 09:21:55 +02:00
Konstantin Belousov
9da33e8d10 Update comment describing struct vm_map
There is no list connecting all entries any more, and correspondingly no
order on the list entries.

Reviewed by:	dougm
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D41405
2023-08-10 09:01:26 +03:00
Enji Cooper
811e0a31ac fusefs tests: handle -Wdeprecated* issues with GoogleTest 1.14.0
`INSTANTIATE_TEST_CASE_P` has been replaced with `INSTANTIATE_TEST_SUITE_P`.
Replace all uses of the former macro with the latter macro.

While here, address the fact that the latter macro doesn't permit some
of the constructions that the former macro did, e.g., empty parameters,
etc.

MFC after:	2 weeks
Reviewed by:	asomers
Differential Revision:	https://reviews.freebsd.org/D41398
2023-08-10 02:32:33 -07:00
Enji Cooper
28f6c2f292 Import GoogleTest 1.14.0
GoogleTest 1.14.0 now requires C++14 to build. Change
`googletest.test.inc.mk` to reflect this requirement.

Adjust the build integration logic to handle the new version of
GoogleTest (add/remove headers/sources as needed).

Tighten down warnings via `CXXFLAGS.clang` instead of ignoring all
warnings. Some new warnings snuck in after I did my last round of fix
submissions upstream.

Also address some overlinking added in the previous version import by
removing superfluous libraries.

===============================

Expect WhenDynamicCastToTest.AmbiguousCast to fail

This change reapplies the expected failure from 1.10.0.

Ref: https://github.com/google/googletest/issues/2172

MFC after:	2 weeks
Reviewed by:	asomers, emaste
Differential Revision:	https://reviews.freebsd.org/D41399

Merge commit '8ef491440fcaec96f899d73e08873426c78583a4' into googletest-v1.14.0-import
2023-08-10 02:32:33 -07:00
Kevin Bowling
9228ac3a69 ixgbe: Add support for 82599 LS
Obtained from:	DPDK 549ccd3dc01539e060597b503f2b65b272de3347
MFC after:	1 week
2023-08-09 18:31:39 -07:00
Kevin Bowling
8b4a3fbdd5 ixgbe: Check for fw_recovery
The x550 uses an upgradable flash code.  Check for recovery condition
like other flashable intel cards do in case of fw errors.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D31869
2023-08-09 17:38:00 -07:00
Bjoern A. Zeeb
517e0978db LinuxKPI: add page pool skeleton
Add the page pool skeleton based on a wireless driver.  We have to
sort out some struct page problems first before we can start
implementing this but that should happen independent of all other
changes.

MFC after:	10 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D40250
2023-08-10 00:05:48 +00:00
Kirk McKusick
c52b5d16cc Remove a partial UFS/FFS snapshot if it fails to build successfully.
When taking a UFS/FFS snapshot, it may not succeed for example if the
filesystem is too full to hold it. When a snapshot is unable to be
successfully taken, the partial snapshot should be removed.

Reported-by:  Peter Holm
Tested-by:    Peter Holm
MFC-after:    1 week
Sponsored-by: The FreeBSD Foundation
2023-08-09 16:44:24 -07:00
Colin Percival
219caac69a EC2: Build and upload AMIs for both UFS and ZFS
The pre-existing "ec2ami" target builds and uploads a single AMI
(with filesystem determined by ${VMFS}) as before; a new "ec2amis"
target does both UFS and ZFS.

Reviewed by:	gjb
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41343
2023-08-09 15:44:54 -07:00
Colin Percival
4c9c9b4b74 EC2: Respect ${VMFS}
Prior to this commit, ${VMFS} controlled the filesystem used for
building EC2 images, but the AMIs were recorded with SSM Parameter
paths which indicated that they were UFS.

This commit (a) uses ${VMFS} in the SSM parameter path instead of
a hard-coded "ufs", and (b) adds the filesystem to the AMI name.

Reviewed by:	gjb
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41342
2023-08-09 15:44:54 -07:00
Colin Percival
8dec47387b release: Build cloudware with multiple FS types
New ${CW}_FSLIST settings control the list of filesystem types with which
each cloudware image will be built; currently these are all set to "ufs",
i.e. no change from previous.

The cloudware images have their filesystem type as part of their file
name; for backwards compatibilty the ${VMFS} image is linked to the
previously used file name.  This compatibility can be removed once all
the cloudware uploading/publishing code has been updated to use the new
image names (possibly more than one of them).

Reviewed by:	gjb
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41341
2023-08-09 15:44:54 -07:00
Colin Percival
32ae9a6b39 release: Build UFS and ZFS VM images
A new option 'VMFSLIST' controls the list of filesystems for which VM
images will be built; the default is to build both UFS and ZFS.

The vm-install target installs these as ${OSRELEASE}-${FS}.${FORMAT},
e.g. FreeBSD-14.0-CURRENT-amd64-zfs.vmdk.  For backwards compatibility,
the ${VMFS} image is linked to the previously used ${OSRELEASE}.${FORMAT}
name.

Cloudware building will be updated in a later commit.

Reviewed by:	gjb
Reviewed by:	emaste, markj (previous version)
Sponsored by:	https://www.patreon.com/cperciva
Differential Revision:	https://reviews.freebsd.org/D41340
2023-08-09 15:44:54 -07:00
Ed Maste
cbf845052f msi: report error for attempt to use APIC ID > 255
The MSI/MSI-X address includes 8 bits to encode the Destination ID.
Previously IDs over 255 overlapped with the fixed portion of the
address, resulting in an invalid value (and a nonfunctional interrupt).

Instead, print an error message and return EINVAL.  The interrupt will
still not work, but the user will have a clue as to why.

PR:		273022
Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41395
2023-08-09 13:52:43 -04:00
Kevin Bowling
13da84237a e1000: Enable TSO on 82574
Further testing indicates something wrong with particular reciever,
enabling TSO 82574 for wider testing.

Tested by:	karels
MFC after:	3 months
2023-08-09 10:19:37 -07:00
Marius Strobl
8f5dbc22e5 arswitch(4): Remove support for AR{7240,9340} found in MIPS SoCs only
With the general removal of MIPS support there's no longer a need to
support these integrated switches.

Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D41394
2023-08-09 18:22:13 +02:00
Marius Strobl
077ef5b445 ath(4): Remove MIPS SoC build glue and AR9130 from FreeBSD HAL
All of these are obsoleted by the general removal of MIPS support.

Actually, corresponding to the removed AH_SUPPORT_x, there is more
superfluous support sprinkled across the HAL source. However, that
code is left in place for now in order to ease a sync to NetBSD.

Reviewed by:	emaste (w/ man page fix)
Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D41355
2023-08-09 17:44:46 +02:00
Emmanuel Vadot
0befc55cdf dts: Bump the freebsd branding version to 6.4
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-08-09 15:36:55 +02:00
Emmanuel Vadot
fac71e4e09 Import device-tree files from Linux 6.4
Sponsored by:   Beckhoff Automation GmbH & Co. KG
2023-08-09 15:32:31 +02:00
Emmanuel Vadot
c47d0ea183 Import device-tree files from Linux 6.4 2023-08-09 15:31:58 +02:00
Emmanuel Vadot
cb7aa33ac6 Import device-tree files from Linux 6.3
Sponsored by:   Beckhoff Automation GmbH & Co. KG
2023-08-09 15:30:56 +02:00
Emmanuel Vadot
4a8223f297 Import device-tree files from Linux 6.3 2023-08-09 15:30:20 +02:00
Emmanuel Vadot
8bab661a33 Import device-tree files from Linux 6.2
Sponsored by:   Beckhoff Automation GmbH & Co. KG
2023-08-09 15:29:14 +02:00
Emmanuel Vadot
c227958a72 Import device-tree files from Linux 6.2 2023-08-09 15:28:30 +02:00
Emmanuel Vadot
7ef62cebc2 Import device-tree files from Linux 6.1
Sponsored by:   Beckhoff Automation GmbH & Co. KG
2023-08-09 15:27:37 +02:00
Emmanuel Vadot
582be9a443 Import device-tree files from Linux 6.1 2023-08-09 15:06:51 +02:00
Marius Strobl
9cb4ee9a64 man4: Remove stale MLINK to ath_pci.4
Reported by:	Jose Luis Duran
Fixes:	37c8ee8847 ath(4): Remove MIPS AHB frontend and join PCI one w/ main support again
2023-08-09 14:35:25 +02:00
Mateusz Guzik
b8b33f3b3b vfs: retire NAMEI_DIAGNOSTIC
It is too spammy and information-deficient for practical use.

Also see https://reviews.freebsd.org/D41207
2023-08-09 10:37:13 +00:00
Emmanuel Vadot
393387820b arm64: rockchip: rk_i2c: Probe again at ORDER_LATE
The gic driver is also probed at this pass and depending on the order of
the nodes in the dts rk_i2c can be probed first and will fail, this is the
case for the rk3328 SoC.
The PMIC drivers are also probed at this pass but on the iicbus which is created
in rk_i2c so there is no order conflict here.

Fixes:		ddefad7c4f ("arm64: rockchip: Tweak i2c, pmic and iodomain order")
Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-08-09 10:50:04 +02:00
Michael Tuexen
85e5480df9 sctp: another cleanup
No functional change intended.

MFC after:	1 week
2023-08-09 04:17:52 +02:00
Doug Moore
15047a6509 rangesets: use PCTRIE_DEFINE
subr_rangeset.c is the only source file that calls functions like
pctrie_insert and pctrie_remove directly; other users of pctries use
the PCTRIE_DEFINE macro to define interfaces to pctrie that let them
ignore issues of offsets within structs and uint64_t return values.

Change subr_rangeset.c to use PCTRIE_DEFINE too. And change pctrie.h
to mark the lookup function as unused, to avoid warnings when
compiling files, like subr_rangeset.c, that don't invoke lookup().

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D41391
2023-08-09 02:26:25 -05:00