[PATCH v2 6/8] tests: check decoding of NETLINK_CRYPTO message types

2017-07-10 Thread JingPiao Chen
* configure.ac (AC_CHECK_HEADERS): Add linux/cryptouser.h. * tests/netlink_crypto.c: New file. * tests/gen_tests.in (netlink_crypto): New entry. * tests/pure_executables.list: Add netlink_crypto. * tests/.gitignore: Likewise. --- configure.ac| 1 + tests/.gitignore| 1

[PATCH v5 1/8] netlink: decode AF_INET inet_diag_req attributes

2017-07-10 Thread JingPiao Chen
* netlink_sock_diag.c: Include "xlat/inet_diag_bytecodes.h". (decode_inet_addr, decode_inet_diag_hostcond, print_inet_diag_bc_op, decode_inet_diag_markcond, decode_bytecode_data, decode_inet_diag_bc_op): New functions. (inet_diag_req_nla_decoders): New array. (decode_inet_diag_req_compat, decode_in

[PATCH v2 7/8] netlink: add decoding of NETLINK_CRYPTO nlmsg_flags

2017-07-10 Thread JingPiao Chen
* netlink.c (decode_nlmsg_flags): Add NETLINK_CRYPTO. --- netlink.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/netlink.c b/netlink.c index e489a6e..0ae9a46 100644 --- a/netlink.c +++ b/netlink.c @@ -200,6 +200,16 @@ decode_nlmsg_flags(const uint16_t flags, const uint16_t type

[PATCH v2 8/8] tests: add check for decoding of NETLINK_CRYPTO nlmsg_flags

2017-07-10 Thread JingPiao Chen
* tests/netlink_crypto.c (test_nlmsg_flags): New function. (main): Use it. --- tests/netlink_crypto.c | 35 +++ 1 file changed, 35 insertions(+) diff --git a/tests/netlink_crypto.c b/tests/netlink_crypto.c index c43b8e9..376baa8 100644 --- a/tests/netlink_crypto.c

[PATCH v5 2/8] tests: check decoding of nlattr_inet_diag_req_compat attributes

2017-07-10 Thread JingPiao Chen
* tests/nlattr_inet_diag_req_compat.c: New file. * tests/gen_tests.in (nlattr_inet_diag_req_compat): New entry. * tests/pure_executables.list: Add nlattr_inet_diag_req_compat. * tests/.gitignore: Likewise. --- tests/.gitignore| 1 + tests/gen_tests.in | 1 +

[PATCH v2 5/8] netlink: add decoding of NETLINK_CRYPTO message types

2017-07-10 Thread JingPiao Chen
* xlat/nl_crypto_types.in: New file. * netlink.c: Include "xlat/nl_crypto_types.h". (nlmsg_types): Add NETLINK_CRYPTO. --- netlink.c | 2 ++ xlat/nl_crypto_types.in | 5 + 2 files changed, 7 insertions(+) create mode 100644 xlat/nl_crypto_types.in diff --git a/netlink.c b/netli

[PATCH v2 4/8] tests: introduce TEST_NETLINK and TEST_NETLINK_ macros

2017-07-10 Thread JingPiao Chen
* tests/test_netlink.h: New file. * tests/Makefile.am (libtests_a_SOURCES): Add it. * tests/netlink_sock_diag.c: Remove "netlink.h" and include "test_netlink.h". (IFINDEX_LO, TEST_SOCK_DIAG): New macros. (test_odd_family_req, test_odd_family_msg, test_inet_diag_sockid): Use TEST_NETLINK macro. (tes

[PATCH v5 3/8] tests: check decoding of nlattr_inet_diag_req_v2 attributes

2017-07-10 Thread JingPiao Chen
* tests/gen_tests.in (nlattr_inet_diag_req_v2): New entry. * tests/nlattr_inet_diag_req_v2.c: New file. * tests/pure_executables.list: Add nlattr_inet_diag_req_v2. * tests/.gitignore: Likewise. --- tests/.gitignore| 1 + tests/gen_tests.in | 1 + tests/nlattr_inet_

Re: [PATCH] tests: introduce TEST_NETLINK and TEST_NETLINK_ macros

2017-07-10 Thread Dmitry V. Levin
On Sat, Jul 08, 2017 at 09:36:11PM +0800, JingPiao Chen wrote: > * tests/test_netlink.h: New file. > * tests/Makefile.am (libtests_a_SOURCES): Add it. > * tests/netlink_sock_diag.c: Remove "netlink.h" and > include "test_netlink.h". > (TEST_SOCK_DIAG): New macro. > (test_odd_family_req, test_odd_fa

Re: [PATCH] pathtrace.c: introduce user-provided sets of paths

2017-07-10 Thread Dmitry V. Levin
On Sat, Jul 08, 2017 at 03:28:56PM +0700, Nikolay Marchuk wrote: > * defs.h (struct path_set): Add a definition for a path set. > (global_path_set): Add a declaration. > (tracing_paths): Change macro body to use global path set variable. > (pathtrace_select_set, pathtrace_match_set): Change declara

Re: [PATCH v4 09/11] netlink: decode AF_INET inet_diag_req attributes

2017-07-10 Thread Dmitry V. Levin
On Thu, Jul 06, 2017 at 09:57:35AM +0800, JingPiao Chen wrote: > * netlink_sock_diag.c: Include "xlat/inet_diag_bytecodes.h". > (decode_inet_addr, decode_inet_diag_hostcond, > print_inet_diag_bc_op, decode_inet_diag_markcond, > decode_bytecode_data, decode_inet_diag_bc_op): New functions. > (inet_d

Re: [PATCH v4 07/11] netlink: decode AF_SMC smc_diag_msg attributes

2017-07-10 Thread Dmitry V. Levin
On Thu, Jul 06, 2017 at 09:57:33AM +0800, JingPiao Chen wrote: > * netlink_sock_diag.c: Include "xlat/smc_link_group_roles.h". > (decode_smc_diag_conninfo, decode_smc_diag_lgrinfo): New functions. > (smc_diag_msg_nla_decoders): New array. > (decode_smc_diag_msg): Use it. > * linux/smc_diag.h (smc_d

Re: [PATCH v4 06/11] tests: check decoding of packet_diag_msg attributes

2017-07-10 Thread Dmitry V. Levin
On Thu, Jul 06, 2017 at 02:53:56PM +0300, Dmitry V. Levin wrote: > On Thu, Jul 06, 2017 at 09:57:32AM +0800, JingPiao Chen wrote: [...] > > +#ifdef HAVE_LINUX_FILTER_H > > + static const struct sock_filter filter[] = { > > + BPF_JUMP(BPF_JMP|BPF_K|BPF_JEQ, 1, 0, 1) > > + }; > > + TE

Re: [PATCH v4 03/11] netlink: decode AF_PACKET packet_diag_msg attributes

2017-07-10 Thread Dmitry V. Levin
On Thu, Jul 06, 2017 at 02:45:23PM +0300, Dmitry V. Levin wrote: > On Thu, Jul 06, 2017 at 09:57:29AM +0800, JingPiao Chen wrote: > > * netlink_sock_diag.c: Include "xlat/packet_diag_info_flags.h". > > (decode_packet_diag_info, decode_packet_diag_mclist, > > decode_packet_diag_ring, decode_packet_d

Re: [PATCH v4 05/11] tests: fix TEST_NLATTR_OBJECT and TEST_NLATTR_ARRAY use for large objects

2017-07-10 Thread Dmitry V. Levin
On Thu, Jul 06, 2017 at 10:58:59PM +0800, JingPiao Chen wrote: > On Thu, Jul 06, 2017 at 02:48:51PM +0300, Dmitry V. Levin wrote: > > On Thu, Jul 06, 2017 at 09:57:31AM +0800, JingPiao Chen wrote: > > > commit v4.17-161-gdbd0605 adjust TEST_NLATTR_OBJECT and > > > TEST_NLATTR_ARRAY for large object

Re: [PATCH v4 04/11] tests: introduce NLATTR macro

2017-07-10 Thread Dmitry V. Levin
On Thu, Jul 06, 2017 at 02:47:12PM +0300, Dmitry V. Levin wrote: > On Thu, Jul 06, 2017 at 09:57:30AM +0800, JingPiao Chen wrote: > > Now we can not use TEST_NLATTR macro directly, we need to know nla. > > > > * tests/test_nlattr.h (TEST_NLATTR_): Replace nla with NLATTR. > > --- > > tests/test_n

Re: [PATCH v2 2/8] tests: change the type of "plen" variable to unsigned int

2017-07-10 Thread Dmitry V. Levin
On Fri, Jul 07, 2017 at 11:23:48AM +0800, JingPiao Chen wrote: > * tests/test_nlattr.h (TEST_NLATTR_OBJECT, TEST_NLATTR_ARRAY): > Change the type of "plen" variable to unsigned int. I squashed this patch of the series into the next one to avoid compilation warnings after the intermediate commit.

Re: [PATCH 2/2] asinfo: Introduce static query tool asinfo

2017-07-10 Thread Eugene Syromiatnikov
On Wed, Jun 28, 2017 at 05:56:40AM +0300, Edgar Kaziahmedov wrote: > ... I've also forgot to mention the lack of documentation, test suite, and wiring of the tool installation in the spec/dsc files. -- Check out the vibra