Commit Graph

308225 Commits

Author SHA1 Message Date
Christos Margiolis edad981e1e sound: Address some XXX comments regarding AC'97 IDs
These seem harmless to address. Not sure why the original author did not
just assign the appropriate names if he knew they were wrong.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56044
2026-03-24 11:38:41 +01:00
Christos Margiolis 71c46c8c90 sound: Retire unused emu10k1-mkalsa.sh
It is a legacy script which is no longer used. Its utility is also
unknown.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56043
2026-03-24 11:38:41 +01:00
Christos Margiolis 6b91c8d5d2 sound: Retire Z_PARANOID
It is always defined.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56042
2026-03-24 11:38:41 +01:00
Christos Margiolis 0ee9515193 sound: Remove most Z_RATE_* aliases
They introduce an extra level of abstraction for no reason at all.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56041
2026-03-24 11:38:41 +01:00
Christos Margiolis 72e85a4d97 snd_dummy: Add to sys/conf/files and sys/conf/NOTES
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D56040
2026-03-24 11:38:41 +01:00
Christos Margiolis d171d5b8b5 sound: Retire CHN_GETMUTE() and use chn_getmute_matrix()
chn_getmute_matrix() does what CHN_GETMUTE() does, but with a few
additional checks.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55993
2026-03-24 11:38:41 +01:00
Christos Margiolis 127aa056fe sound: Retire CHN_SETVOLUME() and use chn_setvolume_matrix()
CHN_SETVOLUME() is just a wrapped around chn_setvolume_matrix() anyway,
so use it directly.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55992
2026-03-24 11:38:41 +01:00
Christos Margiolis f190fad18c sound: Retire CHN_GETVOLUME() and use chn_getvolume_matrix()
CHN_GETVOLUME() is just a wrapped around chn_getvolume_matrix() anyway,
so use it directly.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55991
2026-03-24 11:38:41 +01:00
Christos Margiolis 0b7f959702 sound: Always use chn_getvolume_matrix()
There is no reason not to use it. We do it already with CHN_SETVOLUME().
chn_getvolume_matrix() is the same as the non-INVARIANTS
CHN_GETVOLUME(), just without the additional KASSERT
chn_getvolume_matrix() provides.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55990
2026-03-24 11:38:41 +01:00
Christos Margiolis 4324e0fa71 sound: Remove SND_DIAGNOSTIC section in buffer.c
The purpose of this has not been documented, but it seems like it makes
it possible to view the maximum number of bytes that passed to
sndbuf_feed(), as well as the maximum number of cycles taken inside its
main loop. These do not seem particularly useful anymore.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55989
2026-03-24 11:38:41 +01:00
Christos Margiolis b9f9fc473e sound: Do not create root feeder in chn_init()
The feeder chain gets destroyed when feeder_chain() is called, which is
after the chn_reset() call in chn_init() further down for primary chans,
or vchan_create() for vchans. This makes the root feeder creation in
chn_init() essentially a no-op. Remove it altogether and let
feeder_chain() after chn_reset() take care of creating the feeder
properly. It creates the root one as well.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55941
2026-03-24 11:38:40 +01:00
Christos Margiolis 6755f558c1 sound: Remove endianness checks for format table declarations
This a legacy thing that is not needed anymore. We can support all of
them just fine.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55939
2026-03-24 11:38:40 +01:00
Christos Margiolis 9318336f2a sound: Retire SND_FEEDER_MULTIFORMAT and SND_FEEDER_FULL_MULTIFORMAT
There is no reason to have these legacy controls anymore, all these
formats can be handled just fine nowadays.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55937
2026-03-24 11:38:40 +01:00
Christos Margiolis 12633057f5 sound: Retire unused Z_MULTIFORMAT
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-03-24 11:38:40 +01:00
Christos Margiolis 712bd9b275 sound: Retire SND_MULTICHANNEL
SND_MULTICHANNEL is always defined, so SND_CHN_MAX will also always be
8. Apart from the fact that there is no other place in the code that
touches SND_MULTICHANNEL, there is also no good reason nowadays to set
SND_CHN_MAX to 2.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55934
2026-03-24 11:38:40 +01:00
Christos Margiolis bf0e5d987e sound: Retire SND_OLDSTEREO
This is a legacy option and does not serve a good purpose anymore.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55933
2026-03-24 11:38:40 +01:00
Christos Margiolis 5d311c7532 sound: Retire SND_DEBUG
Not useful anymore.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55932
2026-03-24 11:38:40 +01:00
Christos Margiolis a2fd964a95 snd_uaudio: Retire UAUDIO_MAX_CHAN()
It's a no-op.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55924
2026-03-24 11:38:40 +01:00
Christos Margiolis a49e925489 sound: Match midi_write() return values with midi_read()
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55920
2026-03-24 11:38:40 +01:00
Christos Margiolis 039477d3e7 snd_uaudio: Simplify chan->curr_cable calculation in uaudio_bulk_write_callback()
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55918
2026-03-24 11:38:39 +01:00
Christos Margiolis 0a7749d943 snd_uaudio: Rename uaudio_hid_probe() to uaudio_hid_attach()
This makes more sense.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
2026-03-24 11:38:39 +01:00
Christos Margiolis e67dbccc70 snd_uaudio: Rename umidi_probe() to umidi_attach()
This performs an attach, not probe.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55900
2026-03-24 11:38:39 +01:00
Bojan Novković c09ccfc266 libc/db: Remove unused hash functions in hash_func.c
Prune unused code hidden behind 'notdef', bringing us in sync with
the changes in OpenBSD. Despite the `__default_hash` function pointer
having external linkage, no ABI change is expected since it was
never exported.

Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D55842
Reviewed by:	allanjude, des
MFC after:	2 weeks
2026-03-24 11:34:55 +01:00
Bojan Novković 6ad94d549e libpmc/pmu-events: Add support for new json fields
This change adds support for three new Intel fields to jevents.c:
 - MetricThreshold
 - MetricgroupNoGroup
 - DefaultMetricgroupName

Reviewed by:	ali_mashtizadeh.com, mhorne
Differential Revision:	https://reviews.freebsd.org/D56017
MFC after:	1 week
2026-03-24 11:34:12 +01:00
Bojan Novković cb9e242216 pmc: Import Intel Meteor Lake events
Obtained from:	Intel perfmon (JSON event definitions)
Tested by:	bms, olivier
MFC after:	1 week
Reviewed by:	ali_mashtizadeh.com, mhorne
Differential Revision:	https://reviews.freebsd.org/D55641
2026-03-24 11:33:01 +01:00
Aymeric Wibo d8a8c890a1 acpi_spmc: Fix checking expected DSMs
Previously was or'ing the indices of the DSMs directly, not their
corresponding bits. This commit rectifies this.

Reviewed by:	olce
Approved by:	olce
Fixes:	c5daa5a4c3 ("acpi_spmc: Add system power management controller driver")
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/https://reviews.freebsd.org/D56062
2026-03-24 16:00:58 +08:00
Majed Alkhaleefah c586944fa2 hid/hgame: Fix desync in hgame_dpad_cb()
hgame_dpad_cb() previously exited early whenever conflicting directions
were input (e.g., UP + DOWN) without saving said input to the
hgame_softc state. This led to a desync between the driver and the
gamepad.

This patch instead handles conflicting inputs by cancelling them out
with each other.

Remove early return. Calculate axis value by subtraction.

Reviewed by:	obiwac
Approved by:	obiwac
Differential Revision:	https://reviews.freebsd.org/D55849
2026-03-24 14:37:19 +08:00
Kristof Provost c6bcf6e6fd pf: include all elements when hashing rules
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-24 05:27:21 +01:00
Kristof Provost 66d66dd0f6 pfctl: always warn if a duplicate rule was detected
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-24 05:27:20 +01:00
Kristof Provost ab74151e8d pf tests: verify that we handle address range rules correctly
There's been a problem where rules which differed only in address ranges
were considered duplicates and not added. Test for this.

MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-24 05:27:20 +01:00
Michael Gmelin 1fa873c93c pf: Fix hashing of IP address ranges
This corrects the false detection of duplicate rules.

MFC after:	1 week
Reviewed by:	kp
2026-03-24 05:27:20 +01:00
Gleb Smirnoff 73f72ca08d tcp: make TCP_TRK_TRACK_FLG_* flags visible to userland programs
These flags are used in BBLog entries.
2026-03-23 14:55:59 -07:00
Paulo Fragoso 2318ea10a3 hwpmc.4: correct stale default values and update diagnostics
The default values documented for kern.hwpmc.logbuffersize (4KB) and
kern.hwpmc.nbuffers_pcpu (64) have been incorrect since 2981a3420cb1
(2018), which updated the compiled defaults but did not update the
man page.

- Correct logbuffersize default from 4KB to 256KB, add 16MB maximum
- Correct nbuffers_pcpu default from 64 to 32, document 32MB per-CPU
  product limit with kern.hwpmc.logbuffersize
- Update DIAGNOSTICS section to reflect current warning messages

Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	NLINK (nlink.com.br)
Differential Revision:	https://reviews.freebsd.org/D56050
2026-03-23 17:21:28 -03:00
Paulo Fragoso b3a18736ec hwpmc: improve diagnostic messages for invalid tunables
Replace printf() with log(LOG_WARNING, ...) in pmclog_initialize()
so that tunable validation failures are visible in dmesg and
/var/log/messages rather than only on the early console.

Also improve the messages to report both the invalid value and the
default it resets to, making it easier for users to understand why
their tunable was ignored.

