oxidecomputer / oxidecomputer/humility

Hiffy-related bits assume enum discriminants are signed, sometimes bytes

Open
#471 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

:bug: bug
Dominant language
Rust
Stars
584
Forks
63
Avg merge
3h
Merged PRs (30d)
2

Description

This is a follow-on for #468. In #469 I fixed the cases where enums were being read from target memory (or memory images), but that's not every case where we do enum parsing.

There are several cases in Hiffy-related commands like rpc where we "parse" enums from data returned in an array of u32s. I didn't go ahead and fix these, because there's some cross-system shenanigans happening there that obscure whether the data is being e.g. zero-extended. Instead, I slapped TODOs on them.

At the time of this writing the affected crates were

  • cmd/rpc
  • cmd/validate
  • humility-idol
  • humility-hiffy

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the TODOs in the Hiffy-related enum parsing paths in cmd/rpc, cmd/validate, humility-idol, and humility-hiffy. Trace how enum values returned in arrays of u32s are transferred across systems, especially whether values are zero-extended, and update the affected parsing cases so signed and byte discriminants are handled correctly. Done means the remaining TODOs are resolved consistently with the fixes from #469.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.