oxidecomputer / oxidecomputer/propolis
nvme: Add more validation around feature parameters
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 270
- Forks
- 42
- Avg merge
- 4d 5h
- Merged PRs (30d)
- 6
Description
A few notes on validation here that I think we want to check:
- cdw11 is used by features to control behavior on a per-feature basis. I would like to see us constrain this to be zero and drop an error if not so we can add additional behavior over time.
- I don't see any logic checking the value of the CDW10 feature selector. Is that somewhere I missed? It looks like that's being dropped in
AdminCmd::parse. Doesn't have to be fixed in this change, but probably should be a follow up for us there. - I think it's okay that we're not checking the data pointer since the spec says it's ignored when the feature doesn't use it, which means it can have garbage.
- I feel less confident in cdw14 with feature by uuid, but I think it's probably okay in spirit.
Originally posted by @rmustacc in https://github.com/oxidecomputer/propolis/pull/1060#discussion_r2806725007
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in AdminCmd::parse and trace the NVMe feature-parameter handling, especially how cdw11 is passed to each feature. Confirm the expected behavior from the issue and existing validation paths, then add coverage for rejecting nonzero cdw11 values. The CDW10 selector is identified as a possible follow-up rather than required scope here.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100