diff options
| author | Nicolas Pitre <nico@cam.org> | 2006-02-16 17:36:13 -0500 |
|---|---|---|
| committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-02-16 17:36:13 -0500 |
| commit | 6c0fa49b18b09ba9e69c0999f89bc38fad95d8a6 (patch) | |
| tree | e5fe86ca5e8e4e4ad3b53f0b87f1cc644e9d940f /arch/arm/kernel | |
| parent | 3dfaf7a68e275a1a6bee4861fdd61f911e6eb7a2 (diff) | |
[ARM] 3338/1: old ABI compat: sys_socketcall
Patch from Nicolas Pitre
Commit 99595d0237926b5aba1fe4c844a011a1ba1ee1f8 forgot to intercept
sys_socketcall as well.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel')
| -rw-r--r-- | arch/arm/kernel/calls.S | 2 | ||||
| -rw-r--r-- | arch/arm/kernel/sys_oabi-compat.c | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S index 8c3035d5ffc9..3173924a9b60 100644 --- a/arch/arm/kernel/calls.S +++ b/arch/arm/kernel/calls.S | |||
| @@ -111,7 +111,7 @@ | |||
| 111 | CALL(sys_statfs) | 111 | CALL(sys_statfs) |
| 112 | /* 100 */ CALL(sys_fstatfs) | 112 | /* 100 */ CALL(sys_fstatfs) |
| 113 | CALL(sys_ni_syscall) | 113 | CALL(sys_ni_syscall) |
| 114 | CALL(OBSOLETE(sys_socketcall)) | 114 | CALL(OBSOLETE(ABI(sys_socketcall, sys_oabi_socketcall))) |
| 115 | CALL(sys_syslog) | 115 | CALL(sys_syslog) |
| 116 | CALL(sys_setitimer) | 116 | CALL(sys_setitimer) |
| 117 | /* 105 */ CALL(sys_getitimer) | 117 | /* 105 */ CALL(sys_getitimer) |
diff --git a/arch/arm/kernel/sys_oabi-compat.c b/arch/arm/kernel/sys_oabi-compat.c index 9d4b76409c64..8e2f9bc3368b 100644 --- a/arch/arm/kernel/sys_oabi-compat.c +++ b/arch/arm/kernel/sys_oabi-compat.c | |||
| @@ -64,6 +64,7 @@ | |||
| 64 | * sys_connect: | 64 | * sys_connect: |
| 65 | * sys_sendmsg: | 65 | * sys_sendmsg: |
| 66 | * sys_sendto: | 66 | * sys_sendto: |
| 67 | * sys_socketcall: | ||
| 67 | * | 68 | * |
| 68 | * struct sockaddr_un loses its padding with EABI. Since the size of the | 69 | * struct sockaddr_un loses its padding with EABI. Since the size of the |
| 69 | * structure is used as a validation test in unix_mkname(), we need to | 70 | * structure is used as a validation test in unix_mkname(), we need to |
| @@ -78,6 +79,7 @@ | |||
| 78 | #include <linux/eventpoll.h> | 79 | #include <linux/eventpoll.h> |
| 79 | #include <linux/sem.h> | 80 | #include <linux/sem.h> |
| 80 | #include <linux/socket.h> | 81 | #include <linux/socket.h> |
| 82 | #include <linux/net.h> | ||
| 81 | #include <asm/ipc.h> | 83 | #include <asm/ipc.h> |
| 82 | #include <asm/uaccess.h> | 84 | #include <asm/uaccess.h> |
| 83 | 85 | ||
| @@ -408,3 +410,31 @@ asmlinkage long sys_oabi_sendmsg(int fd, struct msghdr __user *msg, unsigned fla | |||
| 408 | return sys_sendmsg(fd, msg, flags); | 410 | return sys_sendmsg(fd, msg, flags); |
| 409 | } | 411 | } |
| 410 | 412 | ||
| 413 | asmlinkage long sys_oabi_socketcall(int call, unsigned long __user *args) | ||
| 414 | { | ||
| 415 | unsigned long r = -EFAULT, a[6]; | ||
| 416 | |||
| 417 | switch (call) { | ||
| 418 | case SYS_BIND: | ||
| 419 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
| 420 | r = sys_oabi_bind(a[0], (struct sockaddr __user *)a[1], a[2]); | ||
| 421 | break; | ||
| 422 | case SYS_CONNECT: | ||
| 423 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
| 424 | r = sys_oabi_connect(a[0], (struct sockaddr __user *)a[1], a[2]); | ||
| 425 | break; | ||
| 426 | case SYS_SENDTO: | ||
| 427 | if (copy_from_user(a, args, 6 * sizeof(long)) == 0) | ||
| 428 | r = sys_oabi_sendto(a[0], (void __user *)a[1], a[2], a[3], | ||
| 429 | (struct sockaddr __user *)a[4], a[5]); | ||
| 430 | break; | ||
| 431 | case SYS_SENDMSG: | ||
| 432 | if (copy_from_user(a, args, 3 * sizeof(long)) == 0) | ||
| 433 | r = sys_oabi_sendmsg(a[0], (struct msghdr __user *)a[1], a[2]); | ||
| 434 | break; | ||
| 435 | default: | ||
| 436 | r = sys_socketcall(call, args); | ||
| 437 | } | ||
| 438 | |||
| 439 | return r; | ||
| 440 | } | ||
