Re: [PATCH] fix length bug in affinity mask displays (try 3)

2016-01-08 Thread Dmitry V. Levin
Hi, On Fri, Jan 08, 2016 at 11:28:33AM -0500, Joe Korty wrote: [...] > Hi Dmitry, > Thanks for replying. I have had a hard time posting to > the list, so it is nice to know that the email actually > got through to someone on the third try ... I suppose it has something to do with anti-spam

Re: using ptrace to cancel a syscall on sparc

2015-12-20 Thread Dmitry V. Levin
On Sun, Dec 20, 2015 at 12:47:54AM -0500, Mike Frysinger wrote: > i've been playing with ptrace on sparc and trying to use it to watch and > cancel specific syscalls. i have this working for other arches already. [...] > i'm having trouble with canceling of the syscall itself. seems like > no

strace 4.11 released

2015-12-21 Thread Dmitry V. Levin
strace 4.11 is tagged and uploaded. I'd like to use this opportunity to thank all who contributed to this release. $ git log v4.10..v4.11 | git shortlog -s 10 Andreas Schwab 1 Anton Blanchard 16 Denys Vlasenko 500 Dmitry V. Levin 3 Elliott Hughes 37 Elvira

Preparing for v4.11: ready for release?

2015-12-19 Thread Dmitry V. Levin
Hi, On Thu, Dec 10, 2015 at 08:26:22AM +0300, Dmitry V. Levin wrote: > There is quite enough good stuff accumulated in strace.git > since v4.10 so I think it's time to cut a new release. > > If you have pending patches to include before the release, > please submit them now. >

Re: [PATCH v2] ioctl: fix ioctl command number decoding in case of conflicts

2015-11-30 Thread Dmitry V. Levin
On Mon, Nov 30, 2015 at 02:49:11PM +0100, Patrik Jakobsson wrote: > On Thu, Sep 24, 2015 at 2:45 AM, Dmitry V. Levin <l...@altlinux.org> wrote: > > On Wed, Sep 23, 2015 at 10:11:55AM +0200, Gabriel Laskar wrote: > >> When a command number was decoded through ioc

Re: [PATCH] getdents: fix typos in array output

2015-11-18 Thread Dmitry V. Levin
On Thu, Nov 19, 2015 at 12:11:33AM +0100, Gabriel Laskar wrote: > Array should be enclosed by square brakets, and elements should be > separated by commas. > > * dirent.c: fix typos in array output of getdents() Thanks. I suppose getdents64 has same issues. btw, we've got a test for these

Re: [PATCH] getdents: fix typos in array output

2015-11-19 Thread Dmitry V. Levin
On Thu, Nov 19, 2015 at 11:44:30AM +0100, Gabriel Laskar wrote: > Array should be enclosed by square brakets, and elements should be > separated by commas. > > * dirent.c: fix typos in array output of getdents() > * tests/getdents.awk: change test to fix typos > * tests/getdents.out: output

Re: [PATCH] recvmsg: add support for IP_PKTINFO decoding

2015-11-21 Thread Dmitry V. Levin
Hi, On Thu, Nov 19, 2015 at 06:16:46PM +0100, Gabriel Laskar wrote: > * net.c (printcmsghdr): add IP_PKTINFO decoding > * xlat/sol_ip_vals.in: new file IP_PKTINFO is not the only SOL_IP cmsg type worth decoding. I've pushed a slightly different commit that also contains a test for new parsers.

Re: [PATCH] support C libs w/out System V shared memory/ipc

2015-11-23 Thread Dmitry V. Levin
Hi, On Sat, Oct 31, 2015 at 04:57:04PM +0300, Dmitry V. Levin wrote: > On Sat, Oct 31, 2015 at 12:47:53AM -0400, Mike Frysinger wrote: > > diff --git a/ipc_msg.c b/ipc_msg.c > > index 55747cb..2fc7470 100644 > > --- a/ipc_msg.c > > +++ b/i

Re: [Intel-gfx] [PATCH v4 2/5] drm: Add private data field to trace control block

2015-11-23 Thread Dmitry V. Levin
On Mon, Sep 07, 2015 at 08:23:57PM +0200, Patrik Jakobsson wrote: > On Mon, Sep 7, 2015 at 6:51 PM, Dmitry V. Levin wrote: > > On Mon, Aug 31, 2015 at 02:37:07PM +0200, Patrik Jakobsson wrote: > > [...] > >> Here's my take on it (I assume it needs some di

Re: [PATCH v4 3/5] drm: Add dispatcher and driver identification for DRM

2015-11-23 Thread Dmitry V. Levin
On Fri, Sep 11, 2015 at 12:57:06PM +0200, Patrik Jakobsson wrote: > On Tue, Sep 08, 2015 at 03:36:25AM +0300, Dmitry V. Levin wrote: > > On Mon, Aug 24, 2015 at 02:42:48PM +0200, Patrik Jakobsson wrote: [...] > > > +static char *drm_get_driver_name(struct tcb *tcp) > >

Re: [PATCH v2] tests: add strace-E.test

