HardenedBSD/src 0e7c5f5lib/msun/man fmaximum_num.3 fmaximum_mag.3, lib/msun/src s_fminimum_num.c s_fmaximum_num.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+154-24usr.sbin/nfsd/nfsv4.4
+113-0lib/msun/man/fmaximum_num.3
+102-0lib/msun/man/fmaximum_mag.3
+76-2lib/msun/tests/fmaximum_fminimum_test.c
+76-0lib/msun/src/s_fminimum_num.c
+74-0lib/msun/src/s_fmaximum_num.c
+595-2625 files not shown
+1,359-10031 files

HardenedBSD/src f8f7261lib/msun/man fmaximum_num.3 fmaximum_mag.3, lib/msun/src s_fminimum_num.c s_fminimum_mag.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+154-24usr.sbin/nfsd/nfsv4.4
+113-0lib/msun/man/fmaximum_num.3
+102-0lib/msun/man/fmaximum_mag.3
+76-2lib/msun/tests/fmaximum_fminimum_test.c
+76-0lib/msun/src/s_fminimum_num.c
+74-0lib/msun/src/s_fminimum_mag.c
+595-2625 files not shown
+1,359-10031 files

HardenedBSD/src 3475b12tests/sys/fs/fusefs read.cc

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+5-5tests/sys/fs/fusefs/read.cc
+5-51 files

HardenedBSD/src 6698596usr.sbin/nfsd nfsv4.4

nfsv4.4: Document setup of a NFSv4 root fs

Commit 8b9775912cbc added support for an NFSv4 mounted
root file system.  This patch documents how to set this
up.  It also includes some minor updates and fixes
some formatting.

This is a content change.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D56317
Fixes:  8b9775912cbc ("nfs_diskless: Add support for an NFSv4 root fs")
DeltaFile
+154-24usr.sbin/nfsd/nfsv4.4
+154-241 files

HardenedBSD/src 9d95d80sbin/tunefs tunefs.c

tunefs: Fix pointer arithmetic

While here, remove a bogus const which has been there for years.

MFC after:      1 week
Reported by:    ivy@
Fixes:          1b83e8a3f840 ("Constify string pointers.")
Fixes:          8244dd326265 ("tunefs: Better fix for arm64 alignment issues")
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D56343
DeltaFile
+2-2sbin/tunefs/tunefs.c
+2-21 files

HardenedBSD/src 850eb14usr.sbin/mfiutil mfi_drive.c Makefile

mfiutil(4)/mrsasutil(4): "show drives" truncates information

Improve mfi_pd_inq_string() by
* Reusing buffer sizes from cam/cam.h according to SCSI specification + NULL byte
* Don't truncate vendor-specific information by escaping into a too small buffer
* Use cam_strvis() from libcam instead of old, outdated local copy
* Recaculate size of inq_string based on the reused buffer sizes and
  format statements

PR:             294354
Reviewed by:    imp
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56328
DeltaFile
+12-47usr.sbin/mfiutil/mfi_drive.c
+1-1usr.sbin/mfiutil/Makefile
+13-482 files

HardenedBSD/src 4f684e9stand/efi/loader main.c, stand/man loader.efi.8

loader.efi.8/efibootmgr.8: Don't use contradicting term 'EFI BIOS'

Both (U)EFI and BIOS are completely different things, be precise and don't use
them together.

Reviewed by:    imp
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D56329
DeltaFile
+6-6stand/man/loader.efi.8
+4-4stand/efi/loader/main.c
+2-2usr.sbin/efibootmgr/efibootmgr.8
+12-123 files

HardenedBSD/src 4e30c12lib/msun/man fmaximum_num.3 fmaximum_mag.3, lib/msun/src s_fminimum_num.c s_fminimum_mag.c

lib/msun: Added fmaximum_mag and fmaximum_num families

Added support for the f{maximum,minimum}_{mag,num} families, the new
C23 standard functions for maximum magnitude and number-preferring
maximum.  This includes modifying fmax.3, on top of D56230, to
recommend the use of fmaximum_num and fminimum_num.

Reviewed by:    fuz, kargl
MFC after:      1 month
Differential Revision:  https://reviews.freebsd.org/D56236
DeltaFile
+113-0lib/msun/man/fmaximum_num.3
+102-0lib/msun/man/fmaximum_mag.3
+76-2lib/msun/tests/fmaximum_fminimum_test.c
+76-0lib/msun/src/s_fminimum_num.c
+74-0lib/msun/src/s_fminimum_mag.c
+74-0lib/msun/src/s_fmaximum_num.c
+515-217 files not shown
+1,169-1123 files

