HardenedBSD/src cb0c532contrib/less screen.c, sys/kern vfs_subr.c

Merge remote-tracking branch 'internal/freebsd/13-stable/main' into hardened/13-stable/master

Conflicts:
        bin/cat/cat.c
        lib/libc/gen/auxv.3
        libexec/rc/rc.d/archdep
        share/man/man5/src.conf.5
        sys/amd64/amd64/elf_machdep.c
        sys/amd64/cloudabi64/cloudabi64_sysvec.c
        sys/amd64/linux/linux_sysvec.c
        sys/amd64/linux32/linux32_sysvec.c
        sys/arm/arm/elf_machdep.c
        sys/arm64/linux/linux_sysvec.c
        sys/compat/ia32/ia32_sysvec.c
        sys/i386/cloudabi32/cloudabi32_sysvec.c
        sys/i386/linux/imgact_linux.c
        sys/i386/linux/linux_sysvec.c
        sys/kern/imgact_aout.c
        sys/kern/kern_module.c

    [22 lines not shown]
DeltaFile
+175-44sys/vm/vm_map.c
+97-38sys/kern/vfs_subr.c
+64-0tests/sys/vm/stack/stack_dlopen_exec_test.c
+57-0tests/sys/vm/stack/stack_mprotect_exec_test.c
+42-11contrib/less/screen.c
+51-0tests/sys/vm/mmap_map_32bit_helper.c
+486-9331,889 files not shown
+1,170-49,85331,895 files

HardenedBSD/src 3bc8099sys/arm/arm swtch-v6.S, sys/arm64/qoriq qoriq_dw_pci.c

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/

Similar commit in current:
(cherry picked from commit 685dc743dc3b)
DeltaFile
+0-3sys/dev/cfe/cfe_env.c
+0-3sys/dev/extres/clk/clk_mux.c
+0-3sys/dev/cxgb/common/cxgb_t3_hw.c
+0-3sys/arm/arm/swtch-v6.S
+0-3sys/arm64/qoriq/qoriq_dw_pci.c
+0-3sys/kern/subr_syscall.c
+0-184,033 files not shown
+0-7,9144,039 files

HardenedBSD/src acf3d6esys/arm64/arm64 pl031_rtc.c, sys/compat/linux linux_socket.c

Merge remote-tracking branch 'internal/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        tools/build/options/WITH_OFED_EXTRA (deleted)
        usr.sbin/rpc.yppasswdd/Makefile (unresolved)
DeltaFile
+697-0sys/dev/virtio/gpu/virtio_gpu.c
+454-0sys/dev/virtio/gpu/virtio_gpu.h
+153-0sys/arm64/arm64/pl031_rtc.c
+80-52sys/compat/linux/linux_socket.c
+107-0tools/build/freebsd-yeet.pl
+87-11sys/dev/ixl/ixl_pf_main.c
+1,578-6331,042 files not shown
+2,188-48,40531,048 files

HardenedBSD/src 2226d61sys/arm64/arm64 pl031_rtc.c, sys/compat/linux linux_socket.c

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

Conflicts:
        bin/cat/cat.c (unresolved)
        lib/csu/aarch64/crt1_c.c (unresolved)
        lib/csu/amd64/crt1_c.c (unresolved)
        lib/csu/i386/crt1_c.c (unresolved)
        lib/csu/powerpc64/crt1_c.c (unresolved)
        lib/csu/powerpc64/reloc.c (unresolved)
        lib/csu/riscv/crt1_c.c (unresolved)
        lib/libc/gen/auxv.3 (unresolved)
        lib/libcasper/services/cap_net/cap_net.3 (unresolved)
        sys/amd64/amd64/elf_machdep.c (unresolved)
        sys/amd64/include/sgxreg.h (deleted)
        sys/amd64/linux/linux_sysvec.c (unresolved)
        sys/amd64/linux32/linux32_sysvec.c (unresolved)
        sys/amd64/sgx/sgx.c (deleted)
        sys/amd64/sgx/sgx_linux.c (deleted)
        sys/amd64/sgx/sgxvar.h (deleted)

    [29 lines not shown]
DeltaFile
+697-0sys/dev/virtio/gpu/virtio_gpu.c
+454-0sys/dev/virtio/gpu/virtio_gpu.h
+153-0sys/arm64/arm64/pl031_rtc.c
+80-52sys/compat/linux/linux_socket.c
+107-0tools/build/freebsd-yeet.pl
+87-11sys/dev/ixl/ixl_pf_main.c
+1,578-6331,044 files not shown
+2,304-48,37531,050 files

HardenedBSD/src 685dc74sys/arm64/arm64 cpufunc_asm.S, sys/cam/ctl ctl_scsi_all.h

sys: Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
DeltaFile
+0-3sys/cam/ctl/ctl_scsi_all.h
+0-3sys/arm64/arm64/cpufunc_asm.S
+0-3sys/dev/bxe/57710_int_offsets.h
+0-3sys/dev/bxe/57711_int_offsets.h
+0-3sys/dev/bxe/57712_int_offsets.h
+0-3sys/dev/cfe/cfe_env.c
+0-183,795 files not shown
+0-7,4523,801 files

HardenedBSD/src 65b43f4bin/cp/tests cp_test.sh, bin/pkill pkill.c

Merge remote-tracking branch 'freebsd/stable/13' into hardened/13-stable/master

Conflicts:
        sys/i386/linux/imgact_linux.c (deleted)
        sys/kern/imgact_aout.c (deleted)
DeltaFile
+1-3sys/xen/xenbus/xenbusb.h
+1-3sys/dev/qlxge/qls_isr.c
+1-1sys/sys/_bus_dma.h
+1-1bin/cp/tests/cp_test.sh
+1-1bin/pkill/pkill.c
+1-1bin/timeout/timeout.1
+6-105,655 files not shown
+5,661-5,6655,661 files

HardenedBSD/src caa41f6sys/dev/qlxge qls_isr.c, sys/netgraph/bluetooth/l2cap ng_l2cap_ulpi.c

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:         pfg
MFC After:              3 days
Sponsored by:           Netflix

(cherry picked from commit 4d846d260e2b9a3d4d0a701462568268cbfe7a5b)
DeltaFile
+2-2sys/xen/xenbus/xenbusb.h
+2-2sys/dev/qlxge/qls_isr.c
+1-1sys/powerpc/include/openpicvar.h
+1-1sys/powerpc/include/pcpu.h
+1-1sys/powerpc/include/pcpu_aux.h
+1-1sys/netgraph/bluetooth/l2cap/ng_l2cap_ulpi.c
+8-85,432 files not shown
+5,440-5,4405,438 files

HardenedBSD/src 161fa17sys/contrib/dev/athk/ath11k mac.c wmi.c

Merge remote-tracking branch 'internal/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        share/man/man5/src.conf.5 (unresolved)
DeltaFile
+8,669-0sys/contrib/dev/athk/ath11k/mac.c
+8,286-0sys/contrib/dev/athk/ath11k/wmi.c
+5,662-0sys/contrib/dev/athk/ath11k/dp_rx.c
+5,585-0sys/contrib/dev/athk/ath11k/wmi.h
+4,704-0sys/contrib/dev/athk/ath11k/debugfs_htt_stats.c
+3,063-0sys/contrib/dev/athk/ath11k/qmi.c
+35,969-06,232 files not shown
+89,418-15,4896,238 files

HardenedBSD/src 8b901f3contrib/xz ChangeLog, contrib/xz/src/liblzma/common memcmplen.h

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

Conflicts:
        lib/csu/common/csu_common.h (deleted)
        share/man/man5/src.conf.5 (unresolved)
        sys/i386/linux/imgact_linux.c (deleted)
        sys/kern/imgact_aout.c (deleted)
DeltaFile
+267-0contrib/xz/ChangeLog
+66-0share/mk/local.sys.dirdeps.env.mk
+0-66share/mk/local.meta.sys.env.mk
+17-0stand/efi/libefi/devpath.c
+14-0tools/build/options/WITH_META_ERROR_TARGET
+12-1contrib/xz/src/liblzma/common/memcmplen.h
+376-675,795 files not shown
+6,208-5,8965,801 files

HardenedBSD/src 4d846d2sys/dev/adb adb_kbd.c adbvar.h, sys/dev/ae if_ae.c if_aereg.h

spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD

The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:         pfg
MFC After:              3 days
Sponsored by:           Netflix
DeltaFile
+2-2sys/xen/xenbus/xenbusb.h
+2-2sys/dev/qlxge/qls_isr.c
+1-1sys/dev/adb/adb_kbd.c
+1-1sys/dev/adb/adbvar.h
+1-1sys/dev/ae/if_ae.c
+1-1sys/dev/ae/if_aereg.h
+8-85,571 files not shown
+5,579-5,5795,577 files

