FreeBSD/src 835b1bdrelease/scripts pkg-stage.sh

release: Use the ABI of the target release to fetch packages

- Point --rootdir at the installed destdir in the dvd tree.  This
  causes pkg to determine the ABI from the installed destdir instead
  of the host's binaries.  Previously the result was that packages
  for the host's ABI were always downloaded breaking cross-releases
  (e.g. arm64 releases built on an amd64 host included amd64
  packages on the DVD ISO image rather than arm64 packages).  This
  also handles version mismatches, and I tested this by cross-building
  a 15.x arm64 release on a 14.x amd64 host.

- As a result, pkg now does a chdir(3) to the rootdir before running,
  so the -o argument to fetch needs to be updated to be relative to
  rootdir instead of the CWD as make runs.

- Add a new ROOTDIR variable to limit references to "dvd" to one
  place.  Ideally ROOTDIR would be an argument to this script so
  that it didn't really know about the dvd layout at all.


    [12 lines not shown]
DeltaFile
+11-12release/scripts/pkg-stage.sh
+11-121 files

FreeBSD/src 6b8ca8crelease Makefile.ec2 Makefile.gce

release: Support r/o /usr/ports for cloudware

Set WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles when building tools
needed for uploading cloudware images.

While I'm here, adjust the bsdec2-image-upload build target to match
the style used by the Azure/GCE/Vagrant Makefiles.

MFC after:      3 days

(cherry picked from commit 6c87aed39c3053cd338c1ec18fba5b1d773beca9)
DeltaFile
+10-6release/Makefile.ec2
+6-2release/Makefile.gce
+3-1release/Makefile.azure
+3-1release/Makefile.vagrant
+22-104 files

FreeBSD/src 1b0e859release Makefile.vm

release/Makefile.vm: Support read-only ports tree

Build qemu (if needed) with WRKDIRPREFIX=/tmp/ports DISTDIR=/tmp/distfiles
so that we can have a read-only /usr/ports and don't contaminate it.  This
became an issue when I enabled parallel release building, since one image
might be creating its ports.txz file at the same time as we're building
qemu as a prerequisite for building another image.

MFC after:      5 days

(cherry picked from commit 6f454c211b295ad13e80fc5b858efc9bad33e33b)
DeltaFile
+4-1release/Makefile.vm
+4-11 files

FreeBSD/src 5609315usr.sbin/bsdinstall/distfetch distfetch.c

Revert "bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors"

This reverts commit 91bdebc958bb0da03f604bad19f99e3b10e96ac7. It wasn't
as ready as I thought
DeltaFile
+10-23usr.sbin/bsdinstall/distfetch/distfetch.c
+10-231 files

FreeBSD/src feabaf8sbin/swapon swaplinux.c swapon.c

Revert "swapon: Do not overwrite Linux swap header"

This reverts commit cf04a7775a4e8ff6fd28c768be9daa3d83dd382e.This is
broken on armv7, and closer scrutiny of the reviews shows I was in error
when I thought it was ready.
DeltaFile
+0-66sbin/swapon/swaplinux.c
+1-53sbin/swapon/swapon.c
+0-5sbin/swapon/extern.h
+0-2sbin/swapon/Makefile
+1-1264 files

FreeBSD/src f239db4usr.bin/ktrace ktrace.h ktrace.1

ktrace: Remove CAPFAIL from default trace points

The CAPFAIL tracepoint was recently extended to report ECAPMODE
capability  violations for processes that do not enter capability mode.
This allows developers that are interested in Capsicumizing their
programs to determine where violations are being raised.

Previously, CAPFAIL only produced output for processes using Capsicum(4)
capabilties. Thus, most ktrace users never received log output from the
trace point. With the recent changes, this is no longer the case.

Having this trace point enabled by default will produce output for all
processes that use syscalls that are not permitted in capability mode.
This may lead to confusion for users that are not familiar with the
feature. Remove KTRFAC_CAPFAIL from ktrace's default points to avoid
this.

Approved by:    markj (mentor)
Reviewed by:    markj

    [2 lines not shown]
DeltaFile
+3-4usr.bin/ktrace/ktrace.h
+1-1usr.bin/ktrace/ktrace.1
+4-52 files

FreeBSD/src 4f2ada0usr.bin/ktrace ktrace.1