2016-06-07 Thread Dmitry V. Levin
On Tue, Jun 07, 2016 at 10:38:21AM +0800, Fei Jie wrote: > * tests/strace-E.test: New test. > * tests/Makefile.am (MISC_TESTS): Add it. > --- > tests/Makefile.am | 1 + > tests/strace-E.test | 15 +++ > 2 files changed, 16 insertions(+) > create mode 100755 tests/strace-E.test >

Re: [GSOC] 4.11, 4.12 build results on Open Build Service

2016-06-08 Thread Dmitry V. Levin
On Tue, Jun 07, 2016 at 08:56:14AM -0400, Jeff Mahoney wrote: [...] > FYI, the build service can sync from a git repo directly. > > https://en.opensuse.org/openSUSE:Build_Service_Concept_SourceService > > You can use my blktrace package as an example: > >

Re: [PATCH] tests: add strace-E.test

2016-06-06 Thread Dmitry V. Levin
On Fri, Jun 03, 2016 at 01:36:48PM +0800, Fei Jie wrote: > * tests/strace-E.c: New file. > * tests/strace-E.test: New test. > * tests/.gitignore: Add strace-E. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (MISC_TESTS): Add strace-E.test. > --- > tests/.gitignore| 1 + >

Re: [PATCH v3] tests: add xetrlimit.test

