diff options
-rw-r--r-- | arch/x86/ia32/ia32_signal.c | 10 | ||||
-rw-r--r-- | arch/x86/include/asm/ia32.h | 9 | ||||
-rw-r--r-- | arch/x86/syscalls/syscall_64.tbl | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index 25d80f3faf2e..bc09ed2a8b97 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -37,6 +37,7 @@ | |||
37 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | 37 | int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) |
38 | { | 38 | { |
39 | int err = 0; | 39 | int err = 0; |
40 | bool ia32 = !is_ia32_task(); | ||
40 | 41 | ||
41 | if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) | 42 | if (!access_ok(VERIFY_WRITE, to, sizeof(compat_siginfo_t))) |
42 | return -EFAULT; | 43 | return -EFAULT; |
@@ -66,8 +67,13 @@ int copy_siginfo_to_user32(compat_siginfo_t __user *to, siginfo_t *from) | |||
66 | case __SI_FAULT >> 16: | 67 | case __SI_FAULT >> 16: |
67 | break; | 68 | break; |
68 | case __SI_CHLD >> 16: | 69 | case __SI_CHLD >> 16: |
69 | put_user_ex(from->si_utime, &to->si_utime); | 70 | if (ia32) { |
70 | put_user_ex(from->si_stime, &to->si_stime); | 71 | put_user_ex(from->si_utime, &to->si_utime); |
72 | put_user_ex(from->si_stime, &to->si_stime); | ||
73 | } else { | ||
74 | put_user_ex(from->si_utime, &to->_sifields._sigchld_x32._utime); | ||
75 | put_user_ex(from->si_stime, &to->_sifields._sigchld_x32._stime); | ||
76 | } | ||
71 | put_user_ex(from->si_status, &to->si_status); | 77 | put_user_ex(from->si_status, &to->si_status); |
72 | /* FALL THROUGH */ | 78 | /* FALL THROUGH */ |
73 | default: | 79 | default: |
diff --git a/arch/x86/include/asm/ia32.h b/arch/x86/include/asm/ia32.h index c6435ab1cc13..7d0c18587709 100644 --- a/arch/x86/include/asm/ia32.h +++ b/arch/x86/include/asm/ia32.h | |||
@@ -125,6 +125,15 @@ typedef struct compat_siginfo { | |||
125 | compat_clock_t _stime; | 125 | compat_clock_t _stime; |
126 | } _sigchld; | 126 | } _sigchld; |
127 | 127 | ||
128 | /* SIGCHLD (x32 version) */ | ||
129 | struct { | ||
130 | unsigned int _pid; /* which child */ | ||
131 | unsigned int _uid; /* sender's uid */ | ||
132 | int _status; /* exit code */ | ||
133 | s64 _utime; | ||
134 | s64 _stime; | ||
135 | } _sigchld_x32; | ||
136 | |||
128 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ | 137 | /* SIGILL, SIGFPE, SIGSEGV, SIGBUS */ |
129 | struct { | 138 | struct { |
130 | unsigned int _addr; /* faulting insn/memory ref. */ | 139 | unsigned int _addr; /* faulting insn/memory ref. */ |
diff --git a/arch/x86/syscalls/syscall_64.tbl b/arch/x86/syscalls/syscall_64.tbl index 4aecc7e31166..0d778b800884 100644 --- a/arch/x86/syscalls/syscall_64.tbl +++ b/arch/x86/syscalls/syscall_64.tbl | |||
@@ -106,7 +106,7 @@ | |||
106 | 97 common getrlimit sys_getrlimit | 106 | 97 common getrlimit sys_getrlimit |
107 | 98 common getrusage sys_getrusage | 107 | 98 common getrusage sys_getrusage |
108 | 99 common sysinfo sys_sysinfo | 108 | 99 common sysinfo sys_sysinfo |
109 | 100 64 times sys_times | 109 | 100 common times sys_times |
110 | 101 common ptrace sys_ptrace | 110 | 101 common ptrace sys_ptrace |
111 | 102 common getuid sys_getuid | 111 | 102 common getuid sys_getuid |
112 | 103 common syslog sys_syslog | 112 | 103 common syslog sys_syslog |
@@ -331,7 +331,7 @@ | |||
331 | 518 x32 sendmsg compat_sys_sendmsg | 331 | 518 x32 sendmsg compat_sys_sendmsg |
332 | 519 x32 recvmsg compat_sys_recvmsg | 332 | 519 x32 recvmsg compat_sys_recvmsg |
333 | 520 x32 execve stub_x32_execve | 333 | 520 x32 execve stub_x32_execve |
334 | 521 x32 times compat_sys_times | 334 | # 521 available |
335 | 522 x32 rt_sigpending sys32_rt_sigpending | 335 | 522 x32 rt_sigpending sys32_rt_sigpending |
336 | 523 x32 rt_sigtimedwait compat_sys_rt_sigtimedwait | 336 | 523 x32 rt_sigtimedwait compat_sys_rt_sigtimedwait |
337 | 524 x32 rt_sigqueueinfo sys32_rt_sigqueueinfo | 337 | 524 x32 rt_sigqueueinfo sys32_rt_sigqueueinfo |