summaryrefslogtreecommitdiffstats
path: root/sys/i386/linux/linux_sysvec.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2007-09-20 13:46:26 +0000
committerkib <kib@FreeBSD.org>2007-09-20 13:46:26 +0000
commit038cf0387bda3b49244f9b6841710beb211ddb19 (patch)
tree43262fa9833f567aae989d6babbdf23a2f25fa22 /sys/i386/linux/linux_sysvec.c
parent2175a1da6d7917e535f7a42d0b3bc0c2be654260 (diff)
downloadFreeBSD-src-038cf0387bda3b49244f9b6841710beb211ddb19.zip
FreeBSD-src-038cf0387bda3b49244f9b6841710beb211ddb19.tar.gz
Fill in cr2 in the signal context from ksi->ksi_addr.
Together with the sys/i386/i386/trap.c rev. 1.306 it fixes the PR. Submitted by: rdivacky Suggested by: jhb Sponsored by: Google Summer of Code 2007 PR: kern/77710 Approved by: re (kensmith)
Diffstat (limited to 'sys/i386/linux/linux_sysvec.c')
-rw-r--r--sys/i386/linux/linux_sysvec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c
index c6547e9..177691c 100644
--- a/sys/i386/linux/linux_sysvec.c
+++ b/sys/i386/linux/linux_sysvec.c
@@ -359,6 +359,7 @@ linux_rt_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
frame.sf_sc.uc_mcontext.sc_esp_at_signal = regs->tf_esp;
frame.sf_sc.uc_mcontext.sc_ss = regs->tf_ss;
frame.sf_sc.uc_mcontext.sc_err = regs->tf_err;
+ frame.sf_sc.uc_mcontext.sc_cr2 = (register_t)ksi->ksi_addr;
frame.sf_sc.uc_mcontext.sc_trapno = bsd_to_linux_trapcode(code);
#ifdef DEBUG
@@ -487,6 +488,7 @@ linux_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask)
frame.sf_sc.sc_esp_at_signal = regs->tf_esp;
frame.sf_sc.sc_ss = regs->tf_ss;
frame.sf_sc.sc_err = regs->tf_err;
+ frame.sf_sc.sc_cr2 = (register_t)ksi->ksi_addr;
frame.sf_sc.sc_trapno = bsd_to_linux_trapcode(ksi->ksi_trapno);
for (i = 0; i < (LINUX_NSIG_WORDS-1); i++)
OpenPOWER on IntegriCloud