Commit Graph

299074 Commits

Author SHA1 Message Date
Dave Cottlehuber a0165254bf release: use "runtime" instead of "minimal" for OCI image name
The runtime name is taken from the main pkg-base package that this
image is built off.

Sponsored by:	SkunkWerks, GmbH
MFC after:	3 days
Reviewed by:	dfr, emaste
Differential Revision:	https://reviews.freebsd.org/D50043
2025-04-27 23:47:29 +00:00
Bjoern A. Zeeb a0ccc12f68 rtw88: merge Realtek's rtw88 driver based on Linux v6.14
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).

Sponsored by:	The FreeBSD Foundation
2025-04-27 23:36:15 +00:00
Bjoern A. Zeeb df279a26d3 rtw89: merge Realtek's rtw89 driver based on Linux v6.14
This version is based on
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
38fec10eb60d687e30c8c6b5420d86e8149f7557 ( tag: v6.14 ).

Sponsored by:	The FreeBSD Foundation
2025-04-27 23:36:12 +00:00
Konstantin Belousov b989c1dd1e elfctl: add knowledge about the la57 bit
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D49913
2025-04-28 01:31:59 +03:00
Konstantin Belousov 7a8440bf08 amd64: make LA57 mode for a process opt-in by default
The vm.pmap.prefer_la48 manages the mode.

Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D49913
2025-04-28 01:31:59 +03:00
Konstantin Belousov 5ad6c3d840 amd64: add elfctl bit to enable LA57
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D49913
2025-04-28 01:31:59 +03:00
Konstantin Belousov 011a349361 x86: add cpu_stdext_feature4
which corresponds to CPUID leaf 7 %ecx = 1 %eax report.  Decode only
LASS and LAM for now.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2025-04-28 01:24:33 +03:00
Maxim Konovalov b08bc953f1 bsd-family-tree: add OpenBSD 7.7 release 2025-04-27 21:56:31 +00:00
Konstantin Belousov 4f32b298c6 sig_handle_first_stop(): notify debugger
Since it could be that no debuggee threads are waken up because all of
them are in interruptible sleep and consequently all were suspended
remotely, call thread_stopped().

Tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D49984
2025-04-28 00:52:32 +03:00
Konstantin Belousov 2f87445747 sig_suspend_thread(): return info about the way the process was suspended
so that caller can infer whether the thread_stopped() is to be called by
the AST handler.

Tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D49984
2025-04-28 00:52:29 +03:00
Konstantin Belousov f87811ca3b sig_handle_first_stop(): allow NULL leader thread
Remove the ext argument, the ext condition is indicated by NULL td.
If the td argument is NULL, p_xthread is set to NULL, for initial
attach. Previous commit prepared ptrace() code for the case.

sig_suspend_thread() only uses the td arg to avoid interrupting the
current thread as micro-optimization, so it is fine to pass NULL.

Tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D49961
2025-04-28 00:52:12 +03:00
Konstantin Belousov b63281884e ptrace(): p_xthread could be NULL for P_STOPPED_TRACE
Suppose that ptrace(PT_ATTACH) is called on mt process, and the thread
arbitrary selected as leader (p_xthread) by the attach code, is already
in kernel preparing to exit as the process lock becomes available.  Then
the thread_exit() function clears p->p_xthread, and we end up with the
traced signal-stopped process with NULL p_xthread.

This state is legitimate, and really p_xthread must point to a thread
that is inside ptracestop().  If p_xthread is NULL, but ptrace code
requires some leader thread, arbitrarly designate it as needed.

Reported and tested by:	pho
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D49961
2025-04-28 00:52:04 +03:00
Bjoern A. Zeeb 8b51cd07f6 LinuxKPI: define time64_t
Define time64_t to int64_t for all supported architectures
unconditionally.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	imp, markj, emaste
Differential Revision: https://reviews.freebsd.org/D50004
2025-04-27 19:03:42 +00:00
Bjoern A. Zeeb 28efbf9d2f LinuxKPI: add dummy header file linux/unaligned.h
Long-term asm/unaligned.h is likely to migrate to this file?

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reviewed by:	emaste
Differential Revision: https://reviews.freebsd.org/D50003
2025-04-27 19:03:28 +00:00
Bjoern A. Zeeb 91716e8dc1 LinuxKPI: 802.11: add SW_MGMT_TX to the expected flags for CCMP
rtw88 sets SW_MGMT_TX on (*mo_et_key) (MFP in software which we do
not yet support).  Add it to the list of known reply values to avoid
constant logging.

Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Reported by:	Oleg Nauman (oleg.nauman gmail.com)
2025-04-27 18:56:18 +00:00
Adrian Chadd 9b2a503a11 e6000sw: add support for 88E6190X
This adds the minimum support required to probe/attach the 88E6190X.

