Commit Graph

305191 Commits

Author SHA1 Message Date
polyduekes df815450fb release.7: PKGBASE is now the default
Signed-off-by:	polyduekes-git <polyduekes@proton.me>
Reviewed by:	cperciva, emaste, ziaee
Closes:		https://github.com/freebsd/freebsd-src/pull/1913
2025-12-02 14:45:31 -05:00
Bjoern A. Zeeb adb4901ac9 LinuxKPI: 802.11: when synching HT and VHT cap, mask rx_mcs
When we sync the sta data, mask the rx_mcs with what the hardware is
able to do so that we do not leave, e.g., a 2nd stream enabled on a 1x1
chipset.
iwlwifi(4) has a further check for the smps_mode to limit to NSS=1 but
I believe that is historic and not actually in use anymore.

This fixes firmware crashes on TLC updates with nss=1 but the nss=2 array
index also being populated (with HT/VHT80/160 mcs information):
data being populated:
  iwlwifi0: 0x20101A0D | ADVANCED_SYSASSERT
  iwlwifi0: 0x00000006 | umac data1
  iwlwifi0: 0x00000001 | umac data2
  iwlwifi0: 0x000003FF | umac data3
  iwlwifi0: 0x____050F | last host cmd

Reported by:	Claudio Zumbo (claudiozumbo gmail.com), Erik Power
Tested by:	Claudio Zumbo, Erik Power (eppower umich.edu)
PR:		290622
MFC after:	3 days
Sponsored by:	The FreeBSD Foundation
2025-12-02 18:46:44 +00:00
Bjoern A. Zeeb ed29ffd396 LinuxKPI: pci: undo the pci_resource_len() check in lkpi_pci_request_region()
Creating non-passthru SR-IOV interfaces on a mlx5en(4) failed.
The problem lies in the pci_resource_len() call but not that the BAR length
is tmeporary 0 but in that we call lkpi_pci_get_bar() with a true argument
which will create the BAR resource for us and report the approriate length
back.  However, the later call to bus_alloc_resource_any() will then fail
given the resource already exists.

Restore the previous behaviour and let bus_alloc_resource_any() do the
work.  Adjust the return values from -ENODEV to -EBUSY to match callers
expectations.

In linuxkpi_pcim_request_all_regions(), like in linuxkpi_pci_request_regions(),
filter out the -EBUSY errors as "not an error" and try the next bar.
This also seems to be consistent with the expectations of the callers.

PR:		290793
Reported by:	David BOYER (jcduss13 gmail.com)
Tested on:	mlx5en, iwlwifi, mt7921
Reviewed by:	kib
Fixes:		7e21158d44 "implement [linuxkpi_]pcim_request_all_regions()"
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D53902
2025-12-02 18:46:20 +00:00
John Baldwin 44d6df4f65 nvme: Use memcpy instead of memmove in nvme_cdata_get_disk_ident
These buffers should not overlap.

Reviewed by:	imp
Sponsored by:	Chelsio Communications
Differential Revision:	https://reviews.freebsd.org/D53842
2025-12-02 10:57:08 -05:00
Cy Schubert 07d5a9b1b2 sqlite3: Update to 3.50.4
Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz

Merge commit 'e7e917ee3cf2b3010b1c511c6ebaf8b65b983ad7'
2025-12-02 07:22:26 -08:00
Cy Schubert e7e917ee3c sqlite3: Vendor import of sqlite3 3.50.4
Release notes at https://www.sqlite.org/releaselog/3_50_4.html.

Obtained from:  https://www.sqlite.org/2025/sqlite-autoconf-3500400.tar.gz
2025-12-02 06:56:21 -08:00
Robert Clausecker f417c9ed66 powerpc/_stdint.h: fix SIG_ATOMIC_{MIN,MAX,WIDTH}
On powerpc/powerpc64, sig_atomic_t is an int, but was treated as if
it was a long by <machine/_stdint.h>.  This was finally caught by the
unit test added with 4a1c752 / D53831.

Reported by:	kib
Reviewed by:	kib, imp
Approved by:	markj (mentor)
Fixes:		c3e289e1ce
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D54026
2025-12-02 14:34:24 +01:00
Warner Losh babb41a81e nvme: Minor style nit
Sponsored by:		Netflix
2025-12-01 21:58:07 -07:00
Maxim Konovalov 7b44ab1c6a bsd-family-tree: add FreeBSD 15.0 2025-12-02 03:44:42 +00:00
Konstantin Belousov 7295aeaf5f libuvmem: provide man page mostly as a pointer to vmem(9)
Reviewed by:	bnovkov, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27220
2025-12-02 05:41:13 +02:00
Konstantin Belousov 1ecf01065b libuvmem: usermode port of vmem(9)
The quantum cache is disabled, there is no uma.

