Skip to contentSkip to conversation

Patch "powerpc/spufs: Fix hash faults for kernel regions" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jun 5, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

powerpc/spufs: Fix hash faults for kernel regions

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
powerpc-spufs-fix-hash-faults-for-kernel-regions.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From d75e4919cc0b6fbcbc8d6654ef66d87a9dbf1526 Mon Sep 17 00:00:00 2001

From: Jeremy Kerr <[email protected]>
Date: Wed, 24 May 2017 16:49:59 +1000
Subject: powerpc/spufs: Fix hash faults for kernel regions

From: Jeremy Kerr <[email protected]>

commit d75e4919cc0b6fbcbc8d6654ef66d87a9dbf1526 upstream.

Commit ac29c64089b7 ("powerpc/mm: Replace _PAGE_USER with _PAGE_PRIVILEGED") swapped _PAGE_USER for _PAGE_PRIVILEGED, and introduced check_pte_access() which denied kernel access to non-_PAGE_PRIVILEGED pages.

However, it didn't add _PAGE_PRIVILEGED to the hash fault handler for spufs' kernel accesses, so the DMAs required to establish SPE memory no longer work.

This change adds _PAGE_PRIVILEGED to the hash fault handler for kernel accesses.

Fixes ac29c64089b7 ("powerpc/mm: Replace _PAGE_USER with _PAGE_PRIVILEGED")
---
 arch/powerpc/platforms/cell/spu_base.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/powerpc/platforms/cell/spu_base.c +3 -1
@@ -197,7 +197,9 @@ static int __spu_trap_data_map(struct sp
 	    (REGION_ID(ea) != USER_REGION_ID)) {
 
 		spin_unlock(&spu->register_lock);
-		ret = hash_page(ea, _PAGE_PRESENT | _PAGE_READ, 0x300, dsisr);
+		ret = hash_page(ea,
+				_PAGE_PRESENT | _PAGE_READ | _PAGE_PRIVILEGED,
+				0x300, dsisr);
 		spin_lock(&spu->register_lock);
 
 		if (!ret) {

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/powerpc-spufs-fix-hash-faults-for-kernel-regions.patch