Commit graph

2 commits

Author SHA1 Message Date
Ben Wolsieffer 57ed0a7ae9 logging: multidomain_link: fix crash caused by drop notification
The remote domain may send unsolicited Z_LOG_MULTIDOMAIN_ID_DROPPED IPC
messages, which are not handled in log_multidomain_link_on_recv_cb().
With CONFIG_ASSERT=y, this will cause an assertion failure. With asserts
disabled, this message would be treated as a reply to any in progress
request and cause getter_msg_process() to return early. In turn, this
can cause various kinds of memory corruption when the real reply arrives
and the callback reads/writes stack variables that are no longer valid.

Fix this by explicitly ignoring Z_LOG_MULTIDOMAIN_ID_DROPPED, and also
don't treat unrecognized message types as replies.

Signed-off-by: Ben Wolsieffer <benwolsieffer@gmail.com>
2024-04-18 11:12:35 +02:00
Krzysztof Chruscinski 6c785b5677 logging: Add remote link and backend
Added implementation of link and backend that are intended to
complement each other. Both requires transport function hooks
to be provided.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2022-10-17 10:16:53 +02:00