aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRoland McGrath <roland@redhat.com>2008-04-22 15:20:20 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-26 11:35:47 -0400
commitcdb69904794d2173176b1a58e849b7b39fced390 (patch)
tree90bfb425cd45d3fa814b043fdc6cb69cbd46eb0c /arch
parent55928e37b29ba5557a5edc8ab679fe5191bc051d (diff)
x86_64 ia32 ptrace: use compat_ptrace_request for siginfo
This removes the special-case handling for PTRACE_GETSIGINFO and PTRACE_SETSIGINFO from x86_64's sys32_ptrace. The generic compat_ptrace_request code handles these. Signed-off-by: Roland McGrath <roland@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kernel/ptrace.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
index 559c1b027417..870dc1023d2d 100644
--- a/arch/x86/kernel/ptrace.c
+++ b/arch/x86/kernel/ptrace.c
@@ -1207,32 +1207,6 @@ static int genregs32_set(struct task_struct *target,
1207 return ret; 1207 return ret;
1208} 1208}
1209 1209
1210static long ptrace32_siginfo(unsigned request, u32 pid, u32 addr, u32 data)
1211{
1212 siginfo_t __user *si = compat_alloc_user_space(sizeof(siginfo_t));
1213 compat_siginfo_t __user *si32 = compat_ptr(data);
1214 siginfo_t ssi;
1215 int ret;
1216
1217 if (request == PTRACE_SETSIGINFO) {
1218 memset(&ssi, 0, sizeof(siginfo_t));
1219 ret = copy_siginfo_from_user32(&ssi, si32);
1220 if (ret)
1221 return ret;
1222 if (copy_to_user(si, &ssi, sizeof(siginfo_t)))
1223 return -EFAULT;
1224 }
1225 ret = sys_ptrace(request, pid, addr, (unsigned long)si);
1226 if (ret)
1227 return ret;
1228 if (request == PTRACE_GETSIGINFO) {
1229 if (copy_from_user(&ssi, si, sizeof(siginfo_t)))
1230 return -EFAULT;
1231 ret = copy_siginfo_to_user32(si32, &ssi);
1232 }
1233 return ret;
1234}
1235
1236asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data) 1210asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
1237{ 1211{
1238 struct task_struct *child; 1212 struct task_struct *child;
@@ -1280,11 +1254,9 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
1280 case PTRACE_SETFPXREGS: 1254 case PTRACE_SETFPXREGS:
1281 case PTRACE_GETFPXREGS: 1255 case PTRACE_GETFPXREGS:
1282 case PTRACE_GETEVENTMSG: 1256 case PTRACE_GETEVENTMSG:
1283 break;
1284
1285 case PTRACE_SETSIGINFO: 1257 case PTRACE_SETSIGINFO:
1286 case PTRACE_GETSIGINFO: 1258 case PTRACE_GETSIGINFO:
1287 return ptrace32_siginfo(request, pid, addr, data); 1259 break;
1288 } 1260 }
1289 1261
1290 child = ptrace_get_task_struct(pid); 1262 child = ptrace_get_task_struct(pid);