aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorDmitry Chagin <dchagin@FreeBSD.org>2022-05-15 18:00:05 +0000
committerDmitry Chagin <dchagin@FreeBSD.org>2022-05-15 18:00:05 +0000
commitba279bcd6d75aa236bcb9ccf11aeb6f51a2f8514 (patch)
treee1ef02648330c782f560b33cbcb60cb5bdc8b819 /sys/amd64/linux/linux_sysvec.c
parent0b5d5dc3767fcf2f0198f0f9549cb23983e0ee3e (diff)
downloadsrc-ba279bcd6d75aa236bcb9ccf11aeb6f51a2f8514.tar.gz
src-ba279bcd6d75aa236bcb9ccf11aeb6f51a2f8514.zip
linux(4): Cleanup signal trampolines
This is the first stage of a signal trampolines refactoring. From trampolines retired emulation of the 'call' instruction, which is replaced by direct call of a signal handler. The signal handler address is in the register. The previous trampoline implemenatation used semi-Linux-way to call a signal handler via the 'jmp' instruction. Wherefore the trampoline emulated a 'call' instruction to into the stack the return address for signal handler's 'ret' instruction. Wherefore handmade DWARD annotations was used. While here rephrased and removed excessive comments. MFC after: 2 weeks
Diffstat (limited to 'sys/amd64/linux/linux_sysvec.c')
-rw-r--r--sys/amd64/linux/linux_sysvec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c
index 1ea274da8935..ea91dcae5d49 100644
--- a/sys/amd64/linux/linux_sysvec.c
+++ b/sys/amd64/linux/linux_sysvec.c
@@ -686,10 +686,10 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
regs->tf_rax = 0;
regs->tf_rsi = (register_t)&sfp->sf_si; /* arg 2 in %rsi */
regs->tf_rdx = (register_t)&sfp->sf_sc; /* arg 3 in %rdx */
+ regs->tf_rcx = (register_t)catcher;
/* Fill in POSIX parts. */
siginfo_to_lsiginfo(&ksi->ksi_info, &sf.sf_si, sig);
- sf.sf_handler = catcher;
mtx_unlock(&psp->ps_mtx);
PROC_UNLOCK(p);