FreeBSD/src 04e0313sys/contrib/openzfs/cmd ztest.c

ztest: use ASSERT3P to compare pointers

Fixes i386-gcc13 build.  Direct commit while waiting for upstream.

Pull Request: https://github.com/openzfs/zfs/pull/16115
DeltaFile
+1-1sys/contrib/openzfs/cmd/ztest.c
+1-11 files

FreeBSD/src 6e83504lib/libc/sys openat.c setcontext.c, lib/libsys Symbol.sys.map

Revert "lib{c,sys}: normalize export of openat, setcontext, and swapcontext"

I put the symbols in the wrong file (should have been
lib/libc/sys/Symbol.map), added a duplicate pdfork entry due to a botch
rebase, and there seems to be a issue with gcc13/binutils not exposing
the symbols so revert the whole thing while I debug.

This reverts commit ee632fb9eb4a060a4087a7f5425bfe36e65cda61.
DeltaFile
+0-4lib/libsys/Symbol.sys.map
+1-0lib/libc/sys/openat.c
+1-0lib/libc/sys/setcontext.c
+1-0lib/libc/sys/swapcontext.c
+3-44 files

FreeBSD/src 68a3a7fsys/kern kern_fork.c

kasan: fix false-positive kasan_report upon thread reuse

In fork1(), if a thread is reused and thread_alloc_stack() is not
called, mark the reused thread's kstack pages clean in the KASAN shadow
buffer.

Sponsored by:   Juniper Networks, Inc.
MFC after:      3 days
Reviewed by:    markj
Differential Revision:  https://reviews.freebsd.org/D44875
DeltaFile
+5-0sys/kern/kern_fork.c
+5-01 files

FreeBSD/src 2cb0fcesys/dev/iicbus if_ic.c, sys/dev/wg if_wg.c

bpf: Make BPF interop consistent with if_loop

The pseudo_AF_HDRCMPLT check is already being done in if_loop and
just needed to be ported over to if_ic, if_wg, if_disc, if_gif,
if_gre, if_me, if_tuntap and ng_iface.  This is needed in order to
allow these interfaces to work properly with e.g., tcpreplay.

PR:             256587
Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/876
DeltaFile
+2-2sys/dev/iicbus/if_ic.c
+2-1sys/dev/wg/if_wg.c
+2-1sys/net/if_gif.c
+2-1sys/net/if_gre.c
+2-1sys/net/if_me.c
+1-1sys/net/if_tuntap.c
+11-72 files not shown
+13-98 files

FreeBSD/src 2f44f86usr.bin/xinstall xinstall.c

install: Fix a compiler warning when bootstrapping

Fixes:          4336161cc9c6 ("install: Don't skip syncing in the common case.")
Reviewed by:    imp, des
Differential Revision:  https://reviews.freebsd.org/D44866
DeltaFile
+2-0usr.bin/xinstall/xinstall.c
+2-01 files

FreeBSD/src 87b0195usr.bin/ctags C.c ctags.c

ctags: Use C99 bool instead of defining our own

Use stdbool.h definitions instead of defining non-standard ones.

Signed-off-by: Collin Funk <collin.funk1 at gmail.com>

Reviewed by:    markj
MFC after:      2 weeks
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1107
DeltaFile
+38-38usr.bin/ctags/C.c
+11-11usr.bin/ctags/ctags.c
+6-6usr.bin/ctags/fortran.c
+5-6usr.bin/ctags/ctags.h
+5-5usr.bin/ctags/yacc.c
+4-4usr.bin/ctags/lisp.c
+69-701 files not shown
+70-717 files

FreeBSD/src e1e6361tests/atf_python/sys Makefile, tests/atf_python/sys/net Makefile

tests: move atf_python/sys/ into the tests package

Reviewed by:    markj
MFC after:      1 week
Pull Request:   https://github.com/freebsd/freebsd-src/pull/1174
DeltaFile
+1-0tests/atf_python/sys/net/Makefile
+1-0tests/atf_python/sys/Makefile
+1-0tests/atf_python/sys/netlink/Makefile
+1-0tests/atf_python/sys/netpfil/Makefile
+1-0tests/atf_python/sys/netpfil/ipfw/Makefile
+5-05 files

FreeBSD/src 563c72esys/compat/linuxkpi/common/include/linux utsname.h

LinuxKPI: utsname.h add missing SPDX-License-Identifier

Reported by:    markj (2023-05-24; sorry took me a while)
MFC after:      3 days
DeltaFile
+2-0sys/compat/linuxkpi/common/include/linux/utsname.h
+2-01 files

FreeBSD/src d3b6d70usr.sbin/freebsd-update freebsd-update.sh

freebsd-update(8): Use kern.module_path

Instead of tailored configuration files to look for module_path entries.

Reported by:            kevans@
Reviewed by:            kevans, imp, zlei
Approved by:            kevans,zlei
Differential Revision:  https://reviews.freebsd.org/D44797
DeltaFile
+5-9usr.sbin/freebsd-update/freebsd-update.sh
+5-91 files

FreeBSD/src 48aa10esrc/arm64/exynos exynosautov920-pinctrl.dtsi, src/arm64/exynos/google gs101-pinctrl.dtsi

Import device-tree files from Linux 6.8
DeltaFile
+6,013-0src/arm64/qcom/sm8650.dtsi
+3,527-0src/arm64/qcom/x1e80100.dtsi
+1,266-0src/arm64/exynos/exynosautov920-pinctrl.dtsi
+1,249-0src/arm64/exynos/google/gs101-pinctrl.dtsi
+1,115-9src/arm64/qcom/sa8775p.dtsi
+956-0src/arm64/mediatek/mt8188.dtsi
+14,126-91,268 files not shown
+68,563-6,9541,274 files

FreeBSD/src 1fcc28bsrc/arm64/mediatek mt8395-genio-1200-evk.dts, src/arm64/qcom qcm6490-fairphone-fp5.dts

Import device-tree files from Linux 6.7
DeltaFile
+2,000-0src/riscv/sophgo/sg2042-cpus.dtsi
+1,137-0src/arm64/rockchip/rk3588-quartzpro64.dts
+902-0src/arm64/mediatek/mt8395-genio-1200-evk.dts
+848-0src/arm64/rockchip/rk3588-orangepi-5-plus.dts
+757-9src/arm64/ti/k3-am62p-main.dtsi
+667-0src/arm64/qcom/qcm6490-fairphone-fp5.dts
+6,311-91,058 files not shown
+43,112-4,1901,064 files

FreeBSD/src dbacf41src/arm/aspeed aspeed-bmc-ibm-everest.dts ibm-power10-quad.dtsi, src/arm/samsung exynos4212-tab3.dtsi

Import device-tree files from Linux 6.6
DeltaFile
+1,588-1,295src/arm/aspeed/aspeed-bmc-ibm-everest.dts
+77-2,078src/arm64/nvidia/tegra234-p3737-0000+p3701-0000.dts
+1,991-0src/arm64/nvidia/tegra234-p3701.dtsi
+1,310-0src/arm/samsung/exynos4212-tab3.dtsi
+1,305-0src/arm/aspeed/ibm-power10-quad.dtsi
+888-0src/arm64/rockchip/rk3588-nanopc-t6.dts
+7,159-3,3731,665 files not shown
+53,931-12,6551,671 files

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