FreeBSD/src 8993d78usr.bin/expand expand.1

expand.1: Fix markup for the '-t' option

When viewing the manpage the '-t' option is shown as follows

    -t -Sm tab1, tab2, ..., tabn Sm

with the markup '\&Sm' included within '.It Fl t', which doesn't
makes any sense.

So just remove it.

PR:     274897
MFC after:      3 days
DeltaFile
+1-1usr.bin/expand/expand.1
+1-11 files

FreeBSD/src 170d088usr.sbin/adduser adduser.sh

adduser: Overhaul.

Most importantly:

* Make local variables local.
* Use `$()` instead of backticks.
* Avoid unsafe use of `-a` and `-o` operators in `test` expressions.
* Remove a hack intended to ease the transition from Perl 22 years ago.

MFC after:      1 week
Reviewed by:    allanjude
Differential Revision:  https://reviews.freebsd.org/D44863
DeltaFile
+93-132usr.sbin/adduser/adduser.sh
+93-1321 files

FreeBSD/src f221df6sbin/ldconfig elfhints.c

ldconfig: use little-endian hints file on all architectures

Remove the test for building on a big-endian architecture, which
preserved the previous default of creating the ELF hints file in
native byte-order of the respective architecture.

Support for little-endian hints files has been added to the
run-time linker and the pkg command.

This is a step towards architecture independent little-endian hints
files, but support for big-endian hints files shall only be removed
from the run-time linker (and ldconfig and pkg) when the last release
that defaulted to hints files in host-byte has been declared EOL.

Reviewed by:    kib
Tested by:      tuexen
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D44734
DeltaFile
+3-3sbin/ldconfig/elfhints.c
+3-31 files

FreeBSD/src 6b13e4csbin/ldconfig elfhints.c

ldconfig: small optimization

Swap which side of a comparison is byte-swapped by be32toh()
on little-endian architectures.

The be32toh() macro just returns the operand and big-endian
architectures and returns it byte-swapped on little-endian
architectures.

When operating on a constant argument, the compiler can perform
the swap operation at build time instead of swapping the data
read from the hints file at run time.

Reviewed by:    kib
Tested by:      tuexen
MFC after:      3 days
Differential Revision:  https://reviews.freebsd.org/D44734
DeltaFile
+1-1sbin/ldconfig/elfhints.c
+1-11 files

FreeBSD/src 7929371sys/dev/sound/pci/hda hdac.c hdac.h

snd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs

This is based off the Linux file sound/hda/intel-dsp-config.c.

Tested on:              Lenovo Thinkbook 16 G6+ IMH
MFC after:              3 days
Reviewed by:            markj, christos
Differential Revision:  https://reviews.freebsd.org/D44777
Sponsored by:           Postgres Professional

(cherry picked from commit 1dd1a696c58fb275aa0e01666d57861eeb51878d)
DeltaFile
+4-0sys/dev/sound/pci/hda/hdac.c
+4-0sys/dev/sound/pci/hda/hdac.h
+8-02 files

FreeBSD/src e7a1904sys/dev/sound/pci/hda hdacc.c

snd_hda: fix "duplicated free" on module unloading

This is trivial fix of hdacc_detach to avoid duplicated free on snd_hda
unloading.

The first try of detaching (kldunload) may results into "device busy" error,
but codec->fgs is freed by detach. Second try attempts to free codec->fgs again
and system panicks.

Here is example:

pcm0: unregister: channel pcm0:virtual:dsp0.vp0 busy (pid 3428)
pulseaudio[3428] [oss] module-oss.c: DSP shutdown.
pcm0: detached
hdaa0: detached
panic: Duplicate free of 0xfffff80412ee7d20 from zone 0xfffffe006bc0ba00
(malloc-32) slab 0xfffff80412ee7fc8(105)
cpuid = 6
time = 1712999565

    [24 lines not shown]
DeltaFile
+3-2sys/dev/sound/pci/hda/hdacc.c
+3-21 files

FreeBSD/src 178cf4bsys/arm/arm gic.c

arm: Fix a typo in a KASSERT message

- s/resoure/resource/

MFC after:      5 days
DeltaFile
+1-1sys/arm/arm/gic.c
+1-11 files