HardenedBSD/src 47ca491lib/msun/man math.3

msun/math.3: reference new functions f{max,min}imum{,_num,_mag}()

See also:       D55834, D56236
MFC after:      1 month
DeltaFile
+9-3lib/msun/man/math.3
+9-31 files

HardenedBSD/src 090fb28sys/compat/linprocfs linprocfs.c, sys/conf kern.pre.mk

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+5-9sys/compat/linprocfs/linprocfs.c
+4-2sys/conf/kern.pre.mk
+9-112 files

HardenedBSD/src b496e44sys/compat/linprocfs linprocfs.c, sys/conf kern.pre.mk

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+5-9sys/compat/linprocfs/linprocfs.c
+4-2sys/conf/kern.pre.mk
+9-112 files

HardenedBSD/src 859e512libexec/flua Makefile linit_flua.c, libexec/flua/lfbsd lfbsd.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+457-0libexec/flua/lfs/lfs.c
+0-448libexec/flua/modules/lfs.c
+289-0libexec/flua/lfbsd/lfbsd.c
+0-285libexec/flua/modules/lfbsd.c
+39-8libexec/flua/Makefile
+28-5libexec/flua/linit_flua.c
+813-74634 files not shown
+1,028-85840 files

HardenedBSD/src 28ddaaatests/sys/fs/fusefs read.cc

tests/fusefs: fix sign-compare warning on armv7

Fixes:          7e68af7ce2c1b892954df415774fe59fd2f1b62f
Reviewed by:    asomers
Approved by:    emaste (mentor)
Differential Revision:  https://reviews.freebsd.org/D55846

(cherry picked from commit 736d8852e190f69dc93206ed3fb2d1f712dc3ad1)
DeltaFile
+5-5tests/sys/fs/fusefs/read.cc
+5-51 files

HardenedBSD/src de2ea54sys/conf kern.pre.mk

zstd: disable weak-symbol tracing hooks in the kernel

zstd's tracing API (zstd_trace.h) declares ZSTD_trace_compress_begin()
and friends as __attribute__((weak)) externals, gated on the
ZSTD_HAVE_WEAK_SYMBOLS compile-time probe.  That probe has covered
x86_64 and i386 since at least zstd 1.5.6, and was extended to aarch64
and riscv in 1.5.7.

In a static kernel image there is no dynamic linker to patch the PLT GOT
entries at runtime.  On amd64 the undefined weak symbols resolve directly
to NULL, so the "!= NULL" guard in the zstd source correctly suppresses
every call through the stubs.  On aarch64 and riscv the ABI requires
GOT-based indirection for external calls: the PLT stub address is
non-NULL, the guard passes, and the call lands in an uninitialized GOT
slot.  Because this happens before exception handlers are in place the
machine resets silently, making the kernel unbootable after the zstd
1.5.7 import.

The upstream-supported suppression is ZSTD_NO_TRACE (zstd_internal.h),

    [8 lines not shown]
DeltaFile
+4-2sys/conf/kern.pre.mk
+4-21 files

HardenedBSD/src 5f5cc3csys/compat/linprocfs linprocfs.c

compat/linprocfs: Update /proc/partitions output

Linux /proc/partitions reports the major/minor pair, the device size in
1K blocks, and the device name.  linprocfs still printed obsolete
statistics columns and reported the size in bytes.

Update linprocfs_dopartitions() to emit the Linux-style header and
report provider sizes in 1K blocks.

Signed-off-by: Shunchao Hu <ankohuu at gmail.com>
Reviewed by:    des
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2126
Closes:         https://github.com/freebsd/freebsd-src/pull/2126
DeltaFile
+5-9sys/compat/linprocfs/linprocfs.c
+5-91 files

HardenedBSD/src ee79b84sys/arm64/qualcomm qcom_gcc.c, sys/dev/qcom_gcc qcom_gcc_msm8916_clock.c qcom_gcc_msm8916_reset.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+0-143sys/arm64/qualcomm/qcom_gcc.c
+0-112sys/netinet6/nd6_rtr.c
+84-0sys/dev/qcom_gcc/qcom_gcc_msm8916_clock.c
+71-0sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c
+41-0sys/dev/qcom_gcc/qcom_gcc_msm8916.h
+0-39sys/net/if_ethersubr.c
+196-29423 files not shown
+266-38129 files

HardenedBSD/src bc67551sys/fs/nfsserver nfs_nfsdsocket.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+2-1sys/fs/nfsserver/nfs_nfsdsocket.c
+2-11 files

HardenedBSD/src 5183de1libexec/flua/lfs lfs.c

