Remove DEFAULT_DEVICE fallback to prevent cross-domain routing#302
Open
quic-vkatoch wants to merge 2 commits intoqualcomm:developmentfrom
Open
Remove DEFAULT_DEVICE fallback to prevent cross-domain routing#302quic-vkatoch wants to merge 2 commits intoqualcomm:developmentfrom
quic-vkatoch wants to merge 2 commits intoqualcomm:developmentfrom
Conversation
quic-anane
reviewed
Feb 25, 2026
ekanshibu
reviewed
Mar 3, 2026
Remove legacy DEFAULT_DEVICE fallback that could cause incorrect domain routing. Previously, if a requested domain's device nodes were unavailable, the code would fall back to the DEFAULT_DEVICE of the linked library (e.g., ADSP for libadsprpc.so), ignoring the user's domain request. Now each domain only attempts: secure node -> non-secure node, and fails cleanly if both are unavailable. This ensures device opening respects the user's requested domain. Additionally, replace verbose switch-case statement with IS_VALID_DOMAIN_ID check for cleaner, more maintainable code. This consolidates all domain cases (ADSP/MDSP/SDSP/CDSP/CDSP1/GDSP0/GDSP1) into unified logic and improves error handling. Signed-off-by: Vinayak Katoch <vkatoch@qti.qualcomm.com>
Replace duplicate get_secure_domain_name() and get_non_secure_domain_name() implementations with a single get_domain_device_names() function. - Add get_domain_device_names() in fastrpc_apps_user.c - Remove duplicate implementations from fastrpc_ioctl.c and adsp_default_listener.c - Remove unused device name macros from adsp_default_listener.c - Update callers to use unified function - Fix fastrpc_dev_exists() to accept full paths - Fix fastrpc_wait_for_device() basename extraction for inotify - Expose via fastrpc_internal.h Signed-off-by: Vinayak Katoch <vkatoch@qti.qualcomm.com>
quic-parihar
approved these changes
Mar 11, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Remove legacy DEFAULT_DEVICE fallback that could cause incorrect domain routing. Previously, if a requested domain's device nodes were unavailable, the code would fall back to the DEFAULT_DEVICE of the linked library (e.g., ADSP for libadsprpc.so), ignoring the user's domain request.
Now each domain only attempts: secure node -> non-secure node, and fails cleanly if both are unavailable. This ensures device opening respects the user's requested domain.
Consolidate all domain cases (ADSP/MDSP/SDSP/CDSP/GDSP) into unified logic and improve error handling.
Additionally, merge domain device name functions into a unified API by replacing separate get_secure_domain_name() and get_non_secure_domain_name() implementations with a single get_domain_device_names() function that returns both names in one call.
Supersedes #210 due to outdated and stale changes.
Fixes: #164