FreeBSD/src 2a66844sys/dev/sound/pci/hda hdacc.c

snd_hda: fix "duplicated free" on module unloading

This is trivial fix of hdacc_detach to avoid duplicated free on snd_hda
unloading.

The first try of detaching (kldunload) may results into "device busy" error,
but codec->fgs is freed by detach. Second try attempts to free codec->fgs again
and system panicks.

Here is example:

pcm0: unregister: channel pcm0:virtual:dsp0.vp0 busy (pid 3428)
pulseaudio[3428] [oss] module-oss.c: DSP shutdown.
pcm0: detached
hdaa0: detached
panic: Duplicate free of 0xfffff80412ee7d20 from zone 0xfffffe006bc0ba00
(malloc-32) slab 0xfffff80412ee7fc8(105)
cpuid = 6
time = 1712999565

    [24 lines not shown]
DeltaFile
+3-2sys/dev/sound/pci/hda/hdacc.c
+3-21 files

FreeBSD/src 0a902d7sys/dev/sound/pci/hda hdac.c hdac.h

snd_hda: Add the full Intel Meteor/Arrow/Lunar Lake HD Audio PCI IDs

This is based off the Linux file sound/hda/intel-dsp-config.c.

Tested on:              Lenovo Thinkbook 16 G6+ IMH
MFC after:              3 days
Reviewed by:            markj, christos
Differential Revision:  https://reviews.freebsd.org/D44777
Sponsored by:           Postgres Professional

(cherry picked from commit 1dd1a696c58fb275aa0e01666d57861eeb51878d)
DeltaFile
+4-0sys/dev/sound/pci/hda/hdac.c
+4-0sys/dev/sound/pci/hda/hdac.h
+8-02 files

FreeBSD/src 788987esys/dev/acpica acpi_battery.c

acpi_battery: avoid divide-by-zero when no devices have capacity info

On laptops with builtin batteries, disconnecting the battery may show up
as a battery without any capacity information. (The theory is that one
is disconnecting the cells but the electronics identifying the battery
are still connected.) As a result, the loop over all batteries in
acpi_battery_get_battinfo results in total_lfcap == 0.

So, just check that total_lfcap is non-zero to avoid a division by zero
(triggerable by sysctl hw.acpi.battery).

Reported by:    Stefano Marinelli
Tested by:      Stefano Marinelli
Reviewed by:    emaste
Differential Revision: https://reviews.freebsd.org/D44818

(cherry picked from commit 2e850b832f5d2adb9b230d191277d67c00caaab9)
DeltaFile
+8-1sys/dev/acpica/acpi_battery.c
+8-11 files

FreeBSD/src 7a2c259sys/conf newvers.sh, usr.bin/yacc config.h

14.1: update stable/14 to -PRERELEASE

This marks the start of the FreeBSD 14.1 release cycle; the stable/14
tree is now in "code slush".

Developers are encouraged to prioritize fixing bugs (and/or merging bug
fixes from HEAD) over new features at this time.  Commit approval from
re@ is not required but if new features introduce problems they may be
removed from the release.

Approved by:    re (implicit)
DeltaFile
+2-2sys/conf/newvers.sh
+1-1usr.bin/yacc/config.h
+3-32 files

FreeBSD/src e411b22sys/kern uipc_shm.c

uipc_shm: Fix a free() of an uninitialized variable

Reported by:    Coverity
CID:            1544043
Fixes:          b112232e4fb9 ("uipc_shm: Copyin userpath for ktrace(2)")
DeltaFile
+2-0sys/kern/uipc_shm.c
+2-01 files

FreeBSD/src 9e54973sys/dev/ice if_ice_iflib.c virtchnl_inline_ipsec.h

ice(4): Update to 1.39.13-k

- Adds mirror interface functionality
- Remove unused virtchnl headers

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

MFC-with:       768329961dc0c041f7647f1c4549944a2ca168aa
MFC after:      3 days
Sponsored by:   Intel Corporation
Tested by:      jeffrey.e.pieper at intel.com
Differential Revision:  https://reviews.freebsd.org/D44004
DeltaFile
+1,251-15sys/dev/ice/if_ice_iflib.c
+0-594sys/dev/ice/virtchnl_inline_ipsec.h
+321-39sys/dev/ice/ice_lib.c
+322-30sys/dev/ice/ice_iflib_txrx.c
+35-36sys/dev/ice/ice_flow.c
+30-13sys/dev/ice/ice_common.c
+1,959-72721 files not shown
+2,134-78427 files