Intent is to use this for resource allocation in bhyve(8), for start.
Addition of -luvmem to bhyve linking was done to test changes to share/mk.

Reviewed by:	bnovkov, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27220
2025-12-02 05:41:13 +02:00
Konstantin Belousov 305e33d4c6 kern/subr_vmem.c: remove unused VMEM_TRYLOCK() macro
Reviewed by:	bnovkov, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27220
2025-12-02 05:41:12 +02:00
Konstantin Belousov 202292ef10 kern/subr_vmem.c: convert explicit vmem_list_lock use to macros
Reviewed by:	bnovkov, markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D27220
2025-12-02 05:41:12 +02:00
Diane Bruce 791c531402 Fintek F81232 USB to serial driver
Driver for Feature Integration Technology Inc. (aka Fintek)
F81232 USB to serial driver.

Reviewed by:	thj,adrian,UB
Approved by:	adrian
Differential Revision:	https://reviews.freebsd.org/D53893
2025-12-01 20:15:37 -05:00
Kristof Provost 639e65144a pfsync: fix incorrect unlock during destroy
During pfsync_clone_destroy() we clean up pending packets. This
may involve calling pfsync_undefer() or callout_drain(). We may not
hold the bucket lock during callout_drain(), but must hold it during
pfsync_undefer().

We incorrectly always released the lock, leading to assertion failures
during cleanup if there were pending deferred packets.

MFC after:	1 week
Sponsored by:	Orange Business Services
2025-12-01 22:30:56 +01:00
Kristof Provost 7a283c4018 pfctl: restore '-Tload -f pf.conf' functionality
Allow only tables to be loaded from a file, rather than everything (i.e.
including options, rules).

Add a test case for this.

PR:		291318
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-12-01 22:30:30 +01:00
Kristof Provost d6f1acf94d pf: use correct sized variables in pf_change_icmp()
We're updating 16-bits checksums here, so should use a 16-bit integer,
not a 32-bit one.
No functional change.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2025-12-01 22:30:21 +01:00
Vladimir Kondratyev dc6f609685 msconvd(8): Drop mentions of Bus/InPort mouse support in manual page
mse(4) was removed long ago.

MFC after:	1 month
2025-12-02 00:09:00 +03:00
Mark Peek 732b4aa05d ctfmerge: fix segfault when building on macOS
The barrier code was using semaphores which have been deprecated in
macOS and not working at all, causing a race condition. Since macOS
does not have pthread_barrier_*(), this change uses a condition
variable instead.

PR:		290958
Reported by:	wosch
MFC after:	2 weeks
Reviewed by:	imp, markj
Differential Revision:	https://reviews.freebsd.org/D54018
2025-12-01 12:50:24 -08:00
Vladimir Kondratyev 8d9a5d44b1 evdev: Sync event codes with Linux kernel 6.18
MFC after:	1 month
2025-12-01 23:42:15 +03:00
Robert Wahlberg e3201cec83 psm: Fix three finger tap on elantech v4 touchpads
Fix an issue where a three finger tap would generate additional events
when fingers moved slightly during the tap.

Signed-off-by:	Robert Wahlberg <freebsd@robertwahlberg.se>
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1792
Reviewed by:	wulf
MFC after:	1 month
2025-12-01 23:42:15 +03:00
Vladimir Kondratyev b6cad334e6 hid: Make game controllers accessible to members of the game group
Their events have to be accessible by unprivileged users via e.g. libsdl.

MFC after:	1 month
2025-12-01 23:42:15 +03:00
Vladimir Kondratyev ecccc9d999 evdev: Allow setting of character device ownership and access mode
by device driver. That is required as game pad and joystick events have
to be accessible by ordinary users.

MFC after:	1 month
2025-12-01 23:42:14 +03:00
Justin Hibbits 882821b78f kexec: Change shutdown handler priority
The kexec shutdown handler should run after everything else, but before
the other platform shutdown handlers.  With (SHUTDOWN_PRI_DEFAULT - 150)
priority it would run before anything else, including all the device
shutdown handlers.  Change to (SHUTDOWN_PRI_LAST - 150) where it
belongs.

