-
Notifications
You must be signed in to change notification settings - Fork 781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spi_device] Incoming address size cannot be validated #16411
Comments
just curious, wouldn't this get picked up through payload length or something? |
@tjaychen There is no payload for Sector Erase, though :) And you can't validate the payload length for commands with variable payload lengths. |
Ah, thanks for the clarification. |
Triaged for |
I'm not super confident on this estimate and hence I have leaned towards pessimism. If it is not deferred, recommend to re-evaluate.
|
This was actually fixed in #21120. I forgot that the address FIFO is written all at once, so there is no need to separately track the number of bytes written -- It will either be 0 or the number indicated by the address mode. |
In flash/passthrough modes, the spi_device IP does not give any indication of how long the transaction actually was, so transactions using the wrong address mode may pass through. This might only be of interest for invalidating shortened Sector Erase transactions, where 3 bytes of address was provided when the address mode required 4 bytes of address.
This is tagged for a future release. It falls into the category of robustness in an environment with errors, but it is not critical for the current stepping.
Effort estimate by @hcallahan-lowrisc:
The text was updated successfully, but these errors were encountered: