You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RDKEMW-24390: Mitigate Mythos Findings in RDK Logger - #64
Prevent long process names from exceeding Unix socket path limits
src/rdk_dynamic_logger.c:72
A 100-character process name with module LOG.RDK.TEST fits the existing 128-byte packet limit (120 bytes total), but /tmp/.logger/<name>.<pid> exceeds Linux's 108-byte sun_path even with a one-digit PID. The receiver therefore cannot initialize, and the matching construction in utils/rdklogctrl.c rejects the target too. Use a bounded filename, such as PID-only, consistently in the receiver, controller, and documentation so previously supported names remain controllable.
Initialize child control socket before its first log call
src/rdk_dynamic_logger.c:137
After an initialized application forks or daemonizes, the child has no PID-specific socket until its first log call reaches this branch. Calling rdk_logger_init() in the child does not help: src/rdk_logger_init.c:61 skips initialization because isLogInited is inherited. Thus rdklogctrl targeting an initialized but idle child fails with ENOENT rather than queuing a level change. Establish the child's endpoint through PID-aware post-fork initialization or an explicit lifecycle hook, and test sending a request before the child's first log call.
Restore 64-byte component-name boundary regression test
unittests/rdkLoggerDynamic.cpp:367
This removes the positive 64-byte component-name regression test while retaining oversized-name rejection tests. An off-by-one change that rejects the maximum valid name would now go undetected. Restore a PID-based boundary test that sends a 64-byte name and verifies that the receiver processes the update.
Publish child control sockets after fork without requiring logging
src/rdk_dynamic_logger.c:137
After logger initialization followed by fork/daemonization, the child has no PID-specific endpoint until a log call reaches this branch. During that interval, rdklogctrl <child-pid> ... fails with ENOENT rather than queuing a change. Calling rdk_logger_init() again does not create the endpoint because the child inherits isLogInited == true. Provide a post-fork initialization path that publishes the child's socket without requiring a log message first.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Forked children remain unreachable by runtime log control until their first logging call.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Publish child control endpoint immediately after fork
src/rdk_dynamic_logger.c:137
When an initialized process forks or daemonizes, the child's PID-specific socket is not published until a logging call reaches this branch. Until then, rdklogctrl <child-pid> ... fails with ENOENT instead of queuing an update. Calling rdk_logger_init() again does not help because the child inherits isLogInited == true. Provide a supported post-fork initialization path that publishes the child's endpoint without requiring a log call, and test control of a child before it logs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement per-process Unix datagram socket replacing UDP broadcast