x86/entry/syscalls: Wire up 32-bit direct socket calls
authorAndy Lutomirski <luto@kernel.org>
Tue, 14 Jul 2015 22:24:24 +0000 (15:24 -0700)
committerIngo Molnar <mingo@kernel.org>
Tue, 21 Jul 2015 08:11:04 +0000 (10:11 +0200)
On x86_64, there's no socketcall syscall; instead all of the
socket calls are real syscalls.  For 32-bit programs, we're
stuck offering the socketcall syscall, but it would be nice to
expose the direct calls as well.  This will enable seccomp to
filter socket calls (for new userspace only, but that's fine for
some applications) and it will provide a tiny performance boost.

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Cc: Alexander Larsson <alexl@redhat.com>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Cosimo Cecchi <cosimo@endlessm.com>
Cc: Dan Nicholson <nicholson@endlessm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Cc: libc-alpha <libc-alpha@sourceware.org>
Link: http://lkml.kernel.org/r/cb5138299d37d5800e2d135b01a7667fa6115854.1436912629.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/entry/syscalls/syscall_32.tbl

index ef8187f9d28d96651d3d52e39d4441c60a408332..25e3cf1cd8fdeb8cf8726b9b985ec42fa9f3a14e 100644 (file)
 356    i386    memfd_create            sys_memfd_create
 357    i386    bpf                     sys_bpf
 358    i386    execveat                sys_execveat                    stub32_execveat
+359    i386    socket                  sys_socket
+360    i386    socketpair              sys_socketpair
+361    i386    bind                    sys_bind
+362    i386    connect                 sys_connect
+363    i386    listen                  sys_listen
+364    i386    accept4                 sys_accept4
+365    i386    getsockopt              sys_getsockopt                  compat_sys_getsockopt
+366    i386    setsockopt              sys_setsockopt                  compat_sys_setsockopt
+367    i386    getsockname             sys_getsockname
+368    i386    getpeername             sys_getpeername
+369    i386    sendto                  sys_sendto
+370    i386    sendmsg                 sys_sendmsg                     compat_sys_sendmsg
+371    i386    recvfrom                sys_recvfrom                    compat_sys_recvfrom
+372    i386    recvmsg                 sys_recvmsg                     compat_sys_recvmsg
+373    i386    shutdown                sys_shutdown