Commit graph

5811 commits

Author SHA1 Message Date
Dimitry Andric 7ba8cc9b7b depend-cleanup.sh: handle 32-bit dependencies having no 64-bit equivalent
For example with the recent removal of ffs.S for 32-bit arm and i386,
the egrep in clean_dep() did not find any files to remove, even if you
added a "clean_dep lib/libc ffs S" line. This is because it will never
find the ffs.S filename in the 64-bit .depend files for libc.

Split the searching and removing of 32-bit dependencies and objects into
a separate part to cope with this. This can be used similarly later on,
for other bitnesses.

MFC after:	3 days
2023-07-11 00:57:33 +02:00
John Baldwin 1f7e357264 fwctl_fetch: Add a comment describing the tool.
I meant to include this in the earlier commit adding fwctl_fetch but
forgot to amend the commit before pushing it.
2023-07-07 13:06:26 -07:00
John Baldwin d8bfccb220 fwctl_fetch: A small test utility for the fwctl bhyve device.
This can be run inside a bhyve guest to query the value of fwctl
nodes.  Note that fwctl in bhyve only supports a single hw.ncpu node.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D40803
2023-07-07 13:02:13 -07:00
Alfonso Gregory 5c3b5af6a2 Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:18 -06:00
Alfonso Gregory 90597773cd Mark usage function as __dead2 in programs where it does not return
In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735
2023-07-07 10:45:17 -06:00
Greg Becker 642cd51102 libthr: Add src.conf variable WITHOUT_PTHREADS_ASSERTIONS
This patch fixes a bug which prevents building libthr without
_PTHREADS_INVARIANTS defined. The default remains to build libthr
with -D_PTHREADS_INVARIANTS. However, with this patch, if one builds
libthr with WITHOUT_PTHREADS_ASSERTIONS=true then the latency to
acquire+release a default pthread mutex is reduced by roughly 5%, and a
robust mutex by roughly 18% (as measured by a simple synthetic test on a
Xeon E5-2697a based machine).

Reviewed by:	jhb, kib, mjg
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D40900
2023-07-07 04:45:09 +03:00
Peter Holm 4631191c8a stress2: Added a regression test 2023-07-06 11:15:13 +02:00
Marius Strobl eb33b693b3 test: remove remainder of testfloat
These bits are unused since the sparc64-specific glue has been deleted
in f33b14f0.
2023-06-30 22:43:50 +02:00
Ed Maste 229d643c4d depend-cleanup: apply big hammer for OpenSSL 3.0 update
If we find an object corresponding to a source file that existed in
OpenSSL 1.1.1 but not in 3.0 just remove all of the OpenSSL objdirs.

Reviewed by:	dhw
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D40750
2023-06-24 19:46:09 -04:00
Mitchell Horne ba84e87055 pmc: clean up remaining Pentium man page references
These have been removed.

Fixes:	d78896e46f ("pmc(3): remove Pentium-related man pages...")
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2023-06-24 16:30:00 -03:00
Dimitry Andric bdd1243df5 Merge llvm-project main llvmorg-16-init-18548-gb0daacf58f41
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-16-init-18548-gb0daacf58f41.

PR:		271047
MFC after:	1 month
2023-06-22 20:20:56 +02:00
Peter Holm 83c701af53 stress2: Added two syzkaller reproducers 2023-06-21 11:10:13 +02:00
Ed Maste 2e65cfd3ad Restore dummy WITHOUT_{CAPSICUM,CASPER} descriptions
The makeman CI job ensures that all options have description files.

Bring the CI job back to green by adding back WITHOUT_CAPSICUM and
WITHOUT_CASPER description files (that now state the assoicated options
have no effect).

Fixes: c24c117b96 ("Remove WITHOUT_{CAPSICUM,CASPER} options")
Sponsored by:	The FreeBSD Foundation
2023-06-19 23:20:49 -04:00
Colin Percival c24c117b96 Remove WITHOUT_{CAPSICUM,CASPER} options
At this point CAPSICUM and CASPER are merely forced on via the newly
added __REQUIRED_OPTIONS list; after stable/14 branches I'll sweep
the tree for MK_{CAPSICUM,CASPER}.

This change will not be MFCed.

Discussed on:	freebsd-arch
Differential Revision:	https://reviews.freebsd.org/D40592
2023-06-19 17:23:09 -07:00
Colin Percival bce9967915 options/makeman: Handle __REQUIRED_OPTIONS
Teach the code which generates src.conf.5 about __REQUIRED_OPTIONS;
without this change it gets confused and thinks that every option
turns the required options on.

Reviewed by:	sjg, imp
Differential Revision:	https://reviews.freebsd.org/D40591
2023-06-19 17:23:09 -07:00
Peter Holm fa273fa154 stress2: Added a regression test for mksnap_ffs(8) 2023-06-13 11:01:43 +02:00
Warner Losh 2c0cd59345 checkstyle9.pl: Add check for bad email
Add check for bad email. And remove check for qemu that doesn't matter.

Sponsored by:		Netflix
2023-06-12 10:08:17 -06:00
Peter Holm 6b7a06c3bd stress2: Avoid using "__unused" 2023-06-08 09:49:52 +02:00
Dmitry Chagin c8dbef44ff xregs_sig: Add avx registers to test
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40384
2023-06-04 12:07:02 +03:00
Dmitry Chagin 0be13a45f7 xregs_sig: Add a ability to handle multiple register banks
While here replace the .global directive by traditionally used .globl.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40410
2023-06-04 12:06:25 +03:00
Dmitry Chagin e5b3cd6100 xregs_sig: Simplify Makefile by using MACHINE_CPUARCH in SRCS
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D40383
2023-06-03 20:13:23 +03:00
Dmitry Chagin 1b0d96f3c4 xregs_sig: Finish renaming simd to xregs before adding avx
Reviewed by:		kib, jhb
Differential Revision:	https://reviews.freebsd.org/D40382
2023-06-03 20:11:44 +03:00
Dmitry Chagin 8fdc9ce97c avx_sig: Better naming as the test will include more register banks
Reviewed by:		jhb, kib (early revision)
Differential Revision:	https://reviews.freebsd.org/D40381
2023-06-03 20:10:49 +03:00
Baptiste Daroussin cb1fc924d2 genl: add new command to list genetlink(4)
This commands list genetlink protocols and its operations and
capabilities

Name: nlctrl
	ID: 0x10, Version: 00, header size: 2, max attributes: 10
	supported operations:
	 - ID: 0x3, Capabilities: 0xe (can modify; can get/dump;
has policy)
	multicast groups:
	 - ID: 0x30, Name: notify
Name: carp
	ID: 0x11, Version: 00, header size: 2, max attributes: 2
	supported operations:
	 - ID: 0x1, Capabilities: 0xe (can modify; can get/dump;
has policy)
	 - ID: 0x2, Capabilities: 0xb (requires admin permission;
can modify; has policy)

Reviewed by:		melifaro
Differential Revision:	https://reviews.freebsd.org/D40330
2023-05-30 13:36:43 +02:00
Dmitry Chagin 4f2c2a122c avx_sig: Adapt avx_sig test for Aarch64
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40309
2023-05-30 11:19:40 +03:00
Dmitry Chagin 68348f41c9 avx_sig: Prepare to add arm64 neon test
Move inlined asm code to a separate source and rename x86 specific xmm
names to more general simd names.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40312
2023-05-30 11:18:57 +03:00
Dmitry Chagin 723e25f128 avx_sig: Print statistics by interval enstead of by pressing ^T
Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40311
2023-05-29 11:09:17 +03:00
Dmitry Chagin 0a09cfb3f7 avx_sig: Avoid libbsd dependency for modern Glibc
Due to arc4random functions are povided by Glibc 2.36.

Reviewed by:		kib
Differential Revision:	https://reviews.freebsd.org/D40310
2023-05-29 11:08:35 +03:00
Peter Holm 750ae32b9e stress2: Initialize variable 2023-05-27 10:34:48 +02:00
Peter Holm 273a89bb14 stress2: Tune to get more slightly broken file systems 2023-05-27 10:31:44 +02:00
Peter Holm acfb06062a stress2: Fix warnings 2023-05-27 10:31:00 +02:00
Christos Margiolis 0c08479898 git-arc: mention creation of separate reviews in man page
Reviewed by:	imp
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D39963
2023-05-22 22:49:32 +03:00
Christos Margiolis 0688eac1f9 git-arc: fix spelling error in -s option
Reviewed by:	imp
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D39962
2023-05-22 22:49:32 +03:00
Kristof Provost af15ae9dd1 prepare-commit-msg: add 'Event'
Add 'Event' to the pre-commit template.