I've tested this against an AT&T ATT-150 OCP device (Silicom i3000)
with local changes to export MDIO via ixge(4).

Hints are required to probe/attach/configure the switch on amd64,
but with the mentioned diffs, it does work.

Thanks to Stas Alekseev <stas@alekseev.us> for the pull request
and Stas / Jason Hensler <omegadraconis@gmail.com> for chasing
down information about the chipset, linux stuff and AT&T OCP
hardware information.

PR:		kern/281211
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1408
Differential Revision:	https://reviews.freebsd.org/D50044
Reviewed by:	imp
2025-04-27 11:11:26 -07:00
Adrian Chadd c78f603ab7 e6000sw: schedule e6000sw_tick() to occur once a second
Although all the machinery is present, the tick routine only ran once.
It was never rescheduled.  So, reschedule it.

However in practice I've discovered that the tick routine is running
whilst a bunch of phys are actually being probe/attached on each per-port
MII bus being created and probed off of the switch itself.

Until that's debugged (and likely the whole PHY management stuff is
cleaned up here), just add a NULL check and thus don't panic.

Differential Revision:	https://reviews.freebsd.org/D50031
Reviewed by:	imp
2025-04-27 11:11:19 -07:00
Adrian Chadd ee7f62faa8 e6000sw: stop / drain the taskqueue (and tick) during detach
Although the tick isn't running every hz right now, when it /is/
running at hz, the shutdown path will race with an existing running
tick routine, causing unpredictable panics.

* Introduce a shutdown flag which will abort doing the tick work if set
* set the shutdown flag and start cancel/draining the taskqueue during
  detach.

Differential Revision:	https://reviews.freebsd.org/D50030
2025-04-27 11:05:05 -07:00
Adrian Chadd af298663e9 e6000sw: unlock the driver lock in the error path during attach
The driver sleep lock was being held during most of the error paths,
and not unlocking it will panic the kernel during detach.  So, fix it.

Differential Revision:	https://reviews.freebsd.org/D50029
Reviewed by:	imp
2025-04-27 11:04:39 -07:00
Adrian Chadd bca8685073 e6000sw: always compile it
It now is useful outside of FDT, so add it as a module

Differential Revision:	https://reviews.freebsd.org/D50028
Reviewed by:	imp
2025-04-27 11:04:22 -07:00
Adrian Chadd 322f3f587e e6000sw: correctly depend upon etherswitch
This fixes the driver to load correctly as a module when etherswitch
is also a module.

Differential Revision:	https://reviews.freebsd.org/D50027
Reviewed by:	imp
2025-04-27 11:04:03 -07:00
Adrian Chadd 4a167205f2 etherswitch: add etherswitch module
Add the etherswitch module

Differential Revision:	https://reviews.freebsd.org/D50026
Reviewed by:	imp
2025-04-27 11:03:45 -07:00
Adrian Chadd 07b56e2653 miiproxy: add as a module
Add miiproxy as a module.

Differential Revision:	https://reviews.freebsd.org/D50025
Reviewed by:	imp
2025-04-27 11:03:26 -07:00
Adrian Chadd 331e1b33b3 miiproxy: add missing dependency on mdio
This is required for it to be a module

Differential Revision:	https://reviews.freebsd.org/D50024
Reviewed by:	imp
2025-04-27 11:02:30 -07:00
Vladimir Kondratyev fe4bdd889b hidraw(4): Force switch to hidraw mode on HIDIOCGRDESC ioctl
To match documentation.

Reported by:	Ihor Dutchak <ihor.youw@gmail.com>
PR:		286155
MFC after:	3 days
2025-04-27 12:07:35 +03:00
Vladimir Kondratyev 8d4d08d571 hidraw(4): Return actual length of read data from HIDIOCG* ioctls
To match Linux.

