Re: [PATCH v2 7/8] netlink: add a basic rtnetlink parser of link messages

2017-08-08 Thread Dmitry V. Levin
On Tue, Aug 01, 2017 at 07:48:47AM +0800, JingPiao Chen wrote: > * netlink_route.h: New file. > * rtnl_link.c: Likewise. > * Makefile.am (strace_SOURCES): Add them. > * defs.h (arp_hardware_types, iffflags): New xlat prototypes. > * netlink_route.c: Include "netlink_route.h" > and . >

Re: [PATCH v2 8/8] tests: check decoding of rtnetlink link messages

2017-08-08 Thread Dmitry V. Levin
On Tue, Aug 01, 2017 at 07:48:48AM +0800, JingPiao Chen wrote: > * tests/netlink_route.c: Include . > (TEST_NL_ROUTE): New macro. > (test_rtnl_link): New function. > (main): Use it. > > Co-authored-by: Fabien Siron > --- > tests/netlink_route.c | 61 >

Nikolay Marchuk's GSoC status report - #10 of 13

2017-08-08 Thread Nikolay Marchuk
Hello, strace community! Project: Advanced syscall filtering syntax. Accomplishments: this week I've been working mostly on testing and fixing parsing issues. Unfortunately, I didn't have enough time to finish tests and strace.1 documentation. I am going to send patch set with fixes tomorrow

[PATCH v3 1/5] netlink: introduce family specific decoder of NETLINK_ROUTE

2017-08-08 Thread JingPiao Chen
* netlink_route.c: New file. * Makefile.am (strace_SOURCES): Add it. * defs.h (decode_netlink_route): New prototype. * netlink.c (netlink_decoders): Add NETLINK_ROUTE. Co-authored-by: Fabien Siron --- Makefile.am | 1 + defs.h | 1 + netlink.c | 1 +

[PATCH v3 2/5] tests: check netlink family specific decoder of NETLINK_ROUTE

2017-08-08 Thread JingPiao Chen
* tests/netlink_route.c: Include , include "test_netlink.h" instead of "netlink.h". (test_rtnl_unspec): New function. (main): Use it. Co-authored-by: Fabien Siron --- tests/netlink_route.c | 54 ++- 1 file changed, 53

[PATCH v3 3/5] Move nl_route_types definition from netlink.c to netlink_route.c

2017-08-08 Thread JingPiao Chen
The side effect of #include "xlat/nl_route_types.h" is RTM_* constants properly defined in that header file. While netlink.c does not use these constants itself, netlink_route.c is going to need them soon. * defs.h (nl_route_types): New xlat prototype. * netlink.c: Move inclusion of

[PATCH v3 5/5] tests: check decoding of rtnetlink link messages

2017-08-08 Thread JingPiao Chen
* tests/netlink_route.c: Include . (TEST_NL_ROUTE): New macro. (test_rtnl_link): New function. (main): Use it. Co-authored-by: Fabien Siron --- Sorry, this patch maybe duplication. tests/netlink_route.c | 58 +++ 1 file

[PATCH v3 4/5] netlink: add a basic rtnetlink parser of link messages

2017-08-08 Thread JingPiao Chen
* netlink_route.h: New file. * rtnl_link.c: Likewise. * Makefile.am (strace_SOURCES): Add them. * defs.h (arp_hardware_types, iffflags): New xlat prototypes. * netlink_route.c: Include "netlink_route.h" and . (netlink_route_decoder_t): New typedef. (route_decoders): New array.

Victor Krapivensky's GSoC status report - #10 of 13

2017-08-08 Thread Victor Krapivensky
Hello, strace community! Project: advanced syscall tampering and filtering with Lua/LuaJIT. Accomplishments: this week, I've addressed most of the problems pointed out by Eugene. I'll send patches once they are fully ready. I understand my pace has become quite slow. I also apologize for the

Re: [PATCH RESEND 1/8] netlink: call get_fd_nl_family before decode nlmsghdr

2017-08-08 Thread Dmitry V. Levin
On Sun, Aug 06, 2017 at 07:52:17AM +0800, JingPiao Chen wrote: > On Sun, Aug 06, 2017 at 02:10:16AM +0300, Dmitry V. Levin wrote: > > On Tue, Aug 01, 2017 at 07:48:41AM +0800, JingPiao Chen wrote: > > > Prepare for NETLINK_KOBJECT_UEVENT decode. The messages > > > of NETLINK_KOBJECT_UEVENT do not

