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-04-19 #2190

Merged
merged 403 commits into from
Aug 9, 2024
Merged

Conversation

bsdjhb
Copy link
Collaborator

@bsdjhb bsdjhb commented Aug 9, 2024

PR for CI

gbergling and others added 30 commits April 18, 2024 16:18
- s/addres/address/

MFC after:	3 days
- s/addres/address/

MFC after:	3 days
We don't expect the VNET context to be set for virtqueue neither
for taskqueue handlers.

Suggested by:	zec
Fixes:		3f2b960
Signed-off-by: inkeliz <[email protected]>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	freebsd/freebsd-src#1178
Entries reworded to improve grammar or add keywords:
- document description: substitute layout for index for first-glance
- /etc/freebsd/update.conf
- /usr/share/vi/

Entries that have been wordshuffled for brevity or consistency:
- /{bin,libexec,nonexistent,sbin,tmp}/
- /boot/dtb/overlays/
- /boot/{defaults,efi,kernel,lua}/
- /usr/libexec/
- /var/{db,games,lib,log/{bsdisks.log,spool/,tmp/}}
- /usr/share/sysroot/VERSION/MACHINE.MACHINE_ARCH/ (unfold a little)
- /usr/local/share/doc/freebsd/ (unfold a little)

Entries that have macro or linking adjustments:
- /{boot,boot/efi,dev,etc,home,sbin,usr/bin}/ (overview or intro pages)
- /media/ (bsdisks is from ports, but afaik pulled by every desktop)
- /usr/share/{lib/,lib/dtrace/,libdata/games/,man/}/ (intro pages)
- /var/log/messages (syslog(3) -> syslogd(8))

Entries that have been added:
- /dev/{cuaU0,vmm,zvol}/
- /usr/share/{atf,bhyve}/
- /usr/share/libexec/hyperv/ (thanks @rtprio)
- /local/<subdirectories>/
- /var/log/debug.log (thanks @pauamma)
- /var/spool/{lock,lpd}

Please forgive my earlier mistakes fixed in this commit:
- /{dev,/usr/share/{calendar,misc}} : accidentally reverted description
- /etc/local-unbound.conf/ (wrong link)
- /usr/{freebsd-dist,lib32,libdata},/var/log/{dmesg.today,lpd-errs} (typos)
- /{usr/libdata/gcc/,var/log/bsdisks.log} (removed, unnecessary)

PR:		261349
Reviewed by:	mhorne
MFC after:	1 week
Pull Request:	freebsd/freebsd-src#1131
It improves the discoverability of the page.