MFC after:	3 days
2025-04-27 12:07:35 +03:00
Vladimir Kondratyev 5ea0f1e63d hidraw(4): Return length of written data from HIDIOCS* ioctls
To match Linux.

MFC after:	3 days
2025-04-27 12:07:35 +03:00
Vladimir Kondratyev fd6690e2d5 hidraw(4): Add additional hidraw input/output report ioctls
to Linux hidraw compatibility API.

Respective Linux commit f43d3870cafa made by Dean Camera message is:

Currently the hidraw module can only read and write feature HID reports on
demand, via dedicated ioctls. Input reports are read from the device through
the read() interface, while output reports are written through the write
interface().

This is insufficient; it is desirable in many situations to be able to read and
write input and output reports through the control interface to cover
additional scenarios:

  - Reading an input report by its report ID, to get initial state
  - Writing an input report, to set initial input state in the device
  - Reading an output report by its report ID, to obtain current state
  - Writing an output report by its report ID, out of band

This patch adds these missing ioctl requests to read and write the remaining
HID report types. Note that not all HID backends will neccesarily support this
(e.g. while the USB link layer supports setting Input reports, others may not).

FreeBSD native uhid(4) compatible API already has similar ioctls.

MFC after:	3 days
2025-04-27 12:07:35 +03:00
Dag-Erling Smørgrav 59597032c9 mail: Don't trap signals we shouldn't.
When in interactive mode, trap SIGINT, SIGHUP, and tty-related signals.
Otherwise, leave signals untouched as required by POSIX.

MFC after:	1 week
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D50011
2025-04-27 08:29:32 +02:00
Dag-Erling Smørgrav 873420ca1e libc: Add getenv_r() function.
This is a calque of the NetBSD function of the same name.

MFC after:	never
Relontes:	yes
Sponsored by:	Klara, Inc.
Reviewed by:	kevans
Differential Revision:	https://reviews.freebsd.org/D49979
2025-04-27 08:29:32 +02:00
Cy Schubert 3bef9b313b unbound: Update version strings
Fixes:		be771a7b7f
MFC after:	2 weeks
2025-04-26 20:40:17 -07:00
Cy Schubert be771a7b7f unbound: Vendor import 1.23.0
Release notes at
	https://nlnetlabs.nl/news/2025/Apr/24/unbound-1.23.0-released/

MFC after:	2 weeks

Merge commit '44bab727dfe28451b777dc9e47db4f748b709182'
2025-04-26 20:20:22 -07:00
Doug Moore 6014596899 agp: Drop a needless iterator reset
Reported by:	alc
Fixes:	e1f3f15192 ("agp: use iterators to speed up lookups")
2025-04-26 15:27:28 -05:00
Doug Moore a114891356 vm_page: drop find_least()
Remove the function vm_page_find_least and in the place it is used,
replace it with vm_radix_lookup_ge().

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D50042
2025-04-26 13:09:24 -05:00
Doug Moore ce3f5e979d vm_fault: use iterators in dontneed()
Use iterators instead of tailq pointers in vm_fault_dontneed().

Reviewed by:	alc
Differential Revision:	https://reviews.freebsd.org/D50012
2025-04-26 13:08:01 -05:00
Gordon Bergling 52cc1708f5 nvmecontrol(8): Fix two typos in command messages
Fix two typos in command messages:

- s/identiy/identity/