Sponsored by:	Hewlett Packard Enterprise
2025-12-01 11:53:00 -05:00
Mark Johnston 17fd7780fb dtrace tests: Update names after the syscall::exit probe was renamed
MFC after:	1 week
Fixes:	e7e964cb2e ("syscalls: normalize _exit(2) declerations")
2025-12-01 14:20:06 +00:00
Minsoo Choo 507cfc4279 dtrace.1: remove sparc
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1907
2025-12-01 14:19:19 +00:00
Minsoo Choo d11ff7f933 opensolaris: remove references to sparc
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1907
2025-12-01 14:19:19 +00:00
Minsoo Choo dfd35cd244 libdtrace: remove sparc code
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1907
2025-12-01 14:19:19 +00:00
Minsoo Choo d667cc77ba dtrace: remove sparc tests
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>

Reviewed by:	markj
MFC after:	1 week
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1907
2025-12-01 14:19:18 +00:00
Mark Johnston 72b114169b linker: Avoid invoking eventhandlers on incompletely loaded files
We do not invoke the kld_load eventhandler until after the file is fully
linked, so don't invoke the kld_unload_try or kld_unload event handlers
unless the file is fully linked either.

In my case, the dtrace SDT kld_unload_try handler was running before
relocations were processed against the file, and that caused problems
when sdt_kld_unload_probes() accesses elements of a linker set.

Move the kld_unload handler invocation earlier, to after sysuninits have
been run.  This is a bit more consistent with the kld_load handler.

