Commit Graph

285678 Commits

Author SHA1 Message Date
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
Konstantin Belousov
28b36ecf99 Revert "exit1(): Revert sparc64 workaround"
This reverts commit 96c76d9306.

There are other relatively common reasons why init might get killed
during reboot, the workaround was really not sparc64-specific.

Discussed with:	marius
Sponsored by:	The FreeBSD Foundation
2023-08-09 09:00:20 +03:00
Konstantin Belousov
21a52f9944 libc dlfcn.c: make dl_iterate_phdr() from libc more useful
Apparently there are applications that resolve dl_iterate_phdr from libc
and try to call the symbol. Our libc only provides stubs for dl* to
satisfy static linker or statically linked binaries, and is not prepared
to this situation.

Add a code to dso libc to find real dl_iterate_phdr and redirect the
call to it.

Reported by:	yuri
PR:	272992
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2023-08-09 08:07:05 +03:00
Konstantin Belousov
0f613ab85e tmpfs: add a knob to enable pgcache read for mount
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D41334
2023-08-09 06:54:15 +03:00
Konstantin Belousov
821dec4d56 vnode io: request range-locking when pgcache reads are enabled
PR:	272678
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D41334
2023-08-09 06:54:15 +03:00
Konstantin Belousov
651fdc3d19 Revert "vnode read(2)/write(2): acquire rangelock regardless of do_vn_io_fault()"
This reverts commit 5b353925ff.

The reason is the lesser scalability of the vnode' rangelock comparing
with the vnode lock.

Requested by:	mjg
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D41334
2023-08-09 06:54:15 +03:00
Ed Maste
07d3738b82 soxstack: silence GCC warning
Add parens around _STACK_FLAG_GROWS expression to fix GCC warning about
arithmetic in operand of '|'.

Sponsored by:	The FreeBSD Foundation
2023-08-08 21:15:19 -04:00
Kirk McKusick
6dff61a1d1 Rate limit kernel UFS/FFS cylinder group check-hash error messages.
When a large file is deleted or a large number of files are deleted,
even a single cylinder group with a bad check hash can generate
thousands of check-hash warnings. As with other filesystem messages
such as out-of-space, print a maximum of one check-hash error per
second. Note the limit is per filesystem. If two filesystems have
cylinder group(s) with a bad check hash, each will print a maximum
of one check-hash error message per second.

MFC-after:    1 week
Sponsored-by: The FreeBSD Foundation
2023-08-08 17:11:04 -07:00
Dmitry Chagin
76f28f656e tests: Fix build after 8920c5f2
MFC after:		2 weeks
2023-08-09 00:39:35 +03:00
R. Christian McDonald
9f2cddd261 ping: use the in6_addr buffer when parsing src address as AF_INET6
Reviewed by:	kp
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2023-08-08 23:21:49 +02:00
Marius Strobl
76fc279f1b ObsoleteFiles.inc: Correct typo
Fixes:	37c8ee8847 ath(4): Remove MIPS AHB frontend and join PCI one w/ main support again
2023-08-08 22:52:16 +02:00
Marius Strobl
37c8ee8847 ath(4): Remove MIPS AHB frontend and join PCI one w/ main support again
Following the removal of general MIPS support, there's no longer a need
to have the AHB bus-frontend in place, which according to Linux sources
also isn't used with any non-MIPS SoCs. For simplicity, PCI bus support
is only made conditional on the main one again, i. e. device ath_pci is
removed, and built into the main module, i. e. if_ath_pci.ko obsoleted,
respectively.
Effectively, this reverts the following commits and associated changes:
dba9c85977
e849bb3ecb

Approved by:	adrian
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D41354
2023-08-08 22:30:13 +02:00
Stephen J. Kiernan
458e0c1b66 local.sys.dirdeps.mk: Allow CROSS_TARGET_FLAGS to be overridden
Use ?= when setting CROSS_TARGET_FLAGS so we do not override it
if another file already has set it.

Reviewed by:	sjg
Obtained from:	Juniper Networks, Inc.
2023-08-08 16:11:27 -04:00
Warner Losh
09c20a2932 nvme: Move bools to fill hole
The two bools in nvme_request create a 6 byte hole today. Move them to
after retires to fill the 4 byte hole there and add a spare[2] to make
nvme_request 8 bytes smaller. spare[2] isn't strictly necessary, but
documents how many bytes we have left in that hole, as the number of
booleans will increase shortly.

