HardenedBSD/src b08b25blib/libthr/tests pthread_tryjoin_test.c, lib/libthr/thread thr_join.c

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+54-22lib/libthr/thread/thr_join.c
+62-0lib/libthr/tests/pthread_tryjoin_test.c
+20-7sys/x86/x86/local_apic.c
+23-3share/man/man3/pthread_join.3
+0-20sys/amd64/vmm/vmm.c
+11-1sys/kern/init_main.c
+170-5312 files not shown
+204-6918 files

HardenedBSD/src 31f652clib/libthr/tests pthread_tryjoin_test.c, lib/libthr/thread thr_join.c

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+54-22lib/libthr/thread/thr_join.c
+62-0lib/libthr/tests/pthread_tryjoin_test.c
+20-7sys/x86/x86/local_apic.c
+23-3share/man/man3/pthread_join.3
+0-20sys/amd64/vmm/vmm.c
+11-1sys/kern/init_main.c
+170-5312 files not shown
+204-6918 files

HardenedBSD/src 39cb9fbusr.bin/grep zgrep.1, usr.bin/grep/tests grep_freebsd_test.sh

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+0-18usr.bin/grep/zgrep.1
+11-0usr.bin/grep/tests/grep_freebsd_test.sh
+11-182 files

HardenedBSD/src c0898bdusr.bin/usbhidctl usbhidctl.1

usbhidctl.1: adjust option list indent

For improved legibility.
DeltaFile
+1-1usr.bin/usbhidctl/usbhidctl.1
+1-11 files

HardenedBSD/src d80f249usr.bin/grep/tests grep_freebsd_test.sh

grep/tests: Fix up the zgrep executable path in a newly added test

Fixes:  da5d94d29a5e ("Remove obsolete BUGS section from zgrep(1) man page, add test")
(cherry picked from commit 045112f148fa092c92ec53204708f638b226ff8f)
DeltaFile
+1-1usr.bin/grep/tests/grep_freebsd_test.sh
+1-11 files

HardenedBSD/src 6aca792usr.bin/grep zgrep.1, usr.bin/grep/tests grep_freebsd_test.sh

Remove obsolete BUGS section from zgrep(1) man page, add test

I forgot to check/update the man page with D54217. While here add
a test for multiple -e flags.

Reviewed by:    markj
Approved by:    markj
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D54632

(cherry picked from commit da5d94d29a5ec29817476c39ae2b2ad1666c3f06)
DeltaFile
+0-18usr.bin/grep/zgrep.1
+11-0usr.bin/grep/tests/grep_freebsd_test.sh
+11-182 files

HardenedBSD/src 902e305lib/libthr/tests pthread_tryjoin_test.c Makefile

lib/libthr: add pthread_tryjoin(3) test

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54766
DeltaFile
+62-0lib/libthr/tests/pthread_tryjoin_test.c
+1-0lib/libthr/tests/Makefile
+63-02 files

HardenedBSD/src 7f026a5share/man/man3 pthread_join.3 Makefile

Document pthread_tryjoin_np(3)

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54766
DeltaFile
+23-3share/man/man3/pthread_join.3
+2-1share/man/man3/Makefile
+25-42 files

HardenedBSD/src afa70a8include pthread_np.h, lib/libthr pthread.map

libthr: add pthread_tryjoin_np()

Similar to the same glibc function.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54766
DeltaFile
+41-14lib/libthr/thread/thr_join.c
+4-0lib/libthr/pthread.map
+1-0include/pthread_np.h
+46-143 files

HardenedBSD/src ce16be7lib/libthr/thread thr_join.c

libthr/thread/thr_join.c: deduplicate backout_join() helper

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54766
DeltaFile
+13-8lib/libthr/thread/thr_join.c
+13-81 files

HardenedBSD/src 002c50esys/amd64/vmm vmm.c

amd64/vmm: remove unused static function vcpu_state2str()

It is guarded by #ifdef KTR, so the warning does not show up under usual
kernel configs.

Fixes:  ed85203fb7a0334041db6da07e45ddda4caef13d
Sponsored by:   The FreeBSD Foundation
Differential revision:  https://reviews.freebsd.org/D54781
DeltaFile
+0-20sys/amd64/vmm/vmm.c
+0-201 files

HardenedBSD/src 4b534b8sys/dev/acpica acpi.c