HardenedBSD/src 5d76d4ccontrib/file configure, contrib/opie configure

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        share/man/man5/src.conf.5 (unresolved)
DeltaFile
+51,045-0sys/contrib/dev/rtw89/rtw8852a_table.c
+36,704-0sys/contrib/dev/rtw89/rtw8852c_table.c
+3,904-3,077contrib/file/configure
+6,600-0sys/contrib/dev/rtw89/coex.c
+0-5,247contrib/opie/configure
+4,673-0sys/contrib/dev/rtw89/mac.c
+102,926-8,3244,222 files not shown
+225,249-57,5414,228 files

HardenedBSD/src 5dca931lib/clang llvm.build.mk, sys/netinet tcp_hpts.c

Merge remote-tracking branch 'origin/freebsd/13-stable/main' into hardened/13-stable/master
DeltaFile
+11-4sys/powerpc/aim/mmu_radix.c
+3-4lib/clang/llvm.build.mk
+1-5sys/netinet/tcp_hpts.c
+5-1sys/netinet/tcp_stacks/rack.c
+2-2sys/powerpc/booke/mp_cpudep.c
+2-2sys/powerpc/aim/mmu_oea64.c
+24-1813 files not shown
+36-3419 files

HardenedBSD/src 9ae1196sys/powerpc/aim moea64_native.c

Adjust function definition in moea64_native.c to avoid clang 15 warning

With clang 15, the following -Werror warning is produced:

    sys/powerpc/aim/moea64_native.c:306:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    moea64_install_native()
                         ^
                          void

This is because moea64_install_native() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:      3 days

(cherry picked from commit ff490346fd519501e9263988959ffb583013ccdb)
DeltaFile
+1-1sys/powerpc/aim/moea64_native.c
+1-11 files

HardenedBSD/src 7f0e7ccsys/arm64/rockchip rk_iodomain.c, sys/dev/iommu iommu_gas.c

Merge remote-tracking branch 'origin/freebsd/current/main' into hardened/current/master
DeltaFile
+111-61usr.sbin/bhyve/pci_nvme.c
+0-147sys/net/route.c
+37-85tools/boot/rootgen.sh
+102-18sys/arm64/rockchip/rk_iodomain.c
+118-0sys/dev/iommu/iommu_gas.c
+74-4sys/dev/wtap/if_wtap.c
+442-31579 files not shown
+742-46585 files

HardenedBSD/src ff49034sys/powerpc/aim moea64_native.c

Adjust function definition in moea64_native.c to avoid clang 15 warning

With clang 15, the following -Werror warning is produced:

    sys/powerpc/aim/moea64_native.c:306:22: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
    moea64_install_native()
                         ^
                          void

This is because moea64_install_native() is declared with a (void)
argument list, but defined with an empty argument list. Make the
definition match the declaration.

MFC after:      3 days
DeltaFile
+1-1sys/powerpc/aim/moea64_native.c
+1-11 files

HardenedBSD/src 31367a1contrib/sqlite3 sqlite3.c, share/colldef_unicode zh_CN.UTF-8.src

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        share/man/man5/src.conf.5 (unresolved)
DeltaFile
+40,646-40,658share/colldef_unicode/zh_CN.UTF-8.src
+46,300-0sys/contrib/dev/rtw88/rtw8822c_table.c
+0-27,824sys/contrib/openzfs/module/zstd/lib/zstd.c
+22,204-0sys/contrib/dev/rtw88/rtw8822b_table.c
+9,441-436sys/contrib/zlib/crc32.h
+5,931-3,922contrib/sqlite3/sqlite3.c
+124,522-72,84014,231 files not shown
+826,315-442,38114,237 files

HardenedBSD/src 519bb6cshare/vt/keymaps fr.bepo.kbd, sys/amd64/include cpufunc.h atomic.h

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

Conflicts:
        sys/amd64/include/cpufunc.h (unresolved)
DeltaFile
+0-192sys/i386/i386/in_cksum_machdep.c
+138-0share/vt/keymaps/fr.bepo.kbd
+81-6sys/amd64/include/cpufunc.h
+0-78sys/i386/include/cpufunc.h
+0-51sys/i386/include/atomic.h
+0-47sys/amd64/include/atomic.h
+219-374122 files not shown
+388-869128 files

HardenedBSD/src c9d26casys/powerpc/aim moea64_native.c

ppc mmoea64: Workaround set but unused warnings for RB_NEXT.

Inline the unused expression passed as the second argument to RB_NEXT.
DeltaFile
+2-6sys/powerpc/aim/moea64_native.c
+2-61 files