Suggested by:		chuck
Sponsored by:		Netflix
2023-08-08 11:44:51 -06:00
Warner Losh
3e1f69523b modules: Use MACHINE_CPUARCH more
Replace two cases of MACHINE_ARCH with MACHINE_CPUARCH and also use
`aarch64` instead of the improper `arm64` for that test.

Noticed by:		Mark Millard
Sponsored by:		Netflix
2023-08-08 11:44:51 -06:00
Kyle Evans
2f489a509e libc: fix some overflow scenarios in vis(3)
The previous incarnation of this would call wcrtomb() on the destination
buffer, and only check for overflow *after* it's happened.
Additionally, the conversion error / VIS_NOLOCALE path also didn't check
for overflow, and the overflow check at the end didn't account for the
fact that we still need to write a NUL terminator afterward.

Start by only doing the multibyte conversion into mbdst directly if we
have enough buffer space to guarantee it'll fit.  An additional
MB_CUR_MAX buffer has been stashed on the stack to write into if we're
cutting it close at the end of the buffer, since we don't really have a
good way to determine the length of the wchar_t without just doing the
conversion.  We'll do the conversion into the buffer that's guaranteed
to fit, then copy it over if the copy won't overflow.

The byte-for-byte overflow is a little bit easier, as we simply check
for overflow with each byte written and make sure we can still NUL
terminate after.

Tests added to exercise these edge cases.

Reviewed by:	des
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D41328
2023-08-08 12:01:52 -05:00
Dmitry Chagin
8920c5f2a1 tests: Add stack grows tests
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D41320
MFC after:		2 weeks
2023-08-08 18:12:09 +03:00
Mike Karels
58a46cfd75 md driver compat32: fix structure padding for arm, powerpc
Because the 32-bit md_ioctl structure contains 64-bit members, arm
and powerpc add padding to a multiple of 8.  i386 doesn't do this.
The md_ioctl32 definition was correct for amd64/i386 without padding,
but wrong for arm64 and powerpc64.  Make __packed__ conditional on
__amd64__, and test for the expected size on non-amd64.  Note that
mdconfig is used in the ATF test suite.  Note, I verified the
structure size for powerpc, but was unable to test.

MFC after:	1 week
Reviewed by:	jrtc27
Differential Revision:	https://reviews.freebsd.org/D41339
Discussed with:	jhibbits
2023-08-08 09:09:03 -05:00
Emmanuel Vadot
ddefad7c4f arm64: rockchip: Tweak i2c, pmic and iodomain order
We need i2c first to set it to MIDDLE, then we need one of the pmics
so set them to LATE, only then we can attach iodomain which needs some
regulators exposed by the pmic so set it to LAST.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
2023-08-08 15:58:26 +02:00
Emmanuel Vadot
4b5f5fe78f arm64: intel: Remove firmware driver
This is now covered by ofw_firmware.

Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D37613
2023-08-08 15:13:33 +02:00
Emmanuel Vadot
fdfd3a90b6 ofw: Add a ofw_firmware driver
Some SoCs have an external firmware doing power management, clock
and other stuffs. (Xilinx, ARM Juno etc ...)
The way it is represent in the DTB is usually having a 'firmware' node
under the root node and have some nodes under it with the correct
compatible strings.
The firmware node itself doesn't have any compatible strings.
This driver is simple subclassed from simplebus and attaches at
BUS_PASS_BUS + BUS_PASS_ORDER_MIDDLE so early drivers (like clock drivers)
can still have a change to attach early.

Reviewed by:	andrew
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D37612
2023-08-08 15:13:31 +02:00
Michael Tuexen
9ade2745db sctp: remove duplicate code
No functional change intended.

MFC after:	1 week
2023-08-08 13:05:39 +02:00
Michael Tuexen
c7587f7a3f sctp: cleanup
No functional change intended.

MFC after:	1 week
2023-08-08 12:40:51 +02:00
Andrey V. Elsukov
600bf006d3 carp: delete interface routes on link loss.
Obtained from:	Yandex LLC
MFC after:	10 days
Sponsored by:	Yandex LLC
Differential Revision: https://reviews.freebsd.org/D41290
2023-08-08 13:22:10 +03:00