The key word is already documented at
https://docs.freebsd.org/en/articles/committers-guide/#_include_appropriate_metadata_in_a_footer

Suggested by:	imp@
Event:		BSDCan 2023
Differential Revision:	https://reviews.freebsd.org/D40184
2023-05-22 16:01:09 +02:00
Peter Holm be8d01b515 stress2: Added a faster test of fsck_ffs by omitting mount(8) and umount(8) 2023-05-22 10:07:40 +02:00
Peter Holm ca0088ae27 stress2: Occasionally modify 8 bits 2023-05-22 10:05:34 +02:00
Kyle Evans ccb59683b9 arm64: add tests for swp/swpb emulation
One test is suitable to be hooked up to the build, so I've done this
here.  The other test lives in tools/regression because failure is a
bit more subjective -- generally, one runs it for some unbounded amount
of time and observe if it eventually exits because two threads acquired
the same mutex.

Reviewed by:	imp, mmel
Sponsored by:   Stormshield
Sponsored by:   Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D39668
2023-05-15 10:42:16 -05:00
Wolfram Schneider b3087b63da remove stale portsinfo script 2023-05-15 06:34:20 +00:00
Wolfram Schneider 1206aa2786 remove stale handbook scripts 2023-05-15 06:30:34 +00:00
Wolfram Schneider 27783115a9 remove stale message-id scripts 2023-05-15 06:29:39 +00:00
Wolfram Schneider 1cf4473fa3 remove stale script epfe.pl
tools/tools/epfe/epfe.pl was a perl script that formerly generated some
printing example files from content in a very old version of the handbook.

Reported by:	wblock
2023-05-15 06:22:41 +00:00
Simon J. Gerraty 722cfce5f4 Fix typo and use .Fx in WITH_DIRDEPS_BUILD 2023-05-12 09:49:21 -07:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Simon J. Gerraty 2b519b1707 Update description of WITH_DIRDEPS_BUILD 2023-05-12 09:42:21 -07:00
Simon J. Gerraty df9974197e Add description of WITH_META_ERROR_TARGET 2023-05-12 09:21:30 -07:00
Ed Maste 0e04dd3b66 pkgbase: report error if files are installed multiple times
Files installed by `make installworld` should be installed only once.

PR:		244596
Sponsored by:	The FreeBSD Foundation
2023-05-09 21:10:03 -04:00
Ed Maste fc2e2c950d src.conf: add WITH_TOOLCHAIN description
It is not used by the in-tree default configuration, but adding it
allows downstream projects with different defaults to make use of
Cirrus-CI (as the makeman test added in 85e8c2a034 requires that
there are no missing option descriptions).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39936
2023-05-03 11:41:58 -04:00
Ed Maste 0b4568e36f src.opts.mk: Decouple MK_INCLUDES from MK_TOOLCHAIN
Prior to 590461a4b8 installation of include files was controlled
directly by ${MK_TOOLCHAIN}.  590461a4b8 added an INCLUDES knob
defaulting to YES.  Setting WITHOUT_TOOLCHAIN forced it off to retain
existing behaviour.

Decouple them now, as there are reasonable use cases for installing
libraries and include files without a compiler or other tool chain
components.

Reviewed by:	imp, jrtc27
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39918
2023-05-01 20:33:08 -04:00
Warner Losh cf6044857e stand: Testing program for smbios
Write a quick and dirty testing program to dump physical memory to help
test and debug the smbios.c code in new environments.

Sponsored by:		Netflix
Differential Revision:	https://reviews.freebsd.org/D39791
2023-05-01 15:12:19 -06:00
Ed Maste 2a3bd08708 pkgbase: hide duplicate METALOG directory warnings under verbose
Creating directories multiple times is an inherent side effect of the
way installation is done.  Hide warnings from duplicate directory
entries (with identical metadata) under metalog_reader's verbose mode.

Duplicate file entries are always reported.  They currently generate
warnings but will be switched to errors once the few instances currently
in the tree are fixed.

PR:		244596, 271178
Reviewed by:	kevans
Sponsored By:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D39898
2023-05-01 15:22:36 -04:00
Peter Holm b274854dd9 stress2: Added a temporary fix for the UFS+SU "out of inodes" issue 2023-05-01 12:52:42 +02:00
Alex Richardson b347c22846 cross-build: Add common compatibility headers after OS-specific ones
The current order is rather counter-intuitive and it appears to work fine
if we swap the order.

Pull Request:	https://github.com/freebsd/freebsd-src/pull/725
Reviewed by:	imp
2023-04-28 16:10:25 -07:00
Vincenzo Maffione 8c3b8c8386 netmap: pkt-gen: sync with upstream
Keep in sync with the recent upstream changes:

Fix compilation on 32-bit architectures
Update IP length, UDP length/checksum when size changes
Man page fixes

Submitted by:	jlduran@gmail.com
MFC after:	7 days
Differential Revision:	https://reviews.freebsd.org/D39760
2023-04-26 20:32:24 +00:00
Peter Holm 883a49e5a1 stress2: Update the exclude list 2023-04-25 11:42:04 +02:00
John Baldwin 77d2a2d065 depend-cleanup.sh: Handle kqueue1() becoming a wrapper around kqueuex().
For a brief period kqueue1() was a system call and stale dependencies
cause it to not be re-built.
2023-04-24 14:05:18 -07:00
Simon J. Gerraty 644d346d99 We do not need readpassphrase from openssh
When building tar for linux, just disable HAVE_READPASSPHRASE
in config_freebsd.h and libarchive will provide for readpassphrase
Otherwise the two conflict.
2023-04-24 13:50:18 -07:00
Simon J. Gerraty 976ba7f02a Enable building tar for non-FreeBSD host
For DIRDEPS_BUILD we need Makefile.depend.options to
force libegacy to be built on older FreeBSD and non-FreeBSD hosts.

Add readpassphrase to libegacy to avoid the need for libbsd on Linux

src.opts.mk disable TESTS for host if MK_host_egacy is yes

Reviewed by:	imp
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39766
2023-04-24 10:20:17 -07:00
Simon J. Gerraty baf2dc6476 Set UPDATE_DEPDFILE=NO for showconfig
Exporting UPDATE_DEPDFILE=NO from makeman didn't work,
back to setting it in local.meta.sys.env.mk
2023-04-23 13:43:45 -07:00
Colin Percival df53ae0fdd Remove portsnap(8)
Rather than having a tool in the FreeBSD base system for obtaining
the FreeBSD ports tree, users are encouraged to `pkg install git`
and then `git clone https://git.FreeBSD.org/ports.git /usr/ports`.

The portsnap servers will continue operating until FreeBSD 13 reaches
its End-of-Life, and portsnap is available from the ports tree as
ports-mgmt/portsnap.

Requested by:	portmgr
Relnotes:	yes
Differential Revision:	https://reviews.freebsd.org/D39563
X-MFC:		no
2023-04-22 18:12:37 -07:00
Simon J. Gerraty 16161b4839 makeman export UPDATE_DEPENFILE=no
Just to be clear we do not need any updates.
2023-04-22 14:57:24 -07:00
Simon J. Gerraty db98bc2c0d Allow tools/build to work for DIRDEPS_BUILD
We want to be able to build some host tools for non-FreeBSD hosts
without building more than we need.  The DIRDEPS_BUILD lets us
do that.

We use the pseudo MACHINE "host" when building
for the host - deal with that when setting _host_arch.

Reviewed by:	jrtc27
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D39751
2023-04-22 12:25:54 -07:00
Peter Holm 7f658f99f7 stress2: Mark set but unused variables as unused 2023-04-22 13:16:01 +02:00
Brooks Davis 0ef8e98fda Add WITH_NETLINK_SUPPORT description
Reviewed by:	melifaro
Differential Revision:	https://reviews.freebsd.org/D39676
2023-04-20 22:34:21 +01:00
Peter Holm 9c9dfbf256 stress2: Added comment of fixed problem. Enable test 2023-04-19 09:26:29 +02:00
Peter Holm 0ece3355f6 stress2: Added comment about a new panic found. Test both SU and SU+J. 2023-04-14 09:55:10 +02:00
Gordon Bergling e0c2f93029 vimage.8: Remove a double word
- s/are are/are/

