Commit Graph

266 Commits

Author SHA1 Message Date
701ae0b878 xlat: rename *sock*options xlat tables
Such names as sockrxrpcoptions are incomprehensible.

* xlat/getsockipoptions.in: Rename to xlat/getsock_ip_options.in.
* xlat/getsockipv6options.in: Rename to xlat/getsock_ipv6_options.in.
* xlat/setsockipoptions.in: Rename to xlat/setsock_ip_options.in.
* xlat/setsockipv6options.in: Rename to xlat/setsock_ipv6_options.in.
* xlat/sockalgoptions.in: Rename to xlat/sock_alg_options.in.
* xlat/sockbluetoothoptions.in: Rename to xlat/sock_bluetooth_options.in.
* xlat/sockcaifoptions.in: Rename to xlat/sock_caif_options.in.
* xlat/sockdccpoptions.in: Rename to xlat/sock_dccp_options.in.
* xlat/sockipoptions.in: Rename to xlat/sock_ip_options.in.
* xlat/sockipv6options.in: Rename to xlat/sock_ipv6_options.in.
* xlat/sockipxoptions.in: Rename to xlat/sock_ipx_options.in.
* xlat/sockirdaoptions.in: Rename to xlat/sock_irda_options.in.
* xlat/sockiucvoptions.in: Rename to xlat/sock_iucv_options.in.
* xlat/sockkcmoptions.in: Rename to xlat/sock_kcm_options.in.
* xlat/sockllcoptions.in: Rename to xlat/sock_llc_options.in.
* xlat/socknetlinkoptions.in: Rename to xlat/sock_netlink_options.in.
* xlat/socknfcllcpoptions.in: Rename to xlat/sock_nfcllcp_options.in.
* xlat/sockoptions.in: Rename to xlat/sock_options.in.
* xlat/sockpacketoptions.in: Rename to xlat/sock_packet_options.in.
* xlat/sockpnpoptions.in: Rename to xlat/sock_pnp_options.in.
* xlat/sockpppol2tpoptions.in: Rename to xlat/sock_pppol2tp_options.in.
* xlat/sockrawoptions.in: Rename to xlat/sock_raw_options.in.
* xlat/sockrdsoptions.in: Rename to xlat/sock_rds_options.in.
* xlat/sockrxrpcoptions.in: Rename to xlat/sock_rxrpc_options.in.
* xlat/socksctpoptions.in: Rename to xlat/sock_sctp_options.in.
* xlat/socktcpoptions.in: Rename to xlat/sock_tcp_options.in.
* xlat/socktipcoptions.in: Rename to xlat/sock_tipc_options.in.
* xlat/socktlsoptions.in: Rename to xlat/sock_tls_options.in.
* xlat/sockudpoptions.in: Rename to xlat/sock_udp_options.in.
* net.c: Update.
2018-05-08 20:59:20 +00:00
Eugene Syromyatnikov
1e436b309e net: decode more SOL_* socket options
* xlat/sockalgoptions.in: New file.
* xlat/sockbluetoothoptions.in: Likewise.
* xlat/sockcaifoptions.in: Likewise.
* xlat/sockdccpoptions.in: Likewise.
* xlat/sockiucvoptions.in: Likewise.
* xlat/sockkcmoptions.in: Likewise.
* xlat/sockllcoptions.in: Likewise.
* xlat/socknfcllcpoptions.in: Likewise.
* xlat/sockpnpoptions.in: Likewise.
* xlat/sockpppol2tpoptions.in: Likewise.
* xlat/sockrdsoptions.in: Likewises.
* xlat/sockrxrpcoptions.in: Likewise.
* xlat/socktipcoptions.in: Likewise.
* xlat/socktlsoptions.in: Likewise.
* xlat/sockudpoptions.in: Likewise.
* net.c: Include "xlat/sockalgoptions.h", "xlat/sockbluetoothoptions.h",
"xlat/sockcaifoptions.h", "xlat/sockdccpoptions.h",
"xlat/sockiucvoptions.h", "xlat/sockkcmoptions.h",
"xlat/sockllcoptions.h", "xlat/socknfcllcpoptions.h",
"xlat/sockpnpoptions.h", "xlat/sockpppol2tpoptions.h",
"xlat/sockrdsoptions.h", "xlat/sockrxrpcoptions.h",
"xlat/socktipcoptions.h", "xlat/socktlsoptions.h",
and "xlat/sockudpoptions.h".
(print_sockopt_fd_level_name): Decode SOL_UDP, SOL_IRDA, SOL_LLC,
SOL_DCCP, SOL_TIPC, SOL_RXRPC, SOL_PPPOL2TP, SOL_BLUETOOTH, SOL_PNPIPE,
SOL_RDS, SOL_IUCV, SOL_CAIF, SOL_ALG, SOL_NFC, SOL_KCM, and SOL_TLS
socket option names.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-08 20:59:20 +00:00
Eugene Syromyatnikov
4784564caf net: decode more AF_* protocol names
* xlat/caif_protocols.in: New file.
* xlat/can_protocols.in: Likewise.
* xlat/irda_protocols.in: Likewise.
* xlat/isdn_protocols.in: Likewise.
* xlat/kcm_protocols.in: Likewise.
* xlat/nfc_protocols.in: Likewise.
* xlat/phonet_protocols.in: Likewise.
* xlat/smc_protocols.in: Likewise.
* net.c: Include "xlat/irda_protocols.h", "xlat/can_protocols.h",
"xlat/isdn_protocols.h", "xlat/phonet_protocols.h",
"xlat/caif_protocols.h", "xlat/nfc_protocols.h",
"xlat/kcm_protocols.h", and "xlat/smc_protocols.h".
(SYS_FUNC(socket)): Decode AF_IRDA, AF_CAN, AF_RXRPC, AF_ISDN,
AF_PHONET, AF_CAIF, AF_NFC, AF_KCM, and AF_SMC protocol names.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-08 20:59:20 +00:00
Eugene Syromyatnikov
fb3d571696 Remove some duplicate fallback definitions
There is no need to provide duplicate fallback definitions anymore,
inclusion of the appropriate xlat header in XLAT_MACROS_ONLY mode
does the right thing.

* btrfs.c [!BTRFS_FIRST_FREE_OBJECTID] (BTRFS_FIRST_FREE_OBJECTID):
Remove, a fallback definition is already provided by included
"xlat/btrfs_tree_objectids.h".
* net.c: Include "xlat/addrfams.h" in XLAT_MACROS_ONLY mode.
[!AF_BLUETOOTH] (AF_BLUETOOTH): Remove.
* syscall.c: Include "xlat/nt_descriptor_types.h" in XLAT_MACROS_ONLY
mode.
[!NT_PRSTATUS] (NT_PRSTATUS): Remove.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
2018-05-08 20:59:20 +00:00
Eugene Syromyatnikov
77fef8df57 xlat: treat socketlayers as a sorted array
* xlat/socketlayers.in: Add a comment that the xlat is sorted.
* net.c (print_sockopt_fd_level_name): Use printxval_search
instead of printxval for decoding socket layer name.
2018-05-06 21:18:34 +00:00
Eugene Syromyatnikov
02114f254c net: decode Bluetooth protocol names unconditionally
As we have all BTPROTO_* constant definitions now, there is no need
to rely on bluetooth.h header anymore.

* net.c (AF_BLUETOOTH): Provide a fallback definition.
[HAVE_BLUETOOTH_BLUETOOTH_H]: Do not include <bluetooth/bluetooth.h>.
[!HAVE_BLUETOOTH_BLUETOOTH_H]: Include "xlat/bt_protocols.h".
[!HAVE_BLUETOOTH_BLUETOOTH_H] (decode_sockbuf): Decode AF_BLUETOOTH.
(decode_sockbuf) <case AF_BLUETOOTH>: Use printxval_index.
* xlat/bt_protocols.in: Add "#value_indexed" directive.
2018-05-06 21:18:34 +00:00
Eugene Syromyatnikov
6fb0ffca75 net: use print_xlat_ex in tprint_sock_type
In order to respect current xlat style setting.

* next.c (tprint_sock_type): Use print_xlat_ex instead of tprints
for socket type printing.
2018-04-27 00:56:25 +00:00
daaf8ab7fe Update copyright headers
Headers updated automatically using maint/update_copyright_years.sh
script.
2018-02-13 22:00:00 +00:00
a9b7fb4f73 Replace HAVE_GETRVAL2 with HAVE_ARCH_GETRVAL2
* linux/arch_defs_.h [!HAVE_ARCH_GETRVAL2] (HAVE_ARCH_GETRVAL2): New
macro.
* linux/alpha/arch_defs_.h: New file.
* linux/ia64/arch_defs_.h: Likewise.
* linux/mips/arch_defs_.h: Likewise.
* linux/sh/arch_defs_.h: Likewise.
* linux/sparc/arch_defs_.h: Likewise.
* linux/sparc64/arch_defs_.h: Likewise.
* Makefile.am (EXTRA_DIST): Add them.
* defs.h (HAVE_GETRVAL2): Remove.
(getrval2): Check for HAVE_ARCH_GETRVAL2 instead of arch checks.
* net.c (SYS_FUNC(pipe)): Check for HAVE_ARCH_GETRVAL2 instead of
HAVE_GETRVAL2.
* syscall.c: Likewise.
2018-01-21 01:46:04 +00:00
ba41dc8a70 net: fix SOL_NETLINK NETLINK_LIST_MEMBERSHIPS decoding
NETLINK_LIST_MEMBERSHIPS, unlike all other SOL_NETLINK options, requests
not just a single integer but an array of integers.  The kernel also
supports a zero optlen NETLINK_LIST_MEMBERSHIPS request.

* net.c (print_uint32): New function.
(print_getsockopt): Add ulen argument, rename len argument to rlen,
<SOL_NETLINK> Handle NETLINK_LIST_MEMBERSHIPS using print_array
and print_uint32.
(SYS_FUNC(getsockopt)): Pass ulen to print_getsockopt.
* tests/sockopt-sol_netlink.c (main): Check NETLINK_LIST_MEMBERSHIPS
decoding.
2017-11-16 02:27:40 +00:00
8a7030f20a net: fix decoding of optval argument of [gs]etsockopt SOL_NETLINK
Tweak the parser to follow the kernel behaviour.

* net.c (print_getsockopt, print_setsockopt) <SOL_NETLINK>: Fetch and
print returned value as integer iff the length is >= sizeof(int),
otherwise print the address.
* NEWS: Mention this.
2017-11-16 00:12:46 +00:00
15f502c78a net: decode optname argument of [gs]etsockopt for SOL_NETLINK level
* xlat/socknetlinkoptions.in: New file.
* net.c: Include "xlat/socknetlinkoptions.h".
(print_sockopt_fd_level_name) <SOL_NETLINK>: Print name using
socknetlinkoptions.
* NEWS: Metnion this.
2017-11-15 16:36:21 +00:00
106a76ce81 Mpersify struct group_req
The size of struct group_req depends on alignment of long and therefore
has to be mpersified.

* print_group_req.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* net.c (print_group_req): Move to print_group_req.c, wrap into
MPERS_PRINTER_DECL.
2017-07-09 18:43:34 +00:00
7bcb1dcdbc net: enhance decoding of MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP
* net.c (print_group_req): Allow option length greater than
sizeof(struct group_req) to match the kernel behaviour.
When the option length is invalid, print the address.
* NEWS: Mention this.
2017-07-09 18:43:34 +00:00
92fa2ce23c net: hook up MCAST_JOIN_GROUP/MCAST_LEAVE_GROUP decoding for SOL_IPV6
As multicast socket options are shared between IPv4 and IPv6,
they should be decoded both for SOL_IP and SOL_IPV6.

* net.c (print_setsockopt) <SOL_IPV6> [MCAST_JOIN_GROUP]: Handle
MCAST_JOIN_GROUP and MCAST_LEAVE_GROUP.
2017-07-09 18:43:34 +00:00
492517e35f net: enhance decoding of IP_ADD_MEMBERSHIP et al socket options
* net.c (print_mreq, print_mreq6): Treat negative option length
as invalid to match the kernel behaviour.  When the option length
is invalid, print the address.
* NEWS: Mention it.
* tests/ip_mreq.c (main): Check it.  Update expected output.
2017-07-09 18:43:34 +00:00
b5f7cde8a5 net: enhance decoding of setsockopt's SO_LINGER negative option length
* net.c (print_set_linger): Treat negative option length as invalid
to match the kernel behaviour.
* tests/so_linger.c (main): Check it.
2017-07-09 18:43:34 +00:00
ce1f4d12aa Intorduce PRINT_FIELD_SOCKADDR
* print_fields.h (PRINT_FIELD_SOCKADDR): New macro.
* msghdr.c (print_cmsg_ip_recverr): Use it instead of print_sockaddr.
* net.c (print_group_req): Likewise.
* sock.c (PRINT_IFREQ_ADDR): Remove.
(print_ifreq, print_ifconf_ifreq): Use PRINT_FIELD_SOCKADDR
instead of PRINT_IFREQ_ADDR.
2017-07-09 18:43:34 +00:00
6cc2b5c039 print_sockaddr: remove "struct tcb *" argument
print_sockaddr does not use its first argument, remove it.

* defs.h (print_sockaddr): Remove argument.
* sockaddr.c (print_sockaddr): Remove argument.  All callers updated.
* sock.c (PRINT_IFREQ_ADDR): Likewise.
2017-07-09 18:43:34 +00:00
befb2b3952 net: use PRINT_FIELD_* macros
* net.c (print_tpacket_stats, print_tpacket_req): Use PRINT_FIELD_U.
(print_group_req): Use PRINT_FIELD_IFINDEX.
(print_packet_mreq): Use PRINT_FIELD_IFINDEX, PRINT_FIELD_U,
and PRINT_FIELD_XVAL.
2017-07-09 18:43:34 +00:00
cb0ce38988 Intorduce PRINT_FIELD_INET4_ADDR
* print_fields.h (PRINT_FIELD_INET4_ADDR): New macro.
* msghdr.c (print_cmsg_ip_pktinfo): Use it instead of manual
tprintf statements.
* net.c (print_mreq): Likewise.
* sockaddr.c (print_sockaddr_data_in): Likewise.
2017-07-09 18:43:34 +00:00
4652a842a9 Intorduce PRINT_FIELD_IFINDEX
* print_fields.h (PRINT_FIELD_IFINDEX): New macro.
* msghdr.c (print_cmsg_ip_pktinfo): Use it instead of print_ifindex.
* net.c (print_mreq6): Likewise.
* netlink_sock_diag.c (print_packet_diag_mclist,
print_inet_diag_sockid): Likewise.
* sockaddr.c (print_sockaddr_data_in6, print_sockaddr_data_ll):
Likewise.
2017-07-09 18:43:34 +00:00
b63dc54a1d Intorduce PRINT_FIELD_INET_ADDR
* print_fields.h (PRINT_FIELD_INET_ADDR): New macro.
* net.c (print_mreq6): Use it instead of print_inet_addr.
* netlink_sock_diag.c (print_inet_diag_sockid): Likewise.
* sockaddr.c (print_sockaddr_data_in6): Likewise.
2017-07-09 18:43:34 +00:00
70d8b32108 net: move print_ifindex to a separate file
* print_ifindex.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* net.c (print_ifindex): Move to print_ifindex.c.
2017-07-09 18:43:34 +00:00
fdb4415f06 net: move parsers of bind, listen, and shutdown to separate files
* bind.c: New file.
* listen.c: Likewise.
* shutdown.c: Likewise.
* Makefile.am (strace_SOURCES): Add them.
* net.c (SYS_FUNC(bind)): Move to bind.c.
(SYS_FUNC(listen)): Move to listen.c.
(SYS_FUNC(shutdown)): Move to shutdown.c.
2017-07-09 13:54:01 +00:00
0c4052b9ca net: accept arbitrary option length for getsockopt's SO_PEERCRED
* print_fields.h (PRINT_FIELD_UID): New macro.
* net.c (print_ucred): Rewrite to match the kernel behaviour.
* NEWS: Mention this.
2017-07-08 19:27:26 +00:00
bc515c7f54 Implement decoding of linux socket filter programs
* bpf_sock_filter.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* xlat/skf_ad.in: New file.
* defs.h (decode_sock_fprog, print_sock_fprog): New prototypes.
* fetch_bpf_fprog.c (get_bpf_fprog_size): New mpers printer.
* net.c (print_getsockopt): Use decode_sock_fprog to print
socket filter programs for SO_GET_FILTER socket option.
(print_setsockopt): Use decode_sock_fprog and get_bpf_fprog_size
to print socket filter programs for SO_ATTACH_FILTER
and SO_ATTACH_REUSEPORT_CBPF socket options.
* NEWS: Mention this.
2017-07-08 14:57:44 +00:00
4c14d39332 net: accept arbitrary option length for getsockopt's SO_LINGER
* net.c (print_linger): Rename to print_set_linger.
(print_setsockopt): Replace print_linger with print_set_linger.
(print_get_linger): New function that accepts arbitrary option length
to match the kernel behaviour.
(print_getsockopt): Replace print_linger with print_get_linger.
* NEWS: Mention this.
2017-07-08 14:57:44 +00:00
2ccd886706 net: accept large option length for SO_LINGER
* net.c (print_linger): Allow len > sizeof(struct linger) to match
the kernel behaviour.
2017-07-08 14:57:44 +00:00
6314e1d0f1 net: fix printing of struct linger's field names
* net.c: Include "print_fields.h".
(print_linger): Print fields of struct linger using PRINT_FIELD_D.
2017-07-08 14:57:44 +00:00
657b04b83b net: enhance decoding of getsockopt's optlen argument
As the last argument of getsockopt syscall has read-write semantics,
print both user and kernel values when they differ.

