FreeBSD/src 0010c4blib/libexecinfo/tests sigtramp_test.c

tests/sigtramp_test: xfail on non-amd64

This test fail until at least https://reviews.llvm.org/D155066 is
rebased and picked up for aarch64 and more work is done for the other
archs.

PR:             289096
Reviewed by:    jlduran
Fixes:          fef84fd8ae845e19cec0f6b9aac0e6451cca3d7a
MFC after:      3 days
DeltaFile
+2-2lib/libexecinfo/tests/sigtramp_test.c
+2-21 files

FreeBSD/src 85b3cf5share/examples/etc make.conf

examples: Update COPTFLAGS in make.conf

We've been using -O2 for about fifteen years.

Reported by:    Jan Stary <hans at stare.cz>
MFC after:      1 week

(cherry picked from commit 2ab18d3286f5e1ea08cd86e234377b673245ec15)
DeltaFile
+1-1share/examples/etc/make.conf
+1-11 files

FreeBSD/src 872c046contrib/openbsm/bin/auditd auditd_fbsd.c auditd.c

auditd: Fix signal handling

Rewrite the main loop to use ppoll() instead of just blocking on read,
blocking the signals we care about when we aren't polling.

I didn't bother replacing alarm() with setitimer(); the alarm code
is dead anyway since there is no way for max_idletime to acquire a
non-zero value.

While here, avoid leaking the pid file and trigger descriptors to the
log child.

PR:             295840
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57451

(cherry picked from commit 5bd78cfc800339fd7f3945498052d67553af9e3c)
DeltaFile
+39-40contrib/openbsm/bin/auditd/auditd_fbsd.c
+40-10contrib/openbsm/bin/auditd/auditd.c
+4-0contrib/openbsm/bin/auditd/audit_warn.c
+3-0contrib/openbsm/bin/auditd/auditd.h
+86-504 files

FreeBSD/src 5ecad82sys/security/audit audit_trigger.c

audit: Add poll / select support

It was previously not possible to poll() or select() on the trigger
device, which made implementing proper signal handling in auditd
difficult.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, markj
Differential Revision:  https://reviews.freebsd.org/D57457

(cherry picked from commit 0620c99d278b6a2fd6fe995f5bb365158e04ad7c)
DeltaFile
+21-2sys/security/audit/audit_trigger.c
+21-21 files

FreeBSD/src 9b30dccsys/security/audit audit_trigger.c

audit: Replace TAILQ with STAILQ

This reduces the size of a trigger entry from 24 bytes to 16 (or from
12 bytes to 8 on 32-bit) with no additional complexity.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D57464

(cherry picked from commit 77e894cb09affe828f4bc81b8e4751a7e22860de)
DeltaFile
+11-11sys/security/audit/audit_trigger.c
+11-111 files

FreeBSD/src 08e0212lib/libc/gen fts.3

fts: Correct description of fts_set

MFC after:      1 week
Sponsored by:   Klara, Inc.
Fixes:  e030e4e73fe7 ("lib/libc/gen/fts.3: use 'options' consistently in fts_set() description")
Differential Revision:  https://reviews.freebsd.org/D57326

(cherry picked from commit 77fdeba18c07e243ea1e20916ee0dc31b9d6ac32)
DeltaFile
+4-3lib/libc/gen/fts.3
+4-31 files

FreeBSD/src 4af6afclib/msun Makefile

libmsun: Fix incorrect MLINK for sincosl(3)

PR:             295704
MFC after:      1 week

(cherry picked from commit fa3f69fa4cabf50d667631b4b8083673bccc874f)
DeltaFile
+1-1lib/msun/Makefile
+1-11 files

FreeBSD/src 1704247. Makefile.inc1

check-old-libs: Show information about packages

If pkg is installed, for each old library found to still be present,
check if any installed packages either provide or require the library,
and inform the user.

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

(cherry picked from commit 8d9dff23f206cb86aed9857a985ed09cd38eb5ac)
DeltaFile
+9-0Makefile.inc1
+9-01 files

FreeBSD/src 03f078dcontrib/openbsm/bin/auditd auditd_fbsd.c auditd.c

auditd: Fix signal handling

Rewrite the main loop to use ppoll() instead of just blocking on read,
blocking the signals we care about when we aren't polling.

I didn't bother replacing alarm() with setitimer(); the alarm code
is dead anyway since there is no way for max_idletime to acquire a
non-zero value.

While here, avoid leaking the pid file and trigger descriptors to the
log child.

PR:             295840
MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans
Differential Revision:  https://reviews.freebsd.org/D57451

(cherry picked from commit 5bd78cfc800339fd7f3945498052d67553af9e3c)
DeltaFile
+39-40contrib/openbsm/bin/auditd/auditd_fbsd.c
+40-10contrib/openbsm/bin/auditd/auditd.c
+4-0contrib/openbsm/bin/auditd/audit_warn.c
+3-0contrib/openbsm/bin/auditd/auditd.h
+86-504 files

FreeBSD/src c1f725bshare/examples/etc make.conf

examples: Update COPTFLAGS in make.conf

We've been using -O2 for about fifteen years.

Reported by:    Jan Stary <hans at stare.cz>
MFC after:      1 week

(cherry picked from commit 2ab18d3286f5e1ea08cd86e234377b673245ec15)
DeltaFile
+1-1share/examples/etc/make.conf
+1-11 files

FreeBSD/src bc5f0ffsys/security/audit audit_trigger.c

audit: Replace TAILQ with STAILQ

This reduces the size of a trigger entry from 24 bytes to 16 (or from
12 bytes to 8 on 32-bit) with no additional complexity.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, emaste
Differential Revision:  https://reviews.freebsd.org/D57464

(cherry picked from commit 77e894cb09affe828f4bc81b8e4751a7e22860de)
DeltaFile
+11-11sys/security/audit/audit_trigger.c
+11-111 files

FreeBSD/src 9cc0ff7sys/security/audit audit_trigger.c

audit: Add poll / select support

It was previously not possible to poll() or select() on the trigger
device, which made implementing proper signal handling in auditd
difficult.

MFC after:      1 week
Sponsored by:   Klara, Inc.
Reviewed by:    kevans, markj
Differential Revision:  https://reviews.freebsd.org/D57457

(cherry picked from commit 0620c99d278b6a2fd6fe995f5bb365158e04ad7c)
DeltaFile
+21-2sys/security/audit/audit_trigger.c
+21-21 files

FreeBSD/src b18a662lib/libc/gen fts.3

fts: Correct description of fts_set

MFC after:      1 week
Sponsored by:   Klara, Inc.
Fixes:  e030e4e73fe7 ("lib/libc/gen/fts.3: use 'options' consistently in fts_set() description")
Differential Revision:  https://reviews.freebsd.org/D57326

(cherry picked from commit 77fdeba18c07e243ea1e20916ee0dc31b9d6ac32)
DeltaFile
+4-3lib/libc/gen/fts.3
+4-31 files

FreeBSD/src d6b1b77. Makefile.inc1

check-old-libs: Show information about packages

If pkg is installed, for each old library found to still be present,
check if any installed packages either provide or require the library,
and inform the user.

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

(cherry picked from commit 8d9dff23f206cb86aed9857a985ed09cd38eb5ac)
DeltaFile
+9-0Makefile.inc1
+9-01 files

FreeBSD/src f8d59d3lib/msun Makefile

libmsun: Fix incorrect MLINK for sincosl(3)

PR:             295704
MFC after:      1 week

(cherry picked from commit fa3f69fa4cabf50d667631b4b8083673bccc874f)
DeltaFile
+1-1lib/msun/Makefile
+1-11 files

FreeBSD/src a641aa1stand/man loader.efi.8

loader.efi.8: hw.uart.console is explained in uart

PR:             295944
MFC to:         15
MFC after:      3 days
DeltaFile
+2-3stand/man/loader.efi.8
+2-31 files

FreeBSD/src e821152bin/ln symlink.7

symlink.7: Clean up markup and tag SPDX

Also unwind some parentheticals.

MFC after:      3 days
DeltaFile
+49-43bin/ln/symlink.7
+49-431 files

FreeBSD/src cd0a101packages Makefile

packages: Fix building packages when WITHOUT_BLOCKLIST is set

Reviewed by:    emaste
MFC after:      1 week
Sponsored by:   Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D57601
DeltaFile
+2-1packages/Makefile
+2-11 files

FreeBSD/src 3f386easys/conf files.arm64, sys/modules/vmm Makefile

vmm/arm64: Compile vmm_nvhe.c without SSP

This file implements a set of EL2 hypercall handlers and is used to
switch between guests and the host kernel when VHE is not in use.  There
is no SSP runtime available there.

Reported by:    Jenkins
Fixes:          8deebce931fa ("kernel: Enable -fstack-protector-strong by default")

(cherry picked from commit bed77cf7c213c3f93a0dc099e4b46c078495a328)
DeltaFile
+1-1sys/conf/files.arm64
+1-1sys/modules/vmm/Makefile
+2-22 files

FreeBSD/src 6bef2a0sys/sys elf_common.h

elf_common.h: Add SHT_LLVM_ADDRSIG

Reported by:    bz
Sponsored by:   The FreeBSD Foundation

(cherry picked from commit 22c054c4cce719662d503685138433eb27d40001)
(cherry picked from commit 115256f288dcfcb09e11fe08485b01cc9609ead9)
DeltaFile
+1-0sys/sys/elf_common.h
+1-01 files

