Fix PROT_NONE page permissions when !CPU_USE_DOMAINS
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | ARM: mm: use pteval_t to represent page protection valuesarch/ | +1 | 2 replies | |
| 1/4 | ARM: mm: use pteval_t to represent page protection values | +0 | 0 replies | |
| 2/4 | ARM: mm: don't use the access flag permissions mechanism for classic MMUarch/ | +2 | 1 reply | |
| 3/4 | ARM: mm: introduce L_PTE_VALID for page table entriesarch/ arch/ arch/ +2 more | +6 | 1 reply | |
| 3/4 | ARM: mm: introduce L_PTE_VALID for page table entries | +0 | 0 replies | |
| 4/4 | ARM: mm: introduce present, faulting entries for PAGE_NONEarch/ arch/ arch/ +3 more | +16 | 0 replies |
Reviews trailers per patch
3 of 6 patches have a Reviewed-by or Acked-by.
| Patch | Nicolas Pitre | Catalin Marinas |
|---|---|---|
| 1/4 | A-b | A-b |
| 1/4 | A-b | A-b |
| 2/4 | A-b | |
| 3/4 | ||
| 3/4 | ||
| 4/4 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/4] Fix PROT_NONE page permissions when !CPU_USE_DOMAINS
Hello,
After laughing at Ben H during LPC when it emerged that the PPC PROT_NONE protection bits don't prevent kernel access to the protected pages, I looked at the ARM code and, to my dismay, found that we have the same problem when not using domains.
This patch series addresses the issue with the following points worth noting:
- We use the last available software bit (11) for 2-level PTEs. Whilst this is somewhat of a pity, I can't think of a better reason to allocate it than to fix an outstanding bug.
- There is a horrible bug where the protection map values are currently truncated with LPAE -- that is also fixed in this series.
- We add a new L_PTE_VALID bit to allow for present, faulting pages in LPAE (where the software bits overlap with the hardware bits).
Taken against -rc6 and tested for both 2 and 3 levels of page table with a simple application reading an mprotect(PROT_NONE) region over a pipe.
All comments welcome,
Will
Will Deacon (4):
ARM: mm: use pteval_t to represent page protection values
ARM: mm: don't use the access flag permissions mechanism for classic
MMU
ARM: mm: introduce L_PTE_VALID for page table entries
ARM: mm: introduce present, faulting entries for PAGE_NONE
arch/arm/include/asm/pgtable-2level.h | 2 ++ arch/arm/include/asm/pgtable-3level.h | 4 +++- arch/arm/include/asm/pgtable.h | 10 ++++------ arch/arm/mm/mmu.c | 2 +- arch/arm/mm/proc-macros.S | 4 ++++ arch/arm/mm/proc-v7-2level.S | 10 +++++++--- arch/arm/mm/proc-v7-3level.S | 5 ++++- 7 files changed, 25 insertions(+), 12 deletions(-)
Signature · 1 line
1.7.4.1