diff options
author | H. Peter Anvin <hpa@zytor.com> | 2012-03-05 16:40:24 -0500 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2012-03-05 18:35:18 -0500 |
commit | e7084fd52ed71249ab2ce7a7d89d601c9d1f904c (patch) | |
tree | 354bdaa09b665f4e6d01ffdab2a26f8ceca9d630 /arch/x86/ia32/ia32_signal.c | |
parent | a628b684d27d22631d1819890f13047ae9075241 (diff) |
x32: Switch to a 64-bit clock_t
clock_t is used mainly to give the number of jiffies a certain process
has burned. It is entirely feasible for a long-running process to
consume more than 2^32 jiffies especially in a multiprocess system.
As such, switch to a 64-bit clock_t for x32, just as we already
switched to a 64-bit time_t.
clock_t is only used in a handful of places, and as such it is really
not a very significant change. The one that has the biggest impact is
in struct siginfo, but since the *size* of struct siginfo doesn't
change (it is padded to the hilt) it is fairly easy to make this a
localized change.
This also gets rid of sys_x32_times, however since this is a pretty
late change don't compactify the system call numbers; we can reuse
system call slot 521 next time we need an x32 system call.
Reported-by: Gregory M. Lueck <gregory.m.lueck@intel.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Cc: H. J. Lu <hjl.tools@gmail.com>
Link: http://lkml.kernel.org/r/1329696488-16970-1-git-send-email-hpa@zytor.com
Diffstat (limited to 'arch/x86/ia32/ia32_signal.c')
-rw-r--r-- | arch/x86/ia32/ia32_signal.c | 10 |
1 files changed, 8 insertions, 2 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: |