unsigned int instr;
struct undef_hook *hook;
siginfo_t info;
- void *pc;
+ void __user *pc;
/*
* According to the ARM ARM, PC is 2 or 4 bytes ahead,
*/
regs->ARM_pc -= correction;
- pc = (void *)instruction_pointer(regs);
+ pc = (void __user *)instruction_pointer(regs);
if (thumb_mode(regs)) {
- get_user(instr, (u16 *)pc);
+ get_user(instr, (u16 __user *)pc);
} else {
- get_user(instr, (u32 *)pc);
+ get_user(instr, (u32 __user *)pc);
}
spin_lock_irq(&undef_lock);
info.si_signo = SIGILL;
info.si_errno = 0;
info.si_code = ILL_ILLTRP;
- info.si_addr = (void *)instruction_pointer(regs) -
+ info.si_addr = (void __user *)instruction_pointer(regs) -
(thumb_mode(regs) ? 2 : 4);
force_sig_info(SIGILL, &info, current);
{
struct vm_area_struct *vma;
- if (end < start)
+ if (end < start || flags)
return;
vma = find_vma(current->active_mm, start);
if (end > vma->vm_end)
end = vma->vm_end;
- flush_cache_range(vma, start, end);
+ flush_cache_user_range(vma, start, end);
}
}
/*
* Flush a region from virtual address 'r0' to virtual address 'r1'
- * _inclusive_. There is no alignment requirement on either address;
+ * _exclusive_. There is no alignment requirement on either address;
* user space does not need to know the hardware cache layout.
*
* r2 contains flags. It should ALWAYS be passed as ZERO until it
info.si_signo = SIGILL;
info.si_errno = 0;
info.si_code = ILL_ILLTRP;
- info.si_addr = (void *)instruction_pointer(regs) -
+ info.si_addr = (void __user *)instruction_pointer(regs) -
(thumb_mode(regs) ? 2 : 4);
force_sig_info(SIGILL, &info, current);
__builtin_return_address(0), ptr, size);
BUG();
}
+EXPORT_SYMBOL(__bad_xchg);
/*
* A data abort trap was taken, but we did not handle the instruction.
info.si_signo = SIGILL;
info.si_errno = 0;
info.si_code = ILL_ILLOPC;
- info.si_addr = (void *)addr;
+ info.si_addr = (void __user *)addr;
force_sig_info(SIGILL, &info, current);
die_if_kernel("unknown data abort code", regs, instr);
printk("\n");
*(int *)0 = 0;
}
+EXPORT_SYMBOL(__bug);
void __readwrite_bug(const char *fn)
{
printk("%s called, but not implemented", fn);
BUG();
}
+EXPORT_SYMBOL(__readwrite_bug);
void __pte_error(const char *file, int line, unsigned long val)
{
printk("Division by zero in kernel.\n");
dump_stack();
}
+EXPORT_SYMBOL(__div0);
void abort(void)
{
/* if that doesn't kill us, halt */
panic("Oops failed to kill thread");
}
+EXPORT_SYMBOL(abort);
void __init trap_init(void)
{