Commit Graph

305181 Commits

Author SHA1 Message Date
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
Rozhuk Ivan 14eb7ec7b7 aq(4): Remove #include of user header <unistd.h>
pause() has 2 different definition in unistd.h and sys/systm.h
2025-11-30 10:38:33 -05:00
Ed Maste 493d26c58e sys: Import snapshot of Aquantia ACQ107 vendor driver
Obtained from https://github.com/Aquantia/aqtion-freebsd commit
c61d27b1d94af72c642deefa0595884481ea7377.

This is not using a vendor branch.  The formerly-upstream repo is
abandoned and I do not believe it will receive updates.  This initial
import serves as a snapshot of the vendor code, but from here we will
iterate on it in the tree as our own code.

Bug fixes, code cleanup, and build infrastructure will follow.

NetBSD and OpenBSD have derivatives of this driver (with additional
hardware support).  We can look to changes in those drivers, and the
Linux driver, to add support here.

Reviewed by:	adrian
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D53813
2025-11-30 10:38:33 -05:00
Dag-Erling Smørgrav 029a09f180 sys/_types.h: Actually unbreak gcc build
Fixes:		19728f31ae ("sys/_types.h: Unbreak gcc build")
Reviewed by:	emaste
Differential Revision:	https://reviews.freebsd.org/D53986
2025-11-30 11:31:09 +01:00
Warner Losh 02b72b1540 arm: Remove unused variable in dbg_arch_supported
Removed unused dbg_didr which had been used prior to f42421307b to
detect qemu unsupported debugger. I'm unsure how this slipped through my
testing.

Fixes: f42421307b
Sponsored by: Netflix
2025-11-29 02:47:49 -07:00
Minsoo Choo 57c0a337db libsys: remove armv6 hack
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 23:07:12 -07:00
Minsoo Choo f3607f5a7f clang: remove armv6 comment
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 23:07:12 -07:00
Minsoo Choo 53da09369c libc: remove ARMv5/6 from man page
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:38 -07:00
Minsoo Choo 3387a1bdba sys: update comment for removal of armv6
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:37 -07:00
Minsoo Choo f42421307b sys: remove armv6/6.1 support from debug monitor
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:36 -07:00
Minsoo Choo 42d704bfc4 sys: remove comment for armv5/6
Signed-off-by: Minsoo Choo <minsoochoo0122@proton.me>
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1903
2025-11-28 21:56:36 -07:00