kernel: MK_REPRODUCIBLE_PATHS for full paths vs /usr/src
There are many environments that you do not want the paths to be
canonicalized. For example, if I always build a product from a specific
path in a jail that's dependent on the product version, I don't want
that to be sanitized to /usr/src because when I have profiling tools run
against multiple kernels, I can't do A/B testing and results processing
if everything points to /usr/src (sadly, the profiling tools cannot
remap back to the original like gdb can). Since we need both active at
the same time, symbloic link fallbacks don't work.
We do want the rest of the build to be reproducible, however. We'll get
the same binaries if we rebuild later since we always rebuild with the
same path.
Turn them both on for maximum reproduction for environments where that
cannot be guaranteed.
Sponsored by: Netflix
[2 lines not shown]
loader: Fix powerpc64le by working around slof bug in qemu/slof
Fix powerpc 64 little endian booting by adding some padding. Due to
https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L114https://gitlab.com/slof/slof/-/blob/master/lib/libelf/elf32.c?ref_type=heads#L150
using <= instead of <, slof used to loop over the phdrs. It overruns by
1 and so on little endian it swizzles the first 32 bytes of .text. Work
around this by adding 32 bytes of padding after the headers. We should
fix this in slof, but it's in the just released QEMU 10.2, so we have to
pad things here for now.
Now powerpc64le + qemu works.
MFC After: 3 days (maybe EN too)
Reviewed by: adrian, jhibbits
Sponsored by: Netflix
sh: avoid warnings about too-long initializer strings
Mark `optletter` and `t_op::op_text` as `__non_string`, to avoid
warnings from clang 21 similar to:
bin/sh/options.h:77:36: error: initializer-string for character array is too long, array size is 19 but initializer has size 20 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
77 | const char optletter[NSHORTOPTS] = "efIimnsxvVECabupTPh";
| ^~~~~~~~~~~~~~~~~~~~~
bin/test/test.c:153:3: error: initializer-string for character array is too long, array size is 2 but initializer has size 3 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
153 | {"==", STREQ},
| ^~~~
MFC after: 3 days
Reviewed by: jilles
Differential Revision: https://reviews.freebsd.org/D54362
tools.build: also add sys/_visible.h to SYSINCS
This is needed since sys/cdefs.h includes sys/_visible.h.
Reported by: kib
Fixes: 1c9ff80f0635
MFC after: 3 days
vnode_pager: clean up undirty_pages()
The first (second) loop of vnode_pager_undirty_pages() includes an
if-test to test whether an iteration is the last (first). Move those
if-tests out of their loops. That allows the compiler to unroll the
loops.
Reviewed by: alc, kib
Differential Revision: https://reviews.freebsd.org/D54353
linprocfs.4: Improve docs around pid/self entries
Mark <pid> as a placeholder and document that self is a symlink to a directory.
PR: 283080
Reviewed by: ziaee
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54358
bhyve: Document that MAC address has to be unicast
bhyve accepts any MAC address even foreign as long it is a unicast one.
Reviewed by: ziaee
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54372
tests/ci: Use :H:H rather than ../..
In general we want to strip subdir components, rather than appending
`..`s.
Reviewed by: lwhsu
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D54352
Build acpi kernel modules on aarch64
For now, the only kernel module built is acpi_ged.ko.
Sponsored by: Netflix
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54315
sys/modules/acpi/Makefile: One line per subdirectory
This makes diffs that add or remove modules easier to read.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54314
acpi: Use M_WAITOK in acpi_register_ioctl
This function is only called from device attach routines which can
sleep.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54312
acpi_apei: Remove the hest member from the softc
This is only used during attach and freed after use, so just use a
local variable in the attach routine instead to avoid leaving a
dangling pointer around in the softc.
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54310
acpidump: Extend the decoding of entries in the EINJ and ERST tables
- Decode the Action, Instruction, and Flags fields for these tables
- Omit the Flags field if it is zero
- Omit the Value field for instrunctions that do not use it
Reviewed by: imp
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D54308
tools.build: add sys/cdefs.h to SYSINCS, since lots of other headers use it
This is needed to let the legacy stage compile against newer versions of
sys/font.h, which transitively includes sys/cdefs.h, and requires the
new __nonstring macro from it.
Fixes: e2c93ed09f25
MFC after: 3 days
bhyve_config.5: Fix consistency and terms in manpage
Correct inconsistent spelling of terms and duplication.
Reviewed by: ziaee
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D54370
sys/font.h: avoid warnings about too-long initializer strings
Mark `font_header::fh_magic` as `__non_string`, to avoid a warning from
clang 21 similar to:
/usr/src/usr.bin/vtfontcvt/vtfontcvt.c:763:15: error: initializer-string for character array is too long, array size is 8 but initializer has size 9 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
763 | .fh_magic = FONT_HEADER_MAGIC,
| ^~~~~~~~~~~~~~~~~
/usr/obj/usr/src/amd64.amd64/tmp/usr/include/sys/font.h:109:27: note: expanded from macro 'FONT_HEADER_MAGIC'
109 | #define FONT_HEADER_MAGIC "VFNT0002"
| ^~~~~~~~~~
MFC after: 3 days
pmcannotate: avoid accessing uninitialized local variables
Initialize `tbfl` and `tofl` to NULL, and check whether they are
non-NULL before calling remove(3) on them, to avoid warnings from clang
21 similar to:
usr.sbin/pmcannotate/pmcannotate.c:746:3: error: variable 'tbfl' is uninitialized when used here [-Werror,-Wuninitialized]
746 | FATAL(exec, "%s: Impossible to locate the binary file\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
747 | exec);
| ~~~~~
usr.sbin/pmcannotate/pmcannotate.c:57:9: note: expanded from macro 'FATAL'
57 | remove(tbfl); \
| ^~~~
usr.sbin/pmcannotate/pmcannotate.c:695:12: note: initialize the variable 'tbfl' to silence this warning
695 | char *tbfl, *tofl, *tmpdir;
| ^
| = NULL
usr.sbin/pmcannotate/pmcannotate.c:746:3: error: variable 'tofl' is uninitialized when used here [-Werror,-Wuninitialized]
[13 lines not shown]
bsnmpd: avoid warnings about too-long initializer strings
Mark `UTC` as `__non_string`, to avoid a warning from clang 21 similar
to:
usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptc.c:339:29: error: initializer-string for character array is too long, array size is 3 but initializer has size 4 (including the null terminating character); did you mean to use the 'nonstring' attribute? [-Werror,-Wunterminated-string-initialization]
--- all_subdir_usr.sbin ---
339 | static const char UTC[3] = "UTC";
| ^~~~~
MFC after: 3 days