]> git.karo-electronics.de Git - karo-tx-linux.git/commit
powerpc/fsl-booke: Fix InstructionTLBError execute permission check
authorLi Yang <leoli@freescale.com>
Fri, 7 May 2010 08:38:34 +0000 (16:38 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Jul 2010 18:22:20 +0000 (11:22 -0700)
commit88693deb5838c3e0c69e03791ef7361ca77c8043
tree935600916a68e486505bb37da43ad36c9d243d4b
parent71f530c0cbe1d180d527ef4dec4013e8bcee37c3
powerpc/fsl-booke: Fix InstructionTLBError execute permission check

commit 78e2e68a2b79f394b7cd61e07987a8a89af907f7 upstream.

In CONFIG_PTE_64BIT the PTE format has unique permission bits for user
and supervisor execute.  However on !CONFIG_PTE_64BIT we overload the
supervisor bit to imply user execute with _PAGE_USER set.  This allows
us to use the same permission check mask for user or supervisor code on
!CONFIG_PTE_64BIT.

However, on CONFIG_PTE_64BIT we map _PAGE_EXEC to _PAGE_BAP_UX so we
need a different permission mask based on the fault coming from a kernel
address or user space.

Without unique permission masks we see issues like the following with
modules:

Unable to handle kernel paging request for instruction fetch
Faulting instruction address: 0xf938d040
Oops: Kernel access of bad area, sig: 11 [#1]

Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Jin Qing <b24347@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/powerpc/kernel/head_fsl_booke.S