2016-06-06 Thread Dmitry V. Levin
On Wed, Jun 01, 2016 at 06:52:19PM +0800, Fei Jie wrote: > * tests/xetrlimit.c: New file. > * tests/xetrlimit.test: New test. > * tests/.gitignore: Add xetrlimit. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (DECODER_TESTS): Add xetrlimit.test. Try this with the following command: (ulimit

Re: [GSOC] 4.11, 4.12 build results on Open Build Service

2016-06-06 Thread Dmitry V. Levin
On Fri, Jun 03, 2016 at 08:35:55AM +0800, Yun-Chih Chen wrote: > i586 in 4.12 fails with one testcase. This is likely the same issue as reported by Steve, hopefully fixed in master branch. -- ldv pgpCBBoooTLwU.pgp Description: PGP signature

Re: Preparing for the next release: call for testing

2016-06-06 Thread Dmitry V. Levin
On Sat, Jun 04, 2016 at 02:23:53PM +0100, Steve McIntyre wrote: [...] > * The strace -S test fails when building/running using a 32-bit >userspace and a 64-bit kernel - the output includes both 64-bit and >32-bit tracing which confuses the test. I have a hacky fix. Thanks Steve. Since

x32 gcc sign extension bug (was: Long/address printing in non-native personalities)

2016-06-10 Thread Dmitry V. Levin
Hi, On Fri, Jun 10, 2016 at 06:58:57PM +0300, Eugene Syromyatnikov wrote: > Hello. > > It's been brought to my attention that one of strace tests (nsyscalls) is > failing when x32 ABI is used. > > $ cat tests-mx32/nsyscalls.log > 1c1 > < syscall_546(0xbadc0ded, 0xbadc1ded, 0xbadc2ded,

Re: question about testcases

2016-05-26 Thread Dmitry V. Levin
On Thu, May 26, 2016 at 04:59:18PM +0800, Fei, Jie/费 杰 wrote: > Hi all, > > Do you think that the testcase of running a lot of strace processes at > the same time worth testing? Is it going to be a test of strace or a test of operating systems? If it's the first case, then yes. If it's the

Re: [PATCH 2/2] tests: add vhangup.test

2016-05-26 Thread Dmitry V. Levin
On Thu, May 19, 2016 at 03:58:37PM +0800, Fei Jie wrote: > * tests/vhangup.c: New file. > * tests/vhangup.test: New test. > * tests/.gitignore: Add vhangup. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (DECODER_TESTS): Add vhangup.test. Applied with a correction commit on top of it. --

Re: [PATCH] tests: add signal_receive.test

2016-05-26 Thread Dmitry V. Levin
On Wed, May 25, 2016 at 03:56:41PM +0800, Fei Jie wrote: [...] > diff --git a/tests/signal_receive.c b/tests/signal_receive.c > new file mode 100644 > index 000..73c4ea3 > --- /dev/null > +++ b/tests/signal_receive.c > @@ -0,0 +1,67 @@ > +#include "tests.h" > +#include > +#include >

Re: [PATCH 1/2] tests: add mount.test

2016-05-26 Thread Dmitry V. Levin
On Thu, May 19, 2016 at 03:58:36PM +0800, Fei Jie wrote: [...] > +int > +main(void) > +{ > + static const char source[] = "mount_source"; > + static const char target[] = "mount_target"; > + long rc = syscall(__NR_mount, source, target, "ext2", MS_INVAL, NULL); > +

Re: [PATCH v2 1/7] Make getfdproto returns integer instead of string

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:21PM +, Fabien Siron wrote: > This commit aims to avoid future string comparisons with getfdproto function > in changing its return type. It also adapts the functions that use it. > > * defs.h (print_sockaddr_by_inode): Add. > * socketutils.h (socket_protocols):

Re: [PATCH v2 2/7] Add a general netlink socket parser

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > This commit introduces a general socket netlink parser which prints > the header and a string for the remaining part of the buffer. It doesn't > handle all the netlink flags and types because the parser needs more > information. It

Re: Only absolute file paths in strace possible?

2016-06-14 Thread Dmitry V. Levin
Hi, On Tue, Jun 14, 2016 at 07:02:20AM +0200, Jens Offenbach wrote: > Hallo, > I must analyze a library (*.tar.gz) that includes a lot of files and most of > them are not required for a specific run. > > I used strace 4.8.1 on Ubuntu Server 16.04 with: > strace -e trace=file -f -v -o

Re: [PATCH v2 3/7] tests: check decoding of netlink protocol

2016-06-14 Thread Dmitry V. Levin
On Mon, Jun 13, 2016 at 02:37:23PM +, Fabien Siron wrote: [...] > +static void > +send_query(const int fd) > +{ > + struct { > + struct nlmsghdr nlh; > + char magic[4]; > + } req = { > + .nlh = { > + .nlmsg_len = sizeof(req), > +

Re: [PATCH v4 2/2] tests: add signal_receive.test

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 01:20:27PM +0800, Fei Jie wrote: > * tests/signal_receive.c: New file. > * tests/signal_receive.test: New test. > * tests/.gitignore: Add signal_receive. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (MISC_TESTS): Add signal_receive.test. > --- > tests/.gitignore

Re: [PATCH v2 2/7] Add a general netlink socket parser

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 09:09:19AM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-14 12:00:30) > > On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > > > +static void > > > +printsockbuf(struct tcb *tcp, int fd, long addr, long addrlen) >

Re: [PATCH v2 3/7] tests: check decoding of netlink protocol

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 09:23:11AM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-14 12:03:47) > > On Mon, Jun 13, 2016 at 02:37:23PM +, Fabien Siron wrote: > > [...] > > > +static void > > > +send_query(const int fd) > > > +{ >

Re: [PATCH v3 1/7] Make getfdproto returns integer instead of string

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:42:59PM +, Fabien Siron wrote: > This commit aims to avoid future string comparisons with getfdproto function > in changing its return type. It also adapts the functions that use it. I'm not quite sure what does the first sentence mean. > * defs.h

Re: [PATCH 5/5] file_ioctl.c: fix FIDEDUPERANGE output

2016-05-27 Thread Dmitry V. Levin
On Thu, May 26, 2016 at 11:33:07PM -0400, je...@suse.com wrote: > > * file_ioctl.c (file_ioctl): initialize rc to true in FIDEDUPERANGE. > Otherwise we'll never show the output data in abbrev mode. Are we going to show something more interesting than " => {info=...}" on exiting FIDEDUPERANGE

Re: Help with the test for "strace -e trace=%sched"

2016-05-30 Thread Dmitry V. Levin
On Sun, May 29, 2016 at 05:20:51PM +0530, haris iqbal wrote: > I need a little help wit the test for the new feature of "strace -e". > > Should it be just a script running "run_strace -fe trace=%sched > > /dev/null", just like the way "-f" option is checked > > or > > should it also contain a c

Re: [PATCH 1/3] Add decoding for binder ioctls

2016-05-30 Thread Dmitry V. Levin
On Sat, May 28, 2016 at 10:40:26PM +0200, Antoine Damhet wrote: > This patch introduce decoding for binder ioctls including the command > and return protocol from BINDER_WRITE_READ. Nice work. I have some comments, though. > --- /dev/null > +++ b/binder.c > @@ -0,0 +1,211 @@ > +#include

Preparing for the next release: call for testing

2016-05-30 Thread Dmitry V. Levin
Hi, There is quite enough good stuff accumulated in strace.git since v4.11 so I think it's time to cut a new release. This is going to be the most tested strace released so far, with code coverage about 70% on x86_64. Still, there have been quite a few changes since v4.11 that could have caused

Re: [PATCH v2] Fix -yy documentation

2016-05-26 Thread Dmitry V. Levin
On Thu, May 26, 2016 at 03:29:41PM +, Fabien Siron wrote: > * strace.c (usage): Fix -yy documentation. > * strace.1: Likewise. > --- > strace.1 | 2 +- > strace.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/strace.1 b/strace.1 > index 429cdfc..b7dddc0 100644 >

Re: [PATCH 0/5] btrfs decoding fixes

2016-05-27 Thread Dmitry V. Levin
On Thu, May 26, 2016 at 11:33:02PM -0400, je...@suse.com wrote: > > After submitting the last patch, I hunted down the last of the test case > failures. These are all failures in the output side of a RW ioctl and > those test cases weren't easily runnable. They are now, provided > a btrfs file

Re: [PATCH] tests/btrfs.c: fix btrfs-v for BTRFS_IOC_TREE_SEARCH

2016-05-26 Thread Dmitry V. Levin
On Thu, May 26, 2016 at 04:09:28PM -0400, Jeff Mahoney wrote: > * tests/btrfs.c (btrfs_test_send_ioctl): Assign key_reference to > search_args for BTRFS_IOC_TREE_SEARCH ioctl tests. Applied, thanks. -- ldv pgpsLqyNrxpGa.pgp Description: PGP signature

Re: [PATCH v7 2/4] Add a general netlink socket parser

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 01:27:04PM +, Fabien Siron wrote: > Introduce a general socket netlink parser which prints > the header and a string for the remaining part of the buffer. It doesn't > handle all the netlink flags and types because the parser needs more > information. It will be done

Re: [PATCH v7 4/4] Netlink: handle multi netlink messages

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 01:27:06PM +, Fabien Siron wrote: > Handle the case where there are several messages in the buffer. > This is very useful to some protocols like SOCK_DIAG. > > * netlink.c (nlmsg_fetch, nlmsg_next): New functions. > (decode_netlink_msg): New function. >

Re: [PATCH v7 1/4] Add a enum for decoding to tprint_iov() and tprint_iov_upto()

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 01:27:03PM +, Fabien Siron wrote: > Introduce a new type iov_decode which will be used instead of the integer > "decode" as a parameter. Applied, thanks. -- ldv pgpIi3JpA4v0W.pgp Description: PGP signature

Re: [PATCH v2 1/3] Add decoding for binder ioctls

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 11:30:29AM +0200, Antoine Damhet wrote: [...] > > > + if (_IOC_SIZE(type) > 0) { > > > + tprints("["); > > > + printxval(x, type, str); > > > + tprints(", "); > > > + if (pos + sizeof(type) +

Re: [PATCH v6 4/4] Netlink: handle multi netlink messages

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 10:19:03AM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-21 17:43:49) > > On Tue, Jun 21, 2016 at 02:42:46PM +, Fabien Siron wrote: > > [...] > > > +static unsigned long > > > +nlmsg_next(struct nlmsghdr *nlmsghdr,

Re: [PATCH v6 4/4] Netlink: handle multi netlink messages

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 12:18:38PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-22 11:13:42) > > On Wed, Jun 22, 2016 at 10:19:03AM +, Fabien Siron wrote: > > > Quoting Dmitry V. Levin (2016-06-21 17:43:49) > > > > On Tue, Jun 21, 2016 at 02:42:

Re: [PATCH v2 1/3] Add decoding for binder ioctls

2016-06-22 Thread Dmitry V. Levin
On Wed, Jun 22, 2016 at 03:41:19PM +0200, Gabriel Laskar wrote: [...] > Since android does not use the configure, but a separate Makefile with > all the values hardcoded, Does it? OMG. > does it makes sense to bother with it? Absolutely not. -- ldv pgp85B1IwC4Wc.pgp Description: PGP

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote: > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: [...] > > +void > > +decode_netlink(struct tcb *tcp, unsigned long addr, unsigned long size) > > +{ > > + struct nlmsghdr nlmsghdr; >

Re: [PATCH v2 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:13:06PM +0300, Dmitry V. Levin wrote: > On Wed, Jun 15, 2016 at 09:09:19AM +, Fabien Siron wrote: > > Quoting Dmitry V. Levin (2016-06-14 12:00:30) > > > On Mon, Jun 13, 2016 at 02:37:22PM +, Fabien Siron wrote: > > > > +static voi

Re: [PATCH 1/2] tests: add signal2name function to libtests

2016-06-14 Thread Dmitry V. Levin
On Tue, May 31, 2016 at 02:13:57PM +0800, Fei Jie wrote: > * tests/tests.h (signal2name): New prototype. > * tests/signal2name.c: New file. > * tests/Makefile.am (libtests_a_SOURCES): Add it. > --- > tests/Makefile.am | 1 + > tests/signal2name.c | 125 >

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 01:22:12PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 01:36:47) > > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: [...] > As verbose must be used instead of show_fd_path, the following seems better: > > s

Re: [PATCH v3 1/7] Make getfdproto returns integer instead of string

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 12:25:02PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-15 17:36:35) > > On Wed, Jun 15, 2016 at 12:42:59PM +, Fabien Siron wrote: > > > This commit aims to avoid future string comparisons with getfdproto > > > function &

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 01:26:15PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 10:08:22) > > On Thu, Jun 16, 2016 at 04:36:47AM +0300, Dmitry V. Levin wrote: > > > On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: > > [...] > > > &g

Re: [PATCH v3 4/7] Introduce get_sockaddr_by_inode_cached and get_sockaddr_by_inode

2016-06-16 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:02PM +, Fabien Siron wrote: > Because netlink parsing needs a way to get the netlink protocol and the > socketutils.c file can only print the protocol, this commit adds an interface > to get some socket information without printing it. > > * defs.h >

Re: [PATCH v5 4/4] Netlink: handle multi netlink messages

2016-06-21 Thread Dmitry V. Levin
On Tue, Jun 21, 2016 at 12:44:45PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-20 23:40:38) > > On Mon, Jun 20, 2016 at 04:06:45PM +, Fabien Siron wrote: > > > This commit handles the case where there are several messages in the > > > buffer

Re: [PATCH v2 1/3] Add decoding for binder ioctls

2016-06-20 Thread Dmitry V. Levin
On Mon, Jun 20, 2016 at 03:07:52PM +0300, Dmitry V. Levin wrote: > On Sat, Jun 18, 2016 at 07:13:54PM +0200, Antoine Damhet wrote: [...] > > + if (_IOC_SIZE(type) > 0) { > > + tprints("["); > > + printxval(x, type, str

Re: [PATCH v6 4/4] Netlink: handle multi netlink messages

2016-06-21 Thread Dmitry V. Levin
On Tue, Jun 21, 2016 at 02:42:46PM +, Fabien Siron wrote: [...] > +static unsigned long > +nlmsg_next(struct nlmsghdr *nlmsghdr, unsigned long addr, unsigned long > *len) { > + *len -= NLMSG_ALIGN(nlmsghdr->nlmsg_len); > + > + if (NLMSG_ALIGN(nlmsghdr->nlmsg_len) == 0 || > +

Re: [PATCH v6 2/4] Add a general netlink socket parser

2016-06-21 Thread Dmitry V. Levin
On Tue, Jun 21, 2016 at 02:42:44PM +, Fabien Siron wrote: [...] > + case IOV_DECODE_NETLINK: > + { > + if (len > c->data_size) > + len = c->data_size; > + c->data_size -= len; > +

Re: [PATCH v6 1/4] Add a enum for decoding to tprint_iov() and tprint_iov_upto().

2016-06-21 Thread Dmitry V. Levin
On Tue, Jun 21, 2016 at 02:42:43PM +, Fabien Siron wrote: > This commit introduces a new type iov_decode which will be used instead > of the integer "decode" as a parameter. The first line of commit message shouldn't end with dot. No need to begin each commit message with "This commit

Re: [PATCH v4 1/6] Make getfdproto returns integer instead of string

2016-06-19 Thread Dmitry V. Levin
On Fri, Jun 17, 2016 at 04:29:53PM +, Fabien Siron wrote: > Introduce a new enum type sock_proto and use it instead of strings for socket > protocols identification. > > * defs.h (get_proto_by_name): Add. > (sock_proto): New enum. > * socketutils.c (print_sockaddr_by_inode): Change type of

Re: [PATCH v4 4/6] tests: check decoding of netlink protocol

2016-06-19 Thread Dmitry V. Levin
On Fri, Jun 17, 2016 at 04:29:56PM +, Fabien Siron wrote: [...] > + const void *const efault = tail_alloc(sizeof(struct nlmsghdr) - 1); [...] > + sendto(fd, efault, sizeof(struct nlmsghdr), MSG_DONTWAIT, NULL, 0); > + > + printf("sendto(%d, %#lx, %u, MSG_DONTWAIT, NULL, 0) = -1 " >

Re: [PATCH v7 4/4] Netlink: handle multi netlink messages

2016-06-23 Thread Dmitry V. Levin
On Thu, Jun 23, 2016 at 10:49:53AM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-22 17:40:39) > > On Wed, Jun 22, 2016 at 01:27:06PM +, Fabien Siron wrote: > [...] > > > +static int > > > +nlmsg_fetch(struct tcb *tcp, struct nlmsghdr *nlmsg

Re: Netlink parser v5

2016-06-20 Thread Dmitry V. Levin
Hi, On Mon, Jun 20, 2016 at 02:34:20PM +, Fabien Siron wrote: > Hi, > > Changes since v4: > * Change iov_decoder to iov_decode and IOV_DECODER_* to IOV_DECODE_*. > * Squash commit old commit 5 and old commit 6 to current commit 4. In these series, most of added lines have leading tabs

Re: [PATCH v2 1/3] Add decoding for binder ioctls

2016-06-20 Thread Dmitry V. Levin
On Sat, Jun 18, 2016 at 07:13:54PM +0200, Antoine Damhet wrote: [...] > +static int > +decode_binder_commands_buffer(struct tcb *tcp, uintptr_t buffer, size_t pos, > + size_t size, const struct xlat *x, const char *str) > +{ > + if (size < sizeof(uint32_t)) { > +

Re: [PATCH v3 3/7] tests: check decoding of netlink protocol

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 02:20:07PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 10:40:18) > > On Wed, Jun 15, 2016 at 12:43:01PM +, Fabien Siron wrote: > > [...] > > > +static void > > > +send_query(const int fd, const unsigned int pid_m

Re: [PATCH v3 3/7] tests: check decoding of netlink protocol

2016-06-16 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:01PM +, Fabien Siron wrote: [...] > +static void > +send_query(const int fd, const unsigned int pid_magic) > +{ > + struct { > + struct nlmsghdr nlh; > + char magic[4]; > + } req = { > + .nlh = { > +

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-15 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:00PM +, Fabien Siron wrote: > This commit introduces a general socket netlink parser which prints > the header and a string for the remaining part of the buffer. It doesn't > handle all the netlink flags and types because the parser needs more > information. It

Re: [PATCH v3 2/7] Add a general netlink socket parser

2016-06-16 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 02:33:24PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 13:38:06) > > On Thu, Jun 16, 2016 at 01:26:15PM +, Fabien Siron wrote: > > > Quoting Dmitry V. Levin (2016-06-16 10:08:22) > > > > Alternatively, rather than makin

Re: [PATCH v3 3/7] tests: check decoding of netlink protocol

2016-06-17 Thread Dmitry V. Levin
On Fri, Jun 17, 2016 at 02:32:02PM +, Fabien Siron wrote: > Quoting Dmitry V. Levin (2016-06-16 14:54:58) > > On Thu, Jun 16, 2016 at 02:20:07PM +, Fabien Siron wrote: > > > Quoting Dmitry V. Levin (2016-06-16 10:40:18) > > > > On Wed, Jun 15, 2016 at 12:43:

Re: [PATCH] Add clone-f test

2016-01-15 Thread Dmitry V. Levin
Hi, On Fri, Jan 15, 2016 at 05:06:13PM +0800, Fei, Jie/费 杰 wrote: > Hi! > > I'm still not sure what kind of tests are needed so I continued writing > patches. > Could you give me some advice on these patches? First of all, there has to be clear what is being tested. Taking your clone-f.test as

Re: [PATCH-for-2.21-and-2.22] s390-64: remove socketcall syscalls

2016-01-13 Thread Dmitry V. Levin
On Fri, Jan 01, 2016 at 11:05:04PM -0500, Mike Frysinger wrote: > On 31 Dec 2015 23:28, Aurelien Jarno wrote: > > I have found some times to investigate. It seems there is no issue, my > > bad. I just discovered that on s390x, syscalls numbers above 256 are > > actually a a call to syscall 0 with

Re: make check failing on times with -m32

2016-01-13 Thread Dmitry V. Levin
On Fri, Jan 08, 2016 at 05:33:08PM +, Steve McIntyre wrote: [...] > Thanks, that seems to work - all the tests pass now. > > 4.11-1 is in Debian incoming right now with this as the only code > change on top of what was released in 4.11. According to

Re: SYS_FUNC macro fix for musl

2016-01-13 Thread Dmitry V. Levin
On Wed, Dec 16, 2015 at 05:39:32AM +0300, Dmitry V. Levin wrote: > On Wed, Dec 16, 2015 at 02:45:45AM +0100, Szabolcs Nagy wrote: > > * Dmitry V. Levin <l...@altlinux.org> [2015-12-16 03:33:03 +0300]: > > > On Tue, Dec 15, 2015 at 10:56:49PM +0100, Szabolcs Nagy wrote: &

Re: [PATCH] Add tests for option -e

2016-01-17 Thread Dmitry V. Levin
On Fri, Jan 08, 2016 at 04:07:52PM +0800, Fei, Jie/费 杰 wrote: > Hello! > > Thanks for your comments several days ago and according to them > I wrote this patch. This patch adds tests to check how strace -e works > with different parameters, how about it? [...] > > diff --git a/tests/abbrev-e.c

Re: make check failing on times with -m32

2016-01-14 Thread Dmitry V. Levin
Hi, On Fri, Jan 15, 2016 at 02:02:56AM +, Steve McIntyre wrote: > On Thu, Jan 14, 2016 at 02:31:01AM +, Steve McIntyre wrote: > >On Thu, Jan 14, 2016 at 05:00:30AM +0300, Dmitry V. Levin wrote: > >>On Fri, Jan 08, 2016 at 05:33:08PM +, Steve McIntyre wrote: >

Re: make check failing on times with -m32

2016-01-14 Thread Dmitry V. Levin
On Thu, Jan 14, 2016 at 02:31:01AM +, Steve McIntyre wrote: > On Thu, Jan 14, 2016 at 05:00:30AM +0300, Dmitry V. Levin wrote: > >On Fri, Jan 08, 2016 at 05:33:08PM +, Steve McIntyre wrote: > >[...] > >> Thanks, that seems to work - all the tests pass now. > &

Re: strace-4.12 compilation failure on kernel 3.10.102

2016-06-17 Thread Dmitry V. Levin
On Thu, Jun 16, 2016 at 02:59:37AM +, Li Er wrote: > the constant BTRFS_IOC_QUOTA_RESCAN_WAIT which is used in btrfs.c is not > defined in the header files of kernel 3.10.102, the kernel commit which added > the constant is 57254b6ebce4ceca02d9c8b615f6059c56c19238, as you can see by >

Re: [PATCH v3 5/7] Introduce getfdnlproto to obtain netlink protocol from fd

2016-06-17 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:03PM +, Fabien Siron wrote: > * defs.h (getfdnlproto): Add. getfdnlproto? getfdpath is already quite hard to read, but getfdnlproto? > * utils.c (getfdinode): New function. > (getfdnlproto): Likewise. > --- > defs.h | 1 + > util.c | 68 >

Re: [PATCH v3 6/7] Netlink: Introduce nlmsg_* functions

2016-06-17 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:04PM +, Fabien Siron wrote: > Since our target is not in the same process, the netlink macros NLMSG_* > must be rewritten for strace. > > * netlink.c (nlmsg_ok, nlmsg_next): New functions. > --- > netlink.c | 26 ++ > 1 file changed, 26

Re: [PATCH v3 7/7] Netlink: handle multi netlink messages

2016-06-17 Thread Dmitry V. Levin
On Wed, Jun 15, 2016 at 12:43:05PM +, Fabien Siron wrote: > * netlink.c (decode_netlink_or_printaddr_msg): From > decode_netlink_or_printaddr(). > (decode_netlink_or_printaddr): Call decode_netlink_or_printaddr_msg(). > --- > netlink.c | 16 ++-- > 1 file changed, 14

Re: [PATCH] Add configure --enable-check-coverage option

2016-02-04 Thread Dmitry V. Levin
On Mon, Feb 01, 2016 at 06:15:39PM +0100, Gabriel Laskar wrote: > > * configure.ac: enable AX_CODE_COVERAGE > * Makefile.am: use AX_CODE_COVERAGE > * m4/ax_code_coverage.m4: support for AX_CODE_COVERAGE > * .gitignore: now ignore *.gcda and *.gcno files > --- Nice, thanks! Applied with minor

Re: Update strace-graph to handle current strace output

2016-02-05 Thread Dmitry V. Levin
On Wed, Jan 27, 2016 at 03:07:09PM +1100, Keith Owens wrote: > strace-graph does not work with the current strace output. These patches > bring it up to date and fix a few bugs. You can also get this from git:// > git.code.sf.net/u/kaos/strace under branch graph. Applied, thanks. -- ldv

Re: Newbie looking for bugs or patches needed

2016-02-09 Thread Dmitry V. Levin
Hi, On Mon, Feb 08, 2016 at 11:08:24PM +0530, haris iqbal wrote: > Hello, > > Is there a place where I can look for bugs to fix or patches or features > needed. If you are looking for something to code that does not require deep knowledge of strace internals, there are at least two areas that

Re: syscall_4294967295

2016-02-12 Thread Dmitry V. Levin
Hi, On Sat, Feb 13, 2016 at 04:05:50AM +0100, Pas wrote: > Hello! > > I would like to ask for a bit of help and maybe report a bug (but it's > probably just a known, however, a rather confusing behavior of strace). > > While running serf (a Raft consensus agent) in Docker (which uses cgroups >

Re: Working on -e trace

2016-02-13 Thread Dmitry V. Levin
On Thu, Feb 11, 2016 at 09:04:56PM +0530, haris iqbal wrote: [...] > And the part of adding to syscallent.h file, I understood. But man > there are too many files. ;) Right, but you can edit them all with a single sed script. ;) > Another thing. If I did not miss any step above then I can start

Re: FOSDEM 2016 next weekend

2016-01-29 Thread Dmitry V. Levin
On Mon, Jan 25, 2016 at 03:11:15PM +0100, Philippe Ombredanne wrote: > On Mon, Jan 25, 2016 at 10:13 AM, Gabriel Laskar wrote: > > On Mon, 25 Jan 2016 05:05:07 +0300, Dmitry V. Levin wrote: > > > >> Hi, > >> > >> I'm going to FOSDEM next weekend. > &g

Re: Expand full structure

2016-01-29 Thread Dmitry V. Levin
On Tue, Jan 26, 2016 at 01:39:46PM -0500, Preston Moore wrote: > Ok perfect. That is now behaving exactly as I needed it to. Thanks! > > Here’s a second question, is there a way to instruct strace to not pretty > print flags values? For example, in the previously mentioned line can I get > the

Re: [PATCH 3/3] tests: add umask.test

2016-02-29 Thread Dmitry V. Levin
On Fri, Feb 26, 2016 at 05:41:39PM +0800, Fei Jie wrote: > * tests/umask.c: New file. > * tests/umask.test: New test. > * tests/.gitignore: Add umask. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (TESTS): Add umask.test. > --- > tests/.gitignore | 1 + > tests/Makefile.am | 2 ++ >

Re: [PATCH 1/3] tests: add uname.test

2016-02-29 Thread Dmitry V. Levin
On Fri, Feb 26, 2016 at 05:41:37PM +0800, Fei Jie wrote: > * tests/uname.c: New file. > * tests/uname.test: New test. > * tests/.gitignore: Add uname. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (TESTS): Add uname.test. > --- > tests/.gitignore | 1 + > tests/Makefile.am | 2 ++ >

Re: [PATCH 2/3] tests: add rename.test

2016-02-29 Thread Dmitry V. Levin
On Fri, Feb 26, 2016 at 05:41:38PM +0800, Fei Jie wrote: > * tests/rename.c: New file. > * tests/rename.test: New test. > * tests/.gitignore: Add rename. > * tests/Makefile.am (check_PROGRAMS): Likewise. > (TESTS): Add rename.test. > --- > tests/.gitignore | 1 + > tests/Makefile.am | 2 ++ >

Re: [PATCH] Avoid some memory waste while allocating tcbtab.

2016-02-29 Thread Dmitry V. Levin
On Wed, Feb 24, 2016 at 02:22:34PM +0100, Nahim El Atmani wrote: [...] > --- a/strace.c > +++ b/strace.c > @@ -689,6 +689,18 @@ newoutf(struct tcb *tcp) > } > > static void > +create_tcbtab(void) > +{ > + struct tcb *tcp; > + > + /* Allocate the initial tcbtab. */ > + tcbtabsize =

Re: A potential bug to squeeze extra memory through command line arguments

2016-02-29 Thread Dmitry V. Levin
On Wed, Feb 24, 2016 at 06:02:01PM +0530, haris iqbal wrote: [...] > Ok. I have come up with a separate memory model for tcbtab. In this > model, we will use a linked list instead of a global array of pointers > tcbtab. > > The structure > > struct s_tcbtab > { > struct tcb* data; >

Re: Expand full structure

2016-01-25 Thread Dmitry V. Levin
On Mon, Jan 25, 2016 at 03:24:06PM -0500, Preston Moore wrote: > Hey everyone, > > First off, sorry if this is not the proper venue for this sort of question. > Is there a way to instruct strace to output the entire structure for > *stat[64] calls? For example, in the following line: > >

Re: FOSDEM 2016 next weekend

2016-01-25 Thread Dmitry V. Levin
On Sun, Jan 24, 2016 at 11:19:04PM -0700, Jeff Law wrote: > On 01/24/2016 07:05 PM, Dmitry V. Levin wrote: > > Hi, > > > > I'm going to FOSDEM next weekend. > > There will be a lot of opportunities to meet and discuss any topics, > > related to strace o

Re: RFC strace via gdbserver

2016-01-24 Thread Dmitry V. Levin
Hi, On Wed, Jan 20, 2016 at 12:10:25PM -0800, Josh Stone wrote: > Hi, > > I've been experimenting with using strace via gdbserver, through the gdb > remote protocol. It's now in good enough state that I'd like to get > some feedback. > > First, syscall support in gdbserver is very new. There

FOSDEM 2016 next weekend

2016-01-24 Thread Dmitry V. Levin
Hi, I'm going to FOSDEM next weekend. There will be a lot of opportunities to meet and discuss any topics, related to strace or not. Please let me know if you are interested. -- ldv pgpcW4b05vu0o.pgp Description: PGP signature

Re: syscall_4294967295

2016-02-15 Thread Dmitry V. Levin
Hi, On Mon, Feb 15, 2016 at 12:12:09PM +0100, Pas wrote: > Hello! > > Thanks for the quick response and for the hint! After testing with > -fveseccomp,prctl > it turns out that: > > docker-engine 1.10.1-0~wily uses seccomp (prctl PR_SET_SECCOMP, > SECCOMP_MODE_FILTER and PR_CAPBSET_DROP ...),

Re: syscall_4294967295

2016-02-15 Thread Dmitry V. Levin
On Mon, Feb 15, 2016 at 09:30:18AM -0500, Mike Frysinger wrote: > On 15 Feb 2016 15:21, Dmitry V. Levin wrote: > > On Mon, Feb 15, 2016 at 12:12:09PM +0100, Pas wrote: > > > Thanks for the quick response and for the hint! After testing with > > > -fvesecco

Re: syscall_4294967295

2016-02-15 Thread Dmitry V. Levin
On Mon, Feb 15, 2016 at 10:11:41AM -0500, Mike Frysinger wrote: > On 15 Feb 2016 17:50, Dmitry V. Levin wrote: > > On Mon, Feb 15, 2016 at 09:30:18AM -0500, Mike Frysinger wrote: > > > On 15 Feb 2016 15:21, Dmitry V. Levin wrote: [...] > > > > On entering syscall, sec

Re: Working on -e trace

2016-02-17 Thread Dmitry V. Levin
On Wed, Feb 17, 2016 at 04:56:39PM +0530, haris iqbal wrote: > On Sun, Feb 14, 2016 at 5:54 AM, Dmitry V. Levin wrote: > > On Thu, Feb 11, 2016 at 09:04:56PM +0530, haris iqbal wrote: [...] > >> Another thing. If I did not miss any step above then I can start thinking > >

Re: GSOC Projects proposals

2016-02-18 Thread Dmitry V. Levin
On Thu, Feb 18, 2016 at 09:21:03AM +0100, Gabriel Laskar wrote: > Hi, > > Here is my 2 projects proposal for GSOC 2016. Thanks, added to https://sourceforge.net/p/strace/wiki/GoogleSummerOfCode2016/ -- ldv pgp4d_axvQLJD.pgp Description: PGP signature

Re: [PATCH] tests: add getrusage.test

2016-02-18 Thread Dmitry V. Levin
On Thu, Feb 18, 2016 at 04:04:57PM +0800, Fei Jie wrote: [...] > diff --git a/tests/getrusage.c b/tests/getrusage.c > new file mode 100644 > index 000..eea0168 > --- /dev/null > +++ b/tests/getrusage.c > @@ -0,0 +1,38 @@ > +#include "tests.h" > +#include > + > +#ifdef __NR_getrusage > + >

Re: Shift to Github?

2016-02-18 Thread Dmitry V. Levin
On Thu, Feb 18, 2016 at 03:44:49PM -0500, Mike Frysinger wrote: [...] > of course it's hard to say whether we aren't getting more contributors > because we aren't lowering the barrier via GH, or just because strace > is a fairly low-level esoteric tool. The latter is more likely the reason. I

<    4   5   6   7   8   9   10   11   12   13   >