-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix portSWITCH_TO_USER_MODE() on Armv7-M MPU ports #803
Conversation
…ged task requests to be unprivileged
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #803 +/- ##
=======================================
Coverage 93.62% 93.62%
=======================================
Files 6 6
Lines 2508 2508
Branches 598 598
=======================================
Hits 2348 2348
Misses 107 107
Partials 53 53
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ded macros, remove the incorrect attribute comments
/bot run formatting |
c6d3547
to
398e82b
Compare
Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Signed-off-by: Gaurav Aggarwal <[email protected]>
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Description
A task's privilege level is stored in
ulTaskFlag
member in the TCB. Current implementation ofportSWITCH_TO_USER_MODE()
does not update this flag but just lowers the processor's privilege level. This results in many APIs incorrectly determining task's privilege level and access permissions -This PR fixes the
portSWITCH_TO_USER_MODE()
implementation to correctly update theulTaskFlag
member in the TCB before lowering the processor's privilege level.Test Steps
Tested on Cortex-M7.
Checklist:
Related Issue
NA.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.