soundwire: stream: validate slave port properties#5849
Open
kunjinkao-os wants to merge 1 commit into
Open
Conversation
sdw_slave_port_config() validates that a port number is within the generic valid range, but does not verify that the Slave exposes the port for the requested stream direction. As a result, an in-range but unsupported port can be accepted. Use sdw_get_slave_dpn_prop() to perform the direction-specific lookup and reject unsupported ports before storing the runtime configuration. Signed-off-by: Eric Wu <kunjinkao.jp@gmail.com>
Collaborator
|
Can one of the admins verify this patch?
|
Author
|
test this please |
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.
sdw_slave_port_config() currently checks whether a port number is in
the generic valid range, but it does not check whether the Slave
actually exposes that port for the requested stream direction.
This means that an in-range but unsupported port, or a valid port used
in the wrong direction, can be accepted.
Use sdw_get_slave_dpn_prop() to perform the direction-specific lookup
before accepting the port configuration.
Local build testing was done with GCC 9.4 using allmodconfig, W=1 and
-Werror for the following architectures:
All builds completed without warnings or errors.
I do not have SoundWire hardware available locally, so I would
appreciate testing on the available SOF SoundWire platforms.