diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/misc_32.S | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_32.c | 18 |
2 files changed, 19 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/misc_32.S b/arch/powerpc/kernel/misc_32.S index 6a9b4bf0d173..bdc8b0e860e5 100644 --- a/arch/powerpc/kernel/misc_32.S +++ b/arch/powerpc/kernel/misc_32.S | |||
@@ -470,6 +470,8 @@ _GLOBAL(_tlbil_pid) | |||
470 | mfspr r3,SPRN_MMUCSR0 | 470 | mfspr r3,SPRN_MMUCSR0 |
471 | andi. r3,r3,MMUCSR0_TLBFI@l | 471 | andi. r3,r3,MMUCSR0_TLBFI@l |
472 | bne 1b | 472 | bne 1b |
473 | msync | ||
474 | isync | ||
473 | blr | 475 | blr |
474 | 476 | ||
475 | /* | 477 | /* |
@@ -486,6 +488,8 @@ _GLOBAL(_tlbil_va) | |||
486 | rlwinm r4,r4,0,1,31 | 488 | rlwinm r4,r4,0,1,31 |
487 | mtspr SPRN_MAS1,r4 | 489 | mtspr SPRN_MAS1,r4 |
488 | tlbwe | 490 | tlbwe |
491 | msync | ||
492 | isync | ||
489 | blr | 493 | blr |
490 | #endif /* CONFIG_FSL_BOOKE */ | 494 | #endif /* CONFIG_FSL_BOOKE */ |
491 | 495 | ||
diff --git a/arch/powerpc/kernel/signal_32.c b/arch/powerpc/kernel/signal_32.c index a6a43103655e..b13abf305996 100644 --- a/arch/powerpc/kernel/signal_32.c +++ b/arch/powerpc/kernel/signal_32.c | |||
@@ -941,9 +941,21 @@ long sys_swapcontext(struct ucontext __user *old_ctx, | |||
941 | #ifdef CONFIG_PPC64 | 941 | #ifdef CONFIG_PPC64 |
942 | unsigned long new_msr = 0; | 942 | unsigned long new_msr = 0; |
943 | 943 | ||
944 | if (new_ctx && | 944 | if (new_ctx) { |
945 | get_user(new_msr, &new_ctx->uc_mcontext.mc_gregs[PT_MSR])) | 945 | struct mcontext __user *mcp; |
946 | return -EFAULT; | 946 | u32 cmcp; |
947 | |||
948 | /* | ||
949 | * Get pointer to the real mcontext. No need for | ||
950 | * access_ok since we are dealing with compat | ||
951 | * pointers. | ||
952 | */ | ||
953 | if (__get_user(cmcp, &new_ctx->uc_regs)) | ||
954 | return -EFAULT; | ||
955 | mcp = (struct mcontext __user *)(u64)cmcp; | ||
956 | if (__get_user(new_msr, &mcp->mc_gregs[PT_MSR])) | ||
957 | return -EFAULT; | ||
958 | } | ||
947 | /* | 959 | /* |
948 | * Check that the context is not smaller than the original | 960 | * Check that the context is not smaller than the original |
949 | * size (with VMX but without VSX) | 961 | * size (with VMX but without VSX) |