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

ARM: Cortex-M: CPU is not reporting Explicit MemManage Stacking Errors correctly #25612

Closed
ioannisg opened this issue May 26, 2020 · 0 comments · Fixed by #25609
Closed

ARM: Cortex-M: CPU is not reporting Explicit MemManage Stacking Errors correctly #25612

ioannisg opened this issue May 26, 2020 · 0 comments · Fixed by #25609
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Milestone

Comments

@ioannisg
Copy link
Member

Describe the bug
Currently, Cortex-M has a bug in error reporting of Stacking Errors that are not, additionally, Data Access Violation Errors. The utility macro, IS_MPU_GUARD_VIOLATION(), implements the wrong logic wrt the input fault_addr (faulting address).

To Reproduce
To reproduce this, we need to trigger a Stacking error that is not, additionally, a MemManage Data Access Violation Error (to do that we need to make sure that the stack overflow occurs because the CPU tries to stack an exception frame and exactly this operation results in overflow). The Cortex-M fault mechanism will assert, complaining that the Stacking error is not due to a stack overflow.

Expected behavior
We expect the Cortex-M Core fault handing mechanism to not Assert when parsing processor memory violation faults.

Impact
Medium severity. There is definitely an error in the fault handing logic. Stack overflows are never missed (so it is not a very critical bug), however, the processor Asserts inside the fault handler. Only affects ARMv7-M architecture with HW_STACK_PROTECTION enabled.

Screenshots or console output
See #25348 , this contains an error log showing the assert statement being hit.

Additional context

  • Needs backporting to LTS.
  • Needs test coverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant