Commit graph

6036 commits

Author SHA1 Message Date
Peter Holm
5b977a8e2b stress2: A workaround for an infrequent "filesystem full" issue 2025-08-01 11:55:50 +02:00
Peter Holm
c1c58c0019 stress2: Added two syzkaller reproducers and updated the exclude list 2025-08-01 11:54:05 +02:00
Kevin Bowling
147b90973b Revert "src.opts.mk: Default LLVM_ASSERTIONS off"
Enabling and disabling LLVM assertions changes the ABI. There have
been multiple reports on the freebsd-current@ mailing list of broken
'cc'.

Out of caution, you may wish to do a clean build while crossing this
commit after building the reverted commit if you do not set
LLVM_ASSERTIONS in your src.conf.

Discussed with:	kevans, jrtc27

This reverts commit 9b3055d0d4.
2025-07-30 20:33:52 -07:00
John Baldwin
706d8ffa39 cross-build: Add a <endian.h> wrapper for macOS
This is required to build libkrb5support.

Fixes:		7e35117eb0 ("Makefile: Hook MIT KRB5 into the build")
2025-07-29 13:52:11 -04:00
John Baldwin
a3b72d89c7 zfsboot: Remove zfsboot(8) program used to boot ZFS from MBR + BIOS
This has not worked since the import of OpenZFS in FreeBSD 13.0.
Trying to fix it at this point would probably entail rearchitecting
how it works (e.g. using a dedicated freebsd-boot slice to hold
zfsboot).  However, it's not really worth doing that at this point.

PR:		271262
Reported by:	Henryk Paluch <hpaluch@seznam.cz>
Reviewed by:	imp, emaste
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D51545
2025-07-28 10:58:02 -04:00
John Baldwin
e958bc1c13 tools/boot/rootgen: Remove stray zfsboot1 from ZFS + MBR + UEFI function
This was copy-pasted from the ZFS + MBF + BIOS function, but without
the corresponding code to extract zfsboot1 from /boot/zfsboot via
dd(1).  It's also not necessary since UEFI booting doesn't make use of
BSD label boot blocks (note the lack of any -b option to mkimg when
generating the BSD partition in mk_nogeli_mbr_ufs_uefi()).

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D51544
2025-07-28 10:58:02 -04:00
Cy Schubert
dd0ec030f8 krb5: Bump DSO version for version map creation
Differential Revision:	https://reviews.freebsd.org/D51520
2025-07-27 05:59:34 -07:00
Kevin Bowling
9b3055d0d4 src.opts.mk: Default LLVM_ASSERTIONS off
This noticeably slows down the compiler execution and with the move to
pkgbase is one of the remaining differences that cannot be
administratively controlled; pkg kernels and malloc.conf(5) will allow
quickly testing a snapshot in a configuration closer to stable and
release branches.

dim@ notes that you need to set WITH_LLVM_ASSERTIONS in src.conf(5) if
you want to report an issue with LLVM.

Enabling WITH_LLVM_ASSERTIONS is also a consideration for CI and pkg
builders especially tracking main.

Approved by:	dim, kevans
Differential Revision:	https://reviews.freebsd.org/D50388
2025-07-27 01:00:39 -07:00
Dag-Erling Smørgrav
23401aeb15 Replace last few remaining MAN[1-8] with MAN
Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D51530
2025-07-26 12:00:02 +02:00
Dag-Erling Smørgrav
a3d4ae7cf3 dma: Don't install dma.conf world-readable
While here, install auth.conf into /etc as well.

MFC after:	3 days
PR:		288409
Reviewed by:	ivy, bapt
Differential Revision:	https://reviews.freebsd.org/D51529
2025-07-26 11:59:53 +02:00
Gleb Smirnoff
777123969d libbsnmp: make binding of client UNIX socket optional and configurable
Before this change snmp_open(3) would always bind(2) client socket to a
random "/tmp/snmpXXXXXXXXXXXXXX" name.  However, this binding is not
required for SOCK_STREAM transport.  Also, any attempt to specify a
different name would fail, as open_client_local() would blindly rewrite
the name to the default.

Make this binding optional.  If application had initialized
snmp_client.local_path, then try to bind to the specified pathname,
otherwise perform the random name binding only if we are in the
SOCK_DGRAM mode.

While here change snmp_client.local_path size to SUNPATHLEN, so that any
legitimate local socket name can be used.  This requires library version
bump.

Note that this code has been broken by 81e0e7b9e3 for three years, thus
it is known not to be widely used.