JingPiao Chen's GSoC status report - #10 of 13

2017-08-08 Thread JingPiao Chen
Hello, strace community! Project: Netlink socket parsers. Accoplisment: Continue to decoded NETLINK_ROUTE netlink attributes and wrote draft of Work Product Submission [1]. Next week, I hope that the patches of NETLINK_ROUTE decode can be reviewed. So I can fix them. I will continue to finish

Re: [PATCH RESEND 1/8] netlink: call get_fd_nl_family before decode nlmsghdr

2017-08-08 Thread Dmitry V. Levin
On Tue, Aug 08, 2017 at 03:07:40PM +0300, Dmitry V. Levin wrote: > On Sun, Aug 06, 2017 at 07:52:17AM +0800, JingPiao Chen wrote: > > On Sun, Aug 06, 2017 at 02:10:16AM +0300, Dmitry V. Levin wrote: > > > On Tue, Aug 01, 2017 at 07:48:41AM +0800, JingPiao Chen wrote: > > > > Prepare for

Re: [PATCH v2 1/3] netlink: call get_fd_nl_family before decode nlmsghdr

2017-08-08 Thread Dmitry V. Levin
On Tue, Aug 08, 2017 at 10:37:37PM +0800, JingPiao Chen wrote: > Prepare for NETLINK_KOBJECT_UEVENT decode. The messages > of NETLINK_KOBJECT_UEVENT do not contain nlmsghdr. > > * netlink.c (NL_FAMILY_*): Remove enum. > (get_fd_nl_family): Replace NL_FAMILY_ERROR with -1. > (decode_nlmsg_type):

Re: [PATCH RESEND 1/8] netlink: call get_fd_nl_family before decode nlmsghdr

2017-08-08 Thread JingPiao Chen
On Tue, Aug 08, 2017 at 03:22:31PM +0300, Dmitry V. Levin wrote: > On Tue, Aug 08, 2017 at 03:07:40PM +0300, Dmitry V. Levin wrote: > > On Sun, Aug 06, 2017 at 07:52:17AM +0800, JingPiao Chen wrote: > > > On Sun, Aug 06, 2017 at 02:10:16AM +0300, Dmitry V. Levin wrote: > > > > On Tue, Aug 01, 2017

Re: [PATCH RESEND 1/8] netlink: call get_fd_nl_family before decode nlmsghdr

2017-08-08 Thread Dmitry V. Levin
On Tue, Aug 08, 2017 at 09:51:17PM +0800, JingPiao Chen wrote: > On Tue, Aug 08, 2017 at 03:22:31PM +0300, Dmitry V. Levin wrote: > > On Tue, Aug 08, 2017 at 03:07:40PM +0300, Dmitry V. Levin wrote: > > > On Sun, Aug 06, 2017 at 07:52:17AM +0800, JingPiao Chen wrote: > > > > On Sun, Aug 06, 2017

[PATCH v2 1/3] netlink: call get_fd_nl_family before decode nlmsghdr

2017-08-08 Thread JingPiao Chen
Prepare for NETLINK_KOBJECT_UEVENT decode. The messages of NETLINK_KOBJECT_UEVENT do not contain nlmsghdr. * netlink.c (NL_FAMILY_*): Remove enum. (get_fd_nl_family): Replace NL_FAMILY_ERROR with -1. (decode_nlmsg_type): Correct the comment. Skip family specific type decoders for type <

[PATCH v2 3/3] tests: check print NETLINK_KOBJECT_UEVENT buffer in string

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

[PATCH v2 2/3] netlink: print all NETLINK_KOBJECT_UEVENT buffer in string

2017-08-08 Thread JingPiao Chen
* netlink.c (decode_netlink): Call printstrn when family == NETLINK_KOBJECT_UEVENT. --- netlink.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/netlink.c b/netlink.c index 2cc7967..c8ac58b 100644 --- a/netlink.c +++ b/netlink.c @@ -443,6 +443,12 @@ decode_netlink(struct tcb *const