Commit graph

5800 commits

Author SHA1 Message Date
Warner Losh b661d9e64d Revert "checkstyle9.pl: Add check for missing space between ) {"
This reverts commit 6bad7d2486.

Turns out this special case wasn't necessary, and this was already
detected and due to another error (running the script got dropped
from my experimental scripts), I hadn't noticed.

Sponsored by:		Netflix
2024-05-29 11:18:00 -06:00
Warner Losh 6bad7d2486 checkstyle9.pl: Add check for missing space between ) {
Sponsored by:		Netflix
2024-05-29 09:59:27 -06:00
Mark Johnston c52ca7dd09 stress2: Don't run aesni.sh on non-x86 platforms
aesni.ko only exists on amd64 and i386, so on other platforms we are
just running geli.sh twice.

In fact, this test has little value anymore because aesni is included in
GENERIC, so it's always going to be used in preference to cryptosoft.

Reviewed by:	pho
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45366
2024-05-27 11:26:47 -04:00
Mark Johnston 568be71de3 stress2: Use the proper type for the getopt(3) return value
On arm platforms "char" is typically unsigned, in which case the test
"(c = getopt(...)) != -1" does not behave as desired.

Reviewed by:	pho
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45365
2024-05-27 11:26:47 -04:00
Warner Losh 0e03402139 cross-build: This is not glibc specific, but Linux specific
Neither glibc nor musl define these interfaces, so provide them for all
Linux builds.

Sponsored by:		Netflix
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45355
2024-05-26 11:39:27 -06:00
Warner Losh 3c5f0da510 cross-build: Define __*int*_t and include sys/cdefs.h
FreeBSD assumes that sys/types.h includes sys/cdefs.h, so add it here.
FreeBSD also needs __*int*_t defined for software we bootstrap (a lot of
it). GLIBC defines these, but musl does not, so we have to define them
here, even though it looks backwards. There's no good #define to key off
of, so use !defined GLIBC since on Linux defacto there's only two libc
implementations.

Co-authored-by:		Val Packett <val@packett.cool>
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45354
2024-05-26 11:39:18 -06:00
Warner Losh 27326f895e cross-build: string.h uses mode_t, so we need sys/types.h
string.h defines strmode with a mode_t argument. POSIX states that one
must include sys/types.h to get mode_t, so do that here. This makes musl
happier. We know that sys/types.h will include sys/cdefs.h, so just
replace the latter with the former.

Co-authored-by:		Val Packett <val@packett.cool>
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45353
2024-05-26 11:39:10 -06:00
Warner Losh 76efd90ab0 cross-build: Include sys/types.h from sys/param.h
FreeBSD has a style(9) enforced assumption that sys/param.h includes
sys/types.h. However, Linux under musl doesn't do this so go ahead and
explicitly include it here. It won't hurt on the glibc systems, and
helps musl.

Co-authored-by:		Val Packett <val@packett.cool>
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45352
2024-05-26 11:39:02 -06:00
Warner Losh 4300e05361 build: Include sys/cdefs.h in our fcntl.h shim
On Linux with musl, sys/cdefs.h isn't included with fcntl.h, so when we
use __BEGIN_DECL and __END_DECL in this file, it fails. There's no harm
in unconditionally including sys/cdefs.h here, so do that to avoid
encoding exactly where it is or isn't needed so we don't have to know
too much about the internal state of other libc implementations.

Co-authored-by:		Val Packett <val@packett.cool>
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45351
2024-05-26 11:38:55 -06:00
Warner Losh 917c0541e4 cross-tools: Document a rather bizarre looking construct
On Linux, stddef.h will define __size_t to something when size_t is
defined. On FreeBSD, __size_t is an actual typedef which we need for
other parts of the system. If __size_t isn't defined, that tells us we
need to define the fallback __size_t typedef (if it is defined, then we
can't easily redefine it without issues because glob.h will define it to
something different than stddef.h defines it). Add a comment to this
effect.

Sponsored by:		Netflix
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45350
2024-05-26 11:38:46 -06:00
Warner Losh 364c014d9b cross-tools: fts has different types for cmp routine
fts has different types for its compare rotuine. Other systems, not
4.4BSD based, have a non-const version. Before we tested against
__GLIBC__, but now we test against __linux__ because that's Linux's API
and musl doesn't define __GLIBC__.

In addition, link against libftl on this platform since musl doesn't
include ftl routines in libc, but rather in libftl.

Co-authored-by:		Val Packett <val@packett.cool>
Sponsored by:		Netflix
Pull Request:		https://github.com/freebsd/freebsd-src/pull/1066
Reviewed by:		val_packett.cool
Differential Revision:	https://reviews.freebsd.org/D45349
2024-05-26 11:38:30 -06:00
Val Packett 59aa64914a cross: Move Solaris API64 defines to common
off64_t is needed for both Linux (musl) and MacOS, so move them to the
common area. Somehow glibc provides the definition, but defining it
doesn't hurt and hels in the musl case.

Reviewed by: allanjude, jrtc27
Pull Request: https://github.com/freebsd/freebsd-src/pull/1066
2024-05-23 20:03:18 -06:00
Michael Dexter be3631bc8d option_survey.sh: Bump size to 5GB
Increase image size from 4G to 5G to accommodate growth in OS.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1251
2024-05-23 10:47:38 -06:00
Warner Losh 0115ad61d8 autofs: Fix cross-threading on file to delete
We want to delete the new file, which is installed in man4 not man5.

Noticed by:	Gary Jennejohn
Fixes:		a03e8a40d4
Sponsored by:	Netflix
2024-05-22 15:10:08 -06:00
Andrew Turner 82854693ae arm64: Allow userspace to be built with PAC and BTI
Add the WITH/WITHOUT_BRANCH_PROTECTION build flags. This can be used
to enable the use of pointer authentication (FEAT_PAuth) and branch
target identification (FEAT_BTI) in userspace.

The kernel already handles both of these is userspace, we just need
to enable it.

Leave disabled for a short period for this to settle before enabling.

Reviewed by:	emaste
Sponsored by:	Arm Ltd
Differential Revision:	https://reviews.freebsd.org/D42596
2024-05-22 17:02:26 +00:00
John Baldwin 4ebf794a08 cryptocheck: Don't test Chacha20-Poly1305 with an IV size of 8
OpenSSL 3.0+ doesn't support an IV size of 8 either for the Chacha20
stream cipher or the AEAD combination with Poly1305.  This did work
previously with OpenSSL 1.1.

Reviewed by:	markj
Sponsored by:	AFRL, DARPA
Differential Revision:	https://reviews.freebsd.org/D45280
2024-05-21 09:48:50 -07:00
Brooks Davis 6edb14c006 Make WITHOUT_UNDEFINED_VERSION the default
Link with --no-undefined-version by default.  Will detect and prevent
the accidental removal of symbols from versioned libraries.

(cherry picked from commit 4510f2ca91)
This reverts commit b25ceb97ed.

Reviewed by:	arichardson, kib, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D44216
2024-05-20 15:40:19 +01:00
Ed Maste 65fd76b5f5 makeman: extend duplicate option warning to OPT_ options
In a local tree I accidentally had OPT_INIT_ALL defaulting to zero in
userland and none in kernel.  This resulted in the INIT_ALL text
appearing twice in src.conf.5.

Reviewed by:	brooks
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D45184
2024-05-16 13:30:37 -04:00
Alexander Ziaee 1a720cbec5 man filesystems: fix xrefs after move to section 4
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
2024-05-16 10:25:29 -06:00
Alexander Ziaee a03e8a40d4 man filesystems: ObsoleteFiles after move to sec 4
Reported by: imp
Reviewed by: des, imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1077
2024-05-16 10:25:13 -06:00
Kyle Evans 9bfd3b4076 Add a build knob for _FORTIFY_SOURCE
In the future, we will Default to _FORTIFY_SOURCE=2 if SSP is enabled,
otherwise default to _FORTIFY_SOURCE=0.  For now we default it to 0
unconditionally to ease bisect across older versions without the new
symbols, and we'll put out a call for testing.

include/*.h include their ssp/*.h equivalents as needed based on the
knob. Programs and users are allowed to override FORTIFY_SOURCE in their
Makefiles or src.conf/make.conf to force it off.

Reviewed by:	des, markj
Relnotes:	yes
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D32308
2024-05-13 00:23:50 -05:00
Poul-Henning Kamp 984764d796 Remove GBDE stress test 2024-05-07 07:26:39 +00:00
John Baldwin 2f68f6474e git-arc: Add list mode support for the update command
This can be particularly useful to do bulk-updates of multiple commits
using the same message, e.g.

  git arc update -lm "Move function xyz to libfoo" main..myfeature

Similar to the list mode for the create command, git arc will list all
the candidate revisions with a single prompt.  Once that is confirmed,
all the revisions are updated without showing the diffs or pausing
further prompts.

Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D45050
2024-05-06 10:49:04 -07:00
Warner Losh 758d02fb30 checkstyle9: Relax sob line requirement 2024-05-04 07:56:36 -06:00
John Baldwin 09a931554a nvmfdd: A simple userspace NVMe over Fabrics host
This program uses libnvmf to connect to a remote Fabrics controller
and perform a single read or write operation.  The write command reads
data from stdin to construct one or more NVM Write commands sent to
the remote namespace.  The read command uses one or more NVM Read
commands to read blocks from a remote namespace writing the data to
stdout.

Reviewed by:	chuck, imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44730
2024-05-02 16:38:39 -07:00
Brooks Davis b25ceb97ed Revert "Make WITHOUT_UNDEFINED_VERSION the default"
This is causing failures on gcc13 CI builds so those need to be fixed
or worked around.

This reverts commit 4510f2ca91.
2024-05-02 22:55:08 +01:00
Brooks Davis 4510f2ca91 Make WITHOUT_UNDEFINED_VERSION the default
Link with --no-undefined-version by default.  Will detect and prevent
the accidental removal of symbols from versioned libraries.

Reviewed by:	arichardson, kib, dim, emaste
Differential Revision:	https://reviews.freebsd.org/D44216
2024-05-02 18:13:39 +01:00
Ed Maste b07689d1f2 beinstall: retire mergemaster support
Mergemaster has been deprecated for some time, and will be retired.

Reviewed by:	kevans
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D41799
2024-05-01 19:02:00 -04:00
Olivier Certner 9b30b96c1f
Remove remnants of portsnap(8)
This was prompted by noticing that '/var/db/portsnap' still exists on
newly-installed machines.

With this change, all mentions of portsnap(8) in the tree are gone,
except for the historical note in the AUTHORS section of manpage
phttpget(8).

locate(1) will thus start indexing again '/var/db/portsnap' on machines
where this directory still exists, which may be a good way to push
administrators to delete it.

Reviewed by:            cperciva
Approved by:            emaste (mentor)
MFC after:              3 days
Sponsored by:           The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D45023
2024-04-30 22:44:34 +09:00
Peter Holm 9b10aa4a05 stress2: More detailed error reporting 2024-04-26 10:20:49 +02:00
Mateusz Piotrowski 42255af64a checkstyle9: Allow a space between "*" and _*restrict
Before the change, we would get errors like this:

    ERROR: "foo * bar" should be "foo *bar"
    #369: FILE: foobar.c:369:
    +barbaz(char * __restrict s,

Reviewed by:		des, imp
Sponsored by:		Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D44911
2024-04-25 11:51:25 +02:00
Jose Luis Duran 14e3f2d8d3 nanobsd: Set a GPT label for EFI and cfg partitions
Use efiboot0 for the EFI partition, the nomenclature efiboot + #index
was taken from bsdinstall (zfsboot).

Use cfg for the cfg partition.  Poudriere firmware images are already
using this label.

PR: 278480
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1187
2024-04-23 15:13:35 -06:00
Warner Losh ea6f2d7797 checkstyle9.pl: Warn if there's no SOB line
If there's no Signed-off-by: line, complain.

Sponsored by:		Netflix
2024-04-23 14:04:08 -06:00
John Baldwin ee3187f6fa Remove the MK_NVME build option
The drivers and utilities are now built and installed unconditionally.

Reviewed by:	imp, emaste
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D44843
2024-04-23 11:47:44 -07:00
Ed Maste 91d35fb663 Remove WITHOUT_CAPSICUM build support
Capsicum is non-optional as of c24c117b96 ("Remove
WITHOUT_{CAPSICUM,CASPER} options").

`#ifndef WITHOUT_CAPSICUM` is left in the source for the benefit of
downstream consumers, but is never defined in FreeBSD.

Reviewed by:	oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D42077
2024-04-23 08:26:28 -04:00
Ed Maste 76a8625bc7 mfc-candidates: use stable/14 as default MFC-to branch
This tool is typically invoked from within a working tree containing the
desired MFC target branch, which is detected automatically.  It also has
a default for when it is invoked from elsewhere.  Switch the default to
the most recent branch, stable/14.

Sponsored by:	The FreeBSD Foundation
2024-04-22 13:57:17 -04:00
Ed Maste 793745fad8 mfc-candidates: move pretty printing into lua
d51c590023 moved the MFC hash matching logic into a lua utility
script but left the output formatting in the shell script. Simplify this
slightly by just printing the formatted output from lua.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44836
2024-04-21 10:10:57 -04:00
Gordon Bergling e1e149ad8a mwlstats: Fix a typo in an error message
- s/the the/the/

MFC after:	5 days
2024-04-20 14:02:54 +02:00
Cy Schubert f7f570eb97 tools: Remove stray "then"
Fixes:		26a09db3ad
2024-04-18 08:10:14 -07:00
Brooks Davis 26a09db3ad Fix incremental build with WITH_NVME newly enabled
rescue.mk doesn't get updated when options change so nvme_util.o is now
missing on architectures were NVME was previously marked BROKEN.

Reviewed by:	imp
Fixes:		2fda3ab0ac WITH_NVME: Remove from broken.
Differential Revision:	https://reviews.freebsd.org/D44826
2024-04-18 14:58:17 +01:00
Ed Maste d51c590023 mfc-candidates: fix output order with incorrect commit dates
Previously we obtained the list of MFC candidate hashes (i.e., those
commits only in the mfc-from branch), removed the already-merged
commits based on "cherry picked from" commit message entries, and then
printed the list sorted by commit time.  This is usually the correct
order, but it is not when commits have non-monotonically-increasing
commit times.  This is unfortunately the case for a number of commits in
our tree.  This made it difficult to merge some groups of dependent
commits in the correct order.

Instead, leave the from-list in git rev-parse order, and move the
matching logic to a new lua script.

Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D44808
2024-04-16 14:20:40 -04:00
Peter Holm 219d8fb036 stress2: Add an option to exit on error 2024-04-16 10:22:03 +02:00
Peter Holm 02a2005a5a stress2: Add new unionfs test scenarios 2024-04-16 10:21:14 +02:00
Bjoern A. Zeeb 3f115b864b git/mfc-candidates.sh: allow comments in exclude file
As branches ages, the list of unmerged or unmergable changes may grow
longer.  In some cases it is helpful to group and or annotate them
in an exclude file.  Filtering out lines starting with "#" allows adding
comment lines to aid tracking.

Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D42790
2024-04-15 17:54:42 +00:00
Mark Johnston 11c79f9e35 arm64: Connect bhyve and libvmmapi to the build
Reviewed by:	corvink, andrew, jhb, emaste
MFC after:	2 weeks
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41742
2024-04-10 11:17:56 -04:00
Dimitry Andric cb14a3fe51 Merge llvm-project main llvmorg-18-init-15692-g007ed0dccd6a
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15692-g007ed0dccd6a.

PR:		276104
MFC after:	1 month
2024-04-06 22:13:06 +02:00
Dimitry Andric 5f757f3ff9 Merge llvm-project main llvmorg-18-init-15088-gd14ee76181fb
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvm-project main llvmorg-18-init-15088-gd14ee76181fb.

PR:		276104
MFC after:	1 month
2024-04-06 22:11:55 +02:00
Olivier Cochard a927571469 OptionalObsoleteFiles: add missed cuda wrappers include files
Files introduced since clang 17.0.2.

Approved by:	dim
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D44597
2024-04-02 22:59:28 +02:00
Dag-Erling Smørgrav 125c4560bc usr.bin: Make lorder conditional on MK_TOOLCHAIN.
MFC after:	1 week
Reviewed by:	allanjude, markj
Differential Revision:	https://reviews.freebsd.org/D44558
2024-04-01 15:18:35 +02:00
Mina Galić 280085ef0c tools/git: ensure git-arc is more platform indepdendent
Summary:
Linux systems' tail doesn't have `-r`.
Instead, we can use git's own `--reverse` sorting for `rev-list`s.

Reviewed by:	markj, imp, jhibbits
Differential Revision: https://reviews.freebsd.org/D39975
2024-03-27 09:57:01 -04:00