FreeBSD/src 015f8ccsys/dev/ice ice_adminq_cmd.h ice_alloc.h

ice(4): Update copyright year to 2024

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

MFC after:      3 days
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D44003
DeltaFile
+1-1sys/dev/ice/ice_adminq_cmd.h
+1-1sys/dev/ice/ice_alloc.h
+1-1sys/dev/ice/ice_bitops.h
+1-1sys/dev/ice/ice_common.c
+1-1sys/dev/ice/ice_common.h
+1-1sys/dev/ice/ice_common_sysctls.h
+6-652 files not shown
+58-5858 files

FreeBSD/src ed34a6bsys/net iflib.c iflib.h

iflib: Add subinterface interrupt allocation function

The ice(4) driver will add the ability to create extra interfaces
that hang off of the base interface; to do that the driver requires
a method for the subinterface to request hardware interrupt resources
from the base interface.

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

MFC after:      3 days
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D39930
DeltaFile
+77-2sys/net/iflib.c
+12-0sys/net/iflib.h
+89-22 files

FreeBSD/src 3c7da27sys/net iflib.c iflib.h

iflib: Add sysctl to request extra MSIX vectors on driver load

Intended to be used with upcoming feature to add sub-interfaces, since
those new interfaces will be dynamically created and will need to have
spare MSI-X interrupts already allocated for them on driver load.

This sysctl is marked as a tunable since it will need to be set before
the driver is loaded since MSI-X interrupt allocation and setup is
done during the attach process.

Signed-off-by: Eric Joyner <erj at FreeBSD.org>

MFC after:      3 days
Sponsored by:   Intel Corporation
Differential Revision:  https://reviews.freebsd.org/D41326
DeltaFile
+14-0sys/net/iflib.c
+1-0sys/net/iflib.h
+15-02 files

FreeBSD/src f697b9dshare/mk sys.dirdeps.mk

Update sys.dirdeps.mk set default DEP_*

Even at level 0 it is handy to default DEP_*
used by Makefile.depend* to aid the first include if
in a leaf dir.

Reviewed by: stevek
DeltaFile
+7-8share/mk/sys.dirdeps.mk
+7-81 files

FreeBSD/src 1b82d42sys/dev/sound/pcm sound.h

sound: Remove obsolete DV_F_* flags

The ISA sound drivers that used them are retired.

