commit | 7d731b4e9599088ac3073956933559da7bca6a00 | [log] [tgz] |
---|---|---|
author | Travis Geiselbrecht <travisg@google.com> | Tue Dec 07 03:27:16 2021 +0000 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Dec 07 03:27:16 2021 +0000 |
tree | 22482985c7dac6dfd52e418d423880cad15437d9 | |
parent | 85cf47932359ea76deef555e5ee0c79422c5ae98 [diff] |
[kernel][arm64][mmu] Fix bug where privileged executable pages are executable from EL0 Previously, was always setting UXN and PXN bits on pages explicitly mapped as non executable, not taking into account that user (EL0) code could access a privileged page because UXN wasn't set. Change the logic to appropriately set PXN and UXN bits on user and privleged executable pages, appropriately: user/privileged non-executable page: UXN=1, PXN=1 user executable page: UXN=0, PXN=1 privileged executable page: UXN=1, PXN=0 EL2 mappings for the kernel interpret these bits slightly differently, so simply map the non executable code as XN=1 (bit 54). Add kernel unit test to validate that pages mapped this way at least appear to be in sync with the aspace.Query() api. Bug: 88451 Change-Id: Icea7a3c5b5effa8b8fe828b3ed6d8e27433caaf0 Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/614141 Reviewed-by: Marco Vanotti <mvanotti@google.com> Commit-Queue: Travis Geiselbrecht <travisg@google.com>
Fuchsia an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.
We expect everyone interacting with our project to respect our code of conduct.
Read more about Fuchsia's principles.
See Getting Started.
See fuchsia.dev.