signal: Remove the task parameter from force_sig_fault
As synchronous exceptions really only make sense against the current task (otherwise how are you synchronous) remove the task parameter from from force_sig_fault to make it explicit that is what is going on. The two known exceptions that deliver a synchronous exception to a stopped ptraced task have already been changed to force_sig_fault_to_task. The callers have been changed with the following emacs regular expression (with obvious variations on the architectures that take more arguments) to avoid typos: force_sig_fault[(]\([^,]+\)[,]\([^,]+\)[,]\([^,]+\)[,]\W+current[)] -> force_sig_fault(\1,\2,\3) Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
This commit is contained in:
@@ -275,7 +275,7 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
|
||||
static void handle_gdb_break(struct pt_regs *regs, int wot)
|
||||
{
|
||||
force_sig_fault(SIGTRAP, wot,
|
||||
(void __user *) (regs->iaoq[0] & ~3), current);
|
||||
(void __user *) (regs->iaoq[0] & ~3));
|
||||
}
|
||||
|
||||
static void handle_break(struct pt_regs *regs)
|
||||
@@ -609,13 +609,13 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
si_code = ILL_PRVREG;
|
||||
give_sigill:
|
||||
force_sig_fault(SIGILL, si_code,
|
||||
(void __user *) regs->iaoq[0], current);
|
||||
(void __user *) regs->iaoq[0]);
|
||||
return;
|
||||
|
||||
case 12:
|
||||
/* Overflow Trap, let the userland signal handler do the cleanup */
|
||||
force_sig_fault(SIGFPE, FPE_INTOVF,
|
||||
(void __user *) regs->iaoq[0], current);
|
||||
(void __user *) regs->iaoq[0]);
|
||||
return;
|
||||
|
||||
case 13:
|
||||
@@ -627,7 +627,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
* to by si_addr.
|
||||
*/
|
||||
force_sig_fault(SIGFPE, FPE_CONDTRAP,
|
||||
(void __user *) regs->iaoq[0], current);
|
||||
(void __user *) regs->iaoq[0]);
|
||||
return;
|
||||
}
|
||||
/* The kernel doesn't want to handle condition codes */
|
||||
@@ -739,7 +739,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
force_sig_fault(SIGSEGV, SEGV_MAPERR,
|
||||
(code == 7)?
|
||||
((void __user *) regs->iaoq[0]) :
|
||||
((void __user *) regs->ior), current);
|
||||
((void __user *) regs->ior));
|
||||
return;
|
||||
|
||||
case 28:
|
||||
@@ -754,7 +754,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
task_pid_nr(current), current->comm);
|
||||
/* SIGBUS, for lack of a better one. */
|
||||
force_sig_fault(SIGBUS, BUS_OBJERR,
|
||||
(void __user *)regs->ior, current);
|
||||
(void __user *)regs->ior);
|
||||
return;
|
||||
}
|
||||
pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
|
||||
@@ -770,7 +770,7 @@ void notrace handle_interruption(int code, struct pt_regs *regs)
|
||||
code, fault_space,
|
||||
task_pid_nr(current), current->comm);
|
||||
force_sig_fault(SIGSEGV, SEGV_MAPERR,
|
||||
(void __user *)regs->ior, current);
|
||||
(void __user *)regs->ior);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -690,14 +690,14 @@ void handle_unaligned(struct pt_regs *regs)
|
||||
if (ret == ERR_PAGEFAULT)
|
||||
{
|
||||
force_sig_fault(SIGSEGV, SEGV_MAPERR,
|
||||
(void __user *)regs->ior, current);
|
||||
(void __user *)regs->ior);
|
||||
}
|
||||
else
|
||||
{
|
||||
force_sigbus:
|
||||
/* couldn't handle it ... */
|
||||
force_sig_fault(SIGBUS, BUS_ADRALN,
|
||||
(void __user *)regs->ior, current);
|
||||
(void __user *)regs->ior);
|
||||
}
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user