PR:		291238
Reviewed by:	imp, emaste, kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53938
2025-12-01 14:19:18 +00:00
Jessica Clarke 5f529f9e29 libc: Fix TESTSDIR for new stdbit tests
Otherwise the directory created by etc/mtree/BSD.tests.dist, which is
where these belong, and referred to by the generated Kyuafile for
/usr/tests/lib/libc (via stdbit's existence in TESTS_SUBDIRS), ends up
empty with no Kyuafile, which is an error for kyua.

Reported by:	kp
Fixes:		2fb8cbc6ef ("libc/tests: add stdbit test framework and unit tests")
2025-12-01 14:06:21 +00:00
Martin Matuska c1e033c33e libarchive: merge from vendor branch
libarchive 3.8.4

Important bugfixes:
     #2787 bsdtar: Fix zero-length pattern issue
     #2797 lib: Fix regression introduced in libarchive 3.8.2
                when walking enterable but unreadable directories

Obtained from:	libarchive
Vendor commit:	d114ceee6de08a7a60ff1209492ba38bf9436f79
MFC after:	1 week
2025-12-01 14:05:35 +01:00
Martin Matuska bf3359d921 Update vendor/libarchive to 3.8.4
Important bugfixes:
 #2787 bsdtar: Fix zero-length pattern issue
 #2797 lib: Fix regression introduced in libarchive 3.8.2
            when walking enterable but unreadable directories

Obtained from:	libarchive
Vendor commit:  d114ceee6de08a7a60ff1209492ba38bf9436f79
2025-12-01 14:01:24 +01:00
Jaeyoon Choi 31407551c3 ufshci: Add a check for WLUN during driver initialization
This patch checks whether wlun is registered as a periph device.
It also implements a function to issue an SSU.

Reviewed by:		imp (mentor)
Sponsored by:		Samsung Electronics
Differential Revision:	https://reviews.freebsd.org/D53923
2025-12-01 04:41:03 +00:00
Jaeyoon Choi 8c35de4982 cam/scsi: Add power condition support to START STOP UNIT
This patch adds a power_condition parameter to the
scsi_start_stop() function and sets the power condition via SSU.

Reviewed by:		imp (mentor)
Sponsored by:           Samsung Electronic
Differential Revision:	https://reviews.freebsd.org/D53922
2025-12-01 04:40:52 +00:00
Jaeyoon Choi 5e0d065b5b ufshci: Enable WLUN scan
QEMU ufs device does not implement WLUN, so QUIRK is added.

Reviewed by:		imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:	https://reviews.freebsd.org/D53921
2025-12-01 04:40:42 +00:00
Jaeyoon Choi ba96377619 cam/scsi: Support well known logical unit
This patch adds an additional state to probe well-known logical units
before probing normal logical units.

Reviewed by:		imp (mentor)
Sponsored by:		Samsung Electronics
Differential Revision:	https://reviews.freebsd.org/D53920
2025-12-01 04:40:31 +00:00
Jaeyoon Choi 3e3d7e5905 ufshci: add helper to convert SCSI LUN to UPIU LUN formats
Reviewed by:		imp (mentor)
Sponsored by:           Samsung Electronics
Differential Revision:	https://reviews.freebsd.org/D53919
2025-12-01 04:40:15 +00:00
Robert Clausecker 5bfdb66ad9 man/man3: add cross references to stdbit(3)
Add cross references to relevant stdbit man pages

Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision: https://reviews.freebsd.org/D53661
2025-11-30 20:21:52 +01:00
Robert Clausecker 2fb8cbc6ef libc/tests: add stdbit test framework and unit tests
This adds unit tests for all 70 functions in <stdbit.h>.

I'm sorry for the test framework, but it makes it so I don't
have to write 70 unit tests by hand.

Reviewed by:	adrian, des
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53660
2025-11-30 20:21:52 +01:00
Robert Clausecker d790b16bbf libc/stdbit: add man pages for stdbit functions
This adds man pages for each group of functions in <stdbit.h>.
The man pages have cross references to one-another.
Cross references from external man pages to these will be added
in a later commit.

Reviewed by:	pauamma@gundo.com, kib
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53659
2025-11-30 20:21:52 +01:00
Robert Clausecker d39e310c7d man/man3: add stdbit.3
This is the overview man page for the <stdbit.h> functions.

Reviewed by:	pauamma@gundo.com, adrian
Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53658
2025-11-30 20:21:52 +01:00
Robert Clausecker 6296500a85 libc: implement C23 <stdbit.h> functions
This new header complies with ISO/IEC 9899:2024 (C23).

Contrary to glibc, we do not provide inline definitions in
<stdbit.h> as we expect our system compiler to soon recognise
these as builtins anyway.

Relnotes:	yes
MFC after:	1 month
Reviewed by:	adrian
Approved by:	markj (mentor)
Differential Revision:	https://reviews.freebsd.org/D53657
2025-11-30 20:21:52 +01:00
Robert Clausecker 4a1c7529c9 libc/tests: add test for *_MAX, *_MIN, and *_WIDTH
This file checks the correctness of the various _MAX, _MIN, and
_WIDTH macros defined for the libc types.  It assumes that none
of the types have padding bits.

Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53831
2025-11-30 20:21:51 +01:00
Robert Clausecker 7998a82d2f sys/stdint.h: add C23 _WIDTH macros
The platform-dependent macros are added to the various
_stdint.h headers, those that are always the same are
added directly to _stdint.h.

We may want to move the definitions for WCHAR_* and
WINT_* out of the platform header files as those are
always the same.

Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53830
2025-11-30 20:21:51 +01:00
Robert Clausecker 7326bc7f9c sys/limits.h: add C23 _WIDTH macros
For compliance with IOS/IEC 9899:2024 ("C23").

These macros define the width in bits of the basic integer types.
Another new macro, BITINT_MAXWIDTH, is not yet included as I do not
understand what it should be set to.  Perhaps it is compiler-specific.

Approved by:	markj (mentor)
MFC after:	1 month
Differential Revision:	https://reviews.freebsd.org/D53825
2025-11-30 20:21:47 +01:00
Ed Maste 8666fda1af aq(4): Fix VLAN tag test
Previously emitted a compiler warning "warning: bitwise comparison
always evaluates to false."

Looking at the OpenBSD driver (which is based on this code) it looks
like the VLAN flag should be set if either of these bits is.  In the
OpenBSD driver these are AQ_RXDESC_TYPE_VLAN and AQ_RXDESC_TYPE_VLAN2
rather than a magic number 0x60.

Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53836
2025-11-30 10:56:13 -05:00
Ed Maste 0156be41a1 aq(4): Remove unimplemented functions
aq_if_priv_ioctl and aq_if_debug have prototypes but are not yet
implemented.  Just remove the commented-out DEVMETHODs and the unused
prototypes, to clear a build-time warning; the DEVMETHODs and prototypes
can be readded if / when they are implemented.
2025-11-30 10:55:27 -05:00
John Baldwin 2b587c0c8a aq(4): Remove unused DRIVER_MODULE devclass 2025-11-30 10:38:33 -05:00
Olivier Cochard 4756f5ff8f aq(4): Port to IfAPI
Direct access to struct ifnet members is not possible in FreeBSD 15;
accessors must be used.  These exist in all supported FreeBSD versions,
so we do not need to make this conditional.
2025-11-30 10:38:33 -05:00