Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge FreeBSD 2024-05-10 #2207

Merged
merged 416 commits into from
Aug 26, 2024
Merged

Merge FreeBSD 2024-05-10 #2207

merged 416 commits into from
Aug 26, 2024

Conversation

bsdjhb
Copy link
Collaborator

@bsdjhb bsdjhb commented Aug 26, 2024

PR for CI

Paweł Krawczyk and others added 30 commits May 9, 2024 22:34
Add details on the format of system cron files, which are mentioned in
cron(8) which refers here but barely explained here.

Reviewed by: imp
Pull Request: freebsd/freebsd-src#1106
PR:		130238
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D45139
Reviewed by:	jhibbits, kevans
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45081
When releasing multiple CPUs that share a release address we need them
to wait for their turn to boot. Add a mechanism to do this by booting
them until they enable the TLB before waiting their turn to enter
init_secondary.

Reviewed by:	jhibbits, kevans
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45082
Ensure the spintable release address is written back from the cache
to memory. The other CPUs reading this may not be reading it with the
cache enabled so ensure it is written to the point of coherency
before issuing the wakeup sev.

As cpu_dcache_wbinv_range includes the needed barrier remove it from
the inline asm before the sev instruction.

Reviewed by:	jhibbits, kevans
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D45083
When searching for the PSCI FDT node we only check a few compat strings.
Use the existing compat_data array to check all strings the driver may
attach to.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44913
Some simulators have the ITS in the DTB passed to the kernel, however
it is a runtime configuration option to enable it.

Check the GICD_TYPER register to see if LPIs are enabled before
attaching the ITS driver.

Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D44914
The comment describing the page tables was out of date. Update it with
the current list.

Sponsored by:	Arm Ltd
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	oshogbo
Differential Revision:	https://reviews.freebsd.org/D45149
MFC after:	3 days
Sponsored by:	Klara, Inc.
PR:		278847
Sponsored by:	The FreeBSD Foundation
Starting with POSIX-1.2008, "The SA_RESETHAND, SA_RESTART, SA_SIGINFO,
SA_NOCLDWAIT, and SA_NODEFER constants are moved from the XSI option to
the Base." Make them so visible.

PR: 275328
Sponsored by:		Netflix
Add the stock BSD copyright and license from the 4.4-Lite distribution
(indirected by SPDX).

Sponsored by:		Netflix
In this case it is harmless since it is an array of pointers so the
resulting length is identical.

Reported by:	Coverity Scan
CID:		1545055
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:	 	1545054
Sponsored by:	Chelsio Communications
This is harmless but cleaner.

Reported by:	Coverity Scan
CID:	 	1545041,1545049
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:	 	1545048
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:	 	1545043
Sponsored by:	Chelsio Communications
This is leftover from an earlier iteration of the code where 'nt' was
not dynamically allocated but was the passed in 'ops' pointer so was
always alive.

Reported by:	Coverity Scan
CID:	 	1545042
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:		1492349
CID:		1493281
MFC after:	3 days
Reported by:	Coverity Scan
CID:		1492525
CID:		1493239
MFC after:	3 days
Summary:
In some cases the TPM utilities may read only a partial block, instead
of a full block.  If a new command starts while in the middle of a read
it may cause the TPM to go catatonic and no longer respond to SPI.

Reviewed by:	kd
Obtained from:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D45140
Though the kernel build expects ${.OBJDIR} to be equal to ${.CURDIR}
that may not always be the case.  Correctly generate fdt_static_dtb.h in
${.OBJDIR}, which is conceptually more correct anyway.

Obtained from:	Juniper Networks, Inc.
Reported by:	Coverity Scan
CID:		1493087
MFC after:	3 days
PR:		278666
Reviewed by:	Albin Hellqvist
MFC after:	3 days
Pull Request:	https://reviews.freebsd.org/D45107
Also ${XARGS_J} this allows use of non-BSD xargs when building
kernel modules.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45146
Instead of printing something like "MADT: Found CPU APIC ID 4294967295
ACPI ID 512: disabled" print the APIC ID as a singed int for a more
user-friendly -1.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45158
bsdimp and others added 28 commits August 26, 2024 15:33
Add the stock BSD copyright and license from the 4.4-Lite distribution
(indirected by SPDX).

Sponsored by:		Netflix
In this case it is harmless since it is an array of pointers so the
resulting length is identical.

Reported by:	Coverity Scan
CID:		1545055
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:	 	1545054
Sponsored by:	Chelsio Communications
This is harmless but cleaner.