MFC after:	3 days
2023-04-13 20:22:25 +02:00
John Baldwin 1ca12bd927 Remove the riscv64sf architecture.
Reviewed by:	jrtc27, arichardson, br, kp, imp, emaste
Differential Revision:	https://reviews.freebsd.org/D39496
2023-04-12 11:09:27 -07:00
Peter Holm af67f36a92 stress2: Update the exclude list 2023-04-10 10:03:22 +02:00
Peter Holm a02c285690 stress2: Tune MAXVNODES to avoid excessive run time 2023-04-08 09:19:23 +02:00
Ed Maste a9d0665bbb src.conf.5: Expand WITH_LLVM_BINUTILS description
List the specific tools that are controlled by WITH_LLVM_BINUTILS, and
mention the tools that are always or never taken from LLVM.  Tools come
from one of three sources (LLVM, ELF Tool Chain, bespoke base system)
and it is useful to be explicit.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39428
2023-04-05 13:05:15 -04:00
Peter Holm 74901941fc stress2: Add comment about problem found. Disable run of this test 2023-04-03 09:33:03 +02:00
John Baldwin e93da76b07 nanobsd: Remove MIPS configurations.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D39332
2023-03-31 10:55:22 -07:00
John Baldwin a827077e01 Add libcap_netdb.so.1 to the list of libcasper helper libraries.
Reported by:	Yuri <yuri@aetern.org>
Fixes:		7d8e1e8dd9 libcasper: Move helper libraries from /lib/casper to /lib.
2023-03-30 14:54:48 -07:00
Mark Johnston 0ec03c0b10 cross-build: Add secure_getenv() for MacOS cross builds
Reviewed by:	arichardson
Fixes:		68ca8363c7 ("libc: Use secure_getenv(3) where appropriate")
Differential Revision:	https://reviews.freebsd.org/D39295
2023-03-30 00:54:13 -04:00
John Baldwin 7d8e1e8dd9 libcasper: Move helper libraries from /lib/casper to /lib.
These libraries are linked to directly by applications rather than
opened at runtime via dlopen().

Discussed with:	oshogbo
Reviewed by:	markj, emaste
Differential Revision:	https://reviews.freebsd.org/D39245
2023-03-29 15:04:28 -07:00
John Baldwin c476ca181a OptionalObsoleteFiles.inc: Remove MIPS-specific hwpmc manpages.
These are unconditionally removed in ObsoleteFiles.inc.
2023-03-29 10:40:59 -07:00
John Baldwin ac6b2b4344 build: glibc on Linux defines explicit_bzero in <string.h>.
Don't install strings.h on such systems.  The local prototype doesn't
match the native Linux one when built as C++ breaking the build of
config(8) as a bootstrap tool on some Linux systems.  If the missing
prototype becomes a problem in the future,
tools/build/cross-build/include/linux/strings.h can be patched to add
it.

Reviewed by:	imp, emaste
Obtained from:	CheriBSD
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D39289
2023-03-27 14:27:16 -07:00
Alexander V. Chernikov 64dfea8651 netlink: add NETLINK/NETLINK_SUPPORT userland options.
Make userland tools such as netstat, route, arp and ndp use
 either netlink or rtsock interfaces based on the NETLINK_SUPPORT
 options.
Both NETLINK and NETLINK_SUPPORT options are turned on by default.

Reviewed By: eugen
Differential Revision: https://reviews.freebsd.org/D39148
2023-03-26 08:59:58 +00:00
Warner Losh 3a3c924273 checkstyle9.pl: Perl script to check if a change is approximately style(9)
This code is adapted from the QEMU checkpatch.pl script. It can check
either a patch, a file or a git branch. It tries to warn about things
that I believe might be style(9) violations. It's experimental, since I
heavily hacked on the qemu version to get it to not complain (much)
about iconic code in the tree. At the moment, it's use should be
considered expermental. It will likely miss violations, and complain
about code that's perfectly fine.  It's offered as an experiment
and to make it easier for contributors to submit patches.
2023-03-25 11:06:13 -06:00
Kirk McKusick e5d0d1c5fb Rewrite function definitions with identifier lists.
A few functions snuck in with K&R style definitions.

Also add some missing memory frees.

MFC after:    1 week
2023-03-22 15:58:18 -07:00
Peter Holm bb1f64b200 stress2: Fix syntax error. Remove redundant backup 2023-03-22 10:05:46 +01:00
Peter Holm e689e7facd stress2: Fix compiler warning 2023-03-22 10:05:04 +01:00
John Baldwin 1ad3cafcd3 Remove /usr/lib/dtrace/ipfw.d for WITHOUT_DTRACE.
Reviewed by:	brooks
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D39099
2023-03-21 19:06:40 -07:00
Peter Holm ce7b20e512 stress2: Added more FFS tests 2023-03-19 09:55:00 +01:00
Peter Holm bce30c896d stress2: Added two syzkaller reproducers 2023-03-18 10:31:31 +01:00
Peter Holm 7861fce32b stress2: Fix compiler warning 2023-03-17 12:06:52 +01:00
Peter Holm 79f5d67caa stress2: New problem found was added 2023-03-16 13:59:16 +01:00
Jessica Clarke 9e914c7af1 Add new DISK_IMAGE_TOOLS_BOOTSTRAP option
This will build etdump, makefs and mkimg as bootstrap tools to allow
easily creating disk images. Note that etdump is bootstrapped due to its
use in the release scripts for building ISO images.

Reviewed by:	emaste, arichardson
Differential Revision:	https://reviews.freebsd.org/D39072
2023-03-15 00:06:53 +00:00
Ed Maste a2de35e1a4 CI: update QEMU command line to avoid deprecated option format
> warning: short-form boolean option 'readonly' deprecated
> Please use readonly=on instead

Sponsored by:	The FreeBSD Foundation
2023-03-14 08:44:50 -04:00
Brooks Davis 3ac71149ba Add WITH_LOADER_VERIEXEC_VECTX description
PR:		270017
Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D39002
2023-03-09 21:39:41 +00:00
Brooks Davis aad600e52e Remove WITH(OUT)_ATM option
With the removal of NgATM it no longer controls anything.

Reviewed by:	manu, emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38882
2023-03-09 18:09:18 +00:00
Brooks Davis af0cc0b223 NgATM: Remove netgraph ATM support
Most ATM support was removed prior to FreeBSD 12.  The netgraph support
was kept as it was less intrusive, but it is presumed to be unused.

Reviewed by:	manu
Relnotes:	yes
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38879
2023-03-09 18:04:02 +00:00
Ed Maste bd258f88e5 src.conf.5: Use common phrasing in WITHOUT_OFED text
Reported by:	jhb
Sponsored by:	The FreeBSD Foundation
2023-03-08 21:18:37 -05:00
Ed Maste c581962414 src.conf.5: Add some WITH_/WITHOUT_ option descriptions
Reviewed by:	markj, brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38961
2023-03-08 18:30:45 -05:00
Ed Maste 4a869d380e nvram2env: Retire unused MIPS-specific driver
This code was used only on MIPS platforms, and has not built in some
time.

Reviewed by: ray
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D38986
2023-03-08 18:24:02 -05:00
Brooks Davis cc36164a77 makeman: replace -\|/ twiddles with dots
It shows progress more clearly, there aren't so many that the output
is excessive, and it's more friendly for things like Cirrus-CI's
logging that print the backspaces as boxes.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38990
2023-03-08 21:01:17 +00:00
Brooks Davis fca7df1b28 makeman: don't insert a $FreeBSD$
There's no need to insert this line which won't be expanded in git.  Not
generating it won't impact MFCs to 12 since the removal won't be MFCd.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38989
2023-03-08 21:01:17 +00:00
Brooks Davis 42afe48b1a makeman: fix a whitespace bug
Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D38988
2023-03-08 21:01:17 +00:00
Jose Luis Duran 320e7e0003 Revert "Fix cross-build support for Ubuntu 16.04"
This reverts commit d6327ae8c1.

Before version 2.25, glibc's unistd.h would define the POSIX subset of
getopt.h by defining __need_getopt, including getopt.h (which would
disable the header guard) and then undefining it so later including
getopt.h explicitly would define the extensions. However, we wrap
getopt, and so the wrapper's #pragma once breaks that. Thus getopt.h was
included before the real unistd.h to ensure we get all the extensions.

However, with clang 12 that causes problems where we get a function
mismatch (since getopt can throw exceptions). If we include it after
unistd.h, it will get the full definitions since glibc no longer does
the subsetting thing. This will result in matching definitions and fix
clang 12.

