Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Earlgrey: dont call debug in interrupt top half #2126

Merged
merged 1 commit into from Sep 25, 2020

Conversation

hudson-ayers
Copy link
Contributor

Pull Request Overview

This pull request replaces calls to debug!() in the top half interrupt handler for the earlgrey chip with panic!(). If these calls executed it could cause UB, as the Tock kernel assumes that kernel code is not reentrant, and debug!() calls UART code.

I came across this while symbolically executing interrupt handlers in Tock.

Testing Strategy

N/A

TODO or Help Wanted

How bad is the possibility of a reentrant panic that this in theory could introduce?

Documentation Updated

  • No updates are required.

Formatting

  • Ran make prepush.

@phil-levis
Copy link
Contributor

I agree with removing debug!() from a safety standpoint, but do we need to panic!()?

Copy link
Contributor

@alistair23 alistair23 left a comment

Choose a reason for hiding this comment

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

I agree with panic here, these should never happen.

@bradjc
Copy link
Contributor

bradjc commented Sep 25, 2020

bors r+

@bors bors bot merged commit 361eb3b into tock:master Sep 25, 2020
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.

None yet

4 participants