HardenedBSD/src 34ab832contrib/binutils Makefile.in, contrib/terminus ter-u32n.bdf ter-u32b.bdf

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi

Conflicts:
        Makefile.inc1 (unresolved)
        share/man/man5/src.conf.5 (unresolved)
        targets/pseudo/bootstrap-tools/Makefile (unresolved)
        tools/build/options/WITH_OFED_EXTRA (deleted)
DeltaFile
+71,590-432tools/tools/locale/etc/final-maps/widths.txt
+52,834-0contrib/terminus/ter-u32n.bdf
+52,834-0contrib/terminus/ter-u32b.bdf
+0-49,485contrib/binutils/Makefile.in
+47,418-0contrib/terminus/ter-u28b.bdf
+47,418-0contrib/terminus/ter-u28n.bdf
+272,094-49,91725,491 files not shown
+3,013,181-3,285,38525,497 files

HardenedBSD/src 2c66289lib/msun/powerpc fenv.c fenv.h, sys/netinet sctp_input.c

Merge branch 'freebsd/current/main' into hardened/current/master

* freebsd/current/main:
  powerpc64: Split out DMAP and non-DMAP implementations of some methods
  msun fixes for SPE
  sctp: improve consistency when handling chunks of wrong size
DeltaFile
+74-53sys/powerpc/aim/mmu_oea64.c
+30-0lib/msun/powerpc/fenv.c
+18-1lib/msun/powerpc/fenv.h
+8-6sys/netinet/sctp_input.c
+4-0sys/powerpc/powerpc/machdep.c
+3-0sys/powerpc/aim/mmu_oea64.h
+137-603 files not shown
+142-609 files

HardenedBSD/src 49c894dsys/powerpc/aim mmu_oea64.c mmu_oea64.h, sys/powerpc/powerpc machdep.c

powerpc64: Split out DMAP and non-DMAP implementations of some methods

Summary:
Some methods are split between DMAP and non-DMAP, conditional on
hw_direct_map variable.  Rather than checking this variable every time,
use it to install different functions via IFUNCs.

Reviewed By: luporl
Differential Revision: https://reviews.freebsd.org/D30071
DeltaFile
+74-53sys/powerpc/aim/mmu_oea64.c
+4-0sys/powerpc/powerpc/machdep.c
+3-0sys/powerpc/aim/mmu_oea64.h
+2-0sys/powerpc/aim/moea64_native.c
+2-0sys/powerpc/pseries/mmu_phyp.c
+1-0sys/powerpc/ps3/mmu_ps3.c
+86-536 files

HardenedBSD/src d67fa62share/man/man5 hosts.5, share/man/man7 development.7

Merge branch 'freebsd/current/main' into hardened/current/master

* freebsd/current/main:
  SPDX: Spell 4 clause BSD license correctly
  gmirror: Pre-allocate the timeout event structure
  development(7): update to reflect Git transition
  man: Remove obsolete info from hosts man page
DeltaFile
+34-9sys/geom/mirror/g_mirror.c
+18-10share/man/man7/development.7
+1-15share/man/man5/hosts.5
+1-1sys/powerpc/aim/moea64_native.c
+1-0sys/geom/mirror/g_mirror.h
+55-355 files

HardenedBSD/src ba5de7esys/powerpc/aim moea64_native.c

SPDX: Spell 4 clause BSD license correctly
DeltaFile
+1-1sys/powerpc/aim/moea64_native.c
+1-11 files

HardenedBSD/src c7ce6b0contrib/libstdc++ configure, lib/clang/liblldb LLDBWrapLua.cpp

Merge branch 'hardened/current/master' into hardened/current/uninit-autoinit
DeltaFile
+0-111,817contrib/libstdc++/configure
+72,183-0lib/clang/liblldb/LLDBWrapLua.cpp
+71,590-432tools/tools/locale/etc/final-maps/widths.txt
+31,726-39,305share/ctypedef/ja_JP.eucJP.src
+59,521-0sys/contrib/dev/iwm/iwm-9000-34.fw.uu
+59,517-0sys/contrib/dev/iwm/iwm-9260-34.fw.uu
+294,537-151,55460,534 files not shown
+10,288,584-10,879,88160,540 files

HardenedBSD/src 4f76d35sys/dev/cxgbe t4_iov.c, sys/dev/cxgbe/common t4vf_hw.c t4_hw.c

Merge branch 'freebsd/current/master' into hardened/current/master