Reported by:	Coverity Scan
CID:	 	1545041,1545049
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:	 	1545048
Sponsored by:	Chelsio Communications
Reported by:	Coverity Scan
CID:	 	1545043
Sponsored by:	Chelsio Communications
This is leftover from an earlier iteration of the code where 'nt' was
not dynamically allocated but was the passed in 'ops' pointer so was
always alive.

Reported by:	Coverity Scan
CID:	 	1545042
Sponsored by:	Chelsio Communications
Also ${XARGS_J} this allows use of non-BSD xargs when building
kernel modules.

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45146
Instead of printing something like "MADT: Found CPU APIC ID 4294967295
ACPI ID 512: disabled" print the APIC ID as a singed int for a more
user-friendly -1.

Reviewed by:	jhb
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45158
Reported by:	Coverity Scan
CID:		1492349
CID:		1493281
MFC after:	3 days
A test system provided by AMD panicked with "madt_parse_apics:
I/O APIC ID 255 too high".  I/O APIC ID 255 is acceptable, so increase
the limit.

Reviewed by:	jhb, kib
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45157
Reported by:	Coverity Scan
CID:		1492525
CID:		1493239
MFC after:	3 days
Reported by:	Coverity Scan
CID:		1493087
MFC after:	3 days
It turns out this wasn't in 4.4BSD. I had a false positive for gdc.c
(which is in 4.4BSD, but part of gated, not this). gdc.c comes from the
ncurses tests, so it shouldn't have this copyright. This version is
mostly Amos Shapir and John Lupien's code. It comes from ncurses test
directory. ncurses has made dozens of improvements to this file since
we imported it in 1997 (which pre-dates their online history), so it's
not clear if their new copyright applies (which doesn't mention Amos
or John) or if some other copyright applies. In any case, it wasn't
4.4BSD, so revert this.

This reverts commit 6ed7d0e.

Sponsored by:		Netflix
PR:		278666
Reviewed by:	Albin Hellqvist
MFC after:	3 days
Pull Request:	https://reviews.freebsd.org/D45107
While here, use bp->bio_cmd instead of auio.uio_rw to drive read vs
write behavior.

Reviewed by:	kib
Differential Revision:	https://reviews.freebsd.org/D45155
+ move Lua to alphabetize subsections
+ word manpages like other subsections
+ man PR's shouldn't bump document date

MFC after: (maybe MFC to BETA3 along w/ e7ff917 ?)
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D45129
MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D45130
This went unnoticed due to namespace pollution in our headers.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D45131
* Replace `random()` with `arc4random()`.
* Change some variable types.
* Drop some unused assignments.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D45132
GCC 13 complains that we might be writing too much to an on-stack buffer
when createing a filename.

In practice there is a check that filename isn't too long given the
time format and other static characters so GCC is incorrect, but GCC
isn't wrong that we're potentially trying to put a MAXPATHLEN length
string + some other characters into a MAXPATHLEN buffer (if you ignore
the check GCC can't realistically evaluate at compile time).

Switch to snprintf to populate filename to ensure that future logic
errors don't result in a stack overflow.

Shorten the questionably named yyyymmdd buffer enough to slience the
warning (checking the snprintf return value isn't sufficent) while
preserving maximum flexibility for admins who use the -F option.

MFC after:	3 days
Sponsored by:	Klara, Inc.
Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D45086
Release notes at
	https://www.nlnetlabs.nl/news/2024/May/08/unbound-1.20.0-released/

Security:	The DNSBomb vulnerability CVE-2024-33655

Merge commit 'c2a80056864d6eda0398fd127dc0ae515b39752b' into main
While otherwise a handy potential approach, getting the trap frame via
the argument isn't documented and isn't supposed to be used.  With all
uses removed, now remove support to end the mixed calling conventions.

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

Reviewed by: imp, mhorne
Pull Request: freebsd/freebsd-src#1225
Document that the only way to get the interrupt thread is to use
curthread->td_intr_frame, rather than the old-style of having a NULL
pointer for the interrupt thread. As of 38c3524, support for that
has been removed. I neglected to update that commit message with these
details.

Suggested by: mhorne
@bsdjhb bsdjhb merged commit c205e0e into CTSRD-CHERI:dev Aug 26, 2024
29 checks passed
@bsdjhb bsdjhb deleted the merge-freebsd-20240510 branch August 26, 2024 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.