Last reference of DV_F_DRQ_MASK and DV_F_DUAL_DMA:
716924cb4832ea0a440daf09913a06f3166f243e ("Retire snd_sbc ISA sound card
driver")

Last reference of DV_F_DEV_MASK and DV_F_DEV_SHIFT:
5126e5eeeb5e07ceef3c809452a8c9f508b2d4d1 ("Retire snd_mss ISA sound card
driver")

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D44858
DeltaFile
+0-8sys/dev/sound/pcm/sound.h
+0-81 files

FreeBSD/src 4d2be7bsys/dev/sound/pcm sound.c sound.h

sound: Get rid of snddev_info->devcount

snddev_info->devcount keeps track of the total number of channels for a
given device. However, it is redundant to have it, since it is only used
in sound_oss_sysinfo() to populate the "numaudios" field, and we also
keep track of the channel counts in the playcount, pvchancount, reccount
and rvchancount fields anyway. We can simply sum those fields together
instead of updating a separate variable upon every channel
addition/deletion.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D44852
DeltaFile
+1-6sys/dev/sound/pcm/sound.c
+4-1sys/dev/sound/pcm/sound.h
+5-72 files

FreeBSD/src a44c45csys/dev/sound/pcm dsp.c

sound: Simplify unit fetching in dsp_oss_audioinfo()

"i" keeps the value of the current unit, so we do not have to call
PCMUNIT() and device_get_unit() to fetch it.

In the mixer case, I think it is more correct to do it like this, since
mixer and DSP device units have a 1-1 relationship (i.e the mixer unit
is always the same as the corresponding DSP device one) and that way we
can make it more clear.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D44855
DeltaFile
+6-7sys/dev/sound/pcm/dsp.c
+6-71 files

FreeBSD/src 17969e6sys/dev/sound/pcm channel.c channel.h

sound: Remove obsolete chn_setvolume()

It is marked as obsolete and there are no consumers of it anymore.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D44853
DeltaFile
+0-13sys/dev/sound/pcm/channel.c
+0-1sys/dev/sound/pcm/channel.h
+0-142 files

FreeBSD/src 8b97dcesys/dev/sound/pci emu10kx.c, sys/dev/sound/pcm mixer.c sound.h

sound: Remove PCMMINOR()

It's a NO-OP.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D44854
DeltaFile
+2-2sys/dev/sound/pcm/mixer.c
+0-3sys/dev/sound/pcm/sound.h
+1-1sys/dev/sound/pci/emu10kx.c
+3-63 files

FreeBSD/src 41ab202sys/dev/sound/pcm mixer.c

sound: Call device_get_name() and device_get_unit() only once in mixer_init()

No functional change intended.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D44840
DeltaFile
+7-5sys/dev/sound/pcm/mixer.c
+7-51 files

FreeBSD/src d0032e6sys/dev/sound/pcm sound.c

sound: Be more verbose with virtual channel descriptions

Non-virtual channel description denote "play" or "record", so do the
same for virtual ones as well.

Sponsored by:   The FreeBSD Foundation
MFC after:      1 week
Reviewed by:    markj, emaste
Differential Revision:  https://reviews.freebsd.org/D44839
DeltaFile
+2-2sys/dev/sound/pcm/sound.c
+2-21 files

FreeBSD/src 806bd5eshare/misc organization.dot

organization.dot: Fix typos

MFC after:      3 days
DeltaFile
+2-2share/misc/organization.dot
+2-21 files

FreeBSD/src 1941914sys/netinet/tcp_stacks rack.c

tcp rack: improve BBR_LOG_CWND event

Fix a typo, which resulted in missing r_ctl.gate_to_fs in the BBLog
event.

Reported by:            Coverity Scan
CID:                    1540024
Reviewed by:            rrs, rscheff
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44648
DeltaFile
+1-1sys/netinet/tcp_stacks/rack.c
+1-11 files

FreeBSD/src c9cd686sys/netinet tcp_input.c, sys/netinet/tcp_stacks bbr.c rack.c

tcp: drop data received after a FIN has been processed

RFC 9293 describes the handling of data in the CLOSE-WAIT, CLOSING,
LAST-ACK, and TIME-WAIT states:
This should not occur since a FIN has been received from the remote
side. Ignore the segment text.
Therefore, implement this handling.

Reviewed by:            rrs, rscheff
MFC after:              3 days
Sponsored by:           Netflix, Inc.
Differential Revision:  https://reviews.freebsd.org/D44746
DeltaFile
+0-18sys/netinet/tcp_stacks/bbr.c
+0-14sys/netinet/tcp_stacks/rack.c
+4-2sys/netinet/tcp_input.c
+4-343 files

FreeBSD/src 8ee68absys/dev/sym sym_hipd.c

Fix "set but not used" for the sym driver.

Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit 5045cb8f18f9f79354f93174ba7f9fd2f7ea6994)
DeltaFile
+1-2sys/dev/sym/sym_hipd.c
+1-21 files

FreeBSD/src 3d1d7c2sys/net/route fib_algo.c

fib_algo(4): Lower level of algorithm switching messages to LOG_INFO

Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless

Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.

Reviewed by:    melifaro

(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
DeltaFile
+1-1sys/net/route/fib_algo.c
+1-11 files

FreeBSD/src 954bb76sys/net/route fib_algo.c

fib_algo(4): Lower level of algorithm switching messages to LOG_INFO

Otherwise, with the default flm_debug_level of LOG_NOTICE, it's rather
easy to trigger debug messages such as:
[fib_algo] inet.0 (bsearch4#18) rebuild_fd_flm: switching algo to
radix4_lockless

Also, the "severity" of these events generally only justifies LOG_INFO
and not LOG_NOTICE.

Reviewed by:    melifaro

(cherry picked from commit ed81a15517b8a8f587fd7282c3690513bb798242)
DeltaFile
+1-1sys/net/route/fib_algo.c
+1-11 files