Skip to content
This repository has been archived by the owner on Apr 13, 2019. It is now read-only.

The address matching based on PMP entry priority is ignored #184

Open
dayeol opened this issue Jan 23, 2019 · 0 comments
Open

The address matching based on PMP entry priority is ignored #184

dayeol opened this issue Jan 23, 2019 · 0 comments

Comments

@dayeol
Copy link
Contributor

dayeol commented Jan 23, 2019

I found that the new PMP implementation skips any high-priority PMP rules.

See code below,
https://github.com/riscv/riscv-qemu/blob/riscv-qemu-3.1/target/riscv/pmp.c#L196

For example, if one of PMP entries matches, it must exit the loop and return result.
However, it only exits the loop when result is true, making all PMP entries ignored when result is false.

That breaks priority rule of the PMP, allowing any protection fails when lower-priority entry defines the address accessible.

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

1 participant