Commit graph zephyr/subsys
Author SHA1 Message Date
Saksham Gupta
c684962b84 shell: replace deprecated k_sleep with k_msleep
This replaces the older k_sleep(K_MSEC(time)) pattern with the modern,

more efficient k_msleep(time) API. This prevents double-macro expansion

overhead and adheres to Zephyr's preferred timeout style.

Signed-off-by: Saksham Gupta <saksham77779@gmail.com>
2026-08-05 23:26:50 +01:00
Anas Nashif
0cec6586d1 pm: device_runtime: fix maybe-uninitialized warning
K_SPINLOCK() expands to a for loop, so the compiler cannot prove the
guarded block always executes and warns that ret is used uninitialized
on return from runtime_usage_put():

  subsys/pm/device_runtime.c:116:16: warning: 'ret' may be used
  uninitialized [-Wmaybe-uninitialized]

Both branches inside the block assign ret, so this is a false positive.
Initialize ret at declaration, matching runtime_usage_put_fast() which
already initializes its return value for the same reason.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-05 17:58:36 -04:00
Robert Lubos
7d981a30ec net: coap: client: Fix ACK/RST address on connected sockets
Connected transports (TLS/DTLS, offloaded sockets) may not report a
per-packet source address, so replying to a received packet with the
unpopulated address made ACK/RST fail. Use the received source when the
transport provides one, otherwise fall back to the request's address.

Assisted-by: Cursor:claude-opus-4.8
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-08-05 18:42:46 +01:00
Adarsha Regmi
8925ae2806 toolchain: llvm: add ELD (ld.eld) linker support
ELD (“Embedded Linker”) is Qualcomm's open source, LLVM-based,
GNU-compatible linker designed for the needs of embedded systems. It can be
selected as an alternative to LLD when building Zephyr with the LLVM
toolchain.

This change adds a CONFIG_LLVM_USE_ELD Kconfig option and the required
CMake integration to locate ld.eld and use it during linking. A minimum ELD
version is enforced (22.0+) to ensure required linker-script features are
available.

ELD was discussed in several Zephyr Toolchain WG meetings from February
through June 2026. The meeting notes include links to recordings and
presentation slides covering key features such as linker plugins, LTO with
linker scripts, section budgeting, and rich diagnostics for facilitating
debugging.

Meeting notes: https://docs.google.com/document/d/1nFKhdhbxKhECvcVhwHQNytov3TbcN_eDUvPwPXlmXEM/edit#heading=h.8l0u6j5vo01p
Recording: https://zoom.us/rec/share/ztjugOyQ_zZcOf9zrZpomk2zxxE6aWeyvVJIUP2L-enc_wFubVJARkhOGlpzIEV2.nzAOoV97lPNrm_EB
Slides: https://riscv.atlassian.net/wiki/download/attachments/159286264/Invited%20Talk%20-Qualcomm%20Embedded%20Linker%20%E2%80%93%20Open%20sourcing.pdf?api=v2

ELD repository: https://github.com/qualcomm/eld
ELD docs: https://qualcomm.github.io/eld/

Prebuilt ELD binaries can be found on eld's github releases page:
https://github.com/qualcomm/eld/releases

Signed-off-by: Adarsha Regmi <aregmi@qti.qualcomm.com>
2026-08-05 18:36:15 +01:00
Jakub Rzeszutko
3268045e90 shell: fix state race between shell_stop() and state_collect()
shell_stop() read/wrote sh->ctx->state without taking the shell lock.
If a command was still running on the shell thread, state_collect()
would finish with an unconditional state_set(ACTIVE), clobbering the
SHELL_STATE_INITIALIZED shell_stop() had just set. The log backend
was left disabled and shell_start() would then fail with -ENOTSUP.

Fix by having shell_stop() take the same lock shell_thread() already
holds during shell_process()/state_collect(), like shell_start()
already does. Returns -EBUSY if the lock is busy.

Fixes #115019

Signed-off-by: Jakub Rzeszutko <jakub.rzeszutko@verkada.com>
2026-08-05 14:10:05 +01:00
Holt Sun
8d6e134a39 pm: device_runtime: fix lost usage count update race
The get/put fast paths update pm->base.usage under the global runtime
PM spinlock, but the slow paths update the same non-atomic counter
while holding only the per-device semaphore. A pm_device_runtime_get()
call from an ISR can then interleave with the last-user
pm_device_runtime_put() read-modify-write running in a thread: the
fast path sees usage == 1 with the device active, increments the
counter and returns 0, and the interrupted thread overwrites the
counter with 0 and suspends the device. The ISR ends up holding a
runtime PM reference on a suspended device and the usage count is
permanently off by one.

