rpms/kernel/F-7 linux-2.6-ppc-data-exception.patch, NONE, 1.1 kernel-2.6.spec, 1.3234, 1.3235

David Woodhouse (dwmw2) fedora-extras-commits at redhat.com
Thu Jun 21 03:41:16 UTC 2007


Author: dwmw2

Update of /cvs/pkgs/rpms/kernel/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv19698

Modified Files:
	kernel-2.6.spec 
Added Files:
	linux-2.6-ppc-data-exception.patch 
Log Message:
fix ppc data exception problem

linux-2.6-ppc-data-exception.patch:

--- NEW FILE linux-2.6-ppc-data-exception.patch ---
Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ba4ace39fdfe22268daca9f28c5df384ae462cf
Commit:     9ba4ace39fdfe22268daca9f28c5df384ae462cf
Parent:     7c8545e98468c53809fc06788a3b9a34dff05240
Author:     Segher Boessenkool <segher at kernel.crashing.org>
AuthorDate: Wed Jun 20 01:07:04 2007 +1000
Committer:  Paul Mackerras <paulus at samba.org>
CommitDate: Wed Jun 20 22:07:38 2007 +1000

    [POWERPC] PowerPC: Prevent data exception in kernel space (32-bit)
    
    The "is_exec" branch of the protection check in do_page_fault()
    didn't do anything on 32-bit PowerPC.  So if a userland program
    jumps to a page with Linux protection flags "---p", all the tests
    happily fall through, and handle_mm_fault() is called, which in
    turn calls handle_pte_fault(), which calls update_mmu_cache(),
    which goes flush the dcache to a page with no access rights.
    
    Boom.
    
    This fixes it.
    
    Signed-off-by: Segher Boessenkool <segher at kernel.crashing.org>
    Cc: Johannes Berg <johannes at sipsolutions.net>
    Signed-off-by: Paul Mackerras <paulus at samba.org>
---
 arch/powerpc/mm/fault.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index bfe9013..115b25f 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -279,14 +279,13 @@ good_area:
 #endif /* CONFIG_8xx */
 
 	if (is_exec) {
-#ifdef CONFIG_PPC64
+#if !(defined(CONFIG_4xx) || defined(CONFIG_BOOKE))
 		/* protection fault */
 		if (error_code & DSISR_PROTFAULT)
 			goto bad_area;
 		if (!(vma->vm_flags & VM_EXEC))
 			goto bad_area;
-#endif
-#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
+#else
 		pte_t *ptep;
 		pmd_t *pmdp;
 


Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-7/kernel-2.6.spec,v
retrieving revision 1.3234
retrieving revision 1.3235
diff -u -r1.3234 -r1.3235
--- kernel-2.6.spec	19 Jun 2007 21:29:18 -0000	1.3234
+++ kernel-2.6.spec	21 Jun 2007 03:40:40 -0000	1.3235
@@ -427,6 +427,7 @@
 # 300 - 399   ppc(64)
 Patch300: linux-2.6-g5-therm-shutdown.patch
 Patch301: linux-2.6-powerpc-slabalign.patch
+Patch302: linux-2.6-ppc-data-exception.patch
 Patch303: linux-2.6-ppc32-ucmpdi2.patch
 Patch304: linux-2.6-ibmvscsi-schizo.patch
 Patch305: linux-2.6-pmac-zilog.patch
@@ -1108,7 +1109,8 @@
 %patch300 -p1
 # Ensure slab objects are aligned enough for a uint64_t (#235392)
 %patch301 -p1
-#%patch302 -p1
+# Fix data exception problem
+%patch302 -p1
 # Temporary hack to work around GCC PR #25724 / #21237
 %patch303 -p1
 # Fix up ibmvscsi for combined pSeries/iSeries build




More information about the fedora-extras-commits mailing list