Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

ePMP question for entry priority rule. #13

Open
marvin-hc-liu opened this issue Nov 23, 2021 · 1 comment
Open

ePMP question for entry priority rule. #13

marvin-hc-liu opened this issue Nov 23, 2021 · 1 comment

Comments

@marvin-hc-liu
Copy link

Base on the pmp priority rule, the entries are statically prioritized. It means higher priority result can override lower priority entry. In this scenario, MML is set, and higher priority is S/U mode only and low priority is M mode only. The code can be tampered, and pmpcfg modified to OFF or pmpaddr modified size to change higher priority entry region. It could cause M-Mode execute new code even MML set. I must misunderstand something, this situation should be forbidden. ePMP chapter3.2, mentions : “Since PMP rules with a higher priority override rules with a lower priority, locked rules must precede non-locked rules.” It means, the priority rule has to change, and the locked entry will get higher priority even using entry 15? In above case, the address of overlap entry, the epmp result is based on M-mode property?

@jahanzebkhalid-10Xe
Copy link

No it does not mean that you locked entry will get the higher priority even if it is in the last entry.

Since PMP rules with a higher priority override rules with a lower priority, locked rules must precede non-locked rules

It means that software should always write locked rules in the entries preceding the entries with non-locked rules which also means that if software does not follow it the non-locked rule in the preceding entry will priority over locked rules which is not supposed to happen.
I hope you get my answer

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants