diff options
Diffstat (limited to 'arch/um/sys-i386/signal.c')
-rw-r--r-- | arch/um/sys-i386/signal.c | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/arch/um/sys-i386/signal.c b/arch/um/sys-i386/signal.c index 1cbf95f6858a..187ea27536bd 100644 --- a/arch/um/sys-i386/signal.c +++ b/arch/um/sys-i386/signal.c | |||
@@ -13,9 +13,6 @@ | |||
13 | #include "sigcontext.h" | 13 | #include "sigcontext.h" |
14 | #include "registers.h" | 14 | #include "registers.h" |
15 | #include "mode.h" | 15 | #include "mode.h" |
16 | |||
17 | #ifdef CONFIG_MODE_SKAS | ||
18 | |||
19 | #include "skas.h" | 16 | #include "skas.h" |
20 | 17 | ||
21 | void copy_sc(union uml_pt_regs *regs, void *from) | 18 | void copy_sc(union uml_pt_regs *regs, void *from) |
@@ -108,61 +105,6 @@ int copy_sc_to_user_skas(struct sigcontext __user *to, struct _fpstate __user *t | |||
108 | return copy_to_user(to, &sc, sizeof(sc)) || | 105 | return copy_to_user(to, &sc, sizeof(sc)) || |
109 | copy_to_user(to_fp, fpregs, sizeof(fpregs)); | 106 | copy_to_user(to_fp, fpregs, sizeof(fpregs)); |
110 | } | 107 | } |
111 | #endif | ||
112 | |||
113 | #ifdef CONFIG_MODE_TT | ||
114 | |||
115 | /* These copy a sigcontext to/from userspace. They copy the fpstate pointer, | ||
116 | * blowing away the old, good one. So, that value is saved, and then restored | ||
117 | * after the sigcontext copy. In copy_from, the variable holding the saved | ||
118 | * fpstate pointer, and the sigcontext that it should be restored to are both | ||
119 | * in the kernel, so we can just restore using an assignment. In copy_to, the | ||
120 | * saved pointer is in the kernel, but the sigcontext is in userspace, so we | ||
121 | * copy_to_user it. | ||
122 | */ | ||
123 | int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext __user *from, | ||
124 | int fpsize) | ||
125 | { | ||
126 | struct _fpstate *to_fp; | ||
127 | struct _fpstate __user *from_fp; | ||
128 | unsigned long sigs; | ||
129 | int err; | ||
130 | |||
131 | to_fp = to->fpstate; | ||
132 | sigs = to->oldmask; | ||
133 | err = copy_from_user(to, from, sizeof(*to)); | ||
134 | from_fp = to->fpstate; | ||
135 | to->oldmask = sigs; | ||
136 | to->fpstate = to_fp; | ||
137 | if(to_fp != NULL) | ||
138 | err |= copy_from_user(to_fp, from_fp, fpsize); | ||
139 | return err; | ||
140 | } | ||
141 | |||
142 | int copy_sc_to_user_tt(struct sigcontext __user *to, struct _fpstate __user *fp, | ||
143 | struct sigcontext *from, int fpsize, unsigned long sp) | ||
144 | { | ||
145 | struct _fpstate __user *to_fp; | ||
146 | struct _fpstate *from_fp; | ||
147 | int err; | ||
148 | |||
149 | to_fp = (fp ? fp : (struct _fpstate __user *) (to + 1)); | ||
150 | from_fp = from->fpstate; | ||
151 | err = copy_to_user(to, from, sizeof(*to)); | ||
152 | |||
153 | /* The SP in the sigcontext is the updated one for the signal | ||
154 | * delivery. The sp passed in is the original, and this needs | ||
155 | * to be restored, so we stick it in separately. | ||
156 | */ | ||
157 | err |= copy_to_user(&SC_SP(to), &sp, sizeof(sp)); | ||
158 | |||
159 | if(from_fp != NULL){ | ||
160 | err |= copy_to_user(&to->fpstate, &to_fp, sizeof(to->fpstate)); | ||
161 | err |= copy_to_user(to_fp, from_fp, fpsize); | ||
162 | } | ||
163 | return err; | ||
164 | } | ||
165 | #endif | ||
166 | 108 | ||
167 | static int copy_sc_from_user(struct pt_regs *to, void __user *from) | 109 | static int copy_sc_from_user(struct pt_regs *to, void __user *from) |
168 | { | 110 | { |