Commit Graph
6097 Commits
Author SHA1 Message Date
Jose Luis Duran 7238317403 blocklist: Rename blacklist to blocklist
Follow up upstream rename from blacklist to blocklist.

- Old names and rc scripts are still valid, but emitting an ugly warning
- Old firewall rules and anchor names should work, but emitting an ugly
  warning
- Old MK_BLACKLIST* knobs are wired to the new ones

Although care has been taken not to break current configurations, this
is a large patch containing mostly duplicated code.  If issues arise, it
will be swiftly reverted.

Reviewed by:	ivy (pkgbase)
Approved by:	emaste (mentor)
MFC after:	2 days
Relnotes:	yes
2025-10-12 17:14:27 +00:00
Mark Johnston e63bf6aa52 cryptocheck: Be friendlier when testing software crypto backends
- Fail loudly if we can't change the kern.crypto.allow_soft sysctl.
- Add more drivers to the list.

MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D52490
2025-10-08 15:24:12 +00:00
Mark Johnston 53ab85a554 cross-build: Define __GNUC_PREREQ__ in cdefs.h
This is required when including stdckdint.h and doesn't seem to be
provided by older clang.

Reviewed by:	emaste
Fixes:	7233893e94 ("lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray")
Differential Revision:	https://reviews.freebsd.org/D52933
2025-10-08 12:50:27 +00:00
Mark Johnston 687cb66411 tools/build: Bring in stdckdint.h if needed
This is needed when bootstrapping libc, reallocarray.c and
recallocarray.c include stdckdint.h now.

Reviewed by:	emaste
Fixes:	7233893e94 ("lib{c,openbsd}: use ckd_mul() for overflow checking in re(c)allocarray")
Differential Revision:	https://reviews.freebsd.org/D52932
2025-10-08 12:50:25 +00:00
Peter Holm c16f53782c stress2: Do not try to open a fifo 2025-10-04 10:21:02 +02:00
Peter Holm 257a750c60 stress2: Add syzkaller reproducers 2025-10-04 10:20:37 +02:00
Kyle Evans 151bd3516b flua: support our flua modules in the bootstrap flua
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

This re-lands bootstrap module support with a more sensible subset, and
after having verified that it cross-builds fine on macOS and Linux -- we
cannot do libfreebsd on !FreeBSD because it's more system header
dependant.  We also need to bootstrap libmd to bring in libhash, and
libucl + libyaml.

Reviewed by:	bapt, emaste (both previous version)
Differential Revision:	https://reviews.freebsd.org/D51890
2025-10-03 21:16:51 -05:00
Kyle Evans bbef1c72b4 Revert "flua: support our flua modules in the bootstrap flua"
This reverts commit 1953a12ee2, because it
cannot work at all on macOS without more work, at a minimum.  We use
linker sets for module discovery, but we don't have a version of this
that works for mach-o at the moment.
2025-10-03 19:53:28 -05:00
Kyle Evans 1953a12ee2 flua: support our flua modules in the bootstrap flua
This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.

Reviewed by:	bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D51890
2025-10-03 13:09:14 -05:00
Joseph Mingrone e57d72a7f3 mfc-candidates: Improve branch detection and repository handling
- Use git to detect the latest stable branch rather than hardcoding it.
- Handle the case where the script is run outside a src or ports repository.
- Fix a pattern to match .git instead of *git.

Reviewed by:	andrew, releng (emaste)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D52681
2025-10-02 13:47:26 -03:00
Li-Wen Hsu 6952bb321c wlanstat(8): Follow-ups after moving to /usr/sbin and renaming
- Update related comments
- Remove from tools/tools/net80211

Reviewed by:	imp, adrian
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D52726
2025-09-30 11:31:12 +08:00
Lexi Winter 614c8750ce Remove ftpd(8)
This was previously deprecated and is slated for removal in 15.0.
Users who still need ftpd(8) can install the ftp/freebsd-ftpd port.

Retain the ftp(d) PAM services since other FTP daemons use them.

Update /etc/inetd.conf to point to /usr/local.

Add ftpd to ObsoleteFiles, but do not list configuration files since
users may want to preserve these to use with the freebsd-ftpd port.