ktrace: Describe CAPFAIL trace point in man page

Update the ktrace(1) man page to describe the recently improved
capability failure tracing.

Approved by:    markj (mentor)
Reviewed by:    markj
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D44886
DeltaFile
+18-2usr.bin/ktrace/ktrace.1
+18-21 files

FreeBSD/src a8acc2bsys/kern uipc_socket.c

sockets: inherit SO_ACCEPTFILTER from listener to child

This is crucial for operation of accept_filter(9).  See added comment.

Fixes:  d29b95ecc0d049406d27a6c11939d40a46658733
DeltaFile
+6-2sys/kern/uipc_socket.c
+6-21 files

FreeBSD/src 91bdebcusr.sbin/bsdinstall/distfetch distfetch.c

bsdinstall/distfetch.c: check environment variables before downloading and handle memory allocation errors

1. Currently, distfetch checks environment variables existence
when it will use them or in a case (in chdir()) it doesn't check
at all. As they are necessary to set before doing anything with
it, check them, if they set or not, before proceeding any further.
This also avoids extra cleaning when that environment variable
isn't set.

2. Handle memory allocation error in malloc(PATH_MAX) and replace
(sizeof const char *) with (sizeof char *). Both are similar and
const doesn't have a size.

3. Indent the error message a bit in chdir().

Signed-off-by: rilysh <nightquick at proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1071
DeltaFile
+23-10usr.sbin/bsdinstall/distfetch/distfetch.c
+23-101 files

FreeBSD/src 0d4ad64sys/contrib/openzfs/module/os/linux/zfs abd_os.c, sys/contrib/openzfs/module/zfs dbuf.c zio_inject.c

zfs: merge openzfs/zfs at 1f940de07

Notable upstream pull request merges:
 #16038 1f940de07 L2ARC: Cleanup buffer re-compression
 #16093 c183d164a Parallel pool import
 #16094 cd3e6b4f4 Add zfetch stats in arcstats
 #16103 35bf25848 Fix: FreeBSD Arm64 does not build currently
 #16104 4036b8d02 Refactor dbuf_read() for safer decryption
 #16110 9f83eec03 Handle FLUSH errors as "expected"
 #16117 c346068e5 zfs get: add '-t fs' and '-t vol' options

Obtained from:  OpenZFS
OpenZFS commit: 1f940de07224c2068e7c721222b1f3a519820ca9
DeltaFile
+108-114sys/contrib/openzfs/module/zfs/dbuf.c
+165-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_admin.ksh
+129-9sys/contrib/openzfs/module/zfs/zio_inject.c
+137-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_pos.ksh
+130-0sys/contrib/openzfs/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import_parallel_neg.ksh
+74-46sys/contrib/openzfs/module/os/linux/zfs/abd_os.c
+743-16934 files not shown
+1,145-30840 files

FreeBSD/src cf04a77sbin/swapon swaplinux.c swapon.c

swapon: Do not overwrite Linux swap header

Reviewed by: imp, jhb
Pull Request: https://github.com/freebsd/freebsd-src/pull/1084
DeltaFile
+66-0sbin/swapon/swaplinux.c
+53-1sbin/swapon/swapon.c
+5-0sbin/swapon/extern.h
+2-0sbin/swapon/Makefile
+126-14 files

FreeBSD/src 4f223e0release/tools vmimage.subr

release: Change vmimage EFI GPT label

This matches the default bsdinstall nomenclature.

PR: 278480
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1188
DeltaFile
+2-2release/tools/vmimage.subr
+2-21 files

FreeBSD/src 14e3f2dtools/tools/nanobsd/embedded common

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
DeltaFile
+2-2tools/tools/nanobsd/embedded/common
+2-21 files

FreeBSD/src 8a8daeasys/arm/conf std.armv6 std.armv7, sys/arm64/conf GENERIC-MMCCAM-NODEBUG GENERIC-NODEBUG

sys/*/conf: do not use "../../conf/" when including std.*

Since config(8) searches sys/conf by default, there's no need to specify
the full relative path here; replace it by the filename alone.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1124
DeltaFile
+1-1sys/arm/conf/std.armv6
+1-1sys/arm/conf/std.armv7
+1-1sys/arm64/conf/GENERIC-MMCCAM-NODEBUG
+1-1sys/arm64/conf/GENERIC-NODEBUG
+1-1sys/arm64/conf/std.arm64
+1-1sys/i386/conf/GENERIC
+6-615 files not shown
+21-2121 files

FreeBSD/src 4f8f9d7sys/amd64/conf GENERIC NOTES, sys/arm/conf std.armv6 std.armv7

sys: add conf/std.debug, generic debugging options

The new sys/conf/std.debug contains the list of debugging options
enabled by default in -CURRENT, so they don't need to be listed
individually in every kernel config.

The enabled options are the set of all debug options which were enabled
for the GENERIC kernel on any platform.  This means some architectures
now have debugging options enabled in GENERIC which weren't previously
enabled:

- amd64: [1]
- arm64: [2]
- arm: [2]. [3]
- i386: [1], [2]
- powerpc: [1], [2], [3]
- riscv: [2]

[1] ALT_BREAK_TO_DEBUGGER is now enabled.

    [9 lines not shown]
DeltaFile
+1-19sys/amd64/conf/GENERIC
+17-0sys/conf/std.debug
+3-11sys/arm/conf/std.armv6
+3-11sys/arm/conf/std.armv7
+12-0sys/amd64/conf/NOTES
+11-0sys/amd64/conf/MINIMAL-NODEBUG
+47-419 files not shown
+68-9415 files

FreeBSD/src 93c5ba5sys/netpfil/pf pf.c

sys/netpfil/pf: fix non-INET module build

pf.ko, when built as a module without 'options INET' but with 'options
VIMAGE', won't load:

link_elf_obj: symbol vnet_entry_in_loopback_mask undefined

This is because it uses IN_LOOPBACK(), which in the VIMAGE case uses
INET-specific symbols.

Fix by making this check conditional on #ifdef INET.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1157
DeltaFile
+4-1sys/netpfil/pf/pf.c
+4-11 files

FreeBSD/src 65767e6sys/net if_bridge.c

sys/net/if_bridge: support non-INET kernels

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1159
DeltaFile
+39-17sys/net/if_bridge.c
+39-171 files

FreeBSD/src d31b677sys/dev/aic7xxx aic7xxx.c aic79xx.c

ahc(4)/ahd(4): target mode: cancel outstanding AIOs and INOTs

When disabling a lun there can still be outstanding AIOs and INOTs, when
this happens previously the lun would just fail to disable and trying to
re-use the lun would break the card.

isp(4) in target mode does the same thing when disabling a lun, in
testing this allows re-starting of ctld(8) with connected initiators and
allows initiators to gracefully resume afterwards.

Signed-off-by: HP van Braam <hp at tmm.cx>
Reviewed by: imp, mav
Pull Request: https://github.com/freebsd/freebsd-src/pull/1190
DeltaFile
+11-2sys/dev/aic7xxx/aic7xxx.c
+11-2sys/dev/aic7xxx/aic79xx.c
+22-42 files

FreeBSD/src 6597107sys/dev/aic7xxx aic79xx.c aic7xxx.c

ahc(4) clean up old Linux defines

Linux removed theirs starting in 2018 in commit:
"scsi: aic7xxx: Fix build using bare-metal toolchain"

Also remove now-useless sys/cdefs.h includes

Signed-off-by: HP van Braam <hp at tmm.cx>
Reviewed by: imp, mav, emaste
Pull Request: https://github.com/freebsd/freebsd-src/pull/1189
DeltaFile
+1-34sys/dev/aic7xxx/aic79xx.c
+1-34sys/dev/aic7xxx/aic7xxx.c
+0-7sys/dev/aic7xxx/aic7770.c
+0-7sys/dev/aic7xxx/aic7xxx_93cx6.c
+0-7sys/dev/aic7xxx/aic7xxx_pci.c
+0-6sys/dev/aic7xxx/aic79xx_pci.c
+2-959 files not shown
+2-11015 files

FreeBSD/src ea6f2d7tools/build checkstyle9.pl

checkstyle9.pl: Warn if there's no SOB line

If there's no Signed-off-by: line, complain.

Sponsored by:           Netflix
DeltaFile
+8-0tools/build/checkstyle9.pl
+8-01 files

FreeBSD/src e75a1bblib/msun/src e_pow.c e_powf.c

pow,powf(3),__ieee754_rem_pio2(f): Avoid negative integer left shift UB

A compiler clever enough to know that z is positive with a non-zero
biased exponent could, for example, optimize away the scalbnf(z,n) in
pow() because behavior for left shift of negative values is undefined.
`n` is negative when y*log2(|x|) < -0.5.  i.e. |x^y| < sqrt(0.5)

The intended behavior for operator<< in this code is to shift the two's
complement representation of the first operand.

In the pow() functions, the result is added to the IEEE 754 exponent of
z = 2^y'.  n may be negative enough to underflow the biased IEEE 754
exponent below zero, which is manifested in the sign bit of j
(which would correspond to the IEEE 754 sign bit).

The conversion from uint32_t to int32_t for out-of-int32_t-range values
is implementation defined.  The assumed behavior of interpreting the
uint32_t value as a two's complement representation of a signed value
is already assumed in many parts of the code, such as uses of

    [9 lines not shown]
DeltaFile
+5-1lib/msun/src/e_pow.c
+5-1lib/msun/src/e_powf.c
+1-1lib/msun/src/e_rem_pio2.c
+1-1lib/msun/src/e_rem_pio2f.c
+12-44 files

FreeBSD/src aa66995lib/libc/stdio xprintf_errno.c

libc printf_render_errno(): do not use strerror()

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D44916
DeltaFile
+4-3lib/libc/stdio/xprintf_errno.c
+4-31 files

FreeBSD/src bac9d7elib/libc/stdio xprintf_errno.c

libc: minor style, wrap long lines

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D44916
DeltaFile
+4-2lib/libc/stdio/xprintf_errno.c
+4-21 files

FreeBSD/src f887667lib/libc/stdio vfprintf.c

__vprintf(): switch from strerror() to strerror_rl()

This eliminates the use of non-thread-safe function in printf*() family,
and make the call locale-aware.  Also, it stops obliterating the
strerror() static buffer, which aligns with the POSIX requirement that
implementations must behave as if no standard-mandated functions call
strerror().

PR:     278556
Reported by:    Jonathan Gruber <jonathan.gruber.jg at gmail.com>
Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D44916
DeltaFile
+5-1lib/libc/stdio/vfprintf.c
+5-11 files

FreeBSD/src 92771bclib/libc/include libc_private.h, lib/libc/string strerror.c

libc: make strerror_rl() usable for libc

Reviewed by:    imp
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D44916
DeltaFile
+5-5lib/libc/string/strerror.c
+2-0lib/libc/include/libc_private.h
+7-52 files

FreeBSD/src cbbc577share/man/man5 src.conf.5

src.conf.5: Regen after removing MK_NVME
DeltaFile
+0-2share/man/man5/src.conf.5
+0-21 files

FreeBSD/src ee3187fshare/mk src.opts.mk, tools/build/options WITHOUT_NVME WITH_NVME

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
DeltaFile
+0-1share/mk/src.opts.mk
+0-1tools/build/options/WITHOUT_NVME
+0-1tools/build/options/WITH_NVME
+0-33 files

FreeBSD/src 2d51a98sbin Makefile

nvmecontrol: Always build instead of being conditional on WITH_NVME

This now builds fine on all platforms so always include it similar
to other tools such as camcontrol.

Reviewed by:    imp, emaste
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D44842
DeltaFile
+1-1sbin/Makefile
+1-11 files

FreeBSD/src 2b676a6sbin/camcontrol camcontrol.c Makefile

camcontrol: Enable WITH_NVME unconditionally

MK_NVME is no longer marked broken for any platforms, so just include
support for it always as we do for ATA and SCSI.

Reviewed by:    emaste
Sponsored by:   Chelsio Communications
Differential Revision:  https://reviews.freebsd.org/D44841
DeltaFile
+0-14sbin/camcontrol/camcontrol.c
+1-3sbin/camcontrol/Makefile
+1-172 files

FreeBSD/src 86d0691. .cirrus.yml

Cirrus-CI: switch to llvm18 by default

As of commit 439352ac8257 Clang/LLVM 18 is the default in-tree compiler.
Follow suit in with the external toolchain package used by Cirrus-CI.

Sponsored by:   The FreeBSD Foundation

(cherry picked from commit e8b7c78c1b38d0486ff12993c0529a201030bd07)
DeltaFile
+3-3.cirrus.yml
+3-31 files