linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] Fix PROT_NONE page permissions when !CPU_USE_DOMAINS
@ 2012-09-20 15:56 Will Deacon
  2012-09-20 15:56 ` [PATCH 1/4] ARM: mm: use pteval_t to represent page protection values Will Deacon
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Will Deacon @ 2012-09-20 15:56 UTC (permalink / raw)
  To: linux-arm-kernel

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(-)

-- 
1.7.4.1

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2012-09-21  9:32 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-20 15:56 [PATCH 0/4] Fix PROT_NONE page permissions when !CPU_USE_DOMAINS Will Deacon
2012-09-20 15:56 ` [PATCH 1/4] ARM: mm: use pteval_t to represent page protection values Will Deacon
2012-09-20 18:28   ` Nicolas Pitre
2012-09-20 21:07     ` Will Deacon
2012-09-21  8:48   ` Catalin Marinas
2012-09-20 15:56 ` [PATCH 2/4] ARM: mm: don't use the access flag permissions mechanism for classic MMU Will Deacon
2012-09-21  8:40   ` Catalin Marinas
2012-09-20 15:56 ` [PATCH 3/4] ARM: mm: introduce L_PTE_VALID for page table entries Will Deacon
2012-09-20 22:21   ` Russell King - ARM Linux
2012-09-21  9:22     ` Will Deacon
2012-09-20 15:56 ` [PATCH 4/4] ARM: mm: introduce present, faulting entries for PAGE_NONE Will Deacon
2012-09-20 22:12 ` [PATCH 0/4] Fix PROT_NONE page permissions when !CPU_USE_DOMAINS Russell King - ARM Linux
2012-09-20 22:23   ` Benjamin Herrenschmidt
2012-09-21  9:32   ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).