aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/mm
diff options
context:
space:
mode:
authorPrasanna S Panchamukhi <prasanna@in.ibm.com>2005-09-06 18:19:30 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-07 19:58:00 -0400
commit05e14cb3bafabbf08216ab5566f3cd687eba9723 (patch)
tree6320a3e9193c474571401b2c279b1ee176c29c27 /arch/sparc64/mm
parent1f7ad57b75ab0fba27455c7344a6ab7aa6bd90c5 (diff)
[PATCH] Kprobes: prevent possible race conditions sparc64 changes
This patch contains the sparc64 architecture specific changes to prevent the possible race conditions. Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/sparc64/mm')
-rw-r--r--arch/sparc64/mm/fault.c8
-rw-r--r--arch/sparc64/mm/init.c3
-rw-r--r--arch/sparc64/mm/ultra.S2
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c
index 52e9375288a9..db1e3310e907 100644
--- a/arch/sparc64/mm/fault.c
+++ b/arch/sparc64/mm/fault.c
@@ -18,6 +18,7 @@
18#include <linux/smp_lock.h> 18#include <linux/smp_lock.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/interrupt.h> 20#include <linux/interrupt.h>
21#include <linux/kprobes.h>
21 22
22#include <asm/page.h> 23#include <asm/page.h>
23#include <asm/pgtable.h> 24#include <asm/pgtable.h>
@@ -117,8 +118,9 @@ unsigned long __init prom_probe_memory (void)
117 return tally; 118 return tally;
118} 119}
119 120
120static void unhandled_fault(unsigned long address, struct task_struct *tsk, 121static void __kprobes unhandled_fault(unsigned long address,
121 struct pt_regs *regs) 122 struct task_struct *tsk,
123 struct pt_regs *regs)
122{ 124{
123 if ((unsigned long) address < PAGE_SIZE) { 125 if ((unsigned long) address < PAGE_SIZE) {
124 printk(KERN_ALERT "Unable to handle kernel NULL " 126 printk(KERN_ALERT "Unable to handle kernel NULL "
@@ -304,7 +306,7 @@ cannot_handle:
304 unhandled_fault (address, current, regs); 306 unhandled_fault (address, current, regs);
305} 307}
306 308
307asmlinkage void do_sparc64_fault(struct pt_regs *regs) 309asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
308{ 310{
309 struct mm_struct *mm = current->mm; 311 struct mm_struct *mm = current->mm;
310 struct vm_area_struct *vma; 312 struct vm_area_struct *vma;
diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c
index 3fbaf342a452..fdb1ebb308c9 100644
--- a/arch/sparc64/mm/init.c
+++ b/arch/sparc64/mm/init.c
@@ -19,6 +19,7 @@
19#include <linux/pagemap.h> 19#include <linux/pagemap.h>
20#include <linux/fs.h> 20#include <linux/fs.h>
21#include <linux/seq_file.h> 21#include <linux/seq_file.h>
22#include <linux/kprobes.h>
22 23
23#include <asm/head.h> 24#include <asm/head.h>
24#include <asm/system.h> 25#include <asm/system.h>
@@ -250,7 +251,7 @@ out:
250 put_cpu(); 251 put_cpu();
251} 252}
252 253
253void flush_icache_range(unsigned long start, unsigned long end) 254void __kprobes flush_icache_range(unsigned long start, unsigned long end)
254{ 255{
255 /* Cheetah has coherent I-cache. */ 256 /* Cheetah has coherent I-cache. */
256 if (tlb_type == spitfire) { 257 if (tlb_type == spitfire) {
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S
index 8dfa825eca51..78beff32b6f5 100644
--- a/arch/sparc64/mm/ultra.S
+++ b/arch/sparc64/mm/ultra.S
@@ -119,6 +119,7 @@ __spitfire_flush_tlb_mm_slow:
119#else 119#else
120#error unsupported PAGE_SIZE 120#error unsupported PAGE_SIZE
121#endif 121#endif
122 .section .kprobes.text
122 .align 32 123 .align 32
123 .globl __flush_icache_page 124 .globl __flush_icache_page
124__flush_icache_page: /* %o0 = phys_page */ 125__flush_icache_page: /* %o0 = phys_page */
@@ -201,6 +202,7 @@ dflush4:stxa %g0, [%o4] ASI_DCACHE_TAG
201 nop 202 nop
202#endif /* DCACHE_ALIASING_POSSIBLE */ 203#endif /* DCACHE_ALIASING_POSSIBLE */
203 204
205 .previous .text
204 .align 32 206 .align 32
205__prefill_dtlb: 207__prefill_dtlb:
206 rdpr %pstate, %g7 208 rdpr %pstate, %g7