Sponsored by:	The FreeBSD Foundation
The goal of this project is to integrate the relevant scripts from the
FreeBSD-CI project (https://github.com/freebsd/freebsd-ci) into the src
repository. This allows developers to run the test suite similar to how
it is executed on ci.freebsd.org, and eventually, have it directly used
by our CI system. This effort is also part of the workflow improvement
project, aiming to incorporate pre-merge testing.

Current Features:
* Does smoke tests using either bhyve(amd64 only) or qemu(Non x86_64 or
  when defined USE_QEMU=1). Currently defined CITYPE=smoke. Once we have
  added full tests we can also utilize something like CITYPE=full
* Most of the resources are dynamically allocated based on available
  resources in the host
* If CPU supports POPCNT or vmm can be loaded then bhyve is used for
  amd64 otherwise automatically installs and uses qemu@nox11
* When required third party applications or packages for booting non-x86
  images are automatically installed

Current Limitation:
* Does not support full tests like the one in our Jenkins
* At this moment this is also not suitable to be used in our Jenkins
  platform as the jobs are divided in multiple smaller tasks and
  artifacts are moved here and there which are not exactly the scenario
  for individual developers.

Future Works:
* Add full tests like the one in ci.freebsd.org
* Add different tests or options to disable some tests
* Add test profiles full
* Possibly add test through Cloud Providers like AWS/GCP/Azure or Cirrus
  or Github Actions
* Update documentation

Test Plan:
cd /usr/src/tests/ci
make ci
make TARGET=amd64 TARGET_ARCH=amd64 ci
make TARGET=amd64 TARGET_ARCH=amd64 USE_QEMU=1 ci
make TARGET=arm64 TARGET_ARCH=aarch64 ci
make TARGET=powerpc TARGET_ARCH=powerpc64 ci
make TARGET=powerpc TARGET_ARCH=powerpc64le ci
make TARGET=riscv TARGET_ARCH=riscv64 ci

Reviewed by:           lwhsu
Sponsored by:          The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D43786
As discussed in bug 278417, some ports require the F16C instruction set
to compile, but there is no way yet to detect whether the currently
chosen CPUTYPE supports this feature.

Add the feature to the MACHINE_CPU variable, for each processor that
supports it. The list of processors was extracted from clang 18's -dM
output, filtered on the __F16C__ define.

PR:		278417
Reviewed by:	brooks, emaste
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D44848
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44857
We have some instances of contributors opening a GitHub pull request and
a Phabricator review for the same change, which divides or duplicates
review effort.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44856
RFC 9293 describes the handling of data in the CLOSE-WAIT, CLOSING,
LAST-ACK, and TIME-WAIT states:
This should not occur since a FIN has been received from the remote
side. Ignore the segment text.
Therefore, implement this handling.

Reviewed by:		rrs, rscheff
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44746
Fix a typo, which resulted in missing r_ctl.gate_to_fs in the BBLog
event.

Reported by:		Coverity Scan
CID:			1540024
Reviewed by:		rrs, rscheff
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44648
MFC after:	3 days
Non-virtual channel description denote "play" or "record", so do the
same for virtual ones as well.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D44839
…r_init()

No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D44840
snddev_info->devcount keeps track of the total number of channels for a
given device. However, it is redundant to have it, since it is only used
in sound_oss_sysinfo() to populate the "numaudios" field, and we also
keep track of the channel counts in the playcount, pvchancount, reccount
and rvchancount fields anyway. We can simply sum those fields together
instead of updating a separate variable upon every channel
addition/deletion.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44852
It is marked as obsolete and there are no consumers of it anymore.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D44853
It's a NO-OP.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D44854
"i" keeps the value of the current unit, so we do not have to call
PCMUNIT() and device_get_unit() to fetch it.

In the mixer case, I think it is more correct to do it like this, since
mixer and DSP device units have a 1-1 relationship (i.e the mixer unit
is always the same as the corresponding DSP device one) and that way we
can make it more clear.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D44855
The ISA sound drivers that used them are retired.

Last reference of DV_F_DRQ_MASK and DV_F_DUAL_DMA:
716924c ("Retire snd_sbc ISA sound card
driver")

Last reference of DV_F_DEV_MASK and DV_F_DEV_SHIFT:
5126e5e ("Retire snd_mss ISA sound card
driver")

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D44858
Even at level 0 it is handy to default DEP_*
used by Makefile.depend* to aid the first include if
in a leaf dir.

Reviewed by: stevek
Intended to be used with upcoming feature to add sub-interfaces, since
those new interfaces will be dynamically created and will need to have
spare MSI-X interrupts already allocated for them on driver load.

This sysctl is marked as a tunable since it will need to be set before
the driver is loaded since MSI-X interrupt allocation and setup is
done during the attach process.

Signed-off-by: Eric Joyner <[email protected]>

MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D41326
The ice(4) driver will add the ability to create extra interfaces
that hang off of the base interface; to do that the driver requires
a method for the subinterface to request hardware interrupt resources
from the base interface.

Signed-off-by: Eric Joyner <[email protected]>

MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D39930
Signed-off-by: Eric Joyner <[email protected]>

MFC after:	3 days
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D44003
- Adds mirror interface functionality
- Remove unused virtchnl headers

Signed-off-by: Eric Joyner <[email protected]>

MFC-with:	7683299
MFC after:	3 days
Sponsored by:	Intel Corporation
Tested by:	[email protected]
Differential Revision:	https://reviews.freebsd.org/D44004
Reported by:	Coverity
CID:		1544043
Fixes:		b112232 ("uipc_shm: Copyin userpath for ktrace(2)")
- s/resoure/resource/

MFC after:	5 days
Swap which side of a comparison is byte-swapped by be32toh()
on little-endian architectures.

The be32toh() macro just returns the operand and big-endian
architectures and returns it byte-swapped on little-endian
architectures.

When operating on a constant argument, the compiler can perform
the swap operation at build time instead of swapping the data
read from the hints file at run time.

Reviewed by:	kib
Tested by:	tuexen
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D44734
Remove the test for building on a big-endian architecture, which
preserved the previous default of creating the ELF hints file in
native byte-order of the respective architecture.

Support for little-endian hints files has been added to the
run-time linker and the pkg command.

This is a step towards architecture independent little-endian hints
files, but support for big-endian hints files shall only be removed
from the run-time linker (and ldconfig and pkg) when the last release
that defaulted to hints files in host-byte has been declared EOL.

Reviewed by:    kib
Tested by:	tuexen
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D44734
arp242 and others added 28 commits August 9, 2024 13:11
This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba), and there's been some previous patches (ee3ca71
8c98e6b 1a2a4fc) for other tools.

Obtained from:	https://github.com/dcantrell/bsdutils and
              	https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#893
This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba), and there's been some previous patches (ee3ca71
8c98e6b 1a2a4fc) for other tools.

Obtained from:	https://github.com/dcantrell/bsdutils and
              	https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#893
This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba), and there's been some previous patches (ee3ca71
8c98e6b 1a2a4fc) for other tools.

Obtained from:	https://github.com/dcantrell/bsdutils and
              	https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#893
