Oleg Nesterov
114279be21
exec: copy-and-paste the fixes into compat_do_execve() paths
...
Note: this patch targets 2.6.37 and tries to be as simple as possible.
That is why it adds more copy-and-paste horror into fs/compat.c and
uglifies fs/exec.c, this will be cleanuped later.
compat_copy_strings() plays with bprm->vma/mm directly and thus has
two problems: it lacks the RLIMIT_STACK check and argv/envp memory
is not visible to oom killer.
Export acct_arg_size() and get_arg_page(), change compat_copy_strings()
to use get_arg_page(), change compat_do_execve() to do acct_arg_size(0)
as do_execve() does.
Add the fatal_signal_pending/cond_resched checks into compat_count() and
compat_copy_strings(), this matches the code in fs/exec.c and certainly
makes sense.
Signed-off-by: Oleg Nesterov <oleg@redhat.com >
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com >
Cc: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2010-11-30 17:56:38 -08:00
..
2010-10-27 19:04:36 -07:00
2010-11-09 12:43:17 -08:00
2010-11-03 10:44:20 -07:00
2010-11-15 20:44:26 -05:00
2010-11-10 15:40:06 +00:00
2010-10-26 17:54:22 -07:00
2010-11-27 07:16:29 +09:00
2010-10-30 08:31:35 -07:00
2010-10-28 22:40:31 +01:00
2010-11-01 07:50:43 -04:00
2010-11-02 17:13:52 -04:00
2010-11-05 14:13:32 +02:00
2010-10-26 14:51:00 -04:00
2010-11-12 07:55:30 -08:00
2010-10-30 08:45:43 -04:00
2010-10-26 16:52:10 -07:00
2010-10-27 18:03:06 -07:00
2010-11-30 17:56:38 -08:00
2010-11-10 14:54:09 +01:00
2010-11-10 14:54:09 +01:00
2010-11-10 14:54:09 +01:00
2010-10-27 18:03:09 -07:00
2010-10-26 17:32:41 -07:00
2010-10-28 10:27:00 -07:00
2010-11-26 09:57:36 +01:00
2010-10-28 17:22:16 -04:00
2010-11-17 14:55:45 +09:00
2010-11-25 06:50:38 +09:00
2010-11-15 13:49:51 +09:00
2010-10-28 17:22:16 -04:00
2010-10-30 14:07:40 -04:00
2010-10-26 16:52:10 -07:00
2010-11-18 10:56:29 -08:00
2010-11-12 07:55:30 -08:00
2010-11-12 14:51:55 +01:00
2010-11-15 22:40:38 +01:00
2010-11-15 22:40:38 +01:00
2010-10-26 17:40:56 -07:00
2010-11-12 12:30:57 -08:00
2010-10-27 18:03:12 -07:00
2010-11-03 11:04:46 -07:00
2010-10-27 18:48:00 -07:00
2010-10-26 16:52:08 -07:00
2010-11-11 13:40:11 +01:00
2010-10-26 15:33:31 -07:00
2010-10-26 10:33:27 +02:00
2010-10-28 11:58:39 +02:00
2010-10-27 21:25:12 -04:00
2010-10-29 14:45:29 -04:00
2010-10-28 17:22:13 -04:00
2010-10-27 18:03:13 -07:00
2010-11-15 13:37:37 -08:00
2010-10-27 18:03:18 -07:00
2010-10-29 13:14:41 -05:00
2010-11-12 07:55:32 -08:00
2010-11-12 07:55:32 -08:00
2010-11-12 07:55:32 -08:00
2010-11-16 13:33:23 -08:00
2010-10-28 09:08:47 -05:00
2010-11-22 08:34:23 -08:00
2010-10-26 16:52:19 -07:00
2010-10-26 16:52:06 -07:00
2010-10-26 16:52:05 -07:00
2010-10-26 16:52:09 -07:00
2010-10-28 09:02:15 -07:00
2010-10-26 16:52:07 -07:00
2010-11-24 15:21:11 +10:30
2010-10-26 16:52:13 -07:00
2010-11-08 12:17:07 -08:00
2010-11-12 08:26:06 +01:00
2010-10-26 09:55:25 -07:00
2010-11-16 11:56:24 -05:00
2010-11-22 13:24:48 -05:00
2010-11-25 06:50:40 +09:00
2010-10-26 16:52:05 -07:00
2010-10-26 16:52:09 -07:00
2010-11-29 14:36:33 -08:00
2010-10-27 21:30:13 -04:00
2010-10-27 17:53:25 +02:00
2010-11-26 15:00:59 +01:00
2010-11-28 16:27:19 -08:00
2010-10-27 18:03:18 -07:00
2010-11-15 13:37:37 -08:00
2010-10-27 18:03:10 -07:00
2010-11-12 07:55:33 -08:00
2010-11-12 07:55:32 -08:00
2010-10-29 04:16:31 -04:00
2010-10-27 18:03:18 -07:00
2010-10-26 16:52:16 -07:00
2010-11-17 08:59:32 -08:00
2010-11-12 07:55:30 -08:00
2010-10-27 18:03:16 -07:00
2010-10-27 18:03:16 -07:00
2010-10-27 18:03:16 -07:00
2010-10-26 16:52:09 -07:00
2010-11-15 11:29:30 -08:00
2010-11-10 23:13:56 +01:00
2010-11-15 15:40:01 -08:00
2010-10-30 12:12:50 +02:00
2010-11-15 18:48:25 +09:00
2010-11-09 16:38:20 +09:00
2010-10-31 10:40:39 -04:00
2010-11-17 14:58:36 -08:00
2010-10-27 17:28:36 +01:00
2010-10-28 11:47:52 -07:00
2010-10-26 16:52:05 -07:00
2010-10-27 18:03:14 -07:00
2010-10-27 18:03:10 -07:00
2010-10-27 18:03:12 -07:00
2010-11-17 08:59:32 -08:00
2010-10-26 16:52:03 -07:00
2010-11-08 12:28:32 -08:00
2010-10-27 18:03:18 -07:00
2010-10-26 16:52:10 -07:00
2010-10-26 16:52:14 -07:00
2010-10-30 09:05:48 -07:00