* net.c (SYS_FUNC(getsockopt)): On entering syscall, fetch and save
the length specified to the kernel.  On error, print the length saved
on entering.  When the saved length and the length returned by the
kernel differ, print both values.
* NEWS: Mention this.
* tests/net-icmp_filter.c (main): Update expected output.
2017-07-08 14:57:44 +00:00
bec9f165be net: move printing of [gs]etsockopt's socklen argument to toplevel parsers
* net.c (print_getsockopt, print_setsockopt): Remove "done" label,
replace "goto done" statement with "return".
Move printing of "len" argument ...
(SYS_FUNC(getsockopt), SYS_FUNC(setsockopt)): ... here.
2017-07-08 14:57:44 +00:00
4a2a9a7cb1 Include "netlink.h" instead of <linux/netlink.h>
* net.c: Include "netlink.h" instead of <linux/netlink.h>.
* sockaddr.c: Likewise.
* tests/create_nl_socket.c: Likewise.
* tests/net-sockaddr.c: Likewise.
* tests/netlink_audit.c: Likewise.
* tests/netlink_generic.c: Likewise.
* tests/netlink_inet_diag.c: Likewise.
* tests/netlink_netfilter.c: Likewise.
* tests/netlink_route.c: Likewise.
* tests/netlink_selinux.c: Likewise.
* tests/netlink_xfrm.c: Likewise.
* tests/net-yy-netlink.c: Include "netlink.h" instead
of <linux/netlink.h>, remove fallback definition of NETLINK_SOCK_DIAG.
* tests/netlink_netlink_diag.c: Likewise.
* tests/netlink_protocol.c: Likewise.
* tests/netlink_sock_diag.c: Likewise.
* tests/netlink_unix_diag.c: Likewise.
* tests/nlattr.c: Likewise.
2017-06-25 00:40:29 +00:00
3d42386923 print_mreq: remove superfluous print_quoted_string calls
The string returned by inet_ntoa(3) has IPv4 dotted-decimal notation,
no need to quote it.

* net.c (print_mreq): Remove print_quoted_string calls.
2017-06-16 00:00:42 +00:00
bd70a9c411 Introduce print_inet_addr
* defs.h (print_inet_addr): New prototype.
* sockaddr.c (print_inet_addr): New function.
(print_sockaddr_data_in6): Use it.
* net.c (print_mreq6): Likewise.
* tests/ip_mreq.c (main): Update expected output.
2017-06-15 23:52:47 +00:00
Fabien Siron
8240e4e983 Add file descriptor argument to decode_netlink
* defs.h (decode_netlink): Add file descriptor argument.
* io.c (print_iovec): Specify file descriptor to decode_netlink.
* net.c (decode_sockbuf): Likewise.
* netlink.c (print_nlmsghdr, decode_nlmsghdr_with_payload,
decode_nlmsgerr, decode_payload, decode_nlmsghdr_with_payload,
decode_netlink): Likewise.
All callers updated.

Co-authored-by: Dmitry V. Levin <ldv@altlinux.org>
2017-06-05 11:52:11 +00:00
c826fa0f71 Move netlink_protocols definition from net.c to netlink.c
The side effect of #include "xlat/netlink_protocols.h" is
NETLINK_* constants properly defined in that header file.
While net.c does not use these constants itself, netlink.c
is going to need them soon.

* net.c: Move inclusion of "xlat/netlink_protocols.h" ...
* netlink.c: ... here.
2017-06-04 17:03:44 +00:00
Eugene Syromyatnikov
9d095c7860 Add copyright headers 2017-05-22 17:33:51 +00:00
89636759d7 Automatically replace PRI_kr[dux] with PRI_kl[dux]
Remove temporary macros created for transition from long
to kernel_ulong_t.

Automatically replace PRI_kr[dux] with PRI_kl[dux] using
$ git grep -l 'PRI_kr[dux]' | xargs sed -ri 's/PRI_kr([dux])/PRI_kl\1/g'

* defs.h (PRI_krd, PRI_kru, PRI_krx): Remove.  All users updated.
2016-12-26 10:43:34 +00:00
7fa3d78319 Automatically replace kernel_(scno|ureg)_t with kernel_ulong_t
Remove temporary types created for transition from long
to kernel_ulong_t.

