Skip to content

[nvme_driver] set width limits on fields in nvme_driver fuzzer - #4402

Open
Hadi Orabi (babayet2) wants to merge 3 commits into
microsoft:mainfrom
babayet2:nvme_fuzz
Open

[nvme_driver] set width limits on fields in nvme_driver fuzzer#4402
Hadi Orabi (babayet2) wants to merge 3 commits into
microsoft:mainfrom
babayet2:nvme_fuzz

Conversation

@babayet2

Copy link
Copy Markdown
Collaborator

This PR stops the nvme_driver fuzzer from creating false positives panics. Previously, the fuzzer would submit reservation commands with 8-bit action fields, though the field is only 3 bits wide.

Copilot AI lite review requested due to automatic review settings September 9, 2026 01:13
@babayet2
Hadi Orabi (babayet2) enabled auto-merge (squash) September 9, 2026 01:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The functional change correctly constrains fuzz input to the specified field width, with only a minor doc-comment mismatch noted.

Pull request overview

This PR reduces false-positive panics in the nvme_driver fuzzer by constraining reservation command “action” inputs to the actual bit-width defined by the NVMe spec bitfields.

Changes:

  • Added a shared RESERVATION_ACTION_MAX constant (derived from a 3-bit field width) in the NVMe spec definitions, with compile-time assertions tying it to the relevant bitfields.
  • Updated the nvme_driver fuzzer’s Arbitrary generation for reservation action fields to only generate values within 0..=RESERVATION_ACTION_MAX.
File summaries
File Description
vm/devices/storage/nvme_spec/src/nvm.rs Exposes a max-value constant for reservation action field width and adds compile-time consistency checks with the bitfield definitions.
vm/devices/storage/disk_nvme/nvme_driver/fuzz/fuzz_nvme_driver.rs Limits fuzz-generated reservation action values to the defined 3-bit range to avoid width-related panics.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread vm/devices/storage/nvme_spec/src/nvm.rs Outdated
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Copilot AI review requested due to automatic review settings September 9, 2026 17:29

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, clearly scoped to eliminating fuzzer-only false positives, and include compile-time invariants to prevent future drift.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

One or more custom setup steps configured for this repository failed during this Copilot code review run:

Restore packages

Setup steps run before each review. If the review above is missing context, or no review was posted at all, the failing step above may be the cause. See the workflow run for failure details, fix your setup steps configuration, and re-request a review.

Note

You can configure setup steps for Copilot code review separately from Copilot cloud agent with a copilot-code-review.yml file. Read the docs for details.

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants