FreeBSD/src dd9fac5sys/dev/firewire if_fwe.c if_fwip.c

firewire: remove SPL calls

SPL is a no-op on amd64. Real locking is already handled by fc_mtx and
per-driver mutexes.

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D58210
DeltaFile
+2-21sys/dev/firewire/if_fwe.c
+2-20sys/dev/firewire/if_fwip.c
+2-19sys/dev/firewire/firewire.c
+4-16sys/dev/firewire/fwohci.c
+3-13sys/dev/firewire/fwdev.c
+1-9sys/dev/firewire/sbp_targ.c
+14-982 files not shown
+14-1078 files

FreeBSD/src 2b9ed8dshare/man/man4 fwdv.4, sys/dev/firewire fwdv.c

fwdv: match unit directories instead of IDENTIFY

Migrated fwdv to use per-unit-directory child device

Reviewed by:    adrian
Differential Revision:  https://reviews.freebsd.org/D58204
DeltaFile
+26-87sys/dev/firewire/fwdv.c
+9-5share/man/man4/fwdv.4
+35-922 files

FreeBSD/src c402d2eshare/man/man4 fwisound.4, sys/dev/firewire fwisound.c

fwisound: match unit directories instead of IDENTIFY

Migrated fwisound to use per-unit-directory child device

Differential Revision:  https://reviews.freebsd.org/D58203
Reviewed by:    adrian
DeltaFile
+50-116sys/dev/firewire/fwisound.c
+3-2share/man/man4/fwisound.4
+53-1182 files

FreeBSD/src 58bd896share/man/man4 fwcam.4, sys/dev/firewire fwcam.c fwcam.h

fwcam: match unit directories, defer probe to first open

Migrated fwcam to use per-unit-directory child device

Differential Revision:  https://reviews.freebsd.org/D58202
Reviewed by:    adrian
DeltaFile
+98-102sys/dev/firewire/fwcam.c
+15-2share/man/man4/fwcam.4
+5-3sys/dev/firewire/fwcam.h
+118-1073 files

FreeBSD/src 2114347share/man/man4 firewire.4, sys/dev/firewire firewire.c firewirereg.h

firewire: per-unit-directory child device support

Added structure to allow multiple device to attach to the same driver.
Also removed the deprecation warning from the man page.

Differential Revision:  https://reviews.freebsd.org/D58201
Reviewed by:    adrian
DeltaFile
+213-16sys/dev/firewire/firewire.c
+53-0sys/dev/firewire/firewirereg.h
+25-1share/man/man4/firewire.4
+6-4sys/dev/firewire/if_fwip.c
+6-4sys/dev/firewire/if_fwe.c
+6-4sys/dev/firewire/sbp_targ.c
+309-291 files not shown
+313-307 files

FreeBSD/src 9da8f0esys/kern sys_generic.c

kern: fix compilation

uintptr64_t -> uint64ptr_t

Fixes:  5cafd6213f145 (exterr_set: sync the definition with the header declaration)
DeltaFile
+2-2sys/kern/sys_generic.c
+2-21 files

FreeBSD/src 993fbb6crypto/openssl/crypto/bn bn_const.c

Remove fips-module related diff

This particular change didn't come from upstream. It was added locally
in 7a991ecd1 when attempting to enable the fips provider with 3.0.

Given the fact that we no longer build the fips provider and the fips
provider build process (including sources) is very prescribed to
specific build steps and source versions, there's no reason why we need
to continue carrying around this diff anymore.

MFC after:      1 week
Signed-off-by: Enji Cooper <ngie at FreeBSD.org>
(cherry picked from commit d6e3662bc1f5054d81b1ceab641396047c2cad94)
DeltaFile
+0-2crypto/openssl/crypto/bn/bn_const.c
+0-21 files

FreeBSD/src 8a33b1dcrypto/openssl/apps openssl.cnf

Remove `$FreeBSD$` from upstream-provided config file

This diff reduces with the content provided by upstream (OpenSSL).

MFC after:      1 week

(cherry picked from commit 2de6d07e16aa4d902b7b322a869f89a07348e851)
DeltaFile
+0-1crypto/openssl/apps/openssl.cnf
+0-11 files

FreeBSD/src 0b5f2b4crypto/openssl/apps openssl.cnf

Remove `$FreeBSD$` from upstream-provided config file

This diff reduces with the content provided by upstream (OpenSSL).

MFC after:      1 week

(cherry picked from commit 2de6d07e16aa4d902b7b322a869f89a07348e851)
DeltaFile
+0-1crypto/openssl/apps/openssl.cnf
+0-11 files

FreeBSD/src 5cafd62sys/kern sys_generic.c

exterr_set: sync the definition with the header declaration

This unbreaks buildkernel with TARGET=armv7 (32-bit arm). More work may be required
in order to unbreak `exterr_set` with 32-bit kernels.

Fixes:  844009378da9 ("exterr: allow exterr to fit pointers on CHERI targets")
DeltaFile
+2-2sys/kern/sys_generic.c
+2-21 files

FreeBSD/src 77a201busr.bin/ministat ministat.c

ministat: parse comma used as decimal delimiter

This allows to use output of '/usr/bin/time -ao foo' as direct input to
ministat(1).

While here make diagnostic message more verbose.
DeltaFile
+5-3usr.bin/ministat/ministat.c
+5-31 files

FreeBSD/src 56ac335sys/kern subr_witness.c

witness: fix operation without WITNESS_SKIPSPIN

Since malloc(9) even with M_NOWAIT is forbidden when we hold a spinlock,
we can't print detailed lock tree as the operation tries to allocate
memory.

Fixes:  fb4b0c91195195561560bb2fb2c1ba8da81f7ccf
DeltaFile
+2-1sys/kern/subr_witness.c
+2-11 files

FreeBSD/src f5f2964sys/kern kern_exec.c

kern_execve.c: simplify execve_block_wait()

(cherry picked from commit 8a365723923e4eadad962d9c7e8162dfbfe3e78c)
DeltaFile
+2-8sys/kern/kern_exec.c
+2-81 files

FreeBSD/src f967dd0lib/libsys ptrace.2

ptrace.2: Document PT_SET_SC_RET

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58247
DeltaFile
+20-0lib/libsys/ptrace.2
+20-01 files

FreeBSD/src fd5faa5sys/compat/freebsd32 freebsd32_misc.c, sys/kern sys_process.c subr_syscall.c

ptrace(2): PT_SET_SC_RET request

Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58247
DeltaFile
+24-0sys/kern/sys_process.c
+19-0sys/compat/freebsd32/freebsd32_misc.c
+8-4sys/kern/subr_syscall.c
+2-1sys/sys/ptrace.h
+1-0sys/sys/proc.h
+54-55 files

FreeBSD/src f2e6a8blib/libproc Makefile, share/mk src.libnames.mk

libproc: link against libctf if MK_CTF != no instead of MK_CDDL != no

Logic prior to this change would incorrectly try linking when MK_CDDL != no,
instead of MK_CTF != no, which could result in the library and the tests being
broken if/when MK_CTF == no and MK_CDDL != no (an uncommon, but possible
combination with today's build knobs).

This change updates the conditional to correctly track the value of MK_CTF, which
in turn is properly toggled to no if/when MK_CDDL == no as it's a dependent build
knob.

This [niche] build bug has been present in FreeBSD since 2014.

MFC after:      1 week
DeltaFile
+1-1lib/libproc/Makefile
+1-1share/mk/src.libnames.mk
+2-22 files

FreeBSD/src 33175a5. ObsoleteFiles.inc

Add a few missed files to ObsoleteFiles.inc

There were still some left-over files under usr/tests/gnu/usr.bin/diff,
causing the directory to not be fully removed. Add these to OLD_FILES.

Fixes:          134a4c78d070
(cherry picked from commit f72cfefae99befe47fefc4683cd6957edaaf0e86)
DeltaFile
+9-0ObsoleteFiles.inc
+9-01 files

FreeBSD/src 2e089a8. ObsoleteFiles.inc

Add a few missed files to ObsoleteFiles.inc

There were still some left-over files under usr/tests/gnu/usr.bin/diff,
causing the directory to not be fully removed. Add these to OLD_FILES.

Fixes:          134a4c78d070
(cherry picked from commit f72cfefae99befe47fefc4683cd6957edaaf0e86)
DeltaFile
+9-0ObsoleteFiles.inc
+9-01 files

FreeBSD/src 74bcb11sys/dev/ena ena.c ena_datapath.c

ena: Fix false 'missing TX completions' warnings due to timestamp race

Sporadic 'Found a Tx that wasn't completed on time' warnings appear
under sustained TX load, always reporting '1 msecs since last cleanup'
despite the 5-second timeout threshold.

The per-packet TX timestamp uses struct bintime (128 bits: two 64-bit
fields sec and frac) which is read and written non-atomically. A race
exists between the missing TX completion check
(check_missing_comp_in_tx_queue reading the timestamp) and the TX
submit path or cleanup path writing it on another CPU. Since the two
fields are not updated atomically, the check can observe a partially
written timestamp - one field from the old value and one from the new.
This can produce a timestamp with {sec=0, frac=valid}, causing the
check to compute a time offset equal to system uptime and falsely
exceeding the 5-second timeout.

Confirmed by instrumentation showing all occurrences had sec=0 with
valid frac/mbuf, cleanup_running=0, and ticks==last_cleanup_ticks.

    [22 lines not shown]
DeltaFile
+7-6sys/dev/ena/ena.c
+2-2sys/dev/ena/ena_datapath.c
+1-1sys/dev/ena/ena.h
+10-93 files

FreeBSD/src 3ba01cbsys/dev/ena ena_datapath.c

ena: Batch RX statistics updates

Move per-packet counter_enter/counter_exit pairs out of the RX
processing loop and batch them into a single update after the
loop completes.

Previously, each received packet triggered two separate
counter_enter/counter_exit blocks -- one for bytes and one for
packet count. This commit accumulates totals in local variables
and updates all four counters (ring and hw stats for both packets
and bytes) in a single counter_enter/counter_exit block after the
loop.

Also move the stats update to after the refill and LRO flush
so that the error path (goto update_stats) and the normal path
converge at the same label, avoiding code duplication.

Submitted by: David Arinzon <darinzon at amazon.com>
MFC after: 2 weeks

    [3 lines not shown]
DeltaFile
+12-11sys/dev/ena/ena_datapath.c
+12-111 files

FreeBSD/src 605e699sys/dev/ena ena.h

ena: Update driver version to v2.8.4

Bug Fixes:
* Fix false 'missing TX completions' warnings due to timestamp race
* Put taskqueues into correct NUMA domain if !RSS

Minor Changes:
* Batch RX statistics updates
* Swap RX/TX completions cleanup order

Submitted by: Arthur Kiyanovski <akiyano at amazon.com>
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D58242
DeltaFile
+1-1sys/dev/ena/ena.h
+1-11 files

FreeBSD/src f08def9sys/dev/ena ena_datapath.c

ena: Swap cleanup order

As RX processing is heavier than TX completions processing, swap the
order and process TX completions first, in order to avoid starving the
completions and causing potential missing TX completions.

Submitted by: Ofir Tabachnik <ofirt at amazon.com>
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Reviewed by: cperciva
Differential Revision: https://reviews.freebsd.org/D58239
DeltaFile
+1-1sys/dev/ena/ena_datapath.c
+1-11 files

FreeBSD/src c985e25lib/libc/stdlib memory.3, lib/libc/stdlib/malloc free_sized.3 free_aligned_sized.c

libc: Add free_sized() and free_aligned_sized() as per C23

Add C23 sized deallocation entry points as thin wrappers around free(3).
Implementations may ignore size and alignment hints, so behaviour stays
correct for existing allocations without validating caller metadata yet.

When jemalloc is updated to 5.3.1, rewire these to je_free_sized() and
je_free_aligned_sized() so deallocation can use the allocator's sized
deallocation (free_sized for fast paths and free_aligned_sized for
correct aligned hints.)

Please note this change satisfies the standard interface only. Both
functions should be delegated to jemalloc after the upgrade so callers
get the intended allocator behaviour; until then, hints are unused and
neither sized nor aligned-sized deallocation optimizations apply.

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Reviewed by:    fuz
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2201

    [3 lines not shown]
DeltaFile
+100-0lib/libc/stdlib/malloc/free_sized.3
+21-0lib/libc/stdlib/malloc/free_aligned_sized.c
+20-0lib/libc/stdlib/malloc/free_sized.c
+16-1lib/libc/stdlib/memory.3
+9-0lib/libc/stdlib/malloc/Makefile.inc
+7-0lib/libc/stdlib/malloc/Symbol.map
+173-11 files not shown
+175-17 files

FreeBSD/src 13ba63ainclude stdalign.h

libc: Suppress <stdalign.h> content for C23 and later

C23 deprecates <stdalign.h> and specifies that the header shall
provide no content (§7.15.1).

Signed-off-by:  Faraz Vahedi <kfv at kfv.io>
Pull Request:   https://github.com/freebsd/freebsd-src/pull/2223
MFC after:      1 month
Reviewed by:    imp, fuz

(cherry picked from commit 694baf88c2ae5957fdb24ed163993109987e1ef9)
DeltaFile
+4-0include/stdalign.h
+4-01 files

FreeBSD/src fc186c2libexec/rc/rc.d dumpon

rc.d/dumpon: minor hardening/tightening up

- Scope local variables properly to each function.
- Quote variables that should be treated as single words.
- Replace `${cmd}; if [ $? -eq 0 ]` with `if ${cmd}` for simplicity.

MFC after:      1 week
Differential Revision:  https://reviews.freebsd.org/D57899
DeltaFile
+8-5libexec/rc/rc.d/dumpon
+8-51 files

FreeBSD/src a2f50c4sys/amd64/amd64 efirt_machdep.c

amd64 efirt: register all runtime regions as fictitious

This is needed for VM_PHYS_TO_PAGE() to work, which is needed for
pmap_map_io_transient() to work, which is needed for uiomove_fromphys()
to work.

PR:     296348
Reported and tested by: Anton Saietskii <vsasjason at gmail.com>
Reviewed by:    markj
Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Differential revision:  https://reviews.freebsd.org/D58274
DeltaFile
+3-0sys/amd64/amd64/efirt_machdep.c
+3-01 files

FreeBSD/src 7c22ddasys/netinet icmp6.h, sys/netinet6 in6_var.h nd6.h

nd6: Add router address and DHCPv6-PD flags in PIO headers

Make R-bit per RFC 6275 8.3 and P-bit per RFC 9762 7.1 in
Prefix Information option available to userland for future implementations.

RFC 9762 7.1: For each interface, the client MUST keep a list of every prefix
that was received from a PIO with the P flag set and currently has a non-zero
preferred lifetime.

Differential Revision: https://reviews.freebsd.org/D56207
DeltaFile
+4-2sys/netinet/icmp6.h
+5-1sys/netinet6/in6_var.h
+1-0sys/netinet6/nd6.h
+10-33 files

FreeBSD/src e188442sys/kern sys_procdesc.c

fget_procdesc(): change error for non-procdesc type from EBADF to EINVAL

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/kern/sys_procdesc.c
+1-11 files

FreeBSD/src 664ad9asys/dev/acpica acpi_cpu.c

acpi_cpu(4): Call ACPI_GET_FEATURES() on a reset 'features' variable

This is to prevent child drivers from using the features returned by
previous drivers (in an arbitrary order).  None of the existing ones do
that, so this is purely defensive.

MFC after:      2 weeks
Sponsored by:   The FreeBSD Foundation
DeltaFile
+2-1sys/dev/acpica/acpi_cpu.c
+2-11 files

FreeBSD/src fed4979sys/kern sys_process.c

kern/sys_process.c: remove extra ()

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
DeltaFile
+1-1sys/kern/sys_process.c
+1-11 files