Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e1661d2 authored by Eric W. Biederman's avatar Eric W. Biederman
Browse files

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: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
parent 91ca180d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -402,7 +402,7 @@ do_entDbg(struct pt_regs *regs)
{
	die_if_kernel("Instruction fault", regs, 0, NULL);

	force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)regs->pc, 0, current);
	force_sig_fault(SIGILL, ILL_ILLOPC, (void __user *)regs->pc, 0);
}


+2 −2
Original line number Diff line number Diff line
@@ -221,13 +221,13 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
	up_read(&mm->mmap_sem);
	/* Send a sigbus, regardless of whether we were in kernel
	   or user mode.  */
	force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address, 0, current);
	force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *) address, 0);
	if (!user_mode(regs))
		goto no_context;
	return;

 do_sigsegv:
	force_sig_fault(SIGSEGV, si_code, (void __user *) address, 0, current);
	force_sig_fault(SIGSEGV, si_code, (void __user *) address, 0);
	return;

#ifdef CONFIG_ALPHA_LARGE_VMALLOC
+1 −1
Original line number Diff line number Diff line
@@ -50,7 +50,7 @@ unhandled_exception(const char *str, struct pt_regs *regs,

		tsk->thread.fault_address = (__force unsigned int)addr;

		force_sig_fault(signo, si_code, addr, current);
		force_sig_fault(signo, si_code, addr);

	} else {
		/* If not due to copy_(to|from)_user, we are doomed */
+2 −2
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
	/* User mode accesses just cause a SIGSEGV */
	if (user_mode(regs)) {
		tsk->thread.fault_address = address;
		force_sig_fault(SIGSEGV, si_code, (void __user *)address, current);
		force_sig_fault(SIGSEGV, si_code, (void __user *)address);
		return;
	}

@@ -237,5 +237,5 @@ void do_page_fault(unsigned long address, struct pt_regs *regs)
		goto no_context;

	tsk->thread.fault_address = address;
	force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address, current);
	force_sig_fault(SIGBUS, BUS_ADRERR, (void __user *)address);
}
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ void ptrace_disable(struct task_struct *child)
void ptrace_break(struct pt_regs *regs)
{
	force_sig_fault(SIGTRAP, TRAP_BRKPT,
			(void __user *)instruction_pointer(regs), current);
			(void __user *)instruction_pointer(regs));
}

static int break_trap(struct pt_regs *regs, unsigned int instr)
Loading