Reviewed by:		harti
Differential Revision:	https://reviews.freebsd.org/D51070
2025-07-25 13:10:17 -07:00
Mateusz Piotrowski
31938394de stress2/fullpath2: Clean up the vn_fullpath DTrace one-liner
- Remove -w; there is no need for destructive actions here.
- Remove the glob from before "vn_fullpath"; the probe description
  matches vn_fullpath only anyway, so there is no need for the glob
  here.

PR		288222
Reviewed by:	christos
Approved by:	christos (mentor)
Fixes:		113f2f0c76 stress2: Updated dtrace comment
Differential Revision:	https://reviews.freebsd.org/D51341
2025-07-18 22:24:38 +02:00
Dag-Erling Smørgrav
57ee56578c libc: Test time zone change detection.
While here, clean the detection code up a bit.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D51343
2025-07-18 19:49:57 +02:00
Peter Holm
113f2f0c76 stress2: Updated dtrace comment 2025-07-16 12:38:25 +02:00
Peter Holm
d6ee73e5ad stress2: Added syzkaller reproducers. Update the exclude list 2025-07-16 12:31:04 +02:00
Konstantin Belousov
e8019a1591 cross-build: provide exterr.h and sys/exterrvar.h for non-FreeBSD hosts
with enough glue to make libc/gen/err.c compilable.

Reported by:	jhb
Reviewed by:	jhb, jrtc27
Sponsored by:	The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D51217
2025-07-10 23:55:41 +03:00
Jessica Clarke
8f0a6a9aad share: Delete bitrotted make_*_driver.sh scripts
These scripts have not seen the necessary changes to keep them up to
date with current KPIs and coding practices. They use I/O ports directly
rather than any bus abstractions, use i386 (which is on the way out for
kernel configs) as the architecture of choice for generated kernel
configs, use ISA KPIs, use INTR_TYPE_FAST (renamed in 2000 to INTR_FAST
and removed in 2011), and likely have other issues too that render them
more harm than good for the uninitiated developer looking for a driver
template. If anyone wants to invest time in modernising them they can do
so and bring them back, but for now delete them.

Reviewed by:	cperciva, imp, emaste
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D50468
2025-07-10 20:36:08 +01:00
Cy Schubert
aad5020c70 OptionalObsoleteFiles: libkadm5clnt.so is used by MIT and Heimdal
Reported by:	fluffy, "Herbert J. Skuhra" <herbert@gojira.at>
Fixes:		af2593e321
2025-07-07 16:03:10 -07:00
Mark Johnston
3a20f630a9 git-arc: Fix handling of author names when we have to make a guess
The output printed by this function is used as the author name, so we
don't want to print informational messages to stdout.
2025-07-07 20:16:30 +00:00
Ed Maste
842fde22b0 src.conf.5: Add WITH_RUN_TESTS description
Fixes: 8e1e989c77 ("Add host.test.mk for DIRDEPS_BUILD")
Sponosred by:	The FreeBSD Foundation
2025-07-05 21:57:48 -04:00
Mark Johnston
3d4a61a10b git-arc: Try harder to get the author name and email out of phab
When patching, we use the querydiffs endpoint to get a name and email
for the revision's author.  It's possible that this info isn't recorded,
in which case the results after post-processing are just "null".
However, if the diff has multiple revisions, the endpoint returns an
entry for each one, some of which may contain author info, others not.
So, the deleted code which tries to filter out "null" isn't sufficient,
since the value in question might be something like "<valid
name>\nnull".

Try to make this filtering a bit smarter to avoid generating incorrect
author info.

Reviewed by:	jlduran
Reported by:	des
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D51065
2025-07-02 13:42:42 +00:00
Cy Schubert
111607db6a OptionalObsoleteFiles: Keep Heimdal man pages when switching back
Additional man pages that should not be removed when switching back to
Heimdal.

Fixes:          af2593e321
2025-06-26 09:00:13 -07:00
Cy Schubert
5bd818785a OptionalObsoleteFiles: Keep Heimdal files when switching back
Additional files that should not be removed when switching back to
Heimdal.

Fixes:		af2593e321
2025-06-26 08:22:30 -07:00
Cy Schubert
b499fefd6d OptionalObsoleteFiles: Remove an MIT .a file when switching back
When switching back to Heimdal remove libverto.a, an MIT KRB5 library.

Fixes:		af2593e321
2025-06-26 07:35:40 -07:00
Cy Schubert
2b43d77af3 OptionalObsoleteFiles: Keep Heimdal files when switching back
When switching back to Heimdal keep Heimdal's .a files.

Fixes:		af2593e321
2025-06-26 07:35:40 -07:00
Warner Losh
905541dd6b boot: Update the test generation script for serial and rootfs
Update the script to include serial port config, serial console and the
proper root filesystem. This works for amd64 + ufs, but might need a
slight refactor for aarch64 and/or zfs.