This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba), and there's been some previous patches (ee3ca71
8c98e6b 1a2a4fc) for other tools.

Obtained from:	https://github.com/dcantrell/bsdutils and
              	https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#893
This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba), and there's been some previous patches (ee3ca71
8c98e6b 1a2a4fc) for other tools.

Obtained from:	https://github.com/dcantrell/bsdutils and
              	https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#893
This replaces fgetln() with getline(). The main reason for this is
portability, making things easier for people who want to compile these
tools on non-FreeBSD systems.

I appreciate that's probably not the top concern for FreeBSD base tools,
but fgetln() is impossible to port to most platforms, as concurrent
access is essentially impossible to implement fully correct without the
line buffer on the FILE struct. Other than this, many generic FreeBSD
tools compile fairly cleanly on Linux with a few small changes.

Most uses of fgetln() pre-date getline() support (added in 2009 with
69099ba), and there's been some previous patches (ee3ca71
8c98e6b 1a2a4fc) for other tools.

Obtained from:	https://github.com/dcantrell/bsdutils and
              	https://github.com/chimera-linux/chimerautils
Signed-off-by: Martin Tournoij <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#893
The upstream llvm commit 5eb44df1b64d made the addition of these GCC
compatability symbols dependent on build configuration rather than
hardcoded for amd64, i386, and powerpc.  Reenable them.

Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D44877
GCC has used this for some time (since 7.0) and apparently we were
getting away with using the hidden symbol, but when linking with
--no-undefined-version we get an error unless it's properly exported.
(For anyone who wonders at the assymetry, __udivmoddi4 is indeed much
older and was introduced with GCC 3.0.)

MFC after:	3 days
Reviewed by:	dim
Differential Revision:	https://reviews.freebsd.org/D44878
It's unclear to me why lld didn't complain about these are they aren't
present and haven't been.  Instead ld.bfd complained.

Reviewed by:	dim
Fixes:		6e6cd03 libc/quad: narrow list of symbols exposed on i386
Differential Revision:	https://reviews.freebsd.org/D44879
Previously, mailwrapper(8) would default to invoking _PATH_DEFAULTMTA
(i.e., dma) if mailer.conf couldn't be opened for any reason, including
transient errors like ENFILE.  This behaviour is undesirable, because if
the administrator has configured a different MTA in mailer.conf, they
almost certainly don't want mailwrapper to unpredictably fall back to
the compiled-in default; and in any case, the default MTA is probably
not running, meaning the mail may be queued and then never delivered,
which is worse than not accepting it to begin with.

Change this behaviour depending on why mailer.conf can't be opened:

- If it doesn't exist, keep the existing behaviour of falling back to
  the default MTA, on the assumption that this is a reasonable default
  if mailer.conf hasn't been configured at all.

- If it cannot be opened for any other reason, do not invoke an MTA and
  instead return an error to the caller.

PR: 25218
Reviewed by: imp, emaste, markj
Pull Request: freebsd/freebsd-src#969
Note: This follows the current style of the bsdiff.c and bspatch.c
files, which is rather far from style(9).

Reviewed by: imp, cpervica
Pull Request: freebsd/freebsd-src#1076
Reviewed by: imp, markj, Elliott Mitchell
Pull Request: freebsd/freebsd-src#1125
Reviewed by: imp, markj, Elliott Mitchell
Pull Request: freebsd/freebsd-src#1125
Some DSDTs define non-existent devices, warn the user when an access is attempted on one of these devices.

Reviewed by: imp, markj, Elliott Mitchell
Pull Request: freebsd/freebsd-src#1125
PR: 278316

Signed-off-by: Henrich Hartzer <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#1164
Even if the first branch succeeds, next time it will still check for
the second branch (which will be false) as the first one was true.
Add an else..if statement to address this.

Signed-off-by: rilysh <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#1165
Rationale for this change:

- ipf is already there

- if the kernel is configured with a packet filter which drops packets
  by default, pfctl or ipfw will be required in the rescue environment
  to make the network functional.

- rescue's stated purpose is to be useful for small/embedded systems
  (and is also quite useful for small jails); a rescue-based router
  would want these binaries.

On amd64, this increases the size of rescue from 17346200 to 17907248,
or 561048 bytes (3.2%).

Reviewed by: imp
Pull Request: freebsd/freebsd-src#1169
Signed-off-by: Klaus Küchemann <[email protected]>
Reviewed by: imp
Pull Request: freebsd/freebsd-src#1182
The change in upstream commit 0b9e358
only applies to LLVM 18 and later.  Defining the macro on the command
line raises a -Wmacro-redefined error when using older libunwind
versions.
@bsdjhb bsdjhb merged commit 625e214 into CTSRD-CHERI:dev Aug 9, 2024
29 checks passed
@bsdjhb bsdjhb deleted the merge-freebsd-20240419 branch August 9, 2024 21:39
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.