Skip to content

Fix PROT_NONE page permissions when !CPU_USE_DOMAINS

Will Deacon linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ARM: mm: use pteval_t to represent page protection valuesarch/arm/mm/mmu.c+1 -12 replies
1/4ARM: mm: use pteval_t to represent page protection values+0 -00 replies
2/4ARM: mm: don't use the access flag permissions mechanism for classic MMUarch/arm/mm/proc-v7-2level.S+2 -21 reply
3/4ARM: mm: introduce L_PTE_VALID for page table entriesarch/arm/include/asm/pgtable-2level.h arch/arm/include/asm/pgtable-3level.h arch/arm/include/asm/pgtable.h +2 more+6 -61 reply
3/4ARM: mm: introduce L_PTE_VALID for page table entries+0 -00 replies
4/4ARM: mm: introduce present, faulting entries for PAGE_NONEarch/arm/include/asm/pgtable-2level.h arch/arm/include/asm/pgtable-3level.h arch/arm/include/asm/pgtable.h +3 more+16 -30 replies

Reviews trailers per patch

3 of 6 patches have a Reviewed-by or Acked-by.

PatchNicolas PitreCatalin Marinas
1/4A-b A-b
1/4A-b A-b
2/4A-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.

Read the v1 thread

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