Conversation
Get Log Page decoded the zero-based dword count in 32 bits, so a request for more than four gigabytes could wrap to a small successful transfer before the MDTS check. The Open-Channel Set Log Page path decoded the count the same way. Keep the arithmetic wide until the length has been checked against the transfer helpers and chunk log bounds. Exercise wrapping counts with and without MDTS, along with the Open-Channel set path and ordinary transfers. Signed-off-by: Huaicheng Li <lhcwhu@gmail.com>
Zone Management Receive and I/O Management Receive evaluated their dword counts in 32 bits. Large requests could wrap to short successful reports, and the FDP status path did not enforce MDTS. Decode the counts in 64 bits and validate them before allocating or transferring a report. Leave the no-operation management command alone. Cover both report commands with wrapping counts and working controls. Signed-off-by: Huaicheng Li <lhcwhu@gmail.com>
Open Zone with the allocation bit returned success immediately when the zone already owned a ZRWA. A closed zone therefore stayed closed even though the host had successfully requested an explicit open. Skip allocation for an existing resource, but still perform the zone state transition. Charge a resource only when one is newly allocated. Test repeated close and reopen operations, resource exhaustion, and reuse after reset. Signed-off-by: Huaicheng Li <lhcwhu@gmail.com>
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.
Large log and management-report requests could wrap their dword counts into short transfers and return success. This series keeps the length arithmetic wide until validation, enforces the FDP status transfer limit, and rejects lengths the transfer APIs cannot represent.
It also fixes Open Zone with ZRWA allocation on a closed zone that already owns a ZRWA: the command now reopens the zone while preserving its existing resource. Previously it returned success without changing the zone state.
Validation: