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

Firmware panic #266

Open
4 of 5 tasks
isaacvr opened this issue Oct 31, 2019 · 0 comments
Open
4 of 5 tasks

Firmware panic #266

isaacvr opened this issue Oct 31, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@isaacvr
Copy link
Contributor

isaacvr commented Oct 31, 2019

Feature description

Add ability to freeze firmware execution

Is your feature request related to a problem? Please describe.
If critical crypto conditions detected then device should be locked to prevent access to coins and preserve funds in wallet.

Describe the solution you'd like
Implement a function that relies on built-in device traps to halt device execution .

Describe alternatives you've considered
Setting a flag in order to exit main loop gracefully , might be hijacked (i.e. flag value reverted after failure detected but prior to loop conditional).

Additional context
Skycoin core panics if some (serious) crypto errors are detected at run time . This is to protect coins . Firmware does not support doing so .

Possible implementation

  • Add void panic(char *) in error.h
  • Trigger EXTI0 ISR from software so as to abandon stack execution context right away and enter an infinite loop in the end
  • Send Failure message with Failure_FirmwarePanic reason
  • Replace inline TODO comments related to abort() in skycoin-api with a call to panic()
  • Implement firmware panic for emulator by displaying error message and disabling all interaction
@isaacvr isaacvr added this to the v2 milestone Oct 31, 2019
@olemis olemis self-assigned this Dec 5, 2019
@olemis olemis modified the milestones: v2, v3 Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants