1 /* 2 * Copyright (c) 2013-2015 Dmitry V. Levin <ldv@altlinux.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the 12 * documentation and/or other materials provided with the distribution. 13 * 3. The name of the author may not be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 18 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 19 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 20 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 21 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #ifndef SYS_socket_subcall 29 # error SYS_socket_subcall is not defined 30 #endif 31 32 #define IS TRACE_INDIRECT_SUBCALL 33 34 [SYS_socket_subcall + 1] = { 3, IS|TN, SEN(socket), "socket" }, 35 [SYS_socket_subcall + 2] = { 3, IS|TN, SEN(bind), "bind" }, 36 [SYS_socket_subcall + 3] = { 3, IS|TN, SEN(connect), "connect" }, 37 [SYS_socket_subcall + 4] = { 2, IS|TN, SEN(listen), "listen" }, 38 [SYS_socket_subcall + 5] = { 3, IS|TN, SEN(accept), "accept" }, 39 [SYS_socket_subcall + 6] = { 3, IS|TN, SEN(getsockname), "getsockname" }, 40 [SYS_socket_subcall + 7] = { 3, IS|TN, SEN(getpeername), "getpeername" }, 41 [SYS_socket_subcall + 8] = { 4, IS|TN, SEN(socketpair), "socketpair" }, 42 [SYS_socket_subcall + 9] = { 4, IS|TN, SEN(send), "send" }, 43 [SYS_socket_subcall + 10] = { 4, IS|TN, SEN(recv), "recv" }, 44 [SYS_socket_subcall + 11] = { 6, IS|TN, SEN(sendto), "sendto" }, 45 [SYS_socket_subcall + 12] = { 6, IS|TN, SEN(recvfrom), "recvfrom" }, 46 [SYS_socket_subcall + 13] = { 2, IS|TN, SEN(shutdown), "shutdown" }, 47 [SYS_socket_subcall + 14] = { 5, IS|TN, SEN(setsockopt), "setsockopt" }, 48 [SYS_socket_subcall + 15] = { 5, IS|TN, SEN(getsockopt), "getsockopt" }, 49 [SYS_socket_subcall + 16] = { 3, IS|TN, SEN(sendmsg), "sendmsg" }, 50 [SYS_socket_subcall + 17] = { 3, IS|TN, SEN(recvmsg), "recvmsg" }, 51 [SYS_socket_subcall + 18] = { 4, IS|TN, SEN(accept4), "accept4" }, 52 [SYS_socket_subcall + 19] = { 5, IS|TN, SEN(recvmmsg), "recvmmsg" }, 53 [SYS_socket_subcall + 20] = { 4, IS|TN, SEN(sendmmsg), "sendmmsg" }, 54 55 #define SYS_socket_nsubcalls 21 56 #define SYS_ipc_subcall ((SYS_socket_subcall) + (SYS_socket_nsubcalls)) 57 58 [SYS_ipc_subcall + 1] = { 4, IS|TI, SEN(semop), "semop" }, 59 [SYS_ipc_subcall + 2] = { 3, IS|TI, SEN(semget), "semget" }, 60 [SYS_ipc_subcall + 3] = { 4, IS|TI, SEN(semctl), "semctl" }, 61 [SYS_ipc_subcall + 4] = { 5, IS|TI, SEN(semtimedop), "semtimedop" }, 62 [SYS_ipc_subcall + 11] = { 4, IS|TI, SEN(msgsnd), "msgsnd" }, 63 [SYS_ipc_subcall + 12] = { 5, IS|TI, SEN(msgrcv), "msgrcv" }, 64 [SYS_ipc_subcall + 13] = { 2, IS|TI, SEN(msgget), "msgget" }, 65 [SYS_ipc_subcall + 14] = { 4, IS|TI, SEN(msgctl), "msgctl" }, 66 [SYS_ipc_subcall + 21] = { 4, IS|TI|TM|SI, SEN(shmat), "shmat" }, 67 [SYS_ipc_subcall + 22] = { 4, IS|TI|TM|SI, SEN(shmdt), "shmdt" }, 68 [SYS_ipc_subcall + 23] = { 3, IS|TI, SEN(shmget), "shmget" }, 69 [SYS_ipc_subcall + 24] = { 4, IS|TI, SEN(shmctl), "shmctl" }, 70 71 #define SYS_ipc_nsubcalls 25 72 73 #undef IS 74