Commit Graph

306939 Commits

Author SHA1 Message Date
Baptiste Daroussin 4d5c434ed1 diff3: use bsd diff3 by default 2026-02-13 20:26:02 +01:00
Navdeep Parhar 605af06407 cxgbe(4): Show correct range of tids in sysctl_tids
The highest valid tid has to be adjusted for the hi-pri filter region.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2026-02-13 10:39:09 -08:00
Dag-Erling Smørgrav be7e4dc878 nvme: Use size_t for payload size
Using uint32_t here can cause spurious compiler warnings.  I assume it
was done to constrain the range; use a KASSERT instead.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D55279
2026-02-13 19:37:16 +01:00
Ed Maste 10ac7413c0 elf_common.h: Add some AArch32 relocations
Reviewed by:	mmel
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D55268
2026-02-13 13:37:01 -05:00
Robert Clausecker 1782bc9a0a libc/arm: use __builtin_trap() instead of abort() in aeabi_unwind stubs
This avoids a dependency on the abort symbol in libsys.

PR:		292539
Reviewed by:	mmel
Approved by:	markj (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55255
2026-02-13 18:52:25 +01:00
Jessica Clarke 6265f30cd6 libsys/arm: include ARM EABI unwind bits into libsys
libsys required ARM EABI unwind symbols like __aeabi_unwind_cpp_pr0.
These symbols are normally provided by libc, but if a binary does
not link libc, the symbol ends up not being resolved.

Among other problems, this prevented gcc14 and newer from building
on arm.

Add the relevant symbols as hidden symbols into libsys to avoid this
problem.

(this patch was posted by jrtc27 who has asked me to move it along)

PR:		292539
Tested by:	fuz, Mark Millard <marklmi26-fbsd@yahoo.com>
Reviewed by:	mmel
Approved by:	markj (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55255
2026-02-13 18:52:25 +01:00
Robert Clausecker 8efcc64928 Summary: *.3: misc man page fixes
Approved by:	markj (mentor)
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55249
2026-02-13 18:52:12 +01:00
Baptiste Daroussin 2cfca8e710 diff3: fix merge mode
Make the merge mode compatible with GNU diff3
Add tests for all the changes, those tests are extracted from the
etcupdate testsuite.

This version passes the etcupdate testsuite and the diffutils diff3
test suite.

MFC After:	1 week
2026-02-13 18:36:42 +01:00
Mark Johnston a8b8feced9 atf_python/vnet: Make it possible to set the FIB of vnet interfaces
Reviewed by:	zlei, ngie
MFC after:	1 week
Sponsored by:	Stormshield
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D54972
2026-02-13 16:02:09 +00:00
Dag-Erling Smørgrav 59906a163e ngctl: Fix buffer overflow in config command
Keep track of our buffer length when assembling the argument list.

PR:		293075
MFC after:	1 week
Reviewed by:	zlei, markj
Differential Revision:	https://reviews.freebsd.org/D55259
2026-02-13 16:57:58 +01:00
Dag-Erling Smørgrav 585190dff4 ngctl: Check hook name length
Check the length of the hook name when copying it into the sockaddr.

MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55258
2026-02-13 16:57:58 +01:00
Dag-Erling Smørgrav 3cbdcabf71 ngctl: Modernize code somewhat
* Replace fgets(3) with getline(3)

* Replace select(2) with poll(2)

* Avoid needlessly copying text around

* Correct use of getopt(3)

* Pick some style and whitespace nits

MFC after:	1 week
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D55257
2026-02-13 16:57:58 +01:00
Konstantin Belousov e7f86f8b13 kqtimer_proc_continue(): correct calculation of 'now'
It must be sbinuptime(), this is how kc->next is set up.

PR:	293141
Noted and reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D55264
2026-02-13 17:46:41 +02:00
Konstantin Belousov 75a30ea09f filt_timerexpire_l(): re-insert restarted timer into head instead of tail
of the resumed timers list, so that kqtimer_proc_continue() does not
iterated into the same timer again.

PR:	293141
Reviewed by:	markj
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential revision:	https://reviews.freebsd.org/D55264
2026-02-13 17:46:41 +02:00
Mark Johnston bf149f2e88 kmsan: Implement __msan_test_shadow()
This is needed when building OpenZFS with KMSAN enabled, as the bundled
zstd uses it.

MFC after:	1 week
2026-02-13 15:42:19 +00:00
Dag-Erling Smørgrav 394201ce5b tests: Simplify libarchive tests
The ATF tests work by first running the test program with an invalid
flag, which causes it to print an error message, a summary of options,
and a list of available test cases.  Switch to the new -l option which
simply prints the list, and simplify the awk script used to parse the
output.  No functional change.

MFC after:	1 week
2026-02-13 13:40:57 +01:00
Dag-Erling Smørgrav 1e2eea55c4 nvme: Change fail_on_reset to bool
This is safe since sysctl_handle_bool() handles ints transparently.

Sponsored by:	Klara, Inc.
Sponsored by:	NetApp, Inc.
Reviewed by:	imp
Differential Revision:	https://reviews.freebsd.org/D55263
2026-02-13 13:34:51 +01:00
Baptiste Daroussin 8d442cf32e diff3: fix diff3 -A
for cases where file2 differs but file1 and file3 agrees, the code
stored the file2 and file3 line numbers in the de[] editing script
entries but used them as if they were file1 line numbers.

Reviewed by:		thj
Differential Revision:	https://reviews.freebsd.org/D55276
2026-02-13 10:34:15 +01:00
Konstantin Belousov cb81a9c18d x86: provide extended description for x86_msr_op(9)
Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision: https://reviews.freebsd.org/D55045
2026-02-13 09:55:04 +02:00
Konstantin Belousov 36ceb5509d x86_msr_op(9): consistently return the value read from MSR
If the operation is executed on more than one CPU, a random instance of
the read value is returned.

Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55045
2026-02-13 09:55:04 +02:00
Konstantin Belousov af99e40af1 x86: add a safe variant of MSR_OP_SCHED* operations for x86_msr_op(9)
The modifier executes the operation using msr{read,write}_safe()
functions instead of plain msr reads and writes.  Returns EFAULT if any
MSR access caused #GP.

Reviewed by:	markj, olce
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D55045
2026-02-13 09:55:04 +02:00
Kevin Bowling 2bdec2ee73 e1000: Increase FC pause/refresh time on PCH2 and newer
This corresponds to Linux f74dc880098b4a29f76d756b888fb31d81ad9a0c

That commit does not provide any public background detail, but it's been
in use for over 5 years and corresponds to previous chip bugs w.r.t.
automatic generation of PAUSE frames.

Reviewed by:	kgalazka
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D54555
2026-02-12 23:33:43 -07:00
Abdelkader Boudih 1a6bdd6266 asmc: Convert driver to CTLFLAG_MPSAFE
Replace CTLFLAG_NEEDGIANT with CTLFLAG_MPSAFE for all sysctls.
The driver already uses spin mutexes (sc->sc_mtx) for hardware
access protection and does not require the Giant lock.

This improves scalability by allowing concurrent sysctl access
without Giant serialization.

Reviewed by:	ngie, adrian
Differential Revision:	https://reviews.freebsd.org/D54613
2026-02-12 19:00:46 -08:00
Navdeep Parhar afe55ae68e cxgbe(4): Fix assertion in timer calibration
The calibration callout is stopped when the adapter is marked off limits
but not when the adapter is merely stopped.

MFC after:	1 week
Sponsored by:	Chelsio Communications
2026-02-12 16:54:08 -08:00
Kristof Provost d03b6bb766 pf tests: verify blocked count on log interface
Also check the IPv6 pass/block numbers.

PR:		291763
MFC after:	1 week
Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-02-12 17:05:16 +01:00
Kristof Provost 1e7665e368 libpfctl: verify all parsers
List all currently defined parsers in 'all_parsers', and pass them to
SNL_VERIFY_PARSERS(). This will detect incorrect odering in parsers,
which will help us detect otherwise subtle bugs.

Sponsored by:	Rubicon Communications, LLC ("Netgate")
2026-02-12 17:05:16 +01:00
Eric A. Borisch 363b57d579 libpfctl: Sort order of snl attribute parser
snl atttribute parsers must be sorted by type, so PF_GS_BCOUNTERS
(16) must follow PF_GF_PCOUNTERS (15). Fix ordering and add a call
to SNL_VERIFY_PARSERS.

Without this fix, byte counters reported by 'pfctl -s info' with
a loginterface are always zero.

PR:		291763
MFC after:	1 week
Reviewed by:	kp
Signed-off-by:	eborisch@gmail.com
2026-02-12 17:05:16 +01:00
Siva Mahadevan 5fa297f4bc mixer/tests: use require.kmods property instead of ad-hoc checks
Reviewed by:	christos
Approved by:	lwhsu (mentor)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55221
2026-02-12 10:01:57 -05:00
Siva Mahadevan fbe6da7f75 libnv/tests: unskip nvlist_send_recv__send_many_fds__dgram
The test passes consistently for 1000+ consecutive iterations.

PR:		260891
Reviewed by:	oshogbo
Approved by:	lwhsu (mentor)
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
Differential Revision:	https://reviews.freebsd.org/D55223
2026-02-12 10:01:57 -05:00
Aymeric Wibo 0bba277f22 libc: Improve {,l,ll,imax}div(3) manpages
Mainly rename numerator parameter of div(3) and ldiv(3) from num to
numer, and explicitly specify what "numer", "denom", and "rem" mean in
the manpages.

MFC after:	3 days
Obtained from:	https://github.com/apple-oss-distributions/libc (partially)
Sponsored by:	Klara, Inc.
2026-02-12 15:55:14 +01:00
Cheng Cui 9778537b67 igc: remove M_HASHTYPE when RSS is not enabled
Summary: manually cherry-pick 21dd554d16

Reviewed by: kbowling
Differential Revision: https://reviews.freebsd.org/D55256
2026-02-12 09:33:29 -05:00
Alexander Ziaee 64e612b462 newsyslog.conf.5: Add a CAVEAT
PR:			282639
MFC after:		3 days
Reviewed by:		michaelo
Differential Revision:	https://reviews.freebsd.org/D55122
2026-02-12 09:14:48 -05:00
Mark Johnston 7c1c0e9436 rpc: Improve socket locking in svc_vc_accept()
so_state modifications must be synchronized by the socket lock.  For the
listening socket this probably doesn't matter but for the child socket I
think it's possible that this unlocked update clobbers a state
transition if the nascent connection is being disconnected for some
reason.

Also fix the line which potentially clears SS_NBIO in the listening
socket.

It is unclear whether this code is used at all.

Reviewed by:	glebius
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D55247
2026-02-12 14:00:43 +00:00
Mark Johnston be393b6f04 netinet6: Add a struct socket declaration to ip6_var.h
MFC after:	1 week
Reported by:	Ian FREISLICH <ianfreislich@gmail.com>
2026-02-12 13:59:40 +00:00
Aymeric Wibo c3f945eac4 libc: Remove leftover comments
These comments refer to a comment in div.c which doesn't exist anymore.

Fixes:	7c7299df76 ("libc: Remove support for pre-C99 C standards")
Sponsored by:	Klara, Inc.
2026-02-12 14:57:38 +01:00
Peter Holm 83693c121a stress2: Fix cleanup 2026-02-12 11:32:24 +01:00
Peter Holm 2b061bd179 stress2: Limit output from test 2026-02-12 11:31:36 +01:00
Konstantin Belousov 10fde71958 lib/libc/net/sockatmark.3: fix groff mdoc warning
PR:	293072
Sponsored by:	The FreeBSD Foundation
MFC after:	3 days
2026-02-12 09:56:42 +02:00
Konstantin Belousov c67d8acca3 sbin/setkey/setkey.8: cleanup groff mdoc warnings
PR:	293072
Sponsored by:	NVidia networking
MFC after:	3 days
2026-02-12 09:47:22 +02:00
Dmitry Morozovsky 0d9b5db9fc committers-ports: add andy
Following up ziaee's pattern, and add andy's line.
I'm not sure whether the original commit bit creation date should be used,
and use commit bit re-activation date for now.

MFC after:	1 week
2026-02-12 09:27:48 +03:00
Alexander Ziaee 261ed379c8 prepare-commit-msg: Sync with committers guide
Add `Discussed with:`, `Closes:`, `MFC to:`, and `Co-authored-by:` to
the commit message template from the committer's guide. While here,
wordsmith these to fit on standard console.

Reported by:		lwhsu
Discussed with:		emaste, jlduran
Reviewed by:		vexeduxr
Differential Revision:	https://reviews.freebsd.org/D54707
2026-02-11 23:46:19 -05:00
Maxim Konovalov 66797b469e pw.8: spell 2026-02-11 21:03:11 +00:00
Olivier Certner 2b728d3bbf hwpstate_amd(4): Move 'struct get_cppc_regs_data' & co. closer to use
No functional change (intended).

Sponsored by:   The FreeBSD Foundation
2026-02-11 21:43:23 +01:00
Olivier Certner c6a0eb7ada hwpstate_amd(4): Rename '*set_autonomous_hwp*()' => 'enable_cppc*()'
This is to better reflect that we are really enabling CPPC in these
functions and because we are likely to stop activating CPPC autonomous
mode by default in the near future.

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
2026-02-11 21:43:23 +01:00
Olivier Certner ebcd80f76e hwpstate_amd(4): Rename PSTATE_CPPC internal flag
While here, also rename check_cppc_enabled() => check_cppc_in_use().

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
2026-02-11 21:43:22 +01:00
Olivier Certner 4285340c60 hwpstate_amd(4): Style: Align 'machdep.hwpstate_amd_cppc_enable'
Align it like the rest.

No functional change (intended).

Sponsored by:   The FreeBSD Foundation
2026-02-11 21:43:22 +01:00
Olivier Certner a78e7c22c5 hwpstate_amd(4): Update copyright
Sponsored by:   The FreeBSD Foundation
2026-02-11 21:43:22 +01:00
Olivier Certner cec0ab0586 hwpstate_amd(4): Style: Sort headers
And separate includes from the rest with an additional newline.

Sponsored by:   The FreeBSD Foundation
2026-02-11 21:43:21 +01:00
Olivier Certner 7689e68506 hwpstate_amd(4): Add knobs to get/set all fields of CPPC_REQUEST
This will allow experimentations and finer-grained tuning to the full
extent allowed by the hardware, which is especially important given that
the spec leaves to hardware implementors an important leeway in
interpreting CPPC's numeric parameters, causing the same settings to
have different effects on different CPU models.

PR:             292615
Reviewed by:    aokblast (older version)
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55010
2026-02-11 21:43:21 +01:00
Olivier Certner 951788e373 hwpstate_amd(4): 'epp' sysctl leaf to operate on real EPP hardware values
We were using percents, for compatibility with hwpstate_intel(4), but
this looses granularity that might be important in some scenarios or
with specific CPU models.

For consistency, hwpstate_intel(4) should be changed accordingly, at the
expense of breaking compatibility.

For release notes: Introduction of hwpstate_amd(4) deserves a release
note, even if the original commit was not tagged.  Functionality
introduced by recent commits tagged with "Relnotes" should be mentioned
along that one.

PR:             292615
Reviewed by:    aokblast
Relnotes:       yes
Sponsored by:   The FreeBSD Foundation
Differential Revision:  https://reviews.freebsd.org/D55009
2026-02-11 21:43:21 +01:00