oxidecomputer / oxidecomputer/hubris

H7 I2C driver appears to have an off-by-one in interrupt handling.

Open
#1,129 0 comments 0 reactions 1 assignee View on GitHub

@cbiffle is already working on this.

Since Feb 7, 2023.

Dominant language
Rust
Stars
3.6k
Forks
239
Avg merge
1d 12h
Merged PRs (30d)
23

Description

Using kernel trace, we've observed the H7 driver idling for periods of microseconds-milliseconds, and based on the syscall trace it appears to be handling interrupts slightly wrong.

There are two components.

First: it consistently waits for its interrupt (using a closed recv) before enabling the interrupt. This will only work if it's previously accumulated an unhandled notification, since interrupts are only delivered when enabled. I'm not totally sure how this is working at all, so I may have missed something.

Second: when it enables interrupts we often see it immediately take one, which suggests that something had already pended and the sleep-wait it's attempting isn't working.

More data needed, noting this so it's not in my brain.

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.