There is still some language in the manual referring to ftpd(8)
which is relevant to the port, which has been retained but updated
to reference the port.

MFC after:	3 days
Relnotes:	yes
Reviewed by:	cperciva
Differential Revision:	https://reviews.freebsd.org/D52739
2025-09-29 22:53:34 +01:00
Mark Johnston ceb5792d1e OptionalObsoleteFiles.inc: Add more ATF libraries
PR:		289653
Reported by:	Trond Endrestøl <[email protected]>
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D52676
2025-09-27 08:11:19 +00:00
Minsoo Choo cd813380ad kerneldocs: Update latex package
MFC after:	3 days
Reviewed by:	ziaee
Signed-off-by:	Minsoo Choo <[email protected]>
Closes:		https://github.com/freebsd/freebsd-src/pull/1853
2025-09-25 15:06:56 -04:00
Warner Losh 2352b89d2f nanobsd: Fix regressions from last cleanup
c99bb5747f changed ( ) grouping into { }, but in these cases we chdir
and depended on the subshell not changing it for the caller. Restore the
old behavior. It seems to work w/o this change, true, but the old code
was intentionally like this.

Fixes: c99bb5747f
Sponsored by:		Netflix
2025-09-24 09:43:42 -06:00
Peter Holm b1442e6b8d stress2: Limit disk usage to avoid a disk full message 2025-09-21 11:14:07 +02:00
Peter Holm 6ef1bf8f34 stress2: Do not follow symbolic links 2025-09-21 11:12:46 +02:00
Enji Cooper c99bb5747f nanobsd: minor formatting cleanup
- Reformat function definitions

POSIX states that compound commands, i.e., ones that use `(..)` or
`{ .. } `, are permissible as function definitions, however, many shell
syntax validators do not acknowledge the former format.

Switch to the latter format so more naive editors, like the vim syntax
highlighter, better parse the syntax of the file.

Moreover, replacing `(..)` with `{..}` replaces several subshells with
their non-subshell equivalents. Given that `set -e` is used liberally
and `exit` is not used in the calling code when `set -e` is not
enforced, there is no net loss by making this change.

- Clean trailing whitespace.
- Reindent some related comments to match the indentation of the
  previous line.
- Add shebangs to the tops of files to help syntax colorizers and file
  identifiers understand that the files are in shell syntax.

MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D52596
2025-09-18 12:17:11 -07:00
Olivier Certner de48322896 stress2: Fix removal of supplementary groups
To this end, call setgroups(0, NULL) instead of passing the effective
GID.  This stance is fully compatible with older versions of FreeBSD.

Fixes:          9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52290
2025-09-17 14:16:09 +02:00
Olivier Certner ff7252cdaf tools/regression/priv: Don't call setgroups() with the effective GID
The 'setgroups(0, NULL);' stance works the same on all versions of
FreeBSD, getting rid of all supplementary groups.  The replaced code
would force the effective GID to also be a supplementary group.

Fixes:          9da2fe96ff ("kern: fix setgroups(2) and getgroups(2) to match other platforms")
MFC after:      5 days
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D52289
2025-09-17 14:16:08 +02:00
Peter Holm da20d88599 stress2: Added two new fdescfs test scenarios 2025-09-16 11:21:04 +02:00
Peter Holm 8af56f7e08 stress2: Fix how the reproducer is run. Lingering threads seen before 2025-09-16 11:18:20 +02:00
Ahmad Khalifa 27699e31fa boot/universe.sh: toggle LOADER_BIOS_TEXTONLY
Build without LOADER_BIOS_TEXTONLY since it is now the default.

Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D52559
2025-09-16 00:38:56 +03:00
Jonathan T. Looney cd02a8a9f8 ip6: add SO_BINTIME support
This adds support for obtaining timestamps from IPv6 packets using the
SO_BINTIME socket option, bringing it in parity with IPv4 behavior.

Enable testing the SO_BINTIME option in the relevant (manual) regression
test.

PR:		289423
Reviewed by:	markj
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D52504
2025-09-15 16:46:03 +00:00
Peter Holm 7780766b40 stress2: Do not exit the test program without clearing the trace flags
Discussed with:	 kib
2025-09-15 10:48:01 +02:00
Peter Holm ec7199bf3f stress2: Fix cleanup of temporary files 2025-09-14 12:08:40 +02:00
Jose Luis Duran d0362607b2 nanobsd: Fix the p flag
Fix the "p" flag in the manual page.
While here, add the flag to the usage instructions.

Reviewed by:	imp
Approved by:	emaste (mentor)
Fixes:	90593b1bdb ("nanobsd: Expose do_image_prep on command line")
Differential Revision:	https://reviews.freebsd.org/D52508
2025-09-13 03:55:00 +00:00
Dag-Erling Smørgrav 4c6cf6107b tools: Drop cryptotest
This has been supplanted by cryptocheck and has bitrotted to the point
where it no longer builds.

PR:		289325
Reviewed by:	jhb
Differential Revision:	https://reviews.freebsd.org/D52399
2025-09-12 17:29:40 +02:00
Dag-Erling Smørgrav dd8c666d8b src.sys.mk: Support src.conf in SRCTOP
If SRCCONF is not defined and src.conf exists at the top level of the
source tree, use that instead of /etc/src.conf.

MFC after:	3 days
Reviewed by:	kevans, imp
Differential Revision:	https://reviews.freebsd.org/D52470
2025-09-10 18:58:30 +02:00
Warner Losh 90593b1bdb nanobsd: Expose do_image_prep on command line
do_image_prep will skip the customizations and other image prep that's
the same each time. It was just set before for -I. Expose it now with -p
which doesn't have the other side effects. Also, fix a bug where early
customization was run in this case. We don't want that run multiple
times when building an image from an existing tree or when skipping
image prep (there's no reason to make it a separate hook). Also change
example small media from Compact Flash to SD Card (though maybe it
should be microSD card, eMMC or similar, but that's getting too
verbose).

Sponsored by:		Netflix
2025-09-09 15:49:06 -06:00
Warner Losh 0833a3fe5b nanobsd: Alphebetize -I
Put -I in its proper place alphabetically

Sponsored by:		Netflix
2025-09-09 15:49:05 -06:00
Colin Percival af60084978 Add description for WITH_PTHREADS_ASSERTIONS
This option is turned on by default in -CURRENT but will be turned off
in 15-STABLE; this description will land in the src.conf(5) man page
in that branch.

MFC after:	1 minute
2025-09-05 14:35:53 -07:00
Warner Losh edd8c4c655 moused: Fix movement of moused/moused to moused/moused/moused
So aef807876c moved moused down a level, so make depend broke. This
fixes it.

Sponsored by:		Netflix
2025-09-04 23:52:10 -06:00
Vladimir Kondratyev aef807876c moused(8): Add support for evdev protocol
The new daemon have following properties as compared with previous
incarnation:
- evdev protocol support for mices and touchpads. Additionally to
  relative PS/2 and USB devices it enables console support for I2C/USB
  touchpads and bluetooth mices.
- Other aged protocols like COM, raw PS/2 and X10 are dropped with only
  exception of sysmouse. For those who still use them there is an
  utility called msconvd(8).
- single daemon per system where hotplug is processed via devd socket.
  Per device mode still supported too.
- Configuration and quirks files in libinput-compatible format.
  Actually, the new moused config parser is taken from libinput.

The moused(8) can work in 2 modes:
1. Evdev support mode. It enables all previously mentioned devices.
   It is enabled by deault.
2. Sysmouse support mode. All should work as before.
   No new devices supported. To enable it add following lines to
   /etc/rc.conf:
      moused_port="/dev/psm0"
      moused_nondefault_enable="YES"
   One may add hw.usb.usbhid.enable=0 to /boot/loader.conf to enable
   ums(4) driver which supports sysmouse protocol.

Differential Revision:	https://reviews.freebsd.org/D52164
2025-09-05 00:07:25 +03:00
Kyle Evans a2f08d0ddc pseudofs: return errors from pfs_create_*()
In D52038, we kind of guess at the reason that pfs_create_dir() failed,
which isn't great: it could be EEXISTS, or it could even be ENOMEM.

Change the pfs_create_*() interfaces to return an error and use a double
pointer to return the new node as requested.  Outside of the changes
in sys/fs/pseudofs, this diff is the result of running the added
coccinelle script against in-tree pseudofs and fixing all of the
style(9) violations that spatch added.

We set *opn to NULL in the failure cases to avoid breaking callers that
did actually error-check their results, since the cocci patch does not
attempt to handle that in any way.

Reviewed by:	des (previous version), kib
Differential Revision:	https://reviews.freebsd.org/D52157
2025-09-03 21:08:52 -05:00
John Baldwin 6d0016aea2 ObsoleteFiles.inc: Treat usr/lib/libwind.so.11 as a library
Reviewed by:	ivy
Fixes:		721c98dd89 ("OptionalObsoleteFiles: Update Kerberos entries")
Differential Revision:	https://reviews.freebsd.org/D52208
2025-08-28 13:35:34 -04:00
Jessica Clarke 840edcd292 sysbuild: Copy /etc/localtime as symlink
Without -P (or -R, which defaults to enabling -P) symlinks are
dereferenced and so the target file is copied, not the symlink itself.

Fixes:	5e16809c95 ("tzsetup: symlink /etc/localtime instead of copying")
2025-08-27 22:35:55 +01:00
Lexi Winter 721c98dd89 OptionalObsoleteFiles: Update Kerberos entries
Consolidate the various lists of Kerberos files into three sets:
common files, files only installed by MIT Kerberos, and files only
installed by Heimdal.  This avoids having to list the same files in
multiple places and makes the logic a lot easier to maintain.

The new file lists were created by comparing the actual result of
make installworld with the various options enabled or disabled.

Reviewed by:	des, cy
Differential Revision:	https://reviews.freebsd.org/D51874
2025-08-20 20:00:06 +01:00
Lexi Winter dc5ba6b8b4 Remove MK_GSSAPI
For MIT Kerberos, MK_GSSAPI has no meaning: GSSAPI is a required part of
Kerberos and is always built if MK_KERBEROS is enabled.  Backport this
behaviour to Heimdal so it works the same way.

While here, change Heimdal's libcom_err and compile_et to be selected by
MK_KERBEROS, not MK_KERBEROS_SUPPORT, since these are part of Kerberos
and third-party users might need it even if Kerberos support is disabled
in the base system.  This means MK_KERBEROS_SUPPORT installs the same
files with both MIT and Heimdal.

Reviewed by:	cy
Differential Revision:	https://reviews.freebsd.org/D51859
2025-08-20 19:42:20 +01:00
Dag-Erling Smørgrav 8d23b31485 depend-cleanup: Add a clean_obj function
The clean_dep function is primarily intended for when a source file is
renamed.  The 20241025 entry for libcrypt was not related to a rename
and resulted in libcrypt getting cleaned out and rebuilt every time.
Add a clean_obj function which does what the 20241025 entry needs:
delete an object file if it matches a particular regex.

This also changes every occurrence of `rm -f` to `rm -fv` so we can
more easily tell what gets cleaned up.

Fixes:		d8cd2d0833 ("depend-cleanup.sh: clean up after hash function removal from libcrypt")
Reviewed by:	jhb, emaste
Differential Revision:	https://reviews.freebsd.org/D52012
2025-08-20 15:09:11 +02:00
Kyle Evans dc5f8c3442 build: Switch CLEAN back off by default, again
Now that we have the notion of a build epoch, we have sufficient tooling
to handle changes that might need a larger hammer to unbreak the build.

Future changes may extend our cleanup to avoid scenarios like with the
MITKRB5 knob where flipping it will still require a cleanup, but on the
whole most users aren't regularly flipping breaking knobs enough for
this to cause the same level of problems.  Those users are advised to do
a CLEAN build when they flip it until we start recording build options
and doing another clean for important knob switches (see D52011).

When knobs of that sort are newly introduced or switch defaults, we can
explicitly record an epoch for them in the interim until
option-switching is detected and handled properly.

This reverts commit 6dab48b9de.

Reviewed by:	jrtc27, markj
Differential Revision:	https://reviews.freebsd.org/D51923
2025-08-19 23:14:48 -05:00
ShengYi Hung 1344979687 usbtest: fix usbtest compilation error by an unused variable
Approved by:    lwhsu (mentor), markj (mentor)
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D51867
2025-08-19 07:15:18 -04:00
Kyle Evans aef16fc30b build: remove certctl requirement for host OpenSSL libs on macOS
Some platforms, like macOS, do not expose headers for the system's
libcrypto for public consumption.  libcrypto is relatively heavy and
needs to know, e.g., the host system's endianness, so we scope the build
down to macOS where OpenSSL headers are known to not be present and we
can be reasonably certain that most of the systems today that would be
cross-building are little endian.

We still don't bother if building WITHOUT_OPENSSL since the end result
is expected to be used by OpenSSL, but perhaps we could revisit that
independently in case one, e.g., brings their own implementation.

Reported by:	jrtc27
Reviewed by:	jrtc27, ngie
Fixes:	c340ef28fd ("certctl: Reimplement in C")
Differential Revision:	https://reviews.freebsd.org/D51935
2025-08-18 23:27:59 -05:00
Enji Cooper 19c8cc3162 Remove inotify example code when MK_EXAMPLES == no
This change adds the needed entries to OLD_DIRS and OLD_FILES to ensure
that the paths are properly cleaned up when `make delete-old` is run and
MK_EXAMPLES == no.

MFC after:	2 months
Fixes:		1d8664d690 ("examples: Add a demo program for inotify")
Differential Revision:	https://reviews.freebsd.org/D51934
2025-08-18 18:09:12 -07:00
Gordon Bergling f066a42505 test/netfibs: Fix a typo in a source code comment
- s/aguments/arguments/

MFC after:	3 days
2025-08-17 09:32:10 +02:00
Lexi Winter 837b13af68 Revert "Remove Secure RPC DES authentication"
This reverts commit 7ac276298b.

Requested by:	kib
2025-08-15 17:59:18 +01:00
Kyle Evans 0090096e52 build: introduce the notion of a build epoch
Idea and file format shamelessly stolen from CheriBSD, but reimplemented
in terms of the standard FreeBSD build system.  We'll use this in some
events that call for a deeper cleansing, typically reserved for
situations where the dependencies are too complicated to unwind.  This
notably does not preclude us from doing separate cleansing of world for
specific src.conf(5) knob changes that would require a rebuild.

In the FreeBSD version, we either stamp the OBJTOP we're cleaning
(bootstrap or the full OBJDIR) with the current epoch and bail out for
unstamped objdirs, or we compare and either `rm -rf` or `cleandir` as
necessary.

Reviewed by:	brooks, des
Differential Revision:	https://reviews.freebsd.org/D51848
2025-08-14 23:43:42 -05:00
John Baldwin a66e5ce3d5 depend-cleanup: Handle tcopy moving from C to C++ 2025-08-14 16:46:01 -04:00
Michael Reifenberger 235071bd98 Modify nanobsd/defaults.sh to reduce buildsize, buildtime and
increase imgsize to fit.

Not building debug symbols and tests reduces _.w/ from 1465 to 503 MB.
Increasing the mediasize to 6000000 let the image be built.
Otherwise I get:
...
00:33:58 ## build code slice
00:33:58 ### log: /usr/obj/nanobsd.full/_.cs

/usr/obj/nanobsd.full/_.mnt: write failed, filesystem is full

Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D49885
2025-08-13 16:03:32 +02:00
Lexi Winter 7ac276298b Remove Secure RPC DES authentication
Following the earlier removal of keyserv, none of this functionality
works since it requires keyserv.

Remove the relevant symbols from libc's Symbol.map.  Leave compatibility
symbols for existing applications, but since the functions don't work
without keyserv, stub them out to return an error.

Remove some private symbols that were only used by keyserv; these don't
get compatibility symbols.

Remove the documentation for the old functions.

Remove rpc.ypupdated since it requires DES authentication.

Reviewed by:		manu, des, emaste
Differential Revision:	https://reviews.freebsd.org/D50442
2025-08-10 16:36:40 +01:00