<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/cddl/dev, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<id>https://cgit-dev.freebsd.org/src/atom?h=main</id>
<link rel='self' href='https://cgit-dev.freebsd.org/src/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/'/>
<updated>2026-05-20T14:49:41Z</updated>
<entry>
<title>kinst/arm64: Handle an additional PC-relative instruction</title>
<updated>2026-05-20T14:49:41Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-05-20T14:49:41Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e6be6dedeea1e6d2e5206e1e7422e2d556a6da0c'/>
<id>urn:sha1:e6be6dedeea1e6d2e5206e1e7422e2d556a6da0c</id>
<content type='text'>
"ldr &lt;reg&gt;, &lt;literal&gt;" loads a value from a literal memory address into
a register.  It's PC-relative and so cannot be directly implemented
using the trampoline mechanism.  Unfortunately, on arm64 it can't easily
be emulated either since the return-to-EL1 handler does not restore
callee-saved registers, so like adr/adrp, we simply don't handle it.
These instructions are fairly rare in an arm64 kernel.

While here, refactor the code so that all instruction decoding is done
in one place: introduce an enum type which characterizes the instruction
type, add a helper to map instructions to enum values, and store the
corresponding enum value in the probe description.

Reviewed by:	christos
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D56988
</content>
</entry>
<entry>
<title>kinst/arm64: Fix return values from kinst_invop()</title>
<updated>2026-05-20T14:49:28Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-05-20T14:49:28Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=d6f0e671d0797b56011880f84d12ce5fb20bf099'/>
<id>urn:sha1:d6f0e671d0797b56011880f84d12ce5fb20bf099</id>
<content type='text'>
After commit 853cd8723494 it became invalid for kinst_invop() to return
0: dtrace_invop_start() would convert this to a sentinel value
indicating that it did not consume the breakpoint, and so we'd just
call kdb_trap() to handle it.

Change kinst_invop() to return NOP_INSTR after handling a matching
breakpoint.  NOP_INSTR is handled by advancing the ELR, so we have to
compensate by subtracting INSTR_SIZE before returning.

Reviewed by:	christos
MFC after:	1 week
Fixes:		853cd8723494 ("arm64: Clean up usage of the dtrace invop handler")
Differential Revision:	https://reviews.freebsd.org/D56987
</content>
</entry>
<entry>
<title>dtrace: Implement ustackdepth for arm64</title>
<updated>2026-02-17T20:22:05Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-02-17T17:37:42Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=afd64316c869eb00dde4d6b4af61bca0cb2197f1'/>
<id>urn:sha1:afd64316c869eb00dde4d6b4af61bca0cb2197f1</id>
<content type='text'>
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D52475
</content>
</entry>
<entry>
<title>sdt: Fix the probe ID type in struct sdt_probe</title>
<updated>2026-01-13T17:07:37Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2026-01-13T15:35:05Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=66eedcb0224df03e56513f3caf1df93a52b6a919'/>
<id>urn:sha1:66eedcb0224df03e56513f3caf1df93a52b6a919</id>
<content type='text'>
This is supposed to be a dtrace_id_t, which is a uint32_t, while id_t is
a uint64_t.  sdt.h avoids depending on dtrace.h so we can't use
dtrace_id_t directly.

Bump __FreeBSD_version since the layout of structures in the SDT probe
linker set has changed.

Sponsored by:	NetApp, Inc.
Sponsored by:	Klara, Inc.
</content>
</entry>
<entry>
<title>zfs: fix build after openzfs/zfs@e63d026b9</title>
<updated>2025-11-17T16:11:56Z</updated>
<author>
<name>Martin Matuska</name>
<email>mm@FreeBSD.org</email>
</author>
<published>2025-11-16T11:15:14Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=4303bde4297a3d19cabdb08ce1550f682578d2ba'/>
<id>urn:sha1:4303bde4297a3d19cabdb08ce1550f682578d2ba</id>
<content type='text'>
Fix Makefiles
Update zfs_config.h and zfs_gitrev.h
</content>
</entry>
<entry>
<title>dtrace/arm64: properly traverse the symbol table</title>
<updated>2025-10-29T17:52:42Z</updated>
<author>
<name>Konrad Witaszczyk</name>
<email>def@FreeBSD.org</email>
</author>
<published>2025-10-28T16:09:24Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=2acdec9e4d915ec61d0ca45b408f9beb7aa4b772'/>
<id>urn:sha1:2acdec9e4d915ec61d0ca45b408f9beb7aa4b772</id>
<content type='text'>
LINKER_EACH_FUNCTION_NAMEVAL() stops processing the symbol table if a
callback function returns a non-zero value.

The fbt_provide_module_function() callback should not return 1 when
ignoring symbols. Instead, always return 0, as in dtrace/x86.

Fixes:		30b68ecda84e ("Changes that improve DTrace FBT reliability on freebsd/arm64:")
Reviewed by:	markj, oshogbo
Approved by:	oshogbo (mentor)
Obtained from:	CheriBSD
Differential Revision: https://reviews.freebsd.org/D53399
</content>
</entry>
<entry>
<title>dtrace: Deduplicate dtrace_sync() and dtrace_xcall() implementations</title>
<updated>2025-09-18T22:09:49Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-09-17T15:29:48Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=bf115203bb8a61bd03ba23931ff0b5bf931b7d1b'/>
<id>urn:sha1:bf115203bb8a61bd03ba23931ff0b5bf931b7d1b</id>
<content type='text'>
dtrace_xcall() is just a thin wrapper around smp_rendezvous_cpus().
There's no need for six identical implementations to live in MD layers.

No functional change intended.

MFC after:	2 weeks
</content>
</entry>
<entry>
<title>sdt: Initialize probes in two passes</title>
<updated>2025-07-28T20:32:39Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-07-28T19:30:37Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=9a6ba186e0ca4269021d8843dbc8409ea78da4a6'/>
<id>urn:sha1:9a6ba186e0ca4269021d8843dbc8409ea78da4a6</id>
<content type='text'>
Suppose a kernel module A defines an SDT provider and probes, and kernel
linker file B, dependant on A, contains tracepoints for those probes.
When sdt.ko is loaded, it iterates over all loaded KLDs to initialize
probe structures and register them with dtrace.  In particular it uses
linker_file_foreach(), which is not sorted; in the above scenario, B may
be visited before A.  Thus, it's possible for sdt_kld_load_probes() to
try to add tracepoints to an uninitialized SDT probe.

An example of the above arises when pfsync, pf, and sdt are loaded in
that exact order after commit 4bb3b36577645.

Fix this by initializing probe structures in the first pass over loaded
KLDs.  Then, the second pass can safely add tracepoints to any probe
structure.

Note that the scenario where B and A are loaded after sdt.ko is already
handled properly, as there, the kld_load eventhandler is responsible for
registering probes with dtrace, and that eventhandler fires for
dependencies before it does for the dependent KLD.  This presumes,
however, that there are no cycles in the dependency graph.

Reported by:	jenkins
MFC after:	2 weeks
</content>
</entry>
<entry>
<title>machine/stdarg.h -&gt; sys/stdarg.h</title>
<updated>2025-06-11T16:39:02Z</updated>
<author>
<name>Brooks Davis</name>
<email>brooks@FreeBSD.org</email>
</author>
<published>2025-06-11T16:39:02Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=e453e498cbb88570a3ff7b3679de65c88707da95'/>
<id>urn:sha1:e453e498cbb88570a3ff7b3679de65c88707da95</id>
<content type='text'>
Switch to using sys/stdarg.h for va_list type and va_* builtins.

Make an attempt to insert the include in a sensible place.  Where
style(9) was followed this is easy, where it was ignored, aim for the
first block of sys/*.h headers and don't get too fussy or try to fix
other style bugs.

Reviewed by:	imp
Exp-run by:	antoine (PR 286274)
Pull Request:	https://github.com/freebsd/freebsd-src/pull/1595
</content>
</entry>
<entry>
<title>dtrace/profile: Stop storing the probe name in struct profile_probe</title>
<updated>2025-06-04T21:13:08Z</updated>
<author>
<name>Mark Johnston</name>
<email>markj@FreeBSD.org</email>
</author>
<published>2025-06-04T21:13:08Z</published>
<link rel='alternate' type='text/html' href='https://cgit-dev.freebsd.org/src/commit/?id=98ef590f77392159938d2e6f9fd45bf31d10b9c1'/>
<id>urn:sha1:98ef590f77392159938d2e6f9fd45bf31d10b9c1</id>
<content type='text'>
It's unused, and the naked strcpy() was susceptible to buffer overflow
if one creates, say, a probe called "profile-2000000000ns".

Reported by:	CHERI
MFC after:	1 week
Sponsored by:	Innovate UK
</content>
</entry>
</feed>