Reviewed by: imp, jrtc27 (OK'd on irc)
Pull Request: https://github.com/freebsd/freebsd-src/pull/668
2023-03-07 16:11:11 -07:00
Herbert J. Skuhra 08e66b7a37 ATM: Remove /usr/include/netnatm when disbled 2023-03-06 21:47:36 +00:00
Vincenzo Maffione 506336f2cd netmap: pkt-gen: init all slots of every tx ring
sender_body() uses OPT_COPY to copy the frame into the destination slot
for the first 100,000 packets. Then it removes OPT_COPY to improve
performance. The function always starts with the first tx ring.

If multiple tx rings are in use, it is possible that the initial 100k
packets will only use the first ring. After OPT_COPY is removed, there
may come a time when the first ring is full and sender_body() will move
to the next ring which was never initialized. As a result it will send
all zero packets. (This was discovered when the receiving NIC reported
rx errors.)

Before any transmissions, step through every tx ring and set
NS_BUF_CHANGED on every slot. That will force send_packets() to
initialize the slot when first used. Since it only copies when
necessary, it performs better than always setting OPT_COPY. With this
change, there is no reason for the "drop copy" code.

Submitted by:	Brian Poole <brian90013@gmail.com>
MFC after:	7 days
2023-03-06 17:22:09 +00:00
Peter Holm ee10c61d7a stress2: Fix a off-by-one error. Added check for argument file type 2023-03-06 10:03:43 +01:00
Brooks Davis f0c4b42c60 nanobsd: remove comment about keeping C++ enabled
It's no longer possible to disable C++ so there's no need to comment
on it.

Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D38883
2023-03-03 16:47:36 +00:00
Emmanuel Vadot 66a175980e Add description for WITH_ATM
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D38845
2023-03-03 08:52:39 +01:00
Ed Maste c5e54e56e6 tools/build: Hide spurious errors if sys/stat.h does not exist
Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38757
2023-03-01 19:59:26 -05:00
Gleb Smirnoff d8c70d6dfb nanobsd: fix typo
Fixes:	cbf64e2dd5
2023-02-27 11:26:18 -08:00
Mark Johnston 538c66eabd netmap: Fix compiler warnings in tools
- Remove write-only variables, or hide them in cases where their use is
  conditional or commented out.
- Check for errors from cmd_apply() in nmreplay.
- Use ANSI C definitions.

Reviewed by:	vmaffione
MFC after:	2 weeks
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D38752
2023-02-27 13:41:58 -05:00
Warner Losh cbf64e2dd5 nanobsd: Better NANO_OBJ if NANO_LAYOUT is set
If NANO_LAYOUT is set, then use /usr/obj/nanobsd.${NANO_NAME}.${NANO_LAYOUT}
instead of the current /usr/obj/nanobsd.${NANO_NAME} to allow multiple layouts
to be built w/o errors due to the time-skew that creates.

PR: 269366
Suggested by: Eugene Grosbein
Sponsored by: Netflix
2023-02-27 10:18:59 -07:00
Mina Galić 0455b90bee tools/git: fix typos in documentation
and change mention of svn to git.

Reviewed by:	emaste
Pull Request:	https://github.com/freebsd/freebsd-src/pull/659
2023-02-23 16:15:19 -05:00
Peter Holm 187f4fce3b stress2: Added a fsck check to the scenario 2023-02-20 12:04:24 +01:00
Warner Losh e600bcfb87 stand: Better documentation for full-test.sh
Update now that things have been pushed into the tree.

Sponsored by:		Netflix
2023-02-18 19:53:19 -07:00
Ed Maste 7b0593fdcb Cirrus-CI: use makefs if root size exceeds QEMU's virtual FAT limit
We use QEMU's virtual FAT support to avoid having to create a disk
image because it is much faster, but it has a limit of about 500MB.
Artifacts produced by the GCC 12 CI job exceeded this size.

Add support for creating a FAT partition image and MBR-partitioned disk
image and use it when the file system is too large for QEMU.

In one run the Cirrus-CI LLVM test task took 1m33s using QEMU's virtual
FAT while the GCC task took 6m48s using makefs+mkimg.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D38589
2023-02-14 15:41:01 -05:00
Peter Holm 31a2528768 stress2: Add UFS+SU test scenario 2023-02-14 11:48:18 +01:00
Peter Holm 3f1f48f1d9 stress2: Add a regression test for D38549 2023-02-14 09:44:58 +01:00
John Baldwin 3dfd18a769 Remove support for the base/* toolchain ports.
These ports have been removed so these knobs are no longer meaningful.

This reverts commit 608289394f.
This reverts commit 39eb07f172.

Reviewed by:	imp, bapt, emaste
Differential Revision:	https://reviews.freebsd.org/D38562
2023-02-13 13:16:24 -08:00
Peter Holm 32ded86a06 stress2: Fix compiler warning about unused variables 2023-02-11 06:36:39 +01:00
Kyle Evans ee3872a714 tools: cleanup stale dependencies from further config(8) C++ification
Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D38276
2023-02-08 23:19:09 -06:00
Dag-Erling Smørgrav 0dfaefa975 depend-cleanup.sh: Simplify the logic, and clean bootstrap tools.
* There's no need to check if the file exists before grepping it; if it does not exist, grep will fail, which is what we want.  Just redirect the error message to /dev/null.
* There's no need to split the .o and .pico cases; the bodies are identical, so combine the conditions.  Use a glob to avoid a false negative if one exists but not the other.
* Also run depend-cleanup.sh on the bootstrap build tree.  This unbreaks the build after 29c5f8bf9a.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	imp, emaste
Differential Revision:	https://reviews.freebsd.org/D38447
2023-02-08 23:59:13 +01:00
Dimitry Andric 50d7464c3f Merge llvm-project release/15.x llvmorg-15.0.7-0-g8dfdcc7b7bf6
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.7-0-g8dfdcc7b7bf6.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:25 +01:00
Dimitry Andric f3fd488f1e Merge llvm-project release/15.x llvmorg-15.0.6-0-g088f33605d8a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.6-0-g088f33605d8a.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:19 +01:00
Dimitry Andric 6246ae0b85 Merge llvm-project release/15.x llvmorg-15.0.2-10-gf3c5289e7846
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15.0.2-10-gf3c5289e7846.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:05:09 +01:00
Dimitry Andric 753f127f3a Merge llvm-project main llvmorg-15-init-16436-g18a6ab5b8d1f
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-16436-g18a6ab5b8d1f.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:03:59 +01:00
Dimitry Andric 81ad626541 Merge llvm-project main llvmorg-15-init-15358-g53dc0f10787
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-15358-g53dc0f10787.

PR:		265425
MFC after:	2 weeks
2023-02-08 20:02:26 +01:00
Kyle Evans 4e86369417 tools: cleanup stale dependencies from recent config(8) change
mkmakefile.c moved to mkmakefile.cc, let's preemptively handle it.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Differential Revision:	https://reviews.freebsd.org/D38275
2023-02-08 00:09:57 -06:00
Justin Hibbits 61593cb297 Remove Doxyfiles for recently removed drivers. 2023-02-06 13:20:40 -05:00
Justin Hibbits 655d043b49 Remove gxemul drivers.
These were MIPS-only.
2023-02-06 13:06:25 -05:00
Peter Holm 0126bd3e6c stress2: Return error on exit. Run test for longer 2023-02-06 11:09:52 +01:00
Warner Losh a5c0d55177 test: Add fstab to all ufs images
Ensure that we populate /etc/fstab for all the ufs images.  Tweak sizes
while I'm at it.

Note: This file could use a good refactoring... or maybe a rewrite in
python or lua.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D38317
2023-02-03 08:41:41 -07:00
Peter Holm bbe0def9b0 stress2: Added a syzkaller reproducer 2023-01-30 09:50:19 +01:00
Peter Holm bbdd27f9d7 stress2: Avoid unrelated disk full messages from tests 2023-01-30 09:32:43 +01:00
Peter Holm 349aac52ac stress2: Added a test scenario for "out of inodes" issue with UFS+SU 2023-01-30 09:28:37 +01:00
Jessica Clarke b78ae0367f Revert "tools/build: Unbreak bmake bootstrap on Linux"
Now that make.py no longer has the described hack on Linux we can drop
this ugly workaround.

This reverts commit fba998a3d8.
2023-01-29 23:53:04 +00:00
Jessica Clarke 35921bba73 tools/build/make.py: Drop problematic Linux hack for bmake bootstrap
Since e2eeea75eb ("Merge bmake-20201117") missing/sys/cdefs.h has
been present in bmake, and _GNU_SOURCE seems to have been defined by
config.h for much longer than that, possibly for the entire time OS
cross-build support has been in-tree, so these are obsolete. Moreover,
since 79e02149fc ("Fix dtrace tools bootstrap on non-FreeBSD after
OpenZFS import"), HAVE_STRLCAT and HAVE_STRLCPY have been defined by our
cross-build headers in order to placate DTrace tools (which is not the
right way to solve that problem, but motivates fixing this one). Commit
4fde40d9b5 ("Merge/update to bmake-20230126") changed the strlcpy.c in
bmake from including config.h directly to including make.h, which means
it includes string.h and thus sees these bogus definitions, causing it
to not define the strlcpy compat function on Linux even though it needs
to and thus failing to link. Thus, fix this whole mess by removing the
hack we no longer need.
2023-01-29 23:53:04 +00:00
Ed Maste ac4c695ad6 Retire WITHOUT_CXX option
Several important base system components are written in C++, and the
WITHOUT_CXX option produced a system that was not fully functional.
Just accept this, and remove the option to build without C++ support.

This reverts commit adc3c128c6.

Reviewed by:	brooks, kevans, jhb (earlier)
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D33108
2023-01-26 21:13:16 -05:00
Warner Losh eaf5ec88c2 stand: Add testing for i386 as well to full-test.sh
Sponsored by:		Netflix
2023-01-25 08:04:59 -07:00
Peter Holm 7a56009cf5 stress2: Added a regression test 2023-01-22 10:35:28 +01:00
Justin Hibbits 701bb67bc5 ifnet: Rename DrvAPI to "IfAPI"
"DrvAPI" is too generic a name.  Make the name more specific as "IfAPI"
(InterFace API).

Sponsored by:	Juniper Networks, Inc.
2023-01-17 15:15:51 -05:00
Peter Holm 4dcc6baddb stress2: Added a regression test 2023-01-14 20:19:05 +01:00
Dag-Erling Smørgrav 4a158fc030 depend-cleanup.sh: handle zic moving one level up.
MFC after:	1 week
Sponsored by:	Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D38044
2023-01-14 18:17:22 +01:00
Gordon Bergling 094902ded9 git-arc.1: Fix a typo in the manual page
- s/betwen/between/

MFC after:	3 days
2023-01-11 11:28:20 +01:00
Peter Holm 48dc9150ac stress2: Added finding to unionfs9.sh and updated the exclude list 2023-01-10 06:33:14 +01:00
Brooks Davis 3b073d2ee5 tools/build: Always bootstrap (sys/)bitstring.h
Older, supported FreeBSD versions lack bit_ntest() so hoist the boostrap
installation out of the OS!=FreeBSD case and always install it.  A more
precise criteria is possible, but would add little value.

This fixes bootstrapping makefs as a build tool on 13.1.

Reviewed by:	jrtc27, emaste
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D37951
2023-01-09 19:17:48 +00:00
Warner Losh 43d82295d2 testing: Make sure to specify a name for zpools
Zpools have to have a name. Pools created w/o a name aren't legit and
trigger a number of bugs.

Sponsored by:		Netflix
2023-01-08 09:45:11 -07:00
Alan Somers da303f5fd4 fsx: more consistent debug output with -[RWU]
MFC after:	2 weeks
2023-01-06 21:49:28 -07:00
Alan Somers 3f8ca7a22e fsx: bounds check the inputs
In particular, don't allow the user to specify a file size that can't be
expressed as an int, since fsx's random-number generator only has a 32
bit range.

MFC after:	2 weeks
2023-01-06 18:54:23 -07:00
Joseph Mingrone a0c50eda29
beinstall.sh: Check correct exit status
When retrieving the timestamp of the last commit using git-show(1), do
not pipe the output to head(1), otherwise the return value in $? will be
for head(1) and not git-show(1).

Approved by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37742
2023-01-03 10:27:53 -04:00
Peter Holm 17edacfb6e stress2: Added a regression test 2023-01-03 10:34:00 +01:00
Vincenzo Maffione e81ecab4b1 netmap: bridge: fix -Wdate-time compilation issue
MFC after: 3 days
2022-12-31 14:56:02 +00:00
Vincenzo Maffione eda8251188 netmap: pkt-gen: fix ifname before cmp in source_hwaddr
In source_hwaddr(), the configured ifname is compared against all
interfaces. However, in main(), the string 'netmap:' is prepended to the
interface string if no explicit type is given. Therefore the ifname will
not match any system interface and the source MAC address is always
empty.

Check for the leading 'netmap:' string and skip past it to match against
system interfaces. Note that 'tap:' and 'pcap:' devices strip the type
string from the ifname in main() so no further work is needed.

MFC after:	7 days
Submitted by:	Brian Poole <brian90013@gmail.com>
2022-12-24 16:06:05 +00:00
Konstantin Belousov 6403a14024 tools/test/ptrace: update scescx to do remote getpid(2) on each SCX event
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D37590
2022-12-22 23:32:09 +02:00
Rene Ladan e2f3742ab8 gpioevents: fix some white-space errors
Fixes:		453db42291 - gpioevents: add support for pull-down and floating input pins.
Approved by:	manu (implicit)
MFC after:	1 week
2022-12-22 11:16:32 +01:00
Rene Ladan 453db42291 gpioevents: add support for pull-down and floating input pins.
The pin-mode (ft, pd, pu for floating, pull-down, pull-up) is
specified after the intr-config (no, eb, ef, er) for each pin.

Tested on my Raspberry Pi 1B.

PR:		268504
Approved by:	manu
MFC after:      1 week
2022-12-22 10:13:59 +01:00
Justin Hibbits 177034c44e Update DrvAPI convert script for new KPIs
Bring the DrvAPI convert script forward from the initial commit to
account for the last 8 years of changes to the KPIs.

Sponsored by:	Juniper Networks, Inc.
2022-12-20 11:18:50 -05:00
Peter Holm ae521fda89 stress2: Added link to problem found 2022-12-20 10:12:41 +01:00
Peter Holm eeabf9cb93 stress2: Fix long run time 2022-12-20 10:12:01 +01:00
Peter Holm eb928778a3 stress2: Add problem found 2022-12-13 12:00:01 +01:00
Ed Maste 86edb11e74 Always install llvm-objdump as objdump
Instead of providing no /usr/bin/objdump when LLVM_BINUTILS is false.

PR:		267854 [exp-run]
Reviewed by:	dim
MFC after:	2 weeks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D37445
2022-12-12 10:36:02 -05:00
Peter Holm 2518b1c742 stress2: Add list of problems found 2022-12-07 12:03:44 +01:00
Peter Holm 6e36cfadbc stress2: No need to run tests for 30 minutes 2022-12-06 10:32:49 +01:00
Warner Losh 858a73f14c full-test: Start of a full testing suite.
full-test.sh aims to be a test suite generator for the boot loader. It
tries to grab artifacts from the web and then constructs minimal boot
environments from that as well as writing qemu-system-* using scripts
that facilitates testing all the ways we can boot... At least all the
ways that we an boot that qemu can emulate.

This is very much a work in progress, and likely could use a good
cleanup at some point.

Sponsored by:		Netflix
2022-12-02 11:08:11 -07:00
Warner Losh aad99ded88 Add test notes
Add notes on how to test things. This will likely need to be fleshed out
more in the future, but this is a good start.

Sponsored by:		Netflix
2022-12-02 11:07:33 -07:00
Philip Paeps 821549a9df OptionalObsoleteFiles.inc: add zoneinfo/America/Ciudad_Juarez
tzdata 2022g and later split America/Ciudad_Juarez from America/Ojinaga.
Ensure this file is removed in builds WITHOUT_ZONEINFO.

MFC after:	1 day
2022-11-30 09:50:26 +08:00
Ed Maste f93d92f43d pkgbase: report errors via metalog reader exit status
Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37482
2022-11-25 09:13:31 -05:00
Ed Maste 20a66ab4bf Retire CLANG_IS_CC option
A small reduction in build infrastructure complexity; when we had both
Clang and GCC in the tree it was useful to have both built, and choose
one or the other to install as /usr/bin/cc.  Now only Clang is in the
tree, and there is no point in building and installing base Clang but
not providing it as cc (and c++, cpp).

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37075
2022-11-21 14:56:13 -05:00
Ed Maste 1f3b4f38a6 Update pkgbase metalog tool README to match installed filename
The pkgbase metalog tool is named metalog_reader.lua.  (One may argue
that a better name could be chosen, but the README should match in any
case.)

Sponsored by:	The FreeBSD Foundation
2022-11-18 15:11:52 -05:00
Warner Losh 8a744de27e stand: Remove i386-only support fire firewire
Remove support for booting off of firewire, and for having dcons via
firewire in the loader. Kernel support for these things is unchanged.
Discussed on arch@ and the current state is not working (and the build
was wrong to boot).

Sponsored by:		Netflix
Discussed:		https://lists.freebsd.org/archives/freebsd-arch/2022-November/000267.html
Reviewed by:		kevans, melifaro, emaste
Differential Revision:	https://reviews.freebsd.org/D37334
2022-11-18 10:43:59 -07:00
Ed Maste b751fc75bb pkgbase: report type for duplicated METALOG entries
Duplicate METALOG file entries are more of a concern than duplicate
directories.  The metalog check tool previously did not include the
entry type in the warnings, making it hard to find the ones of concern.

Sponsored by:	The FreeBSD Foundation
2022-11-17 10:28:06 -05:00
Ed Maste bca4d27052 pkgbase: examine METALOG files relative to stage root directory
Previously we stripped the '.' from the beginning of each METALOG entry
to determine the path to stat.  This meant that we examined files on the
build host, not the staged files.

Instead, strip off the last part of the specified METALOG pathname to
find the stage root directory, and stat files relative to that.

Reviewed by:	bapt
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D37412
2022-11-17 08:52:12 -05:00
John Baldwin 838a061417 depend-cleanup.sh: Handle rs(1) moving to C++.
To support changes in filenames for programs (and not just libraries),
update clean_dep() to check .depend.foo.o files as well as
.depend.foo.pico files.
2022-11-15 21:17:28 -08:00
Peter Holm 9e16087e36 stress2: Added a new SU+J + snapshot test scenario 2022-11-14 12:03:57 +01:00
Peter Holm 1541ac2120 stress2: Exclude two "forced detach" tests and two SUJ + snapshot tests 2022-11-14 12:01:30 +01:00
Baptiste Daroussin 616f32ea6d othermta: remove leftover from 20 years ago
othermta (along with mta_start_script configuration entry in rc.conf)
was a mechanism used to be able to run another mta than sendmail(8) before
"rcng" time 20 years ago.

othermta has not been used since.
2022-11-14 09:08:37 +01:00
Peter Holm d941ffdc4f stress2: Added a tmpfs regression test for Bug 223015 2022-11-13 10:15:21 +01:00
Peter Holm 7c455ce26f stress2: Added more "mdconfig -o force" tests 2022-11-13 10:05:35 +01:00
Peter Holm d7655675eb stress2: Snapshots of SU+J has been enabled 2022-11-13 09:58:29 +01:00
Peter Holm f31ca922cb stress2: Add SU+J as a test. Save fsck_ffs core dump, if any 2022-11-10 10:12:46 +01:00
Baptiste Daroussin 0b1adc42a1 rc.sendmail: remove unused script
20 years ago the use of rc.sendmail script was dropped in favor
of /etc/rc.d/sendmail, it is time to retire the script entirely
now.

MFC after:	1 week
2022-11-09 16:55:18 +01:00
John Baldwin 613aaf59af git-arc: Accept message via -m when updating reviews.
If a -m argument is given to update, it is passed through to arc diff
when updating each review.  Note that if an empty message is specified
via -m, arc diff will update the review without adding a note.

If an -m argument is not given, then the user's editor is invoked by
arc to supply a message for each review matching the previous
behavior.

This can be used to simplify the process for updating a set of
reviews, e.g.:

  git checkout foo
  git rebase main
  git arc update -m "Rebase" main..

This will rebase the 'foo' branch and update the reviews for all
commits on the branch without invoking the user's editor separately
for each review.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D37260
2022-11-07 14:46:15 -08:00
Alfredo Dal'Ava Junior b7ac17b48b tools/build/make.py: fix cross build on Fedora Linux
Fedora defines shell functions for some commands used by FreeBSD build
scripts. Unortunatelly it makes them behave incorrectly for our purposes.

For instance 'which which' returns something like:

which ()
{
    ( alias;
    eval ${which_declare} ) | /usr/bin/which --tty-only --read-alias ...
}

instead of

/usr/bin/which

This patch unsets those functions to restore original/expected behavior

Reviewed by:	emaste, imp
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D36900
2022-11-01 21:04:10 -03:00
Peter Holm 9349fc283b stress2: Added a newfs(8) test scenario 2022-10-27 09:59:16 +02:00
Peter Holm e23445275a stress2: Added a regression test for a ffs validate_sblock() fix 2022-10-27 09:57:57 +02:00
Peter Holm ee920bc903 stress2: Added a regression test for D37024 2022-10-24 09:48:09 +02:00
Peter Holm 799db59e9a stress2: Update tool to list both DATA and HOLES in a file.
Added a regression test.
2022-10-24 09:45:32 +02:00
Pau Amma f428cd0ebf Copyedit git-arc(1)
Bump .Dd again as requested.

Reviewed by:	gjb, imp, jhb

Approved by:	gjb (mentor, src), imp (src), jhb (src)

Differential Revision:	https://reviews.freebsd.org/D36705
2022-10-12 21:50:42 +02:00
Baptiste Daroussin 00ffd6b5e8 OptionalObsoleteFiles: grep nls files have been removed 4 years ago 2022-10-12 16:28:36 +02:00
Baptiste Daroussin ed990a7a2f sort: remove NLS support
NLS support for sort(1) is:
1/ incomplete: many error string are not using nls
2/ only covers hu_HU.ISO8859-2
2022-10-12 16:24:29 +02:00
Ed Maste a1e39f96d2 nanobsd: remove unmodified copies of ssh config files
Nanobsd included copies of ssh_config and sshd_config.  The former is
identical to the one provided by the base system, and the latter is
identical except for PermitRootLogin, which is updated by nanobsd's
cust_allow_ssh_root anyhow.  Remove nanobsd's copies and use the
existing base system ones.

Reported by:	Jose Luis Duran <jlduran@gmail.com> in D34937
Reviewed by:	Jose Luis Duran <jlduran@gmail.com>, imp
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D36933
2022-10-11 12:53:57 -04:00
Jose Luis Duran 9871ae6aa9 Track kern.ipc.somaxconn -> kern.ipc.soacceptqueue rename
Fixes:		2bdf61ca29 ("Hide the unfortunate named sysctl...")
MFC after:	3 days
2022-10-11 12:46:46 -04:00
Ed Maste 6e6c45e66f nanobsd: update copies of SSH config files
Sponsored by:	The FreeBSD Foundation
2022-10-11 09:25:39 -04:00
Peter Holm bab2efd47b stress2: Temporarily removed the rename(2) tests as these seem to trigger a
deadlock.  Count the number of CLEAN + MODIFIED reports from fsck_ffs and
flag counts > 1 as an error
2022-10-11 10:20:51 +02:00
Mark Johnston 6a720fb95a git-arc: Fix handling of review title containing double quotes 2022-10-04 13:05:54 -04:00
Jessica Clarke d577d6178b bsdinstall release: Move code to a new startbsdinstall wrapper
This separates out the install media-specific environment (creating
bsdinstall_etc) from actually running the installer on a given console.
This will be used by a future change to start the installer on multiple
consoles.

Reviewed by:	brooks, gjb
Differential Revision:	https://reviews.freebsd.org/D36803
2022-10-03 17:09:16 +01:00
Jessica Clarke a2464ee127 bsdinstall: Add a new runconsoles helper binary
This helper binary will run a given command on every on console, as
defined by /etc/ttys (except for ttyv*, where only ttyv0 will be used).
If one of the command processes exits, the rest will be killed. This
will be used by a future change to start the installer on multiple
consoles.

Reviewed by:	brooks, imp, gjb
Differential Revision:	https://reviews.freebsd.org/D36804
2022-10-03 17:09:16 +01:00
Brooks Davis b4cfdbfed2 manpages: Remove telnetd references
Mostly remove from the SEE ALSO section, adding a mention of the port
where not removed. Elsewhere, remove as appropriate and change from .Xr
to .Nm where a mention of telnetd continues to make sense (or removing
it would require significant reworking of the surrounding text).

Reviewed by:	imp, delphij, emaste
Differential Revision:	https://reviews.freebsd.org/D36785
2022-09-29 17:56:41 +01:00
Brooks Davis c0f94ccbb2 bsdbox: remove previously broken telnet(d) support
Support for telnet(d) was commented out some time ago.  Remove now that
telnetd is gone.

Reviewed by:	imp, delphij, emaste
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D36782
2022-09-29 17:56:25 +01:00
Brooks Davis 0eea46fb1f Remove telnetd
The telnetd codebase is unmaintained and has a number of quality
issues. Telnet has been largely supplanted by ssh. If needed, a port is
available (net/freebsd-telnetd), but a more maintained implementation
should be prefered.

While the telnet client suffers from the same issues, it is deemed
to be of lower risk and is required to connect to legacy devices, so
it remains.

Reviewed by:	emaste, imp
Differential Revision:	https://reviews.freebsd.org/D36620
2022-09-28 19:53:49 +01:00
Peter Holm 8dcc207de5 stress2: Fixed double word in comment
Reported by:	kib
2022-09-27 08:52:24 +02:00
Peter Holm 977d8fb9ad stress2: Added regression tests 2022-09-26 09:50:37 +02:00
Ed Maste d1a351be19 Do not delete objdump when WITH_LLVM_BINUTILS is true
WITH_LLVM_BINUTILS links /usr/bin/objdump to llvm-objdump, and similarly
for the man page.  Do not delete them in `make delete-old`.

PR:		266603
Sponsored by:	The FreeBSD Foundation
2022-09-25 15:33:16 -04:00
Peter Holm 5b42ac2914 stress2: Added two syzkaller reproducers 2022-09-21 07:40:47 +02:00
Jens Schweikhardt 91dba0dae7 Correct wrong sections for bpf and pcap. 2022-09-16 19:03:37 +02:00
Gordon Bergling 08cb3ac76c tools: Remove a double words
- s/to to/to/
 - s/to to/to do/ in an error message

MFC after:	3 days
2022-09-10 12:54:33 +02:00
Gordon Bergling 59cdd0e2ff stress2: Remove double words in comments
- s/to to/to/

 MFC after:3 days
2022-09-10 12:52:50 +02:00
Gordon Bergling ba594e730e regression-netinet: Remove a double word in a source code comment
- s/to to/to/

 MFC after:	3 days
2022-09-10 12:52:01 +02:00
Dag-Erling Smørgrav f419a28349 OptionalObsoleteFiles.inc: add bearssl, secureboot, veriexec.
Sponsored by:	Klara, Inc.
MFC after:	1 week
2022-09-09 14:06:11 +02:00
Gleb Popov 20adba8bc1 src.conf: Introduce WITHOUT_MACHDEP knob.
Summary:
This knob can be used to make buildsystem prefer generic C implentations of
various functions, instead of machine-specific assembler ones.

Test Plan: `make buildworld` on amd64

Reviewed by: imp, emaste

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

MFC after:	3 days
2022-09-09 09:54:28 +03:00
Peter Wemm 998b0a4ad8
OptionalObsoleteFiles.inc: Add missing sendmail feature macro files.
MFC after:	3 days
2022-08-31 02:38:57 -07:00
Gleb Smirnoff 4627bc1e90 tests: use PF_DIVERT/SOCK_RAW instead of PF_INET/SOCK_RAW/IPPROTO_DIVERT 2022-08-30 16:24:37 -07:00
Peter Holm 2aba6e7aaf stress2: Added a regression test 2022-08-25 09:47:58 +02:00
Mark Johnston c4d06691c0 git-arc: Respect GIT_EDITOR and GIT_PAGER 2022-08-24 16:54:41 -04:00
Mark Johnston 43d0c4d2a2 git-arc: Fix whitespace 2022-08-24 16:53:17 -04:00
Peter Holm 4e4f49fd4a stress2: Added another sigreturn(2) fuzzer test 2022-08-24 13:21:55 +02:00
Vincenzo Maffione 9a7abd9327 pkt-gen: flip IPv4 address in ping-pong mode
MFC after:	7 days
2022-08-24 08:20:57 +00:00
Jessica Clarke fba998a3d8 tools/build: Unbreak bmake bootstrap on Linux
Currently make.py has a hack to add the cross-build headers to the
include search path when bootstrapping bmake on Linux (but not macOS).
This is a bit of an abuse of these headers, and e9ba1fd5ed was not
prepared for this, since sys/bitcount.h won't exist in that instance (it
gets copied into WORLDTMP during the legacy build). Work around this
until we can wean the bmake bootstrap off using these headers by not
including sys/bitcount.h when it doesn't exist.

Fixes:	e9ba1fd5ed ("tools/build: Provide FreeBSD's bitstring API when cross-building")
2022-08-22 22:02:53 +01:00
Peter Holm dd89489769 stress2: Updated tests as a result of the latest updates to fsck_ffs(8) 2022-08-19 11:40:49 +02:00
Peter Holm 98b13e25fd stress2: Handle different spelling of "superblock" 2022-08-19 11:39:28 +02:00
Jessica Clarke 548f8a657b tools/build: Provide fls* when cross-building on Linux
flsll is needed for makefs's new ZFS support, and the others are added
for completeness.

Reviewed by:	emaste, arichardson
Fixes:		240afd8c1f ("makefs: Add ZFS support")
Differential Revision:	https://reviews.freebsd.org/D36134
2022-08-18 02:46:28 +01:00
Jessica Clarke e9ba1fd5ed tools/build: Provide FreeBSD's bitstring API when cross-building
This is needed for building makefs as a cross-tool since the ZFS code
uses these APIs.

Reviewed by:	emaste
Fixes:		240afd8c1f ("makefs: Add ZFS support")
Differential Revision:	https://reviews.freebsd.org/D36133
2022-08-18 02:46:27 +01:00
John Baldwin 548548649f git-arc: Use --head to avoid changing the checkout.
Rather than using 'git checkout' to move to the commit in question for
create and update, use the '--head' argument to 'arc diff'.  This
avoids the need to alter the current checkout and the related bits to
save/restore HEAD in the current checkout.

Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D36248
2022-08-17 16:19:31 -07:00
Warner Losh ef8b872301 stand: Flesh out the zfs image creation
Move the mbr non-geli zfs cases to no-priv creation with makefs / mkimg.
Add comments about the weird thing we do for MBR + ZFS + Legacy.  Add
comments about other architectures. Still need to think through how to
leverage a completed universe to do all the architectures...

Sponsored by:		Netflix
2022-08-17 11:39:53 -06:00
Warner Losh 3d3f2fb069 stand: Make makeroot.sh use makefs for ZFS
Start to use makefs for ZFS. This covers the gpt nogeli variants.  ZFS
MBR booting is tricky and complicated, so will need some additional
tweaks that makefs/mkimg isn't able to do at the moment. This means that
all gpt nogeli amd64 combinations can be built w/o root.

In addition, tweak the generated qemu.sh files to use stdio for the
console. We grep the output for SUCCESS and report each of the booting
types. Create a all.sh that will run these automatically. These all can
also run w/o root.

In the future, I'll add support for a make univers followed by this
script to create other architectures' tests and/or generate stand tests
for /usr/tests...

Sponsored by: Netflix
2022-08-16 15:36:55 -06:00
Warner Losh 729c458bf7 stand: Abstract out fstab creation
Now that all the fstabs are the same, abstract it out into a function.

Sponsored by:		Netflix
2022-08-15 12:46:31 -06:00
Warner Losh 26a241a0e2 stand: Update GELI UFS cases to use ufs labels
GELI images are created in a different manner than non-GELI
images. Update them to set the label of 'root' on the UFS partition and
use that in fstab. Drop comments about needing to do this, as well as
the 'dev' variable now that it's unused.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Warner Losh 159b158a1d stand: Update testing harness to start to use UFS labels
Minor changes to the non-geli UFS targets: migrate to using ufs labels
so we don't need to know the name of the device we booted off of. This
doesn't change the GELI test cass just yet since I've not tested them.
ZFS doesn't need these changes since we don't need to encode the device
for it.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Warner Losh aff95057bc stand: Update testing script for arch retirement
And catch up to changes in booting methods currently supported. Add
riscv.

Sponsored by:		Netflix
2022-08-15 12:38:32 -06:00
Kirk McKusick e688661642 Move the ability to search for alternate UFS superblocks from fsck_ffs(8)
into ffs_sbsearch() to allow use by other parts of the system.

Historically only fsck_ffs(8), the UFS filesystem checker, had code
to track down and use alternate UFS superblocks. Since fsdb(8) used
much of the fsck_ffs(8) implementation it had some ability to track
down alternate superblocks.

This change extracts the code to track down alternate superblocks
from fsck_ffs(8) and puts it into a new function ffs_sbsearch() in
sys/ufs/ffs/ffs_subr.c. Like ffs_sbget() and ffs_sbput() also found
in ffs_subr.c, these functions can be used directly by the kernel
subsystems. Additionally they are exported to the UFS library,
libufs(8) so that they can be used by user-level programs. The new
functions added to libufs(8) are sbfind(3) that is an alternative
to sbread(3) and sbsearch(3) that is an alternative to sbget(3).
See their manual pages for further details.

The utilities that have been changed to search for superblocks are
dumpfs(8), fsdb(8), ffsinfo(8), and fsck_ffs(8). Also, the prtblknos(8)
tool found in tools/diag/prtblknos searches for superblocks.

The UFS specific mount code uses the superblock search interface
when mounting the root filesystem and when the administrator doing
a mount(8) command specifies the force flag (-f). The standalone UFS
boot code (found in stand/libsa/ufs.c) uses the superblock search
code in the hope of being able to get the system up and running so
that fsck_ffs(8) can be used to get the filesystem cleaned up.

The following utilities have not been changed to search for
superblocks: clri(8), tunefs(8), snapinfo(8), fstyp(8), quot(8),
dump(8), fsirand(8), growfs(8), quotacheck(8), gjournal(8), and
glabel(8). When these utilities fail, they do report the cause of
the failure. The one exception is the tasting code used to try and
figure what a given disk contains. The tasting code will remain
silent so as not to put out a slew of messages as it trying to taste
every new mass storage device that shows up.

Reviewed by: kib
Reviewed by: Warner Losh
Tested by:   Peter Holm
Differential Revision: https://reviews.freebsd.org/D36053
Sponsored by: The FreeBSD Foundation
2022-08-13 12:43:40 -07:00
Jens Schweikhardt 14e3d3248a Fix wrong capitalization in man page references. 2022-08-13 20:46:59 +02:00
Kyle Evans 2300a22c97 libc: iconv: add mb_cur_min for encoder traits
A future commit will actually implement //IGNORE so that applications
using base iconv can, e.g., sanitize UTF-8 strings.  To do this, the
iconv_std module needs to be able to determine the minimum width for any
given encoding so that it can skip that many bytes in the input buffer.
This is mainly an issue for UTF-16 and UTF-32.

This commit bumps shlib versions to 5 for libiconv modules to reflect
the ABI change.  It also fixes OptionalObsoleteFiles to remove the
libiconv modules if WITHOUT_ICONV is in use.

re: _ENCODING_MB_CUR_MIN, note that this file (citrus_stdenc_template.h)
is included at the bottom of an encoding *implementation*, so the
implementation is free to #define it prior.  UTF1632 is a good example,
as it redefines the minimum to be a property on the encodinginfo, and
the minimum is set to 2 or 4 bytes for UTF-16 and UTF-32 respectively.

Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34344
2022-08-11 11:42:17 -05:00
Kyle Evans 814bd1ed43 tools: test: iconv: fix open_2 to not segfault
Record error condition when iconv_open() fails rather than leaving a
bogus iconv_t that iconv_close() can later choke on; this is one failure
mode.

If we opened MAX_LIMIT files with success, we need to rewind one so that
we don't iconv_close() one past the end of cd; this is the second
failure mode.

Sponsored by:	Klara, Inc.
2022-08-11 11:33:28 -05:00
Peter Holm 64f923959a stress2: Added a regression test 2022-08-11 09:42:02 +02:00
Peter Holm c925454668 stress2: Added another fsck_ffs test scenario 2022-08-07 10:37:17 +02:00
Peter Holm ac79b5f327 stress2: Do not run a fuzz test as root. 2022-08-07 10:35:47 +02:00
Konstantin Belousov 4690e20eed tools/uma/smrstress: fix kthread exit
By convention, kernel threads must call kthread_exit() instead of
blindly returning from the thread function.  We have some safety measure
in fork_exit(), which checks for the P_KPROC p_flag and does
kthread_exit() for kernel thread that forgot to do it itself.

But this workaround only works for kernel threads belonging to the
kernel process.  If a kernel thread is attached to the normal process
with live userspace, and does not call kthread_exit(), then the
workaround is not activated, and for amd64 at least, the return from the
thread function/fork_exit() results in the return to userspace with the
copy of frame from the thread that did kthread_add().

Practically for smrstress, this destroys the user stack of the still
active frame in the other thread, which was the caller of kthread_add().

Fix it by adding kthread_exit() to the thread function.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D35999
2022-07-31 00:40:12 +03:00
Warner Losh 08585e7799 tools/boot: Fix universe.sh's ZFS exclusion test
MK_LOADER_ZFS is the current spelling of enabling or disabling ZFS
builds. Use it instead of MK_ZFS.

Sponsored by:		Netflix
Reviewed by:		tsoome
Differential Revision:	https://reviews.freebsd.org/D35896
2022-07-24 16:53:34 -06:00
Dmitry Chagin 5573614638 check/delete-old: Fix /bin/rmail removal condition
When WITHOUT_SENDMAIL is enabled and WITHOUT_MAILWRAPPER is disabled
we install /bin/rmail as a link to the /usr/sbin/mailwrapper.
Ensure make delete-old does not unlink /bin/rmail in that case.

Reviewed by:		emaste
Differential Revision:	https://reviews.freebsd.org/D35874
MFC after:		2 weeks
2022-07-22 01:20:25 +03:00
Reid Linnemann 000321bab7 namespace nv names, version libnv and libnvpair library symbols
libnv and libnvpair have aliased symbols, and as a result a single process which
dlopens a shared object that is dynamically linked to libnv and another to
libnvpair will wind up with a single set of resolved symbols for those in
conflict. A source file also cannot include both libnv and libnvpair headers
because of aliased identifiers. To resolve the situation, libnv types and
functions are namespaced via nv_namespace.h, and libnv symbols are
versioned. The msgio functions are not namespaced or exported as they are not
part of the external API.

Reviewed by:	kevans
Sponsored by:	Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D35261
2022-07-21 18:35:23 +02:00
Peter Holm 6226f8f254 stress2: Update the exclude list 2022-07-17 09:16:03 +02:00
Peter Holm ac19e54390 stress2: Enable more swap disk usage 2022-07-15 10:19:39 +02:00
Peter Holm b4a6661801 stress2: Handle "gunion create" error exit 2022-07-15 10:17:23 +02:00
John Baldwin a985fad6e0 depend-cleanup.sh: Handle kqtest being renamed to kqueue_test.
bmake will not think that object files such as read.o are out of date
due to common.h changing since the dependency is only recorded in
.depend.kqtest.read.o in an old object directory.

Reviewed by:	markj
Fixes:		68fe988a40 kqueue tests: Simplify the test runner
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D35820
2022-07-14 13:03:59 -07:00
Mark Johnston eaab493eee git-arc: Fix the -y option 2022-07-13 09:30:17 -04:00
Peter Holm 7f3383d29b stress2: Added a fsck_ffs(8) test scenario 2022-07-12 06:42:33 +02:00
Warner Losh 9e9ba3cdbe test: Update boot universe build architectures
We build lua by default, so we don't need another build to build it
enabled w/o FORTH. That gives little value over the without forth
builds. Remove all mips, they are no longer relevant. Build aarch64
everywhere we build amd64 (except firewire which is x86 only). Build a
few more architectures once so we have at least one of every arch we
support in at least the default build. This should increase coverage
and still take less time than before.

Sponsored by:		Netflix
2022-07-08 11:47:37 -06:00
Peter Holm a526ec4351 stress2: Added a mount(8) test scenario 2022-07-07 09:44:55 +02:00
Brooks Davis 3bf6636512 cddl/*: add a WITH(OUT)_DTRACE option
Add an option to enable/disable DTrace without disabling ZFS.  New
architectures such as CHERI may support ZFS before they support DTrace
and the old model of WITHOUT_CDDL disabling both wasn't helpful.

For compatiblity, the CDDL option remains and WITHOUT_CDDL implies
WITHOUT_DTRACE.  WITHOUT_DTRACE also implies WITHOUT_CTF.

As part of this change, largely convert cddl/*/Makefile to using the
more compact SUBDIR.${MK_<FOO>}+= form rather than using intermediate
variables.

Reviewed by:	markj
Obtained from:	CheriBSD
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D35718
2022-07-06 14:03:48 +01:00
Peter Holm ec8c9e7ac3 stress2: Rework test to improve error reporting 2022-06-30 09:46:26 +02:00
Peter Holm bc49526a56 stress2: Fix broken random number generation 2022-06-29 12:28:18 +02:00
Peter Holm a25818eb28 stress2: Added comment about problem found 2022-06-28 11:30:51 +02:00
Peter Holm 8e64658873 stress2: Update the exclude list 2022-06-28 11:30:11 +02:00
Peter Holm e3b31e23ff stress2: Added two syzkaller reproducers 2022-06-25 08:40:20 +02:00