While here, adjust some whitespacing/style.

Reviewed by:	Ali Mashtizadeh <ali@mashtizadeh.com>, mhorne
MFC after:	1 week
Sponsored by:	NLINK (nlink.com.br)
Differential Revision:	https://reviews.freebsd.org/D56029
2026-03-23 17:21:28 -03:00
Ali Mashtizadeh df47355fae libpmc: Add support for IBS qualifiers
Add support to libpmc for parsing the IBS qualifiers and computing the
ctl register value as a function of the qualifiers and the sample rate.
This includes all of the flags available up to AMD Zen 5.  Along side
these user facing changes I included the documentation for AMD IBS.

Reviewed by:	mhorne
Sponsored by:	Netflix
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2081
2026-03-23 17:21:28 -03:00
Ali Mashtizadeh 39515d8b62 hwpmc: Use rdtsc instead of rdtscp for timestamps
No need for a barrier here, we are inside an NMI handler and executing a
number of serializing instructions with stronger semantics. Reducing
this overhead will increase our maximum safe sampling rate.

Tested by:	Paulo Fragoso <paulo@nlink.com.br>
Reviewed by:	mhorne
MFC after:	1 week
Sponsored by:	Netflix
Pull Request:	https://github.com/freebsd/freebsd-src/pull/2076
2026-03-23 17:21:21 -03:00
Jessica Clarke 47402c9422 cross-build: Provide mempcpy when building on macOS
We could patch the tzcode config to not use it, but it's simple to
provide an implementation of it and avoid spreading cross-build
bootstrapping special cases.

Fixes:		ff2c98b30b ("tzcode: Update to 2026a")
MFC after:	1 week
2026-03-23 16:56:09 +00:00
Ed Maste b5b9517bfe libcbor: Update to 0.13.0
Sponsored by:	The FreeBSD Foundation
2026-03-23 11:41:51 -04:00
Mariusz Zaborski fce6921464 Revert "capsicum-test: remove stale file"
This was unintended, sorry.

This reverts commit 20b99e3a14.
2026-03-23 15:45:13 +01:00
Mariusz Zaborski 09c5bb3542 nvmf: Fix null ptr reference
Reported by:	Nikolay Denev <ndenev@gmail.com>
Reviewed by:	imp, jhb
Differential Revision:	https://reviews.freebsd.org/D55863
2026-03-23 15:37:28 +01:00
Mariusz Zaborski 20b99e3a14 capsicum-test: remove stale file 2026-03-23 15:34:34 +01:00
Peter Holm 4f8a1b4dff stress2: Added syzkaller reproducers. Update the exclude file 2026-03-23 12:15:29 +01:00
Jose Luis Duran 8d99314a04 mtree: Add missing entries
Add missing mtree directory entries.  Without them, the resulting
worldstage METALOG file would produce an invalid (incomplete) mtree
specification file.

Reviewed by:	ivy
Differential Revision:	https://reviews.freebsd.org/D56013
2026-03-23 06:41:59 +00:00
Mateusz Piotrowski e23f0decea mdo.1: Cross-reference with security.7
MFC after:	3 days
Reviewed by:	olce
Differential Revision:	https://reviews.freebsd.org/D56024
2026-03-23 13:30:21 +08:00
Konstantin Belousov f0d5f46a1e mlx5: postpone freeing the completed command entity to taskqueue
because cancel_delayed_work_sync() might need to sleep, which cannot be
done in the interrupt thread where the completion runs.

Sponsored by:	Nvidia networking
MFC after:	1 week
2026-03-23 02:23:53 +02:00
Ed Maste 0427abbc78 Vendor import of libcbor 0.13.0
Sponsored by:	The FreeBSD Foundation
2026-03-22 10:32:11 -04:00
Ed Maste aa1599ed2b Vendor import of libcbor 0.12.0
Sponsored by:	The FreeBSD Foundation
2026-03-22 10:31:23 -04:00
Kristof Provost 434e1c3d84 pfctl tests: test rdr-to and nat-to in one rule
OpenBSD fixed this separately (in their 6a338f3f70). We appear to not
have had this bug, but test for it anyway.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-22 07:20:48 +01:00
Kristof Provost 343ace42f8 pfctl: parser must not ignore error from pfctl_optimize_ruleset()
Ignoring the error may cause pfctl(8) to load inconsistent ruleset
preventing pf(4) to enforce desired policy.

Issue reported and fix suggested by berts _from_ fastmail _dot_ com

'Looks good.' @deraadt

MFC after:	1 week
Obtained from:	OpenBSD, sashan <sashan@openbsd.org>, 9fd28a8cca
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-03-22 04:47:37 +01:00
Kristof Provost 0b0d34fd2f pf tests: verify first-match-wins for nat rules
Sponsored by:	Orange Business Services
2026-03-22 04:47:36 +01:00