Files
kernel/include/linux
Will Deacon 05ba3f1aa1 ipc: compat: use signed size_t types for msgsnd and msgrcv
The msgsnd and msgrcv system calls use size_t to represent the size of the
message being transferred.  POSIX states that values of msgsz greater than
SSIZE_MAX cause the result to be implementation-defined.  On Linux, this
equates to returning -EINVAL if (long) msgsz < 0.

For compat tasks where !CONFIG_ARCH_WANT_OLD_COMPAT_IPC and compat_size_t
is smaller than size_t, negative size values passed from userspace will be
interpreted as positive values by do_msg{rcv,snd} and will fail to exit
early with -EINVAL.

This patch changes the compat prototypes for msg{rcv,snd} so that the
message size is represented as a compat_ssize_t, which we cast to the
native ssize_t type for the core IPC code.

Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-07-30 17:25:21 -07:00
..
2012-07-17 15:11:37 -04:00
2012-07-17 19:35:59 -07:00
2012-06-06 15:20:22 -04:00
2012-06-04 01:09:14 -04:00
2012-06-29 11:38:17 -04:00
2012-06-06 19:12:30 -07:00
2012-07-30 17:25:11 -07:00
2012-05-25 12:46:23 +05:30
2012-06-27 15:42:24 -07:00
2012-05-29 23:28:33 -04:00
2012-07-22 23:57:58 +04:00
2012-07-05 15:04:10 +02:00
2012-07-24 14:13:59 +02:00
2012-07-02 15:11:12 +02:00
2012-07-20 11:07:00 -07:00
2012-07-18 08:59:58 -07:00
2012-05-31 17:49:32 -07:00
2012-05-31 17:49:30 -07:00
2012-05-29 23:28:41 -04:00
2012-05-22 15:20:28 -04:00
2012-07-14 16:35:40 +04:00
2012-07-09 16:42:24 -04:00
2012-05-26 14:17:30 -04:00
2012-07-10 10:32:06 -05:00
2012-05-21 14:31:48 +01:00
2012-06-20 14:39:36 -07:00
2012-07-12 07:54:46 -07:00
2012-07-30 17:25:20 -07:00
2012-06-01 12:58:52 -04:00
2012-07-22 12:39:33 -07:00
2012-05-31 17:49:26 -07:00
2012-06-05 17:32:30 +02:00
2012-07-16 22:31:34 -07:00
2012-06-13 21:16:42 +02:00
2012-07-30 17:25:16 -07:00
2012-07-23 00:58:46 -07:00
2012-07-24 23:19:26 -04:00
2012-07-22 23:57:55 +04:00
2012-06-18 13:42:03 +02:00
2012-05-22 12:16:16 +09:30