Automatically replace kernel_scno_t and kernel_ureg_t with
kernel_ulong_t using
$ git grep -El 'kernel_(scno|ureg)_t' |
  xargs sed -ri 's/kernel_(scno|ureg)_t/kernel_ulong_t/g'

* kernel_types.h (kernel_scno_t, kernel_ureg_t): Remove.
All users updated.
2016-12-26 10:43:34 +00:00
1d5bb61c49 Print kernel_ureg_t and kernel_scno_t using dedicated format strings
Prepare for the change of kernel_ureg_t and kernel_scno_t from
unsigned long to kernel_ulong_t.

* defs.h (PRI_krd, PRI_kru, PRI_krx): New temporary macros.
All users updated.
2016-12-26 10:43:04 +00:00
26102a5a87 decode_sockbuf: change addrlen argument type from long to kernel_ureg_t
* net.c (decode_sockbuf): Change addrlen argument type from long
to kernel_ureg_t.
2016-12-25 11:32:46 +00:00
a940d1a60f printstr: rename to printstrn, add printstr as a thin wrapper
As about half of all printstr uses cases are invocations with the last
argument set to -1, create a dedicated function for this use case.

* defs.h (printstr): Rename to printstrn.  All callers updated.
(printstr): New static inline function.  All callers updated.
2016-12-25 11:32:45 +00:00
405279fa77 net: change address argument type from long to kernel_ureg_t
* net.c (decode_sockbuf, decode_pair_fd, print_linger, print_ucred,
print_tpacket_stats, print_icmp_filter, print_getsockopt, print_mreq,
print_mreq6, print_group_req, print_tpacket_req, print_packet_mreq,
print_setsockopt): Change address argument type from long
to kernel_ureg_t.
2016-12-25 11:32:45 +00:00
d7f98585ef net: change address argument type from unsigned long to kernel_ureg_t
* net.c (fetch_socklen): Change address argument type from
unsigned long to kernel_ureg_t.
2016-12-23 19:26:58 +00:00
3a838cd31a xlat: provide fallback definitions for NETLINK_* constants
As new constants have been added gradually over kernel releases, define
all constant values to make newer constants decoded properly when strace
is built with older kernel headers.

* xlat/netlink_protocols.in: Add default values for constants.
* net.c [!NETLINK_SOCK_DIAG && NETLINK_INET_DIAG]: Remove.
* socketutils.c: Likewise.
2016-12-14 08:09:10 +00:00
cce5aaef1e Use tprints instead of tprintf in a few more places
* btrfs.c (btrfs_print_qgroup_inherit, btrfs_print_tree_search,
btrfs_ioctl): Replace tprintf with tprints for printing strings without
format specifiers.
* net.c (print_group_req): Likewise.
* scsi.c (scsi_ioctl): Likewise.
* term.c (decode_termios, decode_termio): Likewise.
* userfaultfd.c (uffdio_ioctl): Likewise.
2016-10-02 19:19:28 +00:00
b759d276d5 Unabuse struct tcb.auxstr
As we've got a proper mechanism that parsers can use for storing private
data between entering and exiting stages, all cases of struct tcb.auxstr
abuse should go.

* btrfs.c (btrfs_ioctl): Use set_tcb_priv_ulong and get_tcb_priv_ulong
instead of abusing tcp->auxstr.
* file_handle.c (SYS_FUNC(name_to_handle_at)): Likewise.
* msghdr.c (SYS_FUNC(recvmsg)): Likewise.
* net.c (decode_sockname, SYS_FUNC(recvfrom)): Likewise.
* v4l2.c (print_v4l2_queryctrl): Likewise.
2016-07-18 22:12:45 +00:00
dc84fa3646 net.c: move parsers of sendmsg and recvmsg syscalls to msghdr.c
* defs.h (fetch_msghdr_namelen, decode_msghdr): Remove.
* net.c (SYS_FUNC(sendmsg), SYS_FUNC(recvmsg)): Move ...
* msghdr.c: ... here.
(fetch_msghdr_namelen, decode_msghdr): Add static qualifier.
2016-07-18 22:12:44 +00:00
4de8de50d2 net.c: move parsers of sendmmsg and recvmmsg syscalls to mmsghdr.c
* defs.h (decode_mmsgvec): Remove.
* net.c: Do not include "msghdr.h".
(SYS_FUNC(sendmmsg), SYS_FUNC(recvmmsg)): Move ...
* mmsghdr.c: ... here.
(decode_mmsgvec): Add static qualifier.
2016-07-18 22:12:44 +00:00