Skip to content

Conversation

FeldrinH
Copy link

@FeldrinH FeldrinH commented Aug 19, 2025

Fixes #1088.

This implements a simple but somewhat heavy-handed fix for the issue described in #1088:
If at least one of the tasks accessing a shared resource is an exception handler, then the access is protected by a global critical section, regardless of the priorities of tasks involved.

Unfortunately, this blocks all tasks, even those that have higher priority and do not access the shared resource. In the future it might be worthwhile to look into some way to mask the exception handlers (maybe by dynamically lowering exception priorities).

TODO:

  • Update documentation to note the new behavior.
  • Add note to changelog.
  • Add some kind of QEMU test for the locking.

PS: I know that the CI is failing, but as far as I can tell this is caused by automatic updates to the Rust toolchain used in the CI, not by my changes.

@perlindgren
Copy link
Collaborator

Thanks for working on this, I'll leave some general comments in the open issue.

/Per

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.

Unsoundness when using shared resources in exception handlers on ARMv6-M
2 participants