* freebsd/current/master:
  Add more per-cpu zones.
  cxgbe(4): Allow the PF driver to set a VF's MAC address.
  vmstat: remove spurious newlines when reporting zones
  procdesc: convert the zone to a malloc type
  bufcache: convert bo_numoutput from long to int
  kqueue: save space by using only one func pointer for assertions
  cxgbev(4): Use the MAC address set by the the PF if there is one.
  [PowerPC] Fix powerpc64le boot after HPT superpages addition
DeltaFile
+32-42sys/kern/uipc_socket.c
+65-0sys/dev/cxgbe/t4_iov.c
+18-30sys/kern/kern_event.c
+46-0sys/dev/cxgbe/common/t4vf_hw.c
+42-0sys/dev/cxgbe/common/t4_hw.c
+7-15sys/kern/vfs_subr.c
+210-8711 files not shown
+268-14917 files

HardenedBSD/src c307ca3sys/powerpc/aim moea64_native.c

[PowerPC] Fix powerpc64le boot after HPT superpages addition

The HPT is always stored in big-endian, as it is accessed directly by the
hardware as well as the kernel. As such, it is necessary to convert values
to and from native endian when running on LE.

Some unconverted accesses snuck in accidentally with r367417.

Apply the appropriate conversions to fix boot hanging on powerpc64le.

Sponsored by:   Tag1 Consulting, Inc.
DeltaFile
+9-7sys/powerpc/aim/moea64_native.c
+9-71 files

HardenedBSD/src 8801df3 (r367496)sys/powerpc/aim moea64_native.c

[PowerPC] Fix powerpc64le boot after HPT superpages addition

The HPT is always stored in big-endian, as it is accessed directly by the
hardware as well as the kernel. As such, it is necessary to convert values
to and from native endian when running on LE.

Some unconverted accesses snuck in accidentally with r367417.

Apply the appropriate conversions to fix boot hanging on powerpc64le.

Sponsored by:   Tag1 Consulting, Inc.
DeltaFile
+9-7sys/powerpc/aim/moea64_native.c
+9-71 files

HardenedBSD/src 29397calib/libmemstat memstat_malloc.c, libexec/rc/rc.d mountd

Merge branch 'freebsd/current/master' into hardened/current/master

* freebsd/current/master:
  fix up docs, if signature checking is enabled, the file MUST exist...
  linux(4): Fix loadable modules after r367395
  malloc: move malloc_type_internal into malloc_type
  efifb: vt_generate_cons_palette() takes max color, not mask
  Make powerpc use MAXARGS (defined as 8) instead of hardcoding '10'. This brings its 'struct syscall_args' in sync with other architectures.
  Remove 'struct trapframe' pointer from mips64's 'struct syscall_args'. While here, use MAXARGS.  This brings its 'struct syscall_args' in sync with most other architectures.
  cxgbe(4):  Update firmwares to 1.25.0.40.
  Fix powerpc and LINT builds
  Use void * in place of caddr_t.
  Group session management routines together before first use.
  Add support for the new mountd -R option.
DeltaFile
+78-104sys/opencrypto/cryptodev.c
+25-43sys/kern/kern_malloc.c
+14-14sys/opencrypto/cryptodev.h
+23-3libexec/rc/rc.d/mountd
+11-7sys/sys/malloc.h
+8-9lib/libmemstat/memstat_malloc.c
+159-18027 files not shown
+221-23133 files

HardenedBSD/src 8b2133d (r367427)sys/conf files.powerpc, sys/powerpc/aim moea64_native.c mmu_oea64.c

Fix powerpc and LINT builds

Fix build errors introduced by r367417 and r367390:

- Guard label reached only by powerpc64
- Guard vm_reserv_level_iffullpop call, that is not defined on powerpc
  variants that don't support superpages
- Add missing hwpmc file, for when hwpmc is built into kernel
DeltaFile
+2-1sys/powerpc/aim/moea64_native.c
+2-0sys/powerpc/aim/mmu_oea64.c
+1-0sys/conf/files.powerpc
+5-13 files

HardenedBSD/src 9f06cf3sys/conf files.powerpc, sys/powerpc/aim moea64_native.c mmu_oea64.c

Fix powerpc and LINT builds

Fix build errors introduced by r367417 and r367390:

- Guard label reached only by powerpc64
- Guard vm_reserv_level_iffullpop call, that is not defined on powerpc
  variants that don't support superpages
- Add missing hwpmc file, for when hwpmc is built into kernel
DeltaFile
+2-1sys/powerpc/aim/moea64_native.c
+2-0sys/powerpc/aim/mmu_oea64.c
+1-0sys/conf/files.powerpc
+5-13 files