Sponsored by:		Netflix
2025-06-25 23:23:44 -06:00
Alexander Ziaee
daf2a13802
MK_FORTH: Allow removing loader.4th w/ delete-old
The lua loader is quite mature, and /boot is getting a bit cluttered.
Allow removing the Forth loader with `make delete-old` if WITHOUT_FORTH
is set, instead of the previous behavior of only removing the doc.

MFC:			no, I think this is a breaking change
Approved by:		kevans (src)
Reviewed by:		kevans (UPDATING note tweaked since)
Discussed with:		imp, tsoome (thanks!)
Differential Revision:	https://reviews.freebsd.org/D50708
2025-06-25 19:13:18 -04:00
Cy Schubert
18a8f5714c krb5: Do not remove krb5.h when selecting Heimdal 2025-06-23 09:02:20 -07:00
Cy Schubert
0b9a631e07 krb5: Remove artifaccts of my initial builds
The files being removed were artifacts of my initial builds using
a process to extract files used by the port during its build. It
was later discovered they were not needed but they were not removed
from the build at the time.

tools/build/mk/OptionalObsoleteFiles.inc removes the extraneous files
from an installed system. These files are not supposed to be installed.

There are three parts of this patch.

1. Don't install them in the first place.

2. Remove the files if they were previously installed.

3. Ensure they are removed when switching back to Heimdal from MIT.

Reported by:	fluffy
Fixes:		ee3960cba1
2025-06-20 08:12:43 -07:00
SHENGYI HONG
10cb3979a9
share/mk: Add sccache suport for WITH_CCACHE_BUILD option
By setting CCACHE_NAME=sccache , sccache can be used as an alternative
for ccache.

Reviewed by:	emaste, jhb
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D49417
2025-06-20 01:43:48 -04:00
Ed Maste
4f33d07300 tests: Update for jemalloc's option parsing
MALLOC_OPTIONS=J -> MALLOC_CONF=junk:true

PR:		287357
Reviewed by:	markj
Event:		Kitchener-Waterloo Hackathon 202506
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50910
2025-06-17 11:52:17 -04:00
Cy Schubert
990a088612 OptionalObsoleteFiles: Keep common files between MIT and Heimdal
Reported by:	"Herbert J. Skuhra" <herbert@gojira.at>
Original by:	"Herbert J. Skuhra" <herbert@gojira.at>
Fixes:		7e35117eb0
2025-06-16 20:30:34 -07:00
Jessica Clarke
3923bf59f9 tools/build: Provide extra headers on non-FreeBSD
These will be needed by future changes to continue to allow building
makefs as a bootstrap tool on Linux and macOS. This also requires
defining __sbintime_t in our cross-build sys/_types.
2025-06-16 22:29:36 +01:00
Cy Schubert
7e35117eb0 Makefile: Hook MIT KRB5 into the build
Add tests for MK_MITKRB5. If "yes" build MIT KRB5. If "no" build Heimdal.
The default is MK_MITKRB5 = no, added by "krb5: Add build plumbing".

At some point we will change the default to MK_MITKRB5 = yes. A ports
exp-run will need to be successfully run first.

Sponsored by:		The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D50815
2025-06-15 19:49:37 -07:00
Cy Schubert
af2593e321 OptionalObsoleteFiles: Support MIT KRB5
If no Kerberos is wanted (MK_KERBEROS == no) remove whatever kerberos
is installed.

If MIT KRB5 is wanted (MK_MITKRB5 == yes) remove the Heimdal files.

If Heimdal is wanted (MK_MITKRB5 == no) remove the MIT KRB5 files.

Sponsored by:		The FreeBSD Foundation
Differential revision:	https://reviews.freebsd.org/D50814
2025-06-15 19:49:37 -07:00
Ed Maste
9eb6cafe37 src.conf.5: Update MALLOC_PRODUCTION diag options
PR:		287502
Reviewed by:	kbowling, ziaee
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D50834
2025-06-13 15:20:59 -04:00
Warner Losh
86c3a22b6e nanobsd: Fix kernel build
'device crypto' is now required for 'device pf' so add it.

Sponsored by:		Netflix
2025-06-11 20:40:57 -06:00
Brooks Davis
e453e498cb machine/stdarg.h -> sys/stdarg.h
Switch to using sys/stdarg.h for va_list type and va_* builtins.

Make an attempt to insert the include in a sensible place.  Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
2025-06-11 17:39:02 +01:00
Cy Schubert
290e8aaa38 share/mk: Add MIT KRB5 build knob
This is the first in a series of commits to replace Heimdal with
MIT KRB5. This first commit adds the WITH_MITKRB5/MK_MITKRB5 knob
to src.opts.mk and its corresponding documentation in
tools/build/options. The default is off.

