Roland McGrath
40f0933d51
x86: ia32 syscall restart fix
...
The code to restart syscalls after signals depends on checking for a
negative orig_ax, and for particular negative -ERESTART* values in ax.
These fields are 64 bits and for a 32-bit task they get zero-extended.
The syscall restart behavior is lost, a regression from a native 32-bit
kernel and from 64-bit tasks' behavior.
This patch fixes the problem by doing sign-extension where it matters.
For orig_ax, the only time the value should be -1 but winds up as
0x0ffffffff is via a 32-bit ptrace call. So the patch changes ptrace to
sign-extend the 32-bit orig_eax value when it's stored; it doesn't
change the checks on orig_ax, though it uses the new current_syscall()
inline to better document the subtle importance of the used of
signedness there.
The ax value is stored a lot of ways and it seems hard to get them all
sign-extended at their origins. So for that, we use the
current_syscall_ret() to sign-extend it only for 32-bit tasks at the
time of the -ERESTART* comparisons.
Signed-off-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2008-03-11 17:11:54 +01:00
..
2008-02-21 15:34:37 -08:00
2008-03-05 14:45:31 -05:00
2007-10-17 21:19:04 +02:00
2008-01-30 13:33:24 +01:00
2008-01-30 13:33:39 +01:00
2008-01-30 13:33:17 +01:00
2008-01-30 13:33:21 +01:00
2008-01-30 13:33:14 +01:00
2008-02-26 12:55:49 +01:00
2008-01-30 13:33:19 +01:00
2007-10-11 11:17:01 +02:00
2007-10-11 11:17:24 +02:00
2008-01-30 13:32:31 +01:00
2008-01-30 13:33:18 +01:00
2008-02-04 16:47:59 +01:00
2007-10-19 11:53:33 -07:00
2007-10-13 10:01:23 -07:00
2007-12-03 17:17:10 +01:00
2008-01-30 13:31:31 +01:00
2008-01-31 22:05:47 +01:00
2008-01-30 13:33:32 +01:00
2008-02-01 17:49:41 +01:00
2008-02-01 17:49:42 +01:00
2008-01-30 13:33:37 +01:00
2008-02-19 16:18:28 +01:00
2008-02-13 16:20:35 +01:00
2007-10-11 11:17:01 +02:00
2008-01-30 13:31:19 +01:00
2008-02-19 16:18:28 +01:00
2008-02-19 16:18:29 +01:00
2008-02-26 12:55:57 +01:00
2008-01-30 13:33:11 +01:00
2007-10-19 20:35:03 +02:00
2008-02-09 23:24:08 +01:00
2008-02-18 20:54:14 +01:00
2008-02-26 12:55:58 +01:00
2008-02-26 12:55:56 +01:00
2008-02-26 12:55:50 +01:00
2008-01-30 13:30:29 +01:00
2008-03-07 16:39:14 +01:00
2008-01-24 20:40:40 -08:00
2008-02-13 16:20:35 +01:00
2008-02-19 16:18:34 +01:00
2008-01-30 13:33:19 +01:00
2008-02-29 18:55:42 +01:00
2008-01-30 13:32:19 +01:00
2008-01-30 13:32:19 +01:00
2008-02-19 16:18:29 +01:00
2008-01-30 13:33:10 +01:00
2008-01-30 13:31:17 +01:00
2008-01-30 13:30:56 +01:00
2007-10-11 11:17:24 +02:00
2008-01-30 13:32:51 +01:00
2008-02-19 16:18:28 +01:00
2008-02-04 16:48:03 +01:00
2008-02-07 08:42:25 -08:00
2008-02-07 08:42:25 -08:00
2008-02-19 16:18:32 +01:00
2007-10-13 10:01:23 -07:00
2008-02-09 23:24:08 +01:00
2008-02-01 17:49:42 +01:00
2007-10-11 11:17:01 +02:00
2007-10-11 11:17:24 +02:00
2008-02-07 08:42:25 -08:00
2008-01-30 13:33:37 +01:00
2008-02-04 16:47:59 +01:00
2008-02-19 16:18:29 +01:00
2008-02-19 16:18:29 +01:00
2008-01-30 13:33:20 +01:00
2008-01-30 13:32:10 +01:00
2008-01-30 13:33:19 +01:00
2008-01-30 13:33:20 +01:00
2008-02-05 09:44:11 -08:00
2007-10-17 20:15:51 +02:00
2008-01-30 13:30:31 +01:00
2008-02-14 23:30:20 +01:00
2007-10-30 00:22:22 +01:00
2008-01-30 13:30:28 +01:00
2007-10-11 11:17:01 +02:00
2008-01-30 13:30:18 +01:00
2008-02-29 18:55:42 +01:00
2008-02-29 18:55:42 +01:00
2008-03-11 17:11:54 +01:00
2008-02-11 08:15:03 -08:00
2008-01-30 13:33:36 +01:00
2008-03-07 16:39:14 +01:00
2007-10-11 11:17:01 +02:00
2007-10-11 11:17:24 +02:00
2008-01-30 13:32:40 +01:00
2008-01-31 22:05:45 +01:00
2008-01-30 13:33:24 +01:00
2008-02-19 16:18:28 +01:00
2008-02-26 12:56:04 +01:00
2007-10-11 11:17:01 +02:00
2008-03-07 16:39:14 +01:00
2008-03-11 17:11:54 +01:00
2008-01-30 13:32:01 +01:00
2008-01-30 13:32:01 +01:00
2008-02-06 10:41:08 -08:00
2008-02-26 12:56:02 +01:00
2008-01-30 13:31:13 +01:00
Merge branches 'release', 'bugzilla-6217', 'bugzilla-6629', 'bugzilla-6933', 'bugzilla-7186', 'bugzilla-8269', 'bugzilla-8570', 'bugzilla-9139', 'bugzilla-9277', 'bugzilla-9341', 'bugzilla-9444', 'bugzilla-9614', 'bugzilla-9643' and 'bugzilla-9644' into release
2008-02-07 03:09:43 -05:00
2008-02-26 12:55:58 +01:00
2008-03-07 16:39:14 +01:00
2007-10-20 01:13:56 +02:00
2007-10-17 08:42:55 -07:00
2008-01-30 13:31:07 +01:00
2007-10-11 11:20:03 +02:00
2008-02-05 09:44:07 -08:00
2007-10-17 20:16:12 +02:00
2008-02-06 22:39:45 +01:00
2008-02-14 23:30:20 +01:00
2008-01-30 13:30:56 +01:00
2008-02-08 09:22:29 -08:00
2008-02-29 18:55:39 +01:00
2008-01-30 13:31:52 +01:00
2008-02-19 16:18:30 +01:00
2008-02-04 16:48:01 +01:00
2008-02-04 16:48:01 +01:00
2008-02-06 22:39:44 +01:00
2008-02-14 23:30:19 +01:00
2008-02-26 12:55:54 +01:00
2008-01-30 13:33:24 +01:00
2008-01-30 13:33:24 +01:00
2007-10-11 11:17:24 +02:00
2008-01-30 13:31:42 +01:00
2008-02-04 16:47:54 +01:00
2008-01-30 13:33:14 +01:00
2008-02-19 16:18:33 +01:00
2008-02-19 16:18:34 +01:00
2007-10-11 11:17:01 +02:00
2008-01-30 13:30:24 +01:00
2008-02-29 18:55:39 +01:00
2008-01-30 13:31:10 +01:00