Re: [PATCH] netlink: add type decoding

2017-06-05 Thread JingPiao Chen
On Sun, Jun 04, 2017 at 10:40:09PM +0300, Dmitry V. Levin wrote: > On Mon, Jul 11, 2016 at 12:54:59PM +, Fabien Siron wrote: > > Decode and print the type of the main netlink protocols. > > JingPiao Chen, I've reworked Fabien's commits from your netlink branch > up to and including this one (5

Re: [PATCH v1 1/2] syscall.c: split trace_syscall() into 5 functions

2017-06-05 Thread Victor Krapivensky
On Mon, Jun 05, 2017 at 02:47:41AM +0300, Dmitry V. Levin wrote: > Why "static inline"? Is it important whether the function is actually > inlined or not? If not, no need to insist on inlining. OK, removed "inline". > Why syscall_entering_decode was given this name? It does get_scno, > get_sys

Re: [PATCH v1 1/2] syscall.c: split trace_syscall() into 5 functions

2017-06-05 Thread Dmitry V. Levin
On Mon, Jun 05, 2017 at 02:23:40PM +0300, Victor Krapivensky wrote: > On Mon, Jun 05, 2017 at 02:47:41AM +0300, Dmitry V. Levin wrote: > > Why "static inline"? Is it important whether the function is actually > > inlined or not? If not, no need to insist on inlining. > > OK, removed "inline". >

Re: [PATCH v2 1/6] tests: check decoding of NETLINK_SOCK_DIAG message types

2017-06-05 Thread Dmitry V. Levin
On Mon, Jun 05, 2017 at 10:43:55AM +0800, JingPiao Chen wrote: > * tests/create_nl_socket.c: New file. > * tests/tests.h (create_nl_socket): New prototype. > * tests/Makefile.am (libtests_a_SOURCES): Add create_nl_socket.c. Could you move this part into a separate commit, please? -- ldv signa

[PATCH v2 1/2] syscall.c: split trace_syscall() into 5 functions

2017-06-05 Thread Victor Krapivensky
This change removes the trace_syscall function. Now, the code that uses syscall.c trace functions is expected to check whether it is a syscall entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an appropriate sequence of function calls. * defs.h: Change comment on TCB_INSYSCALL,

[PATCH v2 2/2] strace.c: move termination code to a separate function

2017-06-05 Thread Victor Krapivensky
This will be needed for the pull-style API. * strace.c (terminate): New function. (main): Use it. --- strace.c | 28 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/strace.c b/strace.c index af5fd346..5accb141 100644 --- a/strace.c +++ b/strace.c @@ -2

[PATCH v2 0/2] Further preparations for implementing pull-style API

2017-06-05 Thread Victor Krapivensky
Victor Krapivensky (2): syscall.c: split trace_syscall() into 5 functions strace.c: move termination code to a separate function defs.h| 21 strace.c | 48 +++-- syscall.c | 82 --

Re: [PATCH v2 2/6] tests: check decoding of NETLINK_ROUTE message types

2017-06-05 Thread Dmitry V. Levin
On Mon, Jun 05, 2017 at 10:43:56AM +0800, JingPiao Chen wrote: > * tests/netlink_route.c: New file. > * tests/netlink_route.test: New test. As all tests/netlink_*.test files are exactly the same, the first one is enough, all the rest should go to tests/gen_tests.in. Assuming that the first one is

Re: [PATCH v1 1/2] syscall.c: split trace_syscall() into 5 functions

2017-06-05 Thread Victor Krapivensky
On Mon, Jun 05, 2017 at 02:35:23PM +0300, Dmitry V. Levin wrote: > Where are you going to call the exiting hook from? Is it going to happen > before get_regs/get_syscall_result calls or after them? Oops. Yes, it should be called after we decode syscall result, of course. As for naming, I think "

[PATCH v3 1/1] syscall.c: split trace_syscall() into 6 functions

2017-06-05 Thread Victor Krapivensky
This change removes the trace_syscall function. Now, the code that uses syscall.c trace functions is expected to check whether it is a syscall entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an appropriate sequence of function calls. * defs.h: Change comment on TCB_INSYSCALL,

[PATCH v3 1/6] tests: check decoding of NETLINK_SOCK_DIAG message types

2017-06-05 Thread JingPiao Chen
* tests/netlink_sock_diag.c: New file. * tests/create_nl_socket.c: Likewise. * tests/netlink_sock_diag.test: New test. * tests/pure_executables.list: Add netlink_sock_diag. * tests/.gitignore: Likewise. * tests/tests.h (create_nl_socket): New prototype. * tests/Makefile.am (DECODER_TESTS): Add netl

[PATCH v3 4/6] tests: check decoding of NETLINK_NETFILTER message types

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

[PATCH v3 6/6] tests: check decoding of NETLINK_XFRM message types

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

[PATCH v3 2/6] tests: check decoding of NETLINK_ROUTE message types

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

[PATCH v3 5/6] tests: check decoding of NETLINK_SELINUX message types

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

[PATCH v3 3/6] tests: check decoding of NETLINK_AUDIT message types

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

Re: [PATCH v3 1/1] syscall.c: split trace_syscall() into 6 functions

2017-06-05 Thread Dmitry V. Levin
On Mon, Jun 05, 2017 at 04:53:59PM +0300, Victor Krapivensky wrote: > This change removes the trace_syscall function. Now, the code that uses > syscall.c trace functions is expected to check whether it is a syscall > entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an > appropr

clock_nanosleep failure

2017-06-05 Thread Andreas Schwab
A lot of tests fail because clock_nanosleep fails: $ ../strace -e clock_nanosleep ./clock_nanosleep >/dev/null clock_nanosleep(CLOCK_REALTIME, 0, {tv_sec=0, tv_nsec=789985}, NULL) = 0 clock_nanosleep(CLOCK_REALTIME, 0, NULL, 0xefca3994) = -1 EFAULT (Bad address) clock_nanosleep(CLOCK_REALTIME, 0,

Re: [PATCH v3 1/1] syscall.c: split trace_syscall() into 6 functions

2017-06-05 Thread Victor Krapivensky
On Mon, Jun 05, 2017 at 06:14:49PM +0300, Dmitry V. Levin wrote: > Your comments tend to be longer than 80 symbols, please wrap them. > > Note that in this edition of the patch TCB_INSYSCALL is cleared in > syscall_exiting_finish, not in syscall_exiting_trace. Please ensure > that other related c

Re: [PATCH] netlink: add type decoding

2017-06-05 Thread Dmitry V. Levin
On Mon, Jun 05, 2017 at 03:07:04PM +0800, JingPiao Chen wrote: > On Sun, Jun 04, 2017 at 10:40:09PM +0300, Dmitry V. Levin wrote: [...] > > getfdnlproto (get_fd_nl_family in my edition) is not cheap > > (it invokes syscalls), needless calls should be avoided. > > I have read your code, I will reba

Re: Introducing new filtering architecture.

2017-06-05 Thread Eugene Syromiatnikov
On Sun, Jun 04, 2017 at 01:15:05PM +0700, Nikolay Marchuk wrote: > Hello, > This message describes new filtering architecture. Please, review it and > give me feedback. > > Filtering language. > The format of new filtering expression is: > > action(expr [, argument1=value1[,argument2=value2

Re: Introducing new filtering architecture.

2017-06-05 Thread Eugene Syromiatnikov
On Sun, Jun 04, 2017 at 01:15:05PM +0700, Nikolay Marchuk wrote: > Hello, > This message describes new filtering architecture. Please, review it and > give me feedback. One more aspect which I forgot to cover: by which means you expect to provide backwards compatibility for the existing filtering

Re: Edgar Kaziakhmedov's GSoC status report - #1 of 13

2017-06-05 Thread Eugene Syromiatnikov
On Mon, Jun 05, 2017 at 09:54:29AM +0300, Edgar Kaziahmedov wrote: > Hi, Strace Community > > Advanced syscall information tool > Accomplishments: > -> Edited configure and created Makefile.am's in tools and tools/asinfo > directories to build multiple executables. > -> Confirmed the final version

[PATCH v4 1/1] syscall.c: split trace_syscall() into 6 functions

2017-06-05 Thread Victor Krapivensky
This change removes the trace_syscall function. Now, the code that uses syscall.c trace functions is expected to check whether it is a syscall entry or exit (with entering(tcp)/exiting(tcp)) itself, and then make an appropriate sequence of function calls. * defs.h: Change comment on TCB_INSYSCALL,

Re: Edgar Kaziakhmedov's GSoC status report - #1 of 13

2017-06-05 Thread Edgar Kaziahmedov
On Mon, 5 Jun 2017 20:43:58 +0200 Eugene Syromiatnikov wrote: > On Mon, Jun 05, 2017 at 09:54:29AM +0300, Edgar Kaziahmedov wrote: > > Hi, Strace Community > > > > Advanced syscall information tool > > Accomplishments: > > -> Edited configure and created Makefile.am's in tools and > > tools/as

Re: Edgar Kaziakhmedov's GSoC status report - #1 of 13

2017-06-05 Thread Dmitry V. Levin
On Mon, Jun 05, 2017 at 09:54:29AM +0300, Edgar Kaziahmedov wrote: > Hi, Strace Community > > Advanced syscall information tool > Accomplishments: > -> Edited configure and created Makefile.am's in tools and tools/asinfo > directories to build multiple executables. > -> Confirmed the final version

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

2017-06-05 Thread Victor Krapivensky
Hello, strace community! Accomplishments: this week I've submitted a number of patches that enable implementing a pull-style API for LuaJIT. I've had two exams this week, and this has affected my work on this project. Next week, I hope to implement initial support for LuaJIT hooking, with next_sc

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

2017-06-05 Thread Nikolay Marchuk
Hello, strace community! Advanced syscall filtering syntax. Accomplishments: this week I've introduced draft of new filtering architecture and I am currently working on first implementation of this architecture with processing of -e option to new filters. I had an exam this week, and this affected