This change of and by itself is of no consequence as MIT KRB5 has
yet to be imported in to HEAD. But it does insulate the build from
inremental change until the last patch is committed when WITH_MITKRB5
will build MIT KRB5 1.21.3 instead of Heimdal.

The affords us the opportunity to review smaller commits.

This is the first of many commits.

Reviewed by:	imp, jhb, brooks, markj
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D50684
2025-06-04 19:45:46 -07:00
Kyle Evans
8378665ff9 tools: build: add a rewrite of makeman in lua
The primary benefit of this rewrite is that it parallelizes a number of
the make(1) jobs that it needs to do.  It does so with a very naive
forking model that could likely be improved, but is sufficient for our
purposes.  This version also doesn't assume that CWD is sane, and
instead operates relative to the directory the script resides in.

Note that this initial version is only intended to match the output of
the legacy script.  Some work is planned afterward to refactor the
script out into various components to improve maintainability after we
have switched over to it.

In my horribly performing dev environment, this version runs in 40s
rather than the original ~2 minutes.  On a Mt. Snow machine, this
version runs in ~15s rather than the original ~1m40s.

This change does not yet switch the top-level `makeman` target over to
the new version.

Reviewed by:	bapt (earlier version), emaste
Differential Revision:	https://reviews.freebsd.org/D39084
2025-06-04 12:06:29 -05:00
Lexi Winter
0ddc223c6d OptionalObsoleteFiles.inc: add some now-optional rc.d scripts
After f91d251b39, some rc.d scripts are gated behind the src.conf knob
for the services they start.  Add them to OptionalObsoleteFiles.inc so
they are properly removed when the knob is disabled.

Fixes: f91d251b39 ("rc.d: move some rc scripts to their packages")
Reviewed by:	kevans, jhb
Approved by:	kevans (mentor)
Differential Revision:	https://reviews.freebsd.org/D50560
2025-06-04 06:45:10 +01:00
Peter Holm
66c2e68076 stress2: Added a regression test 2025-06-01 10:14:51 +02:00
Li-Wen Hsu
f131f3c0bf
convert_ifapi: handle the special case of getting interface name
Reviewed by:	jhibbits
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D50445
2025-05-28 15:31:53 +08:00
Robert Wing
c0f7e69d60 tools/diag/prtblknos: fix build
The build was broken by two separate changes:
    aa90fbed15
    772430dd67
2025-05-27 15:12:04 -08:00
Ed Maste
61f46c66dd Remove LLVM_TARGET_SPARC descriptions
Support for WITH_/WITHOUT_LLVM_TARGET_SPARC was removed in commit
47e9f42ea3 ("Remove sparc64 specific buid-system hacks") so the
descriptions serve no purpose.

Sponsored by:	The FreeBSD Foundation
2025-05-26 12:05:30 -04:00
Andriy Gapon
28d74f18f1 OptionalObsoleteFiles: etc/rc.d/powerd is used/useful without ACPI/APM
Just like powerd daemon does not depend on ACPI/APM, its rc script does
not either.

Fixes:		20eb6bd8c5
MFC after:	1 week
2025-05-19 12:29:06 +03:00
Peter Holm
91ef8c3e13 stress2: Fix scenario after the changes to ptrace(PT_ATTACH) in commit ecc662c749.
The traced process now no longer exits immediately at the attach.
After a PT_DETACH do not try to wait on a non child process. Style fixes.
2025-05-16 13:07:14 +02:00
Peter Holm
abe84e6110 stress2: Added syzkaller reproducers 2025-05-12 12:06:37 +02:00
Olivier Certner
f6e8268917
stress2: exlock2.sh: Fix impact of previous '-U' removal
In commit "stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U'
change" (1265d3b07e), I forgot that '-U' also has the side-effect of
implying '-x' by default.  Now that '-U' has been removed, make '-x'
explicit.

Fixes:          1265d3b07e ("stress2: exlock2.sh: Preserve behavior after ps(1)'s '-U' change")
MFC after:      1 hour
Sponsored by:   The FreeBSD Foundation
2025-05-12 10:59:07 +02:00
Andrew Gierth
5d50c2397a
src.conf.5: Add WITH_ZONEINFO_LEAPSECONDS_SUPPORT warning
People are turning on the option and then tripping over weird
consequences.  See bugs 248338 and 271170 as examples.

Approved by:	cy, imp, philip
Differential Revision:	https://reviews.freebsd.org/D25902

Co-authored-by: Joseph Mingrone <jrm@FreeBSD.org>
2025-05-09 15:53:42 -03:00