MFC after: 1 week
2025-04-26 12:18:31 +02:00
Christos Margiolis 52a0f967dc sound tests: Fetch HWBUF_RATE and SWBUF_RATE in sndstat_nv
Introduced in 19ec522d6d ("sound: Export hardware and software buffer
sample rate in sndstat nvlist").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2025-04-26 12:06:52 +02:00
Christos Margiolis 6286b714f5 sound tests: Fix PVCHAN and RVCHAN fetching in sndstat_nv
Fixes:		0c0bb4c140 ("sound: Make sndstat PVCHAN and RVCHAN nvlist parameters bool")
Reported by:	CI
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2025-04-26 12:06:47 +02:00
Christos Margiolis b095a41a3a Revert "sound: Access softc through si_drv1 in dsp cdev methods"
Committed by accident.

This reverts commit facccfc8c7.
2025-04-26 00:02:24 +02:00
Christos Margiolis 4a556c2277 Revert "sound: Create a dsp_close() helper function"
Committed by accident.

This reverts commit 532b45fe10.
2025-04-26 00:02:08 +02:00
Olivier Cochard 2a4cd9f8c8 tests/arp: Add a 1-second tolerance
This test could be flaky in case of a 1-second delay between the ping and the
ARP cache display, which can happen on highly loaded hosts running multiple
regression test VMs

Approved by:	glebius
Obtained from:	glebius
Sponsored by:	Netflix
Differential Revision:	https://reviews.freebsd.org/D50039
2025-04-25 23:03:21 +02:00
Dimitry Andric d4dab32448 depend-cleanup: ensure clang and llvm binaries are rebuilt
In 2e47f35be5, libllvm, libclang and liblldb became shared libraries,
so make sure the binaries that depend on these libraries get rebuilt.

MFC after:	2 weeks
2025-04-25 19:58:03 +02:00
Dimitry Andric 2e47f35be5 Convert libllvm, libclang and liblldb into private shared libraries
This allows clang, lld, lldb, and other llvm tools to be linked against
these shared libraries, which makes them smaller and avoids duplication.

Since these are not quite the same as the shared libraries shipped by
the upstream llvm build system, and we do not want to expose the ABI to
external programs such as ports, make them private libraries.

Note that during the cross-tools stage they are still built as static
libraries, so the cross compiler and linker are static binaries, as they
have always been.

This also requires a depend-cleanup.sh kludge which will be added in a
follow-up commit, to ensure binaries are rebuilt against the shared
libraries in case of incremental builds.

MFC after:      2 weeks
Differential Revision: https://reviews.freebsd.org/D49967
2025-04-25 19:56:39 +02:00
Dimitry Andric 245bb01106 Use .pieo extension for WITH_PIE bsd.prog.mk output
When object files for programs are built using bsd.prog.mk, and WITH_PIE
is enabled, the extension used is still plain ".o". To be consistent
with bsd.lib.mk, and to allow changes in WITH_PIE settings to propagate
correctly, the extension should be ".pieo" instead.

MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D49966
2025-04-25 19:51:55 +02:00
Christos Margiolis 532b45fe10 sound: Create a dsp_close() helper function
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D49805
2025-04-25 18:56:22 +02:00
Christos Margiolis facccfc8c7 sound: Access softc through si_drv1 in dsp cdev methods
No functional change.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	kib, markj
Differential Revision:	https://reviews.freebsd.org/D49804
2025-04-25 18:56:14 +02:00
Christos Margiolis abb5521bdd sound: Retire SD_F_PRIO_*
The SD_F_* flags are supposed to be softc flags, but SD_F_PRIO_RD and
SD_F_PRIO_WR are just generic flags and are only used with
dsp_lock_chans() and dsp_unlock_chans(). Since we already have the
DSP_F_READ() and DSP_F_WRITE() macros, we can re-use them instead.

I am aware the FREAD and FWRITE flags are meant to be used with open(),
but I think their use here is clear enough to not cause confusion.

No functional change intended.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49978
2025-04-25 18:55:51 +02:00
Christos Margiolis ef411cae7e sndstat.4: Make sndstat nvlist channel names reflect new naming scheme
Change introduced in c30f531ddb ("sound: Shorten channel names").

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49981
2025-04-25 18:55:45 +02:00
Christos Margiolis 19ec522d6d sound: Export hardware and software buffer sample rate in sndstat nvlist
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49983
2025-04-25 18:55:38 +02:00
Christos Margiolis 0c0bb4c140 sound: Make sndstat PVCHAN and RVCHAN nvlist parameters bool
Prior to 02d4eeabfd ("sound: Allocate vchans on-demand"), the
play.vchans and rec.vchans sysctls corresponded to the value of
d->pvchancount and d->rvchancount respectively, which is also what we
are exporting through SNDST_DSPS_SOUND4_PVCHAN and
SNDST_DSPS_SOUND4_RVCHAN respectively. Since that commit, the sysctls
mentioned have been modified to show whether play/rec vchans are enabled
or not. Modify the sndstat nvlist parameters accordingly.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D49980
2025-04-25 18:55:16 +02:00