IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
When using linux kernel headers without commit v4.5-rc1~128^2~115^2~22
("netfilter: fix include files for compilation"), both <linux/ip.h>
and <linux/tcp.h> have to be included before <linux/netfilter/xt_osf.h>.
* configure.ac (AC_CHECK_HEADERS): Include <linux/ip.h>
and <linux/tcp.h> when checking for linux/netfilter/xt_osf.h header.
* tests/nfnetlink_osf.c: Include <linux/ip.h> and <linux/tcp.h>
before <linux/netfilter/xt_osf.h>.
I see it as a good idea to stick to system headers whenever possible
in order to also check for possible discrepancies between strace's
internal definitions and definitions present in the system headers.
* configure.ac (AC_CHECK_HEADERS): Add linux/kcmp.h.
* tests/kcmp.h [HAVE_LINUX_KCMP_H]: Include <linux/kcmp.h>,
do not define KCMP_FILE and KCMP_SYSVSEM.
* configure.ac (AC_CHECK_TYPES): Check for gnet_stats_basic,
gnet_stats_queue, gnet_stats_rate_est,
and gnet_stats_rate_est64 structures in <linux/gen_stats.h>.
And check for struct tc_sizespec in <linux/pkt_sched.h>.
* nlattr.h (tc_stats): New prototype.
* rtnl_tc.c: Include <linux/gen_stats.h>, <linux/pkt_sched.h>,
"xlat/rtnl_tca_stab_attrs.h" and "xlat/rtnl_tca_stats_attrs.h".
(decode_tc_stats, decode_tc_estimator, decode_gnet_stats_basic,
decode_gnet_stats_rate_est, decode_gnet_stats_queue,
decode_gnet_stats_rate_est64, decode_nla_tc_stats,
decode_tc_sizespec, print_stab_data, decode_tca_stab_data,
decode_tca_stab): New functions.
(tca_stats_nla_decoders, tca_stab_nla_decoders,
tcmsg_nla_decoders): New arrays.
(decode_tcmsg): Use tcmsg_nla_decoders.
* xlat/rtnl_tca_stab_attrs.in: New file.
* xlat/rtnl_tca_stats_attrs.in: Likewise.
In order to provide better diagnostics.
* configure.ac (AM_INIT_AUTOMAKE): Specify minimal GNU Automake version as
1.13 due to usage of AM_EXTRA_RECURSIVE_TARGETS macro.
Closes: https://github.com/strace/strace/issues/11
* configure.ac (AC_CHECK_TYPES): Check for ifla_bridge_id
and rtnl_link_stats64 structures in <linux/if_link.h>.
* rtnl_link.c: Include "xlat/rtnl_ifla_brport_attrs.h".
(decode_ifla_bridge_id, decode_ifla_protinfo): New functions.
(ifla_brport_nla_decoders): New array.
(ifinfomsg_nla_decoders) <IFLA_PROTINFO>: Use decode_ifla_protinfo.
* xlat/rtnl_ifla_brport_attrs.in: New file.
* configure.ac (AC_CHECK_TYPES): Check for ndt_config
and ndt_stats structures in <linux/neighbour.h>.
(AC_CHECK_MEMBERS): Check for ndts_table_fulls field in struct ndt_stats.
* rtnl_neightbl.c: Include "xlat/rtnl_neightbl_parms_attrs.h".
(decode_ndt_config, decode_ndta_parms, decode_ndta_parms): New functions.
(ndt_parms_nla_decoders, ndtmsg_nla_decoders): New arrays.
(decode_ndtmsg): Use ndtmsg_nla_decoders.
* xlat/rtnl_neightbl_parms_attrs.in: New file.
* configure.ac (AC_CHECK_FUNCS): Add be64toh.
(AC_CHECK_TYPES): Check for struct fib_rule_uid_range
in <linux/fib_rules.h>.
* nlattr.c: Include <endian.h>.
(decode_nla_be64): New function.
* nlattr.h (decode_nla_be64): New prototype.
* rtnl_rule.c (decode_rule_addr,
decode_fib_rule_uid_range): New functions.
(fib_rule_hdr_nla_decoders): New array.
(decode_fib_rule_hdr): Use it.
* configure.ac (AC_CHECK_HEADERS): Add linux/if_link.h.
(AC_CHECK_TYPES): Check for struct rtnl_link_stats64
in <linux/if_link.h>.
(AC_CHECK_MEMBERS): Check for rx_nohandler field
in struct rtnl_link_stats/rtnl_link_stats64.
* rtnl_link.c: Include <linux/if_link.h>.
(decode_rtnl_link_stats, decode_rtnl_link_ifmap,
decode_rtnl_link_stats64): New functions.
(ifinfomsg_nla_decoders): New array.
(decode_ifinfomsg): Use it.
* configure.ac <AC_CHECK_TYPES([struct statfs])>: Merge several
AC_CHECK_MEMBERS checks of struct statfs members into a single check.
<AC_CHECK_TYPES([struct statfs64])>: Likewise, for checks
of struct statfs64 members.
Implement decoding of map_flags and inner_map_fd fields of union bpf_attr
for BPF_MAP_CREATE command introduced by linux kernel commits
v4.6-rc1~91^2~108^2~6 and v4.12-rc1~64^3~373^2~2, respectively.
* configure.ac: Check for inner_map_fd member of union bpf_attr
instead of max_entries.
* xlat/bpf_map_flags.in: New file.
* bpf.c: Include "xlat/bpf_map_flags.h".
(decode_BPF_MAP_CREATE): Add map_flags and inner_map_fd fields
to the structure, print them.
* tests/bpf.c: Update macro guards of BPF_MAP_CREATE decoder test.
(init_BPF_MAP_CREATE_first, print_BPF_MAP_CREATE_attr): Update expected
output.
(init_BPF_MAP_CREATE_attr): Initialize map_flags and inner_map_fd
fields, update offset.
Implement decoding of union bpf_attr.prog_flags field for BPF_PROG_LOAD
command introduced by linux kernel commit v4.12-rc2~34^2~29^2~2.
* configure.ac: Check for prog_flags member of union bpf_attr
instead of kern_version.
* xlat/bpf_prog_flags.in: New file.
* bpf.c: Include "xlat/bpf_prog_flags.h".
(decode_BPF_PROG_LOAD): Add prog_flags field to the structure, print it.
* tests/bpf.c: Update macro guards of BPF_PROG_LOAD decoder test.
(init_BPF_PROG_LOAD_first, print_BPF_PROG_LOAD_attr): Update expected
output.
(init_BPF_PROG_LOAD_attr): Initialize prog_flags field, update offset.
* configure.ac (AC_CHECK_TYPES): Check for crypto_report_aead,
crypto_report_blkcipher, crypto_report_cipher, crypto_report_hash,
and crypto_report_rng structures in <linux/cryptouser.h>.
* netlink_crypto.c (decode_crypto_report_generic,
decode_crypto_report_hash, decode_crypto_report_blkcipher,
decode_crypto_report_aead, decode_crypto_report_rng,
decode_crypto_report_cipher): New functions.
(crypto_user_alg_nla_decoders): New array.
(decode_crypto_user_alg): Use it.
* xlat/crypto_nl_attrs.in: New file.
* NEWS: Mention this.
As make -j$N check-valgrind cannot parallelize properly, add
recursive targets for each of valgrind checks. This way one can run
for t in $valgrind_enabled_tools; do
make -k check-valgrind-$n || rc=$?
done
in $top_builddir.
* configure.ac (AM_EXTRA_RECURSIVE_TARGETS): Remove.
* m4/ax_valgrind_check.m4 (AX_VALGRIND_CHECK): Add check-valgrind
and check-valgrind-* to AM_EXTRA_RECURSIVE_TARGETS.
<linux/filter.h> was introduced in linux 2.1.75, way before
the minimal kernel version supported by strace.
* configure.ac (AC_CHECK_HEADERS): Remove linux/filter.h.
* seccomp.c: Assume HAVE_LINUX_FILTER_H.
* tests/prctl-seccomp-filter-v.c: Likewise.
* tests/seccomp-filter-v.c: Likewise.
* tests/seccomp-filter.c: Likewise.
Emulate program_invocation_name only if it is not provided by libc.
* configure.ac: Check for program_invocation_name variable.
* strace.c (progname): Remove.
[!HAVE_PROGRAM_INVOCATION_NAME] (program_invocation_name): New variable.
(verror_msg, error_msg_and_help): Use it instead of progname.
(init): Initialize program_invocation_name instead of progname.
* configure.ac (AC_CHECK_HEADERS): Add linux/genetlink.h.
* defs.h (genl_families_xlat): New prototype.
* socketutils.c [HAVE_LINUX_GENETLINK_H]: Include <linux/genetlink.h>.
[HAVE_LINUX_GENETLINK_H] (genl_send_dump_families,
genl_parse_families_response): New helper functions.
(genl_families_xlat): New function for building the xlat table
for NETLINK_GENERIC decoding.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
nfnetlink was introduced in linux by commit v2.6.14-rc1~1035^2~217,
add a guard for the case when system headers are not fresh enough.
* configure.ac (AC_CHECK_HEADERS): Add linux/netfilter/nfnetlink.h.
* tests/netlink_netfilter.c: Check for HAVE_LINUX_NETFILTER_NFNETLINK_H.
This solves problems like the need to update test suite on every
New Year's Eve.
* Makefile.am (dist-hook): Generate .year.
* copyright-year-gen: New file.
* configure.ac (copyright_year): New m4 variable, defined as the output
of copyright-year-gen script.
(AC_COPYRIGHT): Use it.
(COPYRIGHT_YEAR): New output variable and preprocessor macro.
* strace.c (print_version): Use COPYRIGHT_YEAR.
* strace.spec.in (%prep): Save the value of COPYRIGHT_YEAR autoconf
variable to .year file.
* tests/strace-V.test (config_year): New variable, derived from config.h.
Add sanity checks for $config_year and use it in expected output.
Reported-by: Andreas Schwab <schwab@suse.de>