acpi: Fix not calling AcpiLeaveSleepState() in S3 path

When resuming from ACPI suspend, the ACPI_SS_SLP_PREP bit in slp_state
was being checked and subsequently unset when calling resumeclock().
This bit was also being checked for the AcpiLeaveSleepState() call in
the non-s2idle path, but having just been unset, it was never actually
being called.

Change this so that resumeclock() is always being called (since we never
goto breakout between suspendclock() and resumeclock() anyway) and
ACPI_SS_SLP_PREP is purely used for AcpiEnterSleepStatePrep() and
AcpiLeaveSleepState() in the non-s2idle paths.

PR:             292568
Reported by:    Marek Zarychta
Reviewed by:    olce
Tested by:      Marek Zarychta
Approved by:    olce
Fixes:  7669cbd0f064 (“acpi: Suspend-to-idle support (s2idle)”)

    [2 lines not shown]
DeltaFile
+3-6sys/dev/acpica/acpi.c
+3-61 files

HardenedBSD/src a4e8319bin/ln symlink.7

Merge remote-tracking branch 'internal/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+19-2bin/ln/symlink.7
+19-21 files

HardenedBSD/src 41d8c30share/mk src.opts.mk

HBSD: Resolve merge conflict

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+2-3share/mk/src.opts.mk
+2-31 files

HardenedBSD/src 709a53csys/x86/include apicreg.h, sys/x86/x86 local_apic.c

x86/local_apic.c: Properly calculate the number of LVT entries

First, the CMCI entry index is APIC_LVT_MAX, so it was excluded
unconditionall [1].

Second, the number of entries is reported by the version register, and
we must not access past the last reported entry.

Reported by:    olivier [1]
Fixes:  11f954b021a1aadde1d03d40ed5d6b529e14da98
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54773
DeltaFile
+5-2sys/x86/x86/local_apic.c
+6-1sys/x86/include/apicreg.h
+11-32 files

HardenedBSD/src ad5e3cbsys/x86/x86 local_apic.c

x86/local_apic.c: add lapic_maxlvt() helper

that calculates the max index of the present LVT entry from the value of
the LAPIC version register.

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54773
DeltaFile
+15-5sys/x86/x86/local_apic.c
+15-51 files

HardenedBSD/src 83d9882sys/amd64/amd64 machdep.c, sys/kern init_main.c

sys: do not allow entering vm_fault() on boot until VM is initialized

On amd64, a hack sets td_critnest to 1 in hammer_time(), and then clear
it before returning from hammer_time(), which is too early.  Instead,
set TDP_NOFAULTING for thread0, and clear the flag after vm_init() finished.

Noted by:       adrian
Reviewed by:    adrian (previous version), markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54768
DeltaFile
+11-1sys/kern/init_main.c
+8-0sys/vm/vm_init.c
+1-4sys/amd64/amd64/machdep.c
+20-53 files

HardenedBSD/src 3a6289e.github/workflows checklist.yml

.github: Disable checklist workflow on forks

Reviewed by:    imp
Obtained from:  CheriBSD
Sponsored by:   AFRL, DARPA
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1973
DeltaFile
+1-0.github/workflows/checklist.yml
+1-01 files

HardenedBSD/src d91ae61sys/net iflib.c

iflib: null out freed mbuf in iflib_txsd_free

When adding the IFLIB_GET_MBUF/FLAGS, I neglected to NULL out the
mbuf in the descriptor ring.  I didn't think this should matter as
the I thought this code was only used when the ring was about
to be freed. But I was wrong, and leaving a stale mbuf in there can
cause panics.

Reported by:  Marek Zarychta (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292547)
Fixes: 14d93f612f26
Sponsored by: Netflix
DeltaFile
+1-0sys/net/iflib.c
+1-01 files

HardenedBSD/src 99afbc5sys/dev/vmm vmm_dev.c

vmm: Avoid clobbering errors from vmm_modinit()

Reported by:    novel
Reviewed by:    bnovkov
Fixes:          e758074458df ("vmm: Move the module load handler to vmm_dev.c")
Differential Revision:  https://reviews.freebsd.org/D54750
DeltaFile
+5-3sys/dev/vmm/vmm_dev.c
+5-31 files

HardenedBSD/src f3d035ebin/ln symlink.7

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+19-2bin/ln/symlink.7
+19-21 files

HardenedBSD/src a2c87d4bin/ln symlink.7