FreeBSD/src def7daesys/net if_stf.c

if_stf: Free entire mbuf chain on failure

Reported by:     Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai
Reviewed by:    markj, bz, kp
Sponsored by:   The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D57476

(cherry picked from commit 5a7f41e94b6d47e60e5d76dfb3a61ee2746700ca)
DeltaFile
+2-2sys/net/if_stf.c
+2-21 files

FreeBSD/src 874316blib/libc/iconv iconv.3

iconv.3: Fix formatting of the error section

MFC after:      1 week

(cherry picked from commit c491c2db2f37399eba7a356c4bfa298d64012101)
DeltaFile
+1-0lib/libc/iconv/iconv.3
+1-01 files

FreeBSD/src 3cf9ba0sys/netinet/libalias alias_db.c

libalias: Serialize updates to the global instance list

libalias maintains a global list of all libalias handles.  The list was
updated without any locking, but nothing prevents updates from running
concurrently.

MFC after:      1 week

(cherry picked from commit 2ff705f32a2033201a8f83f1ade5ddbc0460387d)
DeltaFile
+17-0sys/netinet/libalias/alias_db.c
+17-01 files

FreeBSD/src 7dc01desys/conf kern.mk

kernel: Enable -fstack-protector-strong by default

This extends stack canary use to all functions which define arrays on
the stack, not just those which operate on byte buffers.  This option
would have made it harder to exploit SA-26:18.setcred and
SA-26:08.rpcsec_gss.

The change bloats the amd64 kernel text by about 350KB and increases the
number of covered functions from ~1500 to ~9000 (within the kernel
itself, i.e., not counting kernel modules).

Reviewed by:    olce, olivier, emaste
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56870

(cherry picked from commit 8deebce931fa9b469cf28a082038a64caf972602)
DeltaFile
+1-1sys/conf/kern.mk
+1-11 files

FreeBSD/src 8da837bsys/net if.c if_private.h

net: Fix handling of unmapped user pages in if_getgroup()

We cannot call copyout() while in a net epoch section, unless the user
memory is wired.  Use the global ifnet lock to synchronize the accesses
instead.

Reported by:    emaste
Reviewed by:    zlei
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57154

(cherry picked from commit 68004e56fdc22c11b4ec680e83309b4ea2bfe13a)
DeltaFile
+23-33sys/net/if.c
+1-1sys/net/if_private.h
+24-342 files

FreeBSD/src 1cea6bfsys/x86/x86 ucode.c

ucode: ucode_error can be defined with static

MFC after:      1 week

(cherry picked from commit 96256587b06cfcdbeb1789145f5e427831b3d732)
DeltaFile
+1-1sys/x86/x86/ucode.c
+1-11 files

FreeBSD/src cb64a09tests/sys/kern procdesc.c Makefile

tests/procdesc: Use a more efficient mechanism to block

Reviewed by:    kib
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D57149

(cherry picked from commit c9546bb61910d40f4cb0dfb9716ba6eba44d1a0d)
DeltaFile
+37-4tests/sys/kern/procdesc.c
+1-1tests/sys/kern/Makefile
+38-52 files

FreeBSD/src c511c9esys/net if_lagg.c

lagg: Handle a port count of zero

The sc_count check in lagg_transmit_ethernet() and
lagg_transmit_infiniband() is racy, as the lagg protocol handlers are
only synchronized by net_epoch.  Handle a count of 0 in each protocol
handler where it's needed, namely in the RR and LB handlers.

Reported by:    Yuxiang Yang, Yizhou Zhao, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM5.1 from Z.ai
Reviewed by:    pouria, zlei
MFC after:      2 weeks
Differential Revision:  https://reviews.freebsd.org/D56942

(cherry picked from commit 49d90d9ddfc1ecda9ad9b6cb5565e5fbdcc14964)
DeltaFile
+23-17sys/net/if_lagg.c
+23-171 files

FreeBSD/src 192c2a8sys/i386/linux linux_ptrace_machdep.c

linux: Drop unneeded PHOLDs

There's no point in acquiring a hold if the proc lock isn't going to be
dropped.

Reviewed by:    kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57468

(cherry picked from commit 2404d8d741f281e445233f86b0734d6dcf02c173)
DeltaFile
+0-4sys/i386/linux/linux_ptrace_machdep.c
+0-41 files

FreeBSD/src 2a1eaafsys/x86/x86 ucode.c

ucode: Fix validation on Intel platforms

The check for the extended signature table was backwards, so we always
ignored it.

We should verify that the extended signature table fits within the total
image size.

Reviewed by:    jrm, kib
MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57209

(cherry picked from commit 0beb172898499fff51eed4df3d9284cd1094afbb)
DeltaFile
+24-8sys/x86/x86/ucode.c
+24-81 files