summaryrefslogtreecommitdiff
path: root/configure.ac
Commit message (Collapse)AuthorAgeFilesLines
* configure: do not take the SUBLEVEL part of the kernel version into accountHEADmasterDmitry V. Levin2023-05-151-1/+1
| | | | | | | | | * configure.ac: When deciding whether to use bundled version of kernel headers, ignore the SUBLEVEL part of the kernel version, assuming that any potential changes in UAPI introduced in stable kernels are not important. Resolves: https://github.com/strace/strace/issues/253
* Add a configure flag for installing testsElvira Khabirova2023-03-051-0/+13
| | | | | | | | | | | | | | | | | | | | --enable-install-tests=yes installs binaries and scripts from the test suite to $libexec/strace. This flag does not install everything necessary to run the test suite (no harness), but at least installs the binaries and the scripts. This can be useful when debugging various targets and how strace behaves on them. This can also be extended later with a standalone test harness that would allow for an easier testing. * configure.ac: Add --enable-install-tests. * tests/Makefile.am [ENABLE_INSTALL_TESTS] (testslibexecdir, testslibexec_PROGRAMS, testslibexec_DATA, testslibexec_SCRIPTS): New variables. Signed-off-by: Elvira Khabirova <lineprinter0@gmail.com>
* Update copyright headersDmitry V. Levin2023-02-261-1/+1
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* Fix build on alphaDmitry V. Levin2023-02-241-0/+1
| | | | | | | | | | | | | | Workaround a bug in glibc headers that fail to provide si_trapno field in their definition of siginfo_t on alpha. Link: https://sourceware.org/bugzilla/show_bug.cgi?id=30173 Resolves: https://github.com/strace/strace/issues/220 * configure.ac (AC_CHECK_MEMBERS): Add siginfo_t.si_trapno. * src/printsiginfo.c [ALPHA]: Guard use of si_trapno with HAVE_SIGINFO_T_SI_TRAPNO. * tests/ptrace.c [ALPHA]: Likewise. * NEWS: Mention this fix.
* term: improve decoding of termios and termio structuresEugene Syromyatnikov2022-11-131-0/+6
| | | | Closes: https://github.com/strace/strace/issues/130
* io_uring: decode struct io_uring_rsrc_register.flags fieldEugene Syromyatnikov2022-08-111-6/+0
| | | | | | | | | | | | Introduced by Linux commit v5.19-rc1~251^2~20. * configure.ac: Remove struct io_uring_rsrc_register.resv check. * src/xlat/uring_register_rsrc_flags.in: New file. * src/io_uring.c: Include "xlat/uring_register_rsrc_flags.h". (print_io_uring_register_rsrc): Remove CHECK_TYPE_SIZE for arg.resv, decode flags field using PRINT_FIELD_FLAGS instead of optional decoding of no longer existing resv field. * tests/io_uring_register.c: Update expected output.
* printsiginfo: update SIGTRAP decodingEugene Syromyatnikov2022-08-091-1/+4
| | | | | | | | | | | | | * src/xlat/alpha_trap_codes.in: New file. * src/xlat/sigtrap_perf_flags.in: Likewise. * configure.ac (AC_CHECK_MEMBERS): Add checks for siginfo_t.si_perf_data, siginfo_t.si_perf_type, and siginfo_t.si_perf_flags fields. * src/defs.h (perf_type_id): New extern definition. * src/printsiginfo.c [ALPHA]: Include "xlat/alpha_trap_codes.h". [HAVE_SIGINFO_T_SI_PERF_FLAGS]: Include "xlat/sigtrap_perf_flags.h". (print_si_info): Implement SIGTRAP case. * tests/ptrace.c: Add checks.
* printsiginfo: print si_lower/si_upper for SEGV_BNDERR signalsEugene Syromyatnikov2022-08-091-1/+3
| | | | | | | | | * configure.ac (AC_CHECK_MEMBERS): Add siginfo_t.si_lower and siginfo_t.si_upper checks. * src/printsiginfo.c (print_si_info): [!SEGV_STACKFLOW && HAVE_SIGINFO_T_SI_LOWER] <case SIGSEGV>: Print si_lower and si_upper fields if si_code is SEGV_BNDERR. * tests/ptrace.c: Add checks.
* printsiginfo: print si_addr_lsb for BUS_MCEERR_A[RO] signalsEugene Syromyatnikov2022-08-091-1/+2
| | | | | | | | | * configure.ac (AC_CHECK_MEMBERS): Add siginfo_t.si_addr_lsb check. * src/printsiginfo.c (print_si_info) [!BUS_OPFETCH && HAVE_SIGINFO_T_SI_ADDR_LSB] <case SIGBUS>: Print si_addr_lsb field is si_code is equal to BUS_MCEERR_AR or BUS_MCEERR_AO. * tests/ptrace.c: Add checks. * NEWS: Mention it.
* netlink_inet_diag: implement INET_DIAG_MD5SIG attribute decodingEugene Syromyatnikov2022-07-211-0/+4
| | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/tcp.h: New file. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac: Check for struct tcp_diag_md5sig presence in <netinet/tcp.h>. * netlink_inet_diag.c: Include <linux/tcp.h>. (print_tcp_md5sig, decode_tcp_md5sig): New functions. (inet_diag_msg_nla_decoders) <[INET_DIAG_MD5SIG]>: New attribute, decoded by decode_tcp_md5sig. * tests/nlattr_inet_diag_msg.c: Check INET_DIAG_MD5SIG attribute decoding. * NEWS: Mention it.
* io_uring: work aroung struct io_uring_rsrc_register field name changeEugene Syromyatnikov2022-06-121-0/+6
| | | | | | | | | | | | | | | | | resv field has been renamed to flags in Linux commit v5.19-rc1~251^2~20, provide a shim to support old decoding syntax. * configure.ac (AC_CHECK_TYPES): Add struct io_uring_rsrc_register and struct io_uring_rsrc_register.resv checks. * src/io_uring.c [HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV): Define as resv. [!HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV): Define as flags. (print_io_uring_register_rsrc): Use RESV instead of resv; print "resv" field name explicitly and use PRINT_VAL_X instead of PRINT_FIELD_X. * tests/io_uring_register.c [HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV): Define as resv. [!HAVE_STRUCT_IO_URING_RSRC_REGISTER_RESV] (RESV): Define as flags. (main): Use RESV to access struct io_uring_rsrc_register.resv field.
* printsiginfo: decode siginfo_t.si_pkey fieldSlava Bacherikov2022-02-021-1/+2
| | | | | | | | | | | This adds decoding of si_pkey field which is set on SIGSEGV in case of memory access violation on some modern CPUs (these have pku flag in /proc/cpuinfo). * NEWS: Mention this change. * configure.ac (AC_CHECK_MEMBERS): Check for siginfo_t.si_pkey. * src/printsiginfo.c (print_si_info) <case SIGSEGV> [HAVE_SIGINFO_T_SI_PKEY]: Decode si_pkey field.
* Add 64-bit LoongArch supportWANG Xuerui2022-01-131-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is based on the WIP Linux port still under review, but the port is re-using asm-generic syscall numbers and parameters, so breakage should be minimal when the port is eventually merged, if at all. Currently only the LP64* ABIs are implemented in the toolchains, so only support the host type "loongarch64". * NEWS: Mention this. * configure.ac [$host_cpu == loongarch64]: Define LOONGARCH64. * src/linux/loongarch64/arch_defs_.h: New file. * src/linux/loongarch64/arch_regs.c: Likewise. * src/linux/loongarch64/get_error.c: Likewise. * src/linux/loongarch64/get_scno.c: Likewise. * src/linux/loongarch64/get_syscall_args.c: Likewise. * src/linux/loongarch64/ioctls_arch0.h: Likewise. * src/linux/loongarch64/ioctls_inc0.h: Likewise. * src/linux/loongarch64/raw_syscall.h: Likewise. * src/linux/loongarch64/set_error.c: Likewise. * src/linux/loongarch64/set_scno.c: Likewise. * src/linux/loongarch64/syscallent.h: Likewise. * src/Makefile.am (EXTRA_DIST): Add them. * src/xlat/elf_em.in: Add EM_LOONGARCH. Link: https://lore.kernel.org/lkml/20211013063656.3084555-1-chenhuacai@loongson.cn/
* Update copyright headersDmitry V. Levin2022-01-091-1/+1
| | | | | Headers updated automatically using maint/update_copyright_years.sh script.
* Use a separate manpage date for strace-log-merge.1Dmitry V. Levin2022-01-011-3/+8
| | | | | | | | | | | | | | | strace-log-merge.1 used cause confusion by sharing the manpage date with strace.1. * Makefile.am (dist-hook): Rename MANPAGE_DATE to STRACE_MANPAGE_DATE, generate $(distdir)/doc/.strace-log-merge.1.in.date. * configure.ac (manpage_date): Rename to strace_manpage_date. (slm_manpage_date): Define from doc/strace-log-merge.1.in. (MANPAGE_DATE): Rename to STRACE_MANPAGE_DATE. (SLM_MANPAGE_DATE): Define to slm_manpage_date. * doc/strace-log-merge.1.in: Replace MANPAGE_DATE with SLM_MANPAGE_DATE. * doc/strace.1.in: Replace MANPAGE_DATE with STRACE_MANPAGE_DATE. * strace.spec.in: Likewise, generate doc/.strace-log-merge.1.in.date.
* tests: remove ATTRIBUTE_ALLOC_SIZE from tail_alloc and tail_memdupDmitry V. Levin2021-11-281-1/+0
| | | | | | | | | | | | | | Many tests are intentionally feeding their target syscalls with garbage. Unfortunately, the compiler stands in the way, issuing tons of -Warray-bounds and -Wstringop-overread warnings when it is aware of the amount of memory allocated by tail_alloc and tail_memdup. * m4/st_broken_cc.m4: Remove. * configure.ac: Remove st_BROKEN_CC invocation. * tests/tests.h (tail_alloc, tail_memdup): Remove ATTRIBUTE_ALLOC_SIZE attribute. Resolves: https://github.com/strace/strace/issues/203
* sockaddr: implement decoding of AF_RXRPC socket addressesEugene Syromyatnikov2021-11-121-0/+1
| | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Add linux/rxrpc.h. * src/xlat/rxrpc_services.in: New file. * src/sockaddr.c: Include "xlat/rxrpc_services.h". (struct sockaddr_rxrpc): New type definition. (print_sockaddr_data_rxrpc): New function. (sa_printers) <[AF_RXRPC]>: New printer. * tests/sockaddr_xlat.c [HAVE_LINUX_RXRPC_H]: Include <linux/rxrpc.h>. [!HAVE_LINUX_RXRPC_H] (struct sockaddr_rxrpc): New type definition. (#include "xlat/addrfams.h"): Move out of XLAT_MACROS_ONLY definition. (check_rxrpc): New function. (main): Call it. * NEWS: Mention it.
* sockaddr: implement decoding of AF_ALG socket addressesEugene Syromyatnikov2021-11-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/if_alg.h: New file, imported from headers_install'ed Linux kernel v5.15. * bundled/Makefile.am (EXTRA_DIST): Add it. * src/xlat/alg_sockaddr_flags.in: New file. * configure.ac (AC_CHECK_HEADERS): Check for linux/if_alg.h. (AC_CHECK_TYPES): Check for struct sockaddr_alg_new. * src/sockaddr.c: Include <linux/if_alg.h> and "xlat/alg_sockaddr_flags.h". (print_sockaddr_data_alg): New functions. (sa_printers) <[AF_ALG]>: New printer. * tests/sockaddr_xlat.c [HAVE_LINUX_IF_ALG_H]: Include <linux/if_alg.h>. [!HAVE_LINUX_IF_ALG_H] (struct sockaddr_alg): New type definition. [!CRYPTO_ALG_KERN_DRIVER_ONLY] (CRYPTO_ALG_KERN_DRIVER_ONLY): New macro constant. [!HAVE_STRUCT_SOCKADDR_ALG_NEW] (struct sockaddr_alg_new): New type definition. (check_alg): New function. (main): Call it. * NEWS: Mention it.
* sockaddr: implement decoding of AF_NFC socket addressesEugene Syromyatnikov2021-11-121-0/+1
| | | | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/nfc.h: New file, imported from headers_install'ed Linux kernel v5.15. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/nfc.h. * src/xlat/nfc_saps.in: New file. * src/xlat/nfc_sockaddr_protocols.in: Likewise. * src/sockaddr.c: Include <linux/nfc.h>, "xlat/nfc_saps.h", and "xlat/nfc_sockaddr_protocols.h". (print_sockaddr_data_nfc): New function. (sa_printers) <[AF_NFC]>: New printer. * tests/sockaddr_xlat.c [HAVE_LINUX_NFC_H]: Include <linux/nfc.h>. [!HAVE_LINUX_NFC_H] (NFC_LLCP_MAX_SERVICE_NAME): New macro. [!HAVE_LINUX_NFC_H] (struct sockaddr_nfc, struct sockaddr_nfc_llcp): New type definitions. (check_nfc): New function. (main): Call check_nfc. * NEWS: Mention it.
* sockaddr: implement decoding of AF_VSOCK socket addressesEugene Syromyatnikov2021-11-121-0/+14
| | | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Add linux/vm_sockets.h. (AC_CHECK_TYPES): Check for struct sockaddr_vm. (AC_CHECK_MEMBERS): Check for struct sockaddr_vm.svm_flags. * src/xlat/vsock_cids.in: New file. * src/xlat/vsock_flags.in: Likewise. * src/xlat/vsock_ports.in: Likewise. * src/sockaddr.c: Include <linux/vm_sockets.h>, "xlat/vsock_cids.h", "xlat/vsock_flags.h", and "xlat/vsock_ports.h". (print_sockaddr_data_vsock): New function. (sa_printers) <[AF_VSOCK]>: New printer. * tests/sockaddr_xlat.c [HAVE_LINUX_VM_SOCKETS_H]: Include <linux/vm_sockets.h>. [!HAVE_STRUCT_SOCKADDR_VM] (struct sockaddr_vm): New type definition. (SVM_FLAGS, SVM_ZERO, SVM_ZERO_FIRST): New macros. (check_vsock): New function. (main): Call it. * NEWS: Mention it.
* sockaddr: implement decoding of AF_QIPCRTR socket addressesEugene Syromyatnikov2021-11-121-0/+1
| | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/qrtr.h: New file, imported from headers_install'ed Linux kernel v5.15. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/qrtr.h. * src/xlat/qipcrtr_nodes.in: New file. * src/xlat/qipcrtr_ports.in: Likewise. * src/sockaddr.c: Include <linux/qrtr.h>, "xlat/qipcrtr_nodes.h", and "xlat/qipcrtr_ports.h". (print_sockaddr_data_qrtr): New function. (sa_printers) <[AF_QIPCRTR]>: New printer. * tests/sockaddr_xlat.c [HAVE_LINUX_QRTR_H]: Include <linux/qrtr.h>. [!HAVE_LINUX_QRTR_H] (struct sockaddr_qrtr): New type definition. (check_qrtr): New function. (main): Call check_qrtr. * NEWS: Mention it.
* sockaddr: implement decoding of AF_XDP socket addressesEugene Syromyatnikov2021-11-121-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/if_xdp.h: New file, imported from headers_install'ed Linux kernel v5.15. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/if_xdp.h. (AC_CHECK_TYPES): Check for struct sockaddr_xdp presence in <linux/if_xdp.h>. * src/xlat/xdp_sockaddr_flags.in: New file. * src/sockaddr.c: Include <linux/if_xdp.h> and "xlat/xdp_sockaddr_flags.h". (print_sockaddr_data_xdp): New function. (sa_printers) <[AF_XDP]>: New socket address decoding entry. * tests/sockaddr_xlat-Xabbrev-y.c: New file. * tests/sockaddr_xlat-Xraw-y.c: Likewise. * tests/sockaddr_xlat-Xverbose-y.c: Likewise. * tests/sockaddr_xlat.c: Include "xlat/xdp_sockaddr_flags.h". [HAVE_LINUX_IF_XDP_H]: Include <linux/if_xdp.h>. [!HAVE_STRUCT_SOCKADDR_XDP] (struct sockaddr_xdp): New type definition. [SKIP_IF_PROC_IS_UNAVAILABLE] (SKIP_IF_PROC_IS_UNAVAILABLE): New macro. [!FD0_PATH] (FD0_PATH): Likewise. [!FD7_PATH] (FD7_PATH): Likewise. (check_xdp): New function. (main): Add SKIP_IF_PROC_IS_UNAVAILABLE and check_xdp call. * tests/.gitignore: Add sockaddr_xlat-Xabbrev-y, sockaddr_xlat-Xraw-y, and sockaddr_xlat-Xverbose-y. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (sockaddr_xlat-Xabbrev-y, sockaddr_xlat-Xraw-y, sockaddr_xlat-Xverbose-y): New tests. * NEWS: Mention it.
* rtnl_link, rtnl_mdb: switch relevant attribute decoding to decode_nla_clock_tEugene Syromyatnikov2021-11-111-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is quite a few attributes that use clock_t time units for reporting time intervals (for whatever reason), so it makes sense to improve decoding for them, considering the fact that clock_t decoding has been already implemented (in v5.14-30-g3270b1358 "util: implement clock_t type decoding"). * configure.ac: Add a check for a library required for mathematical functions. * src/rtnl_link.c (ifla_brport_nla_decoders) <[IFLA_BRPORT_MESSAGE_AGE_TIMER], [IFLA_BRPORT_FORWARD_DELAY_TIMER], [IFLA_BRPORT_HOLD_TIMER]>: Decode using decode_nla_clock_t. (ifla_info_data_bridge_nla_decoders) <[IFLA_BR_FORWARD_DELAY], [IFLA_BR_HELLO_TIME], [IFLA_BR_MAX_AGE], [IFLA_BR_AGEING_TIME], [IFLA_BR_HELLO_TIMER], [IFLA_BR_TCN_TIMER], [IFLA_BR_TOPOLOGY_CHANGE_TIMER], [IFLA_BR_GC_TIMER], [IFLA_BR_MCAST_LAST_MEMBER_INTVL], [IFLA_BR_MCAST_MEMBERSHIP_INTVL], [IFLA_BR_MCAST_QUERIER_INTVL], [IFLA_BR_MCAST_QUERY_INTVL], [IFLA_BR_MCAST_QUERY_RESPONSE_INTVL], [IFLA_BR_MCAST_STARTUP_QUERY_INTVL]>: Likewise. * src/rtnl_mdb.c (mdba_mdb_eattr_nla_decoders) <[MDBA_MDB_EATTR_TIMER]>: Likewise. (mdba_router_pattr_nla_decoders) <[MDBA_ROUTER_PATTR_TIMER], [MDBA_ROUTER_PATTR_INET_TIMER], [MDBA_ROUTER_PATTR_INET6_TIMER]>: Likewise. * tests/Makefile.am (nlattr_ifla_linkinfo_LDADD, nlattr_mdba_router_port_LDADD): Add m_libs. * tests/nlattr_ifla_brport.c: Update expected output. * tests/nlattr_ifla_linkinfo.c: Likewise. * tests/nlattr_mdba_router_port.c: Likewise. * tests/nlattr_nhmsg.c: Likewise. * NEWS: Mention it.
* ioctl: implement KD* ioctl decodingEugene Syromyatnikov2021-11-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_TYPES): Check for struct kbdiacruc and struct kbdiacrsuc. * src/kd_ioctl.c: New file. * src/kd_mpers_ioctl.c: Likewise. * src/Makefile.am (strace_SOURCES): Add them. * src/defs.h (DECL_IOCTL(kd)): New declaration. * src/ioctl.c (ioctl_decode) <case 'K'>: Call kd_ioctl. * src/xlat/kd_default_led_flags.in: New file. * src/xlat/kd_font_flags.in: Likewise. * src/xlat/kd_font_ops.in: Likewise. * src/xlat/kd_ioctl_cmds.in: Likewise. * src/xlat/kd_kbd_modes.in: Likewise. * src/xlat/kd_kbd_types.in: Likewise. * src/xlat/kd_key_ascii_keys.in: Likewise. * src/xlat/kd_key_brl_keys.in: Likewise. * src/xlat/kd_key_cur_keys.in: Likewise. * src/xlat/kd_key_dead_keys.in: Likewise. * src/xlat/kd_key_fn_key_vals.in: Likewise. * src/xlat/kd_key_fn_keys.in: Likewise. * src/xlat/kd_key_lock_keys.in: Likewise. * src/xlat/kd_key_pad_keys.in: Likewise. * src/xlat/kd_key_shift_keys.in: Likewise. * src/xlat/kd_key_slock_keys.in: Likewise. * src/xlat/kd_key_spec_keys.in: Likewise. * src/xlat/kd_key_tables.in: Likewise. * src/xlat/kd_key_types.in: Likewise. * src/xlat/kd_keymap_flags.in: Likewise. * src/xlat/kd_led_flags.in: Likewise. * src/xlat/kd_meta_vals.in: Likewise. * src/xlat/kd_modes.in: Likewise. * tests/.gitignore: Add ioctl_kd, ioctl_kd-Xabbrev, ioctl_kd-Xraw, ioctl_kd-Xverbose, ioctl_kd-success, ioctl_kd-success-Xabbrev, ioctl_kd-success-Xraw, ioctl_kd-success-Xverbose, ioctl_kd-success-s1024, ioctl_kd-success-s1024-Xabbrev, ioctl_kd-success-s1024-Xraw, and ioctl_kd-success-s1024-Xverbose. * tests/pure_executables.list: Add ioctl_kd, ioctl_kd-Xabbrev, ioctl_kd-Xraw, and ioctl_kd-Xverbose. * tests/Makefile.am: Add ioctl_kd-success, ioctl_kd-success-Xabbrev, ioctl_kd-success-Xraw, ioctl_kd-success-Xverbose, ioctl_kd-success-s1024, ioctl_kd-success-s1024-Xabbrev, ioctl_kd-success-s1024-Xraw, and ioctl_kd-success-s1024-Xverbose. * tests/gen_tests.in (ioctl_kd, ioctl_kd-Xabbrev, ioctl_kd-Xraw, ioctl_kd-Xverbose, ioctl_kd-success, ioctl_kd-success-Xabbrev, ioctl_kd-success-Xraw, ioctl_kd-success-Xverbose, ioctl_kd-success-s1024, ioctl_kd-success-s1024-Xabbrev, ioctl_kd-success-s1024-Xraw, ioctl_kd-success-s1024-Xverbose): New tests. * tests/ioctl_kd-Xabbrev.c: New file. * tests/ioctl_kd-Xraw.c: Likewise. * tests/ioctl_kd-Xverbose.c: Likewise. * tests/ioctl_kd-success-Xabbrev.c: Likewise. * tests/ioctl_kd-success-Xraw.c: Likewise. * tests/ioctl_kd-success-Xverbose.c: Likewise. * tests/ioctl_kd-success-s1024-Xabbrev.c: Likewise. * tests/ioctl_kd-success-s1024-Xraw.c: Likewise. * tests/ioctl_kd-success-s1024-Xverbose.c: Likewise. * tests/ioctl_kd-success-s1024.c: Likewise. * tests/ioctl_kd-success.c: Likewise. * tests/ioctl_kd.c: Likewise. * NEWS: Mention it.
* Assume linux/nexthop.h is bundledDmitry V. Levin2021-11-071-1/+0
| | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Remove linux/nexthop.h. * src/xlat/rtnl_nexthop_attrs.in: Add #unconditional, remove #enum, do not include <linux/nexthop.h>. * src/xlat/rtnl_nexthop_grp_types.in: Likewise. * src/xlat/rtnl_nha_res_bucket_attrs.in: Likewise. * src/xlat/rtnl_nha_res_group_attrs.in: Likewise. * tests/netlink_route.c: Include <linux/nexthop.h> unconditionally, do not define struct_nhmsg, use struct nhmsg instead. * tests/nlattr_nhmsg.c: Include <linux/nexthop.h> unconditionally, do not define struct nhmsg and struct nexthop_grp. Complements: v5.14-90-gb17393bc3 "netlink_route: implement RTM_{NEW,DEL,GET}NEXTHOP decoding"
* Avoid relying on presence of ipx.hEugene Syromyatnikov2021-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | After Linux has broken UAPI in commit v5.15-rc1~157^2~207, it is well possible that neither kernel nor libc (such as musl, for example) provides an IPX-related header. Avoid relying on its presence in the strace's code and conditionalise the relevant checks in the tests. * configure.ac (AC_CHECK_HEADERS): Add linux/ipx.h. * src/net.c: Remove <netipx/ipx.h>/<linux/ipx.h> includes. * src/sockaddr.c: Likewise. (IPX_NODE_LEN): New macro constant. (struct sockaddr_ipx): New type definition. * src/xlat/sock_ipx_options.in (IPX_TYPE): Provide a fallback value. * tests/net-sockaddr.c [!HAVE_LINUX_IPX_H]: Do not include <linux/ipx.h>. [!HAVE_LINUX_IPX_H && HAVE_NETIPX_IPX_H]: Include <netipx/ipx.h>. [!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)] (check_ipx): Do not define. (main) [!(HAVE_LINUX_IPX_H || defined HAVE_NETIPX_IPX_H)]: Do not call check_ipx. Closes: https://github.com/strace/strace/issues/201
* netlink_route: implement RTM_{NEW,DEL,GET}NEXTHOP decodingEugene Syromyatnikov2021-10-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/nexthop.h: Add version at Linux commit v5.13-rc1~94^2~581^2~10. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Add linux/nexthop.h. * src/Makefile.am (libstrace_a_SOURCES): Add rtnl_nh.c. * src/defs.h (route_nexthop_flags, routing_protocols): New declarations. * src/netlink_route.c (route_decoders) <[RTM_NEWNEXTHOP - RTM_BASE], [RTM_DELNEXTHOP - RTM_BASE], [RTM_GETNEXTHOP - RTM_BASE]>: Decode using decode_nhmsg. * src/netlink_route.h (DECL_NETLINK_ROUTE_DECODER(decode_nhmsg)): New declaration. * src/rtnl_nh.c: New file. * src/xlat/rtnl_nexthop_attrs.in: Likewise. * src/xlat/rtnl_nexthop_grp_types.in: Likewise. * src/xlat/rtnl_nha_res_bucket_attrs.in: Likewise. * src/xlat/rtnl_nha_res_group_attrs.in: Likewise. * tests/.gitignore: Add nlattr_nhmsg, nlattr_nhmsg-Xabbrev, nlattr_nhmsg-Xraw, and nlattr_nhmsg-Xverbose. * tests/pure_executables.list: Likewise. * tests/gen_tests.in (nlattr_nhmsg, nlattr_nhmsg-Xabbrev, nlattr_nhmsg-Xraw, nlattr_nhmsg-Xverbose): New tests. * tests/netlink_route.c: Add checks for struct nhmsg (RTM_NEWNEXTHOP, RTM_DELNEXTHOP, and RTM_GETNEXTHOP) messages. * tests/nlattr_nhmsg.c: New file. * tests/nlattr_nhmsg-Xabbrev.c: Likewise. * tests/nlattr_nhmsg-Xraw.c: Likewise. * tests/nlattr_nhmsg-Xverbose.c: Likewise. * NEWS: Mention it.
* rtnl_route: handle multiple next hop entries inside RTA_MULTIPATHEugene Syromyatnikov2021-10-091-0/+1
| | | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): Add mempcpy. * src/rtnl_route.c (decode_rta_multipath): Navigate through attribute payload and print it as an array if there are more data in the payload than the first struct rtnexthop.rtnh_len indicates. * tests/nlattr_rtmsg.c [!HAVE_MEMPCPY] (mempcpy): Re-define to strace_mempcpy. [!HAVE_MEMPCPY] (mempcpy): New function. (DEF_NLATTR_RTMSG_FUNCS): New macro for defining init/print functions. (init_rtmsg_inet, print_rtmsg_inet): New functions, defined using DEF_NLATTR_RTMSG_FUNCS macro. (main): Update expected output, add a check for multiple struct rtnexthop inside RTA_MULTIPATH. Resolves: https://github.com/strace/strace/issues/195
* configure: fix formatting of error diagnostics in enable-mpers and ↵Dmitry V. Levin2021-07-201-1/+1
| | | | | | | enable-stacktrace options * configure.ac (AC_ARG_ENABLE([mpers])): Fix AC_MSG_ERROR formatting. * m4/st_stacktrace.m4 (AC_ARG_ENABLE([stacktrace])): Likewise.
* configure: implement --enable-bundled optionDmitry V. Levin2021-07-201-8/+34
| | | | | | | | | This new configure option controls whether bundled linux kernel headers are used to build and test strace. The default is check, that is, use bundled linux kernel headers unless they appear to be definitely older than those provided by the operating system. * configure.ac (AC_ARG_ENABLE([bundled])): New option.
* build: do not use old bundled linux kernel headersDmitry V. Levin2021-07-181-2/+15
| | | | | | | | | | | | | | | Do not use bundled linux kernel headers when they are definitely older than those provided by the operating system. * bundled/linux/include/uapi/linux/version.h: New file, copied from headers_install'ed Linux kernel v5.13. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac: Compare LINUX_VERSION_CODE provided by bundled and system <linux/version.h> files, define USE_BUNDLED_HEADERS and CPPFLAGS appropriately. * src/Makefile.am (bundled_CPPFLAGS): New variable. (AM_CPPFLAGS): Use it. * tests/Makefile.am: Likewise.
* Implement --secontext[=full] option to display SELinux contextsldv/secontextRenaud Métrich2021-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is very useful when debugging SELinux issues, in particular, when a process runs in an unexpected context or didn't transition properly, or typically when a file being opened does not have the proper context. When --secontext=full is specified, strace will print the complete context (user, role, type and category) instead of just the type which is printed for --secontext option, as shown in the examples below: Without any "--secontext" options: ----------------------------------------------------------------------- 118104 16:52:11.141122 select(9, [4<TCP:[0.0.0.0:22]> 6<TCPv6:[[::]:22]>], NULL, NULL, NULL) = 1 (in [4]) <1.845416> 119820 16:52:13.133319 openat(AT_FDCWD, "/home/rmetrich/.ssh/authorized_keys", O_RDONLY|O_NONBLOCK) = 11</home/rmetrich/.ssh/authorized_keys> <0.000399> ----------------------------------------------------------------------- With "--secontext=full" option: ----------------------------------------------------------------------- 118104 [system_u:system_r:sshd_t:s0-s0:c0.c1023] 16:52:11.141122 select(9, [4<TCP:[0.0.0.0:22]> 6<TCPv6:[[::]:22]>], NULL, NULL, NULL) = 1 (in [4]) <1.845416> 119820 [system_u:system_r:sshd_t:s0-s0:c0.c1023] 16:52:13.133319 openat(AT_FDCWD, "/home/rmetrich/.ssh/authorized_keys" [system_u:object_r:nfs_t:s0], O_RDONLY|O_NONBLOCK) = 11</home/rmetrich/.ssh/authorized_keys> [system_u:object_r:nfs_t:s0] <0.000399> ----------------------------------------------------------------------- With "--secontext" option: ----------------------------------------------------------------------- 118104 [sshd_t] 16:52:11.141122 select(9, [4<TCP:[0.0.0.0:22]> 6<TCPv6:[[::]:22]>], NULL, NULL, NULL) = 1 (in [4]) <1.845416> 119820 [sshd_t] 16:52:13.133319 openat(AT_FDCWD, "/home/rmetrich/.ssh/authorized_keys" [nfs_t], O_RDONLY|O_NONBLOCK) = 11</home/rmetrich/.ssh/authorized_keys> [nfs_t] <0.000399> ----------------------------------------------------------------------- To implement this, a new "--with-libselinux" configure option has been introduced. It defaults to "check", which means automatic support on SELinux aware systems. Co-authored-by: Dmitry V. Levin <ldv@strace.io>
* tests: switch to use bundled <linux/perf_event.h>Dmitry V. Levin2021-02-231-27/+0
| | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/perf_event.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_MEMBERS): Remove struct perf_event_attr. (AC_CHECK_HEADERS): Remove linux/perf_event.h. * tests/ioctl_perf-success.c: Include <linux/perf_event.h> unconditionally, assume it defines all its types and constants. * tests/ioctl_perf.c [!HAVE_LINUX_PERF_EVENT_H, !u64]: Remove. * tests/perf_event_open_nonverbose.cc [!HAVE_LINUX_PERF_EVENT_H]: Remove. * tests/perf_event_open.c: Likewise. Assume <linux/perf_event.h> defines all its types and constants.
* tests: switch to use bundled <linux/stat.h>Dmitry V. Levin2021-02-231-3/+0
| | | | | | | | * bundled/linux/include/uapi/linux/stat.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_TYPES): Remove struct statx. * tests/statx.c [!HAVE_STRUCT_STATX]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_osf.h>Dmitry V. Levin2021-02-221-3/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_osf.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/xt_osf.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_osf.h>. * src/xlat/nf_osf_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_osf.c: Include <linux/netfilter/nfnetlink_osf.h> instead of <linux/ip.h>, <linux/tcp.h>, and <linux/netfilter/xt_osf.h>. [!HAVE_LINUX_NETFILTER_XT_OSF_H]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_queue.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_queue.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink_queue.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_queue.h>. * src/xlat/nf_queue_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_queue.c [!HAVE_LINUX_NETFILTER_NFNETLINK_QUEUE_H]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_log.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_log.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink_log.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_log.h>. * src/xlat/nf_ulog_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_ulog.c [!HAVE_LINUX_NETFILTER_NFNETLINK_LOG_H]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_cttimeout.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_cttimeout.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink_cttimeout.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_cttimeout.h>. * src/xlat/nf_cttimeout_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_cttimeout.c [!HAVE_LINUX_NETFILTER_NFNETLINK_CTTIMEOUT_H]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_cthelper.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_cthelper.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink_cthelper.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_cthelper.h>. * src/xlat/nf_cthelper_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_cthelper.c [!HAVE_LINUX_NETFILTER_NFNETLINK_CONNTRACK_H]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_conntrack.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_conntrack.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink_conntrack.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_conntrack.h>. * src/xlat/nf_ctnetlink_exp_msg_types.in: Add #unconditional, remove fallback definitions. * src/xlat/nf_ctnetlink_msg_types.in: Likewise. * tests/nfnetlink_conntrack.c [!HAVE_LINUX_NETFILTER_NFNETLINK_CONNTRACK_H]: Remove. * tests/nfnetlink_ctnetlink_exp.c: Likewise.
* netlink: switch to use bundled <linux/netfilter/nfnetlink_acct.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink_acct.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink_acct.h. * src/netlink.c: Include <linux/netfilter/nfnetlink_acct.h>. * src/xlat/nf_acct_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_acct.c [!HAVE_LINUX_NETFILTER_NFNETLINK_ACCT_H]: Remove.
* netlink: switch to use bundled <linux/netfilter/nfnetlink.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nfnetlink.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/linux/include/uapi/linux/netfilter/nfnetlink_compat.h: Likewise. * bundled/Makefile.am (EXTRA_DIST): Add them. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nfnetlink.h. * src/netlink.c: Include <linux/netfilter/nfnetlink.h>. [!HAVE_LINUX_NETFILTER_NFNETLINK_H]: Remove. * src/netlink_netfilter.c [!HAVE_LINUX_NETFILTER_NFNETLINK_H]: Remove. * tests/netlink_netfilter.c: Likewise. * tests/nfnetlink_nft_compat.c: Likewise. * tests/nfnetlink_nftables.c: Likewise. * src/xlat/netfilter_versions.in: Add #unconditional, remove fallback definitions. * src/xlat/nl_netfilter_msg_types.in: Likewise. * src/xlat/nl_netfilter_subsys_ids.in: Likewise.
* netlink: switch to use bundled <linux/netfilter/nf_tables_compat.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nf_tables_compat.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nf_tables_compat.h. * src/netlink.c: Include <linux/netfilter/nf_tables_compat.h>. * src/xlat/nf_nft_compat_msg_types.in: Remove fallback definitions, add #unconditional and #value_indexed. * tests/nfnetlink_nft_compat.c: Replace HAVE_LINUX_NETFILTER_NF_TABLES_COMPAT_H with HAVE_LINUX_NETFILTER_NFNETLINK_H.
* netlink: switch to use bundled <linux/netfilter/nf_tables.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/nf_tables.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/nf_tables.h. * src/netlink.c: Include <linux/netfilter/nf_tables.h>. * src/xlat/nf_nftables_msg_types.in: Add #unconditional, remove fallback definitions. * tests/netlink_netfilter.c [!HAVE_LINUX_NETFILTER_NF_TABLES_H, !NFT_MSG_NEWTABLE]: Remove. * tests/nfnetlink_nftables.c: Replace HAVE_LINUX_NETFILTER_NF_TABLES_H with HAVE_LINUX_NETFILTER_NFNETLINK_H.
* netlink: switch to use bundled <linux/netfilter/ipset/ip_set.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | | * bundled/linux/include/uapi/linux/netfilter/ipset/ip_set.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/netfilter/ipset/ip_set.h. * src/netlink.c: Include <linux/netfilter/ipset/ip_set.h>. * src/xlat/nf_ipset_msg_types.in: Add #unconditional, remove fallback definitions. * tests/nfnetlink_ipset.c [!HAVE_LINUX_NETFILTER_IPSET_IP_SET_H]: Remove.
* print_mq_attr: switch to use bundled <linux/mqueue.h>Dmitry V. Levin2021-02-221-1/+0
| | | | | | | | | | | | * bundled/linux/include/uapi/linux/mqueue.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/mqueue.h. * src/kernel_types.h [!HAVE___KERNEL_LONG_T] (__kernel_long_t): New type. [!HAVE___KERNEL_ULONG_T] (__kernel_ulong_t): Likewise. * src/print_mq_attr.c [HAVE_MQUEUE_H, !HAVE_LINUX_MQUEUE_H]: Remove. Include "kernel_types.h" and "kernel_fcntl.h". (printmqattr) [!(HAVE_MQUEUE_H || HAVE_LINUX_MQUEUE_H)]: Remove.
* clone: switch to use bundled <linux/sched.h>Dmitry V. Levin2021-02-221-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * bundled/linux/include/uapi/linux/sched.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_HEADERS): Remove linux/sched.h. (AC_CHECK_MEMBERS): Remove struct clone_args.cgroup. * src/clone.c: Include <linux/sched.h> instead of <sched.h>. [!CSIGNAL]: Remove. (struct strace_clone_args): Remove. (SYS_FUNC(clone3)): Replace struct strace_clone_args with struct clone_args. * src/xlat/clone3_flags.in: Add #unconditional, remove fallback definitions. * src/xlat/clone_flags.in: Likewise. * src/xlat/setns_types.in: Likewise. * src/xlat/unshare_flags.in: Likewise. * tests/clone-flags.c: Include <linux/sched.h> instead of "xlat/clone_flags.h". * tests/clone3.c: Include <linux/sched.h> unconditionally, do not include "xlat/clone_flags.h" and "xlat/clone3_flags.h", replace struct_clone_args with struct clone_args. (struct test_clone_args, struct_clone_args): Remove. * tests/pidns.c [!CLONE_NEWUSER, !CLONE_NEWPID]: Remove. * tests/fork--pidns-translation.c: Likewise.
* configure.ac: do not check for <linux/io_uring.h> and its typesDmitry V. Levin2021-02-211-9/+0
| | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Remove linux/io_uring.h. (AC_CHECK_MEMBERS): Remove struct io_cqring_offsets.flags, struct io_uring_params.features, struct io_uring_params.wq_fd, and struct io_uring_params.resv. Complements: v5.11~54 "io_uring: switch to use bundled <linux/io_uring.h>"
* Switch to use bundled <mtd/ubi-user.h>Dmitry V. Levin2021-02-211-4/+0
| | | | | | | | | | | | | | | * bundled/linux/include/uapi/mtd/ubi-user.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_TYPES): Remove struct ubi_mkvol_req.flags and struct ubi_attach_req.max_beb_per1024. * src/ioctl.c [!HAVE_STRUCT_UBI_ATTACH_REQ_MAX_BEB_PER1024]: Remove. * src/ubi.c [!HAVE_STRUCT_UBI_ATTACH_REQ_MAX_BEB_PER1024, !HAVE_STRUCT_UBI_MKVOL_REQ_FLAGS, !UBI_IOCRPEB, !UBI_IOCSPEB, !UBI_IOCVOLCRBLK, !UBI_IOCVOLRMBLK]: Remove. * tests/ioctl_ubi.c: Likewise. * src/xlat/ubi_volume_flags.in: Add #unconditional, remove fallback definitions.
* Switch to use bundled <mtd/mtd-abi.h>Dmitry V. Levin2021-02-211-2/+0
| | | | | | | | | | | | | | | * bundled/linux/include/uapi/mtd/mtd-abi.h: New file, copied from headers_install'ed Linux kernel v5.11. * bundled/Makefile.am (EXTRA_DIST): Add it. * configure.ac (AC_CHECK_TYPES): Remove struct mtd_write_req. * src/ioctl.c [!HAVE_STRUCT_MTD_WRITE_REQ]: Remove. * src/mtd.c: Likewise. * tests/ioctl.c: Likewise. * tests/ioctl_mtd.c: Likewise. * src/xlat/mtd_flags_options.in: Add #unconditional * src/xlat/mtd_nandecc_options.in: Add #unconditional and #value_indexed. * src/xlat/mtd_otp_options.in: Likewise. * src/xlat/mtd_type_options.in: Likewise.