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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
this is a very early script to support cloudinit, it does not intend to
be a full featured cloudinit client, but will support a good enough
subset to be viable in most case.
It support nocloud and openstack config-2 config drive mode (iso9660 or
msdosfs)
The following features are currently supported:
- adding users (including a default user named 'freebsd' with password
'freebsd'
- adding groups
- adding ssh keys
- static ipv4, static ipv6, dynamic ipv4
With this one is able to use the 'bring your own image feature" out of
box.
It is expected that the script grows the support of other clouds
supporting cloud-init, contributions are welcomed.
It is designed to be only run once via the firstboot mecanism.
Sponsored by: OVHCloud
MFC After: 3 weeks
Differential Revision: https://reviews.freebsd.org/D44141
I removed lib/libsys/{aarch64,arm,riscv}/syscall.S in favor of an
idential generated version. We need to clean out the .ddepend files to
ensure the generated version is actually generated.
The guard here is technically too strict, but should be fine in practice
and I've verified both the breakage and fix on an armv7 build.
Reported by: imp
Fixes: e6ffc7669a Remove pointless MD syscall(2)
Fixes: 0ee0ae2373 Remove pointless MD syscall(2)
Fixes: 7b3836c281 Remove pointless MD syscall(2)
When enabled (current default) link with --undefined-version to allow
symbol maps to contain symbols not defined by libraries. When disabled,
link with --no-undefined-version to disallow these bugs.
WITHOUT_UNDEFINED_VERSION is currently broken. Once it is fixed it
should be made the default and this option should likely be removed.
Reviewed by: dim, emaste
Differential Revision: https://reviews.freebsd.org/D44169