[PATCH v4 08/11] tests: check decoding of smc_diag_msg attributes

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

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

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

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

2017-07-05 Thread JingPiao Chen
commit v4.17-161-gdbd0605 adjust TEST_NLATTR_OBJECT and TEST_NLATTR_ARRAY for large objects, only change the pattern print length, still pass a big length for nla_data_len, do not change strace output, still output '"STR"...'. * tests/test_nlattr.h (TEST_NLATTR_OBJECT, TEST_NLATTR_ARRAY): In case

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

2017-07-05 Thread JingPiao Chen
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_nlattr.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test_nlattr.h b/tests/test_nlattr.h index 2b49b5a..9c15c33 10

[PATCH v1 01/11] tests: print quotation marks in print_quoted_memory

2017-07-05 Thread JingPiao Chen
* tests/print_quoted_string.c (print_quoted_memory): Add quotation marks printer. * tests/getcwd.c (main): Remove quotation marks printer. * tests/keyctl.c (print_quoted_string_limit): Likewise. * tests/netlink_protocol.c (send_query): Likewise. * tests/uname.c (main): Likewise. * tests/xattr.c (ma

[PATCH v4 10/11] tests: check decoding of nlattr_inet_diag_req_compat attributes

2017-07-05 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 v1 02/11] netlink: print unrecognized attribute data in hex

2017-07-05 Thread JingPiao Chen
* nlattr.c (decode_nlattr_with_data): Replace printstrn with printstr_ex and set QUOTE_FORCE_HEX flag. * tests/print_quoted_string.c (print_quoted_hex): New function. * tests/test_nlattr.h (print_quoted_hex): New prototype. * tests/tests.h (TEST_NLATTR_OBJECT, TEST_NLATTR_ARRAY): Use it for update

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

2017-07-05 Thread JingPiao Chen
* 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_diag_cursor, smc_diag_conninfo smc_diag_linkinfo, smc_diag_lgrinfo): New s

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

2017-07-05 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 v4 11/11] tests: check decoding of nlattr_inet_diag_req_v2 attributes

2017-07-05 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_

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

2017-07-05 Thread JingPiao Chen
* 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_diag_filter): New functions. (packet_diag_msg_nla_decoders): New array. (decode_packet_diag_msg): Use it. * print_fields.h (PRINT_FIELD_QUOTED_

Re: strace 4.18 released

2017-07-05 Thread Masatake YAMATO
On Wed, 5 Jul 2017 15:48:39 +0300, "Dmitry V. Levin" wrote: > Starting with version 4.13, strace follows the schedule of linux kernel > and new versions of strace are released along with new version of linux > kernel, so strace 4.18 is tagged and uploaded. > > This release contains a significantl

Re: [PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-05 Thread Dmitry V. Levin
On Wed, Jul 05, 2017 at 05:28:53PM +0300, Victor Krapivensky wrote: > On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote: > > This longish C string is actually a lua script, and it doesn't look nice > > in this form. Wouldn't it be better if this script was translated into > > a C str

Re: [PATCH v5 1/1] Initial support for LuaJIT scripting

2017-07-05 Thread Victor Krapivensky
On Tue, Jul 04, 2017 at 11:31:49PM +0300, Dmitry V. Levin wrote: > This longish C string is actually a lua script, and it doesn't look nice > in this form. Wouldn't it be better if this script was translated into > a C string automatically by some Makefile rule? Yes, it would. In fact, this is wha

Re: strace 4.18 released

2017-07-05 Thread Dmitry V. Levin
On Wed, Jul 05, 2017 at 03:48:39PM +0300, Dmitry V. Levin wrote: > Starting with version 4.13, strace follows the schedule of linux kernel > and new versions of strace are released along with new version of linux > kernel, so strace 4.18 is tagged and uploaded. > > This release contains a signific

strace 4.18 released

2017-07-05 Thread Dmitry V. Levin
Starting with version 4.13, strace follows the schedule of linux kernel and new versions of strace are released along with new version of linux kernel, so strace 4.18 is tagged and uploaded. This release contains a significantly enhanced netlink parser, thanks to JingPiao Chen who prepared for mer

Re: [PATCH v3 2/6] Introduce new filtering architecture

2017-07-05 Thread Eugene Syromyatnikov
On Wed, Jul 5, 2017 at 9:47 AM, Nikolay Marchuk wrote: >>> +void >>> +set_filters_qualify_mode(struct filter **filters, unsigned int *nfilters) >>> +{ >>> +unsigned int i; >>> +for (i = 0; i < *nfilters - 1; ++i) { >>> +free_filter(*filters + i); >>> +} >>> +**filters =

Re: [PATCH v3 2/6] Introduce new filtering architecture

2017-07-05 Thread Nikolay Marchuk
>> +void >> +set_filters_qualify_mode(struct filter **filters, unsigned int *nfilters) >> +{ >> +unsigned int i; >> +for (i = 0; i < *nfilters - 1; ++i) { >> +free_filter(*filters + i); >> +} >> +**filters = (*filters)[*nfilters - 1]; >> +*filters = xreallocarray(*fi