17 #include <linux/compiler.h>
18 #include <linux/kernel.h>
19 #include <linux/sched.h>
21 #include <linux/errno.h>
22 #include <linux/ptrace.h>
26 #include <linux/audit.h>
27 #include <linux/seccomp.h>
29 #include <asm/byteorder.h>
35 #include <asm/pgtable.h>
37 #include <asm/uaccess.h>
38 #include <asm/bootinfo.h>
49 clear_tsk_thread_flag(child, TIF_LOAD_WATCH);
67 for (i = 0; i < 32; i++)
94 for (i = 0; i < 32; i++)
114 fpureg_t *fregs = get_fpu_regs(child);
115 for (i = 0; i < 32; i++)
118 for (i = 0; i < 32; i++)
129 unsigned int vpflags = dvpe();
132 __asm__ __volatile__(
"cfc1\t%0,$0" :
"=r" (tmp));
138 __asm__ __volatile__(
"cfc1\t%0,$0" :
"=r" (tmp));
158 fregs = get_fpu_regs(child);
160 for (i = 0; i < 32; i++)
183 #define WATCH_STYLE mips32
186 #define WATCH_STYLE mips64
191 &addr->WATCH_STYLE.num_valid);
194 &addr->WATCH_STYLE.watchlo[i]);
196 &addr->WATCH_STYLE.watchhi[i]);
198 &addr->WATCH_STYLE.watch_masks[i]);
203 __put_user(0, &addr->WATCH_STYLE.watch_masks[i]);
213 int watch_active = 0;
223 __get_user(lt[i], &addr->WATCH_STYLE.watchlo[i]);
225 if (lt[i] & __UA_LIMIT)
228 if (test_tsk_thread_flag(child, TIF_32BIT_ADDR)) {
229 if (lt[i] & 0xffffffff80000000UL)
232 if (lt[i] & __UA_LIMIT)
236 __get_user(ht[i], &addr->WATCH_STYLE.watchhi[i]);
244 child->
thread.watch.mips3264.watchlo[
i] = lt[
i];
246 child->
thread.watch.mips3264.watchhi[
i] = ht[
i];
250 set_tsk_thread_flag(child, TIF_LOAD_WATCH);
252 clear_tsk_thread_flag(child, TIF_LOAD_WATCH);
258 unsigned long addr,
unsigned long data)
275 unsigned long tmp = 0;
286 fpureg_t *fregs = get_fpu_regs(child);
295 tmp = (
unsigned long) (fregs[((addr & ~1) - 32)] >> 32);
297 tmp = (
unsigned long) (fregs[(addr - 32)] & 0xffffffff);
321 #ifdef CONFIG_CPU_HAS_SMARTMIPS
327 tmp = child->
thread.fpu.fcr31;
331 #ifdef CONFIG_MIPS_MT_SMTC
332 unsigned long irqflags;
333 unsigned int mtflags;
342 #ifdef CONFIG_MIPS_MT_SMTC
348 unsigned int vpflags = dvpe();
351 __asm__ __volatile__(
"cfc1\t%0,$0":
"=r" (tmp));
357 __asm__ __volatile__(
"cfc1\t%0,$0":
"=r" (tmp));
360 #ifdef CONFIG_MIPS_MT_SMTC
385 tmp = child->
thread.dsp.dspcontrol;
412 fpureg_t *fregs = get_fpu_regs(child);
417 sizeof(child->
thread.fpu));
418 child->
thread.fpu.fcr31 = 0;
427 fregs[(addr & ~1) -
FPR_BASE] &= 0xffffffff;
428 fregs[(addr & ~1) -
FPR_BASE] |= ((
unsigned long long)
data) << 32;
448 #ifdef CONFIG_CPU_HAS_SMARTMIPS
519 static inline int audit_arch(
void)
525 #if defined(__LITTLE_ENDIAN)
538 secure_computing_strict(regs->
regs[2]);
562 audit_syscall_entry(audit_arch(), regs->
regs[2],
573 audit_syscall_exit(regs);