1. 24 9月, 2009 1 次提交
  2. 27 8月, 2009 1 次提交
    • B
      powerpc/mm: Cleanup handling of execute permission · ea3cc330
      Benjamin Herrenschmidt 提交于
      This is an attempt at cleaning up a bit the way we handle execute
      permission on powerpc. _PAGE_HWEXEC is gone, _PAGE_EXEC is now only
      defined by CPUs that can do something with it, and the myriad of
      #ifdef's in the I$/D$ coherency code is reduced to 2 cases that
      hopefully should cover everything.
      
      The logic on BookE is a little bit different than what it was though
      not by much. Since now, _PAGE_EXEC will be set by the generic code
      for executable pages, we need to filter out if they are unclean and
      recover it. However, I don't expect the code to be more bloated than
      it already was in that area due to that change.
      
      I could boast that this brings proper enforcing of per-page execute
      permissions to all BookE and 40x but in fact, we've had that now for
      some time as a side effect of my previous rework in that area (and
      I didn't even know it :-) We would only enable execute permission if
      the page was cache clean and we would only cache clean it if we took
      and exec fault. Since we now enforce that the later only work if
      VM_EXEC is part of the VMA flags, we de-fact already enforce per-page
      execute permissions... Unless I missed something
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      ea3cc330
  3. 20 8月, 2009 1 次提交
  4. 07 4月, 2009 1 次提交
    • P
      powerpc: Fix oops when loading modules · 11b55da7
      Paul Mackerras 提交于
      This fixes a problem reported by Sean MacLennan where loading any
      module would cause an oops.  We weren't marking the pages containing
      the module text as having hardware execute permission, due to a bug
      introduced in commit 8d1cf34e ("powerpc/mm: Tweak PTE bit combination
      definitions"), hence trying to execute the module text caused an
      exception on processors that support hardware execute permission.
      
      This adds _PAGE_HWEXEC to the definitions of PAGE_KERNEL_X and
      PAGE_KERNEL_ROX to fix this problem.
      Reported-by: NSean MacLennan <smaclennan@pikatech.com>
      Signed-off-by: NPaul Mackerras <paulus@samba.org>
      11b55da7
  5. 24 3月, 2009 1 次提交
    • B
      powerpc/mm: Merge various PTE bits and accessors definitions · 71087002
      Benjamin Herrenschmidt 提交于
      Now that they are almost identical, we can merge some of the definitions
      related to the PTE format into common files.
      
      This creates a new pte-common.h which is included by both 32 and 64-bit
      right after the CPU specific pte-*.h file, and which defines some
      bits to "default" values if they haven't been defined already, and
      then provides a generic definition of most of the bit combinations
      based on these and exposed to the rest of the kernel.
      
      I also moved to the common pgtable.h most of the "small" accessors to the
      PTE bits and modification helpers (pte_mk*). The actual accessors remain
      in their separate files.
      Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
      71087002