stand: lua: break out a few more dirent types in lfs

These are non-standard and specific to the version used in loader.  We
have some desire to recognize symlinks to avoid filtering out kernel
symlinks in the autodetection bits when they would be perfectly fine to
`load`.

This won't be usable right away, so any impending use will need to be
careful to account for nil.

Reported by:    leres

(cherry picked from commit bc531a96c9b28b1cabcd5deb0c9f8f6d815cfebc)
DeltaFile
+4-0libexec/flua/lfs/lfs.c
+4-01 files

HardenedBSD/src ec37fd5libexec/flua Makefile, libexec/flua/modules lposix.c

flua: lposix: fix WARNS=6 issues

lposix is the last holdout of modules built into flua until we can fix
the module design to have the right parts require()able.  Address a
valid bug in lua_read() found at a higher WARNS and drop the override
entirely.  Some of the modules could possibly be re-evaluated.

Reported by:    des
Reviewed by:    des
Sponsored by:   Klara, Inc.
Sponsored by:   NetApp, Inc.

(cherry picked from commit b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5)
DeltaFile
+8-4libexec/flua/modules/lposix.c
+0-1libexec/flua/Makefile
+8-52 files

HardenedBSD/src 9ba365alibexec/flua/lfbsd lfbsd.c lfbsd.h, libexec/flua/lfs lfs.c

flua: kick out the remaining builtin modules

Bootstrap flua has some magic now to handle modules by building them in
and discovering them via linker sets.  This is slightly cleaner than
always building them in and baking them into loadedlibs for both
bootstrap and system flua.

Adjust the stand build now that these three libs have their own new
homes.  lposix remains builtin because it's structured incorrectly in
our version.

Reviewed by:    bapt, emaste, markj

(cherry picked from commit b11a5709ec2b61fefb03bfdd38e2f06d2c1107c1)
(cherry picked from commit 9c7db0931d486ce800aa71d9f41abfad9f7f691f)
(cherry picked from commit d505ef08ffbe3b7383fbc6ed30121de9256ac18e)
DeltaFile
+453-0libexec/flua/lfs/lfs.c
+0-448libexec/flua/modules/lfs.c
+289-0libexec/flua/lfbsd/lfbsd.c
+0-285libexec/flua/modules/lfbsd.c
+0-32libexec/flua/modules/lfbsd.h
+32-0libexec/flua/lfbsd/lfbsd.h
+774-76511 files not shown
+826-80317 files

HardenedBSD/src 2ef21ab. Makefile.inc1, libexec/flua Makefile bootstrap.h

flua: support our flua modules in the bootstrap flua

This version builds every module into the flua binary itself, since all
of the bootstrap tools are built -DNO_SHARED.  As a result, we also
cannot dlsym(), so we can't really discover the names of our newly
builtin modules.  Instead, just build out a linker set with all of our
luaopen_*() functions to register everything up-front.

Building in all of the modules isn't strictly necessary, but it means
that we have an example of how to add a bootstrap module everywhere you
go and one doesn't need to consider whether bootstrap flua can use a
module when writing scripts.  On my build machine, the consequence on
our binary size is an increase from around 1.6M -> 1.9M, which isn't
really that bad.

.lua modules can install into their usual path below $WORLDTMP/legacy
and we'll pick them up automagically by way of the ctor that sets up
LUA_PATH early on.


    [32 lines not shown]
DeltaFile
+36-6libexec/flua/Makefile
+32-0libexec/flua/bootstrap.h
+28-1libexec/flua/linit_flua.c
+1-19libexec/flua/liblyaml/Makefile
+20-0libexec/flua/liblyaml/Makefile.inc
+14-1Makefile.inc1
+131-2718 files not shown
+189-5024 files

HardenedBSD/src 072ca5dlibexec/nuageinit nuageinit

nuageinit: require lfs where it's needed

nuageinit largely already did this, but one spot was missed -- add the
necessary require() in to get the module loaded.

(cherry picked from commit bb4167463ac44b47ded4e0223a0abd8381ca6cd8)
DeltaFile
+1-0libexec/nuageinit/nuageinit
+1-01 files

HardenedBSD/src 6dddd25sys/fs/nfsserver nfs_nfsdsocket.c

nfs_nfsdsocket.c: All Copy and Clone across file systems

For some server file system types, such as ZFS, a Copy/Clone
operation can be done across file systems of the same file
system type.

As such, this patch allows the Copy/Clone to be attempted
when the file handles are for files on different file systems.

This fixes a problem for exported ZFS file systems when a
copy_files on file_range(2) between file systems in the same
NFSv4 mount is attempted.

PR:     294010

(cherry picked from commit b65e7b4944cc2f594c9d9e6abc9b8618d3d62ff8)
DeltaFile
+2-1sys/fs/nfsserver/nfs_nfsdsocket.c
+2-11 files

HardenedBSD/src f95b974share/mk src.opts.mk

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+0-5share/mk/src.opts.mk
+0-51 files

HardenedBSD/src 59627d9sys/arm64/qualcomm qcom_gcc.c, sys/dev/qcom_gcc qcom_gcc_msm8916_clock.c qcom_gcc_msm8916_reset.c

Merge remote-tracking branch 'origin/freebsd/current/main' into hardened/current/master

Conflicts:
        share/mk/src.opts.mk (unresolved)
DeltaFile
+0-143sys/arm64/qualcomm/qcom_gcc.c
+0-112sys/netinet6/nd6_rtr.c
+84-0sys/dev/qcom_gcc/qcom_gcc_msm8916_clock.c
+71-0sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c
+41-0sys/dev/qcom_gcc/qcom_gcc_msm8916.h
+0-39sys/net/if_ethersubr.c
+196-29423 files not shown
+269-37929 files

HardenedBSD/src 0425476lib/libsys procctl.2, lib/libusb libusb20_dev_open.3 libusb20_be_device_foreach.3

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+7-77share/man/man5/style.mdoc.5
+69-0lib/libusb/libusb20_dev_open.3
+62-0share/man/man4/vmgenc.4
+56-0lib/libusb/libusb20_be_device_foreach.3
+24-24lib/libsys/procctl.2
+29-0share/man/man4/man4.arm/dwcotg.4
+247-10122 files not shown
+373-14428 files

HardenedBSD/src 4e3fdcesys/arm64/qualcomm qcom_gcc.c, sys/conf files.arm64

qcom_gcc: migrate the MSM8916 support to qcom_gcc

* migrate the MSM8916 (snapdragon 410) support to qcom_gcc
* add the full qcom_gcc / qcom_clk list to files.arm64, replacing
  the MSM8916 stub in sys/arm64/qualcomm .

Differential Revision:  https://reviews.freebsd.org/D49706
DeltaFile
+0-143sys/arm64/qualcomm/qcom_gcc.c
+84-0sys/dev/qcom_gcc/qcom_gcc_msm8916_clock.c
+71-0sys/dev/qcom_gcc/qcom_gcc_msm8916_reset.c
+41-0sys/dev/qcom_gcc/qcom_gcc_msm8916.h
+19-3sys/dev/qcom_gcc/qcom_gcc_main.c
+14-1sys/conf/files.arm64
+229-1475 files not shown
+244-15511 files

HardenedBSD/src 87bea33sys/net if_ethersubr.c, sys/netinet6 nd6_rtr.c nd6.h

nd6: Remove DRAFT_IETF_6MAN_IPV6ONLY_FLAG and EXPERIMENTAL options

The draft-ietf-6man-ipv6only-flag has been obsoleted by RFC 8925.
Remove the EXPERIMENTAL compile option from the kernel and remove
DRAFT_IETF_6MAN_IPV6ONLY_FLAG from userland.
This compile option was not enabled by default.
Also regenerate src.conf.5.

Reviewed by: bz
Differential Revision: https://reviews.freebsd.org/D56228
DeltaFile
+0-112sys/netinet6/nd6_rtr.c
+0-39sys/net/if_ethersubr.c
+0-13usr.sbin/rtadvd/rtadvd.c
+0-11usr.sbin/rtadvd/config.c
+1-6usr.sbin/ndp/ndp.c
+0-6sys/netinet6/nd6.h
+1-18711 files not shown
+2-22217 files

HardenedBSD/src 8208871lib/libsys procctl.2

procctl.2: Align list indentation

Remove 81 lines of whitespace at default manual rendering width.

MFC after: 3 days

(cherry picked from commit db9bbe131c92f55e6cf03657dc030c9eea93a9fb)
DeltaFile
+24-24lib/libsys/procctl.2
+24-241 files

HardenedBSD/src 20bbad1lib/libc/stdlib atexit.3, lib/libsys _exit.2

_exit.2: Cross-reference atexit(3)

atexit(3) is one of the cases when _exit(2) must be used instead of
exit(3).

MFC after:              3 days
Reviewed by:            mhorne, ziaee
Differential Revision:  https://reviews.freebsd.org/D54467

(cherry picked from commit c082e5656417945bfa567114c60969844f3d7bdf)
DeltaFile
+5-4lib/libsys/_exit.2
+2-1lib/libc/stdlib/atexit.3
+7-52 files