HardenedBSD/src e2663c4sbin/pfctl parse.y, sbin/pfctl/tests/files pf1076.in pf1077.ok

Merge remote-tracking branch 'origin/hardened/current/master' into hardened/current/cross-dso-cfi
DeltaFile
+11-11share/man/man5/pf.conf.5
+3-3tests/sys/netpfil/pf/limiters.sh
+1-1sbin/pfctl/parse.y
+2-0sys/netpfil/pf/pf.h
+1-1sbin/pfctl/tests/files/pf1076.in
+1-1sbin/pfctl/tests/files/pf1077.ok
+19-172 files not shown
+21-188 files

HardenedBSD/src 4bd6f93sbin/pfctl parse.y, sbin/pfctl/tests/files pf1077.ok pf1076.in

Merge branch 'freebsd/current/main' into hardened/current/master
DeltaFile
+11-11share/man/man5/pf.conf.5
+3-3tests/sys/netpfil/pf/limiters.sh
+1-1sbin/pfctl/tests/files/pf1077.ok
+1-1sbin/pfctl/parse.y
+1-1sbin/pfctl/tests/files/pf1076.in
+2-0sys/netpfil/pf/pf.h
+19-171 files not shown
+19-187 files

HardenedBSD/src a447896usr.bin/sockstat main.c

Merge branch 'freebsd/15-stable/main' into hardened/15-stable/main
DeltaFile
+4-4usr.bin/sockstat/main.c
+4-41 files

HardenedBSD/src f51bc79usr.bin/sockstat main.c

sockstat: improve formataddr() according to style(9)

Reviewed by:    des
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D54412

(cherry picked from commit f89f7e58ba1d54c6a683e3cc899938895496c088)
DeltaFile
+4-4usr.bin/sockstat/main.c
+4-41 files

HardenedBSD/src 2e0e45asbin/pfctl parse.y, sbin/pfctl/tests/files pf1077.ok pf1076.in

pfctl(8): change default limiter action from no-match to block

pf(4) users who use limiters in current should update the rules
accordingly to reflect the change in default behavior. The existing
rule which reads as follows:

    pass in from any to any state limiter test

needs to be changed to:

    pass in from any to any state limiter test (no-match)

OK dlg@

Obtained from:  OpenBSD, sashan <sashan at openbsd.org>, c600931321
Sponsored by:   Rubicon Communications, LLC ("Netgate")
DeltaFile
+11-11share/man/man5/pf.conf.5
+3-3tests/sys/netpfil/pf/limiters.sh
+1-1sbin/pfctl/tests/files/pf1077.ok
+1-1sbin/pfctl/parse.y
+1-1sbin/pfctl/tests/files/pf1076.in
+2-0sys/netpfil/pf/pf.h
+19-176 files

HardenedBSD/src 68a449fsys/modules/sctp Makefile

sctp: improve compilation as module

When compiling SCTP as a module, don't compile sctp_crc32.c into
the module. This avoids code and variable duplication since
sctp_crc32.c is compiled into the kernel. In particular, the variable
system_base_info is not duplicated. This fixes the handling of the
statistic counters sctps_sendhwcrc and sctps_sendswcrc when using
sctp_delayed_cksum.

MFC after:      3 days
DeltaFile
+0-1sys/modules/sctp/Makefile
+0-11 files

HardenedBSD/src 103903esys/amd64/conf HARDENEDBSD-CORE

HBSD: Disable WITNESS' checking of vnode locks

FreeBSD relatively recently changed how vnode locking works in the
kernel. There are a few places that still need to be updated.
HardenedBSD's use of filesystem extended attributes seems to trip
WITNESS vnode lock checking when ZFS is used. This causes a kernel
panic, which is more likely to be triggered during a package build.

So, for now, let's disable the vnode lock checks. I plan to revisit this
when I have more available time.

Signed-off-by:  Shawn Webb <shawn.webb at hardenedbsd.org>
DeltaFile
+2-0sys/amd64/conf/HARDENEDBSD-CORE
+2-01 files

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