symlink.7: add a new section "mount options"

Add a new section "mount options" to explain
the mount option nosymfollow in more details.

Differential Revision:  https://reviews.freebsd.org/D54530
DeltaFile
+19-2bin/ln/symlink.7
+19-21 files

HardenedBSD/src b56395ccontrib/ncurses configure aclocal.m4, contrib/ncurses/doc/html ncurses-intro.html

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

Conflicts:
        share/mk/src.opts.mk (unresolved)
DeltaFile
+15,906-15,332contrib/ncurses/configure
+2,456-1,968contrib/ncurses/misc/terminfo.src
+0-3,390contrib/ncurses/doc/html/ncurses-intro.html
+0-2,282contrib/ncurses/ncurses/win32con/win_driver.c
+853-527contrib/ncurses/aclocal.m4
+639-518contrib/ncurses/announce.html.in
+19,854-24,017710 files not shown
+51,298-38,883716 files

HardenedBSD/src c6245bcsys/modules/iwlwifi Makefile, sys/modules/rtw89 Makefile

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+132-13sys/x86/x86/local_apic.c
+10-3usr.sbin/periodic/etc/daily/460.status-mail-rejects
+9-2usr.sbin/periodic/etc/security/800.loginfail
+9-2usr.sbin/periodic/etc/security/900.tcpwrap
+2-0sys/modules/rtw89/Makefile
+2-0sys/modules/iwlwifi/Makefile
+164-206 files

HardenedBSD/src 8ac6427usr.sbin/periodic/etc/daily 460.status-mail-rejects, usr.sbin/periodic/etc/security 800.loginfail 900.tcpwrap

periodic: Support RFC 5424 syslog timestamps

This is based on an initial implementation by michaelo in
https://reviews.freebsd.org/D54361.

PR:             270497
Reported by:    michaelo
Reviewed by:    michaelo
Tested by:      michaelo
MFC after:      1 week
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D54606
DeltaFile
+10-3usr.sbin/periodic/etc/daily/460.status-mail-rejects
+9-2usr.sbin/periodic/etc/security/800.loginfail
+9-2usr.sbin/periodic/etc/security/900.tcpwrap
+28-73 files

HardenedBSD/src 0f0b833sys/modules/iwlwifi Makefile, sys/modules/rtw89 Makefile

modules: iwlwifi/rtw89 allow standalone build

The KERN_OPTS:MDEV_ACPI checks are fine for as long as we are building
modules along the kernel.  If one wants to just build the module
standalone out of the module directory this would fail.
Add the missing include for kmod.opts.mk (as was done for tcp
in 1319a76179682).

Sponsored by:   The FreeBSD Foundation
Reported by:    Tassilo Philipp (tphilipp potion-studios.com)
Fixes:  f5a77dc8f8df ("improve module Makefile dependency on ACPI")
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D54769
DeltaFile
+2-0sys/modules/iwlwifi/Makefile
+2-0sys/modules/rtw89/Makefile
+4-02 files

HardenedBSD/src 11f954bsys/x86/x86 local_apic.c

x86: mask all LAPIC vectors early, before BSP interrupts are enabled

If APIC is left in somewhat bad state, with some source hot (not masked
and active, e.g. timers after kexec or due to BIOS bug), we get the
interrupt too early.

Reported by:    jmg
Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54543
DeltaFile
+28-0sys/x86/x86/local_apic.c
+28-01 files

HardenedBSD/src 87ed56asys/x86/x86 local_apic.c

x88/local_apic.c: for each lvt element, add LVT register index

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54543
DeltaFile
+12-0sys/x86/x86/local_apic.c
+12-01 files

HardenedBSD/src 4938ee8sys/x86/x86 local_apic.c

x86/local_apic.c: convert lvts[] and elvts[] arrays to designated initializers

Reviewed by:    markj
Tested by:      pho
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D54543
DeltaFile
+92-13sys/x86/x86/local_apic.c
+92-131 files

HardenedBSD/src a17a404sbin/ifconfig af_link.c, share/man/man4 rtnetlink.4 genetlink.4

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+5-2share/man/man4/rtnetlink.4
+1-1sbin/ifconfig/af_link.c
+1-1usr.bin/netstat/sctp.c
+1-0share/man/man4/genetlink.4
+1-0share/man/man4/netlink.4
+9-45 files