Serialize all usage read-modify-write sequences of the non-ISR-safe
paths through the global spinlock: the unbalanced check, decrement and
last-user decision in runtime_suspend(), the suspend failure restores,
the slow-path get increment and the resume failure decrement. State
keeps being written under the per-device semaphore: every transition
away from the active state happens with usage == 0, which is now
visible under the spinlock, so the fast-path "usage > 0 and state
active" check cannot claim a reference on a device that is about to be
suspended. The ISR-safe paths already serialize everything under the
per-device spinlock and are unchanged. The counter updates are
factored into small runtime_usage_*() helpers so that every
read-modify-write visibly goes through the same lock.

The race window was confirmed on qemu_x86 by disassembly (the usage
load and store are split across a branch, so the timer IRQ can be
delivered in between) and reproduced deterministically with the stress
test added in the following commit, which fails without this fix and
passes with it.

Fixes the race left open by commit 46e5ba3732 ("pm: device_runtime:
Fix managing the device from multiple contexts").

Signed-off-by: Holt Sun <holt.sun@nxp.com>
2026-08-05 13:56:30 +01:00
Etienne Carriere
081f273f50 usb: Use diamond include for non-local header files
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.

This change was made running scripts/check_quoted_includes.py script
proposed in https://github.com/zephyrproject-rtos/zephyr/pull/112135
with the Linux shell command below and manually selecting the applicable
changes:
$ ./scripts/check_quoted_includes.py -w subsys/usb/

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-08-05 13:54:13 +01:00
Aleksandr Senin
e702b3aedc net: ppp: lcp: reset peer compression options on link down
lcp_open() resets the peer async control character map and lcp_down()
clears the negotiated authentication protocol, but nothing clears the
peer PFC and ACFC requests. After a link drop they survive into the next
session, so a peer that stops asking for compression is still recorded as
having asked for it.

Clear both in lcp_down(), which runs on every link loss, and in lcp_open()
for the initial state.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Aleksandr Senin <al@meshium.net>
2026-08-05 09:31:30 +02:00
Aleksandr Senin
4028d187ed net: ppp: do not reject a protocol received in compressed form
ppp_send_proto_rej() ignores its protocol argument; ppp_send_pkt() builds
the Rejected-Protocol field by copying the received frame from offset zero,
so the field is whatever arrived on the wire. Under PFC that is a single
octet, while RFC 1661 ch. 5.7 requires the Rejected-Protocol field to be
two octets.

The packet has no headroom to expand the field in place, so skip the reject
for a compressed protocol instead of emitting a malformed one. This is
reachable for an inbound 0x21 with CONFIG_NET_IPV4=n, or 0x57 with
CONFIG_NET_IPV6=n, where the IP fast path is compiled out.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Aleksandr Senin <al@meshium.net>
2026-08-05 09:31:30 +02:00
Aleksandr Senin
b356cc2bec net: ppp: lcp: negotiate PFC and ACFC options
Add LCP negotiation for Protocol-Field-Compression (RFC 1661 option 7)
and Address-and-Control-Field-Compression (option 8), behind new Kconfig
NET_L2_PPP_OPTION_PFC / NET_L2_PPP_OPTION_ACFC (default off).

Follows the existing PPP_MY_OPTION / PPP_PEER_OPTION pattern: advertise
the flag options in my-options so the peer knows we can receive the
compressed form, and record a peer request in ctx->lcp.peer_options.

This is the negotiation layer only. Compressing on transmit is not
implemented, and the receive path accepts compressed frames independently
of what was negotiated.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Aleksandr Senin <al@meshium.net>
2026-08-05 09:31:30 +02:00
Anas Nashif
3854bccc16 posix: mqueue: take the queue reference under the list lock
mq_open() looked the queue up under mq_sem, released it, and only then
incremented ref_count, so a concurrent mq_close()/mq_unlink() could remove
and free the object in that window - a use-after-free on the increment.

Re-confirm the queue is still linked and take the reference without
dropping the lock.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-05 09:30:42 +02:00
Anas Nashif
6d721de13a net: ieee802154: guard authtag_len subtraction in encrypt/decrypt paths
ieee802154_create_data_frame() and ieee802154_decrypt_data() computed
payload_len = total_len - ll_hdr_len - authtag_len without verifying
that total_len >= ll_hdr_len + authtag_len. A crafted or short frame
caused a uint8_t underflow, producing a ~4 GB payload length passed to
the crypto layer.

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-05 09:30:25 +02:00
Cesar Vandevelde
a6e4ca2cad usb: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
72aa7742b3 lorawan: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
82ee376736 input: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
1371852396 fido2: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
113f39ce4a net: shell: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
1afbf98ca8 net: occp: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
d50b786954 net: latmon: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Cesar Vandevelde
66d5f445a4 net: ip: net_mgmt: use K_MSGQ_DEFINE_STATIC_TYPE
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.

Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
2026-08-04 18:46:53 +01:00
Fin Maaß
c85abd4a20 net: wifi: shell: remove redundant k_mutex_init
wifi_ap_sta_list_lock is already init at build time
with K_MUTEX_DEFINE, so we don't need the k_mutex_init.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-08-04 16:46:57 +01:00
Måns Ansgariusson
e93bca31a3 kernel: remove KERNEL define from CMake
The KERNEL define polluted namespace it was only really used for the ztest
unit test framework. This commit removes the define and updates the ztest
code to use the unittest define instead.

Signed-off-by: Måns Ansgariusson <mansgariusson@gmail.com>
2026-08-04 16:39:10 +01:00
Etienne Carriere
0752acc401 usb: device_next: Correct trace message specifier
Correct the trace message %zu specifier added by commit e5bc5c7a6d
that that should rather be %u since argument is not of size_t or like
type.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2026-08-04 16:37:52 +01:00
Alex Ciascai
aba9febb1f bluetooth: mpl: Reject track changes while inactive
Handling Previous Track and Next Track in this state
allowed mpl to dereference and advance track state,
then transition to Paused. This behavior contradicts
the MCS state model and causes failures.
Reject Next Track and Previous Track commands while
the Media Player is in the Inactive state. Handle
both opcodes like the other commands that are invalid
while the player is inactive.

Signed-off-by: Alex Ciascai <ext-alexandru.ciascai@nordicsemi.no>
2026-08-04 06:54:42 -04:00
Emil Gydesen
d97fc16a7b Bluetooth: ASCS: Rename ase->ase_id where appropriate
Rename some struct fields from ase to ase_id[s] where
the value reflect an ASE ID. This is to avoid any confusion
with `struct bt_ascs_ase *ase` variables.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2026-08-04 06:52:51 -04:00
Tomi Fontanilles
9e448644e3 net: lib: lwm2m: make CONFIG_LWM2M_DTLS_SUPPORT enable Mbed TLS
When DTLS support is enabled lwm2m_engine.c includes
mbedtls/ssl_ciphersuites.h which requires Mbed TLS to be enabled.

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2026-08-04 06:52:41 -04:00
Sudan Landge
90aeee3cd5 profiling: perf: add Cortex-M stack sampling backend
Add a Cortex-M perf backend that samples interrupted context from the
SysTick exception frame.

Install a SysTick wrapper when stack-sampling perf is enabled and
capture the interrupted stack pointer, EXC_RETURN, and r7 on exception
entry. Validate the complete hardware-stacked frame, including optional
alignment padding and extended FP state, against the Thread-mode or
Handler-mode stack before unwinding with arch_stack_walk().

The Arm stack walker uses EHABI unwind tables, so the backend does not
require CONFIG_FRAME_POINTER. Preserve r7 because EHABI unwind recipes
may use it to recover VSP even when frame pointers are not enabled
globally.

Return -EAGAIN when the interrupted context is invalid or unavailable
so the perf core discards that sample without reporting buffer
exhaustion.

Limit the backend to uniprocessor configurations because its captured
sample state is global and remote SMP sampling does not enter the
SysTick wrapper.

Disable the backend for Non-secure Trusted Execution images. A
Non-secure SysTick can be taken while the core executes Secure code,
but Non-secure firmware cannot access the Secure exception frame.
The stack pointer read by the wrapper instead refers to the suspended
Non-secure context, so it cannot be unwound as the interrupted frame.

Sampling across Security states is unsupported.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2026-08-04 06:52:02 -04:00
Sudan Landge
1c6ee7fd15 profiling: perf: handle skipped samples
Extend arch_perf_current_stack_trace() to distinguish samples that
should be skipped from buffer exhaustion. Keep zero as the existing
full-buffer signal and use negative values for samples that should be
discarded without stopping recording.

Change the return type to int across the existing backends. Their
current zero-on-exhaustion behavior remains unchanged.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2026-08-04 06:52:02 -04:00
Sudan Landge
e8431ddc77 profiling: perf: gate backend sources on perf
Only add perf backend sources when CONFIG_PROFILING_PERF is enabled.

This keeps backend source selection tied to the perf subsystem instead
of evaluating backend files when the perf command itself is disabled.

Signed-off-by: Sudan Landge <sudan.landge@arm.com>
2026-08-04 06:52:02 -04:00
Robert Lubos
3facb6769d net: context: Validate bind address against the bound interface
When a context was bound to a specific interface, net_context_bind()
still looked the requested address up across all interfaces, so a bind
could succeed with an address owned by a different interface. Restrict
the lookup to the bound interface with
net_if_ipv{4,6}_addr_lookup_by_iface().

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-08-03 15:06:19 -04:00
Robert Lubos
8721bea4bd net: if: Add net_if_ipv4_addr_lookup_by_iface()
Add an IPv4 counterpart to net_if_ipv6_addr_lookup_by_iface(), along with
its raw variant, so callers can check whether an address is assigned to
one specific interface instead of scanning all of them.

Assisted-by: Cursor:claude-opus-5
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2026-08-03 15:06:19 -04:00
Anas Nashif
0fd394521d shell: telnet: document that the backend is unauthenticated
The telnet backend exposes the full Zephyr shell over an unauthenticated,
unencrypted TCP port, which is equivalent to granting full device control
to anyone who can reach the port. There is no in-tree authentication to
switch on, so add the security warning to the Kconfig help, mirroring the
guidance already given for MCUMGR_GRP_SHELL.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 15:05:19 -04:00
Lyle Zhu
c95281e79c bluetooth: classic: bip: Fix disconnect response buffer parameter
`bt_bip_disconnect_rsp()` was incorrectly passing NULL instead of the
`buf` parameter to `bt_obex_disconnect_rsp()`.  This prevented any
optional headers in the disconnect response from being sent. And
leading a result that the passed `buf` will not be released anymore.

Pass the `buf` parameter through to `bt_obex_disconnect_rsp()` so that
optional headers can be included in the disconnect response as
intended. And also the passed buffer `buf` will be managed by the
underlay if the OBEX disconnect response is sent without any errors
via the function `bt_obex_disconnect_rsp()`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2026-08-03 15:04:43 -04:00
Benjamin Cabé
a119dbf957 build: bump minimum CMake version to 3.28.0
Raise the minimum required CMake version from 3.20.0 (documented as
3.20.5) to 3.28.0, which is satisfied by the CMake 3.28.3 package
shipped in the Ubuntu 24.04 LTS repositories. Ubuntu 24.04 is the
current Ubuntu LTS release targeted by the Zephyr getting started
guide, and by the time of the next Zephyr release, Ubuntu 22.04 will be
within months of its end of standard support. Users of distributions
shipping an older CMake can use the Kitware APT repository or a
pip-installed CMake, as the documentation already suggests.

Raising the floor to 3.28 unlocks a range of modern CMake features for
the build system, among which the cmake_file_api() command (3.27),
file(COPY_FILE) (3.21), block()/endblock() (3.25), and allows removal
of several version-conditional workarounds.

The tree-wide cmake_minimum_required() occurrences in samples, tests
and boards are updated accordingly, together with the documentation
and the sysbuild CMake presets. The IAR C-STAT integration keeps its
own higher requirement (4.1.0).

Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2026-08-03 15:03:35 -04:00
Chang An
fbd71c30f7 Bluetooth: BAP: Fix stream QoS validation for multi-conn groups
The bt_bap_stream_qos() function validates ASE operations for all
streams in the unicast group, but it should only validate streams
that belong to the specified connection.

When a unicast group contains streams from multiple connections,
the current implementation incorrectly validates streams belonging
to other connections, which may cause false -EBADMSG errors if
those streams are in different states.

Add a connection check to skip streams that do not belong to the
specified connection during ASE operation validation.

Signed-off-by: Chang An <chang.an_1@nxp.com>
2026-08-03 15:03:20 -04:00
Andrea Gilardoni
814d4deed4 net: tcp: recv: restore packet queue when peeking
Addressing the issue for which packets may be reordered after a peek on
tcp socket. The process of requeuing an observed packet may be
incomplete, when the peek size is not large enough to visit all the
packets in the queue.

Signed-off-by: Andrea Gilardoni <a.gilardoni@arduino.cc>
2026-08-03 15:00:45 -04:00
Anas Nashif
d935e4d616 net: lwm2m: check find_msg() result in notify reply callback
find_msg() returns NULL when no message matches the given reply, but
notify_message_reply_cb() dereferenced it unconditionally. Bail out
instead, like the other find_msg() call sites in this file already do.

Reported by the GCC static analyzer (-Wanalyzer-null-dereference).

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Assisted-by: Claude:claude-opus-5
2026-08-03 08:51:38 -04:00
Anas Nashif
dc159fd9cb tracing: ctf: add syscall tracing
tracing_syscall.h had no CTF branch, so syscalls were untraced under CTF
(only SystemView and the test format hooked them). Add
tracing_ctf_syscall.h, mirroring the SystemView integration: it maps
sys_port_trace_syscall_enter and _exit to CTF events recording the
syscall id (and, on entry, the syscall name as a bounded string). Wire
it in with a CONFIG_TRACING_CTF branch in tracing_syscall.h, plus the
event ids, emitters, trampolines and TSDL metadata.

The header includes <zephyr/types.h> rather than <zephyr/kernel.h>: it
is pulled in very early from the generated syscall dispatch, before the
kernel types are complete.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
cee80e9c22 tracing: ctf: add pm_system tracing
CTF emitted no events for PM system suspend (enter/exit with the tick
budget and chosen power state); the sys_port_trace_pm_system_* hooks
fell through to the no-op fallback, so it was invisible in a CTF trace.

Add CTF coverage for every hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
1e999d0735 tracing: ctf: add pm_device_runtime tracing
CTF emitted no events for the PM device runtime API (get, put,
put_async, enable, disable); the sys_port_trace_pm_device_runtime_*
hooks fell through to the no-op fallback, so it was invisible in a CTF
trace.

Add CTF coverage for every hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
b5135ad87f tracing: ctf: add rtio tracing
CTF emitted no events for rtio (submit, sqe/cqe acquire/release/consume,
cqe submit, txn and chain next, sqe cancel); the sys_port_trace_rtio_*
hooks fell through to the no-op fallback, so it was invisible in a CTF
trace.

Add CTF coverage for every hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
d8d94aaa91 tracing: ctf: add k_pipe tracing
CTF emitted no events for k_pipe (init, reset, close, write and read)
for the current pipe API; the sys_port_trace_k_pipe_* hooks fell through
to the no-op fallback, so it was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

The old-API pipe hooks (get/put/flush/cleanup/alloc_init) have no call
site and are left to the no-op fallback.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
fbca1e9724 tracing: ctf: add k_heap_sys tracing
CTF emitted no events for the system heap
k_malloc/k_calloc/k_aligned_alloc/k_realloc/k_free family; the
sys_port_trace_k_heap_sys_* hooks fell through to the no-op fallback, so
it was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
cc1e7d4bf5 tracing: ctf: add k_heap tracing
CTF emitted no events for k_heap (init, alloc, aligned_alloc, calloc,
realloc and free); the sys_port_trace_k_heap_* hooks fell through to the
no-op fallback, so it was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
ef03bec8a0 tracing: ctf: add k_stack tracing
CTF emitted no events for k_stack (init, alloc_init, cleanup, push and
pop); the sys_port_trace_k_stack_* hooks fell through to the no-op
fallback, so it was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
9fdbb3fc0e tracing: ctf: add k_lifo tracing
CTF emitted no events for k_lifo (init, put and alloc_put, get); the
sys_port_trace_k_lifo_* hooks fell through to the no-op fallback, so it
was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
f0839daa37 tracing: ctf: add k_fifo tracing
CTF emitted no events for k_fifo (init, put and alloc_put, put_list,
put_slist, get, peek head/tail, cancel_wait); the
sys_port_trace_k_fifo_* hooks fell through to the no-op fallback, so it
was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Anas Nashif
f009676994 tracing: ctf: add k_queue tracing
CTF emitted no events for k_queue (init, append/prepend and their alloc
variants, insert, append_list, merge_slist, get, remove, unique_append
and peek); the sys_port_trace_k_queue_* hooks fell through to the no-op
fallback, so it was invisible in a CTF trace.

Add CTF coverage for every live hook: the event ids, ctf_top_* emitters,
sys_trace_* trampolines and prototypes, the sys_port_trace_* macros and
the matching TSDL event definitions in the metadata.

k_queue_insert_blocking has no kernel call site and is left to the no-op
fallback.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2026-08-03 08:49:29 -04:00
Ederson de Souza
e228a7104b pmci: mctp: Add missing <zephyr/init.h> includes
Both mctp_memory.c and mctp_log.c were using SYS_INIT_NAMED without the
right include - were working only due transitive includes. Make it
explicit so it work on all architectures.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2026-08-03 08:49:18 -04:00
Tim Pambor
97b6f2c944 secure_storage: make init priority configurable
Add a CONFIG_SECURE_STORAGE_INIT_PRIORITY option to allow
changing the initialization priority of the secure storage
subsystem.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2026-08-03 08:48:21 -04:00